:root {
    --bg-color: #0f0f13;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --neon-blue: #00f3ff;
    --neon-purple: #9d00ff;
    --neon-pink: #ff00ea;
    --neon-green: #00ff66;
    --neon-red: #ff003c;
    --neon-yellow: #fcee0a;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --panel-gap: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.hidden {
    display: none !important;
}

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(0, 243, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(157, 0, 255, 0.08) 0%, transparent 50%);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

.pos-container {
    display: flex;
    height: 100vh;
    padding: var(--panel-gap);
    gap: var(--panel-gap);
}

.pos-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--panel-gap);
    overflow: hidden;
}

.pos-left-body {
    display: flex;
    gap: var(--panel-gap);
    flex: 1;
    min-height: 0;
}

.action-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 150px;
}

.btn-action {
    padding: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-action:hover {
    background: rgba(0, 243, 255, 0.15);
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.btn-color-teal { background: rgba(20, 184, 166, 0.2); border-color: rgba(20, 184, 166, 0.5); color: #5eead4; }
.btn-color-teal:hover { background: rgba(20, 184, 166, 0.3); }

.btn-color-blue { background: rgba(59, 130, 246, 0.2); border-color: rgba(59, 130, 246, 0.5); color: #93c5fd; }
.btn-color-blue:hover { background: rgba(59, 130, 246, 0.3); }

.btn-color-orange { background: rgba(249, 115, 22, 0.2); border-color: rgba(249, 115, 22, 0.5); color: #fdba74; }
.btn-color-orange:hover { background: rgba(249, 115, 22, 0.3); }

.btn-color-purple { background: rgba(168, 85, 247, 0.2); border-color: rgba(168, 85, 247, 0.5); color: #d8b4fe; }
.btn-color-purple:hover { background: rgba(168, 85, 247, 0.3); }

.btn-color-green { background: rgba(34, 197, 94, 0.2); border-color: rgba(34, 197, 94, 0.5); color: #86efac; }
.btn-color-green:hover { background: rgba(34, 197, 94, 0.3); }

.btn-color-pink { background: rgba(236, 72, 153, 0.2); border-color: rgba(236, 72, 153, 0.5); color: #f9a8d4; }
.btn-color-pink:hover { background: rgba(236, 72, 153, 0.3); }

.btn-action.active-mode {
    background: var(--neon-blue);
    color: black;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.5);
}

.products-area {
    display: flex;
    flex-direction: column;
    gap: var(--panel-gap);
    flex: 1;
    min-height: 0;
    overflow: hidden;
}


.header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    background: rgba(0,0,0,0.3);
    padding: 8px 15px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}

.btn-small {
    padding: 6px 12px;
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-small:hover {
    background: rgba(255,255,255,0.2);
}

.datetime {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.sync-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    margin-top: 4px;
    transition: all 0.3s ease;
}

.sync-status.online {
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.sync-status.offline {
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.sync-status.syncing {
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.sync-icon {
    font-size: 1rem;
}

.clock {
    font-family: monospace;
    font-size: 1.5rem;
    color: var(--neon-blue);
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.4);
}

.date-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.neon-text {
    color: var(--neon-blue);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.warning-text {
    color: var(--neon-red);
    text-shadow: 0 0 10px rgba(255, 0, 60, 0.5);
}

.categories-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 140px;
    overflow-y: auto;
    padding-right: 5px;
}

.categories-sidebar::-webkit-scrollbar { width: 6px; }
.categories-sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 10px; }

.btn-category {
    padding: 12px 15px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    word-break: break-word;
}

.btn-category:hover, .btn-category.active {
    background: rgba(0, 243, 255, 0.15);
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.products-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    grid-auto-rows: 140px;
    align-content: start;
    gap: 10px;
    overflow-y: auto;
    padding-right: 5px;
}

.products-grid::-webkit-scrollbar, .cart-items::-webkit-scrollbar {
    width: 6px;
}
.products-grid::-webkit-scrollbar-thumb, .cart-items::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.product-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    height: 100%;
    overflow: hidden;
    position: relative;
    overflow: hidden;
}

.product-card:active {
    transform: scale(0.95);
}

.product-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.product-icon {
    font-size: 2.5rem;
}

.product-name {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
}

.product-price {
    color: var(--neon-blue);
    font-weight: 700;
}

.age-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--neon-red);
    color: white;
    font-size: 0.6rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Right Side - Cart */
.pos-right {
    width: 400px;
    display: flex;
    flex-direction: column;
    gap: var(--panel-gap);
}

.cart-container {
    flex: 1;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-clear {
    background: transparent;
    border: 1px solid var(--neon-red);
    color: var(--neon-red);
    padding: 5px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-clear:hover {
    background: rgba(255, 0, 60, 0.2);
    color: white;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 12px;
    animation: slideIn 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.cart-item.selected {
    border-color: var(--neon-blue);
    background: rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.item-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-name {
    font-weight: 500;
}

.item-price {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:active {
    background: rgba(255, 255, 255, 0.2);
}

.cart-summary {
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--glass-border);
}

.report-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
    font-size: 0.95rem;
    gap: 10px;
}
.report-row span:first-child {
    flex: 1;
    word-break: break-word;
}
.report-row span:last-child {
    white-space: nowrap;
    text-align: right;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.summary-row.total {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed rgba(255, 255, 255, 0.2);
}

.search-container input {
    width: 100%;
    padding: 15px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    color: white;
    font-size: 1.1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.search-container input:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.pos-input[type="file"] {
    cursor: pointer;
}

.pos-input[type="file"]::-webkit-file-upload-button {
    background: var(--neon-blue);
    border: none;
    border-radius: 6px;
    padding: 5px 10px;
    margin-right: 10px;
    cursor: pointer;
    font-weight: bold;
    color: black;
}

.sound-upload-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.settings-section h3 {
    margin-bottom: 15px;
    color: var(--neon-blue);
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.checkout-actions {
    display: flex;
    gap: 15px;
}

/* Numpad Styles */
.numpad-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.numpad-container.above-modal {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 360px;
    z-index: 5001;
    background: rgba(15, 15, 19, 0.9);
    padding: 20px;
    border: 2px solid var(--neon-blue);
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(0, 243, 255, 0.4);
    backdrop-filter: blur(15px);
    animation: popUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popUp {
    from { transform: translateY(50px) scale(0.9); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.numpad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}

.btn-numpad {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 5px 0;
    cursor: pointer;
    transition: all 0.1s;
    user-select: none;
}

.btn-numpad:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.2);
}

.btn-numpad-clear {
    background: rgba(255, 0, 60, 0.2);
    color: var(--neon-red);
    border-color: rgba(255, 0, 60, 0.5);
}

.btn-checkout-numpad {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: white;
    font-size: 1.3rem;
    font-weight: bold;
    padding: 14px 0;
    cursor: pointer;
    transition: all 0.1s;
    user-select: none;
}

.btn-checkout-numpad:active {
    transform: scale(0.95);
    background: rgba(0, 243, 255, 0.2);
}

.btn-checkout {
    padding: 20px;
    border: none;
    border-radius: 16px;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-pay-card {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    box-shadow: 0 4px 15px rgba(42, 82, 152, 0.3);
}

.btn-pay-credit {
    background: linear-gradient(135deg, #8e2de2 0%, #4a00e0 100%);
    box-shadow: 0 4px 15px rgba(74, 0, 224, 0.3);
}

.btn-pay-cash {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 4px 15px rgba(56, 239, 125, 0.3);
}

.btn-checkout:active {
    transform: scale(0.95);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-grid .form-group {
    margin-bottom: 0;
}

.form-control {
    width: 100%;
    padding: 12px;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-size: 1.1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--neon-blue);
}

/* Modals */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s;
}

#checkout-modal.modal {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: none;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.glass-panel {
    background: rgba(20, 20, 25, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    transform: translateY(0);
    transition: transform 0.3s;
}

.modal.hidden .glass-panel {
    transform: translateY(20px);
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn-large {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    color: white;
    transition: all 0.2s;
}

.btn-danger {
    background: var(--neon-red);
}
.btn-success {
    background: var(--neon-green);
    color: black;
}
.btn-primary {
    background: var(--neon-blue);
    color: black;
    padding: 15px 25px;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
}

.checkout-total {
    font-size: 2rem;
    margin: 20px 0;
}

.quick-cash-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.btn-quick-cash {
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-quick-cash:hover {
    background: rgba(255, 255, 255, 0.2);
}

.custom-cash {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.custom-cash input {
    flex: 1;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-size: 1.2rem;
}

.change-display {
    background: rgba(0, 255, 102, 0.1);
    border: 1px solid rgba(0, 255, 102, 0.3);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
}

.change-amount {
    font-size: 3rem;
    font-weight: bold;
    color: var(--neon-green);
    text-shadow: 0 0 15px rgba(0, 255, 102, 0.5);
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    margin-top: 10px;
    text-decoration: underline;
}

/* Z-Report Modal Specifics */
.z-report-panel {
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.z-report-content {
    flex: 1;
    overflow-y: auto;
    text-align: left;
    background: rgba(0, 0, 0, 0.4);
    color: #e2e8f0;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    font-family: monospace;
    font-size: 1.1rem;
    border: 1px solid var(--glass-border);
}

.z-report-content h3 {
    text-align: center;
    border-bottom: 1px dashed black;
    padding-bottom: 10px;
    margin-bottom: 10px;
}



.report-row.bold {
    font-weight: bold;
    margin-top: 10px;
    border-top: 1px dashed #ccc;
    padding-top: 5px;
}

.report-table {
    width: 100%;
    margin-top: 15px;
    border-collapse: collapse;
}

.report-table th, .report-table td {
    text-align: left;
    padding: 5px;
    border-bottom: 1px dotted #ccc;
}
.report-table th:last-child, .report-table td:last-child {
    text-align: right;
}

.auto-print-toggle {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: var(--text-muted);
}
.auto-print-toggle input {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

/* Receipt Print Styling */
.hidden-screen {
    display: none;
}
.receipt-print {
    font-family: monospace;
    font-size: 14px;
    color: black;
    width: 100%;
    max-width: 300px; /* Standard receipt width */
    margin: 0 auto;
    text-align: left;
}
.receipt-print h2, .receipt-print h3 {
    text-align: center;
    margin: 5px 0;
}
.receipt-print .divider {
    border-top: 1px dashed black;
    margin: 10px 0;
}
.receipt-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
    font-size: 0.9rem;
    gap: 10px;
}
.receipt-item-details {
    flex: 1;
    word-break: break-word;
}
.receipt-item-price {
    white-space: nowrap;
    text-align: right;
}
.receipt-total {
    font-weight: bold;
    font-size: 16px;
}

/* Print Styles */
@media print {
    /* Hide everything by default */
    body * {
        visibility: hidden;
    }

    /* Standard receipt/report container */
    .print-active-receipt #printable-receipt,
    .print-active-receipt #printable-receipt * {
        visibility: visible !important;
    }
    .print-active-receipt #printable-receipt {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: white !important;
        color: black !important;
        z-index: 99999;
    }

    /* Age refusal slip */
    .print-active-refusal #age-refusal-slip,
    .print-active-refusal #age-refusal-slip * {
        visibility: visible !important;
    }
    .print-active-refusal #age-refusal-slip {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 20px;
        box-sizing: border-box;
    }

    /* Product label */
    .print-active-label #product-label-print,
    .print-active-label #product-label-print * {
        visibility: visible !important;
    }
    .print-active-label #product-label-print {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    /* Z-Report in Modal */
    .print-active-zreport #zreport-content,
    .print-active-zreport #zreport-content *,
    .print-active-zreport #till-contents-print-area,
    .print-active-zreport #till-contents-print-area * {
        visibility: visible !important;
    }
    .print-active-zreport #zreport-content,
    .print-active-zreport #till-contents-print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        display: block !important;
        background: white !important;
        color: black !important;
        padding: 0;
        margin: 0;
        border: none !important;
    }

    .no-print {
        display: none !important;
    }
}

/* Vertical Button Group */
.vertical-btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.tab-btn.active {
    color: var(--neon-blue);
    border-bottom: 3px solid var(--neon-blue);
}

.tab-content {
    display: none;
    text-align: left;
}

.tab-content.active {
    display: block;
}

/* Report Type Buttons */
.btn-report-type {
    padding: 16px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    line-height: 1.4;
}

.btn-report-type:hover {
    background: rgba(37, 99, 235, 0.25);
    border-color: #3b82f6;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.btn-report-type.active {
    background: rgba(37, 99, 235, 0.4);
    border-color: #60a5fa;
}

/* Date Range Buttons */
.btn-date-range {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-date-range:hover {
    background: rgba(124, 58, 237, 0.25);
    border-color: #7c3aed;
}

.btn-date-range.active {
    background: rgba(124, 58, 237, 0.4);
    border-color: #a78bfa;
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.3);
}

/* Report output table */
.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.report-table th {
    background: rgba(255,255,255,0.08);
    padding: 10px 14px;
    text-align: left;
    font-weight: 700;
    color: var(--neon-blue);
    border-bottom: 1px solid var(--glass-border);
}
.report-table td {
    padding: 9px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #e2e8f0;
}
.report-table tr:hover td {
    background: rgba(255,255,255,0.04);
}
.report-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.report-stat-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}
.report-stat-card .stat-label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; }
.report-stat-card .stat-value { font-size: 1.6rem; font-weight: 700; color: #4ade80; }

/* Clickable Barcode Link inside explorer */
.explorer-barcode-link {
    cursor: pointer;
    color: var(--neon-blue);
    text-decoration: underline;
    transition: all 0.2s ease-in-out;
}
.explorer-barcode-link:hover {
    color: #9d00ff !important;
    text-shadow: 0 0 8px rgba(157, 0, 255, 0.6);
}

/* ---- Manage Product Modal ---- */
.mp-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-muted);
    padding: 14px 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.mp-tab-btn:hover { color: white; }
.mp-tab-btn.active {
    color: var(--neon-blue);
    border-bottom-color: var(--neon-blue);
    background: rgba(0, 243, 255, 0.05);
}

.mp-tab-content { display: block; }
.mp-tab-content.hidden { display: none; }

.mp-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.mp-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.mp-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mp-field label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mp-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.15s;
}
.mp-radio-label:hover { background: rgba(0,243,255,0.1); border-color: var(--neon-blue); }
.mp-radio-label input { accent-color: var(--neon-blue); }

.mp-period-btn {
    padding: 8px 18px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}
.mp-period-btn:hover { color: white; border-color: rgba(255,255,255,0.3); }
.mp-period-btn.active {
    background: rgba(0,243,255,0.15);
    border-color: var(--neon-blue);
    color: var(--neon-blue);
}


/* ============================================================
   UGREEN NAS OS (ugOS) Inspired Backend UI
   ============================================================ */

#backend-modal {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
}

.ugos-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(0, 243, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(157, 0, 255, 0.15) 0%, transparent 50%);
    background-color: #0c0c10;
}

/* Desktop Grid */
.ugos-desktop {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ugos-desktop.blurred {
    filter: blur(10px) brightness(0.6);
    transform: scale(0.95);
}

.ugos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 40px;
    max-width: 1000px;
    width: 100%;
}

.ugos-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ugos-icon:hover {
    transform: translateY(-10px);
}

.ugos-icon:active {
    transform: scale(0.9);
}

.icon-inner {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.icon-inner::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.05), transparent);
}

.ugos-icon:hover .icon-inner {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--neon-blue);
    box-shadow: 0 15px 40px rgba(0, 243, 255, 0.2);
}

.icon-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    text-align: center;
    max-width: 120px;
    word-wrap: break-word;
}

/* App Window */
.ugos-window {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 92vw;
    height: 85vh;
    max-width: 1300px;
    background: rgba(20, 20, 25, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(30px);
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
    animation: windowOpen 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 10;
}

@keyframes windowOpen {
    from { opacity: 0; transform: translate(-50%, -45%) scale(0.95); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.window-header {
    padding: 15px 25px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: default;
}

.window-title-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

#ugos-window-icon {
    font-size: 1.2rem;
}

#ugos-window-title {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.window-btn-close {
    background: rgba(255, 0, 0, 0.15);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #ff4d4d;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 0.8rem;
}

.window-btn-close:hover {
    background: #ff4d4d;
    color: white;
}

.window-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

/* Taskbar */
.ugos-taskbar {
    height: 60px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 10px;
    z-index: 20;
}

.taskbar-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.05);
}

.taskbar-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.taskbar-icon {
    font-size: 1.4rem;
}

.taskbar-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 5px;
}

.btn-ugos-exit {
    padding: 8px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-ugos-exit:hover {
    background: #ef4444;
    color: white;
}

.taskbar-apps-container {
    display: flex;
    gap: 8px;
}

.taskbar-app-icon {
    width: 44px;
    height: 44px;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid var(--neon-blue);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
}

.taskbar-app-icon::after {
    content: "";
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--neon-blue);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--neon-blue);
}

/* Style Overrides for existing content */
.backend-tab-content h2 {
    margin-bottom: 25px;
    font-size: 1.8rem;
    color: var(--neon-blue);
    display: flex;
    align-items: center;
    gap: 15px;
}

.backend-tab-content h2::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(0, 243, 255, 0.3), transparent);
}

#history-list-body tr:hover {
    background: rgba(0, 243, 255, 0.05);
    cursor: pointer;
}

#detail-txn-items::-webkit-scrollbar {
    width: 6px;
}
#detail-txn-items::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

/* --- News Notice Scrolling Ticker --- */
.ticker-container {
    width: 100%;
    overflow: hidden;
    background: rgba(239, 68, 68, 0.1);
    border-bottom: 1px solid rgba(239, 68, 68, 0.25);
    padding: 6px 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}
.ticker-content {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 25s linear infinite;
    padding-left: 100%;
    color: #f87171;
    font-weight: bold;
    font-size: 0.95rem;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}
@keyframes marquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* --- Temperature Widget in POS Header --- */
.temp-widget {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}
.temp-label {
    display: none;
}
.temp-readouts {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.temp-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 0.82rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.temp-badge.chiller {
    background: rgba(0, 243, 255, 0.06);
    border-color: rgba(0, 243, 255, 0.2);
}
.temp-badge.freezer {
    background: rgba(168, 85, 247, 0.06);
    border-color: rgba(168, 85, 247, 0.2);
}
.temp-badge-icon {
    font-size: 0.9rem;
}
.temp-badge-name {
    color: var(--text-muted);
}
.temp-badge-val {
    font-family: monospace;
    font-size: 0.9rem;
    font-weight: bold;
}
.temp-badge.safe .temp-badge-val {
    color: #00ff66;
    text-shadow: 0 0 5px rgba(0, 255, 102, 0.4);
}
.temp-badge.warning {
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(251, 191, 36, 0.05);
}
.temp-badge.warning .temp-badge-val {
    color: #fbbf24;
    text-shadow: 0 0 5px rgba(251, 191, 36, 0.4);
}
.temp-badge.unsafe {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.1);
    animation: tempAlert 1.5s infinite alternate;
}
.temp-badge.unsafe .temp-badge-val {
    color: #ef4444;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}
@keyframes tempAlert {
    from { box-shadow: 0 0 4px rgba(239, 68, 68, 0.1); }
    to { box-shadow: 0 0 12px rgba(239, 68, 68, 0.4); border-color: rgba(239, 68, 68, 0.8); }
}

/* --- Transaction History Modal Styling Overrides (Fix white background) --- */
#history-modal .glass-panel {
    background: rgba(20, 20, 25, 0.98) !important;
    border: 1px solid rgba(0, 243, 255, 0.2) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 243, 255, 0.1) !important;
}
#history-modal .z-report-content {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}
#history-modal .report-table th {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--neon-blue) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}
#history-modal .report-table td {
    color: #e2e8f0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}
#history-modal h2 {
    color: var(--neon-blue) !important;
}
#history-modal .btn-danger {
    background: var(--neon-red) !important;
    color: white !important;
}
#history-modal .btn-primary {
    background: var(--neon-blue) !important;
    color: black !important;
}
#history-modal .btn-secondary {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border: 1px solid var(--glass-border) !important;
}
#history-modal table {
    width: 100%;
}

/* Modern Switch Toggle */
.switch-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    flex-shrink: 0;
}
.switch-toggle input {
    opacity: 0;
    width: 0; height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .3s;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: .3s;
    border-radius: 50%;
}
.switch-toggle input:checked + .slider {
    background-color: var(--neon-blue);
    border-color: rgba(0, 243, 255, 0.4);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}
.switch-toggle input:checked + .slider:before {
    transform: translateX(24px);
}

/* Windows Installer Wizard Modal */
.win-installer-card {
    background: #0d1117;
    border: 2px solid rgba(0, 243, 255, 0.3);
    border-radius: 8px;
    width: 95vw;
    max-width: 620px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 243, 255, 0.15);
    display: flex;
    flex-direction: column;
    font-family: 'Outfit', sans-serif;
    color: #e6edf3;
    overflow: hidden;
}
.win-installer-header {
    background: linear-gradient(90deg, #161b22, #0d1117);
    border-bottom: 1px solid rgba(0, 243, 255, 0.2);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}
.win-installer-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--neon-blue);
    display: flex;
    align-items: center;
}
.win-installer-close {
    cursor: pointer;
    color: #8b949e;
    font-size: 1rem;
    transition: color 0.2s;
}
.win-installer-close:hover {
    color: #ff7b72;
}
.win-installer-body {
    padding: 20px;
    display: flex;
    gap: 20px;
    background: #0d1117;
}
.win-installer-left {
    width: 200px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding-right: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.win-installer-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
}
.win-installer-step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #8b949e;
    transition: color 0.3s;
}
.win-installer-step.active {
    color: var(--neon-blue);
    font-weight: bold;
}
.win-installer-step.completed {
    color: #58a6ff;
}
.win-installer-step.completed .step-icon {
    color: #3fb950;
    text-shadow: 0 0 10px rgba(63, 185, 80, 0.5);
}
.win-installer-footer {
    background: #161b22;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 15px 20px;
    display: flex;
    align-items: center;
}
.win-installer-progress-container {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}
.win-installer-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
    border-radius: 5px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* User account management styling */
#tab-users table {
    width: 100%;
    border-collapse: collapse;
}
#tab-users th {
    padding: 12px;
    color: var(--neon-blue);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
}
#tab-users td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
#tab-users tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}


