
:root {
    --blue: #003b73;
    --blue-dark: #062d52;
    --blue-light: #0875b9;
    --gold: #f5c400;
    --light: #f3f7fb;
    --white: #ffffff;
    --text: #26384e;
    --muted: #718096;
    --line: #e0e8f0;
    --danger: #c33;
    --success: #18763a;
    --shadow: 0 8px 25px rgba(0, 59, 115, .05);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--light);
    color: var(--text);
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
textarea,
select {
    font-family: inherit;
}

/* =====================================================
   LAYOUT ADMIN
===================================================== */

.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 235px minmax(0, 1fr);
}

aside {
    background: var(--blue-dark);
    color: #d9e8f4;
    padding: 25px 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    padding: 0 10px 25px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: 2px solid var(--gold);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--gold);
    font-weight: 900;
}

.admin-brand b {
    font-size: 13px;
}

aside > a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 13px;
    border-radius: 6px;
    font-size: 12px;
    transition: background .2s, color .2s;
}

aside > a:hover,
aside > a.active {
    background: rgba(255, 255, 255, .09);
    color: var(--gold);
}

aside > a i {
    width: 17px;
    text-align: center;
}

main {
    min-width: 0;
    width: 100%;
    max-width: 1500px;
    padding: 30px 35px;
}

/* =====================================================
   HEADER ADMIN
===================================================== */

.admin-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.admin-top h1 {
    margin: 0;
    color: var(--blue);
    font-size: 30px;
}

.admin-top span {
    font-size: 12px;
    color: var(--muted);
}

/* Header dengan notifikasi */

.admin-top-notifikasi {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 30;
    margin-bottom: 25px;
}

.admin-top-title {
    min-width: 0;
}

.admin-top-title h1 {
    margin: 0;
    color: var(--blue);
    font-size: 30px;
}

.admin-top-title small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.admin-top-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* =====================================================
   NOTIFIKASI
===================================================== */

.notification-wrapper {
    position: relative;
    flex-shrink: 0;
}

.notification-button {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--blue);
    font-size: 20px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, border-color .2s;
}

.notification-button:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 20px;
    background: #dc2626;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.notification-dropdown {
    display: none;
    position: absolute;
    top: 52px;
    right: 0;
    width: 360px;
    max-width: calc(100vw - 30px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 35px rgba(15, 23, 42, .15);
    overflow: hidden;
    z-index: 9999;
}

.notification-dropdown.show {
    display: block;
}

.notification-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    color: var(--blue);
}

.notification-heading strong {
    font-size: 13px;
}

.notification-heading span {
    font-size: 11px;
    color: var(--muted);
}

.notification-item {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    padding: 13px 15px;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    transition: background .2s;
}

.notification-item:hover {
    background: #f8fafc;
}

.notification-item.unread {
    background: #eff6ff;
}

.notification-icon {
    width: 35px;
    height: 35px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #dbeafe;
    color: #1464b4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.notification-content {
    min-width: 0;
    flex: 1;
}

.notification-content strong {
    display: block;
    font-size: 12px;
    color: var(--blue);
    margin-bottom: 4px;
}

.notification-content small {
    display: block;
    font-size: 11px;
    line-height: 1.5;
    color: #64748b;
}

.notification-content time {
    display: block;
    margin-top: 6px;
    font-size: 10px;
    color: #94a3b8;
}

.notification-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2563eb;
    flex-shrink: 0;
    margin-top: 5px;
}

.notification-empty {
    text-align: center;
    padding: 28px 15px;
    color: #94a3b8;
}

.notification-empty i {
    font-size: 28px;
}

.notification-empty p {
    margin-bottom: 0;
    font-size: 12px;
}

.notification-footer {
    display: block;
    padding: 13px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #1464b4;
    transition: background .2s;
}

.notification-footer:hover {
    background: #f8fafc;
}

.admin-top-user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.admin-top-user i {
    font-size: 23px;
    color: #1464b4;
}

/* =====================================================
   KARTU STATISTIK
===================================================== */

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.cards > div {
    min-width: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.cards small {
    color: var(--muted);
    display: block;
    font-size: 12px;
}

.cards strong {
    font-size: 38px;
    color: var(--blue);
    display: block;
    margin-top: 5px;
}

/* =====================================================
   PANEL
===================================================== */

.panel {
    min-width: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.panel h2 {
    color: var(--blue);
    margin-top: 0;
    font-size: 20px;
}

/* =====================================================
   TOMBOL
===================================================== */

.btn-admin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 0;
    background: var(--blue);
    color: #fff;
    padding: 11px 15px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s;
}

.btn-admin:hover {
    background: #075d9d;
}

.btn-admin.secondary {
    background: #e8eff5;
    color: var(--blue);
}

.btn-admin.secondary:hover {
    background: #dce8f2;
}

/* =====================================================
   TABEL
===================================================== */

.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

th,
td {
    text-align: left;
    padding: 13px 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

th {
    color: var(--blue);
    font-size: 11px;
    text-transform: uppercase;
    white-space: nowrap;
    background: #f8fafc;
}

td {
    color: #5d6d80;
}

.action {
    color: #0875b9;
    font-weight: 800;
    margin-right: 12px;
}

.action.danger {
    color: var(--danger);
}

.badge {
    display: inline-block;
    background: #edf1f4;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 10px;
    white-space: nowrap;
}

.badge.ok {
    background: #e3f5e9;
    color: var(--success);
}

/* =====================================================
   FORM
===================================================== */

.form {
    max-width: 850px;
}

.form label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: var(--blue);
    margin-bottom: 15px;
}

.form input,
.form textarea,
.form select {
    display: block;
    width: 100%;
    margin-top: 6px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 11px;
    font: inherit;
    color: var(--text);
    background: #fff;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
    outline: none;
    border-color: #0875b9;
    box-shadow: 0 0 0 3px rgba(8, 117, 185, .1);
}

.form textarea {
    resize: vertical;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.check {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.check input {
    width: auto !important;
    margin: 0 !important;
}

/* =====================================================
   LOGIN
===================================================== */

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #003b73, #0875b9);
}

.login-card {
    width: min(410px, 100%);
    background: #fff;
    padding: 35px;
    border-radius: 18px;
    box-shadow: 0 25px 60px rgba(0, 27, 61, .33);
}

.login-card .brand-logo {
    margin: auto;
}

.login-card h1 {
    text-align: center;
    color: var(--blue);
    margin: 15px 0 2px;
}

.login-card p {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 25px;
}

.login-card label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: var(--blue);
    margin: 12px 0;
}

.login-card input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    margin-top: 5px;
}

.login-card button {
    width: 100%;
    margin-top: 12px;
    padding: 13px;
    border: 0;
    border-radius: 7px;
    background: var(--blue);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.login-card button:hover {
    background: #075d9d;
}

.login-card small {
    display: block;
    text-align: center;
    color: var(--muted);
    margin-top: 15px;
    font-size: 10px;
}

.error {
    background: #fff0f0;
    color: #b52b2b;
    padding: 10px;
    border-radius: 6px;
    font-size: 11px;
}

/* =====================================================
   RESPONSIVE TABLET
===================================================== */

@media (max-width: 1000px) {
    .admin-shell {
        grid-template-columns: 200px minmax(0, 1fr);
    }

    main {
        padding: 25px 20px;
    }

    .cards {
        gap: 12px;
    }

    .cards > div {
        padding: 20px;
    }
}

/* =====================================================
   RESPONSIVE MOBILE
===================================================== */

@media (max-width: 800px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    aside {
        position: relative;
        padding: 15px;
    }

    .admin-brand {
        padding-bottom: 12px;
    }

    aside > a {
        padding: 10px 12px;
    }

    main {
        padding: 20px;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .table-wrap {
        overflow-x: auto;
    }

    .admin-top h1,
    .admin-top-title h1 {
        font-size: 24px;
    }
}

@media (max-width: 600px) {
    .admin-top,
    .admin-top-notifikasi {
        align-items: flex-start;
        gap: 12px;
    }

    .admin-top-actions {
        gap: 10px;
    }

    .admin-top-user span {
        display: none;
    }

    .notification-dropdown {
        right: -10px;
        width: 340px;
    }

    .panel {
        padding: 18px;
    }

    .cards > div {
        padding: 18px;
    }

    .login-card {
        padding: 25px;
    }
}

@media (max-width: 380px) {
    main {
        padding: 15px;
    }

    .notification-dropdown {
        right: -55px;
        width: calc(100vw - 30px);
    }

    .admin-top-title h1 {
        font-size: 21px;
    }
}


    .notification-toggle {
        width: 42px;
        height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #e5e7eb;
        border-radius: 50%;
        background: #fff;
        color: #092653;
        font-size: 19px;
        cursor: pointer;
        position: relative;
    }

    .notification-toggle i {
        display: inline-block;
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
        font-style: normal;
    }

    .notification-toggle:hover {
        background: #f1f5f9;
        color: #1464b4;
    }