/* ============================================================
   PAINTBALL CITY KASA — Light Professional Design
   Clean · Readable · Corporate
   Fonts: Inter (body) · JetBrains Mono (numbers/codes)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* Backgrounds */
  --bg-base:    #f1f5f9;
  --bg-surface: #f8fafc;
  --bg-panel:   #ffffff;
  --bg-card:    #ffffff;
  --bg-hover:   #f1f5f9;
  --bg-input:   #ffffff;
  --bg-sidebar: #1e293b;
  --bg-overlay: rgba(15,23,42,0.5);

  /* Borders */
  --border:       #e2e8f0;
  --border-light: #f1f5f9;
  --border-dark:  #cbd5e1;

  /* Brand colors */
  --blue:       #2563eb;
  --blue-light: #eff6ff;
  --blue-dim:   #1d4ed8;
  --blue-hover: #dbeafe;

  --orange:       #ea580c;
  --orange-light: #fff7ed;
  --orange-dim:   #c2410c;

  --green:       #16a34a;
  --green-light: #f0fdf4;
  --green-dim:   #15803d;

  --red:       #dc2626;
  --red-light: #fef2f2;
  --red-dim:   #b91c1c;

  --amber:       #d97706;
  --amber-light: #fffbeb;

  --purple:       #7c3aed;
  --purple-light: #f5f3ff;

  /* Text */
  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --text-white:     #ffffff;

  /* Fonts */
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --font-display: 'Inter', system-ui, sans-serif;

  /* Radius */
  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow:     0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg:  0 10px 25px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.06);
  --shadow-xl:  0 20px 40px rgba(0,0,0,0.12);
  --shadow-blue: 0 4px 14px rgba(37,99,235,0.25);

  --sidebar-w: 240px;
  --topbar-h:  56px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Typography ── */
h1,h2,h3,h4,h5 { font-weight: 700; line-height: 1.2; color: var(--text-primary); }
.mono { font-family: var(--font-mono); }

/* ── App Layout ── */
.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
}

/* Fixed sidebar for admin pages */
body > aside.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
}
body > aside.sidebar ~ main {
  margin-left: var(--sidebar-w);
  padding: 32px 36px;
  min-height: 100vh;
  background: var(--bg-base);
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-logo .logo-mark {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-logo .logo-mark::before {
  content: '🎯';
  font-size: 1.1rem;
}
.sidebar-logo .logo-sub {
  font-size: 0.68rem;
  color: #94a3b8;
  margin-top: 2px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }

.nav-section {
  padding: 12px 16px 4px;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.12s;
  border-radius: 6px;
  margin: 1px 8px;
  cursor: pointer;
}
.nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: #ffffff;
}
.nav-item.active {
  background: var(--blue);
  color: #ffffff;
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.8rem;
  color: #64748b;
}
.sidebar-footer .user-name { color: #cbd5e1; font-weight: 600; font-size: 0.85rem; }

/* ── Main content (POS) ── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Topbar ── */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.topbar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.page-content { flex: 1; overflow-y: auto; padding: 24px; }

/* ── POS Layout ── */
.pos-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  height: calc(100vh - var(--topbar-h));
  overflow: hidden;
}
.pos-left {
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pos-right {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-surface);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.btn-primary:hover:not(:disabled) {
  background: var(--blue-dim);
  box-shadow: var(--shadow-blue);
}

.btn-secondary {
  background: var(--bg-panel);
  color: var(--text-secondary);
  border-color: var(--border-dark);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: #94a3b8;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-warning {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}
.btn-warning:hover:not(:disabled) { background: var(--orange-dim); }

.btn-danger {
  background: var(--red-light);
  color: var(--red);
  border-color: #fca5a5;
}
.btn-danger:hover:not(:disabled) {
  background: #fee2e2;
  border-color: var(--red);
}

.btn-success {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.btn-success:hover:not(:disabled) { background: var(--green-dim); }

.btn-sm  { padding: 5px 10px; font-size: 0.8rem; }
.btn-lg  { padding: 11px 22px; font-size: 0.95rem; }
.btn-xl  { padding: 14px 28px; font-size: 1.05rem; }
.btn-icon { padding: 6px; width: 34px; height: 34px; }
.btn-block { width: 100%; }

/* ── Forms & Inputs ── */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.form-input, .input {
  background: var(--bg-input);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: 9px 12px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  width: 100%;
  transition: border-color 0.12s, box-shadow 0.12s;
  outline: none;
}
.form-input:focus, .input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.form-input::placeholder, .input::placeholder { color: var(--text-muted); }
select.form-input, select.input { cursor: pointer; background-color: #fff; }
textarea.form-input { resize: vertical; min-height: 80px; }

.input-group { display: flex; flex-direction: column; gap: 5px; }
.input-label { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.input-search { padding-left: 36px; }
.input-wrapper { position: relative; }
.input-wrapper .input-icon {
  position: absolute; left: 11px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted); width: 15px; height: 15px;
  pointer-events: none;
}
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-grid  { display: grid; gap: 14px; }

/* Modal close */
.modal-close {
  background: transparent;
  border: 1px solid var(--border-dark);
  color: var(--text-muted);
  width: 30px; height: 30px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.12s; flex-shrink: 0;
}
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 0.72rem; font-weight: 600;
  border: 1px solid transparent;
}
.badge-green, .badge-success {
  background: var(--green-light); color: var(--green-dim); border-color: #bbf7d0;
}
.badge-red, .badge-danger {
  background: var(--red-light); color: var(--red-dim); border-color: #fca5a5;
}
.badge-amber, .badge-warning {
  background: var(--amber-light); color: #92400e; border-color: #fde68a;
}
.badge-blue, .badge-info {
  background: var(--blue-light); color: var(--blue-dim); border-color: #bfdbfe;
}
.badge-orange {
  background: var(--orange-light); color: var(--orange-dim); border-color: #fed7aa;
}
.badge-gray, .badge-default {
  background: #f8fafc; color: var(--text-secondary); border-color: var(--border-dark);
}
.badge-purple {
  background: var(--purple-light); color: var(--purple); border-color: #ddd6fe;
}

/* ── Page Header ── */
.page-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 24px;
}
.page-title {
  font-size: 1.6rem; font-weight: 800;
  color: var(--text-primary); line-height: 1;
}

/* ── Data Table ── */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th {
  text-align: left; padding: 10px 14px;
  font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  background: var(--bg-surface);
  white-space: nowrap;
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  color: var(--text-primary);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f8fafc; }

/* ── Alerts ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid;
  display: flex; align-items: center; gap: 8px;
}
.alert-success { background: var(--green-light); border-color: #bbf7d0; color: #166534; }
.alert-error   { background: var(--red-light);   border-color: #fca5a5; color: #991b1b; }
.alert-info    { background: var(--blue-light);  border-color: #bfdbfe; color: #1e40af; }
.alert-warning { background: var(--amber-light); border-color: #fde68a; color: #92400e; }

/* ── Toast ── */
.toast-container {
  position: fixed; top: 16px; right: 16px;
  z-index: 999;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.875rem;
  min-width: 280px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  animation: slideInRight 0.2s ease;
  pointer-events: all;
}
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.toast-success { border-left: 4px solid var(--green); }
.toast-error   { border-left: 4px solid var(--red);   }
.toast-warning { border-left: 4px solid var(--amber);  }
.toast-info    { border-left: 4px solid var(--blue);   }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 520px; max-height: 90vh;
  display: flex; flex-direction: column;
  animation: slideUp 0.18s ease;
  box-shadow: var(--shadow-xl);
}
@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.modal-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.modal-body  { padding: 22px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex; gap: 8px; justify-content: flex-end; flex-shrink: 0;
  background: var(--bg-surface);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 920px; }

/* ── Player items (POS left) ── */
.player-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.1s;
}
.player-item:hover { background: var(--bg-hover); }
.player-item.selected {
  background: var(--blue-hover);
  border-left: 3px solid var(--blue);
}
.player-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--blue-light);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
  color: var(--blue); flex-shrink: 0;
  border: 2px solid #bfdbfe;
}
.player-info { flex: 1; min-width: 0; }
.player-name { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-primary); }
.player-meta { font-size: 0.72rem; color: var(--text-muted); font-family: var(--font-mono); margin-top: 1px; }
.player-total { font-family: var(--font-mono); font-size: 0.85rem; color: var(--orange); font-weight: 700; flex-shrink: 0; }

/* ── Product tiles ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px; padding: 12px;
}
.product-tile {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  transition: all 0.12s;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
}
.product-tile:hover {
  border-color: var(--blue);
  box-shadow: 0 2px 8px rgba(37,99,235,0.12);
  transform: translateY(-1px);
}
.product-tile-img { width: 48px; height: 48px; object-fit: cover; border-radius: var(--radius-sm); background: var(--bg-hover); }
.product-tile-img-placeholder { width: 48px; height: 48px; background: var(--bg-hover); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 1.4rem; }
.product-tile-name { font-size: 0.78rem; font-weight: 600; line-height: 1.3; color: var(--text-primary); }
.product-tile-price { font-family: var(--font-mono); font-size: 0.85rem; font-weight: 700; color: var(--blue); }

/* ── Category header ── */
.category-section { padding: 0; }
.category-header {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  cursor: pointer; user-select: none;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}
.category-header-name { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); }
.category-header.vip .category-header-name { color: var(--orange); }

/* ── Player header (POS right top) ── */
.player-header {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.player-header-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--blue-light);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; color: var(--blue);
  border: 2px solid #bfdbfe; flex-shrink: 0;
}
.player-header-info { flex: 1; min-width: 0; }
.player-header-name { font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.player-header-meta { font-size: 0.72rem; color: var(--text-muted); font-family: var(--font-mono); }
.player-header-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── POS Footer ── */
.pos-footer {
  background: var(--bg-panel);
  border-top: 2px solid var(--border);
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-shrink: 0;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
}
.pos-footer-total { display: flex; flex-direction: column; }
.pos-footer-total-label { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.pos-footer-total-value { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }
.pos-footer-total-lifetime { font-size: 0.7rem; color: var(--text-muted); font-family: var(--font-mono); }

/* ── Stats row ── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.stat-item {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  border-top: 3px solid var(--blue);
}
.stat-value { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 700; color: var(--blue); }
.stat-label { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; }

/* ── Section divider ── */
.section-divider {
  padding: 8px 14px;
  background: var(--bg-surface);
  font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 6px;
}

/* ── Divider ── */
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.divider-text {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-muted); font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── QR wrapper ── */
.qr-wrapper { background: #fff; padding: 12px; border-radius: var(--radius); display: inline-block; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }

/* ── Payment methods ── */
.payment-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.payment-method {
  background: var(--bg-panel);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 8px;
  cursor: pointer; text-align: center;
  transition: all 0.12s;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.payment-method:hover { border-color: var(--blue); background: var(--blue-light); }
.payment-method.selected { border-color: var(--blue); background: var(--blue-light); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.payment-method-icon { font-size: 2rem; }
.payment-method-name { font-size: 0.82rem; font-weight: 700; color: var(--text-secondary); }
.payment-method.selected .payment-method-name { color: var(--blue); }

/* ── Checkbox ── */
.checkbox-group { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.checkbox-group input[type=checkbox] { display: none; }
.checkbox-box {
  width: 18px; height: 18px;
  border: 2px solid var(--border-dark);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  flex-shrink: 0; margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.12s;
}
.checkbox-group input[type=checkbox]:checked + .checkbox-box { background: var(--blue); border-color: var(--blue); }
.checkbox-group input[type=checkbox]:checked + .checkbox-box::after { content: '✓'; color: #fff; font-size: 11px; font-weight: 700; }
.checkbox-label { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.5; }

/* ── Scroll area ── */
.scroll-area { overflow-y: auto; flex: 1; }

/* ── Empty state ── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; padding: 48px 20px;
  color: var(--text-muted); text-align: center;
}
.empty-state svg { width: 48px; height: 48px; opacity: 0.3; }
.empty-state-text { font-size: 0.875rem; }

/* ── Generic table ── */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  background: var(--bg-surface);
  padding: 10px 14px; text-align: left;
  font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.875rem; vertical-align: middle;
  color: var(--text-primary);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #f8fafc; }

/* ── Pulse animation (public game) ── */
@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0.4); }
  50%       { box-shadow: 0 0 0 10px rgba(22,163,74,0); }
}
@keyframes pulse-blue {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37,99,235,0.4); }
  50%       { box-shadow: 0 0 0 10px rgba(37,99,235,0); }
}
.pulse-green { animation: pulse-green 2s infinite; }
.pulse-blue  { animation: pulse-blue  2s infinite; }

/* ── Auth pages ── */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f5e9 100%);
  padding: 20px;
}
.auth-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%; max-width: 440px;
  box-shadow: var(--shadow-xl);
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo-mark {
  font-size: 1.8rem; font-weight: 800;
  color: var(--text-primary); letter-spacing: -0.02em;
}
.auth-logo-mark span { color: var(--blue); }
.auth-logo-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

/* Register page */
.register-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f5e9 100%);
  padding: 40px 20px;
  display: flex; align-items: flex-start; justify-content: center;
}
.register-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px; width: 100%; max-width: 640px;
  box-shadow: var(--shadow-xl); margin: 0 auto;
}

/* ── Player profile (mobile) ── */
.profile-page {
  min-height: 100vh;
  background: var(--bg-base);
  padding: 16px; max-width: 480px; margin: 0 auto;
}
.profile-header {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px; text-align: center;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.profile-qr { display: inline-block; background: #fff; padding: 12px; border-radius: var(--radius); margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.profile-name { font-size: 1.6rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.02em; }
.profile-code { font-family: var(--font-mono); font-size: 0.82rem; color: var(--blue); margin-top: 5px; }
.profile-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.profile-stat-card {
  background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px; text-align: center;
  box-shadow: var(--shadow-sm); border-top: 3px solid var(--blue);
}
.profile-stat-value { font-family: var(--font-mono); font-size: 1.4rem; font-weight: 700; color: var(--blue); }
.profile-stat-label { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 4px; font-weight: 500; }

/* Join game button */
.join-game-btn {
  width: 100%; padding: 18px;
  font-family: var(--font-body); font-size: 1rem; font-weight: 700;
  background: var(--green); color: #fff;
  border: none; border-radius: var(--radius-lg);
  cursor: pointer; margin-bottom: 14px; transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(22,163,74,0.3);
}
.join-game-btn:hover { background: var(--green-dim); box-shadow: 0 6px 20px rgba(22,163,74,0.4); transform: translateY(-1px); }

/* ── Dashboard session cards ── */
.session-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px; margin-top: 16px;
}
.session-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px; cursor: pointer; transition: all 0.15s;
  text-decoration: none; display: block;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--blue);
}
.session-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--blue); }
.session-card.public { border-top-color: var(--green); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .sidebar { display: none; }
  body > aside.sidebar ~ main { margin-left: 0; padding: 16px; }
  .pos-layout { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .data-table th, .data-table td { padding: 8px 10px; }
}

/* ── Utilities ── */
.text-blue      { color: var(--blue); }
.text-orange    { color: var(--orange); }
.text-green     { color: var(--green); }
.text-red       { color: var(--red); }
.text-amber     { color: var(--amber); }
.text-muted     { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-mono      { font-family: var(--font-mono); }
.text-display   { font-family: var(--font-display); font-weight: 700; }
.text-sm        { font-size: 0.8rem; }
.text-xs        { font-size: 0.7rem; }
.text-lg        { font-size: 1.1rem; }
.text-xl        { font-size: 1.3rem; }
.text-right     { text-align: right; }
.text-center    { text-align: center; }
.fw-600         { font-weight: 600; }
.fw-700         { font-weight: 700; }
.fw-800         { font-weight: 800; }
.mt-4           { margin-top: 4px; }
.mt-8           { margin-top: 8px; }
.mt-12          { margin-top: 12px; }
.mt-16          { margin-top: 16px; }
.mt-24          { margin-top: 24px; }
.mb-8           { margin-bottom: 8px; }
.mb-12          { margin-bottom: 12px; }
.mb-16          { margin-bottom: 16px; }
.flex           { display: flex; }
.flex-col       { flex-direction: column; }
.items-center   { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8          { gap: 8px; }
.gap-12         { gap: 12px; }
.gap-16         { gap: 16px; }
.hidden         { display: none !important; }
.w-full         { width: 100%; }
.overflow-hidden { overflow: hidden; }
.rounded        { border-radius: var(--radius); }
.border-bottom  { border-bottom: 1px solid var(--border-light); }
.p-12           { padding: 12px; }
.p-16           { padding: 16px; }
.p-20           { padding: 20px; }
.relative       { position: relative; }
.z-1            { position: relative; z-index: 1; }

/* ── Paid player item ── */
.player-item--paid {
  background: #f0fdf4;
  cursor: default;
}
.player-item--paid:hover {
  background: #dcfce7;
}
