/* Turbo Gaming Lounge – Admin design system */
:root {
  --bg: #0b1220; --bg-2: #0f172a; --panel: #111a2e; --panel-2: #16213b; --border: #1f2b47; --border-2: #2a3a5c;
  --text: #e6edf7; --muted: #9fb0cc; --muted-2: #6f809c;
  --accent: #00a6d6; --accent-2: #38bdf8; --accent-soft: rgba(0, 166, 214, .15);
  --ps: #8b5cf6; --ps-soft: rgba(139, 92, 246, .16); --pc: #00a6d6; --pc-soft: rgba(0, 166, 214, .14);
  --pool: #22c55e; --pool-soft: rgba(34, 197, 94, .16); --tt: #f59e0b; --tt-soft: rgba(245, 158, 11, .16); --foosball: #f43f5e; --foosball-soft: rgba(244, 63, 94, .16);
  --success: #22c55e; --success-soft: rgba(34, 197, 94, .14); --warning: #f59e0b; --warning-soft: rgba(245, 158, 11, .15);
  --danger: #ef4444; --danger-soft: rgba(239, 68, 68, .14); --info: #38bdf8;
  --radius: 14px; --radius-sm: 9px; --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif; --display: 'Orbitron', 'Inter', sans-serif;
  --sidebar-w: 248px; --topbar-h: 64px;
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 .6em; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .mono { font-variant-numeric: tabular-nums; font-family: 'Inter', monospace; }
.text-right { text-align: right; } .text-center { text-align: center; } .nowrap { white-space: nowrap; }
.text-success { color: var(--success); } .text-danger { color: var(--danger); } .text-warning { color: var(--warning); } .text-accent { color: var(--accent-2); }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: #031018; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; } ::-webkit-scrollbar-track { background: transparent; }

/* ---------- Shell ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: linear-gradient(180deg, #0e1730, #0b1220); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 40; transition: transform .25s; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px; border-bottom: 1px solid var(--border); }
.sidebar-brand img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: #fff; }
.sidebar-brand strong { display: block; font-size: .95rem; line-height: 1.2; } .sidebar-brand span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.sidebar-nav { padding: 12px 10px; display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
.sidebar-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; font-size: .92rem; transition: .15s; }
.sidebar-nav a svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sidebar-nav a:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.sidebar-nav a.active { background: var(--accent-soft); color: var(--accent-2); box-shadow: inset 3px 0 0 var(--accent); }
.sidebar-footer { padding: 12px 18px 18px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.sidebar-link { font-size: .8rem; color: var(--muted); }
.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar { height: var(--topbar-h); display: flex; align-items: center; gap: 14px; padding: 0 22px; background: rgba(11, 18, 32, .85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
.page-title { font-size: 1.15rem; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.clock { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.menu-toggle { display: none; }
.icon-btn { background: transparent; border: 1px solid transparent; color: var(--muted); width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1.15rem; position: relative; transition: .15s; }
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.badge-dot { position: absolute; top: 4px; right: 4px; background: var(--danger); color: #fff; font-size: .62rem; font-weight: 700; min-width: 17px; height: 17px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.notif-wrap { position: relative; }
.notif-panel { position: absolute; right: 0; top: 46px; width: 360px; max-width: 92vw; background: var(--panel); border: 1px solid var(--border-2); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 50; overflow: hidden; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: .86rem; }
.notif-item.notif-booking_reminder { border-left: 3px solid var(--warning); } .notif-item.notif-booking_new { border-left: 3px solid var(--accent); } .notif-item.notif-low_stock { border-left: 3px solid var(--danger); }
.notif-title { font-weight: 700; margin-bottom: 3px; } .notif-msg { color: var(--muted); white-space: pre-line; } .notif-meta { margin-top: 6px; font-size: .75rem; color: var(--muted-2); }
.notif-foot { display: block; text-align: center; padding: 10px; font-size: .82rem; border-top: 1px solid var(--border); }
.user-menu { display: flex; align-items: center; gap: 10px; cursor: pointer; position: relative; padding: 4px 6px; border-radius: 10px; }
.user-menu:hover { background: var(--panel-2); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--ps)); display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; }
.user-meta strong { display: block; font-size: .85rem; line-height: 1.1; } .user-meta span { font-size: .72rem; color: var(--muted); }
.user-dropdown { display: none; position: absolute; right: 0; top: 48px; background: var(--panel); border: 1px solid var(--border-2); border-radius: var(--radius-sm); min-width: 180px; box-shadow: var(--shadow); z-index: 50; padding: 6px; flex-direction: column; }
.user-menu.open .user-dropdown { display: flex; }
.user-dropdown a, .user-dropdown button { text-align: left; padding: 9px 12px; border-radius: 7px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; }
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--panel-2); text-decoration: none; }
.content { padding: 22px; flex: 1; }
.link { background: none; border: 0; color: var(--accent-2); cursor: pointer; font: inherit; padding: 0; }
.link:hover { text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; transition: .15s; white-space: nowrap; line-height: 1.2; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #031018; } .btn-primary:hover:not(:disabled) { background: var(--accent-2); }
.btn-success { background: var(--success); color: #03130a; } .btn-success:hover:not(:disabled) { filter: brightness(1.1); }
.btn-danger { background: var(--danger); color: #fff; } .btn-danger:hover:not(:disabled) { filter: brightness(1.1); }
.btn-warning { background: var(--warning); color: #1a1000; }
.btn-ghost { background: var(--panel-2); color: var(--text); border-color: var(--border-2); } .btn-ghost:hover:not(:disabled) { background: var(--border); }
.btn-outline { background: transparent; color: var(--accent-2); border-color: var(--accent); } .btn-outline:hover:not(:disabled) { background: var(--accent-soft); }
.btn-sm { padding: 6px 11px; font-size: .8rem; border-radius: 8px; } .btn-lg { padding: 13px 22px; font-size: 1rem; border-radius: 12px; } .btn-xl { padding: 16px 26px; font-size: 1.1rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.spinner { width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: currentColor; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--panel-2); color: var(--muted); font: inherit; font-size: .8rem; cursor: pointer; }
.chip.active, .chip:hover { background: var(--accent-soft); color: var(--accent-2); border-color: var(--accent); }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: .85rem; color: var(--muted); }
.field > span { font-weight: 600; }
.field.inline { flex-direction: row; align-items: center; gap: 10px; }
.input, select.input, textarea.input { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--bg); color: var(--text); font: inherit; font-size: .92rem; transition: .15s; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.invalid { border-color: var(--danger); } .input[readonly] { opacity: .7; }
.input-lg { padding: 13px 14px; font-size: 1.15rem; font-weight: 600; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239fb0cc' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 32px; }
select.input option { background: var(--panel); }
input[type=date].input, input[type=time].input { color-scheme: dark; }
textarea.input { resize: vertical; min-height: 70px; }
.field-error { color: var(--danger); font-size: .78rem; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.hint { font-size: .78rem; color: var(--muted-2); }
.check { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--text); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--border-2); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 8px 14px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; }
.seg button.active { background: var(--accent); color: #031018; }
.seg-lg button { padding: 12px 22px; font-size: 1.05rem; }
.switch { position: relative; width: 44px; height: 24px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: var(--border-2); border-radius: 24px; transition: .2s; }
.switch i::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + i { background: var(--accent); } .switch input:checked + i::before { transform: translateX(20px); }
.alert { padding: 12px 14px; border-radius: 10px; font-size: .88rem; border: 1px solid; }
.alert-danger { background: var(--danger-soft); border-color: rgba(239, 68, 68, .4); color: #fca5a5; }
.alert-warning { background: var(--warning-soft); border-color: rgba(245, 158, 11, .4); color: #fcd34d; }
.alert-info { background: var(--accent-soft); border-color: rgba(0, 166, 214, .4); color: #7dd3fc; }
.alert-success { background: var(--success-soft); border-color: rgba(34, 197, 94, .4); color: #86efac; }

/* ---------- Cards / layout ---------- */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { font-size: 1rem; }
.card-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-main { grid-template-columns: 2fr 1fr; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .input { width: auto; min-width: 150px; }
.toolbar .grow { flex: 1; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h2 { font-size: 1.3rem; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.stat::after { content: ''; position: absolute; right: -20px; top: -20px; width: 90px; height: 90px; border-radius: 50%; background: var(--stat-color, var(--accent)); opacity: .08; }
.stat .label { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.stat .value { font-size: 1.55rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: .78rem; color: var(--muted); }
.stat.c-success { --stat-color: var(--success); } .stat.c-warning { --stat-color: var(--warning); } .stat.c-danger { --stat-color: var(--danger); } .stat.c-ps { --stat-color: var(--ps); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.empty { padding: 26px; text-align: center; color: var(--muted-2); font-size: .9rem; }
.loading { padding: 30px; text-align: center; color: var(--muted); }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; text-transform: capitalize; background: var(--panel-2); color: var(--muted); border: 1px solid var(--border-2); }
.badge-available, .badge-completed, .badge-confirmed, .badge-active, .badge-sent, .badge-ok { background: var(--success-soft); color: #86efac; border-color: rgba(34, 197, 94, .35); }
.badge-in_use, .badge-checked_in, .badge-open { background: var(--accent-soft); color: #7dd3fc; border-color: rgba(0, 166, 214, .4); }
.badge-reserved, .badge-pending, .badge-skipped, .badge-low { background: var(--warning-soft); color: #fcd34d; border-color: rgba(245, 158, 11, .4); }
.badge-maintenance, .badge-cancelled, .badge-void, .badge-no_show, .badge-failed, .badge-blocked, .badge-inactive, .badge-archived { background: var(--danger-soft); color: #fca5a5; border-color: rgba(239, 68, 68, .35); }
.badge-ps { background: var(--ps-soft); color: #c4b5fd; border-color: rgba(139, 92, 246, .4); } .badge-pc { background: var(--pc-soft); color: #7dd3fc; border-color: rgba(0, 166, 214, .4); }
.badge-pool { background: var(--pool-soft); color: #86efac; border-color: rgba(34, 197, 94, .4); } .badge-tt { background: var(--tt-soft); color: #fcd34d; border-color: rgba(245, 158, 11, .4); } .badge-foosball { background: var(--foosball-soft); color: #fda4af; border-color: rgba(244, 63, 94, .4); }
.badge-online { background: var(--ps-soft); color: #c4b5fd; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
table.table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.table th, .table td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; background: var(--bg-2); position: sticky; top: 0; }
.table tbody tr:hover { background: var(--panel-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table .row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.table tr.clickable { cursor: pointer; }
.table tfoot td { font-weight: 700; background: var(--bg-2); }
.pagination { display: flex; justify-content: space-between; align-items: center; padding: 12px 4px; font-size: .85rem; color: var(--muted); }
.pagination .pages { display: flex; gap: 10px; align-items: center; }

/* ---------- Station cards ---------- */
.board-section { margin-bottom: 26px; }
.board-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.board-title h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.board-title .count { font-size: .78rem; color: var(--muted-2); }
.stations { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.station { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; position: relative; cursor: pointer; transition: .18s; min-height: 150px; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.station:hover { transform: translateY(-2px); border-color: var(--border-2); box-shadow: var(--shadow); }
.station::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--st-color, var(--border-2)); }
.station.available { --st-color: var(--success); }
.station.in_use { --st-color: var(--accent); background: linear-gradient(160deg, rgba(0, 166, 214, .12), var(--panel) 60%); border-color: rgba(0, 166, 214, .45); }
.station.in_use.stopped { --st-color: var(--warning); border-color: rgba(245, 158, 11, .5); }
.station.reserved { --st-color: var(--warning); background: linear-gradient(160deg, rgba(245, 158, 11, .1), var(--panel) 60%); }
.station.maintenance { --st-color: var(--muted-2); opacity: .65; }
.station.selected { outline: 2px solid var(--accent); outline-offset: 1px; }
.station .st-head { display: flex; justify-content: space-between; align-items: flex-start; }
.station .st-code { font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: .04em; }
.station .st-type { font-size: .7rem; padding: 2px 8px; border-radius: 999px; font-weight: 700; text-transform: uppercase; }
.station .st-type.ps { background: var(--ps-soft); color: #c4b5fd; } .station .st-type.pc { background: var(--pc-soft); color: #7dd3fc; }
.station .st-type.pool { background: var(--pool-soft); color: #86efac; } .station .st-type.tt { background: var(--tt-soft); color: #fcd34d; } .station .st-type.foosball { background: var(--foosball-soft); color: #fda4af; }
.ctrl-seg { display: inline-flex; gap: 4px; } .ctrl-seg button { min-width: 38px; }
.group-stations { display: flex; flex-direction: column; gap: 6px; } .group-stations .gs-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); }
.group-stations .gs-row .grow { flex: 1; } .group-stations select { width: auto; padding: 6px 8px; }
.rates-section { margin-bottom: 18px; } .rates-section h4 { margin: 0 0 10px; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.kind-subtotal td { color: var(--muted); font-size: .85rem; background: rgba(255,255,255,.02); }
.station .st-status { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--st-color); display: flex; align-items: center; gap: 6px; }
.station .st-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--st-color); }
.station.in_use:not(.stopped) .st-status::before { animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(0, 166, 214, .6); } 70% { box-shadow: 0 0 0 8px rgba(0, 166, 214, 0); } }
.station .st-timer { font-family: var(--display); font-size: 1.45rem; font-weight: 700; letter-spacing: .06em; font-variant-numeric: tabular-nums; color: var(--text); }
.station .st-meta { font-size: .78rem; color: var(--muted); display: flex; flex-direction: column; gap: 2px; margin-top: auto; }
.station .st-meta strong { color: var(--text); }
.station .st-amount { font-weight: 700; color: var(--accent-2); }
.station .st-actions { display: flex; gap: 6px; margin-top: 8px; }
.station .st-actions .btn { flex: 1; padding: 7px 8px; font-size: .78rem; }
.station .st-group { position: absolute; right: 10px; bottom: 10px; font-size: .68rem; background: var(--ps-soft); color: #c4b5fd; padding: 2px 7px; border-radius: 6px; }
.station .st-next { font-size: .74rem; color: var(--warning); }

/* ---------- Modals ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(3, 8, 20, .7); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 100; opacity: 0; transition: opacity .2s; padding: 16px; overflow-y: auto; }
.modal-backdrop.show { opacity: 1; }
.modal { background: var(--panel); border: 1px solid var(--border-2); border-radius: 18px; width: 100%; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); transform: translateY(10px); transition: transform .2s; max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.modal-backdrop.show .modal { transform: none; }
.modal-sm { max-width: 440px; } .modal-md { max-width: 620px; } .modal-lg { max-width: 860px; } .modal-xl { max-width: 1100px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 1.05rem; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.confirm-text { font-size: .95rem; }
.approval-msg { background: var(--warning-soft); border: 1px solid rgba(245, 158, 11, .4); color: #fcd34d; padding: 10px 12px; border-radius: 10px; margin-bottom: 14px; font-size: .88rem; }
.modal-approval .field { margin-bottom: 10px; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 18px; top: 76px; display: flex; flex-direction: column; gap: 10px; z-index: 200; max-width: 380px; }
.toast { display: flex; gap: 10px; align-items: flex-start; background: var(--panel); border: 1px solid var(--border-2); border-left: 4px solid var(--accent); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); font-size: .88rem; animation: slideIn .25s ease; }
.toast.out { opacity: 0; transform: translateX(20px); transition: .3s; }
.toast-success { border-left-color: var(--success); } .toast-error { border-left-color: var(--danger); } .toast-warning { border-left-color: var(--warning); } .toast-info { border-left-color: var(--info); }
.toast-icon { font-weight: 800; } .toast-success .toast-icon { color: var(--success); } .toast-error .toast-icon { color: var(--danger); } .toast-warning .toast-icon { color: var(--warning); }
.toast-msg { flex: 1; white-space: pre-line; } .toast-x { background: none; border: 0; color: var(--muted); font-size: 1.1rem; cursor: pointer; }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } }

/* ---------- Product picker ---------- */
.pp-top { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.pp-cats { display: flex; gap: 6px; flex-wrap: wrap; }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pp-item { background: var(--bg); border: 1px solid var(--border-2); border-radius: 12px; padding: 10px; text-align: left; cursor: pointer; color: var(--text); font: inherit; display: flex; flex-direction: column; gap: 4px; transition: .15s; }
.pp-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.pp-item.out { opacity: .45; }
.pp-item img, .pp-ph { width: 100%; height: 64px; object-fit: cover; border-radius: 8px; background: var(--panel-2); display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--muted-2); }
.pp-name { font-weight: 600; font-size: .86rem; } .pp-price { color: var(--accent-2); font-weight: 700; } .pp-stock { font-size: .72rem; color: var(--muted-2); } .pp-stock.low { color: var(--warning); }
.qty-quick { display: flex; gap: 6px; margin-top: 10px; }
.pp-pick .row { grid-template-columns: 1fr 1fr; }

/* ---------- Autocomplete ---------- */
.ac-box { position: absolute; left: 0; right: 0; top: 100%; background: var(--panel); border: 1px solid var(--border-2); border-radius: 10px; z-index: 60; box-shadow: var(--shadow); max-height: 240px; overflow-y: auto; }
.ac-item { display: flex; gap: 8px; align-items: center; width: 100%; text-align: left; padding: 9px 12px; background: none; border: 0; border-bottom: 1px solid var(--border); color: var(--text); font: inherit; cursor: pointer; font-size: .86rem; }
.ac-item:hover { background: var(--panel-2); } .ac-item span { color: var(--muted); } .ac-bal { color: var(--warning); font-style: normal; font-size: .75rem; margin-left: auto; } .ac-blocked { color: var(--danger); font-style: normal; font-size: .75rem; }

/* ---------- Payments widget ---------- */
.pay-rows { display: flex; flex-direction: column; gap: 8px; }
.pay-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 8px; align-items: center; }
.pay-actions { display: flex; gap: 8px; margin: 10px 0; }
.pay-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.pay-summary > div { display: flex; flex-direction: column; } .pay-summary span { font-size: .72rem; color: var(--muted); text-transform: uppercase; } .pay-summary strong { font-size: 1.05rem; }
.pay-summary .danger strong { color: var(--danger); } .pay-change-row strong { color: var(--success); }

/* ---------- Bill summary ---------- */
.bill { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.bill-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: .92rem; gap: 10px; }
.bill-row:last-child { border-bottom: 0; }
.bill-row .input { width: 130px; text-align: right; padding: 6px 9px; }
.bill-row.total { font-size: 1.25rem; font-weight: 800; border-top: 2px solid var(--border-2); padding-top: 12px; margin-top: 6px; }
.bill-row.total strong { color: var(--accent-2); }
.bill-row .strike { text-decoration: line-through; color: var(--muted-2); margin-right: 6px; font-size: .85rem; }
.items-list { display: flex; flex-direction: column; gap: 6px; }
.item-row { display: grid; grid-template-columns: 1fr 70px 110px 100px 34px; gap: 8px; align-items: center; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; font-size: .88rem; }
.item-row .input { padding: 6px 8px; text-align: right; }
.item-row .name { font-weight: 600; } .item-row .name small { display: block; color: var(--muted-2); font-weight: 400; }
.item-row .line { text-align: right; font-weight: 700; }
.checkout-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; }
.big-timer { font-family: var(--display); font-size: 2.2rem; font-weight: 800; letter-spacing: .06em; color: var(--accent-2); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .88rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; }

/* ---------- Timeline (bookings) ---------- */
.timeline { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.tl-grid { display: grid; min-width: 900px; }
.tl-row { display: grid; grid-template-columns: 110px 1fr; border-bottom: 1px solid var(--border); }
.tl-row:last-child { border-bottom: 0; }
.tl-label { padding: 10px 12px; font-weight: 700; font-size: .85rem; border-right: 1px solid var(--border); display: flex; flex-direction: column; justify-content: center; }
.tl-label small { color: var(--muted-2); font-weight: 400; font-size: .7rem; }
.tl-track { position: relative; height: 46px; background-image: linear-gradient(90deg, var(--border) 1px, transparent 1px); }
.tl-head .tl-track { height: 30px; background: var(--bg-2); }
.tl-hour { position: absolute; top: 6px; font-size: .7rem; color: var(--muted); transform: translateX(-50%); white-space: nowrap; }
.tl-block { position: absolute; top: 7px; bottom: 7px; border-radius: 7px; font-size: .72rem; padding: 4px 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #fff; font-weight: 600; cursor: pointer; border: 1px solid rgba(255, 255, 255, .15); }
.tl-block.confirmed { background: linear-gradient(90deg, #1d4ed8, #2563eb); } .tl-block.pending { background: linear-gradient(90deg, #b45309, #d97706); } .tl-block.checked_in { background: linear-gradient(90deg, #0e7490, #0891b2); }
.tl-block.in_use { background: linear-gradient(90deg, #047857, #059669); } .tl-block.maintenance { background: repeating-linear-gradient(45deg, #334155, #334155 6px, #475569 6px, #475569 12px); }
.tl-block.selected { outline: 2px solid #fff; }
.tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--danger); z-index: 2; }
.tl-sel { position: absolute; top: 4px; bottom: 4px; background: rgba(0, 166, 214, .25); border: 1px dashed var(--accent); border-radius: 6px; pointer-events: none; }
.tl-track.free-pick { cursor: crosshair; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin: 10px 0; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- Misc ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: 0; color: var(--muted); padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--accent-2); border-bottom-color: var(--accent); }
.list { display: flex; flex-direction: column; gap: 8px; }
.list-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; font-size: .86rem; }
.list-item .li-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .list-item .li-main small { color: var(--muted); }
.list-item .li-side { text-align: right; white-space: nowrap; }
.perm-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.perm-group { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.perm-group h4 { font-size: .82rem; margin-bottom: 8px; color: var(--accent-2); }
.perm-group .check { font-size: .82rem; margin: 5px 0; }
.chart-box { position: relative; height: 260px; }
.progress { height: 8px; background: var(--border); border-radius: 8px; overflow: hidden; } .progress i { display: block; height: 100%; background: var(--accent); }
.stock-bar { display: flex; align-items: center; gap: 8px; }
.stock-bar .progress { flex: 1; min-width: 70px; }
.settings-group { margin-bottom: 22px; }
.settings-group h3 { font-size: .9rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.settings-grid .field.wide { grid-column: 1 / -1; }
.sticky-foot { position: sticky; bottom: 0; background: rgba(11, 18, 32, .92); backdrop-filter: blur(8px); padding: 12px 0; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--border); margin-top: 18px; }
.invoice-status { font-family: var(--display); }
kbd { background: var(--bg); border: 1px solid var(--border-2); border-radius: 5px; padding: 1px 6px; font-size: .75rem; }

/* ---------- Login ---------- */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; position: relative; overflow: hidden; }
.login-bg { position: absolute; inset: 0; background: radial-gradient(circle at 20% 20%, rgba(0, 166, 214, .25), transparent 40%), radial-gradient(circle at 80% 80%, rgba(139, 92, 246, .25), transparent 40%), var(--bg); }
.login-card { position: relative; width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--border-2); border-radius: 20px; padding: 32px; box-shadow: var(--shadow); margin: 16px; }
.login-logo { display: flex; justify-content: center; margin-bottom: 18px; } .login-logo img { height: 80px; border-radius: 12px; background: #fff; padding: 6px; }
.login-card h1 { text-align: center; font-size: 1.3rem; } .login-card .muted { text-align: center; margin-bottom: 18px; }
.login-card .form { margin-top: 14px; } .login-back { display: block; text-align: center; margin-top: 18px; font-size: .85rem; color: var(--muted); }
.login-card .alert { margin-bottom: 4px; }

/* ---------- Error ---------- */
.error-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.error-card { text-align: center; padding: 40px; max-width: 560px; }
.error-code { font-family: var(--display); font-size: 5rem; font-weight: 800; color: var(--accent); }
.error-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }
.error-trace { text-align: left; font-size: .72rem; background: var(--panel); padding: 12px; border-radius: 10px; overflow: auto; max-height: 300px; }

/* ---------- Print / invoice ---------- */
.invoice-page { background: #fff; color: #111; font-family: var(--font); }
.invoice { max-width: 420px; margin: 0 auto; padding: 24px; font-size: 13px; }
.invoice-a4 .invoice { max-width: 760px; }
.invoice h1 { font-size: 20px; text-align: center; }
.invoice .inv-head { text-align: center; border-bottom: 2px dashed #999; padding-bottom: 12px; margin-bottom: 12px; }
.invoice .inv-head img { height: 54px; }
.invoice table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.invoice th, .invoice td { padding: 5px 4px; text-align: left; border-bottom: 1px solid #e5e5e5; }
.invoice td.num, .invoice th.num { text-align: right; }
.invoice .totals td { border: 0; padding: 3px 4px; } .invoice .totals tr.grand td { font-size: 16px; font-weight: 800; border-top: 2px solid #111; padding-top: 6px; }
.invoice .inv-foot { text-align: center; margin-top: 16px; border-top: 2px dashed #999; padding-top: 10px; color: #555; }
.invoice .void-stamp { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%) rotate(-20deg); font-size: 60px; font-weight: 900; color: rgba(220, 38, 38, .25); border: 6px solid rgba(220, 38, 38, .25); padding: 10px 30px; border-radius: 12px; pointer-events: none; }
.invoice-actions { position: fixed; top: 12px; right: 12px; display: flex; gap: 8px; }
@media print { .invoice-actions, .no-print { display: none !important; } body { background: #fff; } .invoice { max-width: 100%; padding: 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-main { grid-template-columns: 1fr; } .checkout-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); } .sidebar.open { transform: none; box-shadow: var(--shadow); }
  .main { margin-left: 0; } .menu-toggle { display: inline-flex; } .user-meta { display: none; } .clock { display: none; }
  .content { padding: 14px; } .grid-2, .grid-3 { grid-template-columns: 1fr; } .row-2, .row-3 { grid-template-columns: 1fr; }
  .stations { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .item-row { grid-template-columns: 1fr 60px 90px 80px 30px; font-size: .8rem; }
  .pay-row { grid-template-columns: 1fr 1fr; } .pay-summary { grid-template-columns: repeat(2, 1fr); }
  .toasts { left: 12px; right: 12px; max-width: none; }
}
@media (max-width: 560px) { .stations { grid-template-columns: repeat(2, 1fr); } .station { min-height: 130px; padding: 10px; } .station .st-timer { font-size: 1.15rem; } .modal-body { padding: 14px; } .modal-foot .btn { flex: 1; } }
