/* =========================================================
   DOCTOR AI - AUTH & ADMIN SHARED STYLES
   Dùng chung design tokens với styles.css (navy #0F284E / gold #B88544)
   ========================================================= */

:root {
  --primary-navy: #0F284E;
  --primary-navy-dark: #091A33;
  --primary-navy-light: #1A3E72;
  --accent-blue: #0284C7;
  --accent-cyan: #0EA5E9;
  --accent-cyan-light: #E0F2FE;

  --gold-accent: #B88544;
  --badge-gold-start: #B88544;
  --badge-gold-end: #8A5826;

  --status-green: #10B981;
  --status-green-light: #D1FAE5;
  --danger-red: #DC2626;
  --danger-red-light: #FEE2E2;
  --warning-amber: #D97706;
  --warning-amber-light: #FEF3C7;

  --bg-page: #EDF2F7;
  --bg-card: #FFFFFF;
  --bg-subtle: #F1F5F9;
  --border-light: #E2E8F0;
  --border-subtle: #CBD5E1;

  --text-main: #0F284E;
  --text-body: #334155;
  --text-muted: #475569;
  --text-subtle: #94A3B8;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --radius-pill: 9999px;

  --shadow-sm: 0 1px 3px rgba(15, 40, 78, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 40, 78, 0.06);
  --shadow-lg: 0 12px 32px rgba(15, 40, 78, 0.09);
  --shadow-float: 0 20px 40px rgba(15, 40, 78, 0.12);

  --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  color: var(--text-body);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* ================= FORM PRIMITIVES ================= */

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.field input,
.field select {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--text-main);
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.field input:focus,
.field select:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.field .hint {
  display: block;
  font-size: 12px;
  color: var(--text-subtle);
  margin-top: 5px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: var(--font-heading);
  font-size: 14.5px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.14s, box-shadow 0.14s, background 0.14s;
  white-space: nowrap;
}

.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn:not(:disabled):active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary-navy-light), var(--primary-navy));
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-primary:not(:disabled):hover { box-shadow: var(--shadow-lg); }

.btn-gold {
  background: linear-gradient(135deg, var(--badge-gold-start), var(--badge-gold-end));
  color: #fff;
}

.btn-ghost {
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1.5px solid var(--border-light);
}
.btn-ghost:not(:disabled):hover { background: #E8EEF5; }

.btn-danger { background: var(--danger-red); color: #fff; }

.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }

/* ================= ALERTS ================= */

.alert {
  display: none;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 16px;
}
.alert.show { display: block; }
.alert-error { background: var(--danger-red-light); color: #991B1B; }
.alert-success { background: var(--status-green-light); color: #065F46; }
.alert-warning { background: var(--warning-amber-light); color: #92400E; }

.hidden { display: none !important; }

/* ================= LOGIN PAGE ================= */

.auth-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-hero {
  position: relative;
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background: var(--primary-navy);
}

.auth-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('assets/apollo-hero.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.5;
}

.auth-hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, rgba(9, 26, 51, 0.9) 0%, rgba(15, 40, 78, 0.72) 55%, rgba(26, 62, 114, 0.6) 100%);
}

.auth-hero-content { position: relative; z-index: 2; color: #fff; max-width: 460px; }

.auth-eyebrow {
  font-family: var(--font-heading);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.auth-title {
  font-family: var(--font-heading);
  font-size: 52px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
  margin: 10px 0 18px;
}

.auth-brand-sub {
  font-family: var(--font-heading);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--gold-accent);
  margin: -8px 0 18px;
}

.auth-divider {
  width: 72px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--badge-gold-start), var(--badge-gold-end));
  margin-bottom: 22px;
}

.auth-lead { font-size: 15.5px; line-height: 1.65; color: rgba(255, 255, 255, 0.85); }

.auth-roles { margin-top: 34px; display: flex; flex-direction: column; gap: 14px; }

.auth-role {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.auth-role-chip {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  color: #fff;
}
.chip-admin { background: linear-gradient(135deg, var(--badge-gold-start), var(--badge-gold-end)); }
.chip-client { background: rgba(255, 255, 255, 0.22); }

.auth-role-text strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 14px;
  color: #fff;
  margin-bottom: 3px;
}
.auth-role-text span { font-size: 12.8px; line-height: 1.5; color: rgba(255, 255, 255, 0.76); }

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: var(--bg-page);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  padding: 36px 34px;
}

.auth-card h2 {
  font-family: var(--font-heading);
  font-size: 25px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 7px;
}

.auth-card .sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 24px;
}

.setup-banner {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  background: var(--warning-amber-light);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  margin-bottom: 22px;
}
.setup-banner strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 13.5px;
  color: #92400E;
  margin-bottom: 3px;
}
.setup-banner span { font-size: 12.8px; color: #92400E; line-height: 1.5; }

.auth-foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
  font-size: 12.4px;
  color: var(--text-subtle);
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 940px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-hero { padding: 40px 28px; min-height: auto; }
  .auth-title { font-size: 38px; }
  .auth-roles { display: none; }
  .auth-panel { padding: 32px 20px; }
}

@media (max-width: 600px) {
  .auth-hero { padding: 26px 20px; }
  .auth-title { font-size: 32px; margin: 8px 0 14px; }
  .auth-brand-sub { font-size: 11px; letter-spacing: 2px; margin-bottom: 14px; }
  .auth-divider { margin-bottom: 14px; }
  .auth-lead { font-size: 14px; }
  .auth-panel { padding: 18px 12px calc(18px + env(safe-area-inset-bottom)); }
  .auth-card { padding: 24px 18px; border-radius: 14px; }
  .auth-card h2 { font-size: 22px; }
  .field input, .field select { font-size: 16px; }
}

@media (max-width: 380px) {
  .auth-hero { padding: 20px 16px; }
  .auth-title { font-size: 28px; }
  .auth-lead { font-size: 13px; }
  .auth-card { padding: 20px 14px; }
}
