/* =========================================================
   DoctorBook — Premium UI
   ========================================================= */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #eff4ff;
    --accent: #0ea5e9;
    --teal: #14b8a6;
    --ink: #0f172a;
    --body: #475569;
    --muted: #94a3b8;
    --line: #e6ebf3;
    --bg: #f6f8fc;
    --card: #ffffff;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 12px rgba(15, 23, 42, .05);
    --shadow-md: 0 10px 30px rgba(15, 23, 42, .10);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, .16);
    --grad: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    --grad-soft: linear-gradient(135deg, #eef4ff 0%, #e8f8ff 100%);
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--body);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

main { min-height: 60vh; }

a { text-decoration: none; color: var(--primary); }
h1, h2, h3, h4, h5, h6 { color: var(--ink); font-weight: 700; letter-spacing: -.02em; }

.text-primary { color: var(--primary) !important; }
.btn-primary {
    background: var(--grad); border: none; box-shadow: 0 8px 20px rgba(37, 99, 235, .28);
}
.btn-primary:hover { filter: brightness(.96); transform: translateY(-1px); }
.btn { transition: all .18s ease; font-weight: 600; }
.btn-outline-primary { border-color: var(--primary); color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }
.btn-soft { background: var(--primary-soft); color: var(--primary); border: 1px solid transparent; }
.btn-soft:hover { background: #e2ecff; color: var(--primary-dark); }
.rounded-pill { border-radius: 50rem !important; }

/* ---------- Navbar ---------- */
.main-navbar {
    background: rgba(255, 255, 255, .85);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
    padding-top: .7rem; padding-bottom: .7rem;
}
.brand-logo { font-size: 1.3rem; color: var(--ink); font-weight: 800; }
.brand-logo i { color: var(--primary); }
.main-navbar .nav-link { color: var(--ink); font-weight: 500; padding: .4rem 1rem; border-radius: 10px; }
.main-navbar .nav-link:hover, .main-navbar .nav-link.active { color: var(--primary); background: var(--primary-soft); }
.avatar-chip {
    width: 38px; height: 38px; border-radius: 50%; display: inline-flex;
    align-items: center; justify-content: center; background: var(--grad);
    color: #fff; font-weight: 700; text-transform: uppercase;
}

/* ---------- Hero ---------- */
.hero-section {
    background:
        radial-gradient(1000px 500px at 90% -10%, rgba(14, 165, 233, .12), transparent 60%),
        radial-gradient(800px 500px at 0% 0%, rgba(37, 99, 235, .10), transparent 55%),
        var(--bg);
    padding: 4.5rem 0 3rem;
    overflow: hidden;
}
.min-vh-75 { min-height: 70vh; }
.hero-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    background: #fff; color: var(--primary); font-weight: 600; font-size: .82rem;
    padding: .45rem 1rem; border-radius: 50rem; box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
}
.hero-title { font-size: clamp(2.1rem, 4.5vw, 3.4rem); line-height: 1.1; font-weight: 800; }
.hero-title .accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-subtitle { font-size: 1.08rem; color: var(--body); max-width: 34rem; }

/* Hero search */
.hero-search {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-md);
    padding: .6rem; border: 1px solid var(--line);
}
.hero-search .form-control, .hero-search .form-select {
    border: none; box-shadow: none; font-size: .95rem;
}
.hero-search .form-control:focus, .hero-search .form-select:focus { box-shadow: none; }

/* Hero visual card */
.hero-card {
    background: #fff; border-radius: 26px; padding: 1.4rem;
    box-shadow: var(--shadow-lg); border: 1px solid var(--line);
    position: relative;
}
.mini-card {
    display: flex; gap: 1rem; align-items: center; padding: 1rem 1.1rem;
    border-radius: var(--radius-sm); background: var(--grad-soft);
    border: 1px solid rgba(37, 99, 235, .08);
}
.mini-card i { font-size: 1.6rem; color: var(--primary); }
.mini-card h6 { margin: 0; font-size: .98rem; }
.mini-card p { margin: 0; font-size: .82rem; color: var(--body); }

/* ---------- Stats ---------- */
.stats-card {
    background: #fff; border-radius: var(--radius); padding: 1.6rem;
    text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--line);
    transition: transform .2s ease, box-shadow .2s ease;
}
.stats-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.stats-card h3 { font-size: 2.2rem; margin: 0; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stats-card p { margin: .2rem 0 0; color: var(--muted); font-weight: 500; }

/* ---------- Section headings ---------- */
.section { padding: 3.5rem 0; }
.section-eyebrow { color: var(--primary); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); }

/* ---------- Specialization chips ---------- */
.spec-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.4rem 1rem; text-align: center; display: block; height: 100%;
    transition: all .2s ease; color: var(--ink);
}
.spec-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-3px); color: var(--primary); }
.spec-card .ico {
    width: 56px; height: 56px; border-radius: 16px; margin: 0 auto .7rem;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-soft); color: var(--primary); font-size: 1.5rem;
}
.spec-card:hover .ico { background: var(--grad); color: #fff; }
.spec-card .count { font-size: .78rem; color: var(--muted); }

/* ---------- Doctor card ---------- */
.doctor-card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; height: 100%; transition: all .22s ease; display: flex; flex-direction: column;
}
.doctor-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: transparent; }
.doctor-card .card-top { padding: 1.3rem 1.3rem 0; display: flex; gap: 1rem; align-items: center; }
.doctor-avatar {
    width: 66px; height: 66px; border-radius: 16px; object-fit: cover; flex-shrink: 0;
    background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 700;
}
.doctor-card .card-body { padding: 1rem 1.3rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.doctor-name { font-size: 1.1rem; margin: 0; }
.doctor-spec { color: var(--primary); font-weight: 600; font-size: .88rem; }
.pill {
    display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 600;
    padding: .3rem .7rem; border-radius: 50rem; background: var(--primary-soft); color: var(--primary);
}
.pill.gray { background: #f1f5f9; color: var(--body); }
.rating-star { color: #f59e0b; }
.fee { font-size: 1.15rem; font-weight: 800; color: var(--ink); }

/* ---------- Generic card ---------- */
.card-premium { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.clinic-card { transition: all .2s ease; }
.clinic-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 78vh; display: flex; align-items: center; }
.auth-card {
    background: #fff; border-radius: 22px; padding: 2.4rem; box-shadow: var(--shadow-lg);
    border: 1px solid var(--line);
}
.auth-side {
    background: var(--grad); border-radius: 22px; color: #fff; padding: 2.6rem;
    height: 100%; display: flex; flex-direction: column; justify-content: center;
}
.auth-side h3 { color: #fff; }
.auth-side .feat { display: flex; gap: .7rem; align-items: flex-start; margin-top: 1rem; }
.auth-side .feat i { font-size: 1.2rem; }
.form-label { font-weight: 600; color: var(--ink); font-size: .9rem; }

/* ---------- Slot picker ---------- */
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .6rem; }
.slot-btn {
    border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: .55rem .3rem;
    font-size: .86rem; font-weight: 600; color: var(--ink); cursor: pointer; text-align: center;
    transition: all .15s ease;
}
.slot-btn:hover { border-color: var(--primary); color: var(--primary); }
.slot-btn.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 14px rgba(37,99,235,.3); }
.slot-empty { color: var(--muted); font-size: .9rem; }

/* ---------- Badges / status ---------- */
.badge-status { font-weight: 600; padding: .4rem .75rem; border-radius: 50rem; font-size: .76rem; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-confirmed { background: #dbeafe; color: #1e40af; }
.badge-completed { background: #dcfce7; color: #166534; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }

/* ---------- Dashboard ---------- */
.dash-shell { padding: 2rem 0; }
.kpi {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.3rem; box-shadow: var(--shadow-sm); height: 100%;
}
.kpi .ico { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.kpi h3 { font-size: 1.9rem; margin: .4rem 0 0; }
.kpi p { margin: 0; color: var(--muted); font-weight: 500; font-size: .88rem; }
.ico-blue { background: var(--primary-soft); color: var(--primary); }
.ico-green { background: #dcfce7; color: #16a34a; }
.ico-amber { background: #fef3c7; color: #d97706; }
.ico-sky { background: #e0f2fe; color: #0284c7; }
.dash-side .nav-link {
    color: var(--body); font-weight: 500; border-radius: 10px; padding: .6rem .9rem; margin-bottom: .2rem;
    display: flex; align-items: center; gap: .6rem;
}
.dash-side .nav-link:hover { background: var(--primary-soft); color: var(--primary); }
.dash-side .nav-link.active { background: var(--grad); color: #fff; }

/* ---------- Tables ---------- */
.table-premium { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.table-premium thead th { background: #f8fafc; color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; border: none; }
.table-premium td { vertical-align: middle; border-color: var(--line); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cbd5e1; margin-top: 4rem; }
.site-footer h5, .site-footer h6 { color: #fff; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.site-footer .foot-bottom { border-top: 1px solid rgba(255,255,255,.08); }

/* ---------- Utility ---------- */
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-state i { font-size: 3rem; color: var(--muted); }
.divider-soft { height: 1px; background: var(--line); border: none; }
.cta-band { background: var(--grad); border-radius: 26px; color: #fff; padding: 3rem; }
.cta-band h2 { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .hero-section { padding: 3rem 0 2rem; }
    .auth-side { display: none; }
    .main-navbar .navbar-nav { padding-top: .6rem; }
    .main-navbar .nav-item { margin: .1rem 0; }
}
@media (max-width: 575px) {
    .hero-title { font-size: 2rem; }
    .auth-card, .cta-band { padding: 1.6rem; }
    .kpi h3 { font-size: 1.6rem; }
    .doctor-card .card-top { flex-direction: row; }
}
