/* FinRunway Pro — shared app shell. Same look for every program. */
@font-face { font-family: 'Manrope'; src: url('/assets/fonts/manrope.woff') format('woff'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('/assets/fonts/newsreader.woff') format('woff'); font-weight: 200 800; font-display: swap; }

:root {
  --midnight: #0B1F33;
  --midnight-2: #12304C;
  --teal: #0E7C7B;
  --teal-dark: #0A6463;
  --teal-light: #2BB3A8;
  --teal-wash: #E7F3F2;
  --paper: #F6F5F1;
  --card: #FFFFFF;
  --ink: #14212E;
  --slate: #4A5562;
  --muted: #6B7682;
  --line: #E2E0D8;
  --line-2: #EDEBE4;
  --red: #C0463B;
  --red-wash: #FBECEA;
  --amber: #B7791F;
  --amber-wash: #FDF4E3;
  --green: #1F8A5B;
  --green-wash: #E8F5EE;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(11,31,51,.05), 0 6px 20px rgba(11,31,51,.06);
  --font-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;
  --side: 248px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font-sans); color: var(--ink); background: var(--paper); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--teal); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
.ico { flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos { color: var(--green); }
.neg { color: var(--red); }
[hidden] { display: none !important; }

/* ---------- buttons & form ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 999px; padding: 9px 18px; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn--primary { background: var(--teal); color: #fff; }
.btn--primary:hover { background: var(--teal-dark); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn--danger { background: var(--red); color: #fff; }
.btn--small { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--slate); }
.icon-btn:hover { background: var(--line-2); color: var(--ink); }
.link-btn { background: none; border: 0; padding: 0; color: var(--teal); cursor: pointer; font-weight: 600; }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-weight: 700; font-size: 13px; margin-bottom: 5px; color: var(--slate); }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: var(--radius-sm); padding: 9px 12px; outline: none; }
.input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,124,123,.15); }
.input--num { text-align: right; font-variant-numeric: tabular-nums; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 14px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--line-2); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--slate); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.check { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { background: var(--midnight); color: #CFD8E1; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side__brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 6px; color: #fff; text-decoration: none; }
.side__brand img { height: 22px; }
.side__app { padding: 0 20px 16px; font-family: var(--font-serif); font-size: 19px; color: #fff; }
.side__app small { display: block; font-family: var(--font-sans); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-light); }
.co-switch { margin: 0 12px 14px; display: flex; align-items: center; gap: 10px; background: var(--midnight-2); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 10px 12px; color: #fff; cursor: pointer; text-align: left; width: calc(100% - 24px); }
.co-switch__name, .co-switch__role { display: block; }
.co-switch__name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-switch__role { font-size: 11.5px; color: var(--teal-light); }
.nav { list-style: none; margin: 0; padding: 0 10px; flex: 1; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #CFD8E1; text-decoration: none; font-weight: 600; font-size: 14.5px; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a[aria-current="page"] { background: rgba(43,179,168,.16); color: #fff; }
.nav a[aria-current="page"] .ico { color: var(--teal-light); }
.nav__sep { height: 1px; background: rgba(255,255,255,.08); margin: 10px 12px; }
.side__foot { padding: 14px 20px 20px; font-size: 12px; color: #8EA0B2; }
.side__foot .trust { display: flex; gap: 8px; align-items: flex-start; }
.side__foot .trust .ico { color: var(--teal-light); width: 16px; height: 16px; margin-top: 2px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; background: rgba(246,245,241,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 12px 28px; }
.top__title { font-size: 19px; font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top__menu { display: none; }
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge .ico { width: 14px; height: 14px; }
.badge--local { background: var(--teal-wash); color: var(--teal-dark); }
.badge--sync { background: var(--green-wash); color: var(--green); }
.badge--warn { background: var(--amber-wash); color: var(--amber); }
.badge--err { background: var(--red-wash); color: var(--red); }
.badge--role { background: var(--midnight); color: #fff; }
.lang-select { border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; background: #fff; font-size: 13px; font-weight: 600; }
.content { padding: 26px 28px 60px; max-width: 1240px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); max-width: 680px; }
.page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- cards, KPIs, tables ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 18px; }
.grid > .card + .card, .grid > .kpi + .kpi { margin-top: 0; }
.kpi__value--text { font-size: 19px; line-height: 1.3; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card__title { font-size: 16px; font-weight: 800; }
.grid { display: grid; gap: 18px; }
.grid--kpi { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: 1.6fr 1fr; }
.grid--halves { grid-template-columns: 1fr 1fr; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi__label { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.kpi__value { font-size: 26px; font-weight: 800; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi__sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.kpi--alert { border-color: #F0C8C3; background: linear-gradient(180deg, #fff, var(--red-wash)); }
.kpi--ok { border-color: #CDE8DA; }
.alert { display: flex; gap: 12px; align-items: flex-start; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; }
.alert .ico { margin-top: 1px; }
.alert--warn { background: var(--amber-wash); color: #6B4A12; }
.alert--err { background: var(--red-wash); color: #7A231B; }
.alert--info { background: var(--teal-wash); color: #0B4F4E; }
.alert__body { flex: 1; }
.alert__body strong { display: block; }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fff; position: sticky; top: 0; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:hover td { background: #FAFAF7; }
.tbl .r { text-align: right; }
.tbl tfoot td { font-weight: 800; border-top: 2px solid var(--line); border-bottom: 0; }
.tbl--forecast td, .tbl--forecast th { text-align: right; white-space: nowrap; }
.tbl--forecast td:first-child, .tbl--forecast th:first-child { text-align: left; position: sticky; left: 0; background: #fff; z-index: 1; }
.tbl--forecast tr.sub td { color: var(--slate); font-size: 13px; }
.tbl--forecast tr.sub td:first-child { padding-left: 24px; }
.tbl--forecast tr.total td { font-weight: 800; background: #F7F9F9; }
.tbl--forecast tr.total td:first-child { background: #F7F9F9; }
.tbl--forecast td.low { background: var(--red-wash) !important; color: var(--red); }
.pill { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 700; background: var(--line-2); color: var(--slate); }
.pill--in { background: var(--green-wash); color: var(--green); }
.pill--out { background: var(--red-wash); color: var(--red); }
.pill--late { background: var(--amber-wash); color: var(--amber); }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty .ico { width: 34px; height: 34px; color: var(--teal-light); margin-bottom: 8px; }
.empty p { max-width: 460px; margin: 6px auto 16px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input { width: auto; min-width: 140px; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.list-plain li:last-child { border-bottom: 0; }

/* ---------- chart ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart__grid { stroke: var(--line-2); stroke-width: 1; }
.chart__zero { stroke: #B9B6AC; stroke-width: 1; }
.chart__axis { font-size: 11px; fill: var(--muted); font-family: var(--font-sans); }
.chart__in { fill: rgba(31,138,91,.55); }
.chart__out { fill: rgba(192,70,59,.5); }
.chart__line { fill: none; stroke: var(--midnight); stroke-width: 2.5; stroke-linejoin: round; }
.chart__dot { fill: #fff; stroke: var(--midnight); stroke-width: 2; }
.chart__dot--neg { stroke: var(--red); fill: var(--red-wash); }
.chart__threshold { stroke: var(--amber); stroke-width: 1.5; stroke-dasharray: 5 4; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -2px; }

/* ---------- modal & toast ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(11,31,51,.45); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade .15s; }
.modal { background: #fff; border-radius: 18px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal--wide { width: min(980px, 100%); }
.modal__head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 6px; }
.modal__head h2 { font-size: 18px; }
.modal__body { padding: 8px 22px 22px; }
#fr-toasts { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: grid; gap: 8px; }
.toast { background: var(--midnight); color: #fff; padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow); font-size: 14px; max-width: 360px; transition: opacity .4s, transform .4s; }
.toast--error { background: var(--red); }
.toast--ok { background: var(--green); }
.toast--out { opacity: 0; transform: translateY(8px); }
@keyframes fade { from { opacity: 0; } }

/* ---------- entry (welcome) screen ---------- */
.entry { min-height: 100vh; background: radial-gradient(1200px 600px at 85% -10%, rgba(43,179,168,.22), transparent 60%), linear-gradient(160deg, #0B1F33 0%, #0F2A44 55%, #0B1F33 100%); color: #E6EDF3; display: flex; flex-direction: column; }
.entry__top { display: flex; justify-content: space-between; align-items: center; padding: 22px 32px; gap: 16px; flex-wrap: wrap; }
.entry__top img { height: 24px; }
.langs { display: flex; gap: 6px; flex-wrap: wrap; }
.langs button { border: 1px solid rgba(255,255,255,.18); background: transparent; color: #CFD8E1; border-radius: 999px; padding: 6px 13px; cursor: pointer; font-weight: 600; font-size: 13px; }
.langs button[aria-pressed="true"] { background: #fff; color: var(--midnight); border-color: #fff; }
.entry__hero { max-width: 1100px; margin: 0 auto; padding: 28px 32px 10px; width: 100%; }
.entry__eyebrow { color: var(--teal-light); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; font-size: 12px; }
.entry__title { font-family: var(--font-serif); font-weight: 500; font-size: clamp(34px, 5vw, 54px); color: #fff; margin: 10px 0 12px; letter-spacing: -.01em; }
.entry__lead { font-size: 17px; max-width: 700px; color: #C3CFDA; margin: 0; }
.entry__grid { max-width: 1100px; margin: 0 auto; padding: 26px 32px; width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.choice { text-align: left; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: 18px; padding: 22px; color: #E6EDF3; cursor: pointer; transition: transform .15s, background .15s, border-color .15s; display: flex; flex-direction: column; gap: 8px; }
.choice:hover { background: rgba(255,255,255,.09); border-color: var(--teal-light); transform: translateY(-2px); }
.choice .ico { width: 28px; height: 28px; color: var(--teal-light); }
.choice strong { font-size: 17px; color: #fff; }
.choice span { font-size: 14px; color: #AFC0CF; }
.choice--primary { background: var(--teal); border-color: var(--teal); }
.choice--primary .ico, .choice--primary span { color: #E3F6F4; }
.choice--primary:hover { background: var(--teal-dark); }
.entry__companies { max-width: 1100px; margin: 0 auto; padding: 0 32px 10px; width: 100%; }
.entry__companies h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: #8EA0B2; margin-bottom: 10px; }
.co-list { display: flex; gap: 10px; flex-wrap: wrap; }
.co-card { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 12px 16px; color: #fff; cursor: pointer; }
.co-card:hover { border-color: var(--teal-light); }
.co-card small { display: block; color: #8EA0B2; font-size: 12px; }
.entry__trust { max-width: 1100px; margin: auto auto 0; padding: 20px 32px 30px; width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; font-size: 13.5px; color: #AFC0CF; }
.entry__trust div { display: flex; gap: 10px; }
.entry__trust .ico { color: var(--teal-light); }
.entry__trust strong { color: #fff; display: block; }

/* ---------- wizard ---------- */
.wizard { max-width: 720px; margin: 0 auto; }
.steps { display: flex; gap: 6px; margin-bottom: 18px; }
.steps span { flex: 1; height: 5px; border-radius: 999px; background: var(--line); }
.steps span.on { background: var(--teal); }
.rows-edit { display: grid; gap: 8px; }
.rows-edit__row { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 8px; align-items: center; }

/* ---------- import mapping ---------- */
.map-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 14px; }
.drop { border: 2px dashed var(--line); border-radius: 14px; padding: 26px; text-align: center; background: #FBFBF8; cursor: pointer; }
.drop:hover, .drop.drag { border-color: var(--teal); background: var(--teal-wash); }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.tpl { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; background: #fff; }
.tpl strong { font-size: 15px; }
.tpl p { margin: 0 0 6px; font-size: 13.5px; color: var(--muted); flex: 1; }

/* ---------- help ---------- */
.help-layout { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
.help-search { position: relative; margin-bottom: 12px; }
.help-search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; }
.help-search input { padding-left: 38px; }
.help-list { list-style: none; margin: 0; padding: 0; }
.help-list a { display: block; padding: 9px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.help-list a:hover { background: var(--line-2); }
.help-list a[aria-current="true"] { background: var(--teal-wash); color: var(--teal-dark); }
.help-list .snip { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.help-list mark { background: #FFF1B8; color: inherit; padding: 0 1px; }
.help-group { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; padding: 12px 12px 4px; }
.article { font-size: 15.5px; line-height: 1.65; }
.article h2 { font-family: var(--font-serif); font-weight: 500; font-size: 28px; margin-bottom: 10px; }
.article h3 { font-size: 16px; margin: 20px 0 6px; }
.article p { margin: 0 0 12px; }
.article ul, .article ol { padding-left: 22px; margin: 0 0 12px; }
.article li { margin-bottom: 5px; }
.article .tip { background: var(--teal-wash); border-radius: 10px; padding: 10px 14px; margin: 12px 0; }
.article kbd { background: var(--line-2); border-radius: 5px; padding: 1px 6px; font-family: inherit; font-size: 13px; }

/* ---------- read-only (owner) view ---------- */
body.viewer .edit-only { display: none !important; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .grid--kpi { grid-template-columns: repeat(2, 1fr); } .grid--2 { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(11,31,51,.4); }
  .top__menu { display: inline-grid; }
  .top { padding: 10px 16px; }
  .content { padding: 18px 16px 50px; }
  .help-layout, .grid--halves { grid-template-columns: 1fr; }
  .top .badge span.lbl { display: none; }
  .rows-edit__row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) { .grid--kpi { grid-template-columns: 1fr 1fr; gap: 10px; } .kpi__value { font-size: 20px; } .kpi { padding: 12px; } .entry__top, .entry__hero, .entry__grid, .entry__companies, .entry__trust { padding-left: 16px; padding-right: 16px; } }

/* ---------- print (owner report) ---------- */
@media print {
  .side, .top, .page-head__actions, .toolbar, .row-actions, .edit-only, #fr-toasts { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; max-width: none; }
  .card, .kpi { box-shadow: none; break-inside: avoid; }
  body { background: #fff; }
}

/* ---------- liquidity & bars ---------- */
.chart__negzone { fill: rgba(192,70,59,.06); }
.chart__credit { fill: rgba(43,179,168,.13); }
.chart__line2 { fill: none; stroke: var(--teal); stroke-width: 2; stroke-dasharray: 6 4; }
.hbars { display: grid; gap: 12px; }
.hbar__top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 5px; }
.hbar__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar__val { font-weight: 700; }
.hbar__track { height: 9px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.hbar__fill { height: 100%; border-radius: 999px; background: var(--midnight); }
.hbar__fill.in { background: #3FA67A; }
.hbar__fill.out { background: #D0756C; }
.hbar__fill.late { background: var(--amber); }
.hbar__fill.teal { background: var(--teal); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.kpi--soft { background: #FBFBF8; box-shadow: none; }
.kpi--credit { border-color: #BFE3DF; background: linear-gradient(180deg, #fff, var(--teal-wash)); }
.fx-table td, .fx-table th { white-space: nowrap; }
@media (max-width: 1100px) { .grid--3 { grid-template-columns: 1fr; } }
.rows-edit__row--5 { grid-template-columns: 2fr 1.2fr 1fr 1fr auto; }
@media (max-width: 860px) { .rows-edit__row--5 { grid-template-columns: 1fr 1fr; } .rows-edit__row--5.small { display: none; } }
.grid > * { min-width: 0; }
.side__legal { margin: 12px 0 0; font-size: 11px; line-height: 1.5; color: #7F91A3; }
.side__legal a { color: #AFC0CF; }
.side__lang { display: none; margin-top: 10px; }
@media (max-width: 560px) {
  .top .lang-select { display: none; }
  .side__lang { display: block; }
  .side__lang .lang-select { width: 100%; }
  .top .badge--role { display: none; }
}

/* ---------- sign-in screen (shared by every program) ---------- */
body.auth-body { background: #fff; }
.auth { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.auth__brand { background: radial-gradient(900px 500px at 80% -10%, rgba(43,179,168,.25), transparent 60%), linear-gradient(160deg, #0B1F33 0%, #0F2A44 55%, #0B1F33 100%); color: #E6EDF3; padding: 28px 44px 36px; display: flex; flex-direction: column; gap: 26px; overflow: hidden; }
.auth__top img { height: 24px; }
.auth__title { font-family: var(--font-serif); font-weight: 500; font-size: clamp(38px, 4.4vw, 56px); color: #fff; margin: 10px 0 12px; letter-spacing: -.01em; }
.auth__lead { color: #C3CFDA; font-size: 17px; max-width: 520px; margin: 0; }
.auth__shot { margin-right: -120px; }
.auth__shot img { width: 100%; height: auto; display: block; border-radius: 14px; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.auth__trust { list-style: none; margin: auto 0 0; padding: 0; display: grid; gap: 10px; font-size: 14px; color: #AFC0CF; }
.auth__trust li { display: flex; gap: 10px; align-items: flex-start; }
.auth__trust .ico { color: var(--teal-light); width: 18px; height: 18px; margin-top: 1px; }
.auth__panel { display: flex; flex-direction: column; align-items: center; padding: 26px 36px 30px; gap: 20px; background: var(--paper); }
.auth__panel .langs { align-self: flex-end; }
.langs--light button { border-color: var(--line); color: var(--slate); background: #fff; }
.langs--light button[aria-pressed="true"] { background: var(--midnight); color: #fff; border-color: var(--midnight); }
.auth__card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 26px 28px; box-shadow: 0 10px 40px rgba(11,31,51,.08); margin-top: auto; }
.auth__tabs { width: 100%; margin-bottom: 18px; }
.auth__tabs button { flex: 1; }
.auth__h { font-size: 22px; margin-bottom: 4px; }
.auth__card form { margin-top: 16px; }
.input--big { padding: 12px 14px; font-size: 15.5px; }
.auth__err { margin: 4px 0 12px; }
.auth__links { text-align: center; margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.auth__alt { width: 100%; max-width: 440px; display: grid; gap: 10px; }
.auth__altbtn { display: flex; gap: 12px; align-items: flex-start; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 13px 16px; cursor: pointer; font: inherit; color: var(--slate); font-size: 13.5px; }
.auth__altbtn:hover { border-color: var(--teal); }
.auth__altbtn .ico { color: var(--teal); margin-top: 2px; }
.auth__altbtn strong { display: block; color: var(--ink); font-size: 14.5px; }
.auth__legal { max-width: 440px; font-size: 12px; color: var(--muted); text-align: center; margin-top: auto; }
.btn--block { width: 100%; justify-content: center; }
.btn--big { padding: 12px 22px; font-size: 15.5px; }
.btn--light { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.entry__acct { color: #AFC0CF; font-size: 13.5px; margin-left: auto; }
.entry__acct .link-btn { color: #fff; }
.entry__top .btn--light { margin-left: auto; }
.side__acct { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); display: grid; gap: 6px; font-size: 12.5px; }
.side__user { color: #CFD8E1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side__trial { color: #F3C969; text-decoration: none; font-weight: 700; }
.side__paid { color: var(--teal-light); font-weight: 700; }
.side__out { color: #8EA0B2; justify-self: start; font-size: 12.5px; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth__brand { padding: 20px 18px 26px; }
  .auth__shot, .auth__trust { display: none; }
  .auth__panel { padding: 20px 16px 28px; }
  .auth__card { margin-top: 0; padding: 22px 18px; }
}
