/* ===== Global Styles ===== */
:root {
    --primary: #198754;
    --primary-light: #d1e7dd;
    --primary-dark: #146c43;
    --bg-light: #f8f9fa;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.7;
}

/* ===== Navbar ===== */
.navbar .navbar-brand {
    font-size: 1.6rem;
    font-weight: 800;
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--white) 100%);
    padding: 3rem 1rem 2rem;
}

.hero-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
}

.hero-desc {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 1rem auto 0;
}

/* ===== Filter Section ===== */
.filter-section {
    background: var(--white);
    padding: 1.5rem;
    margin-top: -1rem;
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: var(--shadow);
}

.filter-section .form-label {
    color: var(--text-dark);
    font-size: 0.95rem;
}

.filter-section .form-select {
    border-radius: 8px;
    border: 2px solid #dee2e6;
    padding: 0.7rem 1rem;
    transition: border-color 0.2s;
}

.filter-section .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.15);
}

.filter-section .btn-success {
    border-radius: 8px;
    font-weight: 700;
    padding: 0.7rem 1.5rem;
}

/* ===== Results Section ===== */
.results-section {
    background: var(--bg-light);
}

.section-title {
    font-weight: 700;
    color: var(--text-dark);
}

/* Doctor Card */
.doctor-card {
    background: var(--white);
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, transform 0.2s;
    overflow: hidden;
}

.doctor-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.doctor-card .card-body {
    padding: 1.2rem;
}

.doctor-card .doctor-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.doctor-card .doctor-specialty {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.doctor-card .doctor-area {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.doctor-card .doctor-rating {
    color: #ffc107;
    font-size: 0.9rem;
}

.doctor-card .updated-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
}

.doctor-card .btn-whatsapp {
    background-color: #25D366;
    border: none;
    border-radius: 8px;
    color: var(--white);
    font-weight: 700;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.doctor-card .btn-whatsapp:hover {
    background-color: #1ebe57;
    color: var(--white);
}

/* ===== Specialties Section ===== */
.specialties-section {
    background: var(--bg-light);
}

.specialty-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.2rem 0.8rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, transform 0.2s;
}

.specialty-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.specialty-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: 50%;
    transition: background-color 0.2s;
}

.specialty-card:hover .specialty-icon {
    background: var(--primary);
    color: var(--white);
}

.specialty-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-dark);
    margin-bottom: 0;
    text-align: center;
}

/* ===== How It Works ===== */
.how-it-works {
    background: var(--white);
}

.step-card {
    padding: 1.5rem 1rem;
}

.step-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.8rem;
}

.step-card h5 {
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.step-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ===== Blog Section ===== */
.blog-card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, transform 0.2s;
}

.blog-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

/* ===== Footer ===== */
.footer {
    background: var(--white);
    border-top: 1px solid #e9ecef;
}

.footer-links a {
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary) !important;
}

/* ===== Responsive Adjustments ===== */

/* Tablet */
@media (min-width: 768px) {
    .hero-section {
        padding: 4rem 2rem 3rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.6rem;
    }

    .hero-desc {
        font-size: 1.1rem;
    }
}

/* Desktop */
@media (min-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.8rem;
    }
}

/* Small phones */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .filter-section .form-select {
        font-size: 0.9rem;
        padding: 0.5rem 0.8rem;
    }

    .filter-section .btn-success {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
}

/* ===== Auth & Navigation ===== */
.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-nav .nav-link {
    color: var(--text-dark);
    font-weight: 600;
}

.user-nav-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 0.9rem;
    font-weight: 700;
}

.auth-page {
    background: linear-gradient(135deg, #f8fffb 0%, #ffffff 100%);
}

.auth-card {
    border: none;
    border-radius: 20px;
}

.auth-card .form-control {
    border-radius: 10px;
    padding: 0.75rem 1rem;
}

.auth-card .btn {
    border-radius: 10px;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        padding-top: 0.75rem;
    }

    .navbar-nav .nav-item {
        width: 100%;
    }

    .user-nav-badge {
        margin-top: 0.25rem;
    }
}

/* ===== Doctor Registration ===== */
.doctor-summary-card {
    text-align: right;
    margin-top: 1rem;
}

.doctor-summary-box {
    background: #f8fffb;
    border: 1px solid #d5f5e3;
    border-radius: 14px;
    padding: 1rem 1.1rem;
    box-shadow: 0 1px 6px rgba(25, 135, 84, 0.08);
}

/* ===== Doctor Dashboard ===== */
.status-banner {
    border-radius: var(--radius);
    padding: 0.9rem 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.status-banner.pending {
    background: #fff8e1;
    border: 1px solid #ffe4a3;
    color: #8a6d1d;
}

.status-banner.approved {
    background: var(--primary-light);
    border: 1px solid #b7e4c7;
    color: var(--primary-dark);
}

.status-banner.rejected {
    background: #fdecea;
    border: 1px solid #f5c2c0;
    color: #a02622;
}

.stat-tile {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.2rem 1rem;
    text-align: center;
    height: 100%;
}

.stat-tile-icon {
    font-size: 1.6rem;
    color: var(--primary);
    margin-bottom: 0.4rem;
}

.stat-tile-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-dark);
}

.stat-tile-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.stat-tile.low-balance .stat-tile-value,
.stat-tile.low-balance .stat-tile-icon {
    color: #dc3545;
}

.stat-tile-warning {
    color: #dc3545;
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 0.3rem;
}

.schedule-day-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #eef2ee;
}

.schedule-day-row:last-child {
    border-bottom: none;
}

.schedule-day-label {
    width: 90px;
    font-weight: 700;
}

.appointment-actions {
    margin-top: 0.75rem;
}

/* ===== Credits statistics charts ===== */
.chart-block {
    direction: ltr;
}

.chart-legend {
    display: flex;
    gap: 1rem;
    direction: ltr;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.chart-legend-swatch {
    width: 14px;
    height: 2px;
    border-radius: 1px;
    display: inline-block;
}

.chart-container {
    position: relative;
}

.chart-svg {
    display: block;
    overflow: visible;
}

.chart-gridline {
    stroke: #e1e0d9;
    stroke-width: 1;
}

.chart-baseline {
    stroke: #c3c2b7;
    stroke-width: 1;
}

.chart-axis-text {
    fill: #898781;
    font-size: 11px;
}

.chart-crosshair {
    stroke: #c3c2b7;
    stroke-width: 1;
}

.chart-hitrect {
    cursor: crosshair;
}

.chart-tooltip {
    position: absolute;
    top: 8px;
    transform: translateX(-50%);
    background: var(--white);
    border: 1px solid #e1e0d9;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 0.5rem 0.7rem;
    font-size: 0.8rem;
    min-width: 130px;
    pointer-events: none;
    display: none;
    z-index: 2;
}

.chart-tooltip-date {
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.chart-tooltip-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.chart-tooltip-key {
    width: 10px;
    height: 2px;
    border-radius: 1px;
    display: inline-block;
}

.chart-tooltip-label {
    color: var(--text-muted);
}
