:root {
  --navy-950: #061330;
  --navy-900: #0a1c42;
  --navy-800: #0d2250;
  --blue-600: #1f5fd6;
  --blue-500: #2f7bff;
  --gold: #c9a24b;
  --gold-soft: #e8d5a3;
  --ink: #0f1b33;
  --muted: #55627c;
  --line: #dfe5ef;
  --bg-alt: #f4f7fc;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(10, 28, 66, .06), 0 2px 8px rgba(10, 28, 66, .05);
  --shadow-md: 0 8px 28px rgba(10, 28, 66, .1);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg-alt);
  line-height: 1.65;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg-alt); }
button, input, select { font: inherit; }
button, input, select { outline: none; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.shell { width: min(1160px, calc(100% - 2rem)); margin: 0 auto; padding: 32px 0 64px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.login-card { width: min(460px, 100%); margin: 7vh auto 0; padding: 40px; box-shadow: var(--shadow-md); }
.brand { display: inline-flex; align-items: center; gap: .72rem; color: var(--navy-900); font-weight: 800; letter-spacing: .06em; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 10px; color: var(--navy-950); background: var(--gold); font-size: .78rem; font-weight: 900; box-shadow: 0 3px 8px rgba(6, 19, 48, .14); }
.eyebrow { margin: 28px 0 .7rem; color: var(--gold); font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; color: var(--navy-900); font-size: clamp(2rem, 5vw, 3rem); line-height: 1.2; letter-spacing: -.02em; }
.muted { margin: .8rem 0 1.6rem; color: var(--muted); }
form { display: grid; gap: .55rem; }
label { display: grid; gap: .35rem; color: var(--ink); font-size: .92rem; font-weight: 600; }
input, select { width: 100%; padding: .78rem .9rem; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; }
input:focus, select:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(31, 95, 214, .14); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .78rem 1.35rem; border: 2px solid transparent; border-radius: 10px; cursor: pointer; font-weight: 700; transition: transform .15s, background-color .2s, color .2s, opacity .2s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .6; }
.primary { color: #fff; background: var(--blue-600); }
.primary:hover { color: #fff; background: var(--navy-800); }
.secondary { color: var(--navy-900); background: #fff; border-color: var(--line); }
.secondary:hover { color: var(--navy-950); background: var(--gold-soft); border-color: var(--gold-soft); }
.login-card .button { width: 100%; margin-top: .8rem; }
.message { min-height: 24px; margin: .65rem 0 0; color: var(--blue-600); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 4px 0 2.5rem; }
.topbar-actions { display: flex; align-items: center; gap: 1rem; color: var(--muted); font-weight: 700; }
.heading-row { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.8rem; }
.heading-row .eyebrow { margin-top: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-bottom: 1.2rem; overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); background: var(--navy-800); box-shadow: var(--shadow-md); }
.stats article { padding: 1.25rem 1.4rem; color: #fff; background: linear-gradient(145deg, var(--navy-900), var(--navy-800)); }
.stats span { display: block; color: rgba(255,255,255,.68); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
.stats strong { display: block; margin-top: .25rem; color: #fff; font-size: 2rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; align-items: end; gap: 1rem; padding: 1rem; margin-bottom: .6rem; }
.toolbar label { min-width: 190px; }
.toolbar .search-label { flex: 1; }
.table-card { overflow: hidden; }
.table-wrap { overflow: auto; }
table { width: 100%; min-width: 780px; border-collapse: collapse; }
th, td { padding: .85rem .95rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: .84rem; }
th { color: var(--muted); background: var(--bg-alt); font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
tbody tr:hover { background: #fbfcff; }
td select { min-width: 150px; padding: .45rem .55rem; }

@media (max-width: 760px) {
  .shell { width: min(100% - 1.25rem, 560px); padding-top: 18px; }
  .login-card { padding: 28px 22px; }
  .topbar { align-items: flex-start; }
  .topbar-actions { flex-direction: column; align-items: flex-end; gap: .4rem; }
  .heading-row { align-items: flex-start; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar label { min-width: 0; }
  .toolbar .button { width: 100%; }
}
