body {
    color: #1f2937;
    font-family: Inter, "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #eef2f7;
}

.content-wrapper {
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 24rem),
        linear-gradient(180deg, #f7f9fc 0%, #eef2f7 100%);
}

.content-header {
    padding: 1.35rem 0 0.85rem;
}

.ui-content-header-container,
.ui-content-container {
    width: 100%;
}

.content {
    padding: 0 0 1.5rem;
}

.ui-page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 4.25rem;
    padding: 1rem 1.15rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(10px);
}

.ui-page-heading h1 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}

.breadcrumb {
    padding: 0;
    margin: 0.5rem 0 0;
    background: transparent;
}

.card,
.modal-content,
.small-box,
.info-box,
.callout,
.alert {
    border-radius: 0.9rem;
}

.card {
    margin-bottom: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1rem 2.5rem rgba(15, 23, 42, 0.06);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.92));
}

.card-title {
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    color: #0f172a;
}

.card-tools {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.card-body,
.card-footer {
    padding: 1.2rem;
}

.card-footer {
    border-top: 1px solid rgba(226, 232, 240, 0.88);
    background: rgba(248, 250, 252, 0.7);
}

.ui-page-card {
    overflow: hidden;
}

.ui-app-navbar {
    padding: 0 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    box-shadow: 0 0.35rem 1.2rem rgba(15, 23, 42, 0.04);
}

.ui-app-navbar .nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 3.2rem;
    color: #334155;
    font-weight: 600;
}

.ui-app-navbar .nav-link:hover,
.ui-app-navbar .nav-link:focus {
    color: #0f172a;
}

.ui-app-sidebar .brand-link {
    display: flex;
    align-items: center;
    min-height: 3.5rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ui-app-sidebar .sidebar {
    padding-bottom: 1rem;
}

.ui-app-sidebar .nav-sidebar {
    gap: 0.15rem;
}

.ui-app-sidebar .nav-sidebar > .nav-item > .nav-link,
.ui-app-sidebar .nav-treeview > .nav-item > .nav-link {
    border-radius: 0.75rem;
    margin-bottom: 0.2rem;
    font-weight: 600;
    transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.ui-app-sidebar .nav-sidebar > .nav-item > .nav-link:hover,
.ui-app-sidebar .nav-treeview > .nav-item > .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(1px);
}

.ui-app-sidebar .nav-sidebar .nav-link.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.92), rgba(37, 99, 235, 0.92));
    box-shadow: 0 0.6rem 1.4rem rgba(37, 99, 235, 0.22);
}

.ui-app-footer {
    padding: 0.85rem 1rem;
    font-size: 0.925rem;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(255, 255, 255, 0.72);
}

.table-responsive {
    border-radius: 0.8rem;
}

.table {
    margin-bottom: 0;
}

.table td,
.table th {
    padding: 0.78rem 0.9rem;
    vertical-align: middle;
}

.table thead th {
    border-bottom-width: 1px;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0;
    color: #475569;
    background: #f8fafc;
    white-space: nowrap;
}

.table tbody tr {
    transition: background-color 0.16s ease;
}

.table-hover tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.045);
}

.ui-data-table.dataTable {
    border-collapse: separate !important;
    border-spacing: 0;
}

.dataTables_wrapper .row:first-child,
.dataTables_wrapper .row:last-child {
    margin-left: 0;
    margin-right: 0;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    padding-top: 0.75rem;
    padding-bottom: 0.25rem;
}

.ui-datatable-shell .row:first-child > div,
.ui-datatable-shell .row:last-child > div {
    display: flex;
    align-items: center;
}

.ui-datatable-shell .dataTables_length label,
.ui-datatable-shell .dataTables_filter label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
    color: #64748b;
    font-weight: 600;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select,
.ui-column-filter {
    min-height: calc(1.5em + 0.5rem + 2px);
    border-color: rgba(148, 163, 184, 0.28);
    background-color: #fff;
}

.ui-datatable-shell .dataTables_filter input {
    min-width: 14rem;
    margin-left: 0.5rem;
}

.ui-datatable-shell .dataTables_length select {
    min-width: 4.5rem;
}

.dataTables_wrapper .pagination {
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.dataTables_wrapper .page-link {
    border-radius: 0.35rem !important;
    border-color: rgba(148, 163, 184, 0.22);
    color: #475569;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-color: #2563eb;
}

.form-group {
    margin-bottom: 1rem;
}

.ui-form-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ui-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    justify-content: flex-start;
}

.ui-error-alert {
    margin-bottom: 0;
}

.form-control,
.custom-select,
.input-group-text {
    min-height: calc(1.5em + 0.75rem + 2px);
    border-color: rgba(148, 163, 184, 0.26);
}

.form-control,
.custom-select,
.input-group-text,
.btn {
    border-radius: 0.65rem;
}

.input-group-text {
    background: #f8fafc;
    color: #64748b;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-weight: 500;
    box-shadow: none;
}

.btn-success,
.btn-primary {
    box-shadow: 0 0.75rem 1.5rem rgba(37, 99, 235, 0.14);
}

.btn-outline-danger,
.btn-default,
.btn-tool {
    border-color: rgba(148, 163, 184, 0.24);
}

.small-box {
    margin-bottom: 1rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 1rem 2.25rem rgba(15, 23, 42, 0.12);
}

.small-box .inner {
    padding: 1rem 1.1rem 0.75rem;
    position: relative;
    z-index: 1;
}

.small-box h3 {
    font-size: 2rem;
    margin-bottom: 0.35rem;
    font-weight: 700;
}

.small-box p {
    font-size: 0.92rem;
    font-weight: 600;
    opacity: 0.95;
}

.small-box .icon {
    top: 0.65rem;
    right: 0.9rem;
    opacity: 0.18;
    font-size: 4rem;
}

.ui-chart-card .card-body {
    padding-top: 0.9rem;
}

.ui-chart-frame {
    position: relative;
    width: 100%;
    min-height: 24rem;
}

.ui-chart-frame-sm {
    min-height: 18rem;
}

.ui-receipt-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
}

.ui-receipt-preview-shell {
    padding: 0.35rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 1rem;
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.96));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.ui-modal#receiptPreviewModal .modal-dialog {
    max-width: min(1120px, calc(100vw - 2rem));
}

.ui-modal#receiptPreviewModal .ui-modal-content {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    box-shadow: 0 1.5rem 3rem rgba(15, 23, 42, 0.16);
}

.ui-modal#receiptPreviewModal .ui-modal-header {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.94);
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(59, 130, 246, 0.03));
}

.ui-modal#receiptPreviewModal .modal-title {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #0f172a;
}

.ui-modal#receiptPreviewModal .close {
    margin: -0.2rem -0.25rem -0.2rem auto;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: #475569;
    opacity: 1;
    box-shadow: 0 0.35rem 0.8rem rgba(15, 23, 42, 0.08);
}

.ui-modal#receiptPreviewModal .close:hover,
.ui-modal#receiptPreviewModal .close:focus {
    background: #fff;
    color: #0f172a;
}

.ui-modal#receiptPreviewModal .ui-modal-body {
    padding: 1rem 1.1rem 1.15rem;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.06), transparent 18rem),
        linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.ui-modal#receiptPreviewModal .ui-modal-footer {
    padding-top: 0.8rem;
    padding-bottom: 0.95rem;
    background: rgba(248, 250, 252, 0.92);
}

.ui-receipt-frame {
    width: 100%;
    min-height: 70vh;
    border: 0;
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.08);
}

.ui-receipt-image {
    display: block;
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    margin: 0 auto;
    padding: 0.5rem;
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.08);
}

.ui-receipt-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 16rem;
    padding: 1.25rem;
    color: #64748b;
    font-weight: 600;
    text-align: center;
    background: rgba(255, 255, 255, 0.92);
    border: 1px dashed rgba(148, 163, 184, 0.32);
    border-radius: 0.85rem;
}

.modal-header,
.ui-modal-header {
    align-items: center;
    padding: 1rem 1.15rem;
}

.modal-title {
    font-size: 1.05rem;
    font-weight: 700;
}

.modal-body,
.ui-modal-body {
    padding: 1.1rem 1.15rem;
}

.modal-footer,
.ui-modal-footer {
    padding: 0.9rem 1.15rem;
    gap: 0.5rem;
}

.ui-alert {
    border-width: 1px;
    border-style: solid;
    padding: 0.95rem 1rem;
    border-radius: 0.85rem;
}

.ui-alert-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.auth-page,
.login-page,
.register-page {
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.14), transparent 22rem),
        radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.1), transparent 24rem),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.ui-auth-box {
    width: 100%;
    max-width: 420px;
    margin: 5vh auto;
}

.ui-auth-card {
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 1.5rem 3rem rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(12px);
}

.login-logo,
.register-logo {
    margin-bottom: 1rem;
}

.login-logo a,
.register-logo a {
    color: #0f172a;
    font-weight: 700;
    letter-spacing: 0;
}

.dropdown-menu {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 0.75rem;
    box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.12);
}

@media (max-width: 991.98px) {
    .ui-app-navbar {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .card-header,
    .card-body,
    .card-footer,
    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 767.98px) {
    .content {
        padding-bottom: 1rem;
    }

    .ui-page-heading {
        align-items: flex-start;
        padding: 0.95rem 1rem;
    }

    .table td,
    .table th {
        padding: 0.65rem 0.75rem;
    }

    .ui-datatable-shell .row:first-child > div,
    .ui-datatable-shell .row:last-child > div,
    .ui-datatable-shell .dataTables_length label,
    .ui-datatable-shell .dataTables_filter label {
        display: flex;
        width: 100%;
    }

    .ui-datatable-shell .dataTables_filter input,
    .ui-datatable-shell .dataTables_length select {
        min-width: 0;
        width: 100%;
        margin-left: 0;
    }

    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_paginate {
        text-align: left;
    }

    .dataTables_wrapper .pagination {
        justify-content: flex-start;
    }

    .ui-chart-frame {
        min-height: 18rem;
    }

    .ui-modal#receiptPreviewModal .modal-dialog {
        max-width: calc(100vw - 1rem);
        margin: 0.5rem auto;
    }

    .ui-modal#receiptPreviewModal .ui-modal-body {
        padding: 0.8rem;
    }

    .ui-receipt-preview,
    .ui-receipt-frame,
    .ui-receipt-image {
        min-height: 58vh;
        max-height: 58vh;
    }
}
