/* DNA control panel - design system */
:root {
  --bg: #0b0e14; --bg-2: #0f131b; --surface: #141923; --surface-2: #1a2030; --surface-3: #212939; --line: rgba(255,255,255,.07); --line-2: rgba(255,255,255,.12);
  --ink: #eef1f7; --ink-2: #c3cad8; --muted: #8e97ab; --muted-2: #6b7489;
  --accent: #7b6cff; --accent-2: #4fb7ff; --accent-ink: #fff; --ok: #34d399; --warn: #fbbf24; --danger: #fb7185; --info: #60a5fa; --violet: #a78bfa; --pink: #f472b6; --teal: #2dd4bf; --orange: #fb923c;
  --post: #60a5fa; --carousel: #a78bfa; --reel: #f472b6; --story: #fbbf24; --ad: #34d399; --video: #fb923c; --idea: #2dd4bf; --job: #8e97ab;
  --r: 14px; --r-s: 10px; --r-xs: 7px; --shadow: 0 10px 30px rgba(0,0,0,.35); --shadow-s: 0 4px 14px rgba(0,0,0,.25);
  --font: "Inter", "IBM Plex Sans Arabic", -apple-system, "Segoe UI", Roboto, sans-serif; --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --sidebar: 252px; --topbar: 64px;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; font-feature-settings: "cv02", "cv03", "cv04", "ss01"; }
a { color: var(--accent-2); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 16px; } h3 { font-size: 14px; }
.num, .kpi .value, td.num, .tabular { font-variant-numeric: tabular-nums; }
.ar, .auto { unicode-bidi: plaintext; }
[hidden] { display: none !important; }
::selection { background: rgba(123,108,255,.35); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; border: 2px solid var(--bg); } ::-webkit-scrollbar-track { background: transparent; }

/* ---- shell */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--bg-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px; gap: 6px; overflow-y: auto; }
.brandmark { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; }
.brandmark .logo { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; font-weight: 800; color: #fff; box-shadow: 0 6px 18px rgba(123,108,255,.35); }
.brandmark .t { font-weight: 700; font-size: 15px; letter-spacing: -.01em; } .brandmark .s { font-size: 11px; color: var(--muted); }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); padding: 12px 10px 4px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-s); color: var(--ink-2); font-weight: 500; transition: background .15s, color .15s; }
.nav a:hover { background: var(--surface); color: var(--ink); text-decoration: none; }
.nav a.active { background: linear-gradient(90deg, rgba(123,108,255,.22), rgba(79,183,255,.08)); color: var(--ink); box-shadow: inset 2px 0 0 var(--accent); }
.nav a svg { width: 17px; height: 17px; opacity: .85; flex: none; }
.nav a .badge { margin-left: auto; }
.nav .client-link { padding-left: 12px; } .nav .client-link .avatar { width: 22px; height: 22px; font-size: 10px; }
.sidebar .foot { margin-top: auto; padding: 10px 8px 0; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.content { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar); display: flex; align-items: center; gap: 14px; padding: 0 26px; background: rgba(11,14,20,.8); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 18px; } .topbar .sub { color: var(--muted); font-size: 12px; margin-top: -2px; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.page { padding: 24px 26px 60px; max-width: 1480px; margin: 0 auto; }
.menu-btn { display: none; }

/* ---- primitives */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow-s); }
.card.tight { padding: 14px; } .card.flat { box-shadow: none; }
.card .card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; } .card .card-h h2 { font-size: 15px; } .card .card-h .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.grid { display: grid; gap: 16px; } .grid.c2 { grid-template-columns: repeat(2, 1fr); } .grid.c3 { grid-template-columns: repeat(3, 1fr); } .grid.c4 { grid-template-columns: repeat(4, 1fr); } .grid.auto { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; } .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .row.between { justify-content: space-between; }
.muted { color: var(--muted); } .small { font-size: 12px; } .tiny { font-size: 11px; } .strong { font-weight: 600; } .mt { margin-top: 14px; } .mb { margin-bottom: 14px; }
.section-h { display: flex; align-items: baseline; gap: 12px; margin: 26px 0 12px; } .section-h h2 { font-size: 16px; } .section-h .muted { font-size: 12px; } .section-h .right { margin-left: auto; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 500; background: var(--surface-3); color: var(--ink-2); border: 1px solid transparent; white-space: nowrap; }
.pill.ok { background: rgba(52,211,153,.14); color: var(--ok); } .pill.bad { background: rgba(251,113,133,.14); color: var(--danger); } .pill.warn { background: rgba(251,191,36,.14); color: var(--warn); } .pill.info { background: rgba(96,165,250,.14); color: var(--info); } .pill.violet { background: rgba(167,139,250,.16); color: var(--violet); } .pill.ghost { background: transparent; border-color: var(--line-2); color: var(--muted); }
.badge { min-width: 18px; height: 18px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); display: inline-block; flex: none; } .dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(52,211,153,.18); } .dot.bad { background: var(--danger); box-shadow: 0 0 0 3px rgba(251,113,133,.18); } .dot.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(251,191,36,.18); } .dot.info { background: var(--info); }
.avatar { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; flex: none; background: var(--surface-3); overflow: hidden; } .avatar img { width: 100%; height: 100%; object-fit: cover; } .avatar.lg { width: 56px; height: 56px; border-radius: 16px; font-size: 18px; }
button, .btn { font: inherit; font-weight: 500; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 8px 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: background .15s, border-color .15s, transform .05s; line-height: 1.2; }
button:hover, .btn:hover { background: var(--surface-3); border-color: rgba(255,255,255,.18); text-decoration: none; } button:active { transform: translateY(1px); } button:disabled { opacity: .5; cursor: default; }
button.primary, .btn.primary { background: linear-gradient(135deg, var(--accent), #6b8cff); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(123,108,255,.28); } button.primary:hover { filter: brightness(1.08); }
button.danger { color: var(--danger); border-color: rgba(251,113,133,.35); } button.ghost { background: transparent; border-color: transparent; color: var(--muted); } button.ghost:hover { background: var(--surface-2); color: var(--ink); } button.sm { padding: 5px 9px; font-size: 12px; border-radius: 8px; } button.icon { padding: 7px; }
input, select, textarea { font: inherit; background: var(--bg-2); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 8px 11px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(123,108,255,.2); } textarea { width: 100%; min-height: 84px; resize: vertical; } input[type=date] { color-scheme: dark; }
.field { display: flex; flex-direction: column; gap: 5px; } .field label { font-size: 12px; color: var(--muted); font-weight: 500; } .field .hint { font-size: 11px; color: var(--muted-2); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 16px; } .form-grid .full { grid-column: 1 / -1; }
.segmented { display: inline-flex; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; gap: 2px; } .segmented button { border: none; background: transparent; padding: 5px 11px; border-radius: 7px; font-size: 12.5px; color: var(--muted); } .segmented button.on { background: var(--surface-3); color: var(--ink); box-shadow: var(--shadow-s); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 18px 0 16px; overflow-x: auto; } .tabs button { border: none; background: transparent; border-radius: 0; padding: 10px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; } .tabs button.on { color: var(--ink); border-bottom-color: var(--accent); } .tabs button:hover { background: transparent; color: var(--ink); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; } .table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: var(--surface); }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; } .table tr:last-child td { border-bottom: none; } .table tr:hover td { background: rgba(255,255,255,.02); } .table td.num, .table th.num { text-align: right; } .tablewrap { overflow: auto; max-height: 70vh; border-radius: var(--r-s); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-height: 96px; position: relative; overflow: hidden; }
.kpi .label { font-size: 12px; color: var(--muted); font-weight: 500; } .kpi .value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; } .kpi .value small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.kpi .delta { font-size: 12px; display: flex; gap: 6px; align-items: center; color: var(--muted); } .kpi .delta.up { color: var(--ok); } .kpi .delta.down { color: var(--danger); } .kpi canvas { position: absolute; right: 12px; bottom: 10px; width: 96px; height: 34px; opacity: .9; }
.kpi.accent { background: linear-gradient(135deg, rgba(123,108,255,.18), rgba(79,183,255,.06)); border-color: rgba(123,108,255,.35); }
.bar { height: 6px; border-radius: 4px; background: var(--surface-3); overflow: hidden; } .bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.score { display: inline-flex; align-items: center; gap: 6px; } .score .bar { width: 54px; }
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 37%, var(--surface) 63%); background-size: 400% 100%; animation: sk 1.4s ease infinite; border-radius: var(--r-s); min-height: 80px; } @keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.empty { padding: 26px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--r); }
.toast { position: fixed; bottom: 22px; right: 22px; background: var(--surface-2); border: 1px solid var(--line-2); padding: 11px 15px; border-radius: 12px; max-width: 460px; z-index: 90; box-shadow: var(--shadow); font-size: 13px; } .toast.bad { border-color: rgba(251,113,133,.5); }
.drawer-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 60; } .drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface); border-left: 1px solid var(--line-2); z-index: 61; overflow: auto; padding: 22px; box-shadow: var(--shadow); animation: slide .18s ease; } @keyframes slide { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer .drawer-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; } .drawer .drawer-h h2 { font-size: 16px; } .drawer .drawer-h button { margin-left: auto; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 70; display: grid; place-items: center; padding: 16px; } .modal { background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; width: min(620px, 100%); max-height: 90vh; overflow: auto; padding: 22px; box-shadow: var(--shadow); animation: pop .16s ease; } @keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h2 { margin-bottom: 12px; } .modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.chart-box { position: relative; height: 240px; } .chart-box.sm { height: 170px; } .chart-box.lg { height: 320px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.list { display: flex; flex-direction: column; } .list .item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: flex-start; } .list .item:last-child { border-bottom: none; } .list .item .when { color: var(--muted); font-size: 12px; min-width: 110px; font-variant-numeric: tabular-nums; }
.need { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-s); background: var(--surface-2); border: 1px solid var(--line); } .need.danger { border-color: rgba(251,113,133,.4); } .need.warn { border-color: rgba(251,191,36,.35); } .need .k { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.client-card { display: flex; flex-direction: column; gap: 12px; cursor: pointer; transition: transform .15s, border-color .15s; } .client-card:hover { transform: translateY(-2px); border-color: rgba(123,108,255,.5); }
.client-card .head { display: flex; gap: 12px; align-items: center; } .client-card .name { font-weight: 650; font-size: 15px; } .client-card .meta { color: var(--muted); font-size: 12px; }
.client-card .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; } .client-card .stat { background: var(--surface-2); border-radius: 9px; padding: 8px 9px; } .client-card .stat .v { font-size: 16px; font-weight: 650; } .client-card .stat .l { font-size: 11px; color: var(--muted); }
.client-card canvas { width: 100%; height: 40px; }
.timeline-day { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); } .timeline-day .d { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; } .timeline-day .ev { display: flex; gap: 10px; padding: 4px 0; align-items: flex-start; } .timeline-day .ev .tag { min-width: 76px; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 6px; text-transform: capitalize; } .tag.post { background: rgba(96,165,250,.16); color: var(--post); } .tag.carousel { background: rgba(167,139,250,.16); color: var(--carousel); } .tag.reel, .tag.video { background: rgba(244,114,182,.16); color: var(--reel); } .tag.story, .tag.stories { background: rgba(251,191,36,.16); color: var(--story); } .tag.ad, .tag.ads { background: rgba(52,211,153,.16); color: var(--ad); } .tag.idea { background: rgba(45,212,191,.16); color: var(--idea); } .tag.job, .tag.journal, .tag.plan, .tag.eye, .tag.gate, .tag.brain, .tag.run { background: var(--surface-3); color: var(--ink-2); } .tag.link { background: var(--surface-3); color: var(--muted); }
/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; } .cal .dow { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 4px 6px; }
.cal .day { min-height: 104px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 8px; cursor: pointer; transition: border-color .15s, background .15s; display: flex; flex-direction: column; gap: 4px; } .cal .day:hover { border-color: rgba(123,108,255,.55); background: var(--surface-3); } .cal .day.out { opacity: .35; cursor: default; } .cal .day.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px rgba(123,108,255,.4); }
.cal .day .n { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; } .cal .day .n b { color: var(--ink); font-weight: 600; } .cal .day .chips { display: flex; flex-wrap: wrap; gap: 3px; } .cal .day .chip { font-size: 10.5px; padding: 1px 6px; border-radius: 5px; font-weight: 600; } .cal .day .spend { margin-top: auto; font-size: 11px; color: var(--ad); font-variant-numeric: tabular-nums; }
.cal-nav { display: flex; align-items: center; gap: 10px; }
/* media */
.dropzone { border: 1.5px dashed var(--line-2); border-radius: var(--r); padding: 26px; text-align: center; color: var(--muted); transition: border-color .15s, background .15s; cursor: pointer; } .dropzone.over { border-color: var(--accent); background: rgba(123,108,255,.08); } .dropzone b { color: var(--ink); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; } .media-tile { position: relative; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; aspect-ratio: 1; }
.media-tile img, .media-tile video { width: 100%; height: 100%; object-fit: cover; display: block; } .media-tile .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 8px; font-size: 11px; background: linear-gradient(transparent, rgba(0,0,0,.75)); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-tile .x { position: absolute; top: 6px; right: 6px; opacity: 0; transition: opacity .15s; } .media-tile:hover .x { opacity: 1; } .media-tile .src { position: absolute; top: 6px; left: 6px; } .media-tile.off { opacity: .45; }
.progress { height: 8px; background: var(--surface-3); border-radius: 6px; overflow: hidden; } .progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .2s; }
/* circuit */
.circuit-wrap { overflow: auto; background: radial-gradient(circle at 1px 1px, rgba(255,255,255,.05) 1px, transparent 0) 0 0 / 22px 22px, var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
svg.circuit text { font-family: var(--font); fill: var(--ink); font-size: 12px; } svg.circuit .sub { fill: var(--muted); font-size: 10.5px; } svg.circuit .box { cursor: pointer; } svg.circuit .box rect.body { transition: stroke-width .15s; } svg.circuit .box:hover rect.body { stroke-width: 2.5; } svg.circuit .lane { fill: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.wizard-steps { display: flex; gap: 6px; margin-bottom: 18px; } .wizard-steps .st { flex: 1; padding: 8px 10px; border-radius: 9px; background: var(--surface-2); font-size: 12px; color: var(--muted); border: 1px solid var(--line); } .wizard-steps .st.on { color: var(--ink); border-color: var(--accent); background: rgba(123,108,255,.12); } .wizard-steps .st.done { color: var(--ok); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; } .chips label { display: inline-flex; gap: 6px; align-items: center; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 9px; cursor: pointer; font-size: 13px; } .chips label:has(input:checked) { border-color: var(--accent); background: rgba(123,108,255,.12); } .chips input { accent-color: var(--accent); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(1200px 600px at 20% -10%, rgba(123,108,255,.25), transparent), radial-gradient(900px 500px at 100% 100%, rgba(79,183,255,.15), transparent), var(--bg); } .login { width: min(380px, 92vw); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 13px; } .kv b { color: var(--muted); font-weight: 500; } .kv .v { unicode-bidi: plaintext; }
pre.block { white-space: pre-wrap; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-s); padding: 12px; font-size: 12.5px; font-family: var(--font); line-height: 1.55; unicode-bidi: plaintext; max-height: 380px; overflow: auto; }
details.acc { border: 1px solid var(--line); border-radius: var(--r-s); padding: 0; } details.acc summary { padding: 10px 14px; cursor: pointer; list-style: none; display: flex; gap: 10px; align-items: center; } details.acc summary::-webkit-details-marker { display: none; } details.acc[open] summary { border-bottom: 1px solid var(--line); } details.acc .body { padding: 12px 14px; }
.thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--surface-3); flex: none; }
.ratio-9x16 { aspect-ratio: 9 / 16; }
@media (max-width: 1100px) { .grid.c4 { grid-template-columns: repeat(2, 1fr); } .grid.c3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; } .sidebar { position: fixed; z-index: 50; left: 0; top: 0; width: var(--sidebar); transform: translateX(-100%); transition: transform .2s; } .sidebar.open { transform: none; box-shadow: var(--shadow); } .menu-btn { display: inline-flex; }
  .topbar { padding: 0 16px; } .page { padding: 16px 16px 60px; } .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } .form-grid { grid-template-columns: 1fr; } .client-card .stats { grid-template-columns: repeat(2, 1fr); } .cal .day { min-height: 70px; } .timeline-day { grid-template-columns: 1fr; gap: 4px; } .kv { grid-template-columns: 1fr; }
}
