/* ══════════════════════════════════════════════════════════════
   MyDocSlot Portal — Mobile-First Responsive CSS
   ══════════════════════════════════════════════════════════════ */
:root {
  --p:    #0ea5e9;
  --pd:   #0284c7;
  --pl:   #e0f2fe;
  --g:    #10b981;
  --gl:   #d1fae5;
  --warn: #f59e0b;
  --wl:   #fef3c7;
  --red:  #ef4444;
  --rl:   #fee2e2;
  --purp: #8b5cf6;
  --bg:   #f0f9ff;
  --card: #ffffff;
  --bdr:  #e2e8f0;
  --txt:  #0f172a;
  --mute: #64748b;
  --rad:  14px;
  --radL: 20px;
  --sh:   0 4px 24px rgba(14,165,233,.10);
  --shL:  0 12px 48px rgba(14,165,233,.16);
}
*,*::before,*::after { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body {
  font-family:'Segoe UI',system-ui,-apple-system,sans-serif;
  color:var(--txt); background:var(--bg); margin:0;
  -webkit-tap-highlight-color:transparent;
}
a { text-decoration:none; color:inherit; }
img { max-width:100%; height:auto; }
.fw6{font-weight:600!important}.fw7{font-weight:700!important}.fw8{font-weight:800!important}

/* ── Navbar ─────────────────────────────────────────────────── */
.ac-nav {
  background:linear-gradient(135deg,#0369a1 0%,#0284c7 55%,#0ea5e9 100%);
  padding:12px 0; box-shadow:0 2px 20px rgba(3,105,161,.35);
  position:sticky; top:0; z-index:1000;
}
.ac-logo-wrap { display:flex; align-items:center; gap:10px; }
.ac-logo-icon {
  width:40px; height:40px; border-radius:11px;
  background:rgba(255,255,255,.2);
  display:flex; align-items:center; justify-content:center;
  font-size:1.2rem; color:#fff; flex-shrink:0;
}
.ac-logo-text { font-size:1.15rem; font-weight:800; color:#fff; line-height:1.15; }
.ac-logo-sub { font-size:.6rem; color:rgba(255,255,255,.7); font-weight:500; }
.nav-link-w {
  color:rgba(255,255,255,.9)!important; font-weight:500;
  font-size:.88rem; padding:8px 12px!important; border-radius:8px; transition:all .15s;
  display:block; /* full tap target on mobile */
}
.nav-link-w:hover { color:#fff!important; background:rgba(255,255,255,.12); }
.btn-nav-primary {
  background:#fff; color:var(--pd); border:none; border-radius:10px;
  padding:8px 16px; font-weight:700; font-size:.85rem; transition:all .2s;
  display:inline-flex; align-items:center; gap:6px; white-space:nowrap;
}
.btn-nav-primary:hover { background:#e0f2fe; color:var(--pd); }
.ac-user-pill {
  display:flex; align-items:center; gap:8px;
  background:rgba(255,255,255,.15); border:1px solid rgba(255,255,255,.25);
  border-radius:25px; padding:5px 12px; color:#fff;
  font-weight:600; font-size:.85rem; cursor:pointer; white-space:nowrap;
}
.ac-user-pill:hover { background:rgba(255,255,255,.25); color:#fff; }
.ac-avatar {
  width:28px; height:28px; border-radius:50%;
  background:rgba(255,255,255,.3);
  display:flex; align-items:center; justify-content:center;
  font-weight:800; font-size:.8rem; flex-shrink:0;
}
/* Mobile nav collapse */
#navM .d-flex { flex-direction:column; align-items:stretch; padding:8px 0 4px; gap:2px !important; }
@media(min-width:992px) {
  #navM .d-flex { flex-direction:row; align-items:center; padding:0; gap:4px !important; }
  .ac-user-pill { padding:5px 14px; }
}

/* ── Hero ───────────────────────────────────────────────────── */
.ac-hero {
  background:linear-gradient(160deg,#0369a1 0%,#0284c7 40%,#0ea5e9 75%,#38bdf8 100%);
  padding:44px 0 52px; color:#fff;
}
.ac-hero-pill {
  display:inline-flex; align-items:center; gap:6px;
  background:rgba(255,255,255,.15); border:1px solid rgba(255,255,255,.3);
  border-radius:25px; padding:6px 14px; font-size:.78rem; font-weight:600; margin-bottom:16px;
}
.ac-hero-title {
  font-size:clamp(1.8rem,6vw,3.8rem); font-weight:900;
  line-height:1.1; letter-spacing:-.02em;
}
.ac-gold {
  background:linear-gradient(135deg,#fbbf24,#f97316);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
.ac-hero-sub { font-size:.95rem; color:rgba(255,255,255,.85); max-width:500px; line-height:1.6; }
.ac-search-bar {
  background:rgba(255,255,255,.14); backdrop-filter:blur(12px);
  border:1.5px solid rgba(255,255,255,.25); border-radius:16px; padding:16px 18px;
}
.ac-search-select {
  border-radius:10px; font-weight:600; border:2px solid rgba(14,165,233,.3);
  padding:10px 14px; font-size:.9rem; width:100%;
}
.ac-search-select:focus { border-color:var(--p); box-shadow:0 0 0 3px rgba(14,165,233,.15); outline:none; }
.btn-search {
  background:#fff; color:var(--pd); border:none; border-radius:10px;
  padding:10px 20px; font-weight:700; font-size:.9rem; width:100%;
  transition:all .2s; margin-top:8px;
}
.btn-search:hover { background:#e0f2fe; }
@media(min-width:576px) { .btn-search { width:auto; margin-top:0; } }

.ac-stats {
  display:flex; flex-wrap:wrap; align-items:center;
  background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.2);
  border-radius:50px; padding:10px 20px; gap:0; margin-top:16px;
  width:fit-content; max-width:100%;
}
.ac-stat { text-align:center; padding:0 14px; }
.ac-stat-n { display:block; font-size:1.3rem; font-weight:900; color:#fff; }
.ac-stat-l { display:block; font-size:.65rem; color:rgba(255,255,255,.7); font-weight:500; }
.ac-stat-pipe { width:1px; height:32px; background:rgba(255,255,255,.25); }

/* Hero float cards — hidden on mobile */
.ac-hero-cards { display:none; }
@media(min-width:1024px) {
  .ac-hero-cards { display:flex; flex-direction:column; gap:12px; padding-left:20px; }
}
.ac-hc {
  display:flex; align-items:center; gap:12px; background:#fff; border-radius:14px;
  padding:12px 16px; box-shadow:0 8px 32px rgba(3,105,161,.18); width:220px;
  animation:floatup 4s ease-in-out infinite;
}
.ac-hc:nth-child(2){margin-left:36px;animation-delay:.7s}
.ac-hc:nth-child(3){animation-delay:1.4s}
.ac-hc:nth-child(4){margin-left:36px;animation-delay:2.1s}
.ac-hc-icon { width:38px; height:38px; border-radius:10px; display:flex; align-items:center; justify-content:center; color:#fff; font-size:.9rem; flex-shrink:0; }
.ac-hc-title { font-weight:700; font-size:.82rem; color:var(--txt); }
.ac-hc-sub { font-size:.68rem; color:var(--mute); }
@keyframes floatup{0%,100%{transform:translateY(0)}50%{transform:translateY(-7px)}}

/* ── Section headers ────────────────────────────────────────── */
.ac-section-title { font-size:clamp(1.3rem,4vw,1.7rem); font-weight:800; color:var(--txt); margin-bottom:4px; }
.ac-section-sub { color:var(--mute); font-size:.88rem; }

/* ── City cards ─────────────────────────────────────────────── */
.ac-city {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  background:var(--card); border:2px solid var(--bdr); border-radius:var(--rad);
  padding:18px 10px; cursor:pointer; transition:all .22s; text-align:center;
  position:relative; overflow:hidden; min-height:100px;
}
.ac-city:hover { border-color:var(--p); transform:translateY(-3px); box-shadow:var(--shL); }
.ac-city-ico {
  width:52px; height:52px; border-radius:14px;
  display:flex; align-items:center; justify-content:center;
  font-size:1.4rem; margin-bottom:8px; transition:transform .22s;
}
.ac-city:hover .ac-city-ico { transform:scale(1.1); }
.ac-city-nm { font-weight:700; font-size:.82rem; color:var(--txt); }
.ac-city-hl { border-color:var(--p)!important; background:linear-gradient(135deg,#e0f2fe,#f0f9ff)!important; }
.ac-my-city {
  position:absolute; top:-1px; left:50%; transform:translateX(-50%);
  background:var(--p); color:#fff; font-size:.58rem; font-weight:700;
  padding:3px 9px; border-radius:0 0 7px 7px; white-space:nowrap;
}

/* ── Steps ──────────────────────────────────────────────────── */
.ac-step {
  background:var(--card); border:2px solid var(--bdr); border-radius:var(--rad);
  padding:22px 16px; text-align:center; transition:all .2s; position:relative;
}
.ac-step:hover { transform:translateY(-3px); box-shadow:var(--sh); border-color:var(--p); }
.ac-step-num {
  width:38px; height:38px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-weight:900; font-size:.9rem; color:#fff; margin:0 auto 12px;
}
.ac-step-ico { font-size:1.8rem; margin-bottom:8px; display:block; }
.ac-step-title { font-weight:700; font-size:.9rem; color:var(--txt); margin-bottom:4px; }
.ac-step-desc { font-size:.75rem; color:var(--mute); }

/* ── Specialization chips ───────────────────────────────────── */
.spec-chip {
  display:inline-flex; align-items:center; gap:6px; padding:7px 14px;
  border-radius:25px; border:1.5px solid; font-size:.78rem; font-weight:600;
  background:#fff; transition:all .15s; white-space:nowrap;
}
.spec-chip:hover { transform:translateY(-2px); box-shadow:0 4px 12px rgba(0,0,0,.08); }

/* ── Progress stepper ───────────────────────────────────────── */
.ac-prog {
  display:flex; align-items:center; justify-content:center;
  gap:0; padding:6px 0; overflow-x:auto; scrollbar-width:none;
}
.ac-prog::-webkit-scrollbar { display:none; }
.ac-prog-step { display:flex; flex-direction:column; align-items:center; gap:3px; flex-shrink:0; }
.ac-ps-n {
  width:34px; height:34px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:#e2e8f0; color:var(--mute); font-weight:800; font-size:.8rem;
  transition:all .3s;
}
.ac-ps-l { font-size:.62rem; font-weight:600; color:var(--mute); transition:color .3s; white-space:nowrap; }
.ac-prog-step.active .ac-ps-n { background:var(--p); color:#fff; box-shadow:0 4px 12px rgba(14,165,233,.4); }
.ac-prog-step.active .ac-ps-l { color:var(--p); }
.ac-prog-step.done .ac-ps-n { background:var(--g); color:#fff; }
.ac-prog-step.done .ac-ps-l { color:var(--g); }
.ac-prog-line { height:3px; width:40px; background:#e2e8f0; flex-shrink:0; margin:0 2px 18px; border-radius:4px; transition:background .3s; }
.ac-prog-line.done { background:var(--g); }
@media(min-width:576px) { .ac-prog-line { width:56px; margin:0 4px 20px; } }

/* ── Hospital cards ─────────────────────────────────────────── */
.hosp-card {
  background:var(--card); border:2px solid var(--bdr); border-radius:var(--radL);
  overflow:hidden; display:flex; flex-direction:column; transition:all .22s; height:100%;
}
.hosp-card:hover { border-color:var(--p); transform:translateY(-3px); box-shadow:var(--shL); }
.hosp-card-top { padding:16px 18px; display:flex; align-items:flex-start; gap:12px; border-bottom:1px solid #f1f5f9; }
.hosp-ico {
  width:48px; height:48px; border-radius:13px;
  background:linear-gradient(135deg,var(--pl),#bfdbfe);
  display:flex; align-items:center; justify-content:center;
  color:var(--pd); font-size:1.3rem; flex-shrink:0;
}
.hosp-name { font-weight:800; font-size:.95rem; color:var(--txt); line-height:1.3; }
.hosp-type-badge { background:var(--gl); color:#065f46; font-size:.65rem; font-weight:700; padding:2px 7px; border-radius:6px; display:inline-block; margin-top:3px; }
.hosp-info-row { display:flex; align-items:flex-start; gap:8px; font-size:.8rem; color:var(--mute); margin-bottom:5px; }
.hosp-info-row i { width:13px; flex-shrink:0; margin-top:2px; }
.hosp-card-body { padding:12px 18px; flex:1; }
.hosp-card-foot { padding:12px 18px; border-top:1px solid #f1f5f9; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn-primary {
  background:linear-gradient(135deg,var(--p),var(--pd));
  color:#fff; border:none; border-radius:10px; padding:11px 20px;
  font-weight:700; font-size:.875rem; cursor:pointer; transition:all .2s;
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  text-decoration:none; width:100%; /* full width on mobile */
}
.btn-primary:hover { background:linear-gradient(135deg,var(--pd),#0369a1); color:#fff; box-shadow:0 4px 15px rgba(14,165,233,.35); }
.btn-primary:active { transform:scale(.98); }
@media(min-width:576px) { .btn-primary { width:auto; } }

.btn-outline {
  background:#fff; color:var(--p); border:2px solid var(--p); border-radius:10px;
  padding:9px 18px; font-weight:700; font-size:.875rem; cursor:pointer; transition:all .2s;
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  text-decoration:none; width:100%;
}
.btn-outline:hover { background:var(--pl); color:var(--pd); }
@media(min-width:576px) { .btn-outline { width:auto; } }

/* ── Doctor cards ───────────────────────────────────────────── */
.doc-card {
  background:var(--card); border:2px solid var(--bdr); border-radius:var(--radL);
  overflow:hidden; display:flex; flex-direction:column; transition:all .22s; height:100%;
}
.doc-card:hover { border-color:var(--p); transform:translateY(-3px); box-shadow:var(--shL); }
.doc-card-top { padding:16px 18px; display:flex; gap:12px; align-items:flex-start; border-bottom:1px solid #f1f5f9; }
.doc-avatar {
  width:56px; height:56px; border-radius:14px;
  background:linear-gradient(135deg,var(--pl),#bae6fd);
  display:flex; align-items:center; justify-content:center;
  color:var(--pd); font-weight:800; font-size:1.4rem; flex-shrink:0; overflow:hidden;
}
.doc-avatar img { width:100%; height:100%; object-fit:cover; }
.doc-name { font-weight:800; font-size:.95rem; color:var(--txt); }
.doc-spec { color:var(--p); font-weight:600; font-size:.8rem; margin-top:2px; }
.doc-qual { color:var(--mute); font-size:.72rem; margin-top:2px; }
.doc-card-body { padding:10px 18px; flex:1; }
.doc-card-foot { padding:10px 18px; border-top:1px solid #f1f5f9; }
.doc-info { display:flex; align-items:center; gap:8px; font-size:.8rem; color:var(--mute); margin-bottom:5px; }
.doc-info i { width:13px; text-align:center; }
.fee-badge { display:inline-flex; align-items:center; gap:4px; background:var(--gl); color:#065f46; padding:4px 10px; border-radius:8px; font-weight:700; font-size:.8rem; }

/* ── Auth page ──────────────────────────────────────────────── */
.ac-auth-bg {
  min-height:calc(100vh - 64px); display:flex; align-items:center; justify-content:center;
  padding:24px 16px; background:linear-gradient(160deg,#e0f2fe 0%,#f0f9ff 50%,#ede9fe 100%);
}
.ac-auth-card {
  background:var(--card); border-radius:20px; border:2px solid var(--bdr);
  box-shadow:0 20px 60px rgba(14,165,233,.12); padding:28px 20px; width:100%; max-width:460px;
}
@media(min-width:480px) { .ac-auth-card { padding:40px 36px; } }
.ac-auth-icon {
  width:60px; height:60px; border-radius:16px;
  background:linear-gradient(135deg,var(--p),var(--pd));
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:1.6rem; margin:0 auto 14px;
}
input.form-control {
  border:2px solid var(--bdr); border-radius:10px; padding:10px 14px;
  font-size:.9rem; transition:border-color .15s; width:100%;
}
input.form-control:focus { border-color:var(--p); box-shadow:0 0 0 3px rgba(14,165,233,.12); outline:none; }
.input-group .form-control { border-left:none; border-radius:0 10px 10px 0; }
.input-group .input-group-text {
  border:2px solid var(--bdr); border-right:none;
  border-radius:10px 0 0 10px; background:#f8fafc; color:var(--mute);
}
.input-group:focus-within .input-group-text { border-color:var(--p); }

/* ── Booking page ───────────────────────────────────────────── */
.book-section {
  background:var(--card); border:2px solid var(--bdr); border-radius:var(--radL);
  overflow:hidden; margin-bottom:16px;
}
.book-sec-hdr {
  background:linear-gradient(135deg,#f8fafc,#f0f9ff); padding:12px 16px;
  font-weight:700; font-size:.9rem; border-bottom:1px solid var(--bdr);
  display:flex; align-items:center; gap:8px;
}
.book-sec-body { padding:14px 16px; }
.slots-grid { display:flex; flex-wrap:wrap; gap:8px; }
.slot {
  padding:9px 12px; border-radius:10px; border:2px solid var(--bdr); background:#fff;
  cursor:pointer; font-size:.78rem; font-weight:700; transition:all .15s;
  color:var(--txt); min-width:80px; text-align:center;
  /* Larger tap target */
  min-height:40px; display:flex; align-items:center; justify-content:center;
}
.slot:hover { border-color:var(--p); background:var(--pl); color:var(--pd); }
.slot.sel { border-color:var(--p)!important; background:var(--p)!important; color:#fff!important; box-shadow:0 4px 12px rgba(14,165,233,.3); }
.slot.booked { background:#f8fafc!important; border-color:#e2e8f0!important; color:#cbd5e1!important; cursor:not-allowed; }
.info-card { background:var(--card); border:2px solid var(--bdr); border-radius:var(--radL); overflow:hidden; }
.info-card-top { background:linear-gradient(135deg,var(--pl),#e0f9f6); padding:20px 18px; text-align:center; border-bottom:1px solid var(--bdr); }
.info-card-body { padding:14px 18px; }
.info-row { display:flex; align-items:flex-start; gap:10px; margin-bottom:10px; font-size:.85rem; }
.info-row i { width:16px; text-align:center; color:var(--p); flex-shrink:0; margin-top:2px; }
.selected-slot-box { background:linear-gradient(135deg,var(--gl),#a7f3d0); border-radius:12px; padding:12px 14px; margin:10px 14px; border:1.5px solid #6ee7b7; }
.patient-badge { display:flex; align-items:center; gap:10px; background:var(--gl); border:2px solid #6ee7b7; border-radius:12px; padding:12px 14px; margin-bottom:14px; }
.patient-badge-ico { width:38px; height:38px; border-radius:50%; background:#fff; display:flex; align-items:center; justify-content:center; color:var(--g); font-size:1.1rem; flex-shrink:0; }

/* ── Confirmation ───────────────────────────────────────────── */
.confirm-card {
  background:var(--card); border-radius:20px; border:2px solid var(--bdr);
  box-shadow:0 20px 60px rgba(14,165,233,.12); padding:28px 18px;
  max-width:520px; margin:0 auto; text-align:center;
}
@media(min-width:576px) { .confirm-card { padding:44px; } }
.confirm-ico {
  width:80px; height:80px; border-radius:50%;
  background:linear-gradient(135deg,var(--gl),#6ee7b7);
  display:flex; align-items:center; justify-content:center;
  color:var(--g); font-size:2.6rem; margin:0 auto 14px;
  animation:pop .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes pop{from{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}
.token-big {
  font-size:2.4rem; font-weight:900; color:var(--p);
  background:var(--pl); border:3px solid #7dd3fc; border-radius:14px;
  padding:8px 28px; display:inline-block; letter-spacing:-.02em;
}
@media(min-width:576px) { .token-big { font-size:3rem; padding:8px 36px; } }
.confirm-detail-row {
  display:flex; align-items:center; gap:12px; padding:11px 0;
  border-bottom:1px solid #f1f5f9; font-size:.87rem; text-align:left;
}
.confirm-detail-row:last-child { border-bottom:none; }
.confirm-detail-row i { width:20px; text-align:center; font-size:1rem; flex-shrink:0; }

/* ── My Appointments ────────────────────────────────────────── */
.appt-card {
  background:var(--card); border:2px solid var(--bdr); border-radius:var(--radL);
  display:flex; flex-direction:column; transition:all .2s; overflow:hidden;
}
.appt-card:hover { transform:translateY(-2px); box-shadow:var(--sh); border-color:var(--p); }
.appt-card.past { opacity:.72; }
.appt-card-top { padding:14px 16px; display:flex; justify-content:space-between; align-items:flex-start; border-bottom:1px solid #f1f5f9; }
.appt-card-body { padding:10px 16px; flex:1; }
.appt-card-foot { padding:10px 16px; border-top:1px solid #f1f5f9; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:6px; }
.appt-info { display:flex; align-items:center; gap:7px; font-size:.8rem; color:var(--mute); margin-bottom:5px; }
.token-pill { background:var(--pl); color:var(--pd); font-size:.75rem; font-weight:700; padding:3px 9px; border-radius:8px; }

/* ── Tables — mobile scroll ─────────────────────────────────── */
.table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.table-wrap table { min-width:600px; }
@media(max-width:576px) {
  .table-wrap table { min-width:500px; font-size:.75rem; }
  .table-wrap table th, .table-wrap table td { padding:9px 10px !important; }
}

/* ── Footer ─────────────────────────────────────────────────── */
.ac-footer { background:linear-gradient(160deg,#0c4a6e,#0369a1); padding:40px 0 20px; margin-top:48px; }
.footer-link { color:rgba(255,255,255,.65); font-size:.83rem; display:block; margin-bottom:5px; transition:color .15s; }
.footer-link:hover { color:#fff; }

/* ── Utilities ──────────────────────────────────────────────── */
.empty-state { text-align:center; padding:48px 16px; }
.empty-state i { font-size:3rem; color:#cbd5e1; margin-bottom:14px; display:block; }
.empty-state h5 { font-weight:700; color:var(--mute); }
.badge-status-1 { background:var(--gl); color:#065f46; }
.badge-status-2 { background:#fee2e2; color:#991b1b; }
.badge-status-3 { background:#f1f5f9; color:var(--mute); }
.badge-xs { font-size:.68rem; padding:3px 7px; border-radius:6px; font-weight:700; }

/* ── Touch-friendly form controls ──────────────────────────── */
.form-select, select.form-select {
  min-height:44px; /* iOS tap target */
  border:2px solid var(--bdr); border-radius:10px;
  padding:10px 14px; font-size:.9rem;
}
.form-select:focus { border-color:var(--p); box-shadow:0 0 0 3px rgba(14,165,233,.12); outline:none; }
textarea.form-control {
  border:2px solid var(--bdr); border-radius:10px;
  padding:10px 14px; font-size:.9rem; resize:vertical;
}
textarea.form-control:focus { border-color:var(--p); box-shadow:0 0 0 3px rgba(14,165,233,.12); outline:none; }

/* ── Bottom safe area (iOS notch) ───────────────────────────── */
@supports(padding-bottom:env(safe-area-inset-bottom)) {
  .ac-footer { padding-bottom:calc(20px + env(safe-area-inset-bottom)); }
  #bp-fab { bottom:calc(28px + env(safe-area-inset-bottom)); }
  #bp-panel { bottom:calc(102px + env(safe-area-inset-bottom)); }
}

/* ── Chat FAB — smaller on mobile ──────────────────────────── */
#bp-fab {
  position:fixed; bottom:20px; right:16px; z-index:8000;
  width:54px; height:54px; border-radius:50%;
  background:linear-gradient(135deg,#0ea5e9,#0369a1); border:none;
  color:#fff; cursor:pointer; box-shadow:0 6px 28px rgba(14,165,233,.5);
  display:none; align-items:center; justify-content:center; font-size:1.25rem;
  transition:all .2s; animation:fabIn .35s cubic-bezier(.34,1.56,.64,1) both;
}
@media(min-width:576px) { #bp-fab { width:62px; height:62px; bottom:28px; right:28px; font-size:1.4rem; } }
@keyframes fabIn{from{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}
#bp-fab:hover { transform:scale(1.1); }
#bp-badge {
  position:absolute; top:-3px; right:-3px; background:#ef4444; color:#fff;
  font-size:.55rem; font-weight:800; border-radius:50%; width:20px; height:20px;
  display:none; align-items:center; justify-content:center; border:2px solid #fff;
}

/* Chat panel — full-screen on mobile */
#bp-panel {
  position:fixed; bottom:0; right:0; left:0; z-index:8001;
  height:92vh; border-radius:22px 22px 0 0; background:#fff;
  overflow:hidden; flex-direction:column; display:none;
  box-shadow:0 -8px 40px rgba(0,0,0,.18);
}
#bp-panel.on { display:flex; animation:panelInM .22s cubic-bezier(.34,1.56,.64,1); }
@keyframes panelInM{from{transform:translateY(100%);opacity:0}to{transform:none;opacity:1}}
@media(min-width:480px) {
  #bp-panel {
    bottom:90px; right:20px; left:auto; top:auto;
    width:360px; height:540px; border-radius:22px;
    box-shadow:0 24px 64px rgba(0,0,0,.18),0 0 0 1px rgba(14,165,233,.1);
  }
  @keyframes panelInM{from{transform:scale(.85) translateY(16px);opacity:0}to{transform:none;opacity:1}}
}

/* Chat inner styles */
.bh{background:linear-gradient(135deg,#0369a1,#0284c7,#0ea5e9);padding:14px 16px;color:#fff;display:flex;align-items:center;gap:10px;flex-shrink:0}
.bh-av{width:42px;height:42px;border-radius:50%;background:rgba(255,255,255,.2);display:flex;align-items:center;justify-content:center;font-size:1rem;flex-shrink:0}
.bh-info{flex:1}
.bh-name{font-weight:700;font-size:.93rem;line-height:1.2}
.bh-sub{font-size:.68rem;opacity:.88;display:flex;align-items:center;gap:5px;margin-top:2px}
.bh-dot{width:7px;height:7px;border-radius:50%;background:#4ade80;animation:blink 2s infinite;box-shadow:0 0 0 2px rgba(74,222,128,.3)}
@keyframes blink{0%,100%{box-shadow:0 0 0 2px rgba(74,222,128,.3)}50%{box-shadow:0 0 0 5px rgba(74,222,128,.1)}}
.bh-close{width:32px;height:32px;border-radius:50%;background:rgba(255,255,255,.15);border:none;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:.15s}
.bh-close:hover{background:rgba(255,255,255,.3)}
#bp-hosp-screen{flex:1;display:flex;flex-direction:column;padding:16px;gap:0;overflow-y:auto;background:#f8fafc}
.bhs-icon{width:48px;height:48px;border-radius:13px;background:linear-gradient(135deg,#e0f2fe,#bae6fd);display:flex;align-items:center;justify-content:center;font-size:1.3rem;margin-bottom:10px}
.bhs-title{font-size:.95rem;font-weight:700;color:#0f172a;margin-bottom:4px}
.bhs-sub{font-size:.8rem;color:#64748b;line-height:1.5;margin-bottom:14px}
.bh-hosp-card{border:1.5px solid #e2e8f0;border-radius:13px;padding:12px 14px;background:#fff;cursor:pointer;transition:all .15s;display:flex;align-items:center;gap:10px;margin-bottom:8px}
.bh-hosp-card:hover{border-color:#0ea5e9;background:#f0f9ff}
.bh-hosp-card.sel{border-color:#0ea5e9;background:#eff6ff}
.bh-hosp-icon{width:38px;height:38px;border-radius:9px;background:linear-gradient(135deg,#0ea5e9,#0369a1);color:#fff;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:.9rem}
.bh-hosp-name{font-weight:700;font-size:.85rem;color:#1e293b}
.bh-hosp-city{font-size:.7rem;color:#64748b;margin-top:1px}
#bp-hosp-loading{text-align:center;padding:20px;color:#94a3b8;font-size:.83rem}
.bhs-start{margin-top:auto;padding-top:10px;border-top:1px solid #f1f5f9}
.bhs-btn{width:100%;padding:11px;border-radius:12px;background:linear-gradient(135deg,#0ea5e9,#0284c7);color:#fff;border:none;font-weight:700;font-size:.88rem;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px}
.bhs-btn:disabled{opacity:.45;cursor:not-allowed}
#bp-topic-screen{flex:1;display:none;flex-direction:column;padding:16px;gap:0;overflow-y:auto;background:#f8fafc}
.bt-hosp-pill{display:inline-flex;align-items:center;gap:7px;background:#eff6ff;border:1px solid #bfdbfe;border-radius:99px;padding:5px 12px;font-size:.76rem;color:#1d4ed8;font-weight:600;margin-bottom:12px}
.bt-topics{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-bottom:12px}
.bt-topic{padding:10px 10px;border-radius:11px;border:1.5px solid #e2e8f0;background:#fff;cursor:pointer;font-size:.78rem;color:#1e293b;font-weight:500;transition:.15s;display:flex;align-items:center;gap:7px;text-align:left;min-height:44px}
.bt-topic:hover{border-color:#0ea5e9;background:#f0f9ff;color:#0284c7}
.bt-topic.sel{border-color:#0ea5e9;background:#eff6ff;color:#0284c7}
.bt-topic i{font-size:.82rem;color:#0ea5e9;width:14px}
.bt-back{border:none;background:none;color:#64748b;font-size:.78rem;cursor:pointer;margin-bottom:8px;padding:0;display:flex;align-items:center;gap:4px}
.bt-back:hover{color:#0ea5e9}
.bt-start{width:100%;padding:10px;border-radius:12px;background:linear-gradient(135deg,#0ea5e9,#0284c7);color:#fff;border:none;font-weight:700;font-size:.85rem;cursor:pointer}
.bt-start:disabled{opacity:.45;cursor:not-allowed}
#bp-msgs{flex:1;overflow-y:auto;padding:12px 14px;display:none;flex-direction:column;gap:7px;background:#f8fafc;scroll-behavior:smooth}
.bp-m{max-width:85%;animation:mi .18s ease}
@keyframes mi{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
.bp-m.me{align-self:flex-end}.bp-m.th{align-self:flex-start}
.bp-mn{font-size:.65rem;font-weight:600;color:#64748b;margin-bottom:2px;padding-left:2px}
.bp-bbl{padding:9px 13px;border-radius:16px;font-size:.84rem;line-height:1.5;word-break:break-word}
.me .bp-bbl{background:linear-gradient(135deg,#0ea5e9,#0284c7);color:#fff;border-bottom-right-radius:4px}
.th .bp-bbl{background:#fff;color:#1e293b;border:1px solid #e2e8f0;border-bottom-left-radius:4px}
.bp-mt{font-size:.6rem;opacity:.5;margin-top:2px}
.me .bp-mt{text-align:right}
.bp-sys{text-align:center;font-size:.7rem;color:#94a3b8;padding:3px;font-style:italic}
#bp-typing{align-self:flex-start;display:none;align-items:center;gap:4px;background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:9px 13px}
#bp-typing span{width:6px;height:6px;border-radius:50%;background:#94a3b8;animation:td .9s infinite;display:inline-block}
#bp-typing span:nth-child(2){animation-delay:.15s}#bp-typing span:nth-child(3){animation-delay:.3s}
@keyframes td{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-4px)}}
#bp-input-wrap{padding:10px 12px;border-top:1px solid #e8f0f7;background:#fff;display:none;flex-shrink:0}
.bp-ir{display:flex;gap:7px;align-items:flex-end}
#bp-inp{flex:1;border:1.5px solid #e2e8f0;border-radius:13px;padding:9px 12px;font-size:.85rem;resize:none;max-height:80px;outline:none;font-family:inherit;line-height:1.5}
#bp-inp:focus{border-color:#0ea5e9;box-shadow:0 0 0 3px rgba(14,165,233,.1)}
.bp-snd{width:40px;height:40px;border-radius:11px;background:linear-gradient(135deg,#0ea5e9,#0284c7);border:none;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:.88rem}
#bp-login-screen{flex:1;display:none;flex-direction:column;align-items:center;justify-content:center;padding:20px;gap:10px;text-align:center;background:#f8fafc}
#bp-offline{flex:1;display:none;flex-direction:column;align-items:center;justify-content:center;padding:20px;gap:8px;text-align:center;background:#f8fafc;color:#64748b}

/* ── Reschedule time slot picker ─────────────────────────────── */
.time-slot-btn:hover {
  background: #f0f9ff !important;
  border-color: #7dd3fc !important;
  color: #0369a1 !important;
}

/* ── Toast notification ───────────────────────────────────────── */
#toastMsg, #toastErr {
  transition: opacity .4s ease;
  animation: slideUp .3s ease;
}
@keyframes slideUp {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}

/* ── Confirmation token card ─────────────────────────────────── */
.confirm-card {
  background: #fff;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(14,165,233,.12);
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}
.confirm-ico {
  width: 64px; height: 64px; border-radius: 50%;
  background: #f0fdf4; color: #16a34a;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin: 0 auto 1rem;
  border: 3px solid #bbf7d0;
}
.confirm-detail-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid #f1f5f9;
}
.confirm-detail-row:last-child { border-bottom: none; }

/* ── Doctor available indicator ─────────────────────────────── */
.doc-card { position: relative; }

/* ── Mobile improvements ─────────────────────────────────────── */
@media (max-width: 576px) {
  .confirm-card { padding: 1.25rem; border-radius: 16px; }
  .appt-card { border-radius: 14px; }
  #reschedule-modal > div { padding: 20px 16px; }
  .ac-hero { padding: 2rem 0 2rem; }
  .ac-hero-title { font-size: clamp(1.8rem, 8vw, 2.8rem); }
  .ac-stats { gap: 12px !important; }
}
