@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #6c7ff2;
  --primary-dark: #5a6de0;
  --primary-light: #eef0fd;
  --primary-mid: #8b96f5;
  --sidebar-bg: #6c7ff2;
  --accent-orange: #f9a14b;
  --accent-green: #3dd598;
  --accent-red: #ff6b6b;
  --bg: #eef0f9;
  --surface: #ffffff;
  --surface-soft: #f5f6ff;
  --text-dark: #1a1d3a;
  --text-mid: #5a5f80;
  --text-light: #9a9fb8;
  --border: #e8eaf6;
  --pending-bg: #fff3e6;
  --pending-text: #f59e0b;
  --confirmed-bg: #e6faf4;
  --confirmed-text: #10b981;
  --shadow-sm: 0 2px 8px rgba(108,127,242,0.08);
  --shadow-md: 0 4px 20px rgba(108,127,242,0.12);
  --shadow-lg: 0 8px 32px rgba(108,127,242,0.18);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --font: 'Plus Jakarta Sans', sans-serif;
  --transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}

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

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

.app-shell { display: flex; min-height: 100vh; }

/* SIDEBAR */
.sidebar {
  width: 248px;
  background: linear-gradient(180deg, #6276ee 0%, #586cdf 100%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 16px 12px 14px;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  box-shadow: 8px 0 28px rgba(58,79,201,0.24);
}

.sidebar-logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  margin-bottom: 14px;
}

.sidebar-logo {
  width: 42px; height: 42px;
  background: rgba(255,255,255,0.17);
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 8px 18px rgba(20,26,72,0.2);
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
}

.sidebar-brand-title {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
}

.sidebar-brand-subtitle {
  color: rgba(255,255,255,0.72);
  font-size: 11px;
  font-weight: 600;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  width: 100%;
  padding: 4px;
}

.nav-btn {
  width: 100%;
  min-height: 46px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  color: rgba(255,255,255,0.84);
  text-decoration: none;
  font: inherit;
  transition: var(--transition);
}

.nav-btn-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.14);
  color: currentColor;
  flex-shrink: 0;
  transition: var(--transition);
}

.nav-btn-icon svg {
  width: 17px;
  height: 17px;
}

.nav-btn-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1px;
}

.nav-btn:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}

.nav-btn.active {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.28);
  color: #fff;
  box-shadow: 0 8px 18px rgba(23,31,84,0.24);
}

.nav-btn.active .nav-btn-icon {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 4px 10px rgba(58,79,201,0.22);
}

.sidebar-logout {
  width: 100%;
  margin: 0;
  padding: 11px 14px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 12px;
  color: rgba(255,255,255,0.9);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

.sidebar-logout:hover {
  background: rgba(255,255,255,0.24);
  border-color: rgba(255,255,255,0.34);
  color: #fff;
}

/* MAIN */
.main-area { margin-left: 248px; flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* TOPBAR */
.topbar {
  background: var(--surface);
  padding: 12px 26px;
  display: flex; align-items: center; gap: 18px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}

.topbar-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; margin-right: 10px; }
.topbar-brand-icon {
  width: 32px; height: 32px; background: var(--primary);
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #fff; box-shadow: 0 3px 8px rgba(108,127,242,0.4);
}
.topbar-brand-name { font-size: 19px; font-weight: 800; color: var(--text-dark); letter-spacing: -0.3px; }

.topbar-search { flex: 1; max-width: 320px; position: relative; }
.topbar-search input {
  width: 100%; padding: 9px 14px 9px 40px;
  border: 2px solid var(--border); border-radius: 11px;
  font-family: var(--font); font-size: 13px; color: var(--text-dark);
  background: var(--surface-soft); outline: none; transition: var(--transition);
}
.topbar-search input::placeholder { color: var(--text-light); }
.topbar-search input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(108,127,242,0.1); }
.search-ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--text-light); pointer-events: none; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.topbar-icon-btn {
  width: 36px; height: 36px; background: var(--surface-soft);
  border: 1.5px solid var(--border); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer; transition: var(--transition); position: relative;
}
.topbar-icon-btn:hover { background: var(--primary-light); border-color: var(--primary); }

.notif-dot {
  position: absolute; top: 5px; right: 5px;
  width: 7px; height: 7px; background: var(--accent-orange);
  border-radius: 50%; border: 2px solid #fff;
}

.topbar-user {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 11px 5px 7px;
  background: var(--surface-soft); border: 1.5px solid var(--border);
  border-radius: 11px; cursor: pointer; transition: var(--transition);
}
.topbar-user:hover { background: var(--primary-light); border-color: var(--primary); }

.user-avatar {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}

.user-name { font-size: 13px; font-weight: 700; color: var(--text-dark); line-height: 1.2; }
.user-role { font-size: 11px; color: var(--text-light); font-weight: 500; }

/* PAGE CONTENT */
.page-content { flex: 1; padding: 22px 26px; animation: pageFadeIn 0.3s ease-out; }

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* DASHBOARD LAYOUT */
.dashboard-layout { display: grid; grid-template-columns: 1fr 290px; gap: 22px; }
.dashboard-main { display: flex; flex-direction: column; gap: 20px; }
.dashboard-side { display: flex; flex-direction: column; gap: 16px; }

.admin-dashboard-layout .dashboard-main { gap: 18px; }
.admin-hero-card {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, #f6f8ff 0%, #eef2ff 45%, #f8f4ff 100%);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.admin-hero-card::before {
  content: '';
  position: absolute;
  right: -70px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108,127,242,0.2) 0%, rgba(108,127,242,0) 72%);
}
.admin-hero-card::after {
  content: '';
  position: absolute;
  left: 42%;
  bottom: -86px;
  width: 280px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249,161,75,0.16) 0%, rgba(249,161,75,0) 72%);
}
.admin-hero-content { position: relative; z-index: 1; max-width: 560px; }
.admin-hero-eyebrow {
  color: var(--primary);
  font-size: 12px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 10px;
}
.admin-hero-content h2 {
  color: var(--text-dark);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}
.admin-hero-content h2.admin-welcome-animate {
  animation: adminWelcomeReveal 2.2s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
  will-change: transform, opacity;
}
.admin-hero-content h2 span { color: var(--accent-orange); }
.admin-hero-content p {
  color: var(--text-mid);
  font-size: 14px;
  margin-bottom: 18px;
}
.admin-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-hero-badge-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
}
.admin-hero-badge {
  min-width: 180px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.admin-hero-badge-label {
  color: var(--text-light);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.admin-hero-badge-value {
  color: var(--text-dark);
  font-size: 16px;
  font-weight: 700;
  margin-top: 4px;
}
.admin-kpi-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.admin-kpi-list { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.admin-kpi-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.admin-kpi-item span { font-size: 12px; color: var(--text-mid); font-weight: 600; }
.admin-kpi-item strong { font-size: 14px; color: var(--text-dark); font-weight: 800; }

@keyframes adminWelcomeReveal {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  45% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* WELCOME BANNER */
.welcome-banner {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 26px 30px; display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden; min-height: 120px;
}
.welcome-banner::before {
  content: ''; position: absolute; top: -40px; left: 40%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(108,127,242,0.06) 0%, transparent 70%);
  border-radius: 50%;
}
.welcome-text h2 { font-size: 24px; font-weight: 800; color: var(--text-dark); margin-bottom: 5px; letter-spacing: -0.3px; }
.welcome-text h2 span { color: var(--accent-orange); }
.welcome-text p { font-size: 13px; color: var(--text-mid); font-weight: 500; }
.welcome-illustration { font-size: 80px; line-height: 1; user-select: none; filter: drop-shadow(0 6px 12px rgba(108,127,242,0.15)); }

/* STATS ROW */
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.stat-card {
  background: var(--surface); border-radius: var(--radius-md);
  padding: 18px 20px; display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-sm); transition: var(--transition);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.stat-icon-wrap {
  width: 50px; height: 50px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.stat-icon-wrap.blue   { background: #e5edff; }
.stat-icon-wrap.purple { background: #ede8ff; }
.stat-icon-wrap.orange { background: #fff3e6; }
.stat-icon-wrap.green  { background: #e6faf4; }

.stat-label { font-size: 12px; color: var(--text-mid); font-weight: 600; margin-bottom: 3px; }
.stat-value { font-size: 26px; font-weight: 800; color: var(--text-dark); letter-spacing: -0.4px; }

/* SECTION HEADER */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-title { font-size: 16px; font-weight: 700; color: var(--text-dark); }

.view-all-btn {
  font-size: 13px; font-weight: 600; color: var(--primary);
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; gap: 3px; padding: 4px 8px;
  border-radius: 8px; transition: var(--transition);
}
.view-all-btn:hover { background: var(--primary-light); }

/* APPOINTMENTS TABLE */
.apt-table-wrap {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.apt-table { width: 100%; border-collapse: collapse; }
.apt-table thead tr { background: var(--surface-soft); border-bottom: 2px solid var(--border); }
.apt-table th { padding: 13px 18px; text-align: left; font-size: 12px; font-weight: 700; color: var(--text-mid); }
.apt-table th .sort-ico { font-size: 9px; opacity: 0.45; margin-left: 3px; }
.apt-table tbody tr { border-bottom: 1px solid var(--border); transition: var(--transition); }
.apt-table tbody tr:last-child { border-bottom: none; }
.apt-table tbody tr:hover { background: var(--surface-soft); }
.apt-table td { padding: 13px 18px; font-size: 13px; font-weight: 500; color: var(--text-dark); }

.patient-cell { display: flex; align-items: center; gap: 10px; }
.patient-ava {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), #dde0ff);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0; border: 2px solid var(--border);
}
.patient-name { font-weight: 600; font-size: 13px; }

.status-badge {
  display: inline-flex; align-items: center; padding: 4px 12px;
  border-radius: 20px; font-size: 12px; font-weight: 600;
}
.status-badge.pending   { background: var(--pending-bg);   color: var(--pending-text); }
.status-badge.confirmed { background: var(--confirmed-bg); color: var(--confirmed-text); }
.status-badge.cancelled { background: #ffebee; color: #e53935; }

.more-btn {
  background: none; border: none; cursor: pointer;
  font-size: 17px; color: var(--text-light); padding: 4px 6px;
  border-radius: 7px; transition: var(--transition); line-height: 1;
}
.more-btn:hover { background: var(--border); color: var(--text-mid); }

.table-pagination { display: flex; justify-content: center; gap: 7px; padding: 12px 0; }
.dot-page { width: 7px; height: 7px; border-radius: 50%; background: var(--border); border: none; cursor: pointer; transition: var(--transition); }
.dot-page.active { background: var(--primary); width: 20px; border-radius: 4px; }

/* SIDE PANEL */
.quick-actions { display: flex; flex-direction: column; gap: 10px; }

.qa-btn {
  width: 100%; padding: 14px 18px; border: none; border-radius: var(--radius-md);
  font-family: var(--font); font-size: 14px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 10px; transition: var(--transition);
}
.qa-btn.primary { background: var(--primary); color: #fff; box-shadow: 0 5px 16px rgba(108,127,242,0.32); }
.qa-btn.primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 7px 20px rgba(108,127,242,0.42); }
.qa-btn.secondary { background: var(--primary-light); color: var(--primary); }
.qa-btn.secondary:hover { background: #dde0fc; transform: translateY(-2px); }

.qa-btn-ico {
  width: 30px; height: 30px; border-radius: 9px;
  background: rgba(255,255,255,0.24);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.qa-btn.secondary .qa-btn-ico { background: rgba(108,127,242,0.14); }

/* TODAY APPOINTMENTS MINI */
.today-apt-card { background: var(--surface); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-sm); }
.today-apt-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }

.today-apt-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: 11px;
  transition: var(--transition); cursor: pointer;
}
.today-apt-item:hover { background: var(--surface-soft); }

.today-apt-ava {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), #dde0ff);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0; border: 2px solid var(--border);
}

.today-apt-info { flex: 1; }
.today-apt-name { font-size: 13px; font-weight: 700; color: var(--text-dark); }
.today-apt-doc  { font-size: 11px; color: var(--text-light); font-weight: 500; }

/* GENERIC PAGES */
.page-wrap { max-width: 1400px; }
.page-heading { font-size: 21px; font-weight: 800; color: var(--text-dark); letter-spacing: -0.3px; margin-bottom: 4px; }
.page-sub { font-size: 13px; color: var(--text-mid); font-weight: 500; }

.top-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 14px; }

.search-wrap { position: relative; flex: 1; max-width: 360px; }
.search-wrap input {
  width: 100%; padding: 10px 14px 10px 40px;
  border: 2px solid var(--border); border-radius: 11px;
  font-family: var(--font); font-size: 13px; color: var(--text-dark);
  background: var(--surface); outline: none; transition: var(--transition);
}
.search-wrap input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,127,242,0.1); }
.search-wrap .search-ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--text-light); }

.btn-bar { display: flex; gap: 9px; }
.patient-filters-panel {
  margin-bottom: 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}
.patient-filter-group {
  min-width: 180px;
}

.btn {
  padding: 10px 16px; border: none; border-radius: 11px;
  font-family: var(--font); font-size: 13px; font-weight: 700;
  cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
  transition: var(--transition);
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(108,127,242,0.28); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--text-mid); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-sm { padding: 6px 13px; font-size: 12px; border-radius: 9px; }

/* CARD */
.card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.card-pad { padding: 20px; }

/* DOCTOR GRID */
.doctor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.doctor-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 22px 18px; text-align: center; box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--border); transition: var(--transition);
}
.doctor-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.doctor-ava {
  width: 66px; height: 66px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), #dde0ff);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; margin: 0 auto 12px; border: 3px solid var(--border);
}
.doctor-name { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.doctor-spec { font-size: 12px; color: var(--text-mid); font-weight: 500; margin-bottom: 10px; }
.doctor-meta { font-size: 12px; color: var(--text-mid); line-height: 1.8; text-align: left; margin-bottom: 12px; }
.doctor-meta span { color: var(--text-dark); font-weight: 600; }
.doctor-btns { display: flex; gap: 7px; }
.doctor-btns .action-btn { flex: 1; min-width: 0; }

/* DOCTOR PROFILE */
.profile-page {
  max-width: 900px;
  margin: 0 auto;
  padding-top: 4px;
}

.profile-hero {
  background: linear-gradient(135deg, #f6f8ff 0%, #eef2ff 45%, #f8f4ff 100%);
  border-radius: 24px;
  padding: 22px 24px;
  display: flex;
  gap: 20px;
  align-items: center;
  box-shadow: var(--shadow-md);
  border: 1.5px solid var(--border);
  margin-bottom: 20px;
}

.profile-avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffffff, #dde0ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  border: 3px solid #ffffff;
  box-shadow: 0 8px 20px rgba(108, 127, 242, 0.35);
  flex-shrink: 0;
}

.profile-main {
  flex: 1;
}

.profile-hero-text {
  flex: 1;
}

.profile-name {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}

.profile-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}

.profile-field-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

.profile-exp {
  font-size: 12px;
  color: var(--text-mid);
  font-weight: 600;
}

.profile-email {
  font-size: 13px;
  color: var(--text-light);
}

.profile-body {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 20px 22px 18px;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--border);
  display: grid;
  grid-template-columns: 2fr 1.3fr;
  gap: 18px;
}

.profile-section {
  background: var(--surface-soft);
  border-radius: 16px;
  padding: 14px 16px 16px;
  border: 1px solid var(--border);
}

.profile-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.profile-about-text {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.6;
}

.profile-fee-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
}

.profile-fee-label {
  font-size: 13px;
  color: var(--text-mid);
  font-weight: 600;
}

.profile-fee-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-dark);
}

.profile-fee-input {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.profile-availability {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-mid);
}

.profile-availability input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.profile-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 768px) {
  .profile-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-body {
    grid-template-columns: 1fr;
  }
}

/* MODAL */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(26,29,58,0.42);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; animation: pageFadeIn 0.2s ease-out;
}
.modal {
  background: var(--surface); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg); max-width: 540px; width: 92%;
  max-height: 90vh; overflow-y: auto;
  animation: modalPop 0.28s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalPop { from { opacity:0; transform: scale(0.9) translateY(16px); } to { opacity:1; transform: scale(1) translateY(0); } }

.modal-head { padding: 20px 22px 16px; border-bottom: 1.5px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 18px; font-weight: 800; color: var(--text-dark); }
.modal-close-btn {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--surface-soft); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; cursor: pointer; transition: var(--transition); line-height: 1;
}
.modal-close-btn:hover { background: #ffebee; border-color: var(--accent-red); color: var(--accent-red); }
.modal-body { padding: 20px 22px; }
.modal-foot { padding: 14px 22px 20px; display: flex; gap: 9px; justify-content: flex-end; border-top: 1.5px solid var(--border); }

/* FORM */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { margin-bottom: 14px; }
.form-label { display: block; margin-bottom: 5px; font-size: 12px; font-weight: 700; color: var(--text-mid); }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 13px;
  border: 2px solid var(--border); border-radius: 11px;
  font-family: var(--font); font-size: 13px; color: var(--text-dark);
  background: var(--surface-soft); outline: none; transition: var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(108,127,242,0.1); }
.form-textarea { min-height: 85px; resize: vertical; }

/* TABLE generic */
.table-wrap {
  border-radius: var(--radius-lg);
  overflow-x: auto;
  overflow-y: hidden;
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}
.generic-table { width: 100%; min-width: 760px; border-collapse: collapse; background: var(--surface); }
.generic-table thead tr { background: var(--surface-soft); border-bottom: 2px solid var(--border); }
.generic-table th { padding: 12px 18px; text-align: left; font-size: 11px; font-weight: 700; color: var(--text-mid); text-transform: uppercase; letter-spacing: 0.5px; }
.generic-table tbody tr { border-bottom: 1px solid var(--border); transition: var(--transition); }
.generic-table tbody tr:last-child { border-bottom: none; }
.generic-table tbody tr:hover { background: var(--surface-soft); }
.generic-table td { padding: 13px 18px; font-size: 13px; font-weight: 500; color: var(--text-dark); }

.icon-action-btn { background: none; border: none; cursor: pointer; padding: 5px; border-radius: 7px; font-size: 15px; transition: var(--transition); opacity: 0.55; line-height: 1; }
.icon-action-btn:hover { opacity: 1; background: var(--surface-soft); transform: scale(1.15); }

.table-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 74px;
  padding: 6px 10px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-mid);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
}

.action-btn span {
  font-size: 12px;
  line-height: 1;
}

.action-btn.action-view {
  color: #2b6cb0;
  border-color: #c8def8;
  background: #f0f7ff;
}

.action-btn.action-view:hover {
  background: #e2f0ff;
  border-color: #9ec5f0;
}

.action-btn.action-edit {
  color: #4f46e5;
  border-color: #d9d6ff;
  background: #f3f2ff;
}

.action-btn.action-edit:hover {
  background: #e8e6ff;
  border-color: #bcb8ff;
}

.action-btn.action-delete {
  color: #dc2626;
  border-color: #f8c5c5;
  background: #fff3f3;
}

.action-btn.action-delete:hover {
  background: #ffe7e7;
  border-color: #eea9a9;
}

.action-btn.action-neutral {
  color: var(--text-mid);
  border-color: var(--border);
  background: var(--surface-soft);
}

.action-btn.action-neutral:hover {
  color: var(--text-dark);
  border-color: #d7dbee;
  background: #eceffa;
}

/* SETTINGS */
.settings-grid { display: grid; grid-template-columns: 260px 1fr; gap: 22px; }
.settings-nav { background: var(--surface); border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow-sm); height: fit-content; }
.settings-nav-item { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--transition); color: var(--text-mid); border: none; background: none; width: 100%; text-align: left; }
.settings-nav-item:hover { background: var(--surface-soft); color: var(--text-dark); }
.settings-nav-item.active { background: var(--primary-light); color: var(--primary); }
.settings-form { background: var(--surface); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.settings-section-title { font-size: 15px; font-weight: 700; color: var(--text-dark); margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1.5px solid var(--border); }

/* REPORTS */
.report-type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-bottom: 24px; }
.report-type-card { background: var(--surface); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); border: 1.5px solid var(--border); cursor: pointer; transition: var(--transition); text-align: center; }
.report-type-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.report-type-icon { font-size: 38px; margin-bottom: 12px; }
.report-type-title { font-size: 14px; font-weight: 700; color: var(--text-dark); margin-bottom: 5px; }
.report-type-desc { font-size: 12px; color: var(--text-mid); }

/* MEDICAL RECORDS */
.records-list { display: flex; flex-direction: column; gap: 12px; }
.record-card { background: var(--surface); border-radius: var(--radius-md); border: 1.5px solid var(--border); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); }
.record-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.record-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 14px 18px; }
.record-patient { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.record-id { font-size: 11px; color: var(--text-light); }
.record-date-val { font-size: 13px; font-weight: 600; color: var(--primary); }
.record-doctor { font-size: 11px; color: var(--text-light); }
.record-body { display: grid; grid-template-columns: 1fr 2fr; gap: 14px; padding: 12px 18px; background: var(--surface-soft); }
.record-field-label { font-size: 11px; font-weight: 700; color: var(--text-mid); text-transform: uppercase; margin-bottom: 3px; }
.record-field-val { font-size: 13px; font-weight: 500; }
.record-foot { padding: 11px 18px; display: flex; gap: 9px; }

/* LOGIN */
.login-root { min-height: 100vh; display: flex; background: var(--bg); }
.login-panel-left {
  width: 44%;
  background: linear-gradient(145deg, var(--primary) 0%, #8b8ff5 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px; color: #fff; position: relative; overflow: hidden;
}
.login-panel-left::before { content: ''; position: absolute; top: -80px; right: -80px; width: 320px; height: 320px; background: rgba(255,255,255,0.08); border-radius: 50%; }
.login-panel-left::after  { content: ''; position: absolute; bottom: -100px; left: -60px; width: 260px; height: 260px; background: rgba(255,255,255,0.06); border-radius: 50%; }

.login-logo-area { display: flex; align-items: center; gap: 12px; margin-bottom: 44px; z-index: 1; }
.login-logo-icon { width: 50px; height: 50px; background: rgba(255,255,255,0.2); border-radius: 15px; display: flex; align-items: center; justify-content: center; font-size: 25px; }
.login-logo-name { font-size: 26px; font-weight: 800; }
.login-illus { font-size: 110px; margin-bottom: 28px; z-index: 1; filter: drop-shadow(0 8px 20px rgba(0,0,0,0.12)); }
.login-left-title { font-size: 26px; font-weight: 800; text-align: center; margin-bottom: 8px; z-index: 1; }
.login-left-sub { font-size: 14px; opacity: 0.78; text-align: center; line-height: 1.6; z-index: 1; max-width: 280px; }

.login-panel-right { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px; }
.login-form-box { width: 100%; max-width: 380px; }
.login-form-title { font-size: 28px; font-weight: 800; color: var(--text-dark); margin-bottom: 5px; letter-spacing: -0.4px; }
.login-form-sub { font-size: 13px; color: var(--text-mid); margin-bottom: 28px; }

.signup-main-icon {
  font-size: 82px;
  line-height: 1;
  opacity: 0.92;
  margin-bottom: 18px;
}
.login-form { display: flex; flex-direction: column; gap: 16px; }

.login-submit {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  color: #fff; border: none; border-radius: 13px;
  font-family: var(--font); font-size: 15px; font-weight: 700;
  cursor: pointer; transition: var(--transition);
  box-shadow: 0 5px 18px rgba(108,127,242,0.38); margin-top: 4px;
}
.login-submit:hover { transform: translateY(-2px); box-shadow: 0 7px 24px rgba(108,127,242,0.48); }

.login-row { display: flex; justify-content: space-between; align-items: center; }
.login-check { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-mid); cursor: pointer; }
.login-check input { width: 15px; height: 15px; accent-color: var(--primary); }
.login-forgot { font-size: 13px; font-weight: 600; color: var(--primary); text-decoration: none; }
.login-forgot:hover { text-decoration: underline; }
.login-demo { margin-top: 22px; padding: 13px; background: var(--surface-soft); border-radius: 11px; border: 1.5px solid var(--border); text-align: center; font-size: 12px; color: var(--text-mid); }
.login-demo strong { color: var(--primary); }

/* Role selector on Welcome */
.role-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.role-option {
  position: relative;
  overflow: hidden;
  min-height: 106px;
  padding: 10px 10px 9px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(165deg, #ffffff 0%, #f6f7ff 100%);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  font-family: var(--font);
  color: var(--text-mid);
  text-align: left;
  transition: var(--transition);
}
.role-option::after {
  content: '';
  position: absolute;
  right: -18px;
  bottom: -18px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108,127,242,0.2) 0%, rgba(108,127,242,0) 70%);
  pointer-events: none;
}
.role-option:hover {
  transform: translateY(-2px);
  border-color: #b8c1ff;
  box-shadow: 0 10px 24px rgba(108,127,242,0.15);
}
.role-option.selected {
  border-color: var(--primary);
  background: linear-gradient(165deg, #f2f4ff 0%, #e7ebff 100%);
  box-shadow: 0 0 0 2px rgba(108,127,242,0.16), 0 12px 28px rgba(108,127,242,0.22);
}
.role-option-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #dbe1ff;
  color: var(--primary);
  box-shadow: 0 4px 10px rgba(108,127,242,0.15);
}
.role-option-icon svg {
  width: 18px;
  height: 18px;
}
.role-option-icon-admin { color: #5567de; }
.role-option-icon-doctor { color: #3a8f8c; }
.role-option-icon-receptionist { color: #8b5a2b; }
.role-option-label {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #44527a;
  line-height: 1.1;
}
.role-option-desc {
  font-size: 11px;
  line-height: 1.3;
  color: #6f7794;
}

@media (max-width: 900px) {
  .role-selector { grid-template-columns: 1fr; }
  .role-option { min-height: 108px; }
}

/* PATIENT PAGE */
.patient-page { min-height: 100vh; background: var(--bg); }
.patient-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 12px 28px;
  display: flex; align-items: center; gap: 32px;
  box-shadow: var(--shadow-sm);
}
.patient-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-dark); }
.patient-logo-icon {
  width: 38px; height: 38px;
  background: var(--primary); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff;
}
.patient-logo-text { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }
.patient-nav { display: flex; gap: 8px; flex: 1; }
.patient-nav a {
  padding: 8px 16px; border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--text-mid);
  text-decoration: none; transition: var(--transition);
}
.patient-nav a:hover { background: var(--primary-light); color: var(--primary); }
.patient-nav a.active { background: var(--primary-light); color: var(--primary); }
.patient-header-right { display: flex; align-items: center; gap: 12px; }
.patient-user-name { font-size: 13px; font-weight: 600; color: var(--text-dark); }

.patient-main { }
.patient-hero {
  position: relative; min-height: 320px;
  background: linear-gradient(135deg, var(--primary) 0%, #8b8ff5 50%, #a8acf8 100%);
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 48px 24px; overflow: hidden;
}
.patient-hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}
.patient-hero-content { position: relative; z-index: 1; max-width: 560px; }
.patient-hero h1, .patient-hero h2 { font-size: 32px; font-weight: 800; color: #fff; margin-bottom: 12px; letter-spacing: -0.4px; }
.patient-hero p { font-size: 16px; color: rgba(255,255,255,0.9); margin-bottom: 20px; line-height: 1.5; }
.patient-hero-cta { padding: 12px 28px; font-size: 15px; }
.patient-hero-secondary { min-height: 220px; background: linear-gradient(135deg, #5a6de0 0%, var(--primary) 100%); }

.patient-section { padding: 40px 28px; max-width: 1200px; margin: 0 auto; }
.patient-section-title { font-size: 24px; font-weight: 800; color: var(--text-dark); margin-bottom: 24px; letter-spacing: -0.3px; }

.patient-speciality-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px;
}
.patient-speciality-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 20px 16px; border-radius: 16px;
  background: var(--surface); border: 2px solid var(--border);
  cursor: pointer; transition: var(--transition);
  font-family: var(--font);
}
.patient-speciality-card:hover { border-color: var(--primary); background: var(--primary-light); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.patient-speciality-icon { font-size: 36px; }
.patient-speciality-label { font-size: 12px; font-weight: 600; color: var(--text-dark); text-align: center; line-height: 1.3; }

.patient-doctors-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px;
}
.patient-doctor-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 24px; text-align: center; box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--border); transition: var(--transition);
}
.patient-doctor-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.patient-doctor-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), #dde0ff);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; margin: 0 auto 14px; border: 3px solid var(--border);
}
.patient-doctor-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.patient-doctor-spec { font-size: 13px; color: var(--primary); font-weight: 600; margin-bottom: 4px; }
.patient-doctor-exp { font-size: 12px; color: var(--text-mid); margin-bottom: 14px; }
.patient-more-wrap { text-align: center; margin-top: 28px; }

.patient-footer {
  background: var(--text-dark); color: #fff; padding: 48px 28px 24px;
  margin-top: 40px;
}
.patient-footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px;
  max-width: 1200px; margin: 0 auto 32px;
}
.patient-footer-brand .patient-logo { color: #fff; }
.patient-footer-brand .patient-logo-icon { background: rgba(255,255,255,0.2); }
.patient-footer-desc { font-size: 14px; color: rgba(255,255,255,0.8); line-height: 1.6; margin-bottom: 16px; max-width: 320px; }
.patient-footer-contact { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: rgba(255,255,255,0.9); }
.patient-footer-links h4 { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: #fff; }
.patient-footer-links a {
  display: block; font-size: 13px; color: rgba(255,255,255,0.75);
  text-decoration: none; margin-bottom: 8px; transition: var(--transition);
}
.patient-footer-links a:hover { color: #fff; }
.patient-footer-bottom {
  text-align: center; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 12px; color: rgba(255,255,255,0.6);
}

/* DOCTOR DASHBOARD */
.doctor-dashboard {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.doctor-dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, #f6f8ff 0%, #eef2ff 45%, #f8f4ff 100%);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.doctor-dashboard-header h2 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
}

.doctor-dashboard-header p {
  font-size: 13px;
  color: var(--text-mid);
}

.doctor-dashboard-list {
  margin-top: 8px;
}

.doctor-status-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-circle {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--surface-soft);
  color: var(--text-mid);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-circle.success {
  background: #e6faf4;
  border-color: #b3f2d8;
  color: #059669;
}

.btn-circle.danger {
  background: #fff3f3;
  border-color: #ffcdd2;
  color: #dc2626;
}

.btn-circle:hover:not(:disabled) {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 4px 10px rgba(26, 29, 58, 0.12);
}

.btn-circle:disabled {
  opacity: 0.5;
  cursor: default;
  box-shadow: none;
}

@media (max-width: 900px) {
  .login-panel-left { display: none; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .patient-nav { display: none; }
  .patient-footer-grid { grid-template-columns: 1fr; }
  .admin-hero-card { flex-direction: column; padding: 22px; border-radius: 20px; }
  .admin-hero-content h2 { font-size: 28px; }
  .admin-hero-content p { font-size: 13px; }
  .admin-kpi-card, .today-apt-card { padding: 14px; }
  .modal { width: min(96vw, 620px); max-height: 88vh; }
  .modal-head { padding: 16px 18px 12px; }
  .modal-body { padding: 16px 18px; }
  .modal-foot { padding: 12px 18px 16px; }
  .admin-hero-badge { width: 100%; }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 78px;
    align-items: center;
    padding: 20px 0 16px;
  }
  .sidebar-logo-wrap {
    display: block;
    margin-bottom: 18px;
    padding: 0;
  }
  .sidebar-brand { display: none; }
  .sidebar-nav {
    gap: 6px;
    padding: 0 10px;
  }
  .nav-btn {
    min-height: 46px;
    justify-content: center;
    gap: 0;
    padding: 0;
  }
  .nav-btn-label { display: none; }
  .sidebar-logout {
    width: calc(100% - 20px);
    margin: 0 10px;
    padding: 9px 0;
  }
  .main-area { margin-left: 78px; }
}
@media (max-width: 640px) {
  .sidebar { width: 66px; }
  .sidebar-nav { padding: 0 8px; }
  .nav-btn-icon { width: 24px; height: 24px; }
  .sidebar-logout { width: calc(100% - 16px); margin: 0 8px; }
  .main-area { margin-left: 66px; }
  .page-content { padding: 14px; }
  .stats-row { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .patient-header { padding: 12px 16px; gap: 16px; }
  .patient-section { padding: 28px 16px; }
  .patient-hero h1, .patient-hero h2 { font-size: 24px; }
  .patient-speciality-grid { grid-template-columns: repeat(2, 1fr); }
  .patient-doctors-grid { grid-template-columns: 1fr; }
  .top-bar { flex-direction: column; align-items: stretch; }
  .btn-bar { flex-wrap: wrap; }
  .search-wrap { max-width: 100%; }
  .admin-hero-card { padding: 16px; border-radius: 16px; gap: 12px; }
  .admin-hero-content h2 { font-size: 23px; line-height: 1.15; }
  .admin-hero-actions { width: 100%; }
  .admin-hero-actions .btn { flex: 1; justify-content: center; min-width: 0; }
  .generic-table { min-width: 640px; }
  .apt-table { min-width: 640px; }
  .modal { width: 96vw; max-height: 90vh; border-radius: 14px; }
  .modal-title { font-size: 16px; }
  .modal-head { padding: 14px 14px 10px; }
  .modal-body { padding: 14px; }
  .modal-foot { padding: 10px 14px 14px; flex-wrap: wrap; justify-content: stretch; }
  .modal-foot .btn { width: 100%; justify-content: center; }
  .patient-filters-panel {
    flex-direction: column;
    align-items: stretch;
  }
  .patient-filter-group {
    min-width: 100%;
  }
}

