/* ============================================================
   MMC General Hospital — Patient Portal v2
   Theme: Luxury Medical — Deep navy + emerald + gold accents
   Font pairing: Cormorant Garamond (display) + Outfit (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --navy-900:   #050d1a;
  --navy-800:   #091629;
  --navy-700:   #0d2040;
  --navy-600:   #133060;
  --navy-500:   #1a4080;

  --emerald:    #00b89c;
  --emerald-d:  #009980;
  --emerald-l:  #00d4b4;
  --emerald-bg: rgba(0,184,156,.08);

  --gold:       #d4a017;
  --gold-l:     #f0c040;

  --white:      #ffffff;
  --ghost:      #f0f5fa;
  --muted:      #8899aa;
  --border:     rgba(255,255,255,.09);
  --border-lit: rgba(0,184,156,.3);

  --glass:      rgba(255,255,255,.04);
  --glass-hover:rgba(255,255,255,.08);

  --shadow-glow: 0 0 40px rgba(0,184,156,.15);
  --shadow-card: 0 8px 40px rgba(0,0,0,.45);
  --shadow-deep: 0 24px 80px rgba(0,0,0,.6);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --f-head: 'Cormorant Garamond', Georgia, serif;
  --f-body: 'Outfit', system-ui, sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 15px; }

body {
  font-family: var(--f-body);
  background: var(--navy-900);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Pages ─────────────────────────────────────────────────── */
.page { display: none; min-height: 100vh; }
.page.active { display: flex; flex-direction: column; }

/* ── Animated BG Mesh ──────────────────────────────────────── */
.bg-mesh {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  overflow: hidden;
}
.bg-mesh::before {
  content: '';
  position: absolute;
  width: 900px; height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,184,156,.12) 0%, transparent 65%);
  top: -300px; right: -250px;
  animation: meshFloat 18s ease-in-out infinite alternate;
}
.bg-mesh::after {
  content: '';
  position: absolute;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(19,48,96,.35) 0%, transparent 70%);
  bottom: -200px; left: -200px;
  animation: meshFloat 22s ease-in-out infinite alternate-reverse;
}
@keyframes meshFloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 30px) scale(1.08); }
}

/* Subtle grid lines */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ════════════════════════════════════════════════════════════
   LOGIN PAGE
   ════════════════════════════════════════════════════════════ */
#loginPage {
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  min-height: 100vh;
}

.login-wrapper {
  position: relative; z-index: 1;
  display: flex;
  gap: 0;
  width: 100%;
  max-width: 980px;
  min-height: 600px;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-deep);
  border: 1px solid var(--border);
  animation: fadeUp .6s cubic-bezier(.22,.68,0,1.15) both;
}

/* Left panel — branding */
.login-brand {
  width: 42%;
  background: linear-gradient(160deg, var(--navy-700) 0%, var(--navy-600) 60%, #0a2a50 100%);
  padding: 56px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-brand::before {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  border: 1px solid rgba(0,184,156,.18);
  top: -100px; right: -160px;
}
.login-brand::after {
  content: '';
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  border: 1px solid rgba(0,184,156,.1);
  bottom: -80px; left: -80px;
}

.brand-top { position: relative; z-index: 1; }

.brand-logo-ring {
  width: 96px; height: 96px;
  border-radius: 50%;
  border: 2px solid var(--emerald);
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,184,156,.1);
  margin-bottom: 28px;
  position: relative;
}
.brand-logo-ring::after {
  content: '';
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(0,184,156,.25);
}
.brand-logo-ring img {
  width: 72px; height: 72px;
  object-fit: contain; border-radius: 50%;
}
.brand-logo-emoji { font-size: 44px; line-height: 1; }

.brand-hosp-name {
  font-family: var(--f-head);
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 10px;
}
.brand-tagline {
  font-size: 13px;
  color: rgba(255,255,255,.5);
  font-weight: 300;
  letter-spacing: .3px;
}

.brand-divider {
  width: 48px; height: 2px;
  background: linear-gradient(90deg, var(--emerald), transparent);
  margin: 24px 0;
}

.brand-features { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.brand-features li {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: rgba(255,255,255,.65);
}
.feat-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--emerald); flex-shrink: 0;
  box-shadow: 0 0 8px var(--emerald);
}

.brand-bottom {
  position: relative; z-index: 1;
  font-size: 11px; color: rgba(255,255,255,.3);
}

/* Right panel — form */
.login-form-panel {
  flex: 1;
  background: var(--navy-800);
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form-heading {
  font-family: var(--f-head);
  font-size: 38px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 6px;
  line-height: 1.1;
}
.form-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 36px;
  font-weight: 300;
}

/* ── Input Fields ───────────────────────────────────────────── */
.field-wrap { margin-bottom: 22px; }

.field-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600;
  letter-spacing: .8px; text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 8px;
}

.field-inner {
  position: relative;
}
.field-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 16px; pointer-events: none;
  color: var(--muted);
  transition: color .2s;
}
.field-input {
  width: 100%;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px 16px 14px 46px;
  font-family: var(--f-body);
  font-size: 15px;
  color: var(--white);
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.field-input::placeholder { color: rgba(255,255,255,.2); }
.field-input:focus {
  border-color: var(--emerald);
  background: rgba(0,184,156,.06);
  box-shadow: 0 0 0 3px rgba(0,184,156,.12);
}
.field-input:focus ~ .field-icon,
.field-wrap:focus-within .field-icon { color: var(--emerald); }

/* ── Login Button ──────────────────────────────────────────── */
.btn-login {
  width: 100%;
  background: linear-gradient(135deg, var(--emerald) 0%, var(--emerald-d) 100%);
  border: none;
  border-radius: var(--r-sm);
  padding: 15px 24px;
  font-family: var(--f-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .15s, box-shadow .2s;
  box-shadow: 0 4px 24px rgba(0,184,156,.3);
  margin-bottom: 16px;
  letter-spacing: .3px;
}
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 8px 32px rgba(0,184,156,.45); }
.btn-login:active { transform: scale(.98); }
.btn-login:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.btn-admin-link {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 13px 24px;
  font-family: var(--f-body);
  font-size: 14px;
  color: rgba(255,255,255,.5);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: border-color .2s, color .2s, background .2s;
}
.btn-admin-link:hover {
  border-color: var(--gold);
  color: var(--gold-l);
  background: rgba(212,160,23,.05);
}

/* Alert */
.alert {
  border-radius: var(--r-sm);
  padding: 12px 16px;
  font-size: 13.5px;
  margin-bottom: 18px;
  display: none;
  font-weight: 500;
}
.alert.show { display: block; }
.alert-error   { background: rgba(220,53,69,.15); border: 1px solid rgba(220,53,69,.35); color: #ff8a8a; }
.alert-success { background: rgba(0,184,156,.12); border: 1px solid rgba(0,184,156,.3); color: var(--emerald-l); }

/* ════════════════════════════════════════════════════════════
   DASHBOARD PAGE
   ════════════════════════════════════════════════════════════ */
#dashboardPage { background: var(--navy-900); position: relative; }

/* ── Dashboard Header ──────────────────────────────────────── */
.dash-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(9,22,41,.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 36px;
  height: 70px;
  display: flex; align-items: center; justify-content: space-between;
}

.dash-header-left {
  display: flex; align-items: center; gap: 14px;
}
.dash-logo-wrap {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--emerald);
  overflow: hidden; background: var(--emerald-bg);
  display: flex; align-items: center; justify-content: center;
}
.dash-logo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.dash-logo-emoji { font-size: 20px; }

.dash-header-title {
  font-family: var(--f-head);
  font-size: 20px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: .2px;
}
.dash-header-sep {
  width: 1px; height: 20px;
  background: var(--border);
  margin: 0 4px;
}
.dash-header-sub {
  font-size: 12px;
  color: var(--muted);
  font-weight: 300;
}

.dash-header-right {
  display: flex; align-items: center; gap: 12px;
}

.user-badge {
  display: flex; align-items: center; gap: 10px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 40px;
  padding: 6px 16px 6px 6px;
}
.user-avatar-ring {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald) 0%, var(--emerald-d) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.user-badge-name {
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,.85);
  max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.btn-logout {
  background: transparent;
  border: 1px solid rgba(220,53,69,.35);
  color: rgba(220,53,69,.8);
  border-radius: var(--r-sm);
  padding: 8px 18px;
  font-family: var(--f-body);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
  width: auto;
}
.btn-logout:hover {
  background: rgba(220,53,69,.1);
  border-color: rgba(220,53,69,.6);
  color: #ff6b7a;
}

/* ── Dashboard Body ────────────────────────────────────────── */
.dash-body {
  position: relative; z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 28px 80px;
}

/* Welcome strip */
.welcome-strip {
  background: linear-gradient(135deg, rgba(0,184,156,.12) 0%, rgba(19,48,96,.25) 100%);
  border: 1px solid rgba(0,184,156,.2);
  border-radius: var(--r-lg);
  padding: 32px 36px;
  margin-bottom: 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  position: relative; overflow: hidden;
}
.welcome-strip::before {
  content: '';
  position: absolute;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,184,156,.15) 0%, transparent 70%);
  right: 60px; top: -60px;
}
.welcome-strip-text h2 {
  font-family: var(--f-head);
  font-size: 30px; font-weight: 600;
  color: var(--white); margin-bottom: 6px;
}
.welcome-strip-text p { font-size: 14px; color: var(--muted); font-weight: 300; }
.welcome-strip-icon { font-size: 64px; opacity: .6; position: relative; z-index: 1; }

/* Stat Cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 22px 20px;
  display: flex; align-items: center; gap: 16px;
  transition: border-color .25s, background .25s, transform .2s;
  animation: fadeUp .4s ease both;
}
.stat-card:hover {
  border-color: rgba(0,184,156,.3);
  background: var(--glass-hover);
  transform: translateY(-2px);
}
.stat-card-icon {
  width: 50px; height: 50px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.si-emerald { background: rgba(0,184,156,.12); border: 1px solid rgba(0,184,156,.2); }
.si-blue    { background: rgba(59,130,246,.1);  border: 1px solid rgba(59,130,246,.2); }
.si-gold    { background: rgba(212,160,23,.1);  border: 1px solid rgba(212,160,23,.2); }
.si-rose    { background: rgba(239,68,68,.08);  border: 1px solid rgba(239,68,68,.15); }

.stat-card-info { flex: 1; min-width: 0; }
.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 500; margin-bottom: 5px; }
.stat-value { font-size: 17px; font-weight: 600; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Patient Info Panel */
.info-panel {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.info-panel-head {
  padding: 18px 28px;
  background: rgba(0,184,156,.07);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.info-panel-head h3 {
  font-family: var(--f-head);
  font-size: 20px; font-weight: 600; color: var(--white);
}
.panel-tag {
  margin-left: auto;
  background: rgba(0,184,156,.15);
  border: 1px solid rgba(0,184,156,.3);
  color: var(--emerald-l);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 11px; font-weight: 600;
  letter-spacing: .4px; text-transform: uppercase;
}

.info-panel-body { padding: 4px 0; }

.info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 28px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  gap: 20px;
  transition: background .15s;
}
.info-row:last-child { border-bottom: none; }
.info-row:hover { background: rgba(255,255,255,.02); }
.info-key {
  font-size: 13px; color: var(--muted); font-weight: 400;
  display: flex; align-items: center; gap: 8px;
}
.info-key-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--emerald); opacity: .5; flex-shrink: 0;
}
.info-val {
  font-size: 14px; font-weight: 600; color: var(--white); text-align: right;
}

/* ════════════════════════════════════════════════════════════
   ADMIN PAGE
   ════════════════════════════════════════════════════════════ */
#adminPage { background: var(--navy-900); }

.admin-header {
  background: rgba(5,13,26,.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(212,160,23,.2);
  padding: 0 36px;
  height: 68px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
}
.admin-header-title {
  display: flex; align-items: center; gap: 12px;
}
.admin-header-title h1 {
  font-family: var(--f-head);
  font-size: 22px; font-weight: 600;
  color: var(--gold-l);
}
.admin-badge {
  background: rgba(212,160,23,.15);
  border: 1px solid rgba(212,160,23,.35);
  color: var(--gold-l);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
}

.btn-back {
  background: var(--glass);
  border: 1px solid var(--border);
  color: rgba(255,255,255,.6);
  border-radius: var(--r-sm);
  padding: 8px 18px;
  font-family: var(--f-body);
  font-size: 13px; cursor: pointer;
  transition: color .2s, border-color .2s;
  width: auto;
}
.btn-back:hover { color: var(--white); border-color: rgba(255,255,255,.3); }

.admin-body {
  max-width: 1000px; margin: 0 auto;
  padding: 36px 28px 80px;
  position: relative; z-index: 1;
}

/* Admin card */
.admin-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 22px;
}
.admin-card-head {
  padding: 16px 26px;
  background: rgba(212,160,23,.05);
  border-bottom: 1px solid rgba(212,160,23,.12);
  display: flex; align-items: center; gap: 10px;
}
.admin-card-head h3 {
  font-family: var(--f-head);
  font-size: 19px; font-weight: 600; color: var(--white);
}
.admin-card-body { padding: 26px; }

/* Admin login form */
.admin-field { margin-bottom: 18px; }
.admin-label {
  display: block;
  font-size: 11px; font-weight: 600;
  letter-spacing: .7px; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 7px;
}
.admin-input {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(212,160,23,.2);
  border-radius: var(--r-sm);
  padding: 13px 16px;
  font-family: var(--f-body);
  font-size: 15px; color: var(--white);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.admin-input::placeholder { color: rgba(255,255,255,.18); }
.admin-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,160,23,.1);
}

.btn-gold-full {
  width: 100%;
  background: linear-gradient(135deg, var(--gold) 0%, #b88010 100%);
  border: none; border-radius: var(--r-sm);
  padding: 14px;
  font-family: var(--f-body);
  font-size: 15px; font-weight: 600; color: var(--white);
  cursor: pointer;
  transition: transform .15s, box-shadow .2s;
  box-shadow: 0 4px 20px rgba(212,160,23,.25);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-gold-full:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(212,160,23,.4); }

/* Patients Table */
.pt-table { width: 100%; border-collapse: collapse; }
.pt-table th {
  padding: 11px 16px;
  text-align: left;
  font-size: 10px; font-weight: 700;
  letter-spacing: .8px; text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.02);
}
.pt-table td {
  padding: 13px 16px;
  font-size: 14px; color: rgba(255,255,255,.8);
  border-bottom: 1px solid rgba(255,255,255,.04);
  vertical-align: middle;
}
.pt-table tr:last-child td { border-bottom: none; }
.pt-table tr:hover td { background: rgba(255,255,255,.025); }

.mr-chip {
  background: rgba(0,184,156,.12);
  border: 1px solid rgba(0,184,156,.25);
  color: var(--emerald-l);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 12px; font-weight: 700;
  font-family: 'Courier New', monospace;
}

.btn-qr-gen {
  background: linear-gradient(135deg, var(--emerald) 0%, var(--emerald-d) 100%);
  border: none; border-radius: 7px;
  padding: 7px 16px;
  font-family: var(--f-body);
  font-size: 12px; font-weight: 600; color: var(--white);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 2px 12px rgba(0,184,156,.25);
  display: inline-flex; align-items: center; gap: 5px;
}
.btn-qr-gen:hover { transform: translateY(-1px); box-shadow: 0 4px 18px rgba(0,184,156,.4); }
.btn-qr-gen:active { transform: scale(.97); }

/* QR Result */
.qr-result-area {
  display: none;
  background: rgba(0,184,156,.04);
  border: 1px solid rgba(0,184,156,.2);
  border-radius: var(--r-md);
  padding: 28px;
  text-align: center;
  margin-top: 20px;
}
.qr-result-area.show { display: block; animation: fadeUp .3s ease; }

.qr-box {
  display: inline-block;
  background: var(--white);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow-glow), var(--shadow-card);
  margin-bottom: 16px;
}
.qr-box img, .qr-box canvas { display: block; border-radius: 8px; }

.qr-patient-label {
  font-family: var(--f-head);
  font-size: 20px; font-weight: 600;
  color: var(--white); margin-bottom: 6px;
}
.qr-url-text {
  font-size: 11px; color: var(--emerald);
  word-break: break-all; margin-bottom: 16px;
  opacity: .8;
}

.btn-dl-qr {
  background: var(--glass);
  border: 1px solid var(--emerald);
  border-radius: var(--r-sm);
  color: var(--emerald-l);
  padding: 10px 22px;
  font-family: var(--f-body);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  width: auto;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-dl-qr:hover { background: rgba(0,184,156,.12); }

/* ── Loading Overlay ────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(5,13,26,.85);
  backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
}
.overlay.show { display: flex; }
.overlay-card {
  background: var(--navy-700);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 40px 52px;
  text-align: center;
  box-shadow: var(--shadow-deep);
}
.spin-ring {
  width: 42px; height: 42px;
  border: 3px solid rgba(0,184,156,.2);
  border-top-color: var(--emerald);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.overlay-msg { font-size: 15px; font-weight: 500; color: rgba(255,255,255,.8); }

.btn-spin {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 860px) {
  .login-wrapper { flex-direction: column; max-width: 480px; }
  .login-brand { width: 100%; padding: 36px 32px 28px; }
  .brand-features { display: none; }
  .login-form-panel { padding: 36px 32px 40px; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .dash-header { padding: 0 18px; }
  .dash-header-sub { display: none; }
  .dash-header-sep { display: none; }
  .user-badge-name { max-width: 100px; }
}
@media (max-width: 520px) {
  .login-form-panel { padding: 28px 22px 32px; }
  .form-heading { font-size: 30px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .welcome-strip { flex-direction: column; text-align: center; }
  .welcome-strip-icon { font-size: 42px; }
  .dash-body { padding: 20px 14px 60px; }
  .admin-body { padding: 20px 14px 60px; }
  .pt-table th:nth-child(3),
  .pt-table td:nth-child(3) { display: none; }
}
