/* ============================================================
   SAARTHI HEALTH SERVICES — Main Stylesheet
   Bootstrap 5 + Custom
============================================================ */
:root {
  --brand: #1A5276; --brand-dark: #154360; --accent: #2980B9;
  --teal: #1ABC9C; --teal-dark: #17A589; --amber: #E67E22;
  --light-bg: #EBF5FB; --light-bg2: #E8F8F5;
  --text-mid: #444F5A; --text-light: #717D8A;
  --border: #D6EAF8; --shadow: 0 4px 24px rgba(26,82,118,.10);
  --radius: 12px; --font-head: 'Playfair Display',Georgia,serif;
  --font-body: 'DM Sans',sans-serif;
}
body { font-family: var(--font-body); color: #1C2833; }
h1,h2,h3,h4,h5 { font-family: var(--font-head); }
.flash-top { position: fixed; top: 70px; right: 20px; z-index: 9999; max-width: 400px; }

/* ── Navbar ───────────────────────────── */
.saarthi-nav { background: white; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
.navbar-brand { display: flex; align-items: center; gap: 0.75rem; }
.nav-logo-icon { width: 40px; height: 40px; background: var(--brand); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: white; font-size: 1.1rem; }
.nav-logo-name { font-family: var(--font-head); font-size: 0.95rem; font-weight: 700; color: var(--brand); line-height: 1.2; }
.nav-logo-sub { font-size: 0.65rem; color: var(--text-light); }
.nav-link { color: var(--text-mid) !important; font-weight: 500; font-size: 0.9rem; }
.nav-link:hover { color: var(--brand) !important; }

/* ── Buttons ──────────────────────────── */
.btn-saarthi { background: var(--brand); color: white !important; border-radius: 50px; font-weight: 600; }
.btn-saarthi:hover { background: var(--brand-dark); color: white !important; }
.btn-teal { background: var(--teal); color: white !important; border-radius: 50px; font-weight: 600; }
.btn-teal:hover { background: var(--teal-dark); }
.btn-whatsapp { background: #25D366; color: white !important; border-radius: 50px; font-weight: 600; }
.btn-whatsapp:hover { background: #1ebe5b; }

/* ── Cards ────────────────────────────── */
.card-saarthi { border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); border-top: 4px solid var(--teal); }
.card-stat { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; background: white; box-shadow: var(--shadow); }
.card-stat .stat-num { font-family: var(--font-head); font-size: 2.2rem; font-weight: 800; color: var(--brand); line-height: 1; }
.card-stat .stat-lbl { font-size: 0.8rem; color: var(--text-light); margin-top: 4px; }
.card-stat .stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }

/* ── Auth Pages ──────────────────────── */
.auth-wrapper { min-height: 100vh; background: linear-gradient(135deg, #154360 0%, #1A5276 60%, #1F6D9A 100%); display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-card { background: white; border-radius: 20px; padding: 2.5rem; width: 100%; max-width: 480px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo .logo-icon { width: 64px; height: 64px; background: var(--brand); border-radius: 16px; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; color: white; font-size: 1.75rem; }
.auth-logo h4 { font-family: var(--font-head); color: var(--brand); margin: 0; }
.auth-logo p { font-size: 0.8rem; color: var(--text-light); margin: 0; }
.form-label { font-size: 0.825rem; font-weight: 600; color: #333; }
.form-control, .form-select { border: 1.5px solid var(--border); border-radius: 10px; font-size: 0.9rem; font-family: var(--font-body); }
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(41,128,185,.1); }
.input-group .form-control { border-right: none; }
.input-group .btn-outline-secondary { border: 1.5px solid var(--border); border-left: none; background: white; }

/* ── OTP Input ────────────────────────── */
.otp-inputs { display: flex; gap: 0.5rem; justify-content: center; }
.otp-input { width: 50px; height: 55px; text-align: center; font-size: 1.4rem; font-weight: 700; border: 2px solid var(--border); border-radius: 10px; font-family: monospace; }
.otp-input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(26,82,118,.1); }

/* ── Dashboard Sidebar ────────────────── */
.sidebar { width: 260px; min-height: 100vh; background: #0F2A3B; position: fixed; left: 0; top: 0; z-index: 100; transition: all .3s; overflow-y: auto; }
.sidebar-brand { padding: 1.25rem 1.5rem; background: var(--brand); color: white; font-family: var(--font-head); font-size: 1rem; font-weight: 700; display: flex; align-items: center; }
.sidebar-user { padding: 1.25rem 1.5rem; background: rgba(255,255,255,.05); display: flex; align-items: center; gap: .75rem; }
.user-avatar-sidebar { width: 40px; height: 40px; background: var(--teal); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: white; font-size: 1rem; flex-shrink: 0; }
.sidebar-nav { list-style: none; padding: 1rem 0; margin: 0; }
.sidebar-nav li a { display: flex; align-items: center; gap: .75rem; padding: .75rem 1.5rem; color: rgba(255,255,255,.7); text-decoration: none; font-size: .875rem; font-weight: 500; transition: all .2s; }
.sidebar-nav li a i { width: 18px; text-align: center; }
.sidebar-nav li a:hover, .sidebar-nav li a.active { background: rgba(255,255,255,.1); color: white; border-left: 3px solid var(--teal); }
.main-content { margin-left: 260px; min-height: 100vh; background: #F4F6F9; transition: all .3s; width: calc(100% - 260px); }
.topbar { background: white; height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 99; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.sidebar-toggle { display: none; }
.content-area { padding: 1.5rem; }
.page-title { font-family: var(--font-head); color: var(--brand); font-size: 1.5rem; margin-bottom: .25rem; }
.page-sub { color: var(--text-light); font-size: .875rem; margin-bottom: 1.5rem; }

/* ── Upload Zone ─────────────────────── */
.upload-zone { border: 2px dashed var(--accent); border-radius: var(--radius); padding: 2.5rem; text-align: center; background: var(--light-bg); cursor: pointer; transition: all .2s; }
.upload-zone:hover, .upload-zone.dragover { background: var(--light-bg2); border-color: var(--teal); }
.upload-zone i { font-size: 3rem; color: var(--accent); margin-bottom: .75rem; }
.file-item { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; background: white; border: 1px solid var(--border); border-radius: 10px; margin-bottom: .5rem; }
.file-icon { width: 36px; height: 36px; background: var(--light-bg); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--brand); font-size: .9rem; flex-shrink: 0; }
.file-name { flex: 1; font-size: .875rem; font-weight: 500; }
.file-size { font-size: .75rem; color: var(--text-light); }

/* ── Progress Bar ────────────────────── */
.upload-progress { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; margin-top: 4px; }
.upload-progress-bar { height: 100%; background: var(--teal); border-radius: 3px; transition: width .3s; }

/* ── Badges ──────────────────────────── */
.badge-new { background: #EBF5FB; color: var(--brand); }
.badge-progress { background: #FEF9E7; color: #7D6608; }
.badge-resolved { background: #E8F8F5; color: #1E8449; }
.badge-closed { background: #F2F3F4; color: #717D8A; }
.badge-urgent { background: #FDEDEC; color: #922B21; }

/* ── Table ───────────────────────────── */
.table-saarthi th { background: var(--brand); color: white; font-size: .8rem; font-weight: 600; letter-spacing: .04em; white-space: nowrap; }
.table-saarthi td { font-size: .875rem; vertical-align: middle; }
.table-saarthi tbody tr:hover { background: var(--light-bg); }

/* ── Priority Colors ─────────────────── */
.priority-urgent { color: #E74C3C; font-weight: 700; }
.priority-high { color: var(--amber); font-weight: 600; }
.priority-normal { color: var(--text-mid); }

/* ── Admin Sidebar ───────────────────── */
.admin-sidebar { background: #1A5276; }
.admin-sidebar .sidebar-brand { background: #154360; }

/* ── Responsive ──────────────────────── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); }
  .main-content { margin-left: 0; width: 100%; }
  .sidebar-toggle { display: block; }
  .auth-card { padding: 1.75rem 1.25rem; }
}
