:root {
    --ybll-green: #2D5A27;
    /* Bamboo Green */
    --ybll-green-dark: #1E3F1A;
    /* Dark Green */
    --ybll-green-light: #EBF0EB;
    /* Soft Green Background */
    --ybll-gold: #C5A059;
    /* Bamboo Gold */
    --ybll-gold-light: #F7F3EB;
    /* Soft Gold Background */
    --ybll-dark: #1E271D; /* Slightly darker for better readability & contrast */
    --ybll-bg: #F4F6F4;
    /* Light Natural Gray-Green */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    font-family: var(--font-primary);
    background-color: var(--ybll-bg);
    color: var(--ybll-dark);
    margin: 0;
    padding: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.015em;
    color: var(--ybll-green-dark);
}

/* Redesigned Premium Navbar Styling */
.navbar-ybll {
    background: linear-gradient(135deg, var(--ybll-green-dark) 0%, #173214 100%);
    border-bottom: 3px solid var(--ybll-gold);
    padding: 0.75rem 2rem;
    padding-top: calc(0.75rem + env(safe-area-inset-top, 0px));
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

.navbar-brand-container {
    display: flex;
    align-items: center;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.navbar-brand-container:hover {
    transform: translateY(-1px);
}

.navbar-brand-container img {
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar-brand-container:hover img {
    transform: scale(1.06) rotate(-2deg);
}

.navbar-logo-text {
    line-height: 1.2;
    margin-left: 10px;
}

.navbar-logo-text .title-main {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.navbar-logo-text .title-sub {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--ybll-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================================================
   GLOBAL BUTTON COMPONENT STANDARDIZATION
   ========================================================================== */
.btn {
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid transparent;
}

.btn-sm {
    padding: 0.35rem 0.9rem;
    font-size: 0.78rem;
    border-radius: 6px;
}

.btn-lg {
    padding: 0.75rem 1.75rem;
    font-size: 0.95rem;
    border-radius: 10px;
}

@media (max-width: 575.98px) {
    .btn-mobile-full {
        width: 100% !important;
        display: flex !important;
    }
}

/* 1. Primary Solid & Soft */
.btn-primary {
    background-color: var(--ybll-green);
    color: #ffffff;
    border-color: var(--ybll-green);
    box-shadow: 0 4px 10px rgba(45, 90, 39, 0.15);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--ybll-green-dark);
    border-color: var(--ybll-green-dark);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(45, 90, 39, 0.25);
}

.btn-soft-primary {
    background-color: rgba(45, 90, 39, 0.1) !important;
    color: var(--ybll-green) !important;
    border-color: transparent !important;
}

.btn-soft-primary:hover {
    background-color: var(--ybll-green) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* 2. Gold / Warning Solid & Soft */
.btn-warning,
.btn-ybll-gold {
    background-color: var(--ybll-gold);
    color: var(--ybll-green-dark);
    border-color: var(--ybll-gold);
    box-shadow: 0 4px 10px rgba(197, 160, 89, 0.15);
}

.btn-warning:hover,
.btn-warning:focus,
.btn-ybll-gold:hover {
    background-color: #dfba71;
    border-color: #dfba71;
    color: var(--ybll-green-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(197, 160, 89, 0.25);
}

.btn-soft-warning {
    background-color: rgba(197, 160, 89, 0.1) !important;
    color: #b58105 !important;
    border-color: transparent !important;
}

.btn-soft-warning:hover {
    background-color: var(--ybll-gold) !important;
    color: var(--ybll-green-dark) !important;
    transform: translateY(-1px);
}

/* 3. Success Solid & Soft */
.btn-success {
    background-color: #198754;
    color: #ffffff;
    border-color: #198754;
    box-shadow: 0 4px 10px rgba(25, 135, 84, 0.15);
}

.btn-success:hover,
.btn-success:focus {
    background-color: #157347;
    border-color: #146c43;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(25, 135, 84, 0.25);
}

.btn-soft-success {
    background-color: rgba(25, 135, 84, 0.1) !important;
    color: #198754 !important;
    border-color: transparent !important;
}

.btn-soft-success:hover {
    background-color: #198754 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* 4. Danger Solid & Soft */
.btn-danger {
    background-color: #dc3545;
    color: #ffffff;
    border-color: #dc3545;
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.15);
}

.btn-danger:hover,
.btn-danger:focus {
    background-color: #bb2d3b;
    border-color: #b02a37;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(220, 53, 69, 0.25);
}

.btn-soft-danger {
    background-color: rgba(220, 53, 69, 0.1) !important;
    color: #dc3545 !important;
    border-color: transparent !important;
}

.btn-soft-danger:hover {
    background-color: #dc3545 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* 5. Info Solid & Soft */
.btn-info {
    background-color: #0dcaf0;
    color: #212529;
    border-color: #0dcaf0;
    box-shadow: 0 4px 10px rgba(13, 202, 240, 0.15);
}

.btn-info:hover,
.btn-info:focus {
    background-color: #31d2f2;
    border-color: #25cff2;
    color: #212529;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(13, 202, 240, 0.25);
}

.btn-soft-info {
    background-color: rgba(13, 202, 240, 0.1) !important;
    color: #0b93b0 !important;
    border-color: transparent !important;
}

.btn-soft-info:hover {
    background-color: #0dcaf0 !important;
    color: #212529 !important;
    transform: translateY(-1px);
}

/* 6. Outline Modern Button */
.btn-ybll-outline,
.btn-outline-primary {
    border: 2px solid var(--ybll-green);
    color: var(--ybll-green);
    background: transparent;
}

.btn-ybll-outline:hover,
.btn-outline-primary:hover {
    background-color: var(--ybll-green);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(45, 90, 39, 0.2);
}

/* 7. Secondary / Light/ Dark Button */
/* 7. Secondary / Light/ Dark Button */
.btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-secondary:hover {
    background-color: #e5e7eb;
    border-color: rgba(0, 0, 0, 0.12);
    color: #1f2937;
    transform: translateY(-1px);
}

.btn-soft-secondary {
    background-color: #f3f4f6 !important;
    color: #4b5563 !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: none !important;
}

.btn-soft-secondary:hover {
    background-color: #e5e7eb !important;
    color: #1f2937 !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-1px);
}

.btn-light {
    background-color: #f8f9fa;
    color: #212529;
    border-color: #f8f9fa;
}

.btn-light:hover {
    background-color: #e2e6ea;
    border-color: #dae0e5;
    color: #212529;
    transform: translateY(-1px);
}

/* Sidebar & Card Styling */
.card-ybll {
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    height: 100%;
}

.card-header-ybll {
    background-color: var(--ybll-green-light);
    border-bottom: 2px solid var(--ybll-green);
    padding: 1rem 1.5rem;
    color: var(--ybll-green-dark);
    font-family: var(--font-heading);
}

/* Alert notifications */
.alert-ybll-success {
    background-color: var(--ybll-green-light);
    color: var(--ybll-green-dark);
    border: 1px solid var(--ybll-green);
    border-radius: 8px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--ybll-green);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ybll-green-dark);
}

/* iOS PWA Install Banner Style */
.ios-pwa-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--ybll-gold);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 1.25rem;
    z-index: 9999;
    display: none;
    animation: slideUpFade 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translate(-50%, 30px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.ios-pwa-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.ios-pwa-title {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--ybll-green-dark);
    margin: 0;
    font-size: 1.05rem;
}

.ios-pwa-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.ios-pwa-close:hover {
    color: #dc3545;
}

.ios-pwa-body {
    font-size: 0.88rem;
    color: var(--ybll-dark);
    line-height: 1.5;
}

.ios-pwa-icon {
    font-size: 1.1rem;
    color: var(--ybll-green);
    vertical-align: middle;
    margin: 0 2px;
}

/* Custom Modern SweetAlert2 CSS */
.swal2-popup.swal2-popup-custom {
    border-radius: 16px !important;
    padding: 2rem !important;
    border: 2px solid var(--ybll-gold) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08) !important;
    background: #ffffff !important;
}

.swal2-title.swal2-title-custom {
    font-family: var(--font-heading) !important;
    font-weight: 700 !important;
    color: var(--ybll-green-dark) !important;
    font-size: 1.4rem !important;
    margin-top: 1.25rem !important;
}

.swal2-html-container.swal2-html-custom {
    font-family: var(--font-primary) !important;
    font-size: 0.92rem !important;
    color: var(--ybll-dark) !important;
    line-height: 1.6 !important;
    opacity: 0.85;
    margin-top: 0.75rem !important;
}

.swal2-actions.swal2-actions-custom {
    margin-top: 1.75rem !important;
    gap: 12px;
}

.swal2-confirm.swal2-confirm-custom {
    background-color: var(--ybll-green) !important;
    color: white !important;
    font-family: var(--font-heading) !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
    padding: 0.45rem 1.25rem !important;
    border-radius: 6px !important;
    border: none !important;
    box-shadow: 0 4px 10px rgba(45, 90, 39, 0.15) !important;
    transition: all 0.25s ease !important;
}

.swal2-confirm.swal2-confirm-custom:hover {
    background-color: var(--ybll-green-dark) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 12px rgba(45, 90, 39, 0.2) !important;
}

.swal2-deny.swal2-deny-custom {
    background-color: var(--ybll-gold) !important;
    color: #1e3f1a !important;
    font-family: var(--font-heading) !important;
    font-weight: 700 !important;
    font-size: 0.82rem !important;
    padding: 0.45rem 1.25rem !important;
    border-radius: 6px !important;
    border: none !important;
    box-shadow: 0 4px 10px rgba(197, 160, 89, 0.2) !important;
    transition: all 0.25s ease !important;
}

.swal2-deny.swal2-deny-custom:hover {
    background-color: #b08c4a !important;
    color: #1e3f1a !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 12px rgba(197, 160, 89, 0.3) !important;
}

.swal2-cancel.swal2-cancel-custom {
    background-color: #e06666 !important;
    color: white !important;
    font-family: var(--font-heading) !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
    padding: 0.45rem 1.25rem !important;
    border-radius: 6px !important;
    border: none !important;
    box-shadow: 0 4px 10px rgba(224, 102, 102, 0.15) !important;
    transition: all 0.25s ease !important;
}

.swal2-cancel.swal2-cancel-custom:hover {
    background-color: #c94c4c !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 12px rgba(224, 102, 102, 0.2) !important;
}

.swal2-icon.swal2-icon-custom {
    border-color: var(--ybll-gold) !important;
    color: var(--ybll-gold) !important;
    transform: scale(0.95);
}

/* ==========================================================================
   PROFESSIONAL ADMIN PANEL LAYOUT & NAVIGATION
   Isolated Scroll Architecture:
   - Outer: height:100vh, overflow:hidden (no page-level scroll)
   - Sidebar: full height, own overflow-y:auto
   - Content wrapper: flex-column, height:100vh, overflow:hidden
   - admin-main: flex:1, overflow-y:auto (only this scrolls)
   ========================================================================== */
.admin-layout {
    display: flex;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background-color: var(--ybll-bg);
    position: relative;
}

/* Sidebar Styling — Full Height, Isolated Scroll */
.admin-sidebar {
    width: 290px;
    min-width: 290px;
    background-color: #0b1f09;
    /* Deep Slate Bamboo Forest Green */
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    color: #ffffff;
    transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
        min-width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
        transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
        margin-left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1040;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    /* Sidebar scroll invisible on dark bg */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.admin-sidebar::-webkit-scrollbar {
    width: 4px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Desktop: collapsed state — slide out to left */
.admin-sidebar.collapsed {
    margin-left: -290px;
    min-width: 0;
}

.sidebar-header-brand {
    padding: 1.25rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-header-brand .brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.sidebar-header-brand .brand-link:hover {
    opacity: 0.95;
    transform: translateY(-0.5px);
}

.sidebar-header-brand .brand-logo {
    height: 42px;
    width: 42px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.sidebar-header-brand .brand-text {
    display: flex;
    flex-direction: column;
}

.sidebar-header-brand .brand-title {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: 0.5px;
    margin: 0;
    color: #ffffff;
    font-size: 1.1rem;
    line-height: 1.25;
}

.sidebar-header-brand .brand-subtitle {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--ybll-gold);
    margin: 0.15rem 0 0 0;
    font-weight: 700;
    opacity: 0.9;
}

.admin-sidebar-menu {
    padding: 1.25rem 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.menu-section-title {
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.35);
    padding: 1.25rem 0.75rem 0.35rem;
    margin-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.menu-section-title:first-of-type {
    border-top: none;
    margin-top: 0;
    padding-top: 0.25rem;
}


.menu-item {
    display: block;
    padding: 0.55rem 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    position: relative;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--ybll-gold);
}

.menu-item.active {
    background-color: rgba(197, 160, 89, 0.12);
    color: var(--ybll-gold);
    font-weight: 500;
    box-shadow: inset 0 0 0 1px rgba(197, 160, 89, 0.2);
}

.menu-item-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-item-icon {
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.85);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.25s ease;
}

.menu-item:hover .menu-item-icon {
    background-color: rgba(197, 160, 89, 0.15);
    color: var(--ybll-gold);
    transform: scale(1.05);
}

.menu-item.active .menu-item-icon {
    background-color: var(--ybll-gold);
    color: #0b1f09;
}

.menu-text-wrapper {
    line-height: 1.3;
}

.menu-title {
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 0.85rem;
    margin: 0;
    color: inherit;
}

.menu-desc {
    font-family: var(--font-primary);
    font-size: 0.72rem;
    color: inherit;
    opacity: 0.55;
    margin: 0.08rem 0 0 0;
    font-weight: 400;
}

.menu-arrow {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.2);
    transition: all 0.25s ease;
}

.menu-item:hover .menu-arrow {
    color: var(--ybll-gold);
    transform: translateX(2px);
}

.menu-item.active .menu-arrow {
    color: var(--ybll-gold);
    opacity: 1;
}

/* Content wrapper — takes remaining width, has own scroll isolation */
.admin-content-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Main Content Area — ONLY this element scrolls */
.admin-main {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    /* Required for flex child to scroll */
}

/* Sidebar Backdrop — mobile overlay */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1030;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.sidebar-backdrop.show {
    display: block;
    opacity: 1;
}

/* Professional Header & Widgets Navbar */
.navbar-admin-modern {
    background-color: #ffffff !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03) !important;
    padding: 0.6rem 1.5rem !important;
}

.search-bar-admin {
    position: relative;
    width: 320px;
}

.search-bar-admin input {
    background-color: #f3f5f3;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0.45rem 0.75rem 0.45rem 2.2rem;
    font-size: 0.85rem;
    width: 100%;
    transition: all 0.25s ease;
    color: var(--ybll-dark);
}

.search-bar-admin input:focus {
    background-color: #ffffff;
    border-color: var(--ybll-green);
    box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.08);
    outline: none;
}

.search-bar-admin i {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: #8fa08c;
    font-size: 0.9rem;
}

.search-badge-shortcut {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.05);
    font-size: 0.68rem;
    padding: 2px 6px;
    border-radius: 4px;
    color: #6c757d;
    font-weight: 500;
}

.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 12px;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.user-avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ybll-green) 0%, var(--ybll-green-dark) 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: var(--font-heading);
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.user-meta-info {
    line-height: 1.2;
    text-align: left;
}

.user-meta-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ybll-dark);
    margin: 0;
}

.user-meta-role {
    font-size: 0.7rem;
    color: #6c757d;
    margin: 0;
    text-transform: capitalize;
}

/* Modern Soft Action Buttons in Tables */
.btn-action {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.88rem;
    border: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: transparent;
}

/* 1. Primary Soft Button */
.btn-action.btn-primary {
    background-color: rgba(13, 110, 253, 0.12) !important;
    color: #0d6efd !important;
}

.btn-action.btn-primary:hover {
    background-color: #0d6efd !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.25);
}

/* 2. Secondary Soft Button */
.btn-action.btn-secondary {
    background-color: rgba(108, 117, 125, 0.12) !important;
    color: #6c757d !important;
}

.btn-action.btn-secondary:hover {
    background-color: #6c757d !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(108, 117, 125, 0.25);
}

/* 3. Success Soft Button */
.btn-action.btn-success {
    background-color: rgba(25, 135, 84, 0.12) !important;
    color: #198754 !important;
}

.btn-action.btn-success:hover {
    background-color: #198754 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(25, 135, 84, 0.25);
}

/* 4. Info Soft Button */
.btn-action.btn-info {
    background-color: rgba(13, 202, 240, 0.12) !important;
    color: #0b93b0 !important;
}

.btn-action.btn-info:hover {
    background-color: #0dcaf0 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(13, 202, 240, 0.25);
}

/* 5. Warning Soft Button */
.btn-action.btn-warning {
    background-color: rgba(255, 193, 7, 0.12) !important;
    color: #b58105 !important;
}

.btn-action.btn-warning:hover {
    background-color: #ffc107 !important;
    color: #212529 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 193, 7, 0.25);
}

/* 6. Danger Soft Button */
.btn-action.btn-danger {
    background-color: rgba(220, 53, 69, 0.12) !important;
    color: #dc3545 !important;
}

.btn-action.btn-danger:hover {
    background-color: #dc3545 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.25);
}

.btn-hamburger-admin {
    border: none;
    background: none;
    font-size: 1.25rem;
    color: var(--ybll-dark);
    padding: 0.4rem;
    margin-right: 15px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-hamburger-admin:hover {
    background-color: rgba(0, 0, 0, 0.04);
    color: var(--ybll-green-dark);
}

/* ==========================================================================
   RESPONSIVE SIDEBAR — Mobile / Tablet
   ========================================================================== */

/* Tablet & Mobile: sidebar becomes fixed overlay from the left */
@media (max-width: 991.98px) {

    /* Layout: content takes full width since sidebar is overlay */
    .admin-layout {
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
    }

    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100vh;
        height: 100dvh;
        /* Hidden by default: translate off-screen */
        transform: translateX(-100%);
        margin-left: 0 !important;
        /* Override desktop collapsed */
        z-index: 1050;
        width: 280px;
        min-width: 280px;
    }

    /* Active state: slide in */
    .admin-sidebar.active {
        transform: translateX(0);
        box-shadow: 8px 0 30px rgba(0, 0, 0, 0.3);
    }

    /* Content wrapper takes full width */
    .admin-content-wrapper {
        width: 100%;
    }

    /* Reduce main padding on mobile */
    .admin-main {
        padding: 1rem;
    }

    /* Hide search bar on mobile */
    .search-bar-admin {
        display: none !important;
    }

    /* Backdrop visible when sidebar is open */
    .sidebar-backdrop.show {
        display: block;
    }
}

/* Small phones */
@media (max-width: 575.98px) {
    .admin-sidebar {
        width: 260px;
        min-width: 260px;
    }

    .admin-main {
        padding: 0.875rem;
    }
}



/* ==========================================================================
   ADMIN PAGE TITLE — Ganti inline style h3 di semua halaman admin
   ========================================================================== */
.admin-page-title {
    font-family: var(--font-heading);
    font-weight: 800;
    margin: 0;
    color: var(--ybll-green-dark);
    font-size: 1.5rem;
}

.admin-page-subtitle {
    color: #6c757d;
    margin-bottom: 0;
    font-size: 0.875rem;
}

/* ==========================================================================
   ADMIN CARD — Konsolidasi .table-container + .card-ybll-admin
   ========================================================================== */
.admin-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.admin-card > .p-4 {
    padding: 1.25rem !important;
}

.admin-card-header {
    background-color: var(--ybll-green-light);
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid var(--ybll-green);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--ybll-green-dark);
    font-family: var(--font-heading);
    font-weight: 700;
}

.admin-card-header h5 {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--ybll-green-dark);
    font-size: 1.05rem;
}

.admin-card-body {
    padding: 1.5rem;
}

/* ==========================================================================
   MODAL DIALOG & CONTENT YBLL — Premium Global NGO & Corporate Standard
   ========================================================================== */
.modal-content {
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03) !important;
    overflow: hidden;
    background-color: #ffffff;
}

.modal-header-ybll {
    background: #ffffff !important;
    border-top: 4px solid var(--ybll-green) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: var(--ybll-green-dark) !important;
    padding: 1.25rem 1.5rem !important;
}

.modal-header-ybll .modal-title,
.modal-header-ybll h5,
.modal-header-ybll .modal-title h5,
.modal-header-ybll i,
.modal-header-ybll span {
    font-family: var(--font-heading);
    font-weight: 700 !important;
    color: var(--ybll-green-dark) !important;
    font-size: 1.12rem !important;
    margin: 0;
    display: inline-flex;
    align-items: center;
}

.modal-header-ybll .btn-close {
    background-color: transparent;
    opacity: 0.65;
    transition: all 0.2s ease;
    border-radius: 50%;
    padding: 0.5rem;
    box-shadow: none !important;
}

.modal-header-ybll .btn-close:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.05);
}

.modal-body {
    padding: 1.5rem !important;
}

.modal-footer {
    background-color: #f8fafc !important; /* Soft gray footer background */
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    padding: 1rem 1.5rem !important;
}

/* ==========================================================================
   STATS CARD — Dipindah dari dashboard/index ke theme global
   ========================================================================== */
.stats-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border-top: 4px solid var(--ybll-green);
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.stats-icon {
    width: 48px;
    height: 48px;
    background-color: var(--ybll-green-light);
    color: var(--ybll-green-dark);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.stats-count {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ybll-dark);
    line-height: 1.2;
}

.stats-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #6c757d;
    letter-spacing: 0.5px;
}

.stats-card-gold {
    border-top-color: var(--ybll-gold);
}

.stats-card-gold .stats-icon {
    background-color: var(--ybll-gold-light);
    color: var(--ybll-gold);
}

.stats-card-danger {
    border-top-color: #c0392b;
}

.stats-card-danger .stats-icon {
    background-color: #fdf2f2;
    color: #c0392b;
}

.stats-card-blue {
    border-top-color: #2980b9;
}

.stats-card-blue .stats-icon {
    background-color: #ebf5fb;
    color: #2980b9;
}

/* ==========================================================================
   BADGE CATEGORY — Dipindah dari locations/index ke theme global
   ========================================================================== */
.badge-admin-category {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
}

.badge-posko {
    background-color: var(--ybll-green-light);
    color: var(--ybll-green-dark);
    border: 1px solid var(--ybll-green);
}

.badge-bencana {
    background-color: #fdf2f2;
    color: #c0392b;
    border: 1px solid #c0392b;
}

.badge-tersalurkan {
    background-color: #ebf5fb;
    color: #2980b9;
    border: 1px solid #2980b9;
}

/* ==========================================================================
   TABLE YBLL — Style tabel standar admin panel
   ========================================================================== */
.table-ybll th {
    font-family: var(--font-heading);
    font-weight: 600;
    background-color: #f8f9fa;
    color: var(--ybll-green-dark);
    border-bottom: 2px solid #dee2e6;
    padding: 1rem 0.75rem;
}

.table-ybll td {
    padding: 0.75rem;
    vertical-align: middle;
}

/* ==========================================================================
   FORM YBLL — Label dan Input standar admin panel
   ========================================================================== */
.form-label-ybll {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--ybll-green-dark);
    margin-bottom: 0.3rem;
}

.form-control-ybll {
    border: 1.5px solid rgba(45, 90, 39, 0.2);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.form-control-ybll:focus {
    border-color: var(--ybll-green);
    box-shadow: 0 0 0 0.25rem rgba(45, 90, 39, 0.15);
    outline: 0;
}

/* ==========================================================================
   BTN-YBLL-PRIMARY — Alias green primary button untuk modal footer
   ========================================================================== */
.btn-ybll-primary {
    background-color: var(--ybll-green);
    color: #ffffff;
    border-color: var(--ybll-green);
    box-shadow: 0 4px 10px rgba(45, 90, 39, 0.15);
}

.btn-ybll-primary:hover,
.btn-ybll-primary:focus {
    background-color: var(--ybll-green-dark);
    border-color: var(--ybll-green-dark);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(45, 90, 39, 0.25);
}

/* DataTables Modern Pagination and Styling Override */
.dataTables_wrapper {
    font-family: var(--font-primary);
}

/* Kustomisasi Grid Border Tabel YBLL - Clean Card Layout */
.table-ybll {
    border-collapse: collapse !important;
    border: none !important;
    width: 100% !important;
}

/* Header Tabel Modern (thead) - Solid Rich Dark Green Background (Matches PDF style), White Text */
.table-ybll thead th {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    background-color: var(--ybll-green-dark) !important;
    color: #ffffff !important;
    border-bottom: 3px solid var(--ybll-gold) !important;
    border-top: none !important;
    border-right: none !important;
    border-left: none !important;
    padding: 0.8rem 0.85rem !important;
    vertical-align: middle;
}

/* Data Cells (tbody) - Pure White background, readable dark gray text */
.table-ybll tbody td {
    padding: 0.65rem 0.85rem !important;
    vertical-align: middle;
    border-bottom: 1px solid rgba(0, 0, 0, 0.045) !important;
    border-top: none !important;
    border-right: none !important;
    border-left: none !important;
    background-color: #ffffff !important;
    color: #374151 !important;
    font-size: 0.81rem;
    line-height: 1.4;
}

/* Footer Tabel (tfoot) - Distinct Light Cream/Gray Background, Solid Top Border */
.table-ybll tfoot th,
.table-ybll tfoot td {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.78rem;
    background-color: #F7F5F0 !important; /* Soft warm light tone */
    color: var(--ybll-green-dark) !important;
    border-top: 2px solid rgba(45, 90, 39, 0.15) !important;
    border-bottom: none !important;
    border-right: none !important;
    border-left: none !important;
    padding: 0.75rem 0.85rem !important;
    vertical-align: middle;
}

/* Kustomisasi indikator pengurutan (sorting arrows) - disesuaikan untuk background gelap */
.table-ybll th.sorting::before,
.table-ybll th.sorting::after,
.table-ybll th.sorting_asc::before,
.table-ybll th.sorting_asc::after,
.table-ybll th.sorting_desc::before,
.table-ybll th.sorting_desc::after {
    font-size: 0.65rem !important;
    opacity: 0.35 !important;
    color: #ffffff !important;
}

.table-ybll th.sorting_asc::before,
.table-ybll th.sorting_desc::after {
    opacity: 0.95 !important;
    color: var(--ybll-gold) !important;
}

/* Zebra Striping dengan warna Soft Green khas YBLL ultra-soft */
.table-ybll.table-striped>tbody>tr:nth-of-type(odd)>td {
    background-color: rgba(45, 90, 39, 0.02) !important;
}

.table-ybll.table-striped>tbody>tr:nth-of-type(even)>td {
    background-color: #ffffff !important;
}

/* Smooth Transition & Subtle Fade-in when page changes / sorts */
@keyframes dtFadeInRow {
    from {
        opacity: 0.6;
        transform: translateY(2px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.table-ybll tbody tr {
    transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    animation: dtFadeInRow 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Hover Effect modern yang halus */
.table-ybll.table-hover>tbody>tr:hover>td {
    background-color: rgba(45, 90, 39, 0.055) !important;
    color: var(--ybll-green-dark) !important;
}

/* Wrapper tabel untuk menyembunyikan border berlebih & menambahkan radius dengan scroll responsif */
.table-responsive {
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.015);
    background: #ffffff;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

/* Custom Thin Scrollbar for premium look */
.table-responsive::-webkit-scrollbar {
    height: 5px;
}
.table-responsive::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.01);
    border-radius: 4px;
}
.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(45, 90, 39, 0.2) !important;
    border-radius: 4px;
}
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(45, 90, 39, 0.35) !important;
}

/* Control Layout Atas: Search & Length Menu */
.dataTables_length label,
.dataTables_filter label {
    font-weight: 500;
    font-size: 0.85rem;
    color: #4A5568;
    margin: 0;
}

/* Search input bergaya minimalis & premium */
.dataTables_filter input {
    margin-left: 0 !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    border: 1.5px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 8px !important;
    background-color: #ffffff !important;
    box-shadow: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.dataTables_filter input:focus {
    border-color: var(--ybll-green) !important;
    box-shadow: 0 0 0 4px rgba(45, 90, 39, 0.08) !important;
    outline: 0;
    transform: translateY(-1px);
}

/* Dropdown Show Length */
.dataTables_length select {
    border: 1.5px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 8px !important;
    font-size: 0.875rem !important;
    background-color: #ffffff !important;
    box-shadow: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.dataTables_length select:focus {
    border-color: var(--ybll-green) !important;
    box-shadow: 0 0 0 4px rgba(45, 90, 39, 0.08) !important;
    outline: 0;
}

/* Info Summary di Kiri Bawah (Compact & Premium) */
.dataTables_info {
    font-size: 0.72rem !important;
    color: #4A5568 !important;
    font-weight: 500 !important;
    padding-top: 0.5rem !important;
}

/* Pagination Modern (Rounded Unified Block Layout - Compact Sizing) */
.dataTables_wrapper .dataTables_paginate,
.dt-container .dt-paging {
    padding-top: 0.5rem !important;
    display: inline-flex !important;
}

/* Penampung Paginasi Bergaya Kelompok Tunggal Ringkas Kotak */
.dataTables_wrapper .dataTables_paginate,
.dt-container .dt-paging,
.dt-container .pagination {
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-radius: 6px !important;
    padding: 2px 3px !important;
    gap: 2px !important;
    margin: 0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

/* Reset margin/border pembungkus item untuk versi Bootstrap */
.dt-container .pagination .page-item {
    border: none !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Tombol Paginasi Premium Compact Kotak */
.dataTables_wrapper .dataTables_paginate .paginate_button,
.dt-container .dt-paging .dt-paging-button,
.dt-container .pagination .page-item .page-link {
    border: none !important;
    background: transparent !important;
    color: var(--ybll-dark) !important;
    border-radius: 4px !important;
    padding: 0 !important;
    margin: 0 !important;
    font-weight: 600;
    font-size: 0.74rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px !important;
    height: 26px !important;
    width: 26px !important;
    cursor: pointer;
    box-shadow: none !important;
}

/* Efek Hover (Sorotan Halus Kotak) */
.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.current):not(.disabled),
.dt-container .dt-paging .dt-paging-button:hover:not(.current):not(.disabled),
.dt-container .pagination .page-item:not(.active):not(.disabled) .page-link:hover {
    background-color: rgba(45, 90, 39, 0.08) !important;
    color: var(--ybll-green-dark) !important;
}

/* Tombol Aktif - YBLL Green Solid dengan Bayangan Tipis Kotak */
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
.dt-container .dt-paging .dt-paging-button.current,
.dt-container .dt-paging .dt-paging-button.current:hover,
.dt-container .pagination .page-item.active .page-link,
.dt-container .pagination .page-item.active .page-link:hover {
    background: var(--ybll-green) !important;
    color: #ffffff !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 4px rgba(45, 90, 39, 0.18) !important;
}

/* Tombol Dinonaktifkan (Disabled) */
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
.dt-container .dt-paging .dt-paging-button.disabled,
.dt-container .dt-paging .dt-paging-button.disabled:hover,
.dt-container .pagination .page-item.disabled .page-link,
.dt-container .pagination .page-item.disabled .page-link:hover {
    background: transparent !important;
    border-color: transparent !important;
    color: #adb5bd !important;
    cursor: not-allowed;
    opacity: 0.4;
    transform: none !important;
    box-shadow: none !important;
}

/* Rapikan icon paginasi */
.dataTables_wrapper .dataTables_paginate .paginate_button i,
.dt-container .dt-paging .dt-paging-button i,
.dt-container .dt-paging i {
    font-size: 0.75rem;
}

/* Universal Premium Badge System (Soft background, contrast text) - Compact Design */
.badge {
    padding: 0.28em 0.65em !important;
    font-weight: 600 !important;
    font-size: 0.68rem !important;
    border-radius: 30px !important;
    text-transform: capitalize;
    letter-spacing: 0.3px;
    box-shadow: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.badge.bg-success {
    background-color: #E6F6EC !important;
    color: #15803D !important;
    border: 1px solid rgba(21, 128, 61, 0.15) !important;
}
.badge.bg-danger {
    background-color: #FDF2F2 !important;
    color: #C0392B !important;
    border: 1px solid rgba(192, 57, 43, 0.15) !important;
}
.badge.bg-warning {
    background-color: #FEF9EC !important;
    color: #D48C00 !important;
    border: 1px solid rgba(212, 140, 0, 0.15) !important;
}
.badge.bg-info, .badge.bg-primary {
    background-color: #EBF5FB !important;
    color: #2980B9 !important;
    border: 1px solid rgba(41, 128, 185, 0.15) !important;
}

/* Media Query untuk Datatables Responsive & mobile alignment */
@media (max-width: 575.98px) {

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        text-align: center;
        margin-bottom: 1rem;
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .dataTables_wrapper .dataTables_filter input {
        width: 100% !important;
    }

    .dataTables_wrapper .dataTables_paginate {
        justify-content: center;
        width: 100%;
        margin-top: 1rem;
    }

    .dataTables_wrapper .dataTables_info {
        text-align: center;
        width: 100%;
    }

    /* Make card headers stack vertically on mobile screens when buttons exist */
    .admin-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 1rem 1.25rem;
    }

    .admin-card-header .btn {
        width: 100%;
    }

    /* Clean horizontal layout for DataTable controls (Length & Search) on mobile */
    .dt-container .row:first-child,
    .dataTables_wrapper .row:first-child {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        margin-bottom: 1rem !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Force length and search columns to not wrap, and match row height */
    .dt-container .row:first-child > div,
    .dataTables_wrapper .row:first-child > div {
        flex: 1 !important;
        width: auto !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Left align the length selector container */
    .dt-container .dt-length,
    .dataTables_wrapper .dataTables_length {
        display: flex !important;
        justify-content: flex-start !important;
        align-items: center !important;
        text-align: left !important;
        margin-bottom: 0 !important;
    }

    /* Right align the search filter container */
    .dt-container .dt-search,
    .dataTables_wrapper .dataTables_filter {
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        text-align: right !important;
        margin-bottom: 0 !important;
    }

    /* Make inputs look compact and symmetrical */
    .dt-container .dt-search input,
    .dataTables_wrapper .dataTables_filter input {
        width: 100% !important;
        max-width: 180px !important;
        margin-left: 0 !important;
    }

    /* Table responsive container improvements */
    .table-responsive {
        border-radius: 8px !important;
        border: 1px solid rgba(0, 0, 0, 0.05) !important;
        background-color: #ffffff !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Slightly decrease table padding on mobile to squeeze columns in */
    .table-ybll th, 
    .table-ybll td {
        padding: 0.65rem 0.6rem !important;
        font-size: 0.8rem !important;
    }
}

/* ==========================================================================
   PWA NATIVE APP FEELING OPTIMIZATIONS
   ========================================================================== */

/* Disable pull-to-refresh and bouncy scrolling for a native app feel */
html, body {
    overscroll-behavior-y: contain;
    -webkit-tap-highlight-color: transparent;
}

/* Disable double-tap zoom delay on interactive elements */
button, a, input, select, textarea {
    touch-action: manipulation;
}

/* Prevent accidental text selection on UI controls */
.admin-sidebar,
.navbar-admin-modern,
.btn,
.menu-item,
.user-profile-widget,
.sidebar-header-brand {
    user-select: none;
    -webkit-user-select: none;
}

/* Modern notch/safe-area optimization when running in standalone PWA mode */
@media (display-mode: standalone) {
    /* Adjust top navbar padding to clear the phone notch / status bar */
    .navbar-admin-modern {
        padding-top: calc(env(safe-area-inset-top, 0px) + 0.8rem) !important;
    }

    /* Adjust sidebar padding for top notch and bottom home indicator bar */
    .admin-sidebar {
        padding-top: calc(env(safe-area-inset-top, 0px) + 1.25rem) !important;
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 1.25rem) !important;
    }

    /* Prevent content clipping at the bottom of the screen */
    .admin-layout {
        padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    }
}

/* ==========================================================================
   PREMIUM FLYOUT SIDEBAR SUBMENU STYLING
   ========================================================================== */
.menu-item-has-submenu {
    position: relative;
}

/* Submenu panel styling (Desktop Only) */
@media (min-width: 992px) {
    /* Set sidebar overflow visible so submenu can fly out */
    .admin-sidebar {
        overflow: visible !important;
    }
    
    .admin-sidebar-menu {
        overflow-y: auto;
        overflow-x: visible;
        scrollbar-width: none; /* Hide scrollbars for clean look */
    }
    
    .admin-sidebar-menu::-webkit-scrollbar {
        display: none;
    }
    
    .menu-submenu-flyout {
        position: fixed;
        top: 0;
        left: 275px; /* Overlaps slightly with sidebar content bounds (278px) to prevent mouseleave */
        width: 275px; /* 1:1 width matching sidebar */
        height: 100vh;
        height: 100dvh;
        background: rgba(6, 20, 5, 0.98); /* Deep slate forest green with high opacity */
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-left: 1px solid rgba(255, 255, 255, 0.06);
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
        z-index: 1050;
        padding: 1.5rem 1rem;
        visibility: hidden;
        overflow-y: auto;
        opacity: 0;
        transform: translateX(-15px);
        transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), 
                    transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                    visibility 0.28s;
        pointer-events: none;
    }

    /* Invisible hover bridge to prevent premature closing */
    .menu-submenu-flyout::before {
        content: '';
        position: absolute;
        top: 0;
        left: -80px; /* Large bridge to ensure mouse never leaves hover zone */
        width: 80px;
        height: 100%;
        background: transparent;
        z-index: 1060;
    }
    
    .menu-item-has-submenu:hover .menu-submenu-flyout {
        visibility: visible;
        opacity: 1;
        transform: translateX(0);
        pointer-events: auto;
    }
    
    /* Submenu Header */
    .submenu-header-title {
        font-family: var(--font-heading);
        font-size: 1.05rem;
        font-weight: 700;
        color: var(--ybll-gold);
        letter-spacing: 0.5px;
        margin-bottom: 1.2rem;
        text-transform: uppercase;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding-bottom: 0.6rem;
    }
    
    /* Submenu Groups */
    .submenu-group {
        margin-bottom: 1.1rem;
    }
    
    .submenu-group-title {
        font-family: var(--font-heading);
        font-size: 0.68rem;
        font-weight: 700;
        color: rgba(255, 255, 255, 0.35);
        letter-spacing: 1px;
        text-transform: uppercase;
        margin-bottom: 0.6rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
        padding-bottom: 0.3rem;
    }
    
    /* Submenu Card Item styling */
    .submenu-card-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0.55rem 0.75rem;
        background-color: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(255, 255, 255, 0.03);
        border-radius: 8px;
        color: rgba(255, 255, 255, 0.85);
        text-decoration: none;
        transition: all 0.22s cubic-bezier(0.25, 0.8, 0.25, 1);
        margin-bottom: 0.45rem;
    }
    
    .submenu-card-item:hover {
        background-color: rgba(197, 160, 89, 0.08);
        border-color: rgba(197, 160, 89, 0.25);
        color: var(--ybll-gold);
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }
    
    .submenu-card-item.active {
        background-color: rgba(197, 160, 89, 0.12) !important;
        border-color: rgba(197, 160, 89, 0.35) !important;
        color: var(--ybll-gold) !important;
        box-shadow: inset 0 0 0 1px rgba(197, 160, 89, 0.15);
    }
    
    .submenu-card-item.active .submenu-card-icon {
        background-color: var(--ybll-gold);
        color: #0b1f09;
    }
    
    .submenu-card-item.active .submenu-card-desc {
        color: rgba(255, 255, 255, 0.55);
    }
    
    .submenu-card-icon {
        width: 30px;
        height: 30px;
        border-radius: 6px;
        background-color: rgba(255, 255, 255, 0.04);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.9);
        transition: all 0.22s ease;
        flex-shrink: 0;
    }
    
    .submenu-card-item:hover .submenu-card-icon {
        background-color: var(--ybll-gold);
        color: #0b1f09;
        transform: scale(1.05);
    }
    
    .submenu-card-info {
        flex: 1;
        line-height: 1.3;
    }
    
    .submenu-card-title {
        font-family: var(--font-primary);
        font-size: 0.85rem;
        font-weight: 500;
        margin: 0;
        color: inherit; /* Inherits light color from submenu-card-item */
    }
    
    .submenu-card-desc {
        font-family: var(--font-primary);
        font-size: 0.72rem;
        color: rgba(255, 255, 255, 0.52);
        margin: 0.08rem 0 0 0;
        font-weight: 400;
    }
    
    .submenu-card-item:hover .submenu-card-desc {
        color: rgba(255, 255, 255, 0.6);
    }
}

/* Hide flyouts on mobile and fallback to normal sidebar behaviour */
@media (max-width: 991.98px) {
    .menu-submenu-flyout {
        display: none !important;
    }
}

/* ==========================================================================
   MOBILE & PWA BOTTOM NAVIGATION BAR (FLOATING LIGHT MODERN STYLING)
   ========================================================================== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 12px;
    left: 12px;
    right: 12px;
    height: 64px;
    background: rgba(255, 255, 255, 0.95); /* Clean white glassmorphism */
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(45, 90, 39, 0.12); /* Soft green-tinted shadow */
    z-index: 1040;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom, 0px); /* iOS safe area home indicator */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(42, 54, 41, 0.6); /* Semi-transparent dark green text */
    text-decoration: none;
    font-size: 0.62rem;
    font-family: var(--font-heading);
    font-weight: 600;
    flex: 1;
    height: 100%;
    transition: all 0.22s ease;
    gap: 3px;
    position: relative;
}

.mobile-nav-item i {
    font-size: 1.15rem;
    transition: transform 0.22s ease, color 0.22s ease;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    color: var(--ybll-green);
}

.mobile-nav-item.active i {
    transform: translateY(-2px) scale(1.08);
}

/* Floating Middle Trigger Button */
.mobile-menu-trigger .trigger-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ybll-green) 0%, var(--ybll-green-dark) 100%); /* Green brand theme gradient */
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(45, 90, 39, 0.35);
    margin-top: -30px; /* Float up */
    border: 3px solid #ffffff; /* Contrast white boundary */
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mobile-menu-trigger i {
    font-size: 1.45rem !important;
    margin-bottom: 0 !important;
}

.mobile-menu-trigger:hover .trigger-icon-wrapper,
.mobile-menu-trigger:focus .trigger-icon-wrapper {
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 90, 39, 0.5);
}

.mobile-nav-item .trigger-text {
    font-size: 0.6rem;
    font-weight: 700;
    margin-top: 1px;
    color: var(--ybll-green);
}

@media (max-width: 991.98px) {
    .mobile-bottom-nav {
        display: flex;
    }
    
    /* Pad content wrapper so content does not go under the bottom nav bar */
    .admin-content-wrapper {
        padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
        height: auto !important;
        min-height: 100vh !important;
        overflow-y: auto !important;
    }
    
    .admin-main {
        overflow-y: visible !important;
        padding: 1.25rem !important;
    }
    
    .admin-layout {
        height: auto !important;
        overflow: visible !important;
    }
}

/* Standalone PWA Optimizations for Native-like App experience */
@media (display-mode: standalone) {
    /* Publish Header/Navbar Premium glassmorphism */
    .navbar-ybll {
        background: rgba(30, 63, 26, 0.92) !important;
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-bottom: 2px solid var(--ybll-gold) !important;
        padding-top: calc(env(safe-area-inset-top, 0px) + 0.8rem) !important; /* iOS notch safe area padding */
        box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15) !important;
    }

    /* Top Header/Navbar Premium glassmorphism */
    .navbar-admin-modern {
        background: rgba(255, 255, 255, 0.88) !important;
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-bottom: 1px solid rgba(30, 63, 26, 0.08) !important;
        padding-top: calc(env(safe-area-inset-top, 0px) + 0.6rem) !important; /* iOS notch safe area padding */
        box-shadow: 0 4px 20px rgba(30, 63, 26, 0.03) !important;
    }

    /* Bottom Nav Bar Premium Design */
    .mobile-bottom-nav {
        bottom: 20px;
        left: 20px;
        right: 20px;
        height: calc(68px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.92) !important;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: 28px;
        border: 1px solid rgba(30, 63, 26, 0.08) !important;
        box-shadow: 0 12px 40px rgba(30, 63, 26, 0.18) !important;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    /* Active Indicator Pill for Bottom Nav items */
    .mobile-nav-item.active::after {
        content: '';
        position: absolute;
        bottom: 4px;
        width: 16px;
        height: 3px;
        background: var(--ybll-gold, #D4AF37);
        border-radius: 10px;
        box-shadow: 0 1px 6px rgba(212, 175, 55, 0.6);
        animation: activePillPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .mobile-nav-item.active i {
        color: var(--ybll-green) !important;
        transform: translateY(-4px) scale(1.12);
        filter: drop-shadow(0 2px 8px rgba(45, 90, 39, 0.2));
    }

    .mobile-nav-item.active span {
        color: var(--ybll-green-dark) !important;
        transform: translateY(-2px);
        font-weight: 700;
    }

    @keyframes activePillPop {
        0% { transform: scaleX(0); opacity: 0; }
        100% { transform: scaleX(1); opacity: 1; }
    }
    
    body {
        overscroll-behavior-y: contain;
    }
}

/* ==========================================================================
   MOBILE & PWA BOTTOM SHEET / MENU DRAWER OFF CANVAS (LIGHT THEME REDESIGN)
   ========================================================================== */
.mobile-menu-offcanvas {
    height: 100vh !important;
    height: 100dvh !important;
    width: 100vw !important;
    background: #ffffff !important; /* Premium clean white */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 0 !important;
    border: none !important;
    color: var(--ybll-dark) !important;
    box-shadow: none !important;
    z-index: 1060 !important;
}

.mobile-menu-offcanvas .offcanvas-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 1.25rem 1.5rem;
    padding-top: calc(env(safe-area-inset-top, 0px) + 1.25rem) !important; /* iOS notch safe padding */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.offcanvas-header-info {
    line-height: 1.3;
}

.mobile-menu-offcanvas .offcanvas-title {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--ybll-dark);
    font-size: 1.05rem;
    margin: 0;
    letter-spacing: 0.5px;
}

.offcanvas-subtitle {
    font-size: 0.7rem;
    color: var(--ybll-green);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: block;
    margin-top: 2px;
}

.btn-close-custom {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--ybll-dark);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-close-custom:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #000000;
}

.mobile-menu-offcanvas .offcanvas-body {
    padding: 1.5rem;
}

.mobile-submenu-container {
    display: flex;
    flex-direction: column;
    gap: 1.65rem;
}

.mobile-drawer-group {
    display: flex;
    flex-direction: column;
}

.mobile-drawer-group-title {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ybll-green); /* Emerald brand green */
    letter-spacing: 1.8px;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    padding-bottom: 0.35rem;
}

.mobile-search-wrapper {
    margin-bottom: 0.5rem;
}

.mobile-search-wrapper .input-group {
    background: #f3f5f3; /* Light gray natural background */
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    overflow: hidden;
}

.mobile-search-wrapper .input-group-text {
    background: transparent;
    border: none;
    color: rgba(42, 54, 41, 0.4);
    padding-left: 1rem;
    font-size: 1rem;
}

.mobile-search-wrapper .form-control {
    background: transparent;
    border: none;
    color: var(--ybll-dark);
    font-size: 0.88rem;
    padding: 0.65rem 0.75rem 0.65rem 0.25rem;
    box-shadow: none !important;
}

.mobile-search-wrapper .form-control::placeholder {
    color: rgba(42, 54, 41, 0.4);
}

/* App Launcher Grid Layout */
.mobile-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px 10px;
    padding: 0.25rem 0;
}

.mobile-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    gap: 6px;
    text-align: center;
    transition: all 0.22s ease;
}

.mobile-grid-icon-box {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: rgba(45, 90, 39, 0.04); /* Light green-mint soft card background */
    border: 1px solid rgba(45, 90, 39, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--ybll-green);
    transition: all 0.22s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 10px rgba(45, 90, 39, 0.04);
}

.mobile-grid-item:hover .mobile-grid-icon-box,
.mobile-grid-item:focus .mobile-grid-icon-box,
.mobile-grid-item.active .mobile-grid-icon-box {
    background: var(--ybll-green);
    color: #ffffff !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(45, 90, 39, 0.3);
    border-color: transparent;
}

.mobile-grid-title {
    font-size: 0.66rem;
    font-weight: 550;
    color: var(--ybll-dark);
    font-family: var(--font-primary);
    text-align: center;
    width: 100%;
    display: block;
    line-height: 1.25;
    overflow-wrap: break-word;
    word-break: break-word;
    transition: color 0.22s ease;
}

.mobile-grid-item:hover .mobile-grid-title,
.mobile-grid-item.active .mobile-grid-title {
    color: var(--ybll-green);
    font-weight: 600;
}

/* Global Select2 Custom Overrides - YBLL Premium Theme */
.select2-container--bootstrap-5 .select2-selection {
    border: 1.5px solid rgba(0, 0, 0, 0.08) !important;
    font-size: 0.85rem !important;
    min-height: 38px !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 8px !important;
    background-color: #ffffff !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

.select2-container--bootstrap-5 .select2-selection--single {
    height: 38px !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple {
    height: auto !important;
    padding: 3px 6px !important;
}

/* Style Select2 Multiple Choice Badges (Premium YBLL theme) */
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    background-color: var(--ybll-green-light) !important;
    color: var(--ybll-green-dark) !important;
    border: 1px solid rgba(45, 90, 39, 0.15) !important;
    border-radius: 6px !important;
    padding: 2px 8px !important;
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin: 2px !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
    color: #e74c3c !important;
    background: none !important;
    border: none !important;
    font-weight: bold !important;
    margin-right: 0 !important;
    padding: 0 !important;
    cursor: pointer !important;
    font-size: 0.9rem !important;
    order: 2; /* Position the close button after the text */
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #c0392b !important;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: var(--ybll-green) !important;
    box-shadow: 0 0 0 4px rgba(45, 90, 39, 0.08) !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    line-height: 22px !important;
    padding-left: 0 !important;
    color: var(--ybll-dark) !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    height: 35px !important;
}

.select2-container--bootstrap-5 .select2-dropdown {
    border-radius: 8px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    z-index: 999999 !important;
}

.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option {
    font-size: 0.85rem !important;
    padding: 6px 12px !important;
}

.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--highlighted {
    background-color: var(--ybll-green) !important;
    color: #ffffff !important;
}

.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option[aria-selected="true"],
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--selected {
    background-color: var(--ybll-green-light) !important;
    color: var(--ybll-green-dark) !important;
}

.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option[aria-selected="true"].select2-results__option--highlighted,
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--selected.select2-results__option--highlighted {
    background-color: var(--ybll-green) !important;
    color: #ffffff !important;
}

.select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field {
    border: 1.5px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 6px !important;
    font-size: 0.85rem !important;
    padding: 0.35rem 0.6rem !important;
}

.select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field:focus {
    border-color: var(--ybll-green) !important;
    box-shadow: 0 0 0 4px rgba(45, 90, 39, 0.08) !important;
    outline: 0;
}

/* Global Premium Button Action Styling */
.btn-action {
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    font-size: 0.85rem;
}
.btn-action i {
    font-size: 0.9rem;
}

/* Force hide original select elements when select2 is active */
select.select2-hidden-accessible {
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    -webkit-clip-path: inset(50%) !important;
    clip-path: inset(50%) !important;
    height: 1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    width: 1px !important;
    white-space: nowrap !important;
}

/* Force Select2 container to be 100% width to prevent layout collapse in hidden containers/modals */
.select2-container {
    width: 100% !important;
}

/* Fix Select2 dropdown cutting off inside Bootstrap Modals globally */
.modal-content {
    overflow: visible !important;
}

/* Stacked modals visual defocus */
.modal .modal-dialog {
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                filter 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.modal.modal-under .modal-dialog {
    opacity: 0.6 !important;
    filter: blur(1px) !important;
    transform: scale(0.96) !important;
}

.modal.modal-under {
    pointer-events: none !important;
}

/* Ensure SweetAlert2 is always on top of all modals (including stacked modals) */
div.swal2-container {
    z-index: 9999 !important;
}

/* Isolated Scroll Layout for Publish Portal PWA */
.publish-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* Standalone PWA Optimizations for Publish Portal */
@media (display-mode: standalone) {
    .publish-layout {
        padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    }
    
    /* Extra padding inside publish sidebar to clear the mobile home indicator bar */
    .publish-layout .sidebar-content {
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 24px) !important;
    }
}

/* Push Leaflet controls above floating bottom navigation bar on mobile */
@media (max-width: 767.98px) {
    .leaflet-bottom.leaflet-left {
        bottom: calc(66px + env(safe-area-inset-bottom, 0px)) !important;
        left: 8px !important;
    }
    .leaflet-bottom.leaflet-right {
        bottom: calc(66px + env(safe-area-inset-bottom, 0px)) !important;
        right: 8px !important;
    }
    
    /* Make sure publish layout sidebar content has padding-bottom for the floating tab bar */
    .publish-layout .sidebar-content {
        padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
    }
    
    /* Hide floating map legend overlay on mobile screens */
    .map-legend {
        display: none !important;
    }
}

/* ==========================================================================
   PREMIUM SIDEBAR SEARCH & PWA MODE ADJUSTMENTS
   ========================================================================== */

/* Sidebar search box container */
.sidebar-search-wrapper {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 0.25rem;
}

/* Dark glassmorphic input group for sidebar */
.input-group-sidebar {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
}

.input-group-sidebar:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.input-group-sidebar:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(197, 160, 89, 0.45) !important;
    box-shadow: 0 0 12px rgba(197, 160, 89, 0.15);
}

.input-group-sidebar .input-group-text {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    padding-left: 0.85rem;
    padding-right: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-group-sidebar .form-control {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 0.82rem;
    padding: 0.55rem 0.75rem 0.55rem 0.25rem;
    box-shadow: none !important;
}

.input-group-sidebar .form-control::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

/* When search query is active: transform desktop flyouts into inline accordions */
.admin-sidebar.search-active .menu-item-has-submenu .menu-submenu-flyout {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    background: rgba(255, 255, 255, 0.01) !important;
    border-left: none !important;
    box-shadow: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    padding: 0.25rem 0.25rem 0.5rem 1.25rem !important;
    display: block !important;
}

.admin-sidebar.search-active .menu-item-has-submenu .menu-submenu-flyout::before {
    display: none !important;
}

.admin-sidebar.search-active .submenu-header-title {
    display: none !important;
}

.admin-sidebar.search-active .submenu-group {
    margin-bottom: 0.5rem !important;
}

.admin-sidebar.search-active .submenu-group-title {
    margin-bottom: 0.25rem !important;
    font-size: 0.62rem !important;
    color: rgba(255, 255, 255, 0.25) !important;
    padding-left: 0.45rem;
}

.admin-sidebar.search-active .submenu-card-item {
    margin-bottom: 0.25rem !important;
    padding: 0.4rem 0.6rem !important;
    background-color: rgba(255, 255, 255, 0.01) !important;
}

/* Section group wrapper styling */
.sidebar-section-group:first-of-type .menu-section-title {
    border-top: none;
    margin-top: 0;
    padding-top: 0.25rem;
}

.input-group-sidebar .form-control {
    padding-right: 2.2rem !important;
}

.mobile-search-wrapper .form-control {
    padding-right: 2.2rem !important;
}

/* Rotate arrow when matching and showing inline submenu list */
.admin-sidebar.search-active .menu-item-has-submenu .menu-arrow {
    transform: rotate(90deg) !important;
    opacity: 0.6 !important;
    color: var(--ybll-gold) !important;
}

/* PWA mode standalone adjustment: top spacing for search wrapper */
@media all and (display-mode: standalone) {
    .sidebar-search-wrapper {
        margin-top: 0.25rem;
    }
}

/* ==========================================================================
   ADMIN PANEL FOOTER STYLING (MODERN FIXED BAR)
   ========================================================================== */
.admin-footer {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-family: var(--font-primary);
    z-index: 10;
    flex-shrink: 0;
    font-size: 0.7rem;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px)) !important;
}

.admin-footer .copyright-text {
    font-size: 0.7rem;
    color: #6c7a68;
}

.admin-footer .geoportal-metadata {
    font-size: 0.7rem;
    color: #6c7a68 !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-footer .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.admin-footer .telemetry-divider {
    width: 1px;
    height: 10px;
    background-color: rgba(0, 0, 0, 0.08);
}

.admin-footer strong {
    color: var(--ybll-green-dark);
}

/* Standalone PWA adjustments: add bottom safe area inset spacing */
@media all and (display-mode: standalone) {
    .admin-footer {
        padding-bottom: calc(0.65rem + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* Global Custom Styles for DataTables Info & Pagination Sizing */
.dataTables_info, .dt-info {
    font-size: 0.85rem !important;
    color: #6c7a68 !important;
    font-weight: 500;
}

.dataTables_paginate, .dt-paging,
.dataTables_paginate .page-link, .dt-paging .page-link {
    font-size: 0.85rem !important;
}

/* ==========================================================================
   GLOBAL EXPORT DROPDOWN COMPONENT STYLES
   ========================================================================== */
.admin-card {
    overflow: visible !important;
}
.bg-success-soft {
    background-color: rgba(25, 135, 84, 0.12) !important;
}
.bg-danger-soft {
    background-color: rgba(220, 53, 69, 0.12) !important;
}
.export-option-item {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 8px;
}
.export-option-item:hover {
    background-color: #F8FAFC !important;
    transform: translateX(3px);
}
.export-option-item:hover .export-icon-box {
    transform: scale(1.08);
}
.export-icon-box {
    transition: transform 0.2s ease;
}
.export-dropdown-menu {
    min-width: 250px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(45, 90, 39, 0.15) !important;
    border-radius: 12px;
    z-index: 1060 !important;
}

/* ==========================================================================
   GLOBAL PREMIUM TABS COMPONENT STANDARDIZATION (.nav-tabs-ybll & .nav-tabs)
   ========================================================================== */
.nav-tabs-ybll,
.nav-tabs {
    border-bottom: 2px solid rgba(45, 90, 39, 0.12) !important;
    gap: 6px;
    padding-bottom: 0;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.nav-tabs-ybll::-webkit-scrollbar,
.nav-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.nav-tabs-ybll .nav-item,
.nav-tabs .nav-item {
    margin-bottom: -2px;
    flex-shrink: 0;
}

.nav-tabs-ybll .nav-link,
.nav-tabs .nav-link {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.88rem;
    color: #64748B !important;
    background-color: transparent !important;
    border: none !important;
    border-bottom: 3px solid transparent !important;
    padding: 0.75rem 1.25rem !important;
    border-radius: 8px 8px 0 0 !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    white-space: nowrap;
}

.nav-tabs-ybll .nav-link:hover,
.nav-tabs .nav-link:hover {
    color: var(--ybll-green) !important;
    background-color: rgba(45, 90, 39, 0.05) !important;
    border-bottom-color: rgba(45, 90, 39, 0.25) !important;
}

.nav-tabs-ybll .nav-link.active,
.nav-tabs .nav-link.active {
    color: var(--ybll-green-dark) !important;
    background-color: #ffffff !important;
    border-bottom: 3px solid var(--ybll-green) !important;
    font-weight: 700 !important;
    box-shadow: 0 -3px 12px rgba(45, 90, 39, 0.08) !important;
}

.nav-tabs-ybll .nav-link i,
.nav-tabs .nav-link i {
    font-size: 1rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-tabs-ybll .nav-link:hover i,
.nav-tabs .nav-link:hover i {
    transform: translateY(-1px);
}

.nav-tabs-ybll .nav-link.active i,
.nav-tabs .nav-link.active i {
    color: var(--ybll-green) !important;
}

/* Badge inside Nav Tabs */
.nav-tabs-ybll .nav-link .badge,
.nav-tabs .nav-link .badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.55rem;
    border-radius: 50rem;
    transition: all 0.25s ease;
    background-color: rgba(100, 116, 139, 0.12);
    color: #475569;
}

.nav-tabs-ybll .nav-link.active .badge,
.nav-tabs .nav-link.active .badge {
    background-color: var(--ybll-green) !important;
    color: #ffffff !important;
}

/* ==========================================================================
   GLOBAL PREMIUM EXECUTIVE KPI CARDS (.kpi-card-ybll)
   ========================================================================== */
.kpi-card-ybll {
    background: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 1.15rem 1.25rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.kpi-card-ybll::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--card-accent-color, var(--ybll-green));
    transition: height 0.25s ease;
}

.kpi-card-ybll:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(45, 90, 39, 0.1);
    border-color: rgba(45, 90, 39, 0.2);
}

.kpi-card-ybll:hover::before {
    height: 4px;
}

.kpi-card-ybll .kpi-label {
    font-family: var(--font-heading);
    font-size: 0.73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #64748B;
    margin-bottom: 6px;
}

.kpi-card-ybll .kpi-value {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.15;
    color: #1E293B;
    margin: 0;
}

.kpi-card-ybll .kpi-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.kpi-card-ybll:hover .kpi-icon-box {
    transform: scale(1.1) rotate(3deg);
}

.kpi-card-ybll .kpi-footer {
    margin-top: 0.85rem;
    padding-top: 0.65rem;
    border-top: 1px dashed #E2E8F0;
    font-size: 0.78rem;
    color: #64748B;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Accent Variants */
.kpi-card-ybll.accent-success { --card-accent-color: #2D5A27; }
.kpi-card-ybll.accent-success .kpi-value { color: #1E3F1A; }
.kpi-card-ybll.accent-success .kpi-icon-box { background-color: rgba(45, 90, 39, 0.08); color: #2D5A27; }

.kpi-card-ybll.accent-primary { --card-accent-color: #2563EB; }
.kpi-card-ybll.accent-primary .kpi-value { color: #1E40AF; }
.kpi-card-ybll.accent-primary .kpi-icon-box { background-color: rgba(37, 99, 235, 0.08); color: #2563EB; }

.kpi-card-ybll.accent-warning { --card-accent-color: #D97706; }
.kpi-card-ybll.accent-warning .kpi-value { color: #B45309; }
.kpi-card-ybll.accent-warning .kpi-icon-box { background-color: rgba(217, 119, 6, 0.08); color: #D97706; }

.kpi-card-ybll.accent-danger { --card-accent-color: #E11D48; }
.kpi-card-ybll.accent-danger .kpi-value { color: #BE123C; }
.kpi-card-ybll.accent-danger .kpi-icon-box { background-color: rgba(225, 29, 72, 0.08); color: #E11D48; }