@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;1,9..144,300&display=swap');

:root {
  --navy: #0a2342;
  --teal: #00788a;
  --teal-light: #e6f5f7;
  --teal-mid: #b3dde3;
  --text-dark: #1a2e3b;
  --text-grey: #5a7384;
  --bg-grey: #f7f9fb;
  --border: #d0dde5;
  --font-sans: 'DM Sans', sans-serif;
  --font-heading: 'Fraunces', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; transition: font-size 0.2s; }
body { font-family: var(--font-sans); color: var(--text-dark); line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-animate-1 { animation: fadeUp 0.5s ease both; }
.hero-animate-2 { animation: fadeUp 0.6s 0.1s ease both; }
.hero-animate-3 { animation: fadeUp 0.6s 0.2s ease both; }

/* ── Header ── */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--border); height: 108px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; padding: 0 5%; }
.site-brand-link { display: flex; align-items: center; font-family: var(--font-heading); font-size: 1.69rem; font-weight: 600; color: var(--navy); letter-spacing: 0.01em; line-height: 1.2; }
.site-logo-svg { display: inline-block; vertical-align: middle; margin-right: 8px; flex-shrink: 0; width: 55px; height: 55px; transition: all 0.2s; }
.header-badge { display: inline-flex; align-items: center; background: rgba(200,146,42,0.1); border: 1px solid rgba(200,146,42,0.35); color: #c8922a; font-size: 0.72rem; padding: 0.22rem 0.75rem; border-radius: 2px; font-weight: 500; letter-spacing: 0.06em; white-space: nowrap; width: fit-content; }
.header-right-desktop { display: flex; align-items: center; gap: 1.5rem; }
.desktop-nav { display: flex; align-items: center; gap: 2rem; }
.desktop-nav a { color: var(--text-grey); font-size: 0.9rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.03em; transition: color 0.2s; }
.desktop-nav a:hover { color: var(--teal); }

.stat-pill { display: flex; flex-direction: column; align-items: center; justify-content: center; background: #f0f8fa; border: 1px solid #b3dde3; border-radius: 6px; padding: 0.3rem 0.75rem; line-height: 1.2; }

.btn-primary { background: var(--teal); color: #fff !important; padding: 0.55rem 1.4rem; border-radius: 4px; transition: background 0.2s, transform 0.2s; border: none; cursor: pointer; text-align: center; text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.9rem; font-weight: 500; display: inline-flex; align-items: center; gap: 0.4rem; }
.btn-primary:hover { background: var(--navy); transform: translateY(-1px); }

.btn-secondary { background: transparent; color: var(--teal) !important; padding: 0.5rem 1.1rem; border-radius: 4px; border: 1.5px solid var(--teal); font-size: 0.88rem; font-weight: 500; letter-spacing: 0.02em; transition: all 0.2s; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem; }
.btn-secondary:hover { background: var(--teal-light); }

.btn-outline-hero { background: transparent; color: rgba(255,255,255,0.9) !important; padding: 0.8rem 2rem; border-radius: 4px; border: 1.5px solid rgba(255,255,255,0.4); font-size: 1rem; font-weight: 500; transition: all 0.2s; cursor: pointer; display: inline-flex; align-items: center; gap: 0.5rem; }
.btn-outline-hero:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.7); }

.text-sizer { display: flex; align-items: center; gap: 0.4rem; background: var(--teal-light); border: 1.5px solid var(--teal); border-radius: 30px; padding: 0.3rem 0.8rem; }
.text-sizer button { background: var(--teal); color: #fff; border: none; border-radius: 50%; width: 30px; height: 30px; font-weight: 700; cursor: pointer; transition: background 0.2s; display: flex; align-items: center; justify-content: center; line-height: 1; font-family: var(--font-sans); }
.text-sizer button:hover { background: var(--navy); }

.mobile-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--navy); }
.mobile-menu { display: none; padding: 1rem 5%; border-top: 1px solid var(--border); position: absolute; top: 108px; left: 0; width: 100%; background: #fff; box-shadow: 0 4px 6px rgba(0,0,0,0.05); z-index: 49; }
.mobile-menu.active { display: block; }
.mobile-menu a { display: block; padding: 0.6rem 0; color: var(--text-grey); border-bottom: 1px solid #f0f4f7; font-weight: 500; }

/* ── Hero ── */
.hero-section { background: #0a2342; color: #fff; padding: 100px 5% 90px; display: flex; flex-direction: column; align-items: center; gap: 2.5rem; position: relative; overflow: hidden; }
.hero-heading { font-family: var(--font-heading); font-size: clamp(2.4rem, 5.5vw, 5.2rem); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; margin: 0; text-align: center; }
.hero-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; width: 100%; max-width: 760px; }
.hero-stat-card { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; padding: 1.4rem 1.6rem; backdrop-filter: blur(10px); }

/* ── Trust Bar ── */
.trust-bar { background: var(--teal); padding: 1rem 5%; display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap; color: #fff; font-weight: 500; }

/* ── Sections ── */
.section { padding: 90px 5%; }
.section-label { font-size: 0.9rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--teal); font-weight: 500; margin-bottom: 0.8rem; }
.section h2 { font-family: var(--font-heading); font-size: clamp(1.9rem, 3vw, 2.8rem); font-weight: 600; color: var(--navy); line-height: 1.15; margin-bottom: 1rem; }
.section p.lead { font-size: 1.2rem; color: var(--text-grey); max-width: 620px; line-height: 1.8; margin-bottom: 3rem; }

/* ── Cards ── */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.service-card { background: var(--bg-grey); border: 1px solid var(--border); border-radius: 8px; padding: 2rem; position: relative; transition: transform 0.2s, box-shadow 0.2s; }
.service-card:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.08); }
.service-card::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--teal); border-radius: 4px 0 0 4px; }
.service-card h3 { font-family: var(--font-heading); font-size: 1.35rem; color: var(--navy); margin: 0.7rem 0; }
.badge { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 2px; margin-bottom: 0.7rem; text-transform: uppercase; }

/* ── Pillars ── */
.pillars-bg { background: var(--navy); color: #fff; }
.pillars-bg h2 { color: #fff; }
.pillars-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2px; background: rgba(255,255,255,0.08); border-radius: 8px; overflow: hidden; }
.pillar { padding: 2.5rem 2rem; background: var(--navy); transition: background 0.2s; }
.pillar:hover { background: rgba(0,120,138,0.12); }
.pillar .num { font-family: var(--font-heading); font-size: 3rem; font-weight: 600; color: rgba(0,120,138,0.3); line-height: 1; margin-bottom: 1rem; }

/* ── Highlights ── */
.highlight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.highlight-box { background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--teal); border-radius: 6px; padding: 2rem; transition: transform 0.2s, box-shadow 0.2s; }
.highlight-box:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.05); }

/* ── Process ── */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; margin-top: 1rem; }
.process-line { position: absolute; top: 28px; left: 10%; right: 10%; height: 2px; background: var(--teal-mid); z-index: 0; }
.step { text-align: center; padding: 0 1rem; position: relative; z-index: 1; }
.step-num { width: 56px; height: 56px; background: var(--teal); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.2rem; font-family: var(--font-heading); font-size: 1.3rem; font-weight: 600; color: #fff; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--teal-mid); }
.step h4 { font-family: var(--font-heading); font-size: 1.1rem; color: var(--navy); margin-bottom: 0.4rem; }

/* ── Portal CTA Section ── */
.portal-cta-section { background: var(--navy); }
.portal-cta-section .section-label { color: var(--teal-mid); }
.portal-cta-section h2 { color: #fff; }
.portal-cta-inner { display: grid; grid-template-columns: 1fr 420px; gap: 4rem; align-items: start; }
.portal-feature-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.85rem; }
.portal-feature-list li { display: flex; align-items: flex-start; gap: 0.75rem; color: rgba(255,255,255,0.8); font-size: 1.05rem; line-height: 1.5; }
.portal-feature-list svg { flex-shrink: 0; margin-top: 3px; }
.portal-info-card { background: #fff; border: 1px solid var(--border); border-top: 3px solid var(--teal); border-radius: 6px; padding: 2rem; }

/* ── Footer ── */
.site-footer { background: #061525; color: rgba(255,255,255,0.5); }
.footer-grid { padding: 3rem 5% 2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2.5rem; }
.footer-grid h3 { font-size: 0.75rem; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; font-weight: 600; }
.footer-grid ul { list-style: none; padding: 0; }
.footer-grid ul li { margin-bottom: 0.6rem; }
.footer-grid a { transition: color 0.2s; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 1.25rem 5%; display: flex; justify-content: space-between; font-size: 0.8rem; }

/* ── Auth Pages (shared) ── */
.auth-page { min-height: 100vh; background: var(--bg-grey); display: flex; flex-direction: column; }
.auth-topbar { background: var(--navy); padding: 1rem 5%; display: flex; align-items: center; justify-content: space-between; }
.auth-topbar-brand { display: flex; align-items: center; font-family: var(--font-heading); font-size: 1.3rem; font-weight: 600; color: #fff; gap: 0.5rem; }
.auth-container { flex: 1; display: flex; align-items: center; justify-content: center; padding: 3rem 1rem; }
.auth-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 2.5rem; width: 100%; max-width: 480px; box-shadow: 0 4px 30px rgba(0,0,0,0.07); }
.auth-card h1 { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 600; color: var(--navy); margin-bottom: 0.4rem; }
.auth-card .subtitle { color: var(--text-grey); font-size: 0.95rem; margin-bottom: 2rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--navy); letter-spacing: 0.03em; text-transform: uppercase; margin-bottom: 0.4rem; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: 4px; font-family: var(--font-sans); font-size: 0.95rem; color: var(--text-dark); background: #fff; transition: border-color 0.2s; outline: none; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,120,138,0.08); }
.form-group input.error { border-color: #dc2626; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.btn-full { width: 100%; padding: 0.85rem; font-size: 1rem; justify-content: center; margin-top: 0.5rem; }
.auth-footer-link { text-align: center; margin-top: 1.5rem; font-size: 0.9rem; color: var(--text-grey); }
.auth-footer-link a { color: var(--teal); font-weight: 500; }
.auth-divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; color: var(--text-grey); font-size: 0.85rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.alert { padding: 0.85rem 1rem; border-radius: 4px; font-size: 0.9rem; margin-bottom: 1.25rem; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.alert-info { background: var(--teal-light); border: 1px solid var(--teal-mid); color: var(--teal); }
.phone-row { display: flex; gap: 0.5rem; }
.phone-row .country-code { width: 90px; flex-shrink: 0; }
.otp-grid { display: flex; gap: 0.5rem; justify-content: center; margin: 1rem 0; }
.otp-input { width: 48px; height: 56px; text-align: center; font-size: 1.5rem; font-weight: 600; border: 1.5px solid var(--border); border-radius: 6px; outline: none; font-family: var(--font-sans); }
.otp-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,120,138,0.1); }

/* ── Dashboard ── */
.dash-layout { display: flex; min-height: 100vh; }
.dash-sidebar { width: 260px; flex-shrink: 0; background: var(--navy); display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; overflow-y: auto; z-index: 40; }
.dash-sidebar-brand { padding: 1.5rem 1.5rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.dash-sidebar-brand-link { display: flex; align-items: center; font-family: var(--font-heading); font-size: 1.1rem; font-weight: 600; color: #fff; gap: 0.5rem; }
.dash-nav { padding: 1rem 0; flex: 1; }
.dash-nav-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.5rem; color: rgba(255,255,255,0.6); font-size: 0.9rem; font-weight: 500; transition: all 0.2s; cursor: pointer; border: none; background: none; width: 100%; text-align: left; text-decoration: none; }
.dash-nav-item:hover, .dash-nav-item.active { background: rgba(0,120,138,0.15); color: #fff; }
.dash-nav-item.active { border-left: 3px solid var(--teal); }
.dash-nav-section { padding: 1.5rem 1.5rem 0.5rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.25); font-weight: 600; }
.dash-sidebar-user { padding: 1rem 1.5rem; border-top: 1px solid rgba(255,255,255,0.08); }
.dash-sidebar-user-name { color: #fff; font-size: 0.9rem; font-weight: 500; }
.dash-sidebar-user-role { color: rgba(255,255,255,0.4); font-size: 0.8rem; }
.dash-main { margin-left: 260px; flex: 1; display: flex; flex-direction: column; min-height: 100vh; background: #f4f7fa; }
.dash-topbar { background: #fff; border-bottom: 1px solid var(--border); padding: 1rem 2rem; display: flex; align-items: center; justify-content: space-between; }
.dash-topbar-title { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 600; color: var(--navy); }
.dash-content { padding: 2rem; flex: 1; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-bottom: 2rem; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 1.5rem; }
.stat-card-label { font-size: 0.8rem; color: var(--text-grey); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.stat-card-value { font-family: var(--font-heading); font-size: 2rem; font-weight: 600; color: var(--navy); }
.stat-card-sub { font-size: 0.8rem; color: var(--text-grey); margin-top: 0.25rem; }
.stat-card.highlight { border-top: 3px solid var(--teal); }
.table-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.table-card-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.table-card-title { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 600; color: var(--navy); }
table { width: 100%; border-collapse: collapse; }
th { background: var(--bg-grey); padding: 0.75rem 1rem; text-align: left; font-size: 0.78rem; font-weight: 600; color: var(--text-grey); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); }
td { padding: 1rem; font-size: 0.9rem; border-bottom: 1px solid #f0f4f7; color: var(--text-dark); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafcfd; }
.status-pill { display: inline-flex; align-items: center; padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.status-received { background: #eff6ff; color: #1d4ed8; }
.status-triaged { background: #fef9c3; color: #854d0e; }
.status-booked { background: #e6f5f7; color: #00788a; }
.status-discharged { background: #f0fdf4; color: #15803d; }
.status-urgent { background: #fff1f2; color: #be123c; }
.drop-zone { border: 2px dashed #b3dde3; border-radius: 6px; padding: 1.5rem 1rem; text-align: center; cursor: pointer; background: #fafcfd; transition: all 0.2s; }
.drop-zone:hover { border-color: var(--teal); background: var(--teal-light); }
.drop-zone.dragover { border-color: var(--teal); background: var(--teal-light); }
.form-input { padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: 4px; width: 100%; font-family: var(--font-sans); font-size: 0.95rem; color: var(--text-dark); background: #fff; transition: border-color 0.2s; outline: none; }
.form-input:focus { border-color: var(--teal); }
.form-label { font-size: 0.82rem; font-weight: 600; color: var(--navy); letter-spacing: 0.03em; text-transform: uppercase; margin-bottom: 0.35rem; display: block; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal { background: #fff; border-radius: 10px; width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.modal-header { padding: 1.5rem 1.5rem 0; display: flex; justify-content: space-between; align-items: center; }
.modal-header h2 { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 600; color: var(--navy); }
.modal-body { padding: 1.5rem; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-grey); font-size: 1.5rem; line-height: 1; }
.page-header { background: var(--bg-grey); padding: 60px 5%; border-bottom: 1px solid var(--border); }
.page-title { font-family: var(--font-heading); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 600; color: var(--navy); margin-bottom: 0.5rem; }
.page-content { max-width: 800px; margin: 0 auto; padding: 60px 5%; font-size: 1.05rem; line-height: 1.8; }

/* ── Responsive ── */
@media (max-width: 1200px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1100px) {
  .header-badge { display: none !important; }
}
@media (max-width: 900px) {
  .header-right-desktop { display: none !important; }
  .mobile-toggle { display: block; }
  .site-header { height: 70px !important; }
  .mobile-menu { top: 70px; }
  .hero-section { padding: 70px 5% 60px !important; }
  .portal-cta-inner { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; gap: 2rem; }
  .process-line { display: none; }
  .dash-sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .dash-sidebar.open { transform: none; }
  .dash-main { margin-left: 0; }
}
@media (max-width: 768px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  table { font-size: 0.82rem; }
  th, td { padding: 0.6rem 0.75rem; }
}
@media (max-width: 600px) {
  .site-brand-link { font-size: 1.3rem; }
  .site-logo-svg { width: 40px; height: 40px; }
  .hero-heading { font-size: 2.3rem !important; }
  .hero-stats-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .highlight-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 5%; }
  .stats-row { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .auth-card { padding: 1.75rem 1.25rem; }
  .otp-input { width: 40px; height: 48px; font-size: 1.2rem; }
}
