/* Arya Portal — shell and base components. Colours from brand-tokens.css (ARYA_BRAND_KIT); fonts hosted locally. */
@import url("../brand/brand-tokens.1085753813c7.css");

@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../fonts/plex-arabic-400.c094b91f8db8.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../fonts/plex-arabic-500.f9ee976ee855.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../fonts/plex-arabic-600.c0ebb1ff010f.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../fonts/plex-arabic-700.89e0f9b275a9.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-latin-400.eadb12e578b8.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-latin-500.9023ba1d47ca.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-latin-600.6271bfe4060f.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-latin-700.c6a7b569b1c3.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --navy: var(--arya-navy); --mint: var(--arya-mint); --bg: var(--arya-background); --surface: var(--arya-surface);
  --text: var(--arya-text); --muted: var(--arya-muted); --border: var(--arya-border); --mint-soft: var(--arya-mintSoft);
  --link: var(--arya-link); --error: var(--arya-error); --warning: var(--arya-warning); --success: #176B5A;
  --field-border: #8C9BAA;
  --r-btn: 12px; --r-card: 16px; --r-field: 10px;
  --font: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --t: 180ms; --top-h: 56px; --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.7; min-width: 320px; }
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.4; font-weight: 600; margin: 0 0 8px; }
h1 { font-size: 24px; } h2 { font-size: 20px; } h3 { font-size: 17px; }
p { margin: 0 0 12px; }
bdi, .ltr { direction: ltr; unicode-bidi: isolate; }
.num { font-variant-numeric: tabular-nums; }
bdi.num { white-space: nowrap; }
.wrap-any { overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }

:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; border-radius: 6px; }
.btn-primary:focus-visible, .bottomnav a:focus-visible { outline-color: var(--mint); }

.icon { width: 24px; height: 24px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 20px; height: 20px; }
[dir="rtl"] .flip { transform: scaleX(-1); }

/* ── Shell ───────────────────────────────────────────────────────── */
.demo-strip { background: var(--mint-soft); color: var(--navy); font-size: 13px; text-align: center; padding: 2px 16px; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 4px;
  padding: 0 8px; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar .slot { width: 48px; height: 48px; flex: none; display: flex; align-items: center; justify-content: center; }
.topbar .title { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; }
.topbar .title h1 { font-size: 18px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .logo { height: 32px; width: auto; display: block; }
.icon-btn { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px;
  background: transparent; border: 0; color: var(--navy); cursor: pointer; text-decoration: none; position: relative; }
.icon-btn:hover { background: var(--mint-soft); }
.badge-dot { position: absolute; top: 10px; inset-inline-end: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--error); }

main { max-width: 760px; margin: 0 auto; padding: 16px 16px calc(var(--nav-h) + var(--safe-b) + 24px); }
.portal-manage main { max-width: 1200px; }
main.no-nav { padding-bottom: 32px; }

.bottomnav { position: fixed; z-index: 30; inset-inline: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--border);
  padding-bottom: var(--safe-b); }
.bottomnav ul { list-style: none; margin: 0 auto; padding: 0; display: flex; max-width: 760px; }
.bottomnav li { flex: 1; min-width: 0; }
.bottomnav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--nav-h); padding: 4px 2px; color: var(--muted); text-decoration: none; font-size: 12.5px; line-height: 1.3; text-align: center; }
.bottomnav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bottomnav a[aria-current="page"] { color: var(--navy); font-weight: 600; }
.bottomnav a[aria-current="page"]::before { content: ""; position: absolute; top: 0; inset-inline: 22%; height: 3px; border-radius: 0 0 3px 3px; background: var(--mint); }

/* Drawer menu */
.backdrop { position: fixed; inset: 0; background: rgba(18, 40, 76, .35); z-index: 40; }
.drawer { position: fixed; z-index: 41; top: 0; bottom: 0; inset-inline-end: 0; width: min(320px, 86vw); background: var(--surface);
  box-shadow: 0 0 24px rgba(18, 40, 76, .18); display: flex; flex-direction: column; padding: 8px 16px calc(16px + var(--safe-b));
  overflow-y: auto; transition: transform var(--t) ease; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.drawer .who { padding: 8px 0 12px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.drawer .who strong { display: block; }
.menu-list { list-style: none; padding: 0; margin: 0; }
.menu-list a, .menu-list button { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 8px;
  color: var(--text); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; border-radius: 10px; text-align: start; }
.menu-list a:hover, .menu-list button:hover { background: var(--mint-soft); }
.lang-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.lang-form button { min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border); background: #fff; font: inherit;
  color: var(--navy); cursor: pointer; }
.lang-form button[aria-pressed="true"] { border-color: var(--navy); background: var(--mint-soft); font-weight: 600; }

/* ── Components ──────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: var(--r-btn);
  border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 16px; line-height: 1.3; cursor: pointer; text-decoration: none;
  transition: background var(--t) ease, opacity var(--t) ease; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: #0c1d38; }
.btn-secondary { background: var(--mint); color: var(--navy); }
.btn-ghost { background: #fff; color: var(--link); border-color: var(--border); }
.btn-danger { background: #fff; color: var(--error); border-color: var(--error); }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .65; cursor: progress; }
.btn .spinner { display: none; }
.btn[aria-busy="true"] .spinner { display: inline-block; }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.actions form { margin: 0; }

.field { margin-bottom: 16px; }
.field label, .field .label { display: block; font-weight: 500; font-size: 15px; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 8px 12px; font: inherit; color: var(--text); background: #fff;
  border: 1px solid var(--field-border); border-radius: var(--r-field); }
.field textarea { min-height: 96px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--mint); outline-offset: 0; border-color: var(--navy); }
.field .help { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.field input[dir="ltr"] { text-align: left; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.check input { width: 22px; height: 22px; }
.pin-input { letter-spacing: .5em; font-size: 24px !important; text-align: center !important; max-width: 220px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 16px; margin-bottom: 12px; }
.card > :last-child { margin-bottom: 0; }
a.card { display: block; color: inherit; text-decoration: none; transition: border-color var(--t) ease; }
a.card:hover { border-color: var(--mint); }
.card-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 17px; margin-bottom: 4px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-top: 12px; }
.fact { background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.fact .k { font-size: 13px; color: var(--muted); }
.fact .v { font-weight: 600; }

.list { list-style: none; margin: 0 0 16px; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.list > li + li { border-top: 1px solid var(--border); }
.row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px; color: var(--text); text-decoration: none; }
a.row:hover { background: var(--mint-soft); }
.row .main { flex: 1; min-width: 0; }
.row .main strong { display: block; font-weight: 600; overflow-wrap: anywhere; }
.row .sub { display: block; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.row .end { flex: none; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.row.highlight { background: var(--mint-soft); }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 13px; line-height: 1.6;
  border: 1px solid var(--border); background: #fff; color: var(--navy); white-space: nowrap; }
.chip.ok { color: var(--success); border-color: #A8D8CB; background: var(--mint-soft); }
.chip.warn { color: var(--warning); border-color: #EBCB9B; background: #FFF6E8; }
.chip.err { color: var(--error); border-color: #F1B8B2; background: #FDEEEC; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; border: 1px solid; }
.alert-error { background: #FDEEEC; border-color: #F1B8B2; color: var(--error); }
.alert-info { background: var(--mint-soft); border-color: #BFE6DB; color: var(--navy); }
.alert-warning { background: #FFF6E8; border-color: #EBCB9B; color: var(--warning); }
.alert-success { background: var(--mint-soft); border-color: #BFE6DB; color: var(--success); }

.state { text-align: center; padding: 32px 16px; color: var(--muted); background: var(--surface); border: 1px dashed var(--border); border-radius: var(--r-card); margin-bottom: 16px; }
.state .icon { width: 40px; height: 40px; color: var(--mint); margin-bottom: 8px; }
.state h2 { color: var(--navy); font-size: 18px; }
.skeleton { height: 16px; border-radius: 8px; background: linear-gradient(90deg, #E8EEF0 25%, #F3F6F7 50%, #E8EEF0 75%); background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite; margin: 8px 0; }
@keyframes shimmer { to { background-position: -200% 0; } }

.offline { position: fixed; z-index: 35; top: calc(var(--top-h) + 4px); inset-inline: 16px; }
.toast { position: fixed; z-index: 50; inset-inline: 16px; bottom: calc(var(--nav-h) + var(--safe-b) + 12px); margin: 0 auto; max-width: 420px;
  background: var(--navy); color: #fff; border-radius: 12px; padding: 12px 16px; text-align: center; }

.copy-row { display: flex; align-items: center; gap: 8px; }
.copy-row .value { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; padding: 8px 12px; background: var(--bg); border-radius: 10px; }
.secret-value { font-size: 22px; letter-spacing: .04em; }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 20px 0 8px; }
.section-title h2 { margin: 0; font-size: 18px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border); background: #fff;
  color: var(--navy); text-decoration: none; }
.tabs a[aria-current="page"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 12px; align-items: end; }
.filters .field { margin-bottom: 8px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 12px 0; }
.kv { font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.qr svg { width: 200px; height: 200px; background: #fff; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0; list-style: none; }
.codes li { background: var(--bg); padding: 8px; border-radius: 8px; text-align: center; font-weight: 600; }

/* Auth pages */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 24px 16px 40px; }
.auth { padding-top: 32px; }
.auth .panel .brand { margin: -4px -4px 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.auth .panel .brand img { width: 220px; max-width: 100%; height: auto; display: block; margin: 0 auto; }
.home-logo { display: block; width: 240px; max-width: 100%; height: auto; margin: 4px auto 16px; }
.auth .panel { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 20px; }
.auth .panel h1 { font-size: 22px; }
.auth-back { width: 100%; max-width: 420px; margin-bottom: 8px; }
.choice { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px;
  color: var(--text); text-decoration: none; margin-bottom: 10px; background: #fff; }
.choice:hover { border-color: var(--mint); background: var(--mint-soft); }
.choice .icon { width: 28px; height: 28px; color: var(--navy); }
.choice strong { display: block; }
.choice .sub { font-size: 14px; color: var(--muted); }
.auth-foot { width: 100%; max-width: 420px; margin-top: 16px; }

.contact-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }

/* ── Journey 1: client pages ─────────────────────────────────────── */
.portal-client { font-size: 17px; }
.portal-client .row .sub, .portal-client .small { font-size: 15px; }
.hello { font-size: 20px; font-weight: 600; color: var(--navy); margin: 0 0 12px; }
.eyebrow { font-size: 14px; color: var(--muted); margin: 8px 0 0; }
.stage-now { font-size: 22px; margin: 0 0 4px; color: var(--navy); }
.status-card { animation: rise var(--t) ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Stage path: dots and a line on one row; done = mint, coming = grey, no coloured line after the current stage.
   Up to 7 stages share one row at 320 px (dots 24 px, connectors stretch between them); more stages are split by the
   template into rows (portal/client/_track.html), and a row never ends with a dangling connector. */
.track { display: flex; flex-wrap: nowrap; align-items: center; list-style: none; padding: 0; margin: 14px 0 4px; min-width: 0; }
.track + .track { margin-top: 10px; }
.track li { display: flex; align-items: center; flex: 1 1 0; min-width: 0; }
.track li.last { flex: 0 0 auto; }
.track .dot { width: 24px; height: 24px; flex: none; border-radius: 50%; border: 2px solid var(--border); background: #fff; display: inline-flex;
  align-items: center; justify-content: center; padding: 0; cursor: pointer; color: var(--muted); position: relative; }
.track .dot::after { content: ""; position: absolute; inset: -10px -3px; }     /* 44 px tall touch target */
.track .dot .icon { width: 13px; height: 13px; stroke-width: 2.5; }
.track .st-done .dot { background: var(--mint); border-color: var(--mint); color: var(--navy); }
.track .st-current .dot { border-color: var(--navy); color: var(--navy); box-shadow: 0 0 0 4px var(--mint-soft); }
.track .st-current .dot .icon { fill: var(--navy); }
.track .ln { flex: 1 1 auto; min-width: 6px; height: 3px; border-radius: 2px; background: var(--border); margin: 0 3px; }
.track .st-done .ln { background: var(--mint); }
.track .st-current .ln, .track .st-upcoming .ln { background: var(--border); }
@media (min-width: 600px) { .track .dot { width: 30px; height: 30px; } .track .dot .icon { width: 16px; height: 16px; } }
.track-note:empty { display: none; }
.where { margin: 14px 0 0; display: grid; gap: 10px; }
.where > div { display: grid; grid-template-columns: minmax(96px, max-content) 1fr; gap: 4px 12px; align-items: start; }
.where dt { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 15px; }
.where dd { margin: 0; font-weight: 500; }
.mini-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 12px; min-height: 44px; border-radius: 12px;
  background: var(--bg); color: var(--text); text-decoration: none; font-size: 15px; }
.mini-row span { flex: 1; min-width: 0; }
.mini-row:hover { background: var(--mint-soft); }
.facts.big { margin: 0 0 12px; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); }
.facts.big .fact { background: var(--surface); border: 1px solid var(--border); }
.facts.big .v { font-size: 18px; }
.list.big-rows .row { min-height: 60px; }
.all-stages summary, details > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--link); }
.stage-list { list-style: none; padding: 0; margin: 8px 0 12px; }
.stage-list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.stage-list .nm { flex: 1; }
.stage-list .stt { font-size: 14px; color: var(--muted); }
.stage-list .st-done .icon { color: var(--success); }
.stage-list .st-current { font-weight: 600; }
.stage-list .st-current .icon { color: var(--navy); fill: var(--navy); }
.stage-list .st-upcoming { color: var(--muted); }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0 0 16px; position: relative; }
.timeline > li { position: relative; padding: 0 0 16px; padding-inline-start: 36px; }
.timeline > li::before { content: ""; position: absolute; inset-inline-start: 13px; top: 28px; bottom: 0; width: 2px; background: var(--border); }
.timeline > li.st-done::before { background: var(--mint); }
.timeline > li:last-child::before { display: none; }
.tl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 28px; }
.tl-ic { position: absolute; inset-inline-start: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; background: #fff; border: 2px solid var(--border); color: var(--muted); }
.st-done > .tl-head .tl-ic, .st-done .tl-ic { background: var(--mint); border-color: var(--mint); color: var(--navy); }
.st-current > .tl-head .tl-ic, .st-current .tl-ic { border-color: var(--navy); color: var(--navy); }
.stage-edit .tl-ic, .stage-head .tl-ic { position: static; }
.tl-visits { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.tl-visits > li { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.visit-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: var(--text); text-decoration: none; min-height: 56px; }
.visit-row .main { flex: 1; min-width: 0; }
.visit-row strong { display: block; }
.visit-row .sub { display: block; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.visit-row:hover { background: var(--mint-soft); }
.thumbs { display: flex; gap: 6px; padding: 0 14px 12px; flex-wrap: wrap; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; }

/* My devices: compact rows on the phone (one open at a time), a light table on the computer */
.dev-search { display: flex; gap: 8px; margin-bottom: 10px; }
.search-box { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.search-box .icon { position: absolute; inset-inline-start: 12px; color: var(--muted); pointer-events: none; }
.search-box input { width: 100%; min-height: 48px; padding: 8px 12px; padding-inline-start: 44px; font: inherit; border: 1px solid var(--field-border);
  border-radius: var(--r-field); background: #fff; color: var(--text); }
.search-box input:focus-visible { outline: 3px solid var(--mint); outline-offset: 0; border-color: var(--navy); }
.tabs a .num { font-weight: 600; margin-inline-start: 4px; }
.devlist { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; margin-bottom: 16px; }
.dev-head { display: none; }
.dev + .dev { border-top: 1px solid var(--border); }
.dev > summary { list-style: none; display: grid; grid-template-columns: 40px 1fr 20px; grid-template-areas: "ic name chev" "ic model chev";
  align-items: center; gap: 0 10px; padding: 12px 14px; cursor: pointer; min-height: 64px; color: var(--text); font-weight: 400; }
.dev > summary::-webkit-details-marker { display: none; }
.dev > summary:hover { background: var(--mint-soft); }
.dev-ic { grid-area: ic; width: 40px; height: 40px; border-radius: 12px; background: var(--mint-soft); color: var(--navy); display: inline-flex; align-items: center; justify-content: center; }
.dev-name { grid-area: name; min-width: 0; }
.dev-name strong { font-weight: 600; }
.dev-loc { color: var(--muted); }
.dev-loc::before { content: " · "; }
.dev-model { grid-area: model; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.dev-sys, .dev-place { display: none; }
.dev .chev { grid-area: chev; color: var(--muted); transition: transform var(--t) ease; }
.dev[open] .chev { transform: rotate(180deg); }
.dev[open] > summary { background: var(--mint-soft); }
.dev-body { padding: 8px 14px 16px; }
.kv-list { margin: 0; display: grid; gap: 8px; }
.kv-list > div { display: grid; grid-template-columns: minmax(84px, 32%) 1fr; gap: 2px 12px; align-items: center; }
.kv-list dt { color: var(--muted); font-size: 15px; }
.kv-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv-list.compact > div { grid-template-columns: minmax(110px, max-content) 1fr; }
.kv-list .copy-row .value { padding: 4px 10px; font-weight: 500; overflow-wrap: break-word; word-break: normal; }
.kv-list .copy-row { gap: 6px; }
.kv-list .copy-row .btn-sm { width: 44px; padding: 0; flex: none; }
.btn-sm { min-height: 44px; padding: 0 12px; font-size: 15px; }
.cred { margin-top: 12px; }
.cred .kv-list { margin-top: 8px; }
.cred-edit { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 4px; }
.cred-edit form { margin-top: 8px; }
.dev-photo { margin: 12px 0 0; }
.dev-photo img { max-width: 260px; width: 100%; border-radius: 12px; display: block; }
.mt-sm { margin-top: 8px; }
.money { display: grid; gap: 6px; margin: 8px 0; }
.money > div { display: flex; justify-content: space-between; gap: 12px; }
.money dt { color: var(--muted); }
.money dd { margin: 0; font-weight: 600; }
.pay-list { list-style: none; padding: 0; margin: 8px 0 0; border-top: 1px solid var(--border); }
.pay-list li { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: 15px; }
.pay-list li span:first-of-type { flex: 1; }
.pay-list .icon { color: var(--success); }
.preview-strip { display: flex; gap: 10px; align-items: flex-start; background: #FFF6E8; border: 1px dashed var(--warning); color: var(--navy);
  border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; }
.checks { border: 0; padding: 0; margin: 0 0 12px; }
.checks legend { font-weight: 500; margin-bottom: 4px; }
.member-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 16px 12px; }
.member-actions details { flex-basis: 100%; }
.member-actions form { margin: 0; }

/* ── Journey 1: office pages ─────────────────────────────────────── */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar .grow { flex: 1 1 240px; }
.form-narrow { max-width: 640px; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
.seg { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.seg legend { font-weight: 500; width: 100%; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form select { min-height: 48px; padding: 8px 12px; font: inherit; border: 1px solid var(--field-border); border-radius: var(--r-field); background: #fff; max-width: 100%; }
.plain { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; }
.plain li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stage-edit { list-style: none; padding: 0; margin: 0 0 16px; }
.stage-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.stage-edit .st-skipped { opacity: .7; }
.stage-form { margin-top: 8px; }
.switches { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 4px; }
.switches li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.switch { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .sw { width: 46px; height: 28px; border-radius: 14px; background: var(--border); position: relative; flex: none; transition: background var(--t) ease; }
.switch .sw::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: inset-inline-start var(--t) ease; }
.switch input:checked + .sw { background: var(--navy); }
.switch input:checked + .sw::after { inset-inline-start: 21px; }
.switch input:focus-visible + .sw { outline: 3px solid var(--mint); outline-offset: 2px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-weight: 600; color: var(--muted); font-size: 14px; background: var(--bg); }
.table tr:last-child td { border-bottom: 0; }
.versions .row { align-items: flex-start; }
.secret-inline { font-weight: 600; }

@media (max-width: 599px) {
  .table thead { display: none; }
  .table tr { display: block; padding: 8px 12px; border-bottom: 1px solid var(--border); }
  .table td { display: block; padding: 2px 0; border: 0; }
  .table td[data-l]::before { content: attr(data-l) ": "; color: var(--muted); font-size: 13px; }
  .table-wrap { overflow-x: visible; }
}
@media (min-width: 600px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .portal-client main { max-width: 1000px; }
  .dev-head { display: grid; grid-template-columns: 40px 1.4fr 1fr 1fr .7fr 20px; gap: 0 12px; padding: 8px 14px; background: var(--bg);
    color: var(--muted); font-size: 14px; border-bottom: 1px solid var(--border); }
  .dev-head span:first-child { grid-column: 2; }
  .dev > summary { grid-template-columns: 40px 1.4fr 1fr 1fr .7fr 20px; grid-template-areas: none; gap: 0 12px; min-height: 56px; }
  .devlist .dev > summary > * { grid-row: 1; }
  .dev-ic { grid-column: 1; }
  .dev-loc { display: none; }
  .dev-name { grid-column: 2; }
  .dev > summary .dev-place { display: block; grid-column: 3; color: var(--text); font-size: 15px; }
  .dev > summary .dev-model { grid-column: 4; }
  .dev > summary .dev-sys { display: block; grid-column: 5; color: var(--muted); font-size: 15px; }
  .dev > summary .chev { grid-column: 6; }
  .dev-body { padding-inline-start: 66px; max-width: 760px; }
}

@media (min-width: 900px) {
  h1 { font-size: 28px; }
  main { padding-top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.mt { margin-top: 16px; }
.mb0 { margin-bottom: 0; }

/* ── Journey 2: money ────────────────────────────────────────────── */
.money-amt { white-space: nowrap; unicode-bidi: isolate; }

/* ── Journey 2: technician portal ────────────────────────────────── */
.day-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.actions.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.actions.two .btn { padding: 0 10px; }
.actions.two form { margin: 0; }
.visit-head { padding: 12px 14px; }
.next-step { margin: 4px 0 16px; text-align: center; }
.step-count { margin: 0 0 6px; font-size: 14px; color: var(--muted); }
.step-dots { display: flex; justify-content: center; gap: 8px; list-style: none; padding: 0; margin: 0 0 12px; }
.step-dots li { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.step-dots li.done { background: var(--mint); }
.step-dots li.now { background: var(--navy); box-shadow: 0 0 0 3px var(--mint-soft); }
.big-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 128px;
  padding: 16px; border-radius: var(--r-card); border: 2px solid transparent; font: inherit; font-size: 22px; font-weight: 700;
  line-height: 1.3; cursor: pointer; text-decoration: none; transition: transform var(--t) ease, background var(--t) ease; }
.big-btn .icon { width: 44px; height: 44px; stroke-width: 2; }
.big-btn:active { transform: scale(.98); }
.big-btn.compact { min-height: 88px; font-size: 18px; }
.big-btn.compact .icon { width: 32px; height: 32px; }
.big-btn.go, .big-btn.send { background: var(--navy); color: #fff; }
.big-btn.photo, .big-btn.video { background: var(--mint); color: var(--navy); }
.big-btn.voice { background: var(--mint-soft); color: var(--navy); border-color: var(--mint); }
.big-btn.voice.recording { background: #FDEEEC; border-color: var(--error); color: var(--error); }
.big-btn.leave { background: #FFF6E8; color: var(--navy); border-color: #EBCB9B; }
.big-btn[aria-busy="true"], .big-btn[disabled] { opacity: .6; cursor: progress; }
label.big-btn:focus-within { outline: 3px solid var(--navy); outline-offset: 2px; }
.rec-time { font-size: 18px; font-weight: 600; }
.done-state .icon { color: var(--success); }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.tile, .tile-form .tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 76px; padding: 8px 4px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--navy);
  text-decoration: none; font: inherit; font-size: 14px; line-height: 1.3; text-align: center; cursor: pointer; width: 100%; }
.tile:hover { border-color: var(--mint); background: var(--mint-soft); }
.tile span { overflow-wrap: anywhere; }
.tile b { position: absolute; top: 6px; inset-inline-end: 6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--bg);
  color: var(--navy); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.tile b.ok { background: var(--mint); }
.tile-form { margin: 0; display: flex; }
details.more summary { font-weight: 600; }
details.more h3 { margin-top: 12px; font-size: 16px; }
.sync-box { position: sticky; top: var(--top-h); z-index: 25; background: #FFF6E8; border-bottom: 1px solid #EBCB9B; padding: 8px 16px; }
.sync-head { display: flex; align-items: center; gap: 8px; max-width: 760px; margin: 0 auto; }
.sync-head span { flex: 1; }
.sync-list { list-style: none; margin: 4px auto 0; padding: 0; max-width: 760px; font-size: 14px; }
.sync-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 2px 0; }
.sync-err { color: var(--error); }
.checklist { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.checklist form { margin: 0; }
.check-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 14px; background: var(--surface); font: inherit; color: var(--text); text-align: start; cursor: pointer; }
.check-btn .box { flex: none; width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--field-border); display: inline-flex;
  align-items: center; justify-content: center; color: var(--navy); background: #fff; }
.check-btn .lbl { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.is-done .check-btn { background: var(--mint-soft); border-color: #BFE6DB; }
.is-done .check-btn .box { background: var(--mint); border-color: var(--mint); }
.check-btn.needs-photo .box { border-style: dashed; }
label.check-btn:focus-within { outline: 3px solid var(--navy); outline-offset: 2px; }
.dev-checks .dev-check { padding: 10px 14px; }
.dc-name { display: flex; flex-direction: column; margin-bottom: 8px; }
.state-btns { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.sb { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border);
  background: #fff; color: var(--navy); font: inherit; font-size: 15px; cursor: pointer; }
.sb[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.sb-problem[aria-pressed="true"] { background: var(--error); border-color: var(--error); }
.qty-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.qty-row { display: grid; grid-template-columns: 96px 1fr; gap: 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-check { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.voice-note audio, .voice-office audio { width: 100%; margin: 6px 0; }
.photo-grid video, .pick-media video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: #000; }
.pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pick-grid form { margin: 0; }
.pick { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 56px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); font: inherit; color: var(--navy); cursor: pointer; text-align: start; }
.crew-row .inline-form input { flex: 1 1 140px; min-width: 0; min-height: 44px; padding: 6px 10px; font: inherit; border: 1px solid var(--field-border); border-radius: var(--r-field); }
.sign-pad { display: block; width: 100%; height: 220px; border: 2px dashed var(--field-border); border-radius: 12px; background: #fff; touch-action: none; }
.label { font-weight: 500; margin-bottom: 6px; }

/* ── Journey 2: office ───────────────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 600px) { .grid-3 { grid-template-columns: 1.3fr 1fr 1fr; } }
.switch-line { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-inline-end: 12px; }
.switch-line input { width: 20px; height: 20px; }
.original { background: var(--bg); border-radius: 10px; padding: 8px 12px; margin: 0 0 6px; font-size: 15px; }
.pick-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pm { display: flex; flex-direction: column; gap: 4px; border: 2px solid var(--border); border-radius: 14px; padding: 6px; cursor: pointer; }
.pm img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.pm input { width: 22px; height: 22px; }
.pm:has(input:checked) { border-color: var(--navy); background: var(--mint-soft); }
.sticky-actions { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 8px); background: var(--bg); padding: 8px 0; z-index: 5; display: flex; gap: 8px; flex-wrap: wrap; }
.legend { display: inline-flex; gap: 6px; margin-inline-start: 8px; }
.cal-wrap { display: none; }
.cal-days { display: block; }
.cal-day h2 { font-size: 17px; margin: 16px 0 6px; }
.cal-day.is-today h2 { color: var(--navy); }
.board { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.board .card { margin: 0; }
@media (min-width: 900px) {
  .cal-wrap { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; margin-bottom: 16px; }
  .cal-days { display: none; }
  .cal { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
  .cal th, .cal td { border: 1px solid var(--border); padding: 6px; vertical-align: top; text-align: start; }
  .cal thead th { background: var(--bg); font-weight: 600; color: var(--muted); }
  .cal thead th:first-child, .cal tbody th { width: 130px; }
  .cal tbody th { background: var(--bg); font-weight: 600; }
  .cal .is-today { background: #F2FBF8; }
  .cal-cell { min-height: 72px; height: 72px; }
  .cal-cell.drop-ok { outline: 3px dashed var(--mint); outline-offset: -3px; background: var(--mint-soft); }
  .cal-task { display: block; margin-bottom: 4px; padding: 6px 8px; border-radius: 10px; border: 1px solid #BFE6DB; background: var(--mint-soft);
    color: var(--navy); text-decoration: none; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
  .cal-task[draggable="true"] { cursor: grab; }
  .cal-task .sub { display: block; color: var(--muted); font-size: 12px; }
  .cal-task.unconfirmed { background: #FFF6E8; border-color: #EBCB9B; border-style: dashed; }
  .cal-task.clash { border: 2px solid var(--error); }
  .cal-task.as-crew { opacity: .75; }
  .cal-task.dragging { opacity: .4; }
}

/* ── Journey 3: devices on site, guides, sharing, imports ─────────── */
.dev-card { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 6px 0; color: var(--text); text-decoration: none; }
.dev-card .dc-name { flex: 1; min-width: 0; margin: 0; }
.dev-card .dc-go { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 14px; border-radius: 12px;
  background: var(--mint); color: var(--navy); font-weight: 600; }
.dev-card.done .dc-go { background: var(--mint-soft); }
.dev-check > a.small { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; min-height: 44px; }
.reg-step { margin: 0 0 20px; }
.reg-step h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.step-n { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--navy); color: #fff; font-size: 15px; }
.read-values { margin-top: 12px; }
.field input.big-value { font-size: 20px; font-weight: 600; letter-spacing: .02em; }
.scanner { margin-top: 10px; }
.scanner video { display: block; width: 100%; max-height: 52vh; object-fit: cover; border-radius: 14px; background: #0B1A33; }
.tag-group { border: 0; padding: 0; margin: 0 0 12px; }
.tag-group legend { font-weight: 600; margin-bottom: 6px; }
.tag-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 480px) { .tag-btns { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tag-btn { position: relative; display: block; }
.tag-btn input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tag-btn span { display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 6px 8px; border: 2px solid var(--border);
  border-radius: 12px; background: var(--surface); color: var(--navy); font-weight: 600; text-align: center; line-height: 1.3; cursor: pointer;
  overflow-wrap: anywhere; transition: background var(--t) ease, border-color var(--t) ease; }
.tag-btn.own span { border-style: dashed; }
.tag-btn input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.tag-btn input:focus-visible + span { outline: 3px solid var(--mint); outline-offset: 2px; }
.reg .big-btn.send { margin-top: 8px; }
.serial-box { border-color: #EBCB9B; background: #FFFBF3; }
.serial-box h2 { display: flex; gap: 8px; align-items: center; font-size: 18px; }
.ph { display: flex; flex-direction: column; gap: 4px; }
form.inline { display: inline; margin: 0; }
.warn-row td { background: #FFFBF3; }
.import-table tr.group th { background: var(--mint-soft); color: var(--navy); text-align: start; }
.import-table .sub, .table .sub { display: block; }
.bulk-wrap { margin-bottom: 8px; }
.table.bulk { min-width: 1280px; }
.table.bulk td { padding: 4px; }
.table.bulk input, .table.bulk select { width: 100%; min-width: 72px; min-height: 40px; padding: 4px 6px; font: inherit; font-size: 14px;
  border: 1px solid var(--field-border); border-radius: 8px; background: #fff; }
.month-nav { justify-content: center; }
.totals .card { margin-bottom: 12px; }
.row-details > summary { list-style: none; cursor: pointer; }
.row-details > summary::-webkit-details-marker { display: none; }
.row-details[open] .chev { transform: rotate(180deg); }
.inline-edit { display: inline-block; }
.inline-edit > summary { list-style: none; }
.inline-edit[open] form { position: absolute; z-index: 10; inset-inline-end: 16px; margin-top: 6px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px; min-width: 240px; box-shadow: 0 6px 24px rgba(18, 40, 76, .12); }
.dev-guides { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.dev-guides p { width: 100%; margin: 0; }
.try-first, .share-box { margin-top: 12px; }
.try-first summary, .share-box summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; cursor: pointer; }
.try-steps { margin: 6px 0 10px; padding-inline-start: 22px; }
.try-steps li { margin-bottom: 6px; }
.guide { text-align: center; padding: 8px 0 4px; }
.guide-art { display: flex; align-items: center; justify-content: center; width: 112px; height: 112px; margin: 8px auto 16px; border-radius: 50%;
  background: var(--mint-soft); color: var(--navy); }
.guide-art .icon { width: 56px; height: 56px; stroke-width: 1.6; }
.guide h2 { font-size: 22px; }
.guide-body { font-size: 18px; line-height: 1.8; max-width: 34em; margin-inline: auto; }
.app-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 8px 0 16px; }
.app-links p { width: 100%; margin: 0; }
.guide-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.guide-nav .btn { min-width: 132px; }
.help-btns { margin-top: 6px; }
.sticker-sheet { display: flex; justify-content: center; padding: 8px 0 16px; }
.sticker { width: 70mm; margin: 0; padding: 6mm; border: 1px solid var(--border); border-radius: 16px; background: #fff; text-align: center; }
.sticker-logo { width: 46mm; height: auto; margin: 0 auto 3mm; display: block; }
.sticker-code svg { width: 52mm; height: 52mm; display: block; margin: 0 auto; }
.sticker-code svg path { fill: var(--navy); }
.sticker figcaption { display: flex; flex-direction: column; gap: 1mm; margin-top: 3mm; color: var(--navy); font-size: 13px; line-height: 1.4; }
@media print {
  .topbar, .bottomnav, .drawer, .backdrop, .demo-strip, .no-print, .skip, #offline, .sync-box, .toast { display: none !important; }
  body { background: #fff; }
  main { padding: 0 !important; }
  .sticker { border: 1px dashed #999; }
}
@media (prefers-reduced-motion: reduce) { .tag-btn span { transition: none; } }

/* ── Journey 5: support, maintenance, requests, referrals, handover, rating ─────────────────────────────────── */
.msgs { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.msg { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; max-width: 92%; }
.msg p { margin: 0 0 4px; overflow-wrap: anywhere; }
.msg.office { background: var(--mint-soft); border-color: #A8D8CB; margin-inline-start: auto; }
.msg.internal { background: #FFF6E8; border: 1px dashed #EBCB9B; }
.price-lines { margin: 8px 0; display: grid; gap: 4px; }
.price-lines > div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.price-lines dt { color: var(--muted); }
.price-lines dd { margin: 0; font-weight: 600; }
.price-lines .disc dd { color: var(--success); }
.price-lines .total { border-top: 1px solid var(--border); padding-top: 4px; }
.discount-banner { font-weight: 500; }
.stars-form { display: flex; flex-wrap: wrap; gap: 6px; }
.star-btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 48px; min-height: 52px;
  border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--navy); cursor: pointer; font: inherit; font-size: 13px; }
.star-btn:hover, .star-btn:focus-visible { background: var(--mint-soft); }
.star-btn .icon { width: 22px; height: 22px; }
.stars .icon { width: 20px; height: 20px; color: var(--border); }
.stars .icon.on { color: #C98A00; fill: #F4C542; }
.preview-box { background: var(--bg); border-radius: 12px; padding: 8px 12px; margin: 4px 0 16px; }
.preview-table td, .preview-table th { padding: 6px 8px; }
.sub-line { padding-inline-start: 22px; }
.ack { white-space: normal; line-height: 1.8; background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.handover-card { display: block; text-decoration: none; color: inherit; border-color: var(--mint); }
.qty-row label { align-self: center; }
@media (max-width: 380px) { .qty-grid { grid-template-columns: 1fr; } }
.table input:not([type="checkbox"]) { width: 100%; min-width: 0; }
[data-care-price] .qty-grid { gap: 8px 16px; margin-bottom: 8px; }
[data-care-price] .qty-row { grid-template-columns: 1fr 88px; align-items: center; }
[data-care-price] .qty-row input { min-height: 44px; width: 100%; text-align: center; }
@media (max-width: 420px) { [data-care-price] .qty-grid { grid-template-columns: 1fr; } }

/* Literal values (passwords, usernames, serials, MAC, IP, codes): always one isolated left-to-right unit, whatever
   the page language; no ligatures; a little spacing so similar characters stay apart. */
.literal { direction: ltr; unicode-bidi: isolate; font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0;
  letter-spacing: .03em; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ── Journey 6: rules, templates, notifications, installable app ─────────────────────────────────────────────── */
.link-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.link-tabs a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface); color: var(--navy); text-decoration: none; }
.link-tabs a[aria-current] { background: var(--navy); color: #fff; border-color: var(--navy); }
.rule-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.rule-row > .row { flex: 1 1 240px; min-width: 0; }
.rule-line { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.rule-line select, .rule-line input { flex: 1 1 120px; min-width: 0; min-height: 48px; padding: 8px 10px; font: inherit;
  border: 1px solid var(--field-border); border-radius: var(--r-field); background: #fff; }
.rule-action { border: 1px solid var(--border); border-radius: 14px; padding: 12px; margin: 0 0 12px; min-width: 0; }
.rule-action legend { padding: 0 6px; font-weight: 600; color: var(--navy); }
.field > .label { display: block; margin-bottom: 4px; color: var(--muted); }
.msg-preview { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin: 8px 0; background: #fff; overflow-wrap: anywhere; }
.msg-preview p { margin: 4px 0 0; }
.trial-action { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }
.pref-list { list-style: none; margin: 0 0 16px; padding: 0; }
.pref-list > li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.pref-switches { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; }
.notif-img, .person-photo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.person-photo { width: 96px; height: 96px; display: block; margin-bottom: 8px; }
.nav-badge { position: absolute; inset-block-start: 4px; inset-inline-start: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--error); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.bottomnav a { position: relative; }
.big-btn.way { background: var(--mint-soft); color: var(--navy); border-color: var(--mint); margin-bottom: 4px; }
.way-done { margin: 0 0 8px; }
.pwa-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 8px 16px; }
.pwa-bar .main { flex: 1 1 200px; }
.actions-inline { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(18, 40, 76, .45); display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop[hidden] { display: none; }
.sheet { background: #fff; width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; border-radius: 16px 16px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sheet-head h2 { margin: 0; font-size: 18px; }
.guide-steps { margin: 12px 0 16px; padding: 0; list-style: none; counter-reset: g; }
.guide-steps li { counter-increment: g; display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.guide-steps li span::before { content: counter(g) ". "; font-weight: 600; color: var(--navy); }
.guide-art { width: 96px; height: 64px; }
.guide-icon { width: 64px; height: 64px; border-radius: 14px; border: 1px solid var(--border); justify-self: center; }
.offline-page main { max-width: 560px; margin: 32px auto; padding: 0 16px; }
@media (prefers-reduced-motion: reduce) { .sheet-backdrop { transition: none; } }
.notif-list .row { flex-wrap: wrap; }
.notif-list .row .main { flex: 1 1 200px; }
.notif-list .row .end { flex-basis: 100%; padding-inline-start: 36px; }

/* Journey 7: unified office search */
.global-search { position: relative; margin: 0 0 12px; }
.gs-live { position: absolute; z-index: 25; inset-inline: 0; top: calc(100% + 4px); max-height: 70vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 8px; box-shadow: 0 8px 24px rgba(18,40,76,.12); }
.gs-live .list { margin-bottom: 8px; }
.gs-live h2, #search-page-results h2 { display: flex; align-items: center; gap: 6px; margin: 8px 4px 6px; font-size: 14px; }
.gs-live .state { margin: 0; padding: 16px; }
.matrix { width: 100%; border-collapse: collapse; font-size: 14px; }
.matrix th, .matrix td { border-bottom: 1px solid var(--border); padding: 6px 4px; text-align: start; vertical-align: middle; }
.matrix td select { min-height: 40px; max-width: 100%; }
.table-wrap { overflow-x: auto; max-width: 100%; }
.report-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.report-table th, .report-table td { border-bottom: 1px solid var(--border); padding: 8px 6px; text-align: start; }
.report-table td.n, .report-table th.n { text-align: end; font-variant-numeric: tabular-nums; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.inline-form .field { margin-bottom: 0; flex: 1 1 140px; min-width: 0; }
.chips-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips-list li { display: inline-flex; align-items: center; gap: 2px; }
