/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Enterprise Color Palette (Inspired by WD-ERP) */
    --primary: #1A365D;
    --primary-dark: #112a4a;
    --primary-light: #2a4c7e;
    --secondary: #2D3748;
    --accent: #D97706;
    
    /* Sidebar (Dark Theme) */
    --side-bg: #1A202C; /* Deep Dark Gray/Blue */
    --side-bg-hover: #2D3748;
    --side-active: #2C5282;
    --side-text: #E2E8F0;
    --side-text-muted: #A0AEC0;
    
    /* Main Content */
    --bg-main: #F7FAFC;
    --surface: #FFFFFF;
    --border: #E2E8F0;
    
    /* Text */
    --text-primary: #1A202C;
    --text-secondary: #4A5568;
    --text-muted: #718096;
    
    /* Status */
    --success: #38A169;
    --danger: #E53E3E;
    --warning: #DD6B20;
    --info: #3182CE;
    
    /* Shadows & Radius */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- THEME-ALIGNED CUSTOM SCROLLBAR --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1; /* Subtle default */
    border-radius: 10px;
    border: 2px solid var(--bg-main);
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* Sidebar Specific Scrollbar (Dark Theme Seamless Blend) */
.sidebar,
.sidebar-nav {
    scrollbar-width: thin;
    scrollbar-color: #283344 #1a202c;
}

.sidebar-nav::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: #1a202c;
    border-radius: 8px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: #283344;
    border-radius: 8px;
    border: 1px solid #1a202c;
    transition: background 0.2s;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: #38465c;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
    box-sizing: border-box;
}

input, button, select, textarea, optgroup {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 100%;
    box-sizing: border-box;
}

/* Layout Wrapper */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* --- ADVANCED SIDEBAR (DARK) --- */
.sidebar {
    width: 270px;
    background-color: var(--side-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}

.sidebar.minimized {
    width: 78px;
    overflow: visible;
}

.sidebar.minimized .sidebar-nav {
    overflow: visible;
}

/* Brand Header */
.sidebar-header {
    padding: 20px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 75px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    transition: padding 0.25s ease;
}

.sidebar.minimized .sidebar-header {
    padding: 16px 8px;
    justify-content: center;
}

.sidebar-brand-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    transition: opacity 0.2s ease;
}

.sidebar.minimized .sidebar-brand-wrapper {
    display: none;
}

.logo-container {
    width: 38px;
    height: 38px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text {
    font-weight: 800;
    font-size: 1.1rem;
    white-space: nowrap;
    letter-spacing: -0.5px;
    transition: opacity 0.2s ease;
}

.sidebar-toggle {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: white;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.sidebar.minimized .sidebar-toggle i {
    transform: rotate(180deg);
}

.sidebar-close-btn {
    display: none;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: white;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sidebar-close-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #f87171;
}

.sidebar-backdrop {
    display: none;
}

.mobile-topbar {
    display: none;
}

/* Dashboard Adaptive Grids */
.dashboard-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 32px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.dashboard-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 24px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.dashboard-content-grid > div {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Responsive Form Grids */
.form-layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

@media (max-width: 1100px) {
    .form-layout-grid {
        grid-template-columns: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }
}

.form-layout-grid > div {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.form-row-2col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    margin-bottom: 24px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.form-row-3col {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.form-row-amount-date {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 24px;
    margin-bottom: 24px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Nav Menu */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 10px;
}

.nav-section-label {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--side-text-muted);
    font-weight: 800;
    letter-spacing: 1px;
    margin: 18px 12px 8px;
    transition: opacity 0.2s;
}

.sidebar.minimized .nav-section-label {
    display: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    color: var(--side-text);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 13.5px;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    background-color: var(--side-bg-hover);
    color: #ffffff;
    transform: translateX(2px);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(44, 82, 130, 0.35);
}

.nav-link i {
    font-size: 17px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.nav-link-text {
    white-space: nowrap;
    transition: opacity 0.2s;
}

.sidebar.minimized .nav-link {
    justify-content: center;
    padding: 12px 0;
    width: 100%;
}

.sidebar.minimized .nav-link:hover {
    transform: none;
}

.sidebar.minimized .nav-link-text {
    display: none;
}

.sidebar.minimized .nav-link i {
    font-size: 19px;
    width: auto;
    margin: 0;
}

/* Floating Tooltip for Minimized Sidebar */
.sidebar.minimized .nav-link[data-tooltip]::after,
.sidebar.minimized .user-profile-card[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%) scale(0.92);
    background: #0f172a;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 99999;
}

.sidebar.minimized .nav-link[data-tooltip]::before,
.sidebar.minimized .user-profile-card[data-tooltip]::before {
    content: '';
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    border-width: 5px 6px 5px 0;
    border-style: solid;
    border-color: transparent #0f172a transparent transparent;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease;
    z-index: 99999;
}

.sidebar.minimized .nav-link[data-tooltip]:hover::after,
.sidebar.minimized .user-profile-card[data-tooltip]:hover::after,
.sidebar.minimized .nav-link[data-tooltip]:hover::before,
.sidebar.minimized .user-profile-card[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

.nav-badge {
    margin-left: auto;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    line-height: 1.3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.sidebar.minimized .nav-badge {
    margin-left: 0;
    position: absolute;
    top: 8px;
    right: 16px;
    width: 8px;
    height: 8px;
    padding: 0;
    font-size: 0;
    border-radius: 50%;
    border: 2px solid var(--side-bg);
}

/* Sidebar Footer (Profile) */
.sidebar-footer {
    padding: 14px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.user-profile-card {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: visible;
    position: relative;
}

.user-profile-card:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar.minimized .user-profile-card {
    justify-content: center;
    padding: 8px 0;
}

.user-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.user-info-sidebar {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    color: white;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    color: var(--side-text-muted);
    font-size: 11px;
    white-space: nowrap;
}

.sidebar.minimized .user-info-sidebar {
    display: none;
}

/* --- MAIN CONTENT AREA --- */
.main-content {
    flex: 1;
    min-width: 0;
    margin-left: 270px;
    padding: 32px;
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: calc(100% - 270px);
    width: calc(100% - 270px);
    box-sizing: border-box;
}

.sidebar.minimized ~ .main-content {
    margin-left: 78px;
    max-width: calc(100% - 78px);
    width: calc(100% - 78px);
}

/* Header & Typography */
.page-header {
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.page-header > div:first-child {
    min-width: 0;
    max-width: 100%;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 6px rgba(44, 82, 130, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(44, 82, 130, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(44, 82, 130, 0.05);
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}

.table-responsive::-webkit-scrollbar {
    height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-modern {
    width: 100%;
    min-width: 560px;
    border-collapse: separate;
    border-spacing: 0;
}

.table-modern th {
    background: #F8FAFC;
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
    vertical-align: middle;
    white-space: nowrap;
}

.table-modern td {
    padding: 14px 16px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    background: white;
    vertical-align: middle;
}

.table-modern tr:hover td {
    background: #F8FAFC;
}

.table-modern tr:last-child td {
    border-bottom: none;
}

th {
    background: #F8FAFC;
    padding: 14px 20px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
    vertical-align: middle;
    white-space: nowrap;
}

td {
    padding: 16px 20px;
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    background: white;
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #F1F5F9;
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
}

.badge-success { background: #DCFCE7; color: #15803D; }
.badge-danger { background: #FEE2E2; color: #B91C1C; }
.badge-warning { background: #FEF3C7; color: #B45309; }
.badge-info { background: #DBEAFE; color: #1D4ED8; }

/* Dashboard Specific Extras */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-icon-bg {
    position: absolute;
    right: -10px;
    bottom: -10px;
    font-size: 5rem;
    opacity: 0.05;
    transform: rotate(-15deg);
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-up {
    animation: fadeInUp 0.5s ease forwards;
}

/* Login Overrides */
body.login-body {
    background: #0f172a !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.app-container.login-page {
    width: 100% !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    min-height: -webkit-fill-available !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    background: #0f172a !important;
    margin: 0 !important;
    padding: 16px !important;
    box-sizing: border-box !important;
    position: relative !important;
    overflow: hidden !important;
}

.auth-card {
    width: 100%;
    max-width: 380px;
    padding: 28px 24px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin: auto !important;
    box-sizing: border-box;
}

/* ─────────────────────────────────────────────────────────────
   MOBILE & TABLET RESPONSIVE SYSTEM
   ───────────────────────────────────────────────────────────── */

/* Medium Desktop / Small Laptop Adjustments (<= 1200px) */
@media (max-width: 1200px) {
    .dashboard-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
        margin-bottom: 24px;
    }
}

/* Tablet & Mobile Screens (<= 991px) */
@media (max-width: 991px) {
    /* Prevent horizontal page wobble */
    html, body {
        overflow-x: hidden;
        width: 100%;
    }

    body.sidebar-open {
        overflow: hidden !important;
        touch-action: none;
    }

    /* Mobile Topbar */
    .mobile-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 62px;
        background: rgba(15, 23, 42, 0.96);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding: 0 16px;
        z-index: 9999;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    }

    .mobile-topbar-left {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .mobile-menu-btn {
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.12);
        color: #ffffff;
        width: 38px;
        height: 38px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 1.1rem;
        position: relative;
        transition: all 0.2s ease;
        flex-shrink: 0;
    }

    .mobile-menu-btn:hover,
    .mobile-menu-btn:active {
        background: rgba(255, 255, 255, 0.18);
        transform: scale(0.96);
    }

    .mobile-menu-dot {
        position: absolute;
        top: 6px;
        right: 6px;
        width: 8px;
        height: 8px;
        background: #f59e0b;
        border-radius: 50%;
        box-shadow: 0 0 6px #f59e0b;
        animation: pulseDot 2s infinite;
    }

    @keyframes pulseDot {
        0%, 100% { transform: scale(1); opacity: 1; }
        50% { transform: scale(1.3); opacity: 0.6; }
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        text-decoration: none;
        color: #ffffff;
    }

    .mobile-logo-wrap {
        width: 32px;
        height: 32px;
        background: #000000;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 4px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    }

    .mobile-logo-wrap img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .mobile-brand-title {
        font-weight: 800;
        font-size: 1rem;
        letter-spacing: -0.4px;
        color: #ffffff;
        white-space: nowrap;
    }

    .mobile-topbar-right {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .mobile-user-pill {
        display: flex;
        align-items: center;
        gap: 8px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.12);
        padding: 4px 10px 4px 4px;
        border-radius: 20px;
        cursor: pointer;
        transition: background 0.2s;
    }

    .mobile-user-pill:active {
        background: rgba(255, 255, 255, 0.16);
    }

    .mobile-user-avatar {
        width: 28px;
        height: 28px;
        background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
        border-radius: 50%;
        color: #ffffff;
        font-weight: 800;
        font-size: 0.8rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-logout-icon {
        font-size: 0.8rem;
        color: var(--side-text-muted);
    }

    /* Sidebar Off-Canvas Drawer */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        height: 100dvh !important;
        width: 290px !important;
        max-width: 86vw !important;
        z-index: 10001 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
        box-shadow: none !important;
        overflow-y: hidden;
    }

    .sidebar.mobile-show {
        transform: translateX(0) !important;
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.6) !important;
    }

    /* On mobile, reset any minimized styles so menu looks fully expanded */
    .sidebar.minimized {
        width: 290px !important;
        max-width: 86vw !important;
    }

    .sidebar.minimized .sidebar-brand-wrapper {
        display: flex !important;
    }

    .sidebar.minimized .nav-section-label {
        display: block !important;
    }

    .sidebar.minimized .nav-link-text {
        display: inline !important;
    }

    .sidebar.minimized .nav-link {
        justify-content: flex-start !important;
        padding: 11px 14px !important;
        width: auto !important;
    }

    .sidebar.minimized .nav-link i {
        font-size: 17px !important;
        width: 22px !important;
        margin-right: 0 !important;
    }

    .sidebar.minimized .user-info-sidebar {
        display: flex !important;
    }

    .sidebar.minimized .user-profile-card {
        justify-content: flex-start !important;
        padding: 10px 12px !important;
    }

    .sidebar.minimized .nav-badge {
        position: static !important;
        width: auto !important;
        height: auto !important;
        padding: 2px 8px !important;
        font-size: 11px !important;
        border-radius: 10px !important;
        border: none !important;
        margin-left: auto !important;
    }

    .sidebar-toggle {
        display: none !important;
    }

    .sidebar-close-btn {
        display: flex !important;
    }

    /* Backdrop Overlay */
    .sidebar-backdrop {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        background: rgba(2, 6, 23, 0.7);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 10000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.28s;
    }

    .sidebar-backdrop.active {
        opacity: 1;
        visibility: visible;
    }

    /* Main Content Area adjustments on Mobile */
    .main-content {
        margin-left: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 16px 14px 40px !important;
        padding-top: calc(62px + 16px) !important;
        box-sizing: border-box !important;
        min-height: 100vh;
        overflow-x: hidden !important;
    }

    /* Dashboard Content Layout on Mobile/Tablet */
    .dashboard-content-grid {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 100% !important;
        gap: 20px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .dashboard-content-grid > div {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .card {
        padding: 18px 16px;
        margin-bottom: 18px;
        border-radius: 12px;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .card-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Form Layout Grid on Tablet / Mobile */
    .form-layout-grid {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 100% !important;
        gap: 20px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .form-layout-grid > div {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* Smartphone Screens (<= 768px) */
@media (max-width: 768px) {
    .form-row-2col,
    .form-row-3col,
    .form-row-amount-date {
        grid-template-columns: 100% !important;
        gap: 16px !important;
        margin-bottom: 16px !important;
    }

    .page-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 14px !important;
        margin-bottom: 20px !important;
    }

    .page-header > div:first-child {
        width: 100% !important;
    }

    .page-header > .btn,
    .page-header > a.btn {
        width: 100% !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }

    .page-title {
        font-size: 1.4rem !important;
        line-height: 1.25;
    }

    .header-actions {
        width: 100% !important;
    }

    .header-actions > div {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .header-actions .btn {
        flex: 1 1 140px !important;
        justify-content: center !important;
        padding: 10px 14px !important;
        font-size: 13.5px !important;
        white-space: nowrap;
    }

    .dashboard-metrics-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        margin-bottom: 20px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .stat-card {
        padding: 16px !important;
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .stat-value {
        font-size: 1.65rem !important;
        margin: 8px 0 !important;
    }

    .stat-icon-bg {
        font-size: 4rem !important;
        right: -8px !important;
        bottom: -8px !important;
    }

    /* Table adjustments */
    .table-responsive {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .table-modern {
        min-width: 520px !important;
        width: 100% !important;
    }

    .table-modern th,
    .table-modern td {
        padding: 11px 12px !important;
    }

    th {
        padding: 10px 12px !important;
        font-size: 11px !important;
    }

    td {
        padding: 12px 12px !important;
        font-size: 13px !important;
    }

    /* Touch input optimization */
    input, select, textarea {
        font-size: 16px !important; /* Prevents auto-zoom in iOS Safari */
    }

    /* Floating Helper Bot Mobile Optimization */
    #helper-orb {
        bottom: 18px !important;
        right: 18px !important;
        width: 50px !important;
        height: 50px !important;
    }

    .helper-orb-inner {
        width: 36px !important;
        height: 36px !important;
    }

    .helper-orb-img {
        width: 28px !important;
        height: 28px !important;
    }

    #helper-hud {
        bottom: 78px !important;
        right: 12px !important;
        left: 12px !important;
        width: auto !important;
        max-width: calc(100vw - 24px) !important;
        max-height: 75vh !important;
        border-radius: 18px !important;
    }
}

/* Small Smartphone Screens (<= 480px) */
@media (max-width: 480px) {
    .main-content {
        padding: 12px 10px 36px !important;
        padding-top: calc(62px + 12px) !important;
    }

    .page-title {
        font-size: 1.25rem !important;
    }

    .card {
        padding: 14px 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .table-responsive {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .table-modern {
        min-width: 500px !important;
    }

    .btn {
        padding: 9px 12px !important;
        font-size: 13px !important;
    }

    .header-actions .btn {
        flex: 1 1 100% !important;
    }
}

/* ── Action Buttons (global — used on project board, detail view, etc.) ── */
.btn-action {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 0.82rem;
    text-decoration: none;
}
.btn-delete { background: #FEF2F2; color: #EF4444; }
.btn-delete:hover { background: #EF4444; color: white; }
.btn-edit { background: #EFF6FF; color: #3B82F6; }
.btn-edit:hover { background: #3B82F6; color: white; }

/* ── Bank Quick Unlock & Fast Auth Components ── */
.bank-quick-screen {
    animation: bankFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
    padding: 4px 0;
}

@keyframes bankFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.bank-avatar-wrap {
    position: relative;
    width: 68px;
    height: 68px;
    margin: 0 auto 12px;
}

.bank-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.35);
    border: 2.5px solid #ffffff;
    letter-spacing: -0.5px;
}

.bank-bio-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #10b981;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.bank-user-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 2px;
    letter-spacing: -0.3px;
}

.bank-user-role {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0 0 10px;
    font-weight: 600;
}

.bank-auth-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 18px;
}

.btn-bank-primary-unlock {
    width: 100%;
    padding: 13px 16px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.3);
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.btn-bank-primary-unlock:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #1a365d 0%, #0f172a 100%);
    box-shadow: 0 14px 30px -5px rgba(26, 54, 93, 0.4);
}

.btn-bank-primary-unlock:active {
    transform: scale(0.98);
}

.btn-bank-icon-aura {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
    font-size: 1.3rem;
    flex-shrink: 0;
    position: relative;
}

.btn-bank-icon-aura::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 14px;
    border: 1.5px solid rgba(59, 130, 246, 0.5);
    animation: bankPulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes bankPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.12); opacity: 0.2; }
}

.btn-bank-text {
    flex: 1;
    min-width: 0;
}

.btn-bank-text strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.btn-bank-text span {
    display: block;
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 1px;
}

.bank-alt-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.btn-bank-pill {
    padding: 9px 12px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #1e293b;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.btn-bank-pill:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

.bank-bottom-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.btn-bank-link {
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
    padding: 4px 6px;
}

.btn-bank-link:hover {
    color: #0f172a;
}

.auth-separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 14px 0 12px;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.auth-separator::before,
.auth-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.auth-separator span {
    padding: 0 10px;
    color: #94a3b8;
}

.btn-fast-auth {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    box-sizing: border-box;
}

.btn-fast-auth:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn-fast-auth:active {
    transform: scale(0.99);
}

.btn-fast-auth-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(26, 54, 93, 0.1);
    color: #1a365d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.btn-fast-auth-content {
    flex: 1;
    min-width: 0;
}

.btn-fast-auth-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
}

.btn-fast-auth-desc {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-fast-auth-arrow {
    flex-shrink: 0;
}

/* ==========================================================================
   ADMIN NATIVE MOBILE APP NAVIGATION & ACTION SHEET DRAWER
   ========================================================================== */

/* Hidden on desktop (> 991px) */
.admin-mobile-bottom-bar,
.admin-more-sheet,
.admin-more-sheet-backdrop {
    display: none;
}

@media (max-width: 991px) {
    /* ─── Nav Mode: Modern App Bottom Bar ─── */
    html.nav-mode-app-bar .sidebar,
    body.nav-mode-app-bar .sidebar {
        display: none !important;
    }

    html.nav-mode-app-bar .sidebar-backdrop,
    body.nav-mode-app-bar .sidebar-backdrop {
        display: none !important;
    }

    html.nav-mode-app-bar .main-content,
    body.nav-mode-app-bar .main-content {
        padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important;
    }

    html.nav-mode-app-bar #helper-orb,
    body.nav-mode-app-bar #helper-orb {
        bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    }

    html.nav-mode-app-bar .admin-mobile-bottom-bar,
    body.nav-mode-app-bar .admin-mobile-bottom-bar {
        display: flex !important;
    }

    /* ─── Nav Mode: Classic Sidebar Drawer ─── */
    html.nav-mode-sidebar .admin-mobile-bottom-bar,
    body.nav-mode-sidebar .admin-mobile-bottom-bar {
        display: none !important;
    }

    /* Fixed Native Bottom App Navigation Bar */
    .admin-mobile-bottom-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: calc(60px + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: rgba(15, 23, 42, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
        z-index: 999900;
        align-items: center;
        justify-content: space-around;
        user-select: none;
        -webkit-user-select: none;
        box-sizing: border-box;
    }

    .admin-bottom-tab {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: #94a3b8;
        text-decoration: none;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 6px 0;
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        position: relative;
        -webkit-tap-highlight-color: transparent;
    }

    .admin-tab-icon-wrap {
        position: relative;
        font-size: 1.15rem;
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .admin-tab-label {
        font-size: 10px;
        font-weight: 700;
        font-family: 'Plus Jakarta Sans', sans-serif;
        letter-spacing: -0.2px;
        transition: color 0.2s;
    }

    .admin-bottom-tab.active {
        color: #4ade80;
    }

    .admin-bottom-tab.active .admin-tab-icon-wrap {
        transform: translateY(-2px);
        color: #4ade80;
    }

    .admin-bottom-tab.active::after {
        content: '';
        position: absolute;
        bottom: calc(3px + env(safe-area-inset-bottom, 0px));
        width: 4px;
        height: 4px;
        border-radius: 50%;
        background: #4ade80;
        box-shadow: 0 0 8px #4ade80;
    }

    .admin-tab-badge {
        position: absolute;
        top: -3px;
        right: -6px;
        background: #2c822c;
        color: #ffffff;
        font-size: 9px;
        font-weight: 900;
        padding: 1px 4px;
        border-radius: 8px;
        border: 1px solid #0f172a;
        line-height: 1.2;
    }

    .admin-tab-badge.badge-amber {
        background: #f59e0b;
    }

    .admin-tab-badge.badge-blue {
        background: #3b82f6;
    }

    .admin-tab-badge.badge-green {
        background: #10b981;
    }

    /* Bottom Sheet "More" Drawer Backdrop */
    .admin-more-sheet-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.65);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 999950;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .admin-more-sheet-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* Bottom Sheet "More" Drawer Panel */
    .admin-more-sheet {
        display: flex;
        flex-direction: column;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100vw;
        max-width: 100vw;
        min-width: 100vw;
        max-height: 88vh;
        max-height: 88dvh;
        box-sizing: border-box;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border-top: 1.5px solid rgba(255, 255, 255, 0.12);
        border-radius: 28px 28px 0 0;
        box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.5);
        z-index: 999960;
        padding: 12px 14px calc(24px + env(safe-area-inset-bottom, 0px));
        transform: translateY(100%);
        transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
        overflow-y: auto;
        overflow-x: hidden;
        margin: 0;
    }

    .admin-more-sheet * {
        box-sizing: border-box;
    }

    .admin-more-sheet.active {
        transform: translateY(0);
    }

    .admin-sheet-handle-wrap {
        width: 100%;
        display: flex;
        justify-content: center;
        padding: 4px 0 12px;
        cursor: pointer;
    }

    .admin-sheet-handle {
        width: 44px;
        height: 5px;
        background: rgba(255, 255, 255, 0.22);
        border-radius: 4px;
    }

    .admin-sheet-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        margin-bottom: 12px;
        min-width: 0;
        width: 100%;
        gap: 8px;
    }

    .admin-sheet-user {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
        flex: 1;
        overflow: hidden;
    }

    .admin-sheet-avatar {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        color: #ffffff;
        font-weight: 800;
        font-size: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
        flex-shrink: 0;
    }

    .admin-sheet-user > div {
        min-width: 0;
        flex: 1;
        overflow: hidden;
    }

    .admin-sheet-name {
        margin: 0;
        font-size: 14px;
        font-weight: 800;
        color: #f8fafc;
        font-family: 'Plus Jakarta Sans', sans-serif;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .admin-sheet-role {
        margin: 2px 0 0;
        font-size: 11px;
        color: #94a3b8;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .admin-sheet-close-btn {
        background: rgba(255, 255, 255, 0.08);
        border: none;
        color: #94a3b8;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 14px;
        transition: all 0.2s;
        flex-shrink: 0;
    }

    .admin-sheet-close-btn:active {
        background: rgba(255, 255, 255, 0.16);
        color: #ffffff;
    }

    .admin-sheet-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
        box-sizing: border-box;
    }

    @media (max-width: 360px) {
        .admin-sheet-grid {
            grid-template-columns: minmax(0, 1fr);
        }
    }

    .admin-sheet-tile {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 10px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.07);
        border-radius: 14px;
        text-decoration: none;
        color: #f8fafc;
        cursor: pointer;
        transition: all 0.2s ease;
        position: relative;
        text-align: left;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        overflow: hidden;
    }

    .admin-sheet-tile:active {
        background: rgba(255, 255, 255, 0.09);
        transform: scale(0.98);
        border-color: rgba(255, 255, 255, 0.15);
    }

    .admin-sheet-tile.active {
        background: rgba(16, 185, 129, 0.12);
        border-color: rgba(16, 185, 129, 0.35);
    }

    .admin-sheet-tile.tile-danger {
        background: rgba(239, 68, 68, 0.06);
        border-color: rgba(239, 68, 68, 0.18);
    }

    .admin-tile-icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        flex-shrink: 0;
    }

    .admin-tile-text {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
        overflow: hidden;
    }

    .admin-tile-title {
        font-size: 12px;
        font-weight: 700;
        color: #f8fafc;
        font-family: 'Plus Jakarta Sans', sans-serif;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .admin-tile-desc {
        font-size: 10px;
        color: #94a3b8;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .admin-tile-badge {
        background: #3b82f6;
        color: #ffffff;
        font-size: 10px;
        font-weight: 900;
        padding: 2px 6px;
        border-radius: 10px;
        line-height: 1.2;
        flex-shrink: 0;
    }

    .admin-tile-badge.badge-green {
        background: #10b981;
    }
}

/* ==========================================================================
   UNIVERSAL FORM CONTROLS, SEARCH BOXES & MODERN INPUT STYLING
   ========================================================================== */
.form-control,
input[type="text"]:not([class*="no-style"]),
input[type="search"]:not([class*="no-style"]),
input[type="password"]:not([class*="no-style"]),
input[type="email"]:not([class*="no-style"]),
input[type="url"]:not([class*="no-style"]),
input[type="number"]:not([class*="no-style"]),
input[type="date"]:not([class*="no-style"]),
textarea.form-control,
textarea:not([class*="no-style"]):not(.ql-editor) {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
    color: #1e293b;
    background-color: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, background-color 0.15s ease-in-out;
    box-sizing: border-box;
    font-family: inherit;
    outline: none;
}

.form-control:focus,
input[type="text"]:focus:not([class*="no-style"]),
input[type="search"]:focus:not([class*="no-style"]),
input[type="password"]:focus:not([class*="no-style"]),
input[type="email"]:focus:not([class*="no-style"]),
input[type="url"]:focus:not([class*="no-style"]),
input[type="number"]:focus:not([class*="no-style"]),
input[type="date"]:focus:not([class*="no-style"]),
textarea.form-control:focus,
textarea:focus:not([class*="no-style"]) {
    color: #0f172a;
    background-color: #ffffff;
    border-color: #3b82f6;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-select,
select.form-control,
select:not([class*="no-style"]) {
    display: block;
    width: 100%;
    padding: 10px 36px 10px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.5;
    color: #1e293b;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23475569' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px 10px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-sizing: border-box;
    font-family: inherit;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.form-select:focus,
select:focus:not([class*="no-style"]) {
    border-color: #3b82f6;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-label {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.search-box-wrapper,
.table-search-box,
.notes-search-wrap,
.inv-search-wrap,
.ledger-search-wrap,
.helper-search-wrap,
.emp-helper-search-wrap,
.team-search-wrap,
.mb-search-group,
.filter-search-box,
.leave-search-wrap,
.app-search-wrapper,
.gmail-search-input-wrap,
.premium-search-box {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.search-box-wrapper i,
.table-search-box i,
.notes-search-wrap i.search-icon,
.notes-search-wrap > i,
.inv-search-wrap i.search-icon,
.inv-search-wrap > i,
.ledger-search-wrap i.search-icon,
.ledger-search-wrap > i,
.helper-search-wrap > i,
.emp-helper-search-wrap > i,
.team-search-wrap > i,
.mb-search-group > i,
.filter-search-box > i,
.leave-search-wrap > i,
.app-search-wrapper > i,
.app-search-wrapper i.search-icon,
.premium-search-box i.search-icon {
    position: absolute !important;
    left: 13px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #94a3b8 !important;
    font-size: 0.85rem !important;
    pointer-events: none !important;
    z-index: 2 !important;
    line-height: 1 !important;
    margin: 0 !important;
}

.search-box-wrapper input,
.table-search-box input,
.notes-search-wrap input,
.notes-search-input,
.inv-search-wrap input,
.inv-search-input,
.ledger-search-wrap input,
.ledger-search-input,
.helper-search-input,
.emp-helper-search-input,
.team-search-wrap input,
.mb-search-group input,
.filter-search-box input,
.leave-search-box,
.app-search-input,
#docSearchInput,
#invSearchInput,
#ledgerSearchInput,
#employeeSearchInput,
#leaveSearchInput,
#payFilterSearch,
#crSearchInput,
#teamSearchInput,
#adminPushSearchInput {
    padding-left: 38px !important;
    border-radius: 10px;
    box-sizing: border-box !important;
}


