/* Site-specific styles */
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, #f4f7fb 0%, #eef3f9 100%);
    color: #1f2937;
    letter-spacing: -0.01em;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* Preloader Styles */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    z-index: 9999;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* Grid Loading Indicator */
.grid-loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: #667eea;
}

.grid-loading-indicator i {
    animation: spin 1s linear infinite;
}

.preloader-icon {
    position: relative;
    width: 60px;
    height: 60px;
}

.preloader-icon i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #667eea;
    font-size: 2.5rem;
}

.preloader-icon::before,
.preloader-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 3px solid transparent;
}

.preloader-icon::before {
    width: 60px;
    height: 60px;
    border-top-color: #667eea;
    border-right-color: #667eea;
    animation: spin 1s linear infinite;
}

.preloader-icon::after {
    width: 45px;
    height: 45px;
    border-bottom-color: #764ba2;
    border-left-color: #764ba2;
    animation: spin 0.8s linear infinite reverse;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.card {
    margin-bottom: 20px;
}

.btn {
    margin-right: 5px;
}

/* Modal Improvements */
.modal {
    z-index: 1050;
}

.modal-dialog {
    margin: 1.75rem auto;
    max-width: 90%;
}

.modal-dialog.modal-lg {
    max-width: 800px;
}

.modal-dialog.modal-xl {
    max-width: 1140px;
}

.modal-content {
    border: none;
    border-radius: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.modal-header.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.modal-header.bg-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.modal-header.bg-dark {
    background: linear-gradient(135deg, #232526 0%, #414345 100%);
}

.modal-header.bg-primary.text-white,
.modal-header.bg-success.text-white,
.modal-header.bg-dark.text-white {
    color: white;
}

.modal-title {
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0;
}

.modal-header .close {
    opacity: 0.9;
    transition: opacity 0.2s ease;
    padding: 0;
    margin: -0.5rem -0.5rem -0.5rem auto;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: white;
}

.modal-header .close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 1rem;
    background: #ffffff;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0.75rem 1rem;
    background: #f8fafc;
}

.modal-footer .btn {
    margin-right: 0.5rem;
    padding: 0.375rem 1rem;
    font-weight: 500;
    border-radius: 0;
    transition: all 0.2s ease;
}

.modal-footer .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-footer .btn-light {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-footer .btn-light:hover {
    background: #f8fafc;
    border-color: rgba(0, 0, 0, 0.15);
}

/* Form improvements in modals */
.modal .form-group {
    margin-bottom: 0.75rem;
}

.modal .form-group label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
}

.modal .form-group label i {
    color: #667eea;
    margin-right: 0.375rem;
}

.modal .form-control {
    border-radius: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.modal .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal .form-control::placeholder {
    color: #9ca3af;
}

.modal .custom-control-label {
    font-weight: 500;
    color: #374151;
}

.modal .custom-control-input:checked ~ .custom-control-label::before {
    background-color: #667eea;
    border-color: #667eea;
}

/* Modal backdrop */
.modal-backdrop {
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
}

.modal-backdrop.show {
    opacity: 1;
}

.table-responsive {
    overflow-x: auto;
}

.form-group {
    margin-bottom: 1rem;
}

.alert {
    margin-bottom: 1rem;
}

.login-page, .register-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box, .register-box {
    width: 400px;
}

.wrapper {
    min-height: 100vh;
}

.nav-layout-side {
    background: linear-gradient(180deg, #f4f7fb 0%, #eef3f9 100%);
}

.layout-top-nav .main-header .container,
.layout-top-nav .content-header .container-fluid,
.layout-top-nav .content .container-fluid {
    max-width: 1320px;
}

.nav-layout-side .content-wrapper,
.nav-layout-side .main-footer {
    margin-left: 280px;
    width: calc(100% - 280px);
}

.nav-layout-top .app-sidebar-shell,
.nav-layout-top .nav-layout-toggle-side {
    display: none !important;
}

.nav-layout-side .top-nav-shell {
    display: none;
}

.nav-layout-side .app-sidebar-shell {
    display: block;
}

.content-wrapper {
    background: transparent;
    padding-bottom: 0.6rem;
}

.content-header {
    padding: 0.15rem 0 0;
    margin-bottom: 0.15rem;
}

.content-header h1 {
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.1;
}

.page-shell-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-header .row.mb-2 {
    margin-bottom: 0.2rem !important;
}

.page-shell-label {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #1677ff;
    background: rgba(22, 119, 255, 0.09);
    border-radius: 0;
    padding: 0.2rem 0.45rem;
}

.breadcrumb {
    background: rgba(255, 255, 255, 0.7);
    padding: 0.22rem 0.55rem;
    border-radius: 0;
    backdrop-filter: blur(8px);
    margin-bottom: 0;
}

.main-header.navbar {
    border-bottom: 0;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
}

.main-header.navbar.navbar-white {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(14px);
}

.main-header.navbar.navbar-dark {
    background: linear-gradient(135deg, #1677ff 0%, #0d5fe9 100%) !important;
    box-shadow: 0 10px 30px rgba(22, 119, 255, 0.25);
}

.main-header .navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #fff !important;
    font-weight: 800;
    margin-right: 1.25rem;
    padding-top: 0;
    padding-bottom: 0;
}

.main-header .navbar-brand img {
    display: block;
}

.nav-layout-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: inherit;
    margin-right: 0.55rem;
    box-shadow: none !important;
}

.nav-layout-toggle:hover,
.nav-layout-toggle:focus {
    text-decoration: none;
}

.nav-layout-toggle-top {
    color: rgba(255, 255, 255, 0.92) !important;
    background: rgba(255, 255, 255, 0.12);
}

.nav-layout-toggle-top:hover,
.nav-layout-toggle-top:focus {
    background: rgba(255, 255, 255, 0.18);
    color: #fff !important;
}

.main-header.navbar .nav-link {
    border-radius: 0;
    transition: all 0.2s ease;
}

.main-header.navbar.navbar-dark .nav-link {
    color: rgba(255, 255, 255, 0.92) !important;
    font-weight: 600;
    padding: 0.55rem 0.8rem;
    margin: 0.15rem 0.1rem;
    font-size: 0.92rem;
}

.main-header.navbar.navbar-dark .navbar-nav {
    flex-wrap: wrap;
}

.main-header.navbar.navbar-dark .nav-link:hover,
.main-header.navbar.navbar-dark .nav-link:focus {
    background: rgba(255, 255, 255, 0.16);
    color: #fff !important;
}

.main-header.navbar.navbar-dark .navbar-nav.ml-auto .nav-link {
    padding-left: 0.7rem;
    padding-right: 0.7rem;
}

a[data-widget="pushmenu"] {
    display: none !important;
}

.page-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 0;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    padding: 0.55rem 0.8rem;
    margin-bottom: 0.45rem;
}

.page-hero-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0;
}

.page-hero-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    background: linear-gradient(135deg, #1677ff 0%, #69a8ff 100%);
    color: #fff;
    font-size: 0.78rem;
    box-shadow: 0 8px 16px rgba(22, 119, 255, 0.18);
}

.page-hero h2,
.page-hero h1 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.page-hero p {
    margin: 0;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.28;
}

.page-hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}

.page-hero-actions .btn {
    padding: 0.45rem 0.78rem;
}

.compact-page-actions .btn {
    white-space: nowrap;
}

.btn,
.btn:focus {
    border-radius: 0;
    font-weight: 600;
    box-shadow: none !important;
}

.btn-primary,
.btn-success,
.btn-light,
.btn-secondary,
.btn-danger {
    padding: 0.65rem 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #1677ff 0%, #0d5fe9 100%);
    border-color: transparent;
    box-shadow: 0 14px 26px rgba(22, 119, 255, 0.22) !important;
}

.btn-primary:hover {
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    border-color: transparent;
    box-shadow: 0 14px 26px rgba(34, 197, 94, 0.18) !important;
}

.btn-light {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #334155;
}

.card {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 0;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.94);
    margin-bottom: 0.7rem;
}

.content .row.mb-3 {
    margin-bottom: 0.45rem !important;
}

.card-header {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, rgba(255, 255, 255, 1) 100%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    padding: 0.58rem 0.8rem;
}

.card-title {
    font-size: 0.94rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.card-body {
    padding: 0.72rem 0.8rem;
}

.content .card + .card,
.content .row + .row {
    margin-top: 0.45rem;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    border-top: 0;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    padding-top: 1rem;
    padding-bottom: 1rem;
    background: #f8fafc;
}

.table td {
    vertical-align: middle;
    color: #1e293b;
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-color: #eef2f7;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(248, 250, 252, 0.7);
}

.table-hover tbody tr:hover,
.table-striped tbody tr:hover {
    background-color: rgba(22, 119, 255, 0.05);
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select,
.form-control {
    border-radius: 0;
    border: 1px solid #dbe3ee;
    min-height: 44px;
    padding: 0.65rem 0.9rem;
    background: #ffffff;
    box-shadow: none;
}

.form-control:focus,
.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
    border-color: #60a5fa;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.dataTables_wrapper {
    color: #334155;
}

.dataTables_wrapper .row:first-child,
.dataTables_wrapper .row:last-child {
    align-items: center;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_info {
    font-size: 0.88rem;
    font-weight: 500;
    color: #64748b;
}

.dataTables_wrapper .dataTables_filter {
    text-align: right;
}

.dataTables_wrapper .dataTables_filter input {
    min-width: 220px;
    margin-left: 0.5rem;
}

.dataTables_wrapper .dataTables_length select {
    min-width: 88px;
    margin: 0 0.35rem;
}

.dataTables_wrapper .dataTables_paginate {
    display: flex;
    justify-content: flex-end;
}

.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    margin-top: 0.45rem;
    margin-bottom: 0.1rem;
}

.paginate_button,
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 0 !important;
    border: 1px solid transparent !important;
    transition: all 0.2s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
    color: #1677ff !important;
}

.page-item.active .page-link,
.pagination .active a,
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, #1677ff 0%, #0d5fe9 100%) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 10px 22px rgba(22, 119, 255, 0.22);
}

.modern-grid-shell {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.grid-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.grid-toolbar-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
}

.grid-toolbar-meta {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.08rem;
}

.grid-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.grid-toolbar-actions .form-control {
    min-width: 240px;
    min-height: 40px;
}

.grid-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.grid-card-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.grid-card-actions .form-control {
    min-width: 240px;
    min-height: 40px;
}

.compact-page-hero {
    padding: 0.7rem 0.9rem;
    margin-bottom: 0.35rem;
}

.compact-page-actions {
    width: 100%;
    gap: 0.55rem;
}

.compact-page-actions .form-control {
    min-width: 220px;
    flex: 1 1 220px;
}

.compact-page-actions > .btn,
.compact-page-actions > a.btn {
    flex: 0 0 auto;
}

.compact-grid-card {
    margin-bottom: 0.45rem;
}

.compact-grid-card-body {
    padding: 0.55rem;
}

.compact-modern-grid {
    border-radius: 0;
}

.grid-utility-btn {
    min-height: 40px;
    padding: 0.55rem 0.85rem;
    border-radius: 0;
}

.grid-create-btn {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn.is-loading {
    pointer-events: none;
    opacity: 0.92;
}

.grid-utility-btn.is-active {
    background: rgba(22, 119, 255, 0.1);
    border-color: rgba(22, 119, 255, 0.18);
    color: #1677ff;
}

.expense-filters-panel {
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.92) 0%, rgba(255, 255, 255, 0.98) 100%);
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.filter-panel-actions {
    display: flex;
    flex-direction: column;
}

.filter-panel-button-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.table-action-group {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.table-action {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-size: 0.82rem;
    line-height: 1;
    transition: all 0.18s ease;
    box-shadow: none !important;
}

.table-action:hover,
.table-action:focus {
    transform: translateY(-1px);
    text-decoration: none;
}

.table-action.action-view {
    color: #06b6d4;
}

.table-action.action-edit {
    color: #1677ff;
}

.table-action.action-delete {
    color: #ef4444;
}

.table-action.action-success {
    color: #16a34a;
}

.table-action.action-warning {
    color: #f59e0b;
}

.table-action.action-view:hover,
.table-action.action-view:focus {
    background: rgba(6, 182, 212, 0.12);
}

.table-action.action-edit:hover,
.table-action.action-edit:focus {
    background: rgba(22, 119, 255, 0.12);
}

.table-action.action-delete:hover,
.table-action.action-delete:focus {
    background: rgba(239, 68, 68, 0.12);
}

.table-action.action-success:hover,
.table-action.action-success:focus {
    background: rgba(22, 163, 74, 0.12);
}

.table-action.action-warning:hover,
.table-action.action-warning:focus {
    background: rgba(245, 158, 11, 0.14);
}

.modern-grid {
    border: 1px solid rgba(219, 227, 238, 0.95);
    border-radius: 0;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.nav-layout-side .modern-grid,
.nav-layout-side .card,
.nav-layout-side .page-hero {
    max-width: 100%;
}

.app-sidebar-shell {
    background: linear-gradient(180deg, #1677ff 0%, #0d5fe9 48%, #0b49b4 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 14px 0 36px rgba(22, 119, 255, 0.18);
}

.sidebar-brand-link {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    background: rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-layout-switch {
    padding: 0.35rem 0.65rem 0.75rem;
}

.nav-layout-toggle-side {
    width: 100%;
    height: auto;
    justify-content: center;
    border-radius: 14px;
    margin-right: 0;
    padding: 0.6rem 0.85rem;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.nav-layout-toggle-side:hover,
.nav-layout-toggle-side:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.24);
    color: #fff;
}

.sidebar-user-avatar {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.app-sidebar-shell .user-panel {
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    margin-left: 0.85rem;
    margin-right: 0.85rem;
}

.app-sidebar-shell .user-panel .info a {
    color: rgba(255, 255, 255, 0.96) !important;
    font-weight: 600;
}

.app-sidebar-shell .nav-sidebar > .nav-item {
    margin-bottom: 0.18rem;
}

.app-sidebar-shell .nav-sidebar .nav-link {
    border-radius: 14px;
    margin: 0 0.65rem;
    padding: 0.72rem 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.2s ease;
}

.app-sidebar-shell .nav-sidebar .nav-link p {
    font-size: 0.92rem;
    font-weight: 600;
}

.app-sidebar-shell .nav-sidebar .nav-icon {
    color: rgba(255, 255, 255, 0.88);
}

.app-sidebar-shell .nav-sidebar .nav-link:hover,
.app-sidebar-shell .nav-sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.app-sidebar-shell .nav-sidebar .nav-link:hover .nav-icon,
.app-sidebar-shell .nav-sidebar .nav-link.active .nav-icon {
    color: #fff;
}

.tabulator {
    border: 0 !important;
    background: transparent !important;
    font-size: 0.93rem;
    color: #1e293b;
}

.tabulator .tabulator-header {
    border-bottom: 1px solid #dbe3ee;
    background: #f8fafc;
}

.tabulator .tabulator-header .tabulator-col {
    background: transparent;
    border-right: 1px solid #edf2f7;
    padding: 0;
}

.tabulator .tabulator-header .tabulator-col .tabulator-col-content {
    padding: 0.85rem 0.9rem;
}

.tabulator .tabulator-header .tabulator-col .tabulator-col-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    white-space: normal;
}

.tabulator .tabulator-tableholder .tabulator-table {
    background: transparent;
}

.tabulator .tabulator-row {
    background: #ffffff;
    border-bottom: 1px solid #eef2f7;
}

.tabulator .tabulator-row:nth-child(even) {
    background: #fcfdff;
}

.tabulator .tabulator-row:hover {
    background: #f5f9ff !important;
}

.tabulator .tabulator-cell {
    padding: 0.9rem;
    border-right: 0;
    white-space: normal;
    overflow: hidden;
    text-overflow: clip;
    word-break: break-word;
    line-height: 1.35;
}

.tabulator .tabulator-row .tabulator-cell:last-child {
    overflow: visible;
}

.tabulator .tabulator-footer {
    display: none;
}

.tabulator .tabulator-placeholder {
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

.tabulator .tabulator-responsive-collapse {
    border-top: 1px dashed #dbe3ee;
    padding: 0.75rem 0.9rem 0.95rem;
}

.tabulator .tabulator-responsive-collapse table {
    width: 100%;
}

.tabulator .tabulator-responsive-collapse td {
    padding: 0.35rem 0;
    color: #475569;
}

.modal-dialog {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.modal-content {
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 0;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 22px 54px rgba(15, 23, 42, 0.18);
}

.modal-header {
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    padding: 1rem 1.2rem;
    background: #ffffff;
}

.modal-header.bg-primary,
.modal-header.text-white,
.modal-header.bg-primary.text-white {
    background: #ffffff !important;
    color: #0f172a !important;
}

.modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.modal-header .close,
.modal-header .btn-close {
    opacity: 1;
    color: #64748b;
    text-shadow: none;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    border: 1px solid #dbe3ee;
    border-radius: 0;
    background: #ffffff;
}

.modal-header .close.text-white,
.modal-header .btn-close.text-white {
    color: #64748b !important;
}

.modal-body {
    padding: 1.35rem 1.2rem;
    background: #ffffff;
}

.modal-footer {
    border-top: 1px solid #eef2f7;
    padding: 0.9rem 1.2rem 1rem;
    background: #ffffff;
}

.modal .form-group label {
    font-size: 0.84rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.45rem;
}

.modal-backdrop.show {
    opacity: 0.6;
    backdrop-filter: blur(4px);
}

.small-box {
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.small-box > .inner {
    padding: 1.35rem;
}

.small-box h3 {
    font-size: 2rem;
    font-weight: 700;
}

.small-box p {
    font-size: 0.95rem;
    opacity: 0.95;
}

.small-box .icon {
    top: 18px;
    right: 16px;
    font-size: 58px;
    opacity: 0.18;
}

.dashboard-page-hero {
    margin-bottom: 0.7rem;
}

.dashboard-selector-panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
}

.dashboard-selector-label {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #475569;
}

.dashboard-context-card {
    margin-bottom: 0.7rem;
    border-color: rgba(191, 219, 254, 0.8);
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.dashboard-context-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.dashboard-context-eyebrow {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #1677ff;
    margin-bottom: 0.2rem;
}

.dashboard-context-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
}

.dashboard-context-meta {
    margin: 0.25rem 0 0;
    color: #64748b;
    font-size: 0.92rem;
}

.dashboard-context-badge {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0.5rem 0.9rem;
    border: 1px solid rgba(96, 165, 250, 0.26);
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dashboard-stat-card {
    min-height: 148px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
    background: #ffffff;
    color: #0f172a;
    position: relative;
}

.dashboard-stat-card .inner {
    position: relative;
    z-index: 1;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.42rem;
    padding-right: 4.5rem;
}

.dashboard-stat-card h3 {
    margin: 0;
    font-size: clamp(1.15rem, 1vw + 0.95rem, 1.9rem);
    line-height: 1.08;
    color: #0f172a;
    font-weight: 700;
    letter-spacing: -0.045em;
    font-variant-numeric: lining-nums proportional-nums;
    font-feature-settings: "lnum" 1, "kern" 1;
    text-rendering: optimizeLegibility;
    max-width: calc(100% - 0.15rem);
    overflow-wrap: break-word;
    word-break: normal;
    min-height: 1.08em;
}

.dashboard-stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
    min-height: auto;
    opacity: 1;
}

.dashboard-stat-card.stat-budget {
    border-top: 3px solid #1677ff;
}

.dashboard-stat-card.stat-spent {
    border-top: 3px solid #ef4444;
}

.dashboard-stat-card.stat-remaining {
    border-top: 3px solid #16a34a;
}

.dashboard-stat-card.stat-progress {
    border-top: 3px solid #f59e0b;
}

.dashboard-stat-card.stat-budget .dashboard-stat-label {
    color: #1677ff;
}

.dashboard-stat-card.stat-spent .dashboard-stat-label {
    color: #ef4444;
}

.dashboard-stat-card.stat-remaining .dashboard-stat-label {
    color: #16a34a;
}

.dashboard-stat-card.stat-progress .dashboard-stat-label {
    color: #f59e0b;
}

.dashboard-stat-card .icon {
    width: 42px;
    height: 42px;
    top: auto;
    right: 1rem;
    bottom: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    opacity: 1;
    border: 1px solid transparent;
}

.dashboard-stat-card .icon i,
.dashboard-stat-card .icon .fas,
.dashboard-stat-card .icon .far,
.dashboard-stat-card .icon .fab,
.dashboard-stat-card .icon .fa {
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    font-size: 1rem !important;
    line-height: 1 !important;
    opacity: 1 !important;
    transform: none !important;
}

.dashboard-stat-card:hover .icon,
.dashboard-stat-card:hover .icon i,
.dashboard-stat-card:hover .icon .fas,
.dashboard-stat-card:hover .icon .far,
.dashboard-stat-card:hover .icon .fab,
.dashboard-stat-card:hover .icon .fa {
    transform: none !important;
}

.dashboard-stat-card.stat-budget .icon {
    background: rgba(22, 119, 255, 0.12);
    color: #1677ff;
    border-color: rgba(22, 119, 255, 0.18);
}

.dashboard-stat-card.stat-spent .icon {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.18);
}

.dashboard-stat-card.stat-remaining .icon {
    background: rgba(22, 163, 74, 0.12);
    color: #16a34a;
    border-color: rgba(22, 163, 74, 0.18);
}

.dashboard-stat-card.stat-progress .icon {
    background: rgba(245, 158, 11, 0.14);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.2);
}

.dashboard-panel-card {
    height: 100%;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.dashboard-card-subtitle {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 500;
}

.dashboard-chart-card-body {
    padding: 1rem 1.1rem 1.1rem;
    position: relative;
    min-height: 340px;
    overflow: hidden;
}

.dashboard-feed-card-body {
    padding: 0.95rem 1.1rem 1.1rem;
}

.dashboard-panel-card .card-header {
    background: #ffffff;
}

.dashboard-chart-card-body canvas {
    display: block;
    width: 100% !important;
    max-width: 100%;
    height: 320px !important;
    max-height: 320px;
}

.dashboard-loading-state,
.dashboard-empty-state {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.dashboard-empty-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.dashboard-empty-text {
    max-width: 280px;
    margin: 0.4rem 0 0;
    color: #64748b;
    font-size: 0.88rem;
}

.dashboard-activity-list,
.dashboard-progress-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.dashboard-activity-item {
    display: grid;
    grid-template-columns: 12px 1fr;
    gap: 0.8rem;
    align-items: flex-start;
}

.dashboard-activity-marker {
    width: 12px;
    height: 12px;
    margin-top: 0.45rem;
    border: 2px solid transparent;
    background: #cbd5e1;
}

.dashboard-activity-marker.marker-primary {
    background: #1677ff;
    border-color: rgba(22, 119, 255, 0.2);
}

.dashboard-activity-marker.marker-info {
    background: #06b6d4;
    border-color: rgba(6, 182, 212, 0.2);
}

.dashboard-activity-marker.marker-success {
    background: #16a34a;
    border-color: rgba(22, 163, 74, 0.2);
}

.dashboard-activity-marker.marker-warning {
    background: #f59e0b;
    border-color: rgba(245, 158, 11, 0.24);
}

.dashboard-activity-marker.marker-danger {
    background: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

.dashboard-activity-marker.marker-secondary {
    background: #64748b;
    border-color: rgba(100, 116, 139, 0.2);
}

.dashboard-activity-content {
    border-bottom: 1px solid #eef2f7;
    padding-bottom: 0.8rem;
}

.dashboard-activity-item:last-child .dashboard-activity-content {
    border-bottom: 0;
    padding-bottom: 0;
}

.dashboard-activity-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.dashboard-activity-title {
    font-weight: 700;
    color: #0f172a;
}

.dashboard-activity-type {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.dashboard-activity-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.3rem;
    color: #64748b;
    font-size: 0.82rem;
    flex-wrap: wrap;
}

.dashboard-activity-amount {
    margin-top: 0.45rem;
    color: #1677ff;
    font-size: 0.9rem;
    font-weight: 700;
}

.dashboard-progress-item {
    border: 1px solid #eef2f7;
    padding: 0.9rem;
    background: #ffffff;
}

.dashboard-progress-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.7rem;
}

.dashboard-progress-title {
    font-size: 0.96rem;
    font-weight: 700;
    color: #0f172a;
}

.dashboard-progress-budget {
    margin-top: 0.2rem;
    color: #64748b;
    font-size: 0.82rem;
}

.dashboard-progress-percentage {
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 800;
    white-space: nowrap;
}

.dashboard-progress-track {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    overflow: hidden;
}

.dashboard-progress-bar {
    height: 100%;
}

.dashboard-progress-bar.bar-danger {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.dashboard-progress-bar.bar-warning {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.dashboard-progress-bar.bar-info {
    background: linear-gradient(90deg, #06b6d4 0%, #0891b2 100%);
}

.dashboard-progress-bar.bar-success {
    background: linear-gradient(90deg, #16a34a 0%, #15803d 100%);
}

.main-footer {
    background: transparent;
    border-top: 0;
    color: #64748b;
    padding: 0.7rem 1.2rem 1rem;
}

.dropdown-menu {
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    border-radius: 18px;
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 0;
    padding: 0.65rem 0.85rem;
}

.dropdown-item:hover {
    background: #f1f5f9;
}

.table-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    min-height: 280px;
    padding: 2rem 1rem;
    text-align: center;
}

.table-empty-state-visual {
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eaf2ff 0%, #f4f8ff 100%);
    border: 1px solid #d9e6fb;
    color: #1677ff;
    font-size: 2rem;
}

.table-empty-state-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.table-empty-state-text {
    max-width: 420px;
    color: #64748b;
    margin: 0;
}

.empty-state-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 320px;
    gap: 0.9rem;
    padding: 2rem;
}

.empty-state-card .table-empty-state-visual {
    width: 88px;
    height: 88px;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #0b3a82 40%, #1677ff 100%);
}

.auth-panel {
    width: 100%;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    min-height: 100vh;
}

.auth-brand-side {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 3rem 4.5rem;
    display: flex;
    align-items: center;
    background: linear-gradient(160deg, rgba(9, 18, 42, 0.92) 0%, rgba(22, 119, 255, 0.88) 100%);
}

.auth-brand-side::before,
.auth-brand-side::after {
    content: "";
    position: absolute;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.auth-brand-side::before {
    width: 260px;
    height: 260px;
    top: -60px;
    left: -60px;
}

.auth-brand-side::after {
    width: 180px;
    height: 180px;
    right: 40px;
    bottom: 50px;
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    max-width: 520px;
}

.auth-logo-wrap {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.auth-logo-mark {
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-logo-mark img {
    max-width: 46px;
    max-height: 46px;
}

.auth-logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.auth-logo-title {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.auth-logo-subtitle {
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
}

.auth-brand-heading {
    font-size: 2.4rem;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 1rem;
}

.auth-brand-copy {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 1.75rem;
    max-width: 480px;
}

.auth-feature-list {
    display: grid;
    gap: 0.85rem;
}

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: rgba(255, 255, 255, 0.92);
}

.auth-feature-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.auth-form-side {
    background: #f8fbff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 470px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
    padding: 2rem;
}

.auth-card-top {
    margin-bottom: 1.5rem;
}

.auth-eyebrow {
    display: inline-flex;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #1677ff;
    background: rgba(22, 119, 255, 0.08);
    padding: 0.35rem 0.65rem;
    margin-bottom: 0.75rem;
}

.auth-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.4rem;
}

.auth-subtitle {
    color: #64748b;
    margin: 0;
}

.auth-input-group {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    z-index: 2;
}

.auth-input-group .form-control {
    padding-left: 2.7rem;
}

.auth-submit {
    width: 100%;
    min-height: 48px;
}

.auth-links {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1.1rem;
}

.auth-links a {
    color: #1677ff;
    font-weight: 600;
}

.auth-footer-note {
    margin-top: 1.5rem;
    color: #94a3b8;
    font-size: 0.86rem;
    text-align: center;
}

.flatpickr-input[readonly],
input.flatpickr-input,
.form-control.flatpickr-input {
    background-color: #fff;
    cursor: pointer;
}

.flatpickr-calendar {
    border-radius: 0 !important;
    border: 1px solid #dbe3ee;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
}

.flatpickr-months,
.flatpickr-current-month,
.flatpickr-weekdays,
.flatpickr-days,
.dayContainer,
.flatpickr-day,
.flatpickr-time,
.numInputWrapper span {
    border-radius: 0 !important;
}

.flatpickr-months {
    background: linear-gradient(135deg, #1677ff 0%, #0d5fe9 100%);
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year,
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: #fff !important;
    fill: #fff !important;
}

.flatpickr-weekdays {
    background: #f8fafc;
}

span.flatpickr-weekday {
    color: #475569;
    font-weight: 700;
}

.flatpickr-day {
    color: #1e293b;
    border: 1px solid transparent;
}

.flatpickr-day:hover,
.flatpickr-day:focus {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover {
    background: #1677ff !important;
    border-color: #1677ff !important;
    color: #fff !important;
}

.flatpickr-day.today {
    border-color: #1677ff;
}

@media (max-width: 768px) {
    /* Mobile Navigation */
    .main-header .navbar-nav.d-none.d-md-flex {
        display: none !important;
    }

    .navbar-toggler {
        display: block !important;
    }

    .mobile-nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #007bff;
        backdrop-filter: blur(12px);
        z-index: 9999;
        display: none;
    }

    .mobile-nav-overlay.show {
        display: block !important;
    }

    .mobile-nav-content {
        height: 100%;
        display: flex;
        flex-direction: column;
        max-width: 100%;
    }

    .mobile-nav-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-nav-title {
        color: rgba(255, 255, 255, 0.9);
        font-size: 1.25rem;
        font-weight: 700;
    }

    .mobile-nav-close {
        background: rgba(255, 255, 255, 0.1);
        border: none;
        color: rgba(255, 255, 255, 0.9);
        width: 44px;
        height: 44px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 1.25rem;
        transition: background 0.2s ease;
    }

    .mobile-nav-close:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    .mobile-nav-list {
        flex: 1;
        overflow-y: auto;
        padding: 1rem 0;
        list-style: none;
        margin: 0;
    }

    .mobile-nav-category {
        color: rgba(255, 255, 255, 0.5);
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        padding: 1rem 1.5rem 0.5rem;
    }

    .mobile-nav-list li:not(.mobile-nav-category) {
        margin: 0.1rem 0;
    }

    .mobile-nav-list a {
        color: rgba(255, 255, 255, 0.9);
        padding: 1rem 1.5rem;
        display: flex;
        align-items: center;
        text-decoration: none;
        font-size: 1rem;
        transition: all 0.2s ease;
    }

    .mobile-nav-list a:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .mobile-nav-list a i {
        margin-right: 1rem;
        font-size: 1.1rem;
        width: 24px;
    }

    .mobile-nav-footer {
        padding: 1.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-nav-logout {
        color: #ef4444;
        padding: 1rem;
        display: flex;
        align-items: center;
        text-decoration: none;
        font-weight: 600;
        border-radius: 8px;
        transition: background 0.2s ease;
    }

    .mobile-nav-logout:hover {
        background: rgba(239, 68, 68, 0.1);
    }

    .mobile-nav-logout i {
        margin-right: 0.75rem;
    }

    /* Mobile Tables - for standard HTML tables only */
    .table-responsive {
        border: none;
    }

    .table thead {
        display: none;
    }

    .table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        padding: 1rem;
        background: #ffffff;
    }

    .table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border: 0;
        border-bottom: 1px solid #f1f5f9;
    }

    .table tbody td:last-child {
        border-bottom: 0;
    }

    .table tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #475569;
        margin-right: 1rem;
    }

    /* Tabulator Mobile */
    .tabulator .tabulator-header {
        display: none;
    }

    .tabulator .tabulator-row {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        padding: 1rem;
    }

    .tabulator .tabulator-cell {
        display: flex;
        justify-content: space-between;
        padding: 0.5rem 0;
        border: 0;
        border-bottom: 1px solid #f1f5f9;
    }

    /* Touch Target Optimization */
    .table-action {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .btn {
        min-height: 44px;
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }

    .form-control,
    .dataTables_wrapper .dataTables_filter input,
    .dataTables_wrapper .dataTables_length select {
        min-height: 48px;
        padding: 0.75rem 1rem;
        font-size: 16px;
    }

    .grid-create-btn {
        width: 48px;
        min-width: 48px;
        height: 48px;
    }

    .grid-utility-btn {
        min-height: 44px;
        padding: 0.65rem 1rem;
    }

    /* Mobile Layout Adjustments */
    .content-header {
        padding: 0.5rem 0;
    }

    .content-header h1 {
        font-size: 1.25rem;
    }

    .page-shell-label {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }

    .breadcrumb {
        display: none;
    }

    .card {
        margin-bottom: 1rem;
        border-radius: 12px;
    }

    .card-header {
        padding: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .grid-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .grid-toolbar-actions {
        flex-direction: column;
        width: 100%;
    }

    .grid-toolbar-actions .form-control {
        width: 100%;
        min-width: auto;
    }

    .dashboard-stat-card {
        min-height: auto;
        padding: 1.25rem;
    }

    .dashboard-stat-card .inner {
        padding-right: 0;
    }

    .dashboard-stat-card .icon {
        position: static;
        margin-bottom: 0.75rem;
    }

    .dashboard-stat-card h3 {
        font-size: 1.75rem;
    }

    .modal-dialog {
        margin: 0;
        max-width: 100%;
    }

    .modal-content {
        border-radius: 0;
        border: 0;
        min-height: 100vh;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }

    .nav-layout-side .content-wrapper,
    .nav-layout-side .main-footer {
        margin-left: 0;
        width: 100%;
    }

    .login-box, .register-box {
        width: 90%;
    }

    .auth-panel {
        grid-template-columns: 1fr;
    }

    .auth-brand-side {
        padding: 2rem 1.5rem;
    }

    .auth-form-side {
        padding: 1rem;
    }

    .auth-card {
        max-width: 100%;
        padding: 1.5rem;
    }

    .auth-brand-heading {
        font-size: 1.8rem;
    }

    .content-header h1 {
        font-size: 0.98rem;
    }

    .page-hero {
        padding: 0.8rem;
    }

    .page-hero-actions {
        justify-content: flex-start;
        margin-top: 0.55rem;
    }

    .compact-page-actions {
        justify-content: flex-start !important;
        margin-top: 0.45rem;
    }

    .compact-page-actions .form-control {
        width: 100%;
        min-width: 100%;
        flex-basis: 100%;
    }

    .compact-grid-card-body {
        padding: 0.4rem;
    }

    .dashboard-context-body,
    .dashboard-activity-topline,
    .dashboard-progress-topline {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-context-badge {
        width: 100%;
        justify-content: center;
    }

    .dashboard-activity-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-header.navbar.navbar-dark .nav-link {
        margin: 0.15rem 0;
        padding: 0.7rem 0.85rem;
    }

    .dataTables_wrapper .dataTables_filter {
        text-align: left;
    }

    .dataTables_wrapper .dataTables_paginate {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .grid-toolbar-actions {
        width: 100%;
    }

    .grid-toolbar-actions .form-control {
        min-width: 100%;
    }

    .grid-card-actions {
        width: 100%;
    }

    .grid-card-actions .form-control,
    .grid-utility-btn {
        min-width: 100%;
        width: 100%;
    }

    .nav-layout-toggle-top {
        width: 36px;
        height: 36px;
    }

    .modal-content {
        border-radius: 0;
    }
}
