﻿/* Cơm Tấm KHÓI - Quản lý chuỗi */
:root {
    --khoi-red: #b3261e;
    --khoi-red-dark: #8c1d17;
    --khoi-amber: #f2a900;
}

body { background: #f6f4f1; font-size: 15px; }

.bg-khoi { background: var(--khoi-red) !important; }
.text-khoi { color: var(--khoi-red) !important; }

.btn-khoi {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--khoi-red);
    --bs-btn-border-color: var(--khoi-red);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--khoi-red-dark);
    --bs-btn-hover-border-color: var(--khoi-red-dark);
    --bs-btn-active-bg: var(--khoi-red-dark);
    --bs-btn-disabled-bg: var(--khoi-red);
    --bs-btn-disabled-border-color: var(--khoi-red);
}

.login-wrap { min-height: 80vh; display: flex; align-items: center; justify-content: center; }
.login-card { width: 100%; max-width: 420px; }

.stat-card { color: inherit; }
.stat-card:hover { border-color: var(--khoi-red); }
.stat-label { font-size: .8rem; color: #6c757d; text-transform: uppercase; letter-spacing: .03em; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--khoi-red); }

.json-view { white-space: pre-wrap; word-break: break-word; font-size: .8rem; max-height: 480px; overflow: auto; background: #fbfaf8; }
.audit-reason { max-width: 260px; }

.matrix select { min-width: 130px; }

/* Thao tác chạm trên tablet / điện thoại */
@media (pointer: coarse) {
    .btn, .form-control, .form-select { min-height: 44px; }
    .btn-sm, .form-control-sm, .form-select-sm { min-height: 38px; }
    .dropdown-item { padding-top: .6rem; padding-bottom: .6rem; }
}

@media print {
    .navbar, .btn, form { display: none !important; }
}

/* ===== POS ===== */
.pos-cats { white-space: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; max-height: calc(100vh - 230px); overflow-y: auto; }
.pos-item { display: flex; flex-direction: column; justify-content: space-between; min-height: 84px; padding: .5rem; text-align: left;
            border: 1px solid #dee2e6; border-radius: .5rem; background: #fff; touch-action: manipulation; }
.pos-item:hover:not(:disabled), .pos-item:focus-visible { border-color: #b3261e; box-shadow: 0 0 0 .15rem rgba(179,38,30,.2); }
.pos-item:disabled { opacity: .55; }
.pos-item-name { font-weight: 600; line-height: 1.2; }
.pos-item-price { color: #b3261e; font-weight: 700; }
.pos-cart { position: sticky; top: 64px; }
.pos-lines { max-height: 38vh; overflow-y: auto; }
.pos-totals { display: grid; grid-template-columns: 1fr auto; row-gap: .15rem; margin: 0; }
.pos-totals dd { margin: 0; text-align: right; }
.pos-qr { max-width: 260px; }
.pos-toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 2000; background: #212529; color: #fff;
             padding: .6rem 1rem; border-radius: .5rem; box-shadow: 0 .25rem 1rem rgba(0,0,0,.3); max-width: 90vw; }
.asm-col { min-height: 40vh; background: #f8f9fa; border-radius: .5rem; padding: .25rem; }
.asm-card .btn { min-height: 44px; }
@media (max-width: 991.98px) {
    .pos-grid { max-height: none; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .pos-cart { position: static; }
}
@media print {
    nav.navbar, .no-print, footer { display: none !important; }
    body { background: #fff; }
}
.rpt-bar { height: .8rem; background: #b3261e; border-radius: .2rem; min-width: 2px; }
.heatmap td { min-width: 2.6rem; }
.heatmap .hm1 { background: #fde8e6; } .heatmap .hm2 { background: #f8b9b3; } .heatmap .hm3 { background: #ef8279; }
.heatmap .hm4 { background: #d9483d; color: #fff; } .heatmap .hm5 { background: #8f1d16; color: #fff; }
