:root {
  --navy: #0e2a4a;
  --navy-dark: #0a1f38;
  --gold: #c9a227;
  --gold-light: #e9d9a6;
  --ink: #24303f;
  --muted: #5c6b7a;
  --border: #e3dccb;
  --danger: #b3261e;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[hidden] { display: none !important; }

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans); color: var(--ink); line-height: 1.65;
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, var(--navy-dark) 0%, var(--navy) 60%, var(--navy) 100%);
  padding: 32px 20px;
}

.auth-card {
  background: #fff; border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  width: 100%; max-width: 440px; padding: 40px 36px;
}

.auth-brand { text-align: center; margin-bottom: 26px; }
.auth-brand .seal { width: 64px; height: 64px; margin: 0 auto 12px; }
.auth-brand h1 { font-family: var(--font-serif); color: var(--navy); font-size: 24px; line-height: 1.25; }
.auth-brand p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }

.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-field label { font-weight: 700; font-size: 13.5px; color: var(--navy); }
.form-field input {
  padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 15px; font-family: inherit; width: 100%;
}
.form-field input:focus { outline: none; border-color: var(--gold); }
.form-error { color: var(--danger); font-size: 12.5px; font-weight: 600; }
.form-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 18px; }

.btn { width: 100%; padding: 13px; border: 0; border-radius: 8px; background: var(--navy); color: #fff; font-weight: 700; font-size: 15.5px; cursor: pointer; font-family: inherit; transition: background 0.15s, transform 0.12s; }
.btn:hover { background: var(--navy); opacity: 0.92; transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--navy-dark); }
.btn-gold:hover { background: #dcb53e; }

.auth-alt { text-align: center; margin-top: 20px; font-size: 14px; color: var(--muted); }
.auth-alt a { color: var(--navy); font-weight: 700; }

.alert { padding: 13px 16px; border-radius: 8px; font-size: 13.5px; font-weight: 600; margin-bottom: 18px; }
.alert-error { background: #fdecea; border: 1px solid #f5c2bd; color: var(--danger); }
.alert-success { background: #e6f4ea; border: 1px solid #b7dfc4; color: #1e7a3c; }

.auth-note { margin-top: 18px; background: var(--cream); border: 1px dashed var(--border); border-radius: 8px; padding: 12px 14px; font-size: 13px; color: var(--muted); }

.auth-card-wide { max-width: 560px; }
.role-picker { display: flex; flex-direction: row; gap: 10px; flex-wrap: wrap; }
.role-option { flex: 1 1 200px; }
.role-option {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: 10px; cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.role-option:has(input:checked) { border-color: var(--gold); background: var(--cream); }
.role-option input { margin-top: 3px; accent-color: var(--gold); width: auto; }
.role-option-body { display: flex; flex-direction: column; gap: 2px; }
.role-option-body strong { font-size: 14px; color: var(--navy); }
.role-option-body small { font-size: 12.5px; color: var(--muted); }

.status-card { text-align: center; }
.status-icon { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 800; color: #fff; }
.status-icon.pending { background: var(--gold); }
.status-icon.rejected { background: var(--danger); }

@media (max-width: 480px) {
  body { padding: 20px 14px; }
  .auth-card { padding: 28px 22px; }
  .auth-brand h1 { font-size: 21px; }
}
