:root {
  --band: #0e3c61;
  --header: #ffffff;
  --accent: #c8102e;
  --accent-hover: #a50d26;
  --ink: #1a1a1a;
  --muted: #5a6670;
  --line: #d6dce1;
  --bg: #f1f4f6;
  --card: #ffffff;
  --focus: #2b6cb0;
  --error-bg: #fdecef;
  --error-ink: #9b1c2e;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.5;
}

/* Top identity band */
.topband {
  background: var(--band);
  height: 6px;
}

/* Header */
.site-header {
  background: var(--header);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.wordmark .mark {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--band);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.5px;
}
.wordmark .text b { font-size: 18px; font-weight: 700; display: block; }
.wordmark .text span { font-size: 12.5px; color: var(--muted); }

/* Main */
main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 44px 20px;
}

.card {
  background: var(--card);
  width: 100%;
  max-width: 440px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(16, 42, 67, 0.06);
  padding: 32px 34px 36px;
  height: fit-content;
}
.card h1 {
  font-size: 23px;
  margin: 0 0 6px;
  color: var(--band);
}
.card .sub {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 24px;
}

label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}
.field { margin-bottom: 18px; }
input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 11px 12px;
  font-size: 15px;
  border: 1px solid #9aa6b0;
  border-radius: 4px;
  background: #fff;
}
input:focus {
  outline: 3px solid rgba(43, 108, 176, 0.35);
  border-color: var(--focus);
}

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 70px; }
.pw-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--focus);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
}

.btn {
  display: inline-block;
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: 0.6; cursor: default; }

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 14px;
}
.row-between label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 400;
  margin: 0;
}
.row-between a { color: var(--focus); text-decoration: none; }
.row-between a:hover { text-decoration: underline; }

.alert {
  background: var(--error-bg);
  border: 1px solid #f0b9c2;
  border-left: 4px solid var(--accent);
  color: var(--error-ink);
  padding: 11px 13px;
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 20px;
}
.alert[hidden] { display: none; }

/* Footer */
.site-footer {
  background: var(--band);
  color: #cdd8e2;
  font-size: 13px;
  padding: 20px;
  text-align: center;
}

/* Dashboard */
.dash-wrap { max-width: 1100px; margin: 0 auto; padding: 40px 20px; width: 100%; }
.dash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}
.dash-head h1 { margin: 0; font-size: 26px; color: var(--band); }
.badge {
  display: inline-block;
  background: #e4edf4;
  color: var(--band);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px 22px;
}
.tile h3 { margin: 0 0 6px; font-size: 15px; color: var(--muted); font-weight: 600; }
.tile .big { font-size: 28px; font-weight: 700; color: var(--band); }
.btn-ghost {
  background: #fff;
  color: var(--accent);
  border: 1px solid var(--accent);
  width: auto;
  padding: 9px 18px;
}
.btn-ghost:hover { background: var(--error-bg); }

.muted-sm { color: var(--muted); font-size: 13px; }

.badge-ok { background: #e3f3e8; color: #1f7a3d; }

/* Panels */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px 24px;
  margin-bottom: 22px;
}
.section-title {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin: 4px 0 12px;
}

/* Summary row */
.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}
.summary-item h3 { margin: 0 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.summary-item .big { font-size: 26px; font-weight: 700; color: var(--band); line-height: 1.1; }

/* Progress bar */
.progress {
  height: 12px;
  background: #e6ebef;
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #1f7a3d, #2f9b53);
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* Document checklist */
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.doc-row:first-child { border-top: none; }
.doc-name { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 10px; }
.doc-note { color: var(--muted); font-size: 13px; margin-top: 3px; }

.pill {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 8px;
  border-radius: 999px;
}
.pill-ok { background: #e3f3e8; color: #1f7a3d; }
.pill-wait { background: #fdf2d9; color: #8a6116; }

.doc-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.file-input { font-size: 13px; max-width: 190px; }
.file-input::file-selector-button {
  border: 1px solid #9aa6b0;
  background: #fff;
  border-radius: 4px;
  padding: 5px 9px;
  margin-right: 8px;
  cursor: pointer;
}
.btn-mini {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.btn-mini:hover { background: var(--accent-hover); }
.btn-mini-ghost {
  background: #fff;
  color: var(--muted);
  border: 1px solid var(--line);
}
.btn-mini-ghost:hover { background: #f3f5f7; color: var(--ink); }
