/* ==========================================================================
   MANG EDI — Tema Resmi: Soothing Blue, Ocean Cyan & Soft Gradient Glassmorphism
   Balai Besar Pengembangan Penjaminan Mutu Pendidikan Vokasi (BBPPMPV) Pertanian
   ========================================================================== */

:root {
    /* Soothing Blue Palette */
    --siedi-blue-darkest: #07192d;
    --siedi-blue-dark:    #0b2540;
    --siedi-blue-deep:    #0f355c;
    --siedi-blue-main:    #134e7c;
    --siedi-blue-light:   #1b6ca8;
    --siedi-blue-soft:    #f0f6fc;

    /* Ocean Cyan Palette */
    --siedi-cyan-dark:    #0e7490;
    --siedi-cyan-main:    #0891b2;
    --siedi-cyan-light:   #06b6d4;
    --siedi-cyan-bright:  #22d3ee;
    --siedi-cyan-soft:    #ecfeff;
    --siedi-cyan-border:  #bae6fd;
    --siedi-cyan-glow:    rgba(6, 182, 212, 0.35);

    /* Golden Emblem Accent (Selaras Logo MANG Edi) */
    --siedi-gold:         #f59e0b;
    --siedi-gold-light:   #fbbf24;
    --siedi-gold-soft:    #fef3c7;

    /* Glassmorphism Surface Specifications */
    --glass-bg:           rgba(255, 255, 255, 0.90);
    --glass-bg-subtle:    rgba(240, 249, 255, 0.75);
    --glass-bg-accent:    linear-gradient(135deg, rgba(236, 254, 255, 0.9) 0%, rgba(240, 249, 255, 0.8) 100%);
    --glass-border:       rgba(186, 230, 253, 0.72);
    --glass-border-light: rgba(224, 242, 254, 0.8);
    --glass-shadow:       0 10px 30px -5px rgba(11, 37, 64, 0.07), 0 4px 6px -2px rgba(8, 145, 178, 0.04);
    --glass-shadow-lg:    0 20px 40px -8px rgba(11, 37, 64, 0.12), 0 8px 12px -3px rgba(6, 182, 212, 0.06);
    --glass-blur:         blur(14px);
}

/* ==========================================================================
   Base & Ambient Body Canvas
   ========================================================================== */

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background-color: #f1f6fb;
    color: #1e293b;
    background-image: 
        radial-gradient(at 0% 0%, rgba(6, 182, 212, 0.08) 0px, transparent 45%),
        radial-gradient(at 100% 0%, rgba(19, 78, 124, 0.07) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(8, 145, 178, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Sidebar: Deep Soothing Blue with Glass Accents & Ocean Cyan Glow
   ========================================================================== */

.bg-gradient-siedi {
    background: linear-gradient(135deg, #07192d 0%, #0b2540 45%, #0891b2 100%) !important;
}

.sidebar.bg-gradient-siedi {
    background: linear-gradient(180deg, #07192d 0%, #0b2540 35%, #0f355c 75%, #08435d 100%) !important;
    border-right: 1px solid rgba(186, 230, 253, 0.12);
    box-shadow: 4px 0 24px rgba(7, 25, 45, 0.2);
}

.sidebar .sidebar-brand {
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.sidebar-heading {
    color: #7dd3fc !important;
    font-size: 0.68rem !important;
    letter-spacing: 0.9px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
}

.sidebar .nav-item .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 0.65rem 1rem;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.85rem;
}

.sidebar .nav-item .nav-link i {
    color: #38bdf8 !important;
    opacity: 0.9;
    transition: transform 0.2s ease, color 0.2s ease;
}

.sidebar .nav-item .nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    margin: 0 6px;
}

.sidebar .nav-item .nav-link:hover i {
    transform: scale(1.12);
    color: #67e8f9 !important;
}

.sidebar .nav-item.active .nav-link {
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.28) 0%, rgba(6, 182, 212, 0.06) 100%) !important;
    border-left: 4px solid #22d3ee !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: inset 0 0 16px rgba(6, 182, 212, 0.18);
    border-radius: 0 8px 8px 0;
    margin-right: 6px;
}

.sidebar .nav-item.active .nav-link i {
    color: #22d3ee !important;
    filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.55));
}

.sidebar .collapse-inner {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(186, 230, 253, 0.6) !important;
    box-shadow: 0 6px 18px rgba(7, 25, 45, 0.15) !important;
}

.sidebar .collapse-inner .collapse-item {
    font-size: 0.84rem !important;
    color: #3a3b45 !important;
    font-weight: 500 !important;
    padding: 0.42rem 0.75rem !important;
    margin: 0.12rem 0.35rem !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    line-height: 1.4 !important;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar .collapse-inner .collapse-item i {
    color: #4a5568 !important;
    width: 1.25rem;
    text-align: center;
    margin-right: 0.4rem;
    font-size: 0.85rem;
}

.sidebar .collapse-inner .collapse-item:hover {
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
    text-decoration: none !important;
}

.sidebar .collapse-inner .collapse-item:hover i {
    color: #1e293b !important;
}

.sidebar .collapse-inner .collapse-item.active {
    background-color: #e2e8f0 !important;
    color: #1e293b !important;
    font-weight: 600 !important;
}

.sidebar .collapse-inner .collapse-item.active i {
    color: #1e293b !important;
}

/* ==========================================================================
   Topbar & User Dropdown (High Stacking Priority — Mencegah Tertutup Card)
   ========================================================================== */

.topbar {
    position: relative !important;
    z-index: 1050 !important;
    background: rgba(255, 255, 255, 0.90) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(186, 230, 253, 0.65) !important;
    box-shadow: 0 4px 20px rgba(11, 37, 64, 0.04) !important;
}

.topbar .navbar-nav {
    position: relative;
    z-index: 1055 !important;
}

.topbar .nav-item.dropdown {
    position: relative !important;
    z-index: 1055 !important;
}

.topbar .dropdown-menu {
    position: absolute !important;
    z-index: 99999 !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(186, 230, 253, 0.85) !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 40px -5px rgba(11, 37, 64, 0.22), 0 8px 16px -4px rgba(8, 145, 178, 0.10) !important;
    margin-top: 0.65rem !important;
    min-width: 15rem !important;
    max-width: 92vw !important;
    right: 0 !important;
    left: auto !important;
    overflow: visible !important;
}

#content > .container-fluid {
    position: relative;
}

/* Pastikan Modal & Backdrop selalu berada pada urutan stacking tertinggi dan dapat diklik */
.modal-backdrop {
    z-index: 1040 !important;
}

.modal {
    z-index: 1055 !important;
}

.modal-dialog {
    z-index: 1060 !important;
    pointer-events: auto !important;
}

.modal-content {
    pointer-events: auto !important;
}

.topbar .dropdown-menu .dropdown-item {
    padding: 0.65rem 1.15rem;
    font-size: 0.86rem;
    font-weight: 500;
    transition: all 0.18s ease;
    display: flex;
    align-items: center;
}

.topbar .dropdown-menu .dropdown-item i {
    width: 1.4rem;
    text-align: center;
}

.topbar .dropdown-menu .dropdown-item:hover,
.topbar .dropdown-menu .dropdown-item:focus {
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.12) 0%, rgba(240, 249, 255, 0.7) 100%) !important;
    color: #0891b2 !important;
    padding-left: 1.35rem;
}

.topbar .dropdown-menu .dropdown-item.text-danger:hover {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.12) 0%, rgba(254, 242, 242, 0.7) 100%) !important;
    color: #dc2626 !important;
    padding-left: 1.35rem;
}

.topbar .dropdown-divider {
    border-top: 1px solid rgba(186, 230, 253, 0.5) !important;
    margin: 0.35rem 0;
}

/* ==========================================================================
   Cards & Soft Gradient Glassmorphism
   ========================================================================== */

.card {
    background: var(--glass-bg) !important;
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 14px !important;
    box-shadow: var(--glass-shadow) !important;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease !important;
}

.card:hover {
    box-shadow: var(--glass-shadow-lg) !important;
}

.card-header {
    background: linear-gradient(135deg, rgba(240, 249, 255, 0.96) 0%, rgba(224, 242, 254, 0.88) 100%) !important;
    border-bottom: 1px solid rgba(186, 230, 253, 0.75) !important;
    color: var(--siedi-blue-dark) !important;
    font-weight: 700 !important;
    border-top-left-radius: 14px !important;
    border-top-right-radius: 14px !important;
}

.card-header i {
    color: var(--siedi-cyan-main) !important;
}

/* Modal Glassmorphism */
.modal-content {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    border: 1px solid rgba(186, 230, 253, 0.85) !important;
    border-radius: 16px !important;
    box-shadow: 0 24px 48px -12px rgba(11, 37, 64, 0.25) !important;
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #07192d 0%, #0b2540 45%, #0891b2 100%) !important;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(186, 230, 253, 0.35) !important;
}

.modal-header .close {
    color: #ffffff !important;
    opacity: 0.9;
    text-shadow: none;
}
.modal-header .close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* ==========================================================================
   Buttons (Soothing Blue & Ocean Cyan Overhauls)
   Transforming Legacy Green Buttons into Soothing Ocean Aesthetics
   ========================================================================== */

.btn-siedi,
.btn-success {
    background: linear-gradient(135deg, #0b2540 0%, #0f4c81 40%, #0891b2 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(8, 145, 178, 0.28) !important;
    border-radius: 8px !important;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-siedi:hover, .btn-siedi:focus,
.btn-success:hover, .btn-success:focus {
    background: linear-gradient(135deg, #07192d 0%, #0b3d68 40%, #06b6d4 100%) !important;
    color: #ffffff !important;
    transform: translateY(-1.5px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.42) !important;
}

.btn-outline-siedi,
.btn-outline-success {
    color: #0891b2 !important;
    border: 1.5px solid #0891b2 !important;
    background: rgba(236, 254, 255, 0.7) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    font-weight: 600;
    border-radius: 8px !important;
    transition: all 0.2s ease;
}

.btn-outline-siedi:hover,
.btn-outline-success:hover {
    background: linear-gradient(135deg, #0b2540 0%, #0891b2 100%) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    transform: translateY(-1.5px);
    box-shadow: 0 4px 14px rgba(8, 145, 178, 0.3) !important;
}

.btn-primary {
    background: linear-gradient(135deg, #0f4c81 0%, #1e40af 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(15, 76, 129, 0.25) !important;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #0b355c 0%, #1d4ed8 100%) !important;
    transform: translateY(-1.5px);
    box-shadow: 0 6px 18px rgba(15, 76, 129, 0.35) !important;
}

.btn-info {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.28) !important;
}
.btn-info:hover {
    background: linear-gradient(135deg, #0e7490 0%, #22d3ee 100%) !important;
    color: #ffffff !important;
    transform: translateY(-1.5px);
    box-shadow: 0 6px 18px rgba(6, 182, 212, 0.4) !important;
}

.text-siedi,
.text-success {
    color: #0891b2 !important;
}

.bg-siedi,
.bg-success {
    background: linear-gradient(135deg, #0b2540 0%, #0f4c81 40%, #0891b2 100%) !important;
    color: #ffffff !important;
}

.border-left-siedi,
.border-left-success {
    border-left: 0.28rem solid #0891b2 !important;
}

.border-left-cyan {
    border-left: 0.28rem solid #06b6d4 !important;
}

.border-left-gold {
    border-left: 0.28rem solid var(--siedi-gold) !important;
}

.border-left-primary {
    border-left: 0.28rem solid #0f4c81 !important;
}

.border-siedi,
.border-success {
    border-color: #7dd3fc !important;
}

/* ==========================================================================
   Badges & Indicators
   ========================================================================== */

.badge-siedi,
.badge-success {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%) !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(8, 145, 178, 0.25);
    padding: 0.35em 0.65em;
    border-radius: 6px;
}

.badge-info {
    background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%) !important;
    color: #ffffff !important;
    font-weight: 600;
    border-radius: 6px;
}

.badge-cyan {
    background: linear-gradient(135deg, #0891b2 0%, #22d3ee 100%) !important;
    color: #ffffff !important;
    font-weight: 600;
    border-radius: 6px;
}

.badge-primary {
    background: linear-gradient(135deg, #0f4c81 0%, #1e40af 100%) !important;
    border-radius: 6px;
}

/* ==========================================================================
   Tables & DataTables (Ocean Cyan & Soothing Blue Headers)
   ========================================================================== */

.table thead th {
    background: linear-gradient(180deg, #e0f2fe 0%, #ecfeff 100%) !important;
    color: #0c4a6e !important;
    border-bottom: 2px solid #7dd3fc !important;
    font-size: 0.83rem;
    font-weight: 700;
    vertical-align: middle;
    letter-spacing: 0.2px;
}

.table tbody tr:hover {
    background-color: #f0f9ff !important;
}

.table-bordered th, .table-bordered td {
    border-color: #e2e8f0;
}

/* Custom Ocean Cyan Scrollbar */
.table-responsive::-webkit-scrollbar,
.dataTables_scrollBody::-webkit-scrollbar,
.dataTables_wrapper .row:nth-child(2) > .col-sm-12::-webkit-scrollbar,
::-webkit-scrollbar {
    height: 7px;
    width: 7px;
}
.table-responsive::-webkit-scrollbar-track,
.dataTables_scrollBody::-webkit-scrollbar-track,
.dataTables_wrapper .row:nth-child(2) > .col-sm-12::-webkit-scrollbar-track,
::-webkit-scrollbar-track {
    background: #ecfeff;
    border-radius: 4px;
}
.table-responsive::-webkit-scrollbar-thumb,
.dataTables_scrollBody::-webkit-scrollbar-thumb,
.dataTables_wrapper .row:nth-child(2) > .col-sm-12::-webkit-scrollbar-thumb,
::-webkit-scrollbar-thumb {
    background: #38bdf8;
    border-radius: 4px;
    border: 1.5px solid #ecfeff;
}
.table-responsive::-webkit-scrollbar-thumb:hover,
.dataTables_scrollBody::-webkit-scrollbar-thumb:hover,
.dataTables_wrapper .row:nth-child(2) > .col-sm-12::-webkit-scrollbar-thumb:hover,
::-webkit-scrollbar-thumb:hover {
    background: #0284c7;
}

/* ==========================================================================
   Inputs, Forms & Focus Effects
   ========================================================================== */

.form-control:focus,
.custom-select:focus {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 0.2rem rgba(6, 182, 212, 0.22) !important;
}

/* ==========================================================================
   Responsiveness & Container Bounds
   ========================================================================== */

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

#wrapper {
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
}

#content-wrapper {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

#content {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    flex: 1 0 auto;
}

.container-fluid {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .container-fluid {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

.table-action-btns {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 3px;
    align-items: center;
    justify-content: center;
    white-space: nowrap !important;
}

.btn-xs {
    padding: 0.22rem 0.45rem;
    font-size: 0.75rem;
    line-height: 1.35;
    border-radius: 0.25rem;
    white-space: nowrap;
}

.kpi-card {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}
.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(8, 145, 178, 0.16) !important;
}

/* Select2 Styling Enhancement */
.select2-container {
    width: 100% !important;
}
.select2-container--bootstrap4 .select2-selection--single {
    height: calc(1.8125rem + 4px) !important;
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
    border-color: #d1d5db !important;
    border-radius: 0.35rem !important;
    padding-top: 2px !important;
}
.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
    line-height: calc(1.8125rem) !important;
    padding-left: 0.4rem !important;
    color: #1f2937 !important;
    font-size: 0.82rem !important;
}
.select2-container--bootstrap4 .select2-selection--single .select2-selection__placeholder {
    color: #6b7280 !important;
}
.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
    top: 50% !important;
    transform: translateY(-50%) !important;
    right: 6px !important;
}
.select2-dropdown {
    border: 1px solid #0891b2 !important;
    border-radius: 0.35rem !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    z-index: 99999 !important;
    font-size: 0.84rem !important;
}
.select2-container--bootstrap4 .select2-results__option--highlighted[aria-selected] {
    background-color: #0891b2 !important;
    color: #fff !important;
}
.select2-results__option {
    padding: 6px 10px !important;
}

