/* ===== STAFF VIEW ===== */
.stf { display:flex; flex-direction:column; gap:14px; }
.stf .section-header { display:flex; align-items:center; justify-content:space-between; }
.stf .section-header h2 { font-size:18px; font-weight:700; color:var(--text-primary); margin:0; }
.stf-counts { display:flex; gap:6px; }
.stf-c { font-size:11px; font-weight:600; padding:4px 10px; border-radius:4px; }
.stf-c--on { color:#16a34a; background:#f0fdf4; }
.stf-c--brk { color:#d97706; background:#fffbeb; }
.stf-c--off { color:#64748b; background:#f1f5f9; }
.stf-kpi { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.stf-kpi-item { padding:16px; background:var(--bg-white); border-radius:var(--radius-sm); border:1px solid var(--border-light); }
.stf-kpi-val { font-size:22px; font-weight:700; color:var(--text-primary); font-family:'JetBrains Mono',monospace; letter-spacing:-0.5px; }
.stf-kpi-lbl { font-size:11px; color:var(--text-muted); margin-top:2px; }
.stf-table { width:100%; border-collapse:separate; border-spacing:0; background:var(--bg-white); border-radius:var(--radius-sm); overflow:hidden; border:1px solid var(--border-light); }
.stf-table thead th { text-align:left; padding:10px 14px; font-size:10px; font-weight:600; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.5px; border-bottom:1px solid var(--border-light); background:var(--bg-light); }
.stf-table tbody td { padding:10px 14px; font-size:12px; color:var(--text-secondary); border-bottom:1px solid var(--border-light); vertical-align:middle; }
.stf-row:last-child td { border-bottom:none; }
.stf-row:hover td { background:var(--bg-hover); }
.stf-person { display:flex; align-items:center; gap:10px; }
.stf-initials { width:32px; height:32px; border-radius:50%; background:var(--bg-light); color:var(--text-secondary); display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; flex-shrink:0; letter-spacing:-0.5px; }
.stf-name { font-size:13px; font-weight:600; color:var(--text-primary); white-space:nowrap; }
.stf-role { font-size:10px; color:var(--text-muted); }
.stf-st { font-size:10px; font-weight:600; padding:3px 8px; border-radius:3px; white-space:nowrap; }
.stf-st--on { color:#16a34a; background:#f0fdf4; }
.stf-st--brk { color:#d97706; background:#fffbeb; }
.stf-st--off { color:#64748b; background:#f1f5f9; }
.stf-mono { font-family:'JetBrains Mono',monospace; font-size:12px; color:var(--text-primary); }
.stf-perf { display:flex; align-items:center; gap:6px; min-width:90px; position:relative; }
.stf-perf-bar { height:3px; border-radius:2px; background:#16a34a; position:absolute; bottom:-2px; left:0; }
.stf-perf span { font-size:10px; color:var(--text-muted); font-family:'JetBrains Mono',monospace; white-space:nowrap; }
.stf-act-cell { white-space:nowrap; }
.stf-act { padding:4px 10px; border:1px solid var(--border-light); border-radius:4px; font-size:10px; font-weight:600; cursor:pointer; font-family:inherit; margin-left:3px; background:var(--bg-white); transition:all 0.15s; }
.stf-act:hover { border-color:var(--border); }
.stf-act--on { color:#16a34a; border-color:#bbf7d0; }
.stf-act--on:hover { background:#f0fdf4; }
.stf-act--brk { color:#d97706; border-color:#fde68a; }
.stf-act--brk:hover { background:#fffbeb; }
.stf-act--off { color:#dc2626; border-color:#fecaca; }
.stf-act--off:hover { background:#fef2f2; }
@media (max-width:900px) { .stf-kpi { grid-template-columns:repeat(2,1fr); } .stf-table { font-size:11px; } }

/* ===== LOYALTY VIEW ===== */
.loy { display:flex; flex-direction:column; gap:14px; }
.loy-kpi { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.loy-kpi-item { padding:16px; background:var(--bg-white); border-radius:var(--radius-sm); border:1px solid var(--border-light); }
.loy-kpi-val { font-size:22px; font-weight:700; color:var(--text-primary); font-family:'JetBrains Mono',monospace; letter-spacing:-0.5px; }
.loy-kpi-lbl { font-size:11px; color:var(--text-muted); margin-top:2px; }
.loy-cols { display:grid; grid-template-columns:1fr 300px; gap:16px; }
.loy-sh { font-size:13px; font-weight:600; color:var(--text-primary); margin:0 0 10px; }
.loy-table { width:100%; border-collapse:separate; border-spacing:0; background:var(--bg-white); border-radius:var(--radius-sm); overflow:hidden; border:1px solid var(--border-light); }
.loy-table thead th { text-align:left; padding:10px 14px; font-size:10px; font-weight:600; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.5px; border-bottom:1px solid var(--border-light); background:var(--bg-light); }
.loy-table tbody td { padding:10px 14px; font-size:12px; color:var(--text-secondary); border-bottom:1px solid var(--border-light); vertical-align:middle; }
.loy-table tbody tr:last-child td { border-bottom:none; }
.loy-table tbody tr:hover td { background:var(--bg-hover); }
.loy-person { display:flex; align-items:center; gap:10px; }
.loy-ini { width:30px; height:30px; border-radius:50%; background:var(--bg-light); color:var(--text-secondary); display:flex; align-items:center; justify-content:center; font-size:10px; font-weight:700; flex-shrink:0; }
.loy-name { font-size:13px; font-weight:600; color:var(--text-primary); white-space:nowrap; }
.loy-phone { font-size:10px; color:var(--text-muted); }
.loy-tier { font-size:10px; font-weight:600; text-transform:capitalize; }
.loy-camp-list { display:flex; flex-direction:column; gap:6px; }
.loy-camp { display:flex; align-items:center; gap:10px; padding:10px 12px; background:var(--bg-white); border-radius:var(--radius-sm); border:1px solid var(--border-light); }
.loy-camp-name { font-size:12px; font-weight:600; color:var(--text-primary); flex:1; }
.loy-camp-cond { font-size:10px; color:var(--text-muted); flex:1; }
.loy-camp-val { font-size:11px; font-weight:700; color:var(--text-primary); font-family:'JetBrains Mono',monospace; white-space:nowrap; }
.loy-tiers { display:flex; flex-direction:column; gap:4px; }
.loy-tr { display:grid; grid-template-columns:70px 90px 1fr; gap:6px; padding:7px 10px; background:var(--bg-light); border-radius:4px; font-size:11px; align-items:center; }
.loy-tr-n { font-weight:700; }
.loy-tr-r { color:var(--text-muted); font-size:10px; }
.loy-tr-d { color:var(--text-secondary); font-size:10px; }

/* ===== ONLINE PLATFORM VIEW ===== */
.online-wrap { display:flex; flex-direction:column; gap:14px; }
.online-stats-row { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.online-stat { padding:14px 16px; background:var(--bg-white); border-radius:var(--radius-sm); border:1px solid var(--border-light); }
.online-stat span { font-size:10px; color:var(--text-muted); display:block; text-transform:uppercase; letter-spacing:0.3px; }
.online-stat strong { font-size:18px; font-weight:700; color:var(--text-primary); display:block; font-family:'JetBrains Mono',monospace; margin-top:2px; }
.online-cols { display:grid; grid-template-columns:1fr 300px; gap:16px; }
.online-sh { font-size:13px; font-weight:600; color:var(--text-primary); margin:0 0 10px; display:flex; align-items:center; gap:6px; }
.online-sh i { color:var(--text-muted); font-size:12px; }
.online-platforms { display:flex; flex-direction:column; gap:6px; }
.online-platform { display:flex; align-items:center; gap:10px; padding:12px 14px; background:var(--bg-white); border-radius:var(--radius-sm); border:1px solid var(--border-light); flex-wrap:wrap; }
.online-platform.disconnected { opacity:0.4; }
.op-icon { width:34px; height:34px; border-radius:8px; background:var(--bg-light); display:flex; align-items:center; justify-content:center; font-size:14px; flex-shrink:0; color:var(--text-secondary); }
.op-info { flex:1; min-width:140px; }
.op-name { font-size:13px; font-weight:600; color:var(--text-primary); }
.op-url code { font-size:9px; color:var(--text-muted); }
.op-stats { display:flex; gap:16px; }
.op-stats div { text-align:center; }
.op-stats span { font-size:9px; color:var(--text-muted); display:block; }
.op-stats strong { font-size:12px; color:var(--text-primary); font-family:'JetBrains Mono',monospace; }
.op-status { padding:3px 8px; border-radius:3px; font-size:10px; font-weight:600; white-space:nowrap; }
.op-status.connected { color:#16a34a; background:#f0fdf4; }
.op-status.disconnected { color:#64748b; background:#f1f5f9; }
.op-btn { padding:5px 10px; border-radius:4px; font-size:10px; font-weight:600; background:var(--bg-light); color:var(--text-secondary); border:1px solid var(--border-light); cursor:pointer; font-family:inherit; }
.op-btn:hover { background:var(--bg-hover); border-color:var(--border); }
.online-orders { display:flex; flex-direction:column; gap:4px; max-height:400px; overflow-y:auto; }
.online-order { display:flex; align-items:center; gap:10px; padding:8px 12px; background:var(--bg-white); border-radius:6px; border:1px solid var(--border-light); }
.oo-left { flex:1; }
.oo-platform { font-size:10px; font-weight:600; color:var(--text-muted); }
.oo-customer { font-size:12px; color:var(--text-primary); }
.oo-items { font-size:10px; color:var(--text-muted); }
.oo-right { text-align:right; }
.oo-total { font-size:13px; font-weight:700; color:var(--text-primary); font-family:'JetBrains Mono',monospace; }
.oo-commission { font-size:9px; color:var(--text-muted); }
.oo-status { font-size:9px; font-weight:600; text-transform:uppercase; color:#d97706; }
.online-order.accepted .oo-status { color:#2563eb; }
.online-order.preparing .oo-status { color:#ea580c; }
.online-order.ready .oo-status { color:#16a34a; }
.online-order.rejected .oo-status { color:#dc2626; }
.oo-actions { display:flex; gap:3px; }
.oo-btn { width:26px; height:26px; border-radius:4px; border:1px solid var(--border-light); background:var(--bg-white); cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:11px; }
.oo-btn.accept { color:#16a34a; border-color:#bbf7d0; }
.oo-btn.reject { color:#dc2626; border-color:#fecaca; }
.oo-btn.prep { color:#d97706; border-color:#fde68a; }
.oo-btn.ready { color:#16a34a; border-color:#bbf7d0; }
.oo-btn:hover { background:var(--bg-light); }
.online-empty, .online-empty-sm { text-align:center; padding:20px; color:var(--text-muted); font-size:12px; }
.online-empty-sm { padding:10px; font-size:11px; }
.online-empty i { font-size:20px; display:block; margin-bottom:6px; opacity:0.4; }
.qr-desc { font-size:11px; color:var(--text-muted); margin:0 0 10px; }
.qr-gen-row { display:flex; gap:6px; margin-bottom:10px; }
.qr-select { flex:1; padding:7px 8px; border-radius:4px; background:var(--bg-white); border:1px solid var(--border); color:var(--text-primary); font-size:11px; font-family:inherit; }
.qr-gen-btn { padding:7px 12px; border-radius:4px; background:var(--bg-light); color:var(--text-secondary); border:1px solid var(--border-light); font-size:11px; font-weight:600; cursor:pointer; font-family:inherit; white-space:nowrap; }
.qr-gen-btn:hover { background:var(--bg-hover); }
.qr-result { margin-bottom:10px; }
.qr-card { padding:10px; background:var(--bg-light); border-radius:6px; border:1px solid var(--border-light); text-align:center; }
.qr-token { font-size:18px; color:var(--text-primary); margin-bottom:4px; }
.qr-token code { font-size:10px; display:block; margin-top:4px; color:var(--text-muted); font-family:'JetBrains Mono',monospace; }
.qr-url { font-size:9px; color:var(--text-muted); word-break:break-all; }
.qr-card small { font-size:9px; color:var(--text-muted); }
.qr-stats { display:flex; gap:6px; margin-bottom:10px; }
.qr-stats div { flex:1; text-align:center; padding:6px; background:var(--bg-light); border-radius:4px; }
.qr-stats span { font-size:9px; color:var(--text-muted); display:block; }
.qr-stats strong { font-size:12px; color:var(--text-primary); font-family:'JetBrains Mono',monospace; }
.qr-sim-btn { width:100%; padding:8px; border-radius:4px; background:var(--bg-white); color:var(--text-secondary); border:1px solid var(--border); font-size:11px; font-weight:600; cursor:pointer; font-family:inherit; }
.qr-sim-btn:hover { background:var(--bg-light); }
.online-revenue { display:flex; flex-direction:column; gap:3px; }
.or-row { display:flex; justify-content:space-between; padding:6px 10px; background:var(--bg-light); border-radius:4px; font-size:11px; color:var(--text-muted); }
.or-row strong { color:var(--text-primary); font-family:'JetBrains Mono',monospace; }
.online-qr-panel { padding:14px; background:var(--bg-white); border-radius:var(--radius-sm); border:1px solid var(--border-light); }

/* ===== RESPONSIVE ===== */
@media (max-width:900px) {
    .loy-cols, .online-cols { grid-template-columns:minmax(0,1fr); }
    .online-stats-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .loy-kpi { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:768px) {
    /* Staff */
    .stf-kpi { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px; }
    .stf-kpi-item { padding:12px; }
    .stf-kpi-val { font-size:18px; }
    .stf-table { display:block; overflow-x:auto; -webkit-overflow-scrolling:touch; }
    .stf-table thead, .stf-table tbody, .stf-table tr { min-width:600px; display:table; width:100%; }
    .stf .section-header { flex-direction:column; gap:8px; align-items:flex-start; }
    .stf-act { padding:3px 6px; font-size:9px; }
    /* Loyalty */
    .loy-kpi { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px; }
    .loy-kpi-item { padding:12px; }
    .loy-kpi-val { font-size:18px; }
    .loy-table { display:block; overflow-x:auto; -webkit-overflow-scrolling:touch; }
    .loy-table thead, .loy-table tbody, .loy-table tr { min-width:500px; display:table; width:100%; }
    .loy-cols { grid-template-columns:minmax(0,1fr); gap:12px; }
    /* Online */
    .online-stats-row { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px; }
    .online-stat { padding:10px 12px; }
    .online-stat strong { font-size:16px; }
    .online-cols { grid-template-columns:minmax(0,1fr); gap:12px; }
    .online-platform { padding:10px; }
    .op-stats { gap:10px; }
    .op-icon { width:28px; height:28px; font-size:12px; }
    .qr-gen-row { flex-direction:column; }
}
@media (max-width:480px) {
    .stf-kpi { grid-template-columns:minmax(0,1fr); }
    .loy-kpi { grid-template-columns:minmax(0,1fr); }
    .online-stats-row { grid-template-columns:minmax(0,1fr); }
    .online-platform { flex-direction:column; align-items:flex-start; gap:8px; }
    .op-stats { width:100%; justify-content:space-between; }
}
