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

:root {
  --brand:       #2563eb;
  --brand-dark:  #1d4ed8;
  --brand-light: #eff6ff;
  --accent:      #0ea5e9;
  --success:     #10b981;
  --warning:     #f59e0b;
  --danger:      #ef4444;
  --dark:        #0f172a;
  --slate:       #334155;
  --muted:       #64748b;
  --border:      #e2e8f0;
  --bg:          #f8fafc;
  --white:       #ffffff;
  --radius:      12px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08);
  --shadow:      0 4px 20px rgba(0,0,0,.10);
  --shadow-lg:   0 20px 60px rgba(0,0,0,.15);
  --font:        'Inter', system-ui, -apple-system, sans-serif;
}

body { font-family: var(--font); color: var(--dark); background: var(--white); line-height: 1.6; }
a    { text-decoration: none; color: inherit; }
img  { max-width: 100%; display: block; }

/* ── Typography ────────────────────────────────────────────────────────────── */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 1.25rem; font-weight: 600; }
p  { color: var(--muted); }

/* ── Utilities ─────────────────────────────────────────────────────────────── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.text-brand { color: var(--brand); }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 99px; font-size: .75rem; font-weight: 600;
  background: var(--brand-light); color: var(--brand);
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius); font-size: .95rem;
  font-weight: 600; cursor: pointer; transition: all .15s; border: none;
}
.btn-primary  { background: var(--brand); color: var(--white); }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 8px 25px rgba(37,99,235,.35); }
.btn-outline  { background: transparent; color: var(--brand); border: 2px solid var(--brand); }
.btn-outline:hover { background: var(--brand-light); }
.btn-white    { background: var(--white); color: var(--brand); box-shadow: var(--shadow); }
.btn-white:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-sm { padding: 8px 16px; font-size: .85rem; }

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  LANDING PAGE                                                               */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* ── Nav ───────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem;
}
.nav-logo-icon {
  width: 36px; height: 36px; background: var(--brand); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; color: white; font-size: 1.1rem;
}
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: .9rem; font-weight: 500; color: var(--slate); transition: color .15s; }
.nav-links a:hover { color: var(--brand); }
.nav-cta { display: flex; gap: 12px; }

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  padding: 96px 0 80px;
  background: linear-gradient(160deg, #f0f7ff 0%, #ffffff 60%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -200px; right: -200px;
  width: 700px; height: 700px; border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,.08) 0%, transparent 70%);
}
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.hero-badge { margin-bottom: 24px; }
.hero h1 { margin-bottom: 20px; }
.hero-sub { font-size: 1.15rem; margin-bottom: 36px; max-width: 480px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 32px; margin-top: 48px; }
.hero-stat strong { display: block; font-size: 1.75rem; font-weight: 800; color: var(--dark); }
.hero-stat span { font-size: .85rem; color: var(--muted); }
.hero-visual {
  background: white; border-radius: 20px; box-shadow: var(--shadow-lg);
  padding: 28px; border: 1px solid var(--border); position: relative;
}
.hero-visual-header {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 20px;
}
.avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 1rem; flex-shrink: 0;
}
.online-dot {
  width: 10px; height: 10px; background: var(--success); border-radius: 50%;
  border: 2px solid white; position: absolute; bottom: 0; right: 0;
}
.chat-bubble {
  padding: 12px 16px; border-radius: 14px; font-size: .9rem; margin-bottom: 10px; max-width: 85%;
}
.chat-bubble.ai   { background: var(--brand-light); color: var(--brand-dark); border-bottom-left-radius: 4px; }
.chat-bubble.user { background: var(--brand); color: white; margin-left: auto; border-bottom-right-radius: 4px; }
.chat-bubble p { color: inherit; font-size: .88rem; }
.typing { display: flex; gap: 4px; padding: 12px 16px; background: var(--bg); border-radius: 14px; width: fit-content; }
.typing span { width: 7px; height: 7px; background: var(--muted); border-radius: 50%; animation: bounce .9s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%,80%,100% { transform: translateY(0); } 40% { transform: translateY(-8px); } }

/* ── Features ──────────────────────────────────────────────────────────────── */
.features { padding: 96px 0; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-header p { max-width: 520px; margin: 12px auto 0; font-size: 1.05rem; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.feature-card {
  padding: 32px; border-radius: var(--radius); border: 1px solid var(--border);
  background: white; transition: all .2s;
}
.feature-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: var(--brand); }
.feature-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--brand-light); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 20px;
}
.feature-card h3 { margin-bottom: 10px; }

/* ── How it works ──────────────────────────────────────────────────────────── */
.how { padding: 96px 0; background: var(--bg); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; position: relative; }
.steps::before {
  content: ''; position: absolute; top: 28px; left: 14%; right: 14%; height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}
.step { text-align: center; }
.step-num {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--brand); color: white; font-weight: 800; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; position: relative; z-index: 1;
  box-shadow: 0 0 0 6px var(--brand-light);
}
.step h3 { margin-bottom: 8px; }

/* ── CTA Banner ────────────────────────────────────────────────────────────── */
.cta-banner {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--brand) 0%, #1e40af 100%);
  text-align: center; color: white;
}
.cta-banner h2 { color: white; margin-bottom: 16px; }
.cta-banner p  { color: rgba(255,255,255,.8); margin-bottom: 36px; font-size: 1.05rem; }

/* ── Footer ────────────────────────────────────────────────────────────────── */
footer {
  background: var(--dark); color: rgba(255,255,255,.6);
  padding: 40px 0; text-align: center; font-size: .875rem;
}
footer strong { color: white; }

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  AUTH PAGES  (login.html)                                                   */
/* ═══════════════════════════════════════════════════════════════════════════ */
.auth-page {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr;
}
.auth-left {
  background: linear-gradient(160deg, var(--brand) 0%, #1e40af 100%);
  display: flex; flex-direction: column; justify-content: center;
  padding: 64px; color: white; position: relative; overflow: hidden;
}
.auth-left::before {
  content: ''; position: absolute; bottom: -150px; left: -150px;
  width: 500px; height: 500px; border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.auth-left-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 60px; font-weight: 800; font-size: 1.3rem; }
.auth-left-logo-icon {
  width: 42px; height: 42px; background: rgba(255,255,255,.2); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.auth-left h2 { font-size: 2rem; margin-bottom: 16px; line-height: 1.2; }
.auth-left p  { color: rgba(255,255,255,.75); font-size: 1rem; margin-bottom: 40px; }
.auth-perks { display: flex; flex-direction: column; gap: 16px; }
.auth-perk { display: flex; align-items: center; gap: 14px; }
.auth-perk-icon {
  width: 36px; height: 36px; background: rgba(255,255,255,.15); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.auth-perk span { font-size: .92rem; color: rgba(255,255,255,.9); }

.auth-right {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 64px 48px; background: white;
}
.auth-card { width: 100%; max-width: 420px; }
.auth-card h2 { font-size: 1.75rem; margin-bottom: 8px; }
.auth-card > p { margin-bottom: 36px; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: .875rem; font-weight: 600; color: var(--slate); margin-bottom: 8px; }
.form-control {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: .95rem; font-family: var(--font); transition: border-color .15s, box-shadow .15s;
  background: white; outline: none; color: var(--dark);
}
.form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(37,99,235,.1); }
.form-control.error { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(239,68,68,.1); }

.btn-full { width: 100%; }

.divider { display: flex; align-items: center; gap: 12px; margin: 24px 0; }
.divider::before,.divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.divider span { font-size: .8rem; color: var(--muted); white-space: nowrap; }

.auth-footer { margin-top: 28px; text-align: center; font-size: .875rem; color: var(--muted); }
.auth-footer a { color: var(--brand); font-weight: 600; }

.alert {
  padding: 12px 16px; border-radius: var(--radius); font-size: .875rem;
  margin-bottom: 20px; display: none;
}
.alert.show { display: block; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.input-icon { position: relative; }
.input-icon .form-control { padding-left: 44px; }
.input-icon .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1rem; pointer-events: none; }

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  DASHBOARD                                                                   */
/* ═══════════════════════════════════════════════════════════════════════════ */
.dash-layout { display: flex; min-height: 100vh; background: var(--bg); }

/* Sidebar */
.sidebar {
  width: 260px; flex-shrink: 0; background: var(--dark);
  display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 50;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 10px; padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08); font-weight: 800; color: white; font-size: 1.1rem;
}
.sidebar-logo-icon {
  width: 36px; height: 36px; background: var(--brand); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.sidebar-section { margin-bottom: 8px; }
.sidebar-section-title {
  font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.3); padding: 12px 8px 6px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 10px; font-size: .9rem; color: rgba(255,255,255,.65);
  transition: all .15s; cursor: pointer;
}
.sidebar-link:hover { background: rgba(255,255,255,.06); color: white; }
.sidebar-link.active { background: var(--brand); color: white; }
.sidebar-link .icon { width: 20px; text-align: center; font-size: 1rem; }
.sidebar-link .badge-count {
  margin-left: auto; background: var(--danger); color: white;
  font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 99px;
}
.sidebar-footer {
  padding: 16px 12px; border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 10px; color: rgba(255,255,255,.7);
}
.sidebar-user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; color: white; flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: .85rem; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: .72rem; color: rgba(255,255,255,.4); }
.sidebar-user-action { color: rgba(255,255,255,.4); cursor: pointer; font-size: .9rem; }
.sidebar-user-action:hover { color: white; }

/* Main content */
.dash-main { margin-left: 260px; flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

.dash-topbar {
  background: white; border-bottom: 1px solid var(--border);
  padding: 0 32px; height: 68px; display: flex; align-items: center;
  justify-content: space-between; position: sticky; top: 0; z-index: 40;
}
.dash-topbar-left h1 { font-size: 1.2rem; font-weight: 700; }
.dash-topbar-left p  { font-size: .8rem; color: var(--muted); }
.dash-topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-icon {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--muted); font-size: 1rem; transition: all .15s; background: white;
}
.topbar-icon:hover { border-color: var(--brand); color: var(--brand); }

.dash-content { padding: 32px; flex: 1; }

/* Stat cards */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
.stat-card {
  background: white; border-radius: var(--radius); padding: 24px;
  border: 1px solid var(--border); display: flex; align-items: center; gap: 16px;
}
.stat-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0;
}
.stat-icon.blue   { background: var(--brand-light); }
.stat-icon.green  { background: #ecfdf5; }
.stat-icon.yellow { background: #fffbeb; }
.stat-icon.red    { background: #fef2f2; }
.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--dark); line-height: 1; }
.stat-label { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.stat-delta { font-size: .75rem; margin-top: 6px; font-weight: 600; }
.stat-delta.up   { color: var(--success); }
.stat-delta.down { color: var(--danger); }

/* Grid layouts */
.dash-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 28px; }
.dash-grid-3-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 28px; }

/* Cards */
.card {
  background: white; border-radius: var(--radius); border: 1px solid var(--border);
  overflow: hidden;
}
.card-header {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { font-size: 1rem; }
.card-header p  { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.card-body { padding: 24px; }

/* Table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead tr { border-bottom: 1px solid var(--border); }
th { padding: 10px 16px; text-align: left; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
td { padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--slate); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg); }
.td-name { font-weight: 600; color: var(--dark); }

/* Status pills */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 99px; font-size: .75rem; font-weight: 600;
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-green  { background: #ecfdf5; color: #065f46; }
.pill-blue   { background: var(--brand-light); color: var(--brand); }
.pill-yellow { background: #fffbeb; color: #92400e; }
.pill-red    { background: #fef2f2; color: #991b1b; }
.pill-gray   { background: #f1f5f9; color: var(--muted); }

/* Live feed */
.live-feed { display: flex; flex-direction: column; gap: 0; }
.feed-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.feed-item:last-child { border-bottom: none; }
.feed-dot {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; margin-top: 2px;
  display: flex; align-items: center; justify-content: center; font-size: .85rem;
}
.feed-dot.call   { background: #eff6ff; color: var(--brand); }
.feed-dot.booked { background: #ecfdf5; color: var(--success); }
.feed-dot.cancel { background: #fef2f2; color: var(--danger); }
.feed-dot.wait   { background: #fffbeb; color: var(--warning); }
.feed-text { flex: 1; font-size: .85rem; color: var(--slate); }
.feed-text strong { color: var(--dark); }
.feed-time { font-size: .75rem; color: var(--muted); white-space: nowrap; }

/* Practitioners mini list */
.practitioner-list { display: flex; flex-direction: column; gap: 12px; }
.practitioner-item { display: flex; align-items: center; gap: 12px; }
.practitioner-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: white; font-size: .9rem;
}
.practitioner-info { flex: 1; }
.practitioner-name { font-size: .875rem; font-weight: 600; color: var(--dark); }
.practitioner-spec { font-size: .75rem; color: var(--muted); }
.practitioner-count { font-size: .8rem; font-weight: 700; color: var(--brand); }

/* Quick actions */
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick-action {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px 12px; border-radius: var(--radius); border: 1.5px solid var(--border);
  cursor: pointer; transition: all .15s; text-align: center;
  background: white;
}
.quick-action:hover { border-color: var(--brand); background: var(--brand-light); }
.quick-action .icon { font-size: 1.5rem; }
.quick-action span  { font-size: .8rem; font-weight: 600; color: var(--slate); }

/* Empty state */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state .icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state h3 { margin-bottom: 6px; }

/* Loading spinner */
.spinner {
  width: 20px; height: 20px; border: 2.5px solid rgba(255,255,255,.3);
  border-top-color: white; border-radius: 50%; animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .dash-grid-3-1 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .hero-inner, .auth-page { grid-template-columns: 1fr; }
  .hero-visual, .auth-left { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps::before { display: none; }
  .nav-links { display: none; }
  .sidebar { transform: translateX(-100%); }
  .dash-main { margin-left: 0; }
  .stat-cards { grid-template-columns: 1fr; }
  .dash-grid-2 { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: repeat(4, 1fr); }
}
