/* ------------------------------------------------------------------
   PerfectVanta design system
   Cool white canvas, the brandmark's violet and ink, soft depth.
   Every colour goes through a --pv-* token so the dark theme is a
   token swap, not a second stylesheet.
   ------------------------------------------------------------------ */
:root {
    color-scheme: light;
    --pv-bg: #f7f6fc;
    --pv-surface: #ffffff;
    --pv-surface-2: #fbfaff;
    --pv-surface-3: #f2f0fa;
    --pv-ink: #0c1020;
    --pv-ink-2: #363a56;
    --pv-muted: #6b6f88;
    --pv-line: #e6e3f2;
    --pv-line-2: #d5d1e8;
    --pv-accent: #5b2ee8;
    --pv-accent-2: #8b5cf6;
    --pv-accent-ink: #3b1fa8;
    --pv-accent-soft: #efeaff;
    --pv-accent-line: #cfc2ff;
    --pv-gold: #d4a017;
    --pv-green: #12805c;
    --pv-green-soft: #e6f6ef;
    --pv-green-line: #c6ead8;
    --pv-red: #c2410c;
    --pv-red-soft: #fdeeea;
    --pv-red-line: #f3c7b8;
    --pv-amber: #b45309;
    --pv-amber-soft: #fdf3e2;
    --pv-amber-line: #f5dba6;
    --pv-pink: #9d174d;
    --pv-pink-soft: #fce7f3;
    --pv-dark: #0b0a1c;
    --pv-radius: 16px;
    --pv-radius-sm: 10px;
    --pv-shadow: 0 1px 2px rgba(12, 16, 32, .04), 0 8px 24px -12px rgba(12, 16, 32, .12);
    --pv-shadow-lg: 0 24px 60px -24px rgba(12, 16, 32, .25);
    --pv-ring: rgba(91, 46, 232, .14);
    --pv-glass: rgba(247, 246, 252, .82);
    --pv-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --pv-display: "Fraunces", Georgia, "Times New Roman", serif;
    --bs-body-font-family: var(--pv-font);
    --bs-body-bg: var(--pv-bg);
    --bs-body-color: var(--pv-ink);
    --bs-secondary-color: var(--pv-muted);
    --bs-tertiary-bg: var(--pv-surface-2);
    --bs-secondary-bg: var(--pv-surface-3);
    --bs-emphasis-color: var(--pv-ink);
    --bs-heading-color: var(--pv-ink);
    --bs-primary: var(--pv-accent);
    --bs-link-color: var(--pv-accent);
    --bs-link-hover-color: var(--pv-accent-2);
    --bs-border-color: var(--pv-line);
}

[data-bs-theme="dark"] {
    color-scheme: dark;
    --pv-bg: #0f0e1a;
    --pv-surface: #171627;
    --pv-surface-2: #1d1c30;
    --pv-surface-3: #25243c;
    --pv-ink: #ecebf5;
    --pv-ink-2: #c3c1d4;
    --pv-muted: #9093ad;
    --pv-line: #282741;
    --pv-line-2: #393757;
    --pv-accent: #8b74ff;
    --pv-accent-2: #b39dff;
    --pv-accent-ink: #d9d0ff;
    --pv-accent-soft: rgba(139, 116, 255, .16);
    --pv-accent-line: rgba(139, 116, 255, .4);
    --pv-gold: #e6b422;
    --pv-green: #3dcf94;
    --pv-green-soft: rgba(61, 207, 148, .14);
    --pv-green-line: rgba(61, 207, 148, .35);
    --pv-red: #fb8a5c;
    --pv-red-soft: rgba(251, 138, 92, .14);
    --pv-red-line: rgba(251, 138, 92, .35);
    --pv-amber: #f5b544;
    --pv-amber-soft: rgba(245, 181, 68, .14);
    --pv-amber-line: rgba(245, 181, 68, .35);
    --pv-pink: #f9a8d4;
    --pv-pink-soft: rgba(244, 114, 182, .16);
    --pv-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -12px rgba(0, 0, 0, .6);
    --pv-shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, .7);
    --pv-ring: rgba(139, 116, 255, .25);
    --pv-glass: rgba(15, 14, 26, .78);
    --bs-body-bg: var(--pv-bg);
    --bs-body-color: var(--pv-ink);
    --bs-secondary-color: var(--pv-muted);
    --bs-tertiary-bg: var(--pv-surface-2);
    --bs-secondary-bg: var(--pv-surface-3);
    --bs-emphasis-color: var(--pv-ink);
    --bs-heading-color: var(--pv-ink);
    --bs-border-color: var(--pv-line);
    --bs-link-color: var(--pv-accent);
    --bs-link-hover-color: var(--pv-accent-2);
}

html { -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; }
html, body { height: 100%; background: var(--pv-bg); color: var(--pv-ink); font-family: var(--pv-font); -webkit-font-smoothing: antialiased; transition: background-color .25s ease, color .25s ease; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: 650; letter-spacing: -.015em; color: var(--pv-ink); }
h1:focus { outline: none; }
a { text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code { color: var(--pv-accent-ink); background: var(--pv-accent-soft); padding: .1em .35em; border-radius: 6px; font-size: .9em; }
::selection { background: var(--pv-accent); color: #fff; }
:focus-visible { outline: 2px solid var(--pv-accent); outline-offset: 2px; border-radius: 6px; }
.btn:focus-visible, .form-control:focus-visible, .form-select:focus-visible { outline: none; }
* { scrollbar-width: thin; scrollbar-color: var(--pv-line-2) transparent; }
.text-muted { color: var(--pv-muted) !important; }
.text-danger { color: var(--pv-red) !important; }
.text-success { color: var(--pv-green) !important; }
hr { border-color: var(--pv-line); opacity: 1; }
.list-group-item { background: var(--pv-surface); color: var(--pv-ink); border-color: var(--pv-line); }
.list-group-item-action:hover { background: var(--pv-surface-2); color: var(--pv-ink); }

/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 256px; flex-shrink: 0; background: var(--pv-surface); border-right: 1px solid var(--pv-line); padding: calc(1.25rem + env(safe-area-inset-top)) 1rem calc(1.25rem + env(safe-area-inset-bottom)) calc(1rem + env(safe-area-inset-left)); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 40; transition: transform .25s ease; }
.sidebar .nav-link { display: flex; align-items: center; gap: .65rem; color: var(--pv-ink-2); border-radius: 12px; padding: .6rem .8rem; margin-bottom: .15rem; font-weight: 500; font-size: .95rem; transition: background .15s ease, color .15s ease; }
.sidebar .nav-link svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .75; }
.sidebar .nav-link:hover { background: var(--pv-surface-2); color: var(--pv-ink); text-decoration: none; }
.sidebar .nav-link.active { background: var(--pv-accent-soft); color: var(--pv-accent); }
.sidebar .nav-link.active svg { opacity: 1; }
.sidebar .section-label { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--pv-muted); margin: 1.25rem .8rem .4rem; }
/* Grouped menu: search box stays put, the groups scroll; collapsed state lives in localStorage (site.js). */
.sidebar-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 -.25rem; padding: 0 .25rem; scrollbar-width: thin; }
.nav-search { position: relative; display: flex; align-items: center; margin: 0 0 .75rem; }
.nav-search > svg { position: absolute; left: .7rem; width: 16px; height: 16px; color: var(--pv-muted); pointer-events: none; }
.nav-search .form-control { padding-left: 2.1rem; padding-right: 2rem; border-radius: 10px; background: var(--pv-surface-2); border-color: transparent; }
.nav-search .form-control:focus { background: var(--pv-surface); border-color: var(--pv-accent); box-shadow: none; }
.nav-search kbd { position: absolute; right: .6rem; font-size: .68rem; padding: .05rem .35rem; border-radius: 5px; background: var(--pv-surface); border: 1px solid var(--pv-line); color: var(--pv-muted); pointer-events: none; }
.nav-search .form-control:focus ~ kbd, .nav-search .form-control:not(:placeholder-shown) ~ kbd { display: none; }
.nav-group { margin-bottom: .35rem; }
.nav-group-head { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: 0; padding: .45rem .8rem .3rem; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--pv-muted); border-radius: 8px; cursor: pointer; }
.nav-group-head:hover { color: var(--pv-ink); background: var(--pv-surface-2); }
.nav-group-head .chev { width: 14px; height: 14px; transition: transform .18s ease; }
.nav-group.collapsed .nav-group-head .chev { transform: rotate(-90deg); }
.nav-group.collapsed .nav-group-body { display: none; }
.sidebar.searching .nav-group-head { pointer-events: none; }
.sidebar.searching .nav-group.collapsed .nav-group-body { display: flex; }
.sidebar .nav-link[hidden], .sidebar .nav-group[hidden] { display: none; }
.nav-link .nav-text mark { background: var(--pv-accent-soft); color: inherit; padding: 0; border-radius: 3px; }
.nav-empty { padding: .6rem .8rem; }
.sidebar-foot { margin-top: auto; padding: .75rem .8rem 0; font-size: .78rem; color: var(--pv-muted); border-top: 1px solid var(--pv-line); }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.topbar .nav-burger, .nav-scrim, .topbar .brand-sm { display: none; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { background: var(--pv-glass); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--pv-line); padding: calc(.7rem + env(safe-area-inset-top)) calc(2rem + env(safe-area-inset-right)) .7rem 2rem; display: flex; align-items: center; gap: .75rem; position: sticky; top: 0; z-index: 20; }
.topbar .spacer { flex: 1; }
.user-chip { display: inline-flex; align-items: center; gap: .6rem; padding: .3rem .8rem .3rem .3rem; border: 1px solid var(--pv-line); background: var(--pv-surface); border-radius: 999px; font-size: .9rem; max-width: 260px; }
.user-chip > span:last-child { min-width: 0; }
.user-chip .d-block { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--pv-accent), var(--pv-accent-2)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; flex-shrink: 0; }
.user-chip .role { font-size: .72rem; color: var(--pv-muted); text-transform: uppercase; letter-spacing: .08em; }
a.user-chip { text-decoration: none; color: inherit; transition: border-color .15s ease, box-shadow .15s ease; }
a.user-chip:hover { border-color: var(--pv-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pv-accent) 15%, transparent); }

/* Product import: one tile per way of bringing products in */
.import-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.import-mode { position: relative; text-align: left; border: 1.5px solid var(--pv-line); background: var(--pv-surface); border-radius: var(--pv-radius); padding: .9rem 2.2rem .9rem 1rem; display: grid; grid-template-columns: 34px 1fr; column-gap: .75rem; row-gap: .15rem; cursor: pointer; color: inherit; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.import-mode:hover { border-color: var(--pv-accent); }
.import-mode.active { border-color: var(--pv-accent); background: color-mix(in srgb, var(--pv-accent) 7%, var(--pv-surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pv-accent) 15%, transparent); }
.import-mode > svg { width: 34px; height: 34px; grid-row: span 2; color: var(--pv-accent); align-self: center; }
.import-mode .t { font-weight: 600; }
.import-mode .d { font-size: .82rem; color: var(--pv-muted); line-height: 1.3; }
.import-mode .tick { position: absolute; top: .55rem; right: .7rem; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--pv-line); display: inline-flex; align-items: center; justify-content: center; font-size: .7rem; color: transparent; }
.import-mode.active .tick { background: var(--pv-accent); border-color: var(--pv-accent); color: #fff; }
.import-step { border-top: 1px solid var(--pv-line); padding-top: 1rem; }
.format-example { background: var(--pv-surface-2); border: 1px solid var(--pv-line); border-radius: 10px; padding: .75rem .9rem; }
.format-example pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .74rem; margin: 0 0 .5rem; background: transparent; color: var(--pv-ink); }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; min-height: 160px; border: 2px dashed var(--pv-line); border-radius: var(--pv-radius); background: var(--pv-surface-2); text-align: center; padding: 1rem; cursor: pointer; transition: border-color .15s ease; }
.dropzone:hover, .dropzone.has-file { border-color: var(--pv-accent); }
.dropzone input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone svg { width: 32px; height: 32px; color: var(--pv-accent); }
.dropzone .dropzone-preview { max-height: 200px; max-width: 100%; width: auto; border-radius: 8px; object-fit: contain; }
.dropzone:has(input:disabled) { opacity: .6; cursor: progress; }
.dropzone .t { font-weight: 600; }
.dropzone .d { font-size: .82rem; color: var(--pv-muted); }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--pv-line); background: var(--pv-surface); color: var(--pv-ink-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s ease, color .15s ease, transform .15s ease; }
.icon-btn:hover { background: var(--pv-surface-2); color: var(--pv-ink); }
.icon-btn:active { transform: scale(.95); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .sun, [data-bs-theme="dark"] .theme-toggle .moon { display: none; }
[data-bs-theme="dark"] .theme-toggle .sun { display: block; }
.content { padding: 2rem 2rem calc(2rem + env(safe-area-inset-bottom)); max-width: 1240px; width: 100%; animation: pv-fade .35s ease backwards; } /* not "both": a held transform would trap position:fixed overlays inside .content */
.content img, .card img { max-width: 100%; height: auto; }
@keyframes pv-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.brand { display: flex; align-items: center; gap: .65rem; margin-bottom: 1.5rem; color: var(--pv-ink); }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, #3b1fa8, #7c3aed); color: #fff; font-weight: 700; font-size: .85rem; letter-spacing: -.02em; box-shadow: 0 6px 16px -6px rgba(91, 46, 232, .6); flex-shrink: 0; }
.brand-name { font-weight: 650; font-size: 1.05rem; letter-spacing: -.01em; }
.brand .logo { display: block; width: 100%; max-width: 220px; height: auto; }
.brand .logo-dark, [data-bs-theme="dark"] .brand .logo-light { display: none; }
[data-bs-theme="dark"] .brand .logo-dark { display: block; }
.logo-mark { width: 36px; height: 36px; flex-shrink: 0; }
.sidebar .brand { padding: .35rem .5rem .25rem; margin-bottom: 1.25rem; }
.auth-side .brand .logo { max-width: 280px; }
.auth-card .brand .logo { max-width: 250px; }
.lp-nav .brand .logo { max-width: 200px; }
.share-card .logo-mark { width: 42px; height: 42px; }
.sidebar-foot .pwa-install svg { width: 16px; height: 16px; margin-right: .3rem; vertical-align: -3px; }
.sidebar-foot .pwa-ios-hint { margin-bottom: .6rem; color: var(--pv-ink-2); }
@media (display-mode: standalone), (display-mode: fullscreen) { .pwa-install, .pwa-ios-hint { display: none !important; } }

/* ---------- Page headers ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head h1 { font-size: 1.6rem; margin: 0; }
.page-head .lede { color: var(--pv-muted); margin: .2rem 0 0; }
.page-head .actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

/* ---------- Cards, stats ---------- */
.card { border: 1px solid var(--pv-line); border-radius: var(--pv-radius); background: var(--pv-surface); box-shadow: var(--pv-shadow); color: var(--pv-ink); }
.card .card-body { padding: 1.35rem 1.5rem; }
.card h2.h6, .card h3.h6 { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--pv-muted); margin-bottom: 1rem; }
.card .hint { font-size: .85rem; color: var(--pv-muted); margin: -.5rem 0 1rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.stat { background: var(--pv-surface); border-radius: var(--pv-radius); padding: 1.1rem 1.3rem; border: 1px solid var(--pv-line); box-shadow: var(--pv-shadow); transition: transform .2s ease, box-shadow .2s ease; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--pv-shadow-lg); }
.stat .label { color: var(--pv-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; }
.stat .value { font-size: 2rem; font-weight: 700; letter-spacing: -.03em; margin-top: .25rem; font-variant-numeric: tabular-nums; }
.stat .value .fs-6 { font-weight: 500; }
.stat.warn { border-color: var(--pv-red-line); background: linear-gradient(180deg, var(--pv-red-soft), var(--pv-surface)); }
.quick-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.quick-actions .btn svg { width: 15px; height: 15px; margin-right: .35rem; vertical-align: -3px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 0 0 var(--pv-radius) var(--pv-radius); }
.table { --bs-table-color: var(--pv-ink); --bs-table-bg: transparent; --bs-table-border-color: var(--pv-line); --bs-table-striped-bg: var(--pv-surface-2); --bs-table-hover-bg: var(--pv-surface-2); margin-bottom: 0; color: var(--pv-ink); }
.table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--pv-muted); font-weight: 600; border-bottom: 1px solid var(--pv-line); padding: .75rem 1rem; white-space: nowrap; }
.table tbody td { padding: .85rem 1rem; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.muted-row td { color: var(--pv-muted); }
.card > .table thead th:first-child, .card > .table tbody td:first-child, .card > .table-wrap .table thead th:first-child, .card > .table-wrap .table tbody td:first-child { padding-left: 1.5rem; }
.card > .table thead th:last-child, .card > .table tbody td:last-child, .card > .table-wrap .table thead th:last-child, .card > .table-wrap .table tbody td:last-child { padding-right: 1.5rem; }

/* ---------- Buttons, forms, badges, alerts ---------- */
.btn { border-radius: 999px; font-weight: 550; padding: .5rem 1.05rem; letter-spacing: -.005em; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: .3rem .8rem; font-size: .82rem; }
.btn .spinner-border { width: .85em; height: .85em; border-width: .15em; margin-right: .4em; vertical-align: -.1em; }
.btn-primary { --bs-btn-bg: var(--pv-accent); --bs-btn-border-color: var(--pv-accent); --bs-btn-hover-bg: #4a22c9; --bs-btn-hover-border-color: #4338ca; --bs-btn-active-bg: #3730a3; --bs-btn-active-border-color: #3730a3; --bs-btn-disabled-bg: var(--pv-accent); --bs-btn-disabled-border-color: var(--pv-accent); box-shadow: 0 8px 20px -10px rgba(91, 46, 232, .7); }
.btn-success { --bs-btn-bg: var(--pv-green); --bs-btn-border-color: var(--pv-green); --bs-btn-hover-bg: #0f6b4d; --bs-btn-hover-border-color: #0f6b4d; --bs-btn-disabled-bg: var(--pv-green); --bs-btn-disabled-border-color: var(--pv-green); }
[data-bs-theme="dark"] .btn-success { --bs-btn-color: #06281b; --bs-btn-hover-color: #06281b; }
.btn-outline-secondary { --bs-btn-color: var(--pv-ink-2); --bs-btn-border-color: var(--pv-line-2); --bs-btn-hover-bg: var(--pv-surface-2); --bs-btn-hover-color: var(--pv-ink); --bs-btn-hover-border-color: var(--pv-line-2); --bs-btn-disabled-color: var(--pv-muted); --bs-btn-disabled-border-color: var(--pv-line); background: var(--pv-surface); }
.btn-outline-primary { --bs-btn-color: var(--pv-accent); --bs-btn-border-color: var(--pv-accent-line); --bs-btn-hover-bg: var(--pv-accent-soft); --bs-btn-hover-color: var(--pv-accent); --bs-btn-hover-border-color: var(--pv-accent-line); --bs-btn-disabled-color: var(--pv-accent); --bs-btn-disabled-border-color: var(--pv-accent-line); --bs-btn-active-bg: var(--pv-accent); --bs-btn-active-border-color: var(--pv-accent); --bs-btn-active-color: #fff; }
.btn-outline-danger { --bs-btn-color: var(--pv-red); --bs-btn-border-color: var(--pv-red-line); --bs-btn-hover-bg: var(--pv-red-soft); --bs-btn-hover-color: var(--pv-red); --bs-btn-hover-border-color: var(--pv-red-line); --bs-btn-disabled-color: var(--pv-red); --bs-btn-disabled-border-color: var(--pv-red-line); }
.btn-outline-success { --bs-btn-color: var(--pv-green); --bs-btn-border-color: var(--pv-green-line); --bs-btn-hover-bg: var(--pv-green-soft); --bs-btn-hover-color: var(--pv-green); --bs-btn-hover-border-color: var(--pv-green-line); }
.btn-warning { --bs-btn-bg: #fde68a; --bs-btn-border-color: #fde68a; --bs-btn-color: #78350f; --bs-btn-hover-bg: #fcd34d; --bs-btn-hover-border-color: #fcd34d; --bs-btn-hover-color: #78350f; }
.btn-link { --bs-btn-color: var(--pv-accent); --bs-btn-hover-color: var(--pv-accent-2); }
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: #fff; --bs-btn-color: #0b0c14; --bs-btn-hover-bg: #eceae4; --bs-btn-hover-border-color: #eceae4; --bs-btn-hover-color: #0b0c14; }
.form-control, .form-select { border-radius: var(--pv-radius-sm); border-color: var(--pv-line-2); padding: .55rem .85rem; background: var(--pv-surface); color: var(--pv-ink); }
.form-control::placeholder { color: var(--pv-muted); opacity: .8; }
.form-control:focus, .form-select:focus { border-color: var(--pv-accent); box-shadow: 0 0 0 4px var(--pv-ring); background: var(--pv-surface); color: var(--pv-ink); }
.form-control:disabled, .form-select:disabled { background: var(--pv-surface-3); }
.form-control-sm, .form-select-sm { padding: .4rem .7rem; }
.form-label { font-size: .85rem; font-weight: 550; color: var(--pv-ink-2); margin-bottom: .35rem; }
.form-check-input { background-color: var(--pv-surface); border-color: var(--pv-line-2); }
.form-check-input:checked { background-color: var(--pv-accent); border-color: var(--pv-accent); }
.form-check-input:focus { border-color: var(--pv-accent); box-shadow: 0 0 0 4px var(--pv-ring); }
.form-switch .form-check-input { width: 2.4em; height: 1.3em; margin-top: .1em; }
.input-group-text { background: var(--pv-surface-2); border-color: var(--pv-line-2); color: var(--pv-muted); }
.validation-message { color: var(--pv-red); font-size: .82rem; margin-top: .3rem; }
.badge { border-radius: 999px; font-weight: 600; letter-spacing: .02em; padding: .35em .7em; }
.badge.bg-primary { background: var(--pv-accent-soft) !important; color: var(--pv-accent-ink); }
.badge.bg-danger { background: var(--pv-pink-soft) !important; color: var(--pv-pink); }
.badge.bg-success { background: var(--pv-green-soft) !important; color: var(--pv-green); }
.badge.bg-secondary { background: var(--pv-surface-3) !important; color: var(--pv-ink-2); }
.badge.text-bg-success { background: var(--pv-green-soft) !important; color: var(--pv-green) !important; }
.badge.text-bg-danger { background: var(--pv-red-soft) !important; color: var(--pv-red) !important; }
.badge.text-bg-warning { background: var(--pv-amber-soft) !important; color: var(--pv-amber) !important; }
.badge.text-bg-info { background: var(--pv-accent-soft) !important; color: var(--pv-accent) !important; }
.badge.text-bg-secondary, .badge.text-bg-light { background: var(--pv-surface-3) !important; color: var(--pv-ink-2) !important; }
.badge svg { width: 11px; height: 11px; margin-right: .3em; vertical-align: -1px; }
.alert { border-radius: var(--pv-radius-sm); border: 1px solid transparent; display: flex; gap: .6rem; align-items: flex-start; padding: .8rem 1rem; }
.alert .alert-ico { width: 18px; height: 18px; flex-shrink: 0; margin-top: .1rem; }
.alert .alert-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.alert .btn-close { margin: -.2rem -.3rem -.2rem 0; padding: .5rem; opacity: .55; }
[data-bs-theme="dark"] .alert .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
.alert-success { background: var(--pv-green-soft); color: var(--pv-green); border-color: var(--pv-green-line); }
.alert-danger { background: var(--pv-red-soft); color: var(--pv-red); border-color: var(--pv-red-line); }
.alert-info { background: var(--pv-accent-soft); color: var(--pv-accent-ink); border-color: var(--pv-accent-line); }
.alert-warning { background: var(--pv-amber-soft); color: var(--pv-amber); border-color: var(--pv-amber-line); }
.alert .alert-link { color: inherit; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
/* Messages (saved, failed, ...) are toasts at the top right. A solid card with a coloured edge, so it reads over any page or popup. */
.pv-toast { position: fixed; top: calc(env(safe-area-inset-top) + 84px); right: calc(env(safe-area-inset-right) + 1.25rem); z-index: 1100; width: min(420px, calc(100vw - 2rem)); max-height: 9rem; overflow-y: auto; margin: 0; background: var(--pv-surface) !important; color: var(--pv-ink) !important; border: 1px solid var(--pv-line) !important; border-left: 5px solid var(--pv-accent-ink) !important; box-shadow: var(--pv-shadow-lg); animation: pv-toast-in .22s ease-out; }
.pv-toast.alert-success { border-left-color: var(--pv-green) !important; } .pv-toast.alert-success .alert-ico { color: var(--pv-green); }
.pv-toast.alert-danger { border-left-color: var(--pv-red) !important; } .pv-toast.alert-danger .alert-ico { color: var(--pv-red); }
.pv-toast.alert-warning { border-left-color: var(--pv-amber) !important; } .pv-toast.alert-warning .alert-ico { color: var(--pv-amber); }
.pv-toast.alert-info .alert-ico { color: var(--pv-accent-ink); }
/* Two messages at once (an error and a confirmation): the second sits under the first. */
.pv-toast ~ .pv-toast { top: calc(env(safe-area-inset-top) + 84px + 9.75rem); }
@keyframes pv-toast-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pv-toast { animation: none; } }
@media (max-width: 575.98px) { .pv-toast { right: 1rem; top: calc(env(safe-area-inset-top) + 72px); } }

/* ---------- Loading & empty states ---------- */
.skeleton { position: relative; overflow: hidden; background: var(--pv-surface-3); border-radius: 8px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); animation: pv-shimmer 1.4s infinite; }
[data-bs-theme="dark"] .skeleton::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), transparent); }
@keyframes pv-shimmer { to { transform: translateX(100%); } }
.sk-line { height: 12px; margin-bottom: .6rem; }
.sk-line.w-25 { width: 25%; } .sk-line.w-50 { width: 50%; } .sk-line.w-75 { width: 75%; }
.sk-title { height: 18px; width: 40%; margin-bottom: .9rem; }
.sk-stat { height: 92px; border-radius: var(--pv-radius); }
.sk-block { height: 160px; border-radius: var(--pv-radius); }
.empty { text-align: center; padding: 3rem 1.25rem; color: var(--pv-muted); }
.empty .ico { width: 56px; height: 56px; border-radius: 16px; background: var(--pv-accent-soft); color: var(--pv-accent); display: inline-flex; align-items: center; justify-content: center; margin-bottom: .75rem; }
.empty .ico svg { width: 26px; height: 26px; }
.empty h2, .empty h1 { font-size: 1.15rem; margin-bottom: .35rem; color: var(--pv-ink); }
.empty p { max-width: 46ch; margin: 0 auto .5rem; }
.empty .actions { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }
.empty.compact { padding: 2rem 1rem; }

/* ---------- Domain bits ---------- */
.stars { color: var(--pv-gold); letter-spacing: 1px; }
.topic { display: inline-block; background: var(--pv-accent-soft); color: var(--pv-accent-ink); border-radius: 999px; padding: .15rem .7rem; font-size: .8rem; margin: 0 .3rem .3rem 0; font-weight: 500; }
.review-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.sentiment-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--pv-line); }
.sentiment-bar span { display: block; height: 100%; transition: width .5s ease; }
.sentiment-bar .bg-success { background: var(--pv-green) !important; }
.sentiment-bar .bg-danger { background: var(--pv-red) !important; }
.sentiment-bar .bg-warning { background: var(--pv-amber) !important; }
.sentiment-bar .bg-secondary { background: var(--pv-line-2) !important; }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: var(--pv-muted); }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.legend .pos { background: var(--pv-green); } .legend .neu { background: var(--pv-line-2); } .legend .mix { background: var(--pv-amber); } .legend .neg { background: var(--pv-red); }
.caption-option { cursor: pointer; border-radius: var(--pv-radius-sm); }
.caption-option:hover { background: var(--pv-surface-2); }
.provider-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: .35rem; vertical-align: 1px; }
.provider-dot.facebook { background: #1877f2; } .provider-dot.instagram { background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af); } .provider-dot.google { background: #34a853; }
.provider-dot.linkedin { background: #0a66c2; } .provider-dot.pinterest { background: #e60023; }
.badge.bg-linkedin { background: #0a66c2; color: #fff; } .badge.bg-pinterest { background: #e60023; color: #fff; }
.btn-linkedin { background: #0a66c2; border-color: #0a66c2; color: #fff; } .btn-linkedin:hover { background: #084f96; border-color: #084f96; color: #fff; }
.btn-pinterest { background: #e60023; border-color: #e60023; color: #fff; } .btn-pinterest:hover { background: #bd001d; border-color: #bd001d; color: #fff; }
.provider-dot.youtube { background: #ff0000; } .badge.bg-youtube { background: #ff0000; color: #fff; }
.btn-youtube { background: #ff0000; border-color: #ff0000; color: #fff; } .btn-youtube:hover { background: #cc0000; border-color: #cc0000; color: #fff; }
/* E-mail campaigns */
.mail-preview { width: 100%; height: 560px; border: 1px solid var(--pv-border, #e5e7eb); border-radius: 10px; background: #f4f5f7; }
.mail-progress { height: 8px; border-radius: 4px; background: var(--pv-border, #e5e7eb); overflow: hidden; }
.mail-progress > span { display: block; height: 100%; background: var(--pv-accent, #5b2ee8); }
.mail-progress > span.failed { background: #dc3545; }
.placeholder-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.placeholder-chips code { cursor: pointer; }

/* Inbox items */
.filters { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto 1.4fr; gap: .6rem; align-items: center; }
.filters .form-check { margin: 0; white-space: nowrap; }
.item { margin-bottom: 1rem; transition: box-shadow .2s ease; }
.item:hover { box-shadow: var(--pv-shadow-lg); }
.item.attention { border-left: 3px solid var(--pv-red); }
.item-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: .75rem; }
.item-who { display: flex; gap: .75rem; align-items: center; min-width: 0; }
.author-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--pv-surface-3); color: var(--pv-ink-2); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.item-who .name { font-weight: 600; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.item-who .meta { color: var(--pv-muted); font-size: .82rem; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.item-who .meta .sep::before { content: "·"; }
.item-tags { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.item-context { color: var(--pv-muted); font-size: .85rem; margin-bottom: .35rem; border-left: 2px solid var(--pv-line-2); padding-left: .6rem; }
.item .review-text { font-size: 1rem; line-height: 1.6; margin-bottom: .9rem; }
.insight { background: var(--pv-surface-2); border: 1px solid var(--pv-line); border-radius: var(--pv-radius-sm); padding: .75rem .9rem; font-size: .88rem; margin-bottom: .9rem; display: grid; grid-template-columns: auto 1fr; gap: .6rem; }
.insight .ai { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, var(--pv-accent), var(--pv-accent-2)); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.insight .ai svg { width: 14px; height: 14px; }
.insight .topic { margin-top: .4rem; }
.reply-block { border-left: 3px solid var(--pv-green); padding: .3rem 0 .3rem 1rem; }
.reply-block .by { color: var(--pv-muted); font-size: .82rem; margin-bottom: .25rem; }
.composer textarea { border-radius: var(--pv-radius-sm); resize: vertical; min-height: 86px; }
.composer .toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .6rem; }
.composer .guidance { display: flex; flex: 1 1 280px; max-width: 460px; }
.composer .guidance .form-control { border-radius: 999px 0 0 999px; }
.composer .guidance .btn { border-radius: 0 999px 999px 0; }
.ai-chip { display: inline-flex; align-items: center; gap: .35rem; }
.ai-chip svg { width: 13px; height: 13px; }

/* Post preview */
.preview { background: var(--pv-surface-2); border: 1px solid var(--pv-line); border-radius: var(--pv-radius); padding: 1rem; }
.preview .ph { display: flex; gap: .6rem; align-items: center; margin-bottom: .6rem; }
.preview .ph .avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--pv-accent), var(--pv-accent-2)); }
.preview .ph b { display: block; font-size: .88rem; line-height: 1.1; }
.preview .ph span { color: var(--pv-muted); font-size: .75rem; }
.preview .body { font-size: .9rem; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 180px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
.preview .img { aspect-ratio: 4 / 3; border-radius: 10px; background: var(--pv-surface-3) center / cover no-repeat; margin-top: .6rem; display: flex; align-items: center; justify-content: center; color: var(--pv-muted); font-size: .8rem; overflow: hidden; }
.preview .img img { width: 100%; height: 100%; object-fit: cover; }
.preview .link { margin-top: .6rem; border: 1px solid var(--pv-line); border-radius: 8px; padding: .4rem .6rem; font-size: .78rem; color: var(--pv-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.char-count { font-size: .78rem; color: var(--pv-muted); display: flex; justify-content: space-between; margin-top: .3rem; }
.char-count.over { color: var(--pv-red); font-weight: 600; }

/* Products & status posts */
.product-thumb { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; background: var(--pv-surface-3); border: 1px solid var(--pv-line); }
.placeholder-thumb { font-size: .8rem; font-weight: 700; color: var(--pv-ink-2); }
.days { display: flex; gap: .4rem; flex-wrap: wrap; }
.days .day { cursor: pointer; border: 1px solid var(--pv-line-2); border-radius: 999px; padding: .3rem .8rem; font-size: .82rem; font-weight: 600; color: var(--pv-ink-2); background: var(--pv-surface); user-select: none; }
.days .day input { display: none; }
/* Auto posts: next week's "best time" per day; days learned from the workspace's own results are highlighted. */
.best-times { border: 1px dashed var(--pv-line-2); border-radius: 12px; padding: .6rem .75rem; }
.best-times-days { display: flex; flex-wrap: wrap; gap: .4rem; }
.best-time { border: 1px solid var(--pv-line-2); border-radius: 999px; padding: .2rem .65rem; font-size: .82rem; color: var(--pv-ink-2); font-variant-numeric: tabular-nums; }
.best-time strong { font-weight: 600; margin-right: .2rem; }
.best-time.learned { border-color: var(--pv-accent); color: var(--pv-accent); }
.days .day.on { background: var(--pv-accent-soft); color: var(--pv-accent); border-color: var(--pv-accent-line); }
.preview-frame { border-radius: 22px; overflow: hidden; background: var(--pv-surface-3); border: 1px solid var(--pv-line); margin: 0 auto; box-shadow: var(--pv-shadow); }
.preview-frame.story { width: min(100%, 270px); aspect-ratio: 9 / 16; }
.preview-frame.feed { width: min(100%, 320px); aspect-ratio: 4 / 5; }
.preview-frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.preview-frame { position: relative; }
.preview-frame.loading img { opacity: .35; filter: blur(1px); transition: opacity .2s; }
.preview-busy { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; background: rgba(255, 255, 255, .45); color: var(--pv-ink, #1f2937); font-size: .85rem; text-align: center; padding: 1rem; }
[data-theme="dark"] .preview-busy { background: rgba(0, 0, 0, .45); color: #fff; }
.share-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.share-row input { max-width: 360px; flex: 1 1 200px; }
.bare-wrap { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 1rem; background: var(--pv-bg, #f6f5f2); }
.share-card { width: 100%; max-width: 440px; background: var(--pv-surface, #fff); border: 1px solid var(--pv-line, #e6e4de); border-radius: 20px; padding: 1.25rem; box-shadow: var(--pv-shadow, 0 10px 30px rgba(0,0,0,.06)); }
.share-card .preview-frame.story { width: min(100%, 300px); }
.share-caption { font-size: .9rem; white-space: pre-wrap; }
.brand-thumb { flex: 0 0 132px; width: 132px; aspect-ratio: 1; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--pv-line-2); margin-top: .25rem; }
.brand-sample { flex: 0 0 132px; width: 132px; }
.brand-sample-img { display: block; width: 132px; border-radius: 10px; border: 1px solid var(--pv-line-2); margin-top: .25rem; }
.brand-sample-hint { font-size: .72rem; color: var(--pv-muted); margin-top: .35rem; line-height: 1.3; }
.brand-thumb-top { padding: 8px 8px 0; height: 34px; }
.brand-thumb-top img { height: 26px; max-width: 60px; object-fit: contain; border-radius: 4px; }
.brand-thumb-logo { display: inline-block; font-size: 9px; font-weight: 700; padding: 4px 7px; border-radius: 4px; }
.brand-thumb-body { flex: 1; padding: 4px 8px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 5px; }
.brand-thumb-head { font-size: 14px; font-weight: 800; line-height: 1.1; }
.brand-thumb-rule { width: 28px; height: 3px; border-radius: 2px; }
.brand-thumb-pill { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.brand-thumb-bar { font-size: 9px; font-weight: 600; text-align: center; padding: 5px 4px; }
.color-row { display: flex; align-items: center; gap: .5rem; }
.color-row input[type="color"] { width: 44px; height: 38px; padding: 2px; border-radius: 8px; border: 1px solid var(--pv-line-2); background: var(--pv-surface); }

/* Mini radar on dashboard */
.radar-card .mini-ring { --pct: 0; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: conic-gradient(var(--ring, var(--pv-accent)) calc(var(--pct) * 1%), var(--pv-line) 0); }
.radar-card .mini-ring.good { --ring: var(--pv-green); }
.radar-card .mini-ring.fair { --ring: var(--pv-amber); }
.radar-card .mini-ring.poor { --ring: var(--pv-red); }
.radar-card .mini-inner { width: 56px; height: 56px; border-radius: 50%; background: var(--pv-surface); display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; color: var(--pv-ink); }
.radar-card .mini-signals { font-size: .85rem; }
.radar-card .mini-badge { font-size: .6rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; padding: .15rem .4rem; border-radius: .35rem; flex-shrink: 0; margin-top: .15rem; }
.radar-card .mini-badge.critical { background: var(--pv-red-soft); color: var(--pv-red); }
.radar-card .mini-badge.warning { background: var(--pv-amber-soft); color: var(--pv-amber); }
.radar-card .mini-badge.info { background: var(--pv-accent-soft); color: var(--pv-accent); }
.radar-card .mini-badge.positive { background: var(--pv-green-soft); color: var(--pv-green); }

/* Pager */
.pager { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: 1rem; font-size: .85rem; color: var(--pv-muted); }
.pager .btns { display: flex; gap: .35rem; }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-side { background: radial-gradient(1200px 600px at 20% 10%, rgba(124, 58, 237, .35), transparent 60%), radial-gradient(800px 500px at 80% 90%, rgba(91, 46, 232, .35), transparent 60%), var(--pv-dark); color: #e7e5e0; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side .brand { color: #fff; }
.auth-side h2 { font-family: var(--pv-display); font-weight: 500; font-size: 2.4rem; line-height: 1.15; color: #fff; letter-spacing: -.02em; }
.auth-side p { color: #b9b6ae; max-width: 42ch; }
.auth-side .quote { border-left: 2px solid rgba(255,255,255,.25); padding-left: 1rem; color: #cfccc4; font-size: .95rem; }
.auth-side .foot { color: #8c8a82; font-size: .85rem; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth-card { background: var(--pv-surface); border-radius: 24px; padding: 2.25rem; width: 100%; max-width: 440px; box-shadow: var(--pv-shadow-lg); border: 1px solid var(--pv-line); }
/* Sign in with Google: Google's neutral button style (white, grey border, multicolour G) in both themes. */
.btn-google { display: flex; align-items: center; justify-content: center; gap: .6rem; background: #fff; color: #1f1f1f; border: 1px solid #747775; font-weight: 500; }
.btn-google:hover, .btn-google:focus-visible { background: #f2f2f2; color: #1f1f1f; border-color: #747775; }
.auth-or { display: flex; align-items: center; gap: .75rem; margin: 1.1rem 0; color: var(--pv-muted); font-size: .85rem; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: 1px solid var(--pv-line); }
.auth-card .brand { color: var(--pv-ink); margin-bottom: 1rem; }
.auth-card h1 { font-size: 1.5rem; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------- Landing (public) ---------- */
.lp { color: var(--pv-ink); background: var(--pv-bg); overflow-x: clip; }
.lp .wrap { width: min(1160px, 92vw); margin: 0 auto; }
/* Links to a section (/privacy#youtube, #pricing) land below the sticky site header instead of under it. */
html { scroll-padding-top: 96px; }
.lp-nav { position: sticky; top: 0; z-index: 50; background: var(--pv-glass); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.lp-nav.scrolled { border-bottom-color: var(--pv-line); }
.lp-nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 1rem; }
.lp-nav .links { display: flex; gap: 1.6rem; }
.lp-nav .links a { color: var(--pv-ink-2); font-weight: 500; font-size: .93rem; }
.lp-nav .links a:hover { color: var(--pv-ink); text-decoration: none; }
.lp-nav .brand { margin: 0; }
.lp-nav .lp-burger { display: none; }
.lp .cta { display: flex; gap: .6rem; align-items: center; }
.btn-ghost { color: var(--pv-ink); background: transparent; border: 1px solid var(--pv-line-2); }
.btn-ghost:hover { background: var(--pv-surface); border-color: var(--pv-line-2); color: var(--pv-ink); }
.btn-lg { padding: .8rem 1.5rem; font-size: 1.02rem; }

.hero { position: relative; padding: 5.5rem 0 4rem; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto; height: 70%; background: radial-gradient(700px 360px at 30% 20%, rgba(124, 58, 237, .18), transparent 60%), radial-gradient(600px 300px at 75% 10%, rgba(91, 46, 232, .16), transparent 60%); pointer-events: none; z-index: 0; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--pv-accent); font-weight: 650; background: var(--pv-accent-soft); border-radius: 999px; padding: .35rem .9rem; margin-bottom: 1.25rem; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pv-accent); animation: pv-pulse 2s infinite; }
@keyframes pv-pulse { 0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, .55); } 70% { box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); } 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); } }
.display { font-family: var(--pv-display); font-weight: 500; font-size: clamp(2.4rem, 5.2vw, 4.2rem); line-height: 1.05; letter-spacing: -.025em; margin: 0 0 1.25rem; }
.display em { font-style: italic; color: var(--pv-accent); }
.lede-lg { font-size: 1.18rem; color: var(--pv-ink-2); max-width: 52ch; line-height: 1.6; }
.hero .cta { margin-top: 1.75rem; flex-wrap: wrap; }
.hero .trust { margin-top: 1.5rem; display: flex; gap: 1.25rem; flex-wrap: wrap; color: var(--pv-muted); font-size: .88rem; }
.hero .trust span::before { content: "✓"; color: var(--pv-green); margin-right: .4rem; font-weight: 700; }

.media-card { position: relative; border-radius: 22px; overflow: hidden; background: var(--pv-dark); box-shadow: var(--pv-shadow-lg); aspect-ratio: 16 / 10; border: 1px solid rgba(255,255,255,.08); }
.media-card img, .media-card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-card video { opacity: 0; transition: opacity .6s ease; }
.media-card.video-ready video { opacity: 1; }
.media-card .chip { position: absolute; left: 1rem; bottom: 1rem; background: rgba(11, 12, 20, .72); color: #fff; padding: .4rem .8rem; border-radius: 999px; font-size: .8rem; backdrop-filter: blur(6px); display: flex; align-items: center; gap: .5rem; }
.media-card .chip i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; display: inline-block; }

.logos { padding: 1.5rem 0 3rem; }
.logos .wrap { display: flex; justify-content: center; gap: 2.4rem; flex-wrap: wrap; color: var(--pv-muted); font-size: .9rem; letter-spacing: .04em; }
.logos .wrap span { opacity: .85; }

.section { padding: 5rem 0; }
.section.alt { background: var(--pv-surface); border-top: 1px solid var(--pv-line); border-bottom: 1px solid var(--pv-line); }
.section-head { max-width: 62ch; margin: 0 auto 3rem; text-align: center; }
.section-head h2 { font-family: var(--pv-display); font-weight: 500; font-size: clamp(1.9rem, 3.4vw, 2.8rem); letter-spacing: -.02em; line-height: 1.15; margin-bottom: .75rem; }
.section-head p { color: var(--pv-ink-2); font-size: 1.08rem; }

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: -1.5rem; margin-bottom: 1rem; }
.stats-row .k { background: var(--pv-surface); border: 1px solid var(--pv-line); border-radius: var(--pv-radius); padding: 1.2rem 1.4rem; box-shadow: var(--pv-shadow); }
.stats-row .k b { display: flex; align-items: baseline; gap: .4rem; font-size: 2.2rem; line-height: 1.1; letter-spacing: -.03em; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--pv-ink); }
.stats-row .k b .num { font-size: inherit; color: inherit; }
.stats-row .k b .unit { font-size: 1rem; font-weight: 600; letter-spacing: 0; color: var(--pv-ink-2); }
.stats-row .k > span { display: block; color: var(--pv-muted); font-size: .9rem; margin-top: .35rem; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.feature { background: var(--pv-surface); border: 1px solid var(--pv-line); border-radius: 22px; overflow: hidden; box-shadow: var(--pv-shadow); transition: transform .25s ease, box-shadow .25s ease; display: flex; flex-direction: column; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--pv-shadow-lg); }
.feature .art { aspect-ratio: 4 / 3; background: linear-gradient(180deg, var(--pv-accent-soft), var(--pv-surface-2)); display: flex; align-items: center; justify-content: center; }
.feature .art img { width: 100%; height: 100%; object-fit: cover; }
.feature .body { padding: 1.4rem 1.5rem 1.6rem; }
.feature h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.feature p { color: var(--pv-ink-2); margin: 0; line-height: 1.55; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; counter-reset: step; }
.step { position: relative; padding: 1.6rem; background: var(--pv-surface-2); border: 1px solid var(--pv-line); border-radius: 20px; }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: var(--pv-display); font-size: 2.2rem; color: var(--pv-accent); display: block; margin-bottom: .6rem; line-height: 1; }
.step h3 { font-size: 1.1rem; }
.step p { color: var(--pv-ink-2); margin: 0; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.split h2 { font-family: var(--pv-display); font-weight: 500; font-size: clamp(1.8rem, 3vw, 2.5rem); letter-spacing: -.02em; line-height: 1.15; }
.split ul { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .7rem; }
.split li { display: flex; gap: .7rem; align-items: flex-start; color: var(--pv-ink-2); }
.split li::before { content: "→"; color: var(--pv-accent); font-weight: 700; }

.pricing { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; align-items: stretch; }
.plan { background: var(--pv-surface); border: 1px solid var(--pv-line); border-radius: 22px; padding: 1.6rem; display: flex; flex-direction: column; box-shadow: var(--pv-shadow); }
.plan.featured { border-color: var(--pv-accent); box-shadow: 0 0 0 4px var(--pv-ring), var(--pv-shadow-lg); position: relative; }
.plan.featured::after { content: "Most popular"; position: absolute; top: -.75rem; left: 1.4rem; background: var(--pv-accent); color: #fff; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; padding: .3rem .7rem; border-radius: 999px; font-weight: 650; }
.plan .name { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--pv-muted); font-weight: 650; }
.plan .price { font-size: 2.2rem; font-weight: 700; letter-spacing: -.03em; margin: .4rem 0 .2rem; }
.plan .price small { font-size: .95rem; color: var(--pv-muted); font-weight: 500; letter-spacing: 0; }
.plan .for { color: var(--pv-ink-2); font-size: .92rem; min-height: 2.6em; }
.plan ul { list-style: none; padding: 0; margin: 1rem 0 1.4rem; display: grid; gap: .5rem; font-size: .92rem; color: var(--pv-ink-2); }
.plan li::before { content: "✓"; color: var(--pv-green); margin-right: .5rem; font-weight: 700; }
.plan .btn { margin-top: auto; }
.plan-usage { border-top: 1px solid var(--pv-line); padding-top: .75rem; }
.upgrade-notice { margin-bottom: .75rem; }

.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: var(--pv-surface); border: 1px solid var(--pv-line); border-radius: 14px; padding: 1rem 1.25rem; margin-bottom: .7rem; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--pv-accent); font-size: 1.3rem; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: .75rem 0 0; color: var(--pv-ink-2); }

.final-cta { background: radial-gradient(900px 400px at 20% 0%, rgba(124, 58, 237, .4), transparent 60%), radial-gradient(700px 400px at 90% 100%, rgba(91, 46, 232, .4), transparent 60%), var(--pv-dark); color: #fff; border-radius: 28px; padding: 3.5rem; text-align: center; }
.final-cta h2 { font-family: var(--pv-display); font-weight: 500; font-size: clamp(1.9rem, 3.6vw, 3rem); letter-spacing: -.02em; color: #fff; }
.final-cta p { color: #cfccc4; max-width: 50ch; margin: .75rem auto 1.5rem; }
.final-cta .btn-light { border-radius: 999px; font-weight: 600; }
/* Public legal pages (/privacy, /terms, /data-deletion) */
.lp-legal { padding: 3rem 0 2rem; }
.lp-legal .wrap { max-width: 760px; }
.lp-legal h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -.02em; margin: .3rem 0 .4rem; }
.lp-legal .updated { color: var(--pv-muted); font-size: .9rem; margin-bottom: 2rem; }
.lp-legal .lede { font-size: 1.1rem; color: var(--pv-ink-2); margin-bottom: 2rem; }
.lp-legal h2 { font-size: 1.2rem; margin: 2rem 0 .6rem; }
.lp-legal p, .lp-legal li { line-height: 1.65; color: var(--pv-ink-2); }
.lp-legal li { margin-bottom: .4rem; }
.lp-legal a { color: var(--pv-accent-ink); text-decoration: underline; text-underline-offset: 2px; }
[data-bs-theme="dark"] .lp-legal a { color: var(--pv-accent-2); }
.lp-footer { padding: 2.5rem 0 3rem; color: var(--pv-muted); font-size: .88rem; }
.lp-footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.lp-footer a { color: var(--pv-ink-2); margin-left: 1.2rem; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .content { animation: none; } .skeleton::after { animation: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
    .hero .wrap, .split { grid-template-columns: 1fr; }
    .features, .steps { grid-template-columns: 1fr 1fr; }
    .pricing { grid-template-columns: 1fr 1fr; }
    .filters { grid-template-columns: 1fr 1fr; }
    .lp-nav .lp-burger { display: inline-flex; }
    .lp-nav .links { display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; gap: 0; background: var(--pv-surface); border-bottom: 1px solid var(--pv-line); box-shadow: var(--pv-shadow-lg); padding: .5rem 0; }
    .lp-nav .links a { padding: .8rem 4vw; }
    .lp-toggle:checked ~ .wrap .links { display: flex; }
}
@media (max-width: 768px) {
    .sidebar { position: fixed; inset: 0 auto 0 0; width: min(280px, 84vw); transform: translateX(-105%); box-shadow: var(--pv-shadow-lg); }
    .nav-toggle:checked ~ .app-shell .sidebar { transform: none; }
    .nav-scrim { position: fixed; inset: 0; background: rgba(11, 12, 20, .45); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
    .nav-toggle:checked ~ .app-shell .nav-scrim { display: block; opacity: 1; pointer-events: auto; }
    .topbar .nav-burger { display: inline-flex; }
    .topbar .brand-sm { display: flex; margin: 0; gap: .5rem; }
    .topbar .brand-sm .brand-mark { width: 30px; height: 30px; font-size: .75rem; }
    .topbar .brand-sm .brand-name { font-size: .95rem; }
    .topbar .user-chip > span:last-child { display: none; }
    .topbar .user-chip { padding: .2rem; border: 0; background: transparent; }
    .content { padding: 1.25rem; }
    .topbar { padding: calc(.6rem + env(safe-area-inset-top)) calc(1rem + env(safe-area-inset-right)) .6rem calc(1rem + env(safe-area-inset-left)); gap: .5rem; }
    .content { padding-left: calc(1.25rem + env(safe-area-inset-left)); padding-right: calc(1.25rem + env(safe-area-inset-right)); }
    .page-head h1 { font-size: 1.35rem; }
    .page-head .actions { width: 100%; }
    .btn { white-space: nowrap; }
    .content .d-flex.align-items-center.gap-3 > .btn + .small { flex-basis: 100%; } /* "Save + hint" rows stack instead of squeezing the button */
    .content .d-flex.align-items-center.gap-3:has(> .btn + .small) { flex-wrap: wrap; }
    .topbar .btn-sm { padding: .3rem .6rem; }
    .card .card-body { padding: 1.1rem 1.15rem; }
    .card > .table thead th:first-child, .card > .table tbody td:first-child, .card > .table-wrap .table thead th:first-child, .card > .table-wrap .table tbody td:first-child { padding-left: 1.15rem; }
    .card > .table thead th:last-child, .card > .table tbody td:last-child, .card > .table-wrap .table thead th:last-child, .card > .table-wrap .table tbody td:last-child { padding-right: 1.15rem; }
    .stat-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; }
    .sidebar .nav-link { padding: .75rem .8rem; font-size: 1rem; }
    .form-control, .form-select, .form-control-sm { font-size: 16px; } /* iOS zooms into inputs below 16px */
    .lp-nav .brand .logo { max-width: 160px; }
    .auth-card { padding: 1.6rem 1.25rem; border-radius: 20px; }
    .auth-card .brand .logo { max-width: 210px; }
    .features, .steps, .pricing, .stats-row, .filters { grid-template-columns: 1fr; }
    .hero { padding-top: 3rem; }
    .final-cta { padding: 2.25rem 1.25rem; }
    .insight { grid-template-columns: 1fr; }
    .composer .guidance { max-width: none; }
}
@media (max-width: 380px) {
    .topbar .brand-sm .brand-name { display: none; }
}

/* Media library */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.lib-card { margin-bottom: 0; overflow: hidden; }
.lib-thumb { position: relative; aspect-ratio: 4 / 3; background: var(--pv-surface-3); border-bottom: 1px solid var(--pv-line); }
.lib-thumb img, .lib-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-thumb video { object-fit: contain; background: #000; }
.lib-kind { position: absolute; left: .5rem; top: .5rem; font-weight: 500; }
.lib-caption { max-height: 7.5em; overflow: hidden; white-space: pre-wrap; }
.retry-note { color: var(--pv-amber, #b45309); }

/* Schedule source picker */
.pick-card { border-color: var(--pv-accent); }
.pick-list { display: flex; flex-direction: column; gap: .4rem; }
.pick-row { display: flex; align-items: center; gap: .75rem; padding: .6rem .8rem; border: 1px solid var(--pv-line-2); border-radius: 12px; background: var(--pv-surface); margin: 0; cursor: pointer; }
.pick-row .form-check-input { margin: 0; flex-shrink: 0; }
.pick-row .pick-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pick-row .pick-side { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.pick-row.on { border-color: var(--pv-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--pv-accent) 25%, transparent); }
.pick-row.blocked { opacity: .55; cursor: not-allowed; }
.source-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .5rem; }
.source-pick .source { display: flex; flex-direction: column; gap: .15rem; padding: .6rem .75rem; border: 1px solid var(--pv-line-2); border-radius: 12px; cursor: pointer; background: var(--pv-surface); margin: 0; }
.source-pick .source input { position: absolute; opacity: 0; pointer-events: none; }
.source-pick .source.on { border-color: var(--pv-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--pv-accent) 25%, transparent); }
.source-pick .t { font-weight: 600; font-size: .9rem; }
.source-pick .d { font-size: .78rem; color: var(--pv-muted); }
.server-info code { word-break: break-all; }

/* ======================================================================= */
/* === feature styles === each feature adds its rules under its own marker  */
/* ======================================================================= */

/* --- billing: start --- */
.billing-plan-name { font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; }
.billing-status { font-size: .8rem; padding: .45em .7em; }
.billing-usage.stat-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 0; }
.billing-usage .stat .value { font-size: 1.25rem; }
.billing-packs li:last-child { border-bottom: 0 !important; }
.billing-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.billing-plans .plan { border: 1px solid var(--bs-border-color, #e5e7eb); border-radius: 12px; padding: 1rem; display: flex; flex-direction: column; }
.billing-plans .plan.featured { border-color: var(--bs-primary, #4f46e5); box-shadow: 0 0 0 1px var(--bs-primary, #4f46e5) inset; }
.billing-plans .plan .price { font-size: 1.4rem; font-weight: 700; margin: .25rem 0; }
.billing-plans .plan .price small { font-size: .8rem; font-weight: 400; color: var(--bs-secondary-color, #6b7280); }
.billing-plans .plan ul { padding-left: 1.1rem; flex-grow: 1; }
/* --- billing: end --- */


/* --- post-analytics: start --- */
.perf-totals{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:.75rem}
.perf-stat .label{font-size:.75rem;color:var(--bs-secondary-color,#6b7280);text-transform:uppercase;letter-spacing:.03em}
.perf-stat .value{font-size:1.35rem;font-weight:650;line-height:1.2}
.perf-top li{padding:.45rem 0;border-top:1px solid var(--bs-border-color,#e5e7eb)}
.perf-top li:first-child{border-top:0}
.perf-excerpt{text-decoration:none;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;max-width:100%}
.perf-excerpt:hover{text-decoration:underline}
.perf-heat{display:grid;grid-template-columns:2.4rem repeat(8,1fr);gap:3px;align-items:center}
.perf-heat-corner{}
.perf-heat-col,.perf-heat-row{font-size:.68rem;color:var(--bs-secondary-color,#6b7280);text-align:center}
.perf-heat-row{text-align:right;padding-right:.25rem}
.perf-heat-cell{aspect-ratio:1.6;border-radius:4px;background:rgba(var(--bs-primary-rgb,91,46,232),var(--v));border:1px solid var(--bs-border-color,#e5e7eb)}
.perf-heat-cell.top{outline:2px solid var(--bs-warning,#f59e0b);outline-offset:-1px}
.perf-suggestion{font-weight:500}
.post-metrics .provider-dot{margin-right:.25rem}
/* --- post-analytics: end --- */


/* --- posts-workflow: start --- */
.approval-banner { margin-bottom: 1rem; }
.approval-note { color: var(--bs-body-color); opacity: .85; }
.approval-note.sent-back { color: var(--bs-warning-text-emphasis, #8a5a00); }
.pending-link { margin-left: .5rem; font-weight: 600; color: var(--bs-warning-text-emphasis, #8a5a00); text-decoration: none; border-bottom: 1px dashed currentColor; }
.pending-link:hover { text-decoration: none; opacity: .85; }
/* Posts list: the post's picture sits beside its text (stacked on phones). */
.post-row { display: flex; align-items: flex-start; gap: 1rem; }
.post-main { flex: 1 1 0; min-width: 0; }
.post-thumbs { flex: 0 0 200px; display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; align-items: center; }
.post-thumbs .post-thumb:first-child { grid-column: 1 / -1; }
.post-thumbs .post-thumb { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.post-thumbs .post-thumb > img:first-child { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--bs-border-color); background: var(--bs-tertiary-bg); }
.post-thumbs .post-thumb:first-child > img:first-child { aspect-ratio: auto; max-height: 260px; object-fit: contain; }
/* Hover shows the picture big beside the thumbnail; a click opens it in the popup. */
.post-thumbs .post-thumb .post-zoom { display: none; position: fixed; top: 50%; transform: translateY(-50%); margin-left: 212px; width: min(460px, 45vw); max-width: none !important; max-height: 80vh; z-index: 30; object-fit: contain; border-radius: 10px; border: 1px solid var(--pv-line); background: var(--pv-surface); box-shadow: var(--pv-shadow-lg); pointer-events: none; }
@media (hover: hover) and (min-width: 768px) { .post-thumbs .post-thumb:hover { z-index: 30; } .post-thumbs .post-thumb:hover .post-zoom { display: block; } }
.post-lightbox { position: fixed; inset: 0; z-index: 1080; display: flex; align-items: center; justify-content: center; padding: 2.5rem 1rem; background: rgba(11, 12, 20, .8); cursor: zoom-out; outline: none; }
.post-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; box-shadow: var(--pv-shadow-lg); background: var(--pv-surface); cursor: default; }
.post-lightbox-close { position: absolute; top: 1rem; right: 1rem; }
@media (max-width: 575.98px) { .post-row { flex-direction: column; } .post-thumbs { flex-basis: auto; width: 100%; max-width: 320px; } }
.post-actions { max-width: 420px; }
.post-actions .reject-box { width: 100%; }
.variants-card .variant { border: 1px solid var(--bs-border-color, #e5e7eb); border-radius: .6rem; margin-bottom: .5rem; overflow: hidden; }
.variants-card .variant-head { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .55rem .75rem; background: transparent; border: 0; text-align: left; color: inherit; cursor: pointer; }
.variants-card .variant.open .variant-head { border-bottom: 1px solid var(--bs-border-color, #e5e7eb); background: color-mix(in srgb, var(--bs-primary, #4f46e5) 5%, transparent); }
.variants-card .variant-head .chev { color: var(--bs-secondary-color, #6b7280); font-size: .85rem; }
.variants-card .variant-body { padding: .75rem; }
/* --- posts-workflow: end --- */


/* --- notifications-admin-audit: start --- */
/* Export link in the inbox filter grid sits on its own row, right-aligned, so the five filter columns keep their widths. */
.filters > .btn { grid-column: 1 / -1; justify-self: end; }
/* Inbox: the Reset button sits at the end of the row of filters. */
.filters.with-reset { grid-template-columns: 1.2fr 1fr 1fr auto 1.4fr auto; }
.filters.with-reset > .btn { grid-column: auto; }
/* Admin → Worker: a loop that is late or failing is tinted like an inbox item that needs attention. */
.table tr.attention td { background: rgba(220, 53, 69, .06); }
/* Audit log: details JSON stays on one line; the full text is in the title tooltip. */
.audit-details { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Settings → Notifications: recent list */
.notify-log li { padding: .35rem 0; border-bottom: 1px solid var(--bs-border-color, #e5e7eb); }
.notify-log li:last-child { border-bottom: 0; }
/* --- notifications-admin-audit: end --- */


/* --- review-requests-inbox: start --- */
.rr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rr-qr { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.rr-qr img { border: 1px solid var(--pv-line, #e6e4de); border-radius: 12px; background: #fff; padding: 6px; }
.rr-qr > div { flex: 1 1 180px; }
.inbox-counts { display: flex; gap: .5rem; flex-wrap: wrap; }
.inbox-counts .chip { border: 1px solid var(--pv-line, #e6e4de); background: var(--pv-surface, #fff); color: inherit; border-radius: 999px; padding: .3rem .85rem; font-size: .85rem; cursor: pointer; }
.inbox-counts .chip b { margin-left: .3rem; }
.inbox-counts .chip.active { border-color: var(--bs-primary, #4f46e5); color: var(--bs-primary, #4f46e5); font-weight: 600; }
.inbox-counts .chip.danger.active { border-color: var(--bs-danger, #dc3545); color: var(--bs-danger, #dc3545); }
.badge.inbox-kind { font-weight: 500; }
.badge.inbox-kind.review { background: rgba(245, 158, 11, .15); color: #92400e; }
.badge.inbox-kind.comment { background: rgba(79, 70, 229, .12); color: #3730a3; }
[data-theme="dark"] .badge.inbox-kind.review { color: #fcd34d; }
[data-theme="dark"] .badge.inbox-kind.comment { color: #a5b4fc; }
/* --- review-requests-inbox: end --- */


/* --- competitors-onboarding: start --- */
.competitors-card { margin-top: 1rem; }
.competitors-card .table td, .competitors-card .table th { vertical-align: middle; }
.competitors-card tr.self-row td { background: var(--pv-accent-soft, #eef1ff); font-weight: 600; }
.competitors-card .delta { font-size: .75rem; font-weight: 600; margin-left: .3rem; }
.competitors-card .delta.up { color: var(--pv-green); }
.competitors-card .delta.down { color: var(--pv-red); }
.competitors-card .delta.flat { color: var(--pv-muted); }
.competitors-card .add-form { display: grid; grid-template-columns: 160px 1fr 180px auto; gap: .5rem; align-items: end; }
@media (max-width: 720px) { .competitors-card .add-form { grid-template-columns: 1fr; } }
.onboarding-card { border-left: 4px solid var(--pv-accent, #4f6df5); margin-bottom: 1.5rem; }
.onboarding-card .progress-track { height: 8px; border-radius: 4px; background: var(--pv-line, #e3e7ef); overflow: hidden; margin: .5rem 0 1rem; }
.onboarding-card .progress-track span { display: block; height: 100%; background: var(--pv-accent, #4f6df5); border-radius: 4px; transition: width .3s ease; }
.onboarding-card .steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .6rem .9rem; list-style: none; padding: 0; margin: 0; }
.onboarding-card .step-item { display: grid; grid-template-columns: 22px 1fr; gap: .5rem; align-items: start; font-size: .9rem; }
.onboarding-card .step-item .mark { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--pv-line, #cfd6e4); display: grid; place-items: center; margin-top: .1rem; }
.onboarding-card .step-item.done .mark { background: var(--pv-green); border-color: var(--pv-green); color: #fff; }
.onboarding-card .step-item.done .title { text-decoration: line-through; color: var(--pv-muted); }
.onboarding-card .step-item .text { font-size: .8rem; color: var(--pv-muted); }
/* --- competitors-onboarding: end --- */


/* --- twofactor-calendar: start --- */
/* Two-factor set-up card */
.twofa-setup .qr { background: #fff; border-radius: 10px; padding: 6px; border: 1px solid var(--pv-line); line-height: 0; }
.twofa-setup .qr svg { width: 180px; height: 180px; display: block; }
.recovery-codes .codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem .75rem; }
.recovery-codes .codes code { font-size: .95rem; padding: .3rem .5rem; background: var(--pv-surface-3); border-radius: 6px; border: 1px solid var(--pv-line); text-align: center; }

/* Calendar */
.cal-tz { max-width: 280px; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.cal-legend { display: flex; gap: 1rem; align-items: center; }
/* Calendar: growth plan tab */
.growth-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem 1rem; margin-bottom: 1rem; }
.growth-controls .growth-places { flex: 1 1 280px; min-width: 0; }
.growth-controls .growth-switch { margin-left: auto; }
/* Poster design: the template and size chosen for the plan's AI posters, and the dialog that picks them. */
.growth-tpl-btn { display: inline-flex; align-items: center; gap: .45rem; max-width: 260px; height: 31px; }
.growth-tpl-btn img { width: 20px; height: 24px; object-fit: cover; border-radius: 3px; }
.growth-tpl-btn .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.growth-tpl-btn .chev { font-size: .7rem; opacity: .7; }
/* The day's row: its idea, then the product it is about and its poster design. */
.growth-idea { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem .75rem; }
.growth-idea .txt { flex: 1 1 260px; min-width: 0; }
.growth-day-tools { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-weight: 400; }
.growth-day-product { width: auto; max-width: 240px; }
.growth-day-tools .growth-tpl-btn { max-width: 210px; font-size: .8rem; }
.growth-day-tools .growth-tpl-btn.own { border-color: var(--bs-primary); color: var(--bs-primary); }
.tpl-shapes { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.tpl-shape { display: flex; align-items: center; gap: .7rem; text-align: left; padding: .55rem .75rem; border: 1px solid var(--pv-line); border-radius: 12px; background: var(--pv-surface); color: var(--pv-ink); font-size: .82rem; line-height: 1.3; }
.tpl-shape i { flex: 0 0 auto; display: block; width: 24px; border: 2px solid currentColor; border-radius: 4px; opacity: .75; }
.tpl-shape i.portrait { aspect-ratio: 4 / 5; } .tpl-shape i.story { width: 20px; aspect-ratio: 9 / 16; }
.tpl-shape strong { font-size: .95rem; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: .6rem; }
.tpl-tile { display: flex; flex-direction: column; gap: .2rem; min-width: 0; padding: .4rem; text-align: left; border: 1px solid var(--pv-line); border-radius: 12px; background: var(--pv-surface); color: var(--pv-ink); cursor: pointer; }
.tpl-tile:hover, .tpl-shape:hover { border-color: var(--bs-primary); }
.tpl-tile.on, .tpl-shape.on { border-color: var(--bs-primary); box-shadow: 0 0 0 2px var(--bs-primary); }
.tpl-tile.new { border-style: dashed; }
.tpl-thumb { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 8px; background: var(--pv-surface-3); color: var(--pv-muted); }
.tpl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tpl-thumb.sketch { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 6%; padding: 10%; }
.tpl-thumb.sketch i { display: block; border-radius: 4px; background: currentColor; opacity: .28; }
.tpl-thumb.sketch i:nth-child(1) { height: 12%; width: 80%; } .tpl-thumb.sketch i:nth-child(2) { height: 6%; width: 55%; } .tpl-thumb.sketch i:nth-child(3) { height: 42%; opacity: .16; }
.tpl-thumb.sketch small { font-size: .62rem; line-height: 1.3; }
.tpl-thumb.brand { font-size: 1.6rem; font-weight: 700; color: var(--bs-primary); } .tpl-thumb.plus { font-size: 2rem; font-weight: 300; }
.tpl-name { font-weight: 600; font-size: .84rem; line-height: 1.25; overflow-wrap: anywhere; }
.tpl-by { font-size: .72rem; color: var(--pv-muted); } .tpl-by .btn-link { font-size: inherit; vertical-align: baseline; text-align: left; }
.tpl-about { margin-top: .9rem; padding: .65rem .8rem; border-radius: 10px; background: var(--pv-surface-3); }
/* New template: the example poster with its thumbnail, on top of the form. */
.tpl-pick { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: .9rem; padding-bottom: .9rem; border-bottom: 1px solid var(--pv-line); }
.tpl-pick-box { flex: 0 0 132px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; aspect-ratio: 4 / 5; margin: 0; overflow: hidden; text-align: center; padding: .4rem; border: 1px solid var(--pv-line); border-radius: 12px; background: var(--pv-surface-3); color: var(--pv-muted); cursor: pointer; }
.tpl-pick-box.empty { border-style: dashed; } .tpl-pick-box:hover { border-color: var(--bs-primary); color: var(--bs-primary); }
.tpl-pick-box img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.tpl-pick-box:has(img) { padding: 0; background: #fff; }
.tpl-pick-box .plus { font-size: 2rem; font-weight: 300; line-height: 1; }
.tpl-pick-text { flex: 1 1 0; min-width: 0; }
@media (max-width: 575.98px) { .tpl-pick { flex-direction: column; } .tpl-pick-box { flex-basis: auto; width: 132px; } }
.tpl-designs { display: flex; flex-wrap: wrap; gap: .5rem; }
.tpl-design { position: relative; display: block; width: 64px; border-radius: 8px; overflow: hidden; border: 1px solid var(--pv-line); background: var(--pv-surface-3); }
.tpl-design img { display: block; width: 100%; height: 80px; object-fit: cover; }
.tpl-design button { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; line-height: 16px; font-size: 14px; color: #fff; background: rgba(0, 0, 0, .6); }
@media (max-width: 575.98px) { .tpl-shapes { grid-template-columns: 1fr; } .growth-tpl-btn { max-width: 100%; } }
.rules-list { padding-left: 1.3rem; margin-bottom: .5rem; font-size: .86rem; }
.rules-list li { margin-bottom: .3rem; }
.rules-list .badge { font-weight: 500; border: 1px solid var(--pv-line); }
.growth-auto { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1rem; padding: .5rem .85rem; margin-bottom: .75rem; border: 1px dashed var(--pv-line); border-radius: 12px; }
.growth-auto.on { border-style: solid; border-color: var(--bs-success, #198754); background: color-mix(in srgb, var(--bs-success, #198754) 8%, transparent); }
.growth-auto > .small { flex: 1 1 320px; min-width: 0; }
.growth-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; padding: .75rem 1rem; border: 1px solid var(--pv-line); border-radius: 12px; background: var(--pv-surface-3); }
.growth-bar { flex: 0 1 220px; height: 8px; border-radius: 4px; background: var(--pv-line); overflow: hidden; }
.growth-bar i { display: block; height: 100%; background: var(--bs-success, #198754); }
.growth-goals { padding-left: 1.2rem; margin-bottom: 0; } .growth-goals li { margin-bottom: .35rem; }
.growth-table th { font-size: .78rem; color: var(--pv-muted); font-weight: 600; white-space: nowrap; }
.growth-weeks { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; margin-top: 1rem; }
.growth-week { border: 1px solid var(--pv-line); border-radius: 12px; padding: .9rem 1rem; }
.growth-week.current { border-color: var(--bs-primary); box-shadow: 0 0 0 1px var(--bs-primary); }
.growth-week header { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; }
.growth-counts { display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: .8rem; margin-bottom: .6rem; }
.growth-jobs { padding-left: 1.1rem; margin-bottom: 0; font-size: .86rem; } .growth-jobs li { margin-bottom: .3rem; }
.growth-weekhead { margin: 1.1rem 0 .4rem; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--pv-muted); }
.growth-day { display: flex; gap: 1rem; padding: .8rem 0; border-top: 1px solid var(--pv-line); }
.growth-day.past { opacity: .65; }
.growth-date { flex: 0 0 56px; display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.growth-date .dow { font-size: .72rem; text-transform: uppercase; color: var(--pv-muted); }
.growth-date .num { font-size: 1.4rem; font-weight: 700; line-height: 1; }
.growth-day.today .growth-date .num { color: var(--bs-primary); }
.growth-daybody { flex: 1 1 0; min-width: 0; }
.growth-idea { font-weight: 600; margin-bottom: .4rem; }
.growth-task { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem .75rem; align-items: center; padding: .35rem .6rem; border-radius: 8px; }
.growth-task:nth-child(even) { background: var(--pv-surface-3); }
.growth-task .who { font-size: .88rem; } .growth-task .how { grid-column: 1; } .growth-task .act { grid-column: 2; grid-row: 1 / span 2; text-align: right; white-space: nowrap; }
.growth-task.done .who strong { text-decoration: line-through; text-decoration-color: var(--pv-muted); }
/* Under the date: the picture of the day and the button that prepares every network of the day at once. */
.growth-date { flex-basis: 64px; }
.growth-date .growth-day-pic { width: 56px; height: 56px; border-radius: 8px; margin-top: .25rem; cursor: zoom-in; }
.growth-date .growth-day-pic > img:first-child { border-radius: 7px; object-fit: cover; }
.growth-day-btn { margin-top: .3rem; padding: .1rem .4rem !important; font-size: .7rem !important; white-space: nowrap; }
/* A day in the list is one short row: the idea on one line, the networks of the day under it. The rest is in its popup. */
.growth-day.compact { align-items: center; gap: .75rem; padding: .45rem .5rem; border-radius: 8px; cursor: pointer; }
.growth-day.compact:hover, .growth-day.compact:focus-visible { background: var(--pv-surface-3); outline: none; }
.growth-day.compact .growth-date { flex-basis: 44px; gap: 0; }
.growth-day.compact .growth-date .dow { font-size: .66rem; } .growth-day.compact .growth-date .num { font-size: 1.15rem; }
.growth-day.compact.today .growth-date .dow { color: var(--bs-primary); font-weight: 700; }
.growth-day.compact .growth-idea { margin-bottom: .15rem; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.growth-nets { display: flex; flex-wrap: nowrap; gap: .35rem; overflow: hidden; }
.growth-net { display: inline-flex; align-items: center; gap: .3rem; flex: 0 0 auto; border: 1px solid var(--pv-line); background: none; color: var(--pv-ink); border-radius: 999px; padding: .05rem .55rem; font-size: .76rem; white-space: nowrap; }
.growth-net:hover, .growth-net:focus-visible { border-color: var(--bs-primary); color: var(--bs-primary); outline: none; }
.growth-net.done { opacity: .8; }
.growth-net .state { font-weight: 700; color: var(--pv-muted); } .growth-net .state.ok { color: var(--bs-success); } .growth-net .state.info { color: var(--bs-info); } .growth-net .state.warn { color: var(--bs-warning); }
.growth-day-side { flex: 0 0 auto; display: flex; align-items: center; gap: .5rem; color: var(--pv-muted); }
.growth-day-side .growth-day-pic { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; }
.growth-day-side .chev { font-size: 1.2rem; line-height: 1; }
/* Auto posts: the design of a schedule's next post, at the left of its card. */
.sched-next { flex: 0 0 auto; }
.sched-next-pic { display: block; width: 72px; height: 128px; object-fit: cover; border-radius: 8px; border: 1px solid var(--pv-line); background: var(--pv-surface-3); }
.sched-next-pic.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; padding: .3rem; text-align: center; font-size: .68rem; color: var(--pv-muted); border-style: dashed; }
/* Pointing at a day's thumbnail shows the whole picture large, in its own shape (posters are tall). */
.growth-zoom { display: inline-flex; flex: 0 0 auto; cursor: zoom-in; }
.growth-zoom .company-zoom { width: auto; height: auto; max-width: min(640px, 80vw) !important; max-height: 86vh; z-index: 1090; }
.growth-existing .growth-zoom .company-zoom { width: auto; height: auto; }
/* In the day's popup the idea is the heading already, so only the day's product and design stay on that line. */
.growth-day-full .growth-idea .txt { display: none; } .growth-day-full .growth-idea { margin-bottom: .6rem; }
.growth-choice { display: flex; gap: .5rem; align-items: baseline; padding: .3rem .1rem; cursor: pointer; font-size: .9rem; }
/* Networks outside the day's plan, offered as small chips under the planned ones. */
.growth-extra { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; margin-top: .45rem; padding-left: .6rem; }
.growth-chip { display: inline-flex; align-items: center; text-decoration: none; border: 1px dashed var(--pv-line-2, var(--pv-line)); background: none; color: var(--pv-ink-2, var(--pv-ink)); border-radius: 999px; padding: .1rem .6rem; font-size: .78rem; font-weight: 600; }
.growth-chip:hover { border-style: solid; border-color: var(--bs-primary); color: var(--bs-primary); }
.growth-existing { display: flex; gap: .8rem; align-items: center; padding: .6rem .75rem; margin-bottom: .75rem; border-radius: 10px; background: var(--pv-surface-3); }
.growth-existing img { width: 64px; height: 64px; object-fit: contain; border-radius: 8px; background: var(--pv-surface); flex: 0 0 auto; }
.growth-task[role=button] { cursor: pointer; } .growth-task[role=button]:hover, .growth-task[role=button]:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: -2px; }
.growth-modal { position: fixed; inset: 0; z-index: 1080; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(11, 12, 20, .6); outline: none; }
.growth-modal-card { display: flex; flex-direction: column; width: min(640px, 100%); max-height: calc(100vh - 2rem); border-radius: 16px; background: var(--pv-surface); color: var(--pv-ink); box-shadow: var(--pv-shadow-lg); border: 1px solid var(--pv-line); }
.growth-modal-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--pv-line); }
.growth-modal-card > footer { display: flex; justify-content: flex-end; gap: .5rem; padding: .85rem 1.25rem; border-top: 1px solid var(--pv-line); }
.growth-modal-body { padding: 1rem 1.25rem; overflow-y: auto; font-size: .92rem; }
.growth-modal-body h4 { font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--pv-muted); margin: 1rem 0 .3rem; }
.growth-modal-body p { margin-bottom: .4rem; } .growth-modal-body ol { padding-left: 1.2rem; margin-bottom: .6rem; } .growth-modal-body ol li { margin-bottom: .3rem; }
.growth-spec { display: grid; grid-template-columns: minmax(110px, 30%) 1fr; gap: .45rem .9rem; margin: .8rem 0 0; padding: .75rem .9rem; border-radius: 10px; background: var(--pv-surface-3); }
.growth-spec dt { font-weight: 600; } .growth-spec dd { margin: 0; }
.growth-profile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .55rem .9rem; margin-bottom: .75rem; border: 1px solid var(--pv-line); border-radius: 12px; }
.growth-profile.incomplete { border-color: var(--bs-warning, #ffc107); background: var(--bs-warning-bg-subtle, #fff3cd); color: var(--bs-warning-text-emphasis, #664d03); }
.growth-modal-card.wide { width: min(720px, 100%); }
.growth-modal-body fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.growth-form .req { font-weight: 400; font-size: .72rem; color: var(--bs-danger, #dc3545); margin-left: .25rem; }
.growth-pic img.logo { object-fit: contain; background: #fff; border: 1px solid var(--pv-line); }
.poster-maker { padding: .7rem .85rem; border: 1px dashed var(--pv-line); border-radius: 10px; background: var(--pv-surface-3); }
/* Post editor: four steps */
.post-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin-bottom: .75rem; }
.post-steps button { display: flex; align-items: center; gap: .7rem; text-align: left; padding: .45rem .7rem; border: 1px solid var(--pv-line); border-radius: 12px; background: var(--pv-surface); color: var(--pv-ink); min-width: 0; transition: border-color .15s, box-shadow .15s; }
.post-steps .num { flex: 0 0 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; background: var(--pv-surface-3); color: var(--pv-muted); }
.post-steps .txt { display: flex; flex-direction: column; min-width: 0; } .post-steps .txt strong { font-size: .95rem; } .post-steps .txt span { font-size: .76rem; color: var(--pv-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-steps button:hover { border-color: var(--bs-primary); }
.post-steps button.active { border-color: var(--bs-primary); box-shadow: 0 0 0 1px var(--bs-primary); } .post-steps button.active .num { background: var(--bs-primary); color: #fff; } .post-steps button.active strong { color: var(--bs-primary); }
.post-steps button.done:not(.active) .num { background: var(--bs-success, #198754); color: #fff; }
/* Each step is kept short enough to fit a laptop screen without scrolling. */
.page-head.post-head { margin-bottom: .75rem; }
.post-pane .card-body { padding: 1rem 1.1rem; } .post-pane .mb-3 { margin-bottom: .75rem !important; } .post-pane .card.mb-3 { margin-bottom: .75rem !important; }
.post-pane .form-label { margin-bottom: .25rem; font-size: .9rem; } .post-pane .form-text { margin-top: .2rem; }
.post-media-choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-bottom: .85rem; }
.post-media-choice button { display: flex; flex-direction: column; align-items: flex-start; gap: .05rem; text-align: left; padding: .5rem .75rem; border: 1px solid var(--pv-line); border-radius: 10px; background: var(--pv-surface); color: var(--pv-ink); }
.post-media-choice button strong { font-size: .92rem; } .post-media-choice button span { font-size: .75rem; color: var(--pv-muted); }
.post-media-choice button:hover { border-color: var(--bs-primary); }
.post-media-choice button.active { border-color: var(--bs-primary); box-shadow: 0 0 0 1px var(--bs-primary); background: var(--pv-surface-3); } .post-media-choice button.active strong { color: var(--bs-primary); }
.post-links summary { cursor: pointer; font-size: .82rem; color: var(--bs-primary); }
.post-actions-final .d-grid { display: flex !important; flex-wrap: wrap; align-items: center; } .post-actions-final .d-grid > .btn { flex: 0 1 auto; }
.post-side { position: sticky; top: 96px; }
.post-actions-final { max-width: none; }
.post-check { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .5rem .7rem; border-radius: 8px; background: var(--bs-warning-bg-subtle, #fff3cd); color: var(--bs-warning-text-emphasis, #664d03); margin-bottom: .4rem; font-size: .92rem; }
.post-check.ok { background: var(--bs-success-bg-subtle, #d1e7dd); color: var(--bs-success-text-emphasis, #0a3622); margin-bottom: 0; }
@media (max-width: 767.98px) { .post-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .post-side { position: static; } }
/* Auto posts: the schedule form's steps sit inside its card, so they are a little smaller. */
.sched-steps button { padding: .4rem .55rem; gap: .5rem; } .sched-steps .num { flex-basis: 26px; height: 26px; font-size: .8rem; } .sched-steps .txt strong { font-size: .86rem; }
.sched-summary { padding: .45rem .7rem; border-radius: 8px; background: var(--pv-surface-3); font-size: .86rem; }
/* The steps of the schedule form are kept short enough for a laptop screen. */
.sched-steps { margin-bottom: .6rem; }
.sched-steps ~ .row .form-label { margin-bottom: .2rem; font-size: .88rem; }
.sched-steps ~ .row .form-control, .sched-steps ~ .row .form-select { padding-top: .32rem; padding-bottom: .32rem; }
.sched-steps ~ .row .source-pick .source { padding: .45rem .65rem; } .sched-steps ~ .row .source-pick .d { font-size: .74rem; line-height: 1.3; }
.sched-steps ~ .d-flex.mt-3 { margin-top: .7rem !important; }
@media (max-width: 991.98px) { .sched-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Tabs: one section of a page at a time (Settings, Billing). */
.pv-tabs { display: flex; gap: .15rem; border-bottom: 1px solid var(--pv-line); margin-bottom: .85rem; overflow-x: auto; scrollbar-width: none; }
.pv-tabs button { flex: 0 0 auto; border: 0; background: none; padding: .45rem .9rem; margin-bottom: -1px; font-weight: 600; font-size: .9rem; color: var(--pv-muted); border-bottom: 2px solid transparent; border-radius: 8px 8px 0 0; white-space: nowrap; }
.pv-tabs button:hover { color: var(--pv-ink); background: var(--pv-surface-2); }
.pv-tabs button.active { color: var(--pv-accent); border-bottom-color: var(--pv-accent); }
/* The signed-in user, the theme switch and Sign out sit at the foot of the menu. */
.sidebar-user { display: flex; align-items: center; gap: .4rem; }
.sidebar-user .user-chip { flex: 1 1 auto; min-width: 0; max-width: none; padding: .22rem .55rem .22rem .22rem; font-size: .84rem; color: var(--pv-ink); }
.sidebar-user .icon-btn { width: 32px; height: 32px; flex: 0 0 auto; }
.sidebar-user .icon-btn svg { width: 16px; height: 16px; }
.sidebar-user form { margin: 0; display: flex; }
/* Laptop and desktop: the menu is always there, so the top bar is not needed. Phones keep it for the menu button. */
@media (min-width: 769px) {
    .topbar { display: none; }
    html { scroll-padding-top: 16px; }
    .pv-toast { top: calc(env(safe-area-inset-top) + 1rem); }
    .pv-toast ~ .pv-toast { top: calc(env(safe-area-inset-top) + 1rem + 9.75rem); }
    .post-side { top: 1rem; }
}
/* Post editor: pictures are shown whole (posters are tall), never cropped; a click opens them large. */
.post-thumb-box { width: 96px; height: 96px; overflow: hidden; background: var(--pv-surface-3); }
.post-thumb-box img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.post-preview .img { aspect-ratio: auto; background: var(--pv-surface-3); }
.post-preview .img img { width: 100%; height: auto; max-height: clamp(150px, calc(100vh - 400px), 440px); object-fit: contain; cursor: zoom-in; }
.post-preview.has-img .body { max-height: 96px; }
/* Settings: section tabs */
.settings-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.settings-tabs button { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; text-align: left; padding: .7rem .9rem; border: 1px solid var(--pv-line); border-radius: 12px; background: var(--pv-surface); color: var(--pv-ink); transition: border-color .15s, box-shadow .15s; }
.settings-tabs button strong { font-size: .95rem; } .settings-tabs button span { font-size: .78rem; color: var(--pv-muted); }
.settings-tabs button:hover { border-color: var(--bs-primary); }
.settings-tabs button.active { border-color: var(--bs-primary); box-shadow: 0 0 0 1px var(--bs-primary); background: var(--pv-surface-3); }
.settings-tabs button.active strong { color: var(--bs-primary); }
.settings-pane > .row > [class*=col-] > .card { height: 100%; }
/* Settings: the company at a glance */
.company-card .card-body { display: flex; align-items: flex-start; gap: 1.1rem; flex-wrap: wrap; }
.company-logo { flex: 0 0 72px; width: 72px; height: 72px; border-radius: 14px; border: 1px solid var(--pv-line); background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.company-logo img { width: 100%; height: 100%; object-fit: contain; }
.company-logo span { font-size: 1.5rem; font-weight: 700; color: var(--bs-primary); }
.company-main { flex: 1 1 320px; min-width: 0; }
.company-name { font-size: 1.15rem; font-weight: 700; line-height: 1.2; }
.company-tagline { color: var(--pv-muted); font-size: .9rem; }
.company-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem 1.25rem; margin: .7rem 0 0; }
.company-facts dt { font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--pv-muted); }
.company-facts dd { margin: 0; font-size: .9rem; overflow-wrap: anywhere; }
.company-facts dd.missing { color: var(--bs-danger, #dc3545); }
.company-act { flex: 0 0 auto; text-align: right; }
/* Company pictures: hover shows the picture big, a click opens it in the popup (same popup as the Posts page). */
/* The pictures are folded behind a button and open as a floating panel while the mouse or the focus is on it. */
.company-pics { position: relative; display: inline-block; margin-top: .8rem; }
.company-thumbs { display: none; position: absolute; left: 0; top: 100%; z-index: 25; flex-wrap: wrap; gap: .75rem; width: max-content; max-width: min(640px, 80vw); padding: .75rem; border: 1px solid var(--pv-line); border-radius: 12px; background: var(--pv-surface); box-shadow: var(--pv-shadow-lg); }
.company-pics:hover .company-thumbs, .company-pics:focus-within .company-thumbs { display: flex; }
.company-thumbs figure { margin: 0; width: 112px; }
.company-thumbs figcaption { margin-top: .25rem; font-size: .72rem; color: var(--pv-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.company-thumb { position: relative; display: block; width: 112px; height: 84px; padding: 0; border: 1px solid var(--pv-line); border-radius: 8px; background: var(--pv-surface-3); cursor: zoom-in; }
.company-thumb > img:first-child { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; border-radius: 7px; }
.company-thumb.contain { background: #fff; } .company-thumb.contain > img:first-child { object-fit: contain; padding: 6px; }
/* Hover preview: always in the middle of the screen, so it is never cut off at an edge. */
.company-zoom { display: none; position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, 60vw); max-width: none !important; height: auto; max-height: 80vh; object-fit: contain; z-index: 60; border-radius: 10px; border: 1px solid var(--pv-line); background: #fff; box-shadow: var(--pv-shadow-lg); pointer-events: none; }
@media (hover: hover) and (min-width: 768px) { .company-thumb:hover .company-zoom, .company-hover:hover .company-zoom { display: block; } }
/* The logo, at the left of the card and in the Logo detail, behaves like the other thumbnails. */
button.company-logo.company-thumb { flex: 0 0 72px; width: 72px; height: 72px; padding: 0; border-radius: 14px; overflow: visible; }
button.company-logo.company-thumb > img:first-child { border-radius: 13px; padding: 4px; }
.company-thumb.small { width: 64px; height: 40px; margin-top: .15rem; } .company-thumb.small > img:first-child { padding: 3px; }
.company-logo.company-thumb .company-zoom, .company-thumb.small .company-zoom { width: min(460px, 50vw); height: auto; object-fit: contain; padding: 16px; }
@media (max-width: 575.98px) { .company-act { flex-basis: 100%; text-align: left; } }
.growth-lead { color: var(--pv-muted); margin-bottom: .8rem; }
.growth-form { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem .9rem; }
.growth-form .full { grid-column: 1 / -1; }
.growth-form .form-label { font-size: .8rem; font-weight: 600; margin-bottom: .2rem; }
.growth-form textarea { line-height: 1.45; }
.growth-pic { display: flex; gap: .8rem; align-items: center; padding: .6rem .75rem; border-radius: 10px; background: var(--pv-surface-3); }
.growth-pic img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; flex: 0 0 auto; }
.growth-tips { margin-top: 1rem; border-top: 1px solid var(--pv-line); padding-top: .7rem; }
.growth-tips summary { cursor: pointer; font-weight: 600; color: var(--bs-primary); }
@media (max-width: 575.98px) { .growth-form { grid-template-columns: 1fr; } }
@media (max-width: 575.98px) { .growth-spec { grid-template-columns: 1fr; gap: .1rem; } .growth-spec dd { margin-bottom: .5rem; } }
@media (max-width: 575.98px) { .growth-controls .growth-switch { margin-left: 0; } .growth-day { gap: .6rem; } .growth-date { flex-basis: 40px; } .growth-task { grid-template-columns: 1fr; } .growth-task .act { grid-column: 1; grid-row: auto; text-align: left; } }
.cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; background: var(--pv-accent); }
.cal-dot.autopost { background: #0ea5a4; }
.cal-dot.email { background: #f59e0b; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--pv-line); border-left: 1px solid var(--pv-line); }
.cal-dow { padding: .4rem .5rem; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--pv-muted); border-right: 1px solid var(--pv-line); border-bottom: 1px solid var(--pv-line); background: var(--pv-surface-2); }
.cal-day { min-height: 112px; padding: .35rem; border-right: 1px solid var(--pv-line); border-bottom: 1px solid var(--pv-line); display: flex; flex-direction: column; gap: .25rem; transition: background .15s ease; }
.cal-day.other { background: var(--pv-surface-2); }
.cal-day.other .cal-date { color: var(--pv-muted); opacity: .6; }
.cal-day.today .cal-date { background: var(--pv-accent); color: #fff; }
.cal-day.drop { background: color-mix(in srgb, var(--pv-accent) 12%, var(--pv-surface)); outline: 2px dashed var(--pv-accent); outline-offset: -3px; }
.cal-date { font-size: .8rem; font-weight: 600; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.cal-chip { display: flex; align-items: center; gap: .3rem; font-size: .74rem; line-height: 1.2; padding: .2rem .4rem; border-radius: 6px; text-decoration: none; color: inherit; background: var(--pv-surface-3); border-left: 3px solid var(--pv-accent); min-width: 0; }
.cal-chip .t { font-variant-numeric: tabular-nums; color: var(--pv-muted); flex: none; }
.cal-chip .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-chip .provider-dot { margin-right: 0; flex: none; }
.cal-chip.autopost { border-left-color: #0ea5a4; }
.cal-chip.email { border-left-color: #f59e0b; }
.cal-chip.proposed { border: 1px dashed var(--pv-line-2); border-left: 3px dashed var(--pv-muted); background: transparent; color: var(--pv-muted); cursor: pointer; overflow: hidden; }
.cal-chip.proposed:hover { color: inherit; border-color: var(--pv-accent); }
.cal-chip.proposed.idea { border-left-style: solid; font-weight: 600; }
.cal-chip.proposed.more { border-left-width: 1px; justify-content: center; }
.cal-chip.proposed.missed { opacity: .5; }
.cal-dot.proposed { display: inline-block; width: 10px; height: 10px; flex: none; background: transparent; border: 1px dashed var(--pv-muted); }
.cal-plan-toggle { display: inline-flex; align-items: center; gap: .3rem; margin: 0; cursor: pointer; }
.cal-plan-toggle .cal-dot { margin-right: 0; }
.cal-chip.text-bg-success { border-left-color: #16a34a; background: color-mix(in srgb, #16a34a 12%, var(--pv-surface)) !important; color: inherit !important; }
.cal-chip.text-bg-info { border-left-color: #0284c7; background: color-mix(in srgb, #0284c7 12%, var(--pv-surface)) !important; color: inherit !important; }
.cal-chip.text-bg-warning { border-left-color: #d97706; background: color-mix(in srgb, #d97706 14%, var(--pv-surface)) !important; color: inherit !important; }
.cal-chip.text-bg-danger { border-left-color: #dc2626; background: color-mix(in srgb, #dc2626 12%, var(--pv-surface)) !important; color: inherit !important; }
.cal-chip.text-bg-secondary, .cal-chip.text-bg-light { border-left-color: var(--pv-line-2); background: var(--pv-surface-3) !important; color: inherit !important; }
.cal-chip[draggable="true"] { cursor: grab; }
.cal-chip.dragging { opacity: .5; }
.cal-chip:hover { filter: brightness(.97); }
@media (max-width: 767.98px) {
    .cal-day { min-height: 72px; padding: .2rem; }
    .cal-chip .t, .cal-chip .provider-dot { display: none; }
    .cal-chip { font-size: .68rem; padding: .15rem .3rem; }
    .cal-legend { display: none; }
}
/* --- twofactor-calendar: end --- */

/* --- Density: the signed-in app (everything inside .content, plus the top bar and the menu) is drawn tighter on
   laptop and desktop screens: smaller buttons and fields, less padding around cards and headings. Phones keep the
   roomier sizes, because fingers need them. The landing and sign-in pages are not inside .content and are unchanged. --- */
@media (min-width: 768px) {
    .topbar { padding-top: calc(.4rem + env(safe-area-inset-top)); padding-bottom: .4rem; }
    .sidebar .nav-link { padding: .4rem .7rem; font-size: .9rem; margin-bottom: .05rem; border-radius: 10px; }
    .content { padding: 1.1rem 1.5rem calc(1.25rem + env(safe-area-inset-bottom)); font-size: .95rem; }
    .content .page-head { margin-bottom: .85rem; align-items: center; }
    .content .page-head h1 { font-size: 1.35rem; }
    .content .page-head .lede { font-size: .9rem; margin-top: .1rem; }
    .content .card .card-body { padding: .95rem 1.1rem; }
    .content .card h2.h6, .content .card h3.h6 { font-size: .76rem; margin-bottom: .6rem; }
    .content .card .hint { margin: -.3rem 0 .6rem; font-size: .82rem; }
    .content .card.mb-3 { margin-bottom: .75rem !important; }
    .content .row.g-3 { --bs-gutter-x: .75rem; --bs-gutter-y: .75rem; }
    .content .btn { padding: .34rem .85rem; font-size: .88rem; }
    .content .btn-sm { padding: .2rem .65rem; font-size: .8rem; }
    .content .btn-lg { padding: .5rem 1.1rem; font-size: .95rem; }
    .content .btn-link { padding-left: .25rem; padding-right: .25rem; }
    .content .form-control, .content .form-select { padding: .36rem .7rem; font-size: .92rem; }
    .content .form-select { padding-right: 2rem; }
    .content .form-control-sm, .content .form-select-sm { padding-top: .24rem; padding-bottom: .24rem; font-size: .85rem; }
    .content .form-label { margin-bottom: .2rem; font-size: .82rem; }
    .content .form-text { margin-top: .15rem; font-size: .8rem; }
    .content .stat-grid { gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
    .content .stat { padding: .7rem .95rem; }
    .content .stat .value { font-size: 1.5rem; margin-top: .1rem; }
    .content .table thead th { padding: .5rem .8rem; }
    .content .table tbody td { padding: .5rem .8rem; }
    .content .alert:not(.pv-toast) { padding: .55rem .85rem; font-size: .9rem; margin-bottom: .75rem; }
    .content .empty { padding: 1.75rem 1rem; }
    .content .empty.compact { padding: 1.25rem 1rem; }
    .content .empty .ico { width: 44px; height: 44px; border-radius: 12px; margin-bottom: .5rem; }
    .content .empty .ico svg { width: 22px; height: 22px; }
    .content .empty .actions { margin-top: .6rem; }
    .content .pager { margin-top: .6rem; }
    .content .badge { padding: .3em .6em; }
}
