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

:root {
  --navy: #0d1f4e;
  --navy-mid: #1a2f5e;
  --navy-light: #243d72;
  --red: #c0392b;
  --red-dark: #9b2335;
  --red-bright: #e74c3c;
  --white: #ffffff;
  --off-white: #f5f6f8;
  --gray-light: #eef0f4;
  --gray: #8a92a4;
  --gray-dark: #444c5e;
  --text: #1c2333;
  --border: #dde1ea;
}

html, body {
  height: 100%;
  font-family: 'Barlow', sans-serif;
  background: var(--navy);
  color: var(--text);
}

/* ─── TOP BAR ─── */
.topbar { background: var(--navy); padding: 8px 32px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.08); }
.topbar-left { display: flex; align-items: center; gap: 8px; font-size: 11px; color: rgba(255,255,255,0.55); letter-spacing: 0.4px; }
.topbar-left i { color: var(--red-bright); font-size: 13px; }
.topbar-right { font-size: 11px; color: rgba(255,255,255,0.4); }

/* ─── NAVBAR ─── */
.navbar { background: #fff; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; height: 64px; border-bottom: 3px solid var(--red); box-shadow: 0 2px 12px rgba(0,0,0,0.1); }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-leaf { width: 40px; height: 40px; background: var(--red); clip-path: polygon(50% 0%, 85% 15%, 100% 50%, 85% 85%, 50% 100%, 15% 85%, 0% 50%, 15% 15%); display: flex; align-items: center; justify-content: center; color: white; font-size: 18px; font-weight: 800; font-family: 'Barlow Condensed', sans-serif; }
.logo-name { line-height: 1.1; }
.logo-name strong { display: block; font-family: 'Barlow Condensed', sans-serif; font-size: 18px; font-weight: 700; color: var(--navy); letter-spacing: 1px; }
.logo-name span { font-size: 9px; color: var(--red); letter-spacing: 2px; font-weight: 600; }
.nav-links { display: flex; gap: 28px; list-style: none; align-items: center; }
.nav-links a { font-size: 12px; font-weight: 600; color: var(--navy); text-decoration: none; letter-spacing: 0.8px; text-transform: uppercase; position: relative; padding-bottom: 4px; opacity: 0.7; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 1; }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--red); transform: scaleX(0); transition: transform 0.2s; }
.nav-links a:hover::after { transform: scaleX(1); }
.btn-nav { background: var(--red); color: white !important; padding: 9px 20px; border-radius: 3px; font-size: 11px !important; font-weight: 700 !important; letter-spacing: 1px !important; opacity: 1 !important; text-transform: uppercase; }
.btn-nav:hover { background: var(--red-dark) !important; }
.btn-nav::after { display: none !important; }

/* ─── HERO SECTION ─── */
.hero { position: relative; min-height: 420px; background: linear-gradient(105deg, var(--navy) 0%, #162447 40%, rgba(22,36,71,0.88) 100%); overflow: hidden; display: flex; align-items: center; }
.hero-hex-grid { position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='115' viewBox='0 0 100 115'%3E%3Cpolygon points='50,0 100,28.8 100,86.6 50,115.5 0,86.6 0,28.8' fill='none' stroke='rgba(255,255,255,0.06)' stroke-width='1'/%3E%3C/svg%3E"); background-size: 80px 92px; opacity: 1; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13,31,78,0.97) 40%, rgba(13,31,78,0.3) 100%); }
.hero-doctor { position: absolute; right: 0; top: 0; bottom: 0; width: 55%; background: linear-gradient(to right, var(--navy), transparent 30%), url('https://images.unsplash.com/photo-1612349317150-e413f6a5b16d?w=800&q=80') center/cover no-repeat; opacity: 0.4; }
.hero-content { position: relative; z-index: 2; padding: 60px 80px; max-width: 600px; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,0.2); padding: 5px 14px; border-radius: 2px; font-size: 10px; letter-spacing: 1.5px; font-weight: 600; color: rgba(255,255,255,0.7); text-transform: uppercase; margin-bottom: 20px; }
.hero-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: #2ecc71; }
.hero-h1 { font-family: 'Barlow Condensed', sans-serif; font-size: 52px; font-weight: 800; color: white; line-height: 1.0; text-transform: uppercase; margin-bottom: 4px; }
.hero-h1 .accent { color: var(--red-bright); }
.hero-sub { font-size: 13px; color: rgba(255,255,255,0.55); max-width: 380px; line-height: 1.6; margin-top: 14px; }
.hero-divider { width: 50px; height: 3px; background: var(--red); margin: 20px 0; }

/* ─── MAIN LOGIN LAYOUT ─── */
.main { background: var(--off-white); min-height: calc(100vh - 105px); display: flex; justify-content: center; align-items: center; padding: 32px 32px; position: relative; }
.main::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 80px; background: linear-gradient(to bottom, rgba(13,31,78,0.08), transparent); }
.login-wrapper { display: flex; width: 100%; max-width: 960px; gap: 0; border-radius: 6px; overflow: hidden; box-shadow: 0 20px 60px rgba(13,31,78,0.18), 0 4px 16px rgba(0,0,0,0.08); }

/* ─── LEFT SIDEBAR ─── */
.login-sidebar { width: 340px; flex-shrink: 0; background: var(--navy-mid); padding: 44px 36px; display: flex; flex-direction: column; gap: 32px; position: relative; overflow: hidden; }
.login-sidebar::before { content: ''; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='115' viewBox='0 0 100 115'%3E%3Cpolygon points='50,0 100,28.8 100,86.6 50,115.5 0,86.6 0,28.8' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='1'/%3E%3C/svg%3E"); background-size: 70px 80px; }
.sidebar-logo { position: relative; z-index: 1; }
.sidebar-logo-inner { margin-bottom: 28px; }
.sidebar-logo-inner img { mix-blend-mode: multiply; }
.sidebar-title { font-family: 'Barlow Condensed', sans-serif; font-size: 30px; font-weight: 800; color: white; text-transform: uppercase; line-height: 1.05; }
.sidebar-title .red { color: var(--red-bright); }
.sidebar-tagline { font-size: 12px; color: rgba(255,255,255,0.45); line-height: 1.6; }
.sidebar-divider { height: 1px; background: rgba(255,255,255,0.1); position: relative; z-index: 1; }
.sidebar-features { position: relative; z-index: 1; }
.feature-item { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.feature-icon { width: 32px; height: 32px; flex-shrink: 0; background: rgba(192,57,43,0.2); border: 1px solid rgba(192,57,43,0.35); border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.feature-text strong { display: block; font-size: 12px; font-weight: 600; color: white; margin-bottom: 2px; }
.feature-text span { font-size: 11px; color: rgba(255,255,255,0.4); line-height: 1.4; }
.sidebar-stats { display: flex; gap: 20px; position: relative; z-index: 1; }
.stat-item { text-align: center; }
.stat-num { font-family: 'Barlow Condensed', sans-serif; font-size: 26px; font-weight: 800; color: var(--red-bright); }
.stat-lbl { font-size: 10px; color: rgba(255,255,255,0.4); letter-spacing: 0.5px; }
.sidebar-footer { position: relative; z-index: 1; }
.sidebar-footer a { font-size: 11px; color: rgba(255,255,255,0.3); text-decoration: none; }
.sidebar-footer a:hover { color: rgba(255,255,255,0.6); }

/* ─── RIGHT FORM PANEL ─── */
.login-form-panel { flex: 1; background: #fff; padding: 48px 44px; display: flex; flex-direction: column; }
.form-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 2px; color: var(--red); text-transform: uppercase; margin-bottom: 8px; }
.form-title { font-family: 'Barlow Condensed', sans-serif; font-size: 32px; font-weight: 800; color: var(--navy); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.form-subtitle { font-size: 13px; color: var(--gray); margin-bottom: 32px; }
.alert-box { background: #fef3f2; border: 1px solid #f5c6c6; border-left: 3px solid var(--red); border-radius: 4px; padding: 10px 14px; font-size: 12px; color: #7f1d1d; display: none; margin-bottom: 20px; align-items: center; gap: 8px; }
.alert-box.show { display: flex; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.8px; color: var(--gray-dark); text-transform: uppercase; margin-bottom: 7px; }
.input-row { position: relative; }
.input-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 15px; color: var(--gray); pointer-events: none; }
.form-input { width: 100%; height: 46px; padding: 0 14px 0 40px; border: 1.5px solid var(--border); border-radius: 4px; font-size: 14px; font-family: 'Barlow', sans-serif; color: var(--text); background: var(--off-white); transition: border-color 0.2s, background 0.2s, box-shadow 0.2s; outline: none; }
.form-input:focus { border-color: var(--navy-mid); background: #fff; box-shadow: 0 0 0 3px rgba(26,47,94,0.08); }
.form-input.error { border-color: var(--red); background: #fff8f8; }
.form-input::placeholder { color: #bcc3cf; }
.eye-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--gray); font-size: 16px; padding: 0; transition: color 0.15s; }
.eye-toggle:hover { color: var(--navy); }
.form-row-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.check-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gray-dark); cursor: pointer; }
.check-label input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--red); cursor: pointer; }
.link-forgot { font-size: 12px; color: var(--navy-mid); text-decoration: none; font-weight: 500; }
.link-forgot:hover { text-decoration: underline; }
.btn-submit { width: 100%; height: 50px; background: var(--red); color: white; border: none; border-radius: 4px; font-family: 'Barlow Condensed', sans-serif; font-size: 17px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background 0.15s, transform 0.1s; margin-bottom: 20px; position: relative; overflow: hidden; }
.btn-submit:hover { background: var(--red-dark); }
.btn-submit:active { transform: scale(0.99); }
.btn-submit:disabled { background: #c8a8a5; cursor: not-allowed; }
.divider-or { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.divider-or::before, .divider-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.divider-or span { font-size: 11px; color: var(--gray); letter-spacing: 1px; text-transform: uppercase; }
.btn-sso { width: 100%; height: 44px; background: white; border: 1.5px solid var(--border); border-radius: 4px; font-family: 'Barlow', sans-serif; font-size: 13px; font-weight: 600; color: var(--navy); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; transition: border-color 0.15s, background 0.15s; margin-bottom: 28px; }
.btn-sso:hover { border-color: var(--navy-mid); background: var(--off-white); }
.sso-badge { background: var(--navy); color: white; font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 2px; letter-spacing: 0.5px; }
.form-footer-links { display: flex; justify-content: center; gap: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.form-footer-links a { font-size: 11px; color: var(--gray); text-decoration: none; transition: color 0.15s; }
.form-footer-links a:hover { color: var(--navy); }
.form-note { text-align: center; font-size: 11px; color: var(--gray); margin-bottom: 20px; }
.form-note a { color: var(--navy-mid); font-weight: 600; text-decoration: none; }
.form-note a:hover { text-decoration: underline; }

/* ─── BOTTOM SECURITY BAR ─── */
.security-bar { background: var(--navy); padding: 14px 80px; display: flex; align-items: center; justify-content: center; gap: 40px; flex-wrap: wrap; }
.sec-item { display: flex; align-items: center; gap: 8px; font-size: 11px; color: rgba(255,255,255,0.45); letter-spacing: 0.3px; }
.sec-item span { color: var(--red-bright); font-size: 13px; }

/* ─── FOOTER ─── */
.footer { background: #0a1a3e; padding: 16px 32px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-copy { font-size: 11px; color: rgba(255,255,255,0.25); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 11px; color: rgba(255,255,255,0.3); text-decoration: none; }
.footer-links a:hover { color: rgba(255,255,255,0.6); }

/* ─── LOADER ─── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite; display: none; }
.btn-submit.loading .btn-text { display: none; }
.btn-submit.loading .spinner { display: block; }

@media (max-width: 768px) {
  .login-sidebar { display: none; }
  .hero-content { padding: 40px 24px; }
  .hero-h1 { font-size: 36px; }
  .main { padding: 40px 16px 60px; }
  .login-form-panel { padding: 32px 24px; }
  .nav-links { display: none; }
  .security-bar { padding: 14px 24px; gap: 16px; }
}
