:root {
    --portal-primary: #0d6efd;
    --portal-primary-dark: #0b5ed7;
    --portal-accent: #0dcaf0;
    --portal-ink: #1a2b4a;
    --portal-muted: #5f6f8a;
    --portal-bg: #f4f7fb;
    --portal-card-shadow: 0 6px 24px rgba(13, 110, 253, 0.08);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background: var(--portal-bg);
    color: var(--portal-ink);
}

h1, h2, h3, h4, h5 {
    color: var(--portal-ink);
}

.text-muted-portal {
    color: var(--portal-muted);
}

/* ---------- Navbar ---------- */
.portal-navbar {
    background: #fff;
    box-shadow: 0 2px 12px rgba(26, 43, 74, 0.08);
    padding: 0.65rem 0;
}

.portal-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--portal-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.portal-brand:hover {
    color: var(--portal-primary-dark);
}

.portal-brand .brand-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--portal-primary), #20c997);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.portal-navbar .nav-link {
    color: var(--portal-ink);
    font-weight: 500;
    margin: 0 0.25rem;
    border-radius: 8px;
    padding: 0.5rem 0.85rem;
}

.portal-navbar .nav-link:hover,
.portal-navbar .nav-link.active {
    color: var(--portal-primary);
    background: rgba(13, 110, 253, 0.08);
}

/* ---------- Hero ---------- */
.portal-hero {
    background: linear-gradient(120deg, #0d6efd 0%, #20c997 100%);
    color: #fff;
    padding: 4.5rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.portal-hero::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}

.portal-hero::before {
    content: "";
    position: absolute;
    right: 140px;
    bottom: -120px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.portal-hero h1 {
    color: #fff;
    font-weight: 800;
}

.portal-hero p.lead {
    color: rgba(255, 255, 255, 0.92);
}

.portal-search {
    background: #fff;
    border-radius: 14px;
    padding: 0.4rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

/* ---------- Sections ---------- */
.portal-section {
    padding: 3.5rem 0;
}

.portal-section-title {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.portal-section-sub {
    color: var(--portal-muted);
    margin-bottom: 2rem;
}

/* ---------- Cards ---------- */
.portal-card {
    background: #fff;
    border: none;
    border-radius: 14px;
    box-shadow: var(--portal-card-shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.portal-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(13, 110, 253, 0.14);
}

.portal-stat {
    text-align: center;
    padding: 1.75rem 1rem;
}

.portal-stat .stat-number {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--portal-primary);
}

.portal-stat .stat-label {
    color: var(--portal-muted);
    font-weight: 500;
}

.step-card .step-num {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--portal-primary), #20c997);
    color: #fff;
    font-weight: 800;
    font-size: 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* ---------- CTA banner ---------- */
.portal-cta {
    background: linear-gradient(120deg, #1a2b4a 0%, #0d6efd 100%);
    color: #fff;
    border-radius: 18px;
    padding: 3rem 2rem;
}

.portal-cta h2 {
    color: #fff;
}

/* ---------- Forms / auth ---------- */
.auth-wrap {
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding: 3rem 0;
}

.auth-card {
    max-width: 460px;
    width: 100%;
    margin: 0 auto;
}

/* ---------- Footer ---------- */
.portal-footer {
    background: #14243f;
    color: rgba(255, 255, 255, 0.72);
    padding: 2.5rem 0 1.5rem;
    margin-top: 3rem;
}

.portal-footer a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.portal-footer a:hover {
    color: #fff;
}

.portal-footer h6 {
    color: #fff;
    font-weight: 700;
}

/* ---------- Wizard ---------- */
.wizard-step {
    border: 1px solid #e3e9f3;
    border-radius: 14px;
    background: #fff;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.wizard-step .step-heading {
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.wizard-step .step-heading .badge-step {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--portal-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.doctor-option input {
    display: none;
}

.doctor-option .card {
    cursor: pointer;
    border: 2px solid #e3e9f3;
    border-radius: 12px;
}

.doctor-option input:checked + .card {
    border-color: var(--portal-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.slot-btn {
    margin: 0.25rem;
}

/* ---------- Dashboard ---------- */
.dash-link-card {
    text-decoration: none;
    color: inherit;
}

.dash-link-card .portal-card {
    height: 100%;
}

/* ---------- Details / reports ---------- */
.portal-report {
    background: #f8fafc;
    border: 1px solid #e3e9f3;
    border-radius: 10px;
    padding: 1rem;
    white-space: pre-wrap;
    font-size: 0.95rem;
}

details.portal-details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--portal-primary);
}

/* ---------- Tables ---------- */
.table-portal thead th {
    border-bottom: 2px solid #e3e9f3;
    color: var(--portal-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

/* ---------- Mobile tweaks ---------- */
@media (max-width: 575.98px) {
    .portal-hero {
        padding: 3rem 0 2.5rem;
    }

    .portal-section {
        padding: 2.25rem 0;
    }

    .portal-stat .stat-number {
        font-size: 1.75rem;
    }

    .portal-cta {
        padding: 2rem 1.25rem;
    }
}
