:root {
  --bg-main: #090e1a;
  --bg-sidebar: #0f172a;
  --bg-card: #151f32;
  --bg-card-hover: #1c2942;
  --bg-input: #0b1324;
  --border: #263552;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;

  /* Requested Billiard Table Status Colors */
  --green: #10b981;
  --green-bg: rgba(16, 185, 129, 0.13);
  --green-border: rgba(16, 185, 129, 0.55);

  --blue: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.15);
  --blue-border: rgba(59, 130, 246, 0.6);

  --yellow: #f59e0b;
  --yellow-bg: rgba(245, 158, 11, 0.15);
  --yellow-border: rgba(245, 158, 11, 0.65);

  --danger: #ef4444;
  --accent: #10b981;
  --primary: #3b82f6;
  --purple: #8b5cf6;
  --radius: 14px;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 14px;
}

.hidden {
  display: none !important;
}

/* ---------- LOGIN SCREEN ---------- */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.16), transparent 45%),
              radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.16), transparent 45%),
              var(--bg-main);
}

.login-box {
  width: 100%;
  max-width: 410px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 34px 30px;
  box-shadow: var(--shadow);
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.logo-ball {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #047857);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.login-hint {
  margin-top: 18px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px dashed var(--border);
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---------- APP LAYOUT ---------- */
.app-shell {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.brand-title {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.4px;
}

.brand-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  overflow-y: auto;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.nav-btn.active {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--bg-card);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.role-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 700;
  text-transform: uppercase;
}
.role-admin { background: rgba(139, 92, 246, 0.2); color: #c4b5fd; }
.role-operator { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }

/* ---------- MAIN CONTENT & TOPBAR ---------- */
.main-area {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.shift-indicator {
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.clock-box {
  font-family: 'Consolas', monospace;
  font-size: 16px;
  font-weight: 700;
  color: #e2e8f0;
  padding: 6px 12px;
  background: var(--bg-card);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.content-wrap {
  padding: 22px 24px 48px;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

/* ---------- LEGEND PILLS ---------- */
.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 99px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-green { background: var(--green); box-shadow: 0 0 8px var(--green); }
.dot-blue { background: var(--blue); box-shadow: 0 0 8px var(--blue); }
.dot-yellow { background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }

.saboy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 5px 14px;
  border-radius: 99px;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  border: 1px solid #fbbf24;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.35);
  transition: filter 0.12s ease, transform 0.08s ease;
}
.saboy-btn:hover {
  filter: brightness(1.08);
}
.saboy-btn:active {
  transform: scale(0.97);
}

/* ---------- BILLIARD TABLES GRID (REALISTIC BILLIARD TABLE DESIGN) ---------- */
.tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 22px;
}

/* Outer Mahogany Wood Frame */
.billiard-card {
  border-radius: 26px;
  padding: 15px;
  position: relative;
  display: flex;
  flex-direction: column;
  contain: layout style;
  background: linear-gradient(145deg, #98462d 0%, #803721 48%, #652816 100%);
  border: 2px solid #4a1c0f;
  box-shadow:
    inset 0 2px 2px rgba(255, 218, 185, 0.28),
    inset 0 -3px 5px rgba(0, 0, 0, 0.55),
    0 10px 24px rgba(0, 0, 0, 0.45);
}

.billiard-card:hover {
  border-color: #6b2b18;
}

/* Subtle Brass Sights (Markalar) on Wood Rails */
.rail-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e2c286;
  opacity: 0.7;
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}
.rail-dot-t1 { top: 5px; left: 27%; }
.rail-dot-t2 { top: 5px; right: 27%; }
.rail-dot-b1 { bottom: 5px; left: 27%; }
.rail-dot-b2 { bottom: 5px; right: 27%; }

/* 6 Billiard Pockets (Luzalar) with Brass/Gold Rim */
.pocket {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, #262a33 0%, #0d0f13 58%, #050608 100%);
  border: 2px solid #d9b87c;
  z-index: 4;
  pointer-events: none;
}

.pocket-tl,
.pocket-tr,
.pocket-bl,
.pocket-br {
  width: 30px;
  height: 30px;
}

.pocket-tl {
  top: 4px;
  left: 4px;
  box-shadow: -2px -2px 0 1px #e5c892, 0 2px 5px rgba(0, 0, 0, 0.55), inset 0 3px 6px rgba(0, 0, 0, 0.92);
}
.pocket-tr {
  top: 4px;
  right: 4px;
  box-shadow: 2px -2px 0 1px #e5c892, 0 2px 5px rgba(0, 0, 0, 0.55), inset 0 3px 6px rgba(0, 0, 0, 0.92);
}
.pocket-bl {
  bottom: 4px;
  left: 4px;
  box-shadow: -2px 2px 0 1px #e5c892, 0 2px 5px rgba(0, 0, 0, 0.55), inset 0 3px 6px rgba(0, 0, 0, 0.92);
}
.pocket-br {
  bottom: 4px;
  right: 4px;
  box-shadow: 2px 2px 0 1px #e5c892, 0 2px 5px rgba(0, 0, 0, 0.55), inset 0 3px 6px rgba(0, 0, 0, 0.92);
}

.pocket-tc,
.pocket-bc {
  width: 27px;
  height: 27px;
  left: 50%;
  transform: translateX(-50%);
}
.pocket-tc {
  top: 2px;
  box-shadow: 0 -1.5px 0 1px #e5c892, 0 2px 5px rgba(0, 0, 0, 0.55), inset 0 3px 6px rgba(0, 0, 0, 0.92);
}
.pocket-bc {
  bottom: 2px;
  box-shadow: 0 1.5px 0 1px #e5c892, 0 2px 5px rgba(0, 0, 0, 0.55), inset 0 3px 6px rgba(0, 0, 0, 0.92);
}

/* Inner Cushion Bevel + Cloth Surface (Movut) */
.table-felt {
  flex: 1;
  border-radius: 14px;
  padding: 18px 18px 19px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  position: relative;
  z-index: 1;
  box-shadow:
    inset 0 4px 12px rgba(0, 0, 0, 0.46),
    inset 0 0 34px rgba(0, 0, 0, 0.28),
    0 0 0 1.5px rgba(0, 0, 0, 0.42);
}

/* GREEN = BO'SH (Classic Emerald Billiard Cloth like the photo) */
.billiard-card.state-green .table-felt {
  background: radial-gradient(ellipse at 50% 48%, #68c455 0%, #449a38 48%, #2e7525 84%, #21591a 100%);
  border: 7px solid #4fae42;
}
.billiard-card.state-green .status-pill {
  background: rgba(7, 22, 12, 0.76);
  color: #86efac;
  border: 1px solid rgba(134, 239, 172, 0.55);
}

/* BLUE = BRONLANGAN (Tournament Blue Billiard Cloth) */
.billiard-card.state-blue .table-felt {
  background: radial-gradient(ellipse at 50% 48%, #54a8ff 0%, #2a74d1 48%, #1c5199 84%, #143c73 100%);
  border: 7px solid #3c8df2;
}
.billiard-card.state-blue .status-pill {
  background: rgba(8, 17, 36, 0.78);
  color: #93c5fd;
  border: 1px solid rgba(147, 197, 253, 0.6);
}

/* YELLOW = O'YINDA (Warm Golden / Amber Billiard Cloth) */
.billiard-card.state-yellow .table-felt {
  background: radial-gradient(ellipse at 50% 48%, #ebb134 0%, #bf8013 50%, #8b590b 85%, #694207 100%);
  border: 7px solid #df9f22;
}
.billiard-card.state-yellow .status-pill {
  background: rgba(24, 15, 5, 0.8);
  color: #fde68a;
  border: 1px solid rgba(253, 230, 138, 0.65);
}

@keyframes pulseAlert {
  0%, 100% {
    border-color: #f59e0b;
    outline: 2px solid rgba(239, 68, 68, 0.25);
  }
  50% {
    border-color: #ef4444;
    outline: 4px solid rgba(239, 68, 68, 0.85);
  }
}

.billiard-card.time-up,
.ps-card.time-up .ps-chassis {
  animation: pulseAlert 1.2s infinite;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.table-title {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
}

.table-cat {
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.86);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  margin-top: 2px;
}

.status-pill {
  padding: 5px 11px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.table-felt .card-top .btn-ghost,
.ps-face .card-top .btn-ghost {
  background: rgba(8, 14, 24, 0.72);
  border-color: rgba(255, 255, 255, 0.22);
}

.rates-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(8, 14, 24, 0.76);
  padding: 9px 12px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 12.5px;
}

.rates-bar div span {
  display: block;
  color: #cbd5e1;
  font-size: 11px;
}

.free-table-center {
  padding: 20px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
}

.cue-ball-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #4b5563 0%, #111827 55%, #030712 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  border: 2px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.timer-panel {
  background: rgba(8, 13, 23, 0.86);
  border: 1px solid rgba(253, 230, 138, 0.35);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timer-big {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 26px;
  font-weight: 800;
  color: #fde68a;
  letter-spacing: 1px;
}

.countdown-tag {
  font-family: 'Consolas', monospace;
  font-size: 13px;
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(245, 158, 11, 0.24);
  color: #fcd34d;
  font-weight: 700;
}
.countdown-tag.expired {
  background: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.bill-breakdown {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.16);
}

.bill-row {
  display: flex;
  justify-content: space-between;
}

.bill-total {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  margin-top: 3px;
}

.reservation-box {
  background: rgba(8, 14, 26, 0.84);
  border: 1px solid rgba(147, 197, 253, 0.4);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 13px;
  line-height: 1.45;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}

.card-actions .btn {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.32);
}

.card-actions .btn-ghost {
  background: rgba(8, 14, 24, 0.74);
  border-color: rgba(255, 255, 255, 0.22);
}

.card-actions .span-2 {
  grid-column: span 2;
}

/* ---------- BUTTONS & INPUTS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.08s ease;
  color: #fff;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.72; cursor: wait; transform: none; }

.btn-sm { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
.btn-green { background: #059669; border-color: #10b981; }
.btn-blue { background: #2563eb; border-color: #3b82f6; }
.btn-yellow { background: #d97706; border-color: #f59e0b; color: #fff; }
.btn-red { background: #dc2626; border-color: #ef4444; }
.btn-purple { background: #7c3aed; border-color: #8b5cf6; }
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
  color: var(--text-main);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 13px;
}

.form-group label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-main);
  outline: none;
}
.input:focus {
  border-color: var(--primary);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* ---------- BAR & PRODUCTS ---------- */
.bar-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  align-items: start;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 14px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  contain: layout style;
}
.product-card:hover { border-color: #3b82f6; }

.product-img {
  height: 120px;
  width: 100%;
  background: #0b1324;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  overflow: hidden;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-body {
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.product-name {
  font-weight: 700;
  font-size: 14px;
}

.product-price {
  color: #34d399;
  font-weight: 800;
  font-size: 15px;
}

.stock-tag {
  font-size: 11.5px;
  color: var(--text-muted);
}
.stock-tag.low { color: #f87171; font-weight: 700; }

.pos-cart {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  position: sticky;
  top: 84px;
}

/* ---------- STATS & TABLES ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 16px 18px;
}
.kpi-card.highlight {
  border-color: rgba(16, 185, 129, 0.55);
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.16), var(--bg-card));
}

.kpi-label {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.kpi-val {
  font-size: 23px;
  font-weight: 800;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 18px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.data-table th, .data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.data-table th {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
}

/* ---------- MODALS ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px;
  box-shadow: var(--shadow);
}

.modal-card.wide {
  max-width: 780px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.chip {
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-main);
  cursor: pointer;
  font-weight: 600;
  font-size: 12.5px;
}
.chip.active, .chip:hover {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.2);
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
}
.toast {
  padding: 12px 16px;
  border-radius: 11px;
  background: #1e293b;
  border-left: 4px solid var(--green);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.toast.error { border-left-color: var(--danger); }

/* ---------- PAGINATION ---------- */
.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.pagination-bar:empty {
  display: none;
}
.pagination-pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-main);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.page-btn:hover:not(:disabled) {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.18);
}
.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.page-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.page-dots {
  color: var(--text-muted);
  padding: 0 4px;
  font-weight: 700;
}

/* ---------- CATEGORY COMBOBOX (SELECT OR MANUAL INPUT) ---------- */
.cat-combo {
  position: relative;
}
.cat-combo-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.cat-combo-input-wrap .input {
  padding-right: 38px;
}
.cat-combo-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.cat-combo-toggle:hover {
  background: rgba(59, 130, 246, 0.22);
  color: var(--text-main);
}
.cat-combo-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: #0f172a;
  border: 1px solid var(--primary);
  border-radius: 11px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  z-index: 50;
  padding: 5px;
}
.cat-combo-item {
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 13.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-main);
}
.cat-combo-item:hover,
.cat-combo-item.selected {
  background: rgba(59, 130, 246, 0.22);
  color: #93c5fd;
}
.cat-combo-item.custom-new {
  border-top: 1px dashed var(--border);
  margin-top: 4px;
  color: #6ee7b7;
  font-weight: 600;
}

/* ---------- BAR ITEMS BREAKDOWN & BADGES ---------- */
.attach-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #7c3aed;
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 99px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.checkout-bar-list {
  margin: 6px 0 4px;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 185px;
  overflow-y: auto;
}
.checkout-bar-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
  padding-bottom: 4px;
}
.checkout-bar-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.receipt-bar-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 170px;
}
.receipt-bar-sublist {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11.5px;
  color: var(--text-muted);
}
.receipt-bar-subitem {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 2px 6px;
  border-radius: 5px;
}

/* ---------- BAR VIEW SWITCHER (PALITRA / SPISOK / TABLITSA) ---------- */
.view-mode-switch {
  display: inline-flex;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}
.vm-btn {
  padding: 6px 11px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.vm-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}
.vm-btn.active {
  background: var(--primary);
  color: #fff;
}

/* SPISOK (LIST) VIEW */
.products-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.product-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 10px 14px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.product-list-row:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
}
.product-list-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.product-thumb-sm {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.product-thumb-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-list-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.product-list-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.sold-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
}

/* TABLITSA (TABLE) VIEW */
.bar-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 15px;
  overflow-x: auto;
}
.bar-table-wrap .data-table th,
.bar-table-wrap .data-table td {
  padding: 10px 12px;
  vertical-align: middle;
}
.bar-table-wrap .data-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.07);
}

/* ---------- TOP SELLING PRODUCTS PANEL ---------- */
.top-sellers-panel {
  padding: 14px 16px;
  margin-bottom: 18px;
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.09), var(--bg-card));
  border-color: rgba(245, 158, 11, 0.35);
}
.top-sellers-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.top-sellers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.top-seller-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(9, 14, 26, 0.65);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.top-seller-card:hover {
  border-color: #f59e0b;
  transform: translateY(-1px);
}
.rank-badge {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
  background: rgba(148, 163, 184, 0.15);
  color: #e2e8f0;
}
.rank-badge.rank-1 { background: rgba(245, 158, 11, 0.28); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.6); }
.rank-badge.rank-2 { background: rgba(148, 163, 184, 0.28); color: #f1f5f9; border: 1px solid rgba(203, 213, 225, 0.5); }
.rank-badge.rank-3 { background: rgba(180, 83, 9, 0.32); color: #fdba74; border: 1px solid rgba(251, 146, 60, 0.5); }

/* ---------- HALL LAYOUT TOOLBAR, COLUMNS & DRAG-REORDER ---------- */
.hall-layout-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.12), var(--bg-card));
  border: 1px solid rgba(59, 130, 246, 0.45);
}
.hall-layout-group {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.hall-layout-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
}
.tables-grid-wrap {
  width: 100%;
}

/* Column Layout Presets */
.tables-grid.cols-1 {
  grid-template-columns: minmax(0, 780px);
  justify-content: center;
  gap: 24px;
}
.tables-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.tables-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.tables-grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

/* Compact proportional adaptation when 4 billiard tables are in 1 row */
.tables-grid.cols-4 .billiard-card {
  padding: 11px;
  border-radius: 20px;
}
.tables-grid.cols-4 .table-felt {
  padding: 13px 12px 14px;
  border-width: 5px;
  gap: 9px;
}
.tables-grid.cols-4 .pocket-tl,
.tables-grid.cols-4 .pocket-tr,
.tables-grid.cols-4 .pocket-bl,
.tables-grid.cols-4 .pocket-br {
  width: 22px;
  height: 22px;
}
.tables-grid.cols-4 .pocket-tc,
.tables-grid.cols-4 .pocket-bc {
  width: 20px;
  height: 20px;
}
.tables-grid.cols-4 .table-title {
  font-size: 16px;
}
.tables-grid.cols-4 .table-cat {
  font-size: 11px;
}
.tables-grid.cols-4 .status-pill {
  font-size: 10.5px;
  padding: 4px 8px;
}
.tables-grid.cols-4 .rates-bar {
  padding: 7px 9px;
  font-size: 11.5px;
}
.tables-grid.cols-4 .timer-big {
  font-size: 20px;
}
.tables-grid.cols-4 .card-actions .btn {
  padding: 6px 8px;
  font-size: 11.5px;
}

/* Drag & Reorder visual states */
.billiard-card.layout-editing {
  cursor: grab;
  outline: 2px dashed rgba(147, 197, 253, 0.55);
  outline-offset: 3px;
}
.billiard-card.layout-editing:active {
  cursor: grabbing;
}
.billiard-card.dragging {
  opacity: 0.48;
  transform: scale(0.97);
}
.billiard-card.drag-over {
  outline: 3px solid #fde68a;
  outline-offset: 4px;
}
.move-order-btns {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(8, 14, 24, 0.78);
  padding: 2px 4px;
  border-radius: 8px;
  border: 1px solid rgba(253, 230, 138, 0.45);
}
.move-order-btn {
  border: none;
  background: transparent;
  color: #fde68a;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  cursor: pointer;
}
.move-order-btn:hover:not(:disabled) {
  background: rgba(253, 230, 138, 0.2);
}
.move-order-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ---------- FULL SCREEN LOCK OVERLAY ---------- */
.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 500;
  background:
    radial-gradient(circle at top, rgba(16, 185, 129, 0.18), transparent 50%),
    rgba(5, 9, 18, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lock-box {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
}
.lock-clock {
  font-family: 'Consolas', monospace;
  font-size: 40px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.lock-user-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  margin-bottom: 18px;
}

/* ---------- LICENSE ACTIVATION SCREEN & SIDEBAR PILL ---------- */
.license-screen {
  position: fixed;
  inset: 0;
  z-index: 600;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 48%),
    radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.18), transparent 48%),
    var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.license-box {
  width: 100%;
  max-width: 490px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 30px 28px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.55);
}
.machine-id-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--bg-input);
  border: 1px dashed var(--primary);
  margin-bottom: 16px;
}
.machine-id-code {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #38bdf8;
  user-select: all;
}
.license-pill-sidebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.11);
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-size: 11.5px;
  font-weight: 700;
  color: #34d399;
  cursor: pointer;
  transition: filter 0.15s ease;
}
.license-pill-sidebar:hover {
  filter: brightness(1.1);
}
.license-pill-sidebar.expiring {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

/* ---------- LANGUAGE SWITCHER & MANUAL SHIFT CONTROL ---------- */
.lang-switch {
  display: inline-flex;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 2px;
  gap: 2px;
}
.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 800;
  font-size: 11.5px;
  padding: 4px 8px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.lang-btn.active {
  background: var(--primary);
  color: #fff;
}

.shift-mode-switch {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.shift-mode-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.shift-mode-btn:hover {
  color: var(--text-main);
}
.shift-mode-btn.active-auto {
  background: rgba(59, 130, 246, 0.22);
  color: #60a5fa;
}
.shift-mode-btn.active-day {
  background: rgba(245, 158, 11, 0.24);
  color: #fbbf24;
}
.shift-mode-btn.active-night {
  background: rgba(139, 92, 246, 0.26);
  color: #c4b5fd;
}

/* ---------- LIGHT (DAYLIGHT) UI THEME ---------- */
body.light-theme {
  --bg-main: #eef2f7;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #f1f5f9;
  --border: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #475569;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
body.light-theme .topbar {
  background: rgba(255, 255, 255, 0.9);
}
body.light-theme .clock-box {
  color: #0f172a;
}
body.light-theme .nav-btn:hover {
  background: rgba(15, 23, 42, 0.05);
}
body.light-theme .nav-btn.active {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.4);
}
body.light-theme .btn-ghost {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}
body.light-theme .cat-combo-dropdown {
  background: #ffffff;
}
body.light-theme .machine-id-code {
  color: #0284c7;
}
body.light-theme .license-pill-sidebar {
  color: #047857;
}
body.light-theme .shift-mode-btn.active-auto {
  color: #1d4ed8;
}
body.light-theme .shift-mode-btn.active-day {
  color: #b45309;
}
body.light-theme .shift-mode-btn.active-night {
  color: #6d28d9;
}
/* Keep realistic billiard & PlayStation cards rich & white-text legible in Light Mode */
body.light-theme .billiard-card,
body.light-theme .billiard-card .rates-bar,
body.light-theme .billiard-card .timer-panel,
body.light-theme .billiard-card .reservation-box,
body.light-theme .ps-card,
body.light-theme .ps-card .rates-bar,
body.light-theme .ps-card .timer-panel,
body.light-theme .ps-card .reservation-box {
  color: #f8fafc;
}
body.light-theme .billiard-card .btn-ghost,
body.light-theme .ps-card .btn-ghost {
  background: rgba(8, 14, 24, 0.78);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* ---------- REALISTIC PLAYSTATION VERTICAL CONSOLE CARD (PHOTO #1 STYLE) ---------- */
.ps-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  contain: layout style;
}

.ps-chassis {
  flex: 1;
  display: flex;
  flex-direction: row;
  border-radius: 11px 18px 16px 11px;
  background: linear-gradient(145deg, #32363f 0%, #20232a 48%, #15171c 100%);
  border: 2px solid #3c414d;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.18),
    inset 0 -3px 6px rgba(0, 0, 0, 0.72),
    0 12px 26px rgba(0, 0, 0, 0.52);
  overflow: hidden;
  position: relative;
}

/* Status outer subtle rim & pill colors on PlayStation */
.ps-card.state-green .ps-chassis {
  border-color: rgba(16, 185, 129, 0.65);
}
.ps-card.state-green .status-pill {
  background: rgba(7, 22, 12, 0.85);
  color: #86efac;
  border: 1px solid rgba(134, 239, 172, 0.55);
}

.ps-card.state-blue .ps-chassis {
  border-color: rgba(59, 130, 246, 0.75);
}
.ps-card.state-blue .status-pill {
  background: rgba(8, 17, 36, 0.88);
  color: #93c5fd;
  border: 1px solid rgba(147, 197, 253, 0.65);
}

.ps-card.state-yellow .ps-chassis {
  border-color: rgba(245, 158, 11, 0.8);
}
.ps-card.state-yellow .status-pill {
  background: rgba(24, 15, 5, 0.88);
  color: #fde68a;
  border: 1px solid rgba(253, 230, 138, 0.68);
}

/* Left 3D Vertical Console Spine (like PS4 Slim left side in Photo #1) */
.ps-spine {
  width: 26px;
  flex-shrink: 0;
  background: linear-gradient(90deg, #3b404b 0%, #272b33 46%, #0b0d10 52%, #23272f 60%, #1b1e25 100%);
  border-right: 2px solid #0b0d11;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  position: relative;
  user-select: none;
}

.ps-spine-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.ps-usb-slot {
  width: 4px;
  height: 13px;
  border-radius: 2px;
  background: #1d4ed8;
  border: 1px solid #090b0f;
}

.ps-sony-mark {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: rgba(226, 232, 240, 0.48);
}

/* Glowing PlayStation Vertical LED Light Bar inside the spine groove */
.ps-led-bar {
  width: 3px;
  flex: 1;
  margin: 10px 0;
  border-radius: 99px;
  background: #10b981;
}
.ps-card.state-green .ps-led-bar {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.2), #34d399, rgba(16, 185, 129, 0.2));
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.85);
}
.ps-card.state-blue .ps-led-bar {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.2), #60a5fa, rgba(59, 130, 246, 0.2));
  box-shadow: 0 0 9px rgba(59, 130, 246, 0.9);
}
.ps-card.state-yellow .ps-led-bar {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.25), #fbbf24, rgba(245, 158, 11, 0.25));
  box-shadow: 0 0 9px rgba(245, 158, 11, 0.95);
}

.ps-model-mark {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 1.2px;
  color: rgba(226, 232, 240, 0.42);
}

/* Matte Charcoal-Black PlayStation Main Face */
.ps-face {
  flex: 1;
  min-width: 0;
  padding: 17px 17px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  background:
    radial-gradient(circle at 50% 46%, #31353e 0%, #23262e 52%, #181b21 92%, #13151a 100%);
}

.ps-card.state-yellow .ps-face {
  background:
    radial-gradient(circle at 50% 46%, rgba(245, 158, 11, 0.16) 0%, #25272f 56%, #171920 100%);
}
.ps-card.state-blue .ps-face {
  background:
    radial-gradient(circle at 50% 46%, rgba(59, 130, 246, 0.17) 0%, #232732 56%, #161922 100%);
}

/* Center Glossy-Black / Metallic PlayStation Emblem (like Photo #1 center) */
.ps-free-center {
  padding: 12px 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #e2e8f0;
  font-size: 13.5px;
  font-weight: 700;
}

.ps-logo-emblem {
  width: 58px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.85)) drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.16));
}

.ps-logo-watermark {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 96px;
  height: 76px;
  opacity: 0.06;
  pointer-events: none;
}

/* Bottom Tapered Horizontal PlayStation Stand (like Photo #1 pedestal) */
.ps-stand-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  pointer-events: none;
}

.ps-stand-neck {
  width: 56%;
  height: 5px;
  background: linear-gradient(90deg, #0b0d11, #1e2128, #0b0d11);
}

.ps-stand-base {
  width: 96%;
  height: 9px;
  border-radius: 50% 50% 3px 3px / 100% 100% 3px 3px;
  background: linear-gradient(180deg, #353943 0%, #1a1d23 58%, #0a0c0f 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.6);
}

/* Layout drag & 4-col compact support for PlayStation cards */
.ps-card.layout-editing {
  cursor: grab;
}
.ps-card.layout-editing .ps-chassis {
  outline: 2px dashed rgba(147, 197, 253, 0.6);
  outline-offset: 3px;
}
.ps-card.dragging {
  opacity: 0.48;
}
.ps-card.drag-over .ps-chassis {
  outline: 3px solid #fde68a;
  outline-offset: 4px;
}

.tables-grid.cols-4 .ps-spine {
  width: 20px;
}
.tables-grid.cols-4 .ps-face {
  padding: 13px 12px 14px;
  gap: 9px;
}
.tables-grid.cols-4 .ps-logo-emblem {
  width: 44px;
  height: 36px;
}
.tables-grid.cols-4 .ps-free-center {
  padding: 6px 6px 8px;
  font-size: 12px;
}

@media (max-width: 960px) {
  .tables-grid.cols-3,
  .tables-grid.cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .tables-grid.cols-2,
  .tables-grid.cols-3,
  .tables-grid.cols-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .nav-list { flex-direction: row; flex-wrap: wrap; }
  .nav-btn { width: auto; }
  .bar-layout { grid-template-columns: 1fr; }
}
