@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Flex:wght@100..700&display=swap');

:root {
    /* Color Palette */
    --bg-main: #f1f5f9;
    --surface: #ffffff;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-base: #e2e8f0;
    --border-focus: #3b82f6;
    --focus-ring: rgba(59, 130, 246, 0.15);

    /* Transitions & Radii */
    --radius-lg: 12px;
    --radius-md: 10px;
    --radius-sm: 10px;
    --transition-fast: 0.2s ease;
}


/* Global Resets & Typography */
* {
    font-family: 'Google Sans Flex', sans-serif;
    box-sizing: border-box;
}

body {
    background: var(--bg-main) !important;
    color: var(--text-main);
}

.content-wrapper {
    background: var(--bg-main) !important;
    padding-bottom: 100px !important;
}

/* Layout Utilities */
.layout-navbar-fixed .wrapper .content-wrapper {
    margin-top: calc(4rem + 1px) !important;
}

/* Typography & Form Labels */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main) !important;
    font-weight: 600 !important;
}

label {
    font-size: 14px;
    font-weight: 500 !important;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

/* Form Elements Styling */
input,
select,
textarea,
.select2-selection {
    font-size: 14px !important;
    border-radius: var(--radius-sm) !important;
    border: 1px solid var(--border-base) !important;
    padding: 10px 12px !important;
    background-color: var(--surface) !important;
    transition: var(--transition-fast);
    width: 100%;
    min-height: 40px;
}

input[type='checkbox'] {
    min-height: 0;
}

input:focus,
select:focus,
textarea:focus,
.select2-container--focus .select2-selection {
    outline: none !important;
    border-color: var(--border-focus) !important;
    box-shadow: 0 0 0 3px var(--focus-ring) !important;
}

input[readonly],
.form-control[readonly] {
    background-color: #f8fafc !important;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    border-radius: var(--radius-sm) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    padding: 8px 14px !important;
    transition: var(--transition-fast);
    border: none !important;
    display: inline-flex;
    flex-flow: row;
    align-items: center;
    gap: 10px;
}

.btn:hover {
    transform: translateY(-1px);
    filter: brightness(0.95);
}

.btn-primary {
    background-color: var(--primary) !important;
    color: white !important;
}

.btn-success {
    background-color: var(--success) !important;
    color: white !important;
}

.btn-danger {
    background-color: var(--danger) !important;
    color: white !important;
}

.btn-warning {
    background-color: var(--warning) !important;
    color: white !important;
}

/* Sidebar Styling */
.main-sidebar,
.brand-link {
    background: #2b303b !important;
    border-right: none !important;
}

.brand-link {
    padding: 10px !important;
    border: none !important;
}

.brand-image-xl {
    width: 100% !important;
    max-height: 40px !important;
    object-fit: contain !important;
    padding: 5px !important;
    object-position: center left !important;
}

.nav-sidebar .nav-link {
    color: #94a3b8 !important;
    font-size: 14px !important;
    padding: 5px 5px !important;
    border-radius: 8px !important;
    display: flex;
    align-items: center;

    p {
        display: flex;
        flex-flow: row !important;

        i {
            position: absolute !important;
            top: 5px !important;
            right: 5px !important;
            background: none !important;
            box-shadow: none !important;
            background: none !important;
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
            border: none !important;
            margin: 0 !important;

        }

    }

    &:hover {

        background: rgba(59, 130, 246, 0.25) !important;

        i {
            background: none !important;
        }
    }
}


.nav-sidebar .nav-link.active {
    background: rgba(59, 130, 246, 0.5) !important;
    color: #fff !important;
    border-radius: var(--radius-sm);
    box-shadow: none !important;
}

/* ===== Modern Stat Cards ===== */
.stat-card {
    position: relative;
    /* For absolute trend placement */
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border-base) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}

.stat-card .card-body {
    padding: 1.25rem !important;
}

.stat-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 4px;
}

.stat-sub {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: -7px;
}

.stat-trend {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 4px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
    z-index: 10;
}

.trend-up {
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
}

.trend-down {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

.stat-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    position: absolute;
    top: 15px;
    right: 20px;
}

.stat-icon-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.stat-icon-green {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.stat-icon-orange {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
}

.stat-icon-purple {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.stat-icon-teal {
    background: rgba(20, 184, 166, 0.15);
    color: #14b8a6;
}

.stat-icon-yellow {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.stat-icon-red {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}




/* Sidebar Icon - Glassmorphism Rounded Pill */
.nav-sidebar .nav-link i:first-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    min-width: 35px;
    border-radius: 8px;
    margin-right: 10px;
    font-size: 13px;
    color: #c8d6e8 !important;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.nav-sidebar .nav-link:hover i:first-child,
.nav-sidebar .nav-link.active i:first-child {
    background: rgba(59, 130, 246, 0.25) !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
    color: #93c5fd !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-sidebar .nav-item {

    &.menu-open {

        background: rgba(59, 130, 246, 0.25) !important;
        border-radius: 8px !important;

        .nav-link {
            background: none !important;

            &.active {
                background: rgba(59, 130, 246, 0.50) !important;
            }
        }
    }


}



/* Header & Navbar */

.navbar-nav {
    font-size: 14px !important;
}

.main-header {
    border-bottom: 1px solid var(--border-base) !important;
}

.content-header {
    padding: 15px !important;
    background: var(--surface) !important;
    margin: 15px !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-sm);
}

.content-header h1 {
    font-size: 1.25rem !important;
    margin: 0 !important;
}

/* Cards */
.card {
    border-radius: var(--radius-md) !important;
    background: var(--surface) !important;
    border: 1px solid var(--border-base) !important;
    box-shadow: none !important;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    background: none !important;
    border-bottom: 1px solid var(--border-base) !important;
    padding: 1rem 1rem !important;

    &.withtitle {
        display: flex;
        flex-flow: row wrap;
        justify-content: space-between;
        align-items: center;

        h1,
        h2,
        h3,
        h4,
        h5,
        h6 {
            margin: 0 !important;
        }
    }
}

.card-body {
    padding: 1rem !important;
}

/* Tables */
.table {
    font-size: 13px !important;
}

.table thead th {
    background: #fff;
    border-bottom: 1px solid var(--border-base) !important;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 400;
    color: #000;
    padding: 12px 10px !important;
    border-top: 0 !important;
}

.table td {
    border-top: none !important;
    border-bottom: 1px solid var(--border-base) !important;
    padding: 12px 10px !important;
    vertical-align: middle !important;
}

/* Navbar Menu Consolidation (Grouped Dropdown) */
/* .user-menu { display: none !important; } -> Removed to restore the user dropdown menu */

.main-header .nav-item.dropdown .nav-link.dropdown-toggle::after {
    content: none !important;
    display: none !important;
}

/* Allow long user names to wrap up to 2 lines then truncate with ellipsis */
.user-menu .nav-link span {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 200px;
    white-space: normal !important;
    line-height: 1.2;
    vertical-align: middle;
    word-break: break-word;
}

/* Mobile specific handling for long user names - Compact for better space management */
@media (max-width: 768px) {
    .user-menu .nav-link span {
        max-width: 140px !important;
        -webkit-line-clamp: 1 !important;
        font-size: 13px !important;
    }
}

.main-header .nav-item.dropdown {
    position: relative !important;
}

.main-header .dropdown-menu-right {
    left: auto !important;
    right: 0 !important;
    width: auto !important;
    min-width: 400px;
    margin-top: 0 !important;
    border-radius: var(--radius-sm) !important;
    border: 1px solid var(--border-base) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
    position: absolute !important;
    top: 100% !important;
}

.main-header .dropdown-item {
    display: flex;
    align-items: center;
    color: var(--text-main) !important;
}

.main-header .dropdown-item i {
    width: 2rem;
    font-size: 1.1rem;
    margin-right: 0.5rem;
    color: var(--text-muted);
}

.main-header .mobilemenu {

    margin-right: 10px !important;

    i {
        padding: 0 !important;
        margin: 0 !important;
        width: auto !important;
    }

    .dropdown-menu {
        position: fixed;
        left: 0;
        width: 100%;
        top: 56px;
        z-index: 10;

        i {
            margin-right: 10px !important;
        }
    }

}



.main-header a[data-widget='pushmenu'] {
    @media (max-width: 768px) {
        margin-left: 15px;
    }
}

/* Header Menu Alignment & Responsive Visibility */
.main-header .nav-item.d-md-flex {
    align-items: center;
}

@media (min-width: 768px) {

    /* Hide ONLY nested dropdown toggles on desktop/tablet */
    .main-header .dropdown-menu .dropdown-item.dropdown-toggle {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    .main-header .dropdown-item.dropdown-toggle {
        display: flex !important;
    }
}

/* Audit Cards Section */
.audit-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.audit-card {
    background: #f8fafc;
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    border: 1px solid var(--border-base);
}

.audit-card:hover {
    border-color: var(--border-focus);
    background: white;
    box-shadow: var(--shadow-md);
}

/* Floating Actions Bar */
.floating-buttons {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(8px);
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem !important;
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-base);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    gap: 0.75rem;
}

.floating-btn {
    min-width: 100px;
    border-radius: 50px !important;
    padding: 10px 24px !important;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .content-header {
        margin: 10px !important;
        padding: 15px !important;
    }

    .floating-buttons {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        width: auto;
        justify-content: center;
    }

    .floating-btn {
        flex: 1;
    }
}

/* Utility Classes */
.badge-pill {
    border-radius: 50px !important;
    padding: 4px 12px !important;
    font-size: 11px !important;
    font-weight: 600;
}

#snackbar {
    position: fixed;
    z-index: 1050;
    right: 5%;
    top: 100px;
    font-size: 15px;
}

.dt-center {
    text-align: center;
}

/* Detail Tabs Utility (Legacy Support) */
.tabsdetail {
    margin-top: 2rem;
}

.tabsdetail .nav-tabs {
    border-bottom: 2px solid var(--border-base);
    display: flex;
    border: none;
}

.tabsdetail .nav-item {
    flex: 1;
    text-align: center;
}

.tabsdetail .nav-link {
    border: 1px solid var(--border-base) !important;
    margin: 0 2px;
    color: var(--text-muted) !important;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important;
    padding: 10px !important;
}

.tabsdetail .nav-link.active {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}


/* Modern Tabs (Inspinia Style) */
.card-tabs {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.card-tabs>.card-header {
    background: transparent !important;
    border-bottom: none !important;
    padding: 0 !important;
}

.card-tabs .nav-tabs {
    border-bottom: none !important;
}

.card-tabs .nav-link {
    border: 1px solid var(--border-base) !important;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important;
    color: var(--text-muted) !important;
    padding: 10px 20px !important;
    font-weight: 500;
    margin-right: 4px;
    background: #edf2f7;
    transition: var(--transition-fast);
    font-size: 14px;
}

.card-tabs .nav-link:hover {
    background: #e2e8f0;
    color: var(--text-main) !important;
}

.card-tabs .nav-link.active {
    background: var(--surface) !important;
    color: var(--primary) !important;
    font-weight: 700;
    border-top: 3px solid var(--primary) !important;
    border-bottom: 2px solid var(--surface) !important;
    margin-bottom: -2px;
    z-index: 2;
}

.card-tabs>.card-body {
    background: var(--surface);
    border: 1px solid var(--border-base) !important;
    border-radius: 0 var(--radius-md) var(--radius-md) var(--radius-md) !important;
    padding: 1rem !important;
    box-shadow: var(--shadow-sm);
}

/* Custom Tab Content Spacing */
.tab-pane {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Pagination & Info */
.dataTables_info {
    font-size: 13px;
    color: var(--text-muted);
}

.pagination .page-link {
    border-radius: var(--radius-sm) !important;
    margin: 0 2px;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--text-main);
    border: 1px solid var(--border-base);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}

.datetimewrapper {
    margin-bottom: 15px;
    display: inline-flex;
    align-items: center;

    label {
        margin: 0;
        margin-right: 10px;
        width: auto !important;
    }
}


.kolomhakakses {
    display: flex;
    flex-flow: row;
    align-items: center;
    border-right: 1px solid #e6e6e6;

    label {
        margin: 0;
        margin-right: 10px;
        font-weight: 400 !important;
    }

    input {
        width: auto !important;
        margin-left: auto;
        margin-right: 0;
    }
}

.headerhakakses {
    text-align: center;

    th {
        input {
            margin-top: 5px;
        }
    }
}

.rememberme {
    input {
        width: auto !important;
        margin-right: 5px;
        margin-left: 5px;
    }

    label {
        margin: 0 !important;
    }
}

.totalpembelian tr td {
    font-weight: 600 !important;
    background: #e6e6e6;
}

/* Upload Dropzone */
.upload-dropzone {
    border: 2px dashed #e7eaec;
    border-radius: 4px;
    background: #fafafa;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: #1ab394;
    background: #f0faf8;
}

.upload-dropzone-icon {
    font-size: 36px;
    color: #c8d0d8;
    margin-bottom: 4px;
}

.upload-dropzone.dragover .upload-dropzone-icon {
    color: #1ab394;
}

.upload-dropzone-text {
    font-size: 14px;
    font-weight: 600;
    color: #676a6c;
    margin: 0;
}

.upload-dropzone-subtext {
    font-size: 12px;
    color: #aaa;
    margin: 0;
}

.upload-dropzone-hint {
    font-size: 11px;
    color: #c8d0d8;
    margin: 0;
}

.upload-file-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin: 4px 0 0;
    word-break: break-all;
}

.upload-browse-btn {
    border-color: #1ab394 !important;
    color: #1ab394 !important;
    font-size: 12px !important;
    border-radius: 3px !important;
}

.upload-browse-btn:hover {
    background: #1ab394 !important;
    color: #fff !important;
}

.upload-file-list {
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}

.upload-file-list-header {
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.upload-file-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
    white-space: nowrap;
    overflow: hidden;
}

.upload-file-link:last-child {
    border-bottom: none;
}

.upload-file-link:hover {
    background: #f7f7f7;
    color: #000;
    text-decoration: none;
}

.upload-file-link .file-index {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    background: #333;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-file-link .file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: #444;
}

.upload-file-link .file-view-icon {
    flex-shrink: 0;
    font-size: 12px;
    color: #aaa;
}

.upload-file-link .file-remove-btn {
    flex-shrink: 0;
    padding: 1px 5px;
    font-size: 11px;
    line-height: 1.4;
    margin-left: auto;
}

.content-information {
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.content-receipt {
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.receipt-card {
    border: 1px solid #e7eaec;
    border-top: 3px solid #1ab394;
    border-radius: 4px;
    padding: 0;
    margin-bottom: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

/* Grouped Table List UI - Table Based Layout */
.receipt-table-group {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    background: #fff;
    border: 1px solid #e7eaec;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.receipt-group-header-row th {
    background: #f8f9fa;
    padding: 12px 15px;
    border-bottom: 1px solid #e7eaec;
    text-align: left;
    font-weight: 700;
    color: #333;
}

.receipt-group-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.receipt-group-title {
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.receipt-group-photo-cell {
    width: 150px;
    min-width: 150px;
    vertical-align: top;
    padding: 15px;
    border-right: 1px solid #e7eaec;
    text-align: center;
    background: #fdfdfd;
}

.receipt-group-photo-cell img {
    max-width: 100%;
    max-height: 120px;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.receipt-group-photo-cell img:hover {
    transform: scale(1.05);
}

.receipt-group-table-cell {
    vertical-align: top;
    padding: 0;
}

.receipt-list-table {
    width: 100%;
    border-collapse: collapse;
}

.receipt-list-table th {
    background: #f4f4f4;
    padding: 12px 15px;
}

.receipt-list-table td {
    padding: 12px 15px;
    vertical-align: middle;
    border-top: 1px solid #f1f1f1;
    font-size: 14px;
}

.receipt-row-number {
    width: 40px;
    text-align: center;
    color: #999;
    font-weight: 500;
}

.receipt-list-table tr:first-child td {
    border-top: none;
}

.receipt-list-table tr:hover {
    background: #fcfcfc;
}

.receipt-row-amount {
    font-weight: 500;
    color: #333;
    text-align: right;
}

.receipt-row-ocr-val {
    color: #1ab394;
    font-weight: 700;
}

.receipt-row-diff-val {
    font-weight: 500;
}

.receipt-list-table tfoot td {
    border-top: 2px solid #eee;
    padding: 12px 15px;
    background: #fcfcfc;
}

.receipt-row-actions {
    text-align: right;
}

.badge-header-total {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-align: right;
    display: inline;
    margin-left: auto;
}

.badge-counted {
    background: #1ab394;
    color: #fff;
}

.badge-ocr {
    background: #f8f9fa;
    color: #676a6c;
    border: 1px solid #e7eaec;
}

.badge-diff {
    background: #f8f9fa;
    color: #676a6c;
    border: 1px solid #e7eaec;
}

.badge-diff.has-diff {
    background: #f8ac59 !important;
    /* Orange-Yellow */
    color: #fff !important;
    border: none;
}

.view-edit-btn {
    color: #1ab394;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.view-edit-btn:hover {
    color: #18a689;
}

.modal-xl {
    max-width: 90% !important;
}

.receipt-header {
    background: #f8f8f8;
    border-bottom: 1px solid #e7eaec;
    padding: 10px 16px;
    border-radius: 1px 1px 0 0;
    font-weight: 600;
    color: #333;
}

.receipt-body {
    padding: 16px;
}

.receipt-two-col {
    display: flex;
    gap: 20px;
}

.receipt-left-preview {
    flex: 0 0 150px;
    max-width: 150px;
}

.receipt-left-preview img {
    width: 100%;
    border-radius: 4px;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: transform 0.2s;
}

.receipt-left-preview img:hover {
    transform: scale(1.05);
}

.receipt-right-content {
    flex: 1;
    min-width: 0;
}

.receipt-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.receipt-chevron {
    cursor: pointer;
    padding: 5px;
}

.item-total {
    background-color: #f8f9fa;
    font-weight: 600;
}

.subtotal-input,
.grandTotal-input {
    background-color: #f5f5f5 !important;
    font-weight: 600;
    color: #333;
}

.grandTotal-input {
    font-size: 1em;
    color: #1ab394;
    font-weight: 700;
}

.table-sm td {
    padding: 0.3rem;
}

.required:after {
    content: " *";
    color: #ed5565;
}

label {
    font-size: 13px;
    font-weight: 600;
    color: #676a6c;
    margin-bottom: 4px;
}

.section-title {
    font-size: 12px;
    font-weight: 700;
    color: #676a6c;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e7eaec;
}

.items-table td,
.items-table th {
    vertical-align: middle !important;
}

.items-table .btn {
    padding: 0.25rem 0.45rem;
    line-height: 1;
}

.items-table td:last-child,
.items-table th:last-child {
    text-align: center;
    width: 60px;
}

.image-subtotal-bar {
    background: #e8f8f3;
    border: 1.5px solid #1ab394;
    border-radius: 6px;
    padding: 12px 20px;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .receipt-two-col {
        flex-direction: column;
    }

    .receipt-left-preview {
        flex: 0 0 auto;
        max-width: 100%;
        margin-bottom: 15px;
    }

    .card-body {
        padding: 20px 10px !important;
    }

    .content-header {
        margin-top: 80px;
        margin-bottom: 12px !important;
    }

    /* Force navbar to 2 rows on mobile - Optimized for space */
    .main-header {
        display: flex !important;
        flex-wrap: wrap !important;
        height: auto !important;
        padding: 2px 0 !important;
        background: rgba(255, 255, 255, 0.9) !important;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .main-header .navbar-nav {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        align-items: center !important;
        padding: 0 8px !important;
    }

    .main-header .nav-item {
        display: flex !important;
        align-items: center !important;
    }

    .main-header .nav-link {
        display: flex !important;
        align-items: center !important;
        padding: 0.3rem 0.5rem !important;
        font-size: 13px !important;
        height: 35px !important; /* Fixed height to keep items on same axis */
    }

    .main-header .nav-item i {
        font-size: 14px !important;
        margin-right: 4px !important;
        display: inline-flex !important;
        align-items: center !important;
    }

    /* Badges optimization - ensured vertical centering */
    .main-header .badge {
        font-size: 10px !important;
        padding: 2px 6px !important;
        border-radius: 4px !important;
        font-weight: 600 !important;
        display: inline-flex !important;
        align-items: center !important;
        height: 18px !important;
    }

    /* Row 1: Hamburger (left) and User/Language (right) */
    .main-header .nav-item[data-widget="pushmenu"] {
        order: 1;
    }

    .main-header .navbar-nav.ml-auto {
        width: auto !important;
        margin-left: auto !important;
        order: 2;
        display: flex !important;
        align-items: center !important;
    }

    /* Row 2: Status and Branch badges - Tightened spacing */
    .main-header .navbar-nav:not(.ml-auto) .nav-item:not([data-widget="pushmenu"]) {
        order: 3;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding: 4px 0 !important;
    }

    /* Ensure icons and text inside badges align correctly */
    .main-header .nav-link i, 
    .main-header .nav-link span,
    .main-header .nav-link .badge {
        vertical-align: middle !important;
        line-height: 1 !important;
    }

    /* Adjust content offsets */
    .layout-navbar-fixed .wrapper .content-wrapper {
        margin-top: 80px !important;
    }

    .receipt-header {
        flex-wrap: wrap;
    }

    .receipt-header>div {
        min-width: 0;
        flex: 1 1 auto;
    }

    .receipt-header .badge {
        white-space: normal;
        word-break: break-word;
        max-width: 100%;
    }

    .receipt-header a.badge {
        display: inline-block;
    }

    .receipt-header .remove-receipt {
        flex: 0 0 auto;
        margin-top: 10px;
        margin-left: auto;
    }

    .items-table thead th {
        font-size: 12px;
    }

    .items-table tbody td {
        font-size: 13px;
    }

    .table-responsive {
        overflow-x: auto;
    }

    .items-table {
        min-width: 700px;
    }

}

/* Dashboard Filter Modernization Styles */
.compact-filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.compact-filter-form .select2-container .select2-selection--single {
    height: 38px !important;
    border-color: #e6e6e6 !important;
    border-radius: 0 8px 8px 0 !important;
}

.compact-filter-form .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 38px !important;
    font-size: 13px;
    padding-left: 12px;
}

.compact-filter-form .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
}

.compact-filter-form .input-group-prepend {
    display: flex;
}

.compact-filter-form .input-group-text {
    border-color: #e6e6e6 !important;
    width: 40px;
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f9fa !important;
    padding: 0 !important;
    border-radius: 8px 0 0 8px !important;
}

.compact-filter-form .form-control {
    height: 38px !important;
    font-size: 13px !important;
    border-color: #e6e6e6 !important;
}

.compact-filter-form .datepicker {
    border-left: 0 !important;
    border-radius: 0 8px 8px 0 !important;
}

.compact-filter-form .input-group {
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important;
    border-radius: 8px;
    flex-wrap: nowrap;
}

@media (max-width: 768px) {
    .compact-filter-form .input-group {
        width: 100% !important;
    }
}