@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================================
   main.css  –  ClinAssist Clinical Referral Intelligence Platform
   Unified Jade Green (#49C78A), Mint (#B8EFCB) & Teal (#1A9AA2) System
   Font: Poppins (Rounded, Friendly, Medical SaaS)
   ============================================================ */

/* ── Reset & Global Box Sizing ─────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Brand & Core Palette - ClinAssist System */
  --primary:        #49C78A;
  --primary-hover:  #3FD07C;
  --primary-dark:   #2E9F64;
  --primary-light:  #B8EFCB;
  --mint:           #B8EFCB;
  --teal:           #1A9AA2;
  --teal-dark:      #12777D;
  --light-blue:     #EAF6FF;
  
  --accent:         #1A9AA2;
  --accent-dark:    #12777D;
  --accent-light:   #EAF6FF;
  --accent-cyan:    #49C78A;

  /* Functional Status Colors */
  --success:        #49C78A;
  --success-light:  #ECFDF5;
  --success-border: #B8EFCB;
  --success-text:   #1E7248;

  --warning:        #F59E0B;
  --warning-light:  #FFFBEB;
  --warning-border: #FDE68A;
  --warning-text:   #92400E;

  --danger:         #EF4444;
  --danger-light:   #FEF2F2;
  --danger-border:  #FECACA;
  --danger-text:    #991B1B;

  --info:           #1A9AA2;
  --info-light:     #EAF6FF;
  --info-border:    #BAE6FD;
  --info-text:      #0369A1;

  /* Surfaces & Backgrounds */
  --bg:             #F6F9F8;
  --bg-main:        #F6F9F8;
  --bg-sidebar:     #FFFFFF;
  --bg-card:        #FFFFFF;
  --bg-gradient:    #F6F9F8;
  --surface:        #FFFFFF;
  --surface-alt:    #F2F7F5;
  --surface-hover:  #E8F3EE;

  /* Text & Typography */
  --text-primary:   #3A4A52;
  --text-heading:   #21333D;
  --text-secondary: #8A959B;
  --text-muted:     #9CA8AF;
  --font:           'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Borders & Shadows */
  --border:         #E7ECEA;
  --border-light:   #F0F4F2;
  --border-strong:  #D4DCD8;
  --radius:         14px;
  --radius-sm:      9px;
  --radius-lg:      18px;
  --radius-full:    9999px;

  --shadow-sm:      0 2px 6px rgba(58, 74, 82, 0.04);
  --shadow:         0 6px 20px rgba(58, 74, 82, 0.06);
  --shadow-md:      0 10px 28px rgba(58, 74, 82, 0.08);
  --shadow-lg:      0 18px 44px rgba(58, 74, 82, 0.12);

  /* Layout dimensions & transitions */
  --sidebar-w:      256px;
  --sidebar-w-mini: 76px;
  --topbar-h:       68px;
  --transition:     0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--accent-dark);
}

img {
  display: block;
  max-width: 100%;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-heading);
  font-weight: 700;
  line-height: 1.25;
}

h1 { font-size: 1.85rem; letter-spacing: -0.02em; }
h2 { font-size: 1.4rem;  letter-spacing: -0.015em; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

.text-muted { color: var(--text-muted) !important; }
.text-sm    { font-size: 0.85rem; }
.text-xs    { font-size: 0.75rem; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }

/* ── App Shell & Layout ───────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--bg-gradient);
  position: relative;
}

/* Mobile Sidebar Backdrop */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 53, 95, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  z-index: 998;
  transition: opacity var(--transition);
}

.sidebar-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

/* ── Unified Sidebar (Matching Home Page) ─────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: width var(--transition), transform var(--transition), padding var(--transition);
  overflow: hidden;
  box-shadow: 2px 0 12px rgba(58, 74, 82, 0.03);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  min-height: var(--topbar-h);
  transition: all var(--transition);
  gap: 8px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.sidebar-brand-img {
  height: 38px;
  max-width: 155px;
  object-fit: contain;
  object-position: left center;
  display: block;
  transition: all var(--transition);
}

.sidebar-logo .logo-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #49C78A, #1A9AA2);
  color: #fff;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 10px rgba(73, 199, 138, 0.28);
}

.sidebar-logo .logo-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.2;
  transition: opacity var(--transition);
}

.sidebar-logo .logo-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Sidebar Mini Collapsed State */
.sidebar.mini {
  width: var(--sidebar-w-mini) !important;
}

.sidebar.mini .sidebar-header {
  padding: 14px 8px;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
}

.sidebar.mini .sidebar-logo {
  display: none !important;
}

.sidebar.mini .toggle-btn {
  width: 32px;
  height: 32px;
  margin: 0 auto;
}

.sidebar.mini .nav-section-label {
  display: none !important;
}

.sidebar.mini .nav-item {
  justify-content: center;
  padding: 12px 0;
  width: 44px;
  height: 44px;
  margin: 0 auto 4px;
  border-radius: 10px;
}

.sidebar.mini .nav-item i {
  margin: 0;
  font-size: 1.15rem;
  width: auto;
}

.sidebar.mini .nav-item span {
  display: none !important;
}

.sidebar.mini .sidebar-footer {
  padding: 10px 4px;
}

.sidebar.mini .sidebar-footer .nav-item {
  width: 44px;
  height: 44px;
  margin: 0 auto;
  padding: 0;
  display: grid;
  place-items: center;
}

.toggle-btn {
  width: 34px;
  height: 34px;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition);
  flex-shrink: 0;
}

.toggle-btn:hover {
  background: #F0F6F4;
  border-color: var(--primary);
  color: var(--primary);
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  overflow-x: hidden !important;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE / Edge */
}

.sidebar-nav::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.nav-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 8px 12px 4px;
  white-space: nowrap;
  transition: opacity var(--transition);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.88rem;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition);
}

.nav-item i {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.nav-item:hover {
  background: #F0F6F4;
  color: var(--primary-dark);
}

.nav-item:hover i {
  color: var(--primary);
}

.nav-item.active {
  background: linear-gradient(135deg, #49C78A 0%, #3FD07C 100%);
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(73, 199, 138, 0.28);
}

.nav-item.active i {
  color: #ffffff !important;
}

.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid var(--border);
  background: #FAFCFB;
}

.sidebar-footer .nav-item {
  color: var(--text-secondary);
}

.sidebar-footer .nav-item:hover {
  background: #FEE2E2;
  color: var(--danger);
}

/* ── Main Content Area & Topbar ───────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: margin-left var(--transition);
}

.sidebar.mini ~ .main-content {
  margin-left: var(--sidebar-w-mini);
}

.topbar {
  height: var(--topbar-h);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(15, 53, 95, 0.03);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mobile-menu-btn {
  display: none;
}

.topbar-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.notif-btn {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: #264f7a;
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  font-size: 1.05rem;
  transition: all var(--transition);
}

.notif-btn:hover {
  background: #e9f1fb;
  border-color: #99b4d3;
  color: var(--primary);
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.68rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 5px 14px 5px 6px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d67ae, #2a7cc8);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.user-pill-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-heading);
  white-space: nowrap;
}

/* ── Page Content Container ───────────────────────────────── */
.page-content {
  padding: 28px 32px 48px;
  flex: 1;
  max-width: 1440px;
  width: 100%;
}

.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 1.85rem;
  color: var(--text-heading);
}

.page-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 4px;
}

/* ── Responsive Stepper Component ─────────────────────────── */
.stepper-wrap {
  margin: 18px 0 26px;
  padding: 8px 4px 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.stepper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  min-width: 440px;
}

.step-track {
  position: absolute;
  top: 18px;
  left: 12.5%;
  right: 12.5%;
  height: 4px;
  background: #e2e8f0;
  z-index: 1;
  border-radius: 2px;
}

.step-track-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #22c55e);
  border-radius: 2px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 2;
  flex: 1;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--surface);
  border: 2.5px solid var(--border-strong);
  color: var(--text-muted);
  transition: all var(--transition);
  box-shadow: 0 2px 6px rgba(15, 53, 95, 0.05);
}

.step-node.completed .step-circle {
  background: var(--success);
  border-color: var(--success);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.step-node.active .step-circle {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(29, 103, 174, 0.3);
}

.step-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 10px;
  max-width: 150px;
  line-height: 1.35;
  text-align: center;
}

.step-node.completed .step-label {
  color: var(--success-text);
  font-weight: 700;
}

.step-node.active .step-label {
  color: var(--accent);
  font-weight: 700;
}

/* ── Stat Cards & Metrics ─────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #bad3f0;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  margin-bottom: 14px;
}

.icon-blue   { background: #e0f2fe; color: #0284c7; }
.icon-orange { background: #fef3c7; color: #d97706; }
.icon-green  { background: #dcfce7; color: #15803d; }
.icon-purple { background: #f3e8ff; color: #7e22ce; }
.icon-red    { background: #fee2e2; color: #dc2626; }

.stat-value {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 8px;
}

.stat-change {
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 6px;
}
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ── Standard Card Component ──────────────────────────────── */
.card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 24px;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.card-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  gap: 12px;
  flex-wrap: wrap;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.card-body {
  padding: 20px 22px;
}

.card-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border-light);
  background: var(--surface-alt);
}

/* ── Grids & Responsive Layouts ───────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

/* ── Tables ───────────────────────────────────────────────── */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 500px;
  text-align: left;
}

th {
  text-align: left;
  padding: 12px 18px;
  background: #F0F6F4;
  color: var(--text-heading);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
  text-align: left;
}

tr:hover td {
  background: #FAFCFB;
}

tr:last-child td {
  border-bottom: none;
}

/* ── Badges & Status Indicators ───────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-pending {
  background: var(--warning-light);
  color: var(--warning-text);
  border: 1px solid var(--warning-border);
}

.badge-completed,
.badge-approved {
  background: var(--success-light);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.badge-urgent,
.badge-rejected,
.badge-cancelled {
  background: var(--danger-light);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
}

.badge-routine,
.badge-info,
.badge-scheduled {
  background: var(--info-light);
  color: var(--info-text);
  border: 1px solid var(--info-border);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #49C78A 0%, #3FD07C 100%);
  color: #ffffff !important;
  border-color: #3FD07C;
  box-shadow: 0 4px 14px rgba(73, 199, 138, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3FD07C 0%, #2E9F64 100%);
  border-color: #2E9F64;
  box-shadow: 0 6px 18px rgba(73, 199, 138, 0.38);
  transform: translateY(-1px);
}

.btn-accent {
  background: linear-gradient(135deg, #1A9AA2 0%, #12777D 100%);
  color: #ffffff !important;
  border-color: #1A9AA2;
  box-shadow: 0 4px 14px rgba(26, 154, 162, 0.25);
}

.btn-accent:hover {
  background: linear-gradient(135deg, #12777D 0%, #0E5E63 100%);
  border-color: #0E5E63;
  transform: translateY(-1px);
}

.btn-outline,
.btn-ghost {
  background: #ffffff;
  border: 1.5px solid var(--border-strong);
  color: var(--text-primary);
}

.btn-outline:hover,
.btn-ghost:hover {
  background: #F0F6F4;
  border-color: var(--primary);
  color: var(--primary-dark);
}

.btn-danger {
  background: var(--danger);
  color: #fff !important;
  border-color: var(--danger);
}
.btn-danger:hover {
  background: #dc2626;
}

.btn-success {
  background: var(--success);
  color: #fff !important;
  border-color: var(--success);
}
.btn-success:hover {
  background: #059669;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 6px;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 1rem;
  border-radius: 10px;
}

.w-full {
  width: 100%;
}

/* ── Forms & Controls ─────────────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 6px;
}

.form-control,
.form-select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background: #f8fbff;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: all var(--transition);
}

.form-control:focus,
.form-select:focus,
textarea:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 103, 174, 0.15);
}

.form-control::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

/* ── Modals & Popups ──────────────────────────────────────── */
.modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, 0.5) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex !important;
  align-items: center;
  justify-content: center;
  z-index: 1000 !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 20px;
}

.modal-overlay.open {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.modal {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.94) translateY(12px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1.5px solid var(--border);
}

.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: all 0.15s;
  display: grid;
  place-items: center;
}

.modal-close:hover {
  background: #FEE2E2;
  color: var(--danger);
}

.modal-body {
  padding: 22px 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #FAFCFB;
}

/* ── Specialist Cards & Directory ─────────────────────────── */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.spec-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.spec-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.spec-card.suggested {
  border: 2px solid var(--accent);
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
}

.spec-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 8px;
}

.spec-name {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-heading);
}

.spec-specialty {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 2px;
}

.spec-badge-suggested {
  background: linear-gradient(135deg, #1d67ae, #2a7cc8);
  color: #fff;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 6px rgba(29, 103, 174, 0.25);
  white-space: nowrap;
}

.spec-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.spec-meta span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.spec-meta i {
  color: var(--accent);
  width: 14px;
  text-align: center;
}

.spec-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: #f1f6fc;
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 14px;
  text-align: center;
}

.spec-stat .val {
  font-weight: 700;
  color: var(--text-heading);
  font-size: 0.95rem;
}

.spec-stat .lbl {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-top: 2px;
}

.contact-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  text-decoration: none;
  background: #edf4fc;
  color: #1a4f84;
  border: 1px solid #cde0f5;
  transition: all var(--transition);
}

.contact-pill:hover {
  background: #d8e9fc;
  border-color: #a8cdfa;
  color: var(--primary);
}

/* ── Wait Time Badges ─────────────────────────────────────── */
.wait-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  margin-top: auto;
  border: 1px solid transparent;
  gap: 8px;
  flex-wrap: wrap;
}

.wb-icon { margin-right: 6px; }
.wb-label { flex: 1; font-size: 0.78rem; min-width: 140px; }
.wb-days { font-weight: 700; font-size: 0.85rem; white-space: nowrap; }

.wt-low {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.wt-mid {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.wt-high {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.wt-none {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

/* ── Home Page Reference Layout ───────────────────────────── */
.home-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px 1fr;
  background: var(--bg-gradient);
}

.home-layout.sidebar-mini {
  grid-template-columns: 78px 1fr;
}

.home-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fd 100%);
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
  transition: width var(--transition), padding var(--transition);
}

.home-sidebar-toggle {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: #164775;
  display: grid;
  place-items: center;
  cursor: pointer;
  margin-bottom: 16px;
  transition: background var(--transition), border-color var(--transition);
}

.home-sidebar-toggle:hover {
  background: #e9f1fb;
  border-color: #99b4d3;
}

.home-sidebar.mini {
  width: 78px;
  padding: 18px 10px;
}

.home-sidebar.mini .home-sidebar-brand,
.home-sidebar.mini .home-sidebar-nav a span,
.home-sidebar.mini .home-sidebar-footer {
  display: none;
}

.home-sidebar-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 26px;
}

.home-sidebar-logo {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #114a87, #2a7cc8);
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(29, 103, 174, 0.28);
}

.home-sidebar-brand h2 {
  font-size: 1.05rem;
  color: #123d72;
  margin: 0;
}

.home-sidebar-brand p {
  margin: 2px 0 0;
  font-size: 0.74rem;
  color: #5f7897;
}

.home-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.home-sidebar-nav a {
  color: #264f7a;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 10px 14px;
  transition: background var(--transition), color var(--transition);
}

.home-sidebar-nav a:hover {
  background: #dfeafb;
  color: #123d72;
}

.home-sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.home-sidebar-footer p {
  margin: 0;
  font-size: 0.78rem;
  color: #5f7897;
}

.home-sidebar-footer span {
  display: block;
  margin-top: 7px;
  font-size: 0.74rem;
  color: #7e93ad;
}

.home-main {
  min-width: 0;
}

.home-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  height: 72px;
  padding: 0 34px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.home-topbar-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.home-topbar-nav a {
  font-size: 0.83rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #3d6288;
  font-weight: 600;
}

.home-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-btn {
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 9px 18px;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all var(--transition);
}

.home-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #1d67ae, #2a7cc8);
  border-color: #1d67ae;
  box-shadow: 0 4px 14px rgba(29, 103, 174, 0.25);
}

.home-btn-primary:hover {
  color: #fff;
  background: linear-gradient(135deg, #15528d, #1d67ae);
  border-color: #15528d;
}

.home-btn-ghost {
  color: #1d4c7f;
  border-color: var(--border-strong);
  background: #fff;
}

.home-btn-ghost:hover {
  color: #163f6b;
  border-color: #93afd0;
  background: #f0f6ff;
}

.home-hero {
  padding: 48px 34px 64px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
}

.home-hero-copy {
  max-width: 620px;
}

.home-kicker {
  display: inline-block;
  border: 1px solid #c9d9ec;
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 0.74rem;
  color: #2e5886;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: #eef5fc;
}

.home-hero h1 {
  margin-top: 16px;
  font-size: clamp(2rem, 3.8vw, 2.75rem);
  color: #0f355f;
  line-height: 1.18;
}

.home-hero p {
  margin-top: 16px;
  color: #4a6688;
  font-size: 1.02rem;
  max-width: 58ch;
}

.home-hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.home-hero-visual {
  display: grid;
  place-items: center;
}

.hero-screen {
  width: min(560px, 100%);
  background: #fff;
  border: 1px solid #cfe0f2;
  border-radius: 16px;
  box-shadow: 0 16px 44px rgba(22, 66, 112, 0.16);
  padding: 20px;
  animation: heroFloat 5s ease-in-out infinite;
}

.hero-screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef4fb;
}

.hero-screen-header .mock-badge {
  background: #dcfce7;
  color: #15803d;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
}

.hero-screen-bar {
  height: 12px;
  width: 45%;
  border-radius: 6px;
  background: linear-gradient(90deg, #1d67ae, #60a5fa);
  margin-bottom: 14px;
}

.hero-row {
  height: 10px;
  border-radius: 5px;
  background: #e2ecf8;
  margin-bottom: 10px;
}

.hero-row.short { width: 65%; }
.hero-row.medium { width: 82%; }

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.home-section {
  padding: 56px 34px;
}

.home-section h2,
.home-workflow h2 {
  font-size: 1.85rem;
  text-align: center;
  color: #103c6b;
}

.home-section > p {
  margin: 10px auto 0;
  text-align: center;
  color: #5f7897;
  max-width: 65ch;
}

.home-grid {
  display: grid;
  gap: 20px;
  margin-top: 32px;
}

.home-grid.three-up { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-grid.four-up  { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home-grid.two-up   { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.home-feature-card,
.home-quote {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(25, 74, 122, 0.07);
  transition: transform var(--transition), box-shadow var(--transition);
}

.home-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(25, 74, 122, 0.12);
}

.home-feature-card .feat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #e0f2fe;
  color: #0284c7;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  margin-bottom: 14px;
}

.home-feature-card h3 {
  color: #134777;
  font-size: 1.05rem;
}

.home-feature-card p {
  color: #5f7897;
  margin-top: 8px;
  font-size: 0.9rem;
}

.home-workflow {
  background: linear-gradient(135deg, #0f355f 0%, #17487d 100%);
  color: #fff;
  padding: 60px 34px;
}

.home-workflow h2 {
  color: #fff;
}

.home-workflow article {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(6px);
}

.home-workflow article span {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fff;
  color: #134777;
  font-size: 0.9rem;
  font-weight: 700;
}

.home-workflow article h3 {
  margin-top: 14px;
  font-size: 1rem;
  color: #fff;
}

.home-workflow article p {
  margin-top: 8px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
}

.home-footer {
  padding: 32px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  background: #f8fbff;
}

/* ── Auth Pages (Doctor & Patient Login) ───────────────────── */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: var(--bg-main);
  padding: 32px 48px;
  gap: 40px;
  align-items: center;
}

.auth-left {
  background: linear-gradient(145deg, #1A9AA2 0%, #12777D 45%, #21333D 100%);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 16px 40px rgba(26, 154, 162, 0.22);
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(73, 199, 138, 0.28) 0%, transparent 70%);
  pointer-events: none;
}

.auth-left .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.auth-left .brand-logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
}

.auth-left .brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #49C78A, #3FD07C);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  color: #fff;
  box-shadow: 0 4px 12px rgba(73, 199, 138, 0.35);
}

.auth-left .brand-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.auth-left h1 {
  font-size: clamp(1.85rem, 2.8vw, 2.3rem);
  color: #ffffff;
  margin-bottom: 12px;
  line-height: 1.2;
}

.auth-left p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.auth-illustration-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 16px 0 24px;
  position: relative;
}

.auth-illustration-img {
  max-height: 240px;
  width: auto;
  max-width: 90%;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.18));
  transition: transform 0.3s ease;
}

.auth-illustration-img:hover {
  transform: scale(1.02);
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 18px 20px;
  backdrop-filter: blur(8px);
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
}

.auth-feature i {
  color: #B8EFCB;
  font-size: 1rem;
  width: 20px;
}

.auth-right {
  display: flex;
  justify-content: center;
  align-items: center;
}

.auth-card {
  width: min(450px, 100%);
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
}

.auth-card h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-heading);
}

.auth-sub {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-top: 4px;
  margin-bottom: 24px;
}

/* ── Split Form Layout (Feedback, Profile, Dialogs) ───────── */
.split-form-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 26px;
  align-items: start;
}

.split-side-panel {
  background: linear-gradient(145deg, #1A9AA2 0%, #12777D 100%);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  color: #fff;
  box-shadow: var(--shadow-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.split-side-img {
  max-height: 200px;
  width: auto;
  object-fit: contain;
  margin: 12px 0 18px;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
}

.split-side-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.split-side-desc {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.5;
}

/* ── Empty State Illustration ─────────────────────────────── */
.empty-state-card {
  text-align: center;
  padding: 40px 24px;
  background: var(--surface);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
}

.empty-state-img {
  max-height: 140px;
  width: auto;
  margin: 0 auto 16px;
  opacity: 0.85;
  object-fit: contain;
  display: block;
}

.auth-error {
  display: none;
  background: var(--danger-light);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.auth-error.show {
  display: block;
}

.auth-demo-box {
  margin-top: 24px;
  padding: 14px;
  background: #f0f6ff;
  border: 1px solid #d0e1f9;
  border-radius: 10px;
  font-size: 0.82rem;
  color: #264f7a;
}

/* ── Notification Drawer & Modals ─────────────────────────── */
.notif-drawer {
  position: fixed;
  top: 0; right: -360px;
  width: 360px;
  height: 100vh;
  background: #ffffff;
  box-shadow: -6px 0 28px rgba(15, 53, 95, 0.15);
  border-left: 1px solid var(--border);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transition: right var(--transition);
}

.notif-drawer.open {
  right: 0;
}

.notif-drawer-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notif-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notif-item {
  padding: 12px 14px;
  background: #f8fbff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 0.85rem;
  transition: all var(--transition);
}

.notif-item.unread {
  background: #eff6ff;
  border-color: #bfdbfe;
  border-left: 3px solid var(--accent);
}

.notif-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 53, 95, 0.45);
  backdrop-filter: blur(4px);
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(15, 53, 95, 0.25);
  border: 1px solid var(--border);
  width: min(580px, 100%);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 24px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.15rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text-heading);
}

/* ── Spinner & Utilities ──────────────────────────────────── */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #dce7f4;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Comprehensive Responsive Breakpoints ─────────────────── */
@media (max-width: 1180px) {
  .home-layout {
    grid-template-columns: 220px 1fr;
  }
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .home-hero {
    grid-template-columns: 1fr;
    padding: 36px 24px;
  }
  .home-grid.three-up,
  .home-grid.four-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #map-section {
    flex-direction: column !important;
  }
  #map-info-panel {
    width: 100% !important;
    min-height: 280px;
  }
}

@media (max-width: 768px) {
  /* Layout Shell */
  .app-shell {
    overflow-x: hidden;
  }

  .main-content,
  .sidebar.mini ~ .main-content {
    margin-left: 0 !important;
    width: 100%;
  }

  /* Mobile Drawer Sidebar */
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 270px !important;
    transform: translateX(-100%);
    z-index: 1000;
    box-shadow: 12px 0 36px rgba(15, 53, 95, 0.35);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar.mini {
    width: 270px !important;
  }

  .sidebar.mini .sidebar-header {
    flex-direction: row;
    justify-content: space-between;
    padding: 16px 16px;
  }

  .sidebar.mini .logo-info,
  .sidebar.mini .logo-text,
  .sidebar.mini .logo-sub,
  .sidebar.mini .nav-section-label,
  .sidebar.mini .nav-item span {
    display: block !important;
    opacity: 1 !important;
    width: auto !important;
  }

  .sidebar.mini .nav-item {
    justify-content: flex-start;
    padding: 10px 14px;
    width: 100%;
    height: auto;
    margin: 0 0 4px 0;
  }

  /* Topbar on Mobile */
  .topbar {
    padding: 0 16px;
    height: 60px;
  }

  .mobile-menu-btn {
    display: grid !important;
  }

  #sidebar-toggle {
    display: none;
  }

  .topbar-title {
    font-size: 1.05rem;
  }

  .user-pill-name {
    display: none;
  }

  .user-pill {
    padding: 3px;
  }

  /* Content & Grids */
  .page-content {
    padding: 18px 14px 40px;
  }

  .page-header h1 {
    font-size: 1.45rem;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .home-grid.two-up,
  .home-grid.three-up,
  .home-grid.four-up {
    grid-template-columns: 1fr;
  }

  .home-layout,
  .home-layout.sidebar-mini {
    grid-template-columns: 1fr;
  }

  .home-sidebar {
    display: none;
  }

  .home-topbar {
    padding: 0 16px;
    height: 60px;
  }

  .home-topbar-nav {
    display: none;
  }

  .auth-page {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 20px;
  }

  .auth-left {
    padding: 28px 22px;
  }

  .auth-card {
    padding: 24px 20px;
  }

  .notif-drawer {
    width: 100%;
    right: -100%;
  }

  .date-picker-banner {
    padding: 14px 16px;
    flex-direction: column;
    align-items: stretch;
  }

  .date-picker-banner input[type=date],
  .date-picker-banner button {
    width: 100%;
  }

  .card-header {
    padding: 14px 16px;
  }

  .card-body {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .spec-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    padding: 8px 14px;
    font-size: 0.82rem;
  }
}
