* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #121212;
    color: #e0e0e0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    direction: ltr;
}

/* Header */
.top-bar {
    background-color: #1e1e1e;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2d2d2d;
}

.brand {
    font-size: 1.3rem;
    font-weight: bold;
    color: #2196F3;
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand span { color: #fff; }

.menu-drawer-btn {
    background: #2b2b2b;
    border: 1px solid #3d3d3d;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 4px;
    transition: 0.2s;
}
.menu-drawer-btn:hover {
    background-color: #2196F3;
    border-color: #2196F3;
}

.search-box {
    position: relative;
    width: 45%;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background-color: #2a2a2a;
    border: 1px solid #3d3d3d;
    border-radius: 6px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

.search-box input:focus {
    border-color: #2196F3;
    box-shadow: 0 0 8px rgba(33, 150, 243, 0.3);
}

.status-badge {
    background: #2a2a2a;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot.online { background-color: #4CAF50; box-shadow: 0 0 8px #4CAF50; }
.dot.offline { background-color: #f44336; box-shadow: 0 0 8px #f44336; }

/* Container Layout */
.pos-container {
    display: flex;
    flex: 1;
    height: calc(100vh - 65px);
}

.cart-section {
    flex: 7;
    display: flex;
    flex-direction: column;
    background-color: #181818;
    border-right: 1px solid #2d2d2d;
}

.table-wrapper {
    flex: 1;
    overflow-y: auto;
    position: relative;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    background-color: #222;
    padding: 14px;
    color: #aaa;
    font-size: 0.9rem;
    border-bottom: 1px solid #333;
}

td {
    padding: 14px;
    border-bottom: 1px solid #262626;
    font-size: 1rem;
}

.empty-msg {
    text-align: center;
    margin-top: 100px;
    color: #555;
}
.empty-msg i { font-size: 4rem; margin-bottom: 15px; }

/* Cart Summary */
.cart-summary {
    background-color: #1e1e1e;
    padding: 20px;
    border-top: 1px solid #2d2d2d;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 1rem;
    color: #aaa;
}

.total-row {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #3d3d3d;
    color: #fff;
}

.total-row h2 {
    color: #4CAF50;
    font-size: 2rem;
}

/* Action Pad */
.action-pad {
    flex: 3;
    padding: 15px;
    background-color: #121212;
}

.pad-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    height: 100%;
}

.pad-btn {
    background-color: #252525;
    border: 1px solid #333;
    color: #fff;
    border-radius: 8px;
    padding: 15px;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.2s;
}

.pad-btn:hover { background-color: #333; }
.pad-btn.danger { background-color: #d32f2f; }
.pad-btn.danger:hover { background-color: #b71c1c; }
.pad-btn.success { background-color: #388e3c; }

.pad-btn.payment-type.active {
    border: 2px solid #2196F3 !important;
    background-color: #1a2733 !important;
}

.main-pay-btn {
    grid-column: span 2;
    background-color: #2e7d32;
    font-size: 1.3rem;
    font-weight: bold;
}
.main-pay-btn:hover { background-color: #1b5e20; }

/* Strict Hide Receipt on Screen */
#thermal-receipt {
    display: none !important;
}

@media print {
    body * { visibility: hidden; }
    #thermal-receipt, #thermal-receipt * { visibility: visible; }
    #thermal-receipt {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        color: #000 !important;
        background: #fff !important;
        font-family: 'Courier New', Courier, monospace;
    }
    .receipt-80mm { width: 78mm; font-size: 12px; }
    .receipt-58mm { width: 54mm; font-size: 10px; }
    @page { margin: 0; }
}

/* Side Admin Drawer (Fixed Positioning Off-Screen) */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: 0.25s ease;
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.side-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 290px;
    height: 100vh;
    background-color: #2b2b2b;
    color: #ffffff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: right 0.25s ease-in-out;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.5);
    direction: ltr;
    text-align: left;
}

.side-drawer.active {
    right: 0 !important;
}

.drawer-header {
    padding: 22px 20px 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-title {
    font-size: 1.35rem;
    font-weight: 300;
    color: #f1f1f1;
}

.close-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding-top: 10px;
}

.aronium-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aronium-menu li {
    padding: 13px 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    cursor: pointer;
    color: #e0e0e0;
    font-size: 0.95rem;
    transition: background 0.15s;
}

.aronium-menu li:hover {
    background-color: #383838;
    color: #fff;
}

.aronium-menu li i {
    width: 20px;
    text-align: center;
    font-size: 1.15rem;
    color: #d0d0d0;
}

.menu-divider {
    display: flex;
    align-items: center;
    padding: 15px 22px 8px 22px;
    gap: 10px;
}

.menu-divider span {
    color: #a0a0a0;
    font-size: 0.85rem;
}

.menu-divider hr {
    flex: 1;
    border: none;
    border-top: 1px solid #404040;
}

.drawer-footer {
    border-top: 1px solid #383838;
    background-color: #262626;
}

.date-display {
    text-align: center;
    padding: 15px 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #a8b2b9;
    border-bottom: 1px solid #333333;
}

.footer-actions {
    display: flex;
    justify-content: space-around;
    padding: 18px 10px;
}

.footer-actions button {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.footer-actions button:hover { opacity: 1; }