:root {
  --navy: #092d69;
  --blue: #1268f3;
  --teal: #14b8b1;
  --ink: #102246;
  --muted: #5d6b84;
  --line: #dbe4f0;
  --soft: #f3f7fc;
  --danger: #b42318;
  --danger-bg: #fff1f0;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(145deg, #eef5ff, #ffffff 55%, #eefcfb);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: var(--blue); }
.page-shell { min-height: 100vh; padding: 24px 14px; }
.portal-card {
  width: min(100%, 620px);
  margin: 0 auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 18px 55px rgba(9, 45, 105, .12);
  overflow: hidden;
}
.brand-header { padding: 22px 28px 14px; border-bottom: 1px solid var(--line); text-align: center; }
.brand-logo { display: block; max-width: 420px; width: 88%; height: auto; margin: auto; }
.intro { padding: 24px 28px 8px; text-align: center; }
h1 { color: var(--navy); margin: 0 0 10px; font-size: clamp(1.75rem, 5vw, 2.35rem); }
.intro p, .result-card > p { color: var(--muted); line-height: 1.55; margin: 0; }
.steps { display: flex; align-items: flex-start; justify-content: center; padding: 20px 70px 22px; }
.step { display: grid; justify-items: center; gap: 6px; color: var(--muted); font-size: .9rem; }
.step span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #e9eff8; font-weight: 800; }
.step.active { color: var(--blue); }
.step.active span { background: var(--blue); color: white; }
.step-line { height: 2px; flex: 1; max-width: 230px; background: #d5deeb; margin: 17px 12px 0; }
.alert { margin: 0 28px 18px; padding: 12px 14px; background: var(--danger-bg); border: 1px solid #f5c3bf; border-radius: 10px; color: var(--danger); font-weight: 650; }
.registration-form { margin: 0 28px; padding: 20px; border: 1px solid #cbd8ea; border-radius: 14px; background: #f8fbff; }
label { display: grid; gap: 7px; margin-bottom: 17px; color: var(--navy); font-weight: 650; }
label small { color: var(--muted); font-weight: 500; }
input, select {
  width: 100%; min-height: 48px; padding: 11px 13px;
  border: 1px solid #bdc9d9; border-radius: 9px; background: white;
  color: var(--ink); font: inherit; outline: none;
}
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(18, 104, 243, .12); }
input.locked { background: #edf2f8; color: #53637a; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.location-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; }
.primary-button, .secondary-button {
  display: inline-flex; justify-content: center; align-items: center;
  min-height: 50px; padding: 12px 18px; border: 0; border-radius: 9px;
  font: inherit; font-weight: 800; text-decoration: none; cursor: pointer;
}
.primary-button { width: 100%; color: white; background: linear-gradient(135deg, #0e7afb, #0759e8); }
.secondary-button { color: var(--navy); background: #edf4ff; border: 1px solid #cbdcf6; }
.privacy-note { margin: 20px 28px 0; padding: 15px; border-radius: 10px; text-align: center; background: #edf5ff; color: var(--navy); }
.help-link { margin: 18px 20px 24px; text-align: center; color: var(--muted); }
.result-card { padding-bottom: 28px; text-align: center; }
.result-card h1, .result-card > p, .result-card > .secondary-button { margin-left: 28px; margin-right: 28px; }
.result-card > p { margin-bottom: 18px; }
.success-icon, .error-icon { display: grid; place-items: center; width: 76px; height: 76px; margin: 28px auto 18px; border-radius: 50%; font-size: 2.5rem; font-weight: 900; }
.success-icon { background: #e8fbf5; color: #05865e; }
.error-icon { background: var(--danger-bg); color: var(--danger); }
.muted { font-size: .92rem; }

.admin-shell { width: min(100%, 1480px); margin: auto; }
.admin-header { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 18px; }
.admin-logo { width: 260px; max-width: 70vw; height: auto; }
.admin-header h1 { margin-top: 12px; }
.compact { width: auto; min-height: 42px; padding: 9px 16px; }
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(180px, 260px)); gap: 14px; margin-bottom: 16px; }
.summary-card { display: grid; gap: 4px; padding: 16px 18px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.summary-card strong { color: var(--navy); font-size: 1.8rem; }
.summary-card span { color: var(--muted); }
.summary-card.warning strong { color: #b54708; }
.search-form { display: flex; align-items: center; gap: 10px; padding: 12px; background: white; border: 1px solid var(--line); border-radius: 12px 12px 0 0; }
.search-form input { max-width: 620px; }
.clear-link { padding: 8px; }
.table-wrap { overflow: auto; background: white; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; }
table { width: 100%; min-width: 1150px; border-collapse: collapse; }
th, td { padding: 13px 12px; border-bottom: 1px solid #e6ebf2; text-align: left; vertical-align: top; }
th { position: sticky; top: 0; z-index: 1; color: var(--navy); background: #f2f6fb; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
td { font-size: .9rem; }
td small { display: block; margin-top: 4px; color: var(--muted); }
.connection-badge { display: inline-block; padding: 3px 7px; border-radius: 999px; background: #e9f3ff; color: #0759b9; font-size: .72rem; font-weight: 800; }
.empty-state { padding: 40px; color: var(--muted); text-align: center; }
.admin-note { color: var(--muted); font-size: .84rem; }

@media (max-width: 620px) {
  .page-shell { padding: 0; background: white; }
  .portal-card { min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
  .brand-header { padding: 17px 20px 11px; }
  .intro { padding: 20px 20px 4px; }
  .steps { padding: 18px 35px; }
  .registration-form { margin: 0 14px; padding: 16px; }
  .alert { margin: 0 14px 16px; }
  .two-columns { grid-template-columns: 1fr; gap: 0; }
  .location-grid { grid-template-columns: 1fr 1fr; }
  .location-grid label:first-child { grid-column: 1 / -1; }
  .privacy-note { margin: 18px 14px 0; }
  .admin-shell { padding: 14px; }
  .admin-header { align-items: start; flex-direction: column; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .search-form { flex-wrap: wrap; }
}

