        :root {
            --primary-color: #4F46E5;
            --primary-dark: #3730A3;
            --secondary-color: #7C3AED;
            --accent-success: #10B981;
            --text-main: #1F2937;
            --text-muted: #6B7280;
            --bg-light: #F3F4F6;
            --bg-sidebar: #111827;
            --sidebar-width: 260px;
            --safe-top: env(safe-area-inset-top, 0px);
            --safe-bottom: env(safe-area-inset-bottom, 0px);
            --safe-left: env(safe-area-inset-left, 0px);
            --safe-right: env(safe-area-inset-right, 0px);
        }

        * {
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        html {
            -webkit-text-size-adjust: 100%;
            scroll-behavior: smooth;
        }

        body {
            font-family: 'Inter', sans-serif;
            background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
            color: var(--text-main);
            min-height: 100vh;
            min-height: 100dvh;
            overflow-x: hidden;
            overscroll-behavior-y: contain;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        #pwa-install-banner {
            display: none;
            position: fixed;
            bottom: calc(16px + var(--safe-bottom));
            left: 16px;
            right: 16px;
            background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
            color: white;
            border-radius: 16px;
            padding: 14px 16px;
            z-index: 9998;
            box-shadow: 0 8px 32px rgba(79, 70, 229, 0.4);
            animation: slideUp 0.4s ease;
        }

        #pwa-install-banner.show {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        @keyframes slideUp {
            from {
                transform: translateY(20px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        .pwa-banner-icon {
            width: 44px;
            height: 44px;
            background: white;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .pwa-banner-icon img {
            width: 36px;
            height: 36px;
            object-fit: contain;
        }

        .pwa-banner-text {
            flex: 1;
        }

        .pwa-banner-text strong {
            display: block;
            font-size: 0.9rem;
        }

        .pwa-banner-text small {
            color: rgba(255, 255, 255, 0.7);
            font-size: 0.75rem;
        }

        .pwa-banner-actions {
            display: flex;
            gap: 8px;
            flex-shrink: 0;
        }

        .btn-pwa-install {
            background: white;
            color: var(--primary-color);
            border: none;
            border-radius: 8px;
            padding: 8px 14px;
            font-weight: 700;
            font-size: 0.82rem;
            cursor: pointer;
        }

        .btn-pwa-dismiss {
            background: rgba(255, 255, 255, 0.15);
            color: white;
            border: none;
            border-radius: 8px;
            padding: 8px 10px;
            font-size: 0.82rem;
            cursor: pointer;
        }

        #offline-badge {
            display: none;
            position: fixed;
            top: calc(60px + var(--safe-top));
            left: 50%;
            transform: translateX(-50%);
            background: #dc2626;
            color: white;
            padding: 6px 16px;
            border-radius: 20px;
            font-size: 0.78rem;
            font-weight: 600;
            z-index: 9997;
            box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
            animation: fadeInDown 0.3s ease;
            white-space: nowrap;
        }

        @keyframes fadeInDown {
            from {
                opacity: 0;
                transform: translateX(-50%) translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateX(-50%) translateY(0);
            }
        }

        #login-screen {
            position: fixed;
            inset: 0;
            min-height: 100vh;
            min-height: 100dvh;
            background: linear-gradient(135deg, #4F46E5 0%, #8080F5 50%, #A855F7 100%);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 9999;
            padding: max(env(safe-area-inset-top, 16px), 16px) 16px max(env(safe-area-inset-bottom, 16px), 16px) 16px;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

        .login-box {
            margin: auto;
            background: rgba(255, 255, 255, 0.92);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid rgba(255, 255, 255, 0.6);
            width: 100%;
            max-width: 420px;
            border-radius: 24px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
            text-align: center;
            padding: clamp(28px, 6vw, 48px);
            position: relative;
            overflow: hidden;
        }

        .login-box::before {
            content: '';
            position: absolute;
            top: -50px;
            right: -50px;
            width: 100px;
            height: 100px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 50%;
        }

        .login-box .logo-wrap {
            width: 80px;
            height: 80px;
            background: #fff;
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 16px;
            overflow: hidden;
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
            padding: 5px;
        }

        .login-box .logo-wrap img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        .login-box h3 {
            margin-bottom: 4px;
            color: #1F2937;
            font-weight: 800;
            font-size: clamp(1.2rem, 5vw, 1.5rem);
            letter-spacing: -0.5px;
        }

        .login-box .subtitle {
            color: #6B7280;
            margin-bottom: 24px;
            font-size: 0.88rem;
            font-weight: 500;
        }

        .input-group-modern {
            position: relative;
            margin-bottom: 14px;
        }

        .input-group-modern .icon-prefix {
            position: absolute;
            left: 16px;
            top: 50%;
            transform: translateY(-50%);
            color: #9CA3AF;
            font-size: 1.05rem;
            z-index: 2;
            transition: color 0.3s;
            pointer-events: none;
        }

        .input-group-modern .form-control {
            height: 52px;
            padding-left: 48px;
            border-radius: 14px;
            background: #F9FAFB;
            border: 2px solid transparent;
            font-size: 16px !important;
            transition: all 0.3s ease;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        }

        .input-group-modern .form-control:focus {
            background: #FFFFFF;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
            outline: none;
        }

        .toggle-pw-btn {
            position: absolute;
            right: 14px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: #9CA3AF;
            font-size: 1.1rem;
            cursor: pointer;
            z-index: 3;
            padding: 4px;
            line-height: 1;
        }

        .toggle-pw-btn:focus {
            outline: none;
        }

        .login-box .btn-login {
            height: 52px;
            font-size: 1rem;
            font-weight: 700;
            border-radius: 14px;
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
            border: none;
            color: white;
            width: 100%;
            margin-top: 8px;
            box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.4);
            transition: transform 0.2s, box-shadow 0.2s;
            cursor: pointer;
        }

        #app-wrapper {
            display: none;
            width: 100%;
            min-height: 100vh;
            min-height: 100dvh;
        }

        #global-loader {
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, 0.85);
            backdrop-filter: blur(4px);
            z-index: 99999;
            display: none;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        #global-loader.show {
            display: flex;
            opacity: 1;
        }

        .spinner-global {
            width: 50px;
            height: 50px;
            border: 4px solid rgba(255, 255, 255, 0.2);
            border-top: 4px solid #ffffff;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        #wrapper {
            display: flex;
            width: 100%;
            min-height: 100vh;
            min-height: 100dvh;
        }

        #sidebar-wrapper {
            min-height: 100vh;
            min-height: 100dvh;
            background: var(--bg-sidebar);
            width: var(--sidebar-width);
            position: fixed;
            top: 0;
            left: 0;
            z-index: 1000;
            display: flex;
            flex-direction: column;
            box-shadow: 4px 0 6px rgba(0, 0, 0, 0.1);
            transform: translateX(-100%);
            transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
            padding-top: var(--safe-top);
            padding-bottom: var(--safe-bottom);
        }

        body.sidebar-open #sidebar-wrapper {
            transform: translateX(0);
            box-shadow: 8px 0 25px rgba(0, 0, 0, 0.3);
        }

        #sidebar-wrapper .sidebar-heading {
            padding: 1.2rem 1.25rem;
            font-size: 1rem;
            font-weight: 700;
            color: #fff;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            text-align: center;
            background: rgba(255, 255, 255, 0.04);
        }

        #sidebar-wrapper .list-group {
            width: var(--sidebar-width);
            overflow-y: auto;
            padding: 0.75rem 0;
            flex-grow: 1;
            overscroll-behavior: contain;
        }

        .list-group-item {
            background-color: transparent;
            color: #9CA3AF;
            border: none;
            padding: 0.85rem 1.4rem;
            font-weight: 500;
            transition: all 0.2s;
            border-left: 3px solid transparent;
            display: flex;
            align-items: center;
            gap: 12px;
            cursor: pointer;
            text-decoration: none;
            font-size: 0.92rem;
        }

        .list-group-item i {
            font-size: 1.05rem;
            width: 22px;
            text-align: center;
        }

        .list-group-item:hover {
            background-color: rgba(255, 255, 255, 0.07);
            color: #fff;
        }

        .list-group-item.active {
            background: linear-gradient(90deg, rgba(79, 70, 229, 0.25) 0%, rgba(255, 255, 255, 0) 100%);
            color: #fff;
            border-left: 3px solid var(--primary-color);
        }

        .sidebar-user-profile {
            padding: 14px;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(0, 0, 0, 0.2);
        }

        .sidebar-user-profile .user-name {
            color: #fff;
            font-weight: 600;
            font-size: 0.9rem;
        }

        .sidebar-user-profile .user-role {
            color: #9CA3AF;
            font-size: 0.75rem;
        }

        #page-content-wrapper {
            width: 100%;
            padding: calc(60px + var(--safe-top)) 20px calc(20px + var(--safe-bottom)) 20px;
            background-color: #E5E7EB;
            transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
            min-height: 100vh;
            min-height: 100dvh;
        }

        body.desktop-mode.sidebar-open #page-content-wrapper {
            margin-left: var(--sidebar-width);
            padding-top: calc(28px + var(--safe-top));
        }

        #sidebar-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.55);
            z-index: 999;
            backdrop-filter: blur(2px);
        }

        body.sidebar-open:not(.desktop-mode) #sidebar-overlay {
            display: block;
        }

        #hamburgerBtn {
            display: flex;
            align-items: center;
            gap: 6px;
            position: fixed;
            top: calc(10px + var(--safe-top));
            left: calc(12px + var(--safe-left));
            z-index: 2000;
            background: transparent;
            color: #fff;
            border: 2px solid rgba(255, 255, 255, 0.35);
            border-radius: 10px;
            padding: 8px 14px;
            font-size: 0.85rem;
            font-weight: 600;
            font-family: 'Inter', sans-serif;
            cursor: pointer;
            outline: none;
            box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4), 0 1px 3px rgba(0, 0, 0, 0.2);
            transition: opacity 0.2s, transform 0.15s;
            min-height: 44px;
        }

        #hamburgerBtn:active {
            transform: scale(0.92);
        }

        #hamburgerBtn i {
            font-size: 1.1rem;
            line-height: 1;
        }

        body.desktop-mode.sidebar-open #hamburgerBtn {
            left: calc(var(--sidebar-width) + 12px);
        }

        #bottom-nav {
            display: none;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: #fff;
            border-top: 1px solid #E5E7EB;
            z-index: 998;
            padding-bottom: var(--safe-bottom);
            box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
        }

        .bottom-nav-inner {
            display: flex;
            justify-content: space-around;
            align-items: center;
            padding: 6px 0;
        }

        .bnav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 3px;
            padding: 6px 10px;
            color: #9CA3AF;
            font-size: 0.65rem;
            font-weight: 600;
            cursor: pointer;
            border: none;
            background: none;
            transition: color 0.2s;
            min-width: 56px;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            min-height: 48px;
            justify-content: center;
        }

        .bnav-item i {
            font-size: 1.3rem;
            line-height: 1;
        }

        .bnav-item.active {
            color: var(--primary-color);
        }

        .bnav-item.active i {
            background: rgba(79, 70, 229, 0.1);
            border-radius: 10px;
            padding: 4px 8px;
        }

        .glass-card {
            background: #F9FAFB;
            border-radius: 16px;
            padding: 20px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
            margin-bottom: 16px;
            border: 1px solid #E5E7EB;
            color: var(--text-main);
        }

        .section-title {
            font-weight: 700;
            color: var(--text-main);
            font-size: 1.05rem;
            margin-bottom: 18px;
            display: flex;
            align-items: center;
        }

        .section-title::before {
            content: '';
            display: block;
            width: 4px;
            height: 18px;
            background: var(--primary-color);
            margin-right: 10px;
            border-radius: 2px;
        }

        .form-control, .form-select {
            background: #fff;
            border: 1px solid #D1D5DB;
            color: var(--text-main);
            border-radius: 8px;
            padding: 0.6rem 1rem;
            font-size: 16px !important;
        }

        .form-control:focus, .form-select:focus {
            border-color: var(--primary-color);
            color: var(--text-main);
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
        }

        .form-control-sm, .form-select-sm {
            padding: 0.45rem 0.75rem;
            font-size: 16px !important;
        }

        .form-label {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-muted);
            margin-bottom: 6px;
        }

        .table-custom thead th {
            background: #F3F4F6;
            color: var(--text-muted);
            font-weight: 600;
            border-bottom: 2px solid #E5E7EB;
            font-size: 0.72rem;
            letter-spacing: 0.06em;
            padding: 10px 8px;
            text-transform: uppercase;
        }

        .table-custom tbody tr {
            border-bottom: 1px solid #F3F4F6;
            transition: background 0.15s;
        }

        .table-custom tbody tr:hover {
            background-color: #F9FAFB;
        }

        .table-custom td {
            vertical-align: middle;
            color: var(--text-main);
            font-size: 0.85rem;
            padding: 10px 8px;
        }

        .btn-primary-modern {
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
            border: none;
            color: #fff;
            font-weight: 600;
            padding: 10px 18px;
            border-radius: 8px;
            transition: all 0.25s;
            box-shadow: 0 4px 6px rgba(79, 70, 229, 0.3);
            cursor: pointer;
            min-height: 44px;
        }

        .btn-primary-modern:hover {
            transform: translateY(-1px);
            box-shadow: 0 7px 14px rgba(79, 70, 229, 0.4);
            color: #fff;
        }

        .btn-primary-modern:active {
            transform: scale(0.97);
        }

        .btn {
            min-height: 40px;
        }

        .btn-sm {
            min-height: 36px;
        }

        .badge {
            padding: 0.45em 0.75em;
            font-weight: 600;
            font-size: 0.72rem;
            border-radius: 6px;
        }

        .d-none-page {
            display: none !important;
        }

        .fade-in {
            animation: fadeIn 0.4s ease-out;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(8px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .struk-container {
            background: white;
            color: #000;
            padding: 20px;
            width: 300px;
            margin: 0 auto;
            font-family: 'Courier New', Courier, monospace;
            border: 1px dashed #ccc;
            text-align: center;
        }

        .struk-header {
            border-bottom: 1px dashed #000;
            padding-bottom: 10px;
            margin-bottom: 10px;
        }

        .struk-footer {
            border-top: 1px dashed #000;
            padding-top: 10px;
            margin-top: 10px;
            font-size: 12px;
        }

        .struk-body {
            text-align: left;
            font-size: 14px;
        }

        .struk-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 5px;
        }

        .nav-tabs {
            border-bottom: 2px solid #E5E7EB;
            margin-bottom: 20px;
        }

        .nav-tabs .nav-link {
            border: none;
            color: var(--text-muted);
            font-weight: 600;
            padding: 9px 16px;
            border-bottom: 3px solid transparent;
            transition: all 0.25s;
            white-space: nowrap;
            font-size: 0.88rem;
        }

        .nav-tabs .nav-link:hover {
            color: var(--primary-color);
            border-bottom-color: rgba(79, 70, 229, 0.3);
        }

        .nav-tabs .nav-link.active {
            color: var(--primary-color);
            background-color: transparent;
            border-bottom: 3px solid var(--primary-color);
        }

        .stat-card {
            background: white;
            border-radius: 12px;
            padding: 16px;
            border: 1px solid #E5E7EB;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
        }

        .sisa-info-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 14px;
            border-radius: 10px;
            margin-bottom: 12px;
            gap: 8px;
        }

        @media (max-width: 767.98px) {

            html,
            body {
                width: 100%;
                overflow-x: hidden;
            }

            #bottom-nav {
                display: block;
            }

            #hamburgerBtn {
                display: none;
            }

            #page-content-wrapper {
                padding: calc(16px + var(--safe-top)) 12px calc(80px + var(--safe-bottom)) 12px !important;
            }

            .glass-card {
                padding: 14px !important;
                border-radius: 12px !important;
                margin-bottom: 10px !important;
            }

            h2.mb-4 {
                font-size: 1.15rem !important;
                margin-bottom: 10px !important;
            }

            .section-title {
                font-size: 0.9rem !important;
                margin-bottom: 12px !important;
            }

            .table-responsive {
                -webkit-overflow-scrolling: touch;
                overflow-x: auto;
                border-radius: 8px;
            }

            .table-custom td,
            .table-custom th {
                padding: 8px 6px !important;
                font-size: 0.78rem !important;
            }

            .table-custom thead th {
                font-size: 0.67rem !important;
            }

            .nav-tabs {
                overflow-x: auto;
                overflow-y: hidden;
                flex-wrap: nowrap;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none;
            }

            .nav-tabs::-webkit-scrollbar {
                display: none;
            }

            .nav-tabs .nav-item {
                flex-shrink: 0;
            }

            .nav-tabs .nav-link {
                padding: 8px 12px !important;
                font-size: 0.8rem !important;
            }

            .btn-primary-modern {
                padding: 10px 14px !important;
                font-size: 0.88rem !important;
            }

            .btn-sm {
                font-size: 0.8rem !important;
                min-height: 38px;
            }

            .modal-dialog {
                margin: 8px !important;
                max-width: calc(100vw - 16px) !important;
            }

            .badge {
                font-size: 0.68rem !important;
            }

            .row.g-4 {
                --bs-gutter-y: 0.5rem !important;
                --bs-gutter-x: 0.4rem !important;
            }

            .struk-container {
                width: 100% !important;
                max-width: 290px;
            }

            .form-control,
            .form-select {
                font-size: 16px !important;
                padding: 10px 12px !important;
            }

            .input-group-text {
                font-size: 0.88rem;
            }

            #revenueChartBox {
                height: 160px !important;
            }

            #statusChartBox {
                height: 140px !important;
            }

            .page-link {
                padding: 6px 10px !important;
                font-size: 0.8rem !important;
            }
        }

        @media (max-width: 399.98px) {
            #page-content-wrapper {
                padding: calc(14px + var(--safe-top)) 10px calc(76px + var(--safe-bottom)) 10px !important;
            }

            .glass-card {
                padding: 12px !important;
            }
        }

        @media (min-width: 768px) {
            #hamburgerBtn {
                display: flex;
            }
        }