/* CommsPost dashboard. Visual language: light gray canvas, one big white frame per page, soft gray cards,
   one black hero card, orange and yellow accents, large light numerals, pill controls and round arrow buttons.
   Every color is a token below. */
:root {
  --font: 'Readex Pro', 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  --canvas: #E9E9E9;
  --frame: #FFFFFF;
  --card: #F4F4F4;
  --card-2: #EDEDED;
  --ink: #1C1C1E;
  --ink-2: #2C2C2F;
  --fg: #141414;
  --muted-fg: #8B8B8B;
  --line: #E4E4E4;
  --border: #E4E4E4;
  --primary: #F2683C;
  --primary-hover: #E25526;
  --primary-fg: #FFFFFF;
  --yellow: #FFE34F;
  --accent: #FDEBE4;
  --accent-fg: #D9501F;
  --up: #2BAE4A;
  --success: #1F9D45; --success-bg: #E5F6EA;
  --warning: #C2790B; --warning-bg: #FFF4D6;
  --danger: #E0442E;  --danger-bg: #FDE7E3;
  --muted: #EFEFEF;
  --card-fg: var(--fg);
  --radius: 22px;
  --radius-lg: 30px;
  --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, .22);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --canvas: #0E0E0F; --frame: #161617; --card: #1F1F21; --card-2: #29292C; --ink: #000; --ink-2: #222225;
  --fg: #F2F2F2; --muted-fg: #8F8F94; --line: #2A2A2D; --border: #2A2A2D; --muted: #232325;
  --accent: #3A2118; --accent-fg: #FF9A73;
  --success-bg: #12301C; --warning-bg: #33280C; --danger-bg: #3A1914;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font: 400 14.5px/1.6 var(--font); color: var(--fg); background: var(--canvas); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.mono { font-family: ui-monospace, 'Fira Code', monospace; font-size: 12.5px; }
.muted { color: var(--muted-fg); }
.hidden { display: none !important; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- shell: top bar + white frame ---------- */
.app { max-width: 1320px; margin: 0 auto; padding: 18px 20px 40px; }
.topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.logo { width: 54px; height: 54px; border-radius: 18px; background: var(--ink); color: var(--yellow); display: grid; place-items: center; font: 600 17px/1 var(--font); letter-spacing: -.5px; flex: none; }
.bar { flex: 1; min-width: 0; height: 54px; display: flex; align-items: center; gap: 6px; padding: 6px; background: var(--ink); border-radius: 18px; color: #fff; }
.bar .nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.bar .nav::-webkit-scrollbar { display: none; }
.bar .nav a { height: 42px; padding: 0 18px; border-radius: 13px; display: inline-flex; align-items: center; gap: 8px; color: #BDBDC2; white-space: nowrap; font-size: 14px; transition: background .15s, color .15s; }
.bar .nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.bar .nav a.active { background: #fff; color: #1C1C1E; }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--primary); color: #fff; font-size: 11px; display: inline-grid; place-items: center; }
.bar .tools { display: flex; align-items: center; gap: 6px; flex: none; }
.chip-btn { height: 42px; padding: 0 12px; border-radius: 13px; border: 0; background: var(--ink-2); color: #E6E6E9; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap; }
.chip-btn:hover { background: #3A3A3E; color: #fff; }
.ws-av { width: 26px; height: 26px; border-radius: 9px; background: var(--yellow); color: #1C1C1E; display: grid; place-items: center; font-weight: 600; font-size: 11.5px; flex: none; }
.chip-btn b { font-weight: 400; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.round { width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: var(--ink-2); color: #E6E6E9; flex: none; position: relative; }
.round:hover { background: #3A3A3E; color: #fff; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--yellow); color: #1C1C1E; display: grid; place-items: center; font-weight: 600; font-size: 13px; border: 0; cursor: pointer; flex: none; }
.frame { background: var(--frame); border-radius: var(--radius-lg); padding: 30px; min-height: calc(100vh - 120px); }
.subnav { display: flex; gap: 6px; margin: -4px 0 24px; flex-wrap: wrap; }
.subnav a { height: 38px; padding: 0 16px; border-radius: 99px; background: var(--card); color: var(--muted-fg); display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; }
.subnav a:hover { color: var(--fg); }
.subnav a.on { background: var(--ink); color: #fff; }
:root[data-theme="dark"] .subnav a.on { background: #fff; color: #000; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 34px; font-weight: 300; letter-spacing: -.5px; line-height: 1.2; }
.page-head p { margin: 6px 0 0; color: var(--muted-fg); }
.page-head .sp { flex: 1; }
.stop-banner { background: var(--danger-bg); color: var(--danger); padding: 12px 18px; border-radius: 16px; display: flex; gap: 10px; align-items: center; margin-bottom: 18px; }

/* ---------- primitives ---------- */
.card { background: var(--card); border-radius: var(--radius); color: var(--card-fg); }
.card.dark { background: var(--ink); color: #fff; --card-fg: #fff; --muted-fg: #9A9AA0; --line: #2E2E31; }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 20px 22px 8px; }
.card-head h3 { margin: 0; font-size: 18px; font-weight: 400; }
.card-head p { margin: 2px 0 0; color: var(--muted-fg); font-size: 12.5px; }
.card-head .sp { flex: 1; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 99px; border: 0;
  background: var(--frame); color: var(--fg); font-size: 14px; cursor: pointer; white-space: nowrap; box-shadow: inset 0 0 0 1px var(--line); transition: background .15s, opacity .15s; }
.btn:hover { background: var(--card-2); }
.btn.primary { background: var(--primary); color: var(--primary-fg); box-shadow: none; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.dark { background: var(--ink); color: #fff; box-shadow: none; }
:root[data-theme="dark"] .btn.dark { background: #fff; color: #000; }
.btn.danger { background: var(--danger); color: #fff; box-shadow: none; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--card-2); }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn.lg { height: 52px; padding: 0 28px; font-size: 15px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn .spin { width: 16px; height: 16px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.arrow { width: 46px; height: 46px; border-radius: 50%; background: var(--frame); color: var(--fg); display: grid; place-items: center; flex: none; transition: transform .2s; }
a:hover .arrow { transform: rotate(-45deg); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 0; background: var(--card); cursor: pointer; color: var(--fg); }
.icon-btn:hover { background: var(--card-2); }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 99px; font-size: 12px; background: var(--frame); color: var(--muted-fg); white-space: nowrap; }
.frame > .chip, .page-head .chip { background: var(--card); }
.chip.ok { background: var(--success-bg); color: var(--success); }
.chip.warn { background: var(--warning-bg); color: var(--warning); }
.chip.bad { background: var(--danger-bg); color: var(--danger); }
.chip.info { background: var(--ink); color: #fff; }
:root[data-theme="dark"] .chip.info { background: #fff; color: #000; }
.chip.brand { background: var(--accent); color: var(--accent-fg); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.up { color: var(--up); }

/* pills (filters), underline tabs, segmented */
.pills { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.pills button { height: 38px; padding: 0 16px; border-radius: 99px; border: 0; background: var(--card); font-size: 13.5px; cursor: pointer; color: var(--muted-fg); }
.pills button:hover { color: var(--fg); }
.pills button.on { background: var(--ink); color: #fff; }
:root[data-theme="dark"] .pills button.on { background: #fff; color: #000; }
.pills button .n { opacity: .65; margin-inline-start: 5px; }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs button { background: none; border: 0; padding: 10px 0; color: var(--muted-fg); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--fg); border-color: var(--fg); }
.seg { display: inline-flex; background: var(--card-2); padding: 4px; border-radius: 99px; gap: 2px; }
.seg button { border: 0; background: none; height: 34px; padding: 0 16px; border-radius: 99px; cursor: pointer; color: var(--muted-fg); display: flex; align-items: center; gap: 7px; font-size: 13.5px; }
.seg button.on { background: var(--frame); color: var(--fg); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }

/* forms */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label, .label { font-size: 13.5px; }
.field .hint { color: var(--muted-fg); font-size: 12.5px; }
.input, .select, .textarea { width: 100%; height: 48px; border: 0; background: var(--frame); border-radius: 16px; padding: 0 16px; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .15s; }
.textarea { height: auto; min-height: 180px; padding: 14px 16px; resize: vertical; line-height: 1.8; }
.input:focus, .select:focus, .textarea:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--fg); }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--primary); flex: none; }

/* ---------- KPI cards (home) ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { border-radius: var(--radius); background: var(--card); padding: 20px 22px; display: flex; flex-direction: column; min-height: 196px; color: var(--fg); }
.kpi.dark { background: var(--ink); color: #fff; }
.kpi .top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.kpi h4 { margin: 0; font-size: 17px; font-weight: 400; }
.kpi small { color: var(--muted-fg); font-size: 12px; display: block; margin-top: 2px; }
.kpi.dark small { color: #8F8F94; }
.kpi .tag { height: 30px; padding: 0 12px; border-radius: 99px; background: var(--card-2); font-size: 12px; display: inline-flex; align-items: center; color: var(--muted-fg); white-space: nowrap; }
.kpi.dark .tag { background: #2C2C2F; color: #CFCFD4; }
.kpi .bottom { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.kpi .num { font-size: 46px; font-weight: 300; line-height: 1; letter-spacing: -1px; }
.kpi .delta { font-size: 12.5px; margin-top: 10px; }
.kpi.dark .arrow { background: #fff; color: #000; }

/* charts */
.bars { display: grid; grid-template-columns: 34px 1fr; gap: 8px; height: 270px; padding: 30px 6px 0; }
.bars .axis { display: flex; flex-direction: column; justify-content: space-between; color: var(--muted-fg); font-size: 11.5px; padding-bottom: 28px; text-align: end; }
.bars .cols { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; position: relative; }
.bars .col { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.bars .track { flex: 1; width: 100%; max-width: 66px; border-radius: 20px; background: var(--card-2); position: relative; display: flex; align-items: flex-end; }
.bars .fill { width: 100%; border-radius: 20px; background: var(--primary); min-height: 8px; }
.bars .col.peak .fill { box-shadow: inset 0 0 0 2px var(--card), 0 0 0 1.5px var(--primary); }
.bars .tip { position: absolute; bottom: calc(var(--h) + 14px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 9px; white-space: nowrap; }
.bars .tip::after { content: ''; position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--ink); background: var(--card); }
.bars .lbl { font-size: 12px; color: var(--muted-fg); white-space: nowrap; }
.bars .avg { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--fg); opacity: .5; pointer-events: none; }
.donut-wrap { display: grid; place-items: center; padding: 6px 0 14px; }
.donut { width: 220px; height: 220px; }
.donut text { font: 400 13px var(--font); fill: var(--fg); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; font-size: 12.5px; padding: 0 16px 20px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; margin-inline-end: 6px; vertical-align: -1px; }

/* ---------- lists & tables ---------- */
.list > * + * { border-top: 1px solid var(--line); }
.li { display: flex; align-items: center; gap: 12px; padding: 14px 22px; }
.li .t { flex: 1; min-width: 0; }
.li .t b { display: block; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .t small { color: var(--muted-fg); font-size: 12.5px; }
.li.click { cursor: pointer; } .li.click:hover { background: var(--card-2); }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: start; font-size: 12.5px; color: var(--muted-fg); font-weight: 400; padding: 12px 18px; }
.tbl td { padding: 14px 18px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--card-2); }
.tbl-wrap { overflow-x: auto; }
.cap { max-width: 420px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.empty { text-align: center; padding: 46px 20px; color: var(--muted-fg); }
.empty .ic { width: 60px; height: 60px; border-radius: 50%; background: var(--frame); color: var(--fg); display: grid; place-items: center; margin: 0 auto 14px; }
.empty .ic svg { width: 24px; height: 24px; }
.empty h4 { color: var(--fg); margin: 0 0 4px; font-size: 16px; font-weight: 400; }
.empty p { margin: 0 0 16px; }
.skel { background: linear-gradient(90deg, var(--card), var(--card-2), var(--card)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); }
@keyframes sk { to { background-position: -200% 0; } }

/* platform badges */
.pf { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; font-size: 15px; }
.pf.sm { width: 24px; height: 24px; font-size: 11px; }
.pf.lg { width: 48px; height: 48px; font-size: 19px; }
.pf svg { width: 52%; height: 52%; fill: #fff; stroke: none; }
.pf svg.i { fill: none; stroke: #fff; stroke-width: 1.8; }
.pf-facebook { background: #1877F2; } .pf-instagram, .pf-instagram-standalone { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.pf-linkedin, .pf-linkedin-page, .pf-linkedin-personal { background: #0A66C2; } .pf-youtube { background: #FF0000; } .pf-tiktok, .pf-x { background: #000; }
.pf-stack { display: inline-flex; } .pf-stack .pf { box-shadow: 0 0 0 2px var(--card); } .pf-stack .pf + .pf { margin-inline-start: -7px; }

/* account picker */
.acct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.acct { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 0; border-radius: 18px; cursor: pointer; background: var(--frame); text-align: start; }
.acct:hover { box-shadow: inset 0 0 0 1px var(--muted-fg); }
.acct.on { box-shadow: inset 0 0 0 2px var(--fg); }
.acct.off { opacity: .5; cursor: not-allowed; }
.acct .t { flex: 1; min-width: 0; } .acct .t b { display: block; font-weight: 400; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .acct .t small { color: var(--muted-fg); font-size: 12px; }
.acct .tick { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line); display: grid; place-items: center; flex: none; }
.acct.on .tick { background: var(--primary); color: #fff; box-shadow: none; }
.acct:not(.on) .tick svg { visibility: hidden; }
.acct .tick svg { width: 13px; height: 13px; stroke-width: 3; }

/* composer */
.step { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.step .n { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 13px; }
:root[data-theme="dark"] .step .n { background: #fff; color: #000; }
.step h3 { margin: 0; font-size: 18px; font-weight: 400; }
.counter { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.drop { display: block; border-radius: 20px; padding: 26px; text-align: center; color: var(--muted-fg); cursor: pointer; background: var(--frame); box-shadow: inset 0 0 0 1.5px var(--line); transition: box-shadow .15s; }
.drop:hover, .drop.over { box-shadow: inset 0 0 0 1.5px var(--primary); color: var(--fg); }
.drop svg { width: 28px; height: 28px; margin-bottom: 6px; }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.thumb { width: 110px; border-radius: 16px; overflow: hidden; position: relative; background: var(--frame); }
.thumb img, .thumb video { width: 100%; height: 84px; object-fit: cover; display: block; }
.thumb small { display: block; padding: 5px 8px; font-size: 11px; color: var(--muted-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: ltr; }
.thumb button { position: absolute; top: 6px; inset-inline-end: 6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.thumb button svg { width: 14px; height: 14px; }
.sticky-bar { position: sticky; bottom: 12px; background: var(--ink); color: #fff; padding: 8px; padding-inline-start: 22px; display: flex; gap: 10px; align-items: center; border-radius: 99px; margin-top: 6px; z-index: 5; box-shadow: var(--shadow-lg); }
.sticky-bar .muted { color: #A8A8AE; }

/* post preview */
.pv { position: sticky; top: 16px; }
.pv-card { border-radius: 20px; background: var(--frame); overflow: hidden; }
.pv-head { display: flex; gap: 10px; align-items: center; padding: 14px 16px; }
.pv-head b { display: block; font-size: 13.5px; font-weight: 500; } .pv-head small { color: var(--muted-fg); font-size: 11.5px; }
.pv-text { padding: 0 16px 14px; white-space: pre-wrap; word-wrap: break-word; font-size: 14px; line-height: 1.75; unicode-bidi: plaintext; text-align: start; }
.pv-media { background: var(--card-2); aspect-ratio: 1 / 1; display: grid; place-items: center; }
.pv-media img, .pv-media video { width: 100%; height: 100%; object-fit: cover; }
.pv-foot { display: flex; justify-content: space-around; padding: 12px; color: var(--muted-fg); }

/* approval card */
.ap { overflow: hidden; }
.ap-head { display: flex; gap: 10px; align-items: center; padding: 18px 22px; flex-wrap: wrap; }
.ap-head .id { font-family: ui-monospace, monospace; letter-spacing: 1px; background: var(--frame); border-radius: 10px; padding: 3px 10px; font-size: 13px; }
.ap-item { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; padding: 16px 22px; align-items: start; border-top: 1px solid var(--line); }
.ap-item b { font-weight: 500; }
.ap-item .capbox { white-space: pre-wrap; background: var(--frame); border-radius: 16px; padding: 14px 16px; margin-top: 10px; unicode-bidi: plaintext; max-height: 220px; overflow: auto; }
.ap-item .mini-thumbs { display: flex; gap: 6px; }
.ap-item .mini-thumbs img, .ap-item .mini-thumbs .vid { width: 70px; height: 70px; border-radius: 14px; object-fit: cover; background: var(--frame); display: grid; place-items: center; }
.issue { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; margin-top: 8px; padding: 9px 12px; border-radius: 12px; }
.issue.err { background: var(--danger-bg); color: var(--danger); } .issue.warn { background: var(--warning-bg); color: var(--warning); }
.issue svg { width: 16px; height: 16px; margin-top: 2px; }
.ap-foot { display: flex; gap: 10px; align-items: center; padding: 16px 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ap-foot .sp { flex: 1; }

/* connect flow */
.stepper { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; align-items: center; }
.stepper div { display: flex; align-items: center; gap: 8px; color: var(--muted-fg); font-size: 13px; }
.stepper div i { width: 28px; height: 28px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-style: normal; font-size: 12px; }
.stepper div.on { color: var(--fg); } .stepper div.on i { background: var(--ink); color: #fff; }
.stepper div.done i { background: var(--primary); color: #fff; }
.stepper .ln { width: 26px; height: 1px; background: var(--line); }
.pf-tile { display: flex; flex-direction: column; gap: 16px; padding: 22px; border: 0; border-radius: var(--radius); background: var(--card); cursor: pointer; text-align: start; transition: background .15s; }
.pf-tile:hover { background: var(--card-2); }
.pf-tile:hover .arrow { transform: rotate(-45deg); }
.pf-tile b { font-size: 17px; font-weight: 400; } .pf-tile small { color: var(--muted-fg); }
.method { padding: 26px; border-radius: var(--radius); background: var(--ink); color: #fff; }
.method .muted { color: #A8A8AE; }
.method .chip.brand { background: var(--primary); color: #fff; }
.method h3 { margin: 10px 0 6px; font-size: 28px; font-weight: 300; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.facts div { background: #2A2A2D; border-radius: 16px; padding: 12px 14px; }
.facts small { color: #A8A8AE; display: block; font-size: 12px; } .facts b { font-size: 13.5px; font-weight: 400; }
.legal { background: var(--frame); border-radius: 18px; padding: 18px 20px; white-space: pre-wrap; line-height: 2; box-shadow: inset 0 0 0 1px var(--line); }
.other-m { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--frame); }
.other-m + .other-m { margin-top: 8px; }

/* modal, toast, dropdown */
.overlay { position: fixed; inset: 0; background: rgba(10, 10, 10, .45); z-index: 50; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(540px, 100%); max-height: 90vh; overflow: auto; background: var(--frame); border-radius: 28px; box-shadow: var(--shadow-lg); animation: pop .18s; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.modal.wide { width: min(780px, 100%); }
.modal-head { padding: 22px 24px 0; display: flex; align-items: center; gap: 10px; }
.modal-head h3 { margin: 0; font-size: 20px; font-weight: 400; flex: 1; }
.modal-body { padding: 14px 24px; }
.modal-foot { padding: 14px 24px 22px; display: flex; gap: 10px; justify-content: flex-end; }
.toasts { position: fixed; bottom: 22px; inset-inline-start: 22px; z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: #fff; padding: 13px 18px; border-radius: 99px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; max-width: 420px; animation: pop .2s; }
.toast.bad { background: var(--danger); }
.dd { position: absolute; z-index: 60; background: var(--frame); color: var(--fg); border-radius: 20px; box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line); padding: 6px; min-width: 250px; }
.dd button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 10px 12px; border: 0; background: none; border-radius: 14px; cursor: pointer; text-align: start; }
.dd button:hover { background: var(--card); }
.dd button.on { background: var(--card-2); }
.dd .sep { height: 1px; background: var(--line); margin: 6px; }

/* timeline */
.tl { position: relative; padding-inline-start: 28px; }
.tl::before { content: ''; position: absolute; inset-inline-start: 9px; top: 6px; bottom: 6px; width: 1.5px; background: var(--line); }
.tl-i { position: relative; padding: 0 0 18px; }
.tl-i::before { content: ''; position: absolute; inset-inline-start: -24px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 2.5px solid var(--fg); }
.tl-i.ok::before { border-color: var(--success); } .tl-i.bad::before { border-color: var(--danger); } .tl-i.warn::before { border-color: var(--primary); }
.tl-i small { color: var(--muted-fg); display: block; font-size: 12.5px; }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; gap: 14px; padding: 14px; }
.login-art { background: var(--ink); color: #fff; border-radius: 32px; padding: 48px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.login-art .brand { display: flex; align-items: center; gap: 12px; font-size: 18px; position: relative; }
.login-art .brand .logo { background: var(--yellow); color: #1C1C1E; }
.login-art h1 { font-size: 48px; line-height: 1.25; margin: auto 0 16px; max-width: 540px; font-weight: 300; letter-spacing: -.5px; position: relative; }
.login-art h1 em { font-style: normal; color: var(--primary); }
.login-art p { color: #A8A8AE; max-width: 460px; font-size: 15.5px; position: relative; }
.login-art ul { list-style: none; padding: 0; margin: 28px 0 0; display: flex; gap: 10px; flex-wrap: wrap; position: relative; }
.login-art li { display: flex; gap: 10px; align-items: center; background: #2A2A2D; border-radius: 99px; padding: 7px; padding-inline-end: 16px; font-size: 13.5px; }
.login-art li span { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); display: grid; place-items: center; }
.login-art li span svg { width: 15px; height: 15px; }
.login-art .deco { position: absolute; inset-inline-end: -70px; top: -70px; width: 280px; height: 280px; border-radius: 50%; border: 50px solid var(--yellow); }
.login-art .deco2 { position: absolute; inset-inline-end: 150px; top: 120px; width: 70px; height: 70px; border-radius: 50%; background: var(--primary); }
.login-form { display: grid; place-items: center; padding: 32px 20px; background: var(--frame); border-radius: 32px; }
.login-box { width: min(400px, 100%); }
.login-box h2 { font-size: 36px; margin: 0 0 8px; font-weight: 300; }
.gbtn { width: 100%; height: 56px; border-radius: 99px; border: 0; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 15px; cursor: pointer; }
:root[data-theme="dark"] .gbtn { background: #fff; color: #000; }
.gbtn:hover { opacity: .9; }
.gbtn svg { width: 22px; height: 22px; background: #fff; border-radius: 50%; padding: 3px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted-fg); font-size: 12.5px; margin: 22px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.alert { padding: 13px 16px; border-radius: 16px; display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; margin-bottom: 16px; background: var(--card); }
.card .alert { background: var(--frame); }
.alert.bad { background: var(--danger-bg); color: var(--danger); } .alert.warn { background: var(--warning-bg); color: var(--warning); } .alert.ok { background: var(--success-bg); color: var(--success); }
.alert svg { margin-top: 2px; }

/* first-run checklist */
.setup { margin-bottom: 16px; }
.progress { width: 170px; height: 8px; border-radius: 99px; background: var(--card-2); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 99px; background: var(--primary); }
.setup-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; padding: 12px 16px 16px; }
.setup-step { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 18px; background: var(--frame); }
.setup-step > div { flex: 1; } .setup-step b { display: block; font-size: 14px; font-weight: 400; } .setup-step small { color: var(--muted-fg); font-size: 12.5px; }
.setup-step .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--card); font-size: 13px; flex: none; }
.setup-step.done .n { background: var(--primary); color: #fff; } .setup-step.done b { text-decoration: line-through; color: var(--muted-fg); }
.setup-step .n svg { width: 15px; height: 15px; stroke-width: 3; }

/* calendar */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.cal-head h3 { margin: 0; font-size: 22px; font-weight: 300; min-width: 160px; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal > div { min-height: 116px; padding: 8px; background: var(--frame); border-radius: 16px; }
.cal .dow { min-height: 0; background: none; color: var(--muted-fg); font-size: 12.5px; text-align: center; padding: 4px; }
.cal .out { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.cal .out .d { opacity: .45; }
.cal .d { font-size: 12.5px; color: var(--muted-fg); display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; }
.cal .today .d { background: var(--primary); color: #fff; }
.cal-ev { display: flex; align-items: center; gap: 5px; width: 100%; border: 0; text-align: start; font-size: 11.5px; padding: 4px 6px; border-radius: 9px; margin-top: 4px; cursor: pointer; background: var(--ink); color: #fff; white-space: nowrap; overflow: hidden; }
.cal-ev.ok { background: var(--card); color: var(--fg); } .cal-ev.bad { background: var(--danger-bg); color: var(--danger); } .cal-ev.wait { background: var(--yellow); color: #1C1C1E; }
.cal-ev .pf.sm { width: 16px; height: 16px; }
.cal-ev span { overflow: hidden; text-overflow: ellipsis; }

/* responsive */
.top-tools { display: none; gap: 6px; margin-inline-start: auto; }
@media (max-width: 1100px) { .kpis, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: minmax(0, 1fr); } .pv { position: static; } }
@media (max-width: 860px) {
  .app { padding: 10px 10px 30px; }
  .topbar { flex-wrap: wrap; }
  .bar { order: 3; flex-basis: 100%; }
  .bar .tools { display: none; }
  .top-tools { display: flex; }
  .top-tools .round { background: var(--frame); color: var(--fg); }
  .frame { padding: 18px 16px; border-radius: 24px; }
  .page-head h2 { font-size: 26px; }
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); } .facts { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; } .login-art { display: none; }
  .ap-item { grid-template-columns: auto 1fr; } .ap-item > :last-child { grid-column: 1 / -1; }
  .cal > div { min-height: 76px; padding: 4px; } .cal-ev span { display: none; }
  .hide-sm { display: none !important; }
}
@media (max-width: 520px) { .kpis, .g4 { grid-template-columns: minmax(0, 1fr); } .kpi { min-height: 160px; } }
