/* ==========================================================================
   Typecta SMM - "Studio" design system
   Modern SaaS (Linear/Vercel lineage). Light-first + dark.
   ========================================================================== */

:root {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Brand - electric indigo-violet */
  --brand:#5b50e6; --brand-600:#5246dd; --brand-700:#463bc7; --brand-ink:#fff;
  --brand-soft:#efedfd; --brand-glow:rgba(91,80,230,.18);

  /* Data accents */
  --teal:#0d9488; --teal-soft:#d6f3ef;
  --amber:#d97706; --amber-soft:#fcefd6;
  --rose:#e11d48; --rose-soft:#fde3ea;
  --sky:#2563eb; --sky-soft:#dde9ff;
  --violet:#7c3aed; --violet-soft:#efe6fe;

  /* Cool near-white canvas */
  --bg:#f7f7fa;
  --bg-tint: radial-gradient(120% 100% at 100% 0%, rgba(91,80,230,.05), transparent 60%);
  --surface:#ffffff; --surface-2:#f5f5f9; --surface-3:#efeff4; --elevated:#ffffff;
  --border:#ececf0; --border-2:#e3e3ea; --border-strong:#d6d6df;
  --text:#17171f; --text-2:#51515e; --muted:#8a8a98; --faint:#b6b6c1;
  --ring:rgba(91,80,230,.35);

  --success:#0d9488; --success-soft:#d6f3ef;
  --warning:#d97706; --warning-soft:#fcefd6;
  --danger:#e11d48;  --danger-soft:#fde3ea;
  --info:#2563eb;    --info-soft:#dde9ff;

  /* status hues */
  --st-idea:#8a8a98;      --st-idea-soft:#eeeef2;
  --st-creative:#d97706;  --st-creative-soft:#fcefd6;
  --st-review:#7c3aed;    --st-review-soft:#efe6fe;
  --st-approved:#0d9488;  --st-approved-soft:#d6f3ef;
  --st-scheduled:#2563eb; --st-scheduled-soft:#dde9ff;
  --st-published:#16a34a; --st-published-soft:#dcf7e3;

  --r-xs:7px; --r-sm:9px; --r:12px; --r-lg:16px; --r-xl:22px; --r-2xl:28px; --r-full:999px;
  --sh-xs:0 1px 2px rgba(20,20,40,.05);
  --sh-sm:0 1px 2px rgba(20,20,40,.06), 0 2px 6px -2px rgba(20,20,40,.06);
  --sh:0 4px 12px -2px rgba(20,20,40,.08), 0 2px 6px -2px rgba(20,20,40,.05);
  --sh-md:0 12px 28px -6px rgba(20,20,40,.14), 0 4px 10px -4px rgba(20,20,40,.08);
  --sh-lg:0 24px 60px -12px rgba(20,20,40,.22), 0 8px 20px -8px rgba(20,20,40,.12);
  --sh-brand:0 4px 14px -2px var(--brand-glow);

  --topbar-h:64px; --sidebar-w:252px;
  --ease:cubic-bezier(.4,.6,.2,1); --spring:cubic-bezier(.34,1.42,.5,1);
}

[data-theme="dark"]{
  --logo-filter:brightness(0) invert(1);
  --brand:#7b72f0; --brand-600:#6f66ec; --brand-700:#5f56e0; --brand-soft:#1c1a32; --brand-glow:rgba(123,114,240,.28);
  --teal-soft:#0c2b27; --amber-soft:#2c2008; --rose-soft:#2e1119; --sky-soft:#0f1f3d; --violet-soft:#1d1330;
  --bg:#08080c;
  --bg-tint: radial-gradient(120% 100% at 100% 0%, rgba(123,114,240,.10), transparent 55%);
  --surface:#111118; --surface-2:#16161f; --surface-3:#1c1c27; --elevated:#17171f;
  --border:#23232e; --border-2:#2a2a36; --border-strong:#34343f;
  --text:#ededf2; --text-2:#a9a9b8; --muted:#74748a; --faint:#54545f;
  --ring:rgba(123,114,240,.42);
  --success-soft:#0c2b27; --warning-soft:#2c2008; --danger-soft:#2e1119; --info-soft:#0f1f3d;
  --st-idea-soft:#1e1e28; --st-creative-soft:#2c2008; --st-review-soft:#1d1330;
  --st-approved-soft:#0c2b27; --st-scheduled-soft:#0f1f3d; --st-published-soft:#0d2417;
  --sh-xs:0 1px 2px rgba(0,0,0,.5);
  --sh-sm:0 1px 2px rgba(0,0,0,.5), 0 2px 6px -2px rgba(0,0,0,.5);
  --sh:0 4px 14px -2px rgba(0,0,0,.55);
  --sh-md:0 14px 32px -8px rgba(0,0,0,.65);
  --sh-lg:0 28px 64px -12px rgba(0,0,0,.75);
}

*{box-sizing:border-box;}
html,body{height:100%;}
body{margin:0;font-family:var(--font);background:var(--bg);color:var(--text);font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;}
body::before{content:"";position:fixed;inset:0;background:var(--bg-tint);pointer-events:none;z-index:0;}
a{color:inherit;text-decoration:none;}
button{font:inherit;}
h1,h2,h3,h4{margin:0;font-weight:650;letter-spacing:-.02em;line-height:1.18;}
h1{font-size:24px;} h2{font-size:18px;} h3{font-size:15px;}
::selection{background:var(--brand);color:#fff;}
:focus-visible{outline:2px solid var(--ring);outline-offset:2px;}
::-webkit-scrollbar{width:11px;height:11px;}
::-webkit-scrollbar-thumb{background:var(--border-strong);border-radius:99px;border:3px solid var(--bg);}
::-webkit-scrollbar-thumb:hover{background:var(--muted);}
::-webkit-scrollbar-track{background:transparent;}

/* ----------------------------------------------------------- utilities */
.flex{display:flex;}.inline-flex{display:inline-flex;}.grid{display:grid;}
.items-center{align-items:center;}.items-start{align-items:flex-start;}.items-end{align-items:flex-end;}.items-baseline{align-items:baseline;}
.justify-between{justify-content:space-between;}.justify-center{justify-content:center;}.justify-end{justify-content:flex-end;}
.flex-col{flex-direction:column;}.flex-1{flex:1;}.flex-wrap{flex-wrap:wrap;}.shrink-0{flex-shrink:0;}
.gap-1{gap:4px;}.gap-2{gap:8px;}.gap-3{gap:12px;}.gap-4{gap:16px;}.gap-5{gap:20px;}.gap-6{gap:24px;}.gap-8{gap:32px;}
.w-full{width:100%;}.h-full{height:100%;}.min-w-0{min-width:0;}
.mt-1{margin-top:4px;}.mt-2{margin-top:8px;}.mt-3{margin-top:12px;}.mt-4{margin-top:16px;}.mt-6{margin-top:24px;}.mt-8{margin-top:32px;}
.mb-1{margin-bottom:4px;}.mb-2{margin-bottom:8px;}.mb-3{margin-bottom:12px;}.mb-4{margin-bottom:16px;}.mb-6{margin-bottom:24px;}.mb-8{margin-bottom:32px;}
.ml-auto{margin-left:auto;}.mr-auto{margin-right:auto;}
.p-2{padding:8px;}.p-3{padding:12px;}.p-4{padding:16px;}.p-5{padding:20px;}.p-6{padding:24px;}
.text-sm{font-size:13px;}.text-xs{font-size:12px;}.text-lg{font-size:16px;}.text-xl{font-size:20px;}.text-2xl{font-size:26px;}.text-3xl{font-size:32px;}
.font-medium{font-weight:520;}.font-semibold{font-weight:600;}.font-bold{font-weight:700;}
.tracking-tight{letter-spacing:-.02em;}.tabular{font-variant-numeric:tabular-nums;}
.text-muted{color:var(--muted);}.text-2{color:var(--text-2);}.text-brand{color:var(--brand);}
.text-center{text-align:center;}.text-right{text-align:right;}
.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.line-clamp-1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.line-clamp-2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.line-clamp-3{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;}
.hidden{display:none !important;}
.relative{position:relative;}.uppercase{text-transform:uppercase;letter-spacing:.06em;}
.cap{font-size:11px;font-weight:650;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);}
.divider{height:1px;background:var(--border);border:0;}
.pointer{cursor:pointer;}
.spin{animation:spin 1s linear infinite;} @keyframes spin{to{transform:rotate(360deg);}}
.grid-2{display:grid;grid-template-columns:1fr 1fr;} .grid-3{display:grid;grid-template-columns:repeat(3,1fr);}
.grid-2>*,.grid-3>*{min-width:0;}   /* let 1fr columns shrink so long titles truncate instead of stretching the card */

/* entrance animations */
.rise{animation:rise .5s var(--ease) both;}
@keyframes rise{from{opacity:0;transform:translateY(10px);}to{opacity:1;transform:none;}}
.fade{animation:fade .3s var(--ease) both;}
@keyframes fade{from{opacity:0;}to{opacity:1;}}
.fade-in{animation:fade .3s var(--ease) both;}
.pop{animation:pop .4s var(--spring) both;}
@keyframes pop{from{opacity:0;transform:scale(.96);}to{opacity:1;transform:none;}}
.hover-lift{transition:transform .22s var(--ease),box-shadow .22s var(--ease),border-color .22s;}
.hover-lift:hover{transform:translateY(-3px);box-shadow:var(--sh-md);border-color:var(--border-2);}
@media (prefers-reduced-motion: reduce){*{animation-duration:.01ms !important;transition-duration:.01ms !important;scroll-behavior:auto !important;}}

/* -------------------------------------------------------------- buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:38px;padding:0 15px;border-radius:var(--r-sm);border:1px solid transparent;font-weight:550;font-size:13.5px;letter-spacing:-.01em;cursor:pointer;white-space:nowrap;transition:background .16s,border-color .16s,box-shadow .16s,transform .08s var(--spring),color .16s;background:transparent;color:var(--text);}
.btn:active{transform:scale(.97);}
.btn[disabled]{opacity:.5;cursor:not-allowed;}
.btn svg{width:16px;height:16px;}
.btn-primary{background:var(--brand-600);color:var(--brand-ink);box-shadow:var(--sh-brand);}
.btn-primary:hover:not([disabled]){background:var(--brand-700);box-shadow:0 6px 18px -4px var(--brand-glow);}
.btn-outline{border-color:var(--border-strong);background:var(--surface);color:var(--text);}
.btn-outline:hover:not([disabled]){background:var(--surface-2);border-color:var(--muted);}
.btn-ghost{color:var(--text-2);}
.btn-ghost:hover:not([disabled]){background:var(--surface-2);color:var(--text);}
.btn-danger{background:var(--danger);color:#fff;}.btn-danger:hover:not([disabled]){filter:brightness(.93);}
.btn-success{background:var(--success);color:#fff;}.btn-success:hover:not([disabled]){filter:brightness(.95);}
.btn-sm{height:32px;padding:0 11px;font-size:12.5px;border-radius:var(--r-xs);}
.btn-lg{height:46px;padding:0 22px;font-size:14.5px;border-radius:var(--r);}
.btn-block{width:100%;}
.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:var(--r-sm);border:1px solid transparent;background:transparent;color:var(--text-2);cursor:pointer;transition:background .16s,color .16s,transform .08s var(--spring);}
.icon-btn:hover{background:var(--surface-2);color:var(--text);}
.icon-btn:active{transform:scale(.92);}
.icon-btn svg{width:18px;height:18px;}
.icon-btn.sm{width:30px;height:30px;}.icon-btn.sm svg{width:16px;height:16px;}

/* --------------------------------------------------------------- cards */
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:var(--sh-xs);}
.card-pad{padding:20px;}
.card-head{padding:16px 20px;border-bottom:1px solid var(--border);display:flex;align-items:center;}
.card-head h3{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;}
.card-body{padding:20px;}

/* --------------------------------------------------------------- badges */
.badge{display:inline-flex;align-items:center;gap:5px;height:23px;padding:0 9px;border-radius:var(--r-full);font-size:11.5px;font-weight:600;letter-spacing:-.01em;background:var(--surface-2);color:var(--text-2);border:1px solid var(--border);}
.badge .dot,.badge-dot{width:6px;height:6px;border-radius:50%;background:currentColor;}
.badge.idea{background:var(--st-idea-soft);color:var(--st-idea);border-color:transparent;}
.badge.creative{background:var(--st-creative-soft);color:var(--st-creative);border-color:transparent;}
.badge.review{background:var(--st-review-soft);color:var(--st-review);border-color:transparent;}
.badge.approved{background:var(--st-approved-soft);color:var(--st-approved);border-color:transparent;}
.badge.scheduled{background:var(--st-scheduled-soft);color:var(--st-scheduled);border-color:transparent;}
.badge.published{background:var(--st-published-soft);color:var(--st-published);border-color:transparent;}
.badge.danger{background:var(--danger-soft);color:var(--danger);border-color:transparent;}
.badge.warning{background:var(--warning-soft);color:var(--warning);border-color:transparent;}
.badge.solid{background:var(--brand-600);color:#fff;border-color:transparent;}

/* chips */
.chip{display:inline-flex;align-items:center;gap:6px;height:27px;padding:0 10px;border-radius:var(--r-full);background:var(--surface-2);border:1px solid var(--border);font-size:12px;font-weight:550;color:var(--text-2);transition:background .15s,border-color .15s;}
.chip.pointer:hover{background:var(--surface-3);border-color:var(--border-strong);}
.chip.on{background:var(--brand-soft);border-color:transparent;color:var(--brand);}

/* --------------------------------------------------------------- inputs */
.field{display:flex;flex-direction:column;gap:6px;margin-bottom:14px;}
.field label{font-size:12.5px;font-weight:550;color:var(--text-2);}
.input,.textarea,.select{width:100%;height:40px;padding:0 13px;border:1px solid var(--border-strong);border-radius:var(--r-sm);background:var(--surface);color:var(--text);font:inherit;font-size:13.5px;transition:border-color .15s,box-shadow .15s,background .15s;}
.textarea{height:auto;padding:11px 13px;resize:vertical;min-height:84px;line-height:1.55;}
.select{appearance:none;cursor:pointer;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a8a98' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 11px center;padding-right:34px;}
.input:focus,.textarea:focus,.select:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3.5px var(--ring);}
.input::placeholder,.textarea::placeholder{color:var(--faint);}

/* switch */
.switch{position:relative;display:inline-block;width:42px;height:24px;flex-shrink:0;}
.switch input{opacity:0;width:0;height:0;}
.switch .slider{position:absolute;inset:0;background:var(--border-strong);border-radius:var(--r-full);transition:.22s var(--ease);cursor:pointer;}
.switch .slider:before{content:"";position:absolute;width:18px;height:18px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.22s var(--spring);box-shadow:var(--sh-sm);}
.switch input:checked + .slider{background:var(--brand-600);}
.switch input:checked + .slider:before{transform:translateX(18px);}

/* segmented control */
.seg{display:inline-flex;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);padding:3px;gap:2px;position:relative;}
.seg button,.seg .seg-btn{height:30px;padding:0 13px;border:0;background:transparent;color:var(--text-2);font-weight:550;font-size:13px;border-radius:var(--r-xs);cursor:pointer;transition:color .18s,background .18s;z-index:1;white-space:nowrap;display:inline-flex;align-items:center;gap:6px;}
.seg button.on,.seg .seg-btn.on{color:var(--text);background:var(--surface);box-shadow:var(--sh-sm);}

/* progress */
.progress{height:7px;border-radius:var(--r-full);background:var(--surface-3);overflow:hidden;}
.progress > span{display:block;height:100%;background:linear-gradient(90deg,var(--brand),var(--brand-600));border-radius:inherit;transition:width 1s var(--ease);}
.progress.thin{height:5px;}
.progress.teal > span{background:linear-gradient(90deg,var(--teal),#14b8a6);}

/* avatar */
.avatar{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;border:0;border-radius:50%;background:var(--brand-600);color:#fff;font-weight:600;font-size:13px;overflow:hidden;flex-shrink:0;letter-spacing:-.02em;appearance:none;-webkit-appearance:none;}
.avatar img{width:100%;height:100%;object-fit:cover;}
.avatar.xs{width:24px;height:24px;font-size:10px;}
.avatar.sm{width:30px;height:30px;font-size:11.5px;}
.avatar.lg{width:54px;height:54px;font-size:19px;}
.avatar-stack{display:flex;}
.avatar-stack:empty{display:none;}   /* no phantom top-bar gap when nobody else is online */
.avatar-stack .avatar{border:2px solid var(--surface);margin-left:-9px;transition:transform .18s var(--spring);}
.avatar-stack .avatar:first-child{margin-left:0;}
.avatar-stack:hover .avatar{margin-left:0;}

/* table */
.table{width:100%;border-collapse:collapse;}
/* multi-column tables sit in a bare .card; let them scroll horizontally on narrow screens
   instead of squeezing or forcing the whole page to scroll */
@media (max-width:640px){.card:has(>.table){overflow-x:auto;}.card>.table{min-width:520px;}}
.table th{text-align:left;font-size:11px;font-weight:650;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;padding:11px 16px;border-bottom:1px solid var(--border);}
.table td{padding:13px 16px;border-bottom:1px solid var(--border);font-size:13.5px;}
.table tr:last-child td{border-bottom:0;}
.table tbody tr{transition:background .14s;}
.table tbody tr:hover{background:var(--surface-2);}

/* empty / skeleton */
.empty{display:flex;flex-direction:column;align-items:center;text-align:center;padding:46px 20px;color:var(--muted);}
.empty .empty-ico{width:56px;height:56px;border-radius:var(--r-lg);display:flex;align-items:center;justify-content:center;background:var(--surface-2);margin-bottom:14px;color:var(--faint);}
.skeleton{background:linear-gradient(90deg,var(--surface-2) 25%,var(--surface-3) 37%,var(--surface-2) 63%);background-size:400% 100%;animation:sk 1.4s ease infinite;border-radius:var(--r-sm);}
@keyframes sk{0%{background-position:100% 0;}100%{background-position:-100% 0;}}

/* dropdown menu (toggled via .open to match chrome.js) */
.dropdown{position:relative;}
.menu{display:none;position:absolute;right:0;top:calc(100% + 8px);min-width:210px;max-width:calc(100vw - 24px);background:var(--elevated);border:1px solid var(--border-2);border-radius:var(--r);box-shadow:var(--sh-lg);padding:6px;z-index:60;transform-origin:top right;}
.menu.open{display:block;animation:menu .16s var(--spring) both;}
@keyframes menu{from{opacity:0;transform:scale(.95) translateY(-4px);}to{opacity:1;transform:none;}}
.menu-item{display:flex;align-items:center;gap:11px;padding:9px 10px;border-radius:var(--r-xs);font-size:13.5px;cursor:pointer;color:var(--text-2);transition:background .13s,color .13s;}
.menu-item:hover{background:var(--surface-2);color:var(--text);}
.menu-item svg{width:16px;height:16px;color:var(--muted);}
.menu-item:hover svg{color:var(--text);}
.menu-item.danger{color:var(--danger);}.menu-item.danger svg{color:var(--danger);}
.menu-item.danger:hover{background:var(--danger-soft);}
.menu-label{padding:9px 11px;}
.menu-sep{height:1px;background:var(--border);margin:5px 6px;}

/* overlay / dialog / sheet */
.overlay{position:fixed;inset:0;background:rgba(15,15,25,.42);backdrop-filter:blur(4px);z-index:100;display:flex;align-items:flex-start;justify-content:center;padding:6vh 16px;overflow:auto;animation:fade .18s ease both;}
.dialog{background:var(--surface);border:1px solid var(--border-2);border-radius:var(--r-xl);box-shadow:var(--sh-lg);width:100%;max-width:540px;animation:dlg .26s var(--spring) both;}
.dialog.lg{max-width:880px;}.dialog.sm{max-width:430px;}
@keyframes dlg{from{opacity:0;transform:translateY(14px) scale(.97);}to{opacity:1;transform:none;}}
.dialog-head{display:flex;align-items:center;justify-content:space-between;padding:18px 22px;border-bottom:1px solid var(--border);}
.dialog-body{padding:22px;max-height:68vh;overflow:auto;}
.dialog-foot{display:flex;justify-content:flex-end;gap:10px;padding:16px 22px;border-top:1px solid var(--border);}

/* right drawer */
.drawer-overlay{position:fixed;inset:0;background:rgba(15,15,25,.42);backdrop-filter:blur(4px);z-index:100;animation:fade .2s ease both;}
.drawer{position:fixed;top:0;right:0;bottom:0;width:min(560px,100%);background:var(--surface);border-left:1px solid var(--border-2);box-shadow:var(--sh-lg);z-index:101;display:flex;flex-direction:column;animation:drawer .34s var(--ease) both;}
@keyframes drawer{from{transform:translateX(100%);}to{transform:none;}}
@keyframes drawerOut{from{transform:none;}to{transform:translateX(100%);}}
.drawer-head{padding:20px 22px;border-bottom:1px solid var(--border);display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.drawer-body{flex:1;overflow:auto;padding:22px;}

/* tabs */
.tabs{display:flex;gap:22px;border-bottom:1px solid var(--border);}
.tab{padding:11px 1px;font-size:13.5px;font-weight:550;color:var(--muted);border-bottom:2px solid transparent;cursor:pointer;margin-bottom:-1px;transition:color .15s,border-color .15s;white-space:nowrap;display:inline-flex;align-items:center;gap:6px;}
.tab:hover{color:var(--text-2);}
.tab.active{color:var(--brand);border-bottom-color:var(--brand);}

/* toast */
.toasts{position:fixed;bottom:24px;right:24px;display:flex;flex-direction:column;gap:10px;z-index:200;}
.toast{display:flex;align-items:center;gap:11px;background:var(--elevated);border:1px solid var(--border-2);border-radius:var(--r);box-shadow:var(--sh-lg);padding:12px 15px 12px 13px;min-width:250px;max-width:380px;animation:toast .34s var(--spring) both;border-left:3px solid var(--brand-600);}
.toast.success{border-left-color:var(--success);}
.toast.error{border-left-color:var(--danger);}
@keyframes toast{from{opacity:0;transform:translateX(20px) scale(.96);}to{opacity:1;transform:none;}}

/* page head + status dot */
.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:24px;flex-wrap:wrap;}
.page-head h1{font-size:25px;}
.page-head p,.page-head .sub{color:var(--muted);margin:5px 0 0;font-size:13.5px;}
.st{display:inline-flex;align-items:center;gap:7px;font-size:12.5px;font-weight:550;}
.st .dot{width:8px;height:8px;border-radius:50%;}

/* ============================================================ APP SHELL */
.app{display:flex;height:100vh;overflow:hidden;position:relative;z-index:1;}

.sidebar{width:var(--sidebar-w);background:var(--surface);border-right:1px solid var(--border);display:flex;flex-direction:column;flex-shrink:0;position:relative;}
.sidebar::after{content:"";position:absolute;top:0;left:0;right:0;height:160px;background:radial-gradient(80% 100% at 20% 0%, var(--brand-glow), transparent 70%);opacity:.5;pointer-events:none;}
.sidebar-brand{height:var(--topbar-h);display:flex;align-items:center;gap:10px;padding:0 20px;flex-shrink:0;position:relative;z-index:1;}
.brand-mark{width:30px;height:30px;border-radius:9px;background:linear-gradient(140deg,var(--brand),#7c5cf0);display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:15px;box-shadow:var(--sh-brand);flex-shrink:0;letter-spacing:-.04em;}
.brand-name{font-weight:650;font-size:15px;letter-spacing:-.02em;}
.brand-name .sub{font-size:10.5px;font-weight:650;letter-spacing:.1em;color:var(--muted);text-transform:uppercase;display:block;margin-top:1px;}

/* Typecta wordmark logo (source PNG is black; inverts to white in dark mode) */
.logo-img{display:block;width:auto;height:auto;}
[data-theme=dark] .logo-img{filter:brightness(0) invert(1);}
.sidebar-brand .brand-logo{height:18px;}
.brand-tag{font-size:9px;font-weight:700;letter-spacing:.13em;text-transform:uppercase;color:var(--muted);border:1px solid var(--border);border-radius:var(--r-full);padding:2px 6px;line-height:1;}

.nav{display:flex;flex-direction:column;gap:2px;padding:8px 14px;position:relative;z-index:1;overflow:auto;flex:1;}
.nav-item{display:flex;align-items:center;gap:11px;padding:9px 11px;border-radius:var(--r-sm);color:var(--text-2);font-weight:520;font-size:13.5px;transition:background .15s,color .15s;cursor:pointer;position:relative;}
.nav-item:hover{background:var(--surface-2);color:var(--text);}
.nav-item.active{background:var(--brand-soft);color:var(--brand);font-weight:600;}
.nav-item.active::before{content:"";position:absolute;left:-14px;top:50%;transform:translateY(-50%);width:3px;height:18px;border-radius:0 3px 3px 0;background:var(--brand);}
.nav-item svg{width:18px;height:18px;flex-shrink:0;}
.nav-sep{margin:12px 12px 4px;font-size:10.5px;font-weight:700;letter-spacing:.1em;color:var(--faint);text-transform:uppercase;}
.nav-acc{display:flex;flex-direction:column;}
.nav-acc>summary{list-style:none;}
.nav-acc>summary::-webkit-details-marker{display:none;}
.nav-acc>summary .acc-caret{margin-left:auto;font-size:10px;opacity:.55;transition:transform .15s;}
.nav-acc[open]>summary .acc-caret{transform:rotate(90deg);}
.nav-sub{display:flex;flex-direction:column;gap:1px;margin:1px 0 4px;}
.nav-subitem{display:block;padding:6px 10px 6px 40px;font-size:12.5px;color:var(--text-2);border-radius:var(--r-sm);text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:background .15s,color .15s;}
.nav-subitem:hover{background:var(--surface-2);color:var(--text);}
.nav-subitem.active{background:var(--brand-soft);color:var(--brand);font-weight:600;}

.main{flex:1;display:flex;flex-direction:column;min-width:0;overflow:hidden;}
.topbar{height:var(--topbar-h);display:flex;align-items:center;gap:12px;padding:0 22px;border-bottom:1px solid var(--border);background:color-mix(in srgb, var(--surface) 78%, transparent);backdrop-filter:blur(14px) saturate(1.4);flex-shrink:0;position:relative;z-index:20;}
.crumb{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:13px;font-weight:500;}
.crumb .sep{color:var(--faint);}
.crumb b{color:var(--text);font-weight:600;}
.content{flex:1;overflow:auto;padding:28px 32px;scroll-behavior:smooth;}
.route-anim,main.content > *{}
main.content{animation:route .42s var(--ease) both;}
@keyframes route{from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:none;}}

.has-presence{position:relative;}
.has-presence::after{content:"";position:absolute;right:0;bottom:0;width:9px;height:9px;border-radius:50%;background:var(--success);border:2px solid var(--surface);}

/* stats */
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;}
.stat{padding:18px 18px 16px;position:relative;overflow:hidden;}
.stat .stat-top{display:flex;align-items:center;justify-content:space-between;}
.stat .stat-ico{width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:var(--brand-soft);color:var(--brand);}
.stat .stat-ico svg{width:19px;height:19px;}
.stat.teal .stat-ico{background:var(--teal-soft);color:var(--teal);}
.stat.amber .stat-ico{background:var(--amber-soft);color:var(--amber);}
.stat.sky .stat-ico{background:var(--sky-soft);color:var(--sky);}
.stat .stat-val{font-size:30px;font-weight:700;margin-top:14px;letter-spacing:-.03em;font-variant-numeric:tabular-nums;line-height:1;}
.stat .stat-label{color:var(--muted);font-size:13px;margin-top:6px;}
.trend{font-size:12px;font-weight:650;display:inline-flex;align-items:center;gap:3px;padding:2px 7px;border-radius:var(--r-full);}
.trend.up{color:var(--success);background:var(--success-soft);}.trend.down{color:var(--danger);background:var(--danger-soft);}
.stat .spark{position:absolute;right:0;bottom:0;width:90px;height:42px;opacity:.85;pointer-events:none;}
.stat .stat-label{position:relative;z-index:1;}

/* mobile bottom nav */
.mobile-nav{display:none;}

@media (max-width:900px){
  .sidebar{position:fixed;inset:0 auto 0 0;z-index:120;transform:translateX(-100%);transition:transform .32s var(--ease);box-shadow:var(--sh-lg);width:280px;}
  .sidebar.open{transform:none;}
  .scrim{position:fixed;inset:0;background:rgba(15,15,25,.45);backdrop-filter:blur(3px);z-index:115;animation:fade .2s ease both;}
  .topbar{padding:0 16px;}
  .content{padding:18px 16px calc(80px + env(safe-area-inset-bottom));}
  .stats{grid-template-columns:repeat(2,1fr);gap:12px;}
  .stat .stat-val{font-size:26px;}
  .grid-2,.grid-3{grid-template-columns:1fr !important;}
  .drawer{width:100%;border-left:0;}
  .dialog{max-width:100%;border-radius:var(--r-xl) var(--r-xl) 0 0;align-self:flex-end;margin-top:auto;animation:sheet .32s var(--ease) both;}
  .overlay{padding:0;align-items:flex-end;}
  @keyframes sheet{from{transform:translateY(100%);}to{transform:none;}}

  .mobile-nav{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:90;background:color-mix(in srgb,var(--surface) 86%, transparent);backdrop-filter:blur(18px) saturate(1.5);border-top:1px solid var(--border);padding:8px 8px calc(8px + env(safe-area-inset-bottom));justify-content:space-around;}
  .mnav-item{display:flex;flex-direction:column;align-items:center;gap:3px;flex:1;padding:5px 0;color:var(--muted);font-size:10.5px;font-weight:600;border-radius:var(--r-sm);transition:color .18s;position:relative;cursor:pointer;}
  .mnav-item svg{width:22px;height:22px;}
  .mnav-item.active{color:var(--brand);}
  .mnav-item .pip{position:absolute;top:-1px;width:5px;height:5px;border-radius:50%;background:var(--brand);opacity:0;transform:scale(0);transition:.28s var(--spring);}
  .mnav-item.active .pip{opacity:1;transform:scale(1);}
  .mnav-fab{margin-top:-24px;width:50px;height:50px;border-radius:16px;background:var(--brand-600);color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:var(--sh-brand);flex:0 0 auto;}
  .mnav-fab svg{width:24px;height:24px;}
  .hide-mobile{display:none !important;}
}
@media (min-width:901px){.menu-btn{display:none;}}

/* ============================================================ CALENDAR */
.cal-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);background:var(--border);border:1px solid var(--border);border-radius:var(--r-lg);overflow:hidden;gap:1px;}
.cal-dow{background:var(--surface);padding:10px 8px;text-align:center;font-size:11px;font-weight:650;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;}
.cal-cell{background:var(--surface);min-height:128px;min-width:0;padding:7px;display:flex;flex-direction:column;gap:5px;transition:background .15s;position:relative;}
.cal-list{min-width:0;}
.cal-cell.dim{background:var(--surface-2);}
.cal-cell.over{background:var(--brand-soft);box-shadow:inset 0 0 0 2px var(--brand);}
.cal-daynum{font-size:12.5px;font-weight:600;color:var(--text-2);display:flex;align-items:center;justify-content:space-between;height:24px;}
.cal-today{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:24px;padding:0 6px;border-radius:var(--r-full);background:var(--brand-600);color:#fff;font-weight:650;}
.cal-add{opacity:0;cursor:pointer;color:var(--muted);width:22px;height:22px;display:flex;align-items:center;justify-content:center;border-radius:6px;transition:opacity .15s,background .15s,color .15s;}
.cal-add:hover{background:var(--surface-3);color:var(--brand);}
.cal-cell:hover .cal-add{opacity:1;}
.cal-add:focus-visible{opacity:1;}
/* touch devices have no hover - reveal the add-post control so it isn't unreachable */
@media (hover:none){.cal-add{opacity:1;}}

.cal-post{display:flex;align-items:center;gap:6px;min-width:0;padding:5px 8px;border-radius:var(--r-xs);font-size:12px;cursor:grab;background:var(--surface-2);transition:box-shadow .15s,transform .12s var(--spring),filter .15s;user-select:none;}
.cal-post:hover{box-shadow:var(--sh-sm);filter:brightness(.99);transform:translateY(-1px);}
.cal-post:active{cursor:grabbing;}
/* No left border: the pill is a soft tint and the text takes the status (legend) colour. */
.cal-post.idea{background:var(--st-idea-soft);color:var(--st-idea);}
.cal-post.creative{background:var(--st-creative-soft);color:var(--st-creative);}
.cal-post.review{background:var(--st-review-soft);color:var(--st-review);}
.cal-post.approved{background:var(--st-approved-soft);color:var(--st-approved);}
.cal-post.scheduled{background:var(--st-scheduled-soft);color:var(--st-scheduled);}
.cal-post.published{background:var(--st-published-soft);color:var(--st-published);}
.cal-post.cancelled{background:var(--surface-2);color:var(--muted);}
/* Rejected is a big deal - the whole pill goes red (wins over the stage colour; both 2-class specificity, declared later). */
.cal-post.rejected{background:var(--danger-soft,#fdecec);color:var(--danger,#e5484d);box-shadow:inset 0 0 0 1px var(--danger,#e5484d);}
.cal-post.rejected .ct,.cal-post.rejected .ct .ct-type,.cal-post.rejected .ct .ct-title{color:var(--danger,#e5484d);}
.cal-post.cancelled .ct,.cal-post.cancelled .ct .ct-type,.cal-post.cancelled .ct .ct-title{text-decoration:line-through;}
.cal-post.cancelled .pi,.cal-post.cancelled .cal-cav{opacity:.55;}
.cal-post .pi{flex-shrink:0;display:flex;align-items:center;gap:3px;}
.cal-post .cal-cav{flex-shrink:0;width:20px;height:20px;border-radius:50%;overflow:hidden;background:var(--brand-soft);color:var(--brand);font-size:10px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;}
.cal-post .cal-cav img{width:100%;height:100%;object-fit:cover;}
.cal-post .ct{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;font-weight:520;}
.cal-post .ct .ct-type{font-weight:650;}
.cal-post .ct .ct-sep{color:var(--muted);margin:0 4px;}
.cal-post .rev{color:var(--warning);flex-shrink:0;}
.sortable-ghost{opacity:.4;}
.cal-legend{display:flex;align-items:center;gap:14px;flex-wrap:wrap;}
#cal-legend .lg,#legend .lg{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--text-2);font-weight:500;}
#cal-legend .lg .sw,#legend .lg .sw{width:9px;height:9px;border-radius:3px;flex-shrink:0;}

/* ---- calendar view visibility (driven by [data-calview] on #cal-body) ---- */
.week-strip{display:none;}
#cal-weekgrid{display:none;}
.agenda{display:none;}
#cal-body[data-calview=month] #cal-grid{display:grid;}
#cal-body[data-calview=week] #cal-grid,#cal-body[data-calview=day] #cal-grid{display:none;}
#cal-body[data-calview=week] #cal-weekgrid{display:block;}
#cal-body[data-calview=day] .agenda{display:flex;flex-direction:column;gap:10px;}

/* agenda items - used by Day view (all sizes) and mobile Month */
.agenda-day{font-size:13px;font-weight:650;color:var(--text-2);margin:8px 2px 2px;display:flex;align-items:center;gap:8px;}
.agenda-day .cnt{font-size:11px;color:var(--muted);font-weight:600;}
.ag-post{display:flex;align-items:center;gap:12px;padding:13px;border-radius:var(--r);background:var(--surface);border:1px solid var(--border);border-left:3px solid var(--muted);box-shadow:var(--sh-xs);cursor:pointer;transition:box-shadow .15s,transform .12s var(--spring);}
.ag-post:hover{box-shadow:var(--sh-sm);transform:translateY(-1px);}
.ag-post.idea{border-left-color:var(--st-idea);} .ag-post.creative{border-left-color:var(--st-creative);}
.ag-post.review{border-left-color:var(--st-review);} .ag-post.approved{border-left-color:var(--st-approved);}
.ag-post.scheduled{border-left-color:var(--st-scheduled);} .ag-post.published{border-left-color:var(--st-published);}
.ag-post.cancelled{border-left-color:var(--muted);}
.ag-post.cancelled .font-medium{text-decoration:line-through;color:var(--muted);}
.ag-post .ag-pi{width:36px;height:36px;border-radius:10px;background:var(--surface-2);display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.ag-post .ag-tm{font-size:12px;font-weight:650;color:var(--text-2);flex-shrink:0;font-variant-numeric:tabular-nums;}

/* week time-grid */
#cal-weekgrid{border:1px solid var(--border);border-radius:var(--r-lg);overflow:hidden;}
.tg-head,.tg-allday,.tg-body{display:grid;grid-template-columns:58px repeat(7,1fr);}
.tg-head{background:var(--surface);border-bottom:1px solid var(--border);}
.tg-dayhead{padding:8px 4px;text-align:center;border-left:1px solid var(--border);}
.tg-dayhead .tg-dow{display:block;font-size:11px;font-weight:650;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;}
.tg-dayhead .tg-dnum{font-size:16px;font-weight:680;}
.tg-dayhead.today .tg-dnum{color:var(--brand-600);}
.tg-allday{border-bottom:1px solid var(--border);background:var(--surface);min-height:30px;}
.tg-allday-cell{border-left:1px solid var(--border);padding:4px;display:flex;flex-direction:column;gap:3px;min-width:0;}
.tg-side{font-size:10.5px;color:var(--muted);text-align:right;padding:3px 8px;font-variant-numeric:tabular-nums;}
.tg-scroll{position:relative;max-height:560px;overflow-y:auto;background:var(--surface);}
.tg-hour{border-top:1px solid var(--border);min-height:46px;}
.tg-cell{border-top:1px solid var(--border);border-left:1px solid var(--border);min-height:46px;padding:2px;display:flex;flex-direction:column;gap:2px;min-width:0;}
.tg-cell .cal-post,.tg-allday-cell .cal-post{cursor:pointer;}

/* media gallery (portal + post dialog) */
.gallery{aspect-ratio:1;background:var(--surface-2);border-radius:var(--r-lg);overflow:hidden;display:flex;align-items:center;justify-content:center;position:relative;}
.gallery img,.gallery video{width:100%;height:100%;object-fit:cover;}
.gnav{position:absolute;top:50%;transform:translateY(-50%);background:rgba(0,0,0,.45);color:#fff;border:0;width:34px;height:34px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;backdrop-filter:blur(4px);transition:background .15s;}
.gnav:hover{background:rgba(0,0,0,.65);}

/* media upload tiles (post editor) with per-file progress / error states */
.mtile{position:relative;width:64px;height:64px;border-radius:var(--r-sm);overflow:hidden;border:1px solid var(--border);background:var(--surface-2);flex-shrink:0;}
.mtile .mtile-ic{display:flex;align-items:center;justify-content:center;height:100%;color:var(--muted);}
.mtile-x{position:absolute;top:2px;right:2px;background:rgba(0,0,0,.6);color:#fff;border:0;border-radius:50%;width:18px;height:18px;cursor:pointer;line-height:1;font-size:13px;display:flex;align-items:center;justify-content:center;}
.mtile.uploading .mtile-ov{position:absolute;inset:0;background:rgba(15,23,42,.55);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;}
.mtile-pct{color:#fff;font-size:12px;font-weight:650;font-variant-numeric:tabular-nums;}
.mtile-bar{width:78%;height:4px;border-radius:2px;background:rgba(255,255,255,.3);overflow:hidden;}
.mtile-bar span{display:block;height:100%;background:#fff;transition:width .15s;}
.mtile.error{border-color:var(--danger);}
.mtile.error .mtile-ov.err{position:absolute;inset:0;background:var(--danger-soft);display:flex;align-items:center;justify-content:center;}
.mtile-retry{font-size:11px;font-weight:650;color:var(--danger);background:var(--surface);border:1px solid var(--danger);border-radius:var(--r-full);padding:2px 8px;cursor:pointer;}
/* upload progress overlay for avatar / logo (single-image uploads) */
.up-ring{display:flex;align-items:center;justify-content:center;width:100%;height:100%;background:var(--surface-3, var(--surface-2));border-radius:inherit;}
.up-ring .up-pct{font-size:11px;font-weight:700;color:var(--brand-600);font-variant-numeric:tabular-nums;}

@media (max-width:900px){
  #cal-legend{display:none;}
  /* Month (mobile): week-strip + agenda instead of the grid */
  #cal-body[data-calview=month] #cal-grid{display:none;}
  #cal-body[data-calview=month] .week-strip{display:flex;}
  #cal-body[data-calview=month] .agenda{display:flex;flex-direction:column;gap:10px;}
  /* Week (mobile): horizontally scroll the time-grid */
  #cal-body[data-calview=week] #cal-weekgrid{overflow-x:auto;}
  #cal-body[data-calview=week] .tg-head,#cal-body[data-calview=week] .tg-allday,#cal-body[data-calview=week] .tg-body{min-width:640px;}

  .week-strip{gap:7px;overflow-x:auto;padding:4px 2px 10px;-webkit-overflow-scrolling:touch;scrollbar-width:none;}
  .week-strip::-webkit-scrollbar{display:none;}
  .wk-day{flex:0 0 auto;width:50px;height:64px;border-radius:var(--r);border:1px solid var(--border);background:var(--surface);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;cursor:pointer;transition:.18s var(--spring);}
  .wk-day .wd{font-size:10.5px;font-weight:650;color:var(--muted);text-transform:uppercase;}
  .wk-day .dn{font-size:17px;font-weight:680;}
  .wk-day .pips{display:flex;gap:2px;height:4px;}
  .wk-day .pips i{width:4px;height:4px;border-radius:50%;}
  .wk-day.on{background:var(--brand-600);border-color:transparent;color:#fff;box-shadow:var(--sh-brand);}
  .wk-day.on .wd{color:rgba(255,255,255,.8);}
  .wk-day.today:not(.on){border-color:var(--brand);}
}

/* "needs attention" - team-only flag for a done post with no creative */
.attn-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--danger);box-shadow:0 0 0 2px var(--danger-soft);vertical-align:middle;flex:none;}
.attn-banner{display:flex;align-items:center;gap:8px;background:var(--danger-soft);color:var(--danger);border:1px solid var(--danger);border-radius:var(--r-sm);padding:9px 13px;font-size:13px;font-weight:600;margin-bottom:14px;cursor:pointer;}
.attn-banner:hover{filter:brightness(.97);}

/* maintenance mode bar (admin toggle) */
.maint-bar{position:fixed;inset:0 0 auto 0;height:34px;z-index:300;display:flex;align-items:center;justify-content:center;gap:7px;background:var(--warning);color:#231400;font-weight:650;font-size:13px;letter-spacing:-.01em;padding:0 14px;text-align:center;}
body.maint .app{height:calc(100vh - 34px);margin-top:34px;}
body.maint #root{padding-top:34px;}

/* ============================================ HELP CENTRE */
.help-page{max-width:1000px;margin:0 auto;}

/* hero */
.help-hero{position:relative;overflow:hidden;border-radius:var(--r-2xl);padding:42px 44px 38px;margin-bottom:26px;
  background:linear-gradient(135deg,#5b50e6 0%,#463bc7 58%,#352a9c 100%);color:#fff;box-shadow:var(--sh-md);}
.help-hero::before{content:"";position:absolute;inset:0;
  background:radial-gradient(70% 130% at 100% -10%,rgba(255,255,255,.26),transparent 55%),radial-gradient(60% 120% at -8% 115%,rgba(170,140,255,.45),transparent 55%);}
.help-hero::after{content:"";position:absolute;inset:0;opacity:.5;
  background-image:linear-gradient(rgba(255,255,255,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.07) 1px,transparent 1px);background-size:28px 28px;
  -webkit-mask-image:radial-gradient(58% 80% at 82% 8%,#000,transparent 72%);mask-image:radial-gradient(58% 80% at 82% 8%,#000,transparent 72%);}
.help-hero>*{position:relative;z-index:1;}
.he-eyebrow{font-size:11.5px;font-weight:650;letter-spacing:.14em;text-transform:uppercase;color:rgba(255,255,255,.72);}
.help-hero h1{font-size:33px;color:#fff;letter-spacing:-.03em;margin-top:9px;}
.he-sub{color:rgba(255,255,255,.86);max-width:560px;margin-top:11px;font-size:15px;line-height:1.55;}
.he-search{margin-top:24px;max-width:450px;position:relative;}
.he-search input{width:100%;height:48px;border-radius:var(--r-full);border:1px solid rgba(255,255,255,.28);background:rgba(255,255,255,.15);color:#fff;padding:0 18px 0 46px;font-size:14.5px;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);transition:background .15s,border-color .15s;}
.he-search input::placeholder{color:rgba(255,255,255,.72);}
.he-search input:focus{outline:none;background:rgba(255,255,255,.22);border-color:rgba(255,255,255,.55);}
.he-search svg{position:absolute;left:17px;top:50%;transform:translateY(-50%);color:rgba(255,255,255,.85);}

/* featured workflow visual */
.help-feature{border:1px solid var(--border);border-radius:var(--r-xl);background:var(--surface);box-shadow:var(--sh-sm);padding:22px 24px 24px;margin-bottom:30px;
  background-image:radial-gradient(110% 140% at 0% 0%,var(--brand-soft),transparent 45%);}
.hf-title{font-weight:600;font-size:13px;color:var(--text-2);margin-bottom:16px;display:flex;align-items:center;gap:8px;}
.hf-title svg{color:var(--brand-600);}
.help-flow{display:flex;align-items:center;gap:7px;flex-wrap:wrap;}
.hf-node{display:inline-flex;align-items:center;gap:8px;padding:9px 16px;border-radius:var(--r-full);font-weight:600;font-size:13px;}
.hf-node .dot{width:8px;height:8px;border-radius:50%;background:currentColor;}
.hf-node.idea{color:var(--st-idea);background:var(--st-idea-soft);}
.hf-node.creative{color:var(--st-creative);background:var(--st-creative-soft);}
.hf-node.scheduled{color:var(--st-scheduled);background:var(--st-scheduled-soft);}
.hf-node.published{color:var(--st-published);background:var(--st-published-soft);}
.hf-arrow{color:var(--faint);display:flex;align-items:center;}
.help-chips{display:flex;gap:14px;flex-wrap:wrap;margin-top:18px;padding-top:17px;border-top:1px dashed var(--border-2);}
.hl-chip{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:550;color:var(--text-2);}
.hl-chip .mk{font-weight:700;font-size:13px;}

/* topic cards */
.help-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(262px,1fr));gap:15px;margin-bottom:36px;}
.help-card{display:flex;flex-direction:column;gap:11px;padding:19px 20px;border-radius:var(--r-lg);background:var(--surface);border:1px solid var(--border);box-shadow:var(--sh-xs);cursor:pointer;color:inherit;transition:transform .2s var(--spring),box-shadow .2s,border-color .2s;}
.help-card:hover{transform:translateY(-4px);box-shadow:var(--sh-md);border-color:var(--border-strong);}
.help-card:hover .hc-meta{gap:8px;}
.help-ic{width:44px;height:44px;border-radius:13px;display:flex;align-items:center;justify-content:center;color:#fff;box-shadow:var(--sh-sm);flex:0 0 auto;}
.help-ic svg{width:21px;height:21px;}
.help-card h3{font-size:15px;}
.hc-desc{font-size:12.5px;color:var(--muted);line-height:1.5;}
.hc-meta{margin-top:auto;font-size:11.5px;color:var(--brand-600);font-weight:600;display:flex;align-items:center;gap:5px;transition:gap .2s var(--spring);}

.ic-brand{background:linear-gradient(140deg,#6e64f0,#4a3ecf);}
.ic-sky{background:linear-gradient(140deg,#4f93ff,#1d4ed8);}
.ic-amber{background:linear-gradient(140deg,#f7a934,#b45309);}
.ic-violet{background:linear-gradient(140deg,#9a72ff,#6d28d9);}
.ic-teal{background:linear-gradient(140deg,#1fc7b4,#0f766e);}
.ic-rose{background:linear-gradient(140deg,#fb7185,#be123c);}

/* detailed sections */
.help-section{scroll-margin-top:18px;margin-bottom:16px;border:1px solid var(--border);border-radius:var(--r-lg);background:var(--surface);overflow:hidden;box-shadow:var(--sh-xs);}
.help-section-head{display:flex;align-items:center;gap:12px;padding:15px 20px;border-bottom:1px solid var(--border);}
.help-section-head .help-ic{width:34px;height:34px;border-radius:10px;}
.help-section-head .help-ic svg{width:17px;height:17px;}
.help-section-head h3{font-size:15.5px;}
.help-section-body{padding:2px 20px 6px;}
.help-item{border-bottom:1px solid var(--border);}
.help-item:last-child{border-bottom:none;}
.help-item>summary{cursor:pointer;font-weight:550;display:flex;align-items:center;gap:10px;list-style:none;padding:13px 2px;font-size:14px;}
.help-item>summary::-webkit-details-marker{display:none;}
.help-item>summary:hover .help-q{color:var(--brand-600);}
.help-caret{color:var(--faint);transition:transform .18s var(--ease);display:flex;flex:0 0 auto;}
.help-item[open] .help-caret{transform:rotate(90deg);}
.help-q{flex:1;}
.help-a{padding:1px 0 14px 26px;color:var(--text-2);line-height:1.65;font-size:13.5px;animation:helpReveal .22s var(--ease);}
.help-a b{color:var(--text);font-weight:600;}
.help-a ul,.help-a ol{margin:6px 0;padding-left:18px;}
.help-a li{margin:4px 0;}
.help-a p{margin:7px 0;}
@keyframes helpReveal{from{opacity:0;transform:translateY(-4px);}to{opacity:1;transform:none;}}

/* annotation mini-demo + legend (reusable visual aids) */
.help-anno{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin:10px 0 4px;}
.had-img{position:relative;width:128px;height:128px;border-radius:14px;flex:0 0 auto;
  background:linear-gradient(140deg,#5b50e6,#7c3aed);box-shadow:var(--sh-sm);overflow:hidden;}
.had-img::after{content:"";position:absolute;inset:0;background:radial-gradient(60% 60% at 30% 25%,rgba(255,255,255,.25),transparent 60%);}
.had-pin{position:absolute;left:62%;top:46%;transform:translate(-50%,-50%);width:26px;height:26px;border-radius:50%;background:var(--brand-600);color:#fff;font-weight:700;font-size:13px;display:flex;align-items:center;justify-content:center;border:2px solid #fff;box-shadow:0 2px 8px rgba(0,0,0,.4);z-index:1;}
.had-note{flex:1;min-width:170px;border:1px solid var(--border);border-radius:12px;padding:11px 13px;background:var(--surface-2);}
.had-note .nb{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:650;color:var(--brand-600);background:var(--brand-soft);border-radius:99px;padding:2px 9px;}

/* dark hero text already white; ensure search readable */
[data-theme="dark"] .help-feature{background-image:radial-gradient(110% 140% at 0% 0%,var(--brand-soft),transparent 50%);}

/* ---- client help dialog (compact, branded) ---- */
.chelp-hero{position:relative;overflow:hidden;border-radius:var(--r-lg);padding:20px 22px;margin-bottom:18px;
  background:linear-gradient(135deg,#5b50e6,#463bc7 70%,#3a2da0);color:#fff;}
.chelp-hero::before{content:"";position:absolute;inset:0;background:radial-gradient(70% 120% at 100% 0%,rgba(255,255,255,.22),transparent 55%);}
.chelp-hero>*{position:relative;z-index:1;}
.chelp-hero h3{color:#fff;font-size:18px;}
.chelp-hero p{color:rgba(255,255,255,.85);font-size:13px;margin-top:5px;line-height:1.5;}
.chelp-area{margin-bottom:14px;}
.chelp-area-head{display:flex;align-items:center;gap:9px;margin-bottom:7px;font-weight:650;font-size:13.5px;}
.chelp-area-head .help-ic{width:30px;height:30px;border-radius:9px;}
.chelp-area-head .help-ic svg{width:16px;height:16px;}

/* help responsiveness - soften the hero + tighten cards on small screens */
@media (max-width:640px){
  .help-hero{padding:28px 22px 26px;border-radius:var(--r-xl);}
  .help-hero h1{font-size:26px;}
  .he-sub{font-size:14px;}
  .he-search{margin-top:18px;}
  .help-feature{padding:18px 18px 20px;}
  .help-chips{gap:10px 14px;}
  .help-grid{grid-template-columns:1fr;gap:12px;}
  .help-section-head{padding:13px 16px;}
  .help-section-body{padding:2px 16px 6px;}
}

/* ============================================ POST COMPOSER (new / edit post) */
.composer .dialog-body{padding:0;max-height:74vh;}
/* Inline annotation composer - a soft brand ring (like a focused input) instead of a hard blue border. */
.an-composer{border-color:var(--brand);box-shadow:0 0 0 3.5px var(--ring);}
.cmp-sec{padding:18px 22px;border-bottom:1px solid var(--border);}
.cmp-sec:last-child{border-bottom:0;}
.cmp-sec .field:last-child{margin-bottom:0;}
.cmp-head{font-size:11px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);margin-bottom:12px;display:flex;align-items:center;gap:8px;}
.cmp-lbl{display:flex;align-items:center;justify-content:space-between;gap:8px;}
.cmp-hint{font-size:11px;font-weight:500;color:var(--faint);text-transform:none;letter-spacing:0;}
.cmp-count{font-size:11.5px;font-weight:600;color:var(--muted);font-variant-numeric:tabular-nums;}
.cmp-count.over{color:var(--danger);}
.cmp-title{font-size:16px;font-weight:600;}
.cmp-media{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px;}
.cmp-media:empty{display:none;}
.cmp-brief{margin-top:4px;border:1px solid var(--border);border-radius:var(--r-sm);background:var(--surface-2);}
.cmp-brief>summary{list-style:none;cursor:pointer;padding:10px 12px;font-size:13px;font-weight:550;color:var(--text-2);display:flex;align-items:center;gap:8px;}
.cmp-brief>summary::-webkit-details-marker{display:none;}
.cmp-brief[open]>summary{border-bottom:1px solid var(--border);}
.cmp-brief>.field{margin:12px;}

/* footer: live status (left) + explicit actions (right) */
.cmp-foot{align-items:center;}
.cmp-foot-l{display:flex;align-items:center;gap:10px;min-width:0;}
.cmp-foot-r{display:flex;align-items:center;gap:8px;}
.cmp-stat{display:inline-flex;align-items:center;gap:7px;font-size:13px;font-weight:600;color:var(--text-2);}
.cmp-stat .dot{width:9px;height:9px;border-radius:50%;background:var(--muted);}
.cmp-stat.idea .dot{background:var(--st-idea);}
.cmp-stat.creative .dot{background:var(--st-creative);}
.cmp-stat.scheduled .dot{background:var(--st-scheduled);}
.cmp-stat.published .dot{background:var(--st-published);}
.cmp-auto{font-size:10px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--faint);border:1px solid var(--border);border-radius:var(--r-full);padding:1px 6px;}
.cmp-statwrap{display:inline-flex;align-items:center;gap:7px;font-size:12.5px;font-weight:550;color:var(--text-2);white-space:nowrap;}
.cmp-statwrap .select{width:auto;height:34px;padding-right:30px;}
.cmp-more{position:relative;}
.cmp-morebtn{padding:0 8px;}
.cmp-more .menu{min-width:200px;top:auto;bottom:calc(100% + 8px);}

/* rich-text editor (long-form Body) - shared render styles power the previews too */
.rte{border:1px solid var(--border-strong);border-radius:var(--r-sm);background:var(--surface);overflow:hidden;}
.rte:focus-within{border-color:var(--brand);box-shadow:0 0 0 3.5px var(--ring);}
.rte-bar{display:flex;flex-wrap:wrap;align-items:center;gap:2px;padding:6px;border-bottom:1px solid var(--border);background:var(--surface-2);}
.rte-b{display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:30px;padding:0 7px;border:0;background:transparent;color:var(--text-2);border-radius:var(--r-xs);cursor:pointer;font-size:13px;font-weight:650;transition:background .14s,color .14s;}
.rte-b:hover{background:var(--surface-3);color:var(--text);}
.rte-b svg{width:15px;height:15px;}
.rte-b i,.rte-b b{font-size:14px;line-height:1;}
.rte-sep{width:1px;height:18px;background:var(--border-strong);margin:0 4px;}
.rte-area{padding:14px 16px;min-height:200px;max-height:42vh;overflow:auto;outline:none;}
.rte-area:empty::before{content:attr(data-ph);color:var(--faint);}
.rte-media{position:relative;}
.rte-up{display:flex;align-items:center;justify-content:center;gap:8px;height:160px;background:var(--surface-2);border:1px dashed var(--border-strong);border-radius:var(--r-sm);color:var(--muted);font-size:13px;font-weight:550;}

/* long-form rendered content (editor area + #2/#3 preview body) */
.rte-area,.lf-body{color:var(--text);line-height:1.62;font-size:14.5px;}
.lf-body{white-space:normal;}
.rte-area h2,.lf-body h2{font-size:21px;font-weight:680;letter-spacing:-.02em;margin:18px 0 8px;}
.rte-area h3,.lf-body h3{font-size:17px;font-weight:650;margin:16px 0 6px;}
.rte-area p,.lf-body p,.rte-area>div,.lf-body>div{margin:0 0 10px;}
.rte-area ul,.rte-area ol,.lf-body ul,.lf-body ol{margin:0 0 10px;padding-left:22px;}
.rte-area li,.lf-body li{margin:2px 0;}
.rte-area blockquote,.lf-body blockquote{margin:10px 0;padding:4px 0 4px 16px;border-left:3px solid var(--brand);color:var(--text-2);font-style:italic;}
.rte-area a,.lf-body a{color:var(--brand-600);text-decoration:underline;}
.rte-area hr,.lf-body hr{border:0;border-top:1px solid var(--border-strong);margin:18px 0;}
.rte-area figure,.lf-body figure{margin:14px 0;}
.rte-area figure img,.rte-area figure mux-player,.lf-body figure img,.lf-body figure mux-player{width:100%;border-radius:var(--r-sm);overflow:hidden;display:block;}
.rte-area figcaption,.lf-body figcaption{font-size:12px;color:var(--muted);text-align:center;margin-top:6px;}
.lf-title{font-size:20px;font-weight:680;letter-spacing:-.02em;line-height:1.25;margin-bottom:10px;}

/* ====================================== SHARED POST-LIKE CARD (.ppc) + PREVIEW POPUPS */
/* platform identity = a soft colored shadow behind the whole card (not a top border) */
.ppc{position:relative;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);overflow:hidden;box-shadow:0 10px 34px -12px color-mix(in srgb, var(--ppc-accent, var(--brand)) 50%, transparent), 0 3px 10px -4px color-mix(in srgb, var(--ppc-accent, var(--brand)) 30%, transparent);transition:box-shadow .25s var(--ease);}
.ppc-head{display:flex;align-items:center;gap:10px;padding:13px 14px 11px;}
.ppc-av{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:50%;color:#fff;font-weight:700;font-size:15px;flex-shrink:0;letter-spacing:-.02em;}
.ppc-id{min-width:0;}
.ppc-name{font-weight:650;font-size:14px;line-height:1.2;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.ppc-meta{display:flex;align-items:center;gap:5px;font-size:12px;color:var(--muted);font-weight:500;margin-top:1px;}
.ppc-meta svg{flex-shrink:0;}
.ppc-dot{opacity:.55;}
.ppc-dests{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:0 14px 11px;}
.ppc-dests-l{font-size:10.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--faint);}
.ppc-chip{display:inline-flex;align-items:center;gap:5px;height:23px;padding:0 9px;border-radius:var(--r-full);background:var(--surface-2);border:1px solid var(--border);font-size:11.5px;font-weight:600;color:var(--text-2);}
/* media renders at the platform's real display aspect (set inline) with a crop (cover) */
.ppc-media{position:relative;width:100%;background:#0a0a12;overflow:hidden;}
.ppc-media img,.ppc-media>video,.ppc-media .ppc-mp{display:block;width:100%;height:100%;object-fit:cover;--media-object-fit:cover;}
/* "Full image" view: drop the crop, show the whole asset at natural ratio */
.ppc-media.full{aspect-ratio:auto !important;display:flex;align-items:center;justify-content:center;}
.ppc-media.full img,.ppc-media.full>video,.ppc-media.full .ppc-mp{height:auto;max-height:70vh;object-fit:contain;--media-object-fit:contain;}
.ppc-nomedia{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:var(--faint);font-size:13px;font-weight:500;background:var(--surface-2);}
/* safe-zone overlay (9:16): dashed safe rectangle, everything outside dimmed */
.ppc-safe{position:absolute;border:1.5px dashed rgba(255,255,255,.92);box-shadow:0 0 0 9999px rgba(0,0,0,.34);pointer-events:none;z-index:2;border-radius:3px;}
.ppc-safe-l{position:absolute;top:4px;left:6px;font-size:9px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:rgba(255,255,255,.92);text-shadow:0 1px 2px rgba(0,0,0,.7);}
/* in-frame media controls (full/crop + safe toggle) */
/* view controls below the media frame, out of the player's control area */
.ppc-tools{display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--surface-2);border-bottom:1px solid var(--border);}
.ppc-tool{display:inline-flex;align-items:center;gap:5px;height:27px;padding:0 10px;border:1px solid var(--border);border-radius:var(--r-full);background:var(--surface);color:var(--text-2);font-size:11.5px;font-weight:600;cursor:pointer;transition:background .14s,border-color .14s,color .14s;}
.ppc-tool:hover{border-color:var(--border-strong);color:var(--text);}
.ppc-tool.on{background:var(--brand-soft);border-color:transparent;color:var(--brand);}
.ppc-tool svg{width:14px;height:14px;}
.ppc-tool-sp{flex:1;}
.ppc-ratio{font-size:11px;font-weight:700;color:var(--faint);font-variant-numeric:tabular-nums;letter-spacing:.02em;}
/* cross-post platform switcher */
.ppc-switch{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:0 14px 11px;}
.ppc-sw{display:inline-flex;align-items:center;gap:5px;height:26px;padding:0 10px;border-radius:var(--r-full);background:var(--surface-2);border:1px solid var(--border);font-size:11.5px;font-weight:600;color:var(--text-2);cursor:pointer;transition:background .14s,border-color .14s,color .14s;}
.ppc-sw:hover{border-color:var(--border-strong);}
.ppc-sw.on{background:var(--brand-soft);border-color:transparent;color:var(--brand);}
/* caption "…more" fold */
.ppc-more{border:0;background:none;color:var(--muted);font-weight:600;font-size:inherit;cursor:pointer;padding:0;}
.ppc-more:hover{color:var(--text-2);}
.ppc-nav{position:absolute;top:50%;transform:translateY(-50%);width:30px;height:30px;border-radius:50%;border:0;background:rgba(0,0,0,.5);color:#fff;cursor:pointer;font-size:17px;line-height:1;display:flex;align-items:center;justify-content:center;backdrop-filter:blur(4px);}
.ppc-nav.l{left:8px;}.ppc-nav.r{right:8px;}
.ppc-nav:hover{background:rgba(0,0,0,.72);}
.ppc-count{position:absolute;bottom:8px;left:50%;transform:translateX(-50%);font-size:11.5px;font-weight:600;background:rgba(0,0,0,.55);color:#fff;padding:2px 9px;border-radius:var(--r-full);backdrop-filter:blur(4px);}
/* download: just the icon, no circle behind it */
.ppc-dl{position:absolute;top:8px;right:10px;z-index:3;display:flex;align-items:center;justify-content:center;width:28px;height:28px;color:#fff;filter:drop-shadow(0 1px 3px rgba(0,0,0,.8));transition:opacity .15s;}
/* enlarge small media controls to a comfortable touch size on touch devices (desktop unchanged) */
@media (hover:none){.ppc-nav{width:40px;height:40px;}.gnav{width:40px;height:40px;}.mtile-x{width:26px;height:26px;font-size:15px;}.ppc-dl{width:36px;height:36px;}}
.ppc-dl:hover{opacity:.8;}
.ppc-dl svg{width:20px;height:20px;}
.ppc-body{padding:11px 14px 14px;}
.ppc-actions{display:flex;align-items:center;gap:14px;color:var(--text);margin-bottom:9px;}
.ppc-actions svg{width:22px;height:22px;}
.ppc-actions .ppc-spacer{flex:1;}
.ppc-caption{font-size:13.5px;line-height:1.55;white-space:pre-wrap;}
.ppc-tags{margin-top:6px;color:var(--brand-600);font-size:13px;font-weight:500;}
.ppc-idea{padding:18px 16px;}
.ppc-idea-tag{display:inline-flex;align-items:center;gap:6px;font-size:10.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--st-idea);margin-bottom:10px;}
.ppc-idea-tag svg{width:14px;height:14px;}
.ppc-idea-text{font-size:14.5px;line-height:1.62;white-space:pre-wrap;color:var(--text);}
.ppc-lf{padding:16px;}

/* the two preview popups share .pv */
.pv-head{justify-content:space-between;align-items:flex-start;gap:10px;}
.pv-head-main{display:flex;flex-direction:column;gap:8px;min-width:0;flex:1;}
.pv-head-l{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap;}
.pv-when{font-weight:650;font-size:14px;letter-spacing:-.01em;white-space:nowrap;}
.pv-lock{display:flex;align-items:center;gap:8px;padding:9px 22px;background:var(--warning-soft);color:var(--warning);font-size:13px;font-weight:550;}
.pv-grid{display:grid;grid-template-columns:1.05fr 1fr;align-items:stretch;}
.pv-cardwrap{padding:24px;background:var(--surface-2);display:flex;align-items:flex-start;justify-content:center;border-right:1px solid var(--border);max-height:70vh;overflow:auto;}
.pv-cardwrap .ppc{width:100%;max-width:420px;}
.pv-side{display:flex;flex-direction:column;min-width:0;max-height:70vh;}
.pv-side-top{padding:15px 18px;border-bottom:1px solid var(--border);}
.pv-status{display:flex;gap:10px;flex-wrap:wrap;}
.pv-ctl{display:flex;flex-direction:column;gap:5px;flex:1;min-width:128px;font-size:10.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);}
.pv-ctl .select{height:36px;text-transform:none;letter-spacing:0;font-weight:500;}
.pv-internal{margin-top:12px;border:1px solid var(--border);border-radius:var(--r-sm);background:var(--surface-2);}
.pv-internal>summary{list-style:none;cursor:pointer;padding:9px 11px;font-size:12.5px;font-weight:550;color:var(--text-2);display:flex;align-items:center;gap:7px;}
.pv-internal>summary::-webkit-details-marker{display:none;}
.pv-internal-body{padding:2px 11px 11px;display:flex;flex-direction:column;gap:12px;}
.pv-tabs{padding:0 18px;flex-shrink:0;}
.pv-panel{flex:1;overflow:auto;padding:16px 18px;}

@media (max-width:760px){
  .pv-grid{grid-template-columns:1fr;}
  .pv-cardwrap{border-right:0;border-bottom:1px solid var(--border);max-height:none;}
  .pv-side{max-height:none;}
  .pv-cardwrap .ppc{max-width:100%;}
  .pv-panel{max-height:46vh;}
}

/* composer as a comfortable bottom sheet on mobile */
@media (max-width:900px){
  .composer .dialog-body{max-height:none;}
  .cmp-sec{padding:16px;}
  .cmp-foot{flex-wrap:wrap;gap:10px;}
  .cmp-foot-l{order:2;width:100%;}
  .cmp-foot-r{order:1;width:100%;}
  .cmp-foot-r .btn{flex:1;}
  .cmp-more{flex:0 0 auto;}
  .cmp-more .btn{flex:0;}
  .rte-area{max-height:50vh;}
}

.act-row[data-href]:hover{background:var(--surface-2);}

/* Thread composer (X / Threads) */
.thread-part{position:relative;padding-left:24px;margin-bottom:10px;}
.thread-part::before{content:"";position:absolute;left:10px;top:22px;bottom:-10px;width:2px;background:var(--border);}
.thread-part:last-child::before{display:none;}
.thread-part-head{display:flex;align-items:center;justify-content:space-between;min-height:20px;}
.thread-num{position:absolute;left:0;top:0;width:21px;height:21px;border-radius:50%;background:var(--brand-soft);color:var(--brand);font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;}
.thread-part .thread-ta{margin-top:2px;}
.thread-count{text-align:right;}

/* Post-popup title */
.pv-title{font-size:16px;font-weight:650;line-height:1.3;}

/* Live search palette (centered, blurred backdrop) */
.search-ov{position:fixed;inset:0;z-index:200;display:flex;align-items:flex-start;justify-content:center;padding:12vh 16px 16px;background:rgba(0,0,0,.4);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);animation:fadeIn .12s ease;}
.search-box{width:min(640px,94vw);background:var(--surface);border:1px solid var(--border);border-radius:var(--r);box-shadow:0 24px 64px rgba(0,0,0,.35);overflow:hidden;max-height:74vh;display:flex;flex-direction:column;}
.search-inp{display:flex;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid var(--border);}
.search-inp>svg{color:var(--muted);flex-shrink:0;}
.search-inp input{flex:1;border:0;background:transparent;font-size:16px;color:var(--text);outline:none;}
.search-esc{font-size:11px;color:var(--muted);border:1px solid var(--border);border-radius:5px;padding:1px 6px;flex-shrink:0;}
.search-results{overflow:auto;padding:6px;}
.search-hint{padding:28px;text-align:center;color:var(--muted);font-size:13px;}
.search-grp{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--faint);padding:10px 10px 4px;}
.search-row{display:flex;align-items:center;gap:11px;padding:8px 10px;border-radius:var(--r-sm);cursor:pointer;}
.search-row:hover{background:var(--surface-2);}
.search-thumb{width:40px;height:40px;border-radius:8px;object-fit:cover;background:var(--surface-2);flex:0 0 auto;}
.search-thumb.ph{display:flex;align-items:center;justify-content:center;color:var(--muted);}
.search-row-main{min-width:0;flex:1;}
.search-row-title{font-size:13.5px;font-weight:550;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;gap:6px;}
.search-pi{display:inline-flex;flex-shrink:0;}
.search-row-meta{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.search-row .badge{flex:0 0 auto;}
