:root {
  --blue-950: #002b52;
  --blue-900: #003d73;
  --blue-800: #005095;
  --blue-700: #006bb6;
  --blue-500: #00a5df;
  --blue-100: #dff4fb;
  --ink: #13253a;
  --muted: #657386;
  --line: #dce5ec;
  --surface: #ffffff;
  --background: #f4f8fb;
  --success: #087f5b;
  --danger: #c92a2a;
  --shadow: 0 28px 70px rgba(0, 43, 82, 0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--background);
  font-family: "Manrope", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 0.93fr) minmax(520px, 1.07fr);
}

.brand-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(34px, 5vw, 72px);
  color: white;
  background:
    radial-gradient(circle at 15% 78%, rgba(0, 184, 229, 0.32), transparent 23%),
    radial-gradient(circle at 86% 18%, rgba(0, 165, 223, 0.20), transparent 28%),
    linear-gradient(145deg, var(--blue-900), var(--blue-950));
}

.brand-panel::before,
.brand-panel::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}
.brand-panel::before { width: 420px; height: 420px; right: -260px; top: 22%; }
.brand-panel::after { width: 240px; height: 240px; left: -150px; bottom: -80px; }

.brand-lockup { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.brand-lockup > span:last-child { display: flex; flex-direction: column; line-height: 1; }
.brand-lockup strong { font-size: 30px; letter-spacing: -1.5px; }
.brand-lockup small { margin-top: 6px; font-size: 8px; font-weight: 800; letter-spacing: 2px; }
.brand-lockup--dark { color: var(--blue-900); margin-bottom: 44px; }

.brand-mark { display: grid; grid-template-columns: repeat(3, 8px); gap: 3px; transform: rotate(45deg); }
.brand-mark i { display: block; width: 8px; height: 8px; border-radius: 2px; background: var(--blue-500); }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(4), .brand-mark i:nth-child(9) { background: #89d329; }
.brand-mark i:nth-child(3), .brand-mark i:nth-child(7) { background: #ff9f1c; }
.brand-mark i:nth-child(6) { background: #ef476f; }

.hero-copy { position: relative; z-index: 1; max-width: 560px; margin: 80px 0; }
.eyebrow, .step-label { display: inline-block; color: var(--blue-500); font-size: 12px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; }
.hero-copy h1 { margin: 18px 0 20px; max-width: 540px; font-size: clamp(40px, 5vw, 68px); line-height: 1.04; letter-spacing: -3px; }
.hero-copy p { max-width: 490px; margin: 0; color: rgba(255, 255, 255, 0.72); font-size: 17px; line-height: 1.7; }
.trust-row { position: relative; z-index: 1; display: flex; gap: 12px; align-items: center; color: rgba(255,255,255,.68); font-size: 13px; }
.trust-icon { display: grid; place-items: center; width: 28px; height: 28px; color: white; background: rgba(255,255,255,.12); border-radius: 50%; }

.form-panel { display: grid; place-items: center; padding: clamp(24px, 6vw, 92px); background: linear-gradient(150deg, #fff 0%, #f2f8fc 100%); }
.form-card { width: min(100%, 520px); }
.form-card h2, .login-card h1, .admin-header h1 { margin: 14px 0 10px; color: var(--blue-950); font-size: clamp(28px, 3vw, 38px); line-height: 1.18; letter-spacing: -1.3px; }
.form-intro, .login-card > p, .admin-header p { margin: 0 0 34px; color: var(--muted); line-height: 1.65; }
label { display: block; margin: 20px 0 8px; color: #334458; font-size: 13px; font-weight: 700; }

.input-wrap { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 17px; background: white; border: 1px solid var(--line); border-radius: 12px; transition: .2s ease; }
.input-wrap:focus-within { border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(0,165,223,.12); }
.input-wrap > span { width: 21px; color: var(--blue-700); font-weight: 800; text-align: center; }
.input-wrap input { width: 100%; height: 100%; padding: 0; color: var(--ink); background: transparent; border: 0; outline: 0; }
input::placeholder { color: #9aa7b4; }

button, .button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 0 20px;
  color: white;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-900));
  border: 0;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 80, 149, .2);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
form > button { width: 100%; margin-top: 28px; }
button:hover, .button-secondary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(0, 80, 149, .28); }
button:disabled { cursor: wait; opacity: .65; transform: none; }
.privacy-note { margin: 24px 0 0; color: #8491a0; font-size: 11px; text-align: center; }
.privacy-note span { margin-right: 6px; color: var(--blue-700); }
.message { min-height: 22px; margin-top: 14px; font-size: 13px; font-weight: 700; text-align: center; }
.message--success { color: var(--success); }
.message--error { color: var(--danger); }

.admin-body { background: linear-gradient(145deg, #f0f7fb, #fff); }
.admin-shell { width: min(1180px, calc(100% - 32px)); min-height: 100vh; margin: 0 auto; padding: 48px 0; }
.login-card { width: min(100%, 460px); margin: 5vh auto; padding: clamp(28px, 5vw, 48px); background: white; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.login-card input, .table-toolbar input { width: 100%; height: 52px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; outline: none; }
.login-card input:focus, .table-toolbar input:focus { border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(0,165,223,.12); }
.dashboard { width: 100%; }
.admin-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.admin-header p { margin-bottom: 0; }
.admin-actions { display: flex; gap: 10px; flex-shrink: 0; }
.button-ghost { min-height: 48px; color: var(--blue-900); background: white; border: 1px solid var(--line); box-shadow: none; }
.summary-card { display: inline-flex; flex-direction: column; min-width: 230px; margin-bottom: 22px; padding: 22px; color: white; background: linear-gradient(135deg, var(--blue-700), var(--blue-950)); border-radius: 16px; box-shadow: var(--shadow); }
.summary-card span, .summary-card small { color: rgba(255,255,255,.72); }
.summary-card strong { margin: 8px 0 3px; font-size: 38px; }
.table-card { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.table-toolbar { display: flex; gap: 12px; padding: 18px; border-bottom: 1px solid var(--line); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 16px 20px; border-bottom: 1px solid #edf1f4; text-align: left; white-space: nowrap; }
th { color: var(--muted); background: #f8fafc; font-size: 11px; letter-spacing: .8px; text-transform: uppercase; }
td { font-size: 14px; }
tbody tr:hover { background: #f8fbfd; }
.empty-state { padding: 54px 20px; color: var(--muted); text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

@media (max-width: 900px) {
  .page-shell { grid-template-columns: 1fr; }
  .brand-panel { min-height: 480px; padding: 34px 28px; }
  .hero-copy { margin: 68px 0 46px; }
  .hero-copy h1 { font-size: clamp(38px, 11vw, 56px); }
  .form-panel { padding: 60px 24px 72px; }
  .admin-header { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
  .brand-panel { min-height: 430px; }
  .hero-copy { margin: 52px 0 34px; }
  .hero-copy h1 { letter-spacing: -2px; }
  .form-panel { padding: 46px 20px 60px; }
  .admin-shell { width: min(100% - 24px, 1180px); padding: 24px 0; }
  .admin-actions, .table-toolbar { width: 100%; flex-direction: column; }
  .admin-actions > * { width: 100%; }
  .summary-card { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
