/* ============================================
   APEX ERP - COLOR THEME VARIABLES
   Based on apexltd.in branding
   ============================================ */
:root {
    /* Primary Colors - Deep Blue/Navy */
    --apex-primary: #1e3a5f;
    --apex-primary-light: #2d4a6f;
    --apex-primary-dark: #152a47;
    
    /* Secondary Colors - Orange/Gold Accent */
    --apex-accent: #e67e22;
    --apex-accent-light: #f39c12;
    --apex-accent-dark: #d35400;
    
    /* Gradient Combinations */
    --apex-gradient: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 50%, #1e3a5f 100%);
    --apex-gradient-accent: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
    --apex-gradient-dark: linear-gradient(135deg, #152a47 0%, #1e3a5f 100%);
    
    /* Text Colors */
    --apex-text-dark: #1a1a2e;
    --apex-text-medium: #555;
    --apex-text-light: #777;
    
    /* Background Colors */
    --apex-bg-light: #f8f9fc;
    --apex-bg-white: #ffffff;
}

html, body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--apex-bg-light);
    margin: 0;
    padding: 0;
}

/* Hide scrollbar for login page */
.login-page-wrapper {
    overflow: hidden;
}

.login-page-wrapper,
.login-page-wrapper .login-branding,
.login-page-wrapper .login-form-section {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

/* Remove template body padding on pages using EmptyLayout (login, forgot-password) */
body:has(.login-page-wrapper),
body:has(.forgot-page-wrapper) {
    padding-top: 0 !important;
}

a, .btn-link {
    color: var(--apex-primary);
}

.btn-primary {
    color: #fff;
    background: var(--apex-gradient);
    border: none;
}

.btn-primary:hover {
    background: var(--apex-gradient-dark);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--apex-primary);
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* ============================================
   BOOTSTRAP 5 UTILITIES (missing from template BS4)
   gap-*, g-* gutters, form-label, etc.
   ============================================ */
.form-label { display: inline-block; margin-bottom: 0.5rem; font-size: 13px; font-weight: 500; color: #555; }
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
.gap-5 { gap: 3rem !important; }
.row.g-1, .row.gx-1 { --bs-gutter-x: 0.25rem; }
.row.g-1 > *, .row.gx-1 > * { padding-right: calc(var(--bs-gutter-x) * 0.5); padding-left: calc(var(--bs-gutter-x) * 0.5); }
.row.g-2, .row.gx-2 { --bs-gutter-x: 0.5rem; }
.row.g-2 > *, .row.gx-2 > * { padding-right: calc(var(--bs-gutter-x) * 0.5); padding-left: calc(var(--bs-gutter-x) * 0.5); }
.row.g-3, .row.gx-3 { --bs-gutter-x: 1rem; }
.row.g-3 > *, .row.gx-3 > * { padding-right: calc(var(--bs-gutter-x) * 0.5); padding-left: calc(var(--bs-gutter-x) * 0.5); }
.row.g-1, .row.gy-1 { --bs-gutter-y: 0.25rem; }
.row.g-1 > *, .row.gy-1 > * { margin-top: var(--bs-gutter-y); }
.row.g-2, .row.gy-2 { --bs-gutter-y: 0.5rem; }
.row.g-2 > *, .row.gy-2 > * { margin-top: var(--bs-gutter-y); }
.row.g-3, .row.gy-3 { --bs-gutter-y: 1rem; }
.row.g-3 > *, .row.gy-3 > * { margin-top: var(--bs-gutter-y); }
.align-items-end { align-items: flex-end !important; }

/* ============================================
   SHARED PAGE LAYOUT STYLES
   Used by all list/grid pages throughout the app.
   Remove per-page <style> duplicates when possible.
   ============================================ */

/* Override site.css excessive page-content padding */
.page-content { padding: 30px 14px 12px 14px !important; }
.page-content.container-fluid { padding-left: 14px !important; padding-right: 14px !important; }

/* Page container & header */
.page-container { padding: 0; background: transparent; min-height: calc(100vh - 60px); }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; background: white; padding: 12px 16px; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); flex-wrap: wrap; gap: 10px; border-left: 4px solid var(--apex-primary); }
.page-header h3 { margin: 0; color: var(--apex-primary); font-weight: 600; font-size: 1rem; display: flex; align-items: center; }
.header-left h3 { margin: 0; color: var(--apex-primary); font-weight: 600; font-size: 1rem; display: flex; align-items: center; }
.page-header .page-title { margin: 0; color: var(--apex-primary, #1e3a5f); font-size: 1rem; font-weight: 600; display: flex; align-items: center; letter-spacing: 0.3px; }
.header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Filter section */
.filter-section { background: white; padding: 12px 16px; border-radius: 6px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); border-top: 2px solid #e8ecf1; }
.filter-section .form-label { font-size: 10px; font-weight: 600; color: #888; margin-bottom: 3px; display: block; text-transform: uppercase; letter-spacing: 0.5px; }
.filter-section .row { margin-left: -6px; margin-right: -6px; }
.filter-section .row > [class*="col"] { padding-left: 6px; padding-right: 6px; }
.filter-dropdown { width: 200px; }
.filter-dropdown-small { width: 120px; }
.date-range { width: 260px; }

/* Compact filter inputs – override BS4 oversized form-control */
.filter-section .e-input-group, .filter-section .e-input-group .e-input,
.filter-section .e-ddl, .filter-section .e-control-wrapper {
    font-size: 13px !important;
}

/* Grid container */
.grid-container { background: white; border-radius: 6px; padding: 0; box-shadow: 0 1px 3px rgba(0,0,0,0.06); overflow: hidden; }
.grid-container .e-grid { border: none; }

/* Professional Syncfusion grid styling */
.e-grid { border: none !important; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.e-grid .e-gridheader { background: var(--apex-primary) !important; }
.e-grid .e-headercell { background: var(--apex-primary) !important; color: rgba(255,255,255,0.95) !important; padding: 7px 8px !important; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; border-right: 1px solid rgba(255,255,255,0.08) !important; border-bottom: none !important; }
.e-grid .e-headercell .e-headercelldiv { white-space: normal; word-wrap: break-word; overflow-wrap: break-word; padding-right: 18px; }
.e-grid .e-headercell .e-sortfilterdiv { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 2px; }
.e-grid .e-headercell .e-sortfilterdiv .e-icons,
.e-grid .e-headercell .e-icons { color: rgba(255,255,255,0.6) !important; font-size: 11px; }
.e-grid .e-headercell .e-icons:hover { color: #fff !important; }
.e-grid .e-rowcell { padding: 6px 8px !important; font-size: 12.5px; line-height: 1.4; border-bottom: 1px solid #f0f2f5 !important; }
.e-grid .e-row:hover .e-rowcell { background-color: #eef3fa !important; }
.e-grid .e-altrow .e-rowcell { background-color: #fafbfd !important; }
.e-grid .e-filterbarcell { padding: 3px 4px !important; background: #f4f6f8 !important; }
.e-grid .e-filterbarcell .e-input { height: 26px !important; font-size: 12px !important; padding: 2px 6px !important; }
.e-grid .e-pager { font-size: 12px; padding: 4px 8px; background: #fafbfc !important; border-top: 1px solid #e8ecf1 !important; }
.e-grid .e-pager .e-numericitem { padding: 2px 8px; font-size: 12px; }
.e-grid .e-pager .e-pagerdropdown { font-size: 12px; }
.e-grid .e-groupdroparea { padding: 6px 10px; font-size: 12px; min-height: auto; }

/* Action buttons inside grid rows */
.action-buttons { display: flex; gap: 5px; justify-content: center; }

/* Summary cards */
.summary-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 12px; }
.summary-card { background: white; border-radius: 6px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); border-bottom: 3px solid transparent; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.summary-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.summary-card:nth-child(1) { border-bottom-color: #17a2b8; }
.summary-card:nth-child(2) { border-bottom-color: var(--apex-primary); }
.summary-card:nth-child(3) { border-bottom-color: #28a745; }
.summary-card:nth-child(4) { border-bottom-color: var(--apex-accent); }
.card-icon, .summary-icon { width: 42px; height: 42px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.card-icon .e-icons, .summary-icon .e-icons { font-size: 20px; color: white; }
.card-content, .summary-content { display: flex; flex-direction: column; min-width: 0; }
.card-label, .summary-label { font-size: 10px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.card-value, .summary-value { font-size: 16px; font-weight: 700; color: var(--apex-text-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Summary-icon gradient backgrounds (used by several pages) */
.summary-icon.bg-primary { background: var(--apex-primary) !important; }
.summary-icon.bg-success { background: #28a745 !important; }
.summary-icon.bg-info { background: #17a2b8 !important; }
.summary-icon.bg-warning { background: var(--apex-accent) !important; }
.summary-icon.bg-danger { background: #dc3545 !important; }

/* Badge colors – !important to override template Bootstrap 4 */
.badge { padding: 4px 10px !important; border-radius: 20px !important; font-size: 11px !important; font-weight: 600 !important; display: inline-block; line-height: 1.5 !important; color: white; letter-spacing: 0.2px; }
.badge.bg-info { background-color: #17a2b8 !important; color: white !important; }
.badge.bg-primary { background-color: var(--apex-primary) !important; color: white !important; }
.badge.bg-success { background-color: #28a745 !important; color: white !important; }
.badge.bg-warning { background-color: #f59e0b !important; color: white !important; }
.badge.bg-danger { background-color: #dc3545 !important; color: white !important; }
.badge.bg-secondary { background-color: #6c757d !important; color: white !important; }
.badge.bg-light { background-color: #f0f1f3 !important; color: #555 !important; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 15px; }
.alert-danger { background-color: #f8d7da; color: #842029; border: 1px solid #f5c2c7; }

/* Loading container */
.loading-container { display: flex; justify-content: center; align-items: center; padding: 60px; background: white; border-radius: 12px; }

/* Dialog form shared */
.dialog-form { padding: 10px 0; }
.required-field::after { content: " *"; color: red; }

/* Toast messages */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; }
.toast-message { padding: 12px 24px; border-radius: 8px; color: white; font-size: 14px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.toast-success { background: #10b981; }
.toast-error { background: #ef4444; }

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Syncfusion Component Overrides */
.e-primary {
    background: var(--apex-gradient) !important;
    border: none !important;
}

.e-primary:hover {
    background: var(--apex-gradient-dark) !important;
}

.e-outline:not(.e-input-focus) {
    border-color: #e0e0e0 !important;
}

/* ============================================
   DARK MODE THEME
   Activated by adding .dark-mode class to <html>
   ============================================ */
html.dark-mode {
    --apex-bg-light: #1a1a2e;
    --apex-bg-white: #16213e;
    --apex-text-dark: #e0e0e0;
    --apex-text-medium: #b0b0b0;
    --apex-text-light: #999;
    color-scheme: dark;
}

html.dark-mode body {
    background-color: var(--apex-bg-light);
    color: var(--apex-text-dark);
}

/* ---- Global text color overrides ---- */
html.dark-mode h1, html.dark-mode h2, html.dark-mode h3,
html.dark-mode h4, html.dark-mode h5, html.dark-mode h6 {
    color: #e0e0e0;
}

html.dark-mode p {
    color: #c0c0c0;
}

html.dark-mode a:not(.btn):not(.dropdown-item):not(.nav-link) {
    color: #6db3f2;
}

html.dark-mode .text-muted {
    color: #888 !important;
}

html.dark-mode .text-dark {
    color: #e0e0e0 !important;
}

html.dark-mode .text-secondary {
    color: #999 !important;
}

html.dark-mode .text-body {
    color: #e0e0e0 !important;
}

html.dark-mode .fw-semibold,
html.dark-mode .fw-bold,
html.dark-mode strong {
    color: #e8e8e8;
}

html.dark-mode small,
html.dark-mode .small {
    color: #999;
}

/* ---- Page layout containers ---- */
html.dark-mode .page-container {
    background: var(--apex-bg-light);
}

html.dark-mode .page-header,
html.dark-mode .filter-section,
html.dark-mode .grid-container,
html.dark-mode .summary-card,
html.dark-mode .loading-container,
html.dark-mode .form-card,
html.dark-mode .form-section,
html.dark-mode .settings-card,
html.dark-mode .detail-card,
html.dark-mode .dashboard-card,
html.dark-mode .info-card,
html.dark-mode .report-card,
html.dark-mode .content-card,
html.dark-mode .data-card,
html.dark-mode .generate-form,
html.dark-mode .audit-section,
html.dark-mode .active-users-card,
html.dark-mode .detail-section,
html.dark-mode .empty-state,
html.dark-mode .message-item,
html.dark-mode .wagesheet-header {
    background: var(--apex-bg-white) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border-color: #2a3a55 !important;
}

html.dark-mode .page-header h3,
html.dark-mode .header-left h3,
html.dark-mode .page-header .page-title {
    color: #e0e0e0;
}

html.dark-mode .filter-section .form-label {
    color: #aaa;
}

html.dark-mode .card-label {
    color: #999;
}

html.dark-mode .card-value {
    color: #e0e0e0;
}

/* Dashboard & detail cards content */
html.dark-mode .card-content h3,
html.dark-mode .card-content h4,
html.dark-mode .card-content h5 {
    color: #e0e0e0 !important;
}

html.dark-mode .card-content p {
    color: #999 !important;
}

html.dark-mode .detail-body {
    background: var(--apex-bg-white);
}

html.dark-mode .detail-row {
    border-bottom-color: #2a3a55 !important;
}

html.dark-mode .detail-row span {
    color: #999 !important;
}

html.dark-mode .detail-row strong {
    color: #e0e0e0 !important;
}

html.dark-mode .section-title {
    color: #e0e0e0 !important;
}

html.dark-mode .loading-overlay {
    color: #999;
}

/* ---- Navbar & sidebar ---- */
html.dark-mode .site-navbar {
    background: #0f1b33 !important;
    border-bottom-color: #1e3050;
}

html.dark-mode .site-menubar {
    background: #0f1b33 !important;
}

html.dark-mode .site-menu-item > a {
    color: #c0c0c0 !important;
}

html.dark-mode .site-menu-item > a:hover,
html.dark-mode .site-menu-item.active > a {
    color: #fff !important;
    background: rgba(255,255,255,0.08) !important;
}

html.dark-mode .site-menubar-footer {
    background: #0a1628 !important;
}

/* ---- Syncfusion grid ---- */
html.dark-mode .e-grid {
    background: var(--apex-bg-white);
    color: var(--apex-text-dark);
    border-color: #2a3a55;
}

html.dark-mode .e-grid .e-gridheader {
    background: #1e2a45;
}

html.dark-mode .e-grid .e-headercell {
    background: #1e2a45 !important;
    color: #c0c0c0 !important;
    border-color: #2a3a55 !important;
}

html.dark-mode .e-grid .e-rowcell {
    background: var(--apex-bg-white) !important;
    color: var(--apex-text-dark) !important;
    border-color: #2a3a55 !important;
}

html.dark-mode .e-grid .e-row:hover .e-rowcell {
    background: #1e2a45 !important;
}

html.dark-mode .e-grid .e-altrow .e-rowcell {
    background: #182640 !important;
}

html.dark-mode .e-grid .e-pager {
    background: var(--apex-bg-white) !important;
    color: var(--apex-text-medium);
    border-color: #2a3a55 !important;
}

html.dark-mode .e-grid .e-pagercontainer {
    background: transparent;
}

html.dark-mode .e-grid .e-numericitem,
html.dark-mode .e-grid .e-currentitem {
    color: #e0e0e0;
    background: transparent;
}

html.dark-mode .e-grid .e-currentitem {
    background: var(--apex-primary) !important;
    color: #fff !important;
}

html.dark-mode .e-grid .e-pagerdropdown {
    background: #1e2a45 !important;
    color: #e0e0e0;
}

html.dark-mode .e-grid .e-parentmsgbar {
    color: #999;
}

html.dark-mode .e-grid .e-filterbarcell,
html.dark-mode .e-grid .e-filterbar {
    background: #1e2a45 !important;
}

html.dark-mode .e-grid .e-gridcontent {
    background: var(--apex-bg-white);
}

html.dark-mode .e-grid .e-groupdroparea {
    background: #1e2a45;
    color: #999;
    border-color: #2a3a55;
}

html.dark-mode .e-grid .e-toolbar {
    background: #1e2a45 !important;
    border-color: #2a3a55 !important;
}

html.dark-mode .e-grid .e-toolbar .e-btn {
    background: transparent;
    color: #c0c0c0;
}

html.dark-mode .e-grid .e-summarycell {
    background: #1e2a45 !important;
    color: #e0e0e0 !important;
    border-color: #2a3a55 !important;
}

/* ---- Syncfusion inputs, dropdowns, pickers ---- */
html.dark-mode .e-input-group,
html.dark-mode .e-input-group .e-input,
html.dark-mode .e-ddl .e-input,
html.dark-mode .e-textbox,
html.dark-mode .e-numerictextbox .e-input,
html.dark-mode .e-datepicker .e-input,
html.dark-mode .e-daterangepicker .e-input,
html.dark-mode .e-multiselect .e-input {
    background: #1e2a45 !important;
    color: #e0e0e0 !important;
    border-color: #2a3a55 !important;
}

html.dark-mode .e-input-group .e-input-group-icon {
    color: #999 !important;
    background: transparent !important;
}

html.dark-mode .e-float-text,
html.dark-mode .e-float-input label,
html.dark-mode .e-input-group .e-float-text {
    color: #999 !important;
}

html.dark-mode .e-input::placeholder {
    color: #666 !important;
}

html.dark-mode .e-ddl.e-popup,
html.dark-mode .e-popup.e-control,
html.dark-mode .e-dropdownbase .e-list-item {
    background: #16213e !important;
    color: #e0e0e0 !important;
}

html.dark-mode .e-dropdownbase .e-list-item:hover,
html.dark-mode .e-dropdownbase .e-active {
    background: #1e2a45 !important;
    color: #fff !important;
}

/* Syncfusion calendar/datepicker popup */
html.dark-mode .e-calendar,
html.dark-mode .e-datepicker.e-popup,
html.dark-mode .e-daterangepicker.e-popup {
    background: #16213e !important;
    color: #e0e0e0 !important;
    border-color: #2a3a55 !important;
}

html.dark-mode .e-calendar .e-content td span {
    color: #c0c0c0;
}

html.dark-mode .e-calendar .e-content td.e-today span {
    color: var(--apex-accent) !important;
}

html.dark-mode .e-calendar .e-content td.e-selected span {
    background: var(--apex-primary) !important;
    color: #fff !important;
}

html.dark-mode .e-calendar .e-header {
    background: #1e2a45;
    color: #e0e0e0;
}

/* ---- Syncfusion dialog ---- */
html.dark-mode .e-dialog {
    background: var(--apex-bg-white) !important;
    color: var(--apex-text-dark);
    border-color: #2a3a55 !important;
}

html.dark-mode .e-dlg-header,
html.dark-mode .e-dlg-header-content {
    color: var(--apex-text-dark) !important;
    background: var(--apex-bg-white) !important;
}

html.dark-mode .e-dlg-content {
    color: var(--apex-text-dark);
    background: var(--apex-bg-white) !important;
}

html.dark-mode .e-footer-content {
    background: #1a1f35 !important;
    border-color: #2a3a55 !important;
}

html.dark-mode .e-dlg-overlay {
    background: rgba(0,0,0,0.6);
}

/* ---- Syncfusion buttons ---- */
html.dark-mode .e-btn.e-flat {
    color: #c0c0c0;
}

html.dark-mode .e-btn.e-flat:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

html.dark-mode .e-btn.e-outline {
    color: #c0c0c0;
    border-color: #2a3a55;
}

/* ---- Syncfusion tabs ---- */
html.dark-mode .e-tab .e-tab-header {
    background: var(--apex-bg-white) !important;
    border-color: #2a3a55 !important;
}

html.dark-mode .e-tab .e-tab-header .e-toolbar-item .e-tab-text {
    color: #999;
}

html.dark-mode .e-tab .e-tab-header .e-toolbar-item.e-active .e-tab-text {
    color: #e0e0e0;
}

html.dark-mode .e-tab .e-content {
    background: var(--apex-bg-white) !important;
    color: var(--apex-text-dark);
}

/* ---- Syncfusion switch, checkbox, radio ---- */
html.dark-mode .e-switch-wrapper .e-switch-off {
    background: #2a3a55;
}

html.dark-mode .e-checkbox-wrapper .e-frame {
    border-color: #555;
    background: #1e2a45;
}

html.dark-mode .e-checkbox-wrapper .e-label {
    color: #c0c0c0;
}

html.dark-mode .e-radio + label {
    color: #c0c0c0;
}

/* ---- Syncfusion tooltip ---- */
html.dark-mode .e-tooltip-wrap {
    background: #1e2a45;
    color: #e0e0e0;
    border-color: #2a3a55;
}

/* ---- Dropdowns & menus ---- */
html.dark-mode .dropdown-menu {
    background: #16213e;
    border-color: #2a3a55;
}

html.dark-mode .dropdown-item {
    color: #c0c0c0;
}

html.dark-mode .dropdown-item:hover {
    background: #1e2a45;
    color: #fff;
}

html.dark-mode .dropdown-header {
    color: #999;
}

html.dark-mode .dropdown-divider {
    border-color: #2a3a55;
}

/* ---- Footer ---- */
html.dark-mode .site-footer {
    background: #0f1b33;
    color: #888;
    border-top-color: #1e3050;
}

/* ---- Form controls (Bootstrap) ---- */
html.dark-mode .form-control,
html.dark-mode .form-select {
    background-color: #1e2a45;
    color: #e0e0e0;
    border-color: #2a3a55;
}

html.dark-mode .form-control:focus,
html.dark-mode .form-select:focus {
    background-color: #243352;
    color: #fff;
    border-color: var(--apex-accent);
}

html.dark-mode .form-label,
html.dark-mode label {
    color: #b0b0b0;
}

html.dark-mode .form-text {
    color: #777;
}

html.dark-mode .form-check-label {
    color: #c0c0c0;
}

html.dark-mode .form-group label {
    color: #b0b0b0;
}

html.dark-mode .form-floating > .form-control,
html.dark-mode .form-floating > .form-select {
    background-color: #1e2a45;
    color: #e0e0e0;
    border-color: #2a3a55;
}

html.dark-mode .form-floating > label {
    color: #999;
}

html.dark-mode input[type="text"],
html.dark-mode input[type="number"],
html.dark-mode input[type="email"],
html.dark-mode input[type="password"],
html.dark-mode textarea,
html.dark-mode select {
    background-color: #1e2a45;
    color: #e0e0e0;
    border-color: #2a3a55;
}

/* ---- Tables (Bootstrap) ---- */
html.dark-mode .table {
    color: #e0e0e0;
    border-color: #2a3a55;
}

html.dark-mode .table > thead > tr > th {
    background: #1e2a45;
    color: #c0c0c0;
    border-color: #2a3a55;
}

html.dark-mode .table > tbody > tr > td {
    border-color: #2a3a55;
    color: #e0e0e0;
}

html.dark-mode .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(255,255,255,0.03);
}

html.dark-mode .table-hover > tbody > tr:hover {
    background-color: rgba(255,255,255,0.05);
}

/* ---- Alerts ---- */
html.dark-mode .alert-danger {
    background-color: #3b1a1f;
    color: #f5a0a8;
    border-color: #5a2a30;
}

html.dark-mode .alert-warning {
    background-color: #3b3210;
    color: #f5d98a;
    border-color: #5a4c20;
}

html.dark-mode .alert-info {
    background-color: #0f2a3b;
    color: #8ed4f5;
    border-color: #1a4a5a;
}

html.dark-mode .alert-success {
    background-color: #0f3b1a;
    color: #8af5a8;
    border-color: #1a5a2a;
}

/* ---- Bootstrap cards ---- */
html.dark-mode .card {
    background: var(--apex-bg-white);
    border-color: #2a3a55;
    color: var(--apex-text-dark);
}

html.dark-mode .card-header {
    background: #1e2a45;
    border-color: #2a3a55;
    color: #e0e0e0;
}

html.dark-mode .card-body {
    color: var(--apex-text-dark);
}

html.dark-mode .card-footer {
    background: #1a1f35;
    border-color: #2a3a55;
}

/* ---- Borders - global override for light borders ---- */
html.dark-mode [style*="border-bottom: 1px solid #f1f5f9"],
html.dark-mode [style*="border-bottom: 1px solid #eee"],
html.dark-mode [style*="border: 1px solid #e0e0e0"],
html.dark-mode [style*="border-bottom: 2px solid #e0e0e0"],
html.dark-mode [style*="border-top: 2px solid #e0e0e0"],
html.dark-mode [style*="border-bottom: 2px solid #e5e7eb"],
html.dark-mode [style*="border-bottom: 1px dashed #e0e0e0"] {
    border-color: #2a3a55 !important;
}

html.dark-mode hr {
    border-color: #2a3a55;
}

/* ---- Badges ---- */
html.dark-mode .badge {
    opacity: 0.9;
}

html.dark-mode .bg-light {
    background-color: #1e2a45 !important;
    color: #c0c0c0 !important;
}

html.dark-mode .bg-warning {
    color: #1a1a2e !important;
}

/* ---- Status badges (used in many pages) ---- */
html.dark-mode .status-badge {
    opacity: 0.9;
}

/* ---- Modal ---- */
html.dark-mode .modal-content {
    background: var(--apex-bg-white);
    border-color: #2a3a55;
    color: var(--apex-text-dark);
}

html.dark-mode .modal-header {
    background: #1e2a45;
    border-color: #2a3a55;
    color: #e0e0e0;
}

html.dark-mode .modal-body {
    color: var(--apex-text-dark);
}

html.dark-mode .modal-footer {
    background: #1a1f35;
    border-color: #2a3a55;
}

/* ---- Inline style overrides for hardcoded colors in page <style> blocks ---- */
/* These catch the most common patterns across all 60+ pages */

/* background: white / #fff */
html.dark-mode [style*="background: white"],
html.dark-mode [style*="background:#fff"],
html.dark-mode [style*="background-color: white"],
html.dark-mode [style*="background-color:#fff"],
html.dark-mode [style*="background: #fff"] {
    background: var(--apex-bg-white) !important;
}

/* background: #f5f7fa / #f8f9fa / #f8fafc / linear-gradient to light */
html.dark-mode [style*="background: #f5f7fa"],
html.dark-mode [style*="background: #f8f9fa"],
html.dark-mode [style*="background: #f8fafc"],
html.dark-mode [style*="background-color: #f5f5f5"],
html.dark-mode [style*="background: linear-gradient(145deg, #f8fafc"],
html.dark-mode [style*="background: linear-gradient(135deg, #f8fafc"] {
    background: var(--apex-bg-light) !important;
}

/* color: #333 / #0f2439 / #1a1a2e — dark heading text */
html.dark-mode [style*="color: #333"],
html.dark-mode [style*="color:#333"],
html.dark-mode [style*="color: #0f2439"],
html.dark-mode [style*="color:#0f2439"],
html.dark-mode [style*="color: #1a1a2e"],
html.dark-mode [style*="color: #334155"] {
    color: #e0e0e0 !important;
}

/* color: #555 / #666 / #64748b / #777 — medium text */
html.dark-mode [style*="color: #555"],
html.dark-mode [style*="color:#555"],
html.dark-mode [style*="color: #666"],
html.dark-mode [style*="color:#666"],
html.dark-mode [style*="color: #64748b"],
html.dark-mode [style*="color: #777"],
html.dark-mode [style*="color:#777"] {
    color: #999 !important;
}

/* ---- Page containers with gradient backgrounds ---- */
html.dark-mode .dashboard-container,
html.dark-mode .page-content {
    background: var(--apex-bg-light) !important;
}

/* ---- Topbar elements in dark mode ---- */
html.dark-mode .apex-topbar-label {
    color: rgba(255, 255, 255, 0.85);
}

html.dark-mode .navbar-search .e-input-group,
html.dark-mode .navbar-search .e-input-group .e-input {
    background: rgba(255,255,255,0.12) !important;
    color: #fff !important;
    border-color: rgba(255,255,255,0.2) !important;
}

html.dark-mode .navbar-search .e-input::placeholder {
    color: rgba(255,255,255,0.5) !important;
}

/* ---- Scrollbar ---- */
html.dark-mode ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

html.dark-mode ::-webkit-scrollbar-track {
    background: #1a1a2e;
}

html.dark-mode ::-webkit-scrollbar-thumb {
    background: #2a3a55;
    border-radius: 4px;
}

html.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: #3a4a65;
}

.e-input-focus {
    border-color: var(--apex-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 95, 0.25) !important;
}

/* ============================================
   TOPBAR - Search, Dropdowns, User section
   ============================================ */
.topbar-search {
    position: relative;
    min-width: 200px;
    max-width: 320px;
    flex: 1;
}

.topbar-search .e-input-group {
    border-radius: 6px !important;
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
}

.topbar-search .e-input-group:hover {
    border-color: #cbd5e1 !important;
}

.topbar-search .e-input-group.e-input-focus {
    border-color: var(--apex-primary) !important;
    box-shadow: 0 0 0 2px rgba(30, 58, 95, 0.12) !important;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 36, 57, 0.12);
    z-index: 1000;
    max-height: 320px;
    overflow-y: auto;
    margin-top: 4px;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    color: #334155;
    transition: background 0.15s;
}

.search-item:hover {
    background: #f1f5f9;
}

.search-item .e-icons {
    font-size: 14px;
    color: #64748b;
}

.topbar-selectors {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.topbar-dropdown {
    display: flex;
    align-items: center;
    gap: 6px;
}

.topbar-dropdown .topbar-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    letter-spacing: 0.03em;
}

.topbar-dropdown .e-input-group {
    border-radius: 6px !important;
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    height: 32px !important;
    min-height: 32px !important;
}

.topbar-dropdown .e-input-group:hover {
    border-color: #cbd5e1 !important;
}

.topbar-dropdown .e-input-group.e-input-focus {
    border-color: var(--apex-primary) !important;
    box-shadow: 0 0 0 2px rgba(30, 58, 95, 0.12) !important;
}

.topbar-dropdown .e-ddl-icon {
    color: #64748b !important;
    font-size: 12px !important;
}

.topbar-dropdown input.e-input {
    font-size: 13px !important;
    color: #334155 !important;
    padding-left: 10px !important;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding-left: 16px;
    border-left: 1px solid #e2e8f0;
}

.topbar-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    font-size: 16px;
}

.topbar-icon-btn:hover {
    background: #f1f5f9;
    color: var(--apex-primary);
}

.profile-wrapper {
    position: relative;
}

.profile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.profile-btn:hover {
    border-color: var(--apex-primary);
    box-shadow: 0 0 0 2px rgba(30, 58, 95, 0.12);
}

.profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--apex-gradient);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    user-select: none;
}

.profile-avatar-lg {
    width: 40px;
    height: 40px;
    font-size: 14px;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(15, 36, 57, 0.14);
    z-index: 1000;
    padding: 6px 0;
    animation: profileDropIn 0.15s ease-out;
}

@keyframes profileDropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.profile-dropdown-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
}

.profile-dropdown-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.profile-dropdown-name {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-dropdown-role {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
}

.profile-dropdown-item:hover {
    background: #f8fafc;
    color: var(--apex-primary);
    text-decoration: none;
}

.profile-dropdown-item .e-icons {
    font-size: 15px;
    color: #94a3b8;
}

.profile-dropdown-item:hover .e-icons {
    color: var(--apex-primary);
}

.profile-dropdown-logout:hover {
    color: #dc2626;
    background: #fef2f2;
}

.profile-dropdown-logout:hover .e-icons {
    color: #dc2626;
}

/* Initial Load Spinner */
.initial-load-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
}

/* ============================================
   LANDING PAGE STYLES
   ============================================ */

.landing-page {
    background: #fff;
    min-height: 100vh;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif;
    overflow-x: hidden;
}

/* Landing Navigation */
.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, var(--apex-primary) 0%, var(--apex-primary-light) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Apex Logo Styles */
.apex-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.footer-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
    margin-bottom: 0.75rem;
}

.login-apex-logo {
    height: 70px;
    width: auto;
    object-fit: contain;
}

.brand-icon {
    color: var(--apex-primary);
    filter: drop-shadow(0 2px 4px rgba(30, 58, 95, 0.3));
}

.brand-text {
    font-size: 1.625rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
}

.brand-highlight {
    background: var(--apex-gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.25rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--apex-accent);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: white;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-btn {
    padding: 0.7rem 1.75rem;
    background: var(--apex-accent);
    color: white !important;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(230, 126, 34, 0.5);
    background: var(--apex-accent-light);
}

/* Hero Section */
.hero-section {
    padding: 10rem 2rem 5rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--apex-primary) 0%, var(--apex-primary-light) 40%, #f0f4f8 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.3;
}

.hero-shape-1 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    top: -200px;
    right: -100px;
}

.hero-shape-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.2) 0%, rgba(243, 156, 18, 0.1) 100%);
    bottom: 100px;
    left: -100px;
}

.hero-shape-3 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.3) 0%, rgba(243, 156, 18, 0.15) 100%);
    top: 30%;
    left: 25%;
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 0.625rem 1.25rem;
    border-radius: 50px;
    font-size: 0.9rem;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.6s ease-out;
}

.badge-icon {
    font-size: 1.1rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 3.75rem;
    font-weight: 800;
    line-height: 1.15;
    color: white;
    margin: 0 0 1.75rem;
    letter-spacing: -1px;
    animation: fadeInUp 0.6s ease-out 0.1s both;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.2);
}

.gradient-text {
    background: var(--apex-gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    margin: 0 0 2.5rem;
    max-width: 540px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 3.5rem;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.btn-primary-landing {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 1.1rem 2.25rem;
    background: var(--apex-accent);
    color: white;
    text-decoration: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 25px rgba(230, 126, 34, 0.4);
}

.btn-primary-landing:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(230, 126, 34, 0.5);
    background: var(--apex-accent-light);
    color: white;
}

.btn-primary-landing svg {
    transition: transform 0.3s ease;
}

.btn-primary-landing:hover svg {
    transform: translateX(4px);
}

.btn-secondary-landing {
    display: inline-flex;
    align-items: center;
    padding: 1.1rem 2.25rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    text-decoration: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1.05rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.btn-secondary-landing:hover {
    border-color: white;
    color: white;
    background: rgba(255, 255, 255, 0.25);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    animation: fadeInUp 0.6s ease-out 0.4s both;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--apex-accent);
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    margin-top: 0.25rem;
}

.stat-divider {
    width: 1px;
    height: 45px;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
}

/* Dashboard Preview */
.hero-visual {
    perspective: 1000px;
    animation: fadeInRight 0.8s ease-out 0.3s both;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px) rotateY(-8deg) rotateX(5deg);
    }
    to {
        opacity: 1;
        transform: translateX(0) rotateY(-5deg) rotateX(5deg);
    }
}

.dashboard-preview {
    background: linear-gradient(145deg, var(--apex-primary) 0%, var(--apex-primary-light) 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(30, 58, 95, 0.4),
                0 20px 40px rgba(30, 58, 95, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: rotateY(-5deg) rotateX(5deg);
    transition: all 0.5s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.dashboard-preview:hover {
    transform: rotateY(0) rotateX(0) scale(1.02);
    box-shadow: 0 50px 100px rgba(30, 58, 95, 0.5),
                0 25px 50px rgba(30, 58, 95, 0.2);
}

.preview-header {
    padding: 0.75rem 1rem;
    background: var(--apex-primary-dark);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.preview-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27ca3f; }

.preview-title {
    color: #888;
    font-size: 0.75rem;
}

.preview-content {
    display: flex;
    padding: 1rem;
    gap: 1rem;
    min-height: 280px;
}

.preview-sidebar {
    width: 50px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-item {
    height: 35px;
    background: var(--apex-primary-dark);
    border-radius: 6px;
}

.sidebar-item.active {
    background: var(--apex-gradient-accent);
}

.preview-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.preview-card-row {
    display: flex;
    gap: 0.75rem;
}

.preview-stat-card {
    flex: 1;
    padding: 1rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.preview-stat-card.blue { background: var(--apex-gradient); }
.preview-stat-card.green { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.preview-stat-card.purple { background: var(--apex-gradient-accent); }

.preview-stat-card .card-icon {
    font-size: 1.5rem;
}

.card-info {
    display: flex;
    flex-direction: column;
}

.preview-stat-card .card-value {
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
}

.preview-stat-card .card-label {
    color: rgba(255,255,255,0.7);
    font-size: 0.7rem;
}

.preview-chart {
    flex: 1;
    background: var(--apex-primary-dark);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    align-items: flex-end;
}

.chart-bars {
    display: flex;
    gap: 1rem;
    width: 100%;
    height: 100%;
    align-items: flex-end;
}

.bar {
    flex: 1;
    background: var(--apex-gradient-accent);
    border-radius: 4px 4px 0 0;
    min-height: 20px;
}

/* Features Section */
.features-section {
    padding: 7rem 2rem;
    background: white;
    position: relative;
}

.features-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(30, 58, 95, 0.15) 50%, transparent 100%);
}

.section-container {
    max-width: 1280px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4.5rem;
}

.section-badge {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.08) 0%, rgba(45, 74, 111, 0.08) 100%);
    color: var(--apex-primary);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(30, 58, 95, 0.12);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.section-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--apex-primary);
    margin: 0 0 1.25rem;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 1.15rem;
    color: #666;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    padding: 2.25rem;
    background: linear-gradient(145deg, #f8f9fc 0%, #f5f7fa 100%);
    border-radius: 20px;
    transition: all 0.4s ease;
    border: 1px solid rgba(30, 58, 95, 0.06);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--apex-gradient-accent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 60px rgba(30, 58, 95, 0.12),
                0 10px 25px rgba(0, 0, 0, 0.06);
    border-color: rgba(30, 58, 95, 0.12);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 65px;
    height: 65px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.75rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.feature-icon.blue { background: var(--apex-gradient); color: white; }
.feature-icon.green { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); color: white; }
.feature-icon.purple { background: var(--apex-gradient-accent); color: white; }
.feature-icon.orange { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); color: white; }
.feature-icon.red { background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%); color: white; }
.feature-icon.teal { background: linear-gradient(135deg, #00c6fb 0%, #005bea 100%); color: white; }

.feature-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--apex-primary);
    margin: 0 0 0.875rem;
    letter-spacing: -0.2px;
}

.feature-desc {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.75;
    margin: 0;
}

/* Modules Section */
.modules-section {
    padding: 7rem 2rem;
    background: linear-gradient(180deg, #f0f4f8 0%, #e8eef5 50%, #f5f8fc 100%);
    position: relative;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.75rem;
}

.module-card {
    background: white;
    padding: 2.25rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04),
                0 4px 15px rgba(30, 58, 95, 0.06);
    transition: all 0.4s ease;
    border: 1px solid rgba(30, 58, 95, 0.06);
    position: relative;
    overflow: hidden;
}

.module-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--apex-gradient-accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.module-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 60px rgba(30, 58, 95, 0.1),
                0 10px 25px rgba(0, 0, 0, 0.05);
}

.module-card:hover::after {
    transform: scaleX(1);
}

.module-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--apex-gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1;
    opacity: 0.9;
}

.module-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--apex-primary);
    margin: 0 0 1.25rem;
    letter-spacing: -0.2px;
}

.module-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.module-features li {
    padding: 0.625rem 0;
    color: #555;
    font-size: 0.925rem;
    border-bottom: 1px solid #f5f5f8;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    transition: color 0.2s ease;
}

.module-features li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.module-features li::before {
    content: "✓";
    color: var(--apex-accent);
    font-weight: 700;
    font-size: 0.85rem;
    width: 20px;
    height: 20px;
    background: rgba(230, 126, 34, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.module-card:hover .module-features li {
    color: #333;
}

/* CTA Section */
.cta-section {
    padding: 7rem 2rem;
    background: linear-gradient(135deg, var(--apex-primary) 0%, var(--apex-primary-light) 50%, var(--apex-primary) 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -25%;
    width: 150%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(230, 126, 34, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.cta-container {
    max-width: 850px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: 2.75rem;
    font-weight: 800;
    color: white;
    margin: 0 0 1.25rem;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.cta-content p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 2.5rem;
    line-height: 1.7;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 1.15rem 2.75rem;
    background: var(--apex-accent);
    color: white;
    text-decoration: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-cta:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    background: var(--apex-accent-light);
    color: white;
}

.btn-cta svg {
    transition: transform 0.3s ease;
}

.btn-cta:hover svg {
    transform: translateX(4px);
}

/* Footer */
.landing-footer {
    background: linear-gradient(180deg, var(--apex-primary-dark) 0%, #0f1f33 100%);
    padding: 5rem 2rem 2rem;
    position: relative;
}

.landing-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(230, 126, 34, 0.3) 50%, transparent 100%);
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    margin-bottom: 3.5rem;
}

.footer-brand .brand-text {
    font-size: 1.875rem;
    color: white;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.footer-brand p {
    color: #888;
    margin-top: 1rem;
    max-width: 320px;
    line-height: 1.7;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.footer-column h4 {
    color: white;
    font-weight: 600;
    margin: 0 0 1rem;
}

.footer-column a {
    display: block;
    color: #888;
    text-decoration: none;
    padding: 0.5rem 0;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: var(--apex-accent);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: #666;
    margin: 0.25rem 0;
    font-size: 0.875rem;
}

.footer-bottom .developer-credit a {
    color: var(--apex-accent);
    text-decoration: none;
}

.footer-bottom .developer-credit a:hover {
    text-decoration: underline;
}

/* ============================================
   LOGIN PAGE STYLES
   ============================================ */

.login-page-wrapper {
    display: flex;
    min-height: 100vh;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
}

.login-branding {
    flex: 1;
    background: linear-gradient(145deg, #0f2439 0%, #1e3a5f 50%, #2d4a6f 100%);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    max-height: 100vh;
}

.branding-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.branding-shape {
    position: absolute;
    border-radius: 50%;
}

.branding-shape.shape-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(230, 126, 34, 0.15) 0%, transparent 70%);
    top: -150px;
    right: -100px;
}

.branding-shape.shape-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
}

.branding-shape.shape-3 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(230, 126, 34, 0.2) 0%, transparent 70%);
    top: 50%;
    left: 10%;
}

.branding-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

.branding-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.login-apex-logo {
    height: 65px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
}

.branding-title {
    font-size: 1.85rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.75rem;
    line-height: 1.25;
    text-align: center;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
}

.branding-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 2rem;
    line-height: 1.6;
    text-align: center;
}

.branding-features {
    margin-bottom: 2rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.branding-feature {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.6rem 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.branding-feature:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.branding-feature:first-child {
    padding-top: 0;
}

.feature-check {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--apex-accent) 0%, var(--apex-accent-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(230, 126, 34, 0.4);
}

.branding-stats {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.15) 0%, rgba(243, 156, 18, 0.08) 100%);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    border: 1px solid rgba(230, 126, 34, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.stat-box {
    text-align: center;
    flex: 1;
}

.stat-box .stat-value {
    display: block;
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--apex-accent);
    letter-spacing: -0.5px;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(230, 126, 34, 0.3);
}

.stat-box .stat-text {
    display: block;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 0.35rem;
}

/* Login Form Section */
.login-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(145deg, #f8fafc 0%, #eef2f7 100%);
    overflow: hidden;
}

.login-form-container {
    width: 100%;
    max-width: 400px;
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(15, 36, 57, 0.12),
                0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(30, 58, 95, 0.08);
}

.back-to-home {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--apex-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
}

.back-to-home:hover {
    color: var(--apex-accent);
    transform: translateX(-3px);
}

.back-to-home svg {
    transition: transform 0.3s ease;
}

.back-to-home:hover svg {
    transform: translateX(-3px);
}

.login-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.login-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f2439;
    margin: 0 0 0.35rem;
    letter-spacing: -0.5px;
}

.login-header p {
    color: #64748b;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 400;
}

.login-alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: 0.85rem;
}

.login-alert.error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #dc2626;
    border: 1px solid #fecaca;
}

.form-field {
    margin-bottom: 1.15rem;
}

.form-field label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.form-field label svg {
    color: var(--apex-primary);
    opacity: 0.8;
    width: 16px;
    height: 16px;
}

/* Enhanced Syncfusion Input Styles */
.login-input.e-input-group,
.login-dropdown.e-input-group {
    border-radius: 10px !important;
    border: 2px solid #e2e8f0 !important;
    background: #f8fafc !important;
    transition: all 0.3s ease !important;
}

.login-input.e-input-group:hover,
.login-dropdown.e-input-group:hover {
    border-color: #cbd5e1 !important;
    background: #fff !important;
}

.login-input.e-input-group.e-input-focus,
.login-dropdown.e-input-group.e-input-focus {
    border-color: var(--apex-primary) !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.12) !important;
}

.login-input input,
.login-dropdown input {
    padding: 0.75rem 0.9rem !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: #1e293b !important;
}

.login-input input::placeholder,
.login-dropdown input::placeholder {
    color: #94a3b8 !important;
    font-weight: 400 !important;
}

/* Dropdown specific styles */
.login-dropdown .e-input-group-icon {
    color: var(--apex-primary) !important;
}

/* Password toggle */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .e-input-group {
    padding-right: 2.5rem !important;
}

.password-toggle-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.2s ease;
    z-index: 1;
}

.password-toggle-btn:hover {
    color: var(--apex-primary);
}

/* Forgot password link */
.forgot-password-link {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--apex-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: #475569;
    font-weight: 500;
}

.checkbox-container input {
    width: 16px;
    height: 16px;
    accent-color: var(--apex-primary);
    cursor: pointer;
}

/* Enhanced Submit Button */
.login-submit-btn {
    width: 100%;
    height: 48px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #0f2439 0%, #1e3a5f 100%) !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(15, 36, 57, 0.35) !important;
    transition: all 0.3s ease !important;
    text-transform: none !important;
}

.login-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(15, 36, 57, 0.45) !important;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 100%) !important;
}

.login-submit-btn:active:not(:disabled) {
    transform: translateY(0) !important;
}

.login-submit-btn:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
}

.login-submit-btn svg {
    transition: transform 0.3s ease;
    width: 18px;
    height: 18px;
}

.login-submit-btn:hover:not(:disabled) svg {
    transform: translateX(3px);
}

.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
}

.login-footer p {
    color: #94a3b8;
    font-size: 0.75rem;
    margin: 0.2rem 0;
    font-weight: 400;
}

.login-footer .developer-credit {
    margin-top: 0.35rem;
}

.login-footer .developer-credit a {
    color: var(--apex-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.login-footer .developer-credit a:hover {
    color: var(--apex-accent);
    text-decoration: underline;
}

/* 2FA Step Styles */
.twofa-step {
    text-align: center;
    padding: 0.5rem 0;
}

.twofa-icon {
    margin-bottom: 1rem;
    color: var(--apex-primary);
}

.twofa-icon svg {
    stroke: var(--apex-accent);
}

.twofa-description {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.twofa-input input {
    text-align: center;
    font-size: 1.25rem;
    letter-spacing: 0.5em;
    font-weight: 600;
}

.twofa-code-input {
    width: 100%;
    text-align: center;
    font-size: 1.25rem;
    letter-spacing: 0.5em;
    font-weight: 600;
    padding: 0.75rem 0.9rem;
    color: #1e293b;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.twofa-code-input:hover {
    border-color: #cbd5e1;
    background: #fff;
}

.twofa-code-input:focus {
    border-color: var(--apex-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.12);
}

.twofa-code-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
    letter-spacing: 0.1em;
}

.twofa-cancel-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s ease;
}

.twofa-cancel-btn:hover {
    color: var(--apex-primary);
}

/* ApexERP template compatibility (Blazor + Syncfusion) */
.site-navbar .navbar-search {
    position: relative;
}

/* Ensure dropdown overlay shows above page content */
.site-navbar .dropdown-menu.show {
    z-index: 2000;
}

/* Keep Syncfusion popups above the template menubar */
.e-popup,
.e-datepicker {
    z-index: 3000 !important;
}

/* Dialog must sit above its own overlay */
.e-dlg-overlay {
    z-index: 2999 !important;
}

.e-dialog {
    z-index: 3001 !important;
}

/* Syncfusion dropdown selected/active item - match theme */
.e-dropdownbase .e-list-item.e-active,
.e-dropdownbase .e-list-item.e-active.e-hover {
    background-color: var(--apex-primary) !important;
    color: #fff !important;
}

.e-dropdownbase .e-list-item.e-hover,
.e-dropdownbase .e-list-item:hover {
    background-color: rgba(30, 58, 95, 0.12) !important;
    color: var(--apex-primary) !important;
}

/* Apex topbar (ApexERP layout) */
.site-navbar,
.site-navbar .navbar-container {
    background: var(--apex-primary) !important;
}

.site-navbar .navbar-header {
    background: var(--apex-primary) !important;
}

.site-navbar .navbar-header .navbar-toggler {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Topbar toggle icon (match template; let template CSS animate/size) */
.site-navbar .navbar-toolbar .nav-link {
    color: rgba(255, 255, 255, 0.95);
}

.site-navbar .navbar-toolbar .nav-link:hover {
    color: rgba(255, 255, 255, 1);
}

.site-navbar .navbar-toolbar .icon.hamburger {
    background: transparent;
    border: none;
}

.site-navbar .navbar-toolbar .icon.hamburger::before,
.site-navbar .navbar-toolbar .icon.hamburger::after,
.site-navbar .navbar-toolbar .icon.hamburger .hamburger-bar {
    background-color: rgba(255, 255, 255, 0.98) !important;
}

.site-navbar .navbar-header .hamburger::before,
.site-navbar .navbar-header .hamburger::after,
.site-navbar .navbar-header .hamburger .hamburger-bar {
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.apex-navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0.6rem 1rem;
    height: 6rem;
}

.apex-navbar-logo {
    height: 63px;
    width: auto;
    object-fit: contain;
    padding: 8px 10px;
    border-radius: 12px;
    /* transparent background – white logo visible on navy topbar */
    background: transparent;
    border: none;
    box-shadow: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.apex-navbar-title {
    font-weight: 700;
    color: #0f2439;
    letter-spacing: 0.02em;
}

.site-navbar .navbar-toolbar {
    align-items: center;
}

/* Sidebar background – match topbar navy */
.site-menubar {
    background: var(--apex-primary) !important;
}

/* Menu item states on navy sidebar */
.site-menu > .site-menu-item.open,
.site-menu > .site-menu-item.active {
    background: var(--apex-primary-light) !important;
}

.site-menu > .site-menu-item.hover > a,
.site-menu > .site-menu-item:hover > a {
    background-color: var(--apex-primary-light) !important;
}

.site-menu .site-menu-sub .site-menu-item.hover > a,
.site-menu .site-menu-sub .site-menu-item:hover > a {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

.site-menu .site-menu-sub .site-menu-item.active {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Reduce gap between topbar and first menu item */
.site-menubar ul.site-menu {
    padding-top: 1.0rem !important;
}

/* Enable scrolling in the sidebar so all menu items are reachable */
.site-menubar-body {
    height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.site-menu {
    overflow-y: visible !important;
    padding-bottom: 2rem !important;
}

/* Theme-matched scrollbar for sidebar */
.site-menubar-body::-webkit-scrollbar {
    width: 5px;
}

.site-menubar-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.site-menubar-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
}

.site-menubar-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Firefox scrollbar */
.site-menubar-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) rgba(0, 0, 0, 0.1);
}

/* Ensure Syncfusion icons show in ApexERP menu */
.site-menu-icon.e-icons {
    font-size: 18px;
    margin-right: 12px;
    color: rgba(255, 255, 255, 0.95);
}

/* Menu arrow icon - use CSS chevron instead of broken Web Icons font */
.site-menu-arrow {
    font-family: inherit !important;
    right: 18px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.site-menu-arrow::before {
    content: "" !important;
    display: block;
    width: 7px;
    height: 7px;
    border-right: 2px solid rgba(255, 255, 255, 0.55);
    border-bottom: 2px solid rgba(255, 255, 255, 0.55);
    transform: rotate(-45deg);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.site-menu-item.open > a .site-menu-arrow::before {
    transform: rotate(45deg) !important;
    border-color: rgba(255, 255, 255, 0.85);
}

.site-menu-item:hover > a .site-menu-arrow::before {
    border-color: rgba(255, 255, 255, 0.85);
}

/* Submenu item marker (small dash) */
.site-menu .site-menu-sub .site-menu-item > a {
    position: relative;
    padding-left: 52px;
}

.site-menu .site-menu-sub .site-menu-item > a::before {
    content: "";
    position: absolute;
    left: 34px;
    top: 50%;
    width: 6px;
    height: 2px;
    border-radius: 1px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.45);
    transition: width 0.2s ease, background 0.2s ease;
}

.site-menu .site-menu-sub .site-menu-item:hover > a::before,
.site-menu .site-menu-sub .site-menu-item.active > a::before {
    width: 10px;
    background: #fff;
}

.site-navbar .navbar-search {
    width: 280px;
    max-width: 36vw;
}

.site-navbar .navbar-search .e-input-group,
.site-navbar .navbar-search .e-control-wrapper,
.site-navbar .navbar-search input {
    width: 100%;
}

.site-navbar .navbar-collapse-toolbar {
    display: flex;
    align-items: center;
    min-height: 6rem;
}

.apex-topbar-field {
    gap: 10px;
}

.apex-topbar-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.apex-topbar-icon {
    position: relative;
}

.apex-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.96);
    cursor: pointer;
    transition: background 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.apex-icon-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 10px 20px rgba(15, 36, 57, 0.18);
    transform: translateY(-1px);
}

.apex-fullscreen-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    background:
        linear-gradient(currentColor, currentColor) left top / 6px 2px no-repeat,
        linear-gradient(currentColor, currentColor) left top / 2px 6px no-repeat,
        linear-gradient(currentColor, currentColor) right top / 6px 2px no-repeat,
        linear-gradient(currentColor, currentColor) right top / 2px 6px no-repeat,
        linear-gradient(currentColor, currentColor) left bottom / 6px 2px no-repeat,
        linear-gradient(currentColor, currentColor) left bottom / 2px 6px no-repeat,
        linear-gradient(currentColor, currentColor) right bottom / 6px 2px no-repeat,
        linear-gradient(currentColor, currentColor) right bottom / 2px 6px no-repeat;
    opacity: 0.95;
}

/* Dark mode toggle: moon icon (crescent) */
.apex-darkmode-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    border-radius: 50%;
    box-shadow: inset -5px -2px 0 0 currentColor;
    opacity: 0.92;
    transition: box-shadow 0.2s ease, background 0.2s ease;
}

/* Dark mode toggle: sun icon (circle with rays) */
.apex-lightmode-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    position: relative;
    border-radius: 50%;
    background: currentColor;
    box-shadow:
        0 -8px 0 -5px currentColor,
        0  8px 0 -5px currentColor,
       -8px 0 0 -5px currentColor,
        8px 0 0 -5px currentColor,
       -6px -6px 0 -5px currentColor,
        6px -6px 0 -5px currentColor,
       -6px  6px 0 -5px currentColor,
        6px  6px 0 -5px currentColor;
    opacity: 0.92;
    color: #f9c846;
}

/* Folded menubar (icon-only) */
body.site-menubar-fold .site-menu-title,
body.site-menubar-fold .site-menu-arrow {
    display: none !important;
}

body.site-menubar-fold .site-menubar {
    width: 72px !important;
    overflow: visible !important;
}

body.site-menubar-fold .site-menubar-body {
    overflow: visible !important;
}

body.site-menubar-fold .site-menu {
    overflow: visible !important;
}

body.site-menubar-fold .site-navbar .navbar-header {
    width: 72px !important;
    min-width: 72px !important;
    overflow: hidden;
}

body.site-menubar-fold .site-navbar .navbar-container {
    margin-left: 0 !important;
    padding-left: 6px;
}

body.site-menubar-fold .page {
    margin-left: 72px !important;
}

body.site-menubar-fold .site-menu-icon.e-icons {
    margin-right: 0;
    font-size: 20px;
}

/* Folded mode: center logo inside narrow header */
body.site-menubar-fold .apex-navbar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 100%;
    height: 6rem;
    overflow: hidden;
}

body.site-menubar-fold .apex-navbar-logo {
    height: 34px;
    width: auto;
    padding: 4px 6px;
    border-radius: 8px;
    max-width: 60px;
    object-fit: contain;
}

/* Folded mode: show submenu on hover like template */
body.site-menubar-fold .site-menu > .site-menu-item {
    position: relative;
}

body.site-menubar-fold .site-menu > .site-menu-item > .site-menu-sub {
    display: none !important;
    visibility: hidden;
    opacity: 0;
}

body.site-menubar-fold .site-menu > .site-menu-item:hover > .site-menu-sub,
body.site-menubar-fold .site-menu > .site-menu-item.hover > .site-menu-sub {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: absolute;
    left: 72px;
    top: 0;
    min-width: 260px;
    padding: 10px 0;
    background: var(--apex-primary);
    border-radius: 12px;
    box-shadow: 0 16px 34px rgba(15, 36, 57, 0.24);
    z-index: 2500;
    max-height: calc(100vh - 90px);
    overflow: auto;
}

body.site-menubar-fold .site-menu > .site-menu-item:hover > .site-menu-sub.site-menu-sub-up {
    top: auto;
    bottom: 0;
}

body.site-menubar-fold .site-menu > .site-menu-item:hover > a .site-menu-title {
    display: inline-block !important;
}

body.site-menubar-fold .site-menu > .site-menu-item:hover .site-menu-title {
    display: inline-block !important;
    max-width: 220px;
}

body.site-menubar-fold .site-menu > .site-menu-item:hover .site-menu-arrow {
    display: inline-block !important;
}

body.site-menubar-fold .site-menu .site-menu-sub .site-menu-item > a {
    padding-left: 44px;
}

body.site-menubar-fold .site-menu .site-menu-sub .site-menu-item > a::before {
    left: 24px;
}

.apex-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--apex-gradient);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.apex-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.apex-dropdown {
    border-radius: 12px;
    border: 1px solid rgba(15, 36, 57, 0.12);
    box-shadow: 0 18px 40px rgba(15, 36, 57, 0.18);
    padding-top: 8px;
    padding-bottom: 8px;
}

.apex-dropdown .dropdown-item {
    padding: 10px 14px;
}

/* Validation Message Styles */
.form-field .validation-message {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (max-width: 1200px) {
    .hero-title {
        font-size: 2.75rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modules-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .nav-links {
        display: none;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-visual {
        display: none;
    }
    
    .login-page-wrapper {
        flex-direction: column;
    }
    
    .login-branding {
        padding: 1.75rem 1.5rem;
        min-height: auto;
    }
    
    .branding-content {
        max-width: 100%;
    }
    
    .login-apex-logo {
        height: 50px;
    }
    
    .branding-title {
        font-size: 1.4rem;
    }
    
    .branding-subtitle {
        font-size: 0.85rem;
        margin-bottom: 1.25rem;
    }
    
    .branding-features {
        display: none;
    }
    
    .branding-stats {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .stat-box .stat-value {
        font-size: 1.35rem;
    }
    
    .stat-box .stat-text {
        font-size: 0.6rem;
    }
    
    .login-form-section {
        padding: 1.5rem;
    }
    
    .login-form-container {
        padding: 1.5rem;
        box-shadow: 0 -10px 40px rgba(30, 58, 95, 0.1);
    }
}

@media (min-height: 700px) and (min-width: 993px) {
    .branding-features {
        display: block;
    }
}

@media (max-height: 699px) and (min-width: 993px) {
    .branding-features {
        display: none;
    }
    
    .branding-subtitle {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .modules-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-divider {
        display: none;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 2rem;
    }
    
    .footer-links {
        gap: 2rem;
    }
    
    .cta-content h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 6rem 1rem 3rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .btn-primary-landing,
    .btn-secondary-landing {
        width: 100%;
        justify-content: center;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .branding-stats {
        flex-wrap: wrap;
    }
    
    .login-form-section {
        padding: 1.5rem;
    }
}

/* ============================================
   MOBILE RESPONSIVE – TopBar, Sidebar & Login
   ============================================ */

/* Mobile hamburger toggle button (hidden on desktop) */
.navbar-mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    flex-shrink: 0;
    margin-right: 8px;
}

.navbar-mobile-toggle .hamburger-bar {
    width: 18px;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 2px;
    transition: all 0.2s ease;
}

/* Mobile overlay backdrop */
.mobile-menu-overlay {
    display: none;
}

/* Mobile-only icons (inside navbar-header) – hidden on desktop */
.mobile-topbar-icons {
    display: none;
}

/* Mobile-only dropdowns row – hidden on desktop */
.mobile-topbar-dropdowns {
    display: none;
}

/* Desktop-only icons – visible by default */
.desktop-topbar-icon {
    display: flex;
}

@media (max-width: 767.98px) {
    /* Show mobile hamburger */
    .navbar-mobile-toggle {
        display: flex;
    }

    /* === ROW 1: Hamburger + Logo + Icons === */

    /* Navbar header: flex row with hamburger, logo, and icons */
    .site-navbar .navbar-header {
        width: 100% !important;
        min-width: auto !important;
        max-width: 100vw !important;
        flex-shrink: 0;
        display: flex !important;
        align-items: center;
        padding: 0 8px;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    /* Show mobile icons in the header row, push to right */
    .mobile-topbar-icons {
        display: flex !important;
        align-items: center;
        gap: 6px;
        margin-left: auto;
        list-style: none;
        padding: 0;
        flex-shrink: 0;
    }

    .mobile-topbar-icons .apex-topbar-icon {
        position: relative;
        list-style: none;
    }

    .mobile-topbar-icons .apex-icon-btn {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .mobile-topbar-icons .apex-avatar {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }

    /* Hide desktop icons in the toolbar */
    .desktop-topbar-icon {
        display: none !important;
    }

    /* === ROW 2: Company + FY dropdowns === */

    /* Show mobile dropdowns row */
    .mobile-topbar-dropdowns {
        display: flex !important;
        align-items: center;
        gap: 8px;
        width: 100%;
        max-width: 100vw;
        padding: 4px 10px 6px;
        background: inherit;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .mobile-dropdown-item {
        display: flex;
        align-items: center;
        gap: 4px;
        min-width: 0;
        overflow: hidden;
    }

    .mobile-dropdown-company {
        flex: 4;
    }

    .mobile-dropdown-fyr {
        flex: 2;
    }

    .mobile-dropdown-item .apex-topbar-label {
        font-size: 10px !important;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .mobile-dropdown-item .e-input-group {
        height: 28px !important;
        min-height: 28px !important;
    }

    /* Hide the desktop toolbar dropdowns on mobile */
    .navbar-toolbar-right .apex-topbar-field {
        display: none !important;
    }

    /* Hide entire desktop navbar-container on mobile (search, toggle, desktop dropdowns) */
    .site-navbar .navbar-container {
        display: none !important;
    }

    /* Navbar brand / logo: smaller on mobile */
    .apex-navbar-brand {
        height: auto;
        padding: 0.3rem 0.5rem;
    }

    .apex-navbar-logo {
        height: 40px !important;
        padding: 4px 6px !important;
        border-radius: 8px;
    }

    /* Overall navbar: auto height, flex column to stack rows */
    .site-navbar,
    .site-navbar-small .site-navbar {
        height: auto !important;
        min-height: auto !important;
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: stretch !important;
        max-width: 100vw !important;
        overflow-x: clip !important;
    }

    .navbar-brand,
    .site-navbar-small .site-navbar .navbar-brand {
        height: auto !important;
        padding: 0.3rem 0.5rem !important;
    }

    /* site-navbar-small overrides for mobile */
    .site-navbar-small .site-menubar {
        top: auto !important;
    }

    /* Body top padding: enough for 2-row navbar (~88px) */
    body,
    body.site-navbar-small {
        padding-top: 88px !important;
    }

    /* Remove top padding for pages using EmptyLayout (login, forgot-password) */
    body:has(.login-page-wrapper),
    body:has(.forgot-page-wrapper) {
        padding-top: 0 !important;
    }

    /* Sidebar: hidden by default on mobile, slide-in overlay */
    .site-menubar {
        top: 88px !important;
        height: calc(100% - 88px) !important;
        left: 0 !important;
        width: 260px !important;
        transform: translateX(-100%) !important;
        -webkit-transform: translateX(-100%) !important;
        transition: transform 0.3s ease !important;
        z-index: 1500 !important;
    }

    /* Override unfold margin on mobile */
    .site-menubar-unfold .page,
    .site-menubar-unfold .site-footer {
        margin-left: 0 !important;
    }

    .site-menubar-fold .page {
        margin-left: 0 !important;
    }

    .site-menubar-fold .site-menubar {
        width: 260px !important;
        left: 0 !important;
        transform: translateX(-100%) !important;
        -webkit-transform: translateX(-100%) !important;
    }

    /* When mobile menu is open – slide in */
    .site-menubar.mobile-open {
        transform: translateX(0) !important;
        -webkit-transform: translateX(0) !important;
    }

    /* Mobile overlay */
    .mobile-menu-overlay {
        display: block;
        position: fixed;
        top: 88px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 1499;
    }

    /* Page content: full width on mobile */
    .page {
        margin-left: 0 !important;
        padding: 10px;
        padding-bottom: 50px;
    }

    .page-content.container-fluid {
        padding: 0;
    }

    /* Footer full width on mobile */
    .site-footer {
        margin-left: 0 !important;
    }

    /* Page header: stack on mobile */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 12px;
        gap: 10px;
    }

    .header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    /* Filter section: allow wrapping */
    .filter-dropdown {
        width: 100%;
    }

    .filter-dropdown-small {
        width: 100%;
    }

    .date-range {
        width: 100%;
    }

    /* Summary cards: single column on mobile */
    .summary-cards {
        grid-template-columns: 1fr;
    }

    /* Grid container: allow horizontal scroll */
    .grid-container {
        overflow-x: auto;
    }

    /* Page container: reduced padding */
    .page-container {
        padding: 10px;
    }

    /* Dropdowns on mobile: ensure they don't overflow viewport */
    .apex-dropdown {
        max-width: calc(100vw - 20px);
    }

    .dropdown-menu-end.show {
        right: 0 !important;
        left: auto !important;
    }

    /* Prevent Syncfusion dropdown input from expanding beyond its container */
    .mobile-topbar-dropdowns .e-input-group,
    .mobile-topbar-dropdowns .e-control-wrapper {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Prevent horizontal scrolling when dropdown popup opens */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
}

/* Login page mobile fixes */
@media (max-width: 767.98px) {
    .login-page-wrapper {
        overflow: auto !important;
        min-height: 100vh;
        height: auto !important;
        max-height: none !important;
    }

    .login-page-wrapper .login-branding {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        padding: 1.5rem 1rem;
    }

    .login-page-wrapper .login-form-section {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        padding: 1rem;
    }

    .login-form-container {
        max-width: 100%;
        padding: 1.25rem !important;
        border-radius: 14px;
    }

    .login-header h2 {
        font-size: 1.3rem;
    }

    .branding-title {
        font-size: 1.2rem !important;
    }

    .branding-subtitle {
        font-size: 0.8rem !important;
        margin-bottom: 1rem !important;
    }

    .branding-stats {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }

    .stat-box .stat-value {
        font-size: 1.15rem !important;
    }

    .stat-box .stat-text {
        font-size: 0.55rem !important;
    }

    .login-apex-logo {
        height: 45px !important;
    }

    .back-to-home {
        margin-bottom: 0.75rem;
    }

    .form-field {
        margin-bottom: 0.85rem;
    }
}

/* ============================================
   SITE FOOTER – always visible at bottom
   ============================================ */
.site-footer {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100% !important;
    height: 30px;
    line-height: 30px;
    margin-left: 0 !important;
    margin-right: 0 !important;
    background-color: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    z-index: 1100;
    padding: 0 1rem;
    box-sizing: border-box;
}

.site-footer a {
    color: #3e8ef7;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}