/* ════════════════════════════════════════════════════════════
   QR Codes — /pms/config/qr-codes (xem ảnh + in tem, MỌI loại)
   ════════════════════════════════════════════════════════════ */

.qrr-page {
    padding: 18px 22px;
    background: var(--ez-bg, var(--cfg-bg, #fdfbf7));   /* ② Nền trang — cấu hình giao diện; fallback = màu hôm nay */
    min-height: 100vh;
    box-sizing: border-box;
}

.qrr-no-site {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 80px 20px;
    color: #8c8478;
    font-size: 14px;
}

.qrr-no-site .ic { font-size: 56px; opacity: 0.4; }

/* ── Header ── */
.qrr-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--cfg-border, #ebe6df);
    margin-bottom: 18px;
}

.qrr-head-title h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: #2a2a2a;
}

.qrr-head-sub {
    font-size: 12.5px;
    color: #8c8478;
    margin-top: 3px;
}

.qrr-head-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* ── Chip chọn LOẠI mã (phòng · bàn · điểm phục vụ · khu vực) ──────────────────────────────
   Giữ cùng hình dáng với chip ở màn "Mã QR / Token" (.qrt-chip) để hai màn trông là một bộ.
   ⚠ Đây là stylesheet TOÀN CỤC (nạp qua <link> ở App.razor), không phải scoped CSS — mọi class
     phải mang tiền tố `qrr-` để không đụng Bootstrap và các trang khác. */
.qrr-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.qrr-chip {
    height: 32px;
    padding: 0 14px;
    border: 1px solid var(--cfg-border, #ebe6df);
    border-radius: 999px;
    background: white;
    color: #4a3f31;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.qrr-chip:hover {
    border-color: #c6893a;
}

.qrr-chip.on {
    background: #fdf3e3;
    border-color: #c6893a;
    color: #8a5f14;
}

.qrr-search {
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--cfg-border, #ebe6df);
    border-radius: 8px;
    font-size: 13px;
    width: 200px;
    background: white;
}

.qrr-search:focus {
    outline: none;
    border-color: #c6893a;
}

.qrr-btn {
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--cfg-border, #ebe6df);
    border-radius: 8px;
    background: white;
    color: #4a3f31;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.qrr-btn:hover:not(:disabled) {
    background: #fef9ef;
    border-color: #d4b88a;
}

.qrr-btn.primary {
    background: #c6893a;
    color: white;
    border-color: #c6893a;
}

.qrr-btn.primary:hover:not(:disabled) {
    background: #b07a32;
    border-color: #b07a32;
}

.qrr-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.qrr-btn.small {
    height: 30px;
    padding: 0 10px;
    font-size: 12px;
}

/* ── Loading/Empty ── */
.qrr-loading, .qrr-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 80px 20px;
    color: #8c8478;
    font-size: 14px;
}

.qrr-empty .ic { font-size: 56px; opacity: 0.4; }

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #ebe6df;
    border-top-color: #c6893a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Grid ── */
.qrr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.qrr-card {
    background: white;
    border: 1px solid var(--cfg-border, #ebe6df);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.1s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.qrr-card.has-qr:hover {
    border-color: #c6893a;
    box-shadow: 0 4px 12px rgba(198, 137, 58, 0.12);
}

.qrr-card.no-qr {
    background: #faf7f1;
    border-style: dashed;
}

.qrr-card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.qrr-no {
    font-size: 20px;
    font-weight: 800;
    color: #2a2a2a;
    letter-spacing: 0.02em;
    line-height: 1;
}

.qrr-type {
    font-size: 11.5px;
    color: #8c8478;
    text-align: right;
    line-height: 1.3;
}

.qrr-card-qr {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    background: #fafafa;
    border-radius: 8px;
    padding: 8px;
}

.qrr-card-qr svg {
    display: block;
    max-width: 100%;
    height: auto;
}

.qrr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #b8a888;
    font-size: 12px;
}

.qrr-placeholder .ic { font-size: 36px; opacity: 0.5; }

.qrr-card-foot {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.qrr-code {
    font-size: 11px;
    color: #8c8478;
}

.qrr-code code {
    background: #fef3e3;
    color: #8a5a1e;
    padding: 1px 6px;
    border-radius: 4px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 600;
}

.qrr-url-mini {
    font-size: 10.5px;
    color: #8c8478;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    text-align: center;
    padding: 2px 0;
    word-break: break-all;
    line-height: 1.3;
}
