/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Premium Emerald/Green Palette */
    --primary-color: #0b421a;
    --primary-gradient: linear-gradient(135deg, #0f3e15 0%, #1b5e20 100%);
    --primary-hover: #115924;
    
    --secondary-color: #2e8b43;
    --secondary-gradient: linear-gradient(135deg, #2e8b43 0%, #46b863 100%);
    
    /* Neutral Colors */
    --bg-color: #f4f7f6;
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    
    /* Sidebar */
    --sidebar-bg: #072a10;
    --sidebar-text: #94a3b8;
    --sidebar-hover: rgba(255, 255, 255, 0.05);
    --sidebar-active-bg: rgba(76, 175, 80, 0.15);
    --sidebar-active-text: #ffffff;
    --sidebar-active-border: #4caf50;
    
    /* UI States */
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #0ea5e9;
    
    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(11, 66, 26, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(11, 66, 26, 0.04);
    
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-pill: 9999px;
    
    /* Typography */
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-standard: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all var(--transition-fast);
}
a:hover {
    color: var(--primary-hover);
}
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

/* Base Card */
.card {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
    transition: box-shadow var(--transition-standard), transform var(--transition-standard);
    overflow: hidden;
}
.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}
.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
}
.card-header.border-0 { border-bottom: 0; }
.card-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}
.card-body {
    padding: 1.5rem;
    flex: 1 1 auto;
}

/* Forms */
.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
    margin-bottom: 1.25rem;
}
.form-control {
    display: block;
    width: 100%;
    height: 3rem;
    padding: 0.5rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--text-primary);
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}
.input-group .form-control {
    flex: 1 1 auto;
    width: 1%;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 0;
}
.form-control:focus {
    background-color: var(--surface-color);
    border-color: var(--secondary-color);
    outline: 0;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);
}
.input-group-append {
    display: flex;
    margin-left: -1px;
}
.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    color: var(--text-secondary);
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-left: 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    transition: all var(--transition-fast);
}
.form-control:focus + .input-group-append .input-group-text {
    border-color: var(--secondary-color);
    background-color: var(--surface-color);
    color: var(--secondary-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 500;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.625rem 1.25rem;
    font-size: 0.95rem;
    line-height: 1.5;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
    gap: 0.5rem;
}
.btn-block { width: 100%; display: flex; }

.btn-primary {
    color: #fff;
    background: var(--primary-gradient);
    border: none;
    box-shadow: 0 4px 6px -1px rgba(11, 66, 26, 0.2);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #0e4c1f 0%, #14501a 100%);
    box-shadow: 0 6px 10px -1px rgba(11, 66, 26, 0.3);
    transform: translateY(-1px);
    color: #fff;
}
.btn-secondary {
    color: #fff;
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    border: none;
    box-shadow: 0 4px 6px -1px rgba(100, 116, 139, 0.2);
}
.btn-secondary:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    transform: translateY(-1px);
    color: #fff;
}
.btn-info {
    color: #fff;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    border: none;
    box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.2);
}
.btn-info:hover {
    transform: translateY(-1px);
    color: #fff;
}

/* Specialized Buttons */
.btn-export {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #10b981;
    font-weight: 600;
    transition: all var(--transition-fast);
}
.btn-export:hover {
    background: #10b981;
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    transform: translateY(-2px);
}
.btn-export i { color: inherit; }

/* Utilities */
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mr-2 { margin-right: 0.5rem !important; }
.text-center { text-align: center !important; }
.text-muted { color: var(--text-secondary) !important; }
.text-danger { color: var(--danger) !important; }

/* ========================================= */
/* LOGIN / REGISTER PAGES                    */
/* ========================================= */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f4f7f6 0%, #e0ece4 100%);
    position: relative;
    overflow: hidden;
}
/* Abstract Background */
.login-page::before, .login-page::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    z-index: 0;
    filter: blur(60px);
}
.login-page::before {
    top: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: rgba(46, 139, 67, 0.15);
}
.login-page::after {
    bottom: -100px;
    right: -100px;
    width: 500px;
    height: 500px;
    background: rgba(14, 165, 233, 0.1);
}
.login-box {
    width: 100%;
    max-width: 440px;
    padding: 2rem;
    z-index: 1;
}
.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}
.logo-img {
    display: block;
    margin: 0 auto 1rem auto;
    max-width: 140px;
    height: auto;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1));
    transition: transform 0.5s ease;
}
.logo-img:hover {
    transform: scale(1.05);
}
.login-logo b {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.75rem;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}
.login-logo small {
    display: block;
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.login-box .card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}
.login-box .card-body { padding: 2.5rem; }
.login-box-msg {
    margin: 0 0 1.5rem 0;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ========================================= */
/* DASHBOARD LAYOUT                          */
/* ========================================= */
.wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.main-header {
    margin-left: 260px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: margin-left var(--transition-standard);
    z-index: 1034;
    position: sticky;
    top: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.navbar-nav {
    display: flex;
    flex-direction: row;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
    align-items: center;
    gap: 0.5rem;
}
.ml-auto { margin-left: auto; }
.nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}
.nav-link:hover {
    color: var(--primary-color);
    background-color: #f1f5f9;
}
#sidebar-toggle { font-size: 1.25rem; }

/* Sidebar */
.main-sidebar {
    height: 100vh;
    width: 260px;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--sidebar-bg);
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path opacity="0.05" fill="%23ffffff" d="M0 0 L50 100 L100 0 Z"/></svg>');
    background-size: cover;
    background-position: bottom;
    color: var(--sidebar-text);
    transition: margin-left var(--transition-standard), width var(--transition-standard);
    z-index: 1038;
    overflow-y: auto;
    box-shadow: 4px 0 24px rgba(0,0,0,0.1);
}
.brand-link {
    display: flex;
    align-items: center;
    padding: 1.25rem 1rem;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2);
}
.brand-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-right: 0.75rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.brand-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.user-panel {
    display: flex;
    align-items: center;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.user-panel .image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.user-panel .info { padding-left: 0.8rem; }
.user-panel .info a {
    color: #fff;
    font-weight: 600;
    font-family: var(--font-heading);
}

.nav-sidebar { padding: 1rem 0.75rem; list-style: none; margin:0;}
.nav-sidebar .nav-item { margin-bottom: 0.75rem; } /* Tambah jarak antar menu */
.nav-sidebar .nav-link {
    color: var(--sidebar-text);
    border-radius: var(--radius-md);
    padding: 0.65rem 1rem;
    display: flex;
    align-items: center;
    font-weight: 500;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}
.nav-sidebar .nav-icon {
    font-size: 1.15rem;
    margin-right: 0.85rem;
    width: 24px;
    text-align: center;
    transition: color var(--transition-fast);
}
.nav-sidebar .nav-link:hover {
    background-color: var(--sidebar-hover);
    color: #fff;
    transform: translateX(3px);
}
.nav-sidebar .nav-link.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    border-left-color: var(--sidebar-active-border);
}
.nav-sidebar .nav-link.active .nav-icon { color: var(--sidebar-active-text); }

.content-wrapper {
    margin-left: 260px;
    padding: 1.5rem 1.5rem;
    flex: 1;
    transition: margin-left var(--transition-standard);
    min-height: calc(100vh - 60px);
}
.content-header { margin-bottom: 1.5rem; }
.content-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Small Boxes */
.small-box {
    border-radius: var(--radius-lg);
    display: block;
    margin-bottom: 1.5rem;
    position: relative;
    color: #fff;
    padding: 1.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-standard);
}
.small-box:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}
.small-box .inner { position: relative; z-index: 2; }
.small-box h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 0.25rem 0;
    color: #fff;
}
.small-box p {
    font-size: 1.05rem;
    font-weight: 500;
    opacity: 0.9;
    margin: 0;
}
.small-box .icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 80px;
    opacity: 0.15;
    transition: all var(--transition-standard);
    z-index: 1;
}
.small-box:hover .icon {
    transform: translateY(-50%) scale(1.15) rotate(5deg);
    opacity: 0.25;
}
.small-box-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(0,0,0,0.1);
    border-radius: var(--radius-pill);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
    z-index: 2;
    position: relative;
    width: fit-content;
}
.small-box-footer:hover {
    background: rgba(0,0,0,0.2);
    color: #fff;
}

.bg-info { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }
.bg-success { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.bg-warning { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.bg-danger { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }

/* Grid Layout */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
}
.col-12, .col-sm-6, .col-md-3, .col-md-4, .col-md-6, .col-md-8, .col-lg-3, .col-lg-4, .col-lg-6, .col-lg-8, .col-lg-12 {
    position: relative;
    width: 100%;
    padding-right: 10px;
    padding-left: 10px;
}

@media (min-width: 992px) {
    .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
    .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
    .col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 768px) {
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
}

@media (min-width: 576px) {
    .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
}

/* Sidebar Fix */
.nav-sidebar .nav-link {
    display: flex !important;
    align-items: center !important;
    flex-direction: row !important;
    gap: 15px !important; /* Jarak ikon & teks lebih lebar */
    padding: 12px 18px !important; /* Ruang klik lebih luas */
}
.nav-sidebar .nav-link p {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.6 !important; /* Sangat longgar */
    font-size: 0.95rem !important;
}
.nav-sidebar .nav-icon {
    margin-right: 0 !important;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    font-size: 1.2rem !important;
}

/* Mobile Specific Helper Classes */
@media (max-width: 576px) {
    .p-mobile-0 { padding: 0 !important; }
    .m-mobile-0 { margin: 0 !important; }
    .text-mobile-center { text-align: center !important; }
    .d-mobile-none { display: none !important; }
    .d-mobile-block { display: block !important; }
}

/* Callouts */
.callout {
    border-radius: var(--radius-md);
    background-color: #f8fafc;
    border-left: 4px solid var(--border-color);
    margin-bottom: 1.25rem;
    padding: 1.25rem;
    transition: all var(--transition-fast);
}
.callout:hover {
    background-color: #fff;
    box-shadow: var(--shadow-sm);
}
.callout h5 { margin: 0 0 0.5rem 0; font-size: 1.15rem; }
.callout p { margin: 0 0 0.5rem 0; color: var(--text-secondary); }
.callout-info { border-left-color: #3b82f6; }
.callout-warning { border-left-color: #f59e0b; }
.callout-danger { border-left-color: #ef4444; }
.callout-success { border-left-color: #10b981; }

/* Tables */
.table-responsive { overflow-x: auto; }
.table {
    width: 100%;
    margin-bottom: 0;
    color: var(--text-primary);
    border-collapse: separate;
    border-spacing: 0;
}
.table th, .table td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}
.table th {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    background-color: #f8fafc;
}
.table tbody tr { transition: background-color var(--transition-fast); }
.table tbody tr:hover { background-color: rgba(248, 250, 252, 0.8); }
.table tbody tr:last-child td { border-bottom: 0; }

/* List Group Fixes */
.list-group {
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}
.list-group-item {
    position: relative;
    display: block;
    padding: 1rem 1.25rem;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-left: 0;
    border-right: 0;
}
.list-group-flush .list-group-item {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
}
.list-group-flush:first-child .list-group-item:first-child { border-top: 0; }
.list-group-flush:last-child .list-group-item:last-child { border-bottom: 0; }

/* Badge Utilities */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}
.badge-success { background-color: #10b981; color: #fff; }

/* Footer Base Style */
.main-footer {
    background: #fff;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 1.25rem 1.5rem;
    margin-left: 260px;
    transition: margin-left var(--transition-standard);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}
.main-footer strong { color: var(--text-primary); }

/* Sidebar Toggle State & Mini Sidebar */
@media (min-width: 993px) {
    .sidebar-collapse .main-sidebar {
        width: 76px;
    }
    .sidebar-collapse .main-header,
    .sidebar-collapse .content-wrapper,
    .sidebar-collapse .main-footer {
        margin-left: 76px;
    }
    
    /* Smoothly hide text elements */
    .sidebar-collapse .brand-text,
    .sidebar-collapse .user-panel .info,
    .sidebar-collapse .nav-sidebar .nav-link p {
        display: none;
    }
    
    /* Center icons */
    .sidebar-collapse .brand-link {
        padding: 1.25rem 0.5rem;
        justify-content: center;
    }
    .sidebar-collapse .brand-image {
        margin-right: 0;
        margin-left: 0;
    }
    
    .sidebar-collapse .user-panel {
        justify-content: center;
        padding: 1.25rem 0.5rem;
    }
    
    .sidebar-collapse .nav-sidebar .nav-link {
        padding: 0.85rem;
        justify-content: center;
        border-radius: var(--radius-lg);
        margin-bottom: 0.5rem;
        width: 44px;
        height: 44px;
        margin-left: auto;
        margin-right: auto;
    }
    .sidebar-collapse .nav-sidebar .nav-icon {
        margin-right: 0;
        font-size: 1.25rem;
    }
}

/* Mobile Sidebar behavior */
@media (max-width: 992px) {
    .main-sidebar { margin-left: -260px; width: 260px; }
    .main-header, .content-wrapper, .main-footer { margin-left: 0 !important; }
    .sidebar-open .main-sidebar { margin-left: 0; box-shadow: 10px 0 30px rgba(0,0,0,0.5); }
    .content-wrapper { padding: 1rem 0.75rem; }
    
    /* Mobile Header & Footer adjustments */
    .main-header { padding: 0.5rem 0.75rem; min-height: 56px; }
    .content-header h1 { font-size: 1.35rem; letter-spacing: -0.3px; }
    .main-footer { 
        display: block; 
        text-align: center; 
        padding: 1.25rem 1rem; 
        font-size: 0.85rem; 
        line-height: 1.5;
    }
    .main-footer strong { display: block; margin-bottom: 5px; }
}

/* Extra Small Devices */
@media (max-width: 576px) {
    .card-body { padding: 1.25rem 1rem; }
    .small-box { padding: 1.25rem; margin-bottom: 1rem; }
    .small-box h3 { font-size: 1.8rem; }
    .small-box p { font-size: 0.9rem; }
    .profile-header-card { padding: 15px; }
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 1036; /* Below sidebar 1038, above header 1034 */
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
.sidebar-open .sidebar-overlay {
    display: block;
    opacity: 1;
}
@media (min-width: 993px) {
    .sidebar-overlay { display: none !important; }
}

/* Layout Utilities */
.d-none { display: none !important; }
@media (min-width: 576px) {
    .d-sm-inline-block { display: inline-block !important; }
}

/* Button variants */
.btn-secondary { background: linear-gradient(135deg, #64748b 0%, #475569 100%); color: white; border: none; }
.btn-secondary:hover { background: linear-gradient(135deg, #475569 0%, #334155 100%); }
.btn-info { background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%); color: white; border: none; }
.btn-info:hover { background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%); }
.mr-2 { margin-right: 0.5rem !important; }

/* --- Form Support & Input Group fixes --- */
.form-control {
    display: block;
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}
.form-control:focus {
    border-color: var(--secondary-color);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(46, 139, 67, 0.15);
}

.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}
.input-group > .form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    margin-bottom: 0;
}
.input-group-prepend { display: flex; margin-right: -1px; z-index: 4; }
.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}
.input-group > .form-control:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left-color: transparent;
}
.input-group > .form-control:not(:first-child):focus {
    border-left-color: var(--secondary-color);
}

/* ========================================= */
/* MODAL SYSTEM                              */
/* ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity var(--transition-standard);
}
.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}
.modal-content {
    background-color: var(--surface-color);
    margin: auto;
    padding: 2rem;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 550px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    position: relative;
    transform: scale(0.9);
    transition: transform var(--transition-standard);
}
.modal.show .modal-content {
    transform: scale(1);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.modal-title { margin: 0; font-size: 1.25rem; }
.close-modal {
    color: var(--text-secondary);
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color var(--transition-fast);
}
.close-modal:hover { color: var(--danger); }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* ========================================= */
/* GLOBAL SELECT2 CUSTOM STYLES              */
/* ========================================= */
.select2-container--default .select2-selection--single {
    height: 2.4rem !important;
    border-radius: 10px !important;
    border: 1px solid #cbd5e1 !important;
    display: flex !important;
    align-items: center !important;
    background: #f8fafc !important;
    padding: 0 1rem !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 0 !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
    line-height: 2.4rem !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 2.4rem !important;
    right: 10px !important;
    display: flex !important;
    align-items: center !important;
}
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--secondary-color) !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(46, 139, 67, 0.1) !important;
}
.select2-dropdown {
    border: 1px solid var(--secondary-color) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
}

/* ========================================= */
/* PREMIUM UI COMPONENTS                     */
/* ========================================= */

/* Page Header */
.page-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 1.5rem;
    background: #fff;
    padding: 1.5rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}
.page-title h1 { 
    margin: 0; 
    font-size: 1.6rem; 
    color: var(--primary-color); 
    font-weight: 700;
}
.page-title p { 
    margin: 5px 0 0; 
    color: var(--text-secondary); 
    font-size: 0.9rem; 
}

/* Advanced Table Card */
.table-card {
    border: none;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #fff;
}
.table-card .card-header {
    padding: 1.25rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
}

/* Search Input Styling */
.search-container { position: relative; width: 100%; max-width: 320px; }
.search-container i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    z-index: 2;
}
.search-container {
    position: relative;
    width: 100%;
}
.search-container i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    z-index: 10;
    pointer-events: none;
    font-size: 1.1rem;
}
.search-container .form-control {
    padding-left: 3.25rem !important;
    border-radius: 10px !important;
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    height: 2.4rem !important;
    font-size: 0.9rem !important;
    box-shadow: none !important;
}

/* Premium Guru Table */
.guru-table thead th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    padding: 1rem;
    border-top: none;
    border-bottom: 2px solid #f1f5f9;
}
.guru-table tbody td {
    padding: 1rem;
    vertical-align: middle;
    color: #334155;
    font-size: 0.88rem;
    border-bottom: 1px solid #f8fafc;
}

/* Status Badges */
.badge-status {
    padding: 0.4rem 0.8rem !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    font-size: 0.7rem !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    white-space: nowrap !important;
    text-transform: uppercase !important;
    letter-spacing: 0.02em !important;
}
.badge-status::before {
    content: '' !important;
    width: 5px !important;
    height: 5px !important;
    border-radius: 50% !important;
    background: currentColor !important;
    flex-shrink: 0 !important;
}
.status-aktif { background: #ecfdf5; color: #059669; }
.status-nonaktif { background: #fef2f2; color: #dc2626; }
.status-cuti { background: #fffbeb; color: #d97706; }

.btn-edit-guru, .btn-delete-guru {
    width: 36px !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    transition: all 0.2s !important;
    border: 1px solid transparent !important;
    text-decoration: none !important;
    padding: 0 !important;
    margin: 0 2px !important;
}
.btn-edit-guru { background: #eff6ff !important; color: #2563eb !important; border-color: #dbeafe !important; }
.btn-edit-guru:hover { background: #dbeafe !important; transform: translateY(-2px) !important; }
.btn-delete-guru { background: #fef2f2 !important; color: #dc2626 !important; border-color: #fee2e2 !important; }
.btn-delete-guru:hover { background: #fee2e2 !important; transform: translateY(-2px) !important; }

/* Premium Form Sections */
.form-section {
    background: #fff;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    border: 1px solid #f1f5f9;
}
.section-header {
    display: flex !important; /* Force flexbox */
    align-items: center !important;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f8fafc;
}
.section-icon {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
    background: var(--primary-gradient);
    color: #fff;
    border-radius: 10px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.section-icon.bg-blue { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.section-icon.bg-amber { background: linear-gradient(135deg, #f59e0b, #d97706); }

.section-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Form refinement */
.form-group label {
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
    display: block;
}
.form-control {
    border: 1px solid #cbd5e1 !important;
    background: #f8fafc !important;
    border-radius: 10px !important;
    padding: 0.45rem 0.9rem !important;
    height: auto !important;
    font-size: 0.9rem !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
}
.form-control:focus {
    border-color: var(--secondary-color) !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(46, 139, 67, 0.1) !important;
}
.helper-text { font-size: 0.8rem; color: #64748b; margin-top: 6px; }

@media (max-width: 576px) {
    .form-section { padding: 1.25rem; }
    .section-header { margin-bottom: 1.25rem; }
    .section-title { font-size: 1rem; }
}

/* Role Badges */
.badge-role {
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
}
.role-admin { background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe; }
.role-guru { background: #eff6ff; color: #2563eb; border: 1px solid #dbeafe; }
.role-walimurid { background: #fdf2f8; color: #db2777; border: 1px solid #fce7f3; }
.role-kepsek { background: #fff1f2; color: #e11d48; border: 1px solid #ffe4e6; }
.role-tu { background: #f0fdf4; color: #16a34a; border: 1px solid #dcfce7; }

/* Status Akun Badges (Specific for User Management) */
.status-user-pending { background: #fffbeb; color: #d97706; border: 1px solid #fef3c7; }
.status-user-active { background: #ecfdf5; color: #059669; border: 1px solid #d1fae5; }
.status-user-inactive { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }

/* Refined Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: #fff;
    border-top: 1px solid #f1f5f9;
}
.pagination-list { display: flex; list-style: none; padding: 0; margin: 0; gap: 6px; }
.pagination-link {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}
.pagination-link:hover { background: #f8fafc; border-color: #cbd5e1; color: var(--primary-color); }
.pagination-link.active { background: var(--primary-gradient); color: #fff; border-color: transparent; }


 
 /* Guru Table Refinement */
 .guru-info {
     display: flex;
     flex-direction: column;
 }
 .guru-name {
     font-weight: 700;
     color: #1e293b;
     font-size: 0.95rem;
     line-height: 1.3;
     margin-bottom: 2px;
 }
 .guru-gelar {
     font-weight: 500;
     color: #64748b;
     font-size: 0.85rem;
 }
 .guru-sub {
     font-size: 0.8rem;
     color: #64748b;
     display: flex;
     align-items: center;
 }
 .class-badge {
     padding: 3px 8px;
     background: #f1f5f9;
     color: #475569;
     border-radius: 6px;
     font-size: 0.75rem;
     font-weight: 600;
     white-space: nowrap;
     border: 1px solid #e2e8f0;
 }

 
 .guru-table tbody tr {
     transition: all 0.2s ease;
 }
 .guru-table tbody tr:hover {
     background-color: #f8fafc;
 }
 .guru-table tbody td {
     padding: 1.25rem 1rem !important;
     vertical-align: middle !important;
 }
