:root {
    --primary-blue: #5D9CEC;
    /* Warna biru muda sidebar */
    --primary-dark: #4A89DC;
    /* Warna biru hover */
    --sidebar-bg: #5D9CEC;
    --navbar-bg: #dbeaff;
    --header-dark: #2C3E50;
    /* Warna header tabel */
    --input-focus: #5D9CEC;
    --bg-light: #F5F7FA;
    --text-dark: #333;
    --primary-light: #5D9CEC;
}

/* Lock scroll saat loading */
body.loading {
    overflow: hidden;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(360deg, rgba(93, 156, 236, 1) 0%, rgba(40, 53, 147, 1) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 1;
    visibility: visible;
    transition: opacity 1.2s ease, visibility 1.2s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    color: white;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-light);
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

html {
    overflow-x: hidden;
}

.section-spacing {
    padding: 80px 0;
}

#fitur {
    min-height: 100dvh;
    padding-top: 10rem;
}

/* --- Page Headers --- */
.page-title {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: #666;
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* --- Cards & Inputs --- */
.card-custom {
    background: #fff;
    border-radius: 15px;
    border: none;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
    padding: 30px;
    margin-bottom: 30px;
}

.form-label-custom {
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.input-box {
    border: 2px solid #E6E9ED;
    border-radius: 10px;
    padding: 10px 15px;
    background-color: #fff;
    color: #0f172a;
    font-weight: 500;
    transition: all 0.3s;
}

.input-box:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(93, 156, 236, 0.1);
}

.form-control,
.form-select {
    border: 2px solid #E6E9ED;
    border-radius: 10px;
    padding: 10px 15px;
    background-color: #fff;
    color: #0f172a;
    font-weight: 500;
    transition: all 0.3s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(93, 156, 236, 0.1);
}

/* Dark mode styles for SweetAlert2 */
.dark-mode .swal2-popup {
    background-color: #2d3748 !important;
    color: #e2e8f0 !important;
}

.dark-mode .swal2-title {
    color: #e2e8f0 !important;
}

.dark-mode .swal2-html-container {
    color: #cbd5e0 !important;
}

.dark-mode .swal2-input {
    background-color: #4a5568 !important;
    border-color: #718096 !important;
    color: #e2e8f0 !important;
}

.dark-mode .swal2-input:focus {
    border-color: #5D9CEC !important;
}

.dark-mode .swal2-validation-message {
    background-color: #e53e3e !important;
    color: #fff !important;
}

.dark-mode .swal2-actions {
    background-color: #2d3748 !important;
}

.dark-mode .swal2-confirm {
    background-color: #5D9CEC !important;
}

.dark-mode .swal2-cancel {
    background-color: #6c757d !important;
}

.dark-mode .swal2-icon {
    color: #5D9CEC !important;
}

.dark-mode .swal2-icon.swal2-success {
    border-color: #48bb78 !important;
    color: #48bb78 !important;
}

.dark-mode .swal2-icon.swal2-error {
    border-color: #e53e3e !important;
    color: #e53e3e !important;
}

/* --- Dynamic Criteria Rows --- */
.criteria-row {
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease;
}

.login-with-google-btn {
    border-radius: 20px !important;
}

/* --- Buttons --- */
.btn-custom-primary {
    background-color: var(--primary-blue);
    color: white;
    border-radius: 8px;
    padding: 10px 25px;
    font-weight: 600;
    border: none;
    transition: all 0.2s;
}

.btn-custom-primary:hover {
    background-color: #283593;
    color: white;
    transform: translateY(-2px);
}

.btn-custom-secondary {
    background-color: #283593;
    color: white;
    border-radius: 8px;
    padding: 10px 20px;
    border: none;
}

.btn-custom-secondary:hover {
    background-color: var(--primary-dark);
    color: white;
    border-radius: 8px;
    padding: 10px 20px;
    border: none;
    transition: ease-in-out 0.7s;
}

/* --- Tables --- */
.table-header-custom th {
    background-color: var(--primary-blue) !important;
    color: white !important;
    font-weight: 500;
    text-align: center;
    vertical-align: middle;
    padding: 15px;
}

/* First & Last border radius for table header */
.table-header-custom th:first-child {
    border-top-left-radius: 10px;
}

.table-header-custom th:last-child {
    border-top-right-radius: 10px;
}

.table-input {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px 10px;
    width: 100%;
    text-align: center;
}

/* --- Result Section --- */
.result-section {
    display: none;
    /* Hidden by default */
    animation: slideUp 0.6s ease;
}

.best-alternative-card {
    background: linear-gradient(135deg, #303F9F 0%, #5D9CEC 100%);
    color: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .section-spacing {
        padding: 60px 0;
    }

    .homepage-hero {
        padding-top: 4rem !important;
    }

    #fitur {
        padding-top: 4rem !important;
    }

    .card-custom {
        padding: 26px 22px;
        margin-bottom: 24px;
        margin: auto;
        width: 100%;
    }

    .btn-custom-primary {
        justify-content: center;
        margin-top: 1rem;
    }

    body.dark-mode .auth-card {
        background-color: #2D2D2D !important;
    }
}

.btn {
    border-radius: 20px !important;
    border: none;
    padding: 1rem;
}

.btn-primary-light {
    background-color: var(--primary-blue);
    color: var(--bg-light);
}

.btn-primary-light:hover {
    background-color: var(--primary-dark);
    color: var(--bg-light);
}

.btn-primary-dark {
    background-color: #283593;
    color: var(--bg-light);
}

.btn-primary-dark:hover {
    background-color: #303F9F;
    color: var(--bg-light);
}

.homepage-hero {
    padding-top: 10rem;
    min-height: 100dvh;
    background: linear-gradient(135deg, #f6f9ff, #eef4ff);
    color: #0f172a;
}

.hero-theme-switch {
    position: absolute;
    top: 20px;
    right: 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 8px 16px;
    border-radius: 999px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    font-size: 0.9rem;
    color: #283593;
    z-index: 10;
}

.hero-theme-switch .form-check-input {
    cursor: pointer;
}

@media (max-width: 576px) {
    .hero-theme-switch {
        position: static;
        margin-top: 2.5rem;
        background: none;
        box-shadow: none;
        margin-bottom: 2.5rem;
        justify-content: space-between;
        width: 100%;
    }

    table.dataTable.nowrap th,
    table.dataTable.nowrap td {
        white-space: nowrap;
        max-width: 100px;
        overflow-x: auto;
    }

    .btn-add-new {
        padding: 0.5rem 0.7rem !important;
        font-size: 0.7rem !important;
    }

    body.dark-mode .hero-theme-switch {
        background: none !important;
        box-shadow: none !important;
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background-color: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    margin-bottom: 20px;
    color: #6b7280;
}

.hero-badge i {
    color: #f5a524;
}

.hero-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: #283593;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: #283593;
}

.hero-stats {
    display: flex;
    gap: 30px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.hero-stats h4 {
    font-weight: 700;
    margin-bottom: 4px;
    color: #283593;
}

.hero-stats span {
    color: #3b6db3;
    font-size: 0.95rem;
}

@media (max-width: 576px) {
    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.preview-logo {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    padding: 8px;
}

.preview-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.preview-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-radius: 16px;
}

.preview-item strong {
    display: block;
    font-size: 1rem;
    color: #0f172a;
}

.preview-item small {
    color: #94a3b8;
    font-size: 0.85rem;
}

.features-section {
    background-color: #fff;
}

.section-heading .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    font-weight: 600;
    color: #94a3b8;
}

.section-heading h2 {
    font-weight: 700;
    margin: 12px 0;
}

.section-heading p {
    color: #6b7280;
    max-width: 560px;
    margin: 0 auto;
}

.feature-card {
    height: 100%;
    border-radius: 20px;
    padding: 32px;
    background: #fff;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 55px rgba(15, 23, 42, 0.12);
}

.feature-card i {
    font-size: 2rem;
    color: #5D9CEC;
    margin-bottom: 16px;
}

.feature-card p {
    color: #6b7280;
    margin-bottom: 16px;
}

.feature-card a {
    text-decoration: none;
    font-weight: 600;
    color: #5D9CEC;
}

.cta-banner {
    background: #283593;
    color: #fff;
    padding: 70px 0;
}

.cta-banner p {
    color: rgba(255, 255, 255, 0.75);
    max-width: 600px;
    margin: 0 auto 24px auto;
}

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.navbar {
    background: #fff !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0;
    margin-top: 0;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.navbar-toggler {
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: transparent;
    border-radius: 0.5rem;
    width: auto;
    height: auto;
    padding: 0.35rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.15rem rgba(93, 156, 236, 0.25);
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: #283593;
    position: relative;
    padding: 0.25rem 0;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: #5D9CEC;
    opacity: 0;
    transform: scaleX(0.5);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link:focus::after {
    opacity: 1;
    transform: scaleX(1);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 0;
}

.navbar-menu {
    padding-left: 0;
}

/* Tombol utama */
.btn-profile {
    border-radius: 50px;
    padding: 8px 14px;
    border: none;
    transition: all 0.3s ease;
}

.btn-profile:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

.btn-profile:focus {
    outline: none;
}

/* Avatar Initial */
.avatar-initial {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #ffffff, #e3f2ff);
    color: #4a89dc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Dropdown Menu */
.dropdown-menu {
    border: none;
    border-radius: 7px;
    padding: 10px;
    min-width: 230px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    animation: dropdownFade 0.25s ease;
}

.dropdown-menu.show {
    box-shadow: rgba(17, 17, 26, 0.1) 0px 1px 0px, rgba(17, 17, 26, 0.1) 0px 8px 24px, rgba(17, 17, 26, 0.1) 0px 16px 48px !important;
}

a.forgot:hover {
    text-decoration: underline !important;
}

/* Animasi dropdown */
@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Item menu */
.dropdown-item {
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s ease;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #5d9cec, #4a89dc);
    color: #fff !important;
    transform: translateX(4px);
}

.dropdown-item:hover i {
    color: #fff;
}

/* Divider */
.dropdown-divider {
    margin: 8px 0;
    opacity: 0.5;
}

/* Logout khusus */
.dropdown-item.text-danger:hover {
    background: linear-gradient(135deg, #dc3545, #b52a37);
    color: #fff !important;
}

/* Nama & Role */
.btn-profile strong {
    font-size: 14px;
    font-weight: 600;
}

.btn-profile small {
    font-size: 11px;
    opacity: 0.8;
}

/* Mobile Optimization */
@media (max-width: 576px) {
    .btn-profile {
        padding: 6px 10px;
    }

    .avatar-initial {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
}

.avatar-initial {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #5D9CEC;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

@media (max-width: 992px) {
    .navbar-collapse {
        border-radius: 16px;
        padding: 1.2rem;
        margin-top: 1rem;
        box-shadow: 0 30px 60px rgba(15, 23, 42, 0.12);
    }

    .navbar-menu {
        align-items: flex-start !important;
    }

    .navbar-nav .nav-link {
        padding: 0.35rem 0;
    }

    .navbar-actions {
        width: 100%;
        flex-direction: column;
        margin: 0;
    }

    .navbar-actions .btn {
        width: 100%;
    }
}

/* --- Dark Mode Variables & Overrides --- */
body.dark-mode {
    --bg-light: #121212;
    --text-dark: #f0f0f0;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

body.dark-mode .navbar,
body.dark-mode .navbar-collapse {
    background-color: #0f172a !important;
}

body.dark-mode .card-custom {
    background-color: #363636 !important;
}

body.dark-mode .input-box {
    color: #e2e8f0;
    background-color: #2D2D2D !important;
}

body.dark-mode .input-box::placeholder {
    color: #bababa;
}

.dropdown-toggle {
    border: none;
}

body.dark-mode .dropdown-toggle {
    color: #e2e8f0;
}

body.dark-mode .dropdown-menu.show {
    background: #2D2D2D;
}

body.dark-mode .dropdown-item.text-danger:hover {
    background: linear-gradient(135deg, #dc3545, #b52a37);
    color: #fff !important;
}

body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode .form-input {
    border: 2px solid #444;
    background-color: #2D2D2D;
    color: #e2e8f0;
}

body.dark-mode .form-control::placeholder,
body.dark-mode .form-input::placeholder {
    color: #bebebe !important;
}

body.dark-mode .form-control-custom::placeholder {
    color: #e2e8f0;
}

body.dark-mode .navbar-nav .nav-link {
    color: #e2e8f0;
}

body.dark-mode .navbar-nav .nav-link::after {
    background: #7dd3fc;
}

body.dark-mode .navbar-actions .btn-primary-light {
    background-color: rgba(125, 211, 252, 0.15);
    color: #e0f2fe;
    border: 1px solid rgba(125, 211, 252, 0.3);
}

body.dark-mode .navbar-toggler-icon {
    color: #e0f2fe !important;
}

body.dark-mode .navbar-actions .btn-primary-dark {
    background-color: #222c6f;
}

body.dark-mode .btn-profile {
    background-color: #0f172a;
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .hero-theme-switch {
    background: #0f172a;
    color: #e2e8f0;
    box-shadow: rgba(0, 0, 0, 0.17) 0px -23px 25px 0px inset, rgba(0, 0, 0, 0.15) 0px -36px 30px 0px inset, rgba(0, 0, 0, 0.1) 0px -79px 40px 0px inset, rgba(0, 0, 0, 0.06) 0px 2px 1px, rgba(0, 0, 0, 0.09) 0px 4px 2px, rgba(0, 0, 0, 0.09) 0px 8px 4px, rgba(0, 0, 0, 0.09) 0px 16px 8px, rgba(0, 0, 0, 0.09) 0px 32px 16px;
}

body.dark-mode .homepage-hero {
    background: linear-gradient(135deg, #0b1120, #111c30);
    color: #e2e8f0;
}

body.dark-mode .hero-badge {
    background: #141b51;
    color: #cbd5f5;
    box-shadow: rgba(0, 0, 0, 0.17) 0px -23px 25px 0px inset, rgba(0, 0, 0, 0.15) 0px -36px 30px 0px inset, rgba(0, 0, 0, 0.1) 0px -79px 40px 0px inset, rgba(0, 0, 0, 0.06) 0px 2px 1px, rgba(0, 0, 0, 0.09) 0px 4px 2px, rgba(0, 0, 0, 0.09) 0px 8px 4px, rgba(0, 0, 0, 0.09) 0px 16px 8px, rgba(0, 0, 0, 0.09) 0px 32px 16px;
}

body.dark-mode .hero-title {
    color: #f1f5ff;
}

body.dark-mode .hero-subtitle {
    color: #c3dafe;
}

body.dark-mode .hero-stats h4,
body.dark-mode .hero-stats span {
    color: #cbd5f5;
}

body.dark-mode .features-section {
    background: #0b1120;
}

body.dark-mode .feature-card {
    background: #111927;
    border-color: rgba(148, 163, 184, 0.1);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

body.dark-mode .feature-card p,
body.dark-mode .feature-card a,
body.dark-mode .feature-card h5 {
    color: #e2e8f0;
}

body.dark-mode .cta-banner {
    background: #141b51;
    color: #f8fafc;
}

body.dark-mode .footer-divider {
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .auth-card,
body.dark-mode .modal-content,
body.dark-mode #page-content-wrapper {
    background-color: #1E1E1E !important;
    color: var(--text-dark);
    border-color: #333;
}

body.dark-mode .card {
    background-color: #363636;
}

body.dark-mode table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control:before,
table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control:before {
    color: #e2e8f0;
}

body.dark-mode .welcome-card {
    background: radial-gradient(circle at top left, rgba(93, 156, 236, 0.15), transparent 55%),
        #2b2f3a !important;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

body.dark-mode .welcome-title {
    color: #dfe9ff;
}

body.dark-mode .welcome-subtitle {
    color: #dfe9ff;
}

body.dark-mode .btn-start {
    background-color: #0b1120;
}

body.dark-mode .btn-start:hover {
    background-color: #0b1120;
}

body.dark-mode .form-control-custom,
body.dark-mode .form-select {
    background-color: #2D2D2D;
    border-color: #444;
    color: #fff;
}

body.dark-mode .form-control-custom:focus {
    background-color: #333;
    border-color: #5D9CEC;
    color: #fff;
}

body.dark-mode .text-muted {
    color: #aaa !important;
}

/* Table Dark Mode Fixes */
body.dark-mode .table {
    color: #e0e0e0;
    --bs-table-color: #e0e0e0;
    --bs-table-bg: #1E1E1E;
    --bs-table-border-color: #333;
    --bs-table-hover-bg: #2C2C2C;
}

body.dark-mode .dataTables_wrapper .dataTables_length,
body.dark-mode .dataTables_wrapper .dataTables_filter,
body.dark-mode .dataTables_info,
body.dark-mode .dataTables_paginate {
    color: #ccc !important;
}

body.dark-mode .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* --- Login & Register Styles --- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-light);
    position: relative;
    transition: background-color 0.3s;
}

.auth-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    position: relative;
    border: 1px solid #eee;
    transition: background-color 0.3s, border-color 0.3s;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 30px;
    text-align: left;
}

.logo-icon {
    width: 50px;
    height: 50px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3D7DD9;
    font-size: 30px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-heading {
    font-weight: 600;
    color: #3D7DD9;
    letter-spacing: 0.4rem;
    font-size: 1.2rem;
}

.logo-subtitle {
    font-weight: 600;
    color: #5D9CEC;
    letter-spacing: 0.5rem;
    font-size: 1rem;
}

.password-field {
    position: relative !important;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #5D9CEC;
    font-size: 1rem;
    cursor: pointer;
}

.password-toggle:focus {
    outline: none;
    color: #4A89DC;
}

.custom-input-label {
    font-weight: 500;
    color: #5D9CEC;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-control-custom {
    border-radius: 10px;
    border: 2px solid #E6E9ED;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-control-custom::placeholder {
    color: #b1b7c4;
    opacity: 1;
}

.form-control-custom:focus {
    border-color: #5D9CEC;
    box-shadow: 0 0 0 4px rgba(93, 156, 236, 0.2);
}

.btn-auth {
    background-color: #5D9CEC;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: white;
    width: 100%;
    transition: all 0.3s;
}

.btn-auth:hover {
    background-color: #4A89DC;
    transform: translateY(-2px);
}

.btn-auth-dark {
    background-color: #303F9F;
    color: white;
}

.btn-auth-dark:hover {
    background-color: #283593;
    color: white;
}

/* Toggle Switch Top Right */
.auth-toggle-wrapper {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

/* --- Layout & Sidebar Styles --- */
#wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

.navbar-bg {
    background-color: var(--navbar-bg);
    box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;
}

.navbar-brand {
    color: #283593;
}

a.navbar-link {
    color: #283593 !important;
}

#sidebar-wrapper {
    min-height: 100vh;
    width: 280px;
    background-color: var(--sidebar-bg);
    color: white;
    transition: margin 0.25s ease-out;
    position: fixed;
    z-index: 1000;
    left: 0;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
}

body.dark-mode #sidebar-wrapper {
    min-height: 100vh;
    width: 280px;
    background-color: #0f172a;
    color: white;
    transition: margin 0.25s ease-out;
    position: fixed;
    z-index: 1000;
    left: 0;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
}

#wrapper.toggled #sidebar-wrapper {
    margin-left: -280px;
}

.sidebar-heading {
    padding: 30px 20px;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-close {
    margin-left: auto;
    color: #fff;
    font-size: 1.25rem;
    padding: 0;
}

.list-group-item {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 15px 25px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    padding-left: 30px;
}

.list-group-item.active {
    background-color: #3b6db3;
    /* Lebih gelap sedikit */
    color: white;
    border-left: 5px solid white;
    font-weight: 600;
}

#page-content-wrapper {
    width: 100%;
    margin-left: 280px;
    transition: margin 0.25s ease-out;
    background-color: #fff;
    min-height: 100vh;
}

#wrapper.toggled #page-content-wrapper {
    margin-left: 0;
}

.admin {
    font-weight: 500;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    #hero {
        text-align: center !important;
    }


    #sidebar-wrapper {
        margin-left: -280px;
    }

    #wrapper.toggled #sidebar-wrapper {
        margin-left: 0;
    }

    #page-content-wrapper {
        margin-left: 0;
    }

    #wrapper.toggled #page-content-wrapper {
        margin-left: 0;
        /* Content overlay or push logic */
    }

    /* Overlay for mobile when sidebar is open */
    .sidebar-overlay {
        display: none;
        position: fixed;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .auth-card {
        border: 0;
        background-color: transparent;
        border-radius: 0;
        box-shadow: none;
    }

    body.dark-mode .auth-card,
    body.dark-mode .modal-content,
    body.dark-mode #page-content-wrapper {
        background-color: transparent !important;
    }
}

/* --- Dashboard Specifics --- */
.welcome-card {
    background-color: #EBF5FF;
    border-radius: 20px;
    padding: 40px;
    margin-top: 20px;
    border: none;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
    transition: background-color 0.3s;
}

.welcome-title {
    color: #303F9F;
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 10px;
}

.welcome-subtitle {
    color: #303F9F;
    font-size: 1.5rem;
}

.btn-start {
    background-color: #303F9F;
    color: white;
    padding: 10px 30px;
    border-radius: 25px;
    margin-top: 20px;
    border: none;
}

.btn-start:hover {
    background-color: #283593;
    color: white;
}

/* --- Table Styles --- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    margin-top: 20px;
}

.btn-add-new {
    background-color: #303F9F;
    color: white;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-add-new:hover {
    background-color: #283593;
    color: white;
}

/* Datatable Customization */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 20px;
}

.dataTables_wrapper .table-toolbar {
    width: 100%;
    gap: 1rem;
}

.table-toolbar .toolbar-length label,
.table-toolbar .toolbar-search label {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0;
}

.table-toolbar .toolbar-length select,
.table-toolbar .toolbar-search input[type="search"] {
    flex: 1;
    min-width: 0;
}

.table-toolbar .toolbar-length select {
    max-width: 140px;
}

@media (max-width: 576px) {

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        width: 100%;
        display: flex;
        justify-content: space-between;
        gap: 12px;
    }

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .table-toolbar .toolbar-length select {
        max-width: 120px;
    }

    .table-toolbar .toolbar-search label {
        margin-top: 8px;
    }
}

table.dataTable thead th {
    background-color: #303F9F;
    color: white;
    border-bottom: none;
    padding: 15px;
    font-weight: 500;
}

/* First Header radius */
table.dataTable thead th:first-child {
    border-top-left-radius: 10px;
}

/* Last Header radius */
table.dataTable thead th:last-child {
    border-top-right-radius: 10px;
}

table.dataTable tbody td {
    padding: 15px;
    vertical-align: middle;
    color: #555;
    border-bottom: 1px solid #eee;
}

table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control:before,
table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control:before {
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #fff;
    background: #303F9F;
    border-radius: 999px;
    margin-top: 0.5rem;
    padding: 4px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    transform: translateY(-50%);
}

/* Action Buttons in Table */
.action-btn {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
    color: white;
    transition: transform 0.2s;
}

.action-btn:hover {
    transform: scale(1.1);
    color: white;
}

.btn-detail {
    background-color: #303F9F;
}

.btn-key {
    background-color: #495057;
    border: 0;
}

.btn-key:hover {
    background-color: transparent;
    border: 2px solid #f5a524;
    color: rgb(245, 165, 36);
    box-shadow: rgba(245, 165, 36) 0px 2px 4px 0px, rgba(245, 165, 36) 0px 2px 16px 0px;
}

.btn-edit {
    background-color: #90CAF9;
    color: white !important;
    border: none;
}

.btn-delete {
    background-color: #EF5350;
    border: none;
    cursor: pointer;
}

/* Membatasi ukuran setiap chart agar tidak terlalu besar */
#chartTotalSkor,
#chartRadar,
#chartBobot {
    max-width: 550px;
    margin: 0 auto;
    padding: 10px;
}

/* Agar container card tidak melebar terlalu panjang */
.card-visual .card-body {
    padding: 20px;
}

.card-visual {
    max-width: 100%;
    margin: 0 auto 25px auto;
    border-radius: 12px;
    box-shadow: rgba(6, 24, 44, 0.4) 0px 0px 0px 2px, rgba(6, 24, 44, 0.65) 0px 4px 6px -1px, rgba(255, 255, 255, 0.08) 0px 1px 0px inset;
}

/* Menjaga responsivitas */
canvas {
    width: 100% !important;
    height: auto !important;
}

/* Heading visualisasi */
.form-label-custom {
    font-size: 1.1rem;
    font-weight: 600;
}


/* --- Modal Custom --- */
/* Light Mode Styles (Default) */
.modal-content {
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    animation: modalFadeIn 0.3s ease-out forwards;
    background-color: #ffffff;
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px 12px 0 0;
    position: relative;
    overflow: hidden;
}

.modal-backdrop {
    opacity: 0.5;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    background-color: rgba(0, 0, 0, 0.4) !important;
}

.modal {
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

/* Style SweetAlert2 container and buttons */
.swal2-container {
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    background-color: rgba(0, 0, 0, 0.4) !important;
}

.swal2-popup {
    border-radius: 12px !important;
    padding: 2rem !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2) !important;
}

.swal2-styled.swal2-confirm-no-border,
.swal2-styled.swal2-cancel-no-border {
    border: none !important;
    box-shadow: none !important;
    border-radius: 20px !important;
    padding: 10px 24px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

/* Hover effect for confirm/delete button */
.swal2-styled.swal2-confirm-no-border {
    background-color: #EF5350 !important;
}

.swal2-styled.swal2-confirm-no-border:hover {
    background-color: #e53935 !important;
    transform: translateY(-1px);
}

/* Hover effect for cancel button */
.swal2-styled.swal2-cancel-no-border {
    background-color: #6c757d !important;
}

.swal2-styled.swal2-cancel-no-border:hover {
    background-color: #5a6268 !important;
    transform: translateY(-1px);
}

.modal-body {
    padding: 1.75rem 2rem 2rem;
    background: #ffffff;
    border-radius: 0 0 12px 12px;
    color: #495057;
    line-height: 1.6;
    color: #495057;
    line-height: 1.6;
}

.modal-title {
    font-weight: 700;
    font-size: 1rem;
    color: #212529;
    letter-spacing: 0.3px;
    margin: 0;
    position: relative;
    display: inline-block;
}

/* Dark Mode Overrides */
body.dark-mode .modal-content {
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    background-color: #1e1e2d;
}

body.dark-mode .modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, #1a1a27 0%, #151521 100%);
}

body.dark-mode .modal-body {
    background: #1E1E1E;
    color: #E0E0E0;
}

body.dark-mode .modal-title {
    color: #FFFFFF;
}

/* Animation */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.shadow-lg {
    box-shadow: rgba(136, 165, 191, 0.48) 6px 2px 16px 0px, rgba(255, 255, 255, 0.8) -6px -2px 16px 0px;
}


.select2-selection__rendered {
    background-color: var(--primary-light);
    border-radius: 8px;
    border-left: #222c6f 2px solid;
    max-width: 200px;
}

/* Form Validation */
.was-validated .form-control:invalid,
.was-validated .form-control.is-invalid,
.was-validated .form-select:invalid,
.was-validated .form-select.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:invalid:focus,
.was-validated .form-select:invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

.was-validated .form-control:invalid~.invalid-feedback,
.was-validated .form-select:invalid~.invalid-feedback,
.was-validated .form-control.is-invalid~.invalid-feedback,
.was-validated .form-select.is-invalid~.invalid-feedback {
    display: block;
}

.detail,
.proyek-spk {
    text-align: center;
}