/* Fabrika dashboard. Palette taken from the logo: night navy, Fabrika blue, white.
   Dark is the default; [data-theme="light"] is set by admin.js when staff pick light mode.
   Layout uses logical properties so the same CSS works in Arabic (RTL) and English (LTR). */

@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-display: swap;
  font-weight: 160 700;
  src: url("fonts/readex-pro-arabic-wght-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E,
    U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-display: swap;
  font-weight: 160 700;
  src: url("fonts/readex-pro-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --ground: #060d1a;
  --surface: #0c1729;
  --raised: #112037;
  --sunken: #08111f;
  --line: #1a2a42;
  --line-strong: #283f5e;
  --text: #e7edf6;
  --muted: #8d9db4;
  --faint: #607189;
  --accent: #1a8cff;
  --accent-ink: #5caeff;
  --accent-soft: rgba(26, 140, 255, 0.14);
  --on-accent: #ffffff;
  --ok: #2fc48c;
  --ok-soft: rgba(47, 196, 140, 0.13);
  --warn: #f0aa3c;
  --warn-soft: rgba(240, 170, 60, 0.13);
  --crit: #f36d65;
  --crit-soft: rgba(243, 109, 101, 0.13);
  --info: #9eacc2;
  --info-soft: rgba(158, 172, 194, 0.12);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  --radius: 12px;
  --radius-sm: 8px;
  --font: "Readex Pro", "Segoe UI", Tahoma, system-ui, sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --ground: #f1f4f9;
  --surface: #ffffff;
  --raised: #f6f8fc;
  --sunken: #eaeff6;
  --line: #dde4ee;
  --line-strong: #c4cfdd;
  --text: #0b1628;
  --muted: #55667d;
  --faint: #8190a6;
  --accent: #0a6fdb;
  --accent-ink: #0a64c7;
  --accent-soft: rgba(10, 111, 219, 0.1);
  --ok: #12845a;
  --ok-soft: rgba(18, 132, 90, 0.1);
  --warn: #a2620a;
  --warn-soft: rgba(162, 98, 10, 0.1);
  --crit: #c4372f;
  --crit-soft: rgba(196, 55, 47, 0.09);
  --info: #55667d;
  --info-soft: rgba(85, 102, 125, 0.1);
  --shadow: 0 16px 36px rgba(11, 22, 40, 0.1);
}

* { box-sizing: border-box; }
html {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  background: var(--ground);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
body { margin: 0; background: var(--ground); color: var(--text); }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; }
h1, h2, h3, h4 { text-wrap: balance; }
[hidden] { display: none !important; }

/* ---- shell ---------------------------------------------------------------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--sunken); border-inline-end: 1px solid var(--line);
  padding: 18px 14px 24px; display: flex; flex-direction: column; gap: 22px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); padding: 2px 6px; }
.brand:hover { text-decoration: none; }
.brand img { width: 46px; height: 46px; border-radius: 12px; background: #010f29; flex: none; }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; font-weight: 700; letter-spacing: 0.2em; font-size: 15px; }
.brand-name small { font-size: 10.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-ink); }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); padding: 0 10px 6px; }
.nav-link {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--muted); font-weight: 500; font-size: 14px;
}
.nav-link svg { width: 18px; height: 18px; flex: none; }
.nav-link:hover { background: var(--raised); color: var(--text); text-decoration: none; }
.nav-link[aria-current="page"] { background: var(--accent-soft); color: var(--text); }
.nav-link[aria-current="page"] svg { color: var(--accent-ink); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px;
  padding: 13px 28px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--ground) 90%, transparent); backdrop-filter: blur(10px);
}
/* The speed line from the logo's car silhouette. */
.topbar::after {
  content: ""; position: absolute; bottom: -1px; inset-inline-start: 28px; width: 180px; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
[dir="rtl"] .topbar::after { background: linear-gradient(270deg, var(--accent), transparent); }
.page-title { margin: 0; flex: 1; font-size: 17px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.top-actions form { margin: 0; }
.who { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--muted); }
.icon-btn.rail-toggle { display: none; }
.content { width: 100%; max-width: 1440px; padding: 26px 28px 56px; display: flex; flex-direction: column; gap: 22px; }

/* ---- page parts ----------------------------------------------------------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; }
.page-head h2 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.page-head p { margin: 4px 0 0; color: var(--muted); max-width: 70ch; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.panel-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.panel-body { padding: 18px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.split { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px; }
.halves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.tile-label { color: var(--muted); font-size: 12.5px; }
.tile-value { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.tile-value .cur { font-size: 13px; font-weight: 500; color: var(--muted); margin-inline-start: 4px; }
.tile-note { color: var(--faint); font-size: 12px; }
.tile.is-key { background: linear-gradient(160deg, var(--accent-soft), transparent 70%), var(--surface); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.tile.is-key .tile-value { color: var(--accent-ink); }
.neg { color: var(--crit); }
/* Money in and money out of a wallet, told apart at a glance rather than by reading the sign. */
.pos { color: var(--ok); }
td.pos, td.neg { font-variant-numeric: tabular-nums; font-weight: 600; }
/* A sentence under a panel heading, explaining what the table below it means. */
.panel-note { margin: -2px 0 12px; padding-inline: 16px; color: var(--faint); font-size: 12.5px; max-width: 70ch; }

.attention { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.attention a {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--warn-soft); color: var(--text); font-size: 14px;
}
.attention a svg { width: 18px; height: 18px; color: var(--warn); flex: none; }
.attention a:hover { text-decoration: none; filter: brightness(1.08); }
.all-clear { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--ok-soft); color: var(--ok); font-size: 14px; }

/* ---- tables --------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
.data th {
  text-align: start; font-weight: 500; color: var(--muted); font-size: 11.5px; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.data td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data tbody tr:last-child td { border-bottom: 0; }
.data tbody tr:hover td { background: var(--raised); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.end { text-align: end; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }

.person { display: flex; align-items: center; gap: 11px; min-width: 0; }
.person b { display: block; font-weight: 500; }
.person small { display: block; color: var(--muted); font-size: 12.5px; direction: ltr; unicode-bidi: plaintext; text-align: start; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; font-size: 13px; object-fit: cover;
}
.thumb { width: 48px; height: 48px; border-radius: 9px; object-fit: cover; background: var(--sunken); border: 1px solid var(--line); flex: none; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-crit { background: var(--crit-soft); color: var(--crit); }
.pill-info { background: var(--info-soft); color: var(--info); }
.pill-accent { background: var(--accent-soft); color: var(--accent-ink); }

/* The four tracker steps the customer sees, as a compact meter. */
.steps { display: inline-flex; gap: 3px; vertical-align: middle; }
.steps i { width: 13px; height: 4px; border-radius: 2px; background: var(--line-strong); }
.steps i.on { background: var(--accent); }

/* ---- controls ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 15px;
  border-radius: var(--radius-sm); border: 1px solid transparent; font: inherit; font-size: 14px; font-weight: 500;
  line-height: 1.3; cursor: pointer; white-space: nowrap; text-decoration: none; color: var(--text); background: none;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 16px; height: 16px; }
.btn:disabled { opacity: 0.55; cursor: progress; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost { border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--raised); }
.btn-danger { background: var(--crit-soft); color: var(--crit); }
.btn-ok { background: var(--ok-soft); color: var(--ok); }
.btn-sm { padding: 5px 11px; font-size: 13px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); display: grid; place-items: center; cursor: pointer; flex: none;
}
.icon-btn:hover { color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.actions form { margin: 0; display: inline; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip {
  padding: 6px 13px; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--muted);
  font-size: 13px; font-weight: 500; white-space: nowrap; background: none; font-family: inherit; cursor: pointer;
}
.chip:hover { color: var(--text); text-decoration: none; }
.chip[aria-current="true"] { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.tab { padding: 10px 14px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; display: flex; gap: 8px; align-items: center; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.count-badge { background: var(--warn-soft); color: var(--warn); font-size: 11.5px; padding: 1px 8px; border-radius: 99px; font-variant-numeric: tabular-nums; }

.search { position: relative; }
.search svg { position: absolute; inset-inline-start: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--faint); }
.search input[type="search"] { padding-inline-start: 36px; min-width: 240px; }

/* ---- forms ---------------------------------------------------------------- */
.form { display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .label { font-size: 13px; font-weight: 500; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"],
input[type="time"], input[type="search"], input[type="tel"], input[type="file"], select, textarea {
  font: inherit; font-size: 14px; color: var(--text); background: var(--sunken); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: 9px 12px; width: 100%; min-width: 0;
}
input[type="file"] { padding: 7px 10px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
textarea.tall { min-height: 380px; }
.hint { color: var(--faint); font-size: 12px; }
.error { color: var(--crit); font-size: 12.5px; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--crit); }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.inline-form { padding: 16px; margin-top: 12px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius-sm); }
details.drawer > summary { list-style: none; cursor: pointer; display: inline-flex; }
details.drawer > summary::-webkit-details-marker { display: none; }
.form-narrow { max-width: 760px; }

.toast { padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid; font-size: 14px; }
.toast-success { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, transparent); color: var(--ok); }
.toast-error { background: var(--crit-soft); border-color: color-mix(in srgb, var(--crit) 35%, transparent); color: var(--crit); }
.empty { padding: 40px 18px; text-align: center; color: var(--muted); }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* ---- charts --------------------------------------------------------------- */
.chart { margin: 0; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); fill: none; }
.chart .tick { fill: var(--faint); font-size: 11px; font-family: var(--font); }
.chart .xlabel { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .bar { fill: color-mix(in srgb, var(--accent) 70%, var(--surface)); }
.chart .bar-last { fill: var(--accent); }
/* Time series: traffic in the accent, failures in the critical colour, each over a faint
   wash of itself so a line that sits on zero still reads as a line. */
.chart .line { stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.traffic { stroke: var(--accent); }
.chart .line.failures { stroke: var(--crit); }
.chart .line.uptime { stroke: var(--ok); }
.chart .area { stroke: none; }
.chart .area.traffic { fill: color-mix(in srgb, var(--accent) 14%, transparent); }
.chart .area.failures { fill: color-mix(in srgb, var(--crit) 14%, transparent); }
.chart .area.uptime { fill: color-mix(in srgb, var(--ok) 12%, transparent); }
/* The key under a chart, so two lines on one axis can be told apart. */
.legend { display: flex; gap: 16px; flex-wrap: wrap; padding: 10px 16px 0; }
.legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.legend i { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }
.legend .traffic { background: var(--accent); }
.legend .failures { background: var(--crit); }
.legend .uptime { background: var(--ok); }
/* An endpoint's verdict at a glance in the API table. */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-inline-end: 8px; }
.dot.ok { background: var(--ok); }
.dot.bad { background: var(--crit); }
code.endpoint { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.hbars { display: flex; flex-direction: column; gap: 14px; }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; font-size: 13.5px; }
.hbar svg { grid-column: 1 / -1; width: 100%; height: 8px; display: block; }
.hbar .track { fill: var(--sunken); }
.hbar .fill { fill: var(--accent); }
[dir="rtl"] .hbar svg { transform: scaleX(-1); }

/* ---- bookings ------------------------------------------------------------- */
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.day { min-width: 66px; padding: 8px 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-align: center; color: var(--muted); flex: none; }
.day:hover { text-decoration: none; border-color: var(--line-strong); color: var(--text); }
.day b { display: block; font-size: 18px; color: var(--text); font-variant-numeric: tabular-nums; }
.day small { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.day .count { display: block; font-size: 11px; color: var(--accent-ink); min-height: 1.3em; }
.day[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); }
.day.is-today b { color: var(--accent-ink); }
.day-group + .day-group { border-top: 1px solid var(--line); }
.day-group h4 { margin: 0; padding: 12px 18px 0; font-size: 13px; font-weight: 500; color: var(--muted); }
.slot-time { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }

.doc-links { display: flex; flex-wrap: wrap; gap: 6px; }
.doc-links a { font-size: 12.5px; padding: 3px 9px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--muted); }
.doc-links a:hover { color: var(--text); text-decoration: none; }

.plan-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.plan-card { display: flex; flex-direction: column; gap: 8px; padding: 18px; }
.plan-card .price { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.plan-card ul { margin: 4px 0 0; padding-inline-start: 18px; color: var(--muted); font-size: 13.5px; }

.review { display: grid; gap: 6px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.review:last-child { border-bottom: 0; }
.review-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 12.5px; }
.stars { color: var(--warn); letter-spacing: 1px; font-size: 13px; }

.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* ---- sign-in -------------------------------------------------------------- */
.login-page {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(900px 520px at 50% -12%, rgba(26, 140, 255, 0.18), transparent 62%), var(--ground);
}
.login-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 30px 28px 26px; box-shadow: var(--shadow); display: grid; gap: 18px; }
.login-card .logo { width: 150px; height: 150px; margin: 0 auto; border-radius: 18px; background: #010f29; }
.login-card h1 { margin: 0; text-align: center; font-size: 20px; font-weight: 600; }
.login-card .sub { margin: -10px 0 0; text-align: center; color: var(--muted); font-size: 13.5px; }
.speed-line { height: 2px; width: 140px; margin: -4px auto 0; background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.login-foot { display: flex; justify-content: space-between; align-items: center; color: var(--faint); font-size: 12.5px; }
.error-page { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.error-page .code { font-size: 64px; font-weight: 700; color: var(--accent-ink); font-variant-numeric: tabular-nums; }

/* ---- two-step sign-in and security ---------------------------------------- */
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.92em; }
.login-card > form, .recovery form, .setup-steps form { display: grid; gap: 14px; }
.login-card.wide { width: min(520px, 100%); }
.shield-badge { width: 56px; height: 56px; margin: 0 auto -4px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.shield-badge svg { width: 28px; height: 28px; }
input.code-input { font-size: 22px; letter-spacing: 0.32em; text-align: center; font-variant-numeric: tabular-nums; padding-block: 10px; }
.recovery, .manual-key { font-size: 13.5px; }
.recovery summary, .manual-key summary { cursor: pointer; color: var(--accent-ink); width: max-content; max-width: 100%; }
.recovery[open] summary, .manual-key[open] summary { margin-bottom: 12px; }
.manual-key .hint { display: block; margin-top: 8px; }
.setup-steps { margin: 0; padding-inline-start: 22px; display: grid; gap: 20px; }
.setup-steps li::marker { color: var(--accent-ink); font-weight: 600; }
.setup-steps li > * { margin-top: 12px; }
.qr-box { display: grid; place-items: center; padding: 12px; background: #ffffff; border-radius: var(--radius); width: max-content; margin-inline: auto; box-shadow: 0 0 0 1px var(--line); }
.qr { width: 200px; height: 200px; display: block; image-rendering: pixelated; }
code.secret { display: block; font-size: 15px; letter-spacing: 0.08em; padding: 10px 12px; background: var(--sunken); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); word-break: break-all; }
.codes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.codes code { display: block; text-align: center; font-size: 16px; letter-spacing: 0.06em; padding: 10px; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.notice { margin: 14px 18px 4px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--warn); font-size: 13.5px; }
.data.compact th, .data.compact td { padding: 9px 12px; }
.event { display: inline-flex; align-items: baseline; gap: 8px; }
.event::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--info); transform: translateY(-1px); }
.event-crit::before { background: var(--crit); }
.event-warn::before { background: var(--warn); }

/* ---- layout helpers (the CSP forbids inline style attributes) ------------- */
.between { justify-content: space-between; }
.align-end { align-items: flex-end; }
.align-start { align-items: flex-start; }
.grow { flex: 1 1 220px; min-width: 0; }
.m-0 { margin: 0; }
.gap-lg { gap: 18px; }
.gap-sm { gap: 6px; }
.logo-preview { width: 96px; height: 96px; }

/* ---- small screens -------------------------------------------------------- */
@media (max-width: 1100px) {
  .split, .halves { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; inset-block: 0; inset-inline-start: 0; width: 264px; z-index: 30; transform: translateX(-105%); transition: transform 0.2s ease; box-shadow: var(--shadow); }
  [dir="rtl"] .rail { transform: translateX(105%); }
  .shell.rail-open .rail { transform: none; }
  .icon-btn.rail-toggle { display: grid; }
  .topbar, .content { padding-inline: 16px; }
  .who .name { display: none; }
  .search input { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
