        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            /* Light Theme (Default) - Mint Green Vibe */
            --bg-primary: #f2fcf5;
            /* Very pale mint/white */
            --bg-secondary: #ffffff;
            --bg-tertiary: #e6fffa;
            /* Soft mint */
            --bg-card: #ffffff;
            --accent-cyan: #059669;
            /* Emerald 600 - Good contrast */
            --accent-blue: #2563eb;
            --accent-purple: #9333ea;
            --accent-green: #10b981;
            /* Emerald 500 */
            --accent-orange: #d97706;
            --accent-pink: #db2777;

            --text-primary: #064e3b;
            /* Emerald 900 - Dark green/almost black */
            --text-secondary: #334155;
            /* Slate 700 */
            --text-muted: #64748b;
            /* Slate 500 */

            --border-subtle: #a7f3d0;
            /* Emerald 200 */
            --glow-cyan: rgba(16, 185, 129, 0.15);
            --glow-purple: rgba(147, 51, 234, 0.15);
            --surface-light: rgba(16, 185, 129, 0.08);

            --chart-grid: #e2e8f0;
        }

        body.dark-mode {
            /* Dark Theme Overrides */
            --bg-primary: #0a0e14;
            --bg-secondary: #131920;
            --bg-tertiary: #1a2029;
            --bg-card: #1e2731;

            --accent-cyan: #00d9ff;
            --accent-blue: #3b82f6;
            --accent-purple: #a855f7;
            --accent-green: #10b981;
            --accent-orange: #f59e0b;
            --accent-pink: #ec4899;

            --text-primary: #e4e9f0;
            --text-secondary: #9ca3af;
            --text-muted: #6b7280;

            --border-subtle: rgba(255, 255, 255, 0.08);
            --glow-cyan: rgba(0, 217, 255, 0.3);
            --glow-purple: rgba(168, 85, 247, 0.3);
            --surface-light: rgba(255, 255, 255, 0.1);

            --chart-grid: rgba(255, 255, 255, 0.1);
        }

        body {
            background: var(--bg-primary);
            color: var(--text-primary);
            font-family: 'Archivo', sans-serif;
            overflow-x: hidden;
        }

        /* Ambient background effect */
        .bg-ambient {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 0;
            pointer-events: none;
            opacity: 0.4;
        }

        .bg-orb {
            position: absolute;
            border-radius: 50%;
            filter: blur(80px);
            opacity: 0.6;
            animation: float 20s infinite ease-in-out;
        }

        .orb-1 {
            width: 500px;
            height: 500px;
            background: radial-gradient(circle, var(--accent-cyan), transparent);
            top: -150px;
            left: -100px;
            animation-delay: 0s;
        }

        .orb-2 {
            width: 400px;
            height: 400px;
            background: radial-gradient(circle, var(--accent-purple), transparent);
            top: 40%;
            right: -150px;
            animation-delay: -7s;
        }

        .orb-3 {
            width: 350px;
            height: 350px;
            background: radial-gradient(circle, var(--accent-pink), transparent);
            bottom: -100px;
            left: 30%;
            animation-delay: -14s;
        }

        @keyframes float {

            0%,
            100% {
                transform: translate(0, 0) scale(1);
            }

            33% {
                transform: translate(30px, -30px) scale(1.1);
            }

            66% {
                transform: translate(-20px, 20px) scale(0.9);
            }
        }

        .container {
            position: relative;
            z-index: 1;
            display: grid;
            grid-template-columns: 280px 1fr;
            min-height: 100vh;
        }

        /* Sidebar */
        .sidebar {
            background: var(--bg-secondary);
            border-right: 1px solid var(--border-subtle);
            padding: 2rem 0;
            position: sticky;
            top: 0;
            height: 100vh;
            overflow-y: auto;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0 2rem;
            margin-bottom: 3rem;
        }

        .logo-icon {
            width: 40px;
            height: 40px;
            background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 900;
            font-size: 1.25rem;
            box-shadow: 0 0 20px var(--glow-cyan);
        }

        .logo-text {
            font-size: 1.25rem;
            font-weight: 700;
            letter-spacing: -0.02em;
        }

        .nav-section {
            margin-bottom: 2rem;
        }

        .nav-label {
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-muted);
            padding: 0 2rem;
            margin-bottom: 0.5rem;
        }

        .nav-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.875rem 2rem;
            color: var(--text-secondary);
            text-decoration: none;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            font-weight: 500;
        }

        .nav-item::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            width: 3px;
            height: 100%;
            background: linear-gradient(180deg, var(--accent-cyan), var(--accent-purple));
            opacity: 0;
            transition: opacity 0.3s;
        }

        .nav-item:hover {
            color: var(--text-primary);
            background: rgba(255, 255, 255, 0.03);
        }

        .nav-item.active {
            color: var(--text-primary);
            background: rgba(0, 217, 255, 0.1);
        }

        .nav-item.active::before {
            opacity: 1;
        }

        .nav-icon {
            width: 20px;
            height: 20px;
            opacity: 0.7;
        }

        /* Main Content */
        .main-content {
            padding: 2rem 3rem;
            max-width: 1800px;
            grid-column: 2;
            width: 100%;
            min-height: 0;
            /* Fix for grid item scrolling */
        }

        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 3rem;
        }

        .header-title {
            font-size: 2.5rem;
            font-weight: 900;
            letter-spacing: -0.03em;
            background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .header-subtitle {
            color: var(--text-secondary);
            margin-top: 0.25rem;
            font-size: 0.95rem;
        }

        .header-actions {
            display: flex;
            gap: 1.5rem;
            align-items: center;
        }

        .toggle-group {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
            padding: 4px;
            display: flex;
            gap: 4px;
        }

        .toggle-btn {
            background: transparent;
            border: none;
            color: var(--text-muted);
            padding: 6px 12px;
            border-radius: 6px;
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
        }

        .toggle-btn:hover {
            color: var(--text-primary);
            background: rgba(255, 255, 255, 0.05);
        }

        .toggle-btn.active {
            background: var(--surface-light);
            color: var(--accent-cyan);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .theme-toggle {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--border-subtle);
            border-radius: 50%;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: var(--text-secondary);
            transition: all 0.3s;
            position: relative;
            overflow: hidden;
        }

        .theme-toggle:hover {
            background: var(--surface-light);
            color: var(--accent-orange);
            transform: rotate(15deg);
        }

        .theme-toggle svg {
            position: absolute;
            transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* Icon Logic for Light Theme (Default) */
        .theme-toggle .sun-icon {
            opacity: 1;
            transform: rotate(0) scale(1);
        }

        .theme-toggle .moon-icon {
            opacity: 0;
            transform: rotate(-90deg) scale(0.5);
        }

        /* Icon Logic for Dark Theme */
        body.dark-mode .theme-toggle .sun-icon {
            opacity: 0;
            transform: rotate(90deg) scale(0.5);
        }

        body.dark-mode .theme-toggle .moon-icon {
            opacity: 1;
            transform: rotate(0) scale(1);
        }

        body.dark-mode .theme-toggle:hover {
            color: var(--accent-purple);
        }

        .search-box {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            padding: 0.75rem 1.25rem;
            display: flex;
            align-items: center;
            gap: 0.75rem;
            width: 300px;
            transition: all 0.3s;
        }

        .search-box:focus-within {
            border-color: var(--accent-cyan);
            box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.1);
        }

        .search-box input {
            background: none;
            border: none;
            outline: none;
            color: var(--text-primary);
            width: 100%;
            font-family: 'Archivo', sans-serif;
        }

        .user-avatar {
            width: 42px;
            height: 42px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            cursor: pointer;
            transition: transform 0.3s;
            box-shadow: 0 0 20px var(--glow-purple);
        }

        .user-avatar:hover {
            transform: scale(1.1);
        }

        /* Stats Grid */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 1.5rem;
            margin-bottom: 2.5rem;
            animation: slideUp 0.6s ease-out;
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

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

        .stat-card {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 16px;
            padding: 1.75rem;
            position: relative;
            overflow: hidden;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .stat-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 2px;
            background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
            opacity: 0;
            transition: opacity 0.4s;
        }

        .stat-card:hover {
            transform: translateY(-4px);
            border-color: var(--accent-color);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 40px var(--accent-glow);
        }

        .stat-card:hover::before {
            opacity: 1;
        }

        .stat-card:nth-child(1) {
            --accent-color: var(--accent-green);
            --accent-glow: rgba(16, 185, 129, 0.2);
            animation-delay: 0.1s;
        }

        .stat-card:nth-child(2) {
            --accent-color: var(--accent-cyan);
            --accent-glow: rgba(0, 217, 255, 0.2);
            animation-delay: 0.2s;
        }

        .stat-card:nth-child(3) {
            --accent-color: var(--accent-purple);
            --accent-glow: rgba(168, 85, 247, 0.2);
            animation-delay: 0.3s;
        }

        .stat-card:nth-child(4) {
            --accent-color: var(--accent-orange);
            --accent-glow: rgba(245, 158, 11, 0.2);
            animation-delay: 0.4s;
        }

        .stat-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 1rem;
        }

        .stat-label {
            font-size: 0.875rem;
            color: var(--text-secondary);
            font-weight: 500;
        }

        .stat-icon {
            width: 36px;
            height: 36px;
            border-radius: 10px;
            background: var(--accent-color);
            opacity: 0.2;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .stat-value {
            font-size: 2.25rem;
            font-weight: 900;
            letter-spacing: -0.02em;
            margin-bottom: 0.5rem;
            color: var(--text-primary);
        }

        .stat-change {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.85rem;
        }

        .stat-change.positive {
            color: var(--accent-green);
        }

        .stat-change.negative {
            color: var(--accent-pink);
        }

        .stat-change-value {
            font-weight: 600;
        }

        .stat-change-label {
            color: var(--text-muted);
        }

        /* Chart Sections */
        .chart-row {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 1.5rem;
            margin-bottom: 1.5rem;
            align-items: start;
        }

        .chart-card {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 16px;
            padding: 1.5rem;
            animation: slideUp 0.8s ease-out;
        }

        .chart-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }

        .chart-title {
            font-size: 1.25rem;
            font-weight: 700;
            letter-spacing: -0.02em;
        }

        .chart-selector {
            display: flex;
            gap: 0.5rem;
            background: var(--bg-secondary);
            border-radius: 10px;
            padding: 4px;
        }

        .chart-selector button {
            background: none;
            border: none;
            color: var(--text-secondary);
            padding: 0.5rem 1rem;
            border-radius: 8px;
            font-family: 'Archivo', sans-serif;
            font-weight: 500;
            font-size: 0.875rem;
            cursor: pointer;
            transition: all 0.3s;
        }

        .chart-selector button.active {
            background: var(--accent-cyan);
            color: var(--bg-primary);
        }

        .chart-container {
            position: relative;
            height: 170px;
        }

        /* Area Chart SVG */
        .area-chart {
            width: 100%;
            height: 100%;
        }

        .chart-area {
            fill: url(#areaGradient);
            opacity: 0;
            animation: fillChart 1.5s ease-out forwards;
            animation-delay: 0.3s;
        }

        .chart-line {
            fill: none;
            stroke: var(--accent-cyan);
            stroke-width: 3;
            stroke-linecap: round;
            stroke-linejoin: round;
            filter: drop-shadow(0 0 8px var(--glow-cyan));
            stroke-dasharray: 1000;
            stroke-dashoffset: 1000;
            animation: drawLine 2s ease-out forwards;
        }

        @keyframes drawLine {
            to {
                stroke-dashoffset: 0;
            }
        }

        @keyframes fillChart {
            to {
                opacity: 1;
            }
        }

        .chart-grid line {
            stroke: var(--border-subtle);
            stroke-width: 1;
        }

        .chart-axis text {
            fill: var(--text-muted);
            font-size: 11px;
            font-family: 'JetBrains Mono', monospace;
        }

        .chart-tooltip {
            position: absolute;
            background: var(--bg-primary);
            border: 1px solid var(--accent-cyan);
            border-radius: 8px;
            padding: 0.75rem 1rem;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.875rem;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.2s;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 20px var(--glow-cyan);
        }

        /* Product List */
        .product-list {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        .product-item {
            display: grid;
            grid-template-columns: 60px 1fr auto;
            gap: 1rem;
            padding: 1rem;
            background: var(--bg-secondary);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            align-items: center;
            transition: all 0.3s;
            cursor: pointer;
        }

        .product-item:hover {
            background: var(--bg-tertiary);
            border-color: var(--accent-cyan);
            transform: translateX(4px);
        }

        .product-image {
            width: 60px;
            height: 60px;
            border-radius: 10px;
            background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
        }

        .product-info h4 {
            font-weight: 600;
            margin-bottom: 0.25rem;
            font-size: 0.95rem;
        }

        .product-units {
            font-size: 0.85rem;
            color: var(--text-muted);
            font-family: 'JetBrains Mono', monospace;
        }

        .product-price {
            font-size: 1.25rem;
            font-weight: 700;
            font-family: 'JetBrains Mono', monospace;
        }

        /* Bar Chart */
        .bar-chart {
            display: flex;
            gap: 1.5rem;
            align-items: flex-end;
            height: 200px;
            margin-top: 2rem;
        }

        .bar-group {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.75rem;
        }

        .bar {
            width: 100%;
            background: linear-gradient(180deg, var(--accent-color), var(--accent-color-dark));
            border-radius: 8px 8px 0 0;
            position: relative;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 0 20px var(--accent-glow);
            animation: barGrow 1s ease-out forwards;
            transform-origin: bottom;
        }

        @keyframes barGrow {
            from {
                transform: scaleY(0);
                opacity: 0;
            }

            to {
                transform: scaleY(1);
                opacity: 1;
            }
        }

        .bar:hover {
            transform: scaleY(1.05);
            filter: brightness(1.2);
        }

        .bar-value {
            position: absolute;
            top: -2rem;
            left: 50%;
            transform: translateX(-50%);
            font-weight: 700;
            font-size: 0.875rem;
            font-family: 'JetBrains Mono', monospace;
            color: var(--text-primary);
            opacity: 0;
            transition: opacity 0.3s;
        }

        .bar:hover .bar-value {
            opacity: 1;
        }

        .bar-label {
            font-size: 0.75rem;
            color: var(--text-muted);
            font-weight: 600;
            text-transform: uppercase;
        }

        /* Category Chart */
        .category-list {
            display: flex;
            flex-direction: column;
            gap: 1.25rem;
        }

        .category-item {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .category-bar-container {
            flex: 1;
            height: 48px;
            background: var(--bg-secondary);
            border-radius: 12px;
            position: relative;
            overflow: hidden;
        }

        .category-bar-fill {
            height: 100%;
            background: var(--accent-color);
            border-radius: 12px;
            position: relative;
            transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: inset 0 0 20px var(--accent-glow);
            animation: slideRight 1.2s ease-out;
        }

        @keyframes slideRight {
            from {
                width: 0 !important;
            }

            to {
                width: var(--target-width);
            }
        }

        .category-bar-fill::after {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            width: 40px;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2));
            animation: shimmer 2s infinite;
        }

        @keyframes shimmer {
            0% {
                transform: translateX(-100%);
            }

            100% {
                transform: translateX(100%);
            }
        }

        .category-percent {
            position: absolute;
            left: 1rem;
            top: 50%;
            transform: translateY(-50%);
            font-weight: 700;
            font-size: 1.1rem;
            font-family: 'JetBrains Mono', monospace;
            color: var(--bg-primary);
            mix-blend-mode: difference;
        }

        .category-label {
            min-width: 140px;
            text-align: right;
            font-size: 0.9rem;
            color: var(--text-secondary);
            font-weight: 500;
        }

        /* Bottom Row */
        .bottom-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.5rem;
        }

        /* Responsive */
        @media (max-width: 1400px) {
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .chart-row {
                grid-template-columns: 1fr;
            }

            .bottom-row {
                grid-template-columns: 1fr;
            }
        }

        /* Transaction Viewer Styles */
        .transaction-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 1rem;
        }

        .transaction-table th,
        .transaction-table td {
            padding: 1rem;
            text-align: left;
            border-bottom: 1px solid var(--border-subtle);
        }

        .transaction-table th {
            font-weight: 600;
            color: var(--text-muted);
            font-size: 0.85rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .transaction-table td {
            font-size: 0.95rem;
            color: var(--text-primary);
        }

        .transaction-table tr:hover {
            background: rgba(255, 255, 255, 0.02);
        }

        .view-btn {
            background: rgba(0, 217, 255, 0.1);
            color: var(--accent-cyan);
            border: 1px solid rgba(0, 217, 255, 0.2);
            padding: 0.4rem 0.8rem;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.8rem;
            font-weight: 500;
            transition: all 0.2s;
        }

        .view-btn:hover {
            background: var(--accent-cyan);
            color: var(--bg-primary);
        }

        .item-table {
            width: 100%;
            width: 100%;
            border-collapse: collapse;
            margin: 1rem 0;
            font-size: 0.9rem;
        }

        .item-table th {
            text-align: left;
            padding: 0.5rem;
            border-bottom: 1px solid var(--border-subtle);
            color: var(--text-muted);
        }

        .item-table td {
            padding: 0.5rem;
            border-bottom: 1px solid var(--border-subtle);
        }

        .item-table tfoot td {
            border-top: 2px solid var(--border-subtle);
            border-bottom: none;
            padding-top: 1rem;
            font-size: 1rem;
        }

        /* Sub-menu Styles */
        .sub-menu {
            padding-left: 3.5rem;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            margin-top: 0.5rem;
        }

        .sub-nav-item {
            color: var(--text-muted);
            text-decoration: none;
            font-size: 0.85rem;
            transition: color 0.2s;
        }

        .sub-nav-item:hover {
            color: var(--accent-cyan);
        }

        /* Table Styles */
        .table-container {
            overflow-x: auto;
        }

        .data-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.95rem;
        }

        .data-table th,
        .data-table td {
            padding: 1rem;
            text-align: left;
            border-bottom: 1px solid var(--border-subtle);
        }

        .data-table th {
            color: var(--text-secondary);
            font-weight: 600;
            font-size: 0.85rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .data-table tr:hover td {
            background: rgba(255, 255, 255, 0.02);
        }

        .status-badge {
            padding: 0.25rem 0.75rem;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
            display: inline-block;
        }

        .status-badge.success {
            background: rgba(16, 185, 129, 0.1);
            color: var(--accent-green);
            border: 1px solid rgba(16, 185, 129, 0.2);
        }

        .status-badge.warning {
            background: rgba(245, 158, 11, 0.1);
            color: var(--accent-orange);
            border: 1px solid rgba(245, 158, 11, 0.2);
        }

        /* Modal Styles */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(10, 14, 20, 0.8);
            backdrop-filter: blur(8px);
            z-index: 1000;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            animation: fadeIn 0.3s forwards;
        }

        @keyframes fadeIn {
            to {
                opacity: 1;
            }
        }

        .modal-content {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 16px;
            padding: 2.5rem;
            width: 100%;
            max-width: 450px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
            transform: translateY(20px);
            animation: slideUpModal 0.3s forwards;
        }

        @keyframes slideUpModal {
            to {
                transform: translateY(0);
            }
        }

        .modal-title {
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
            color: var(--text-primary);
        }

        .modal-subtitle {
            color: var(--text-secondary);
            margin-bottom: 2rem;
            font-size: 0.95rem;
        }

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

        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            color: var(--text-secondary);
            font-size: 0.9rem;
            font-weight: 500;
        }

        .form-group input {
            width: 100%;
            background: var(--bg-secondary);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            padding: 0.75rem 1rem;
            color: var(--text-primary);
            font-family: inherit;
            transition: all 0.3s;
        }

        .form-group input:focus {
            outline: none;
            border-color: var(--accent-cyan);
            box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.1);
        }

        .modal-actions {
            display: flex;
            gap: 1rem;
            margin-top: 2rem;
        }

        .btn-cancel,
        .btn-submit {
            flex: 1;
            padding: 0.875rem;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            font-family: inherit;
        }

        .btn-cancel {
            background: transparent;
            border: 1px solid var(--border-subtle);
            color: var(--text-secondary);
        }

        .btn-cancel:hover {
            border-color: var(--text-secondary);
            color: var(--text-primary);
        }

        .btn-submit {
            background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
            border: none;
            color: white;
            box-shadow: 0 4px 12px rgba(0, 217, 255, 0.3);
        }

        /* Receipt Modal Styles */
        .receipt-header {
            border-bottom: 1px dashed var(--border-subtle);
            padding-bottom: 1rem;
            margin-bottom: 1rem;
        }

        .receipt-body {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.85rem;
            color: var(--text-secondary);
            margin-bottom: 1.5rem;
        }

        .receipt-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.5rem;
        }

        .receipt-row.total {
            font-weight: 700;
            color: var(--text-primary);
            border-top: 1px dashed var(--border-subtle);
            padding-top: 0.75rem;
            font-size: 1rem;
            margin-top: 0.5rem;
        }

        .receipt-footer {
            text-align: center;
        }

        .section-title {
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 1rem;
            color: var(--text-primary);
        }

        /* Receipt Paper Specific Styles */
        .receipt-paper {
            background: #1e2731;
            /* Use --bg-card or similar dark */
            color: #e4e9f0;
            /* --text-primary */
            font-family: 'JetBrains Mono', monospace;
            border-radius: 0;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
            position: relative;
            border: 1px solid rgba(255, 255, 255, 0.08);
            /* slight border for definition */
            max-width: 380px;
            width: 100%;
            margin: 2rem;
        }

        /* Zigzag bottom edge */
        .receipt-paper::after {
            content: "";
            position: absolute;
            left: 0;
            bottom: -12px;
            width: 100%;
            height: 12px;
            background:
                linear-gradient(135deg, transparent 50%, #1e2731 50%),
                linear-gradient(45deg, #1e2731 50%, transparent 50%);
            background-size: 20px 20px;
            background-repeat: repeat-x;
            background-position: left bottom;
            filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.3));
        }

        .receipt-paper .receipt-header {
            text-align: center;
            padding: 2rem 1.5rem 1rem;
            border-bottom: 2px dashed rgba(255, 255, 255, 0.1);
            margin-bottom: 1.5rem;
        }

        .receipt-paper h2 {
            font-size: 1.5rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            margin-bottom: 0.5rem;
            color: #e4e9f0;
        }

        .receipt-paper .receipt-meta {
            font-size: 0.75rem;
            color: #9ca3af;
            /* --text-secondary */
            line-height: 1.4;
            margin-top: 0.5rem;
        }

        .receipt-paper .receipt-body {
            padding: 0 1.5rem;
            margin-bottom: 1.5rem;
            max-height: 50vh;
            overflow-y: auto;
            scrollbar-width: thin;
            scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
        }

        .receipt-item-row {
            display: grid;
            grid-template-columns: 45px 1fr auto;
            margin-bottom: 0.5rem;
            font-size: 0.85rem;
            align-items: start;
            color: #d1d5db;
            column-gap: 0.5rem;
        }

        .receipt-item-qty {
            font-weight: 600;
            color: #00d9ff;
            text-align: right;
        }

        .receipt-item-desc {
            padding-right: 1rem;
            text-transform: uppercase;
        }

        .receipt-dept-header {
            text-align: center;
            font-size: 0.75rem;
            font-weight: bold;
            color: #9ca3af;
            margin: 1rem 0 0.5rem;
            text-transform: uppercase;
            border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
            padding-bottom: 0.25rem;
        }

        .receipt-item-price {
            font-weight: 600;
            text-align: right;
            color: #e4e9f0;
        }

        .receipt-paper .receipt-footer {
            padding: 1rem 1.5rem 2rem;
            border-top: 2px dashed rgba(255, 255, 255, 0.1);
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .receipt-footer-row {
            display: flex;
            justify-content: space-between;
            font-size: 0.9rem;
            color: #9ca3af;
        }

        .receipt-footer-row.total {
            font-size: 1.5rem;
            font-weight: 800;
            margin-top: 0.5rem;
            text-transform: uppercase;
            color: #00d9ff;
            /* --accent-cyan for total */
        }

        .receipt-barcode {
            margin-top: 1.5rem;
            height: 40px;
            background: repeating-linear-gradient(90deg,
                    #fff,
                    #fff 2px,
                    transparent 2px,
                    transparent 4px);
            width: 80%;
            margin-left: auto;
            margin-right: auto;
            opacity: 0.5;
        }

        .receipt-paper .close-btn {
            position: absolute;
            top: -15px;
            right: -15px;
            background: #ff4444;
            color: white;
            border: none;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            font-weight: bold;
            cursor: pointer;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
            z-index: 10;
        }

        /* --- Report View Layout --- */
        .reports-layout {
            display: grid;
            grid-template-columns: 240px 1fr;
            gap: 2rem;
            align-items: start;
        }

        .reports-sidebar {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            padding: 1.5rem;
            height: calc(100vh - 120px);
            position: sticky;
            top: 20px;
            overflow-y: auto;
        }

        .sidebar-group-title {
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--text-muted);
            margin-bottom: 0.75rem;
            margin-top: 1.5rem;
            font-weight: 600;
        }

        .sidebar-group-title:first-child {
            margin-top: 0;
        }

        .report-nav-btn {
            display: block;
            width: 100%;
            text-align: left;
            background: transparent;
            border: none;
            padding: 0.75rem 1rem;
            border-radius: 8px;
            color: var(--text-secondary);
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.2s;
            margin-bottom: 0.25rem;
        }

        .report-nav-btn:hover {
            background: rgba(255, 255, 255, 0.03);
            color: var(--text-primary);
        }

        .report-nav-btn.active {
            background: var(--surface-light);
            color: var(--accent-cyan);
            font-weight: 500;
        }

        /* Responsive sidebar */
        @media (max-width: 1024px) {
            .reports-layout {
                grid-template-columns: 1fr;
            }

            .reports-sidebar {
                height: auto;
                position: static;
                display: flex;
                gap: 1rem;
                overflow-x: auto;
                padding: 1rem;
                white-space: nowrap;
            }

            .sidebar-group-title {
                display: none;
                /* Hide grouping titles on mobile/tablet horizontal scroll for simplicity */
            }

            .report-nav-btn {
                width: auto;
                display: inline-block;
                margin-bottom: 0;
            }
        }

        /* --- Clean Modal Design (Transaction Viewer) --- */
        /* --- Clean Modal Design (Transaction Viewer) --- */
        #transactions-view {
            display: none;
            /* Will be set to block by JS */
        }

        #transaction-list-container {
            min-height: 400px;
            overflow-x: auto;
        }

        .modal-clean {
            display: none;
            position: fixed;
            z-index: 2000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(4px);
            align-items: center;
            justify-content: center;
        }

        .modal-clean .modal-content {
            background: var(--bg-card);
            border-radius: 16px;
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
            width: 100%;
            max-width: 500px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            max-height: 90vh;
            animation: modalSlideUp 0.3s ease-out;
            border: 1px solid var(--border-subtle);
        }

        .modal-header-clean {
            padding: 1.5rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid var(--border-subtle);
        }

        .modal-header-clean h2 {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--text-primary);
            margin: 0;
        }

        .modal-close-btn {
            background: none;
            border: none;
            cursor: pointer;
            color: var(--text-muted);
            padding: 0.5rem;
            border-radius: 50%;
            transition: background 0.2s;
        }

        .modal-close-btn:hover {
            background: var(--bg-hover);
            color: var(--text-primary);
        }

        .transaction-summary {
            padding: 2rem 1.5rem;
            text-align: center;
            background: var(--bg-subtle);
            border-bottom: 1px solid var(--border-subtle);
        }

        .transaction-amount-large {
            font-size: 2.5rem;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 0.5rem;
            font-family: 'JetBrains Mono', monospace;
            letter-spacing: -0.05em;
        }

        .transaction-status-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.375rem 0.75rem;
            border-radius: 9999px;
            background: rgba(16, 185, 129, 0.1);
            color: var(--accent-green);
            font-size: 0.875rem;
            font-weight: 500;
        }

        .detail-section {
            padding: 1.5rem;
        }

        .detail-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 1rem;
            font-size: 0.95rem;
        }

        .detail-label {
            color: var(--text-muted);
        }

        .detail-value {
            color: var(--text-primary);
            font-weight: 500;
            text-align: right;
        }

        .item-list-container {
            padding: 0 1.5rem 1.5rem;
            flex: 1;
            overflow-y: auto;
        }

        .item-list-header {
            font-size: 0.85rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--text-muted);
            margin-bottom: 1rem;
            font-weight: 600;
        }

        .clean-item-row {
            display: flex;
            justify-content: space-between;
            padding: 0.75rem 0;
            border-bottom: 1px solid var(--border-subtle);
        }

        .clean-item-row:last-child {
            border-bottom: none;
        }

        .clean-item-info {
            display: flex;
            gap: 0.75rem;
        }

        .clean-item-qty {
            color: var(--text-muted);
            font-weight: 500;
            min-width: 1.5rem;
        }

        .clean-item-desc {
            color: var(--text-primary);
            font-weight: 500;
        }

        .clean-item-price {
            font-family: 'JetBrains Mono', monospace;
            color: var(--text-primary);
        }

        .modal-footer-clean {
            padding: 1.5rem;
            border-top: 1px solid var(--border-subtle);
            display: flex;
            gap: 1rem;
        }

        .btn-secondary {
            flex: 1;
            padding: 0.75rem;
            border-radius: 8px;
            border: 1px solid var(--border-subtle);
            background: transparent;
            color: var(--text-primary);
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 0.5rem;
        }

        .btn-secondary:hover {
            background: var(--bg-hover);
            border-color: var(--text-muted);
        }

        .btn-primary-action {
            flex: 1;
            padding: 0.75rem;
            border-radius: 8px;
            background: var(--text-primary);
            color: var(--bg-card);
            font-weight: 600;
            border: none;
            cursor: pointer;
            transition: opacity 0.2s;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 0.5rem;
        }


        .btn-primary-action:hover {
            opacity: 0.9;
        }

        /* ─── Store Summary Report ─────────────────────────────────────────── */
        .store-summary-report {
            padding: 1.5rem 2rem 3rem;
            background: var(--bg-main);
        }

        .ssr-page {
            background: #fff;
            color: #000;
            font-family: Arial, Helvetica, sans-serif;
            font-size: 11px;
            max-width: 800px;
            margin: 0 auto;
            padding: 1.5rem 2rem;
            border: 1px solid #ddd;
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
        }

        /* Header */
        .ssr-header {
            margin-bottom: 1rem;
        }

        .ssr-title {
            font-size: 16px;
            font-weight: bold;
        }

        .ssr-store-name {
            font-size: 12px;
        }

        .ssr-branch-row {
            font-size: 11px;
            display: flex;
            justify-content: space-between;
            border-bottom: 1px solid #000;
            padding-bottom: 2px;
            margin-bottom: 6px;
        }

        .ssr-subheader {
            margin: 6px 0 12px;
            line-height: 1.8;
        }

        .ssr-subheader div:nth-child(2),
        .ssr-subheader div:nth-child(3) {
            font-weight: bold;
        }

        /* Two-col layout */
        .ssr-two-col {
            display: grid;
            grid-template-columns: 55% 45%;
            gap: 1.5rem;
            align-items: start;
            margin-bottom: 1.5rem;
        }

        /* Tables */
        .ssr-table {
            width: 100%;
            border-collapse: collapse;
        }

        .ssr-table td,
        .ssr-table th {
            padding: 2px 4px;
            vertical-align: top;
        }

        .ssr-section-head {
            font-weight: bold;
            font-size: 11px;
            padding-top: 8px;
            padding-bottom: 4px;
            border-bottom: 1px solid #000;
        }

        .ssr-subsection-head {
            font-weight: bold;
            border-bottom: 1px solid #000;
            padding-top: 6px;
        }

        .ssr-col-head {
            font-size: 10px;
            text-align: right;
            text-decoration: underline;
            font-weight: normal;
        }

        .ss-label {
            text-align: left;
            white-space: nowrap;
        }

        .ss-num {
            text-align: right;
            white-space: nowrap;
            min-width: 72px;
        }

        .ss-underline {
            border-top: 1px solid #000;
            border-bottom: 1px solid #000;
        }

        .ssr-total-row td {
            font-weight: bold;
        }

        .ssr-spacer {
            height: 10px;
        }

        /* Full-width tender table */
        .ssr-full-width {
            width: 100%;
        }

        .ssr-media-table th {
            text-align: right;
            font-weight: normal;
            text-decoration: underline;
            font-size: 10px;
        }

        .ssr-media-table th:first-child {
            text-align: left;
        }

        .ssr-media-table td {
            padding: 2px 4px;
        }

        .ssr-media-label {
            text-align: left;
            white-space: nowrap;
        }

        .ssr-media-table tbody tr:last-child td {
            border-top: 1px solid #000;
            border-bottom: 1px solid #000;
            font-weight: bold;
        }

        /* ─── Print mode ───────────────────────────────────────────────────── */
        @media print {

            .sidebar,
            .header,
            #ss-date-picker,
            button,
            .nav-section,
            .logo {
                display: none !important;
            }

            .main-content {
                margin-left: 0 !important;
                padding: 0 !important;
            }

            .store-summary-report {
                padding: 0 !important;
                background: #fff !important;
            }

            .ssr-page {
                border: none !important;
                box-shadow: none !important;
                max-width: 100% !important;
                padding: 0.5rem !important;
            }

            body {
                background: #fff !important;
            }

            * {
                color: #000 !important;
            }
        }

        /* ─── Store Promotions Table ──────────────────────────────────────── */
        .spr-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 1.5rem;
        }

        .spr-table thead tr.spr-header-row th {
            font-weight: bold;
            font-size: 11px;
            text-align: left;
            padding: 4px 6px;
            border-bottom: 2px solid #000;
        }

        .spr-table th.spr-num,
        .spr-table td.spr-num {
            text-align: right;
        }

        .spr-table tbody tr td {
            padding: 3px 6px;
            font-size: 11px;
            border-bottom: 1px solid #eee;
        }

        .spr-table tfoot tr.spr-total-row td {
            padding: 5px 6px;
            font-size: 11px;
            border-top: 2px solid #000;
            border-bottom: 2px solid #000;
        }

        .spr-id {
            text-align: right;
            white-space: nowrap;
            width: 80px;
        }

        .spr-desc {
            text-align: left;
        }

        .spr-num {
            text-align: right;
            white-space: nowrap;
            min-width: 80px;
        }

        .spr-dept {
            text-align: left;
            white-space: nowrap;
        }