:root {
  color-scheme: light;
  --ink: #17243b;
  --muted: #637083;
  --canvas: #f4f6f8;
  --surface: #ffffff;
  --line: #dce2e9;
  --primary: #155eef;
  --primary-dark: #0b46be;
  --primary-soft: #eaf1ff;
  --success: #087a55;
  --success-soft: #e7f6ef;
  --warning: #8b5200;
  --warning-soft: #fff3d6;
  --danger: #b42318;
  --danger-soft: #fff0ee;
  --violet: #6840c6;
  --violet-soft: #f0ebff;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 10px 30px rgba(24, 39, 75, .07);
  --focus: 0 0 0 3px #fff, 0 0 0 6px #155eef;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { max-width: 720px; margin-bottom: 16px; font-size: clamp(2rem, 5vw, 3.7rem); line-height: 1.04; letter-spacing: -.045em; }
h2 { margin-bottom: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.025em; }
h3 { margin-bottom: 16px; font-size: 1.05rem; }
a { color: inherit; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; padding: 10px 14px; color: #fff; background: var(--primary-dark); border-radius: var(--radius-sm); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.topbar { position: sticky; z-index: 20; top: 0; display: flex; align-items: center; min-height: 68px; padding: 0 max(20px, calc((100vw - 1240px) / 2)); background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 760; text-decoration: none; white-space: nowrap; }
.brand__mark { display: grid; width: 34px; height: 34px; place-items: center; color: #fff; background: var(--primary); border-radius: 10px; }
.main-nav { display: flex; gap: 4px; margin-left: 44px; }
.nav-link { padding: 9px 13px; color: var(--muted); border-radius: var(--radius-sm); text-decoration: none; font-weight: 620; }
.nav-link:hover, .nav-link--active { color: var(--primary-dark); background: var(--primary-soft); }
.account-button { margin-left: auto; }
.nav-toggle { display: none; margin-left: auto; }
.page-shell { width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 26px 0 80px; }
.breadcrumbs { display: flex; gap: 9px; margin-bottom: 28px; color: var(--muted); font-size: .875rem; }
.breadcrumbs a:hover { color: var(--primary); }
.hero { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); gap: 56px; align-items: center; min-height: 440px; padding: 58px clamp(24px, 5vw, 72px); color: #fff; background: linear-gradient(128deg, #11284c 0%, #153a71 58%, #155eef 130%); border-radius: var(--radius-lg); box-shadow: 0 20px 60px rgba(16, 42, 83, .18); overflow: hidden; }
.lead { max-width: 700px; color: #d9e7ff; font-size: 1.08rem; }
.eyebrow { display: inline-block; margin-bottom: 10px; color: var(--primary); font-size: .75rem; font-weight: 760; letter-spacing: .1em; text-transform: uppercase; }
.hero .eyebrow { color: #9fc0ff; }
.hero-card { padding: 26px; color: var(--ink); background: rgba(255,255,255,.96); border: 1px solid rgba(255,255,255,.6); border-radius: 18px; box-shadow: var(--shadow); }
.hero-card__top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.metric { display: block; margin: 22px 0 10px; color: #102d5b; font-size: 4.4rem; line-height: 1; letter-spacing: -.06em; }
.metric span { font-size: 1.5rem; }
.progress { height: 8px; margin-bottom: 18px; background: #e5eaf0; border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--success); border-radius: inherit; }
.hero-card p { margin-bottom: 0; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.actions--end { justify-content: flex-end; }
.button, .icon-button, .text-button { border: 0; cursor: pointer; font-weight: 680; }
.button { min-height: 42px; padding: 9px 16px; border-radius: var(--radius-sm); }
.button--primary { color: #fff; background: var(--primary); }
.button--primary:hover { background: var(--primary-dark); }
.button--secondary { color: var(--primary-dark); background: var(--primary-soft); border: 1px solid #b8cdfd; }
.button--ghost { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.hero .button--secondary { color: #fff; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.35); }
.icon-button { display: grid; width: 42px; height: 42px; place-items: center; color: var(--ink); background: transparent; border-radius: var(--radius-sm); font-size: 1.25rem; }
.section { padding-top: 84px; scroll-margin-top: 72px; }
.section-heading, .card__header { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.section-heading { align-items: end; margin-bottom: 24px; }
.component-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card { padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card--wide { grid-column: 1 / -1; }
.card__header p { color: var(--muted); }
.form-stack { display: grid; gap: 17px; }
.field { display: grid; gap: 7px; font-weight: 650; }
.field input, .field select { width: 100%; min-height: 44px; padding: 9px 12px; color: var(--ink); background: #fff; border: 1px solid #aeb8c5; border-radius: var(--radius-sm); }
.field input::placeholder { color: #707c8c; }
.field input:hover, .field select:hover { border-color: #738094; }
.field input:focus-visible, .field select:focus-visible { border-color: var(--primary); }
.fieldset { padding: 0; border: 0; }
.fieldset legend { margin-bottom: 7px; font-weight: 650; }
.check { display: flex; gap: 9px; align-items: center; color: var(--muted); }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.tender-card { padding: 20px; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; }
.tender-card__meta { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; color: var(--muted); font-size: .82rem; }
.tender-card h4 { margin-bottom: 8px; font-size: 1.12rem; }
.tender-card p { color: var(--muted); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0; }
.facts div { padding-left: 12px; border-left: 2px solid #b8cdfd; }
.facts dt { color: var(--muted); font-size: .78rem; }
.facts dd { margin: 2px 0 0; font-weight: 720; }
.badge { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 760; white-space: nowrap; }
.badge--success { color: var(--success); background: var(--success-soft); }
.badge--warning { color: var(--warning); background: var(--warning-soft); }
.badge--info { color: var(--primary-dark); background: var(--primary-soft); }
.badge--neutral { color: #4b596c; background: #e9edf2; }
.text-link, .text-button { color: var(--primary-dark); font-weight: 700; }
.text-link:hover, .text-button:hover { text-decoration-thickness: 2px; }
.text-button { padding: 0; background: transparent; text-decoration: underline; }
.table-wrap { margin-top: 18px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); background: #f7f9fb; font-size: .78rem; letter-spacing: .03em; text-transform: uppercase; }
td strong, td small { display: block; }
td small { margin-top: 3px; color: var(--muted); }
.state-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.state-card { display: flex; gap: 16px; min-height: 150px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid #8d99a8; border-radius: var(--radius); }
.state-card h3 { margin-bottom: 6px; }
.state-card p { margin-bottom: 10px; color: var(--muted); }
.state-card--danger { border-left-color: var(--danger); background: linear-gradient(90deg, var(--danger-soft), #fff 30%); }
.state-card--stale { border-left-color: var(--violet); background: linear-gradient(90deg, var(--violet-soft), #fff 30%); }
.state-card--warning { border-left-color: var(--warning); background: linear-gradient(90deg, var(--warning-soft), #fff 30%); }
.state-card--locked { border-left-color: #526174; }
.state-icon, .spinner { flex: 0 0 34px; width: 34px; height: 34px; }
.state-icon { display: grid; place-items: center; color: var(--ink); background: #e8edf3; border-radius: 50%; font-weight: 800; }
.spinner { border: 3px solid #d6e2fb; border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.rules-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rule { padding: 22px; background: #eaf1ff; border: 1px solid #cbdafa; border-radius: var(--radius); }
.rule strong { color: var(--primary-dark); font-size: 1.05rem; }
.rule p { margin: 8px 0 0; color: #526174; }
.toast { position: fixed; z-index: 30; right: 24px; bottom: 24px; max-width: min(360px, calc(100vw - 32px)); padding: 14px 18px; color: #fff; background: #183458; border-radius: var(--radius-sm); box-shadow: 0 16px 45px rgba(16, 42, 83, .3); }
.modal { width: min(520px, calc(100% - 32px)); padding: 24px; border: 0; border-radius: var(--radius); box-shadow: 0 24px 70px rgba(14, 30, 55, .28); }
.modal::backdrop { background: rgba(15, 27, 48, .55); }
.modal__header { display: flex; justify-content: space-between; align-items: center; }
.modal__header h2 { font-size: 1.4rem; }

@media (max-width: 900px) {
  .topbar { padding-inline: 20px; }
  .nav-toggle { display: grid; }
  .main-nav { position: absolute; top: 68px; right: 20px; left: 20px; display: none; margin: 0; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
  .main-nav--open { display: grid; }
  .account-button { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-card { max-width: 480px; }
  .state-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .page-shell { width: min(100% - 24px, 1240px); padding-top: 18px; }
  .breadcrumbs { margin-bottom: 16px; }
  .hero { gap: 30px; padding: 34px 20px; border-radius: 18px; }
  .hero-card { padding: 20px; }
  .metric { font-size: 3.6rem; }
  .section { padding-top: 58px; }
  .section-heading, .card__header { align-items: stretch; flex-direction: column; gap: 12px; }
  .component-grid, .state-grid, .rules-grid { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .actions .button { flex: 1 1 140px; }
  .card__header .button { width: 100%; }
  .table-wrap { overflow: visible; }
  table, tbody, tr, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  td { display: grid; grid-template-columns: minmax(90px, .7fr) 1.3fr; gap: 12px; padding: 8px 2px; border: 0; }
  td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; font-weight: 650; }
  .state-card { min-height: 0; }
  .toast { right: 16px; bottom: 16px; left: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
