/* ═══════════════════════════════════════════════════════════════
   pointment.css  —  Pointment Doctor Dashboard
   Full stylesheet (base + blue medical theme merged)
   Link this instead of the inline <style> block.
   ═══════════════════════════════════════════════════════════════ */

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

/* ── DESIGN TOKENS ────────────────────────────────────────────── */
:root {
  /* Brand blue palette */
  --primary:        #0077b6;
  --primary-dark:   #023e8a;
  --primary-light:  #48cae4;
  --accent:         #f77f00;
  --accent2:        #2ec4b6;

  /* Surfaces */
  --white:          #ffffff;
  --off-white:      #f0f8ff;
  --offwhite:       #f0f8ff;

  /* Text */
  --text:           #1a2b3c;
  --text-muted:     #5a7490;
  --muted:          #5a7490;

  /* Borders & shadows */
  --border:         #d0e8f5;
  --shadow:         0 8px 40px rgba(0,119,182,0.15);
  --shadow-card:    0 4px 24px rgba(0,60,100,0.10);

  /* Gradients */
  --gradient:       linear-gradient(135deg, #023e8a 0%, #0077b6 50%, #00b4d8 100%);
  --gradient2:      linear-gradient(135deg, #0096c7 0%, #48cae4 100%);

  /* Legacy token aliases → blue palette */
  --pink:           #0077b6;
  --pink2:          #48cae4;
  --pink3:          #def0fa;

  --teal:           #2ec4b6;
  --teal2:          #52d9cf;
  --teal3:          #e0f8f6;

  --purple:         #023e8a;
  --purple2:        #0077b6;

  --yellow:         #f4c430;
  --orange:         #f77f00;
  --orange2:        #fff1e0;

  --green:          #10b981;
  --green2:         #d1fae5;

  --red:            #ef4444;
  --red2:           #fee2e2;

  /* Dark sidebar */
  --dark:           #011627;
  --dark2:          #01223d;
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--offwhite);
  color: var(--text);
}

/* ── SCREEN (login/auth backdrop) ─────────────────────────────── */
.screen {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(135deg, #011627 0%, #01223d 50%, #023e8a 100%);
  display: flex; align-items: center; justify-content: center;
}
.screen.hide { display: none !important; }
.blobs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.lb { position: absolute; border-radius: 50%; filter: blur(80px); }
.lb1 { width: 400px; height: 400px; background: rgba(0,119,182,0.25); top: -100px; right: -100px; }
.lb2 { width: 350px; height: 350px; background: rgba(0,180,216,0.18); bottom: -80px; left: -80px; }

/* ── AUTH CARD ────────────────────────────────────────────────── */
.auth-card {
  position: relative; z-index: 2; background: white;
  border-radius: 28px; padding: 3rem; width: 100%; max-width: 420px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.4); max-height: 94vh; overflow-y: auto;
}
.auth-logo {
  font-family: 'Outfit', sans-serif; font-size: 1.8rem; font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  text-align: center; margin-bottom: 0.3rem;
}
.auth-sub { text-align: center; font-size: 0.78rem; color: var(--muted); margin-bottom: 1.5rem; }
.auth-badge {
  display: block; font-size: 0.65rem; font-weight: 600; letter-spacing: 1px;
  padding: 5px 14px; border-radius: 50px; text-align: center;
  width: fit-content; margin: 0 auto 1.5rem;
}
.auth-badge.change { background: #fff1e0; color: #c05c00; }

.l-group { margin-bottom: 1rem; }
.l-group label {
  display: block; font-size: 0.7rem; font-weight: 600; color: var(--text);
  letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 5px;
}
.l-group input, .l-group select, .l-group textarea {
  width: 100%; border: 1.5px solid var(--border); border-radius: 12px;
  padding: 12px 16px; font-size: 0.88rem; font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text); outline: none; transition: border-color .3s, box-shadow .3s; background: white;
}
.l-group input:focus, .l-group select:focus, .l-group textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,119,182,0.12);
}
.l-group textarea { resize: vertical; min-height: 80px; }

.auth-btn {
  width: 100%; color: white; border: none; padding: 14px; border-radius: 50px;
  font-size: 0.88rem; font-weight: 700; cursor: pointer;
  font-family: 'Outfit', sans-serif; transition: all .3s; margin-top: 0.4rem;
}
.auth-btn.pink {
  background: var(--gradient);
  box-shadow: 0 8px 24px rgba(0,119,182,0.35);
}
.auth-btn.amber {
  background: linear-gradient(135deg, #e06c00, var(--accent));
  box-shadow: 0 8px 24px rgba(247,127,0,0.3);
}
.auth-btn:hover { transform: translateY(-2px); }
.auth-btn:disabled { opacity: .6; transform: none; cursor: not-allowed; }

.auth-err {
  background: var(--red2); color: var(--red); font-size: 0.78rem;
  padding: 10px 14px; border-radius: 10px; margin-bottom: 1rem;
  display: none; text-align: center; font-weight: 500;
}
.auth-hint {
  text-align: center; font-size: 0.72rem; color: var(--muted);
  margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--border);
}
.auth-hint strong { color: var(--primary-dark); }
.pw-rules { font-size: 0.68rem; color: var(--muted); margin-top: 3px; }
.section-label {
  font-size: 0.6rem; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); font-weight: 700; margin: 1.2rem 0 0.8rem;
}

/* ── DASHBOARD LAYOUT ─────────────────────────────────────────── */
#dashboard { display: none; }
#dashboard.show { display: flex; }

.sidebar {
  width: 260px; min-height: 100vh;
  background: var(--dark2);
  padding: 2rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.4rem;
  flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  border-right: 1px solid rgba(0,119,182,0.15);
}
.sb-logo {
  font-family: 'Outfit', sans-serif; font-size: 1.3rem; font-weight: 800;
  background: var(--gradient2);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 2rem; padding: 0 .5rem;
}
.sb-section-title {
  font-size: 0.6rem; letter-spacing: 3px; text-transform: uppercase;
  color: rgba(255,255,255,0.45); padding: 0 .5rem; margin: 1rem 0 0.4rem; font-weight: 600;
}
.sb-link {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  border-radius: 12px; cursor: pointer; color: rgba(255,255,255,0.7);
  font-size: 0.82rem; font-weight: 500; transition: all .3s; text-decoration: none;
}
.sb-link:hover { background: rgba(0,119,182,0.12); color: white; }
.sb-link.active {
  background: linear-gradient(135deg, rgba(0,119,182,0.22), rgba(2,62,138,0.22));
  color: #90d5f5; border: 1px solid rgba(0,119,182,0.3);
}
.sb-link .icon { font-size: 1rem; width: 20px; text-align: center; }

.sb-refresh-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; border-radius: 12px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
}
.sb-refresh-label { font-size: 0.75rem; color: rgba(255,255,255,0.75); display: flex; align-items: center; gap: 8px; }

.toggle-switch { position: relative; width: 36px; height: 20px; cursor: pointer; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: rgba(255,255,255,0.1); border-radius: 20px; transition: .3s; }
.toggle-slider::before {
  content: ''; position: absolute; width: 14px; height: 14px;
  left: 3px; top: 3px; background: rgba(255,255,255,0.4); border-radius: 50%; transition: .3s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(16px); background: white; }

.refresh-countdown { font-size: 0.6rem; color: rgba(255,255,255,0.5); text-align: center; padding: 0 .5rem; margin-top: -0.2rem; }

.sb-action-btn {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  border-radius: 12px; cursor: pointer; font-size: 0.82rem; font-weight: 500;
  transition: all .3s; border: none; background: transparent;
  font-family: 'Plus Jakarta Sans', sans-serif; width: 100%; text-align: left;
}
.sb-action-btn.change-pw { color: rgba(247,127,0,0.85); }
.sb-action-btn.change-pw:hover { background: rgba(247,127,0,0.1); color: var(--accent); }
.sb-action-btn.logout { color: rgba(0,180,216,0.9); }
.sb-action-btn.logout:hover { background: rgba(0,180,216,0.1); color: var(--primary-light); }

/* ── MAIN + TOPBAR ────────────────────────────────────────────── */
.main { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }

.topbar {
  background: white; padding: 1.1rem 2rem;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  gap: 1rem; flex-wrap: wrap;
  box-shadow: 0 2px 12px rgba(0,60,100,0.08);
}
.topbar-title { font-family: 'Outfit', sans-serif; font-size: 1.1rem; font-weight: 800; color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.topbar-date { font-size: 0.78rem; color: var(--muted); }

.admin-badge {
  background: linear-gradient(135deg, #def0fa, #e8f4ff);
  color: var(--primary-dark); font-size: 0.68rem; font-weight: 600;
  padding: 5px 14px; border-radius: 50px; white-space: nowrap;
}
.api-status { display: flex; align-items: center; gap: 6px; font-size: 0.68rem; font-weight: 600; padding: 5px 12px; border-radius: 50px; }
.api-status.online  { background: var(--green2); color: var(--green); }
.api-status.offline { background: var(--red2);   color: var(--red);   }
.api-dot { width: 7px; height: 7px; border-radius: 50%; animation: pulse2 1.5s infinite; }
.online  .api-dot { background: var(--green); }
.offline .api-dot { background: var(--red); animation: none; }
@keyframes pulse2 { 0%,100%{opacity:1;} 50%{opacity:.4;} }

.new-patient-btn {
  background: var(--gradient); color: white; border: none;
  padding: 9px 20px; border-radius: 50px; font-size: 0.78rem; font-weight: 700;
  cursor: pointer; font-family: 'Outfit', sans-serif; transition: all .3s;
  box-shadow: 0 6px 18px rgba(0,119,182,0.3); white-space: nowrap;
}
.new-patient-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,119,182,0.45); }

.mob-menu-btn {
  display: none; align-items: center; justify-content: center;
  width: 36px; height: 36px; background: var(--dark2); border: none;
  border-radius: 8px; cursor: pointer; font-size: 1.1rem; flex-shrink: 0; color: white;
}

/* ── LOCATION SELECTOR ────────────────────────────────────────── */
.loc-select-wrap { position: relative; display: flex; align-items: center; }
.loc-select-wrap::before { content: '📍'; position: absolute; left: 10px; font-size: .75rem; pointer-events: none; z-index: 1; }
#locationSelect {
  appearance: none; border: 1.5px solid var(--border); border-radius: 50px;
  padding: 6px 28px 6px 28px; font-size: .72rem; font-weight: 600;
  font-family: 'Plus Jakarta Sans', sans-serif; color: var(--primary-dark); background: white;
  outline: none; cursor: pointer; transition: border-color .3s, box-shadow .3s; max-width: 160px;
}
#locationSelect:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,119,182,0.12); }

/* ── CONTENT ──────────────────────────────────────────────────── */
.content { padding: 2rem; flex: 1; }
.page { display: none; }
.page.active { display: block; }

.loading { text-align: center; padding: 3rem; color: var(--muted); }
.spinner {
  width: 36px; height: 36px; border: 3px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin .8s linear infinite; margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── STATS GRID ───────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 1rem; margin-bottom: 2rem; }
@media(max-width:1200px){ .stats-grid { grid-template-columns: repeat(3,1fr); } }

.stat-card {
  background: white; border-radius: 20px; padding: 1.4rem;
  box-shadow: var(--shadow-card); position: relative; overflow: hidden; transition: transform .3s;
}
.stat-card:hover { transform: translateY(-3px); }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.stat-card.pink::before   { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.stat-card.teal::before   { background: linear-gradient(90deg, var(--accent2), #52d9cf); }
.stat-card.yellow::before { background: linear-gradient(90deg, var(--yellow), #ffb347); }
.stat-card.purple::before { background: linear-gradient(90deg, var(--primary-dark), var(--primary)); }
.stat-card.red::before    { background: linear-gradient(90deg, var(--red), #ff8c8c); }

.stat-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: .8rem; }
.stat-icon.pink   { background: #def0fa; }
.stat-icon.teal   { background: #e0f8f6; }
.stat-icon.yellow { background: #fff8dc; }
.stat-icon.purple { background: #ddeeff; }
.stat-icon.red    { background: var(--red2); }

.stat-num   { font-family: 'Outfit', sans-serif; font-size: 1.8rem; font-weight: 800; color: var(--text); line-height: 1; }
.stat-label { font-size: 0.7rem; color: var(--muted); margin-top: 4px; font-weight: 500; }

/* ── SECTION CARD ─────────────────────────────────────────────── */
.section-card { background: white; border-radius: 20px; padding: 1.5rem; box-shadow: var(--shadow-card); margin-bottom: 1.5rem; }
.sc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; gap: .8rem; }
.sc-title { font-family: 'Outfit', sans-serif; font-size: 1rem; font-weight: 700; color: var(--text); }
.sc-right { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }

/* ── FILTERS ──────────────────────────────────────────────────── */
.filters { display: flex; gap: .8rem; margin-bottom: 1.5rem; flex-wrap: wrap; align-items: center; }
.filter-btn {
  padding: 8px 18px; border-radius: 50px; font-size: 0.72rem; font-weight: 600;
  cursor: pointer; border: 1.5px solid var(--border); background: white; color: var(--muted);
  transition: all .3s; font-family: 'Plus Jakarta Sans', sans-serif;
}
.filter-btn.active, .filter-btn:hover {
  background: var(--gradient); color: white; border-color: transparent;
}
.search-bar { flex: 1; min-width: 180px; }
.search-bar input {
  width: 100%; border: 1.5px solid var(--border); border-radius: 50px;
  padding: 9px 18px; font-size: .8rem; font-family: 'Plus Jakarta Sans', sans-serif;
  outline: none; transition: border-color .3s;
}
.search-bar input:focus { border-color: var(--primary); }

/* ── DATE FILTER ──────────────────────────────────────────────── */
.date-filter-wrap { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.date-filter-wrap label { font-size: .68rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.date-filter-wrap input[type="date"] {
  border: 1.5px solid var(--border); border-radius: 50px; padding: 7px 14px;
  font-size: .75rem; font-family: 'Plus Jakarta Sans', sans-serif; color: var(--text);
  outline: none; background: white; transition: border-color .3s; cursor: pointer;
}
.date-filter-wrap input[type="date"]:focus { border-color: var(--primary); }
.date-clear-btn {
  background: var(--pink3); color: var(--primary); border: none; padding: 7px 12px;
  border-radius: 50px; font-size: .68rem; font-weight: 700; cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif; transition: all .3s;
}
.date-clear-btn:hover { background: var(--primary); color: white; }

/* ── BOOKINGS TABLE ───────────────────────────────────────────── */
.bookings-table { width: 100%; border-collapse: collapse; }
.bookings-table th {
  text-align: left; font-size: .62rem; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); font-weight: 600; padding: .8rem 1rem; border-bottom: 1px solid var(--border);
}
.bookings-table td {
  padding: .85rem 1rem; border-bottom: 1px solid var(--border);
  font-size: .82rem; color: var(--text); vertical-align: middle;
}
.bookings-table tr:last-child td { border-bottom: none; }
.bookings-table tr:hover td { background: #f4f9ff; }

.client-name  { font-weight: 600; }
.client-phone { font-size: .72rem; color: var(--muted); }
.client-meta  { font-size: .68rem; color: var(--muted); margin-top: 2px; }

.service-tag {
  background: #def0fa; color: var(--primary);
  font-size: .65rem; font-weight: 600; padding: 4px 10px; border-radius: 50px;
  display: inline-block; white-space: nowrap;
}

.pt-badge { font-size: .6rem; font-weight: 700; padding: 3px 8px; border-radius: 50px; margin-left: 4px; }
.pt-badge.New       { background: var(--green2); color: var(--green); }
.pt-badge.Returning { background: #e0f8f6;       color: var(--accent2); }

.status-badge { font-size: .65rem; font-weight: 700; padding: 5px 12px; border-radius: 50px; letter-spacing: .5px; white-space: nowrap; }
.status-badge.Pending   { background: var(--orange2); color: var(--orange); }
.status-badge.Confirmed { background: var(--green2);  color: var(--green); }
.status-badge.Completed { background: #e0f8f6;        color: var(--accent2); }
.status-badge.Cancelled { background: var(--red2);    color: var(--red); }

/* ── ACTION BUTTONS ───────────────────────────────────────────── */
.action-btns { display: flex; gap: .4rem; flex-wrap: wrap; }
.act-btn {
  padding: 5px 10px; border-radius: 8px; font-size: .62rem; font-weight: 600;
  cursor: pointer; border: none; transition: all .2s; font-family: 'Plus Jakarta Sans', sans-serif;
}
.act-btn.confirm { background: var(--green2); color: var(--green); }
.act-btn.confirm:hover { background: var(--green); color: white; }
.act-btn.complete { background: #e0f8f6; color: var(--accent2); }
.act-btn.complete:hover { background: var(--accent2); color: white; }
.act-btn.cancel { background: var(--red2); color: var(--red); }
.act-btn.cancel:hover { background: var(--red); color: white; }
.act-btn.view { background: #ddeeff; color: var(--primary-dark); }
.act-btn.view:hover { background: var(--primary-dark); color: white; }

.empty-state { text-align: center; padding: 3rem; color: var(--muted); }
.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; }

.export-btn {
  background: linear-gradient(135deg, var(--accent2), var(--primary)); color: white; border: none;
  padding: 10px 22px; border-radius: 50px; font-size: .75rem; font-weight: 600;
  cursor: pointer; font-family: 'Plus Jakarta Sans', sans-serif; transition: all .3s;
}
.export-btn:hover { transform: translateY(-1px); }

.refresh-btn {
  background: #def0fa; color: var(--primary); border: none;
  padding: 10px 18px; border-radius: 50px; font-size: .75rem; font-weight: 600;
  cursor: pointer; font-family: 'Plus Jakarta Sans', sans-serif; transition: all .3s;
}
.refresh-btn:hover { background: var(--primary); color: white; }

/* ── TODAY LIST ───────────────────────────────────────────────── */
.today-list { display: flex; flex-direction: column; gap: .8rem; }
.today-item {
  display: flex; align-items: center; gap: 1rem; padding: 1rem;
  border-radius: 14px; background: var(--offwhite); transition: all .3s;
}
.today-item:hover { background: #def0fa; }
.today-time { font-family: 'Outfit', sans-serif; font-size: .82rem; font-weight: 700; color: var(--primary); min-width: 65px; }
.today-info { flex: 1; }
.today-name { font-size: .85rem; font-weight: 600; }
.today-svc  { font-size: .72rem; color: var(--muted); }

/* Mobile grid columns — hidden on desktop */
.today-col-time, .today-col-type, .today-col-name,
.today-col-svc, .today-col-status, .today-col-view { display: none; }

/* ── MODAL ────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(1,34,61,0.65);
  backdrop-filter: blur(8px);
  z-index: 1000; display: none; align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay.show { display: flex; }
.modal {
  background: white; border-radius: 24px; padding: 2.5rem;
  width: 100%; max-width: 540px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.3);
  animation: modalIn .3s ease; max-height: 92vh; overflow-y: auto;
}
.modal.wide { max-width: 640px; }
@keyframes modalIn { from{opacity:0;transform:scale(.95);} to{opacity:1;transform:scale(1);} }

.modal-title  { font-family: 'Outfit', sans-serif; font-size: 1.2rem; font-weight: 800; color: var(--text); margin-bottom: .4rem; }
.modal-sub    { font-size: .78rem; color: var(--muted); margin-bottom: 1.8rem; font-family: monospace; background: var(--offwhite); padding: 6px 12px; border-radius: 8px; display: inline-block; }
.modal-detail { display: flex; flex-direction: column; gap: .9rem; margin-bottom: 1.5rem; }
.md-row   { display: flex; gap: 1rem; align-items: flex-start; }
.md-icon  { font-size: 1.1rem; width: 26px; flex-shrink: 0; }
.md-lbl   { font-size: .62rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; font-weight: 600; }
.md-val   { font-size: .88rem; color: var(--text); font-weight: 500; }

.wa-section { background: linear-gradient(135deg,#e8f8f0,#d4f4e8); border: 1px solid rgba(37,211,102,0.25); border-radius: 16px; padding: 1.2rem 1.5rem; margin-bottom: 1.5rem; }
.wa-section-title { font-size: .72rem; font-weight: 700; color: #1a5c35; letter-spacing: 1px; text-transform: uppercase; margin-bottom: .8rem; }
.wa-msg-preview   { background: white; border-radius: 12px; padding: 1rem; font-size: .78rem; line-height: 1.7; color: #1a5c35; border: 1px solid rgba(37,211,102,0.2); margin-bottom: 1rem; white-space: pre-wrap; font-family: 'Plus Jakarta Sans', sans-serif; }
.wa-send-btn      { display: inline-flex; align-items: center; gap: 10px; background: #25D366; color: white; padding: 12px 24px; border-radius: 50px; font-size: .8rem; font-weight: 700; transition: all .3s; box-shadow: 0 6px 20px rgba(37,211,102,0.3); cursor: pointer; border: none; font-family: 'Plus Jakarta Sans', sans-serif; width: 100%; justify-content: center; }
.wa-send-btn:hover { background: #20c05c; transform: translateY(-2px); }
.wa-phone-input   { width: 100%; border: 1.5px solid rgba(37,211,102,0.3); border-radius: 10px; padding: 10px 14px; font-size: .85rem; font-family: 'Plus Jakarta Sans', sans-serif; color: var(--text); outline: none; margin-bottom: .8rem; background: white; }
.wa-phone-input:focus { border-color: #25D366; box-shadow: 0 0 0 3px rgba(37,211,102,0.1); }

.modal-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.modal-close { background: var(--border); color: var(--muted); border: none; padding: 11px 24px; border-radius: 50px; font-size: .78rem; font-weight: 600; cursor: pointer; font-family: 'Plus Jakarta Sans', sans-serif; transition: all .3s; }
.modal-close:hover { background: #c8dff0; }

.radio-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  border-radius: 50px; border: 1.5px solid var(--border); font-size: .75rem; font-weight: 600;
  cursor: pointer; transition: all .25s; color: var(--muted); background: white; user-select: none;
}
.radio-pill input[type="radio"] { display: none; }
.radio-pill.selected { border-color: var(--primary); background: #def0fa; color: var(--primary); }

/* ── TOAST ────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 2rem; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--dark); color: white; padding: 12px 24px;
  border-radius: 50px; font-size: .8rem; font-weight: 600; z-index: 99999;
  transition: transform .4s ease; white-space: nowrap; box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.toast.show    { transform: translateX(-50%) translateY(0); }
.toast.success { background: linear-gradient(135deg, var(--green), var(--accent2)); }
.toast.error   { background: linear-gradient(135deg, var(--red), #ff6b6b); }
.toast.wa      { background: linear-gradient(135deg, #25D366, #128c7e); }
.toast.warn    { background: linear-gradient(135deg, var(--accent), #f59e0b); }

/* ── FORM ELEMENTS ────────────────────────────────────────────── */
.two-col  { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.full-col { grid-column: 1/-1; }

input[type="date"], input[type="time"] {
  width: 100%; border: 1.5px solid var(--border); border-radius: 12px;
  padding: 12px 16px; font-size: .88rem; font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text); outline: none; transition: border-color .3s, box-shadow .3s; background: white;
}
input[type="date"]:focus, input[type="time"]:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,119,182,0.12);
}
textarea.np-textarea {
  width: 100%; border: 1.5px solid var(--border); border-radius: 12px;
  padding: 12px 16px; font-size: .88rem; font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text); outline: none; resize: vertical; min-height: 80px;
  transition: border-color .3s, box-shadow .3s;
}
textarea.np-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,119,182,0.12); }

select.np-select {
  width: 100%; border: 1.5px solid var(--border); border-radius: 12px;
  padding: 12px 16px; font-size: .88rem; font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text); outline: none; appearance: none; background: white
    url('data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22><path fill=%22%235a7490%22 d=%22M7 10l5 5 5-5z%22/></svg>')
    no-repeat right 14px center/20px;
  transition: border-color .3s, box-shadow .3s;
}
select.np-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,119,182,0.12); }

/* ── SIDEBAR OVERLAY (mobile) ─────────────────────────────────── */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 499; }
.sidebar-overlay.show { display: block; }

/* ── SCROLLBAR ────────────────────────────────────────────────── */
::-webkit-scrollbar              { width: 6px; height: 6px; }
::-webkit-scrollbar-track        { background: var(--off-white); }
::-webkit-scrollbar-thumb        { background: var(--primary-light); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover  { background: var(--primary); }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */

/* ── Tablet / mid ─────────────────────────────────────────────── */
@media(max-width:1200px) {
  .stats-grid { grid-template-columns: repeat(3,1fr); }
}

/* ── Mobile ───────────────────────────────────────────────────── */
@media(max-width:768px) {
  #dashboard.show { flex-direction: column; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 240px;
    z-index: 500; transform: translateX(-100%); transition: transform .3s ease;
    overflow-y: auto; min-height: unset; height: 100%;
  }
  .sidebar.open { transform: translateX(0); }
  .mob-menu-btn { display: flex; }
  .main { width: 100%; overflow-x: hidden; }
  .topbar { padding: .9rem 1rem; }
  .topbar-date { display: none; }
  .content { padding: 1rem; }
  .stats-grid { grid-template-columns: repeat(2,1fr); gap: .75rem; }
  .stat-num { font-size: 1.4rem; }
  .section-card { padding: 1rem 0.5rem; border-radius: 14px; }
  .sc-header { flex-direction: column; align-items: flex-start; }
  .bookings-table { font-size: .72rem; }
  .bookings-table th, .bookings-table td { padding: .6rem .5rem; }
  .two-col { grid-template-columns: 1fr; }
  .modal { padding: 1.5rem; border-radius: 16px; }
  .new-patient-btn { font-size: .68rem; padding: 8px 14px; }
  #locationSelect { max-width: 120px; font-size: .65rem; }

  /* ── TODAY: 3-column grid on mobile ── */
  .today-item {
    display: grid;
    grid-template-columns: 35px 1fr auto;
    grid-template-rows: auto auto;
    column-gap: .75rem;
    row-gap: .2rem;
    align-items: start;
    padding: 1.1rem .75rem;
  }

  /* Hide desktop flex elements */
  .today-item .today-time,
  .today-item .today-info,
  .today-item > .status-badge,
  .today-item > .act-btn.view { display: none !important; }

  /* Show & place mobile grid cells */
  .today-col-time {
    display: block;
	margin-bottom: 10px;
    grid-column: 1; grid-row: 1;
    font-family: 'Outfit', sans-serif;
    font-size: .92rem; font-weight: 600; color: var(--primary);
  }
  .today-col-type   { display: block; grid-column: 1; grid-row: 2;justify-self: start;}
  .today-col-type .pt-badge {
	font-size: .75rem; font-weight: 500;
	text-transform: uppercase;
  }
  .today-col-name   {
    display: block; grid-column: 2; grid-row: 1;
    font-size: .99rem; font-weight: 600; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .today-col-svc    {
    display: block; grid-column: 2; grid-row: 2;
    font-size: .9rem; color: var(--muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .today-col-status { display: block; grid-column: 3; grid-row: 1; justify-self: end; }
  .today-col-view   { display: block; grid-column: 3; grid-row: 2; justify-self: end; }
  .today-col-view .act-btn.view {
    font-size: 0.75rem !important; /* Larger, clearer text */
    font-weight: 500;              /* Extra bold for prominence */
  }
}

@media(max-width:480px) {
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .stat-num { font-size: 1.3rem; }
}
