* { box-sizing: border-box; }
:root { --primary:#0f172a; --accent:#2563eb; --success:#10b981; --danger:#ef4444; --warning:#f59e0b; --text-main:#1e293b; --text-muted:#64748b; --border:#e2e8f0; --bg:#f1f5f9; }
body { margin:0; background:var(--bg); color:var(--text-main); font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
button,input,select { font:inherit; }
.hidden { display:none !important; }
.test-nav { background:#020617; padding:10px; text-align:center; }
.app-header { background:#fff; border-bottom:1px solid var(--border); min-height:70px; padding:0 28px; display:flex; align-items:center; justify-content:space-between; }
.brand { font-size:1.25rem; font-weight:900; letter-spacing:.5px; color:var(--primary); }
.brand span { color:var(--accent); }
.header-right { display:flex; align-items:center; gap:14px; }
.kasir-label { color:var(--text-muted); font-weight:600; }
.status-pill { border-radius:999px; padding:6px 10px; font-size:.78rem; font-weight:800; }
.status-loading { background:#f1f5f9; color:#64748b; }
.status-ok { background:#ecfdf5; color:#047857; }
.status-error { background:#fef2f2; color:#b91c1c; }
.app-nav { display:flex; gap:6px; padding:10px 28px; background:#fff; border-bottom:1px solid var(--border); }
.nav-tab { border:0; background:transparent; padding:10px 14px; color:var(--text-muted); font-weight:700; border-radius:9px; cursor:pointer; }
.nav-tab:hover,.nav-tab.active { background:#eff6ff; color:var(--accent); }
.container { max-width:1400px; margin:0 auto; padding:24px; }
.pos-layout { display:grid; grid-template-columns:minmax(0,1.7fr) minmax(320px,.9fr); gap:24px; align-items:start; }
.panel-stack { display:grid; gap:20px; }
.panel { background:#fff; border:1px solid var(--border); border-radius:14px; box-shadow:0 7px 24px rgba(15,23,42,.04); overflow:hidden; }
.panel-header { padding:18px 20px; border-bottom:1px solid var(--border); display:flex; justify-content:space-between; align-items:center; font-weight:800; }
.form-grid,.add-menu-grid { padding:20px; display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.add-menu-grid { grid-template-columns:1.4fr 1fr auto; }
.form-group { display:flex; flex-direction:column; gap:7px; }
.form-label { font-size:.85rem; color:var(--text-muted); font-weight:700; }
.form-control { width:100%; border:1px solid var(--border); border-radius:9px; padding:11px 12px; outline:none; background:#fff; }
.form-control:focus { border-color:#93c5fd; box-shadow:0 0 0 3px #dbeafe; }
.menu-grid { padding:18px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.menu-item { text-align:left; border:1px solid var(--border); border-left:4px solid var(--accent); background:#fff; border-radius:10px; padding:15px; cursor:pointer; transition:.18s; display:flex; justify-content:space-between; gap:12px; align-items:center; }
.menu-item:hover { transform:translateY(-1px); box-shadow:0 6px 14px rgba(15,23,42,.08); }
.menu-item-name { font-weight:800; }
.menu-item-price { color:var(--accent); font-weight:800; white-space:nowrap; }
.order-panel { position:sticky; top:20px; }
.cart-items { min-height:220px; max-height:500px; overflow:auto; padding:10px 20px; }
.cart-row { display:flex; justify-content:space-between; gap:15px; padding:14px 0; border-bottom:1px solid #f1f5f9; }
.cart-row small { display:block; color:var(--text-muted); margin-top:4px; }
.cart-right { text-align:right; font-weight:800; }
.cart-right > span { display:block; margin-bottom:6px; }
.cart-right button { border:1px solid var(--border); background:#fff; width:28px; height:28px; cursor:pointer; }
.receipt-total { border-top:1px solid var(--border); padding:18px 20px; display:flex; justify-content:space-between; align-items:center; font-size:1rem; }
.receipt-total strong { color:var(--danger); font-size:1.25rem; }
.action-stack { padding:0 20px 20px; display:grid; gap:10px; }
.btn { border:0; border-radius:9px; padding:10px 14px; cursor:pointer; font-weight:800; text-decoration:none; display:inline-flex; align-items:center; justify-content:center; gap:7px; }
.btn:disabled { opacity:.6; cursor:not-allowed; }
.btn-block { width:100%; }
.btn-primary { background:var(--primary); color:#fff; }
.btn-primary:hover { background:#020617; }
.btn-success { background:var(--success); color:#fff; }
.btn-danger { background:var(--danger); color:#fff; }
.btn-warning { background:var(--warning); color:#fff; }
.btn-light { background:#fff; color:var(--primary); }
.btn-outline { background:#fff; color:var(--primary); border:1px solid var(--border); }
.btn-sm { padding:7px 10px; font-size:.8rem; }
.link-area { margin:0 20px 20px; padding:14px; border:1px solid #a7f3d0; background:#ecfdf5; border-radius:10px; }
.success-title { font-weight:900; color:#047857; margin-bottom:10px; }
.link-actions { display:flex; flex-wrap:wrap; gap:7px; margin-top:8px; }
.link-actions .btn { flex:1; }
.tab-view { display:block; }
.table-wrap { overflow:auto; }
.data-table { width:100%; border-collapse:collapse; min-width:900px; }
.data-table th,.data-table td { padding:13px 14px; border-bottom:1px solid var(--border); text-align:left; vertical-align:middle; }
.data-table th { background:#0f172a; color:#fff; font-size:.82rem; }
.invoice-badge { background:#e2e8f0; padding:4px 8px; border-radius:7px; font-size:.78rem; font-weight:800; }
.badge { display:inline-block; padding:5px 9px; border-radius:7px; font-size:.74rem; font-weight:900; }
.badge-paid { background:#ecfdf5; color:#047857; border:1px solid #a7f3d0; }
.badge-unpaid { background:#fef2f2; color:#b91c1c; border:1px solid #fecaca; }
.empty-state { min-height:150px; padding:30px; display:flex; align-items:center; justify-content:center; flex-direction:column; color:var(--text-muted); text-align:center; gap:8px; }
.empty-state i { font-size:1.5rem; }
.empty-cell { text-align:center !important; color:var(--text-muted); padding:35px !important; }
.error-state { color:#b91c1c; padding:30px; text-align:center; }
.error-text { color:#b91c1c; }
.receipt-container { min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:20px; background:var(--bg); }
.receipt-card { background:#fff; width:100%; max-width:420px; border-radius:16px; box-shadow:0 10px 30px rgba(15,23,42,.08); overflow:hidden; }
.receipt-header { text-align:center; padding:30px 24px 20px; border-top:6px solid var(--accent); border-bottom:2px dashed var(--border); }
.receipt-header h1 { margin:0; font-size:1.45rem; color:var(--primary); }
.receipt-header p { margin:5px 0 0; color:var(--text-muted); }
.receipt-body { padding:24px; }
.receipt-info { display:flex; justify-content:space-between; gap:15px; color:var(--text-muted); font-size:.83rem; margin-bottom:18px; }
.receipt-info strong { display:block; color:var(--text-main); margin-top:4px; }
.customer-name { color:var(--accent) !important; font-size:1rem; }
.text-right { text-align:right; }
.items-container { margin:24px 0; }
.item-row { display:flex; justify-content:space-between; gap:15px; margin-bottom:13px; }
@media (max-width:900px) { .pos-layout { grid-template-columns:1fr; } .order-panel { position:static; } .header-right { flex-wrap:wrap; justify-content:flex-end; } }
@media (max-width:640px) { .container { padding:14px; } .app-header { padding:0 14px; } .app-nav { padding:8px 14px; overflow:auto; } .form-grid,.add-menu-grid,.menu-grid { grid-template-columns:1fr; } .brand { font-size:1rem; } .kasir-label { display:none; } }
