:root {
    --navy-950: #06162f;
    --navy-900: #08254d;
    --navy-800: #0b3a75;
    --blue-600: #1269c7;
    --blue-100: #e7f0ff;
}

body {
    background: linear-gradient(135deg, #e8f0fb 0%, #f5f8fd 55%, #dbe8f9 100%);
    color: var(--navy-950);
}

.sidebar-wrapper {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 58%, var(--navy-800) 100%);
    box-shadow: 8px 0 30px rgba(6, 22, 47, .16);
}

.sidebar-wrapper .sidebar-header {
    padding-top: 1.5rem;
}

.sidebar-wrapper .sidebar-header .logo {
    width: 100%;
}

.sidebar-wrapper .sidebar-header .logo img {
    width: 92px;
    height: 105px !important;
    object-fit: contain;
    border-radius: 14px;
    background: #fff;
    padding: 5px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .25);
}

.sidebar-wrapper .sidebar-header h5,
.sidebar-wrapper .menu .sidebar-title,
.sidebar-wrapper .menu .sidebar-link {
    color: #fff;
}

.sidebar-wrapper .menu .sidebar-link i,
.sidebar-wrapper .menu .sidebar-link svg {
    color: #b9d7ff;
}

.sidebar-wrapper .menu .sidebar-link:hover {
    background: rgba(255, 255, 255, .11);
}

.sidebar-wrapper .menu .sidebar-item.active .sidebar-link,
.btn-primary {
    border: 0;
    background: linear-gradient(135deg, #0e4f9f 0%, #1781df 100%);
    box-shadow: 0 8px 20px rgba(7, 58, 120, .24);
}

.sidebar-wrapper .menu .sidebar-item.active .sidebar-link {
    box-shadow: inset 3px 0 0 #8fc7ff, 0 8px 20px rgba(0, 0, 0, .2);
}

.sidebar-admin-access {
    margin-top: auto;
    padding: 1.25rem 2rem 2rem;
}

.sidebar-admin-label {
    display: block;
    margin: 0 0 .55rem .2rem;
    color: #a9c8ef;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
}

.sidebar-admin-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    padding: .85rem 1rem;
    border: 1px solid rgba(158, 205, 255, .34);
    border-radius: .7rem;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: .92rem;
    font-weight: 700;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.sidebar-admin-link:hover,
.sidebar-admin-link:focus {
    transform: translateY(-2px);
    border-color: #91c8ff;
    background: linear-gradient(135deg, #0e4f9f 0%, #1781df 100%);
    color: #fff;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .2);
}

.sidebar-admin-link > i:first-child {
    color: #9ed0ff;
    font-size: 1.1rem;
}

.sidebar-admin-link:hover > i:first-child,
.sidebar-admin-link:focus > i:first-child {
    color: #fff;
}

.sidebar-admin-arrow {
    margin-left: auto;
    font-size: .78rem;
}

.system-brand {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 1.5rem;
    row-gap: .25rem;
    min-height: 190px;
    overflow: hidden;
    border-radius: .7rem;
    color: #fff;
    background:
        radial-gradient(circle at 88% 18%, rgba(78, 158, 255, .42), transparent 30%),
        linear-gradient(135deg, var(--navy-950) 0%, var(--navy-800) 58%, var(--blue-600) 100%);
    box-shadow: 0 18px 40px rgba(8, 37, 77, .22);
}

.system-brand > img:first-child {
    grid-row: 1 / 3;
    width: 112px;
    height: 128px !important;
    object-fit: contain;
    border-radius: 18px;
    background: #fff;
    padding: 7px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
}

.system-brand > h3 {
    align-self: end;
    margin: 0;
    color: #fff;
    font-size: clamp(1.65rem, 2.6vw, 2.4rem);
    font-weight: 800;
    line-height: 1.25;
    text-shadow: 0 3px 12px rgba(0, 0, 0, .35);
}

.system-brand > h6 {
    align-self: start;
    margin: .35rem 0 0;
    color: #dbeaff;
    font-size: 1rem;
    line-height: 1.55;
}

.system-brand > hr,
.system-brand > h4,
.system-brand > h5,
.system-brand > :nth-child(n+4) {
    grid-column: 1 / -1;
}

.system-brand > hr {
    width: 100%;
    margin: .8rem 0 .2rem;
    border-color: rgba(255, 255, 255, .3);
}

.system-brand > h4,
.system-brand > h5 {
    margin-bottom: 0;
    color: #fff;
}

.card {
    box-shadow: 0 12px 32px rgba(8, 37, 77, .08);
}

.pa-user-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
}

.pa-user-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.7rem 2rem;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(135deg, var(--navy-950), var(--navy-800) 58%, var(--blue-600));
    box-shadow: 0 18px 40px rgba(8, 37, 77, .22);
}

.pa-user-header h1 {
    margin: .25rem 0;
    color: #fff;
    font-weight: 800;
}

.pa-user-header p { margin: 0; color: #dcecff; }
.pa-user-eyebrow { color: #9dceff; font-size: .82rem; font-weight: 800; letter-spacing: .06em; }
.pa-user-result-card, .pa-user-empty { margin-bottom: 1.5rem; padding: 1.7rem; border: 1px solid #d9e6f6; border-radius: 20px; background: #fff; box-shadow: 0 12px 32px rgba(8, 37, 77, .09); }
.pa-user-empty { padding: 4rem 2rem; text-align: center; }
.pa-user-empty i { color: var(--blue-600); font-size: 3rem; }
.pa-user-result-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.pa-user-result-heading h2 { margin: .45rem 0 .2rem; color: var(--navy-900); font-size: 1.35rem; font-weight: 800; }
.pa-user-year { display: inline-block; padding: .35rem .7rem; border-radius: 999px; background: var(--blue-100); color: var(--navy-800); font-weight: 800; }
.pa-user-result { flex: 0 0 auto; padding: .55rem .9rem; border-radius: 999px; font-weight: 800; }
.pa-user-result-pass { background: #d9f6e9; color: #087649; }
.pa-user-result-fail { background: #ffe1e4; color: #a82434; }
.pa-user-result-pending { background: #fff1c9; color: #835b00; }
.pa-user-meta-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.25rem; }
.pa-user-meta-grid > div { padding: .9rem 1rem; border-radius: 12px; background: #f3f7fd; }
.pa-user-meta-grid span { display: block; margin-bottom: .25rem; color: #64748b; font-size: .78rem; }
.pa-user-meta-grid strong { color: var(--navy-900); }
.pa-user-score-table thead th { background: #edf4fd; color: var(--navy-900); }
.pa-user-score-chip { display: inline-block; margin: .15rem .25rem .15rem 0; padding: .3rem .55rem; border-radius: 8px; background: #edf4fd; color: #28496e; }
.pa-user-remark { margin-top: 1rem; padding: .9rem 1rem; border-left: 4px solid var(--blue-600); border-radius: 8px; background: #f3f7fd; }

@media (max-width: 767px) {
    .pa-user-page { padding: 1rem; }
    .pa-user-header, .pa-user-result-heading { align-items: stretch; flex-direction: column; }
    .pa-user-meta-grid { grid-template-columns: 1fr; }
}

.form-control:focus {
    border-color: var(--blue-600);
    box-shadow: 0 0 0 .2rem rgba(18, 105, 199, .16);
}

.dashboard-summary {
    margin-bottom: 2rem;
}

.dashboard-eyebrow {
    color: var(--blue-600);
    font-size: .85rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.dashboard-title {
    color: var(--navy-900);
    font-size: clamp(1.55rem, 2.3vw, 2.15rem);
    font-weight: 800;
}

.dashboard-period,
.district-count,
.chart-unit {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .5rem .85rem;
    border: 1px solid #cadef7;
    border-radius: 999px;
    background: #f7faff;
    color: var(--navy-800);
    font-size: .85rem;
    font-weight: 700;
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 128px;
    padding: 1.25rem;
    overflow: hidden;
    border-radius: 18px;
    color: #fff;
    box-shadow: 0 14px 30px rgba(8, 37, 77, .16);
}

.summary-card-total {
    background: linear-gradient(135deg, #06162f, #0b3a75);
}

.summary-card-month {
    background: linear-gradient(135deg, #0a4387, #1781df);
}

.summary-card-completed {
    background: linear-gradient(135deg, #08615e, #18a99c);
}

.summary-card-pending {
    background: linear-gradient(135deg, #9b5b05, #e6a315);
}

.summary-icon {
    display: grid;
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    place-items: center;
    border-radius: 15px;
    background: rgba(255, 255, 255, .16);
    font-size: 1.55rem;
}

.summary-card span,
.summary-card small {
    display: block;
    color: rgba(255, 255, 255, .84);
}

.summary-card strong {
    display: inline-block;
    margin-right: .3rem;
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.15;
}

.summary-card small {
    display: inline;
    font-size: .78rem;
}

.dashboard-chart-card {
    border: 1px solid rgba(202, 222, 247, .75);
    border-radius: 20px;
}

.dashboard-chart-card .card-body {
    padding: 1.5rem 1.75rem;
}

.dashboard-section-title {
    color: var(--navy-900);
    font-size: 1.35rem;
    font-weight: 800;
}

#monthly-request-chart {
    min-height: 320px;
}

.district-card {
    height: 100%;
    padding: 1.2rem;
    border: 1px solid #d9e7f8;
    border-radius: 18px;
    background: linear-gradient(145deg, #fff 0%, #f1f6fd 100%);
    box-shadow: 0 10px 25px rgba(8, 37, 77, .08);
    transition: transform .2s ease, box-shadow .2s ease;
}

.district-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(8, 37, 77, .14);
}

.district-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.district-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--navy-800), var(--blue-600));
    color: #fff;
}

.district-total {
    color: var(--navy-800);
    font-size: 1.75rem;
    font-weight: 800;
}

.district-card h4 {
    margin: 1rem 0 .35rem;
    color: var(--navy-900);
    font-size: 1.2rem;
    font-weight: 800;
}

.district-card p {
    margin-bottom: .8rem;
    color: #607089;
    font-size: .88rem;
}

.district-progress {
    height: 7px;
    margin-bottom: .85rem;
    overflow: hidden;
    border-radius: 999px;
    background: #dce8f6;
}

.district-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0e8c82, #27c5b7);
}

.district-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .45rem;
    color: #61718a;
    font-size: .75rem;
}

.district-meta span:first-child i {
    color: #119b8f;
}

.district-meta span:last-child i {
    color: #d28b0b;
}

.empty-dashboard-state {
    padding: 2rem;
    border: 1px dashed #b8cce7;
    border-radius: 18px;
    background: rgba(255, 255, 255, .7);
    color: #62718a;
    text-align: center;
}

@media (max-width: 767px) {
    #main {
        padding: 1rem;
    }

    .system-brand {
        grid-template-columns: 76px minmax(0, 1fr);
        column-gap: 1rem;
        min-height: 150px;
        padding: 1.25rem !important;
    }

    .system-brand > img:first-child {
        width: 76px;
        height: 88px !important;
        padding: 4px;
        border-radius: 12px;
    }

    .system-brand > h3 {
        font-size: 1.35rem;
    }

    .system-brand > h6 {
        font-size: .85rem;
    }

    .summary-card {
        min-height: 112px;
        padding: 1rem;
    }

    .summary-icon {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
        font-size: 1.25rem;
    }

    .summary-card strong {
        font-size: 1.55rem;
    }

    .dashboard-chart-card .card-body {
        padding: 1.2rem 1rem;
    }
}

@media (max-width: 420px) {
    .system-brand {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
}
