/* TASAMA WTR — design system (tokens sampled from the approved v0 prototype). RTL via logical properties. */
:root {
  color-scheme: light;
  --font: "Manrope", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --brand: #1007A0; --brand-2: #2A1FC6; --brand-3: #5B4FEA; --brand-deep: #0B0577; --navy: #0E0A55;
  --brand-soft: #ECEAFC; --brand-tint: #F4F3FE; --brand-line: #C9C4F5;
  --gold: #B69E60; --gold-2: #CDB57A; --gold-deep: #6F5C27; --gold-soft: #F6F0E1; --gold-tint: #FBF8F0; --gold-line: #E8DCBC;
  --ink: #16133F; --ink-2: #4A4772; --ink-3: #8E8BB4;
  --paper: #F7F7FC; --tint: #FAFAFE; --sunk: #F2F1FA; --line: #E5E3F2; --line-2: #CDCAE6; --surface: #FFFFFF;
  --on-dark-2: #D3D1F2;
  --ok: #17785A; --ok-soft: #E3F4EC; --ok-tint: #F1F9F5; --ok-line: #C4E6D6;
  --warn: #B4570F; --warn-soft: #FCEBDC;
  --crit: #B3261E; --crit-soft: #FBE4E1; --crit-tint: #FFF7F6; --crit-line: #F2C4BF;
  --grad: linear-gradient(125deg, #0B0577 0%, #1007A0 40%, #3A2ED8 80%, #5B4FEA 100%);
  --grad-deep: linear-gradient(130deg, #07043F 0%, #0E0A55 45%, #1A12A0 100%);
  --grad-gold: linear-gradient(120deg, #97803F 0%, #B69E60 45%, #D6C38F 100%);
  --shadow: 0 1px 2px rgba(22,19,63,.05), 0 10px 28px -16px rgba(22,19,63,.20);
  --shadow-lg: 0 30px 70px -24px rgba(16,7,160,.42);
  --glow: 0 10px 22px -12px rgba(16,7,160,.75);
  --radius: 14px;
}
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body { font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { letter-spacing: -.015em; margin: 0; }
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
.num, td.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
[hidden] { display: none !important; }
.muted { color: var(--ink-3); }
.small { font-size: 13.5px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------- page header ---------------- */
.ph { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.ph .eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-deep); }
.ph p { margin: 4px 0 0; color: var(--ink-2); }
.ph .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: 13.5px; color: var(--ink-3); display: flex; gap: 6px; flex-wrap: wrap; }
.hero { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px 22px; border-radius: 16px; background: var(--grad-deep); color: #fff; }
.hero::after { content: ""; position: absolute; right: -70px; bottom: -110px; width: 280px; height: 280px; border-radius: 50%; background: var(--grad-gold); opacity: .22; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { color: #fff; }
.hero .meta { color: var(--on-dark-2); }
.hero .tag { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border-radius: 20px; background: rgba(255,255,255,.14); color: #fff; font-size: 13px; font-weight: 600; }

/* ---------------- cards / grids ---------------- */
.card { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.card.link:hover { border-color: var(--brand-line); text-decoration: none; transform: translateY(-1px); }
a.card { color: var(--ink); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.between { justify-content: space-between; }
@media (max-width: 1180px) { .split { grid-template-columns: minmax(0, 1fr); } .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }

/* KPI tiles */
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); min-width: 0; }
.kpi .l { font-size: 13.5px; color: var(--ink-3); font-weight: 600; }
.kpi .v { font-size: 28px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 13px; color: var(--ink-2); }
.kpi.dark { background: var(--grad); color: #fff; border-color: transparent; }
.kpi.dark .l, .kpi.dark .s { color: var(--on-dark-2); }

/* facts */
.facts { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 18px; }
.facts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.facts.one { grid-template-columns: minmax(0, 1fr); }
.facts div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.facts dt { font-size: 13px; color: var(--ink-3); }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 620px) { .facts { grid-template-columns: minmax(0, 1fr); } }

/* ---------------- buttons ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 1px solid var(--line-2);
  border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--sunk); text-decoration: none; }
.btn.pri { border-color: transparent; background: var(--grad); color: #fff; box-shadow: var(--glow); }
.btn.pri:hover { filter: brightness(1.08); }
.btn.gold { border-color: transparent; background: var(--grad-gold); color: var(--navy); }
.btn.danger { color: var(--crit); border-color: var(--crit-line); }
.btn.danger:hover { background: var(--crit-tint); }
.btn.ok { color: var(--ok); border-color: var(--ok-line); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; color: var(--ink-2); }

/* ---------------- chips / status ---------------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 20px; background: var(--sunk); color: var(--ink-2);
  font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip.brand { background: var(--brand-soft); color: var(--brand); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.crit { background: var(--crit-soft); color: var(--crit); }
.chip.gold { background: var(--gold-soft); color: var(--gold-deep); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filters { display: inline-flex; flex-wrap: nowrap; gap: 2px; padding: 4px; border-radius: 12px; background: var(--sunk); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.filters a, .filters button { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 13px; border: 0; border-radius: 9px;
  background: transparent; color: var(--ink-2); font: inherit; font-size: 13.5px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.filters a:hover { color: var(--ink); text-decoration: none; }
.filters .on { background: var(--surface); color: var(--brand); font-weight: 700; box-shadow: 0 1px 2px rgba(22,19,63,.08), 0 4px 12px -6px rgba(22,19,63,.28); }
.filters .n { font-size: 12px; color: var(--ink-3); }
.tabs { display: inline-flex; gap: 2px; padding: 4px; border-radius: 12px; background: var(--sunk); max-width: 100%; overflow-x: auto; align-self: flex-start; }
.tabs a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: 9px; color: var(--ink-2); font-size: 14px; font-weight: 600; white-space: nowrap; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.on { background: var(--surface); color: var(--brand); box-shadow: 0 1px 2px rgba(22,19,63,.08), 0 4px 12px -6px rgba(22,19,63,.28); }

/* toolbar (search + filters) */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; }
.search { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-width: 240px; flex: 0 1 360px; }
.search input { flex: 1; border: 0; outline: 0; background: transparent; font: inherit; min-width: 0; }

/* ---------------- tables ---------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: start; padding: 10px 14px; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); background: var(--tint); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.locked td { background: var(--tint); }

/* ---------------- forms ---------------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.fgrid .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .fgrid { grid-template-columns: minmax(0, 1fr); } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .lbl { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field .req { color: var(--crit); }
.field .help { font-size: 12.5px; color: var(--ink-3); }
.field .err, .errorlist { color: var(--crit); font-size: 13px; margin: 0; padding: 0; list-style: none; }
/* Our own form components only — prototype-ported inputs carry their own inline styles (or the UA defaults). */
:is(.field, .form, .fgrid, .lg-form, .sar, .phone, .auth) :is(input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url], input[type=tel], input[type=search], select, textarea) {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink);
  font: inherit; font-size: 14px; }
:is(.field, .form, .fgrid, .lg-form, .auth) textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); outline: none; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: 18px; height: 18px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.phone { display: flex; }
.phone span { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line-2); border-inline-end: 0; border-radius: 12px 0 0 12px; background: var(--sunk); font-weight: 600; color: var(--ink-2); }
[dir="rtl"] .phone span { border-radius: 0 12px 12px 0; }
.phone input { border-radius: 0 12px 12px 0; }
[dir="rtl"] .phone input { border-radius: 12px 0 0 12px; }
.sar { position: relative; }
.sar input { padding-inline-end: 52px; }
.sar i { position: absolute; inset-inline-end: 14px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px; border: 1.5px dashed var(--brand-line);
  border-radius: 14px; background: var(--brand-tint); color: var(--brand); text-align: center; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding-top: 6px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0; }
legend { font-weight: 700; padding: 0 6px; }

/* ---------------- alerts / banners ---------------- */
.alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; border: 1px solid transparent; }
.alert.info { background: var(--brand-tint); color: var(--brand); border-color: var(--brand-line); }
.alert.ok, .alert.success { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.alert.warn, .alert.warning { background: var(--warn-soft); color: var(--warn); }
.alert.crit, .alert.error { background: var(--crit-soft); color: var(--crit); border-color: var(--crit-line); }
.messages { display: flex; flex-direction: column; gap: 8px; }

/* ---------------- progress / bars ---------------- */
.track { height: 10px; border-radius: 20px; background: var(--sunk); overflow: hidden; }
.track > span { display: block; height: 100%; border-radius: 20px; background: var(--grad); }
.track.gold > span { background: var(--grad-gold); }
.track.ok > span { background: var(--ok); }
.bar-row { display: grid; grid-template-columns: 160px minmax(0, 1fr) 60px; align-items: center; gap: 10px; font-size: 13.5px; }
.bar-row b { text-align: end; font-variant-numeric: tabular-nums; }
.level { position: relative; height: 10px; border-radius: 20px; background: var(--sunk); }
.level > span { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 20px; background: var(--grad); }
.level > i { position: absolute; top: -4px; width: 3px; height: 18px; border-radius: 2px; background: var(--gold-deep); }

/* stage flows / steppers */
.flow { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(118px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 2px; }
.flow > * { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; border-radius: 12px; background: var(--sunk); min-width: 0; color: var(--ink); }
.flow > *:not(:last-child)::after { content: ""; position: absolute; top: 22px; inset-inline-end: -11px; width: 12px; height: 2px; background: var(--line-2); }
.flow .n { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.flow .l { font-size: 13px; color: var(--ink-2); line-height: 1.3; }
.flow > .done { background: var(--ok-tint); }
.flow > .done::after { background: var(--ok) !important; }
.flow > .cur { background: var(--brand-soft); outline: 1px solid var(--brand); }
.steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--sunk); color: var(--ink-3); font-weight: 600; font-size: 13.5px; }
.steps li .sn { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); flex: none; }
.steps li.on { background: var(--brand-soft); color: var(--brand); }
.steps li.on .sn { background: var(--grad); color: #fff; border-color: transparent; }
.steps li.done { background: var(--ok-tint); color: var(--ok); }
.steps li.done .sn { background: var(--ok); color: #fff; border-color: transparent; }
@media (max-width: 760px) { .steps.vertical-mobile { grid-auto-flow: row; } }

/* kanban board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.col { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 14px; background: var(--sunk); min-height: 160px; }
.col h3 { display: flex; justify-content: space-between; font-size: 13.5px; padding: 4px 4px 6px; }
.mini { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-size: 13.5px; }
.mini:hover { border-color: var(--brand-line); text-decoration: none; }

/* drawer (native <dialog>) */
dialog.drawer { margin: 0; margin-inline-start: auto; height: 100vh; max-height: 100vh; width: min(560px, 100vw); padding: 0; border: 0;
  background: var(--surface); box-shadow: var(--shadow-lg); display: none; flex-direction: column; }
dialog.drawer[open] { display: flex; }
dialog.drawer::backdrop { background: rgba(14,10,85,.35); }
dialog.drawer.wide { width: min(880px, 100vw); }
.drawer-h { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.drawer-b { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.drawer-f { position: sticky; bottom: 0; display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface); }

/* pagination */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; color: var(--ink-3); }
.pager .pages { display: flex; gap: 4px; }
.pager a, .pager span.cur { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink-2); font-weight: 600; }
.pager span.cur { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); }

/* empty state */
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 16px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: var(--radius); background: var(--tint); }

/* score ring */
.ring { --p: 0; --c: var(--brand); width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--sunk) 0); }
.ring > span { width: 76px; height: 76px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; }
.ring.gold { --c: var(--gold); }

/* timeline */
.tl { display: flex; flex-direction: column; gap: 8px; }
.tl > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--sunk); }
.tl small { color: var(--ink-3); }

/* auth pages */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--paper); }
.auth .card { width: min(440px, 100%); gap: 18px; padding: 28px; }
.auth img { width: 180px; }

/* simple charts */
.vbars { display: flex; align-items: flex-end; gap: 8px; height: 160px; padding-top: 8px; }
.vbars > div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; height: 100%; }
.vbars i { display: block; width: 100%; max-width: 44px; border-radius: 8px 8px 3px 3px; background: var(--grad); min-height: 2px; }
.vbars small { font-size: 11.5px; color: var(--ink-3); text-align: center; line-height: 1.2; }
.gantt { display: flex; flex-direction: column; gap: 8px; position: relative; }
.gantt .g-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 10px; align-items: center; font-size: 13.5px; }
.gantt .g-track { position: relative; height: 22px; background: var(--sunk); border-radius: 8px; }
.gantt .g-bar { position: absolute; top: 3px; bottom: 3px; border-radius: 6px; background: var(--grad); }
.gantt .g-bar.resourcing { background: var(--grad-gold); }
.gantt .g-today { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--crit); }

/* interview */
.avatar-panel { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 24px; border-radius: 16px; background: var(--grad-deep); color: #fff; text-align: center; }
.avatar-orb { width: 120px; height: 120px; border-radius: 50%; background: var(--grad-gold); display: grid; place-items: center; color: var(--navy); font-size: 36px; font-weight: 800; transition: transform .2s; }
.avatar-panel.speaking .avatar-orb { animation: pulse 1.2s ease-in-out infinite; }
.avatar-panel.listening .avatar-orb { box-shadow: 0 0 0 10px rgba(255,255,255,.12); }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.meter { height: 12px; border-radius: 20px; background: var(--sunk); overflow: hidden; }
.meter > span { display: block; height: 100%; width: 0; background: var(--ok); transition: width .08s; }
canvas.wave { width: 100%; height: 64px; border-radius: 12px; background: var(--sunk); }

/* mobile */
@media (max-width: 900px) {
  .gantt .g-row { grid-template-columns: 110px minmax(0, 1fr); }
}
@media print {
  .side, .hdr, .no-print { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* inputs embedded in search containers inherit the container's border */
#app .hsearch input[type=search], .search input[type=search], .search input[type=text], #app .hsearch input[type=text] {
  border: 0; min-height: 0; padding: 0; border-radius: 0; box-shadow: none; background: transparent; }
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* ---------------- login (prototype brand page) ---------------- */
.lg-page { min-height: 100vh; display: flex; justify-content: center; align-items: center; padding: 48px 24px;
  background: radial-gradient(900px 500px at 15% -10%, rgba(16,7,160,.10), transparent 60%),
              radial-gradient(800px 480px at 105% 110%, rgba(182,158,96,.16), transparent 60%), #F6F6FB; }
.lg-wide { width: 100%; max-width: 1180px; display: flex; flex-direction: column; gap: 22px; }
.lg-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lg-logo { display: block; width: 190px; max-width: 60%; height: auto; }
.lg-lang { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.lg-h { margin: 6px 0 0; font-size: 30px; font-weight: 700; letter-spacing: -.01em; color: #0B0B45; }
.lg-split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 440px); gap: 32px; align-items: center; }
.lg-hero .eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-deep); }
.lg-hero .lg-h { font-size: 40px; line-height: 1.15; }
.lg-hero .lg-h span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lg-hero p { font-size: 16px; color: var(--ink-2); max-width: 56ch; }
.lg-form { display: flex; flex-direction: column; gap: 14px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: #fff;
  box-shadow: 0 1px 2px rgba(16,7,90,.04), 0 12px 32px -20px rgba(16,7,90,.25); }
@media (max-width: 760px) { .lg-split { grid-template-columns: minmax(0, 1fr); } .lg-hero .lg-h { font-size: 30px; } }
#notif-pop:not([hidden]) { display: flex; }

/* box-sizing: the prototype uses the browser default (content-box). Only our own (non-prototype)
   components below opt into border-box explicitly; never re-add a global rule. */
.hero, .card, .kpi, .btn, .icon-btn, .chip, .filters, .tabs, .search, .table-wrap, .alert, .track, .flow > *, .steps li, .steps li .sn,
.board, .col, .mini, dialog.drawer, .drawer-h, .drawer-b, .drawer-f, .pager a, .pager span.cur, .empty, .ring, .ring > span, .tl > div,
.auth, .dropzone, fieldset, .phone span, .avatar-panel, .meter, canvas.wave, .lg-page, .lg-wide, .lg-lang, .lg-form,
:is(.field, .form, .fgrid, .lg-form, .sar, .phone) :is(input, select, textarea) { box-sizing: border-box; }

/* ---------------------------------------------------------------- password fields (static/js/password-ux.js) */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap > input { width: 100%; box-sizing: border-box; padding-inline-end: 46px !important; }
.pw-eye { position: absolute; inset-block: 0; inset-inline-end: 4px; margin: auto 0; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--ink-3); cursor: pointer; }
.pw-eye:hover { color: var(--brand); background: var(--brand-tint); }
.pw-eye:focus-visible { outline: 2px solid var(--brand); outline-offset: 0; }
.pw-rules { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.pw-rules li { display: flex; align-items: center; gap: 8px; transition: color .15s; }
.pw-dot { flex: none; position: relative; width: 16px; height: 16px; box-sizing: border-box; border-radius: 50%; border: 1.5px solid var(--line-2); background: #FFFFFF; transition: background .15s, border-color .15s; }
.pw-rules li.ok { color: var(--ok); }
.pw-rules li.ok .pw-dot { border-color: var(--ok); background: var(--ok); }
.pw-rules li.ok .pw-dot::after { content: ""; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px; border: solid #FFFFFF; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pw-rules li.pending .pw-dot { border-color: var(--brand-line); animation: pw-pulse 1s ease-in-out infinite; }
.pw-rules.active li:not(.ok):not(.pending) { color: var(--ink-2); }
@keyframes pw-pulse { 50% { opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .pw-rules li.pending .pw-dot { animation: none; } }
