/*
 * ALFIDAONE Customer Portal: one style sheet for English (LTR) and Arabic (RTL), light and dark.
 * - Logical properties only (inline/block, start/end): the layout mirrors when <html dir="rtl">. The few direction-specific rules are under [dir="rtl"].
 * - Brand: navy and gold with the ALFIDAONE blue, as on the website and the Control Center. Fonts are the self-hosted ones of the sign-in page
 *   (Manrope, Cairo, IBM Plex Mono: SIL Open Font License, see /fonts/login/OFL-*.txt): the Content-Security-Policy allows no outside font host.
 * - No inline styles anywhere (strict CSP): every look is a class here. Motion is subtle and switched off under prefers-reduced-motion.
 * - Contrast: body text >= 7:1, muted text >= 4.5:1 on its surface, in both themes.
 */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("/fonts/login/manrope-var-latin.woff") format("woff"); }
@font-face { font-family: "Cairo"; font-style: normal; font-weight: 200 1000; font-display: swap; src: url("/fonts/login/cairo-var-arabic.woff") format("woff"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-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: "Cairo"; font-style: normal; font-weight: 200 1000; font-display: swap; src: url("/fonts/login/cairo-var-latin.woff") format("woff"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/login/ibmplexmono-400-latin.woff") format("woff"); }

:root {
  --navy-950: #07142a; --navy-900: #0b1d3a; --navy-800: #13294f; --navy-700: #1f3d70;
  --gold: #c9a349; --gold-bright: #e3b660; --gold-ink: #7a5c0c; --gold-soft: #f7f0de;
  --primary: #0f62d9; --primary-hover: #0b4fb3; --primary-soft: #e8f1ff; --on-primary: #ffffff;
  --bg: #f4f7fc; --surface: #ffffff; --surface-2: #f8fafd; --ink: #0b1f44; --ink-2: #33466a; --muted: #566683;
  --line: #dfe7f3; --line-strong: #b4c1d8; --link: #0b4fb3; --focus: #0f62d9;
  --ok: #0c6b4a; --ok-bg: #e3f6ee; --warn: #8a5300; --warn-bg: #fff3dc; --bad: #b42318; --bad-bg: #fdecea; --info: #1b4ed0; --info-bg: #e8effd; --mute-bg: #eaeff6; --gold-bg: #f7efd9;
  --stat-blue: #e4efff; --stat-gold: #f8efd6; --stat-teal: #dff5f2; --stat-rose: #fde7ea;
  --shadow-sm: 0 1px 2px rgba(11, 31, 68, .06), 0 4px 14px rgba(11, 31, 68, .05);
  --shadow: 0 2px 4px rgba(11, 31, 68, .05), 0 18px 44px rgba(11, 31, 68, .10);
  --radius: 16px; --radius-sm: 10px; --sidebar-w: 268px; --topbar-h: 64px; --gutter: clamp(16px, 3vw, 32px);
  --font: "Manrope", "Cairo", system-ui, "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] { color-scheme: dark; }
:root[lang="ar"] { --font: "Cairo", "Manrope", system-ui, "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }
/* Dark theme tokens are written twice (OS preference and explicit choice) because CSS cannot share a rule between a media query and an attribute. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #060e1d; --surface: #0d1a33; --surface-2: #112143; --ink: #eaf0fb; --ink-2: #c3d0e8; --muted: #9db0cf; --line: #1f3156; --line-strong: #35507f; --link: #8fc2ff; --focus: #8fc2ff;
    --primary: #2272e6; --primary-hover: #3a85f2; --primary-soft: #14284d; --gold-ink: #e3b660; --gold-soft: #2a2412;
    --ok: #5fdcae; --ok-bg: #0f2d27; --warn: #ffc56b; --warn-bg: #33270f; --bad: #ff9a92; --bad-bg: #3a1618; --info: #9cc1ff; --info-bg: #14284d; --mute-bg: #172544; --gold-bg: #2f2813;
    --stat-blue: #12284d; --stat-gold: #2b2412; --stat-teal: #0f2d2d; --stat-rose: #331a20;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 2px 4px rgba(0, 0, 0, .35), 0 18px 44px rgba(0, 0, 0, .45);
  }
}
:root[data-theme="dark"] {
  --bg: #060e1d; --surface: #0d1a33; --surface-2: #112143; --ink: #eaf0fb; --ink-2: #c3d0e8; --muted: #9db0cf; --line: #1f3156; --line-strong: #35507f; --link: #8fc2ff; --focus: #8fc2ff;
  --primary: #2272e6; --primary-hover: #3a85f2; --primary-soft: #14284d; --gold-ink: #e3b660; --gold-soft: #2a2412;
  --ok: #5fdcae; --ok-bg: #0f2d27; --warn: #ffc56b; --warn-bg: #33270f; --bad: #ff9a92; --bad-bg: #3a1618; --info: #9cc1ff; --info-bg: #14284d; --mute-bg: #172544; --gold-bg: #2f2813;
  --stat-blue: #12284d; --stat-gold: #2b2412; --stat-teal: #0f2d2d; --stat-rose: #331a20;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 2px 4px rgba(0, 0, 0, .35), 0 18px 44px rgba(0, 0, 0, .45);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.6; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-wrap: break-word; }
[lang="ar"] body { line-height: 1.8; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3, [lang="ar"] h4 { line-height: 1.5; letter-spacing: 0; }
h1 { font-size: clamp(1.45rem, 1.2rem + 1.1vw, 1.95rem); font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .75em; }
a { color: var(--link); text-underline-offset: .18em; }
img, svg { max-inline-size: 100%; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sidebar, .auth-brand, .next-panel, .dlg-head { --focus: #8fc2ff; }
[tabindex="-1"]:focus { outline: none; }
.sr-only { position: absolute; inline-size: 1px; block-size: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; inset-inline-start: 12px; inset-block-start: -80px; z-index: 200; background: var(--navy-950); color: #fff; padding: 12px 18px; border-radius: 0 0 10px 10px; font-weight: 700; text-decoration: none; }
.skip-link:focus { inset-block-start: 0; outline-color: var(--gold-bright); }
.noscript { padding: 24px; text-align: center; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.code { font-family: var(--mono); font-size: .92em; letter-spacing: 0; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.link { color: var(--link); font-weight: 600; } .link-btn { background: none; border: 0; padding: 4px 0; color: var(--link); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: .18em; }
.stack { display: flex; flex-direction: column; gap: 20px; min-inline-size: 0; }
.ico { inline-size: 1.25em; block-size: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .ico.flip { transform: scaleX(-1); }
.back-link .ico { transform: scaleX(-1); }
[dir="rtl"] .back-link .ico.flip { transform: none; }

/* ------------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-block-size: 44px; padding: .5em 1.15em; border-radius: 12px; border: 1.5px solid transparent; font-weight: 700; font-size: .95rem; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, box-shadow .15s, transform .15s; }
.btn:hover { text-decoration: none; }
.btn-sm { min-block-size: 38px; padding: .35em .9em; font-size: .88rem; border-radius: 10px; }
.btn-lg { min-block-size: 52px; padding-inline: 1.6em; font-size: 1.02rem; }
.btn-block { inline-size: 100%; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 6px 16px rgba(15, 98, 217, .22); }
.btn-primary:hover { background: var(--primary-hover); color: #fff; transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--primary); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--link); }
.btn-ghost:hover { background: var(--primary-soft); color: var(--link); }
.btn-danger { background: var(--bad); color: #fff; } :root[data-theme="dark"] .btn-danger { color: #1c0605; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-danger { color: #1c0605; } }
.btn-danger:hover { filter: brightness(.94); }
.btn-gold { background: var(--gold-bright); color: #231a05; box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
.btn-gold:hover { background: #f0c56f; color: #231a05; transform: translateY(-1px); }
.btn-ghost-light { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.btn-text-danger { color: var(--bad); } .btn-text-danger:hover { background: var(--bad-bg); color: var(--bad); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.is-busy { position: relative; cursor: progress; }
.btn.is-busy::after { content: ""; inline-size: 1em; block-size: 1em; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.icon-btn { display: inline-grid; place-items: center; inline-size: 40px; block-size: 40px; border-radius: 10px; border: 0; background: transparent; color: inherit; cursor: pointer; }
.icon-btn:hover { background: rgba(127, 140, 170, .18); }
.tool-btn { display: inline-flex; align-items: center; gap: .45em; min-block-size: 40px; padding: .3em .8em; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: .88rem; cursor: pointer; text-decoration: none; position: relative; }
.tool-btn:hover { border-color: var(--primary); text-decoration: none; }
.tool-btn.icon-only { padding: 0; inline-size: 40px; justify-content: center; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ forms */
.form { display: flex; flex-direction: column; gap: 16px; min-inline-size: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.field-wide { grid-column: 1 / -1; }
.field > label, .label-like, .dlg-label { font-weight: 600; font-size: .9rem; color: var(--ink); }
.req { color: var(--bad); } .opt { color: var(--muted); font-weight: 400; }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[type="url"], input[type="date"], input[type="datetime-local"], input[type="search"], select, textarea {
  inline-size: 100%; min-block-size: 46px; padding: .55em .9em; background: var(--surface); color: var(--ink); border: 1.5px solid var(--line-strong); border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; min-block-size: 96px; line-height: 1.6; }
select { appearance: none; padding-inline-end: 2.4em; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; cursor: pointer; }
[dir="rtl"] select { background-position: 14px 50%, 20px 50%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(34, 114, 230, .22); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(180, 35, 24, .12); }
.field-error { margin: 0; color: var(--bad); font-size: .85rem; font-weight: 600; }
.hint { margin: 0; color: var(--muted); font-size: .85rem; }
.input-wrap { position: relative; display: flex; }
.input-wrap input { padding-inline-end: 3em; }
.eye { position: absolute; inset-inline-end: 4px; inset-block: 4px; inline-size: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.eye:hover { color: var(--ink); background: var(--surface-2); }
.phone-row { display: grid; grid-template-columns: minmax(104px, 128px) minmax(0, 1fr); gap: 8px; direction: ltr; }
[dir="rtl"] .phone-row { direction: rtl; }
.phone-row select, .phone-row input { direction: ltr; text-align: left; }
.hp { position: absolute; inset-inline-start: -9999px; inline-size: 1px; block-size: 1px; overflow: hidden; }
.field-check .check-row, .switch-label { display: flex; align-items: flex-start; gap: 10px; }
input[type="checkbox"], input[type="radio"] { inline-size: 20px; block-size: 20px; flex: none; margin: 2px 0 0; accent-color: var(--primary); cursor: pointer; }
.field-check label { font-weight: 400; font-size: .92rem; line-height: 1.55; cursor: pointer; }
.group { border: 0; padding: 0; margin: 0; }
.group-legend { padding: 0; margin-block-end: 6px; font-weight: 700; font-size: .92rem; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.choice { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color .15s, background-color .15s; }
.choice:hover { border-color: var(--line-strong); }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.choice input { margin: 0; } .choice-text { font-size: .92rem; font-weight: 600; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.form-summary:empty { display: none; }
.error-list { margin: 6px 0 0; padding-inline-start: 1.2em; } .error-list a { color: inherit; font-weight: 600; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-select { inline-size: auto; min-inline-size: 150px; min-block-size: 40px; padding-block: .3em; }
.inline-status { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-block-end: 12px; }
.readonly-name { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--line-strong); }
.ro-label { font-size: .8rem; color: var(--muted); font-weight: 600; } .ro-value { font-size: 1.05rem; }

/* password strength */
.strength { display: flex; flex-direction: column; gap: 8px; margin-block-start: 4px; }
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.meter i { block-size: 6px; border-radius: 4px; background: var(--mute-bg); transition: background-color .2s; }
.meter[data-score="1"] i:nth-child(-n+1) { background: var(--bad); } .meter[data-score="2"] i:nth-child(-n+2) { background: #d97706; }
.meter[data-score="3"] i:nth-child(-n+3) { background: #c9a349; } .meter[data-score="4"] i { background: var(--ok); }
.meter-label { margin: 0; font-size: .85rem; font-weight: 700; min-block-size: 1.2em; }
.rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: .85rem; color: var(--muted); }
.rules li { display: flex; align-items: center; gap: 8px; }
.rule-mark { inline-size: 16px; block-size: 16px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; display: inline-block; }
.rules li.ok { color: var(--ok); } .rules li.ok .rule-mark { background: var(--ok); border-color: var(--ok); box-shadow: inset 0 0 0 3px var(--surface); }

/* ------------------------------------------------------------------ badges, notices, states */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; font-size: .8rem; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.badge-dot { inline-size: 7px; block-size: 7px; border-radius: 50%; background: currentColor; }
.badge-ok { background: var(--ok-bg); color: var(--ok); } .badge-warn { background: var(--warn-bg); color: var(--warn); } .badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-info { background: var(--info-bg); color: var(--info); } .badge-mute { background: var(--mute-bg); color: var(--ink-2); } .badge-gold { background: var(--gold-bg); color: var(--gold-ink); }
.badge-stack { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font-size: .92rem; }
.notice .ico { margin-block-start: 2px; } .notice-body { display: flex; flex-direction: column; gap: 4px; min-inline-size: 0; }
.notice-info { background: var(--info-bg); border-color: transparent; color: var(--ink); } .notice-info .ico { color: var(--info); }
.notice-ok { background: var(--ok-bg); border-color: transparent; color: var(--ink); } .notice-ok .ico { color: var(--ok); }
.notice-warn { background: var(--warn-bg); border-color: transparent; color: var(--ink); } .notice-warn .ico { color: var(--warn); }
.notice-error { background: var(--bad-bg); border-color: transparent; color: var(--ink); } .notice-error .ico { color: var(--bad); }
.empty { text-align: center; padding: clamp(28px, 6vw, 56px) 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-ico { inline-size: 64px; block-size: 64px; display: grid; place-items: center; border-radius: 20px; background: var(--primary-soft); color: var(--link); } .empty-ico .ico { inline-size: 30px; block-size: 30px; }
.empty-title { font-size: 1.1rem; } .empty-text { color: var(--muted); max-inline-size: 46ch; margin: 0; } .empty-actions { margin-block-start: 8px; }
.loading { display: flex; flex-direction: column; gap: 14px; padding: 24px 4px; color: var(--muted); }
.loading > .spinner, .loading > span:first-child { display: none; }
.skeleton-rows { display: flex; flex-direction: column; gap: 10px; }
.sk { display: block; block-size: 18px; border-radius: 8px; background: linear-gradient(90deg, var(--mute-bg), var(--surface-2), var(--mute-bg)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.sk-short { inline-size: 55%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.state-error { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 20px; border-radius: 14px; background: var(--bad-bg); color: var(--ink); }
.state-error .ico { color: var(--bad); inline-size: 1.6em; block-size: 1.6em; } .state-error-text { display: flex; flex-direction: column; flex: 1 1 220px; }
.state-block { display: flex; flex-direction: column; gap: 16px; } .state-text { color: var(--ink-2); margin: 0; } .state-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.steps-list { margin: 0; padding-inline-start: 1.4em; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.resend { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; } .resend-status { margin: 0; color: var(--ink-2); font-size: .9rem; }
.resend-form { display: flex; flex-direction: column; gap: 14px; }
.chips, .chip-list, .file-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--mute-bg); font-size: .85rem; }
.chip-static { background: var(--primary-soft); color: var(--ink); font-weight: 600; }
.chip-x { border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--muted); padding: 2px; border-radius: 50%; } .chip-x:hover { color: var(--bad); }
.chip-size { color: var(--muted); font-size: .8rem; font-weight: 400; }
.file-link { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: .88rem; }
.file-link:hover { border-color: var(--primary); }
.attach { display: flex; flex-direction: column; gap: 8px; } .attach-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* ------------------------------------------------------------------ cards, page head, tables */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); min-inline-size: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 22px 0; }
.card-title { font-size: 1.05rem; } .card-sub { margin: 4px 22px 0; color: var(--muted); font-size: .9rem; }
.card-body { padding: 18px 22px 22px; min-inline-size: 0; display: flex; flex-direction: column; gap: 14px; }
.card-foot { margin-block-start: auto; padding-block-start: 6px; }
.card-danger { border-color: rgba(180, 35, 24, .35); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-block-end: 22px; }
.page-sub { color: var(--muted); margin: 6px 0 0; max-inline-size: 70ch; }
.page-actions, .page-actions-stack { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-block-end: 10px; font-weight: 600; text-decoration: none; font-size: .9rem; color: var(--link); }
.back-link:hover { text-decoration: underline; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-block-end: 20px; align-items: start; }
.two-col-wide { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); }
.sub-h { margin-block: 18px 6px; font-size: .95rem; }
.toolbar { display: flex; align-items: center; gap: 12px; margin-block-end: 14px; flex-wrap: wrap; } .toolbar-label { font-weight: 600; font-size: .9rem; }
.toolbar-fields { align-items: flex-end; } .toolbar-fields .field { min-inline-size: 220px; }
.tabs { display: flex; gap: 4px; border-block-end: 1px solid var(--line); margin-block-end: 20px; overflow-x: auto; scrollbar-width: thin; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; font-weight: 700; color: var(--muted); text-decoration: none; border-block-end: 3px solid transparent; margin-block-end: -1px; white-space: nowrap; }
.tab:hover { color: var(--ink); } .tab.is-active { color: var(--ink); border-block-end-color: var(--gold); }
.tab-count { background: var(--gold-bg); color: var(--gold-ink); border-radius: 999px; padding: 0 8px; font-size: .78rem; }
.table-wrap { inline-size: 100%; overflow-x: auto; }
.table { inline-size: 100%; border-collapse: collapse; font-size: .92rem; }
.table thead th { text-align: start; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 10px 14px; border-block-end: 1px solid var(--line); white-space: nowrap; }
[lang="ar"] .table thead th { text-transform: none; letter-spacing: 0; font-size: .85rem; }
.table td, .table tbody th { padding: 14px; border-block-end: 1px solid var(--line); vertical-align: middle; text-align: start; font-weight: 400; }
.table tbody th { font-weight: 600; }
.table tbody tr:last-child td, .table tbody tr:last-child th { border-block-end: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: end; font-variant-numeric: tabular-nums; } .table thead th.num { text-align: end; }
.table .col-actions { text-align: end; white-space: nowrap; }
.row-link { font-weight: 700; text-decoration: none; } .row-link:hover { text-decoration: underline; }
.row-action td:first-child, .row-action th:first-child { box-shadow: inset 4px 0 0 var(--gold); }
[dir="rtl"] .row-action td:first-child, [dir="rtl"] .row-action th:first-child { box-shadow: inset -4px 0 0 var(--gold); }
.money { font-variant-numeric: tabular-nums; unicode-bidi: plaintext; white-space: nowrap; }
.validity { display: inline-flex; flex-direction: column; gap: 2px; }
.cd { display: inline-block; font-size: .8rem; font-weight: 700; border-radius: 999px; padding: 1px 10px; }
.cd-ok { background: var(--ok-bg); color: var(--ok); } .cd-warn { background: var(--warn-bg); color: var(--warn); } .cd-danger { background: var(--bad-bg); color: var(--bad); } .cd-mute { background: var(--mute-bg); color: var(--ink-2); }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-block-start: 16px; } .pager-info { color: var(--muted); font-size: .9rem; }
.kv { margin: 0; display: flex; flex-direction: column; }
.kv-row { display: grid; grid-template-columns: minmax(120px, 38%) minmax(0, 1fr); gap: 12px; padding: 10px 0; border-block-end: 1px solid var(--line); }
.kv-row:last-child { border-block-end: 0; } .kv-row dt { color: var(--muted); font-size: .88rem; font-weight: 600; } .kv-row dd { margin: 0; min-inline-size: 0; overflow-wrap: anywhere; }
.copy-row { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 14px; padding-block-end: 18px; position: relative; }
.tl-item::before { content: ""; position: absolute; inset-inline-start: 6px; inset-block: 18px 0; inline-size: 2px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot { inline-size: 14px; block-size: 14px; margin-block-start: 5px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.tl-item.is-you .tl-dot { background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.tl-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .85rem; color: var(--muted); } .tl-meta strong { color: var(--ink); }
.tl-event { font-weight: 600; } .tl-text { margin: 4px 0 0; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }

/* journey tracker: vertical list by default, one row of columns on wide screens */
.tracker { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.step { display: grid; align-content: start; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; position: relative; padding-block-end: 18px; }
.step::before { content: ""; position: absolute; inset-inline-start: 17px; inset-block: 38px 2px; inline-size: 2px; background: var(--line); }
.step:last-child { padding-block-end: 0; } .step:last-child::before { display: none; }
.step-done::before { background: var(--ok); }
.step-dot { inline-size: 36px; block-size: 36px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-strong); background: var(--surface); color: var(--muted); font-weight: 800; font-size: .85rem; }
.step-done .step-dot { background: var(--ok); border-color: var(--ok); color: #fff; } :root[data-theme="dark"] .step-done .step-dot { color: #04251b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .step-done .step-dot { color: #04251b; } }
.step-current .step-dot { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 5px rgba(34, 114, 230, .18); animation: ring 2.4s ease-in-out infinite; }
@keyframes ring { 50% { box-shadow: 0 0 0 9px rgba(34, 114, 230, .06); } }
.step-text { display: flex; flex-direction: column; gap: 2px; padding-block-start: 5px; min-inline-size: 0; }
.step-label { font-weight: 700; } .step-todo .step-label { color: var(--muted); font-weight: 600; }
.step-state { font-size: .8rem; color: var(--muted); } .step-current .step-state { color: var(--primary); font-weight: 700; } :root[data-theme="dark"] .step-current .step-state, :root[data-theme="dark"] .step-current .step-dot { color: #9cc1ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .step-current .step-state, :root:not([data-theme="light"]) .step-current .step-dot { color: #9cc1ff; } }
.step-hint { font-size: .85rem; color: var(--ink-2); }
.tracker-compact .step { padding-block-end: 12px; } .tracker-compact .step-dot { inline-size: 30px; block-size: 30px; font-size: .78rem; } .tracker-compact .step::before { inset-inline-start: 14px; inset-block-start: 32px; }
.tracker-compact .step { grid-template-columns: 30px minmax(0, 1fr); }
@media (min-width: 1180px) {
  .journey-card .tracker:not(.tracker-compact) { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 0 6px; }
  .journey-card .tracker:not(.tracker-compact) .step { grid-template-columns: 1fr; justify-items: center; text-align: center; padding-block-end: 0; gap: 10px; }
  .journey-card .tracker:not(.tracker-compact) .step::before { inset-inline-start: calc(50% + 24px); inset-inline-end: calc(-50% + 24px); inset-block: 17px auto; inline-size: auto; block-size: 2px; display: block; }
  [dir="rtl"] .journey-card .tracker:not(.tracker-compact) .step::before { inset-inline-start: calc(50% + 24px); inset-inline-end: calc(-50% + 24px); }
  .journey-card .tracker:not(.tracker-compact) .step:last-child::before { display: none; }
  .journey-card .tracker:not(.tracker-compact) .step-text { align-items: center; padding-block-start: 0; }
}
.order-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding-block-end: 8px; } .order-msg { margin: 0; color: var(--ink-2); font-weight: 600; flex: 1 1 280px; }

/* ------------------------------------------------------------------ dialog and toasts */
.dlg { padding: 0; border: 0; border-radius: 20px; background: var(--surface); color: var(--ink); inline-size: min(560px, calc(100vw - 32px)); max-block-size: calc(100dvh - 32px); box-shadow: var(--shadow); overflow: hidden; }
.dlg-sm { inline-size: min(440px, calc(100vw - 32px)); }
.dlg::backdrop { background: rgba(5, 14, 32, .62); }
.dlg[open] { animation: pop .18s ease-out; display: flex; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.dlg-box { display: flex; flex-direction: column; inline-size: 100%; max-block-size: calc(100dvh - 32px); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; background: linear-gradient(135deg, var(--navy-900), var(--navy-800)); color: #fff; }
.dlg-head .dlg-title { color: #fff; font-size: 1.1rem; } .dlg-head .icon-btn { color: #fff; }
.dlg-body { padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.dlg-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-block-start: 1px solid var(--line); background: var(--surface-2); }
.dlg-text { margin: 0; color: var(--ink-2); } .dlg-error:empty { display: none; }
.toasts { position: fixed; inset-block-end: 16px; inset-inline-end: 16px; z-index: 300; display: flex; flex-direction: column; gap: 10px; max-inline-size: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toasts-alert { inset-block-end: auto; inset-block-start: 76px; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--navy-900); color: #fff; box-shadow: var(--shadow); border-inline-start: 5px solid var(--gold-bright); animation: slide .22s ease-out; }
.toast-ok { border-inline-start-color: #3ccf9b; } .toast-error { background: #7a1b13; border-inline-start-color: #ff9a92; }
.toast-msg { flex: 1; font-weight: 600; font-size: .92rem; } .toast-x { background: transparent; border: 0; color: inherit; cursor: pointer; padding: 2px; display: grid; place-items: center; opacity: .8; } .toast-x:hover { opacity: 1; }
@keyframes slide { from { opacity: 0; transform: translateY(10px); } }

/* ------------------------------------------------------------------ sign-in layout */
.auth-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); min-block-size: 100dvh; }
.auth-brand { position: sticky; inset-block-start: 0; block-size: 100dvh; align-self: start; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: clamp(28px, 4vw, 56px); color: #eaf1ff;
  background: radial-gradient(900px 500px at 15% 0%, rgba(22, 119, 255, .28), transparent 60%), radial-gradient(700px 500px at 100% 100%, rgba(201, 163, 73, .18), transparent 60%), linear-gradient(160deg, var(--navy-900), var(--navy-950) 70%); }
.auth-brand::after { content: ""; position: absolute; inset-inline-end: -12%; inset-block-end: -8%; inline-size: 62%; aspect-ratio: 1.37; background: url("/portal/assets/symbol.webp") no-repeat center / contain; opacity: .09; pointer-events: none; }
[dir="rtl"] .auth-brand::after { transform: scaleX(-1); }
.auth-logo { inline-size: min(300px, 70%); block-size: auto; }
.auth-brand-mid { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 18px; max-inline-size: 560px; }
.eyebrow { margin: 0; font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-ink); }
[lang="ar"] .eyebrow { letter-spacing: 0; font-size: .85rem; }
.auth-brand .eyebrow, .next-panel .eyebrow { color: var(--gold-bright); }
.auth-brand .eyebrow::before, .next-panel .eyebrow::before { content: ""; display: inline-block; inline-size: 26px; block-size: 2px; background: var(--gold-bright); vertical-align: middle; margin-inline-end: 10px; }
.auth-headline { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.8rem); font-weight: 800; line-height: 1.15; color: #fff; }
[lang="ar"] .auth-headline { line-height: 1.45; }
.auth-headline em { font-style: normal; background: linear-gradient(90deg, #f6d58f, #e3b660 55%, #c98f2e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-lede { color: #b9c8e4; margin: 0; font-size: 1.02rem; max-inline-size: 52ch; }
.auth-points { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.auth-points li { display: flex; gap: 14px; align-items: flex-start; } .auth-points li > span:last-child { display: flex; flex-direction: column; } .auth-points strong { color: #fff; } .auth-points li span span, .auth-points li > span > span { color: #b9c8e4; font-size: .92rem; }
.auth-point-ico { flex: none; inline-size: 42px; block-size: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--gold-bright); background: rgba(227, 182, 96, .12); border: 1px solid rgba(227, 182, 96, .35); }
.auth-brand-foot { position: relative; z-index: 1; margin: 0; font-size: .85rem; color: #93a6c8; }
.auth-form-col { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 20px var(--gutter) 28px; background: var(--bg); min-inline-size: 0; }
.auth-tools { align-self: stretch; display: flex; justify-content: flex-end; gap: 8px; }
.auth-logo-mobile { display: none; } .logo-sm { block-size: 44px; inline-size: auto; }
.auth-card { inline-size: 100%; max-inline-size: 460px; margin-block: auto; padding: clamp(24px, 4vw, 38px); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 22px; }
.auth-card.is-wide { max-inline-size: 760px; }
.auth-card > div { display: flex; flex-direction: column; gap: 22px; min-inline-size: 0; }
.auth-head { display: flex; flex-direction: column; gap: 8px; } .auth-badge { inline-size: 48px; block-size: 48px; border-radius: 14px; display: grid; place-items: center; color: var(--gold-ink); background: var(--gold-soft); border: 1px solid rgba(201, 163, 73, .5); margin-block-end: 6px; } .auth-badge .ico { inline-size: 24px; block-size: 24px; }
.auth-sub { margin: 0; color: var(--muted); } .auth-alt { margin: 0; text-align: center; color: var(--muted); font-size: .92rem; }
.auth-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; font-size: .85rem; color: var(--muted); } .auth-legal a { color: var(--muted); } .auth-copy { inline-size: 100%; text-align: center; }
.reg-holder { display: flex; flex-direction: column; gap: 22px; }

/* ------------------------------------------------------------------ signed-in layout */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-block-size: 100dvh; }
.sidebar { position: sticky; inset-block-start: 0; block-size: 100dvh; display: flex; flex-direction: column; background: linear-gradient(180deg, var(--navy-900), var(--navy-950)); color: #cbd7ee; overflow-y: auto; border-inline-end: 1px solid rgba(255, 255, 255, .06); }
.side-brand { display: block; padding: 18px 22px 10px; } .side-logo { inline-size: 100%; max-inline-size: 190px; block-size: auto; }
.side-nav { padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.nav-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nav-group-title { margin: 0 12px 6px; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: #8497bb; font-weight: 800; } [lang="ar"] .nav-group-title { letter-spacing: 0; font-size: .8rem; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 12px; color: #cbd7ee; text-decoration: none; font-weight: 600; font-size: .92rem; position: relative; transition: background-color .15s, color .15s; min-block-size: 40px; }
.nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.nav-link.is-active { background: rgba(255, 255, 255, .1); color: #fff; }
.nav-link.is-active::before { content: ""; position: absolute; inset-inline-start: -12px; inset-block: 9px; inline-size: 4px; border-start-end-radius: 4px; border-end-end-radius: 4px; background: var(--gold-bright); }
.nav-link.is-active .ico { color: var(--gold-bright); }
.nav-text { flex: 1; min-inline-size: 0; }
.nav-badge { min-inline-size: 22px; padding: 0 7px; border-radius: 999px; background: var(--gold-bright); color: #231a05; font-size: .75rem; font-weight: 800; text-align: center; line-height: 22px; }
.side-foot { margin: 0 14px 18px; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); }
.side-foot-title { margin: 0 0 4px; font-weight: 800; color: #fff; font-size: .9rem; } .side-foot-text { margin: 0; font-size: .82rem; color: #a9bad9; line-height: 1.55; }
.app-main { min-inline-size: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; inset-block-start: 0; z-index: 40; display: flex; align-items: center; gap: 10px; min-block-size: var(--topbar-h); padding: 10px var(--gutter); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-block-end: 1px solid var(--line); }
.topbar-spacer { flex: 1; } .menu-btn { display: none; }
.company-chip { display: inline-flex; align-items: center; gap: 8px; min-inline-size: 0; padding: 6px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; max-inline-size: 320px; }
.company-chip .ico { color: var(--gold-ink); } .company-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-select { border: 0; background-color: transparent; min-block-size: 32px; padding: 0 1.8em 0 0; font-weight: 700; inline-size: auto; max-inline-size: 240px; } [dir="rtl"] .company-select { padding: 0 0 0 1.8em; }
.company-select:focus { box-shadow: none; }
.bell-dot { position: absolute; inset-block-start: 8px; inset-inline-end: 9px; inline-size: 9px; block-size: 9px; border-radius: 50%; background: var(--gold); border: 2px solid var(--surface); }
.user-menu { position: relative; }
.user-btn { display: inline-flex; align-items: center; gap: 8px; min-block-size: 40px; padding: 3px 10px 3px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 700; } [dir="rtl"] .user-btn { padding: 3px 4px 3px 10px; }
.avatar { inline-size: 32px; block-size: 32px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--navy-800), var(--primary)); color: #fff; font-size: .78rem; font-weight: 800; }
.user-pop { position: absolute; inset-block-start: calc(100% + 8px); inset-inline-end: 0; z-index: 60; min-inline-size: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; }
.user-pop-head { padding: 10px 12px; display: flex; flex-direction: column; border-block-end: 1px solid var(--line); margin-block-end: 4px; }
.user-pop a, .user-pop button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; background: none; border: 0; cursor: pointer; text-align: start; inline-size: 100%; }
.user-pop a:hover, .user-pop button:hover { background: var(--surface-2); text-decoration: none; }
.app-content { padding: clamp(18px, 3vw, 34px) var(--gutter) 56px; max-inline-size: 1320px; inline-size: 100%; margin-inline: auto; min-inline-size: 0; }
.backdrop { position: fixed; inset: 0; background: rgba(5, 14, 32, .55); z-index: 90; }

/* ------------------------------------------------------------------ dashboard */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-block-end: 20px; }
.stat { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink); transition: transform .15s, border-color .15s, box-shadow .15s; }
.stat:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow); text-decoration: none; }
.stat-ico { inline-size: 48px; block-size: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; } .stat-ico .ico { inline-size: 24px; block-size: 24px; }
.stat-blue .stat-ico { background: var(--stat-blue); color: var(--link); } .stat-gold .stat-ico { background: var(--stat-gold); color: var(--gold-ink); } .stat-teal .stat-ico { background: var(--stat-teal); color: var(--ok); } .stat-rose .stat-ico { background: var(--stat-rose); color: var(--bad); }
.stat-text { display: flex; flex-direction: column; min-inline-size: 0; } .stat-value { font-size: 1.9rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; } .stat-label { color: var(--muted); font-size: .88rem; font-weight: 600; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 20px; margin-block-end: 20px; align-items: stretch; }
.dash-grid-2 { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: start; }
.next-panel { position: relative; overflow: hidden; border-radius: var(--radius); padding: clamp(22px, 3vw, 34px); color: #eaf1ff; display: flex; flex-direction: column; gap: 12px; justify-content: center;
  background: radial-gradient(600px 300px at 100% 0%, rgba(22, 119, 255, .35), transparent 60%), linear-gradient(150deg, var(--navy-800), var(--navy-950)); box-shadow: var(--shadow); }
.next-panel::after { content: ""; position: absolute; inset-inline-end: -40px; inset-block-end: -40px; inline-size: 220px; aspect-ratio: 1.37; background: url("/portal/assets/symbol.webp") no-repeat center / contain; opacity: .1; pointer-events: none; }
[dir="rtl"] .next-panel::after { transform: scaleX(-1); }
.next-panel h2 { color: #fff; font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); font-weight: 800; } .next-panel p { color: #bccae6; max-inline-size: 52ch; margin: 0; }
.next-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-block-start: 8px; position: relative; z-index: 1; }
.journey-card .card-body { padding-block-start: 14px; }
.activity { list-style: none; margin: 0; padding: 0; } .act-row { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-block-end: 1px solid var(--line); color: var(--ink); text-decoration: none; border-radius: 10px; }
.activity li:last-child .act-row { border-block-end: 0; } a.act-row:hover { background: var(--surface-2); text-decoration: none; }
.act-ico, .notif-ico, .thread-ico, .session-ico { inline-size: 40px; block-size: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--primary-soft); color: var(--link); }
.act-text, .notif-main, .thread-main, .session-main { display: flex; flex-direction: column; flex: 1; min-inline-size: 0; } .act-title { font-weight: 600; } .act-ref { font-size: .85rem; color: var(--muted); } .act-time { color: var(--muted); font-size: .82rem; white-space: nowrap; }

/* ------------------------------------------------------------------ quotation detail */
.q-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; grid-template-areas: "main act" "main extra"; gap: 20px; align-items: start; }
.q-main { grid-area: main; } .q-act { grid-area: act; position: sticky; inset-block-start: calc(var(--topbar-h) + 16px); } .q-extra { grid-area: extra; }
.q-summary .card-body { padding: 22px; }
.q-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.q-number { font-size: 1.7rem; font-weight: 800; } .q-meta { margin: 2px 0 0; color: var(--muted); font-weight: 600; }
.q-top-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; } [dir="rtl"] .q-top-side { align-items: flex-start; } .q-valid { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.q-summary { margin-block-end: 20px; border-inline-start: 5px solid var(--gold); }
.q-main > .card + .notice, .q-layout .notice { margin: 0; }
.totals-wrap { display: flex; justify-content: flex-end; } .totals { margin: 0; inline-size: min(420px, 100%); display: flex; flex-direction: column; }
.tot-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-block-end: 1px solid var(--line); } .tot-row dt { color: var(--muted); font-weight: 600; } .tot-row dd { margin: 0; font-weight: 700; }
.tot-grand { border-block-end: 0; padding-block-start: 14px; border-block-start: 2px solid var(--ink); margin-block-start: 4px; } .tot-grand dt { color: var(--ink); font-weight: 800; font-size: 1.05rem; } .tot-grand dd { font-size: 1.25rem; font-weight: 800; }
.terms { display: flex; flex-direction: column; gap: 14px; } .term h4 { font-size: .9rem; color: var(--muted); margin-block-end: 2px; } .term p { margin: 0; }
.action-stack { display: flex; flex-direction: column; gap: 10px; }
.version-list, .resp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; } .version-item, .resp-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-block-end: 1px solid var(--line); }
.resp-list li { flex-wrap: wrap; justify-content: flex-start; } .resp-text { flex-basis: 100%; margin: 0; padding: 8px 12px; background: var(--surface-2); border-radius: 10px; } .version-item:last-child, .resp-list li:last-child { border-block-end: 0; } .version-item.is-view { font-weight: 700; }
.pos-card .card-body { gap: 16px; } .pos-sep { display: flex; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--gold-bg); border: 1px solid rgba(201, 163, 73, .5); } .pos-sep .ico { color: var(--gold-ink); inline-size: 1.6em; block-size: 1.6em; margin-block-start: 2px; } .pos-sep p { margin: 2px 0 0; color: var(--ink-2); }
.sub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin-block-start: 16px; }
.sub-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.limits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; } .limits li { display: flex; flex-direction: column; padding: 10px; border-radius: 12px; background: var(--surface-2); text-align: center; font-size: .82rem; } .limits strong { font-size: 1.3rem; }
.sub-card .card-body { block-size: 100%; }

/* ------------------------------------------------------------------ messages, notifications, settings */
.msg-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 20px; align-items: stretch; block-size: clamp(520px, calc(100dvh - 230px), 820px); }
.msg-list, .msg-view { display: flex; flex-direction: column; min-block-size: 0; overflow: hidden; }
.msg-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-block-end: 1px solid var(--line); } .msg-list-body { overflow-y: auto; flex: 1; }
.thread-list { list-style: none; margin: 0; padding: 6px; } .thread-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; text-decoration: none; color: var(--ink); } .thread-row:hover { background: var(--surface-2); text-decoration: none; }
.thread-row.is-active { background: var(--primary-soft); } .thread-row.is-unread .thread-subject { font-weight: 800; } .thread-subject { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .thread-meta { color: var(--muted); font-size: .82rem; }
.unread-badge { min-inline-size: 24px; padding: 0 8px; border-radius: 999px; background: var(--primary); color: #fff; font-size: .78rem; font-weight: 800; text-align: center; line-height: 24px; }
.thread-head { display: flex; flex-direction: column; gap: 6px; padding: 16px 20px; border-block-end: 1px solid var(--line); } .thread-title { font-size: 1.1rem; } .thread-sub { margin: 0; color: var(--muted); font-size: .88rem; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.only-narrow { display: none; }
.msg-log { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; background: var(--surface-2); min-block-size: 0; }
.bubble { max-inline-size: min(560px, 88%); padding: 12px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 6px; }
.bubble.is-you { align-self: flex-end; background: var(--primary-soft); border-color: transparent; border-end-end-radius: 4px; } .bubble.is-staff { align-self: flex-start; border-end-start-radius: 4px; }
.bubble-head { display: flex; gap: 12px; justify-content: space-between; font-size: .8rem; color: var(--muted); } .bubble-head strong { color: var(--ink); } .bubble-body { margin: 0; }
.composer { padding: 14px 20px 18px; border-block-start: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; background: var(--surface); }
.composer textarea { min-block-size: 76px; }
.notif-list { list-style: none; margin: 0; padding: 0; } .notif-row { display: flex; align-items: center; gap: 14px; padding: 14px 8px; border-block-end: 1px solid var(--line); color: var(--ink); text-decoration: none; border-radius: 10px; cursor: pointer; }
.notif-list li:last-child .notif-row { border-block-end: 0; } .notif-row:hover { background: var(--surface-2); text-decoration: none; } .notif-row.is-unread { background: color-mix(in srgb, var(--primary-soft) 55%, transparent); }
.notif-title { font-weight: 600; } .notif-row.is-unread .notif-title { font-weight: 800; } .notif-meta { color: var(--muted); font-size: .82rem; } .unread-dot { inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--gold); flex: none; }
.pref-set { border: 0; padding: 0; margin: 0; } .pref-list { list-style: none; margin: 8px 0 0; padding: 0; } .pref-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-block-end: 1px solid var(--line); }
.pref-row:last-child { border-block-end: 0; } .pref-label { display: flex; flex-direction: column; flex: 1; cursor: pointer; } .pref-title { font-weight: 700; } .pref-desc { color: var(--muted); font-size: .88rem; }
.switch { position: relative; inline-size: 48px; block-size: 28px; flex: none; } .switch input { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch-ui { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background-color .2s; } .switch-ui::after { content: ""; position: absolute; inset-block-start: 3px; inset-inline-start: 3px; inline-size: 22px; block-size: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.switch input:checked + .switch-ui { background: var(--primary); } .switch input:checked + .switch-ui::after { transform: translateX(20px); } [dir="rtl"] .switch input:checked + .switch-ui::after { transform: translateX(-20px); }
.switch input:focus-visible + .switch-ui { outline: 3px solid var(--focus); outline-offset: 2px; }
.set-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.set-nav { position: sticky; inset-block-start: calc(var(--topbar-h) + 16px); } .set-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.set-nav-btn { inline-size: 100%; text-align: start; padding: 10px 14px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; font-weight: 600; color: var(--ink-2); } .set-nav-btn:hover { background: var(--surface); color: var(--ink); }
.set-anchor { scroll-margin-block-start: calc(var(--topbar-h) + 16px); }
.session-list { list-style: none; margin: 0; padding: 0; } .session-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-block-end: 1px solid var(--line); flex-wrap: wrap; } .session-row:last-child { border-block-end: 0; }
.session-main { align-items: flex-start; }
.session-main strong { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mfa-qr { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; } .qr-box { inline-size: 200px; block-size: 200px; padding: 8px; background: #fff; border-radius: 14px; border: 1px solid var(--line); } .qr-svg { display: block; inline-size: 100%; block-size: 100%; }
.mfa-secret { flex: 1 1 240px; } .secret { display: inline-block; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-family: var(--mono); letter-spacing: .08em; word-break: break-all; user-select: all; }
.mfa-setup, .recovery { display: flex; flex-direction: column; gap: 16px; }
.codes { list-style: none; margin: 0; padding: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--line-strong); } .codes code { font-family: var(--mono); font-size: 1rem; letter-spacing: .06em; }

/* ------------------------------------------------------------------ responsive */
@media (max-height: 880px) and (min-width: 1025px) { .side-foot-text { display: none; } .side-foot { margin-block-end: 12px; } }
@media (max-width: 1180px) {
  .q-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "act" "main" "extra"; } .q-act { position: static; }
  .dash-grid, .dash-grid-2, .two-col, .two-col-wide { grid-template-columns: minmax(0, 1fr); }
  .msg-layout { grid-template-columns: 300px minmax(0, 1fr); }
}
@media (max-width: 1024px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; inline-size: min(300px, 86vw); z-index: 100; transform: translateX(-102%); transition: transform .22s ease-out; box-shadow: var(--shadow); visibility: hidden; }
  [dir="rtl"] .sidebar { transform: translateX(102%); }
  .drawer-open .sidebar { transform: none; visibility: visible; }
  .menu-btn { display: inline-flex; }
  .user-name { display: none; }
}
@media (max-width: 900px) {
  .auth-layout { grid-template-columns: minmax(0, 1fr); }
  .auth-brand { display: none; } .auth-logo-mobile { display: block; }
  .set-layout { grid-template-columns: minmax(0, 1fr); } .set-nav { position: static; } .set-nav ul { flex-direction: row; flex-wrap: wrap; gap: 6px; } .set-nav-btn { background: var(--surface); border: 1px solid var(--line); inline-size: auto; }
  .msg-layout { grid-template-columns: minmax(0, 1fr); block-size: auto; }
  .msg-layout .msg-view { display: none; } .msg-layout.has-thread .msg-list { display: none; } .msg-layout.has-thread .msg-view { display: flex; block-size: clamp(480px, calc(100dvh - 200px), 800px); } .msg-layout:not(.has-thread) .msg-list { block-size: auto; max-block-size: 70dvh; }
  .only-narrow { display: inline-flex; }
}
@media (max-width: 720px) {
  .form-grid, .form-grid-3, .rules { grid-template-columns: minmax(0, 1fr); }
  .kv-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .card-head, .card-body { padding-inline: 16px; } .card-sub { margin-inline: 16px; }
  .auth-card { padding: 22px 18px; border-radius: 20px; }
  .page-head { align-items: flex-start; }
  .company-chip { max-inline-size: 150px; } .tool-btn span { display: none; } .tool-btn { padding-inline: 0; inline-size: 40px; justify-content: center; }
  .limits { grid-template-columns: repeat(3, 1fr); }
  /* tables become stacked cards: no horizontal scrolling on a phone */
  .table thead { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
  .table, .table tbody, .table tr, .table td, .table tbody th { display: block; inline-size: 100%; }
  .table tr { padding: 12px 4px; border-block-end: 1px solid var(--line); } .table tbody tr:last-child { border-block-end: 0; }
  .table td, .table tbody th { border: 0; padding: 5px 8px; display: flex; justify-content: space-between; align-items: center; gap: 14px; text-align: end; }
  .table td::before, .table tbody th::before { content: attr(data-label); color: var(--muted); font-size: .8rem; font-weight: 700; text-align: start; flex: none; }
  .table tbody th { justify-content: flex-start; text-align: start; font-weight: 700; } .table tbody th::before { display: none; }
  .table .col-actions { justify-content: flex-end; } .table .col-actions::before { display: none; }
  .table .num { text-align: end; }
  .row-action { box-shadow: inset 4px 0 0 var(--gold); } [dir="rtl"] .row-action { box-shadow: inset -4px 0 0 var(--gold); } .row-action td:first-child, .row-action th:first-child { box-shadow: none !important; }
  .dlg { inline-size: 100vw; max-inline-size: 100vw; margin: auto 0 0; border-end-start-radius: 0; border-end-end-radius: 0; max-block-size: 92dvh; }
  .dlg-foot .btn { flex: 1 1 auto; }
  .toasts { inset-inline: 12px; max-inline-size: none; }
  .tab { padding-inline: 12px; }
}
@media (max-width: 420px) { .phone-row { grid-template-columns: 100px minmax(0, 1fr); } .stat { padding: 14px; } .stat-value { font-size: 1.6rem; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) { .badge, .btn, .step-dot, .stat { border: 1px solid CanvasText; } }

/* the consent wording the server records with an acceptance (shown as written) */
.consent-text { margin: 0 0 14px; padding: 12px 14px; border-inline-start: 3px solid var(--gold); background: var(--surface-2); border-radius: 8px; font-size: 14px; line-height: 1.6; color: var(--ink); max-block-size: 160px; overflow: auto; }

/* Cancellation and refunds card (screens_policy.js) */
.pol-card-box { margin-block-start: 16px; }
.pol-card .muted { line-height: 1.6; }
.pol-requests { margin-block: 14px; }
.small-title { margin: 0 0 6px; font-size: .95rem; font-weight: 700; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

/* ------------------------------------------------------------------ Customer Care chat (screens_chat.js). Reuses the message-centre layout (.msg-layout, .thread-row, .msg-log, .bubble, .composer). */
input[readonly] { background: var(--surface-2); color: var(--ink-2); cursor: default; }
.chat-note, .chat-off { margin-block-end: 16px; display: flex; flex-direction: column; gap: 12px; }
.chat-list-head { padding: 14px 16px; border-block-end: 1px solid var(--line); }
.chat-list-title { font-size: 1rem; }
.chat-layout .thread-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.chat-header { gap: 8px; }
.chat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.chat-head-main { display: flex; flex-direction: column; gap: 6px; min-inline-size: 0; }
.chat-links { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-link { background: var(--primary-soft); color: var(--ink); font-weight: 600; text-decoration: none; border: 1px solid transparent; }
.chip-link:hover { border-color: var(--primary); text-decoration: none; }
.chip-link .ico { inline-size: 16px; block-size: 16px; }
.chat-presence { margin: 0; color: var(--muted); font-size: .85rem; }
.chat-banners { display: flex; flex-direction: column; gap: 8px; padding: 12px 20px; flex: none; border-block-end: 1px solid var(--line); background: var(--surface); }
.chat-header { flex: none; }
.chat-typing, .chat-composer { flex: none; }
.chat-banners:empty { display: none; }
.chat-conn { padding-block: 8px; }
.chat-log { position: relative; scroll-behavior: smooth; }
.chat-flash { flex: none; }
.chat-pending { display: flex; flex-direction: column; gap: 14px; }
.chat-pending:empty { display: none; }
.chat-day { align-self: center; font-size: .78rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px 14px; }
.chat-sys { align-self: center; text-align: center; max-inline-size: 92%; font-size: .85rem; color: var(--ink-2); background: var(--mute-bg); border-radius: 14px; padding: 6px 14px; }
.chat-sys-time { color: var(--muted); font-size: .75rem; white-space: nowrap; }
.bubble.is-auto { align-self: flex-start; background: var(--gold-bg); border-color: transparent; border-end-start-radius: 4px; }
.bubble.is-pending { opacity: .72; }
.bubble.is-failed { border-color: var(--bad); }
.chat-sending { font-style: italic; }
.chat-meta { display: flex; justify-content: flex-end; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); }
.chat-ticks { display: inline-flex; align-items: center; color: var(--muted); }
.chat-ticks .ico { inline-size: 14px; block-size: 14px; }
.chat-ticks .ico + .ico { margin-inline-start: -8px; }
.chat-ticks.is-seen { color: var(--primary); }
.chat-failed { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chat-failed .field-error { flex-basis: 100%; margin: 0; }
.chat-jump { align-self: center; margin-block: 6px; box-shadow: var(--shadow-sm); }
.chat-typing { margin: 0; padding: 4px 20px; display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); background: var(--surface-2); }
.chat-dots { display: inline-flex; gap: 3px; }
.chat-dots i { inline-size: 6px; block-size: 6px; border-radius: 50%; background: var(--muted); animation: chat-dot 1.2s infinite ease-in-out; }
.chat-dots i:nth-child(2) { animation-delay: .15s; } .chat-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chat-composer-row { display: flex; align-items: flex-end; gap: 10px; }
.chat-composer-row .chat-input { flex: 1; min-inline-size: 0; min-block-size: 48px; max-block-size: 9rem; field-sizing: content; }
.chat-composer-row .btn { flex: none; }
.chat-composer .hint { margin: 0; }
.chat-gone { display: flex; flex-direction: column; gap: 12px; padding: 16px; align-items: flex-start; }
.chat-claim { border-block-start: 1px solid var(--line); padding: 12px 16px; background: var(--surface); }
.chat-claim-sum { cursor: pointer; font-weight: 700; color: var(--link); padding-block: 4px; }
.chat-claim[open] .chat-claim-sum { margin-block-end: 8px; }
.chat-claim-form { display: flex; flex-direction: column; gap: 10px; }
.chat-claim-form .hint { line-height: 1.55; }
.chat-about { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chat-privacy { display: flex; flex-direction: column; gap: 6px; }
.chat-privacy .consent-text { margin: 0; white-space: pre-line; }
.chat-start-card { max-inline-size: 860px; }
@media (max-width: 900px) {
  .chat-head-collapsible, .chat-off { margin-block-end: 8px; }
  /* an open conversation gets the whole phone screen: the title block collapses to nothing but its h1 stays for assistive technology (one h1 per screen) */
  .chat-head-collapsible { display: block; block-size: 0; min-block-size: 0; margin: 0; padding: 0; overflow: visible; }
  .chat-head-collapsible .page-sub, .chat-head-collapsible .page-actions { display: none; }
  .chat-head-collapsible h1 { position: absolute; inline-size: 1px; block-size: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  .chat-header { padding: 12px 14px; }
  .chat-head .btn { min-block-size: 36px; padding-block: .2em; }
  .chat-layout.has-thread .msg-view { block-size: clamp(460px, calc(100dvh - 170px), 800px); }
  .chat-banners { padding-inline: 14px; }
  .chat-typing { padding-inline: 14px; }
}
@media (max-width: 720px) {
  .chat-composer-row { align-items: stretch; }
  .chat-composer-row .btn .btn-label { display: none; }
  .chat-composer-row .btn { padding-inline: 14px; min-inline-size: 48px; }
  .chat-start-card .form-actions .btn-lg { inline-size: 100%; }
}

/* Legal and compliance screens (screens_legal.js): the order summary, the renewal block of a subscription. */
.os .card-body { gap: 14px; }
.os .kv-row dt { color: var(--ink-2); }
.os-total { font-size: 1.25rem; }
.os-brief { margin-block: 12px; }
.os-brief .card-body { gap: 10px; }
.renewal-block { margin-block-start: 14px; padding-block-start: 12px; border-block-start: 1px solid var(--line); }
.renewal-block .kv { margin-block: 8px; }
.renewal-block .page-actions { margin-block-start: 10px; }

/* Offers and announcements (#/offers and the dashboard card) */
.offer-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .offer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.offer-card { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm, 0 1px 2px rgba(11, 31, 68, .06)); min-inline-size: 0; }
.offer-card.is-unread { border-color: var(--gold); }
.offer-card.is-expired { opacity: .75; }
.offer-img { display: block; inline-size: 100%; block-size: auto; max-block-size: 220px; object-fit: cover; background: var(--surface-2); }
.offer-main { display: grid; gap: 8px; padding: 18px 20px 20px; align-content: start; min-inline-size: 0; }
.offer-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.offer-title { margin: 0; font-size: 1.1rem; line-height: 1.35; overflow-wrap: anywhere; }
.offer-summary, .offer-body { margin: 0; color: var(--ink); line-height: 1.6; overflow-wrap: anywhere; white-space: pre-line; }
.offer-meta { margin: 0; color: var(--muted); font-size: .82rem; }
.offer-detail { padding-block: 6px; }
.offer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 6px; }
.offer-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.offer-mini-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.offer-mini-row:hover { background: var(--surface-2); text-decoration: none; }
.offer-mini-row.is-unread strong { font-weight: 800; }
.offer-mini-row img, .offer-mini-ico { inline-size: 48px; block-size: 48px; border-radius: 10px; object-fit: cover; flex: none; background: var(--primary-soft); display: grid; place-items: center; }
.offer-mini-text { display: grid; gap: 2px; min-inline-size: 0; flex: 1; } .offer-mini-text span { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) { .offer-card { transition: box-shadow .2s ease, transform .2s ease; } .offer-card:hover { transform: translateY(-2px); } }
