﻿:root {
    --bg-primary: #e1e1e1;
    --bg-header: #0476D9;
    --bg-card: ghostwhite;
    --border-card: #d1d1d1;
    --text-primary: #000;
    --card-bg: #ffffff;
    --card-text: #000000;
    --input-bg: #f8f8f8;
    --input-text: #000000;
    --place-holder: #6c757d;
    --student-detail-header-bg: #f1f3f6;
    --student-detail-input-bg: #e9ecef;
    --student-detail-input-border: #d1d5db;
    --section-title-bg: #f3f3f3;
    --pagination-btn-bg: #fff;
    --bottom-bar-color: #0476D9;
    --modal-box-bg: #ffffff;
    --modal-overlay: rgba(0, 0, 0, 0.5);
    --upload-box-report-bg: #fafbfc;
    --upload-icon-color: #555;
    --uploaded-photo-text: #828487;
    --report-modal-grid: #000;
    --feedback-grid-bg: #F5F5F5;
    --login-page-bg: rgba(255,255,255,0.85);
    --nav-tabs-bg-active: #fff;
    --nav-tabs-before: #BABABA;
    --text-muted: #6c757d;
    --nav-item-inner-bg: #fff;
    --table-border: #ccc;
    --table-header-bg: #0476D9;
    --table-header-text: #fff;
    --table-row-odd: #f1f1f1;
    --table-row-even: #fff;
    --table-scrollbar: #aaa;
}

.dark {
    --bg-primary: #292c2e;
    --bg-header: #035eae;
    --bg-card: #1a1c1d;
    --border-card: #696969;
    --text-primary: #fff;
    --card-bg: #1e1e1e;
    --card-text: #ffffff;
    --input-bg: #2b2b2b;
    --input-text: #ffffff;
    --place-holder: #b5b5b5;
    --student-detail-header-bg: #1e2122;
    --student-detail-input-bg: #232627;
    --student-detail-input-border: #4B5563;
    --section-title-bg: #1f2123;
    --bottom-bar-color: #035eae;
    --modal-box-bg: #181a1b;
    --modal-overlay: rgba(20, 22, 23, 1);
    --upload-box-report-bg: #1a1c1e;
    --upload-icon-color: #A4A19D;
    --uploaded-photo-text: #9C9995;
    --report-modal-grid: #E8E6E3;
    --feedback-grid-bg: #1E2021;
    --login-page-bg: rgba(30,30,30,0.85);
    --nav-tabs-bg-active: #181A1B;
    --nav-tabs-before: #4D4D4D;
    --text-muted: #9ca3af;
    --nav-item-inner-bg: #181A1B;
    --table-border: #444;
    --table-header-bg: #0476D9;
    --table-header-text: #fff;
    --table-row-odd: #202324;
    --table-row-even: #181a1b;
    --table-scrollbar: #444;
}

/* Default Light Mode */
body {
    background: var(--bg-primary);
    color: var(--text-primary);
}

    body .badge.bg-primary {
        background-color: var(--bottom-bar-color) !important;
    }

/* Dark Mode */
.dark body {
    background: var(--bg-primary);
    color: var(--text-primary);
}

    .dark body .text-danger {
        color: #FF0000 !important;
    }

    .dark body .text-success {
        color: #28D768 !important;
    }

    .dark body .text-muted {
        color: #9ca3af !important;
    }

    .dark body .badge.bg-primary {
        background-color: var(--bottom-bar-color) !important;
    }

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.theme-toggle {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 999;
}

.theme-btn {
    padding: 6px 12px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OS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2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background-color: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #ccc;
    z-index: 1000;
}

    .bottom-nav a {
        color: #666;
        text-decoration: none;
        font-size: 12px;
        display: flex;
        flex-direction: column;
        align-items: center;
        flex: 1;
    }

        .bottom-nav a i {
            font-size: 18px;
        }

.nav-item.active {
    color: black;
    font-weight: bold;
}

.bottom-nav-custom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: var(--bottom-bar-color);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    padding: 0 7px;
    z-index: 1000;
}

.nav-item-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

    .nav-item-inner.active {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        background-color: white;
        padding: 9px 12px;
        border-radius: 20px;
        color: var(--bottom-bar-color);
/*        background-color: var(--nav-item-inner-bg);*/
        box-shadow: 0 0 6px rgba(0,0,0,0.2);
    }

.menu-label {
    font-size: 12px;
    margin-top: 6px;
    margin-left: 0;
    color: inherit;
    transition: margin 0.3s, color 0.3s;
}

.nav-item-inner.active .menu-label {
    margin-top: 0;
    margin-left: 8px;
    color: var(--bottom-bar-color);
}

.nav-item-custom {
    text-decoration: none;
    color: white;
    flex: 1;
    text-align: center;
    transition: color 0.3s;
}

    .nav-item-custom.active i,
    .nav-item-custom span {
        font-size: 12px;
        margin-top: 0px;
    }

    .nav-item-custom.active .menu-label {
        color: var(--bottom-bar-color);
    }

    .nav-item-custom i {
        font-size: 20px;
        transition: color 0.3s;
    }

@media (max-width: 600px) {
    .bottom-nav,
    .bottom-nav-custom {
        height: 60px !important;
        min-height: 0 !important;
        max-height: 60px !important;
    }

    .nav-item-custom {
        font-size: 10px !important;
        padding: 0 !important;
    }

        .nav-item-custom i {
            font-size: 15px !important;
        }

    .nav-item-inner.active {
        padding: 6px 10px !important;
    }
}

body, html {
    overflow: auto;
    height: 100%;
}

.custom-divider {
    height: 1px;
    background-color: #ccc;
    margin: 0 16px;
    opacity: 0.8;
}

.menu-item:last-child {
    border-bottom: none;
}

.d-none {
    display: none !important;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem; /* agar tidak nempel */
    overflow-y: auto; /* biar bisa scroll kalau modal terlalu tinggi */
    z-index: 999;
}

.modal-content {
    background-color: white;
    border-radius: 0.5rem;
    max-height: 100%;
    width: 100%;
    max-width: 500px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-scrollable-content {
    max-height: 80vh;
    overflow-y: auto;
}

.table {
    font-size: 0.9rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
}

    .table thead th,
    .table thead td {
        background-color: #0476D9 !important;
        color: #fff !important;
    }

    .table th, .table td {
        padding: 10px 16px;
        vertical-align: middle;
        white-space: nowrap;
    }

    .table tbody tr:nth-child(odd) td,
    .table tbody tr:nth-child(odd) th {
        background-color: #f1f1f1 !important;
    }

    .table tbody tr:nth-child(even) td,
    .table tbody tr:nth-child(even) th {
        background-color: #fff !important;
    }

.table-responsive::-webkit-scrollbar {
    height: 6px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #aaa;
    border-radius: 4px;
}

.dark .table {
    background-color: #202324 !important;
    color: #fff !important;
    border: 1px solid #444 !important;
}

    .dark .table thead th,
    .dark .table thead td {
        background-color: #0476D9 !important;
        color: #fff !important;
        border-color: #232627 !important;
    }

    .dark .table th,
    .dark .table td {
        border-color: #444 !important;
        color: #fff !important;
    }

    .dark .table tbody tr:nth-child(odd) td,
    .dark .table tbody tr:nth-child(odd) th {
        background-color: #202324 !important;
    }

    .dark .table tbody tr:nth-child(even) td,
    .dark .table tbody tr:nth-child(even) th {
        background-color: #181a1b !important;
    }

    .dark .table td.text-danger,
    .dark .table td .text-danger {
        color: #FF0000 !important;
    }

    .dark .table td.text-success,
    .dark .table td .text-success {
        color: #28D768 !important;
    }

.dark .table-responsive::-webkit-scrollbar-thumb {
    background: #444 !important;
}

.pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
}

    .pagination .page-link {
        min-width: 36px;
        padding: 6px 10px;
        font-size: 0.85rem;
        border-radius: 8px;
        color: #000;
        border: 1px solid #ccc;
        text-align: center;
    }

    .pagination .page-item.active .page-link {
        background-color: #000;
        color: #fff;
        border-color: #000;
    }

    .pagination .page-item.disabled .page-link {
        opacity: 0.5;
    }

    .pagination .page-item {
        margin: 0.25rem;
    }

.dark .pagination .page-link {
    background: #181a1b;
    color: #fff;
    border: 1px solid #444;
    box-shadow: none;
    transition: background 0.2s, color 0.2s, border 0.2s;
}

.dark .pagination .page-item.active .page-link {
    background: #000;
    color: #fff;
    border: 1px solid #837005;
}

.dark .pagination .page-item.disabled .page-link {
    color: #b5b5b5;
    opacity: 0.5;
    background: #292c2e;
    border: 1px solid #444;
}

.dark .pagination .page-link:focus,
.dark .pagination .page-link:hover:not(.disabled) {
    background: #232627;
    color: #fff;
    border: 1px solid #b5b5b5;
}

.bottom-nav-custom .nav-item-custom .nav-item-inner .menu-label {
    color: #fff !important;
    transition: color 0.2s;
}

.bottom-nav-custom .nav-item-custom .nav-item-inner i {
    color: #fff !important;
    transition: color 0.2s;
}

/* Hanya menu yang TIDAK aktif yang icon-nya berubah biru tua saat hover */
.bottom-nav-custom .nav-item-custom:not(.active):hover .nav-item-inner .menu-label {
    color: #fff !important;
}

.bottom-nav-custom .nav-item-custom:not(.active):hover .nav-item-inner i {
    color: #0034A6 !important;
}

/* Menu yang aktif tetap dengan warna biru utama */
.bottom-nav-custom .nav-item-custom.active .nav-item-inner i,
.bottom-nav-custom .nav-item-custom.active .nav-item-inner .menu-label {
    color: var(--bottom-bar-color) !important;
}

#blazor-error-ui {
    display: none !important;
}

@media (max-width: 576px) {
    .pagination .btn-text {
        display: none !important;
    }

    .pagination .btn-icon {
        display: inline-flex !important;
    }
}

@media (min-width: 577px) {
    .pagination .btn-text {
        display: inline-flex !important;
    }

    .pagination .btn-icon {
        display: none !important;
    }
}

.my-swal-popup {
    margin: 10px;
    max-width: 400px;
    box-sizing: border-box;
}

.card {
    background-color: var(--card-bg) !important;
    color: var(--card-text) !important;
    border-color: var(--border-card) !important;
}

.form-control {
    background-color: var(--input-bg) !important;
    color: var(--input-text) !important;
    border-color: var(--border-card) !important;
}

.form-control::placeholder {
    color: var(--place-holder) !important;
}

.form-select {
    background-color: var(--input-bg) !important;
    color: var(--input-text) !important;
    border-color: var(--border-card) !important;
}

.dropdown-menu {
    background-color: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-card) !important;
}

.dropdown-item {
    background-color: var(--card-bg) !important;
    color: var(--text-primary) !important;
}

    .dropdown-item:hover {
        background-color: var(--student-detail-input-bg) !important;
    }

.dropdown .form-control,
.dropdown input {
    background-color: var(--input-bg) !important;
    color: var(--input-text) !important;
}

.checkmark-animate {
    display: inline-block;
    animation: pop-check 0.5s cubic-bezier(.17,.67,.83,.67);
}

@keyframes pop-check {
    0% {
        transform: scale(0.2);
        opacity: 0;
    }

    60% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}