:root {
  --ink: #162033;
  --paper: #f5f7fa;
  --panel: #fff;
  --muted: #627084;
  --line: #d8dee8;
  --brand: #123a63;
  --brand-strong: #0d2d50;
  --success: #0f766e;
  --error: #b42318;
  --info: #1d4ed8;
  --shadow: 0 12px 30px rgb(15 23 42 / 8%);
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; }
.shell { max-width: 1180px; margin: auto; padding: 18px 20px 52px; }
.shell.wide { max-width: 1400px; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.brand img { display: block; width: min(250px, 34vw); max-height: 48px; object-fit: contain; }
nav { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 5px; }
nav a { padding: 8px 9px; border-radius: 8px; color: var(--brand); font-size: .88rem; font-weight: 700; text-decoration: none; }
nav a:hover { background: #eef2f7; }
.nav-form { display: inline; }
.nav-button {
  min-height: auto;
  padding: 8px 9px;
  color: var(--brand);
  background: transparent;
  font-size: .88rem;
}
.nav-button:hover { color: white; }
.hero { padding: 52px 4px 22px; }
.hero h1, .panel h1 { margin: 0 0 10px; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; }
.hero p, .panel p, .card p { line-height: 1.55; }
.eyebrow { color: var(--brand); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 22px; }
.report-grid { align-items: start; }
.card, .panel {
  position: relative;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.card { overflow: hidden; }
.card::before, .panel.accented::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--accent, var(--brand)); }
.card h2 { margin-top: 0; }
.panel { margin-top: 22px; }
form { display: grid; gap: 17px; }
label { display: grid; gap: 6px; font-weight: 750; }
.choice { display: inline-flex; grid-auto-flow: column; align-items: center; justify-content: start; gap: 8px; font-weight: 650; }
input[type="text"], input[type="password"], input[type="file"] {
  width: 100%; padding: 11px 13px; border: 1px solid #c7d0dc; border-radius: 10px; background: white; font: inherit;
}
input:focus { outline: 3px solid rgb(29 78 216 / 16%); border-color: #7da2ef; }
fieldset { display: flex; flex-wrap: wrap; gap: 16px; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
legend { padding: 0 7px; font-weight: 800; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 10px 14px;
  border: 0; border-radius: 10px; color: white; background: var(--brand); font: inherit; font-weight: 750; text-decoration: none; cursor: pointer;
}
button:hover, .button:hover { background: var(--brand-strong); }
.button.secondary { color: var(--brand); background: white; border: 1px solid var(--line); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.help { color: var(--muted); font-size: .92rem; }
.status { margin: 18px 0; padding: 15px 17px; border-left: 5px solid var(--info); border-radius: 10px; background: #eff6ff; }
.status.error { border-color: var(--error); background: #fff0ed; }
.status.success { border-color: var(--success); background: #e6f5f1; }
.state-row { margin: 14px 0; }
.pill { display: inline-flex; padding: 6px 11px; border-radius: 999px; color: var(--info); background: #eff6ff; font-size: .84rem; font-weight: 800; }
.pill.completed { color: var(--success); background: #e6f5f1; }
.pill.failed, .pill.expired { color: var(--error); background: #fff0ed; }
.progress { height: 12px; overflow: hidden; border-radius: 999px; background: #dde5ef; }
.progress > div { width: 0; height: 100%; background: linear-gradient(90deg, #1d4ed8, #0f766e); transition: width .2s ease; }
pre { max-height: 360px; margin: 14px 0; padding: 14px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; white-space: pre-wrap; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { padding: 12px 14px; border-bottom: 1px solid #e6ebf2; text-align: left; vertical-align: top; }
th { color: var(--muted); background: #f3f6fa; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.stats div { display: grid; gap: 6px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; }
.stats strong { font-size: 2.3rem; }
.stats span { color: var(--muted); font-size: .8rem; font-weight: 800; text-transform: uppercase; }
.login-shell { max-width: 480px; margin: 12vh auto; padding: 20px; }
.jumbotron-page { scroll-behavior: auto; }
.jumbotron-page .panel { box-shadow: none; }
.jumbotron-page th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.jumbotron-page th, .jumbotron-page td {
  padding: 15px 17px;
  font-size: 1rem;
}
@media (max-width: 800px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  nav { justify-content: flex-start; }
  .stats { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .shell { padding: 12px; }
  .site-header, .card, .panel { padding: 18px; }
  .brand img { width: min(230px, 75vw); }
  nav, nav a, button, .button { width: 100%; }
}
