/* ══════════════════════════════════════════════════
   BerithSystems Healthcare — Global Design System
   Based on makeO.app layout patterns
══════════════════════════════════════════════════ */

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

:root {
  --teal:        #0D7C6E;
  --teal-light:  #12A090;
  --teal-dark:   #085A51;
  --navy:        #0B2545;
  --navy-soft:   #1A3A5C;
  --sky:         #E8F7F5;
  --sky-mid:     #C8EDE9;
  --accent:      #F4A723;
  --accent-soft: #FFF3D6;
  --coral:       #F25C5C;
  --coral-soft:  #FFEEEE;
  --white:       #FFFFFF;
  --off-white:   #F7FAFA;
  --gray-light:  #F0F4F4;
  --gray-mid:    #B8C8C8;
  --gray-text:   #5A7070;
  --text:        #172B2B;
  --purple:      #7C3AED;
  --purple-soft: #F0EEFF;
  --green:       #16A34A;
  --green-soft:  #DCFCE7;

  --radius-sm:   10px;
  --radius-md:   16px;
  --radius-lg:   24px;
  --shadow-sm:   0 2px 12px rgba(13,124,110,.08);
  --shadow-md:   0 6px 28px rgba(13,124,110,.14);
  --shadow-lg:   0 16px 56px rgba(13,124,110,.18);

  --sidebar-w:   260px;
  --topbar-h:    64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; color: var(--text); background: var(--off-white); overflow-x: hidden; }
h1,h2,h3,h4,h5,h6 { font-family: 'Sora', sans-serif; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ── Dashboard Layout ─────────────────────────────── */
.dash-wrapper { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 500;
  display: flex; flex-direction: column;
  transition: transform .3s ease;
  overflow-y: auto;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--teal-light), var(--teal-dark));
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; font-weight: 800; font-family: 'Sora', sans-serif;
}
.logo-text { font-family: 'Sora', sans-serif; font-size: 15px; font-weight: 700; color: #fff; line-height: 1.2; }
.logo-text span { color: var(--accent); }
.logo-sub { font-size: 10px; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: 1px; }

.sidebar-user {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 10px;
}
.user-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-light), var(--teal-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff; font-family: 'Sora', sans-serif;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: rgba(255,255,255,.5); text-transform: capitalize; }

.sidebar-nav { flex: 1; padding: 12px 12px; }
.nav-section-label { font-size: 10px; font-weight: 700; color: rgba(255,255,255,.35); text-transform: uppercase; letter-spacing: 1.5px; padding: 12px 8px 6px; font-family: 'Sora', sans-serif; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  color: rgba(255,255,255,.65); font-size: 13.5px; font-weight: 500;
  margin-bottom: 2px; cursor: pointer; transition: all .2s;
  text-decoration: none;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: linear-gradient(135deg, rgba(18,160,144,.35), rgba(13,124,110,.25)); color: #fff; font-weight: 600; }
.nav-item.active .nav-icon { color: var(--teal-light); }
.nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-badge { margin-left: auto; background: var(--coral); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 20px; min-width: 20px; text-align: center; }
.nav-badge.green { background: var(--green); }

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.logout-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--coral); font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: all .2s; width: 100%; border: none;
  background: transparent; text-decoration: none;
}
.logout-btn:hover { background: rgba(242,92,92,.12); }

/* ── Main content ──────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex; flex-direction: column;
  min-height: 100vh;
}

/* ── Topbar ──────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 400;
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--sky-mid);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  box-shadow: var(--shadow-sm);
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; flex-direction: column; gap: 5px; }
.menu-toggle span { display: block; width: 20px; height: 2px; background: var(--navy); border-radius: 2px; }
.topbar-title { font-family: 'Sora', sans-serif; font-size: 18px; font-weight: 700; color: var(--navy); }
.topbar-right { display: flex; align-items: center; gap: 16px; }

.notif-btn {
  position: relative; background: var(--gray-light); border: none;
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 16px; transition: background .2s; text-decoration: none;
}
.notif-btn:hover { background: var(--sky); }
.notif-dot {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--coral); border: 2px solid #fff;
}
.notif-count {
  position: absolute; top: -2px; right: -4px;
  background: var(--coral); color: #fff;
  font-size: 10px; font-weight: 700; padding: 1px 5px;
  border-radius: 20px; min-width: 18px; text-align: center;
}
.topbar-user {
  display: flex; align-items: center; gap: 8px;
  background: var(--sky); padding: 6px 12px 6px 6px;
  border-radius: 30px; cursor: pointer; text-decoration: none;
}
.topbar-user .t-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-light), var(--teal-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; font-family: 'Sora', sans-serif;
}
.topbar-user .t-name { font-size: 13px; font-weight: 600; color: var(--navy); }

/* ── Page body ──────────────────────────────────── */
.page-body { padding: 28px; flex: 1; }

.page-header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.page-header h1 { font-size: 24px; font-weight: 800; color: var(--navy); }
.page-header p { font-size: 14px; color: var(--gray-text); margin-top: 4px; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--gray-text); margin-bottom: 6px; }
.breadcrumb a { color: var(--teal); }
.breadcrumb span { color: var(--gray-mid); }

/* ── Stat Cards ─────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: #fff; border-radius: var(--radius-md);
  padding: 20px; border: 1.5px solid var(--sky-mid);
  display: flex; align-items: center; gap: 14px;
  transition: box-shadow .2s, transform .2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.stat-icon.teal   { background: var(--sky); }
.stat-icon.amber  { background: var(--accent-soft); }
.stat-icon.coral  { background: var(--coral-soft); }
.stat-icon.purple { background: var(--purple-soft); }
.stat-icon.green  { background: var(--green-soft); }
.stat-num { font-family: 'Sora', sans-serif; font-size: 26px; font-weight: 800; color: var(--navy); }
.stat-label { font-size: 12px; color: var(--gray-text); margin-top: 2px; }
.stat-change { font-size: 11px; margin-top: 4px; font-weight: 600; }
.stat-change.up { color: var(--green); }
.stat-change.down { color: var(--coral); }

/* ── Cards ──────────────────────────────────────── */
.card {
  background: #fff;
  border: 1.5px solid var(--sky-mid);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.card-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--sky-mid);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 15px; font-weight: 700; color: var(--navy); font-family: 'Sora', sans-serif; }
.card-body { padding: 20px; }

/* ── Tables ─────────────────────────────────────── */
.table-responsive { overflow-x: auto; }
.table {
  width: 100%; border-collapse: collapse;
  font-size: 14px;
}
.table th {
  padding: 12px 16px; text-align: left;
  background: var(--sky); color: var(--navy);
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  font-family: 'Sora', sans-serif; white-space: nowrap;
}
.table td {
  padding: 14px 16px; border-bottom: 1px solid var(--gray-light);
  color: var(--text); vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #FAFEFE; }
.table .td-small { font-size: 12px; color: var(--gray-text); }

/* ── Badges ─────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; font-family: 'Sora', sans-serif;
  white-space: nowrap;
}
.badge-success  { background: var(--green-soft); color: var(--green); }
.badge-warning  { background: var(--accent-soft); color: #B45309; }
.badge-danger   { background: var(--coral-soft); color: var(--coral); }
.badge-info     { background: #EFF6FF; color: #2563EB; }
.badge-secondary{ background: var(--gray-light); color: var(--gray-text); }
.badge-teal     { background: var(--sky); color: var(--teal); }
.badge-purple   { background: var(--purple-soft); color: var(--purple); }

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600; font-family: 'Sora', sans-serif;
  border: none; cursor: pointer; text-decoration: none;
  transition: all .2s; white-space: nowrap;
}
.btn-primary { background: linear-gradient(135deg, var(--teal-light), var(--teal-dark)); color: #fff; box-shadow: 0 4px 14px rgba(13,124,110,.25); }
.btn-primary:hover { opacity: .9; transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1.5px solid var(--teal); color: var(--teal); }
.btn-outline:hover { background: var(--sky); }
.btn-danger { background: var(--coral); color: #fff; }
.btn-danger:hover { opacity: .9; }
.btn-warning { background: var(--accent); color: #fff; }
.btn-secondary { background: var(--gray-light); color: var(--navy); }
.btn-secondary:hover { background: var(--sky); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 13px 26px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon { padding: 8px; border-radius: 8px; background: var(--gray-light); color: var(--navy); }
.btn-icon:hover { background: var(--sky); color: var(--teal); }

/* ── Forms ──────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 7px; font-family: 'Sora', sans-serif; }
.form-label .required { color: var(--coral); margin-left: 3px; }
.form-control {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--sky-mid); border-radius: var(--radius-sm);
  font-size: 14px; font-family: 'DM Sans', sans-serif; color: var(--text);
  background: #fff; transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.form-control:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,124,110,.1); }
.form-control::placeholder { color: var(--gray-mid); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: 12px; color: var(--gray-text); margin-top: 5px; }
.form-error { font-size: 12px; color: var(--coral); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.input-group { position: relative; }
.input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 16px; color: var(--gray-mid); pointer-events: none; }
.input-group .form-control { padding-left: 38px; }
.input-suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--gray-text); }

/* ── Alerts / Flash ─────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px; border-radius: var(--radius-sm);
  font-size: 14px; margin-bottom: 20px;
}
.alert-success { background: var(--green-soft); color: #15803D; border-left: 4px solid #16A34A; }
.alert-error   { background: var(--coral-soft); color: #B91C1C; border-left: 4px solid var(--coral); }
.alert-warning { background: var(--accent-soft); color: #92400E; border-left: 4px solid var(--accent); }
.alert-info    { background: #EFF6FF; color: #1D4ED8; border-left: 4px solid #3B82F6; }
.alert-icon { font-size: 18px; flex-shrink: 0; }

/* ── Search bar ─────────────────────────────────── */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 20px;
}
.search-input-wrap { position: relative; flex: 1; min-width: 200px; }
.search-input-wrap .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray-mid); font-size: 15px; }
.search-input-wrap input { width: 100%; padding: 9px 14px 9px 36px; border: 1.5px solid var(--sky-mid); border-radius: 8px; font-size: 14px; font-family: 'DM Sans', sans-serif; outline: none; }
.search-input-wrap input:focus { border-color: var(--teal); }

/* ── Pagination ─────────────────────────────────── */
.pagination { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 20px; }
.page-item {
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; font-family: 'Sora', sans-serif;
  border: 1.5px solid var(--sky-mid); background: #fff; color: var(--navy);
  cursor: pointer; text-decoration: none; transition: all .2s;
}
.page-item:hover, .page-item.active { background: var(--teal); color: #fff; border-color: var(--teal); }
.page-item.disabled { opacity: .5; pointer-events: none; }

/* ── Modal ──────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 1000;
  align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius-lg);
  width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn .25s ease;
}
@keyframes modalIn { from { opacity:0; transform: scale(.95); } to { opacity:1; transform: scale(1); } }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--sky-mid); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 17px; font-weight: 700; color: var(--navy); font-family: 'Sora', sans-serif; }
.modal-close { background: var(--gray-light); border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: var(--coral-soft); color: var(--coral); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--sky-mid); display: flex; gap: 10px; justify-content: flex-end; }

/* ── Avatar/profile pic ─────────────────────────── */
.avatar {
  border-radius: 50%; object-fit: cover;
  background: linear-gradient(135deg, var(--teal-light), var(--teal-dark));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: 'Sora', sans-serif; font-weight: 700;
  flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-md { width: 44px; height: 44px; font-size: 15px; }
.avatar-lg { width: 60px; height: 60px; font-size: 20px; }
.avatar-xl { width: 80px; height: 80px; font-size: 26px; }

/* ── Doctor / Patient card ──────────────────────── */
.person-card {
  background: #fff; border: 1.5px solid var(--sky-mid);
  border-radius: var(--radius-md); padding: 20px;
  transition: box-shadow .2s, transform .2s;
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: var(--text);
}
.person-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--teal); }
.person-info .name { font-size: 15px; font-weight: 700; color: var(--navy); font-family: 'Sora', sans-serif; }
.person-info .meta { font-size: 12px; color: var(--gray-text); margin-top: 3px; }
.person-info .fee  { font-size: 14px; font-weight: 700; color: var(--teal); margin-top: 4px; }
.doctor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* ── Steps / flow ───────────────────────────────── */
.steps-indicator {
  display: flex; align-items: center; gap: 0;
  margin-bottom: 28px; flex-wrap: wrap;
}
.step-item { display: flex; align-items: center; flex: 1; min-width: 0; }
.step-circle {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gray-light); border: 2px solid var(--gray-mid);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; font-family: 'Sora', sans-serif;
  color: var(--gray-text); flex-shrink: 0; transition: all .3s;
}
.step-circle.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.step-circle.done { background: var(--green); border-color: var(--green); color: #fff; }
.step-label { font-size: 12px; color: var(--gray-text); margin-top: 4px; text-align: center; }
.step-line { flex: 1; height: 2px; background: var(--gray-light); margin: 0 4px; }
.step-line.done { background: var(--teal); }

/* ── Medicine card ───────────────────────────────── */
.med-card {
  background: #fff; border: 1.5px solid var(--sky-mid);
  border-radius: var(--radius-md); padding: 16px;
  transition: box-shadow .2s, transform .2s;
  display: flex; flex-direction: column;
}
.med-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--teal); }
.med-card-name { font-size: 14px; font-weight: 700; color: var(--navy); font-family: 'Sora', sans-serif; }
.med-card-cat  { font-size: 11px; color: var(--gray-text); margin-top: 3px; }
.med-card-price { font-size: 18px; font-weight: 800; color: var(--teal); font-family: 'Sora', sans-serif; margin-top: 10px; }
.med-card-mrp  { font-size: 12px; color: var(--gray-mid); text-decoration: line-through; margin-left: 6px; }
.med-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }

/* ── Appointment card ────────────────────────────── */
.appt-card {
  background: #fff; border-radius: var(--radius-md);
  border: 1.5px solid var(--sky-mid); padding: 16px 20px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  transition: box-shadow .2s;
}
.appt-card:hover { box-shadow: var(--shadow-sm); }
.appt-date-box {
  background: var(--sky); border-radius: 10px;
  padding: 10px 14px; text-align: center; flex-shrink: 0;
  min-width: 60px;
}
.appt-day  { font-size: 20px; font-weight: 800; color: var(--navy); font-family: 'Sora', sans-serif; line-height: 1; }
.appt-mon  { font-size: 11px; color: var(--teal); font-weight: 600; text-transform: uppercase; }
.appt-time { font-size: 11px; color: var(--gray-text); margin-top: 4px; }

/* ── Loading overlay ─────────────────────────────── */
.loading { display: flex; align-items: center; justify-content: center; padding: 60px; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--sky-mid); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty state ─────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon  { font-size: 56px; opacity: .4; margin-bottom: 16px; }
.empty-title { font-size: 18px; font-weight: 700; color: var(--navy); font-family: 'Sora', sans-serif; margin-bottom: 8px; }
.empty-text  { font-size: 14px; color: var(--gray-text); max-width: 360px; margin: 0 auto 20px; }

/* ── Toast notifications ─────────────────────────── */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: #fff; border-radius: var(--radius-sm);
  padding: 14px 18px; box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--teal);
  display: flex; align-items: center; gap: 10px;
  max-width: 360px; animation: slideIn .3s ease;
  font-size: 14px; color: var(--text);
}
.toast.error  { border-color: var(--coral); }
.toast.warn   { border-color: var(--accent); }
@keyframes slideIn { from { opacity:0; transform: translateX(40px); } to { opacity:1; transform: translateX(0); } }

/* ── Misc utilities ─────────────────────────────── */
.text-teal    { color: var(--teal); }
.text-navy    { color: var(--navy); }
.text-coral   { color: var(--coral); }
.text-gray    { color: var(--gray-text); }
.text-accent  { color: var(--accent); }
.text-green   { color: var(--green); }
.text-sm      { font-size: 12px; }
.text-md      { font-size: 14px; }
.text-bold    { font-weight: 700; }
.text-sora    { font-family: 'Sora', sans-serif; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mb-0   { margin-bottom: 0; }
.mb-8   { margin-bottom: 8px; }
.mb-16  { margin-bottom: 16px; }
.mb-24  { margin-bottom: 24px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.w-full { width: 100%; }
.flex-1 { flex: 1; }
.divider { height: 1px; background: var(--sky-mid); margin: 20px 0; }
.rx-tag { background: var(--coral); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }

/* ── Sidebar overlay (mobile) ─────────────────────── */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 450; }

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --sidebar-w: 220px; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; }
  .menu-toggle { display: flex; }
  .page-body { padding: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .doctor-grid, .med-grid { grid-template-columns: 1fr; }
  .topbar { padding: 0 16px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-header { flex-direction: column; }
}
