:root {
    --primary: #003b73;
    --primary-dark: #002b54;
    --secondary: #0b5fa5;
    --gold: #f5b900;

    --success: #22a06b;
    --danger: #e5484d;
    --warning: #f5b900;

    --background: #f5f8fc;
    --white: #ffffff;

    --text: #183153;
    --muted: #718096;

    --border: #e4eaf1;

    --sidebar-width: 250px;
}


/* =========================================
   GENERAL
========================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;

    font-family:
        "Segoe UI",
        Arial,
        sans-serif;

    background: var(--background);

    color: var(--text);
}


/* =========================================
   APP
========================================= */

.app-wrapper {
    min-height: 100vh;

    display: flex;
}

/* =========================================
   SIDEBAR
========================================= */

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;

    position: fixed;
    top: 0;
    left: 0;

    background:
        linear-gradient(
            180deg,
            var(--primary),
            var(--primary-dark)
        );

    color: white;

    z-index: 1000;

    /* Scroll sidebar sendiri */
    overflow-y: auto;
    overflow-x: hidden;

    /* Smooth collapse */
    transition:
        width .25s ease,
        transform .25s ease;

    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.25) transparent;
}


/* Chrome / Edge / Safari */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.25);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,.40);
}


/* =========================================
   BRAND
========================================= */

.sidebar-brand {
    height: 80px;
    min-height: 80px;

    display: flex;
    align-items: center;

    padding: 15px 18px;

    border-bottom:
        1px solid rgba(255,255,255,.10);

    overflow: hidden;
}


/* Logo */

.sidebar-logo-placeholder {
    width: 45px;
    height: 45px;

    min-width: 45px;

    border:
        1px solid rgba(255,255,255,.25);

    border-radius: 8px;

    margin-right: 10px;

    background:
        rgba(255,255,255,.03);

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
}

.sidebar-logo-placeholder img {
    width: 100%;
    height: 100%;

    object-fit: contain;
}


/* School name */

.sidebar-school-name {
    font-size: 12px;

    font-weight: 700;

    line-height: 1.3;

    letter-spacing: .5px;

    white-space: nowrap;

    transition:
        opacity .2s ease,
        visibility .2s ease;
}


/* =========================================
   MENU
========================================= */

.sidebar-menu {
    padding: 15px 10px 30px;
}


/* =========================================
   SECTION
========================================= */

.sidebar-section {
    font-size: 10px;

    font-weight: 700;

    letter-spacing: 1px;

    color:
        rgba(255,255,255,.55);

    padding:
        18px 12px 8px;

    white-space: nowrap;

    overflow: hidden;

    transition:
        opacity .2s ease,
        height .2s ease,
        padding .2s ease;
}


/* =========================================
   LINK
========================================= */

.sidebar-link {
    display: flex;

    align-items: center;

    gap: 12px;

    position: relative;

    text-decoration: none;

    color:
        rgba(255,255,255,.88);

    padding:
        10px 12px;

    margin-bottom: 3px;

    border-radius: 7px;

    font-size: 13px;

    transition:
        background .2s ease,
        color .2s ease,
        padding .2s ease;
}


/* Icon */

.sidebar-link i {
    width: 18px;
    min-width: 18px;

    font-size: 15px;

    text-align: center;
}


/* Text */

.sidebar-link span:not(.menu-badge) {
    white-space: nowrap;

    overflow: hidden;

    transition:
        opacity .2s ease,
        visibility .2s ease;
}


/* Hover */

.sidebar-link:hover {
    background:
        rgba(255,255,255,.10);

    color: white;
}


/* Active */

.sidebar-link.active {
    background: var(--gold);

    color:
        #183153;

    font-weight: 600;
}


/* Badge */

.menu-badge {
    margin-left: auto;

    background:
        var(--danger);

    color: white;

    border-radius: 20px;

    font-size: 10px;

    padding:
        2px 7px;

    flex-shrink: 0;
}


/* =========================================
   COLLAPSED SIDEBAR
========================================= */

.sidebar.collapsed {
    width: 70px;
}


/* Brand saat collapsed */

.sidebar.collapsed .sidebar-brand {
    padding:
        15px 12px;

    justify-content: center;
}


/* Logo tetap tampil */

.sidebar.collapsed .sidebar-logo-placeholder {
    margin-right: 0;
}


/* Nama sekolah disembunyikan */

.sidebar.collapsed .sidebar-school-name {
    width: 0;

    opacity: 0;

    visibility: hidden;

    overflow: hidden;
}


/* Section disembunyikan */

.sidebar.collapsed .sidebar-section {
    height: 0;

    padding-top: 0;
    padding-bottom: 0;

    opacity: 0;

    visibility: hidden;
}


/* Link */

.sidebar.collapsed .sidebar-link {
    justify-content: center;

    padding:
        11px 10px;

    gap: 0;
}


/* Icon */

.sidebar.collapsed .sidebar-link i {
    width: 20px;

    min-width: 20px;

    font-size: 17px;
}


/* Text disembunyikan */

.sidebar.collapsed .sidebar-link span:not(.menu-badge) {
    width: 0;

    opacity: 0;

    visibility: hidden;

    overflow: hidden;
}


/* Badge tetap tampil */

.sidebar.collapsed .menu-badge {
    position: absolute;

    top: 3px;
    right: 3px;

    font-size: 8px;

    min-width: 16px;
    height: 16px;

    padding: 1px 4px;

    display: flex;
    align-items: center;
    justify-content: center;
}


/* =========================================
   MAIN SAAT SIDEBAR COLLAPSED
========================================= */

.main-wrapper {
    width: calc(100% - var(--sidebar-width));

    margin-left: var(--sidebar-width);

    min-height: 100vh;

    display: flex;

    flex-direction: column;

    transition:
        width .25s ease,
        margin-left .25s ease;
}


.main-wrapper.sidebar-collapsed {
    width: calc(100% - 70px);

    margin-left: 70px;
}


/* =========================================
   MAIN
========================================= */

.main-wrapper {
    width: calc(100% - var(--sidebar-width));

    margin-left: var(--sidebar-width);

    min-height: 100vh;

    display: flex;

    flex-direction: column;
}


/* =========================================
   NAVBAR
========================================= */

.top-navbar {
    height: 65px;

    background: white;

    border-bottom:
        1px solid var(--border);

    display: flex;

    align-items: center;

    padding:
        0 22px;

    position: sticky;

    top: 0;

    z-index: 900;
}


/* Toggle */

.sidebar-toggle {
    font-size: 25px;

    color: var(--primary);

    margin-right: 20px;
}


/* Search */

.navbar-search {
    width: 420px;

    height: 38px;

    background: #f0f4f9;

    border-radius: 7px;

    display: flex;

    align-items: center;

    padding:
        0 13px;

    color: #8292a7;
}


.navbar-search input {
    border: none;

    outline: none;

    background: transparent;

    width: 100%;

    margin-left: 8px;

    font-size: 13px;
}


/* Right */

.navbar-right {
    margin-left: auto;

    display: flex;

    align-items: center;

    gap: 20px;
}


/* Notification */

.notification-button {
    position: relative;

    border: none;

    background: transparent;

    font-size: 21px;

    color: var(--primary);
}


.notification-badge {
    position: absolute;

    top: -3px;
    right: -5px;

    background: var(--danger);

    color: white;

    font-size: 9px;

    min-width: 17px;
    height: 17px;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;
}


/* User */

.navbar-user {
    display: flex;

    align-items: center;

    gap: 10px;
}


.user-avatar {
    width: 38px;
    height: 38px;

    background: var(--primary);

    color: white;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 12px;

    font-weight: 700;
}


.user-information {
    display: flex;

    flex-direction: column;
}


.user-information strong {
    font-size: 12px;
}


.user-information small {
    font-size: 10px;

    color: var(--muted);
}


/* =========================================
   CONTENT
========================================= */

.content-wrapper {
    flex: 1;

    padding: 22px;

    min-width: 0;
}


/* =========================================
   FOOTER
========================================= */

.main-footer {
    padding:
        15px 22px;

    background: white;

    border-top:
        1px solid var(--border);

    display: flex;

    justify-content: space-between;

    font-size: 11px;

    color: var(--muted);
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 992px) {

    .sidebar {
        transform: translateX(-100%);

        transition: .3s;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-wrapper {
        width: 100%;

        margin-left: 0;
    }

    .navbar-search {
        width: 250px;
    }
}


@media (max-width: 576px) {

    .navbar-search {
        display: none;
    }

    .user-information {
        display: none;
    }

    .content-wrapper {
        padding: 15px;
    }

    .main-footer {
        flex-direction: column;

        gap: 5px;
    }
}

/* =========================================
   DASHBOARD
========================================= */

.dashboard-hero {
    min-height: 190px;

    border-radius: 12px;

    padding: 30px;

    color: white;

    display: flex;

    align-items: center;

    position: relative;

    overflow: hidden;

    background:
        linear-gradient(
            90deg,
            #003b73,
            #0b5fa5
        );
}


.dashboard-hero::after {
    content: "";

    position: absolute;

    right: -100px;
    bottom: -100px;

    width: 350px;
    height: 350px;

    border-radius: 50%;

    border:
        70px solid rgba(255,255,255,.06);
}


.hero-small {
    font-size: 15px;

    margin-bottom: 3px;
}


.dashboard-hero h1 {
    font-size: 32px;

    font-weight: 700;

    margin: 0 0 8px;
}


.dashboard-hero p {
    margin: 0;

    font-size: 14px;

    line-height: 1.6;
}


/* KPI */

.stat-card {
    background: white;

    border:
        1px solid var(--border);

    border-radius: 10px;

    padding: 18px;

    display: flex;

    align-items: center;

    gap: 15px;

    min-height: 120px;

    box-shadow:
        0 2px 8px rgba(0,0,0,.03);
}


.stat-icon {
    width: 58px;
    height: 58px;

    min-width: 58px;

    border-radius: 10px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 25px;
}


.stat-icon.blue {
    background: #e7f0ff;
    color: #2878d7;
}


.stat-icon.green {
    background: #e6f8ee;
    color: #22a06b;
}


.stat-icon.gold {
    background: #fff5d6;
    color: #d99e00;
}


.stat-icon.red {
    background: #ffe9ea;
    color: #e5484d;
}


.stat-label {
    font-size: 12px;

    color: var(--muted);

    margin-bottom: 3px;
}


.stat-value {
    font-size: 20px;

    font-weight: 700;

    color: var(--primary);
}


.stat-info {
    font-size: 10px;

    color: var(--muted);

    margin-top: 3px;
}


/* Card */

.dashboard-card {
    background: white;

    border:
        1px solid var(--border);

    border-radius: 10px;

    overflow: hidden;

    box-shadow:
        0 2px 8px rgba(0,0,0,.03);
}


.card-header-custom {
    padding:
        16px 18px;

    border-bottom:
        1px solid var(--border);

    font-size: 14px;

    font-weight: 700;

    color: var(--primary);

    display: flex;

    justify-content: space-between;

    align-items: center;
}


.card-header-custom a {
    font-size: 11px;

    color: var(--secondary);

    text-decoration: none;
}


/* Chart */

.chart-placeholder {
    height: 270px;

    padding: 30px;

    display: flex;

    align-items: end;
}


.chart-bars {
    height: 200px;

    width: 100%;

    display: flex;

    align-items: end;

    justify-content: space-around;

    border-bottom:
        1px solid var(--border);
}


.bar-group {
    height: 100%;

    display: flex;

    align-items: end;

    gap: 5px;
}


.bar {
    width: 18px;

    border-radius:
        4px 4px 0 0;
}


.bar.billing {
    background: #2878d7;
}


.bar.payment {
    background: var(--gold);
}


/* Payment list */

.payment-type-list {
    padding: 20px;
}


.payment-type-list > div {
    display: flex;

    justify-content: space-between;

    padding: 9px 0;

    font-size: 12px;

    border-bottom:
        1px solid #f0f2f5;
}


.payment-type-list > div:last-child {
    border-bottom: none;
}


.payment-type-list span {
    display: flex;

    align-items: center;

    gap: 8px;
}


.dot {
    width: 9px;
    height: 9px;

    border-radius: 50%;

    display: inline-block;
}


.blue-dot {
    background: #2878d7;
}

.gold-dot {
    background: #f5b900;
}

.teal-dot {
    background: #20a8b8;
}

.purple-dot {
    background: #6d4bc3;
}

.red-dot {
    background: #e5484d;
}

.gray-dot {
    background: #718096;
}


/* Table */

.table-dashboard {
    margin: 0;

    font-size: 11px;
}


.table-dashboard th {
    background: #f7f9fc;

    color: var(--muted);

    font-weight: 600;

    white-space: nowrap;
}


.table-dashboard td,
.table-dashboard th {
    padding:
        11px 12px;

    vertical-align: middle;
}


.table-dashboard tbody tr:hover {
    background: #fafcff;
}


/* Status */

.status {
    display: inline-block;

    padding:
        4px 8px;

    border-radius: 20px;

    font-size: 9px;

    white-space: nowrap;
}


.status.paid {
    background: #ddf6e8;

    color: #18824f;
}


.status.partial {
    background: #fff3cd;

    color: #946c00;
}


.status.unpaid {
    background: #ffe2e3;

    color: #c53030;
}

/* =========================================
   LOGIN
========================================= */

.login-page {
    min-height: 100vh;

    display: flex;

    align-items: center;

    justify-content: center;

    background:
        linear-gradient(
            135deg,
            #003b73,
            #0b5fa5
        );

    padding: 20px;
}


.login-container {
    width: 100%;

    max-width: 440px;
}


.login-card {
    background: white;

    border-radius: 14px;

    padding: 35px;

    box-shadow:
        0 15px 45px rgba(0,0,0,.18);
}


.login-logo-placeholder {
    width: 75px;
    height: 75px;

    margin:
        0 auto 18px;

    border-radius: 12px;

    border:
        1px solid #dce4ee;

    background:
        #f7f9fc;
}


.login-card h1 {
    margin: 0;

    text-align: center;

    color: var(--primary);

    font-size: 21px;

    font-weight: 700;
}


.login-subtitle {
    text-align: center;

    color: var(--muted);

    font-size: 12px;

    line-height: 1.5;

    margin:
        8px 0 25px;
}


.login-form-group {
    margin-bottom: 18px;
}


.login-form-group label {
    display: block;

    font-size: 12px;

    font-weight: 600;

    color: var(--text);

    margin-bottom: 7px;
}


.login-input {
    height: 44px;

    display: flex;

    align-items: center;

    border:
        1px solid #dce4ee;

    border-radius: 7px;

    padding:
        0 12px;

    background: white;

    transition: .2s;
}


.login-input:focus-within {
    border-color: var(--secondary);

    box-shadow:
        0 0 0 3px rgba(11,95,165,.08);
}


.login-input > i {
    color: #8292a7;

    font-size: 16px;

    margin-right: 9px;
}


.login-input input {
    flex: 1;

    width: 100%;

    height: 100%;

    border: none;

    outline: none;

    font-size: 13px;

    color: var(--text);
}


.password-toggle {
    border: none;

    background: transparent;

    color: #8292a7;

    font-size: 16px;
}


.login-options {
    display: flex;

    align-items: center;

    margin:
        2px 0 20px;

    font-size: 11px;

    color: var(--muted);
}


.login-options input {
    margin-right: 5px;
}


.login-button {
    width: 100%;

    height: 45px;

    border: none;

    border-radius: 7px;

    background: var(--primary);

    color: white;

    font-size: 12px;

    font-weight: 700;

    transition: .2s;
}


.login-button:hover {
    background: var(--primary-dark);

    transform:
        translateY(-1px);
}


.login-button i {
    margin-right: 5px;
}


.login-card .alert {
    font-size: 11px;

    padding: 10px 12px;

    border-radius: 7px;
}


.login-footer {
    text-align: center;

    color: #9aa8b8;

    font-size: 10px;

    margin-top: 25px;
}

/* =========================================================
   PAYMENT RATE - BERLAKU UNTUK
   ========================================================= */

.scope-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 88px;
    padding: 16px 18px;
    margin: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.scope-card:hover {
    border-color: #0b5fa5;
    box-shadow: 0 4px 12px rgba(0, 59, 115, 0.08);
    transform: translateY(-1px);
}

.scope-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f1f6fb;
    color: #003b73;
    font-size: 20px;
}

.scope-content {
    flex: 1;
    min-width: 0;
}

.scope-title {
    font-size: 15px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 3px;
}

.scope-description {
    font-size: 12px;
    line-height: 1.4;
    color: #6c757d;
}

.scope-check {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dee2e6;
    font-size: 20px;
    transition: all 0.2s ease;
}


/* Saat pilihan aktif */
.scope-radio:checked + .scope-card {
    border-color: #003b73;
    background: #f8fbff;
    box-shadow: 0 4px 14px rgba(0, 59, 115, 0.12);
}

.scope-radio:checked + .scope-card .scope-icon {
    background: #003b73;
    color: #fff;
}

.scope-radio:checked + .scope-card .scope-title {
    color: #003b73;
}

.scope-radio:checked + .scope-card .scope-check {
    color: #198754;
}


/* Fokus keyboard */
.scope-radio:focus-visible + .scope-card {
    outline: 2px solid #0b5fa5;
    outline-offset: 2px;
}


/* Mobile */
@media (max-width: 767.98px) {

    .scope-card {
        min-height: 78px;
        padding: 13px 15px;
    }

    .scope-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 18px;
    }

    .scope-title {
        font-size: 14px;
    }

    .scope-description {
        font-size: 11px;
    }

}

/* =========================================================
   NOTIFICATION
========================================================= */

.notification-button {
    position: relative;
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #172033;
    font-size: 1.15rem;
    cursor: pointer;
}

.notification-button:hover {
    background: #f1f3f5;
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 1px;

    min-width: 18px;
    height: 18px;

    padding: 0 5px;

    background: #dc3545;
    color: #fff;

    border-radius: 20px;

    font-size: .65rem;
    font-weight: 700;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 2px solid #fff;
}

.notification-dropdown {
    width: 390px;
    max-width: calc(100vw - 30px);
    padding: 0;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
}

.notification-header {
    padding: 15px 17px;
    border-bottom: 1px solid #edf0f4;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header strong {
    display: block;
    font-size: .9rem;
}

.notification-header small {
    display: block;
    margin-top: 2px;
    color: #7b8494;
    font-size: .72rem;
}

.notification-body {
    max-height: 390px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 11px;

    padding: 13px 15px;

    color: inherit;
    text-decoration: none;

    border-bottom: 1px solid #f0f1f3;

    transition: background .15s ease;
}

.notification-item:hover {
    background: #f8f9fb;
}

.notification-icon {
    width: 37px;
    height: 37px;
    flex: 0 0 37px;

    border-radius: 10px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #fff3cd;
    color: #b58105;

    font-size: .95rem;
}

.notification-content {
    min-width: 0;
    flex: 1;
}

.notification-title {
    font-size: .79rem;
    font-weight: 700;
    color: #172033;
}

.notification-message {
    margin-top: 2px;

    font-size: .76rem;
    color: #596273;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-meta {
    margin-top: 4px;

    font-size: .68rem;
    color: #8a93a1;
}

.notification-arrow {
    color: #adb5bd;
    font-size: .72rem;
    padding-top: 9px;
}

.notification-empty {
    padding: 35px 15px;
    text-align: center;
    color: #6c757d;
}

.notification-empty-icon {
    width: 48px;
    height: 48px;

    margin: 0 auto 10px;

    border-radius: 50%;

    background: #e8f7ee;
    color: #198754;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 1.3rem;
}

.notification-empty strong {
    display: block;
    font-size: .82rem;
}

.notification-empty small {
    display: block;
    margin-top: 3px;
    color: #8a93a1;
}

.notification-footer {
    border-top: 1px solid #edf0f4;
    padding: 11px 15px;
    text-align: center;
}

.notification-footer a {
    color: #0d6efd;
    text-decoration: none;
    font-size: .75rem;
    font-weight: 600;
}

.notification-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 575px) {

    .notification-dropdown {
        position: fixed !important;

        top: 65px !important;
        right: 10px !important;
        left: 10px !important;

        width: auto;
    }

}

.login-logo-placeholder {
    width: 96px;
    height: 96px;

    margin: 0 auto 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 8px;

    background: #fff;

    border: 1px solid rgba(0, 47, 108, 0.12);

    border-radius: 20px;

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.08);
}

.login-logo-placeholder img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;

    border-radius: 12px;
}