/* Rubban UI kit — two atmospheres (workbench light, bridge dark), bilingual, logical properties for RTL. */
@font-face { font-family: "Inter"; font-weight: 400; src: url(/static/vendor/fonts/inter-400.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Inter"; font-weight: 500; src: url(/static/vendor/fonts/inter-500.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Inter"; font-weight: 600; src: url(/static/vendor/fonts/inter-600.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Inter"; font-weight: 700; src: url(/static/vendor/fonts/inter-700.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Plex Arabic"; font-weight: 400; src: url(/static/vendor/fonts/plexar-400.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Plex Arabic"; font-weight: 500; src: url(/static/vendor/fonts/plexar-500.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Plex Arabic"; font-weight: 600; src: url(/static/vendor/fonts/plexar-600.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Plex Arabic"; font-weight: 700; src: url(/static/vendor/fonts/plexar-700.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; src: url(/static/vendor/fonts/jbmono-400.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "JetBrains Mono"; font-weight: 600; src: url(/static/vendor/fonts/jbmono-600.woff2) format("woff2"); font-display: swap; }

:root {
  --navy-900: #0B1626; --navy-800: #122036; --navy-700: #1B2E48; --navy-600: #27405F; --navy-500: #35517A;
  --paper: #F5F7FA; --panel: #FFFFFF; --panel-2: #EDF1F6; --line: #DCE3EB; --line-2: #E8EDF3;
  --ink: #0F1B2B; --ink-2: #33465E; --muted: #64748B; --muted-2: #8A98AB;
  --teal: #0E8C8C; --teal-700: #0A6E6E; --teal-100: #DDF3F2; --cyan: #4CC9C9; --cyan-100: #E3F7F7;
  --amber: #D69E2E; --amber-100: #FBF1DC; --coral: #F07A5F; --coral-100: #FDE8E2; --green: #2FA36B; --green-100: #E3F4EB; --red: #C0392B; --red-100: #F9E3E0;
  --violet: #7C6CF2; --violet-100: #ECE9FD;
  --font: "Inter", "Plex Arabic", system-ui, -apple-system, "Segoe UI", sans-serif; --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --r: 14px; --r-sm: 9px; --r-xs: 6px; --shadow: 0 1px 2px rgba(15,27,43,.06), 0 1px 8px rgba(15,27,43,.04); --shadow-md: 0 6px 24px rgba(15,27,43,.10); --shadow-lg: 0 18px 48px rgba(11,22,38,.22);
  --side-w: 248px; --top-h: 58px; --focus: 0 0 0 3px rgba(14,140,140,.22);
  --bg: var(--paper); --surface: var(--panel); --surface-2: var(--panel-2); --text: var(--ink); --text-2: var(--ink-2); --border: var(--line); --accent: var(--teal); --accent-soft: var(--teal-100);
  --chart-1: #0E8C8C; --chart-2: #4CC9C9; --chart-3: #D69E2E; --chart-4: #F07A5F; --chart-5: #7C6CF2; --chart-6: #2FA36B; --chart-7: #3E8EDE; --chart-8: #98A6B8;
}
[dir="rtl"] { --font: "Plex Arabic", "Inter", system-ui, sans-serif; }
[data-theme="bridge"] {
  --bg: #07101D; --surface: #0E1A2C; --surface-2: #142338; --text: #E8EEF6; --text-2: #B9C6D6; --muted: #8A9BB1; --muted-2: #6B7C93; --border: #1E2F47; --line-2: #1A2A40;
  --accent: #4CC9C9; --accent-soft: rgba(76,201,201,.14); --teal-100: rgba(76,201,201,.14); --amber-100: rgba(214,158,46,.16); --coral-100: rgba(240,122,95,.16); --green-100: rgba(47,163,107,.16); --red-100: rgba(192,57,43,.18); --violet-100: rgba(124,108,242,.18); --cyan-100: rgba(76,201,201,.12);
  --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-md: 0 8px 28px rgba(0,0,0,.35); --chart-8: #4A5B72;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); min-height: 100vh; -webkit-font-smoothing: antialiased; }
[data-theme="bridge"] body, body[data-theme="bridge"] { background: radial-gradient(1200px 700px at 80% -10%, rgba(76,201,201,.10), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(124,108,242,.10), transparent 60%), var(--bg); }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 8px; line-height: 1.25; letter-spacing: -0.015em; color: var(--text); }
h1 { font-size: 24px; font-weight: 700; } h2 { font-size: 17px; font-weight: 650; } h3 { font-size: 14.5px; font-weight: 650; }
h4 { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
[dir="rtl"] h4 { letter-spacing: 0; text-transform: none; }
p { margin: 0 0 10px; } .muted { color: var(--muted); } .small { font-size: 12.5px; } .tiny { font-size: 11.5px; } .mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0; direction: ltr; unicode-bidi: embed; }
.num { font-variant-numeric: tabular-nums; } .right { text-align: end; } .center { text-align: center; } .nowrap { white-space: nowrap; } .hidden { display: none !important; } .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}.mb-0{margin-bottom:0}
.flex { display: flex; gap: 12px; align-items: center; } .flex-wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .col { flex-direction: column; align-items: stretch; } .grow { flex: 1; min-width: 0; } .gap-1{gap:6px}.gap-3{gap:20px}
.grid { display: grid; gap: 16px; align-items: stretch; } .grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); } .grid-5 { grid-template-columns: repeat(5, minmax(0,1fr)); } .grid-6 { grid-template-columns: repeat(6, minmax(0,1fr)); }
.grid-side { grid-template-columns: minmax(0, 1fr) 360px; } .grid-side-l { grid-template-columns: 300px minmax(0, 1fr); } .grid-2-1 { grid-template-columns: 2fr 1fr; } .grid-1-2 { grid-template-columns: 1fr 2fr; }
.grid > .card, .grid > .kpi { height: 100%; }
@media (max-width: 1180px) { .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: repeat(2, minmax(0,1fr)); } .grid-side, .grid-side-l, .grid-2-1, .grid-1-2 { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .grid-2, .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: 1fr; } }

/* ---------------- shell ---------------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--navy-900); color: #fff; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 16px 12px 12px; gap: 14px; overflow-y: auto; border-inline-end: 1px solid rgba(255,255,255,.04); }
[data-theme="bridge"] .side { background: #060D18; }
.brand { display: flex; align-items: center; gap: 11px; color: #fff; padding: 4px 8px 6px; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--cyan), var(--teal)); display: grid; place-items: center; color: #06202A; font-weight: 800; font-size: 15px; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 6px 16px rgba(76,201,201,.25); }
.brand b { display: block; font-size: 16px; letter-spacing: -0.01em; line-height: 1.1; } .brand i { display: block; color: #8DA0B8; font-weight: 500; font-size: 11px; font-style: normal; margin-top: 2px; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav a { display: flex; align-items: center; gap: 10px; color: #B7C4D6; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; font-weight: 500; line-height: 1.2; transition: background .15s, color .15s; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav a.active { background: rgba(76,201,201,.14); color: #fff; } .nav a.active .ic { color: var(--cyan); }
.nav .ic { width: 18px; height: 18px; flex: none; color: #7E92AC; } .nav .sect { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: #5F7190; padding: 12px 10px 5px; }
[dir="rtl"] .nav .sect { letter-spacing: 0; text-transform: none; }
.nav .count { margin-inline-start: auto; background: var(--coral); color: #fff; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.ic { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: -3px; flex: none; }
.side-foot { display: flex; flex-direction: column; gap: 8px; }
.persona { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 13px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.05); }
.persona .who { flex: 1; min-width: 0; } .persona .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; } .persona .role { color: #8DA0B8; font-size: 11.5px; display: block; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #2A4A6B, #1B2E48); color: #BFE9E9; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; border: 1px solid rgba(255,255,255,.12); }
.side-links { display: flex; flex-wrap: wrap; gap: 2px 10px; padding: 0 10px; font-size: 11.5px; color: #5F7190; align-items: center; }
.side-links a, .side-links button { color: #8DA0B8; background: none; border: 0; padding: 0; font: inherit; font-size: 11.5px; cursor: pointer; } .side-links a:hover, .side-links button:hover { color: #fff; }
main.content { padding: 0 32px 64px; width: 100%; max-width: 1560px; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; height: var(--top-h); margin: 0 -32px 22px; padding: 0 32px; background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.topbar .search { flex: 1; max-width: 520px; position: relative; } .topbar .search input { width: 100%; padding: 8px 12px 8px 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }
[dir="rtl"] .topbar .search input { padding: 8px 36px 8px 12px; } .topbar .search .ic { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.topbar .spacer { flex: 1; } .topbar .iconbtn { position: relative; }
.iconbtn { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; transition: all .15s; }
.iconbtn:hover { border-color: var(--accent); color: var(--accent); box-shadow: var(--shadow); } .iconbtn .dot { position: absolute; top: -3px; inset-inline-end: -3px; min-width: 16px; height: 16px; border-radius: 99px; background: var(--coral); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.lang-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); } .lang-toggle a { padding: 6px 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); } .lang-toggle a.on { background: var(--accent); color: #fff; } .lang-toggle a:hover { text-decoration: none; }
body.bare .shell { grid-template-columns: 1fr; } body.bare .side { display: none; } body.bare main.content { padding: 0; max-width: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin-bottom: 2px; } .page-head .sub { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; margin-bottom: 6px; } .crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--accent); }
.content > *:not(.topbar) { animation: rise .35s ease both; } @keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .content > * { animation: none !important; } }

/* ---------------- cards, kpis ---------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); position: relative; }
.card.tight { padding: 12px 14px; } .card.flush { padding: 0; overflow: hidden; } .card > h2, .card > h3 { margin-bottom: 12px; } .card .card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card.hover:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); transition: all .18s; }
.card.accent { border-inline-start: 4px solid var(--accent); } .card.danger { border-inline-start: 4px solid var(--coral); } .card.warn { border-inline-start: 4px solid var(--amber); }
.hero { border-radius: 18px; padding: 26px 28px; color: #fff; background: radial-gradient(900px 400px at 100% 0%, rgba(76,201,201,.35), transparent 55%), linear-gradient(135deg, #0F2A3D 0%, #0B1626 70%); position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.hero::after { content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cpath d='M0 60 Q30 40 60 60 T120 60' fill='none' stroke='rgba(255,255,255,.05)'/%3E%3C/svg%3E"); opacity: .8; pointer-events: none; }
.hero h1, .hero h2 { color: #fff; } .hero .muted { color: #A9BBD1; } .hero > * { position: relative; z-index: 1; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; position: relative; min-height: 104px; }
.kpi .label { font-size: 12px; color: var(--muted); font-weight: 500; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.kpi .value { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.05; color: var(--text); }
.kpi .value small { font-size: 14px; font-weight: 600; color: var(--muted); margin-inline-start: 3px; letter-spacing: 0; }
.kpi .delta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; } .delta.up { color: var(--green); } .delta.down { color: var(--coral); }
.kpi.accent .value { color: var(--accent); } .kpi.coral .value { color: var(--coral); } .kpi.amber .value { color: var(--amber); } .kpi.green .value { color: var(--green); }
.kpi .spark { position: absolute; inset-inline-end: 14px; bottom: 12px; width: 84px; height: 30px; opacity: .9; }
.prov { width: 20px; height: 20px; border-radius: 6px; display: inline-grid; place-items: center; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); cursor: pointer; font-size: 11px; font-family: var(--mono); transition: all .15s; flex: none; }
.prov:hover { color: var(--accent); border-color: var(--accent); }

/* ---------------- chips, badges, buttons ---------------- */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; line-height: 1.5; background: var(--surface-2); color: var(--text-2); border: 1px solid transparent; white-space: nowrap; }
.chip .ic { width: 12px; height: 12px; }
.chip.teal, .chip.ai { background: var(--teal-100); color: var(--teal); } [data-theme="bridge"] .chip.teal, [data-theme="bridge"] .chip.ai { color: var(--cyan); }
.chip.amber, .chip.warn { background: var(--amber-100); color: #8A6414; } [data-theme="bridge"] .chip.amber { color: #F2C66D; }
.chip.coral, .chip.danger { background: var(--coral-100); color: #B24E37; } [data-theme="bridge"] .chip.coral { color: #FFA893; }
.chip.green, .chip.ok { background: var(--green-100); color: #1F7A4D; } [data-theme="bridge"] .chip.green { color: #7BE0AE; }
.chip.violet { background: var(--violet-100); color: #5A4BD1; } [data-theme="bridge"] .chip.violet { color: #BDB4FF; }
.chip.outline { background: transparent; border-color: var(--border); color: var(--muted); } .chip.mono { font-family: var(--mono); font-weight: 500; }
.chip.maturity { font-size: 10.5px; } .chip.synthetic { background: var(--violet-100); color: #5A4BD1; } .chip.real { background: var(--green-100); color: #1F7A4D; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; transition: all .15s; text-decoration: none; line-height: 1.3; }
.btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; box-shadow: var(--shadow); } .btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; } .btn-primary:hover { background: var(--teal-700); border-color: var(--teal-700); color: #fff; }
[data-theme="bridge"] .btn-primary { color: #06202A; } [data-theme="bridge"] .btn-primary:hover { background: #7FDADA; border-color: #7FDADA; color: #06202A; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); } .btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-danger { color: var(--coral); } .btn-danger:hover { background: var(--coral-100); border-color: var(--coral); color: #B24E37; }
.btn-ok { color: var(--green); } .btn-ok:hover { background: var(--green-100); border-color: var(--green); color: #1F7A4D; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; } .btn-lg { padding: 11px 18px; font-size: 14px; border-radius: 12px; } .btn.block { width: 100%; }
.btn .ic { width: 15px; height: 15px; } .btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.segmented { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; } .segmented a, .segmented button { padding: 6px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); border: 0; background: transparent; cursor: pointer; font-family: inherit; }
.segmented .on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); } .segmented a:hover { text-decoration: none; color: var(--text); }

/* ---------------- tables, lists ---------------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; } .table th, .table td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); position: sticky; top: var(--top-h); z-index: 1; }
.table-wrap .table th { top: 0; }   /* inside a scrolling wrapper the header sticks to the wrapper, not the page: no top offset or it sits on the first row */
[dir="rtl"] .table th { letter-spacing: 0; text-transform: none; } .table tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); } .table td.num, .table th.num { text-align: end; font-variant-numeric: tabular-nums; }
.table .row-link { cursor: pointer; } .table-wrap { overflow-x: auto; } .card.flush .table th { top: 0; }
.list { list-style: none; margin: 0; padding: 0; } .list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); } .list li:last-child { border-bottom: 0; }
.list .title { font-weight: 600; } .list .meta { color: var(--muted); font-size: 12px; }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--r); background: var(--surface-2); }

/* ---------------- progress, rings, bars, heatmap ---------------- */
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; position: relative; } .bar > i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.bar.thin { height: 5px; } .bar > i.amber { background: var(--amber); } .bar > i.coral { background: var(--coral); } .bar > i.green { background: var(--green); } .bar > i.violet { background: var(--violet); }
.ring { position: relative; width: 120px; height: 120px; } .ring svg { transform: rotate(-90deg); } .ring .track { stroke: var(--surface-2); } .ring .fill { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .9s cubic-bezier(.2,.8,.2,1); }
.ring .txt { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 22px; letter-spacing: -0.02em; } .ring .txt small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; text-align: center; }
.heat { display: grid; gap: 3px; } .heat .cell { aspect-ratio: 1; border-radius: 4px; background: var(--surface-2); position: relative; cursor: default; transition: transform .1s; } .heat .cell:hover { transform: scale(1.15); z-index: 2; outline: 2px solid var(--accent); }
.heat .cell[data-v="1"] { background: #F7D9D1; } .heat .cell[data-v="2"] { background: #F2B99F; } .heat .cell[data-v="3"] { background: #D6E7C2; } .heat .cell[data-v="4"] { background: #8FD1B8; } .heat .cell[data-v="5"] { background: #1F9D86; }
[data-theme="bridge"] .heat .cell[data-v="1"] { background: #5B2A22; } [data-theme="bridge"] .heat .cell[data-v="2"] { background: #7A4A2A; } [data-theme="bridge"] .heat .cell[data-v="3"] { background: #3F5A3A; } [data-theme="bridge"] .heat .cell[data-v="4"] { background: #2B7A5E; } [data-theme="bridge"] .heat .cell[data-v="5"] { background: #1FB39A; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); align-items: center; } .legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-inline-end: 5px; vertical-align: -1px; }
.chart { width: 100%; height: 280px; } .chart.sm { height: 200px; } .chart.lg { height: 380px; } .chart.xl { height: 460px; }

/* ---------------- forms ---------------- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; } .field label { font-size: 12px; font-weight: 600; color: var(--text-2); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea { width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; transition: border .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); } textarea { min-height: 90px; resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; } .form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.note { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 12.5px; color: var(--text-2); border: 1px solid var(--border); } .note-error { background: var(--red-100); color: var(--red); border-color: transparent; } .note-ok { background: var(--green-100); color: #1F7A4D; border-color: transparent; }
.note-ai { background: var(--teal-100); border-color: transparent; color: var(--teal-700); } [data-theme="bridge"] .note-ai { color: var(--cyan); }

/* ---------------- tabs, steps, timeline ---------------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; } .tabs a, .tabs button { padding: 9px 14px; font-size: 13px; font-weight: 600; color: var(--muted); border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer; font-family: inherit; white-space: nowrap; margin-bottom: -1px; }
.tabs .on, .tabs a:hover { color: var(--text); text-decoration: none; } .tabs .on { border-bottom-color: var(--accent); color: var(--accent); }
.tab-pane { display: none; } .tab-pane.on { display: block; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; } .steps li { position: relative; padding: 10px 0 10px 40px; counter-increment: s; border-inline-start: 2px solid var(--line-2); margin-inline-start: 14px; }
[dir="rtl"] .steps li { padding: 10px 40px 10px 0; } .steps li::before { content: counter(s); position: absolute; inset-inline-start: -15px; top: 10px; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--border); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.steps li.done::before { background: var(--green); border-color: var(--green); color: #fff; content: "✓"; } .steps li.on::before { background: var(--accent); border-color: var(--accent); color: #fff; } .steps li.crit::after { content: "critical"; position: absolute; inset-inline-end: 0; top: 12px; font-size: 10px; font-weight: 700; color: var(--coral); text-transform: uppercase; letter-spacing: .06em; }
.timeline { position: relative; padding-inline-start: 20px; } .timeline::before { content: ""; position: absolute; inset-inline-start: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line-2); }
.timeline .ev { position: relative; padding: 4px 0 14px; } .timeline .ev::before { content: ""; position: absolute; inset-inline-start: -18px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.timeline .ev.warn::before { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-100); } .timeline .ev.bad::before { background: var(--coral); box-shadow: 0 0 0 3px var(--coral-100); } .timeline .ev .when { font-size: 11.5px; color: var(--muted); }

/* ---------------- drawer, popover, toast, modal ---------------- */
.drawer { position: fixed; top: 0; inset-inline-end: 0; height: 100vh; width: min(440px, 100vw); background: var(--surface); border-inline-start: 1px solid var(--border); box-shadow: var(--shadow-lg); z-index: 60; transform: translateX(110%); transition: transform .28s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; }
[dir="rtl"] .drawer { transform: translateX(-110%); } .drawer.open { transform: none; }
.drawer .d-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); } .drawer .d-head b { flex: 1; } .drawer .d-body { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.drawer .d-foot { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; align-items: flex-end; } .drawer .d-foot textarea { min-height: 44px; max-height: 120px; flex: 1; }
.msg { max-width: 92%; padding: 10px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; } .msg.user { align-self: flex-end; background: var(--accent); color: #fff; border-end-end-radius: 4px; } [data-theme="bridge"] .msg.user { color: #06202A; }
.msg.bot { align-self: flex-start; background: var(--surface-2); color: var(--text); border-end-start-radius: 4px; } .msg .cites { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; } .msg .cites a { font-size: 11px; background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 1px 8px; color: var(--accent); }
.msg p { margin: 0 0 8px; } .msg p:last-child { margin-bottom: 0; } .msg ul, .msg ol { margin: 2px 0 8px; padding-inline-start: 20px; } .msg li { margin: 2px 0; } .msg code { font-family: var(--mono); font-size: 12px; background: rgba(127,127,127,.12); padding: 1px 5px; border-radius: 5px; }
.msg .tools { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 5px; } .msg .tools span { font-family: var(--mono); font-size: 10.5px; background: var(--teal-100); color: var(--teal-700); border-radius: 6px; padding: 1px 6px; } [data-theme="bridge"] .msg .tools span { color: var(--cyan); }
.suggest { display: flex; gap: 6px; flex-wrap: wrap; } .suggest button { font: inherit; font-size: 12px; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; } .suggest button:hover { border-color: var(--accent); color: var(--accent); }
.popover { position: absolute; z-index: 70; width: 320px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 12px 14px; font-size: 12.5px; display: none; }
.popover.open { display: block; animation: rise .18s ease; } .popover h5 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); } .popover .kv { display: grid; grid-template-columns: 90px 1fr; gap: 3px 10px; } .popover .kv b { color: var(--muted); font-weight: 500; }
.popover .ev { font-size: 11.5px; color: var(--text-2); padding: 3px 0; border-top: 1px dashed var(--line-2); }
.toast-wrap { position: fixed; bottom: 20px; inset-inline-start: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
[dir="rtl"] .toast-wrap { transform: translateX(50%); }
.toast { pointer-events: auto; background: var(--navy-800); color: #fff; padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 13px; display: flex; gap: 10px; align-items: center; animation: rise .25s ease; max-width: 90vw; }
.toast.ok { background: #1F7A4D; } .toast.bad { background: #B24E37; }
.modal-bg { position: fixed; inset: 0; background: rgba(5,12,22,.55); z-index: 65; display: none; place-items: center; backdrop-filter: blur(3px); } .modal-bg.open { display: grid; }
.modal { width: min(720px, 94vw); max-height: 90vh; overflow: auto; background: var(--surface); border-radius: 16px; border: 1px solid var(--border); box-shadow: var(--shadow-lg); padding: 20px 22px; animation: rise .2s ease; }
kbd { font-family: var(--mono); font-size: 11px; background: var(--surface-2); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; color: var(--muted); }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; } @keyframes shimmer { to { background-position: -200% 0; } }
.proposal { border: 1px dashed var(--accent); background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; } .proposal .ph { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; } .proposal.decided { border-style: solid; opacity: .8; }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; } .stat-row { display: flex; gap: 22px; flex-wrap: wrap; } .stat-row .stat b { display: block; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; } .stat-row .stat span { font-size: 11.5px; color: var(--muted); }
.logo-ship { width: 42px; height: 42px; }
@media print { .side, .topbar, .drawer, .toast-wrap, .prov, .btn { display: none !important; } .shell { grid-template-columns: 1fr; } main.content { padding: 0; } }
@media (max-width: 980px) { .shell { grid-template-columns: 1fr; } .side { position: fixed; inset-inline-start: 0; z-index: 50; transform: translateX(-100%); transition: transform .25s; } [dir="rtl"] .side { transform: translateX(100%); } .side.open { transform: none; } main.content { padding: 0 16px 48px; } .topbar { margin: 0 -16px 16px; padding: 0 16px; } .menu-btn { display: grid !important; } }
.menu-btn { display: none; }

/* help overlay */
.help-overlay { position: fixed; inset: 0; z-index: 120; background: rgba(6, 13, 24, .55); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.help-overlay[hidden] { display: none; } .help-card { width: min(920px, 100%); max-height: 90vh; overflow: auto; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.help-card .d-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); } .help-card .d-head b { flex: 1; font-size: 15px; }
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; padding: 18px; } .help-grid h4 { margin: 0 0 8px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
kbd { font: 600 11px/1 var(--mono, ui-monospace, monospace); background: var(--line); border-radius: 6px; padding: 4px 7px; border: 1px solid rgba(0,0,0,.08); min-width: 26px; text-align: center; }

.help-card, .help-card .list li, .help-card .list li .grow, .help-card p, .help-card .d-head b { color: var(--text); }
.help-card .list li { background: transparent; border-color: var(--line); } .help-card .list li .grow { font-size: 13px; }
