/* ========================================
   E-FORMASI MASTER THEME
   Indonesian Government Color Scheme
   Based on PANRB Garuda Pancasila Logo
   ======================================== */

:root {
    /* Primary Colors - Navy */
    --ef-primary: #001F3F;           /* Navy - Primary Brand */
    --ef-primary-dark: #000F1F;      /* Navy Dark - Hover states */
    --ef-primary-light: #003D7A;     /* Navy Light - Backgrounds */
    
    /* Secondary Colors - Scarlet */
    --ef-secondary: #DC143C;         /* Scarlet - Secondary Brand */
    --ef-secondary-dark: #8B0A1A;    /* Scarlet Dark - Hover states */
    --ef-secondary-light: #FF6B6B;   /* Scarlet Light - Backgrounds */
    
    /* Tertiary Colors - Black */
    --ef-tertiary: #000000;          /* Black - Tertiary */
    --ef-tertiary-dark: #1A1A1A;     /* Black Dark */
    --ef-tertiary-light: #333333;    /* Black Light */
    
    /* Accent Colors - Gold */
    --ef-accent: #F4C430;            /* Gold - Accent highlights */
    --ef-accent-dark: #D4AF37;       /* Gold Dark */
    --ef-accent-light: #FFE066;      /* Gold Light */
    
    /* Neutral Colors */
    --ef-dark: #000000;              /* Black - Text */
    --ef-light: #F5F5F5;             /* Almost White - Backgrounds */
    --ef-border: #CCCCCC;            /* Light Gray - Borders */
    
    /* Status Colors */
    --ef-success: #28A745;           /* Green - Success */
    --ef-danger: #DC143C;            /* Scarlet - Danger */
    --ef-warning: #F4C430;           /* Gold - Warning */
    --ef-info: #17A2B8;              /* Cyan - Info */
    
    /* Gradients */
    --ef-gradient-primary: linear-gradient(135deg, #001F3F 0%, #000F1F 100%);
    --ef-gradient-secondary: linear-gradient(135deg, #DC143C 0%, #8B0A1A 100%);
    --ef-gradient-tertiary: linear-gradient(135deg, #000000 0%, #1A1A1A 100%);
    --ef-gradient-accent: linear-gradient(135deg, #F4C430 0%, #D4AF37 100%);
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
html, body {
    color: var(--ef-dark);
    background-color: var(--ef-light);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--ef-dark);
    font-weight: 600;
}

a {
    color: var(--ef-secondary);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--ef-secondary-dark);
    text-decoration: underline;
}

/* ========================================
   BUTTONS
   ======================================== */

/* Primary Button - Navy */
.btn-primary, .btn.btn-primary {
    background: var(--ef-gradient-primary);
    border-color: var(--ef-primary-dark);
    color: var(--ef-secondary-light);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover, .btn.btn-primary:hover,
.btn-primary:active, .btn.btn-primary:active,
.btn-primary:focus, .btn.btn-primary:focus {
    background: var(--ef-primary-dark);
    border-color: var(--ef-primary);
    color: var(--ef-secondary-light);
    box-shadow: 0 4px 12px rgba(0, 31, 63, 0.3);
}

/* Secondary Button - Scarlet */
.btn-secondary, .btn.btn-secondary {
    background: var(--ef-gradient-secondary);
    border-color: var(--ef-secondary-dark);
    color: white;
    font-weight: 600;
}

.btn-secondary:hover, .btn.btn-secondary:hover,
.btn-secondary:active, .btn.btn-secondary:active,
.btn-secondary:focus, .btn.btn-secondary:focus {
    background: var(--ef-secondary-dark);
    border-color: var(--ef-secondary);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.3);
}

/* Success Button - Green */
.btn-success, .btn.btn-success {
    background: var(--ef-accent);
    border-color: var(--ef-accent-dark);
    color: white;
    font-weight: 600;
}

.btn-success:hover, .btn.btn-success:hover {
    background: var(--ef-accent-dark);
    border-color: var(--ef-dark);
    box-shadow: 0 4px 12px rgba(27, 94, 32, 0.3);
}

/* Danger Button */
.btn-danger, .btn.btn-danger {
    background: var(--ef-danger);
    border-color: #990000;
}

/* Warning Button */
.btn-warning, .btn.btn-warning {
    background: var(--ef-warning);
    border-color: var(--ef-primary-dark);
    color: var(--ef-dark);
}

/* Info Button */
.btn-info, .btn.btn-info {
    background: var(--ef-info);
    border-color: #004d73;
    color: white;
}

/* Outline Buttons */
.btn-outline-primary {
    color: var(--ef-primary);
    border-color: var(--ef-primary);
}

.btn-outline-primary:hover {
    background: var(--ef-primary);
    border-color: var(--ef-primary-dark);
    color: var(--ef-dark);
}

.btn-outline-secondary {
    color: var(--ef-secondary);
    border-color: var(--ef-secondary);
}

.btn-outline-secondary:hover {
    background: var(--ef-secondary);
    border-color: var(--ef-secondary-dark);
    color: white;
}

.btn-outline-success {
    color: var(--ef-accent);
    border-color: var(--ef-accent);
}

.btn-outline-success:hover {
    background: var(--ef-accent);
    border-color: var(--ef-accent-dark);
    color: white;
}

/* ========================================
   NAVIGATION & HEADER
   ======================================== */

/* ========================================
   NAVBAR - MODERN PROFESSIONAL DESIGN
   ======================================== */

/* Main Navbar Container */
.main-header.navbar, .navbar, .navbar-dark {
    background: linear-gradient(135deg, var(--ef-primary) 0%, var(--ef-primary-dark) 100%);
    border-bottom: 3px solid var(--ef-accent);
    box-shadow: 0 6px 24px rgba(0, 15, 31, 0.35);
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(4px);
}

/* Container-fluid inside navbar */
.main-header.navbar .container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    height: 70px;
    width: 100%;
}

/* Left content (brand, toggle, instansi) */
.navbar-left-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Toggle button */
.nav-toggle-btn {
    background: rgba(244, 196, 48, 0.1) !important;
    border: 1px solid rgba(244, 196, 48, 0.3) !important;
    border-radius: 8px !important;
    padding: 0.5rem 0.75rem !important;
    color: var(--ef-accent) !important;
    transition: all 0.3s ease !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    min-width: 40px;
    min-height: 40px;
}

.nav-toggle-btn:hover {
    background: var(--ef-accent) !important;
    color: var(--ef-primary) !important;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(244, 196, 48, 0.3);
}

.nav-toggle-btn:active {
    transform: scale(0.95);
}

/* Instansi Info Display */
.navbar-instansi-info {
    display: flex;
    align-items: center;
    height: 40px;
    padding: 0 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-left: 2px solid rgba(244, 196, 48, 0.3);
    border-radius: 0 6px 6px 0;
}

.instansi-name {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

/* Right content (user menu) */
.navbar-right-content {
    display: flex;
    align-items: center;
    margin-left: auto;
}

/* Navbar nav links */
.navbar-dark .nav-link, .navbar .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem 0.75rem !important;
    border-radius: 6px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.navbar-dark .nav-link:hover, .navbar .nav-link:hover {
    color: var(--ef-accent) !important;
    background: rgba(244, 196, 48, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 196, 48, 0.25);
}

/* User dropdown link */
.nav-user-link {
    display: flex !important;
    align-items: center;
    gap: 0.5rem !important;
    padding: 0.5rem 1rem !important;
}

.nav-user-icon {
    font-size: 1.3rem;
    color: var(--ef-accent);
}

.user-name {
    font-size: 0.95rem;
    font-weight: 600;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Navbar brand styling */
.navbar-dark .navbar-brand {
    color: var(--ef-accent) !important;
    font-weight: 700;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    margin-right: auto;
}

.navbar-dark .navbar-brand:hover {
    text-shadow: 0 0 20px rgba(244, 196, 48, 0.4);
    transform: scale(1.02);
}

/* Dropdown menu in navbar */
.navbar-dropdown-menu {
    background: var(--ef-primary-dark);
    border: 1px solid rgba(244, 196, 48, 0.2);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 15, 31, 0.4);
    margin-top: 0.5rem;
    min-width: 220px;
    animation: slideDown 0.3s ease;
}

.navbar-dropdown-menu .dropdown-header {
    color: var(--ef-accent);
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(244, 196, 48, 0.1);
}

.navbar-dropdown-menu .dropdown-divider {
    border-color: rgba(244, 196, 48, 0.1);
    margin: 0.25rem 0;
}

.navbar-dropdown-menu .dropdown-item {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.navbar-dropdown-menu .dropdown-item:hover {
    background: rgba(244, 196, 48, 0.15);
    color: var(--ef-accent);
    padding-left: 1.25rem;
}

.navbar-dropdown-menu .dropdown-item.text-danger {
    color: var(--ef-secondary) !important;
}

.navbar-dropdown-menu .dropdown-item.text-danger:hover {
    background: rgba(220, 20, 60, 0.15);
    color: var(--ef-secondary-light) !important;
}

/* Animation for dropdown */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar toggler for mobile */
.navbar-toggler {
    border: none;
    padding: 0;
    font-size: 1.5rem;
    color: var(--ef-accent) !important;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: 2px solid var(--ef-accent);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .main-header.navbar {
        min-height: 60px;
        padding: 0.75rem 1rem;
    }
    
    .navbar-left-content {
        gap: 0.75rem;
    }
    
    .navbar-instansi-info {
        display: none;
    }
    
    .user-name {
        max-width: 100px;
    }
}

@media (max-width: 576px) {
    .main-header.navbar {
        min-height: 55px;
    }
    
    .navbar-right-content {
        margin-left: 0.5rem;
    }
    
    .user-name {
        display: none;
    }
    
    .navbar-dropdown-menu {
        min-width: 180px;
    }
}

/* ========================================
   NAVBAR POLISH & ENHANCEMENTS
   ======================================== */

/* Navbar link focus states for accessibility */
.navbar .nav-link:focus,
.navbar-dark .nav-link:focus {
    outline: 2px solid var(--ef-accent);
    outline-offset: 2px;
}

/* Enhanced icon styling in navbar */
.navbar i[class*="fas"], 
.navbar i[class*="fa-"] {
    transition: transform 0.3s ease, color 0.3s ease;
}

.navbar .nav-link:hover i[class*="fas"],
.navbar .nav-link:hover i[class*="fa-"] {
    transform: scale(1.1);
}

/* Dropdown item icons */
.navbar-dropdown-menu .dropdown-item i {
    min-width: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Smooth separator line between navbar sections */
.navbar-left-content::after {
    content: '';
    display: none;
}

/* Loading state for navbar items */
.navbar .nav-link.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Navbar brand link with smooth interaction */
.navbar-brand {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Instansi info responsive text */
.instansi-name {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-5px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* User menu animation enhancements */
.nav-user-link.active,
.nav-user-link[aria-expanded="true"] {
    background: rgba(244, 196, 48, 0.15) !important;
    box-shadow: 0 0 12px rgba(244, 196, 48, 0.25);
}

/* ========================================
   SIDEBAR — COMPLETE REDESIGN
   States: expanded · collapsed (mini) · hover-expand
   Compatible with AdminLTE 3.2 sidebar-mini
   ======================================== */

/* ===== 1. MAIN SIDEBAR CONTAINER ===== */
.main-sidebar {
    background: linear-gradient(180deg, var(--ef-primary) 0%, var(--ef-primary-dark) 100%) !important;
    border-right: none !important;
    box-shadow: 3px 0 20px rgba(0, 0, 0, 0.35) !important;
    transition: width 0.3s ease !important;
}

/* ===== 2. BRAND / LOGO AREA ===== */
.main-sidebar .brand-link {
    background: linear-gradient(135deg, var(--ef-secondary) 0%, var(--ef-secondary-dark) 100%) !important;
    border-bottom: 3px solid var(--ef-accent) !important;
    height: 70px !important;
    min-height: 70px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 0 1rem !important;
    gap: 0.75rem !important;
    overflow: hidden;
    transition: background 0.3s ease !important;
}

.main-sidebar .brand-link:hover {
    background: linear-gradient(135deg, var(--ef-secondary-dark) 0%, var(--ef-secondary) 100%) !important;
}

.main-sidebar .brand-image {
    height: 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    flex-shrink: 0 !important;
    object-fit: contain !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)) !important;
    transition: all 0.3s ease !important;
}

.main-sidebar .brand-text {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: white !important;
    letter-spacing: 0.5px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    flex: 1 !important;
    min-width: 0 !important;
    transition: opacity 0.2s ease !important;
}

/* ===== 3. SIDEBAR SCROLL AREA ===== */
.main-sidebar .sidebar {
    height: calc(100% - 70px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 2rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(244, 196, 48, 0.25) transparent;
}

.main-sidebar .sidebar::-webkit-scrollbar { width: 3px; }
.main-sidebar .sidebar::-webkit-scrollbar-track { background: transparent; }
.main-sidebar .sidebar::-webkit-scrollbar-thumb {
    background: rgba(244, 196, 48, 0.25);
    border-radius: 2px;
}

/* ===== 4. SECTION HEADERS (nav-header) ===== */
.nav-sidebar .nav-header {
    color: rgba(244, 196, 48, 0.65) !important;
    font-size: 0.625rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    padding: 1.25rem 1.1rem 0.35rem !important;
    margin: 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    white-space: nowrap;
    overflow: hidden;
    line-height: 1.3 !important;
}

/* ===== 5. NAV ITEM CONTAINER ===== */
.nav-sidebar .nav-item {
    margin: 0;
    position: relative;
}

/* ===== 6. NAV LINK — BASE ===== */
.nav-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.78) !important;
    background: transparent !important;
    border-left: 3px solid transparent;
    border-radius: 0 8px 8px 0;
    padding: 0 1rem 0 1.1rem !important;
    margin: 1px 0 !important;
    display: flex !important;
    align-items: center !important;
    min-height: 42px !important;
    height: auto !important;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease !important;
    overflow: hidden;
    position: relative;
}

/* ===== 7. NAV ICON ===== */
.nav-sidebar .nav-link .nav-icon {
    width: 1.65rem !important;
    min-width: 1.65rem !important;
    text-align: center !important;
    font-size: 0.9rem !important;
    color: rgba(244, 196, 48, 0.65) !important;
    flex-shrink: 0 !important;
    margin-right: 0.65rem !important;
    margin-left: 0 !important;
    transition: color 0.2s ease, transform 0.2s ease !important;
    line-height: 1 !important;
}

/* ===== 8. NAV LABEL TEXT ===== */
.nav-sidebar .nav-link > p {
    flex: 1 !important;
    font-size: 0.84rem !important;
    font-weight: 400 !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    min-width: 0;
}

/* ===== 9. CARET / ANGLE (TREEVIEW TOGGLE) ===== */
.nav-sidebar .nav-link > p > .right,
.nav-sidebar .nav-link > .right {
    position: static !important;
    right: auto !important;
    top: auto !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
    font-size: 0.7rem !important;
    opacity: 0.5;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease !important;
}

.nav-sidebar .menu-open > .nav-link > p > .right,
.nav-sidebar .menu-open > .nav-link > .right {
    transform: rotate(-90deg) !important;
    opacity: 1;
}

/* ===== 10. HOVER — EXPANDED ===== */
.nav-sidebar .nav-link:hover {
    background: rgba(220, 20, 60, 0.2) !important;
    color: #ffffff !important;
    border-left-color: var(--ef-accent) !important;
}

.nav-sidebar .nav-link:hover .nav-icon {
    color: var(--ef-accent) !important;
    transform: translateX(2px) !important;
}

.nav-sidebar .nav-link:hover > p > .right,
.nav-sidebar .nav-link:hover > .right {
    opacity: 1;
}

/* ===== 11. ACTIVE STATE ===== */
.nav-sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(220, 20, 60, 0.5) 0%, rgba(220, 20, 60, 0.2) 100%) !important;
    color: #ffffff !important;
    border-left: 3px solid var(--ef-accent) !important;
    font-weight: 600 !important;
}

.nav-sidebar .nav-link.active::before {
    display: none !important;
    content: none !important;
}

.nav-sidebar .nav-link.active .nav-icon {
    color: var(--ef-accent) !important;
}

/* ===== 12. TREEVIEW SUBMENU ===== */
.nav-sidebar .nav-treeview {
    background: rgba(0, 0, 0, 0.15);
    border-left: 2px solid rgba(244, 196, 48, 0.15);
    margin-left: 2.3rem;
    padding: 0.15rem 0;
}

.nav-sidebar .nav-treeview .nav-item {
    margin: 0;
}

.nav-sidebar .nav-treeview .nav-link {
    padding: 0 0.85rem 0 0.9rem !important;
    min-height: 36px !important;
    font-size: 0.81rem !important;
    color: rgba(255, 255, 255, 0.62) !important;
    border-left: none !important;
    border-radius: 0 6px 6px 0;
    margin: 0 !important;
}

.nav-sidebar .nav-treeview .nav-link .nav-icon {
    font-size: 0.68rem !important;
    width: 1.3rem !important;
    min-width: 1.3rem !important;
}

.nav-sidebar .nav-treeview .nav-link:hover {
    background: rgba(220, 20, 60, 0.2) !important;
    color: #ffffff !important;
    border-left: none !important;
}

.nav-sidebar .nav-treeview .nav-link.active {
    background: rgba(220, 20, 60, 0.38) !important;
    color: #ffffff !important;
    border-left: 2px solid var(--ef-accent) !important;
    border-radius: 0 6px 6px 0;
}

/* Level 3+ nesting */
.nav-sidebar .nav-treeview .nav-treeview {
    margin-left: 1rem;
}

/* ========================================
   COLLAPSED STATE
   Body: sidebar-mini sidebar-collapse
   Sidebar width: 4.6rem (AdminLTE default)
   ======================================== */

/* Allow flyout to overflow sidebar bounds */
.sidebar-mini.sidebar-collapse .main-sidebar {
    overflow: visible !important;
}

/* Brand: icon-only, centered */
.sidebar-mini.sidebar-collapse .main-sidebar .brand-link {
    padding: 0 !important;
    justify-content: center !important;
    gap: 0 !important;
    overflow: hidden;
}

.sidebar-mini.sidebar-collapse .main-sidebar .brand-image {
    height: 36px !important;
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
}

.sidebar-mini.sidebar-collapse .main-sidebar .brand-text {
    display: none !important;
}

/* Nav headers: collapse to thin divider lines */
.sidebar-mini.sidebar-collapse .main-sidebar .nav-header {
    font-size: 0 !important;
    color: transparent !important;
    padding: 0.55rem 0.5rem 0 !important;
    margin: 0.25rem 0 0 !important;
    border-top: none !important;
    overflow: hidden !important;
    line-height: 0 !important;
}

.sidebar-mini.sidebar-collapse .main-sidebar .nav-header i {
    display: none !important;
}

.sidebar-mini.sidebar-collapse .main-sidebar .nav-header::after {
    content: '';
    display: block;
    height: 1px;
    width: 55%;
    margin: 0 auto 0.3rem;
    background: rgba(244, 196, 48, 0.2);
    border-radius: 1px;
}

/* Nav links: icon centered, no text */
.sidebar-mini.sidebar-collapse .main-sidebar .nav-link {
    justify-content: center !important;
    padding: 0 !important;
    margin: 2px 0.35rem !important;
    border-left: none !important;
    border-radius: 8px !important;
    min-height: 42px !important;
    overflow: visible !important;
    position: relative !important;
}

.sidebar-mini.sidebar-collapse .main-sidebar .nav-link .nav-icon {
    margin: 0 !important;
    font-size: 1.05rem !important;
    width: auto !important;
    min-width: auto !important;
}

/* Hide text labels */
.sidebar-mini.sidebar-collapse .main-sidebar .nav-link > p {
    display: none !important;
}

/* Active in collapsed: filled background, no left border */
.sidebar-mini.sidebar-collapse .main-sidebar .nav-link.active {
    background: rgba(220, 20, 60, 0.55) !important;
    border-left: none !important;
    border-radius: 8px !important;
}

/* Hover in collapsed: subtle red tint */
.sidebar-mini.sidebar-collapse .main-sidebar .nav-link:hover {
    background: rgba(220, 20, 60, 0.3) !important;
    border-left: none !important;
}

.sidebar-mini.sidebar-collapse .main-sidebar .nav-link:hover .nav-icon {
    transform: scale(1.2) !important;
    color: var(--ef-accent) !important;
}

/* Hide submenus in collapsed */
.sidebar-mini.sidebar-collapse .main-sidebar .nav-treeview {
    display: none !important;
}

/* ========================================
   HOVER-EXPAND (AdminLTE Mini Sidebar)
   Desktop ≥992px: hovering collapsed sidebar
   temporarily expands it (flyout overlay)
   ======================================== */
@media (min-width: 992px) {
    /* Expand width on hover / sidebar-focused */
    .sidebar-mini.sidebar-collapse .main-sidebar:hover,
    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused {
        width: 260px !important;
        overflow: hidden !important;
    }

    /* Brand: restore full expanded layout */
    .sidebar-mini.sidebar-collapse .main-sidebar:hover .brand-link,
    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .brand-link {
        padding: 0 1rem !important;
        justify-content: flex-start !important;
        gap: 0.75rem !important;
        overflow: hidden;
    }

    .sidebar-mini.sidebar-collapse .main-sidebar:hover .brand-image,
    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .brand-image {
        height: 40px !important;
        width: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
    }

    .sidebar-mini.sidebar-collapse .main-sidebar:hover .brand-text,
    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .brand-text {
        display: block !important;
    }

    /* Nav headers: restore full labels */
    .sidebar-mini.sidebar-collapse .main-sidebar:hover .nav-header,
    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .nav-header {
        font-size: 0.625rem !important;
        color: rgba(244, 196, 48, 0.65) !important;
        padding: 1.25rem 1.1rem 0.35rem !important;
        margin: 0 !important;
        border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
        overflow: hidden !important;
        line-height: 1.3 !important;
    }

    .sidebar-mini.sidebar-collapse .main-sidebar:hover .nav-header i,
    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .nav-header i {
        display: inline-block !important;
    }

    .sidebar-mini.sidebar-collapse .main-sidebar:hover .nav-header::after,
    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .nav-header::after {
        display: none;
    }

    /* Nav links: restore full layout */
    .sidebar-mini.sidebar-collapse .main-sidebar:hover .nav-link,
    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .nav-link {
        justify-content: flex-start !important;
        padding: 0 1rem 0 1.1rem !important;
        margin: 1px 0 !important;
        border-radius: 0 8px 8px 0 !important;
        overflow: hidden !important;
    }

    .sidebar-mini.sidebar-collapse .main-sidebar:hover .nav-link .nav-icon,
    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .nav-link .nav-icon {
        margin-right: 0.65rem !important;
        font-size: 0.9rem !important;
        width: 1.65rem !important;
        min-width: 1.65rem !important;
    }

    /* Show text labels */
    .sidebar-mini.sidebar-collapse .main-sidebar:hover .nav-link > p,
    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .nav-link > p {
        display: flex !important;
    }

    /* Show open submenus */
    .sidebar-mini.sidebar-collapse .main-sidebar:hover .menu-open > .nav-treeview,
    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .menu-open > .nav-treeview {
        display: block !important;
    }

    /* Restore active state left border */
    .sidebar-mini.sidebar-collapse .main-sidebar:hover .nav-link.active,
    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .nav-link.active {
        border-left: 3px solid var(--ef-accent) !important;
        border-radius: 0 8px 8px 0 !important;
    }

    /* Restore hover left border */
    .sidebar-mini.sidebar-collapse .main-sidebar:hover .nav-link:hover,
    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .nav-link:hover {
        border-left-color: var(--ef-accent) !important;
        border-radius: 0 8px 8px 0 !important;
    }

    .sidebar-mini.sidebar-collapse .main-sidebar:hover .nav-link:hover .nav-icon,
    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .nav-link:hover .nav-icon {
        transform: translateX(2px) !important;
    }
}

/* ========================================
   CARDS & PANELS
   ======================================== */

.card {
    padding: 5px;
    border: 1px solid var(--ef-border);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(244, 196, 48, 0.1);
    transform: translateY(-2px);
}

.card-header {
    background: var(--ef-gradient-accent);
    color: white;
    border-bottom: 3px solid var(--ef-primary);
    font-weight: 600;
}

.card-header h3, .card-header h4, .card-header h5 {
    color: white;
    margin: 0;
}

/* ========================================
   BADGES & ALERTS
   ======================================== */

.badge-primary {
    background: var(--ef-primary);       /* Navy */
    color: var(--ef-accent-light) !important;  /* Gold Light — high contrast on navy */
}

.badge-secondary {
    background: #6c757d;                 /* Neutral gray — not scarlet */
    color: #fff !important;
}

.badge-success {
    background: var(--ef-success);       /* True green #28A745, not gold */
    color: #fff !important;
}

.badge-danger {
    background: var(--ef-danger);
    color: #fff !important;
}

.badge-warning {
    background: var(--ef-warning);
    color: var(--ef-dark) !important;
}

.badge-info {
    background: var(--ef-info);
    color: #fff !important;
}

.badge-dark {
    background: #343a40;
    color: #fff !important;
}

/* Alerts */
.alert-success {
    background-color: rgba(27, 94, 32, 0.1);
    border-color: var(--ef-accent);
    color: var(--ef-accent-dark);
}

.alert-danger {
    background-color: rgba(204, 0, 0, 0.1);
    border-color: var(--ef-danger);
    color: var(--ef-secondary-dark);
}

.alert-warning {
    background-color: rgba(244, 196, 48, 0.1);
    border-color: var(--ef-warning);
    color: var(--ef-dark);
}

.alert-info {
    background-color: rgba(0, 111, 165, 0.1);
    border-color: var(--ef-info);
    color: var(--ef-info);
}

/* ========================================
   FORMS
   ======================================== */

.form-control, .form-select {
    border: 2px solid var(--ef-border);
    border-radius: 6px;
    transition: border-color 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--ef-primary);
    box-shadow: 0 0 0 0.2rem rgba(244, 196, 48, 0.25);
}

.form-control:disabled, .form-control[disabled] {
    background-color: var(--ef-light);
    color: #6c757d;
}

label {
    color: var(--ef-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-label {
    color: var(--ef-dark);
    font-weight: 600;
}

/* Input Groups */
.input-group-text {
    background: var(--ef-primary);
    color: var(--ef-dark);
    border-color: var(--ef-primary-dark);
    font-weight: 600;
}

/* ========================================
   TABLES
   ======================================== */

table, .table {
    color: var(--ef-dark);
}

.table thead th {
    background: var(--ef-accent);
    color: white;
    border-bottom: 3px solid var(--ef-primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.table tbody tr {
    border-bottom: 1px solid var(--ef-border);
}

.table tbody tr:hover {
    background-color: rgba(244, 196, 48, 0.05);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(27, 94, 32, 0.02);
}

.table-active {
    background-color: rgba(244, 196, 48, 0.15) !important;
}

/* ========================================
   MODALS & DIALOGS
   ======================================== */

.modal-header {
    background: var(--ef-gradient-primary);
    border-bottom: 3px solid var(--ef-secondary);
    color: var(--ef-dark);
}

.modal-header .btn-close {
    color: var(--ef-dark);
}

.modal-title {
    font-weight: 700;
    color: var(--ef-dark);
}

/* ========================================
   PAGINATION & NAV PILLS
   ======================================== */

.pagination .page-link {
    color: var(--ef-secondary);
    border-color: var(--ef-border);
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background-color: var(--ef-primary);
    color: var(--ef-dark);
    border-color: var(--ef-primary-dark);
}

.pagination .page-item.active .page-link {
    background-color: var(--ef-secondary);
    border-color: var(--ef-secondary-dark);
}

/* Nav Pills */
.nav-pills .nav-link {
    color: var(--ef-dark);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-pills .nav-link:hover {
    background-color: var(--ef-primary);
    color: var(--ef-dark);
}

.nav-pills .nav-link.active {
    background: var(--ef-gradient-secondary);
    color: white;
}

/* ========================================
   PROGRESS BARS
   ======================================== */

.progress {
    background-color: var(--ef-border);
    border-radius: 10px;
}

.progress-bar {
    background: var(--ef-gradient-primary);
    font-weight: 600;
}

/* ========================================
   BREADCRUMBS
   ======================================== */

.breadcrumb {
    background-color: var(--ef-light);
    border: 1px solid var(--ef-border);
    border-radius: 6px;
}

.breadcrumb-item {
    color: var(--ef-dark);
}

.breadcrumb-item a {
    color: var(--ef-secondary);
}

.breadcrumb-item.active {
    color: var(--ef-accent);
    font-weight: 600;
}

/* ========================================
   SECTION HEADERS & TITLES
   ======================================== */

.page-header {
    background: var(--ef-gradient-primary);
    border-bottom: 3px solid var(--ef-secondary);
    color: var(--ef-dark);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.page-header h1, .page-header h2, .page-header h3 {
    color: var(--ef-dark);
    margin-bottom: 0;
}

.section-title {
    color: var(--ef-accent);
    font-weight: 700;
    position: relative;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid var(--ef-primary);
}

/* ========================================
   HELPER CLASSES
   ======================================== */

.text-primary {
    color: var(--ef-secondary) !important;
}

.text-success {
    color: var(--ef-accent) !important;
}

.text-danger {
    color: var(--ef-danger) !important;
}

.text-warning {
    color: var(--ef-warning) !important;
}

.text-info {
    color: var(--ef-info) !important;
}

.bg-primary {
    background-color: var(--ef-primary) !important;
    color: var(--ef-dark) !important;
}

.bg-primary-light {
    background-color: var(--ef-primary-light) !important;
}

.bg-primary-dark {
    background-color: var(--ef-primary-dark) !important;
}

.bg-secondary {
    background-color: var(--ef-secondary) !important;
    color: white !important;
}

.bg-success {
    background-color: var(--ef-accent) !important;
    color: white !important;
}

.bg-accent {
    background: var(--ef-gradient-accent) !important;
    color: white !important;
}

.border-primary {
    border-color: var(--ef-primary) !important;
}

.border-secondary {
    border-color: var(--ef-secondary) !important;
}

.border-success {
    border-color: var(--ef-accent) !important;
}

/* ========================================
   EFFECTS & ANIMATIONS
   ======================================== */

.shadow-primary {
    box-shadow: 0 4px 12px rgba(244, 196, 48, 0.3) !important;
}

.shadow-secondary {
    box-shadow: 0 4px 12px rgba(204, 0, 0, 0.3) !important;
}

.shadow-accent {
    box-shadow: 0 4px 12px rgba(27, 94, 32, 0.3) !important;
}

/* Hover Effects */
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.hover-shine:hover {
    animation: shine 0.5s ease;
}

@keyframes shine {
    0% { box-shadow: 0 0 0 rgba(244, 196, 48, 0); }
    50% { box-shadow: 0 0 20px rgba(244, 196, 48, 0.5); }
    100% { box-shadow: 0 0 0 rgba(244, 196, 48, 0); }
}

/* ========================================
   ADMIN LTE OVERRIDES
   ======================================== */

/* Fix AdminLTE's default active color override (navy bg + dark text is wrong) */
.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active {
    background: linear-gradient(90deg, rgba(220, 20, 60, 0.5) 0%, rgba(220, 20, 60, 0.2) 100%) !important;
    color: #ffffff !important;
}

.content-wrapper {
    background-color: var(--ef-light);
}

.content-header {
    background: transparent;
}

.small-box {
    border-radius: 8px;
    border-top: 4px solid var(--ef-primary);
}

.small-box.bg-primary {
    background: var(--ef-gradient-primary) !important;
}

.small-box.bg-success {
    background: var(--ef-gradient-accent) !important;
}

.small-box.bg-danger {
    background: var(--ef-gradient-secondary) !important;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .btn, button, .nav, .navbar, .sidebar {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .card {
        break-inside: avoid;
    }
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    .page-header, [class*="page-header"] {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }
}

/* ========================================
   CONTROL SIDEBAR (Right Panel)
   E-Formasi Panel Pengguna
   ======================================== */

/* ── Core sidebar shell ─────────────────── */
.ef-control-sidebar.control-sidebar {
    background: linear-gradient(180deg, #001F3F 0%, #000F1F 100%);
    width: 290px;
    top: 0 !important;                  /* flush with top like main-sidebar */
    bottom: 0 !important;
    height: 100% !important;
    overflow-y: auto;
    overflow-x: hidden;
    border-left: 1px solid rgba(255,255,255,0.08);
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(244,196,48,0.4) transparent;
    transition: right 0.3s ease, left 0.3s ease;
}

.ef-control-sidebar.control-sidebar::-webkit-scrollbar { width: 4px; }
.ef-control-sidebar.control-sidebar::-webkit-scrollbar-thumb {
    background: rgba(244,196,48,0.4);
    border-radius: 2px;
}

/* Spacer to push content below fixed navbar */
.ef-cs-navbar-spacer {
    height: 57px;
    flex-shrink: 0;
}

/* Overlay background */
.ef-cs-overlay.control-sidebar-bg {
    z-index: 1049;
    background: rgba(0,0,0,0.45);
    cursor: pointer;
    transition: opacity 0.3s ease;
}

/* AdminLTE shift fix when sidebar opens */
body.control-sidebar-open .content-wrapper,
body.control-sidebar-open .main-footer {
    margin-right: 290px;
    transition: margin-right 0.3s ease;
}

/* ── Header ─────────────────────────────── */
.ef-cs-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    background: linear-gradient(135deg, #003D7A 0%, #001F3F 100%);
    padding: 1rem;
    border-bottom: 2px solid rgba(244,196,48,0.4);
    position: sticky;
    top: 0;
    z-index: 10;
}

.ef-cs-user-wrap {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    flex: 1;
    min-width: 0;
}

.ef-cs-avatar {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(244,196,48,0.15);
    border: 2px solid rgba(244,196,48,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #F4C430;
    font-size: 1.4rem;
}

.ef-cs-user-info { min-width: 0; }

.ef-cs-user-name {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 165px;
}

.ef-cs-user-email {
    color: rgba(255,255,255,0.55);
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 165px;
    margin-top: 2px;
}

.ef-cs-user-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.ef-cs-badge-role {
    display: inline-block;
    background: rgba(244,196,48,0.2);
    border: 1px solid rgba(244,196,48,0.4);
    color: #F4C430;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ef-cs-badge-instansi {
    display: inline-block;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.7);
    font-size: 0.65rem;
    padding: 2px 7px;
    border-radius: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 155px;
}

/* Close button */
.ef-cs-close {
    flex-shrink: 0;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.6);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    margin-left: 6px;
    margin-top: 2px;
    font-size: 0.75rem;
}

.ef-cs-close:hover {
    background: rgba(220,20,60,0.3);
    border-color: rgba(220,20,60,0.5);
    color: #fff;
}

/* ── Quick Action Buttons ───────────────── */
.ef-cs-actions {
    display: flex;
    gap: 6px;
    padding: 0.75rem 1rem;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.ef-cs-action-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0.55rem 0.25rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 500;
    transition: all 0.2s;
    text-align: center;
    line-height: 1.2;
}

.ef-cs-action-btn i {
    font-size: 0.9rem;
    color: #F4C430;
}

.ef-cs-action-btn:hover {
    background: rgba(244,196,48,0.12);
    border-color: rgba(244,196,48,0.35);
    color: #ffffff;
    text-decoration: none;
}

.ef-cs-action-btn.ef-cs-action-btn--danger i { color: rgba(255,107,107,0.85); }

.ef-cs-action-btn.ef-cs-action-btn--danger:hover {
    background: rgba(220,20,60,0.15);
    border-color: rgba(220,20,60,0.4);
}

/* ── Sections ───────────────────────────── */
.ef-cs-section {
    padding: 0.85rem 1rem 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.ef-cs-section--last { border-bottom: none; }

.ef-cs-section-title {
    color: rgba(244,196,48,0.85);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.6rem;
}

.ef-cs-section-title i { margin-right: 5px; }

.ef-cs-empty {
    color: rgba(255,255,255,0.35);
    font-size: 0.75rem;
    text-align: center;
    padding: 0.5rem 0 0.75rem;
    margin: 0;
}

/* ── Activity Timeline ──────────────────── */
.ef-cs-timeline { display: flex; flex-direction: column; gap: 4px; }

.ef-cs-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 5px 0;
}

.ef-cs-timeline-dot {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.ef-ev-create  { background: rgba(40,167,69,0.2);  color: #28A745; border: 1px solid rgba(40,167,69,0.35); }
.ef-ev-update  { background: rgba(244,196,48,0.15); color: #F4C430; border: 1px solid rgba(244,196,48,0.3); }
.ef-ev-delete  { background: rgba(220,20,60,0.2);   color: #FF6B6B; border: 1px solid rgba(220,20,60,0.35); }
.ef-ev-login   { background: rgba(23,162,184,0.2);  color: #17A2B8; border: 1px solid rgba(23,162,184,0.35); }
.ef-ev-logout  { background: rgba(108,117,125,0.2); color: #adb5bd; border: 1px solid rgba(108,117,125,0.3); }
.ef-ev-view    { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.45); border: 1px solid rgba(255,255,255,0.1); }
.ef-ev-export  { background: rgba(0,123,255,0.2);   color: #74b9ff; border: 1px solid rgba(0,123,255,0.35); }
.ef-ev-import  { background: rgba(0,184,148,0.2);   color: #00b894; border: 1px solid rgba(0,184,148,0.35); }

.ef-cs-timeline-body { min-width: 0; }

.ef-cs-timeline-desc {
    color: rgba(255,255,255,0.82);
    font-size: 0.75rem;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.ef-cs-timeline-time {
    color: rgba(255,255,255,0.35);
    font-size: 0.65rem;
    margin-top: 2px;
}

/* ── Lists (pengumuman / faq) ───────────── */
.ef-cs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ef-cs-list-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.ef-cs-list-item:last-child { border-bottom: none; }

.ef-cs-list-link {
    color: rgba(255,255,255,0.82);
    font-size: 0.75rem;
    line-height: 1.35;
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.15s;
}

.ef-cs-list-link:hover { color: #F4C430; text-decoration: none; }

.ef-dot-info   { color: #17A2B8; }
.ef-dot-accent { color: #F4C430; }

.ef-cs-list-meta {
    color: rgba(255,255,255,0.35);
    font-size: 0.65rem;
    padding-left: 14px;
}

/* ── Navbar chevron animates when open ──── */
.ef-panel-chevron { transition: transform 0.3s ease; }
body.control-sidebar-open .ef-panel-chevron { transform: rotate(180deg); }

/* ── Responsive ─────────────────────────── */
@media (max-width: 768px) {
    body.control-sidebar-open .content-wrapper,
    body.control-sidebar-open .main-footer { margin-right: 0; }
}

/* ========================================
   PAGE HEADER
   Reusable header template — use the
   pages.layout.components.page-header include
   ======================================== */

.ef-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    margin: 0 0 1.25rem 0;
    background: linear-gradient(135deg, var(--ef-primary) 0%, var(--ef-primary-dark) 100%);
    border-bottom: none;
    border-radius: 0;
    box-shadow: 0 2px 0 rgba(244, 196, 48, 0.5), 0 4px 20px rgba(0, 15, 31, 0.22);
    position: relative;
    overflow: hidden;
}

/* Subtle gold shimmer stripe on the left edge */
.ef-page-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--ef-accent);
}

/* Decorative faint circle in background */
.ef-page-header::after {
    content: '';
    position: absolute;
    right: -40px;
    top: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(244, 196, 48, 0.06);
    pointer-events: none;
}

.ef-page-header__left { min-width: 0; position: relative; z-index: 1; }

.ef-page-header__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.15rem 0;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.ef-page-header__subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.3;
}

.ef-page-header__right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* Breadcrumb pill — white outline on dark background */
.ef-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.85rem;
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.08);
    white-space: nowrap;
    backdrop-filter: blur(4px);
}

.ef-breadcrumb__item {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.15s;
}

.ef-breadcrumb__item:hover {
    color: var(--ef-accent);
    text-decoration: none;
}

.ef-breadcrumb__item--active {
    color: var(--ef-accent);
    font-weight: 600;
}

.ef-breadcrumb__sep {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.68rem;
}

.ef-page-header__actions { display: flex; gap: 0.5rem; position: relative; z-index: 1; }

@media (max-width: 576px) {
    .ef-page-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========================================
   DATATABLE — E-Formasi Style
   Targets: jquery.dataTables (vanilla) +
   AdminLTE DataTables wrapper
   ======================================== */

/* ── Wrapper & Controls ─────────────────── */
.dataTables_wrapper {
    font-size: 0.82rem;
    color: var(--ef-dark);
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    font-weight: 500;
    color: #495057;
    font-size: 0.8rem;
}

.dataTables_wrapper .dataTables_length select {
    border: 1.5px solid var(--ef-border);
    border-radius: 6px;
    padding: 0.25rem 1.8rem 0.25rem 0.6rem;
    font-size: 0.8rem;
    color: var(--ef-dark);
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23495057'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    min-width: 72px;
    width: auto !important;
}

.dataTables_wrapper .dataTables_length select:focus,
.dataTables_wrapper .dataTables_filter input:focus {
    outline: none;
    border-color: var(--ef-primary);
    box-shadow: 0 0 0 2px rgba(0,31,63,0.12);
}

.dataTables_wrapper .dataTables_filter input {
    border: 1.5px solid var(--ef-border);
    border-radius: 6px;
    padding: 0.28rem 0.7rem;
    font-size: 0.8rem;
    color: var(--ef-dark);
    background: #fff;
    width: 200px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* ── Table Base ─────────────────────────── */
table.dataTable {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    width: 100% !important;
}

table.dataTable.ef-table {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

/* ── Header ─────────────────────────────── */
table.dataTable thead th,
table.dataTable thead td {
    background: var(--ef-primary) !important;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.7rem 0.85rem;
    border-bottom: 2px solid var(--ef-accent) !important;
    border-top: none !important;
    border-right: 1px solid rgba(255,255,255,0.12) !important;
    white-space: nowrap;
    vertical-align: middle;
}

table.dataTable thead th:last-child,
table.dataTable thead td:last-child {
    border-right: none !important;
}

/* Sort icons */
table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    cursor: pointer;
}

table.dataTable thead th.sorting:after,
table.dataTable thead th.sorting_asc:after,
table.dataTable thead th.sorting_desc:after {
    color: rgba(244,196,48,0.7) !important;
}

table.dataTable thead th.sorting_asc:after  { color: var(--ef-accent) !important; }
table.dataTable thead th.sorting_desc:after { color: var(--ef-accent) !important; }

/* ── Body ───────────────────────────────── */
table.dataTable tbody tr {
    background-color: #ffffff;
    transition: background-color 0.15s;
}

table.dataTable tbody tr:nth-child(even) {
    background-color: #f8f9fc;
}

table.dataTable tbody tr:hover,
table.dataTable tbody tr.odd:hover,
table.dataTable tbody tr.even:hover {
    background-color: rgba(0,31,63,0.05) !important;
}

table.dataTable tbody td {
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid #e9ecef;
    border-right: 1px solid #e9ecef;
    color: #343a40;
    vertical-align: middle;
    font-size: 0.82rem;
}

table.dataTable tbody td:last-child {
    border-right: none;
}

/* Selected row */
table.dataTable tbody tr.selected {
    background-color: rgba(0,31,63,0.1) !important;
}

/* ── Pagination ─────────────────────────── */
.dataTables_wrapper .dataTables_paginate {
    padding-top: 0.5rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border: 1.5px solid var(--ef-border) !important;
    border-radius: 6px !important;
    color: var(--ef-primary) !important;
    background: #fff !important;
    padding: 0.25rem 0.65rem !important;
    font-size: 0.78rem !important;
    font-weight: 500;
    margin: 0 2px !important;
    cursor: pointer;
    transition: all 0.18s;
    line-height: 1.4 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--ef-primary) !important;
    color: #ffffff !important;
    border-color: var(--ef-primary) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--ef-primary) !important;
    color: var(--ef-accent) !important;
    border-color: var(--ef-primary) !important;
    font-weight: 700;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    color: #adb5bd !important;
    border-color: var(--ef-border) !important;
    background: #f8f9fa !important;
    cursor: default;
}

/* ── Info ───────────────────────────────── */
.dataTables_wrapper .dataTables_info {
    font-size: 0.78rem;
    color: #6c757d;
    padding-top: 0.6rem;
}

/* ── Processing overlay ─────────────────── */
.dataTables_wrapper .dataTables_processing {
    background: rgba(0,31,63,0.85);
    color: var(--ef-accent);
    border: none;
    border-radius: 6px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    font-size: 0.82rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* ── Card wrapper for DataTable ─────────── */
.ef-dt-card {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    overflow: hidden;
}

.ef-dt-card .card-body { padding: 1.25rem 1.5rem; }

/* Top controls row — length + filter aligned */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    padding: 0.25rem 0;
    margin-bottom: 0.75rem;
}

/* Top controls row */
.ef-dt-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #dee2e6;
    background: #fafbfc;
}

/* Action buttons inside datatable rows */
.ef-dt-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.73rem;
    font-weight: 500;
    padding: 0.2rem 0.6rem;
    border-radius: 5px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    white-space: nowrap;
}

.ef-dt-btn-primary {
    background: var(--ef-primary);
    color: #fff;
    border-color: var(--ef-primary);
}
.ef-dt-btn-primary:hover {
    background: var(--ef-primary-dark);
    color: var(--ef-accent);
    border-color: var(--ef-primary-dark);
}

.ef-dt-btn-danger {
    background: transparent;
    color: var(--ef-secondary);
    border-color: var(--ef-secondary);
}
.ef-dt-btn-danger:hover {
    background: var(--ef-secondary);
    color: #fff;
}

.ef-dt-btn-info {
    background: transparent;
    color: var(--ef-info);
    border-color: var(--ef-info);
}
.ef-dt-btn-info:hover {
    background: var(--ef-info);
    color: #fff;
}

/* Status badges */
.ef-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 50px;
    white-space: nowrap;
}

.ef-badge-success { background: rgba(40,167,69,0.12); color: #1e7e34; }
.ef-badge-danger  { background: rgba(220,20,60,0.1);  color: var(--ef-secondary); }
.ef-badge-warning { background: rgba(244,196,48,0.18); color: #856404; }
.ef-badge-info    { background: rgba(23,162,184,0.1); color: #0c6978; }
.ef-badge-muted   { background: #f1f3f5; color: #6c757d; }
