/* =========================================================
   SIDAN - SISTEM INFORMASI DATA & NILAI
   Modern Blue Theme
   ========================================================= */

* {
    box-sizing: border-box;
}

:root {
    --primary: #1677ff;
    --primary-dark: #0756c9;
    --primary-deep: #063b8f;
    --primary-light: #eaf3ff;

    --navy: #0b2f6f;
    --text: #172b4d;
    --muted: #718096;

    --white: #ffffff;
    --bg: #f4f7fb;
    --border: #dbe5f2;

    --success: #16a36a;
    --danger: #dc3545;
    --warning: #f59e0b;

    --shadow-sm: 0 4px 15px rgba(20, 55, 100, .07);
    --shadow-md: 0 10px 30px rgba(20, 55, 100, .10);
    --shadow-lg: 0 20px 60px rgba(4, 42, 100, .18);

    --radius: 14px;
}


/* =========================================================
   BODY
   ========================================================= */

body {
    margin: 0;
    font-family:
        Inter,
        "Segoe UI",
        Roboto,
        Arial,
        Helvetica,
        sans-serif;

    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}


/* =========================================================
   TOPBAR
   ========================================================= */

.topbar {
    height: 72px;

    background: linear-gradient(
        135deg,
        #063b8f 0%,
        #075dcc 45%,
        #1677ff 100%
    );

    color: var(--white);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 28px;

    box-shadow: 0 4px 18px rgba(0, 53, 130, .20);

    position: relative;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 44px;
    height: 44px;

    border-radius: 13px;

    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);

    color: #fff;

    display: grid;
    place-items: center;

    font-size: 21px;

    backdrop-filter: blur(10px);
}

.brand small {
    display: block;
    opacity: .82;
    margin-top: 2px;
}

.top-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.role-badge {
    font-size: 11px;

    background: rgba(255,255,255,.15);

    padding: 6px 10px;

    border-radius: 20px;

    border: 1px solid rgba(255,255,255,.20);

    backdrop-filter: blur(8px);
}

.logout-link {
    color: #fff;
    font-size: 18px;

    text-decoration: none;

    transition: .2s ease;
}

.logout-link:hover {
    opacity: .75;
}


/* =========================================================
   APP LAYOUT
   ========================================================= */

.app-shell {
    display: flex;

    min-height: calc(100vh - 72px);

    background:
        radial-gradient(
            circle at 90% 10%,
            rgba(22,119,255,.06),
            transparent 30%
        ),
        var(--bg);
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
    width: 250px;

    background: #fff;

    border-right: 1px solid #e5ebf4;

    padding: 20px 14px;

    box-shadow: 4px 0 18px rgba(20,55,100,.03);

    flex-shrink: 0;
}

.side-title {
    font-size: 11px;

    font-weight: 800;

    color: #94a3b8;

    margin: 18px 12px 8px;

    letter-spacing: .10em;

    text-transform: uppercase;
}

.side-link {
    display: flex;
    align-items: center;

    gap: 11px;

    padding: 11px 12px;

    margin: 4px 0;

    border-radius: 11px;

    color: #526173;

    text-decoration: none;

    transition:
        background .2s ease,
        color .2s ease,
        transform .2s ease;
}

.side-link:hover {
    background: #eef5ff;

    color: var(--primary);

    transform: translateX(2px);
}

.side-link.active {
    background: linear-gradient(
        135deg,
        #1677ff,
        #075dcc
    );

    color: #fff;

    box-shadow:
        0 7px 18px rgba(22,119,255,.20);
}

.side-link i {
    width: 20px;

    text-align: center;

    font-size: 16px;
}


/* =========================================================
   CONTENT
   ========================================================= */

.content {
    flex: 1;

    padding: 30px;

    width: 100%;

    max-width: 1500px;
}


/* =========================================================
   PAGE HEADER
   ========================================================= */

.page-head {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 24px;
}

.page-head h2 {
    margin: 0 0 5px;

    color: var(--navy);

    font-size: 26px;

    font-weight: 800;
}

.page-head p {
    margin: 0;

    color: var(--muted);

    font-size: 14px;
}


/* =========================================================
   STATISTICS
   ========================================================= */

.stats-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 18px;
}

.stat-card {
    background: #fff;

    border: 1px solid #e7edf6;

    border-radius: 17px;

    padding: 20px;

    display: flex;

    align-items: center;

    gap: 15px;

    box-shadow: var(--shadow-sm);

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);

    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 52px;
    height: 52px;

    flex-shrink: 0;

    border-radius: 15px;

    background: linear-gradient(
        135deg,
        #e8f2ff,
        #dbeaff
    );

    color: var(--primary);

    display: grid;

    place-items: center;

    font-size: 21px;
}

.stat-card strong {
    display: block;

    font-size: 26px;

    line-height: 1.1;

    color: var(--navy);

    font-weight: 800;
}

.stat-card span {
    color: var(--muted);

    font-size: 13px;
}


/* =========================================================
   MENU GRID
   ========================================================= */

.menu-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 18px;

    margin-top: 24px;
}

.menu-card {
    background: #fff;

    border: 1px solid #e6edf7;

    border-radius: 17px;

    min-height: 150px;

    padding: 22px;

    text-decoration: none;

    color: var(--primary);

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    box-shadow: var(--shadow-sm);

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
}

.menu-card:hover {
    transform: translateY(-5px);

    border-color: #c8ddfb;

    box-shadow: var(--shadow-md);
}

.menu-card i {
    width: 58px;
    height: 58px;

    margin-bottom: 13px;

    border-radius: 17px;

    background: linear-gradient(
        135deg,
        #eaf3ff,
        #dceaff
    );

    display: grid;

    place-items: center;

    font-size: 25px;

    color: var(--primary);
}

.menu-card b {
    font-size: 16px;

    color: var(--navy);
}

.menu-card small {
    color: var(--muted);

    margin-top: 6px;

    font-size: 12px;
}

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

.danger-card i {
    background: #fff0f2;

    color: var(--danger);
}


/* =========================================================
   FOOTER
   ========================================================= */

.footer {
    text-align: center;

    padding: 24px;

    color: #8995a7;

    font-size: 13px;
}


/* =========================================================
   ALERT
   ========================================================= */

.alert {
    padding: 12px 15px;

    border-radius: 11px;

    margin-bottom: 18px;

    border: 1px solid transparent;

    font-size: 14px;
}

.success {
    background: #eafaf3;

    color: #13734c;

    border-color: #c9f0dd;
}

.danger {
    background: #fff0f2;

    color: #a32130;

    border-color: #ffd4da;
}


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

.login-page {
    min-height: 100vh;

    display: grid;

    place-items: center;

    padding: 30px 20px;

    position: relative;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 15% 85%,
            rgba(255,255,255,.12),
            transparent 25%
        ),
        radial-gradient(
            circle at 90% 10%,
            rgba(92,174,255,.35),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #063b8f 0%,
            #075dcc 45%,
            #1677ff 100%
        );
}


/* Decorative background */

.login-page::before,
.login-page::after {
    content: "";

    position: absolute;

    border-radius: 50%;

    pointer-events: none;
}

.login-page::before {
    width: 430px;
    height: 430px;

    left: -220px;
    bottom: -230px;

    border: 1px solid rgba(255,255,255,.16);

    box-shadow:
        0 0 0 70px rgba(255,255,255,.025),
        0 0 0 140px rgba(255,255,255,.02);
}

.login-page::after {
    width: 360px;
    height: 360px;

    right: -180px;
    top: -190px;

    background: rgba(255,255,255,.06);

    box-shadow:
        0 0 80px rgba(255,255,255,.08);
}


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

.login-card {
    width: min(470px, 94vw);

    background: rgba(255,255,255,.97);

    border: 1px solid rgba(255,255,255,.8);

    border-radius: 27px;

    padding: 42px 42px 27px;

    box-shadow: var(--shadow-lg);

    position: relative;

    z-index: 2;

    animation: loginCard .55s ease both;
}

@keyframes loginCard {
    from {
        opacity: 0;

        transform:
            translateY(18px)
            scale(.98);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}


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

.login-logo {
    width: 82px;
    height: 82px;

    margin: 0 auto 18px;

    border-radius: 24px;

    background:
        linear-gradient(
            145deg,
            #1677ff,
            #075dcc
        );

    color: #fff;

    display: grid;

    place-items: center;

    font-size: 36px;

    border: 5px solid #fff;

    box-shadow:
        0 12px 30px rgba(22,119,255,.28),
        0 0 0 1px #d9e9ff;
}


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

.login-card h1 {
    text-align: center;

    color: var(--navy);

    font-size: 27px;

    line-height: 1.25;

    margin: 0;

    font-weight: 800;

    letter-spacing: -.4px;
}

.login-card p {
    text-align: center;

    color: #7b8ba3;

    margin: 12px 0 30px;

    font-size: 14px;
}


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

.login-card label {
    display: block;

    font-weight: 700;

    color: #16427b;

    margin: 16px 0 8px;

    font-size: 14px;
}

.input-icon {
    display: flex;

    border: 1px solid #d5e2f2;

    border-radius: 12px;

    overflow: hidden;

    background: #fff;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.input-icon:focus-within {
    border-color: var(--primary);

    box-shadow:
        0 0 0 4px rgba(22,119,255,.11);
}

.input-icon i {
    width: 55px;

    flex-shrink: 0;

    display: grid;

    place-items: center;

    background: #edf5ff;

    color: var(--primary);

    font-size: 17px;

    border-right: 1px solid #dbe8f7;
}

.input-icon input {
    width: 100%;

    min-width: 0;

    border: 0;

    outline: 0;

    padding: 14px 15px;

    flex: 1;

    font-size: 15px;

    color: var(--text);

    background: #fff;
}

.input-icon input::placeholder {
    color: #9aaac0;
}


/* =========================================================
   BUTTON
   ========================================================= */

.btn {
    border: 0;

    border-radius: 11px;

    padding: 12px 18px;

    cursor: pointer;

    font-weight: 700;

    font-size: 14px;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.btn.primary {
    background:
        linear-gradient(
            135deg,
            #1677ff,
            #075dcc
        );

    color: #fff;

    box-shadow:
        0 9px 22px rgba(22,119,255,.25);
}

.btn.primary:hover {
    transform: translateY(-2px);

    box-shadow:
        0 13px 28px rgba(22,119,255,.34);
}

.btn.primary:active {
    transform: translateY(0);
}

.btn.full {
    width: 100%;

    margin-top: 24px;

    padding: 14px;

    font-size: 15px;
}


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

.login-footer {
    text-align: center;

    border-top: 1px solid #e8edf4;

    margin-top: 24px;

    padding-top: 16px;

    color: #8997aa;

    font-size: 13px;
}


/* =========================================================
   TABLE & FORM CARD
   ========================================================= */

.table-card,
.form-card {
    background: #fff;

    border: 1px solid #e5ebf4;

    border-radius: 17px;

    box-shadow: var(--shadow-sm);

    padding: 20px;

    overflow: auto;
}

.table-tools {
    margin-bottom: 14px;
}

.search {
    width: 100%;

    max-width: 360px;

    padding: 11px 14px;

    border: 1px solid #d7e1ee;

    border-radius: 10px;

    outline: 0;

    transition: .2s ease;
}

.search:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 4px rgba(22,119,255,.10);
}


/* =========================================================
   TABLE
   ========================================================= */

table {
    width: 100%;

    border-collapse: collapse;

    min-width: 650px;
}

th,
td {
    text-align: left;

    padding: 13px;

    border-bottom: 1px solid #edf1f6;

    font-size: 14px;
}

th {
    color: #526173;

    background: #f7faff;

    font-weight: 700;
}

tbody tr {
    transition: background .15s ease;
}

tbody tr:hover {
    background: #f8fbff;
}


/* =========================================================
   PILLS
   ========================================================= */

.pill {
    display: inline-block;

    padding: 5px 10px;

    border-radius: 20px;

    font-size: 12px;

    font-weight: 700;
}

.pill.warning {
    background: #fff5dc;

    color: #946200;
}

.pill.danger {
    background: #ffe8ec;

    color: #a32130;
}


/* =========================================================
   EXAM / LINK GRID
   ========================================================= */

.exam-grid,
.link-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 18px;
}

.exam-card,
.link-card {
    background: #fff;

    border: 1px solid #e5ebf4;

    border-radius: 17px;

    box-shadow: var(--shadow-sm);

    padding: 20px;

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.exam-card:hover,
.link-card:hover {
    transform: translateY(-3px);

    box-shadow: var(--shadow-md);
}

.exam-card-head {
    display: flex;

    justify-content: space-between;

    gap: 10px;
}

.exam-card h3 {
    margin: 0 0 4px;

    color: var(--navy);
}

.exam-card-head span {
    font-size: 12px;

    color: #7b8798;
}

.exam-list {
    margin-top: 15px;
}

.exam-list div {
    display: flex;

    justify-content: space-between;

    padding: 9px 0;

    border-bottom: 1px solid #edf0f4;

    font-size: 13px;
}

.exam-list b {
    color: #667085;
}


/* =========================================================
   LINK CARD
   ========================================================= */

.link-card {
    display: flex;

    align-items: center;

    gap: 14px;

    text-decoration: none;

    color: var(--text);
}

.link-card i {
    width: 48px;
    height: 48px;

    flex-shrink: 0;

    border-radius: 13px;

    background: #eaf3ff;

    display: grid;

    place-items: center;

    font-size: 22px;

    color: var(--primary);
}

.link-card span {
    display: block;

    color: #7b8491;

    font-size: 12px;

    margin-top: 4px;
}


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

.form-card {
    max-width: 700px;
}

.form-card h2 {
    margin-top: 0;

    color: var(--navy);
}

.form-card label {
    display: block;

    margin: 16px 0 7px;

    font-weight: 700;

    color: #344b6b;

    font-size: 14px;
}

.form-card input,
.form-card select,
.form-card textarea {
    width: 100%;

    padding: 12px 13px;

    border: 1px solid #d7e1ee;

    border-radius: 10px;

    outline: 0;

    font-family: inherit;

    font-size: 14px;

    background: #fff;

    transition: .2s ease;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 4px rgba(22,119,255,.10);
}

.form-card button {
    margin-top: 20px;
}


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

@media (max-width: 1100px) {

    .stats-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .menu-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .exam-grid,
    .link-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}


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

@media (max-width: 760px) {

    .sidebar {
        display: none;
    }

    .content {
        padding: 20px 16px;
    }

    .topbar {
        height: 64px;

        padding: 0 15px;
    }

    .app-shell {
        min-height: calc(100vh - 64px);
    }

    .top-user span:first-child {
        display: none;
    }

    .page-head {
        align-items: flex-start;

        flex-direction: column;

        gap: 10px;
    }

    .menu-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .stats-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

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


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .content {
        padding: 16px 12px;
    }

    .stats-grid,
    .menu-grid,
    .exam-grid,
    .link-grid {
        grid-template-columns: 1fr;
    }

    .login-page {
        padding: 18px 12px;
    }

    .login-card {
        width: 100%;

        padding: 30px 20px 22px;

        border-radius: 22px;
    }

    .login-logo {
        width: 72px;
        height: 72px;

        border-radius: 21px;
    }

    .login-card h1 {
        font-size: 23px;
    }

    .login-card p {
        margin-bottom: 24px;
    }

    .topbar {
        padding: 0 12px;
    }

    .brand-icon {
        width: 40px;
        height: 40px;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;

        animation-iteration-count: 1 !important;

        transition-duration: .01ms !important;
    }
}