/* Autonomy wireframes: one shared stylesheet for site, client portal and ops console */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --border: #e3e6eb;
  --border-strong: #cfd4dc;
  --text: #111827;
  --text-2: #374151;
  --muted: #6b7280;
  --accent: #0b7a5c;
  --accent-hover: #09664d;
  --accent-soft: #e5f3ee;
  --accent-text: #075a44;
  --ok: #0b7a5c;      --ok-soft: #e5f3ee;
  --warn: #a15c07;    --warn-soft: #fdf1dc;
  --bad: #b42318;     --bad-soft: #fde8e6;
  --info: #1d4ed8;    --info-soft: #e3ebfd;
  --tiktok: #111827;  --tiktok-soft: #eceef1;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --shadow-lg: 0 12px 32px rgba(16,24,40,.16);
  --side-w: 248px;
  --tabbar-h: 64px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 var(--font); overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; } h4 { font-size: .9rem; }
p { margin: 0 0 .8em; }
small, .small { font-size: .82rem; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }

.right { text-align: right; }
.center { text-align: center; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Layout shell (client + admin) ---------- */
.shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: min(84vw, var(--side-w));
  background: var(--surface); border-right: 1px solid var(--border);
  transform: translateX(-100%); transition: transform .2s ease; z-index: 60;
  display: flex; flex-direction: column; overflow-y: auto;
}
body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
.scrim { display: none; position: fixed; inset: 0; background: rgba(17,24,39,.4); z-index: 55; }
body.nav-open .scrim { display: block; }
.main { min-width: 0; padding-bottom: calc(var(--tabbar-h) + 16px); }
.content { padding: 16px; max-width: 1280px; margin: 0 auto; }
.content.narrow { max-width: 760px; }

.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 12px; font-weight: 700; color: var(--text); }
.brand:hover { text-decoration: none; }
.logo {
  width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 15px; flex: none;
}
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: .75rem; }
.side-section { padding: 6px 10px; }
.side-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 10px 4px; }
.side-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 500;
}
.side-link:hover { background: var(--surface-2); text-decoration: none; }
.side-link.active { background: var(--accent-soft); color: var(--accent-text); }
.side-link .count { margin-left: auto; font-size: .72rem; background: var(--bad); color: #fff; border-radius: 999px; padding: 1px 7px; }
.side-link .count.soft { background: var(--border); color: var(--text-2); }
.side-foot { margin-top: auto; padding: 14px 18px; border-top: 1px solid var(--border); font-size: .82rem; color: var(--muted); }
.ico { width: 20px; height: 20px; flex: none; display: inline-grid; place-items: center; font-size: 16px; line-height: 1; }

.topbar {
  position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.94); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; padding: 10px 16px; min-height: 56px;
}
.topbar .title { font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  display: inline-grid; place-items: center; cursor: pointer; color: var(--text-2); font-size: 17px; flex: none; position: relative;
}
.icon-btn:hover { background: var(--surface-2); text-decoration: none; }
.icon-btn .dot { position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); border: 2px solid #fff; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--tabbar-h); z-index: 50;
  background: var(--surface); border-top: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a, .tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font: 600 .7rem var(--font); color: var(--muted); background: none; border: 0; cursor: pointer; position: relative;
}
.tabbar a:hover { text-decoration: none; }
.tabbar .ico { font-size: 20px; }
.tabbar .active { color: var(--accent); }
.tabbar .badge-dot { position: absolute; top: 8px; left: calc(50% + 6px); background: var(--bad); color: #fff; font-size: .62rem; border-radius: 999px; padding: 0 5px; }

@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: var(--side-w) 1fr; }
  .sidebar { position: sticky; top: 0; height: 100vh; transform: none; width: var(--side-w); }
  .scrim, .tabbar, .menu-btn { display: none !important; }
  .main { padding-bottom: 32px; }
  .content { padding: 24px 28px; }
}

/* ---------- Page header ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.page-head > div:first-child { flex: 1 1 260px; min-width: 0; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: 6px; }

/* ---------- Grid ---------- */
.grid { display: grid; gap: 16px; }
.g2, .g3 { grid-template-columns: 1fr; } .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (min-width: 640px) { .g2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1100px) { .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.split { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 1100px) { .split { grid-template-columns: minmax(0,2fr) minmax(0,1fr); } .split.even { grid-template-columns: 1fr 1fr; } }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.nowrap { flex-wrap: nowrap; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: 16px; } .mt-s { margin-top: 8px; } .mb { margin-bottom: 16px; } .mb-0 { margin-bottom: 0; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.card.flush .card-head { padding: 14px 16px 0; }
.card.accent { border-color: var(--accent); background: linear-gradient(0deg, var(--surface), var(--accent-soft)); }
.card.warn { border-color: #f2c98a; background: var(--warn-soft); }
.card.dark { background: #0f172a; color: #e5e7eb; border-color: #0f172a; }
.card.dark .muted { color: #94a3b8; }

.kpi .label { font-size: .8rem; color: var(--muted); font-weight: 500; }
.kpi .value { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.kpi .delta { font-size: .8rem; font-weight: 600; }
.up { color: var(--ok); } .down { color: var(--bad); }

/* Big friendly tiles for the client side */
.big-tile { display: block; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text); }
.big-tile:hover { text-decoration: none; border-color: var(--accent); }
.big-tile .n { font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.big-tile .t { font-weight: 600; color: var(--text-2); }
.big-tile.urgent { border-color: #f2c98a; background: var(--warn-soft); }
.big-tile .go { color: var(--accent); font-weight: 600; font-size: .88rem; margin-top: 6px; display: block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 8px 14px;
  border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: 600 .9rem var(--font); cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger { color: var(--bad); border-color: #f1b8b2; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-dark { background: var(--tiktok); border-color: var(--tiktok); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-sm { min-height: 30px; padding: 4px 10px; font-size: .8rem; border-radius: 8px; }
.btn-lg { min-height: 54px; padding: 12px 20px; font-size: 1.05rem; border-radius: 14px; }
.btn-block { display: flex; width: 100%; }
.kbd { font: 600 .72rem ui-monospace, monospace; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; background: var(--surface-2); color: var(--text-2); }

/* ---------- Badges & chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 650; padding: 2px 9px; border-radius: 999px; background: var(--tiktok-soft); color: var(--text-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.plain::before { display: none; }
.b-ok { background: var(--ok-soft); color: var(--ok); }
.b-warn { background: var(--warn-soft); color: var(--warn); }
.b-bad { background: var(--bad-soft); color: var(--bad); }
.b-info { background: var(--info-soft); color: var(--info); }
.b-dark { background: var(--tiktok); color: #fff; }
.who { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 6px; }
.who.us { background: var(--accent-soft); color: var(--accent-text); }
.who.you { background: var(--warn-soft); color: var(--warn); }
.who.tt { background: var(--tiktok); color: #fff; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 999px; padding: 6px 12px; font: 600 .82rem var(--font); color: var(--text-2); cursor: pointer; }
.chip.active { background: var(--text); border-color: var(--text); color: #fff; }
.chip .n { opacity: .7; margin-left: 4px; }

.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--tiktok-soft); color: var(--text-2); display: inline-grid; place-items: center; font-size: .75rem; font-weight: 700; flex: none; }
.avatar.a1 { background: #dbeafe; color: #1e40af; } .avatar.a2 { background: #fce7f3; color: #9d174d; } .avatar.a3 { background: #fef3c7; color: #92400e; } .avatar.a4 { background: #e5f3ee; color: #075a44; }
.avatar.sq { border-radius: 8px; }
.thumb { width: 48px; height: 48px; border-radius: 10px; background: repeating-linear-gradient(45deg, #eef0f3, #eef0f3 6px, #e4e7eb 6px, #e4e7eb 12px); flex: none; display: grid; place-items: center; font-size: 22px; }
.thumb.lg { width: 100%; height: auto; aspect-ratio: 1; border-radius: var(--radius); font-size: 64px; }

/* ---------- Lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li, .list > a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); color: var(--text); }
.list > li:first-child, .list > a:first-child { border-top: 0; }
.list > a:hover { background: var(--surface-2); text-decoration: none; }
.list .main-t { font-weight: 600; }
.list .sub { font-size: .82rem; color: var(--muted); }
.list .end { margin-left: auto; text-align: right; flex: none; }
.list.tight > li, .list.tight > a { padding: 9px 0; }

/* ---------- Tables (scroll inside the card on phones, never the page) ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
tr.sel { background: var(--accent-soft) !important; }
td.check, th.check { width: 36px; }
.bulkbar { display: none; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; background: var(--text); color: #fff; font-size: .88rem; }
.bulkbar.show { display: flex; }
.bulkbar .btn { background: transparent; color: #fff; border-color: #4b5563; }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span, .label-t { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 4px; display: block; font-weight: 400; }
input[type=text], input[type=email], input[type=tel], input[type=search], input[type=number], input[type=date], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px;
  font: inherit; background: var(--surface); color: var(--text);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.search { position: relative; flex: 1 1 220px; }
.search input { padding-left: 36px; min-height: 40px; }
.search::before { content: "⌕"; position: absolute; left: 12px; top: 50%; transform: translateY(-52%); color: var(--muted); font-size: 18px; }
.upload { border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 22px 16px; text-align: center; background: var(--surface-2); color: var(--muted); }
.upload strong { color: var(--text); display: block; font-size: 1rem; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); margin-top: 8px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; background: var(--surface); }
.check-row input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.radio-cards { display: grid; gap: 10px; }
.radio-card { display: block; border: 2px solid var(--border); border-radius: var(--radius); padding: 14px; cursor: pointer; background: var(--surface); }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio-card input { accent-color: var(--accent); margin-right: 6px; }
.toggle { position: relative; width: 44px; height: 26px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle span { position: absolute; inset: 0; background: var(--border-strong); border-radius: 999px; transition: .15s; cursor: pointer; }
.toggle span::after { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: var(--shadow); }
.toggle input:checked + span { background: var(--accent); }
.toggle input:checked + span::after { transform: translateX(18px); }

/* ---------- Language switch ---------- */
.lang { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; flex: none; }
.lang button { border: 0; background: var(--surface); padding: 6px 10px; font: 600 .8rem var(--font); cursor: pointer; color: var(--text-2); }
.lang button + button { border-left: 1px solid var(--border); }
.lang button.active { background: var(--text); color: #fff; }
.lang-note { display: none; font-size: .8rem; background: var(--info-soft); color: var(--info); padding: 8px 16px; text-align: center; }
body.lang-alt .lang-note { display: block; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .tabs a { flex: none; background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 12px; font: 600 .88rem var(--font); color: var(--muted); cursor: pointer; }
.tabs .active { color: var(--text); border-bottom-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--text); }
[data-panel] { display: none; }
[data-panel].show { display: block; }

/* ---------- Progress, steps, timeline ---------- */
.progress { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .2s; }
.stepper { display: flex; gap: 4px; margin: 10px 0 4px; }
.stepper i { flex: 1; height: 6px; border-radius: 999px; background: var(--border); }
.stepper i.done { background: var(--accent); }
.stepper i.now { background: var(--accent); opacity: .45; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 20px 40px; }
.timeline li::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline .node { position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--surface); border: 2px solid var(--border-strong); color: var(--muted); }
.timeline li.done .node { background: var(--accent); border-color: var(--accent); color: #fff; }
.timeline li.done::before { background: var(--accent); }
.timeline li.now .node { border-color: var(--warn); background: var(--warn-soft); color: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.timeline li.wait .node { border-style: dashed; }
.timeline .t { font-weight: 650; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.timeline .d { font-size: .85rem; color: var(--muted); margin-top: 2px; }
.timeline .now-box { margin-top: 10px; }

.lifecycle { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; counter-reset: lc; }
.lifecycle > div { counter-increment: lc; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px; font-size: .85rem; position: relative; }
.lifecycle > div::before { content: counter(lc); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; margin-bottom: 6px; }
.lifecycle strong { display: block; }
.lifecycle .who { display: inline-block; margin-top: 6px; }

/* ---------- Kanban ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; }
.kanban .col { background: #eceef2; border-radius: var(--radius); padding: 10px; scroll-snap-align: start; min-height: 200px; }
.kanban .col-h { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: .85rem; padding: 4px 4px 10px; }
.kcard { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 8px; color: var(--text); box-shadow: var(--shadow); }
.kcard:hover { text-decoration: none; border-color: var(--accent); }
.kcard .n { font-weight: 650; }
.kcard .m { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.kcard .f { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 6px; }

/* ---------- Chat ---------- */
.chat { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: .92rem; }
.msg .meta { font-size: .72rem; opacity: .7; margin-top: 4px; }
.msg.them { background: var(--surface); border: 1px solid var(--border); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.me { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.sys { align-self: center; max-width: 92%; background: var(--tiktok-soft); color: var(--text-2); font-size: .82rem; border-radius: 10px; text-align: center; }
.msg .att { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,.06); font-size: .82rem; }
.msg.me .att { background: rgba(255,255,255,.18); }
.composer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); background: var(--surface); align-items: center; }
.composer input { min-height: 44px; }
.day { align-self: center; font-size: .72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

/* ---------- Bar chart (CSS only) ---------- */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 8px; }
.bars > div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.bars i { display: block; width: 100%; max-width: 34px; background: var(--accent); border-radius: 6px 6px 2px 2px; opacity: .85; }
.bars i.dim { background: var(--border-strong); }
.bars span { font-size: .68rem; color: var(--muted); }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 28px; }
.spark i { width: 4px; background: var(--accent); border-radius: 2px; opacity: .7; }

/* ---------- Banners, alerts ---------- */
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); margin-bottom: 16px; }
.banner.info { background: var(--info-soft); border-color: #c2d3fb; }
.banner.warn { background: var(--warn-soft); border-color: #f2c98a; }
.banner.ok { background: var(--ok-soft); border-color: #b4dccd; }
.banner.bad { background: var(--bad-soft); border-color: #f3b7b0; }
.banner .ico { font-size: 20px; margin-top: 1px; }
.demo-ribbon { background: #111827; color: #e5e7eb; font-size: .78rem; padding: 6px 16px; text-align: center; }
.demo-ribbon a { color: #9fe3cb; }
.sla { font-variant-numeric: tabular-nums; font-weight: 700; font-size: .82rem; }
.sla.ok { color: var(--ok); } .sla.warn { color: var(--warn); } .sla.bad { color: var(--bad); }

/* ---------- Modal / command palette ---------- */
.modal { position: fixed; inset: 0; background: rgba(17,24,39,.45); z-index: 100; display: none; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; }
.modal.open { display: flex; }
.modal-box { background: var(--surface); width: 100%; max-width: 560px; border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.palette input { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; min-height: 54px; font-size: 1rem; padding: 0 18px; }
.palette input:focus { outline: none; }
.palette .list { max-height: 50vh; overflow-y: auto; }
.palette .list > a { padding: 10px 18px; }
.palette .list > a.hl { background: var(--accent-soft); }
.palette .foot { padding: 8px 18px; font-size: .75rem; color: var(--muted); border-top: 1px solid var(--border); display: flex; gap: 12px; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 16px); transform: translateX(-50%); background: var(--text); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: .88rem; z-index: 120; display: none; max-width: calc(100vw - 32px); }
.toast.show { display: block; }
@media (min-width: 960px) { .toast { bottom: 24px; } }

/* ---------- Wizard ---------- */
.wizard-step { display: none; }
.wizard-step.show { display: block; }
.wizard-nav { display: flex; gap: 10px; margin-top: 20px; }
.wizard-nav .btn { flex: 1; }

/* ---------- Public site ---------- */
.site-nav { display: flex; align-items: center; gap: 12px; padding: 12px 16px; max-width: 1120px; margin: 0 auto; }
.site-nav .brand { padding: 0; }
.hero { padding: 40px 16px 32px; max-width: 1120px; margin: 0 auto; display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.1fr .9fr; padding: 64px 16px 48px; } }
.hero h1 { font-size: clamp(1.8rem, 5vw, 2.9rem); letter-spacing: -.03em; }
.hero .lead { font-size: 1.1rem; color: var(--text-2); }
.section { padding: 32px 16px; max-width: 1120px; margin: 0 auto; }
.section > h2 { font-size: 1.5rem; }
.price-card { display: flex; flex-direction: column; }
.price-card .price { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; }
.price-card .price small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.price-card ul { padding-left: 18px; margin: 10px 0 16px; color: var(--text-2); font-size: .92rem; }
.price-card .btn { margin-top: auto; }
.price-card.pop { border: 2px solid var(--accent); position: relative; }
.price-card.pop::after { content: "Most popular"; position: absolute; top: -12px; left: 16px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.phone { border: 10px solid #111827; border-radius: 34px; background: var(--bg); max-width: 300px; margin: 0 auto; overflow: hidden; box-shadow: var(--shadow-lg); }
.phone .scr { padding: 14px; }
.footer { padding: 24px 16px 40px; text-align: center; color: var(--muted); font-size: .82rem; }

/* Hub */
.hub-card { display: block; color: var(--text); }
.hub-card:hover { text-decoration: none; border-color: var(--accent); }
.hub-card .tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.screen-list { columns: 1; font-size: .88rem; padding-left: 18px; }
@media (min-width: 640px) { .screen-list { columns: 2; } }

.desktop-only { display: none; }
@media (min-width: 960px) { .desktop-only { display: initial; } .mobile-only { display: none !important; } }
@media (max-width: 639px) { .hide-sm { display: none !important; } }
[dir=rtl] .lang-note { direction: rtl; }
.list > button { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 0; border-top: 1px solid var(--border); width: 100%; background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.list > button:hover { background: var(--surface-2); }
.inbox { display: grid; gap: 16px; grid-template-columns: minmax(0,1fr); }
@media (min-width: 1100px) { .inbox { grid-template-columns: 340px minmax(0,1fr); align-items: start; } }
.meta button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.footer button { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.row.nowrap > * { min-width: 0; }
