/* LandCore Marketing — styles. RTL first, logical properties. v4 tokens (BLUEPRINT §14.3): cool paper, ink, brand orange only for
   the primary action, "running now" and "needs you". Radius scale: 4 small parts · 10 cards · 16 floating layers. */
:root {
  --bg: #F3F4F6; --surface: #FFFFFF; --surface-2: #EEF0F3; --surface-3: #E4E7EC; --ink: #14161B; --ink-2: #363B45; --muted: #5F6673;
  --border: #E2E5EA; --border-2: #CDD2DA;
  --accent: #2F6FEB; --accent-ink: #FFFFFF; --accent-soft: #E7EEFD; --accent-text: #1F56C7;
  --wait: #F0602F; --wait-ink: #FFFFFF; --wait-soft: #FDE9E1; --wait-text: #B23E12;
  --ok: #17704A; --ok-soft: #DDF3E8; --warn: #8A5200; --warn-soft: #FDF0D5; --danger: #B42318; --danger-soft: #FDE4E1; --info: #2A5DAE; --info-soft: #E3ECFA;
  --on-ok: #FFFFFF; --on-danger: #FFFFFF;
  --shadow: none; --shadow-hover: 0 1px 2px rgb(16 18 24 / .05), 0 6px 18px rgb(16 18 24 / .07); --shadow-lg: 0 24px 64px rgb(16 18 24 / .2), 0 2px 6px rgb(16 18 24 / .06);
  color-scheme: light;
  --r-sm: 6px; --r-card: 14px; --r-float: 18px; --radius: var(--r-card); --radius-sm: 6px;
  --d-sales: #FF6B3D; --d-marketing: #7A5AF8; --d-production: #0E9384; --d-ops: #2A5DAE;
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif; --font-head: "Readex Pro", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --side: 236px; --nav-h: 64px; --row: 44px; --fs: 14px;
}
:root[data-theme="dark"] {
    --bg: #08090B; --surface: #111316; --surface-2: #171A1E; --surface-3: #1E2126; --ink: #E8EAED; --ink-2: #BCC2CB; --muted: #8E95A0;
    --border: rgb(255 255 255 / .065); --border-2: rgb(255 255 255 / .12);
    --accent: #4C8DFF; --accent-ink: #07080A; --accent-soft: #14223A; --accent-text: #8DB5FF;
    --wait: #FF7A50; --wait-ink: #1A0D07; --wait-soft: #35190F; --wait-text: #FF9F7E;
    --ok: #3ECF8E; --ok-soft: #10291C; --warn: #F2C94C; --warn-soft: #33290F; --danger: #FF6B6B; --danger-soft: #361414; --info: #8DB5FF; --info-soft: #14223A;
    --on-ok: #08140E; --on-danger: #1A0B09;
    --panel-bg: linear-gradient(180deg, #131518 0%, #0E1012 100%);
    --panel-shadow: inset 0 1px 0 rgb(255 255 255 / .045), 0 1px 0 rgb(0 0 0 / .6), 0 14px 34px -18px rgb(0 0 0 / .75);
    --row-bg: rgb(255 255 255 / .028);
    --shadow-hover: inset 0 1px 0 rgb(255 255 255 / .05), 0 10px 28px rgb(0 0 0 / .45); --shadow-lg: 0 28px 80px rgb(0 0 0 / .6), inset 0 1px 0 rgb(255 255 255 / .06);
    color-scheme: dark;
}


* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.ov-open { overflow: hidden; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.3; margin: 0; }
h1 { font-size: 1.65rem; font-weight: 800; letter-spacing: 0; } h2 { font-size: 1.1rem; font-weight: 700; } h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .5em; }
a { color: var(--accent-text); }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
.ic { flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; } .num { font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; } .gap { gap: .5rem; } .gap-lg { gap: 1rem; } .wrap { flex-wrap: wrap; } .center { justify-content: center; } .between { justify-content: space-between; } .grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: .75rem; } .pad { padding: 1rem; } .clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pre { white-space: pre-wrap; word-break: break-word; }
.nowrap { white-space: nowrap; }
hr.sep { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }

/* ---------- layout ---------- */
#app { min-height: 100vh; }
.shell { display: flex; min-height: 100vh; }
.side { position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--side); background: var(--surface); border-inline-end: 1px solid var(--border); display: flex; flex-direction: column; padding: 1rem .75rem; z-index: 20; }
.brand { display: flex; align-items: center; gap: .6rem; padding: .25rem .5rem 1rem; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 800 1.2rem/1 var(--font-head); }
.brand b { font-family: var(--font-head); font-size: 1.05rem; display: block; line-height: 1.1; }
.brand small { color: var(--muted); font-size: .78rem; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav a { display: flex; align-items: center; gap: .7rem; padding: .55rem .75rem; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--surface-2); }
.nav a.on { background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }
.nav a.dim { opacity: .62; }
.nav .tag { margin-inline-start: auto; font-size: .7rem; color: var(--muted); border: 1px solid var(--border); border-radius: 99px; padding: 0 .45rem; }
.nav .cnt { margin-inline-start: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: .75rem; font-weight: 700; display: inline-grid; place-items: center; }
.nav .cnt.err { background: var(--danger); color: var(--on-danger); }
.nav-group { margin: .75rem .75rem .25rem; font-size: .72rem; color: var(--muted); letter-spacing: .02em; }
.side-foot { border-top: 1px solid var(--border); padding-top: .75rem; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.main { flex: 1; min-width: 0; margin-inline-start: var(--side); padding: 1.5rem 2rem 3rem; }
.view { max-width: 1240px; margin: 0 auto; }
.mock-badge { white-space: nowrap; display: inline-flex; align-items: center; gap: .35rem; background: var(--warn-soft); color: var(--warn); border-radius: 99px; padding: .15rem .6rem; font-size: .78rem; font-weight: 700; }
.topbar { display: none; }
.bnav { display: none; }
.offline { position: sticky; top: 0; z-index: 30; background: var(--warn-soft); color: var(--warn); text-align: center; padding: .35rem 1rem; font-size: .85rem; font-weight: 600; }

@media (max-width: 899px) {
  .side { display: none; }
  .main { margin: 0; padding: .75rem 1rem calc(var(--nav-h) + 1.5rem + env(safe-area-inset-bottom)); }
  .topbar { display: flex; align-items: center; gap: .5rem; padding: .5rem 1rem; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 15; }
  .topbar .brand { padding: 0; text-decoration: none; color: inherit; } .topbar .brand-mark { width: 30px; height: 30px; font-size: 1rem; }
  .topbar .grow { flex: 1; }
  .bnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset-inline: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--border); z-index: 20; }
  .bnav a, .bnav button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: 500 .72rem var(--font); color: var(--muted); text-decoration: none; background: none; border: 0; min-width: 0; }
  .bnav .on { color: var(--accent-text); font-weight: 700; }
  .bnav .cnt { position: absolute; top: 6px; inset-inline-start: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--wait); color: var(--wait-ink); font-size: .68rem; font-weight: 700; display: grid; place-items: center; }
  .bnav .cnt.err { background: var(--danger); color: var(--on-danger); }
  h1 { font-size: 1.3rem; }
}

/* ---------- page ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-title { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.page-title h1 { overflow-wrap: anywhere; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.toolbar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar .search { flex: 1 1 220px; min-width: 0; }
.toolbar select { width: auto; flex: 0 1 220px; min-width: 0; max-width: 100%; }
@media (max-width: 640px) { .toolbar select { flex: 1 1 140px; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.hover { transition: box-shadow .18s, transform .18s; } .card.hover:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.section { margin-bottom: 1rem; }
.section-head, details.section > summary { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--border); }
details.section > summary { cursor: pointer; list-style: none; border-bottom: 0; }
details.section > summary::-webkit-details-marker { display: none; }
details.section[open] > summary { border-bottom: 1px solid var(--border); }
details.section .chev { margin-inline-start: auto; transition: transform .2s; }
details.section[open] .chev { transform: rotate(180deg); }
.section-body { padding: 1rem 1.1rem; }
.section-foot { display: flex; gap: .5rem; justify-content: flex-end; align-items: center; padding: .75rem 1.1rem; border-top: 1px solid var(--border); flex-wrap: wrap; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.kv { display: grid; grid-template-columns: minmax(90px, max-content) 1fr; gap: .35rem 1rem; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.divider { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .85rem; margin: 1.5rem 0 .75rem; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 40px; padding: .45rem .95rem; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface); color: var(--ink); font: 600 .92rem var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: var(--on-ok); }
.btn-danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger-soft) 80%, var(--danger)); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-icon { padding: .45rem; min-width: 40px; }
.btn-sm { min-height: 32px; padding: .2rem .65rem; font-size: .85rem; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--muted); border-top-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- states ---------- */
.empty { text-align: center; padding: 3rem 1rem; max-width: 520px; margin: 1rem auto; }
.empty-ic { width: 64px; height: 64px; border-radius: 18px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; margin: 0 auto 1rem; }
.empty.err .empty-ic { background: var(--danger-soft); color: var(--danger); }
.empty h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.empty p { color: var(--muted); margin-bottom: 1rem; }
.skel-wrap { display: grid; gap: .75rem; }
.skel { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); padding: 1rem; }
.skel-card { height: 160px; }
.skel-line { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; margin: .45rem 0; }
.w40 { width: 40%; } .w60 { width: 60%; } .w90 { width: 90%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- toast ---------- */
#toasts { position: fixed; inset-inline: 0; bottom: calc(var(--nav-h) + 1rem + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: .5rem; z-index: 80; pointer-events: none; padding: 0 1rem; }
@media (min-width: 900px) { #toasts { bottom: 1.5rem; } }
.toast { display: flex; align-items: center; gap: .5rem; background: var(--ink); color: var(--bg); padding: .6rem 1rem; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 600; font-size: .9rem; transform: translateY(12px); opacity: 0; transition: .2s; max-width: 100%; pointer-events: auto; }
.toast.in { transform: none; opacity: 1; }
.toast-act { background: none; border: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; padding: 0 .25rem; }
.toast-error { background: var(--danger); color: var(--on-danger); }

/* ---------- bars / funnel ---------- */

/* ---------- list items ---------- */

.btn.on { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent); }
.dimmed { opacity: .62; }
.dimmed:hover, .dimmed:focus-within { opacity: .9; }
.sticky-foot { margin-top: 1rem; position: sticky; bottom: 0; z-index: 5; }
@media (max-width: 899px) { .sticky-foot { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); } }

/* ---------- v2 components ---------- */
.donut { flex: none; } .donut circle { fill: none; stroke-width: 6; } .donut .track { stroke: var(--surface-2); } .donut .val { stroke: var(--accent); stroke-linecap: round; transition: stroke-dasharray .4s; }
.avatar { --c: var(--accent); width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; flex: none; font: 800 .95rem/1 var(--font-head);
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); position: relative; }
.avatar.sm { width: 30px; height: 30px; border-radius: 9px; font-size: .78rem; } .avatar.lg { width: 52px; height: 52px; border-radius: 15px; font-size: 1.15rem; }
.avatar[data-dept=sales] { --c: var(--d-sales); } .avatar[data-dept=marketing] { --c: var(--d-marketing); } .avatar[data-dept=production] { --c: var(--d-production); } .avatar[data-dept=ops] { --c: var(--d-ops); } .avatar[data-dept=owner] { --c: var(--ink-2); }
.avatar .dot { position: absolute; inset-block-end: -3px; inset-inline-end: -3px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--surface); background: var(--muted); }
.avatar .dot.ok { background: var(--ok); } .avatar .dot.running { background: var(--info); animation: pulse 1.4s ease-in-out infinite; } .avatar .dot.error { background: var(--danger); } .avatar .dot.off { background: var(--border-2); }
@keyframes pulse { 50% { opacity: .35; } }
kbd { font: 600 .72rem var(--font); border: 1px solid var(--border-2); border-bottom-width: 2px; border-radius: 6px; padding: 0 .35rem; color: var(--muted); background: var(--surface); direction: ltr; unicode-bidi: isolate; }
.search-btn { width: 100%; justify-content: space-between; color: var(--muted); font-weight: 500; margin-bottom: .75rem; }

.only-mobile { display: none; } @media (max-width: 899px) { .only-mobile { display: inline-flex; } }


@media (max-width: 899px) {
  .card.pad.row.between > .grow { flex-basis: 100%; } .card.pad.row.between > .btn { width: 100%; }
  .topbar .brand b { white-space: nowrap; } .topbar .mock-badge { font-size: .7rem; padding: .1rem .45rem; }
}



/* =====================================================================
   v3 visual system (BLUEPRINT §13.2) — hairlines, one accent, quiet surfaces, dense data, Arabic-first type.
   Layered on top of the base so every screen picks it up.
   ===================================================================== */
:root[data-density="compact"] { --row: 36px; --fs: 13.5px; }
:root[data-density="compact"] .btn { min-height: 32px; padding: .25rem .7rem; } :root[data-density="compact"] .item { padding: .6rem .75rem; } :root[data-density="compact"] .section-head, :root[data-density="compact"] .section-body { padding-block: .6rem; } :root[data-density="compact"] .nav a { padding-block: .3rem; }

body { font-size: var(--fs); line-height: 1.7; letter-spacing: 0; }
h1 { font-size: 1.75rem; font-weight: 800; line-height: 1.25; } h2 { font-size: 1.02rem; font-weight: 700; } h3 { font-size: .95rem; }
h2, h3, .btn, .nav a, .chip, .badge { font-family: var(--font); }
.muted { color: var(--muted); } .small { font-size: .82rem; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

/* surfaces: hairlines instead of shadows; shadow only for floating layers */
.card { box-shadow: none; border-color: var(--border); border-radius: var(--radius); }
.card.hover:hover, a.card:hover { box-shadow: var(--shadow-hover); transform: none; border-color: var(--border-2); }
.section-head, details.section > summary { padding: .85rem 1.1rem; }
.section-head h2 { font-size: .98rem; }

/* sidebar: quiet, active = tinted row + accent bar, counters neutral except decisions */
.side { background: var(--bg); border-inline-end: 1px solid var(--border); padding: .9rem .6rem; }
.brand-mark { border-radius: 9px; width: 32px; height: 32px; font-size: 1.05rem; }
.nav a { padding: .45rem .7rem; border-radius: 8px; color: var(--ink-2); font-weight: 500; position: relative; min-height: 36px; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.on { background: var(--surface-2); color: var(--ink); font-weight: 700; }
.nav a.on::before { content: ""; position: absolute; inset-block: 8px; inset-inline-start: -0.6rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav a.on .ic { color: var(--accent); }
.nav .cnt { background: var(--surface-3); color: var(--ink-2); min-width: 20px; height: 20px; font-size: .72rem; }
.nav a[data-nav="desk"] .cnt, .nav a[data-nav="chat"] .cnt { background: var(--wait); color: var(--wait-ink); }
.nav-group { text-transform: none; font-size: .7rem; font-weight: 700; color: var(--muted); opacity: .8; margin: 1rem .7rem .3rem; }
.search-btn { min-height: 36px; border-radius: 9px; background: var(--surface); }
.main { padding: 1.75rem 2.25rem 3rem; }
.view { max-width: 1280px; }
.page-head { margin-bottom: 1.25rem; } .page-head .muted { font-size: .88rem; }

/* buttons: primary = accent (one per view), the rest quiet */
.btn { min-height: 36px; padding: .35rem .85rem; border-radius: 9px; font-weight: 600; font-size: .9rem; border-color: var(--border-2); background: var(--surface); }
.btn:hover { background: var(--surface-2); border-color: var(--border-2); }
.btn-primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); box-shadow: 0 1px 0 rgb(255 255 255 / .18) inset, 0 1px 2px rgb(0 0 0 / .12); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 90%, var(--ink)); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ok { background: var(--ok); border-color: transparent; color: var(--on-ok); } .btn-ok:hover { background: color-mix(in srgb, var(--ok) 88%, var(--ink)); }
.btn-danger { background: var(--danger-soft); border-color: transparent; }
.btn-sm { min-height: 30px; padding: .15rem .6rem; font-size: .82rem; border-radius: 8px; }
.btn-icon { min-width: 36px; padding: .35rem; }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* chips & badges: status as small dots, not blocks */



/* tables: dense rows, quiet header, tabular numbers */

/* KPI tiles: Cairo for the number only */

/* lists */

/* empty states */
.empty { padding: 3.5rem 1rem; }
.empty-ic { width: 56px; height: 56px; border-radius: 16px; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; margin: 0 auto 1rem; }

/* motion: route cross-fade (View Transitions) + entrance; all off with reduced motion */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
.screen { animation: rise .22s cubic-bezier(.2, .7, .2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { *, ::before, ::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

@media (max-width: 899px) {
  .main { padding: .9rem 1rem calc(var(--nav-h) + 1.5rem + env(safe-area-inset-bottom)); }
  .topbar { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); }
  .bnav { background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); }
  h1 { font-size: 1.4rem; }
}

/* v4: orange is for the one primary action of a screen; repeated per-card actions use the soft accent */
.card .btn-primary.btn-sm, .list .btn-primary.btn-sm { background: var(--accent-soft); color: var(--accent-text); box-shadow: none; }
.card .btn-primary.btn-sm:hover, .list .btn-primary.btn-sm:hover { background: color-mix(in srgb, var(--accent-soft) 80%, var(--accent)); color: var(--accent-ink); }

.checklist li { display: flex; gap: .6rem; align-items: center; padding: .35rem 0; } .checklist { list-style: none; padding: 0; margin: 0; }
.checklist .ok { color: var(--ok); } .checklist .todo { color: var(--border-2); } .checklist li.done span { color: var(--muted); text-decoration: line-through; }
/* ---------- «النهارده» v5 (BLUEPRINT §15): bento — strip · decisions · workflow · studio · calendar · departments · live ---------- */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem 1.5rem; flex-wrap: wrap; margin: .25rem 0 1.5rem; }
.hero-date { color: var(--muted); font-size: .84rem; margin: 0 0 .35rem; }
.hero h1 { font: 300 clamp(1.75rem, 3.1vw, 2.6rem)/1.3 var(--font-head); letter-spacing: -.01em; }
.hero-rest { color: var(--muted); }
.hero-act { display: flex; gap: .5rem; }
.home { display: grid; gap: .75rem; }
.panel { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 1.15rem 1.25rem; border: 1px solid var(--border); border-radius: var(--r-float); background: var(--panel-bg, var(--surface)); box-shadow: var(--panel-shadow, none); }
.panel-h { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; min-width: 0; }
.panel-h h2 { font: 500 .95rem/1.4 var(--font); color: var(--ink); }
.panel-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--ink-2); }
.panel-meta { margin-inline-start: auto; color: var(--muted); font-size: .8rem; display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.panel-f { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: .9rem; }
.more { display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); font-size: .82rem; text-decoration: none; } .more:hover { color: var(--accent-text); }
.setup .checklist { margin: 0; }

/* numbers strip */
.kpis-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--r-float); background: var(--panel-bg, var(--surface)); box-shadow: var(--panel-shadow, none); overflow: hidden; }
.kpi { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem; padding: 1.15rem 1.3rem; color: inherit; text-decoration: none; min-width: 0; }
.kpi + .kpi { border-inline-start: 1px solid var(--border); }
a.kpi:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.kpi-t { display: grid; min-width: 0; }
.kpi-l { color: var(--muted); font-size: .82rem; }
.kpi-v { font: 300 2.1rem/1.15 var(--font-head); font-variant-numeric: tabular-nums; margin: .35rem 0 .3rem; }
.kpi-n { color: var(--muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .spark { color: var(--accent); width: 76px; height: 28px; flex: none; } .kpi .spark path { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linejoin: round; } .kpi .spark .area { fill: currentColor; opacity: .12; stroke: none; }

/* bento */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .75rem; }
.spot { grid-column: span 7; } .dec { grid-column: span 5; } .chart { grid-column: span 7; } .flow { grid-column: span 5; } .studio { grid-column: span 7; } .hcal { grid-column: span 5; }

/* decisions */
.dec-n { min-width: 26px; height: 24px; padding: 0 .45rem; border-radius: 8px; background: var(--wait-soft); color: var(--wait-text); display: grid; place-items: center; font: 600 .82rem/1 var(--font); }
.dec-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.dec-row { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .75rem; padding: .7rem .8rem; border-radius: 12px; border: 1px solid transparent; background: var(--row-bg, var(--surface-2)); color: inherit; text-decoration: none; transition: background .15s, border-color .15s; }
.dec-row:hover { border-color: var(--border-2); }
.dec-row.urgent::before { content: ""; position: absolute; inset-block: 10px; inset-inline-start: 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--wait); }
.dec-body { display: grid; min-width: 0; line-height: 1.55; }
.dec-body b { font-weight: 500; font-size: .93rem; } .dec-body small { color: var(--muted); font-size: .78rem; }
.dec-row.urgent .dec-body small { color: var(--wait-text); }
.dec-row > .ic { color: var(--muted); }
.dec-empty { padding: 1.25rem .5rem; margin: 0 auto; }

/* compact live workflow */
.legend { display: inline-flex; align-items: center; gap: .3rem .45rem; font-size: .74rem; }
.legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-inline-start: .35rem; }
.legend i[data-k="you"] { background: var(--wait); } .legend i[data-k="err"] { background: var(--danger); }
.flow-lines { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; margin-bottom: 1rem; } .mline { min-width: 0; }
.mline-h { display: flex; justify-content: space-between; gap: .5rem; font-size: .8rem; color: var(--ink-2); margin-bottom: .4rem; }
.mline-wait { color: var(--wait-text); }
.mline-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.station { display: grid; justify-items: start; gap: .1rem; padding: .7rem .6rem .65rem; border: 1px solid transparent; border-radius: 10px; background: var(--row-bg, var(--surface-2)); color: inherit; font: inherit; cursor: pointer; text-align: start; min-width: 0; transition: border-color .15s, background .15s; }
.station:hover { border-color: var(--border-2); }
.station.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--row-bg, var(--surface-2))); }
.st-bar { width: 100%; height: 3px; border-radius: 3px; background: var(--border-2); margin-bottom: .35rem; }
.mline[data-line="sales"] .st-bar { background: color-mix(in srgb, var(--accent) 55%, var(--border-2)); }
.mline[data-line="studio"] .st-bar { background: color-mix(in srgb, #9B7CFF 55%, var(--border-2)); }
.station.zero .st-bar { background: var(--border-2); }
.station[data-state="you"] .st-bar { background: var(--wait); }
.station[data-state="run"] .st-bar { background: var(--accent); animation: st-glow 1.6s ease-in-out infinite; }
.station[data-state="err"] .st-bar { background: var(--danger); }
.st-n { font: 300 1.6rem/1.2 var(--font-head); font-variant-numeric: tabular-nums; }
.station.zero .st-n { color: var(--muted); }
.station[data-state="you"] .st-n { color: var(--wait-text); }
.st-label { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.station:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@keyframes st-glow { 50% { opacity: .45; } }
.insp { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .65rem; margin-top: auto; padding: .65rem .75rem; border: 1px dashed var(--border-2); border-radius: 12px; color: inherit; text-decoration: none; }
.insp:hover { border-style: solid; }
.insp-t { display: grid; min-width: 0; line-height: 1.5; } .insp-t b { font-weight: 500; font-size: .88rem; } .insp-t small { color: var(--muted); font-size: .76rem; }
.insp[data-state="you"] .insp-t small { color: var(--wait-text); } .insp[data-state="err"] .insp-t small { color: var(--danger); }
.insp-go { display: inline-flex; align-items: center; gap: .25rem; font-size: .8rem; color: var(--accent-text); white-space: nowrap; }

/* studio cards */
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.post { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; color: inherit; text-decoration: none; background: var(--row-bg, var(--surface-2)); transition: border-color .15s, transform .15s; }
.post:hover { border-color: var(--border-2); transform: translateY(-2px); }
.post-art { position: relative; aspect-ratio: 4 / 3; padding: .7rem; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(120% 90% at 85% 10%, color-mix(in srgb, var(--tint, #1B2A44) 100%, #fff 6%), #0B0C0E 75%) center / cover; }
.post-chip { align-self: flex-start; padding: .1rem .5rem; border-radius: 7px; background: rgb(0 0 0 / .4); color: #E8EAED; font-size: .7rem; backdrop-filter: blur(6px); }
.post-hook { font: 400 .92rem/1.6 var(--font-head); color: #F1F2F4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-f { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .55rem .7rem; font-size: .76rem; color: var(--muted); }
.post-st.review { color: var(--wait-text); } .post-st.ready { color: var(--ok); }
.post-q { font-variant-numeric: tabular-nums; } .post-q.ok { color: var(--ok); } .post-q.warn { color: var(--warn); }

/* calendar */
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; margin-bottom: .8rem; }
.cal-d { display: grid; justify-items: center; gap: .1rem; padding: .4rem 0 .35rem; border: 0; border-radius: 10px; background: none; color: var(--ink-2); font: inherit; cursor: pointer; min-width: 0; }
.cal-d small { font-size: .66rem; color: var(--muted); white-space: nowrap; overflow: hidden; max-width: 100%; }
.cal-d b { font: 400 1rem/1.3 var(--font-head); font-variant-numeric: tabular-nums; }
.cal-d i { width: 5px; height: 5px; border-radius: 50%; } .cal-d i.has { background: var(--accent); }
.cal-d:hover { background: var(--row-bg, var(--surface-2)); }
.cal-d.on { background: var(--accent); color: var(--accent-ink); } .cal-d.on small { color: inherit; opacity: .8; } .cal-d.on i.has { background: var(--accent-ink); }
.cal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.cal-ev { --c: var(--accent); display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); gap: .5rem; align-items: center; padding: .45rem .6rem; border-radius: 10px; color: inherit; text-decoration: none; }
.cal-ev:hover { background: var(--row-bg, var(--surface-2)); }
.cal-ev[data-kind="post"] { --c: #9B7CFF; } .cal-ev[data-kind="team"] { --c: var(--border-2); }
.cal-ev[data-state="done"] { --c: var(--ok); } .cal-ev[data-state="run"] { --c: var(--accent); } .cal-ev[data-state="err"] { --c: var(--danger); }
.cal-time { color: var(--muted); font-size: .76rem; font-variant-numeric: tabular-nums; text-align: start; white-space: nowrap; }
.cal-body { display: grid; min-width: 0; padding-inline-start: .65rem; border-inline-start: 3px solid var(--c); line-height: 1.5; } .cal-body b { font-weight: 500; font-size: .88rem; } .cal-body small { color: var(--muted); font-size: .76rem; }
.cal-ev[data-state="err"] small { color: var(--danger); }
.cal-empty { padding: .5rem; font-size: .85rem; }

/* departments */
.depts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.dept { gap: .7rem; color: inherit; text-decoration: none; transition: border-color .15s; }
.dept:hover { border-color: var(--border-2); }
.dept-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; } .dept-top b { font: 500 .95rem var(--font); }
.dept-metric { display: grid; line-height: 1.4; } .dept-metric bdi { font: 300 1.9rem/1.2 var(--font-head); font-variant-numeric: tabular-nums; } .dept-metric span { color: var(--muted); font-size: .8rem; }
.dept-load { display: flex; gap: 3px; } .dept-load i { flex: 1; height: 5px; border-radius: 3px; background: var(--border-2); }
.dept-load i.ok { background: color-mix(in srgb, var(--ok) 70%, transparent); } .dept-load i.run { background: var(--accent); } .dept-load i.err { background: var(--danger); }
.dept-team { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .76rem; }
.dept-av { display: flex; } .dept-av .avatar { width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--surface); margin-inline-start: -6px; } .dept-av .avatar:first-child { margin: 0; }
.dept-st { font-size: .76rem; color: var(--muted); display: inline-flex; align-items: center; gap: .3rem; }
.dept-st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--border-2); }
.dept-st.run { color: var(--accent-text); } .dept-st.run::before { background: var(--accent); }
.dept-st.err { color: var(--danger); } .dept-st.err::before { background: var(--danger); }

/* live strip */
.livestrip { flex-direction: row; align-items: center; gap: 1rem; padding: .7rem 1.1rem; }
.live-tag { display: inline-flex; align-items: center; gap: .4rem; color: var(--ok); font-size: .78rem; flex: none; }
.live-tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: st-glow 1.6s infinite; }
.live-items { display: flex; gap: 1.5rem; min-width: 0; flex: 1; overflow: hidden; mask-image: linear-gradient(to left, #000 85%, transparent); }
.live-it { display: flex; align-items: center; gap: .45rem; flex: none; max-width: 360px; color: inherit; text-decoration: none; font-size: .84rem; }
.live-it .avatar { width: 22px; height: 22px; border-radius: 7px; } .live-it b { font-weight: 500; white-space: nowrap; } .live-it span { color: var(--muted); } .live-it small { color: var(--muted); opacity: .75; white-space: nowrap; }

@media (max-width: 1199px) { .spot, .dec, .chart, .flow, .studio, .hcal { grid-column: span 12; } .depts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 899px) {
  .hero-act { width: 100%; } .hero-act .btn { flex: 1; justify-content: center; }
  .kpis-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi:nth-child(3) { border-inline-start: 0; } .kpi:nth-child(n+3) { border-top: 1px solid var(--border); }
  .kpi { padding: .9rem 1rem; } .kpi-v { font-size: 1.65rem; } .kpi .spark { display: none; }
  .panel { padding: 1rem; }
  .mline-track { overflow-x: auto; grid-auto-columns: minmax(64px, 1fr); scrollbar-width: none; } .mline-track::-webkit-scrollbar { display: none; }
  .posts { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; } .post { scroll-snap-align: start; }
  .livestrip { flex-wrap: wrap; } .live-items { flex-basis: 100%; order: 3; flex-direction: column; gap: .5rem; mask-image: none; } .live-it { max-width: none; } .live-it span { flex: 1; min-width: 0; }
}
@media (max-width: 520px) { .depts { gap: .6rem; } .dept-metric bdi { font-size: 1.5rem; } .dept-team > span:last-child { display: none; } }
@media (prefers-reduced-motion: reduce) { .station[data-state="run"] .st-bar, .live-tag i { animation: none; } }


/* v5.2 home additions */
.live-pill { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .8rem; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); background: color-mix(in srgb, var(--ok) 9%, transparent); color: var(--ok); font-size: .8rem; }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: st-glow 1.6s infinite; }
.hero-act { align-items: center; }
.delta { font-size: .74rem; margin-top: .2rem; } .delta.up { color: var(--ok); } .delta.down { color: var(--wait-text); } .delta.flat { color: var(--muted); }
.spot { padding: 1.35rem 1.5rem; gap: .2rem; background: radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 55%), var(--panel-bg, var(--surface)); }
.spot.urgent { background: radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--wait) 9%, transparent), transparent 55%), var(--panel-bg, var(--surface)); }
.spot-h { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.spot-tag { padding: .2rem .65rem; border-radius: 99px; font-size: .76rem; font-weight: 600; background: var(--accent-soft); color: var(--accent-text); }
.spot.urgent .spot-tag { background: var(--wait-soft); color: var(--wait-text); }
.spot-n { margin-inline-start: auto; color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.spot-title { font: 400 clamp(1.25rem, 2vw, 1.55rem)/1.45 var(--font-head); margin: .7rem 0 .25rem; }
.spot-sum { color: var(--ink-2); font-size: .9rem; margin: 0 0 .9rem; max-width: 62ch; }
.spot-f { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: auto; padding-top: 1rem; }
.spot-note { margin-inline-start: auto; }
.empty-spot { justify-content: center; }
.pv { border-radius: 14px; overflow: hidden; max-width: 560px; }
.pv-text { margin: 0; padding: .85rem 1rem; white-space: pre-wrap; font-size: .9rem; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.pv-mail { background: #F6F6F4; color: #1B1D1F; }
.pv-mail-h { display: grid; gap: .15rem; padding: .7rem 1rem; border-bottom: 1px solid rgb(0 0 0 / .08); font-size: .82rem; }
.pv-mail-h span { display: flex; gap: .5rem; } .pv-mail-h small { color: rgb(0 0 0 / .45); min-width: 2rem; } .pv-mail-h b { font-weight: 600; margin-top: .15rem; }
.pv-li { background: #1B1F23; color: #E9E9E9; border: 1px solid rgb(255 255 255 / .08); }
.pv-li-h { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem 0; font-size: .85rem; } .pv-li-h > span:nth-child(2) { display: grid; line-height: 1.35; } .pv-li-h small { color: rgb(255 255 255 / .5); font-size: .74rem; }
.pv-me { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 600 .95rem var(--font-head); }
.pv-in { margin-inline-start: auto; width: 20px; height: 20px; border-radius: 4px; background: #0A66C2; color: #fff; display: grid; place-items: center; font: 700 .7rem/1 system-ui; }
.pv-wa { background: #0B141A; padding: .7rem .8rem; border: 1px solid rgb(255 255 255 / .06); }
.pv-wa-to { display: block; color: rgb(255 255 255 / .5); font-size: .74rem; margin-bottom: .4rem; }
.pv-bubble { position: relative; margin: 0; max-width: 92%; padding: .6rem .8rem 1.2rem; border-radius: 10px 2px 10px 10px; background: #005C4B; color: #E9EDEF; white-space: pre-wrap; font-size: .88rem; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.pv-bubble small { position: absolute; bottom: .3rem; inset-inline-end: .6rem; font-size: .66rem; opacity: .6; }
.pv-note { background: var(--row-bg, var(--surface-2)); border: 1px solid var(--border); }
.dec-row.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--row-bg, var(--surface-2))); }
.seg-mini { margin-inline-start: auto; display: inline-flex; padding: 3px; border-radius: 10px; border: 1px solid var(--border); background: var(--row-bg, var(--surface-2)); }
.seg-mini button { border: 0; background: none; color: var(--muted); font: 500 .76rem var(--font); padding: .25rem .65rem; border-radius: 7px; cursor: pointer; }
.seg-mini button.on { background: rgb(255 255 255 / .08); color: var(--ink); }
:root[data-theme="light"] .seg-mini button.on { background: var(--surface); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.chart .panel-h { flex-wrap: wrap; }
.ch-sum { display: flex; align-items: flex-end; gap: .9rem; margin-bottom: .6rem; } .ch-sum > span { display: grid; }
.ch-big { font: 300 2.3rem/1.1 var(--font-head); font-variant-numeric: tabular-nums; }
.chart { min-height: 0; } .ch-plot { position: relative; flex: 1; min-height: 150px; color: var(--accent); }
.ch-plot[data-series="replies"] { color: var(--ok); } .ch-plot[data-series="sent"] { color: #9B7CFF; }
.ch-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ch-line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ch-mid { stroke: var(--border-2); stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; }
.ch-wk { position: absolute; top: 0; inset-inline-start: .3rem; font-size: .7rem; color: var(--muted); } .ch-wk.now { inset-inline-start: auto; left: .3rem; }
.ch-hit { position: absolute; inset: 0; } .ch-hit i { position: absolute; top: 0; bottom: 0; cursor: crosshair; }
.ch-guide { position: absolute; top: 0; bottom: 0; width: 1px; background: color-mix(in srgb, currentColor 50%, transparent); pointer-events: none; }
.ch-tip { position: absolute; top: -.4rem; width: 120px; padding: .35rem .6rem; border-radius: 9px; border: 1px solid var(--border-2); background: var(--surface-3); color: var(--ink); display: grid; font-size: .8rem; pointer-events: none; box-shadow: var(--shadow-lg); z-index: 2; }
.ch-tip small { color: var(--muted); font-size: .72rem; }
.ch-x { position: relative; height: 1.3rem; margin-top: .3rem; font-size: .7rem; color: var(--muted); } .ch-x span { position: absolute; transform: translateX(-50%); white-space: nowrap; } .ch-x span:last-child { transform: none; }
.post-art.slide { background: var(--b-bg); color: var(--b-ink); justify-content: flex-start; gap: .35rem; }
.post-art.slide .post-chip { margin-bottom: auto; }
.sl-bar { width: 28px; height: 4px; border-radius: 2px; background: var(--b-ac); }
.sl-title { font-size: 1rem; line-height: 1.45; font-weight: 800; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sl-sub { opacity: .7; font-size: .74rem; } .sl-n { position: absolute; bottom: .55rem; left: .7rem; font-size: .66rem; opacity: .55; font-family: var(--font); }
.post-art.li { background: #1B1F23; color: #E9E9E9; justify-content: flex-start; gap: .45rem; }
.li-h { display: flex; align-items: center; gap: .45rem; margin-top: .35rem; } .li-h i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 600 .78rem var(--font-head); font-style: normal; flex: none; }
.li-h > span { display: grid; line-height: 1.3; min-width: 0; } .li-h b { font-size: .76rem; } .li-h small { font-size: .64rem; opacity: .55; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-t { font-size: .78rem; line-height: 1.65; opacity: .9; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.reel-play { position: absolute; inset-inline-end: .7rem; bottom: .7rem; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / .16); color: #fff; }
.dept-row { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem; }
.dept-week { display: flex; align-items: flex-end; gap: 3px; height: 34px; flex: none; } .dept-week i { width: 6px; border-radius: 2px; background: color-mix(in srgb, var(--accent) 40%, var(--border-2)); } .dept-week i.today { background: var(--accent); }
.intro { animation: intro .5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--d, 0) * 60ms); }
.bento.intro > * { animation: intro .5s cubic-bezier(.2, .7, .2, 1) both; } .bento.intro > :nth-child(2) { animation-delay: 160ms; } .bento.intro > :nth-child(3) { animation-delay: 220ms; } .bento.intro > :nth-child(4) { animation-delay: 280ms; } .bento.intro > :nth-child(5) { animation-delay: 340ms; } .bento.intro > :nth-child(6) { animation-delay: 400ms; }
@keyframes intro { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 899px) { .spot { padding: 1.1rem; } .spot-note { margin-inline-start: 0; flex-basis: 100%; } .seg-mini { margin-inline-start: 0; } .live-pill { display: none; } .dept-week { display: none; } }
@media (prefers-reduced-motion: reduce) { .intro, .bento.intro > * { animation: none; } .live-pill i { animation: none; } }

/* ---------- v5 shell: floating icon dock + bottom message bar ---------- */
@media (min-width: 900px) {
  .side { inset-block: 50% auto; inset-inline-start: 16px; transform: translateY(-50%); width: 64px; max-height: calc(100vh - 32px); padding: 8px; align-items: center; gap: 2px;
    border: 1px solid var(--border-2); border-radius: 22px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(18px); box-shadow: var(--shadow-lg); overflow: visible; }
  .side .brand { padding: 2px 0 6px; } .side .brand > div:last-child { display: none; }
  .side .brand-mark { width: 44px; height: 44px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-size: 1.15rem; }
  .side .search-btn { width: 44px; height: 44px; min-height: 0; padding: 0; justify-content: center; margin: 0 0 4px; border-radius: 12px; }
  .side .search-btn > span { gap: 0; font-size: 0; } .side .search-btn kbd { display: none; }
  .side .nav { flex: 0 1 auto; overflow-y: auto; overflow-x: visible; scrollbar-width: none; gap: 2px; align-items: center; }
  .side .nav::-webkit-scrollbar { display: none; }
  .side .nav a { width: 44px; height: 44px; min-height: 0; padding: 0; justify-content: center; border-radius: 12px; color: var(--muted); }
  .side .nav a:hover { color: var(--ink); background: var(--surface-2); }
  .side .nav a.on { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 30%, transparent); }
  .side .nav a.on::before { display: none; } .side .nav a.on .ic { color: inherit; }
  .side .nav a > span:not(.cnt):not(.tag) { position: fixed; inset-inline-start: 92px; padding: .35rem .7rem; border-radius: 9px; background: var(--surface-3); color: var(--ink);
    border: 1px solid var(--border-2); font-size: .8rem; font-weight: 600; white-space: nowrap; opacity: 0; visibility: hidden; transform: translateX(4px); transition: .15s; pointer-events: none; z-index: 40; }
  .side .nav a:hover > span:not(.cnt):not(.tag), .side .nav a:focus-visible > span:not(.cnt):not(.tag) { opacity: 1; visibility: visible; transform: none; }
  .side .nav .tag { display: none; }
  .side .nav .cnt { position: absolute; top: -4px; inset-inline-end: -6px; min-width: 16px; height: 16px; padding: 0 3px; font-size: .6rem; line-height: 16px; margin: 0; border: 2px solid var(--surface); box-sizing: content-box; }
  .side .nav-group { width: 24px; height: 1px; margin: 6px auto; padding: 0; font-size: 0; background: var(--border-2); opacity: 1; }
  .side-foot { flex-direction: column; border-top: 1px solid var(--border-2); padding-top: 6px; margin-top: 4px; gap: 2px; }
  .side-foot .mock-badge { font-size: 0; padding: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--warn); gap: 0; } .side-foot .mock-badge .ic { display: none; }
  .side-foot > .grow { display: none; } .side-foot .btn { width: 44px; height: 40px; min-height: 0; padding: 0; justify-content: center; }
  .main { margin-inline-start: 96px; padding-inline: 1.5rem 2.25rem; }
}
.msgbar { position: fixed; z-index: 25; bottom: 18px; inset-inline-start: calc(96px + (100vw - 96px) / 2); transform: translateX(50%); width: min(720px, calc(100vw - 150px));
  display: flex; align-items: center; gap: .5rem; padding: 6px; border: 1px solid var(--border-2); border-radius: 16px; background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(18px); box-shadow: var(--shadow-lg); }
.msgbar[hidden] { display: none; }
.mb-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent-text); }
.msgbar .mb-who { flex: none; width: auto; max-width: 9.5rem; min-height: 38px; border: 0; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); font: 600 .8rem var(--font); padding: 0 .6rem; }
.msgbar input[type=text] { flex: 1; min-width: 0; border: 0; background: transparent; min-height: 38px; font: .92rem var(--font); color: var(--ink); padding: 0 .3rem; }
.msgbar input[type=text]:focus, .msgbar .mb-who:focus { border: 0; outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 1px; } .msgbar:focus-within { border-color: var(--accent); }
.mb-send { width: 40px; height: 40px; flex: none; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; }
.mb-send .ic { transform: scaleX(-1); } .mb-send:disabled { opacity: .5; }
body.has-bar .main { padding-bottom: 6.5rem; }
body.has-bar #toasts { bottom: 5.5rem; }
@media (max-width: 899px) {
  .msgbar { inset-inline: 10px; transform: none; width: auto; bottom: calc(var(--nav-h) + 8px + env(safe-area-inset-bottom)); padding: 5px; border-radius: 14px; }
  .mb-ic { display: none; } .msgbar .mb-who { max-width: 6.5rem; }
  body.has-bar .main { padding-bottom: calc(var(--nav-h) + 5.5rem + env(safe-area-inset-bottom)); }
  body.has-bar #toasts { bottom: calc(var(--nav-h) + 4.5rem + env(safe-area-inset-bottom)); }
}

/* ---------- v5 finish (all screens): quiet graphite panels with an inner top light, light display type, blue actions ---------- */
:root[data-theme="dark"] body { background: radial-gradient(900px 420px at 75% -8%, rgb(76 141 255 / .07), transparent 60%), radial-gradient(700px 380px at 5% 105%, rgb(155 124 255 / .035), transparent 60%), var(--bg) fixed; }
:root[data-theme="dark"] .card, :root[data-theme="dark"] .item, :root[data-theme="dark"] .tbl-scroll { background: var(--panel-bg); box-shadow: var(--panel-shadow); }
.card, .item { border-radius: var(--r-float); }
h1 { font-weight: 500; letter-spacing: -.005em; } .page-head h1 { font: 400 1.75rem/1.3 var(--font-head); }
.btn-primary { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent), 0 8px 24px -10px color-mix(in srgb, var(--accent) 70%, transparent); font-weight: 600; }
:root[data-theme="dark"] .btn:not(.btn-primary):not(.btn-ok):not(.btn-danger) { background: rgb(255 255 255 / .03); border-color: var(--border-2); }
:root[data-theme="dark"] .side, :root[data-theme="dark"] .msgbar { background: rgb(17 19 22 / .8); backdrop-filter: blur(20px) saturate(140%); }
:root[data-theme="dark"] .side .nav a.on { box-shadow: 0 0 0 1px rgb(76 141 255 / .5), 0 8px 22px -6px rgb(76 141 255 / .55); }
