:root {
  --navy: #0b3a7a;
  --navy-deep: #072a5a;
  --navy-soft: #e8f0fb;
  --gold: #f5c518;
  --gold-soft: #ffe9a3;
  --sky: #3d7bd4;
  --ink: #1c2b3a;
  --muted: #5b6b7c;
  --line: #d7e2f0;
  --paper: #f5f8fd;
  --white: #ffffff;
  --ok: #0f8a5f;
  --danger: #c0392b;
  --shadow: 0 18px 50px rgba(11, 58, 122, 0.12);
  --radius: 22px;
}

* { box-sizing: border-box; }

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

body {
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #fff4c4 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, #d7e8ff 0%, transparent 50%),
    var(--paper);
}

a { color: var(--navy); }

.topbar {
  background: linear-gradient(90deg, var(--gold), #ffe27a 55%, var(--gold));
  height: 8px;
}

.site-header {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: white;
  padding: 22px 0 28px;
}

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

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-left, .brand-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.crest-logo {
  height: 96px;
  width: auto;
  background: transparent;
  padding: 0;
  flex-shrink: 0;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

.brand h1 {
  margin: 0;
  font-size: clamp(16px, 2.2vw, 22px);
  letter-spacing: 0.4px;
}

.brand p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #d7e6ff;
}

.iso {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
}

.hero {
  margin-top: -28px;
  margin-bottom: 28px;
}

.hero-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff6d3;
  color: #8a6500;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.3px;
  padding: 6px 12px;
  border-radius: 999px;
}

.hero h2 {
  margin: 12px 0 8px;
  font-size: clamp(24px, 3.4vw, 36px);
  line-height: 1.15;
  color: var(--navy);
}

.hero .lead {
  margin: 0;
  color: var(--muted);
  max-width: 78ch;
  line-height: 1.65;
}

.meta-line {
  margin: 16px 0 0;
  background: var(--navy-soft);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.meta-line strong {
  color: var(--navy);
  font-weight: 800;
}

.layout {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 22px;
  padding-bottom: 48px;
}

.panel {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.panel h3 {
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 20px;
}

.panel .hint {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  margin-bottom: 16px;
}

.field.full { grid-column: 1 / -1; }

label, .label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--navy-deep);
}

.req { color: #d35400; }

select.field-input,
.field-input,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"] {
  width: 100%;
  border: 1px solid var(--line);
  background: #fbfdff;
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.field-input:focus,
input:focus {
  border-color: var(--sky);
  background: white;
  box-shadow: 0 0 0 4px rgba(61, 123, 212, 0.15);
}

.errorlist {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  color: var(--danger);
  font-size: 12px;
}

.choice-grid {
  display: grid;
  gap: 10px;
}

.choice-grid.two { grid-template-columns: 1fr 1fr; }
.choice-grid.three { grid-template-columns: 1fr 1fr 1fr; }

.choice-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  cursor: pointer;
  background: #fbfdff;
  transition: 0.18s ease;
  min-height: 54px;
}

.choice-card:hover {
  border-color: #b9cce8;
  background: white;
}

.choice-card input {
  margin-top: 3px;
  accent-color: var(--navy);
}

.choice-card span {
  font-size: 13px;
  line-height: 1.4;
}

.choice-card:has(input:checked) {
  border-color: var(--navy);
  background: linear-gradient(180deg, #fffdf4, #eef5ff);
  box-shadow: 0 8px 18px rgba(11, 58, 122, 0.08);
}

.declaration {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fff9e6;
  border: 1px solid #f3dd86;
  border-radius: 16px;
  padding: 16px;
}

.declaration input { margin-top: 4px; accent-color: var(--navy); }

.declaration span {
  font-size: 13px;
  line-height: 1.55;
}

.actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 13px 22px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(180deg, #1a5fb4, var(--navy));
  color: white;
  box-shadow: 0 12px 24px rgba(11, 58, 122, 0.24);
}

.btn-primary:hover { filter: brightness(1.05); }

.btn-gold {
  background: linear-gradient(180deg, #ffe27a, var(--gold));
  color: var(--navy-deep);
}

.btn-ghost {
  background: white;
  color: var(--navy);
  border: 1px solid var(--line);
}

.side-card {
  background: linear-gradient(180deg, var(--navy) 0%, #123f80 100%);
  color: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.side-card h3 { margin: 0 0 10px; }
.side-card p { color: #d7e6ff; line-height: 1.6; font-size: 14px; }

.side-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}

.side-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: 6px;
  flex-shrink: 0;
}

.site-footer {
  background: var(--navy-deep);
  color: #d7e6ff;
  padding: 22px 0;
  font-size: 13px;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer a { color: #ffe27a; text-decoration: none; }

.success-box {
  text-align: center;
  padding: 48px 24px;
}

.badge-ok {
  width: 74px;
  height: 74px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e8f8f0;
  color: var(--ok);
  font-size: 32px;
}

.receipt {
  margin-top: 24px;
  text-align: left;
  background: #f7faff;
  border-radius: 16px;
  padding: 18px;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}

.staff-body { background: #eef3fa; }

.staff-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, var(--navy-deep), var(--navy));
  color: white;
  padding: 24px 18px;
}

.sidebar h2 { margin: 0 0 4px; font-size: 18px; }
.sidebar p { margin: 0 0 24px; color: #c9dbf5; font-size: 12px; }

.side-nav a {
  display: block;
  color: white;
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 12px;
  margin-bottom: 6px;
  font-size: 14px;
}

.side-nav a.active,
.side-nav a:hover { background: rgba(255, 255, 255, 0.12); }

.staff-main { padding: 28px; }

.staff-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.stat {
  background: white;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(11, 58, 122, 0.06);
}

.stat span { color: var(--muted); font-size: 12px; }
.stat strong { display: block; font-size: 28px; color: var(--navy); margin-top: 4px; }

.toolbar {
  background: white;
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
}

.toolbar .field { margin: 0; min-width: 180px; flex: 1; }
.toolbar select,
.toolbar input { width: 100%; }

.table-wrap {
  background: white;
  border-radius: 18px;
  overflow: auto;
  box-shadow: 0 10px 24px rgba(11, 58, 122, 0.06);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}

table.data th {
  text-align: left;
  background: #f4f8ff;
  color: var(--navy);
  font-size: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

table.data td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f8;
  font-size: 13px;
}

table.data tr:hover td { background: #fbfdff; }

.pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.pill-first { background: #e8f0fb; color: var(--navy); }
.pill-second { background: #fff6d3; color: #8a6500; }

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(440px, 100%);
  background: white;
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 32px;
}

.login-card h1 {
  margin: 8px 0 6px;
  color: var(--navy);
  font-size: 26px;
}

.empty {
  padding: 40px;
  text-align: center;
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}

.detail-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.detail-item strong { font-size: 16px; }

.print-header { display: none; }

@media (max-width: 960px) {
  .layout, .staff-shell, .stats, .grid-2, .choice-grid.three, .detail-grid {
    grid-template-columns: 1fr;
  }
  .brand { flex-direction: column; align-items: flex-start; }
  .choice-grid.two { grid-template-columns: 1fr; }
}

@media print {
  .sidebar, .toolbar, .btn, .staff-top a, .no-print { display: none !important; }
  .staff-shell { display: block; }
  .staff-main { padding: 0; }
  .print-header { display: block; margin-bottom: 16px; }
  body { background: white; }
}
