/* Art Business HQ: shared styles for the talent app and the manager app.
   Spacing and alignment use logical properties (start/end), so the same rules
   lay out right-to-left in Arabic. */
:root {
  --bg: #f4f1ec;
  --panel: #ffffff;
  --panel-2: #f8f6f2;
  --ink: #1d1e22;
  --ink-2: #3b3d44;
  --mute: #6b6d75;
  --line: #e2ddd4;
  --line-2: #ece8e1;
  --acc: #0f766e;
  --acc-2: #0b5f58;
  --acc-soft: #e1f0ed;
  --warm: #b85a1c;
  --warm-soft: #fbeee2;
  --bad: #b42318;
  --bad-soft: #fcebe9;
  --ok: #1f7a4d;
  --side: #17181c;
  --side-ink: #b6b8c0;
  --side-line: #2a2c32;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --shadow: 0 1px 2px rgba(20, 20, 30, .05), 0 6px 20px rgba(20, 20, 30, .07);
  --bar-h: 0px;
  --dirx: 1;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121316; --panel: #1b1c20; --panel-2: #212227; --ink: #ecebe7; --ink-2: #d2d1cc; --mute: #9c9da4;
    --line: #2e3036; --line-2: #26282d; --acc: #3db5a5; --acc-2: #5ccbbc; --acc-soft: #163330;
    --warm: #e6955a; --warm-soft: #3a2617; --bad: #f0786c; --bad-soft: #3b1d1a; --ok: #5fc493;
    --side: #0c0d10; --side-line: #24262b; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
[dir=rtl] { --dirx: -1; }
/* Arabic: system Arabic fonts (SF Arabic on iPhone, Segoe UI on Windows, Noto on
   Android), the same face for headings, more line height, and no letter spacing
   (spacing breaks the joins between Arabic letters). */
html[lang=ar] {
  --sans: system-ui, -apple-system, "Segoe UI", "Noto Sans Arabic", "Noto Naskh Arabic", Tahoma, "Geeza Pro", sans-serif;
  --serif: var(--sans);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
html[lang=ar] body { font-size: 15.5px; line-height: 1.7; }
html.modal-open, html.sheet-open { overflow: hidden; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.2; }
html[lang=ar] :is(h1, h2, h3) { line-height: 1.4; font-weight: 700; letter-spacing: 0 !important; }
button { font: inherit; color: inherit; }
a { color: var(--acc); }
input, select, textarea { font: inherit; color: var(--ink); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 18px; height: 18px; flex: none; }
[dir=rtl] .ic.flip { transform: scaleX(-1); }
.eyebrow { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); font-weight: 600; }
html[lang=ar] .eyebrow { letter-spacing: 0; text-transform: none; font-size: 12.5px; }
.muted { color: var(--mute); }
.serif { font-family: var(--serif); }
.mono { font-family: var(--mono); }
.ltr { direction: ltr; unicode-bidi: isolate; }
/* Names and titles people typed keep their own reading order (dir=auto) but
   line up with the rest of the page. */
html[dir=rtl] [dir=auto]:not(input):not(textarea) { text-align: right; }
html[dir=ltr] [dir=auto]:not(input):not(textarea) { text-align: left; }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--mute); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--acc); border-color: var(--acc); color: #fff; }
.btn.primary:hover { background: var(--acc-2); border-color: var(--acc-2); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--panel-2); }
.btn.sm { min-height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; min-height: 44px; }
.btn .ic { width: 16px; height: 16px; }
.danger-text { color: var(--bad) !important; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 8px; border: 0; background: transparent; color: var(--mute); cursor: pointer; padding: 0; }
.icon-btn:hover { background: var(--panel-2); color: var(--ink); }
.icon-btn.sm { width: 28px; height: 28px; }
.icon-btn.sm .ic { width: 16px; height: 16px; }
.icon-btn.del:hover { color: var(--bad); background: var(--bad-soft); }

/* language switch: its label is in the other language */
.lang-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .07); color: #fff; font-weight: 600; font-size: 13.5px; cursor: pointer; flex: none; white-space: nowrap; }
.lang-btn:hover { background: rgba(255, 255, 255, .14); }
.lang-btn .ic { width: 16px; height: 16px; opacity: .85; }
.lang-btn[lang=ar] { font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans Arabic", Tahoma, sans-serif; font-size: 14px; }
.lang-btn.on-light { border-color: var(--line); background: var(--panel); color: var(--ink); }
.lang-btn.on-light:hover { border-color: var(--mute); background: var(--panel); }

/* ---------- form fields */
.fld { display: grid; gap: 6px; margin: 0 0 14px; }
.fld-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.fld-hint { font-size: 12.5px; color: var(--mute); }
.fld input:not([type=checkbox]):not([type=radio]), .fld select, .fld textarea {
  width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel);
}
.fld textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.fld.check { grid-template-columns: 1fr auto; align-items: center; padding: 6px 0; }
.fld output.calc { padding: 8px 0; font-size: 17px; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--acc); margin: 0; }
[dir=rtl] input[dir=ltr]:not([type=checkbox]) { text-align: right; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.choice { display: flex; gap: 8px; flex-wrap: wrap; }
.choice label { flex: 1 1 160px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; background: var(--panel); }
.choice label:has(input:checked) { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.choice input { margin-top: 3px; accent-color: var(--acc); }
html[lang=ar] .choice input { margin-top: 6px; }
.choice strong { display: block; font-size: 14px; }
.choice small { color: var(--mute); font-size: 12.5px; }

/* ---------- status pill */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--mute); white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.status:empty { display: none; }
.status.saved { color: var(--ok); }
.status.offline, .status.error { color: var(--warm); }

/* ---------- workspace */
.hq { max-width: 1200px; margin: 0 auto; }
.tabs-bar { position: sticky; top: var(--bar-h); z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.tabs { position: relative; display: flex; gap: 4px; overflow-x: auto; padding: 10px 24px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; border: 0; background: transparent; padding: 7px 13px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--mute); cursor: pointer; }
.tab:hover { color: var(--ink); background: var(--panel); }
.tab.on { background: var(--ink); color: var(--bg); }
.hq-body { padding: 30px 24px 64px; }
.page-head { margin: 0 0 24px; }
.page-head h1 { font-family: var(--serif); font-size: 40px; line-height: 1.08; letter-spacing: -.01em; margin-top: 6px; }
html[lang=ar] .page-head h1 { font-size: 36px; line-height: 1.3; }
.lede { color: var(--mute); margin: 8px 0 0; font-size: 16.5px; max-width: 60ch; }
.prose { max-width: 70ch; }
blockquote.prose { margin: 0 0 24px; padding: 16px 20px; border-inline-start: 3px solid var(--acc); background: var(--panel); border-radius: 12px; border-start-start-radius: 0; border-end-start-radius: 0; font-family: var(--serif); font-size: 18.5px; line-height: 1.5; }
html[lang=ar] blockquote.prose { font-size: 17.5px; line-height: 1.85; }
.bh { font-family: var(--serif); font-size: 21px; margin: 36px 0 8px; max-width: 70ch; }
p.prose { margin: 6px 0 12px; }
ul.prose { margin: 6px 0 14px; padding-inline-start: 20px; }
ul.prose li { margin: 5px 0; }
.note { display: block; margin: 12px 0 18px; }
.note-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.note textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); resize: vertical; line-height: 1.5; min-height: 44px; }
html[lang=ar] .note textarea, html[lang=ar] .g-table textarea { line-height: 1.7; }
.note textarea.one { resize: none; }
.note textarea:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.kpi-v { font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
html[lang=ar] .kpi-v { font-weight: 700; line-height: 1.3; }
.kpi-v .cur { font-size: .6em; font-weight: 600; white-space: nowrap; }
.kpi-l { color: var(--mute); font-size: 13px; margin-top: 3px; }
.kpi.neg .kpi-v { color: var(--bad); }

.soon { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 12px 8px; margin: 0 0 20px; }
.soon-h { font-size: 15px; padding: 2px 6px 6px; }
.soon-list { list-style: none; margin: 0; padding: 0; }
.soon-item { width: 100%; display: grid; grid-template-columns: 84px 1fr auto; gap: 12px; align-items: baseline; text-align: start; background: transparent; border: 0; padding: 8px 6px; border-radius: 8px; cursor: pointer; }
.soon-item:hover { background: var(--panel-2); }
.soon-date { font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.soon-item.late .soon-date { color: var(--warm); }
.soon-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; }
.soon-kind { color: var(--mute); font-size: 12.5px; white-space: nowrap; }

.view { margin: 30px 0 34px; }
.vh { display: flex; align-items: center; justify-content: space-between; gap: 10px 12px; flex-wrap: wrap; margin-bottom: 10px; }
.vh-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vh-title h2 { font-family: var(--serif); font-size: 21px; }
.count { font-size: 12px; color: var(--mute); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; font-variant-numeric: tabular-nums; font-weight: 600; }
.tag { font-size: 12px; font-weight: 600; color: var(--acc); background: var(--acc-soft); border-radius: 999px; padding: 2px 9px; }
.vh-tools { display: flex; gap: 8px; align-items: center; }
.search { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 0 10px; height: 30px; color: var(--mute); }
.search input { border: 0; background: transparent; outline: none; width: 150px; font-size: 13.5px; padding: 0; }
.search:focus-within { border-color: var(--acc); }
.vh-note { margin: -2px 0 12px; color: var(--mute); font-size: 14px; max-width: 70ch; }
.empty { padding: 26px 16px; text-align: center; color: var(--mute); background: var(--panel); border: 1px dashed var(--line); border-radius: 12px; }

.wrap { position: relative; overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
table.grid { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
table.grid th { background: var(--panel-2); text-align: start; font-weight: 600; font-size: 12.5px; color: var(--mute); border-bottom: 1px solid var(--line); padding: 0; white-space: nowrap; }
.th-btn { appearance: none; border: 0; background: transparent; display: flex; gap: 4px; align-items: center; padding: 9px 10px; cursor: pointer; width: 100%; color: inherit; font-weight: 600; text-align: start; }
.th-btn:hover { color: var(--ink); }
.sort { color: var(--acc); }
table.grid td { border-bottom: 1px solid var(--line-2); padding: 3px 4px; vertical-align: middle; min-width: 150px; }
table.grid tr:last-child td { border-bottom: 0; }
table.grid tbody tr:hover td { background: var(--panel-2); }
table.grid .c-open, table.grid .c-del { min-width: 0; width: 36px; text-align: center; padding: 0 2px; }
table.grid td.t-check { min-width: 96px; text-align: center; }
table.grid td.t-num, table.grid td.t-money, table.grid td.t-calc { min-width: 116px; }
table.grid td.t-date { min-width: 150px; }
table.grid td:nth-child(2) input, table.grid td:nth-child(2) select { font-weight: 600; }
table.grid input:not([type=checkbox]), table.grid select, .card input:not([type=checkbox]), .card select {
  width: 100%; min-width: 0; border: 1px solid transparent; background: transparent; border-radius: 7px; padding: 6px 8px; height: 34px;
}
table.grid input:hover, table.grid select:hover, .card input:hover, .card select:hover { border-color: var(--line); }
table.grid input:focus, table.grid select:focus, .card input:focus, .card select:focus { border-color: var(--acc); background: var(--panel); outline: none; box-shadow: 0 0 0 3px var(--acc-soft); }
output.calc { display: block; padding: 6px 8px; font-weight: 600; font-variant-numeric: tabular-nums; }

.list { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.li { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; background: transparent; border: 0; border-bottom: 1px solid var(--line-2); padding: 12px 14px; min-height: 58px; cursor: pointer; }
.li:last-child { border-bottom: 0; }
.li:active { background: var(--panel-2); }
.li-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.li-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; }
.li-sub { color: var(--mute); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; }
.li .ic { color: var(--mute); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px; min-width: 0; }
.card-top { display: flex; align-items: center; gap: 2px; }
.card-top input, .card-top select { font-weight: 600; font-size: 14.5px; }
.mini { display: block; }
.mini > span { display: block; font-size: 11.5px; color: var(--mute); padding: 4px 8px 0; font-weight: 600; }
html[lang=ar] .mini > span { font-size: 12px; }
.card.tap { display: flex; flex-direction: column; gap: 4px; text-align: start; width: 100%; padding: 12px 14px; cursor: pointer; }
.card.tap:active { background: var(--panel-2); }
.card-title { font-weight: 600; text-align: start; }
.card-line { display: flex; gap: 8px; font-size: 13.5px; min-width: 0; }
.card-line .k { color: var(--mute); flex: none; }
.card-line .v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card[draggable="true"] { cursor: grab; }
.card.dragging { opacity: .45; }

.board { position: relative; display: flex; gap: 12px; overflow-x: auto; align-items: flex-start; padding-bottom: 8px; scroll-snap-type: x proximity; }
.col { flex: 0 0 268px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px; scroll-snap-align: start; }
.col.over { outline: 2px dashed var(--acc); outline-offset: 2px; }
.col-head { display: flex; align-items: center; gap: 8px; padding-block: 2px 8px; padding-inline: 6px 2px; min-height: 36px; }
.col-name { font-weight: 600; font-size: 13.5px; flex: 1; min-width: 0; }
.col-body { display: grid; gap: 8px; min-height: 24px; }

.g-wrap { max-width: 980px; margin: 10px 0 20px; }
.g-table { border-collapse: separate; border-spacing: 0; width: 100%; }
.g-table th, .g-table td { border-bottom: 1px solid var(--line-2); padding: 6px; vertical-align: top; text-align: start; }
.g-table thead th { font-size: 12.5px; color: var(--mute); background: var(--panel-2); font-weight: 600; padding: 9px 10px; }
.g-table tbody th { width: 30%; font-weight: normal; }
.g-table tbody tr:last-child > * { border-bottom: 0; }
.g-label { font-weight: 600; padding: 6px 4px 0; }
.g-hint { color: var(--mute); font-size: 13px; padding: 2px 4px 4px; }
.g-table textarea, .g-table input { width: 100%; border: 1px solid transparent; background: var(--panel-2); border-radius: 8px; padding: 7px 9px; resize: none; line-height: 1.45; min-height: 36px; }
.g-table textarea:focus, .g-table input:focus { border-color: var(--acc); background: var(--panel); outline: none; box-shadow: 0 0 0 3px var(--acc-soft); }

.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); }
.pager-btn { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; cursor: pointer; text-align: start; font-weight: 600; }
.pager-btn small { display: block; color: var(--mute); font-size: 12px; font-weight: 500; }
.pager-btn.next { text-align: end; margin-inline-start: auto; }
.pager-btn:hover { border-color: var(--mute); }

/* view-only */
.hq.ro input, .hq.ro select, .hq.ro textarea, .hq.ro ~ .sheet-host .sheet input, .hq.ro ~ .sheet-host .sheet select, .hq.ro ~ .sheet-host .sheet textarea { box-shadow: none !important; }
.hq.ro .note textarea, .hq.ro .g-table textarea, .hq.ro .g-table input { background: transparent; border-color: var(--line-2); }
select:disabled, input:disabled { opacity: 1; color: var(--ink); -webkit-text-fill-color: var(--ink); }

/* ---------- record editor (slides in from the end side; from the bottom on phones) */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(15, 15, 20, .42); z-index: 60; }
.sheet-backdrop.enter { animation: fade .15s ease-out; }
.sheet { position: fixed; z-index: 61; background: var(--panel); display: flex; flex-direction: column; box-shadow: calc(-10px * var(--dirx)) 0 50px rgba(0, 0, 0, .18); top: 0; bottom: 0; inset-inline-end: 0; width: min(500px, 100vw); }
.sheet.enter { animation: slide-in .18s ease-out; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: calc(16px + env(safe-area-inset-top)) 20px 12px; border-bottom: 1px solid var(--line-2); }
.sheet-title { font-family: var(--serif); font-size: 23px; margin-top: 2px; overflow-wrap: anywhere; text-align: start; }
.sheet-body { overflow-y: auto; padding: 16px 20px 8px; flex: 1; overscroll-behavior: contain; }
.sheet-foot { display: flex; justify-content: space-between; gap: 10px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-2); }
@keyframes fade { from { opacity: 0; } }
@keyframes slide-in { from { transform: translateX(calc(30px * var(--dirx))); opacity: 0; } }
@keyframes slide-up { from { transform: translateY(40px); opacity: 0; } }

/* ---------- dialogs and toasts */
.dlg-host { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.dlg-backdrop { position: absolute; inset: 0; background: rgba(15, 15, 20, .45); animation: fade .15s; }
.dlg { position: relative; background: var(--panel); border-radius: 16px; width: min(480px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); animation: slide-up .18s ease-out; }
.dlg.wide { width: min(680px, 100%); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px 4px; }
.dlg-head h2 { font-family: var(--serif); font-size: 23px; text-align: start; }
.dlg-body { padding: 12px 20px 4px; overflow-y: auto; }
.dlg-body > p:first-child { margin-top: 0; }
.dlg-error { margin: 0 20px 8px; color: var(--bad); background: var(--bad-soft); border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 18px; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- sign in */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); }
.auth-card { width: min(390px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px 24px 26px; box-shadow: var(--shadow); }
.auth-top { display: flex; justify-content: flex-end; margin: 0 -8px 6px 0; margin-inline: 0 -8px; }
.auth-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.auth-brand img { border-radius: 11px; }
.auth-brand h1 { font-family: var(--serif); font-size: 25px; margin-top: 2px; }
.auth-card > .muted { margin: 0 0 16px; }
.auth-note { font-size: 13px; color: var(--mute); margin: 16px 0 0; }

/* ---------- access sharing */
.share { display: grid; grid-template-columns: 184px 1fr; gap: 20px; align-items: start; }
.share .qr { width: 184px; height: 184px; border-radius: 10px; border: 1px solid var(--line); display: block; }
.share-cap { font-size: 12.5px; color: var(--mute); margin-top: 6px; text-align: center; }
.cred { display: grid; gap: 8px; min-width: 0; }
.cred-row { display: flex; align-items: center; gap: 10px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 6px; padding-inline-start: 12px; min-width: 0; }
.cred-row .k { font-size: 12px; color: var(--mute); width: 84px; flex: none; }
.cred-row .v { flex: 1; min-width: 0; font-family: var(--mono); font-size: 14px; overflow-wrap: anywhere; direction: ltr; unicode-bidi: isolate; text-align: start; }
[dir=rtl] .cred-row .v { text-align: right; }
.callout { background: var(--acc-soft); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; margin: 12px 0 4px; }
.callout.warm { background: var(--warm-soft); }
.callout .btn { margin-top: 8px; }
.inv-row { display: flex; gap: 8px; flex-wrap: wrap; }
.inv-row .btn { flex: 1 1 auto; }

/* ---------- phones and touch screens */
@media (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px !important; }
}
@media (max-width: 760px) {
  .tabs { padding: 8px 12px; }
  .hq-body { padding: 22px 16px 56px; }
  .page-head h1 { font-size: 30px; }
  html[lang=ar] .page-head h1 { font-size: 28px; }
  .lede { font-size: 15.5px; }
  blockquote.prose { font-size: 17px; padding: 14px 16px; }
  html[lang=ar] blockquote.prose { font-size: 16.5px; }
  .bh { font-size: 19px; margin-top: 30px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi { padding: 12px 13px; }
  .kpi-v { font-size: 21px; }
  .soon-item { grid-template-columns: 72px 1fr; }
  .soon-kind { grid-column: 2; margin-top: -6px; }
  .view { margin: 26px 0 30px; }
  .vh-title h2 { font-size: 19px; }
  .search input { width: 110px; }
  .col { flex-basis: 78vw; }
  .cards { grid-template-columns: 1fr; }
  .g-table thead { display: none; }
  .g-table, .g-table tbody, .g-table tr, .g-table tbody th, .g-table td { display: block; width: 100%; }
  .g-table tr { padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
  .g-table tbody tr:last-child { border-bottom: 0; }
  .g-table tbody th, .g-table td { border: 0; padding: 3px 0; }
  .g-table td::before { content: attr(data-label); display: block; font-size: 12px; color: var(--mute); margin: 6px 0 4px; font-weight: 600; }
  .pager-btn { flex: 1; }
  .sheet { top: auto; inset-inline: 0; bottom: 0; width: auto; max-height: 92vh; max-height: 92dvh; border-radius: 18px 18px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .2); }
  .sheet.enter { animation: slide-up .2s ease-out; }
  .sheet-head { padding-top: 16px; }
  .dlg-host { place-items: end stretch; padding: 0; }
  .dlg { width: 100% !important; border-radius: 18px 18px 0 0; max-height: 94vh; max-height: 94dvh; }
  .dlg-foot { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .share { grid-template-columns: 1fr; justify-items: center; }
  .share .cred { width: 100%; }
  .row2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
