﻿:root {
  --ink: #e7eef7;
  --muted: #9aa9ba;
  --accent: #4aa3ff;
  --accent-2: #2f7cd6;
  --card: #111a28;
  --panel: #0e1623;
  --line: #1c2634;
  --bg: #0b1220;
  --shadow: 0 8px 18px rgba(5, 10, 20, 0.6);
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Source Sans 3", "Gill Sans", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, #0f1826 0%, #0b1220 55%, #0a0f1a 100%);
  min-height: 100vh;
}

#appView {
  display: none;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  padding: 48px 6vw 28px;
  max-width: 1200px;
  margin: 0 auto;
  border-bottom: 1px solid #111a28;
}

.title-block {
  max-width: 680px;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.68rem;
  margin: 0 0 10px;
  color: var(--accent-2);
}

h1 {
  font-family: "IBM Plex Sans Condensed", "Franklin Gothic Medium", "Gill Sans", sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  margin: 0;
  letter-spacing: 0.02em;
}

h2 {
  margin: 0;
  font-size: 1.35rem;
}

h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.subtitle {
  color: var(--muted);
  margin: 12px 0 0;
  max-width: 560px;
  line-height: 1.6;
}

.header-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 6vw 80px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 6vw;
  background: radial-gradient(circle at top, #0f1b2c 0%, #0b1220 55%, #0a0f1a 100%);
}

.login-card {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.form-grid.single {
  grid-template-columns: 1fr;
}

.summary-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.summary-card strong {
  font-size: 1.5rem;
  display: block;
  margin-top: 6px;
}

.label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.section {
  background: transparent;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-body {
  display: grid;
  gap: 18px;
}

.two-col {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.panel {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}

.panel.callout {
  background: var(--panel);
  border-style: solid;
}

.step-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin: 0;
}

input,
select,
button {
  font-family: inherit;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-size: 0.95rem;
  background: #0b1421;
  color: var(--ink);
}

input::placeholder {
  color: #6f7d8a;
}

input:focus,
select:focus {
  outline: 2px solid rgba(91, 158, 235, 0.35);
  border-color: var(--accent);
}

button {
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(74, 163, 255, 0.25);
}

button.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent-2);
  box-shadow: none;
}

button.danger {
  background: #7b1d1d;
}

button.primary {
  background: var(--accent);
}

.file-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.file-label input {
  display: none;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

thead {
  background: #0f1826;
}

th,
td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

tr:hover td {
  background: #111e2f;
}

.grade-row.dragging {
  opacity: 0.55;
}

.grade-row.drop-before td {
  border-top: 2px solid var(--accent);
}

.grade-row.drop-after td {
  border-bottom: 2px solid var(--accent);
}

.drag-cell {
  width: 28px;
}

.drag-handle {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #0b1421;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
  letter-spacing: -0.05em;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.inline {
  display: inline-flex;
  gap: 12px;
  align-items: center;
}

.inline input[type="search"] {
  min-width: 220px;
}

.inline.wrap {
  flex-wrap: wrap;
}

.pill {
  background: #0f2236;
  color: var(--accent-2);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid #1a3048;
}

.muted {
  color: var(--muted);
  margin-top: 0;
}

.muted.small {
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.field-row label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.totals {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 12px;
}

.totals .label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.totals-panel strong {
  font-size: 1.6rem;
}

.archive-detail {
  min-height: 120px;
  padding: 16px;
  border-radius: 10px;
  background: #0f1826;
  font-size: 0.92rem;
  color: var(--muted);
  border: 1px solid var(--line);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid transparent;
}

.badge.ok {
  background: rgba(74, 163, 255, 0.12);
  color: var(--accent);
  border-color: rgba(74, 163, 255, 0.3);
}

.badge.off {
  background: rgba(183, 68, 68, 0.12);
  color: #d06767;
  border-color: rgba(183, 68, 68, 0.3);
}

.site-footer {
  padding: 10px 6vw 40px;
  color: var(--muted);
  max-width: 1200px;
  margin: 0 auto;
}

.print-only {
  display: none;
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .no-print {
    display: none !important;
  }

  .print-only {
    display: block;
  }

  .page {
    padding: 0;
    max-width: none;
  }

  .panel,
  .summary-card {
    box-shadow: none;
    border: 1px solid #ccc;
    background: #fff;
  }

  .badge.ok,
  .badge.off {
    color: #000;
    border-color: #777;
    background: #f3f3f3;
  }

  button {
    display: none !important;
  }

  input,
  select {
    border: none;
    background: transparent;
    color: #000;
    padding: 0;
  }

  #gradesTable th:first-child,
  #gradesTable td:first-child,
  #gradesTable th:last-child,
  #gradesTable td:last-child,
  #agentsTable th:last-child,
  #agentsTable td:last-child,
  #hoursTodoTable th:last-child,
  #hoursTodoTable td:last-child,
  #hoursDoneTable th:last-child,
  #hoursDoneTable td:last-child,
  #archivesTable th:last-child,
  #archivesTable td:last-child {
    display: none;
  }

  .site-footer {
    display: none;
  }
}

@media (max-width: 900px) {
  .site-header {
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }
}
