/* ============================================================
   NeethiLabs — Main Stylesheet
   Design: Modern Healthcare, Clean, Professional
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --primary:       #c41e3a;
  --primary-dark:  #a01830;
  --primary-light: #fdf0f2;
  --secondary:     #2e7d32;
  --accent:        #e53935;
  --success:       #2e7d32;
  --success-bg:    #e8f5e9;
  --warning:       #ffd166;
  --warning-bg:    #fffbec;
  --danger:        #ef233c;
  --danger-bg:     #fdeef0;
  --info:          #4cc9f0;
  --info-bg:       #eaf9fe;
  --dark:          #1a1a2e;
  --gray-900:      #212529;
  --gray-800:      #343a40;
  --gray-700:      #495057;
  --gray-600:      #6c757d;
  --gray-500:      #adb5bd;
  --gray-400:      #ced4da;
  --gray-300:      #dee2e6;
  --gray-200:      #e9ecef;
  --gray-100:      #f8f9fa;
  --white:         #ffffff;
  --body-bg:       #f5f7ff;
  --card-bg:       #ffffff;
  --text-primary:  #1a1a2e;
  --text-secondary:#6c757d;
  --text-muted:    #adb5bd;
  --border-color:  #e9ecef;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:        0 4px 6px rgba(0,0,0,.05), 0 1px 3px rgba(0,0,0,.08);
  --shadow-md:     0 10px 15px rgba(0,0,0,.07), 0 4px 6px rgba(0,0,0,.05);
  --shadow-lg:     0 20px 25px rgba(0,0,0,.07), 0 10px 10px rgba(0,0,0,.04);
  --transition:    all .2s ease;
  --sidebar-w:     260px;
  --header-h:      64px;
  --font-main:     'Inter', system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--body-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }

/* ── Impersonation Banner ──────────────────────────────────── */
.impersonation-banner {
  background: #ff6b35;
  color: #fff;
  text-align: center;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  position: sticky;
  top: 0;
  z-index: 9999;
}
.impersonation-banner a.btn-exit-impersonate {
  color: #fff;
  background: rgba(255,255,255,.25);
  border: 1px solid rgba(255,255,255,.5);
  padding: 3px 12px;
  border-radius: 20px;
  margin-left: 12px;
  font-size: 13px;
}
.impersonation-banner a.btn-exit-impersonate:hover { background: rgba(255,255,255,.4); }

/* ── Portal Layout ─────────────────────────────────────────── */
.portal-wrapper { display: flex; min-height: 100vh; overflow-x: hidden; max-width: 100vw; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: #1a0a0e;
  color: #c9d1e0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform .3s ease;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(196,30,58,.3) transparent;
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(196,30,58,.3); border-radius: 3px; }
.sidebar-brand {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(196,30,58,.2);
}
.sidebar-brand .brand-logo {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; flex-shrink: 0;
}
.sidebar-brand .brand-name { font-size: 16px; font-weight: 600; color: #fff; }
.sidebar-brand .brand-sub  { font-size: 11px; color: #8895a7; margin-top: 2px; }

.sidebar-nav { padding: 16px 12px; flex: 1; }
.nav-section-label {
  font-size: 10px; font-weight: 600; letter-spacing: .08em;
  color: #4e5a6b; text-transform: uppercase;
  padding: 12px 12px 6px;
}
.nav-item { display: block; margin-bottom: 2px; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--border-radius-sm);
  color: #8895a7; font-size: 14px; font-weight: 500;
  transition: var(--transition); position: relative;
}
.nav-link i { font-size: 18px; flex-shrink: 0; }
.nav-link:hover { background: rgba(255,255,255,.06); color: #c9d1e0; }
.nav-link.active { background: var(--primary); color: #fff; }
.nav-link:hover { background: rgba(196,30,58,.15); color: #e0c0c4; }
.nav-link .badge-count {
  margin-left: auto; background: var(--danger);
  color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 10px;
}
.sidebar-footer {
  padding: 16px; border-top: 1px solid rgba(196,30,58,.2);
}

/* Main content area */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  overflow-x: hidden;
}

/* Top header bar */
.topbar {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky; top: 0; z-index: 90;
  box-shadow: var(--shadow-sm);
}
.topbar-toggle {
  display: none; background: none; border: none;
  font-size: 22px; cursor: pointer; color: var(--gray-700);
  padding: 4px;
}
.topbar-title { font-size: 18px; font-weight: 600; color: var(--dark); flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gray-100); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-700); font-size: 18px;
  transition: var(--transition); position: relative;
}
.topbar-btn:hover { background: var(--primary-light); color: var(--primary); }
.topbar-btn .dot {
  width: 8px; height: 8px; background: var(--danger);
  border-radius: 50%; border: 2px solid #fff;
  position: absolute; top: 4px; right: 4px;
}
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; cursor: pointer;
}

/* Page content */
.page-content { padding: 28px 28px 40px; flex: 1; }
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 22px; font-weight: 700; color: var(--dark); }
.page-header p   { color: var(--text-secondary); margin-top: 4px; }
.page-header .breadcrumb {
  font-size: 13px; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
}
.page-header .breadcrumb a { color: var(--text-muted); }
.page-header .breadcrumb a:hover { color: var(--primary); }
.page-header .breadcrumb .sep::before { content: '/'; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}
.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: space-between;
}
.card-header h2, .card-header h3 {
  font-size: 16px; font-weight: 600; color: var(--dark);
}
.card-body   { padding: 24px; }
.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: var(--gray-100);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* Stat cards */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 20px 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  display: flex; align-items: flex-start; gap: 14px;
  min-width: 0; overflow: hidden;
}
.stat-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.stat-icon.blue   { background: #eef0fd; color: var(--primary); }
.stat-icon.green  { background: var(--success-bg); color: var(--success); }
.stat-icon.yellow { background: var(--warning-bg); color: #e5a800; }
.stat-icon.red    { background: var(--danger-bg); color: var(--danger); }
.stat-icon.cyan   { background: var(--info-bg); color: var(--info); }
.stat-icon.purple { background: #f3effe; color: #7c3aed; }
.stat-info { min-width: 0; flex: 1; }
.stat-info .stat-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-info .stat-value { font-size: clamp(18px, 2vw, 26px); font-weight: 700; color: var(--dark); line-height: 1.15; word-break: break-word; }
.stat-info .stat-sub   { font-size: 11px; color: var(--text-muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; border-radius: var(--border-radius-sm);
  font-size: 14px; font-weight: 500; cursor: pointer;
  border: 1px solid transparent; transition: var(--transition);
  text-decoration: none; white-space: nowrap; line-height: 1.4;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn i { font-size: 16px; }

.btn-primary   { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-secondary { background: var(--gray-100); color: var(--gray-700); border-color: var(--gray-300); }
.btn-secondary:hover { background: var(--gray-200); color: var(--gray-800); }
.btn-success   { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(.9); }
.btn-danger    { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { filter: brightness(.9); }
.btn-warning   { background: var(--warning); color: var(--dark); }
.btn-outline-primary {
  background: transparent; color: var(--primary); border-color: var(--primary);
}
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 12px 28px; font-size: 16px; }
.btn-icon { padding: 8px; min-width: 36px; justify-content: center; }
.btn-block { width: 100%; justify-content: center; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--gray-700); margin-bottom: 6px;
}
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--gray-300); border-radius: var(--border-radius-sm);
  font-size: 14px; color: var(--text-primary);
  background: var(--white); transition: var(--transition);
  font-family: inherit; line-height: 1.5;
}
.form-control:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67,97,238,.12);
}
.form-control:disabled { background: var(--gray-100); cursor: not-allowed; }
.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-valid   { border-color: var(--success); }
textarea.form-control    { resize: vertical; min-height: 90px; }
select.form-control      { appearance: none; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; padding-right: 36px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 5px; display: flex; align-items: center; gap: 4px; }
.form-error::before { content: '✕'; font-size: 10px; }

.input-group { display: flex; }
.input-group .form-control { border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm); }
.input-group .btn          { border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0; }
.input-prefix {
  display: flex; align-items: center; padding: 0 14px;
  background: var(--gray-100); border: 1px solid var(--gray-300);
  border-right: 0; border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
  font-size: 14px; color: var(--text-secondary); white-space: nowrap;
}

/* Toggle switch */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle { position: relative; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: var(--gray-300);
  border-radius: 12px; cursor: pointer; transition: .3s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%; transition: .3s;
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 500; line-height: 1.4;
}
.badge-primary   { background: #eef0fd; color: var(--primary); }
.badge-success   { background: var(--success-bg); color: #05a87f; }
.badge-warning   { background: var(--warning-bg); color: #cc8a00; }
.badge-danger    { background: var(--danger-bg); color: #c7192e; }
.badge-info      { background: var(--info-bg); color: #1a9fc4; }
.badge-secondary { background: var(--gray-100); color: var(--gray-600); }
.badge-dark      { background: var(--gray-200); color: var(--gray-800); }
.badge-accent    { background: #eef9ff; color: #0a7fa8; }
.badge-dot::before {
  content: ''; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; margin-right: 4px;
}

/* ── Tables ─────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table {
  width: 100%; border-collapse: collapse;
  font-size: 14px; background: var(--white);
}
.table th {
  padding: 12px 16px; text-align: left;
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap; background: var(--gray-100);
}
.table td {
  padding: 14px 16px; border-bottom: 1px solid var(--border-color);
  vertical-align: middle; color: var(--text-primary);
}
.table tbody tr:hover { background: var(--gray-100); }
.table tbody tr:last-child td { border-bottom: none; }

/* ── Alerts / Flash ─────────────────────────────────────────── */
.alert {
  padding: 14px 18px; border-radius: var(--border-radius-sm);
  margin-bottom: 16px; display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; line-height: 1.5;
}
.alert i { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--success-bg); color: #056947; border-left: 3px solid var(--success); }
.alert-danger  { background: var(--danger-bg);  color: #9b1427; border-left: 3px solid var(--danger); }
.alert-warning { background: var(--warning-bg); color: #7a5900; border-left: 3px solid var(--warning); }
.alert-info    { background: var(--info-bg);    color: #0c6a8a; border-left: 3px solid var(--info); }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.page-link {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--border-radius-sm); font-size: 13px; font-weight: 500;
  color: var(--text-secondary); border: 1px solid var(--border-color);
  background: var(--white); transition: var(--transition);
}
.page-link:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary-light); }
.page-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-link.disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 1000; display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--white); border-radius: var(--border-radius-lg);
  max-width: 560px; width: 100%; max-height: 90vh;
  overflow-y: auto; box-shadow: var(--shadow-lg);
  animation: modalIn .2s 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(--border-color);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 17px; font-weight: 600; }
.modal-close {
  background: none; border: none; font-size: 22px; cursor: pointer;
  color: var(--text-secondary); padding: 4px; line-height: 1;
}
.modal-body   { padding: 24px; }
.modal-footer {
  padding: 16px 24px; border-top: 1px solid var(--border-color);
  display: flex; gap: 10px; justify-content: flex-end;
}

/* ── Stars ──────────────────────────────────────────────────── */
.stars { color: var(--warning); display: inline-flex; gap: 1px; }
.stars .ti-star-filled { color: #ffd166; }
.stars .ti-star        { color: var(--gray-300); }

/* ── Status timeline ────────────────────────────────────────── */
.status-timeline { list-style: none; padding: 0; }
.timeline-item { display: flex; gap: 16px; padding-bottom: 20px; position: relative; }
.timeline-item:not(:last-child)::before {
  content: ''; position: absolute;
  left: 15px; top: 32px; bottom: 0; width: 2px;
  background: var(--border-color);
}
.timeline-dot {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0; z-index: 1;
}
.timeline-dot.done   { background: var(--success-bg); color: var(--success); }
.timeline-dot.active { background: var(--primary); color: #fff; }
.timeline-dot.pending{ background: var(--gray-100); color: var(--gray-400); }
.timeline-content .timeline-label { font-weight: 500; font-size: 14px; }
.timeline-content .timeline-time  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── Empty state ────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 48px 24px;
  color: var(--text-secondary);
}
.empty-state i { font-size: 48px; color: var(--gray-300); margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; color: var(--text-primary); margin-bottom: 8px; }
.empty-state p  { font-size: 14px; max-width: 320px; margin: 0 auto 20px; }

/* ── Service card (public) ──────────────────────────────────── */
.service-card {
  background: var(--white); border-radius: var(--border-radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: box-shadow .2s, transform .2s; cursor: pointer;
}
.service-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.service-card-img { width: 100%; height: 180px; object-fit: cover; background: var(--gray-100); }
.service-card-body { padding: 16px; }
.service-card-cat  { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--primary); font-weight: 600; margin-bottom: 6px; }
.service-card-name { font-size: 16px; font-weight: 600; color: var(--dark); margin-bottom: 8px; line-height: 1.3; }
.service-card-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.service-card-price { display: flex; align-items: center; gap: 10px; }
.price-nl    { font-size: 20px; font-weight: 700; color: var(--primary); }
.price-orig  { font-size: 13px; color: var(--text-muted); text-decoration: line-through; }
.price-badge { background: var(--success-bg); color: #056947; font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 600; }

/* ── Booking cart ───────────────────────────────────────────── */
.cart-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border-color);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-name  { flex: 1; font-size: 14px; font-weight: 500; }
.cart-item-price { font-size: 14px; font-weight: 600; color: var(--primary); white-space: nowrap; }
.cart-item-remove { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 18px; padding: 4px; }
.cart-item-remove:hover { color: var(--danger); }

/* ── QR Code display ────────────────────────────────────────── */
.qr-container {
  display: flex; flex-direction: column; align-items: center;
  padding: 24px; text-align: center;
  border: 2px dashed var(--border-color); border-radius: var(--border-radius);
}
.qr-container img { max-width: 220px; margin-bottom: 12px; }
.qr-note { font-size: 12px; color: var(--text-muted); }

/* ── Loading spinner ────────────────────────────────────────── */
.spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2px solid var(--gray-300); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn .spinner { width: 16px; height: 16px; border-width: 2px; }

/* ── Auth pages ─────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh; background: var(--body-bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px;
}
.auth-card {
  background: var(--white); border-radius: var(--border-radius-lg);
  padding: 40px; max-width: 440px; width: 100%;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border-color);
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo img { height: 48px; margin: 0 auto 12px; }
.auth-logo h1 { font-size: 22px; font-weight: 700; color: var(--dark); }
.auth-logo p  { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }
.auth-step { display: none; }
.auth-step.active { display: block; }
.otp-inputs {
  display: flex; gap: 10px; justify-content: center; margin: 20px 0;
}
.otp-inputs input {
  width: 50px; height: 56px; text-align: center;
  font-size: 22px; font-weight: 700;
  border: 2px solid var(--gray-300); border-radius: var(--border-radius-sm);
  transition: border-color .2s;
}
.otp-inputs input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(67,97,238,.12); }
.otp-timer { text-align: center; font-size: 13px; color: var(--text-secondary); }
.otp-timer span { font-weight: 600; color: var(--primary); }

/* ── Public hero ────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
  color: #fff; padding: 80px 0;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; right: -100px; top: -100px;
  width: 500px; height: 500px; background: rgba(255,255,255,.04);
  border-radius: 50%;
}
.hero h1 { font-size: 44px; font-weight: 800; line-height: 1.15; margin-bottom: 16px; }
.hero p   { font-size: 18px; opacity: .85; max-width: 520px; margin-bottom: 32px; }
.hero-steps {
  display: flex; gap: 32px; margin-top: 48px;
  flex-wrap: wrap;
}
.hero-step { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.hero-step-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.15); display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .topbar-toggle { display: flex; }
  .sidebar-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.4);
    z-index: 99; display: none;
  }
  .sidebar-overlay.open { display: block; }
}

/* ── Mobile fixes ───────────────────────────────────────────── */
@media (max-width: 767px) {
  /* ── Base: no horizontal scroll ─────────────────────────── */
  html, body { overflow-x: hidden !important; max-width: 100vw; }
  * { box-sizing: border-box; }

  /* ── Portal layout ────────────────────────────────────────── */
  .portal-wrapper, .main-content { overflow-x: hidden !important; max-width: 100vw; min-width: 0; }
  .main-content { margin-left: 0 !important; }
  .page-content { padding: 12px 12px 40px; }

  /* ── Topbar ────────────────────────────────────────────────── */
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-title { font-size: 14px; font-weight: 600; }
  .topbar-toggle { display: flex !important; }

  /* ── Cards ─────────────────────────────────────────────────── */
  .card { overflow: hidden; border-radius: 10px; }
  .card-body { padding: 14px; }
  .card-header { padding: 12px 14px; }
  .card-footer { padding: 10px 14px; }

  /* ── Stat cards ─────────────────────────────────────────────── */
  .stat-card { padding: 14px; gap: 10px; }
  .stat-icon { width: 40px; height: 40px; font-size: 18px; border-radius: 10px; }
  .stat-info .stat-value { font-size: 20px !important; }
  .stat-info .stat-label { font-size: 12px; }
  .stat-info .stat-sub   { font-size: 11px; }

  /* ── ALL grids → single column on mobile ────────────────────── */
  [style*="display:grid"],
  [style*="display: grid"] { grid-template-columns: 1fr !important; gap: 12px !important; }

  /* ── Flex rows → wrap ────────────────────────────────────────── */
  [style*="display:flex"][style*="gap"] { flex-wrap: wrap; }

  /* ── Tables: scroll inside card ─────────────────────────────── */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table th, .table td { padding: 9px 10px; font-size: 12px; white-space: nowrap; }

  /* ── Buttons ─────────────────────────────────────────────────── */
  .btn-sm { padding: 5px 10px; font-size: 12px; }
  .btn-lg { padding: 13px 20px; font-size: 15px; }

  /* ── Page header ─────────────────────────────────────────────── */
  .page-header h1 { font-size: 20px; }
  .page-header p  { font-size: 13px; }
  .page-header [style*="justify-content:space-between"],
  .page-header [style*="justify-content: space-between"] { flex-wrap: wrap; gap: 10px; }

  /* ── Auth / login ────────────────────────────────────────────── */
  .auth-card { padding: 22px 16px; max-width: 100%; }
  .otp-box { width: 38px; height: 46px; font-size: 18px; }

  /* ── Modals ──────────────────────────────────────────────────── */
  .modal { margin: 8px; max-width: calc(100vw - 16px) !important; max-height: 90vh; overflow-y: auto; }
  .modal-body { padding: 16px; }
  .modal [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }

  /* ── Sidebar scrollbar thin ──────────────────────────────────── */
  .sidebar { scrollbar-width: thin; scrollbar-color: rgba(196,30,58,.25) transparent; overflow-x: hidden; }
  .sidebar::-webkit-scrollbar { width: 3px; }
  .sidebar::-webkit-scrollbar-thumb { background: rgba(196,30,58,.25); border-radius: 3px; }

  /* ── Nav section labels hidden on mobile ─────────────────────── */
  .nav-section-label { font-size: 10px; padding: 4px 12px; }

  /* ── Filter pills scroll horizontally ───────────────────────── */
  .filter-pills, [style*="flex-wrap:wrap"][style*="gap:8px"] { overflow-x: auto; flex-wrap: nowrap !important; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }

  /* ── Customer portal specific ────────────────────────────────── */
  .customer-card-row { flex-direction: column !important; }

  /* ── Lab & admin booking detail sidebar → below ─────────────── */
  [style*="grid-template-columns:1fr 280px"],
  [style*="grid-template-columns: 1fr 280px"],
  [style*="grid-template-columns:1fr 300px"],
  [style*="grid-template-columns: 1fr 300px"],
  [style*="grid-template-columns:1fr 340px"],
  [style*="grid-template-columns: 1fr 340px"],
  [style*="grid-template-columns:1fr 360px"],
  [style*="grid-template-columns: 1fr 360px"],
  [style*="grid-template-columns:1fr 380px"],
  [style*="grid-template-columns: 1fr 380px"] { grid-template-columns: 1fr !important; }

  /* ── Dashboard 4-col → 2-col ─────────────────────────────────── */
  [style*="grid-template-columns:repeat(4,1fr)"],
  [style*="grid-template-columns: repeat(4, 1fr)"] { grid-template-columns: repeat(2, 1fr) !important; }

  /* ── Stat card grids → 2-col ─────────────────────────────────── */
  [style*="grid-template-columns:repeat(auto-fill,minmax(160px"],
  [style*="grid-template-columns:repeat(auto-fill,minmax(180px"],
  [style*="grid-template-columns:repeat(auto-fill,minmax(200px"] { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }

  /* ── Services layout on public pages ─────────────────────────── */
  .services-layout { grid-template-columns: 1fr !important; }
  .services-sidebar { position: static !important; }
  .area-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* ── Topbar "View Site" text ─────────────────────────────────── */
  .hide-mobile { display: none !important; }

  /* ── Chat sidebar ────────────────────────────────────────────── */
  [style*="width:300px"][style*="border-right"] { width: 100% !important; }
}

@media (max-width: 480px) {
  /* Extra small phones */
  [style*="grid-template-columns:repeat(4,1fr)"],
  [style*="grid-template-columns: repeat(4, 1fr)"] { grid-template-columns: 1fr 1fr !important; }
  [style*="grid-template-columns:repeat(auto-fill,minmax(160px"] { grid-template-columns: 1fr 1fr !important; }
  .otp-box { width: 34px; height: 42px; font-size: 16px; }
  .page-header h1 { font-size: 18px; }
}

@media (min-width: 768px) and (max-width: 1100px) {
  /* Tablet: 2-col for 4-col grids */
  [style*="grid-template-columns:repeat(4,1fr)"],
  [style*="grid-template-columns: repeat(4, 1fr)"] { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ── Chat UI ────────────────────────────────────────────────── */
.chat-wrap { display: flex; height: calc(100vh - var(--header-h) - 56px); overflow: hidden; border: 1px solid var(--border-color); border-radius: var(--border-radius); background: var(--white); }
.chat-sidebar { width: 300px; border-right: 1px solid var(--border-color); overflow-y: auto; flex-shrink: 0; }
.chat-main { flex: 1; display: flex; flex-direction: column; }
.chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.chat-bubble { max-width: 70%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.5; }
.chat-bubble.mine { background: var(--primary); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.chat-bubble.theirs { background: var(--gray-100); color: var(--text-primary); border-bottom-left-radius: 4px; }
.chat-bubble .bubble-time { font-size: 11px; opacity: .7; margin-top: 4px; }
.chat-input-bar { padding: 12px 16px; border-top: 1px solid var(--border-color); display: flex; gap: 8px; }
.chat-input { flex: 1; border: 1px solid var(--gray-300); border-radius: 24px; padding: 10px 16px; font-size: 14px; outline: none; font-family: inherit; resize: none; max-height: 100px; }
.chat-input:focus { border-color: var(--primary); }

/* ── Report card ────────────────────────────────────────────── */
.report-card { padding: 16px; border: 1px solid var(--border-color); border-radius: var(--border-radius-sm); display: flex; align-items: center; gap: 14px; transition: var(--transition); }
.report-card:hover { border-color: var(--primary-light); background: var(--primary-light); }
.report-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--danger-bg); color: var(--danger); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.report-icon.pdf  { background: var(--danger-bg);  color: var(--danger); }
.report-icon.img  { background: var(--info-bg);    color: var(--info); }
.report-info { flex: 1; min-width: 0; }
.report-name { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.report-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.report-actions { display: flex; gap: 8px; }

/* ── Utility ────────────────────────────────────────────────── */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-muted   { color: var(--text-muted) !important; }
.text-primary-c { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger) !important; }
.text-warning { color: #cc8a00 !important; }
.fw-600       { font-weight: 600; }
.fw-700       { font-weight: 700; }
.fs-13        { font-size: 13px; }
.fs-12        { font-size: 12px; }
.mt-4-px      { margin-top: 4px; }
.gap-2        { gap: 8px; }
.gap-3        { gap: 12px; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.flex-1       { flex: 1; }
.w-100        { width: 100%; }
.p-0          { padding: 0; }
.mb-0         { margin-bottom: 0; }
.divider { border: none; border-top: 1px solid var(--border-color); margin: 20px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ── Responsive utilities ─────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }

@media (max-width: 767px) {
  .grid-2, .grid-3, .grid-auto { grid-template-columns: 1fr !important; }
}
