 :root {
  --bg: #0a1628;
  --bg-deep: #07101e;
  --panel: rgba(14, 31, 55, 0.92);
  --panel-strong: rgba(18, 40, 70, 0.98);
  --text: #f6f8fb;
  --muted: #c7cfda;
  --silver: #d8dee8;
  --line: rgba(216, 222, 232, 0.18);
  --accent: #9fb7d8;
  --accent-bright: #dce8f8;
  --danger: #ffb4b4;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(93, 128, 179, 0.26), transparent 32rem),
    radial-gradient(circle at bottom right, rgba(185, 203, 226, 0.14), transparent 30rem),
    linear-gradient(135deg, var(--bg-deep) 0%, var(--bg) 52%, #0c1d34 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.58), transparent 78%);
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-panel {
  width: min(680px, 100%);
  margin: 5vh auto 0;
  padding: 48px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  margin-bottom: 24px;
  border: 1px solid rgba(216, 222, 232, 0.36);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(216, 222, 232, 0.20), rgba(216, 222, 232, 0.04));
  color: var(--accent-bright);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2, p {
  margin-top: 0;
}

h1 {
  max-width: 850px;
  margin-bottom: 18px;
  font-size: clamp(2rem, 5vw, 4.1rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.login-panel h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
}

h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.lede {
  max-width: 760px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.7;
}

.login-form label {
  display: block;
  margin-bottom: 10px;
  color: var(--silver);
  font-size: 0.9rem;
  font-weight: 700;
}

.password-row {
  display: flex;
  gap: 12px;
}

input[type="password"] {
  width: 100%;
  border: 1px solid rgba(216, 222, 232, 0.26);
  border-radius: 16px;
  background: rgba(5, 14, 27, 0.8);
  color: var(--text);
  font: inherit;
  padding: 15px 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="password"]:focus {
  border-color: rgba(220, 232, 248, 0.72);
  box-shadow: 0 0 0 4px rgba(159, 183, 216, 0.18);
}

button, .download-link {
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #eef4fb, #b9c9dc);
  color: #07101e;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 15px 22px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

button:hover, .download-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.secondary-button {
  border: 1px solid rgba(216, 222, 232, 0.26);
  background: rgba(216, 222, 232, 0.08);
  color: var(--text);
}

.error {
  min-height: 1.4em;
  margin: 12px 0 0;
  color: var(--danger);
  font-weight: 700;
}

.fine-print {
  margin: 26px 0 0;
  color: rgba(216, 222, 232, 0.68);
  font-size: 0.84rem;
}

.archive-panel {
  padding: 38px;
}

.archive-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding: 10px 2px 32px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.summary-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(216, 222, 232, 0.06);
  padding: 22px;
}

.summary-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-card strong {
  color: var(--accent-bright);
  font-size: 1.55rem;
}

.table-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel-strong);
}

.table-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

#last-updated {
  color: var(--muted);
  font-size: 0.88rem;
}

.report-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.8fr) 140px 120px 130px;
  align-items: center;
  gap: 18px;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(216, 222, 232, 0.12);
}

.report-row:last-child {
  border-bottom: 0;
}

.report-head {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(5, 14, 27, 0.42);
}

.report-name {
  overflow-wrap: anywhere;
  font-weight: 700;
}

.report-meta {
  color: var(--silver);
}

.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  font-size: 0.9rem;
}

.hidden {
  display: none !important;
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 20px, 1120px);
    padding: 24px 0;
  }

  .login-panel, .archive-panel {
    padding: 28px;
    border-radius: 22px;
  }

  .archive-header {
    flex-direction: column;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .report-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .report-head {
    display: none;
  }

  .password-row {
    flex-direction: column;
  }

  button, .download-link {
    width: 100%;
  }
}
