@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --bg-main: #f4f7fb;
    --bg-card: #ffffff;
    --bg-sidebar: #091e3a;
    --bg-sidebar-hover: #122d52;
    --text-primary: #091e3a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-light: #f8fafc;
    
    /* Core Lending Primary Brand Palette */
    --primary: #0077b6;
    --primary-dark: #091e3a;
    --primary-hover: #005f94;
    --primary-light: #e0f2fe;
    
    --brand-navy: #091e3a;
    --brand-blue: #0077b6;
    --brand-cyan: #00b4d8;
    --brand-cyan-light: #e0f7fa;
    --brand-gradient: linear-gradient(135deg, #091e3a 0%, #0077b6 60%, #00b4d8 100%);
    --brand-gradient-vibrant: linear-gradient(135deg, #0077b6 0%, #00b4d8 100%);

    --emerald: #059669;
    --emerald-light: #d1fae5;
    --emerald-hover: #047857;
    --amber: #d97706;
    --amber-light: #fef3c7;
    --rose: #e11d48;
    --rose-light: #ffe4e6;
    --indigo: #0077b6;
    --indigo-light: #e0f2fe;
    
    --border-color: #e2e8f0;
    --border-focus: #0077b6;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    
    --shadow-sm: 0 1px 3px 0 rgb(9 30 58 / 0.05);
    --shadow-md: 0 4px 8px -1px rgb(9 30 58 / 0.08), 0 2px 4px -2px rgb(9 30 58 / 0.06);
    --shadow-lg: 0 12px 20px -3px rgb(9 30 58 / 0.10), 0 4px 6px -4px rgb(9 30 58 / 0.05);
    
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    --font-size-base: 14px;
    --font-size-input: 14px;
    --font-size-table: 13.5px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-size: var(--font-size-base);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

body.sidebar-locked {
    overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 600;
}

/* Layout */
.app-container {
    display: flex;
    height: 100vh;
    max-height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Sidebar Navigation */
.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1), transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    border-right: 1px solid rgba(0, 180, 216, 0.15);
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

body.sidebar-collapsed .sidebar {
    margin-left: -260px;
}

.sidebar-header {
    height: 60px;
    padding: 0 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    position: relative;
}

.sidebar-close-btn {
    display: none;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    margin-left: auto;
}

.brand-logo-img {
    height: 38px;
    width: auto;
    max-width: 58px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--brand-gradient-vibrant);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.4);
    flex-shrink: 0;
}

.brand-title {
    font-size: 16.5px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #ffffff;
    line-height: 1.2;
}

.brand-title span {
    color: var(--brand-cyan);
}

.brand-subtitle {
    font-size: 10px;
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    padding: 14px 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-label {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #94a3b8;
    padding: 10px 10px 4px 10px;
    font-weight: 600;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.nav-link:hover {
    background: var(--bg-sidebar-hover);
    color: #ffffff;
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(0, 119, 182, 0.85) 0%, rgba(0, 180, 216, 0.75) 100%);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0, 119, 182, 0.4);
    border-left: 3px solid #38bdf8;
}

.nav-badge {
    margin-left: auto;
    background: var(--rose);
    color: white;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 999px;
}

.sidebar-footer {
    height: 60px;
    padding: 0 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.15);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #334155;
    color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13.5px;
    flex-shrink: 0;
}

.user-info {
    overflow: hidden;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role-badge {
    font-size: 10.5px;
    color: #94a3b8;
    text-transform: capitalize;
}

/* Sidebar Backdrop */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(9, 30, 58, 0.65);
    backdrop-filter: blur(3px);
    z-index: 999;
}

/* Main Content Area */
.main-wrapper {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

.top-navbar {
    background: var(--bg-card);
    height: 60px;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    z-index: 50;
    gap: 12px;
}

.top-navbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.sidebar-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sidebar-toggle-btn:hover {
    background: #f8fafc;
    color: var(--brand-blue);
    border-color: rgba(0, 180, 216, 0.5);
    box-shadow: 0 2px 8px rgba(0, 119, 182, 0.15);
}

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

.mobile-toggle-btn {
    display: none;
}

.top-navbar-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.top-navbar-date {
    font-size: 12.5px;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.content-body {
    padding: 24px;
    flex: 1 1 auto;
    overflow-y: auto;
    min-width: 0;
    min-height: 0;
}

/* Common UI Components */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-bottom: 20px;
    min-width: 0;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 8px;
}

.card-title {
    font-size: 15.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    min-width: 0;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-icon.emerald { background: var(--emerald-light); color: var(--emerald); }
.stat-icon.amber { background: var(--amber-light); color: var(--amber); }
.stat-icon.rose { background: var(--rose-light); color: var(--rose); }
.stat-icon.indigo { background: var(--indigo-light); color: var(--indigo); }
.stat-icon.dark { background: #e2e8f0; color: var(--primary); }

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}

.stat-subtext {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: var(--font-size-input);
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-lg {
    padding: 10px 20px;
    font-size: 14.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #0077b6 0%, #0096c7 100%);
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(0, 119, 182, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #005f94 0%, #0077b6 100%);
    box-shadow: 0 5px 12px rgba(0, 119, 182, 0.35);
}

.btn-brand {
    background: var(--brand-gradient);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(9, 30, 58, 0.3);
}

.btn-brand:hover {
    background: linear-gradient(135deg, #07172c 0%, #005f94 100%);
}

.btn-cyan {
    background: linear-gradient(135deg, #00b4d8 0%, #38bdf8 100%);
    color: #091e3a;
    font-weight: 700;
}

.btn-cyan:hover {
    background: linear-gradient(135deg, #0096c7 0%, #00b4d8 100%);
    color: #ffffff;
}

.btn-emerald {
    background: var(--emerald);
    color: #ffffff;
}

.btn-emerald:hover {
    background: var(--emerald-hover);
}

.btn-amber {
    background: var(--amber);
    color: #ffffff;
}

.btn-amber:hover {
    background: #b45309;
}

.btn-rose {
    background: var(--rose);
    color: #ffffff;
}

.btn-rose:hover {
    background: #be123c;
}

.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: #f1f5f9;
}

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

.form-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.form-control, .form-select {
    width: 100%;
    padding: 8px 12px;
    font-size: var(--font-size-input);
    color: var(--text-primary);
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.15);
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Responsive Grid Form Helpers */
.form-row-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.form-row-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* Tables & Data Readability */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
}

.table-responsive::-webkit-scrollbar {
    height: 6px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.data-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    font-size: var(--font-size-table);
    text-align: left;
}

.data-table th {
    background: #f8fafc;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    font-size: 12.5px;
}

.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    font-size: 13px;
}

.data-table td strong {
    color: var(--text-primary);
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

/* DataTables Component Integration Styling */
.datatable-wrapper {
    width: 100% !important;
    display: block !important;
}

.datatable-top {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 6px 0 14px 0 !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    border-bottom: 1px solid var(--border-color) !important;
    margin-bottom: 12px !important;
}

.datatable-top::before,
.datatable-top::after {
    display: none !important;
}

.datatable-dropdown {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 13px !important;
    color: var(--text-secondary) !important;
    float: none !important;
}

.datatable-dropdown label {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 13px !important;
    color: var(--text-secondary) !important;
    margin: 0 !important;
}

.datatable-dropdown .datatable-selector {
    padding: 6px 10px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    font-size: 13px !important;
    background-color: #ffffff !important;
    color: var(--text-primary) !important;
    outline: none !important;
    cursor: pointer !important;
    transition: border-color 0.15s ease !important;
}

.datatable-dropdown .datatable-selector:focus {
    border-color: var(--brand-blue) !important;
    box-shadow: 0 0 0 2px rgba(0, 119, 182, 0.15) !important;
}

.datatable-search {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    margin-left: auto !important; /* Pushes search to the far right */
    float: none !important;
    text-align: right !important;
}

.datatable-search label {
    font-size: 13px !important;
    color: var(--text-secondary) !important;
    font-weight: 500 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.datatable-search .datatable-input {
    width: 240px !important;
    max-width: 100% !important;
    padding: 7px 12px !important;
    font-size: 13px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    background: #ffffff !important;
    color: var(--text-primary) !important;
    outline: none !important;
    transition: all 0.2s ease !important;
    box-shadow: var(--shadow-sm) !important;
}

.datatable-search .datatable-input:focus {
    border-color: var(--brand-blue) !important;
    box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.15) !important;
}

.datatable-container {
    border: none !important;
    overflow-x: auto !important;
    width: 100% !important;
}

.datatable-bottom {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 0 4px 0 !important;
    width: 100% !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    border-top: 1px solid var(--border-color) !important;
    margin-top: 10px !important;
}

.datatable-bottom::before,
.datatable-bottom::after {
    display: none !important;
}

.datatable-info {
    font-size: 12.5px !important;
    color: var(--text-secondary) !important;
    float: none !important;
}

.datatable-pagination {
    float: none !important;
    margin-left: auto !important;
}

.datatable-pagination .datatable-pagination-list {
    display: flex !important;
    list-style: none !important;
    gap: 4px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.datatable-pagination-list-item-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 28px !important;
    height: 28px !important;
    padding: 0 8px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    border-radius: var(--radius-sm) !important;
    color: var(--text-secondary) !important;
    text-decoration: none !important;
    border: 1px solid var(--border-color) !important;
    background: #ffffff !important;
    transition: all 0.15s ease !important;
}

.datatable-pagination-list-item-link:hover {
    background: #f1f5f9 !important;
    color: var(--brand-navy) !important;
}

.datatable-pagination-list-item.datatable-active .datatable-pagination-list-item-link {
    background: var(--brand-blue) !important;
    color: #ffffff !important;
    border-color: var(--brand-blue) !important;
    font-weight: 700 !important;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2.5px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
}

.badge-emerald { background: var(--emerald-light); color: var(--emerald); }
.badge-amber { background: var(--amber-light); color: var(--amber); }
.badge-rose { background: var(--rose-light); color: var(--rose); }
.badge-indigo { background: var(--indigo-light); color: var(--indigo); }
.badge-slate { background: #f1f5f9; color: #475569; }

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: #ffffff;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: modalAppear 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-box.modal-lg {
    max-width: 820px;
}

@keyframes modalAppear {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    background: #f8fafc;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    flex-wrap: wrap;
}

/* Camera & Proof Preview Styles */
.camera-container {
    width: 100%;
    background: #000000;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-container video, .camera-container canvas, .camera-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-timestamp-overlay {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 11px;
    display: flex;
    justify-content: space-between;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (Mobile-First / Space Optimization)
   ========================================================================== */

/* Tablets & Small Desktops (max-width: 991px) */
@media (max-width: 991px) {
    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        transform: translateX(-100%);
        box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar-backdrop.active {
        display: block;
    }

    .sidebar-close-btn {
        display: block;
    }

    .mobile-toggle-btn {
        display: flex;
    }

    .top-navbar {
        padding: 0 16px;
    }

    .content-body {
        padding: 16px;
    }

    .card {
        padding: 16px;
        margin-bottom: 16px;
    }

    .form-row-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
    :root {
        --font-size-base: 13.5px;
        --font-size-input: 13.5px;
        --font-size-table: 12.5px;
    }

    .top-navbar {
        height: 54px;
        padding: 0 12px;
    }

    .top-navbar-title {
        font-size: 15px;
    }

    .top-navbar-date {
        display: none;
    }

    .content-body {
        padding: 12px;
    }

    .card {
        padding: 14px;
        margin-bottom: 12px;
        border-radius: var(--radius-md);
    }

    .card-header {
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 12px;
    }

    .stat-card {
        padding: 12px;
        gap: 10px;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .stat-value {
        font-size: 17px;
    }

    .stat-label {
        font-size: 11px;
    }

    .form-row-2, .form-row-3, .form-row-4 {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .modal-overlay {
        padding: 10px;
    }

    .modal-box {
        border-radius: var(--radius-lg);
    }

    .modal-header, .modal-body, .modal-footer {
        padding: 14px;
    }

    .data-table th, .data-table td {
        padding: 8px 10px;
    }

    .datatable-top, .datatable-bottom {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

    .datatable-search {
        width: 100% !important;
        margin-left: 0 !important;
    }

    .datatable-search label {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .datatable-search .datatable-input {
        width: 100% !important;
        flex: 1 !important;
    }
}

/* Extra Small Phones (max-width: 480px) */
@media (max-width: 480px) {
    .content-body {
        padding: 8px;
    }

    .card {
        padding: 12px;
        margin-bottom: 10px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .btn {
        padding: 7px 12px;
        font-size: 13px;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

/* Print Specific Style */
@media print {
    body {
        background: white;
    }
    .sidebar, .top-navbar, .no-print, .btn, .nav-link, .sidebar-backdrop, .datatable-top, .datatable-bottom {
        display: none !important;
    }
    .main-wrapper {
        margin: 0 !important;
        padding: 0 !important;
    }
    .content-body {
        padding: 0 !important;
    }
    .card {
        border: 1px solid #000;
        box-shadow: none;
        page-break-inside: avoid;
        padding: 10px !important;
    }
}
