@font-face { font-family: Vazirmatn; src: url(assets/Vazirmatn.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
/* Atlassian Design System (ADS) with the Sama theme: ADS structure, spacing, radii and type scale;
   ADS colour roles filled with Sama palette values. Spec: docs/sama-ads-guideline.md */
:root {
  --font: Vazirmatn; /* Abar FaNum under evaluation outside the app; Vazirmatn for now */
  --ds-text: #525759; --ds-text-subtle: #525759; --ds-text-subtlest: #6B6F76; --ds-text-inverse: #FFFFFF; --ds-heading: #454659;
  --ds-link: #2E7D76; --ds-text-selected: #2E7D76;
  --ds-border: #DADCE0; --ds-border-bold: #A3A7B0; --ds-border-input: #8C8F97; --ds-border-focused: #4A8C86; --ds-border-selected: #2E7D76;
  --ds-page: #F7F8FA; --ds-surface: #FFFFFF; --ds-surface-sunken: #F1F2F4; --ds-surface-overlay: #FFFFFF;
  --ds-shadow-raised: 0px 1px 1px #1E1F2140, 0px 0px 1px #1E1F214F; --ds-shadow-overlay: 0px 8px 12px #1E1F2126, 0px 0px 1px #1E1F214F;
  --ds-bg-neutral: #0515240F; --ds-bg-neutral-hovered: #0B120E24; --ds-bg-neutral-bold: #454659;
  --ds-bg-selected: #E6F4F2; --ds-brand-bold: #454659; --ds-brand-bold-hovered: #36374A; --ds-brand-subtlest: #E6F4F2;
  --ds-success: #E6F4F2; --ds-text-success: #2E7D76; --ds-success-bold: #4A8C86;
  --ds-danger: #F7ECE9; --ds-text-danger: #A65A4A; --ds-danger-bold: #BA7161; --ds-border-danger: #BA7161;
  --ds-warning: #F7EFDF; --ds-text-warning: #525759; --ds-border-warning: #C99A3E;
  --ds-information: #EDEDF1; --ds-text-information: #454659;
  --ds-discovery: #F8EEFE; --ds-text-discovery: #803FA5;
  --ds-chart-1: #454659; --ds-chart-2: #4A8C86; --ds-chart-3: #39BFB2; --ds-chart-4: #8E8FA3; --ds-chart-5: #9BDCD5; --ds-chart-neutral: #A3A7B0;
  --sp-050: 4px; --sp-100: 8px; --sp-150: 12px; --sp-200: 16px; --sp-300: 24px;
  --r-s: 4px; --r-m: 6px; --r-l: 8px;
  /* aliases used by page code and inline styles */
  --ink: var(--ds-text); --ink2: var(--ds-text-subtle); --muted: var(--ds-text-subtlest); --line: var(--ds-border); --soft: var(--ds-surface-sunken);
  --surface: var(--ds-surface); --page: var(--ds-page); --brand: var(--ds-brand-bold); --brand2: var(--ds-chart-2); --dark: var(--ds-bg-neutral-bold);
  --good: var(--ds-success-bold); --good-ink: var(--ds-text-success); --bad: var(--ds-danger-bold); --warn: var(--ds-border-warning);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font), Tahoma, system-ui, sans-serif; color: var(--ds-text); font-size: 14px; line-height: 1.6; background: var(--ds-page); }
h1, h2, h3, .hv, .tile .v, .minibox .mv { color: var(--ds-heading); }
button, select, input, textarea { font: inherit; color: inherit; }
a { color: var(--ds-link); }
svg { display: block; }
:focus-visible { outline: 2px solid var(--ds-border-focused); outline-offset: 2px; }

/* ---------- app shell: ADS top navigation + side navigation ---------- */
.app { min-height: 100vh; background: var(--ds-page); }
.top { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: var(--sp-150); flex-wrap: nowrap;
  height: 56px; padding: 0 var(--sp-200); background: var(--ds-page); border-bottom: 1px solid var(--ds-border); }
.pillbox { display: flex; align-items: center; gap: var(--sp-100); }
.brand b { font-size: 16px; font-weight: 650; border-inline-start: 1px solid var(--ds-border); padding-inline-start: var(--sp-150); }
.logo-img { height: 24px; width: auto; }
.mid { font-size: 14px; color: var(--ds-text-subtle); flex: 0 1 auto; min-width: 0; overflow: hidden; }
.mid #company { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .brand, .top-r { flex: none; } .ib.wide { white-space: nowrap; }
.top-r { display: flex; gap: var(--sp-100); align-items: center; }
.pill { font-size: 12px; font-weight: 650; padding: 0 var(--sp-050); line-height: 20px; border-radius: var(--r-s); white-space: nowrap; }
.pill.offline { background: var(--ds-information); color: var(--ds-text-information); }
.internal-badge { background: var(--ds-discovery); color: var(--ds-text-discovery); }
.ib { height: 32px; min-width: 32px; padding: 0 var(--sp-075, 6px); border-radius: var(--r-s); border: 0; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--ds-text-subtle); }
.ib.wide { padding: 0 var(--sp-100); font-size: 14px; font-weight: 500; }
.ib:hover { background: var(--ds-bg-neutral); } .ib.on { background: var(--ds-bg-selected); color: var(--ds-text-selected); }
.ib svg, nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.user { cursor: pointer; padding: var(--sp-050) var(--sp-100); border-radius: var(--r-s); } .user:hover { background: var(--ds-bg-neutral); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--ds-brand-bold); color: #fff; display: grid; place-items: center; font-weight: 650; }
.user span:last-child { display: grid; line-height: 1.3; }
.user select { appearance: none; border: 0; background: transparent; font-weight: 650; padding: 0; cursor: pointer; }
.user small { color: var(--ds-text-subtlest); font-size: 11px; }

.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); }
nav { background: var(--ds-page); border-inline-end: 1px solid var(--ds-border); padding: var(--sp-150) var(--sp-100); position: sticky; top: 56px; align-self: start; height: calc(100vh - 56px); overflow: auto; }
nav h6 { margin: var(--sp-200) var(--sp-100) var(--sp-050); color: var(--ds-text-subtlest); font-size: 12px; font-weight: 650; }
nav h6:first-child { margin-top: var(--sp-050); }
nav a { display: flex; gap: var(--sp-100); align-items: center; min-height: 36px; padding: 0 var(--sp-100); border-radius: var(--r-s); color: var(--ds-text-subtle); text-decoration: none; margin-bottom: 2px; font-weight: 500; position: relative; }
nav a .i { width: 24px; height: 24px; display: grid; place-items: center; flex: none; color: var(--ds-text-subtle); }
nav a .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
nav a:hover { background: var(--ds-bg-neutral); }
nav a.on { background: var(--ds-bg-selected); color: var(--ds-text-selected); font-weight: 650; } nav a.on .i { color: var(--ds-text-selected); }
nav a.on::before { content: ''; position: absolute; inset-inline-start: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 2px 2px 0; background: var(--ds-border-selected); }
nav a .ph-chip { font-size: 11px; background: var(--ds-bg-neutral); color: var(--ds-text-subtle); border-radius: var(--r-s); padding: 0 var(--sp-050); white-space: nowrap; }
nav a.locked { color: var(--ds-text-subtlest); } nav a.locked .i { color: var(--ds-text-subtlest); }
.lockcard { text-align: center; padding: 48px 24px; } .lockcard p { max-width: 560px; margin: 8px auto; }
.lockicon { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: var(--ds-surface-sunken); display: grid; place-items: center; color: var(--ds-text-subtle); }
.lockicon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
main { padding: var(--sp-200) var(--sp-300) 40px; min-width: 0; }

/* ---------- page header & section messages ---------- */
.ph { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--sp-200); flex-wrap: wrap; margin: 0 0 var(--sp-200); }
.ph h1 { margin: 2px 0 0; font-size: 24px; font-weight: 650; line-height: 1.4; }
.ph .step { display: inline-block; background: var(--ds-bg-neutral); color: var(--ds-text-subtle); font-size: 12px; font-weight: 650; padding: 0 var(--sp-050); line-height: 20px; border-radius: var(--r-s); }
.ph p { margin: 4px 0 0; color: var(--ds-text-subtle); }
.key { background: var(--ds-discovery); border-radius: var(--r-m); padding: var(--sp-150) var(--sp-200); margin-bottom: var(--sp-200); color: var(--ds-text); font-size: 14px; }
.key b { color: var(--ds-text-discovery); }
.hide-talk .talk { display: none !important; }
.info { background: var(--ds-information); color: var(--ds-text); border-radius: var(--r-m); padding: var(--sp-150) var(--sp-200); margin-bottom: var(--sp-200); font-size: 14px; }
.info.ok { background: var(--ds-success); } .info.warn { background: var(--ds-warning); }
.card .info { margin: 10px 0 0; }
.alarm { background: var(--ds-danger); color: var(--ds-text); border-radius: var(--r-m); padding: var(--sp-150) var(--sp-200); margin-bottom: var(--sp-200); display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.alarm b { color: var(--ds-text-danger); }

/* ---------- CEO dashboard ---------- */
.home-ph { margin: 0 0 10px; align-items: center; } .home-ph h1 { font-size: 24px; } .home-ph h1 small { font-size: 14px; font-weight: 400; color: var(--ds-text-subtle); margin-inline-start: 10px; }
.home-ph h1 .step { vertical-align: middle; margin-inline-start: 6px; } main.pg-home { padding-bottom: var(--sp-300); max-width: none; }
.card.hero { display: grid; grid-template-columns: minmax(140px, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; }
.hero .lb { font-size: 16px; font-weight: 650; } .hv { font-size: 28px; font-weight: 650; line-height: 1.25; }
.hero.feat { background: var(--ds-brand-subtlest); border-color: transparent; }
.chg { font-weight: 650; white-space: nowrap; } .chg.good { color: var(--ds-text-success); } .chg.bad { color: var(--ds-text-danger); } .chg.ok { color: var(--ds-text-subtle); }
.home-ph + .key, .home-ph + .key + .grid { margin-top: 0; } .home-ph + .key { margin-bottom: 8px; padding: 5px 14px; font-size: 13px; }
table.mini th, table.mini td { padding: 3px 6px; line-height: 1.45; font-size: 13.5px; white-space: nowrap; }
.hero.feat table.mini th { border-color: #2E7D7633; } .hero.feat table.mini td { border-color: #2E7D761F; }
.card.minibox { text-decoration: none; color: var(--ds-text); padding: 10px 16px; transition: background-color .15s; } .minibox:hover { background: var(--ds-surface-sunken); }
.minibox .lb { font-size: 13px; color: var(--ds-text-subtle); } .minibox .mv { font-size: 22px; font-weight: 650; margin: 0; line-height: 1.3; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; } .minibox .mv small { font-size: 12px; font-weight: 400; color: var(--ds-text-subtlest); } .minibox .sub { font-size: 12px; color: var(--ds-text-subtlest); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-inline-end: 3px; background: var(--ds-chart-neutral); } .dot.good { background: var(--ds-success-bold); } .dot.bad { background: var(--ds-danger-bold); }
.alertbox { background: var(--ds-warning); border-color: transparent; padding: 10px 16px; } .alertbox h3 { color: var(--ds-heading); margin-bottom: 4px; font-size: 16px; } .alertbox td { padding: 3px 8px; line-height: 1.55; border-color: #C99A3E40; }
/* All alerts, scrolling inside the card: the list takes no part in the row height (contain: size), so the card is as tall as its
   neighbours and the dashboard never re-renders or re-zooms. No scroll shadow; the scrollbar is the cue. */
.g-dash .alertbox { display: flex; flex-direction: column; } .g-dash .alertbox h3 { flex: none; }
.alert-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; contain: size; scrollbar-width: thin; scrollbar-color: transparent transparent; }
.alert-list:hover { scrollbar-color: #0B120E33 transparent; } /* scrollbar only while the pointer is over the list */
@media (max-width: 1000px) { .alert-list { contain: none; max-height: 260px; } }
.home-ph { margin-bottom: 6px; } .grid.mt:has(.minibox), .alertbox.mt { margin-top: 10px; } main.pg-home .grid { gap: 12px; } .alertbox tr.click:hover td { background: #EFE2C4; }
.g-dash { grid-template-columns: minmax(0, 1.6fr) minmax(0, .75fr) minmax(0, 1.15fr); } .g-dash .card { padding: 12px 16px; } .g-dash h3 { font-size: 16px; margin-bottom: 6px; }
.g-dash .chart svg { max-height: 144px; } /* wide screens: keep the row short, centre the chart */
.g-dash .donut { flex-direction: column; align-items: stretch; gap: 6px; } .g-dash .donut svg { width: 96px; height: 96px; margin: 0 auto; } .g-dash .donut ul { min-width: 0; font-size: 12px; } .g-dash .donut li { padding: 3px 0; } .g-dash .legend { margin-bottom: 2px; } .g-dash .card > .note { margin: 6px 0 0; font-size: 11.5px; }
@media (max-width: 1000px) { .card.hero, .g-dash { grid-template-columns: 1fr; } }
.stickybar { position: sticky; top: calc(56px / var(--z, 1)); /* main is zoomed (fitHome); keep it just under the top bar */ z-index: 6; background: var(--ds-page); padding: 8px 0 2px; margin-bottom: 8px; border-bottom: 1px solid var(--ds-border); } .stickybar .filters { margin-bottom: 8px; }

/* ---------- grid & cards: flat cards on the default surface, separated by a border ---------- */
.grid { display: grid; gap: var(--sp-200); }
.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)); }
.g21 { grid-template-columns: 2fr 1fr; } .g-form { grid-template-columns: minmax(0, 1fr) 220px; }
.card { background: var(--ds-surface); border: 1px solid var(--ds-border); border-radius: var(--r-l); padding: var(--sp-200); min-width: 0; }
.card h3 { margin: 0 0 12px; font-size: 16px; font-weight: 650; line-height: 1.5; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.card h3 small { color: var(--ds-text-subtlest); font-weight: 400; font-size: 12px; }
.mt { margin-top: var(--sp-200); }
.tile .lb { color: var(--ds-text-subtle); font-size: 14px; }
.tile .v { font-size: 24px; font-weight: 650; margin: 6px 0 4px; line-height: 1.3; }
.tile .v small { font-size: 12px; font-weight: 400; color: var(--ds-text-subtlest); }
.tile .sub { font-size: 12px; color: var(--ds-text-subtlest); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tile.feat { background: var(--ds-brand-subtlest); border-color: transparent; }
.grid .tile:not(.card) { background: var(--ds-surface-sunken); border-radius: var(--r-m); padding: 14px; }
.method { background: var(--ds-surface-sunken); } .method p { font-size: 13px; }
.proc-card { cursor: pointer; transition: border-color .15s, background-color .15s; } .proc-card:hover { background: var(--ds-surface-sunken); } .proc-card.on { border: 2px solid var(--ds-border-selected); background: var(--ds-bg-selected); }
.proc-card .v { font-size: 20px; font-weight: 650; }

/* ---------- tables (ADS dynamic table) ---------- */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
th { text-align: start; color: var(--ds-text-subtle); font-weight: 650; padding: 8px; white-space: nowrap; border-bottom: 2px solid var(--ds-border); }
td { padding: 8px; border-bottom: 1px solid var(--ds-border); vertical-align: middle; }
td.num, th.num { text-align: left; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--ds-bg-neutral); }
tr.total td { font-weight: 650; background: var(--ds-surface-sunken); }
.pl-n > span { vertical-align: middle; } .pl-tog { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-inline-end: 8px; border-radius: var(--r-s); border: 0; background: var(--ds-bg-neutral); color: var(--ds-text-subtle); font: inherit; font-weight: 650; line-height: 1; cursor: pointer; vertical-align: middle; } .pl-tog:hover { background: var(--ds-bg-neutral-hovered); } .pl-tog.sp { background: none; cursor: default; }
.pl-dim { color: var(--ds-text-subtlest); font-size: 11px; } .pl-go { text-decoration: none; color: var(--ds-link); font-weight: 650; } tr.pl-m td { color: var(--ds-text-subtle); font-size: 12.5px; padding-top: 4px; padding-bottom: 6px; } table.pl td.pl-n .note { margin-inline-start: 28px; }

/* ---------- controls: lozenge, button, button group, text field, progress bar ---------- */
.badge { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; line-height: 20px; padding: 0 var(--sp-050); border-radius: var(--r-s); white-space: nowrap; font-weight: 650; }
.b-good { background: var(--ds-success); color: var(--ds-text-success); } .b-bad { background: var(--ds-danger); color: var(--ds-text-danger); } .b-warn { background: var(--ds-warning); color: var(--ds-text-warning); }
.b-neu { background: var(--ds-bg-neutral); color: var(--ds-text-subtle); } .b-info { background: var(--ds-information); color: var(--ds-text-information); } .b-ext { background: var(--ds-discovery); color: var(--ds-text-discovery); } .b-int { background: var(--ds-bg-neutral-hovered); color: var(--ds-text); }
.btn { border: 0; background: var(--ds-bg-neutral); color: var(--ds-text-subtle); border-radius: var(--r-s); height: 32px; padding: 0 var(--sp-150); font-weight: 500; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn:hover { background: var(--ds-bg-neutral-hovered); }
.btn.pri { background: var(--ds-brand-bold); color: var(--ds-text-inverse); } .btn.pri:hover { background: var(--ds-brand-bold-hovered); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sm { height: 24px; padding: 0 var(--sp-100); font-size: 12px; }
label.btn { display: inline-flex; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: var(--sp-200); }
.filters select, .filters input, .card select, .card input[type=number], .card input[type=text], textarea { padding: 5px 8px; border: 1px solid var(--ds-border-input); border-radius: var(--r-s); background: var(--ds-surface); }
.filters > select { height: 32px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ds-border-focused) !important; box-shadow: inset 0 0 0 1px var(--ds-border-focused); }
.seg { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--ds-border); border-radius: var(--r-m); background: var(--ds-surface); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; height: 28px; padding: 0 var(--sp-150); border-radius: var(--r-s); cursor: pointer; color: var(--ds-text-subtle); font-weight: 500; }
.seg button:hover { background: var(--ds-bg-neutral); }
.seg button.on { background: var(--ds-bg-selected); color: var(--ds-text-selected); font-weight: 650; }
.note { color: var(--ds-text-subtlest); font-size: 12px; }
.lock { color: var(--ds-text-subtle); font-size: 12px; background: var(--ds-bg-neutral); border-radius: var(--r-s); padding: 0 var(--sp-050); }
.prog { height: 6px; background: var(--ds-bg-neutral); border-radius: 3px; overflow: hidden; min-width: 80px; }
.prog > span { display: block; height: 100%; border-radius: 3px; background: var(--ds-brand-bold); }
.slider { display: grid; grid-template-columns: 170px 1fr 70px; gap: 10px; align-items: center; margin-bottom: 8px; }
.slider input { width: 100%; accent-color: var(--ds-brand-bold); }
input[type=checkbox] { accent-color: var(--ds-brand-bold); }

/* ---------- charts (ADS chart tokens) ---------- */
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ds-text-subtle); margin-bottom: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-inline-end: 6px; vertical-align: middle; }
.chart svg { width: 100%; height: auto; }
.chart .grid { stroke: var(--ds-border); stroke-width: 1; } .chart .past { fill: var(--ds-surface-sunken); } .chart .base { stroke: var(--ds-border-bold); }
.chart .tick, .donut .tick { fill: var(--ds-text-subtlest); font-size: 11px; font-family: inherit; }
.mark { transition: opacity .15s; } svg:hover .mark { opacity: .55; } svg .mark:hover { opacity: 1; }
.donut { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.donut ul { list-style: none; padding: 0; margin: 0; flex: 1; min-width: 160px; font-size: 13px; }
.donut li { display: flex; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--ds-border); }
.donut li span { flex: 1; } .donut li i, .hb i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.donut-c { font-size: 18px; font-weight: 650; fill: var(--ds-text); font-family: inherit; }
.hbars { display: grid; gap: 8px; }
.hb { display: grid; grid-template-columns: minmax(110px, 38%) 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.hb-t { background: var(--ds-bg-neutral); border-radius: 3px; height: 10px; overflow: hidden; }
.hb-t span { display: block; height: 100%; border-radius: 3px; }
.hb b { font-variant-numeric: tabular-nums; font-weight: 650; min-width: 48px; text-align: left; }
.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--ds-bg-neutral-bold); color: var(--ds-text-inverse); font-size: 12px; padding: 2px 6px; border-radius: var(--r-s); opacity: 0; transition: opacity .1s; max-width: 320px; }
#toast { position: fixed; bottom: 24px; left: 24px; z-index: 60; display: grid; gap: 8px; }
#toast div { background: var(--ds-surface-overlay); color: var(--ds-text); padding: var(--sp-200); border-radius: var(--r-m); box-shadow: var(--ds-shadow-overlay); max-width: 380px; border-inline-start: 4px solid var(--ds-success-bold); }

/* ---------- module specifics ---------- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.formlist a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: var(--r-s); text-decoration: none; color: var(--ds-text); align-items: center; min-width: 0; overflow-wrap: anywhere; }
.g-form .formlist a { flex-direction: column; align-items: flex-start; gap: 2px; }
.formlist .badge { white-space: normal; max-width: 100%; line-height: 1.5; }
.formlist a:hover { background: var(--ds-bg-neutral); } .formlist a.on { background: var(--ds-bg-selected); color: var(--ds-text-selected); }
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0; }
.timeline div { border-top: 4px solid var(--ds-chart-1); padding: 8px 6px 0; font-size: 12px; border-radius: 2px; }
.timeline div:nth-child(2) { border-color: var(--ds-chart-2); } .timeline div:nth-child(3) { border-color: var(--ds-chart-3); } .timeline div:nth-child(4) { border-color: var(--ds-chart-4); }
.timeline b { display: block; font-size: 13px; }
.scan { height: 6px; background: var(--ds-bg-neutral); border-radius: 3px; overflow: hidden; margin: 8px 0; }
.scan span { display: block; height: 100%; width: 0; background: var(--ds-brand-bold); transition: width .25s; }
.cyc { position: relative; height: 70px; margin: 18px 0 6px; }
.cyc .bar { position: absolute; height: 24px; border-radius: var(--r-s); font-size: 11px; color: #fff; display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; }
.matrix td:not(:first-child), .matrix th:not(:first-child) { text-align: center; }
.yes { color: var(--ds-text-success); font-weight: 650; } .no { color: var(--ds-text-subtlest); } .own { color: var(--ds-text-selected); font-weight: 650; }
.stepper { display: flex; gap: 6px; margin: 4px 0 6px; }
.stepper div { flex: 1; border-top: 4px solid var(--ds-bg-neutral-hovered); border-radius: 2px; padding-top: 4px; font-size: 12px; color: var(--ds-text-subtlest); }
.stepper .done { border-color: var(--ds-success-bold); color: var(--ds-text-success); } .stepper .cur { border-color: var(--ds-brand-bold); color: var(--ds-text-selected); font-weight: 650; }
.thread { max-height: 340px; overflow: auto; margin-bottom: 10px; }
.thread .msg { border-inline-start: 3px solid var(--ds-border-bold); padding: 6px 12px; margin-bottom: 8px; background: var(--ds-surface-sunken); border-radius: var(--r-s); font-size: 13px; }
.msg.return { border-color: var(--ds-border-warning); } .msg.review, .msg.approve { border-color: var(--ds-success-bold); } .msg.adjust { border-color: var(--ds-chart-3); } .msg.lock { border-color: var(--ds-bg-neutral-bold); }

/* ---------- responsive & print ---------- */
@media (max-width: 1100px) { .mid { display: none; } }
@media (max-width: 1000px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3, .g21, .g-form { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .top { position: static; height: auto; padding: 8px 16px; } .stickybar { top: 0; }
  .brand b { display: none; } .logo-img { height: 20px; } .ib.wide span { display: none; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .top-r { flex: 1; justify-content: space-between; }
  nav { position: static; height: auto; display: flex; overflow-x: auto; gap: 4px; padding: 6px 16px; border-inline-end: 0; border-bottom: 1px solid var(--ds-border); }
  nav h6 { display: none; } nav a { white-space: nowrap; margin: 0; } nav a.on::before { display: none; }
  main { padding: 12px 16px 32px; } .g2 { grid-template-columns: 1fr; }
  .ph h1 { font-size: 20px; } .timeline { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) { .g4 { grid-template-columns: 1fr; } .slider { grid-template-columns: 1fr 60px; } .slider label { grid-column: 1 / -1; } .user small { display: none; } }
@media print { .top, nav, .key, .btn { display: none !important; } .layout { display: block; } .card { break-inside: avoid; } }

/* ================= Sama brand elements (assets/design/design_guideline.md §4–6, §9) and the typography pass =================
   Kept last so they override the ADS defaults above. */

/* §4 Callouts: accent bar on the right edge (inline-start in RTL); colour by meaning */
.key, .info, .alarm, .alertbox { border: 0; border-inline-start: 4px solid; }
.key { background: var(--ds-success); border-color: #39BFB2; } .key b { color: var(--ds-heading); }  /* insight: teal */
.info { background: var(--ds-information); border-color: #454659; }                              /* information: navy */
.info.ok { background: var(--ds-success); border-color: #39BFB2; }
.info.warn, .alertbox { background: var(--ds-warning); border-color: #C99A3E; }                  /* at risk: amber */
.alarm { background: var(--ds-danger); border-color: #BA7161; }                                  /* risk / loss: terracotta */

/* §5 Emphasis box: one per page, solid navy, white text, key figure in teal */
.hero.feat, .tile.feat { background: #454659; border-color: #454659; color: #fff; }
.hero.feat .lb, .tile.feat .lb { color: #fff; }
.hero.feat .hv, .tile.feat .v { color: #39BFB2; }
.hero.feat .note, .tile.feat .sub, .tile.feat .v small { color: #C8CAD3; }
.hero.feat table.mini th { color: #C8CAD3; border-color: #FFFFFF33; } .hero.feat table.mini td { color: #fff; border-color: #FFFFFF1F; }
.hero.feat .chg.good { color: #39BFB2; } .hero.feat .chg.bad { color: #F3B6A8; } .hero.feat .chg.ok { color: #C8CAD3; }
.tile.feat .badge { background: #FFFFFF26; color: #fff; }

/* §6 KPI strip: the dashboard's four small boxes as one row, separated by hairline dividers */
.grid.g4:has(> .minibox) { gap: 0; background: var(--ds-surface); border: 1px solid var(--ds-border); border-radius: var(--r-l); overflow: hidden; }
.grid.g4 > .minibox { border: 0; border-radius: 0; } .grid.g4 > .minibox + .minibox { border-inline-start: 1px solid var(--ds-border); }

/* §9 Tables: a navy rule above result/total rows only (not above section header rows marked .group) */
tr.total:not(.group) td { border-top: 1px solid #454659; }

/* Typography: the ADS type scale only (12 / 14 / 16 / 20 / 24 / 28 px) and fewer heavy weights.
   Headings and headline numbers 600; table headers, change figures and labels regular/medium. */
.ph h1, .home-ph h1 { font-size: 24px; font-weight: 600; }
.card h3, .g-dash h3, .alertbox h3, .hero .lb { font-size: 16px; font-weight: 600; }
.hv { font-size: 28px; font-weight: 600; }
.minibox .lb, .tile .lb { font-size: 14px; }
.minibox .mv, .tile .v { font-size: 24px; font-weight: 600; } .proc-card .v { font-size: 20px; }
table.mini th, table.mini td { font-size: 14px; } table.mini th, th { font-weight: 500; }
.chg { font-weight: 500; }
.g-dash .donut ul, .g-dash .card > .note, .chart .tick, .donut .tick, .user small, nav h6 { font-size: 12px; }
.badge, .pill, .ph .step { font-weight: 600; }
.home-ph + .key { font-size: 12px; } .key b { font-weight: 600; }
.donut-c { font-size: 20px; font-weight: 600; }
.seg button.on, nav a.on, tr.total td, .brand b, .user select { font-weight: 600; }
