* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    background: linear-gradient(180deg, #f5f8ff 0%, #f7f8fb 100%);
    color: #172033;
}

a {
    text-decoration: none;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: #fff;
    padding: 1rem;
    transition: transform 0.25s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-header {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    letter-spacing: 0.2px;
}

.sidebar-header i {
    margin-right: 0.5rem;
    color: #93c5fd;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-list a {
    color: #cdd5df;
    padding: 0.7rem 0.75rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 500;
}

.nav-list a i {
    width: 16px;
    text-align: center;
}

.nav-list a:hover,
.nav-list a.active {
    background: #1f2937;
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.content-shell {
    flex: 1;
    min-width: 0;
}

.topbar {
    height: 64px;
    padding: 0 1rem;
    border-bottom: 1px solid #e5e7eb;
    background: rgba(255, 255, 255, 0.96);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle {
    display: none;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    width: 40px;
    height: 40px;
}

.page-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.admin-chip {
    margin-left: auto;
    background: #f2f4f7;
    color: #344054;
    border-radius: 999px;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid #e4e7ec;
}

.page-content {
    padding: 1.1rem;
}

.page-content {
    padding: 1rem;
}

.card-panel {
    background: #fff;
    border: 1px solid #eaecf0;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.06);
    padding: 1.1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.stat-card {
    background: #fff;
    border: 1px solid #eaecf0;
    border-radius: 14px;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute;
    right: -18px;
    top: -18px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.08);
}

.stat-label {
    color: #667085;
    font-size: 0.85rem;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 0.2rem;
}

.stat-icon {
    color: #2563eb;
    font-size: 1rem;
    margin-right: 0.4rem;
}

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid #eaecf0;
    border-radius: 16px;
    padding: 1.3rem;
    box-shadow: 0 18px 40px rgba(16, 24, 40, 0.12);
}

.login-title {
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.login-subtitle {
    color: #667085;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.filter-row .form-control {
    max-width: 220px;
}

.filter-row .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.table thead th {
    border-top: 0;
    color: #475467;
    font-weight: 600;
    background: #f8fafc;
}

.table tbody tr:hover {
    background: #f9fbff;
}

.btn {
    border-radius: 8px;
    font-weight: 500;
}

.btn i {
    margin-right: 0.35rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.branding {
    margin-left: auto;
    margin-right: auto;
    display: block;
    padding: 30px;
    width: 400px;
}


.normal-range {
    width: 30%;
    margin-bottom: 0;
}

.normal-range tr {
    border: solid 3px green;
    border-width: 0 0 0 3px;
}

tr {
    line-height: 10px;
}

.main {
    background: #e2e1e0;
}

.patient-box {
    z-index: 999;
    margin-bottom: 12px;
    line-height: 10px;
    border: solid 1px rgb(141, 161, 141);
    padding: 20px 20px 10px 20px;
    margin-top: 0;
    display: flex;
    flex-wrap: wrap;
}

@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
        z-index: 999;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .branding {
        width: 300px;
    }

    .normal-range {
        width: 100%;
    }

    .page-content {
        padding: 0.85rem;
    }
}

.report-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border: 1px solid #eaecf0;
    padding: 20px 0;
    margin-top: 20px;
    border-radius: 8px;
}

.report-a4-page {
    width: 794px !important;
    min-width: 794px !important;
    max-width: 794px !important;
    margin: 0 auto;
    background: #ffffff;
    padding: 38px !important;
    box-sizing: border-box !important;
}

.filter-card {
    background: #f8fafc;
    border: 1px solid #eaecf0;
    border-radius: 12px;
    padding: 1.25rem 1.25rem 0.25rem 1.25rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    margin-bottom: 1.2rem;
}
.filter-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #475467;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.filter-label i {
    color: #94a3b8;
}
.filter-actions {
    gap: 0.5rem;
}
.filter-actions .btn {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}