*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #0ea5e9;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #d97706;
    --text: #111827;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --bg: #f8fafc;
    --white: #ffffff;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 10px 30px rgba(0,0,0,.1);
}
body { font-family: 'Inter', system-ui, sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }

/* Navbar */
.navbar { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.nav-links { list-style: none; display: flex; align-items: center; gap: 8px; }
.nav-links a { padding: 6px 12px; border-radius: 8px; font-size: .9rem; color: var(--text-muted); font-weight: 500; transition: all .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); background: #eff6ff; }
.nav-user { display: flex; align-items: center; gap: 8px; }
.nav-user span { font-size: .85rem; color: var(--text-muted); }
.btn-nav { padding: 7px 16px; border-radius: 8px; font-size: .88rem; font-weight: 500; }
.btn-nav-primary { background: var(--primary); color: var(--white) !important; }
.btn-nav-primary:hover { background: var(--primary-dark); }
.btn-nav-logout { padding: 5px 12px; border-radius: 8px; font-size: .82rem; background: #fee2e2; color: var(--danger) !important; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.3rem; cursor: pointer; }

/* Buttons */
.btn { display: inline-block; padding: 10px 22px; border-radius: 9px; font-size: .92rem; font-weight: 600; cursor: pointer; border: none; transition: all .18s; text-align: center; }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); color: var(--white); }
.btn-outline { background: var(--white); color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: #eff6ff; }
.btn-danger { background: #fee2e2; color: var(--danger); border: 1px solid #fca5a5; }
.btn-danger:hover { background: #fecaca; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-sm { padding: 5px 12px; font-size: .82rem; }
.btn-block { display: block; width: 100%; }

/* Hero */
.hero { background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #0ea5e9 100%); color: var(--white); padding: 80px 0 60px; }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero-text h1 { font-size: 2.6rem; font-weight: 800; line-height: 1.15; margin-bottom: 16px; }
.hero-text h1 span { color: #93c5fd; }
.hero-text p { font-size: 1.1rem; opacity: .85; margin-bottom: 28px; }
.hero-text { display: flex; flex-direction: column; gap: 0; }
.hero-text .btn { display: inline-block; width: auto; margin-right: 12px; margin-bottom: 10px; }
.hero-text .btn-outline { border-color: rgba(255,255,255,.6); color: var(--white); }
.hero-text .btn-outline:hover { background: rgba(255,255,255,.15); }
.hero-card { background: rgba(255,255,255,.15); backdrop-filter: blur(10px); border-radius: 20px; padding: 40px; display: flex; gap: 32px; justify-content: center; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat span { display: block; font-size: 2.2rem; font-weight: 800; }
.hero-stat small { font-size: .9rem; opacity: .75; }

/* Sections */
.section-specializations, .section-doctors, .section-how { padding: 64px 0; }
.section-specializations { background: var(--white); }
.section-title { font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: 36px; }
.section-subtitle { font-size: 1.3rem; font-weight: 600; margin: 28px 0 16px; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.spec-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: .9rem; font-weight: 500; color: var(--text); transition: all .2s; }
.spec-card:hover { border-color: var(--primary); background: #eff6ff; color: var(--primary); transform: translateY(-2px); }
.spec-icon { font-size: 1.6rem; }

/* Doctor cards */
.doctor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.doctor-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow); text-align: center; transition: transform .2s, box-shadow .2s; }
.doctor-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.doctor-avatar { width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; font-size: 1.8rem; font-weight: 700; color: var(--white); }
.doctor-avatar.lg { width: 90px; height: 90px; font-size: 2.2rem; }
.doctor-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 4px; }
.doc-spec { color: var(--primary); font-size: .85rem; font-weight: 500; margin-bottom: 6px; }
.doc-bio { font-size: .82rem; color: var(--text-muted); margin-bottom: 8px; }
.doc-exp, .doc-fee { font-size: .85rem; color: var(--text-muted); margin: 2px 0; }
.doc-meta { display: flex; flex-direction: column; gap: 3px; font-size: .82rem; color: var(--text-muted); margin: 10px 0; text-align: left; }

/* Steps */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 24px; }
.step { text-align: center; padding: 28px 20px; }
.step-num { width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: var(--white); font-size: 1.3rem; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.step h3 { font-weight: 600; margin-bottom: 6px; }
.step p { color: var(--text-muted); font-size: .9rem; }

/* Auth */
.auth-section { min-height: calc(100vh - 128px); display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-card { background: var(--white); border: 1px solid var(--border); border-radius: 18px; padding: 44px 40px; width: 100%; max-width: 440px; box-shadow: var(--shadow-md); }
.auth-card h2 { font-size: 1.6rem; font-weight: 700; margin-bottom: 4px; }
.auth-sub { color: var(--text-muted); font-size: .9rem; margin-bottom: 24px; }
.auth-switch { text-align: center; font-size: .88rem; color: var(--text-muted); margin-top: 16px; }
.demo-creds { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 12px 16px; font-size: .8rem; color: #166534; margin-top: 16px; line-height: 1.8; }

/* Forms */
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .88rem; font-weight: 500; color: var(--text); }
.form-group input, .form-group select, .form-group textarea { padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 9px; font-size: .92rem; font-family: inherit; color: var(--text); background: var(--white); transition: border-color .2s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.req { color: var(--danger); }
.select-sm { padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: .8rem; }
.input-sm { padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: .8rem; flex: 1; min-width: 100px; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 9px; font-size: .9rem; margin-bottom: 16px; }
.alert-error   { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }
.alert-success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }

/* Badges */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; text-transform: capitalize; }
.badge-pending   { background: #fef9c3; color: #854d0e; }
.badge-confirmed { background: #dbeafe; color: #1e40af; }
.badge-completed { background: #dcfce7; color: #166534; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }

/* Appointments list */
.appt-list { display: flex; flex-direction: column; gap: 14px; }
.appt-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; display: flex; gap: 20px; align-items: flex-start; box-shadow: var(--shadow); }
.appt-card.status-cancelled { opacity: .7; }
.appt-date { background: var(--primary); color: var(--white); border-radius: 10px; padding: 10px 14px; text-align: center; min-width: 60px; }
.appt-day   { display: block; font-size: 1.5rem; font-weight: 700; line-height: 1; }
.appt-month { display: block; font-size: .72rem; opacity: .8; }
.appt-body  { flex: 1; }
.appt-body h3 { font-size: 1rem; font-weight: 600; }
.appt-body p  { font-size: .85rem; color: var(--text-muted); }
.appt-reason  { color: var(--text) !important; font-size: .85rem !important; }
.appt-fee     { color: var(--success) !important; font-weight: 500 !important; }
.appt-right   { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

/* Filter tabs */
.filter-tabs { display: flex; gap: 4px; margin: 20px 0; background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 4px; width: fit-content; }
.tab { padding: 7px 18px; border-radius: 7px; font-size: .88rem; font-weight: 500; color: var(--text-muted); transition: all .15s; }
.tab:hover { color: var(--primary); }
.tab.active { background: var(--primary); color: var(--white); }

/* Page layout */
.page-section { padding: 48px 0; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.page-title { font-size: 1.8rem; font-weight: 700; }
.back-link { display: inline-block; margin-bottom: 20px; color: var(--text-muted); font-size: .9rem; }
.back-link:hover { color: var(--primary); }

/* Search bar */
.search-bar { display: flex; gap: 10px; margin-bottom: 28px; flex-wrap: wrap; align-items: center; }
.search-bar input, .search-bar select { padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 9px; font-size: .9rem; font-family: inherit; }
.search-bar input { flex: 1; min-width: 200px; }

/* Book card */
.book-card { background: var(--white); border: 1px solid var(--border); border-radius: 18px; padding: 36px; box-shadow: var(--shadow-md); }
.book-doctor-info { display: flex; gap: 20px; align-items: flex-start; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.book-form { display: flex; flex-direction: column; gap: 18px; }

/* Admin stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; text-align: center; box-shadow: var(--shadow); }
.stat-card.accent { background: var(--primary); color: var(--white); border-color: var(--primary); }
.stat-card.accent span { color: var(--white); }
.stat-num { display: block; font-size: 2.2rem; font-weight: 800; color: var(--primary); }
.stat-card.accent .stat-num { color: var(--white); }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }

/* Table */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.data-table { width: 100%; border-collapse: collapse; background: var(--white); }
.data-table th { background: #f1f5f9; padding: 12px 16px; text-align: left; font-size: .82rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.data-table td { padding: 12px 16px; font-size: .9rem; border-top: 1px solid var(--border); vertical-align: middle; }
.data-table tr:hover td { background: #f8fafc; }

/* Misc */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state p { margin-bottom: 16px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.text-center { text-align: center; }

/* Footer */
.footer { background: #111827; color: #9ca3af; padding: 48px 0 0; margin-top: 80px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-brand .logo { color: var(--white); }
.footer-brand p { margin-top: 10px; font-size: .88rem; }
.footer-links h4, .footer-contact h4 { color: var(--white); margin-bottom: 12px; font-size: .95rem; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: #9ca3af; font-size: .88rem; }
.footer-links a:hover { color: var(--white); }
.footer-contact p { font-size: .88rem; margin-bottom: 4px; }
.footer-bottom { border-top: 1px solid #1f2937; padding: 18px 0; text-align: center; font-size: .83rem; }

/* Responsive */
@media (max-width: 768px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-text h1 { font-size: 1.9rem; }
    .hero-card { display: none; }
    .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--border); padding: 16px; gap: 4px; }
    .nav-links.open { display: flex; }
    .nav-toggle { display: block; }
    .footer-inner { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .book-doctor-info { flex-direction: column; }
    .appt-card { flex-direction: column; gap: 12px; }
    .appt-right { align-items: flex-start; }
    .auth-card { padding: 30px 22px; }
}
