/* =============================================
   DENTAL CLINIC - GLOBAL STYLESHEET
   Theme: White + Blue Medical
   Reusable for multiple clinics
   ============================================= */

/* ---------- CSS Variables (rebrand here) ---------- */
:root {
    --primary:       #1a73e8;
    --primary-dark:  #1558b0;
    --primary-light: #e8f0fe;
    --accent:        #00b4d8;
    --success:       #28a745;
    --danger:        #dc3545;
    --text:          #1c1c1e;
    --text-muted:    #6c757d;
    --white:         #ffffff;
    --light:         #f7f9fc;
    --border:        #dde3ed;
    --shadow-sm:     0 2px 8px rgba(26,115,232,0.08);
    --shadow-md:     0 6px 24px rgba(26,115,232,0.12);
    --radius:        10px;
    --radius-lg:     16px;
    --transition:    0.25s ease;
    --font:          'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--light);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ---------- Utilities ---------- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    text-align: center;
    font-family: var(--font);
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 16px rgba(26,115,232,0.3);
    transform: translateY(-1px);
    text-decoration: none;
}
.btn-white { background: var(--white); color: var(--primary); }
.btn-white:hover { background: var(--primary-light); text-decoration: none; }
.btn-success { background: var(--success); color: var(--white); padding: 6px 14px; font-size: 0.85rem; border-radius: 6px; border: none; cursor: pointer; font-family: var(--font); }
.btn-danger  { background: var(--danger);  color: var(--white); padding: 6px 14px; font-size: 0.85rem; border-radius: 6px; border: none; cursor: pointer; font-family: var(--font); }
.btn-success:hover, .btn-danger:hover { opacity: 0.88; }
.btn-full { width: 100%; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; text-transform: capitalize; }
.badge-pending   { background: #fff3cd; color: #856404; }
.badge-confirmed { background: #d1e7dd; color: #0a5c36; }
.badge-rejected  { background: #f8d7da; color: #842029; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 7px; font-weight: 500; font-size: 0.9rem; }
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="file"],
select, textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: var(--font);
    color: var(--text);
    background: var(--white);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
}
input[type="file"] { padding: 8px; cursor: pointer; }

/* ---------- NAV ---------- */
.nav { background: var(--white); box-shadow: 0 2px 8px rgba(0,0,0,0.07); position: sticky; top: 0; z-index: 100; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-logo { font-size: 1.4rem; font-weight: 700; color: var(--primary); letter-spacing: -0.5px; }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); transition: color var(--transition); }
.nav-links a:hover, .nav-links a.active { color: var(--primary); text-decoration: none; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; font-size: 1.5rem; color: var(--text); }

/* ---------- HERO ---------- */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 60%, #0a3d91 100%);
    color: var(--white);
    padding: 100px 0 80px;
    text-align: center;
}
.hero-badge { display: inline-block; background: rgba(255,255,255,0.18); border-radius: 24px; padding: 5px 16px; font-size: 0.85rem; font-weight: 600; margin-bottom: 20px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.2; margin-bottom: 18px; }
.hero p { font-size: 1.1rem; opacity: 0.9; max-width: 560px; margin: 0 auto 32px; }
.hero .btn-white { font-size: 1.05rem; padding: 14px 36px; }

/* ---------- SECTION HEADINGS ---------- */
.section-title { font-size: 2rem; font-weight: 700; margin-bottom: 10px; }
.section-subtitle { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 40px; }

/* ---------- SERVICES GRID (homepage) ---------- */
.services-section { padding: 80px 0; background: var(--light); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.service-card { background: var(--white); border-radius: var(--radius-lg); padding: 30px 24px; box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition); text-align: center; }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.service-icon { font-size: 2.5rem; margin-bottom: 14px; }
.service-card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.service-card p { font-size: 0.9rem; color: var(--text-muted); }

/* ---------- DOCTORS ---------- */
.doctors-section { padding: 80px 0; background: var(--white); }
.doctors-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.doctor-card { text-align: center; background: var(--light); border-radius: var(--radius-lg); padding: 30px 20px; box-shadow: var(--shadow-sm); transition: transform var(--transition); }
.doctor-card:hover { transform: translateY(-3px); }
.doctor-avatar { width: 90px; height: 90px; border-radius: 50%; background: var(--primary-light); margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; border: 3px solid var(--primary); }
.doctor-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.doctor-card .spec { font-size: 0.85rem; color: var(--text-muted); }
.doctor-card .qual { font-size: 0.8rem; color: var(--primary); font-weight: 500; margin-top: 4px; }

/* ---------- REVIEWS ---------- */
.reviews-section { padding: 80px 0; background: var(--light); }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 24px; }
.review-card { background: var(--white); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); }
.review-stars { font-size: 1.1rem; margin-bottom: 10px; color: #f59e0b; }
.review-text { font-size: 0.95rem; color: var(--text); margin-bottom: 14px; font-style: italic; line-height: 1.7; }
.reviewer-name { font-weight: 600; font-size: 0.9rem; color: var(--text-muted); }

/* ---------- CTA ---------- */
.cta-section { background: linear-gradient(135deg, var(--accent), var(--primary)); color: var(--white); padding: 70px 0; text-align: center; }
.cta-section h2 { font-size: 2rem; margin-bottom: 14px; }
.cta-section p { opacity: 0.9; margin-bottom: 28px; font-size: 1.05rem; max-width: 500px; margin-left: auto; margin-right: auto; }

/* ---------- FOOTER ---------- */
footer { background: #12213a; color: #c0cfe0; padding: 40px 0; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; margin-bottom: 28px; }
.footer-brand { font-size: 1.2rem; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.footer-col h4 { color: var(--white); font-size: 0.9rem; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col a { color: #c0cfe0; display: block; margin-bottom: 6px; font-size: 0.88rem; }
.footer-col a:hover { color: var(--accent); text-decoration: none; }
.footer-col p { font-size: 0.88rem; line-height: 1.8; }
.footer-bottom { border-top: 1px solid #243452; padding-top: 20px; text-align: center; color: #7a93b4; }

/* ---------- PAGE HEADER ---------- */
.page-header { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: var(--white); padding: 56px 0 44px; text-align: center; }
.page-header h1 { font-size: 2.2rem; font-weight: 700; margin-bottom: 8px; }
.page-header p { opacity: 0.88; font-size: 1rem; }

/* ---------- BOOKING PAGE ---------- */
.booking-wrapper { max-width: 580px; margin: 50px auto 70px; padding: 0 20px; }
.booking-section { background: var(--white); border-radius: var(--radius-lg); padding: 38px; box-shadow: var(--shadow-md); animation: fadeUp 0.35s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.booking-section h2 { font-size: 1.35rem; color: var(--primary); margin-bottom: 24px; padding-bottom: 14px; border-bottom: 1.5px solid var(--border); }

.step-indicator { display: flex; margin-bottom: 32px; border-radius: var(--radius); overflow: hidden; border: 1.5px solid var(--border); }
.step { flex: 1; padding: 10px 6px; text-align: center; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); background: var(--white); border-right: 1.5px solid var(--border); transition: background var(--transition), color var(--transition); }
.step:last-child { border-right: none; }
.step.active { background: var(--primary); color: var(--white); }
.step.done   { background: var(--primary-light); color: var(--primary); }

.payment-box { background: var(--light); border-radius: var(--radius); padding: 24px; text-align: center; margin-bottom: 24px; border: 1.5px solid var(--border); }
.qr-wrap { width: 180px; height: 180px; margin: 0 auto 16px; border-radius: var(--radius); overflow: hidden; border: 2px solid var(--border); background: var(--white); display: flex; align-items: center; justify-content: center; }
.qr-wrap img { width: 100%; height: 100%; object-fit: contain; }
.amount-tag { display: inline-block; background: var(--primary-light); color: var(--primary); font-weight: 700; font-size: 1.15rem; padding: 6px 20px; border-radius: 24px; margin-bottom: 10px; }
.upi-chip { display: inline-block; background: var(--white); border: 1.5px solid var(--border); border-radius: 8px; padding: 5px 14px; font-family: monospace; font-size: 0.92rem; margin-bottom: 10px; }
.pay-note { font-size: 0.84rem; color: var(--text-muted); margin-top: 6px; }

.summary-box { background: var(--primary-light); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 22px; font-size: 0.9rem; border-left: 4px solid var(--primary); line-height: 1.8; }
.summary-box strong { color: var(--primary); }

.spinner { display: inline-block; width: 16px; height: 16px; border: 2.5px solid rgba(255,255,255,0.4); border-top-color: var(--white); border-radius: 50%; animation: spin 0.7s linear infinite; margin-right: 6px; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast { position: fixed; bottom: 28px; right: 28px; background: #1c1c1e; color: var(--white); padding: 14px 22px; border-radius: var(--radius); font-size: 0.9rem; box-shadow: var(--shadow-md); z-index: 999; animation: slideIn 0.3s ease; max-width: 320px; }
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
@keyframes slideIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- ADMIN ---------- */
.admin-page { background: var(--light); min-height: 100vh; }
.admin-login { max-width: 400px; margin: 80px auto; padding: 0 20px; }
.admin-login .card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 36px; }
.admin-login h2 { font-size: 1.4rem; color: var(--primary); margin-bottom: 6px; text-align: center; }
.admin-login .subtitle { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 24px; }

.admin-topbar { background: var(--white); border-bottom: 1.5px solid var(--border); padding: 0 28px; height: 60px; display: flex; align-items: center; justify-content: space-between; }
.admin-topbar .logo { font-weight: 700; color: var(--primary); font-size: 1.1rem; }
.admin-topbar .user-info { font-size: 0.88rem; color: var(--text-muted); display: flex; align-items: center; gap: 12px; }

.admin-wrapper { max-width: 1200px; margin: 32px auto 60px; padding: 0 24px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-header h2 { font-size: 1.4rem; }

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); text-align: center; }
.stat-card .stat-value { font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-card .stat-label { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }

.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; background: var(--white); font-size: 0.88rem; }
thead { background: var(--primary); color: var(--white); }
th, td { padding: 13px 15px; text-align: left; vertical-align: middle; }
th { font-weight: 600; white-space: nowrap; }
tbody tr { border-bottom: 1px solid var(--border); transition: background var(--transition); }
tbody tr:hover { background: var(--light); }
tbody tr:last-child { border-bottom: none; }
.td-actions { display: flex; gap: 6px; }

.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.filter-bar input, .filter-bar select { flex: 1; min-width: 160px; padding: 10px 14px; font-size: 0.9rem; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 3rem; margin-bottom: 12px; }

/* ---------- SERVICES FULL PAGE ---------- */
.services-page { padding: 60px 0 80px; }
.services-list { display: flex; flex-direction: column; gap: 36px; }
.service-item { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; display: grid; grid-template-columns: 160px 1fr; transition: box-shadow var(--transition); }
.service-item:hover { box-shadow: var(--shadow-md); }
.service-img-wrap { background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 4rem; padding: 24px; }
.service-content { padding: 28px 32px; }
.service-content h3 { font-size: 1.3rem; color: var(--primary); margin-bottom: 10px; }
.service-content .desc { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 18px; line-height: 1.7; }
.service-content h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 8px; }
.steps { padding-left: 18px; list-style: decimal; }
.steps li { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 5px; }
.price-tag { display: inline-block; background: var(--primary-light); color: var(--primary); padding: 3px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; margin-top: 12px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--white); padding: 20px; box-shadow: var(--shadow-sm); gap: 16px; }
    .nav-links.open { display: flex; }
    .nav-toggle { display: block; }
    .hero { padding: 70px 0 60px; }
    .service-item { grid-template-columns: 1fr; }
    .service-img-wrap { font-size: 3rem; min-height: 100px; }
    .booking-section { padding: 24px 20px; }
    .step { font-size: 0.72rem; padding: 8px 2px; }
    .admin-header { flex-direction: column; align-items: flex-start; }
    table { font-size: 0.8rem; }
    th, td { padding: 10px; }
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 480px) {
    .booking-wrapper { margin-top: 30px; }
    .booking-section { padding: 20px 16px; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .section-title { font-size: 1.6rem; }
}
