:root {
    --paper: #FAF8F5;
    --paper-dim: #F3EFEA;
    --navy-deep: #163A5E;
    --navy: #1D4533;
    --line: #E2D7CE;
    --ink: #14181F;
    --orange: #D47129;
    --font-body: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --bg-canvas: #F7EAE0;
    --bg-card: #ffffff;
    --border-subtle: #E2D7CE;
    --border-strong: #C4B5A8;
    --text-heading: #1D4533;
    --text-body: #2C3531;
    --text-muted: #66706B;
    --brand-primary: #1D4533;
    --brand-primary-hover: #143224;
    --brand-accent-bg: #EFE4DC;
    --sidebar-bg: #1D4533;
    --sidebar-text: #F7EAE0;
    --sidebar-hover: rgba(247, 234, 224, 0.12);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
    --radius-md: 4px;
    --radius-lg: 6px;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-canvas);
    color: var(--text-body);
    line-height: 1.45;
    font-size: 12px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Global 100% Full Width & Minimal Compact Layout Overrides */
.main-content,
.container,
.container-fluid,
.card,
div[style*="max-width"]:not(.select2-dropdown):not(.select2-container):not(.flatpickr-calendar):not(.select2-search):not(.auth-login-card):not([class*="auth-"]):not(.modal-dialog) {
    max-width: 100% !important;
    width: 100% !important;
}

.auth-login-card {
    width: 100% !important;
    max-width: 400px !important;
    margin: 0 auto !important;
}

.select2-dropdown {
    box-sizing: border-box !important;
    min-width: 180px !important;
    max-width: 360px !important;
    border: 1px solid #1D4533 !important;
    border-radius: 6px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
    z-index: 99999 !important;
}

.form-control, .voucher-card-input, input[type="text"], input[type="number"], input[type="date"], select, textarea {
    font-size: 12px !important;
    padding: 6px 10px !important;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background-color: #ffffff;
    color: #1e293b;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.form-control:focus, .voucher-card-input:focus, input[type="text"]:focus, input[type="number"]:focus, input[type="date"]:focus, select:focus, textarea:focus {
    border-color: #1D4533 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(29, 69, 51, 0.14) !important;
}

.form-control::placeholder, input::placeholder, textarea::placeholder {
    color: #94a3b8;
    font-size: 11.5px;
}

.select2-container--default .select2-selection--single {
    height: 32px !important;
    padding: 1px 4px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    background-color: #ffffff;
    transition: all 0.15s ease;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 28px !important;
    font-size: 12px !important;
    color: #1D4533 !important;
    font-weight: 600;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 30px !important;
}
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #1D4533 !important;
    box-shadow: 0 0 0 3px rgba(29, 69, 51, 0.14) !important;
    outline: none !important;
}

table th, .voucher-table th, .table th {
    padding: 8px 10px !important;
    font-size: 11.5px !important;
}
table td, .voucher-table td, .table td {
    padding: 5px 8px !important;
    font-size: 12px !important;
}

.btn, button[type="submit"], button[type="button"], a.btn {
    font-size: 12px !important;
    padding: 6px 14px !important;
}

.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
}

/* Sidebar Styling */
/* Sidebar Styling - Deep Forest Green & Warm Cream Modern Enterprise Theme */
.app-sidebar {
    width: 250px;
    min-width: 250px;
    background: linear-gradient(180deg, #132E22 0%, #0D2218 100%);
    color: #F7EAE0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
}

.sidebar-header {
    padding: 14px 14px 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.12);
}

.sidebar-brand {
    font-size: 16px;
    font-weight: 800;
    color: #FFFFFF;
    text-decoration: none;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.sidebar-brand-logo-img {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    object-fit: contain;
    padding: 2px;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
    flex-shrink: 0;
}

.sidebar-brand-text {
    font-size: 16px;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.3px;
}

.sidebar-brand-badge {
    font-size: 9.5px;
    font-weight: 800;
    background: rgba(247, 234, 224, 0.18);
    color: #F7EAE0;
    padding: 1.5px 5px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    margin-left: 2px;
    text-transform: uppercase;
}

.sidebar-close-btn {
    background: transparent;
    border: none;
    color: rgba(247, 234, 224, 0.7);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.sidebar-close-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-company-box {
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.06);
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid rgba(247, 234, 224, 0.15);
    font-size: 11.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    gap: 6px;
}

.sidebar-company-box:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(247, 234, 224, 0.28);
}

.sidebar-company-info {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    overflow: hidden;
}

.sidebar-company-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
    flex-shrink: 0;
}

.sidebar-company-name {
    font-weight: 700;
    color: #FFFFFF;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11.5px;
}

.sidebar-company-code-badge {
    background: rgba(247, 234, 224, 0.18);
    color: #F7EAE0;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    text-transform: uppercase;
}

.sidebar-switch-btn {
    font-size: 10px;
    color: #1D4533;
    text-decoration: none;
    background: #F7EAE0;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 700;
    transition: all 0.2s;
    white-space: nowrap;
}

.sidebar-switch-btn:hover {
    background: #FFFFFF;
    color: #122B20;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.sidebar-search-container {
    padding: 10px 12px 6px 12px;
}

.sidebar-search-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.sidebar-search-icon {
    position: absolute;
    left: 10px;
    color: rgba(247, 234, 224, 0.45);
    pointer-events: none;
}

.app-sidebar .sidebar-search-input,
input.sidebar-search-input,
#sidebarMenuSearch {
    width: 100% !important;
    background: rgba(255, 255, 255, 0.08) !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(247, 234, 224, 0.2) !important;
    border-radius: 6px !important;
    padding: 6px 10px 6px 32px !important;
    color: #F7EAE0 !important;
    font-size: 11.5px !important;
    outline: none !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
    height: auto !important;
    min-height: 30px !important;
    box-sizing: border-box !important;
}

.app-sidebar .sidebar-search-input::placeholder,
input.sidebar-search-input::placeholder,
#sidebarMenuSearch::placeholder {
    color: rgba(247, 234, 224, 0.5) !important;
    font-size: 11.5px !important;
}

.app-sidebar .sidebar-search-input:focus,
input.sidebar-search-input:focus,
#sidebarMenuSearch:focus {
    background: rgba(255, 255, 255, 0.14) !important;
    background-color: rgba(255, 255, 255, 0.14) !important;
    border-color: #F7EAE0 !important;
    color: #FFFFFF !important;
    box-shadow: 0 0 0 2px rgba(247, 234, 224, 0.25) !important;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 8px 16px 8px;
}

/* Custom Scrollbar for Sidebar Nav */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

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

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(247, 234, 224, 0.18);
    border-radius: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(247, 234, 224, 0.35);
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: 6px;
    color: rgba(247, 234, 224, 0.88);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 600;
    transition: all 0.15s ease;
}

.sidebar-nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    transform: translateX(2px);
}

.sidebar-nav-item.active {
    background: #1D4533;
    color: #FFFFFF;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(247, 234, 224, 0.2);
}

.sidebar-dropdown {
    width: 100%;
}

.sidebar-dropdown-btn {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: rgba(247, 234, 224, 0.88);
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.15s ease;
}

.sidebar-dropdown-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
}

.sidebar-dropdown.open .sidebar-dropdown-btn {
    background: rgba(0, 0, 0, 0.2);
    color: #FFFFFF;
    font-weight: 700;
}

.sidebar-dropdown-arrow {
    transition: transform 0.25s ease, opacity 0.2s ease;
    opacity: 0.7;
    flex-shrink: 0;
}

.sidebar-dropdown.open .sidebar-dropdown-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

.sidebar-dropdown-menu {
    display: none;
    background: transparent;
    padding: 2px 0 4px 6px;
    border-left: 1.5px solid rgba(247, 234, 224, 0.14);
    margin: 2px 0 4px 18px;
}

.sidebar-dropdown.open .sidebar-dropdown-menu {
    display: block;
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    margin: 1px 0;
    border-radius: 5px;
    color: rgba(247, 234, 224, 0.76);
    font-size: 11.5px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.sidebar-sublink:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(2px);
}

.sidebar-sublink.active {
    color: #FFFFFF;
    background: rgba(247, 234, 224, 0.16);
    font-weight: 700;
    border-left: 2px solid #F7EAE0;
}

.sidebar-badge {
    font-size: 9.5px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.sidebar-badge-cp { background: #ef4444; color: #fff; }
.sidebar-badge-cr { background: #16a34a; color: #fff; }
.sidebar-badge-bv { background: #0284c7; color: #fff; }
.sidebar-badge-jv { background: #8b5cf6; color: #fff; }
.sidebar-badge-ic { background: #f59e0b; color: #fff; }

.sidebar-divider {
    height: 1px;
    background: rgba(247, 234, 224, 0.08);
    margin: 5px 10px;
}

.sidebar-footer {
    padding: 10px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.sidebar-user-avatar {
    width: 26px;
    height: 26px;
    background: #F7EAE0;
    color: #1D4533;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 11.5px;
    flex-shrink: 0;
}

/* Main Workspace Content Area (Full 100% Width) */
.app-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-left: 0;
    min-height: 100vh;
    background-color: #f8fafc;
}

@media (min-width: 992px) {
    .app-sidebar ~ .app-content {
        margin-left: 250px;
    }
}

.app-topbar {
    background: #FFFFFF;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 16px;
    height: 52px;
    min-height: 52px;
    max-height: 52px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap !important;
    gap: 10px;
    box-sizing: border-box;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.topbar-left-section {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-shrink: 1;
}

.sidebar-toggle-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
}

.sidebar-toggle-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.topbar-right-section {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.topbar-desktop-title {
    font-size: 13px;
    font-weight: 700;
    color: #1D4533;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-brand-link {
    display: none;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: #1D4533;
    font-weight: 800;
    font-size: 13.5px;
    letter-spacing: -0.2px;
}

.topbar-brand-img {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    object-fit: contain;
    padding: 1px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.topbar-brand-logo {
    background: #1D4533;
    color: #F7EAE0;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
}

.topbar-company-chip {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 4px 10px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 320px;
    min-width: 0;
}

.topbar-company-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #16a34a;
    box-shadow: 0 0 5px #16a34a;
    flex-shrink: 0;
}

.topbar-company-text {
    font-size: 11.5px;
    font-weight: 700;
    color: #1D4533;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-company-badge {
    background: #1D4533;
    color: #FFFFFF;
    font-size: 9.5px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.topbar-superadmin-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    margin-right: 4px;
    transition: all 0.2s ease;
}

.topbar-superadmin-chip:hover {
    background: #ffe8a1;
    color: #533f03;
}

.topbar-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 3px 10px 3px 4px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    color: #1e293b;
    max-width: 220px;
    min-width: 0;
    overflow: hidden;
}

.topbar-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #1D4533;
    color: #F7EAE0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}

.topbar-username {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.topbar-user-badge {
    color: #64748b;
    font-size: 10px;
    font-weight: 600;
    flex-shrink: 0;
}

.topbar-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff1f2;
    border: 1px solid #ffe4e6;
    color: #e11d48;
    padding: 5px 12px;
    min-height: 28px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.topbar-logout-btn:hover {
    background: #e11d48;
    color: #ffffff;
    border-color: #e11d48;
    box-shadow: 0 2px 6px rgba(225, 29, 72, 0.25);
}

.main-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    flex: 1;
}

.container, .card {
    width: 100%;
    max-width: 100%;
    margin: 0 0 20px 0;
    padding: 18px 22px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.card-header {
    padding: 12px 18px;
    border-bottom: 1px solid #f1f5f9;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 14px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.header h1, .header h2, .card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: -0.2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-links a {
    color: #1D4533;
    text-decoration: none;
    font-weight: 600;
}

.nav-links a:hover {
    text-decoration: underline;
}

.alert {
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background-color: #fff1f2;
    color: #9f1239;
    border: 1px solid #fecdd3;
}

.alert-info {
    background-color: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.company-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.company-select-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.company-select-card:hover {
    border-color: #80bdff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.active-context-card {
    border: 2px solid #28a745;
    background-color: #f4fdf6;
}

.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 14px;
    margin-bottom: 16px;
    box-sizing: border-box;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.table {
    width: 100%;
    max-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 0;
    margin-bottom: 0;
    box-sizing: border-box;
    background: #ffffff;
}

.table th,
.table td {
    padding: 8px 12px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    font-variant-numeric: tabular-nums;
}

.table th,
.table thead th {
    background-color: #F7EAE0 !important;
    color: #1D4533 !important;
    font-weight: 700;
    border-bottom: 2px solid #1D4533;
    font-size: 11.5px !important;
    letter-spacing: 0.3px;
    white-space: nowrap;
    text-transform: uppercase;
}

.table tbody tr {
    transition: background-color 0.12s ease-in-out;
}

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

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

/* Tabular Numerics for Currency, Balances, & Financial Figures */
.table .text-end,
.table .text-right,
.voucher-table .text-end,
.voucher-table .text-right,
.numeric-cell,
.amount-cell,
td[class*="amount"],
td[class*="debit"],
td[class*="credit"],
td[class*="balance"],
th[class*="amount"],
th[class*="debit"],
th[class*="credit"],
th[class*="balance"] {
    text-align: right !important;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

/* Action Links and Badges within Data Grids */
.table td .btn,
.voucher-table td .btn,
.voucher-dir-table td .btn,
.table-action-btn {
    padding: 3px 8px !important;
    font-size: 11px !important;
    font-weight: 600;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.25;
}

/* Modern Enterprise Pagination */
.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    border-radius: 6px;
    gap: 4px;
    align-items: center;
    margin: 12px 0;
}

.page-item .page-link {
    position: relative;
    display: block;
    padding: 5px 11px;
    font-size: 11.5px;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    transition: all 0.15s ease-in-out;
}

.page-item .page-link:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

.page-item.active .page-link {
    background-color: #1D4533;
    border-color: #1D4533;
    color: #F7EAE0;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(29, 69, 51, 0.25);
}

.page-item.disabled .page-link {
    color: #94a3b8;
    pointer-events: none;
    background-color: #f8fafc;
    border-color: #e2e8f0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.15s ease-in-out;
    white-space: nowrap;
    line-height: 1.4;
    box-sizing: border-box;
}

.btn-primary {
    background-color: #1D4533;
    border-color: #1D4533;
    color: #F7EAE0;
    box-shadow: 0 1px 2px rgba(29, 69, 51, 0.2);
}

.btn-primary:hover {
    background-color: #143224;
    border-color: #143224;
    color: #FFFFFF;
    box-shadow: 0 2px 5px rgba(20, 50, 36, 0.3);
}

.btn-secondary {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

.btn-secondary:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.btn-success {
    background-color: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(22, 163, 74, 0.2);
}

.btn-success:hover {
    background-color: #15803d;
    border-color: #15803d;
    color: #ffffff;
}

.btn-warning {
    background-color: #f59e0b;
    border-color: #f59e0b;
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(245, 158, 11, 0.2);
}

.btn-warning:hover {
    background-color: #d97706;
    border-color: #d97706;
    color: #ffffff;
}

.btn-danger {
    background-color: #e11d48;
    border-color: #e11d48;
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(225, 29, 72, 0.2);
}

.btn-danger:hover {
    background-color: #be123c;
    border-color: #be123c;
    color: #ffffff;
}

.btn-sm {
    padding: 3px 8px !important;
    font-size: 11px !important;
    border-radius: 5px;
}

.btn-outline-primary {
    background: transparent;
    border: 1px solid #1D4533;
    color: #1D4533;
}

.btn-outline-primary:hover {
    background: #1D4533;
    color: #F7EAE0;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 10.5px;
    font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.badge-active, .badge-success, .badge-posted {
    background-color: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.badge-inactive, .badge-secondary, .badge-draft {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.badge-warning {
    background-color: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.badge-danger {
    background-color: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
}

.badge-info {
    background-color: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

/* Modern Enterprise Modals */
.modal-backdrop, .oracle-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-dialog, .oracle-modal-dialog {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 560px;
    overflow: hidden;
    animation: modalPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPopIn {
    from { opacity: 0; transform: scale(0.96) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header, .oracle-modal-header {
    padding: 14px 20px;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 15px;
    font-weight: 700;
    color: #1D4533;
    margin: 0;
}

.modal-body, .oracle-modal-body {
    padding: 18px 20px;
    color: #1e293b;
    font-size: 12px;
    max-height: 75vh;
    overflow-y: auto;
}

.modal-footer, .oracle-modal-footer {
    padding: 12px 20px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label, label.form-label {
    display: inline-block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 11.5px;
    color: #334155;
}

.form-control {
    width: 100%;
    padding: 6px 10px;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12px;
    color: #1e293b;
    background-color: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
    border-color: #1D4533;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(29, 69, 51, 0.14);
}

.invalid-feedback {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
}

.actions-cell {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

/* User Access Management Specific Styles */
.user-profile-card {
    padding: 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 24px;
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.user-profile-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-profile-label {
    color: #6c757d;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: bold;
}

.user-profile-value {
    font-weight: bold;
    font-size: 14px;
    color: #333;
}

.assign-form-box {
    padding: 20px;
    background: #eef4fc;
    border-left: 4px solid #0056b3;
    border-radius: 4px;
    margin-top: 24px;
}

.assign-form-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin-top: 12px;
    flex-wrap: wrap;
}

.empty-state-box {
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    margin-top: 16px;
}

.empty-state-warning {
    padding: 16px;
    text-align: center;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    border-radius: 4px;
    margin-top: 16px;
}

/* COA Tree Hierarchy Styles */
.coa-tree-table .level-1-row {
    background-color: #eef4fc;
    font-weight: 600;
}

.coa-tree-table .level-1-row:hover {
    background-color: #e2ecf9;
}

.coa-tree-table .level-2-row {
    background-color: #f8f9fa;
}

.coa-tree-table .level-2-row:hover {
    background-color: #f1f3f5;
}

.coa-tree-table .level-3-row {
    background-color: #ffffff;
}

.coa-tree-table .level-3-row:hover {
    background-color: #f8f9fa;
}

/* Voucher Entry Specific Styles */
.voucher-item-row td,
.grid-row td {
    vertical-align: middle;
    padding: 6px 8px;
    border-bottom: 1px solid #f1f5f9;
}

.voucher-item-row .form-control,
.grid-row .form-control {
    margin-bottom: 0;
    font-size: 12px;
}

.grid-row:hover {
    background-color: #f8fafc;
}

#voucherGridTable tfoot td {
    background-color: #fdfbf7;
    border-top: 2px solid #1D4533;
    font-variant-numeric: tabular-nums;
}

/* Printable Report Header Element (Hidden on screen, visible in print) */
.print-only-header {
    display: none;
}

/* ========================================================================= */
/* COMPREHENSIVE RESPONSIVE DESIGN SUITE (DESKTOP, TABLET, MOBILE, ALL SIZES)*/
/* ========================================================================= */

/* Mobile Hamburger Toggle Button in Topbar (Hidden on Desktop) */
.sidebar-toggle-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 6px;
    background: #F7EAE0;
    border: 1px solid #C4B5A8;
    color: #1D4533;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}
.sidebar-toggle-btn:hover,
.sidebar-toggle-btn:focus {
    background: #1D4533;
    color: #F7EAE0;
}

/* Sidebar Close Button on Mobile Drawer (Hidden on Desktop) */
.sidebar-close-btn {
    display: none;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #F7EAE0;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}
.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #FFFFFF;
}

/* Off-Canvas Backdrop Overlay */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(18, 43, 32, 0.6);
    backdrop-filter: blur(2px);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.25s ease;
}

/* Universal Table Responsive Wrapper */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 12px;
    border-radius: 6px;
}
.table-responsive::-webkit-scrollbar {
    height: 6px;
}
.table-responsive::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.table-responsive::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ------------------------------------------------------------------------- */
/* 1. TABLET & MOBILE BREAKPOINT (<= 991.98px)                               */
/* ------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    /* Off-Canvas Drawer Sidebar */
    .app-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 280px !important;
        min-width: 0 !important;
        max-width: 86vw !important;
        height: 100vh !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease !important;
        z-index: 9999 !important;
        box-shadow: none !important;
    }

    body.sidebar-open .app-sidebar,
    .app-sidebar.show {
        transform: translateX(0) !important;
        box-shadow: 6px 0 35px rgba(0, 0, 0, 0.45) !important;
    }

    body.sidebar-open .sidebar-backdrop {
        display: block !important;
        opacity: 1 !important;
    }

    body.sidebar-open {
        overflow: hidden !important;
    }

    .sidebar-toggle-btn {
        display: inline-flex !important;
    }

    .sidebar-close-btn {
        display: inline-flex !important;
    }

    /* Content Takes Full Width on Tablet/Mobile */
    .app-content,
    .app-sidebar ~ .app-content {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    .main-content {
        padding: 16px 18px !important;
    }

    /* Grid Layouts: 4 columns & 3 columns step down to 2 columns */
    div[style*="grid-template-columns: repeat(4"],
    div[style*="grid-template-columns: repeat(3"],
    div[style*="grid-template-columns: 1fr 2fr"],
    div[style*="grid-template-columns: 2fr 1fr"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Tree + Form Split Layouts (e.g. Chart of Accounts) stack gracefully */
    div[style*="display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap"] > div {
        flex: 1 1 100% !important;
        width: 100% !important;
    }
    #smartRightPanel {
        flex: 1 1 100% !important;
        width: 100% !important;
        margin-top: 14px;
    }

    /* Ensure tables never blowout page layout */
    table:not(.no-responsive) {
        max-width: 100%;
    }
    .voucher-table,
    .voucher-dir-table,
    .coa-tree-table,
    .oracle-grid-table,
    table.table,
    .table-responsive > table {
        min-width: 640px;
    }
}

/* ------------------------------------------------------------------------- */
/* 2. SMARTPHONE / SMALL MOBILE BREAKPOINT (<= 768px)                         */
/* ------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .container {
        margin: 0 0 16px 0 !important;
        padding: 14px 16px !important;
    }

    .main-content {
        padding: 12px 12px !important;
    }

    .app-topbar {
        padding: 0 12px !important;
        height: 48px !important;
        min-height: 48px !important;
        max-height: 48px !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
    }

    .topbar-desktop-title {
        display: none !important;
    }

    .topbar-brand-link {
        display: inline-flex !important;
    }

    /* Header Banners & Hero Containers Stack Cleanly */
    .header,
    div[style*="background: linear-gradient(135deg, #1D4533 0%, #122B20 100%)"] {
        padding: 16px 16px !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }

    div[style*="display: flex; justify-content: space-between"]:not(.sidebar-company-box):not(.sidebar-footer):not(.sidebar-dropdown-btn):not(.sidebar-brand):not(.topbar-header-inner) {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }

    /* Flex Actions and Buttons Container */
    .nav-links,
    .header-actions,
    .filter-actions,
    div[style*="display: flex; gap:"]:not(.sidebar-user-info):not(.topbar-user-area) {
        flex-wrap: wrap !important;
    }

    div[style*="display: flex; justify-content: flex-end"] {
        justify-content: stretch !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    div[style*="display: flex; justify-content: flex-end"] > button,
    div[style*="display: flex; justify-content: flex-end"] > a {
        flex: 1 1 auto !important;
        text-align: center !important;
        justify-content: center !important;
    }

    /* Forms: All multi-column grids collapse to 1 single clean mobile column */
    div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    div[style*="grid-column: span"] {
        grid-column: span 1 !important;
    }

    /* Touch-Friendly Form Fields & Inputs (Prevents iOS Auto-Zoom) */
    .form-control,
    .voucher-card-input,
    .oracle-grid-input,
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    select,
    textarea {
        font-size: 14px !important;
        padding: 8px 10px !important;
        min-height: 38px !important;
        border-radius: 6px !important;
        box-sizing: border-box !important;
    }

    .select2-container--default .select2-selection--single {
        height: 38px !important;
        padding: 4px 8px !important;
    }
    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 28px !important;
        font-size: 13px !important;
    }
    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 36px !important;
    }

    .select2-dropdown {
        max-width: 92vw !important;
    }

    /* Touch-Friendly Buttons */
    .btn,
    button[type="submit"],
    button[type="button"],
    a.btn {
        min-height: 36px !important;
        padding: 8px 14px !important;
        font-size: 12.5px !important;
    }

    /* Oracle Tabs Horizontal Scroll on Mobile */
    .oracle-tabs-bar {
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 2px !important;
    }
    .oracle-tab-btn {
        white-space: nowrap !important;
        padding: 8px 14px !important;
        font-size: 12px !important;
    }

    .oracle-bottom-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
}

/* ------------------------------------------------------------------------- */
/* 3. EXTRA SMALL PHONE BREAKPOINT (<= 480px)                                */
/* ------------------------------------------------------------------------- */
@media (max-width: 480px) {
    .main-content {
        padding: 8px 8px !important;
    }

    .auth-login-card {
        padding: 24px 18px !important;
        margin: 10px auto !important;
    }

    #toastNotification {
        top: 10px !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-width: calc(100vw - 20px) !important;
        padding: 10px 14px !important;
        font-size: 12px !important;
    }

    .topbar-brand-name {
        display: none !important;
    }
    .topbar-user-badge {
        display: none !important;
    }
    .topbar-user-chip {
        padding: 2px 6px !important;
        max-width: 105px !important;
    }
    .topbar-logout-btn .logout-text {
        display: none !important;
    }
    .topbar-logout-btn {
        padding: 4px 7px !important;
        min-height: 28px !important;
    }
}

/* Print Media Styles for Financial Statement Reports */
@media print {
    body {
        background-color: #fff;
        color: #000;
        font-size: 12pt;
    }

    .header,
    .nav-links,
    .btn,
    form,
    .alert,
    .no-print,
    .filter-box {
        display: none !important;
    }

    .print-only-header {
        display: block !important;
        border-bottom: 2px solid #000;
        padding-bottom: 12px;
        margin-bottom: 20px;
        text-align: center;
    }

    .print-only-header h2 {
        margin: 0 0 4px 0;
        font-size: 18pt;
        color: #000;
        text-transform: uppercase;
    }

    .print-only-header h3 {
        margin: 0 0 6px 0;
        font-size: 14pt;
        color: #333;
    }

    .print-only-header p {
        margin: 0;
        font-size: 10pt;
        color: #555;
    }

    .container {
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .table-responsive {
        overflow: visible !important;
    }

    .table {
        width: 100% !important;
        border-collapse: collapse !important;
        border: 1px solid #333 !important;
        margin-top: 10px !important;
    }

    .table th,
    .table td {
        border: 1px solid #666 !important;
        padding: 6px 8px !important;
        color: #000 !important;
        background: transparent !important;
    }

    .table th {
        font-weight: bold !important;
        background-color: #f0f0f0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    tr {
        page-break-inside: avoid !important;
    }

    .report-section {
        page-break-inside: avoid !important;
        margin-bottom: 20px !important;
    }

    .badge {
        border: 1px solid #333 !important;
        background: transparent !important;
        color: #000 !important;
        font-weight: bold !important;
    }
}

/* 2-Tier Enterprise Header & Navbar Navigation Styles */
.top-header-bar {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.module-navbar {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.module-navbar-inner {
    max-width: 1350px;
    width: 95%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.module-nav-item {
    color: #334155;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    padding: 12px 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-bottom: 3px solid transparent;
    transition: all 0.15s ease;
}

.module-nav-item:hover {
    background: #f1f5f9;
    color: #0284c7;
    border-bottom-color: #0284c7;
}

.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-btn {
    background: transparent;
    color: #334155;
    border: none;
    font-size: 13.5px;
    font-weight: 600;
    padding: 12px 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-bottom: 3px solid transparent;
    transition: all 0.15s ease;
}

.nav-dropdown-btn:hover {
    background: #f1f5f9;
    color: #0284c7;
    border-bottom-color: #0284c7;
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 240px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    z-index: 1000;
    padding: 6px 0;
}

.nav-dropdown:hover .nav-dropdown-content {
    display: block;
}

.nav-dropdown-content a {
    color: #334155;
    padding: 10px 18px;
    text-decoration: none;
    display: block;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-dropdown-content a:hover {
    background-color: #eff6ff;
    color: #0284c7;
}

.nav-dropdown-divider {
    height: 1px;
    background-color: #f1f5f9;
    margin: 4px 0;
}

/* Sub-dropdown (Fly-out menu) */
.nav-subdropdown {
    position: relative;
}

.nav-subdropdown-content {
    display: none;
    position: absolute;
    top: -6px;
    left: 100%;
    background-color: #ffffff;
    min-width: 250px;
    max-width: 320px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    z-index: 1001;
    padding: 6px 0;
}

.nav-subdropdown:hover .nav-subdropdown-content {
    display: block;
}

@media (max-width: 1200px) {
    .nav-subdropdown-content {
        left: auto;
        right: 100%;
    }
}

/* Enhanced 3-Level COA Tree Table Styles */
.coa-filter-toolbar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.coa-search-box {
    position: relative;
    flex: 1;
    min-width: 260px;
}

.coa-search-input {
    width: 100%;
    padding: 9px 14px 9px 36px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
    transition: all 0.15s ease;
}

.coa-search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.coa-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.coa-filter-select {
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13.5px;
    background: #ffffff;
    color: #334155;
    font-weight: 500;
}

.coa-stats-pills {
    display: flex;
    gap: 8px;
    align-items: center;
}

.coa-stat-badge {
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.coa-tree-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.coa-tree-table th {
    background-color: #F7EAE0 !important;
    color: #1D4533 !important;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    padding: 12px 16px;
    border-bottom: 2px solid #1D4533;
}

.coa-row-level-1 {
    background-color: #f1f5f9 !important;
    border-left: 4px solid #1e3a8a !important;
}

.coa-row-level-1 td {
    padding: 11px 16px !important;
    color: #0f172a !important;
    border-bottom: 1px solid #cbd5e1 !important;
}

.coa-row-level-2 {
    background-color: #ffffff !important;
    border-left: 4px solid #3b82f6 !important;
}

.coa-row-level-2 td {
    padding: 9px 16px !important;
    color: #1e293b !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.coa-row-level-3 {
    background-color: #ffffff !important;
    border-left: 4px solid #10b981 !important;
}

.coa-row-level-3 td {
    padding: 8px 16px !important;
    color: #334155 !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.coa-tree-table tr:hover td {
    background-color: #f8fafc !important;
}

.coa-badge-l1 {
    background: #1e3a8a;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}

.coa-badge-l2 {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #bae6fd;
}

.coa-badge-l3 {
    background: #dcfce7;
    color: #15803d;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #bbf7d0;
}

.type-pill-asset {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

.type-pill-liability {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

.type-pill-equity {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

.type-pill-income {
    background: #faf5ff;
    color: #6b21a8;
    border: 1px solid #e9d5ff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

.type-pill-expense {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #ffedd5;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

.coa-actions-group {
    display: inline-flex;
    gap: 4px;
}

.btn-coa-action {
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    transition: all 0.15s ease;
}

.btn-coa-action:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

.btn-coa-action-edit:hover {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.btn-coa-action-delete:hover {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

/* Oracle Style COA Tabbed Navigation */
.oracle-tabs-bar {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #0f172a;
    margin-bottom: 20px;
    background: #f1f5f9;
    padding: 6px 6px 0 6px;
    border-radius: 8px 8px 0 0;
    flex-wrap: wrap;
}

.oracle-tab-btn {
    padding: 10px 20px;
    font-size: 13.5px;
    font-weight: 700;
    color: #475569;
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.oracle-tab-btn:hover {
    background: #ffffff;
    color: #0f172a;
}

.oracle-tab-btn.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
}

.oracle-tab-content {
    display: none;
}

.oracle-tab-content.active {
    display: block;
}

/* Oracle Desktop Grid Entry Form Styles */
.oracle-grid-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
}

.oracle-grid-table th {
    background-color: #F7EAE0 !important;
    color: #1D4533 !important;
    font-size: 12px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    padding: 10px 12px !important;
    border-bottom: 2px solid #1D4533 !important;
}

.oracle-grid-table td {
    padding: 6px 10px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    vertical-align: middle !important;
}

.oracle-grid-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 13.5px;
    background: #ffffff;
    color: #0f172a;
    transition: all 0.15s ease;
    box-sizing: border-box;
}

.oracle-grid-input:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    background: #ffffff;
}

.oracle-grid-input-code {
    font-family: monospace;
    font-weight: 700;
    color: #1e3a8a;
}

.oracle-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

/* Minimalist UI Layout & Palette Standard (#1D4533 / #F7EAE0) */
.page-title,
.header-title,
h1.brand-header,
h2.brand-header {
    color: #1D4533 !important;
}

.table-standard thead th,
table.minimalist-table th {
    background-color: #F7EAE0 !important;
    color: #1D4533 !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #1D4533 !important;
}

/* ==========================================================================
   Modern Dribbble / Fintech SaaS Dashboard UI & Interactions
   ========================================================================== */
.fintech-hero-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.fintech-hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #1D4533;
}

.quick-action-hub {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 22px;
    background: #ffffff;
    padding: 12px 18px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.quick-action-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #1e293b;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.quick-action-pill:hover {
    background: #1D4533;
    color: #F7EAE0;
    border-color: #1D4533;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(29, 69, 51, 0.18);
}

.quick-action-pill svg {
    transition: transform 0.2s ease;
}

.quick-action-pill:hover svg {
    transform: scale(1.1);
}

.fintech-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.fintech-kpi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.fintech-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

.fintech-kpi-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.fintech-kpi-label {
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fintech-kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fintech-kpi-value {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.6px;
    font-variant-numeric: tabular-nums;
    margin-bottom: 6px;
    line-height: 1.15;
}

.fintech-kpi-foot {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.fintech-subgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.fintech-subcard {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 18px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: all 0.15s ease;
}

.fintech-subcard:hover {
    border-color: #cbd5e1;
    background: #fdfefe;
}

/* Slide-Over Drawer for Instant Voucher Peek */
.slideover-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    z-index: 1060;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.slideover-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.slideover-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 540px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
    z-index: 1070;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.slideover-drawer.active {
    transform: translateX(0);
}

.slideover-header {
    padding: 18px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slideover-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.slideover-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ==========================================================================
   Modern Dribbble / Fintech SaaS Login Experience
   ========================================================================== */
.auth-page-wrapper {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 16px;
    background: radial-gradient(circle at 50% 0%, rgba(29, 69, 51, 0.05) 0%, rgba(248, 250, 252, 1) 70%);
}

.auth-split-card {
    width: 100%;
    max-width: 960px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 20px 40px -15px rgba(29, 69, 51, 0.12), 0 0 1px 1px rgba(0, 0, 0, 0.03);
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    overflow: hidden;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .auth-split-card {
        grid-template-columns: 1fr;
        max-width: 440px;
    }
    .auth-hero-pane {
        display: none !important;
    }
}

.auth-hero-pane {
    background: linear-gradient(145deg, #1D4533 0%, #122B20 100%);
    padding: 44px 38px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #F7EAE0;
    position: relative;
    overflow: hidden;
}

.auth-hero-pane::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(247, 234, 224, 0.15) 0%, rgba(247, 234, 224, 0) 70%);
    pointer-events: none;
}

.auth-hero-pane::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -40px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(22, 163, 74, 0.12) 0%, rgba(22, 163, 74, 0) 70%);
    pointer-events: none;
}

.auth-form-pane {
    padding: 44px 38px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.auth-input-field {
    width: 100%;
    padding: 10px 14px 10px 38px !important;
    border: 1px solid #cbd5e1;
    border-radius: 8px !important;
    font-size: 13px !important;
    color: #1e293b;
    background: #ffffff;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.auth-input-field:focus {
    border-color: #1D4533;
    outline: none;
    box-shadow: 0 0 0 3px rgba(29, 69, 51, 0.14);
    background: #ffffff;
}

.auth-feature-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(247, 234, 224, 0.14);
    padding: 11px 14px;
    border-radius: 10px;
    margin-bottom: 12px;
    backdrop-filter: blur(4px);
    transition: transform 0.2s ease, background 0.2s ease;
}

.auth-feature-pill:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   Flatpickr Deep Forest Green Custom Theme (Enforces DD/MM/YYYY)
   ========================================================================== */
.flatpickr-calendar {
    background: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2) !important;
    border: 1px solid #1D4533 !important;
    font-family: inherit !important;
    overflow: hidden !important;
}
.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after {
    border-bottom-color: #1D4533 !important;
}
.flatpickr-calendar.arrowBottom:before,
.flatpickr-calendar.arrowBottom:after {
    border-top-color: #1D4533 !important;
}
.flatpickr-months {
    background: #1D4533 !important;
    border-top-left-radius: 7px !important;
    border-top-right-radius: 7px !important;
}
.flatpickr-months .flatpickr-month {
    background: #1D4533 !important;
    color: #F7EAE0 !important;
    height: 38px !important;
}
.flatpickr-current-month {
    padding-top: 4px !important;
    color: #F7EAE0 !important;
}
.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: transparent !important;
    color: #F7EAE0 !important;
    font-weight: 700 !important;
    font-size: 13.5px !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 2px 6px !important;
    cursor: pointer !important;
}
.flatpickr-current-month .flatpickr-monthDropdown-months:hover,
.flatpickr-current-month .flatpickr-monthDropdown-months:focus {
    background: rgba(247, 234, 224, 0.18) !important;
    outline: none !important;
}
/* CRITICAL FIX: Month Dropdown Options rendered in browser select popup must have dark high-contrast text on white */
.flatpickr-current-month .flatpickr-monthDropdown-months option,
.flatpickr-monthDropdown-months option,
.flatpickr-monthDropdown-month {
    background-color: #ffffff !important;
    color: #1D4533 !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    padding: 6px 12px !important;
}
.flatpickr-current-month .flatpickr-monthDropdown-months option:checked,
.flatpickr-monthDropdown-months option:checked {
    background-color: #1D4533 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}
.flatpickr-current-month input.cur-year {
    color: #F7EAE0 !important;
    font-weight: 700 !important;
    font-size: 13.5px !important;
    background: transparent !important;
    border-radius: 4px !important;
    padding: 2px 4px !important;
}
.flatpickr-current-month input.cur-year:hover,
.flatpickr-current-month input.cur-year:focus {
    background: rgba(247, 234, 224, 0.18) !important;
    outline: none !important;
}
.flatpickr-current-month .numInputWrapper span.arrowUp:after {
    border-bottom-color: #F7EAE0 !important;
}
.flatpickr-current-month .numInputWrapper span.arrowDown:after {
    border-top-color: #F7EAE0 !important;
}
.flatpickr-current-month .numInputWrapper span:hover {
    background: rgba(247, 234, 224, 0.25) !important;
}
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: #F7EAE0 !important;
    fill: #F7EAE0 !important;
    padding: 4px 10px !important;
    height: 38px !important;
}
.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
    fill: #F7EAE0 !important;
    width: 14px !important;
    height: 14px !important;
}
.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: #ffffff !important;
}
.flatpickr-weekday {
    background: #122B20 !important;
    color: #F7EAE0 !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    height: 28px !important;
    line-height: 28px !important;
}
.flatpickr-day {
    color: #1e293b !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    height: 32px !important;
    line-height: 32px !important;
    margin-top: 1px !important;
    border: 1px solid transparent !important;
}
.flatpickr-day:hover {
    background: #EFE4DC !important;
    color: #1D4533 !important;
    border-color: #C4B5A8 !important;
}
.flatpickr-day.today {
    border-color: #1D4533 !important;
    color: #1D4533 !important;
    font-weight: 700 !important;
}
.flatpickr-day.today:hover {
    background: #EFE4DC !important;
    color: #1D4533 !important;
}
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.selected.prevMonthDay,
.flatpickr-day.selected.nextMonthDay {
    background: #1D4533 !important;
    border-color: #1D4533 !important;
    color: #F7EAE0 !important;
    font-weight: 700 !important;
}
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay,
.flatpickr-day.flatpickr-disabled {
    color: #94a3b8 !important;
    opacity: 0.55 !important;
}
input.flatpickr-input[readonly] {
    background-color: #ffffff !important;
    cursor: pointer !important;
}
input.flatpickr-input[readonly]:focus {
    border-color: #1D4533 !important;
    box-shadow: 0 0 0 3px rgba(29, 69, 51, 0.12) !important;
}