/* Cafe admin: the GAMERSTOWN look (dark navy, blue accent, Manrope + DM Sans), after github.com/atharvkulkarni8a54-tech/GAMERSTOWN.
   The fonts come from Google Fonts when there is internet; without it the page falls back to Segoe UI. */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  --bg: #0a0f1a;
  --sidebar: #0d1422;
  --surface: #111b2b;       /* panels */
  --surface-2: #152136;
  --surface-3: #1a2a40;
  --line: #26344a;
  --line-2: #33445d;
  --text: #e8edf7;
  --text-hi: #f5f8ff;
  --muted: #91a0b7;
  --faint: #6e7e96;
  --accent: #5b8cff;        /* blue */
  --accent-hi: #8eb6ff;
  --accent-glow: rgba(71, 125, 255, .25);
  --cyan: #43d5e8;
  --ok: #31d69a;
  --warn: #ffc66d;
  --danger: #ff6d7f;
  --gold: #ffc66d;
  --radius: 16px;
  --shadow: 0 12px 32px rgba(0, 0, 0, .18);
  --shadow-hi: 0 18px 44px rgba(0, 0, 0, .35);
  --display: Manrope, "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --body: "DM Sans", Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; color: var(--text); font: 14px/1.55 var(--body); min-height: 100vh; -webkit-font-smoothing: antialiased;
  background: radial-gradient(ellipse at 70% -20%, rgba(48, 94, 170, .16), transparent 45%), var(--bg);
  background-attachment: fixed;
}
a { color: var(--accent-hi); text-decoration: none; }
a:hover { color: #b9d3ff; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -.5px; color: var(--text-hi); margin: 0 0 14px; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.1rem; margin-top: 28px; }
.kicker { font: 800 .66rem var(--body); letter-spacing: .15em; text-transform: uppercase; color: #6d9fff; margin: 0 0 7px; }
.muted { color: var(--muted); }
.tiny { font-size: .78rem; }
.center { text-align: center; }
.warn { color: var(--warn); }
code { font-family: var(--mono); font-size: .86em; background: var(--surface-3); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
pre { font: .85rem/1.5 var(--mono); background: #0b1422; border: 1px solid var(--line); padding: 12px; border-radius: 10px; overflow: auto; }
.ico { width: 18px; height: 18px; flex: none; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
::selection { background: #1b725c; color: #fff; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
  padding: 25px 16px 18px; background: linear-gradient(180deg, #101a2b 0%, #0c1422 100%); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 24px; color: #fff; }
.brand:hover { color: #fff; }
.brand-name { font: 800 1.15rem var(--display); letter-spacing: -.5px; line-height: 1.2; }
.logo {
  width: 40px; height: 40px; border-radius: 13px; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, #477dff, #40d7e8); color: #07111f; font: 900 .95rem var(--display);
  box-shadow: 0 8px 25px rgba(71, 125, 255, .19);
}
.logo::after { content: attr(data-initials); }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; border: 1px solid transparent;
  color: #aebbd0; font-weight: 600; transition: background .18s, color .18s;
}
.sidebar nav a:hover { background: #19263a; color: #fff; }
.sidebar nav a.active {
  color: #fff; background: linear-gradient(90deg, rgba(36, 75, 135, .66), rgba(29, 58, 94, .4)); border-color: #365c91;
  box-shadow: inset 3px 0 #63a0ff;
}
.sidebar nav a.active .ico { color: #8eb6ff; }
.me { display: flex; align-items: center; gap: 10px; padding: 16px 4px 2px; border-top: 1px solid var(--line); margin-top: 8px; }
.avatar { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font: 800 .9rem var(--display);
          background: #243a5c; color: #b8d4ff; flex: none; }
.me-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: 1; }
.me-text strong { font-size: .9rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text small { color: var(--muted); font-size: .74rem; }
.me form { margin: 0; }
.icon-btn { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: 9px; background: transparent;
            color: var(--muted); border: 1px solid transparent; box-shadow: none; }
.icon-btn:hover { background: #19263a; color: #fff; border-color: var(--line); box-shadow: none; transform: none; filter: none; }
.content { padding: 26px 30px 48px; max-width: 1320px; width: 100%; }

/* ---------- auth pages ---------- */
.auth-main { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; gap: 18px; }
.auth-brand { display: flex; align-items: center; gap: 12px; font: 800 1.3rem var(--display); letter-spacing: -.5px; color: #fff; }
.auth-card { width: 100%; max-width: 410px; padding: 30px 30px 28px; margin: 0; }
.auth-card h1 { font-size: 1.55rem; margin-bottom: 4px; }
.auth-card .stack { margin-top: 22px; }
.auth-inline .auth-card { margin: 10px 0; }
.narrow-flash { width: 100%; max-width: 410px; margin: 0; }
.status-line { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: .8rem; margin: 0; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(49, 214, 154, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(49, 214, 154, 0); } 100% { box-shadow: 0 0 0 0 rgba(49, 214, 154, 0); } }
@keyframes breathe { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }

/* ---------- surfaces ---------- */
.card {
  position: relative; background: linear-gradient(145deg, #131e30, #101827); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; margin: 20px 0; box-shadow: var(--shadow);
}
.card h2:first-child { margin-top: 0; }
.narrow { max-width: 410px; margin: 40px auto 12px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; align-items: end; }
.two-col { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.two-col form, .two-col .inline { margin: 0; }

/* ---------- forms ---------- */
label { display: flex; flex-direction: column; gap: 7px; font-size: .76rem; font-weight: 700; color: #aebbd0; }
input, select, textarea {
  font: 400 .95rem var(--body); color: #f0f4ff; background: #0b1422;
  border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 13px; transition: border-color .15s, box-shadow .15s;
  min-width: 0; outline: none;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { border-color: #6595ff; box-shadow: 0 0 0 3px rgba(86, 139, 255, .13); }
input[type=file] { padding: 7px; font-size: .82rem; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
input[type=date] { color-scheme: dark; }
select { appearance: none; padding-right: 32px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
textarea { width: 100%; font: .88rem/1.55 var(--mono); }
button {
  font: 700 .88rem var(--body); color: #fff; cursor: pointer; border: 1px solid transparent; border-radius: 10px; padding: 10px 16px;
  background: linear-gradient(135deg, #5b8cff, #4274e8); box-shadow: 0 6px 16px rgba(71, 125, 255, .15);
  transition: transform .18s, filter .18s, background .18s, border-color .18s;
}
button:hover { filter: brightness(1.1); transform: translateY(-1px); }
button:active { transform: translateY(0); }
button:disabled { cursor: not-allowed; opacity: .42; transform: none; }
button.small { padding: 6px 11px; font-size: .78rem; border-radius: 8px; }
button.btn-lg { padding: 13px 18px; font-size: .95rem; }
button.secondary { background: #1a2a40; color: #d9e5f8; border-color: #344a67; box-shadow: none; }
button.secondary:hover { background: #233852; filter: none; }
button.danger { background: #3a1c2a; border-color: #6b3041; color: #ffb8c2; box-shadow: none; }
button.danger:hover { background: #512334; filter: none; }
button.link { background: none; box-shadow: none; border: 0; color: var(--accent-hi); padding: 0; font-weight: 600; }
button.link:hover { color: #fff; filter: none; transform: none; }
details summary { cursor: pointer; color: var(--accent-hi); font-size: .84rem; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "▸ "; }
details[open] summary::before { content: "▾ "; }

/* ---------- tables ---------- */
table {
  width: 100%; border-collapse: separate; border-spacing: 0; background: linear-gradient(145deg, #131e30, #101827);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
th { text-align: left; padding: 13px 15px; font: 800 .64rem var(--body); letter-spacing: .1em; text-transform: uppercase;
     color: #7f91ac; border-bottom: 1px solid var(--line); }
td { padding: 12px 15px; border-bottom: 1px solid #202c40; vertical-align: middle; color: #d7e0ee; font-size: .9rem; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #172338; }
tr.inactive td { color: var(--faint); }
tr.reversal td { background: rgba(255, 109, 127, .06); }
tr.total-row td { font-weight: 700; color: #fff; background: rgba(91, 140, 255, .1); border-top: 1px solid var(--line-2); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }
td.actions { display: table-cell; white-space: nowrap; }  /* a flex <td> breaks the table */
td.actions > form, td.actions > details, td.actions > a { display: inline-block; margin: 3px 6px 3px 0; vertical-align: middle; }
input[type=file]::file-selector-button {
  font: 700 .78rem var(--body); color: #d9e5f8; background: #1a2a40; border: 1px solid #344a67;
  border-radius: 8px; padding: 5px 10px; margin-right: 10px; cursor: pointer;
}
input[type=file]::file-selector-button:hover { background: #233852; }
.inline { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- flash, tags, badges ---------- */
.flash { padding: 12px 14px; border-radius: 10px; border: 1px solid; margin: 0 0 18px; font-size: .9rem; line-height: 1.5; }
.flash.ok { background: #142d30; border-color: #285a59; color: #9af0d1; }
.flash.err { background: #331a22; border-color: #6b3041; color: #ffb8c2; }
.tag { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 99px; font: 800 .64rem var(--body); letter-spacing: .06em; }
.tag.cash { background: #183d35; color: #6de2b4; }
.tag.card { background: #17324a; color: #8fd8ff; margin: 0; padding: 3px 9px; border: 0; border-radius: 99px; box-shadow: none; }  /* not the .card panel */
.tag.upi { background: #232f5c; color: #a9c2ff; }
.tag.free { background: #45351d; color: #ffd084; }
.tag.reversal { background: #46202b; color: #ffb8c2; }
.big { font-size: 1.05rem; color: var(--muted); }
.big strong { font: 800 1.9rem var(--display); color: #fff; margin-left: 6px; letter-spacing: -.8px; vertical-align: -3px; }
.searchbar { display: flex; gap: 10px; margin: 0 0 16px; align-items: center; flex-wrap: wrap; }
.searchbar input { flex: 1; max-width: 360px; }
.searchbar .right { margin-left: auto; }

/* ---------- page head + stats ---------- */
.grid-head { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid #202d40; }
.grid-head h1, .grid-head h2 { margin: 0; }
.grid-head .muted { margin-left: auto; font-size: .82rem; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 24px; }
.stat { position: relative; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius);
        background: linear-gradient(145deg, #152237, #101a29); box-shadow: var(--shadow); overflow: hidden; }
.stat::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c, var(--accent)); }
.stat .n { font: 800 1.85rem/1.15 var(--display); color: #f5f8ff; letter-spacing: -.8px; }
.stat .l { font-size: .76rem; font-weight: 600; color: var(--muted); }
.legend, .dot { display: none; }

/* ---------- PC grid ---------- */
.pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.pc-card {
  --c: var(--faint);
  position: relative; border: 1px solid #2a3a50; border-radius: 13px; padding: 15px; background: #121e2f;
  display: flex; flex-direction: column; gap: 4px; transition: transform .18s, border-color .18s;
}
.pc-card:hover { transform: translateY(-2px); border-color: #527bb3; }
.pc-card.free { --c: var(--ok); }
.pc-card.in_use { --c: var(--warn); border-color: #77572c; background: linear-gradient(145deg, #302719, #1a202c); }
.pc-card.locked { --c: var(--accent); }
.pc-card.offline { --c: #6e7e96; opacity: .7; }
.pc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pc-top strong { font: 800 1.05rem var(--display); color: #f3f6ff; letter-spacing: -.3px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 99px; font: 800 .62rem var(--body);
         letter-spacing: .08em; text-transform: uppercase; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.pc-card.in_use .badge::before { animation: breathe 2.4s ease-in-out infinite; }
.pc-ip { font: .74rem var(--mono); color: #7fafff; }
.pc-user { font-weight: 700; margin-top: 10px; display: flex; align-items: center; gap: 8px; color: #f3f6ff; }
.pc-user .avatar { width: 28px; height: 28px; border-radius: 9px; font-size: .78rem; }
.pc-time { font: 800 1.7rem/1.15 var(--display); font-variant-numeric: tabular-nums; color: #f6f8ff; letter-spacing: -.5px; }
.pc-time.low { color: var(--warn); }
.pc-time.crit { color: var(--danger); animation: breathe 1.2s ease-in-out infinite; }
.pc-idle { color: #8f9fb7; margin-top: 10px; font-size: .86rem; }
.pc-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #253147; }
.small-note { margin-top: 18px; font-size: .8rem; color: var(--faint); }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; max-width: 380px; margin: 0; box-shadow: var(--shadow-hi); animation: rise .2s ease-out; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }
.empty { grid-column: 1 / -1; padding: 46px 18px; text-align: center; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); }

/* ---------- dialogs ---------- */
dialog { background: #121d2e; color: var(--text); border: 1px solid #2c4566; border-radius: 18px; padding: 24px; width: min(440px, calc(100vw - 32px));
         box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8), 0 0 60px -24px var(--accent-glow); }
dialog::backdrop { background: rgba(3, 6, 12, .7); backdrop-filter: blur(4px); }
dialog h2 { margin-top: 0; }
.row-buttons { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }

/* ---------- games ---------- */
.game-icon { width: 46px; height: 46px; object-fit: cover; border-radius: 12px; display: inline-grid; place-items: center; border: 1px solid var(--line-2); }
.game-icon.none { background: linear-gradient(135deg, #477dff, #40d7e8); color: #07111f; font: 900 1.05rem var(--display); }
.game-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.game-form .wide { min-width: 260px; flex: 1; }

/* ---------- daily totals ---------- */
.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 15px; margin: 18px 0 22px; }
.total-card { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, #152237, #101a29); }
.total-card .muted { font-size: .76rem; font-weight: 600; color: var(--muted); }
.total-card.main { border-color: #345d8c; background: radial-gradient(ellipse at 85% 10%, rgba(40, 85, 138, .46), transparent 50%), linear-gradient(145deg, #1b3657, #142239); }
.total-big { font: 800 1.85rem/1.2 var(--display); margin-top: 6px; color: #f5f8ff; letter-spacing: -.8px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }  /* short pages: don't stretch the menu */
  .content { min-width: 0; padding: 18px 16px 44px; }
  .grid-head .muted { margin-left: 0; width: 100%; }
  .sidebar { min-width: 0; position: sticky; top: 0; z-index: 5; height: auto; flex-direction: row; align-items: center; padding: 10px 12px; gap: 10px;
             overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0; }
  .brand-name { display: none; }
  .sidebar nav { flex-direction: row; gap: 4px; }
  .sidebar nav a { padding: 8px 10px; white-space: nowrap; }
  .sidebar nav a.active { box-shadow: inset 0 -3px #63a0ff; }
  .me { border-top: 0; padding: 0; margin: 0; }
  .me-text { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* ---------- till ---------- */
.till { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; margin-bottom: 10px; }
.till-menu h2 { margin-top: 6px; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.item-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 13px 14px; min-height: 86px;
            background: #121e2f; color: var(--text); border: 1px solid #2a3a50; border-radius: 13px; box-shadow: none; font: 600 .9rem var(--body); }
.item-btn:hover { border-color: #527bb3; filter: none; }
.item-btn:disabled { opacity: .42; }
.item-name { font: 700 .95rem var(--display); color: #f3f6ff; }
.item-price { font: 800 1.05rem var(--display); color: #8eb6ff; }
.item-stock { font-size: .72rem; color: var(--faint); }
.item-stock.low { color: var(--danger); font-weight: 700; }
.cart { position: sticky; top: 20px; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.cart h2 { margin: 0; }
.cart-table { box-shadow: none; background: #0b1422; }
.cart-table td { padding: 8px 10px; }
.cart-qty { white-space: nowrap; }
.cart-qty span { display: inline-block; min-width: 26px; text-align: center; font-weight: 800; }
.cart-qty button { padding: 2px 9px; }
.cart-amt { text-align: right; font-weight: 700; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin: 0; font-size: .78rem; font-weight: 700; color: var(--muted); }
.cart-total strong { font: 800 1.75rem var(--display); color: #fff; letter-spacing: -.8px; }
@media (max-width: 900px) { .till { grid-template-columns: minmax(0, 1fr); } .cart { position: static; } }

/* ---------- PC orders waiting for approval ---------- */
.requests { border-color: #705a2e; background: linear-gradient(145deg, #2a2418, #141b28); }
.requests .grid-head { margin-bottom: 4px; border: 0; padding: 0; }
.requests table { margin-top: 10px; }
.requests select { padding: 6px 28px 6px 9px; font-size: .84rem; }
.utr { font: 700 .82rem var(--mono); color: #6de2b4; }

/* ---------- revenue charts ---------- */
.chart-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin-bottom: 8px; }
.chart-head h2 { margin: 0; }
.legend-row { display: flex; gap: 16px; margin-left: auto; font-size: .84rem; color: var(--muted); }
.key { display: inline-flex; align-items: center; gap: 6px; }
.key i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: #223047; stroke-width: 1; }
.chart .axis { stroke: #3a4b64; stroke-width: 1; }
.chart .tick { font: 11px var(--body); fill: var(--muted); }
.chart .tick.dim { fill: var(--faint); font-size: 10px; }
.chart .hit { fill: transparent; }
.chart .bar:hover .hit { fill: rgba(91, 140, 255, .08); }
table.compact td, table.compact th { padding: 8px 12px; }
.chart-card details { margin-top: 10px; }
.chart-card details table { margin-top: 10px; }
.heat { display: grid; grid-template-columns: 40px repeat(24, minmax(0, 1fr)); gap: 2px; margin-top: 6px; }
.heat-h { font-size: 10px; color: var(--faint); height: 14px; }
.heat-d { font-size: .72rem; font-weight: 700; color: var(--muted); align-self: center; }
.heat-c { height: 24px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04); }
.heat-c:hover { outline: 2px solid #8eb6ff; outline-offset: -1px; }
.heat-scale { display: flex; align-items: center; gap: 2px; margin-top: 10px; }
.heat-scale i { width: 22px; height: 10px; border-radius: 2px; display: inline-block; }
.heat-scale span { margin: 0 8px; }
.two-reports { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
.two-reports .card { margin: 0; }
.pc-bars { display: flex; flex-direction: column; gap: 9px; }
.pc-bar { display: grid; grid-template-columns: 70px 1fr 70px; align-items: center; gap: 10px; font-size: .86rem; }
.pc-bar-name { font: 700 .84rem var(--display); color: #f3f6ff; }
.pc-bar-track { height: 10px; background: #1a2a40; border-radius: 99px; overflow: hidden; }
.pc-bar-track i { display: block; height: 100%; border-radius: 99px; }
.pc-bar-val { text-align: right; color: var(--muted); }
@media (max-width: 900px) { .heat { grid-template-columns: 32px repeat(24, minmax(0, 1fr)); gap: 1px; } .heat-h { font-size: 8px; } }

/* ---------- loyalty tiers ---------- */
.tier { display: inline-flex; padding: 3px 9px; border-radius: 99px; font: 800 .64rem var(--body); letter-spacing: .08em; text-transform: uppercase; }
.tier.bronze { background: #3b2618; color: #e3a172; }
.tier.silver { background: #29313d; color: #d2d9e3; }
.tier.gold { background: #45351d; color: #ffd084; }
.tier-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: -4px; }

/* ---------- WhatsApp receipt links, phone ---------- */
a.wa { display: inline-flex; padding: 4px 9px; border-radius: 8px; font: 700 .72rem var(--body); color: #6de2b4; background: #183d35; margin-right: 6px; }
a.wa:hover { background: #1f4d42; color: #9af0d1; }
.phone-form { margin: 0 0 6px; align-items: flex-end; }
.inline-label { flex-direction: row; align-items: center; gap: 8px; }

/* ---------- alerts (top of every admin page) ---------- */
.alert-bar { display: flex; flex-direction: column; gap: 8px; margin: 0 0 18px; position: sticky; top: 8px; z-index: 15; }
.alert { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; padding: 13px 16px; border: 1px solid; border-radius: 12px; box-shadow: var(--shadow-hi); }
.alert.priority { background: #3a1c2a; border-color: #b04a5c; color: #ffd6dc; animation: alert-pulse 1.6s ease-in-out 3; }
.alert.priority strong { color: #fff; }
.alert.info { background: #332a19; border-color: #705a2e; color: #f7d99a; }
.alert-time { font-size: .76rem; margin-left: 10px; opacity: .7; }
.alert-details { font-size: .84rem; margin-top: 3px; opacity: .9; }
.alert-tools { display: flex; gap: 12px; justify-content: flex-end; align-items: center; font-size: .84rem; }
@keyframes alert-pulse { 50% { box-shadow: 0 0 0 4px rgba(255, 109, 127, .25), var(--shadow-hi); } }

/* ---------- memory bar on PC cards ---------- */
.mem { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; margin-top: 8px; font-size: .72rem; color: var(--muted); }
.mem i { height: 6px; background: #1a2a40; border-radius: 99px; overflow: hidden; display: block; }
.mem b { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.mem.low b { background: var(--warn); }
.mem.crit b { background: var(--danger); }
.mem.crit { color: var(--danger); font-weight: 700; }

/* ---------- feature switches ---------- */
.feature-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
label.check { flex-direction: row; align-items: center; gap: 10px; font: 500 .92rem var(--body); color: var(--text); }
#featDialog { width: min(600px, calc(100vw - 32px)); }
.feat-table { box-shadow: none; background: #0b1422; }
.feat-table .seg { white-space: nowrap; }
.feat-table .seg label { display: inline-flex; flex-direction: row; align-items: center; gap: 4px; margin-right: 10px; font: 500 .82rem var(--body); color: var(--text); }

/* ---------- apps & permissions ---------- */
.perm-group { font-size: .95rem; margin: 18px 0 10px; color: #aebbd0; }
.feat-table th { background: rgba(91, 140, 255, .06); }
.game-icon.app-icon { object-fit: contain; padding: 6px; background: #101a2e; }
.tag.account { background: #3a2a52; color: #d9c2ff; }
.pc-card.admin { border-color: #d98b2b; box-shadow: 0 0 0 1px #d98b2b55 inset; }
.pc-card.admin .badge { background: #4a3214; color: #ffc278; }
.admin-note { background: #2b2214; border: 1px solid #d98b2b66; border-radius: 10px; padding: 8px 10px; margin: 6px 0; color: #ffd9a8; }
.ok-text { color: var(--ok); }
.note { border-top: 1px solid var(--line); padding: 8px 0; }
.note form.inline { display: inline; }
button.link { background: none; border: 0; color: var(--muted); padding: 0 4px; text-decoration: underline; cursor: pointer; }
.mini-chart { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; height: 120px; align-items: end; margin-top: 8px; }
.mini-col { display: flex; gap: 1px; align-items: end; height: 100%; }
.mini-col i { flex: 1; display: block; border-radius: 3px 3px 0 0; min-height: 1px; }
.mini-col i.h { background: var(--accent); }
.mini-col i.m { background: #c0832a; }
.mini-axis { display: flex; justify-content: space-between; margin-top: 4px; }
.legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: middle; }

/* ---------- shifts and roles ---------- */
.shift-pill { display: inline-block; margin: 0 0 14px; padding: 5px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600;
              background: rgba(49, 214, 154, .12); color: var(--ok); border: 1px solid rgba(49, 214, 154, .3); }
.shift-pill.shift-none { background: rgba(255, 109, 127, .12); color: var(--danger); border-color: rgba(255, 109, 127, .35); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.diff-bad { color: var(--danger); }
.diff-over { color: var(--warn); }
.role-card summary { display: flex; gap: 12px; align-items: baseline; font-size: 1rem; color: var(--text); }
.role-card[open] summary { margin-bottom: 14px; }
.perm-fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 12px; margin: 0; display: grid; gap: 6px; }
.perm-fieldset legend { padding: 0 6px; font-weight: 700; font-size: .85rem; color: var(--muted); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- packages ---------- */
.inline-pair { display: flex; gap: 6px; }
.inline-pair input { width: 5.5em; }
.days-pick { border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px 10px; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.days-pick legend { padding: 0 6px; font-size: .8rem; color: var(--muted); }

/* ---------- bookings ---------- */
.booking-line { color: var(--accent-hi); }
.timeline { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tl-row { display: grid; grid-template-columns: 110px 1fr; border-top: 1px solid var(--line); min-height: 38px; }
.tl-row:first-child { border-top: 0; }
.tl-pc { padding: 9px 12px; font-weight: 700; font-size: .85rem; border-right: 1px solid var(--line); }
.tl-track { position: relative; background: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / 24 - 1px), rgba(255,255,255,.05) calc(100% / 24 - 1px), rgba(255,255,255,.05) calc(100% / 24)); }
.tl-bar { position: absolute; top: 5px; bottom: 5px; border-radius: 7px; padding: 3px 7px; font-size: .72rem; overflow: hidden;
          white-space: nowrap; text-overflow: ellipsis; background: rgba(91,140,255,.28); border: 1px solid rgba(142,182,255,.55); color: #e8efff; }
.tl-bar.active { background: rgba(49,214,154,.25); border-color: rgba(49,214,154,.6); }
.tl-bar.done, .tl-bar.no_show, .tl-bar.cancelled { opacity: .45; }
.tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--danger); }
.tl-hours { display: grid; grid-template-columns: 110px repeat(24, 1fr); font-size: .68rem; color: var(--muted); padding: 4px 0; }
.tl-hours span { text-align: left; }

/* ---------- room map ---------- */
.view-switch { display: inline-flex; gap: 0; margin-left: auto; }
.view-switch button { border-radius: 0; }
.view-switch button:first-child { border-radius: 8px 0 0 8px; }
.view-switch button:last-child { border-radius: 0 8px 8px 0; }
.view-switch button.on { background: var(--accent); color: #fff; }
.view-switch + .muted { margin-left: 14px !important; }
.floor-tools { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.rooms { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.room { padding: 14px 18px 20px; }
.room h3 { margin: 0 0 12px; }
.room-floor { position: relative; min-width: 120px; min-height: 58px; }
.pc-dot { position: absolute; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; align-content: center;
          border: 2px solid #3a4a62; background: #18212f; cursor: pointer; user-select: none; touch-action: none; line-height: 1.05; }
.pc-dot b { font-size: .86rem; }
.pc-dot small { font-size: .6rem; color: var(--text); opacity: .85; }
.pc-dot i { position: absolute; top: -6px; right: -6px; font-style: normal; font-size: .7rem; }
.pc-dot.free { border-color: var(--ok); background: rgba(49,214,154,.14); }
.pc-dot.in_use { border-color: var(--warn); background: rgba(255,198,109,.18); }
.pc-dot.locked { border-color: var(--accent); background: rgba(91,140,255,.18); }
.pc-dot.admin { border-color: var(--danger); background: rgba(255,109,127,.2); }
.pc-dot.offline { opacity: .55; }
.arranging .pc-dot { cursor: grab; outline: 1px dashed rgba(255,255,255,.25); outline-offset: 3px; }
.pc-dot.dragging { z-index: 50; cursor: grabbing; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.flash-card { outline: 2px solid var(--accent-hi); outline-offset: 3px; }

.pc-grid[hidden], .floor[hidden] { display: none !important; }

.wide-dialog { width: min(1100px, 94vw); }

/* ---------- PC screens ---------- */
.slides { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.slide { display: grid; gap: 8px; }
.slide img, .bg-preview { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.bg-preview { max-width: 480px; }
.slide.inactive img { opacity: .35; }

/* ---------- Steam covers ---------- */
.steam-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.steam-pick { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: #152033; }
.steam-pick img { width: 120px; height: 45px; object-fit: cover; border-radius: 6px; }
.steam-pick.on { outline: 2px solid var(--accent-hi); }
