/* Foodera — design tokens follow the brand palette: navy #0B1730, slate #4A5467, blue #5E8CC4 */
:root {
  --navy: #0b1730;
  --slate: #4a5467;
  --blue: #5e8cc4;
  --blue-soft: #9ab8dc;

  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --border: #dde3eb;
  --text: #0b1730;
  --text-2: #4a5467;
  --muted: #7a8496;
  --primary: #0b1730;
  --primary-text: #ffffff;
  --accent: #5e8cc4;
  --header: #7f9cbd;
  --ok: #1f8a5b;      --ok-bg: #e3f4ec;
  --warn: #a66a00;    --warn-bg: #fdf1dc;
  --danger: #c0392b;  --danger-bg: #fbe6e3;
  --info: #2f6aa8;    --info-bg: #e3edf8;
  --shadow: 0 1px 2px rgba(11, 23, 48, .06), 0 4px 16px rgba(11, 23, 48, .06);
  --radius: 12px;
  --font: "Inter", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070f20; --surface: #0e1a33; --surface-2: #142342; --border: #22314f;
    --text: #e8edf5; --text-2: #b4bfd1; --muted: #8592a8;
    --primary: #5e8cc4; --primary-text: #071022; --accent: #8fb2de; --header: #0e1a33;
    --ok: #4fc58e; --ok-bg: #12301f; --warn: #f0b24a; --warn-bg: #33270f;
    --danger: #f07a6c; --danger-bg: #3a1714; --info: #8fb2de; --info-bg: #142a47;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #070f20; --surface: #0e1a33; --surface-2: #142342; --border: #22314f;
  --text: #e8edf5; --text-2: #b4bfd1; --muted: #8592a8;
  --primary: #5e8cc4; --primary-text: #071022; --accent: #8fb2de; --header: #0e1a33;
  --ok: #4fc58e; --ok-bg: #12301f; --warn: #f0b24a; --warn-bg: #33270f;
  --danger: #f07a6c; --danger-bg: #3a1714; --info: #8fb2de; --info-bg: #142a47;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[dir="rtl"] .flip .ic { transform: scaleX(-1); }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); color: #c9d4e6; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 12px 24px; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: #fff; }
.logo { height: 30px; width: auto; display: block; }
.sidebar .nav-group { margin-top: 14px; }
.sidebar .nav-title { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #7f8ca5; padding: 6px 12px; }
.sidebar a.nav { display: flex; align-items: center; gap: 10px; color: #c9d4e6; padding: 9px 12px; border-radius: 9px; font-size: .92rem; }
.sidebar a.nav:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.sidebar a.nav.active { background: var(--blue); color: #fff; }
.sidebar .count { margin-inline-start: auto; background: var(--danger); color: #fff; font-size: .7rem; border-radius: 99px; padding: 1px 7px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.topbar .title { font-weight: 600; font-size: 1.05rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 38px; height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-size: .85rem; }
.icon-btn:hover { background: var(--surface-2); text-decoration: none; }
.menu-btn { display: none; }
.content { padding: 24px; max-width: 1400px; width: 100%; }
.user-chip { display: flex; flex-direction: column; line-height: 1.2; text-align: end; font-size: .82rem; }
.user-chip span { color: var(--muted); font-size: .74rem; }

/* ---------- Components ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px; min-width: 0; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 18px; }
.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)); }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.kpi .label { color: var(--muted); font-size: .8rem; display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 1.55rem; font-weight: 700; margin-top: 4px; letter-spacing: -.02em; }
.kpi .sub { font-size: .78rem; color: var(--text-2); }
.kpi.dark { background: var(--navy); color: #fff; border-color: var(--navy); }
.kpi.dark .label { color: #9fb0cc; }

.btn { display: inline-flex; align-items: center; gap: 7px; justify-content: center; padding: 9px 16px; border-radius: 10px; border: 1px solid transparent; background: var(--primary); color: var(--primary-text); font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.btn:hover { filter: brightness(1.12); text-decoration: none; }
.btn .ic { width: 17px; height: 17px; }
.btn-accent { background: var(--blue); color: #fff; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: var(--surface-2); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: .8rem; border-radius: 8px; }
.btn-lg { padding: 13px 22px; font-size: 1rem; }
.btn-block { width: 100%; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .74rem; font-weight: 600; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-accent { background: var(--info-bg); color: var(--accent); }
.badge-muted { background: var(--surface-2); color: var(--muted); }

.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid transparent; }
.alert-success { background: var(--ok-bg); color: var(--ok); }
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-warn { background: var(--warn-bg); color: var(--warn); }
.alert-info { background: var(--info-bg); color: var(--info); }

.table-wrap { overflow-x: auto; margin: 0 -2px; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 10px 10px; text-align: start; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: var(--surface-2); }
tbody tr:hover { background: var(--surface-2); }
td.num, th.num { text-align: end; font-variant-numeric: tabular-nums; }
tfoot td { font-weight: 700; }

form .row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 14px; }
label { display: block; font-size: .82rem; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url], input[type=tel], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: .92rem;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
textarea { min-height: 90px; resize: vertical; }
input[type=file] { font-size: .85rem; max-width: 100%; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; color: var(--text); }
.check input { margin-top: 4px; }
.inline-form { display: inline; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters > div { min-width: 150px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--text-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--text); border-color: var(--blue); font-weight: 600; }
.tabs a:hover { text-decoration: none; color: var(--text); }

.chart svg { width: 100%; height: 180px; display: block; }
.chart .bar { fill: var(--blue); }
.chart .bar:hover { fill: var(--navy); }
:root[data-theme="dark"] .chart .bar:hover { fill: var(--accent); }
.chart-labels { direction: ltr; display: flex; font-size: .68rem; color: var(--muted); margin-top: 4px; }
.chart-labels span { flex: 1; text-align: center; overflow: visible; white-space: nowrap; min-width: 0; }
.meter { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.meter.ok > span { background: var(--ok); } .meter.warn > span { background: var(--warn); } .meter.danger > span { background: var(--danger); }
.split-bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; }
.split-bar span { display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .8rem; color: var(--text-2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; vertical-align: middle; }

.empty { text-align: center; color: var(--muted); padding: 28px 10px; }
.steps { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.steps span { flex: 1; min-width: 110px; padding: 8px 10px; border-radius: 9px; background: var(--surface-2); color: var(--muted); font-size: .8rem; font-weight: 600; text-align: center; }
.steps span.done { background: var(--ok-bg); color: var(--ok); }
.steps span.current { background: var(--navy); color: #fff; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 6px 0 6px 18px; border-inline-start: 2px solid var(--border); position: relative; padding-inline-start: 16px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: -6px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 480px; overflow-y: auto; padding: 4px; }
.msg { max-width: 78%; padding: 10px 13px; border-radius: 14px; background: var(--surface-2); }
.msg.mine { align-self: flex-end; background: var(--navy); color: #fff; }
:root[data-theme="dark"] .msg.mine { background: var(--blue); color: #071022; }
.msg .meta { font-size: .72rem; opacity: .7; margin-bottom: 2px; }
.pill-tabs { display: inline-flex; background: var(--surface-2); padding: 3px; border-radius: 10px; gap: 2px; max-width: 100%; overflow-x: auto; }
.pill-tabs a { padding: 5px 12px; border-radius: 8px; color: var(--text-2); font-size: .82rem; white-space: nowrap; }
.pill-tabs a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.pill-tabs a:hover { text-decoration: none; }
.order-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.order-card .src { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.brand-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-inline-end: 6px; vertical-align: middle; }
.score-ring { width: 130px; height: 130px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; font-weight: 800; margin: 0 auto 10px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: .9rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.qr-box { background: #fff; padding: 16px; border-radius: 14px; display: inline-block; }
.lock-screen { max-width: 760px; margin: 0 auto; }

/* ---------- Auth & public pages ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero { background: var(--navy); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-hero::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(94,140,196,.45), transparent 70%); inset-inline-end: -120px; bottom: -120px; }
.auth-hero h1 { font-size: 2.4rem; font-weight: 800; line-height: 1.15; }
.auth-hero .tag { color: var(--blue-soft); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 32px 16px; background: var(--bg); }
.auth-form .card { width: 100%; max-width: 420px; padding: 28px; }
.auth-tools { position: absolute; top: 14px; inset-inline-end: 14px; display: flex; gap: 6px; z-index: 5; }

.public-nav { background: var(--header); color: #fff; }
.public-nav .inner { max-width: 1180px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 18px; }
.public-nav a { color: #fff; font-size: .9rem; }
.public-nav .spacer { flex: 1; }
.public-nav .icon-btn { color: var(--text); }
.hero { max-width: 1180px; margin: 0 auto; padding: 64px 20px 40px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.eyebrow { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; line-height: 1.08; margin: 12px 0 18px; }
.hero-card { background: var(--navy); color: #fff; border-radius: 18px; padding: 36px; box-shadow: 0 20px 50px rgba(11,23,48,.3); }
.hero-card h2 { font-size: 1.9rem; font-weight: 800; }
.modules { max-width: 1180px; margin: 0 auto; padding: 20px 20px 60px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.module { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; }
.module .ic { width: 30px; height: 30px; color: var(--blue); margin-bottom: 10px; }
.footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .modules { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: 270px; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; }
  .menu-btn { display: inline-flex; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 28px 20px; min-height: auto; }
  .auth-hero h1 { font-size: 1.7rem; }
  .hero { grid-template-columns: 1fr; padding-top: 36px; }
  .user-chip { display: none; }
}
@media (max-width: 600px) {
  .content { padding: 16px; }
  .topbar { padding: 10px 16px; }
  .g4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kpi .value { font-size: 1.25rem; }
  .modules { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .public-nav .hide-sm { display: none; }
}
@media print { .sidebar, .topbar, .no-print { display: none !important; } .shell { display: block; } .card { box-shadow: none; } }

/* ---------- User guide (works in the app shell and on the public site) ---------- */
.guide { --g-card: var(--s-card, var(--surface)); --g-border: var(--s-border-strong, var(--border)); --g-text: var(--s-text, var(--text));
  --g-muted: var(--s-muted, var(--text-2)); --g-accent: var(--s-green, var(--blue)); --g-soft: color-mix(in srgb, var(--g-accent) 14%, transparent); color: var(--g-text); }
.g-head h1 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 800; margin: 0 0 6px; letter-spacing: -.02em; }
.g-head p, .g-muted { color: var(--g-muted); }
.g-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 0 16px; margin-bottom: 4px; }
.g-tabs a { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--g-border); color: var(--g-text); font-size: .85rem; font-weight: 600; background: var(--g-card); }
.g-tabs a.active, .g-tabs a:hover { background: var(--g-accent); border-color: var(--g-accent); color: #fff; text-decoration: none; }
.g-tabs .ic { width: 17px; height: 17px; }
.g-card { background: var(--g-card); border: 1px solid var(--g-border); border-radius: 16px; padding: 24px; margin-bottom: 18px; }
.g-card h2 { font-size: 1.25rem; margin: 0 0 6px; }
.g-ic { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--g-soft); color: var(--g-accent); flex: none; }
.g-ic-lg { width: 56px; height: 56px; } .g-ic-lg .ic { width: 28px; height: 28px; }

/* Cycle diagram: horizontal chain on wide screens, vertical timeline on phones */
.g-cycle { list-style: none; padding: 0; margin: 22px 0 4px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; counter-reset: g; }
.g-cycle-sm { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.g-cycle li { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 4px; }
.g-cycle li:not(:last-child)::after { content: ""; position: absolute; top: 28px; inset-inline-start: calc(50% + 32px); width: calc(100% - 54px); height: 2px; background: var(--g-accent); opacity: .45; }
.g-cycle li:not(:last-child)::before { content: ""; position: absolute; top: 24px; inset-inline-end: -9px; border: 5px solid transparent; border-inline-start: 7px solid var(--g-accent); opacity: .7; }
.g-dot { position: relative; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--g-soft); color: var(--g-accent); border: 2px solid var(--g-accent); }
.g-dot .ic { width: 24px; height: 24px; }
.g-dot b { position: absolute; top: -6px; inset-inline-end: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--g-accent); color: #fff; font-size: .72rem; display: grid; place-items: center; }
.g-cycle strong { font-size: .9rem; }
.g-cycle em { font-style: normal; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--g-accent); }
.g-desc { font-size: .8rem; color: var(--g-muted); line-height: 1.5; }

.g-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 14px; }
.g-role { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--g-border); border-radius: 12px; color: var(--g-text); }
.g-role:hover { border-color: var(--g-accent); text-decoration: none; }
.g-role > span:last-child { display: flex; flex-direction: column; gap: 3px; font-size: .85rem; }
.g-rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 14px; }
.g-rule { display: flex; gap: 12px; }
.g-rule p { margin: 4px 0 0; color: var(--g-muted); font-size: .88rem; }

/* Role steps: numbered vertical timeline */
.g-role-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.g-role-head h2 { margin: 0; }
.g-role-head p { margin: 4px 0 0; }
.g-steps { list-style: none; margin: 0; padding: 0; }
.g-steps li { display: flex; gap: 16px; position: relative; padding-bottom: 18px; }
.g-steps li:not(:last-child)::before { content: ""; position: absolute; top: 40px; bottom: 0; inset-inline-start: 17px; width: 2px; background: var(--g-accent); opacity: .35; }
.g-num { width: 36px; height: 36px; border-radius: 50%; background: var(--g-accent); color: #fff; font-weight: 800; display: grid; place-items: center; flex: none; }
.g-step { flex: 1; border: 1px solid var(--g-border); border-radius: 12px; padding: 14px 16px; }
.g-step-title { display: flex; align-items: center; gap: 10px; }
.g-step-title .g-ic { width: 32px; height: 32px; } .g-step-title .ic { width: 18px; height: 18px; }
.g-step p { margin: 8px 0 0; color: var(--g-muted); font-size: .9rem; line-height: 1.6; }
.g-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-weight: 600; font-size: .85rem; color: var(--g-accent) !important; }
.g-link .ic { width: 15px; height: 15px; }
[dir="rtl"] .g-link .ic-arrow { display: inline-flex; transform: scaleX(-1); }

@media (max-width: 900px) {
  .g-cycle, .g-cycle-sm { grid-template-columns: 1fr; gap: 0; }
  .g-cycle li { flex-direction: row; flex-wrap: wrap; text-align: start; align-items: center; gap: 4px 12px; padding: 0 0 18px; }
  .g-cycle li .g-dot { margin-inline-end: 4px; }
  .g-cycle li strong { flex: 1; }
  .g-cycle li em, .g-cycle li .g-desc { width: 100%; padding-inline-start: 72px; }
  .g-cycle li:not(:last-child)::after { top: 58px; bottom: 0; inset-inline-start: 27px; width: 2px; height: auto; }
  .g-cycle li:not(:last-child)::before { display: none; }
}
@media print { .g-tabs { display: none; } .g-card { break-inside: avoid; } }

/* ---------- Brand identity ---------- */
.brand-logo { border-radius: 10px; object-fit: cover; vertical-align: middle; flex: none; background: #fff; border: 1px solid var(--border); }
.brand-initials { display: inline-grid; place-items: center; color: #fff; font-weight: 800; letter-spacing: .02em; border: 0; }
.brand-cell { display: flex; align-items: center; gap: 10px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { position: relative; width: 34px; height: 34px; border-radius: 10px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.swatch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.swatch:has(input:checked) { outline: 3px solid var(--text); outline-offset: 2px; }
.swatch:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }
.swatch-custom { display: inline-flex; align-items: center; gap: 8px; }
.swatch-custom input[type=color] { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; }
.logo-box { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.logo-preview { width: 120px; height: 120px; border-radius: 18px; border: 1px dashed var(--border); display: grid; place-items: center; overflow: hidden; background: var(--surface-2); }
.logo-preview img { width: 100%; height: 100%; object-fit: cover; }
.brand-preview { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 14px; color: #fff; margin-top: 14px; }
.brand-preview .brand-logo { border: 2px solid rgba(255,255,255,.6); }
.highlights { margin: 0; padding-inline-start: 18px; }
.highlights li { margin-bottom: 4px; }


/* ---------- iPhone / installed app: keep bars clear of the status bar & home indicator ---------- */
.topbar-logo { display: none; color: var(--text); flex: none; }
.mobile-title { display: none; font-size: 1.2rem; margin: 0 0 14px; }
.topbar-logo .logo { height: 24px; }
.topbar { padding-top: max(12px, env(safe-area-inset-top)); padding-inline: max(24px, env(safe-area-inset-left)) max(24px, env(safe-area-inset-right)); }
.sidebar { padding-top: calc(18px + env(safe-area-inset-top)); padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.content { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.auth-tools { top: calc(14px + env(safe-area-inset-top)); }
.auth-hero { padding-top: calc(48px + env(safe-area-inset-top)); }
/* In the installed app the status bar text is white: give it a navy strip in both themes */
@media (display-mode: standalone) {
  .topbar { border-top: env(safe-area-inset-top) solid var(--navy); padding-top: 12px; }
}
@media (max-width: 900px) {
  .topbar { padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right)); gap: 8px; }
  .topbar-logo { display: inline-flex; }
  .topbar .title { font-size: .95rem; }
  .menu-btn { width: 42px; height: 42px; }
}
@media (max-width: 420px) {
  .topbar .title { display: none; }
  .topbar .icon-btn span:not([class]) { display: none; }
  .mobile-title { display: block; }
}
