/* ==========================================================================
   Omnipilot Social — same design system as omnipilot.in
   Brand: Pilot Orange on ink. Display: Space Grotesk. UI text: Inter.
   ========================================================================== */
@font-face { font-family: "Inter"; src: url("inter-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("space-grotesk-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("space-grotesk-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  --r-xs: 6px; --r-sm: 8px; --r: 10px; --r-lg: 14px; --r-xl: 20px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --sidebar-w: 250px; --topbar-h: 62px;
  --bg: #0e1013; --bg-2: #121519;
  --surface: #16191e; --surface-2: #1c2026; --surface-3: #262b33;
  --border: rgba(255, 255, 255, .08); --border-strong: rgba(255, 255, 255, .15);
  --text: #f4f2ee; --text-2: #a8adb5; --text-3: #8a9099;
  --brand: #ff6a33; --brand-hover: #ff7e4f; --brand-strong: #ff8a5c; --on-brand: #14161a;
  --brand-soft: rgba(255, 106, 51, .13); --brand-line: rgba(255, 106, 51, .38);
  --teal: #3fbfa8; --teal-soft: rgba(63, 191, 168, .13);
  --ok: #34d399; --ok-soft: rgba(52, 211, 153, .12);
  --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .12);
  --danger: #f87171; --danger-soft: rgba(248, 113, 113, .12);
  --info: #60a5fa; --info-soft: rgba(96, 165, 250, .12);
  --amber: #fbbf24; --amber-soft: rgba(251, 191, 36, .12);
  --rose: #fb7185; --rose-soft: rgba(251, 113, 133, .12);
  --violet: #a78bfa; --violet-soft: rgba(167, 139, 250, .12);
  --emerald: #34d399; --emerald-soft: rgba(52, 211, 153, .12);
  --muted-soft: rgba(255, 255, 255, .06);
  --ig: #e1306c; --fb: #1877f2;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, .55);
  --ring: 0 0 0 3px rgba(255, 106, 51, .35);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f6f5f2; --bg-2: #efede8;
  --surface: #ffffff; --surface-2: #f6f4f0; --surface-3: #ebe8e2;
  --border: rgba(20, 22, 26, .09); --border-strong: rgba(20, 22, 26, .17);
  --text: #14161a; --text-2: #50555d; --text-3: #6b7078;
  --brand: #ff5a1f; --brand-hover: #f04d12; --brand-strong: #c2410c; --on-brand: #14161a;
  --brand-soft: rgba(255, 90, 31, .10); --brand-line: rgba(255, 90, 31, .4);
  --teal: #0e7c6b; --teal-soft: rgba(14, 124, 107, .10);
  --ok: #047857; --ok-soft: rgba(4, 120, 87, .10);
  --warn: #b45309; --warn-soft: rgba(217, 119, 6, .12);
  --danger: #dc2626; --danger-soft: rgba(220, 38, 38, .09);
  --info: #1d4ed8; --info-soft: rgba(37, 99, 235, .09);
  --amber: #b45309; --amber-soft: rgba(217, 119, 6, .11);
  --rose: #be123c; --rose-soft: rgba(225, 29, 72, .09);
  --violet: #6d28d9; --violet-soft: rgba(109, 40, 217, .09);
  --emerald: #047857; --emerald-soft: rgba(4, 120, 87, .10);
  --muted-soft: rgba(20, 22, 26, .05);
  --shadow-sm: 0 1px 2px rgba(20, 22, 26, .06);
  --shadow: 0 10px 30px rgba(20, 22, 26, .07);
  --shadow-lg: 0 24px 64px rgba(20, 22, 26, .16);
  --ring: 0 0 0 3px rgba(255, 90, 31, .3);
  color-scheme: light;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14.5px/1.55 var(--font); -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: var(--brand-strong); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
p { margin: 0; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
::selection { background: var(--brand); color: var(--on-brand); }
[hidden] { display: none !important; }
.ic { flex-shrink: 0; display: inline-block; vertical-align: -2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }
.mono { font-family: var(--mono); font-size: .92em; overflow-wrap: anywhere; }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.hl { color: var(--brand); }
.text-danger { color: var(--danger) !important; }
.up { color: var(--ok); font-weight: 600; } .down { color: var(--danger); font-weight: 600; }

/* ---------------------------------------------------------------- logo */
.logo-mark { color: var(--text); flex-shrink: 0; }
.logo-mark .lm-arrow { fill: var(--brand); }
.btn-primary .logo-mark { color: var(--on-brand); }
.btn-primary .logo-mark .lm-arrow { fill: var(--on-brand); }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark { display: grid; place-items: center; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: -.03em; line-height: 1; color: var(--text); }
.brand-sub { font-size: 11.5px; color: var(--text-3); margin-top: 4px; white-space: nowrap; }

/* ---------------------------------------------------------------- app layout */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--bg-2); border-right: 1px solid var(--border); padding: 18px 12px; overflow: hidden auto; z-index: 40; }
.sidebar-brand { padding: 4px 8px 16px; }
.sidebar-brand:hover { text-decoration: none; }
.side-cta { margin: 0 4px 6px; width: auto; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); padding: 16px 12px 6px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: var(--r); color: var(--text-2); font-weight: 500; white-space: nowrap; transition: background .15s, color .15s; }
.nav-item:hover { background: var(--muted-soft); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--brand-soft); color: var(--text); }
.nav-item.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav-item.active .nav-ic { color: var(--brand); }
.nav-item.is-soon { opacity: .5; cursor: default; padding-top: 6px; padding-bottom: 6px; }
.nav-item.is-soon:hover { background: none; color: var(--text-2); }
.nav-tag { margin-left: auto; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--muted-soft); color: var(--text-3); }
.nav-tag.hot { background: var(--brand); color: var(--on-brand); }
.nav-ic { display: grid; place-items: center; flex-shrink: 0; }
.nav-text { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.side-foot { padding: 12px 4px 0; }
.secure-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.secure-chip:hover { color: var(--text); text-decoration: none; border-color: var(--border-strong); }
.scrim { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.topbar [data-toggle-sidebar] { display: none; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-3); min-width: 0; overflow: hidden; white-space: nowrap; }
.crumbs a { color: var(--text-2); }
.crumb-cur { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--r); border: 1px solid transparent; background: none; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--muted-soft); color: var(--text); }
.theme-toggle .ic-sun { display: none; }
[data-theme="light"] .theme-toggle .ic-sun { display: block; }
[data-theme="light"] .theme-toggle .ic-moon { display: none; }
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 4px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text-2); }
.user-btn:hover { border-color: var(--border-strong); }
.u-name { font-weight: 600; font-size: 13.5px; color: var(--text); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); font: 700 12px var(--display); }
.avatar.sm { width: 24px; height: 24px; font-size: 11px; }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; padding: 6px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .16s var(--ease); z-index: 50; }
.dropdown.open { opacity: 1; visibility: visible; transform: none; }
.dropdown-head { padding: 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.dropdown a, .dropdown .dd-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: var(--r-sm); color: var(--text-2); background: none; border: 0; cursor: pointer; text-align: left; font-size: 14px; }
.dropdown a:hover, .dropdown .dd-item:hover { background: var(--muted-soft); color: var(--text); text-decoration: none; }
.dropdown .dd-danger:hover { background: var(--danger-soft); color: var(--danger); }
.content { flex: 1; padding: 28px 28px 40px; max-width: 1440px; width: 100%; margin: 0 auto; }
.footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 28px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-3); }

/* ---------------------------------------------------------------- page head */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 30px; }
.page-head p { color: var(--text-2); margin-top: 6px; max-width: 640px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-strong); margin-bottom: 8px; }

/* ---------------------------------------------------------------- cards & grid */
.card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 15px 20px; border-bottom: 1px solid var(--border); }
.card-head h3 { display: flex; align-items: center; gap: 9px; font-size: 15.5px; }
.card-head .sub { font-size: 12.5px; color: var(--text-3); }
.card-body { padding: 18px 20px; }
a.card { color: inherit; display: block; }
.card.hoverable { transition: border-color .2s, transform .2s var(--ease), box-shadow .2s; }
.card.hoverable:hover { border-color: var(--brand-line); transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.card-glow { border-color: var(--brand-line); background: linear-gradient(180deg, var(--brand-soft), transparent 140px), var(--surface); }
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.g-compose { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
.g-engage { grid-template-columns: 340px minmax(0, 1fr); align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.items-start { align-items: flex-start; }
.flex-1 { flex: 1; min-width: 0; }
.ml-auto { margin-left: auto; }
.w-auto { width: auto; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 30px 32px; margin-bottom: 18px; background: #14161a; color: #f4f2ee; border: 1px solid rgba(255, 255, 255, .06); }
.hero-inner { position: relative; z-index: 1; max-width: 660px; }
.hero h1 { font-size: 32px; color: #f4f2ee; }
.hero p { color: #b5bac2; margin-top: 8px; font-size: 15.5px; }
.hero .eyebrow { color: #ff8a5c; }
.hero .hl { color: #ff6a33; font-weight: 600; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hero .chip { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .1); color: #d6d9de; }
.hero .chip.ok { color: #6ee7b7; } .hero .chip.warn { color: #fcd34d; }
.hero .hero-btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); color: #f4f2ee; }
.hero-orb { position: absolute; right: -80px; top: -90px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(255, 106, 51, .55), rgba(255, 106, 51, .08) 55%, transparent 70%); filter: blur(4px); }
.hero-orb::after { content: ""; position: absolute; inset: 70px; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, .18); animation: spin 40s linear infinite; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 500; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.chip.ok { color: var(--ok); } .chip.warn { color: var(--warn); }

/* ---------------------------------------------------------------- KPIs & tones */
.kpi { padding: 18px 20px; overflow: hidden; }
.kpi::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--tone, var(--brand)); opacity: .85; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.kpi-value { font: 700 30px/1.15 var(--display); letter-spacing: -.03em; margin-top: 10px; font-variant-numeric: tabular-nums; }
.kpi-foot { font-size: 12.5px; color: var(--text-3); margin-top: 6px; }
.chip-ic { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border-radius: var(--r); background: var(--tone-soft, var(--brand-soft)); color: var(--tone, var(--brand)); }
.chip-ic.sm { width: 30px; height: 30px; border-radius: var(--r-sm); }
.tone-brand { --tone: var(--brand); --tone-soft: var(--brand-soft); }
.tone-teal { --tone: var(--teal); --tone-soft: var(--teal-soft); }
.tone-emerald { --tone: var(--emerald); --tone-soft: var(--emerald-soft); }
.tone-amber { --tone: var(--amber); --tone-soft: var(--amber-soft); }
.tone-rose { --tone: var(--rose); --tone-soft: var(--rose-soft); }
.tone-violet { --tone: var(--violet); --tone-soft: var(--violet-soft); }
.tone-danger { --tone: var(--danger); --tone-soft: var(--danger-soft); }
.tone-info { --tone: var(--info); --tone-soft: var(--info-soft); }
.tone-muted { --tone: var(--text-3); --tone-soft: var(--muted-soft); }

/* ---------------------------------------------------------------- buttons */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: var(--r); border: 1px solid transparent; font-weight: 600; font-size: 14px; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .1s; user-select: none; color: var(--text); background: none; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-loading, .is-disabled-btn { pointer-events: none; opacity: .55; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-secondary { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { background: var(--surface-3); }
.btn-ghost { background: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--muted-soft); color: var(--text); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: var(--r-sm); }
.btn-lg { height: 48px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: 32px; padding: 0; }
.btn.is-loading::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.btn.is-loading > * { opacity: .25; }
@keyframes spin { to { transform: rotate(360deg); } }
form { margin: 0; }

/* ---------------------------------------------------------------- forms */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 16px 20px; border-top: 1px solid var(--border); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lbl { font-size: 13px; font-weight: 600; color: var(--text-2); gap: 6px; }
.req { color: var(--brand); }
.field-input, .select, .input { width: 100%; height: 40px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--border-strong); background: var(--bg-2); color: var(--text); transition: border-color .15s, box-shadow .15s; }
textarea.field-input { height: auto; padding: 10px 12px; resize: vertical; min-height: 60px; line-height: 1.55; }
.field-input:focus, .select:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.field-input::placeholder { color: var(--text-3); }
.select { appearance: none; padding-right: 34px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a9099' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.select option { background: var(--surface); color: var(--text); }
.select-sm { height: 34px; font-size: 13px; }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.check input { appearance: none; width: 18px; height: 18px; flex-shrink: 0; margin: 0; border-radius: 5px; border: 1.5px solid var(--border-strong); background: var(--bg-2); display: grid; place-items: center; cursor: pointer; }
.check input:checked { background: var(--brand); border-color: var(--brand); }
.check input:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--on-brand); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
input[type="datetime-local"], input[type="time"] { color-scheme: inherit; }

/* ---------------------------------------------------------------- tables */
.table-wrap { position: relative; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:hover { background: var(--muted-soft); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num, .num { text-align: right; font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.center .check { justify-content: center; }
.cell-sub { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); margin-top: 3px; }
.trunc-cell { overflow-wrap: anywhere; }
.slot-table td { padding: 8px 10px; } .slot-time { width: 130px; height: 36px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.pages { display: flex; gap: 4px; }
.pages a { min-width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--text-2); }
.pages a:hover { background: var(--muted-soft); }

/* ---------------------------------------------------------------- badges, tabs */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--muted-soft); color: var(--text-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.nodot::before { display: none; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.brand { background: var(--brand-soft); color: var(--brand-strong); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); width: fit-content; max-width: 100%; }
.tabs a, .tabs button { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border: 0; border-radius: var(--r); background: none; color: var(--text-2); font-weight: 600; font-size: 13.5px; cursor: pointer; }
.tabs a:hover, .tabs button:hover { color: var(--text); text-decoration: none; background: var(--muted-soft); }
.tabs .active, .tabs .active:hover { background: var(--brand); color: var(--on-brand); }
.tabs-sm a, .tabs-sm button { height: 28px; padding: 0 10px; font-size: 12.5px; }
.seg-n { font-size: 11.5px; opacity: .75; font-weight: 700; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg a { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--text-2); border: 1px solid var(--border); }
.seg a:hover { text-decoration: none; border-color: var(--border-strong); color: var(--text); }
.seg a.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600; color: var(--text-2); border: 1px solid var(--border); cursor: pointer; }
.seg-opt input:checked + span { background: var(--text); color: var(--bg); border-color: var(--text); }
.seg-opt input:focus-visible + span { box-shadow: var(--ring); }
.seg-opt input:disabled + span { opacity: .6; cursor: default; }

/* ---------------------------------------------------------------- alerts, empty, misc */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); font-size: 13.5px; border: 1px solid; }
.alert .ic { margin-top: 2px; }
.alert a { color: inherit; font-weight: 600; text-decoration: underline; }
.alert.info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.alert.warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.alert.danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.alert.ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.empty { text-align: center; padding: 44px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty h3 { font-size: 18px; }
.empty p { color: var(--text-2); max-width: 440px; margin-bottom: 8px; }
.e-ic { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 4px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; text-align: right; font-weight: 600; }
.copy-box { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border); font-size: 13.5px; }
.copy-box > span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.copy-box .btn { flex-shrink: 0; }
.ml-main { display: flex; flex-direction: column; min-width: 0; }
details summary { cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details.row-edit { position: relative; }
.popover { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 300px; padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); }
.timeline { display: flex; flex-direction: column; }
.tl-item { position: relative; display: flex; gap: 12px; padding-bottom: 14px; }
.tl-item:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 1px; background: var(--border); }
.tl-dot { width: 27px; height: 27px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.tl-dot.warn { background: var(--warn-soft); color: var(--warn); }
.tl-dot.danger { background: var(--danger-soft); color: var(--danger); }
.tl-body { padding-top: 3px; min-width: 0; }
.tl-title { font-size: 13px; overflow-wrap: anywhere; }
.tl-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.roadmap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; border-radius: var(--r-lg); border: 1px dashed var(--border-strong); }
.roadmap-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-3); margin-right: 2px; }
.roadmap-item { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 99px; background: var(--surface-2); font-size: 12px; color: var(--text-2); }
.bar-list { display: flex; flex-direction: column; gap: 14px; }
.bar-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.bar-meta strong { color: var(--text); font-weight: 600; font-size: 12.5px; }
.bar { height: 7px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 14px; } .mt-3 { margin-top: 20px; }
.mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 16px; }
.fs-sm { font-size: 12.5px; } .fs-lg { font-size: 16px; } .fw-6 { font-weight: 600; }

/* ---------------------------------------------------------------- channel avatars */
.ch-av { position: relative; width: var(--s, 36px); height: var(--s, 36px); flex-shrink: 0; border-radius: 50%; background: var(--tone-soft); color: var(--tone); display: grid; place-items: center; }
.ch-av.s32 { --s: 32px; } .ch-av.s34 { --s: 34px; } .ch-av.s40 { --s: 40px; } .ch-av.s46 { --s: 46px; }
.ch-av > img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.ch-initial { font: 700 calc(var(--s, 36px) * .42) var(--display); }
.ch-badge { position: absolute; right: -3px; bottom: -3px; display: grid; place-items: center; padding: 2px; border-radius: 50%; background: var(--surface); color: var(--text-2); box-shadow: 0 0 0 2px var(--surface); }
.ch-badge.pf-instagram { color: #fff; background: linear-gradient(45deg, #f58529, #dd2a7b 55%, #8134af); }
.ch-badge.pf-facebook { color: #fff; background: var(--fb); }
.ch-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.ch-list li { display: flex; align-items: center; gap: 11px; }
.ch-list .ml-main { flex: 1; }

/* ---------------------------------------------------------------- post rows (queue) */
.rows { display: flex; flex-direction: column; }
.post-row { display: grid; grid-template-columns: 78px 40px minmax(0, 1fr) auto; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--border); align-items: start; }
.post-row:last-child { border-bottom: 0; }
.post-row:hover { background: color-mix(in srgb, var(--muted-soft) 60%, transparent); }
.pr-time { display: flex; flex-direction: column; padding-top: 6px; font-variant-numeric: tabular-nums; }
.pr-time strong { font-size: 14px; }
.pr-time span { font-size: 12px; color: var(--text-3); }
.pr-head { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.pr-caption { margin-top: 6px; color: var(--text-2); font-size: 13.5px; overflow-wrap: anywhere; white-space: pre-line; }
.pr-error, .pr-note { display: flex; gap: 6px; align-items: flex-start; margin-top: 8px; font-size: 12.5px; color: var(--danger); overflow-wrap: anywhere; }
.pr-note { color: var(--warn); }
.pr-error .ic, .pr-note .ic { margin-top: 2px; }
.pr-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; color: var(--text-2); }
.pr-stats span { display: inline-flex; align-items: center; gap: 5px; }
.pr-actions { display: flex; gap: 2px; flex-wrap: wrap; margin-top: 8px; margin-left: -10px; }
.pr-thumb { position: relative; width: 76px; height: 76px; border-radius: var(--r); overflow: hidden; background: var(--surface-3); flex-shrink: 0; }
.pr-thumb img, .pr-thumb video { width: 100%; height: 100%; object-fit: cover; }
.pr-play { position: absolute; right: 5px; bottom: 5px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: rgba(0, 0, 0, .6); color: #fff; }
.post-row.status-failed { box-shadow: inset 3px 0 0 var(--danger); }
.post-row.status-due { box-shadow: inset 3px 0 0 var(--brand); }
.day-head { display: flex; align-items: baseline; gap: 10px; padding: 12px 20px 10px; background: var(--surface-2); border-bottom: 1px solid var(--border); font: 700 14px var(--display); }
.day-head .subtle { font: 400 12.5px var(--font); }
.card > .day-head:first-child { border-radius: var(--r-lg) var(--r-lg) 0 0; }

/* ---------------------------------------------------------------- composer */
.ch-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ch-pick { position: relative; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--r-lg); border: 1.5px solid var(--border); background: var(--bg-2); cursor: pointer; transition: border-color .15s, background .15s; }
.ch-pick:hover { border-color: var(--border-strong); }
.ch-pick > input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.ch-pick-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ch-pick-text > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-pick-check { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; color: transparent; flex-shrink: 0; }
.ch-pick:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.ch-pick:has(input:checked) .ch-pick-check { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.ch-pick:has(input:focus-visible) { box-shadow: var(--ring); }
.ch-pick.is-disabled { opacity: .5; cursor: not-allowed; }
.type-seg { gap: 6px; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 26px 18px; border-radius: var(--r-lg); border: 2px dashed var(--border-strong); background: var(--surface-2); cursor: pointer; transition: .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-soft); }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dz-ic { width: 46px; height: 46px; border-radius: var(--r-lg); display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 6px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.media-grid:empty { display: none; }
.m-item { position: relative; aspect-ratio: 1; border-radius: var(--r); overflow: hidden; background: var(--surface-3); border: 1px solid var(--border); }
.m-item img, .m-item video { width: 100%; height: 100%; object-fit: cover; }
.m-item .m-n { position: absolute; left: 6px; top: 6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; background: rgba(0, 0, 0, .65); color: #fff; font-size: 11.5px; font-weight: 700; }
.m-item .m-tools { position: absolute; right: 4px; top: 4px; display: flex; gap: 3px; }
.m-item .m-tools button { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; border: 0; background: rgba(0, 0, 0, .65); color: #fff; cursor: pointer; }
.m-item .m-tools button:hover { background: rgba(0, 0, 0, .85); }
.m-item .m-meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 7px 5px; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); color: #fff; font-size: 11px; display: flex; justify-content: space-between; gap: 4px; }
.m-item.uploading::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.m-progress { position: absolute; left: 8px; right: 8px; bottom: 10px; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .25); overflow: hidden; z-index: 2; }
.m-progress i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.caption-input { min-height: 160px; }
.counters { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.counter { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--muted-soft); color: var(--text-3); }
.counter.over { background: var(--danger-soft); color: var(--danger); }
.hint-list { margin: 0; padding-left: 18px; }
.hint-list:empty { display: none; }
.hint-list li.bad { color: var(--danger); }
.publish-bar { position: sticky; bottom: 12px; z-index: 5; box-shadow: var(--shadow); }
.when-field { min-width: 230px; }
.publish-actions { justify-content: flex-end; }
.preview-col { position: sticky; top: calc(var(--topbar-h) + 16px); }
.preview { display: flex; flex-direction: column; gap: 10px; }
.pv { border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--bg-2); overflow: hidden; }
.pv-head { display: flex; align-items: center; gap: 9px; padding: 10px 12px; }
.pv-head .ml-main span:first-child { font-weight: 600; font-size: 13.5px; }
.pv-media { position: relative; background: #000; aspect-ratio: 4 / 5; display: grid; place-items: center; }
.pv-media.story, .pv-media.reel { aspect-ratio: 9 / 16; max-height: 520px; }
.pv-media img, .pv-media video { width: 100%; height: 100%; object-fit: cover; }
.pv-media .pv-empty { color: #8a9099; font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pv-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 4px; }
.pv-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .45); }
.pv-dots i:first-child { background: #fff; }
.pv-count { position: absolute; top: 10px; right: 10px; padding: 2px 8px; border-radius: 99px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11.5px; }
.pv-actions { display: flex; gap: 14px; padding: 10px 12px 4px; color: var(--text-2); }
.pv-text { padding: 4px 12px 12px; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pv-text b { margin-right: 6px; }
.pv-text .tag { color: var(--info); }
.pv-fb .pv-text { padding-top: 0; padding-bottom: 10px; }
.pv-fb .pv-media { aspect-ratio: auto; max-height: 520px; }
.pv-fb .pv-media img { height: auto; max-height: 520px; object-fit: contain; }
.pv-fb .pv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--bg-2); }
.pv-fb .pv-grid img { aspect-ratio: 1; object-fit: cover; }
.pv-comment { margin: 0 12px 12px; padding: 8px 10px; border-radius: var(--r); background: var(--surface-2); font-size: 12.5px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- calendar */
.cal-card { overflow: hidden; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head div { padding: 10px 12px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.cal-day { min-height: 118px; padding: 8px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.is-out { background: color-mix(in srgb, var(--bg-2) 60%, transparent); }
.cal-day.is-out .cal-num span { color: var(--text-3); opacity: .6; }
.cal-day.is-today .cal-num span { background: var(--brand); color: var(--on-brand); }
.cal-num { display: flex; align-items: center; justify-content: space-between; }
.cal-num span { min-width: 26px; height: 26px; display: grid; place-items: center; border-radius: 99px; font-weight: 600; font-size: 13px; }
.cal-add { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; color: var(--text-3); opacity: 0; transition: .15s; }
.cal-day:hover .cal-add { opacity: 1; }
.cal-add:hover { background: var(--brand-soft); color: var(--brand); }
.cal-chip { display: flex; align-items: center; gap: 5px; padding: 3px 6px; border-radius: 6px; font-size: 11.5px; color: var(--text); background: var(--surface-2); border-left: 3px solid var(--info); min-width: 0; }
.cal-chip:hover { text-decoration: none; background: var(--surface-3); }
.cc-time { font-weight: 700; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.cc-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.cal-chip.st-published { border-left-color: var(--ok); }
.cal-chip.st-failed { border-left-color: var(--danger); }
.cal-chip.st-processing { border-left-color: var(--warn); }
.cal-chip.st-due { border-left-color: var(--brand); }
.cal-more { font-size: 11.5px; color: var(--text-3); padding-left: 4px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 12px 16px; font-size: 12.5px; color: var(--text-2); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--info); }
.cal-legend i.st-published { background: var(--ok); } .cal-legend i.st-failed { background: var(--danger); }
.cal-legend i.st-processing { background: var(--warn); } .cal-legend i.st-due { background: var(--brand); }

/* ---------------------------------------------------------------- channels page */
.ch-card .kv { font-size: 13px; }
.slot-list { display: flex; flex-wrap: wrap; gap: 6px; }
.slot-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.slot-chip small { font-family: var(--mono); font-weight: 400; color: var(--text-3); letter-spacing: .05em; }
.soon-tile { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--r-lg); border: 1px dashed var(--border-strong); }
.soon-tile .badge { margin-left: auto; }

/* ---------------------------------------------------------------- insights & engage */
.chart { width: 100%; height: auto; display: block; }
.chart .grid-l { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.chart .line { fill: none; stroke: var(--tone); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--tone-soft); }
.chart .dot { fill: var(--tone); }
.chart .bar-r { fill: var(--tone); opacity: .85; }
.chart .bar-r:hover { opacity: 1; }
.chart-empty { display: grid; place-items: center; min-height: 150px; color: var(--text-3); font-size: 13px; text-align: center; padding: 10px; border: 1px dashed var(--border); border-radius: var(--r); }
.tp-thumb { width: 44px; height: 44px; border-radius: var(--r-sm); object-fit: cover; flex-shrink: 0; background: var(--surface-3); }
.tp-none { display: grid; place-items: center; color: var(--text-3); }
.engage-list { list-style: none; margin: 0; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.engage-list a { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: var(--r); color: var(--text); }
.engage-list a:hover { background: var(--muted-soft); text-decoration: none; }
.engage-list a.active { background: var(--brand-soft); }
.comment { padding: 12px 14px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--border); }
.comment.reply { margin-top: 8px; margin-left: 18px; background: var(--surface); }
.comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comment-text { margin-top: 6px; font-size: 13.5px; overflow-wrap: anywhere; }
.reply-box { margin-top: 6px; }
.hs-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); }
.hs-row .ml-main { flex: 1; }
.hs-tags { overflow-wrap: anywhere; }
.idea-body { white-space: pre-line; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- overlays, toasts */
.overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: start center; padding: 14vh 16px 16px; background: rgba(8, 9, 11, .62); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: .18s; }
.overlay.open { opacity: 1; visibility: visible; }
.modal { width: 100%; max-width: 420px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); transform: translateY(8px) scale(.98); transition: .2s var(--ease); }
.overlay.open .modal { transform: none; }
.modal-body { padding: 22px; }
.modal-body h3 { font-size: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); }
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; width: min(400px, calc(100vw - 32px)); }
.toast { position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: 11px; padding: 13px 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); font-size: 13.5px; animation: toastIn .35s var(--ease); }
.toast.hide { animation: toastOut .3s forwards; }
.t-ic { width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0; display: grid; place-items: center; }
.toast.success .t-ic { background: var(--ok-soft); color: var(--ok); }
.toast.error .t-ic { background: var(--danger-soft); color: var(--danger); }
.toast.warning .t-ic { background: var(--warn-soft); color: var(--warn); }
.toast.info .t-ic { background: var(--info-soft); color: var(--info); }
.t-msg { flex: 1; padding-top: 3px; overflow-wrap: anywhere; }
.t-x { border: 0; background: none; color: var(--text-3); cursor: pointer; padding: 4px; border-radius: 6px; }
.t-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--brand); transform-origin: left; animation: toastBar 7s linear forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }
@keyframes toastBar { to { transform: scaleX(0); } }

/* ---------------------------------------------------------------- auth & error */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-aside { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 48px; background: #14161a; color: #f4f2ee; }
.auth-aside .brand-name { color: #f4f2ee; } .auth-aside .brand-sub { color: #8a9099; } .auth-aside .logo-mark { color: #f4f2ee; }
.auth-pitch { max-width: 480px; }
.auth-pitch .eyebrow { color: #ff8a5c; }
.auth-pitch h2 { font-size: 40px; line-height: 1.08; letter-spacing: -.03em; }
.auth-pitch h2 .hl { color: #ff6a33; }
.auth-pitch p { color: #b5bac2; margin-top: 16px; font-size: 15.5px; }
.trust-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 28px; }
.trust { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: var(--r); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); font-size: 13px; color: #d6d9de; }
.trust .ti { color: #ff6a33; display: grid; }
.auth-foot { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: #7d838c; }
.auth-main { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-top { position: absolute; top: 18px; right: 18px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 30px; }
.auth-card .lead { color: var(--text-2); margin: 8px 0 24px; }
.auth-mobile-brand { display: none; margin-bottom: 28px; }
.code-input { height: 58px; text-align: center; font: 700 26px var(--display); letter-spacing: .35em; }
.auth-alt a { font-weight: 600; }
.sec-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 22px; font-size: 12px; color: var(--text-3); }
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }
.error-inner { max-width: 460px; display: flex; flex-direction: column; align-items: center; }
.error-code { font: 700 90px/1 var(--display); letter-spacing: -.05em; color: var(--brand); margin-top: 18px; }

/* ---------------------------------------------------------------- motion */
.page-enter { animation: fadeUp .35s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }
/* Approvals */
.empty .row { justify-content: center; }
.ap-list { display: flex; flex-direction: column; gap: 14px; }
.ap-card { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; padding: 16px; align-items: start; }
.ap-media { position: relative; width: 220px; aspect-ratio: 4 / 5; border-radius: var(--r); overflow: hidden; background: var(--surface-3); }
.ap-media img, .ap-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ap-count { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 99px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 11.5px; font-weight: 600; }
.ap-none { display: grid; place-items: center; align-content: center; gap: 6px; height: 100%; color: var(--text-3); }
.ap-body { min-width: 0; }
.ap-when { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; }
.ap-channels { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ap-ch { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 9px; border: 1px solid var(--border); border-radius: 99px; font-size: 12.5px; font-weight: 600; }
.ap-caption { margin-top: 10px; }
.ap-more summary { cursor: pointer; color: var(--text-2); margin-top: 6px; }
.ap-actions { margin-left: 0; margin-top: 12px; gap: 6px; }
@media (max-width: 680px) {
  .ap-card { grid-template-columns: 1fr; }
  .ap-media { width: 100%; max-width: 360px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1200px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main, .g-compose { grid-template-columns: minmax(0, 1fr); }
  .preview-col { position: static; }
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w); transform: translateX(-100%); transition: transform .25s var(--ease); }
  .app.mobile-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .app.mobile-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .5); }
  .topbar [data-toggle-sidebar] { display: grid; }
  .u-name { display: none; }
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-mobile-brand { display: flex; }
  .g-engage { grid-template-columns: minmax(0, 1fr); }
  .cal-day { min-height: 92px; padding: 5px; }
  .cc-text { display: none; }
}
@media (max-width: 680px) {
  .content { padding: 18px 16px 32px; }
  .topbar { padding: 0 12px; gap: 6px; }
  .crumbs, .hide-sm { display: none; }
  .g-2, .g-3, .g-4, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .page-head h1 { font-size: 25px; }
  .hero { padding: 22px 18px; }
  .hero h1 { font-size: 25px; }
  .post-row { grid-template-columns: 34px minmax(0, 1fr) 60px; padding: 14px; gap: 10px; }
  .pr-time { grid-column: 1 / -1; flex-direction: row; gap: 8px; padding: 0; }
  .pr-thumb { width: 60px; height: 60px; }
  .publish-bar { position: static; }
  .publish-actions, .publish-actions .btn { width: 100%; }
  .when-field { width: 100%; }
  .cal-head div { padding: 8px 4px; text-align: center; }
  .cal-day { min-height: 64px; }
  .cal-chip { padding: 2px 3px; justify-content: center; }
  .cc-time { display: none; }
  .trust-list { grid-template-columns: 1fr; }
  .footer { padding: 14px 16px; }
}
