/* ==========================================================================
   WLGPRO Admin Design System — Monte Carlo Deco, Rouge Edition
   European Roulette Casino Operations & Command Portal
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Monte Carlo Deco Tokens */
  --bg-top: #16151A;
  --bg-base: #0B0B0D;
  --bg-bottom: #060607;
  --bg-warm: #1C1A16;
  --surface-1: rgba(17,17,20,.94);  /* cards, modals */
  --surface-2: rgba(23,23,27,.92);  /* header, rail, secondary buttons */
  --surface-3: #1E1E23;             /* rows, tiles */
  --field: #0E0E11;
  --field-focus: #141418;
  --gold-50: #FBF3DF;
  --gold-100: #F1DFB6;
  --gold-300: #E3C58A; /* primary accent */
  --gold-500: #C9A35E;
  --gold-700: #9C7A3C;
  --gold-900: #5E4722;
  --line-gold: rgba(227,197,138,.30);
  --line-gold-strong: rgba(227,197,138,.75);
  --line-neutral: rgba(255,255,255,.06);
  --wash-gold: rgba(227,197,138,.08);
  --text-primary: #F4EEE2;
  --text-secondary: #CFC6B4;
  --text-muted: #8E887C;
  --text-disabled: #55524B; /* only on text 18px or larger */
  --text-on-gold: #1A140A;
  --ruby: #A3192E; /* brand red, decorative only */
  --live: #3FBF86;
  --live-text: #7FE0B0;
  --live-bg: #0F2E22;
  --error: #C2413B;
  --error-text: #F08A80;
  --error-bg: rgba(194,65,59,.14);
  --warn: #E0A548;
  --warn-text: #F2C27A;
  --warn-bg: rgba(224,165,72,.12);
  --info-bg: rgba(255,255,255,.05);
  --felt-emerald: #0A4A12;
  --felt-ruby: #3C0712;
  --felt-onyx: #1A1412;
  --felt-sapphire: #133460;
  --felt-bronze: #3A2C04;   /* table colour coding; Settings and Dashboard agree */
  --foil: linear-gradient(180deg,#FBF3DF 0%,#F1DFB6 18%,#D9B877 50%,#C49A4A 51%,#A9864A 80%,#7A5C2E 100%);

  /* Typography Scale */
  --font-sans: -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  /* Backward Compatibility Aliases */
  --bg-deep: var(--bg-base);
  --bg-canvas: var(--bg-top);
  --bg-card: var(--surface-1);
  --bg-card-hover: var(--surface-3);
  --bg-card-solid: #111114;
  --border-card: var(--line-neutral);
  --border-highlight: var(--line-gold);
  --accent-blue: var(--gold-300);
  --accent-blue-glow: var(--wash-gold);
  --accent-cyan: var(--gold-100);
  --accent-emerald: var(--live);
  --accent-emerald-glow: rgba(63, 191, 134, 0.12);
  --accent-gold: var(--gold-300);
  --accent-gold-glow: var(--wash-gold);
  --accent-rose: var(--error);
  --accent-rose-glow: var(--error-bg);
  --accent-purple: var(--gold-500);
  --fg-primary: var(--text-primary);
  --fg-secondary: var(--text-secondary);
  --fg-muted: var(--text-muted);
  --line: var(--line-neutral);
  --line-subtle: var(--line-neutral);
  --bg: var(--bg-base);
  --fg: var(--text-primary);
  --card: var(--surface-1);
  --accent: var(--gold-300);
  --bad: var(--error);
  --radius-sm: 2px;
  --radius-md: 2px;
  --radius-lg: 2px;
  --radius-xl: 2px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  width: 100%;
  font-size: 15px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body.luxury-theme, body {
  overflow-x: hidden;
  width: 100%;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: var(--bg-base);
  background-image: radial-gradient(circle at 50% 0%, var(--bg-top) 0%, var(--bg-base) 70%, var(--bg-bottom) 100%);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Accessibility Focus Ring (WCAG 2.2 AA) */
:focus-visible {
  outline: 2px solid var(--gold-300) !important;
  outline-offset: 1px !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 700;
  margin-top: 0;
  letter-spacing: -0.01em;
}

.page-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 1.25rem;
}

.page-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.page-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.muted {
  color: var(--text-muted);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Money styling */
.money-pos {
  color: var(--live-text) !important;
  font-variant-numeric: tabular-nums;
}

.money-neg {
  color: var(--error-text) !important;
  font-variant-numeric: tabular-nums;
}

.money-gold {
  color: var(--gold-300) !important;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.app-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--surface-2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-gold); /* Hairline gold rule */
  transition: all 0.2s ease;
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-badge-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  user-select: none;
}

.brand-badge-svg {
  display: block;
  flex-shrink: 0;
}

.brand-text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gold-300);
  text-transform: uppercase;
}

.brand-highlight {
  color: var(--gold-50);
}

.live-beacon {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--live);
  box-shadow: 0 0 8px var(--live);
  display: inline-block;
  flex-shrink: 0;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px; /* 2px chamfered / deco */
  transition: all 0.15s ease;
}

.nav-pill .nav-icon {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.nav-pill:hover {
  color: var(--text-primary);
  background: var(--wash-gold);
  border-color: var(--line-gold);
}

.nav-pill:hover .nav-icon {
  color: var(--gold-300);
}

.nav-pill.active {
  color: var(--gold-300);
  background: var(--wash-gold);
  border-color: var(--line-gold-strong);
}

.nav-pill.active .nav-icon {
  color: var(--gold-300);
}


.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Real-Time IST Live Clock */
.live-ist-clock-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--field);
  border: 1px solid var(--line-neutral);
  padding: 5px 10px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.live-ist-clock-badge .clock-icon {
  color: var(--gold-300);
  display: flex;
  align-items: center;
}

.live-ist-clock-badge .clock-tz {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}

/* Header Global Search Form */
.header-search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search-form .search-icon {
  position: absolute;
  left: 9px;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.header-search-form .search-input {
  width: 170px;
  padding: 6px 10px 6px 30px;
  background: var(--field);
  border: 1px solid var(--line-neutral);
  border-radius: 2px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
}

.header-search-form .search-input:focus {
  width: 220px;
  background: var(--field-focus);
  border-color: var(--gold-300);
  outline: none;
}

.user-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-3);
  border: 1px solid var(--line-neutral);
  padding: 4px 10px;
  border-radius: 2px;
}

.user-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.role-chip {
  display: inline-block;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 2px;
  background: var(--wash-gold);
  color: var(--gold-300);
  border: 1px solid var(--line-gold);
}

.role-chip.role-admin {
  background: rgba(227, 197, 138, 0.15);
  color: var(--gold-300);
  border-color: var(--line-gold-strong);
}

.role-chip.role-distributor {
  background: rgba(201, 163, 94, 0.12);
  color: var(--gold-500);
  border-color: rgba(201, 163, 94, 0.35);
}

.role-chip.role-subdistributor {
  background: rgba(156, 122, 60, 0.12);
  color: var(--gold-700);
  border-color: rgba(156, 122, 60, 0.35);
}

.role-chip.role-agent {
  background: rgba(63, 191, 134, 0.12);
  color: var(--live-text);
  border-color: rgba(63, 191, 134, 0.35);
}

.desktop-logout-form {
  display: flex;
}

.logout-btn {
  background: var(--surface-3);
  border: 1px solid var(--line-neutral);
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.15s ease;
}

.logout-btn:hover {
  color: var(--error-text);
  border-color: var(--error);
  background: var(--error-bg);
}

.mobile-hamburger-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--line-neutral);
  padding: 8px;
  border-radius: 2px;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}

.hamburger-bar {
  width: 18px;
  height: 2px;
  background-color: var(--text-primary);
  display: block;
}

/* ==========================================================================
   Mobile Off-Canvas Drawer
   ========================================================================== */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 85vw;
  background: var(--surface-2);
  border-left: 1px solid var(--line-gold);
  z-index: 1001;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow-y: auto;
}

.mobile-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-neutral);
}

.drawer-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
}

.drawer-close-btn:hover {
  color: var(--text-primary);
}

.drawer-user-card {
  background: var(--surface-3);
  border: 1px solid var(--line-neutral);
  padding: 12px;
  border-radius: 2px;
  margin-bottom: 16px;
}

.drawer-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-avatar {
  width: 38px;
  height: 38px;
  background: var(--gold-700);
  color: var(--gold-50);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.drawer-username {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.drawer-search-form {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}

.drawer-search-form .search-input {
  flex: 1;
  background: var(--field);
  border: 1px solid var(--line-neutral);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 2px;
  font-size: 14px;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.drawer-link:hover, .drawer-link.active {
  color: var(--gold-300);
  background: var(--wash-gold);
}

.drawer-icon {
  display: flex;
  align-items: center;
  color: var(--text-muted);
}

.drawer-link.active .drawer-icon {
  color: var(--gold-300);
}

.drawer-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line-neutral);
}

.drawer-logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid var(--error);
  border-radius: 2px;
  font-weight: 600;
  cursor: pointer;
}

/* ==========================================================================
   Mobile Bottom Bar (Thumb-Accessible)
   ========================================================================== */

.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--surface-2);
  border-top: 1px solid var(--line-gold);
  z-index: 890;
  justify-content: space-around;
  align-items: center;
  padding: 0 4px;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-muted);
  text-decoration: none;
  flex: 1;
  height: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.bottom-nav-icon {
  display: flex;
  align-items: center;
}

.bottom-nav-label {
  font-size: 11px;
  font-weight: 600;
}

.bottom-nav-item.active, .bottom-nav-item:hover {
  color: var(--gold-300);
}

/* ==========================================================================
   Main Layout & Grid System
   ========================================================================== */

.app-main-container {
  width: 100%;
  overflow-x: hidden;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
  min-height: calc(100vh - 120px);
}

.app-footer {
  border-top: 1px solid var(--line-neutral);
  background: var(--surface-2);
  padding: 16px 24px;
}

.footer-content {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.footer-brand {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.footer-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
}

/* ==========================================================================
   Cards & Chamfered Primitives
   ========================================================================== */

.card, .widget-panel, .sim-panel {
  background: var(--surface-1);
  border: 1px solid var(--line-neutral);
  border-radius: 2px; /* 2px chamfered corner */
  padding: 16px;
  margin-bottom: 1.25rem;
  transition: border-color 0.15s ease;
}

.card:hover, .widget-panel:hover {
  border-color: rgba(227, 197, 138, 0.20);
}

.widget-panel {
  position: relative;
}

.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 1rem;
}

.widget-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.widget-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.widget-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   KPI Cards Grid (Desktop: 4 across >= 1100px)
   ========================================================================== */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 1rem;
}

.kpi-card {
  background: var(--surface-3);
  border: 1px solid var(--line-neutral);
  border-radius: 2px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.15s ease;
}

.kpi-card:hover {
  border-color: var(--line-gold);
  background: rgba(30, 30, 35, 0.95);
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.kpi-val {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}

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

.kpi-sub-unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

/* ==========================================================================
   Buttons & Form Controls
   ========================================================================== */

button, input[type="submit"], .btn {
  font-family: var(--font-sans);
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.15s ease;
}

/* Primary Button: Foil Gradient Face */
button.primary, input[type="submit"].primary, .btn-primary {
  background: var(--foil);
  color: var(--text-on-gold);
  border: none;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

button.primary:hover, input[type="submit"].primary:hover, .btn-primary:hover {
  filter: brightness(1.08);
}

button.primary:active, input[type="submit"].primary:active {
  filter: brightness(0.96);
}

button.primary:disabled, button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

/* Secondary Button: Surface-2 with Crisp 1px Neutral Border */
.btn-secondary, button:not(.primary):not(.btn-danger-outline):not(.btn-rtp):not(.logout-btn):not(.drawer-logout-btn):not(.btn-chip-add):not(.btn-chip-reduce):not(.btn-table-action):not(.portal-tab):not(.dev-account-btn) {
  background: var(--surface-2);
  color: var(--text-primary);
  border: 1px solid var(--line-neutral);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary:hover, button:not(.primary):not(.btn-danger-outline):not(.btn-rtp):not(.logout-btn):not(.drawer-logout-btn):not(.btn-chip-add):not(.btn-chip-reduce):not(.btn-table-action):not(.portal-tab):not(.dev-account-btn):hover {
  background: var(--surface-3);
  border-color: var(--line-gold);
  color: var(--gold-300);
}

.btn-secondary-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line-neutral);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 2px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-secondary-link:hover {
  background: var(--surface-3);
  border-color: var(--line-gold);
  color: var(--gold-300);
}

.btn-danger-outline {
  background: var(--error-bg);
  border: 1px solid var(--error);
  color: var(--error-text);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-danger-outline:hover {
  background: rgba(194, 65, 59, 0.25);
}

.btn-reset-force {
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  background: var(--error);
  color: #fff;
  border: none;
  border-radius: 2px;
}

/* Form Inputs */
input, select, textarea {
  background: var(--field);
  border: 1px solid var(--line-neutral);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  padding: 7px 10px;
  border-radius: 2px;
  transition: border-color 0.15s ease;
}

input:focus, select:focus, textarea:focus {
  background: var(--field-focus);
  border-color: var(--gold-300);
  outline: none;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

form.inline {
  display: inline-block;
  margin: 0;
}

/* ==========================================================================
   Pills & Badges
   ========================================================================== */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 2px;
  letter-spacing: 0.02em;
}

.pill-live-engine {
  background: rgba(63, 191, 134, 0.12);
  color: var(--live-text);
  border: 1px solid rgba(63, 191, 134, 0.35);
  font-size: 11px;
  font-weight: 700;
}

.pill-warn-reconnecting {
  background: var(--warn-bg);
  color: var(--warn-text);
  border: 1px solid var(--warn);
  font-size: 11px;
  font-weight: 700;
}

.pill-gold-badge {
  background: var(--wash-gold);
  color: var(--gold-300);
  border: 1px solid var(--line-gold-strong);
  font-size: 12px;
  padding: 4px 10px;
}

.pill-gold-kpi {
  background: rgba(227, 197, 138, 0.15);
  color: var(--gold-300);
  border: 1px solid var(--line-gold);
  font-size: 14px;
  font-weight: 700;
}

.pill-live {
  background: rgba(63, 191, 134, 0.15);
  color: var(--live-text);
  border: 1px solid rgba(63, 191, 134, 0.35);
}

.pill-muted {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--line-neutral);
}

.pill-error {
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid var(--error);
}

.pill-telemetry {
  background: var(--wash-gold);
  color: var(--gold-300);
  border: 1px solid var(--line-gold);
}

.pill-red {
  background: var(--ruby);
  color: #fff;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  justify-content: center;
}

.pill-black {
  background: #111114;
  color: var(--text-primary);
  border: 1px solid var(--line-neutral);
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  justify-content: center;
}

.pill-zero {
  background: var(--live);
  color: #060607;
  font-weight: 800;
  min-width: 20px;
  text-align: center;
  justify-content: center;
}

.last-results-strip {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

/* Bet style pills */
.bet-style-straight { background: rgba(201, 163, 94, 0.20) !important; color: var(--gold-300) !important; border: 1px solid var(--line-gold); }
.bet-style-outside { background: rgba(255, 255, 255, 0.06) !important; color: var(--text-primary) !important; border: 1px solid var(--line-neutral); }
.bet-style-dozen { background: rgba(227, 197, 138, 0.12) !important; color: var(--gold-100) !important; border: 1px solid var(--line-gold); }
.bet-style-sector { background: rgba(163, 25, 46, 0.20) !important; color: #fca5a5 !important; border: 1px solid rgba(163, 25, 46, 0.4); }
.bet-style-inside { background: rgba(63, 191, 134, 0.15) !important; color: var(--live-text) !important; border: 1px solid rgba(63, 191, 134, 0.35); }
.bet-style-hedge { background: var(--error-bg) !important; color: var(--error-text) !important; border: 1px solid var(--error); font-weight: 700; }

/* ==========================================================================
   Universal RTP & Simulation Controls
   ========================================================================== */

.rtp-controls-box {
  background: var(--surface-3);
  border: 1px solid var(--line-neutral);
  border-radius: 2px;
  padding: 14px;
  margin-bottom: 1rem;
}

.rtp-presets-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.rtp-presets-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 4px;
}

.btn-rtp {
  background: var(--surface-2);
  border: 1px solid var(--line-neutral);
  color: var(--text-secondary);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 2px;
}

.btn-rtp:hover {
  background: var(--wash-gold);
  border-color: var(--line-gold);
  color: var(--gold-300);
}

.btn-rtp.active {
  background: var(--foil);
  color: var(--text-on-gold);
  border-color: transparent;
  font-weight: 700;
}

.rtp-custom-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line-neutral);
}

.rtp-custom-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rtp-custom-label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.rtp-input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rtp-number-input {
  width: 65px;
  padding: 4px 6px;
  text-align: center;
  font-weight: 700;
}

.rtp-percent-symbol {
  font-weight: 700;
  color: var(--text-muted);
}

.rtp-disclaimer {
  font-size: 11px;
  margin-left: auto;
}

.sim-panel {
  background: var(--surface-3);
  border: 1px solid var(--line-neutral);
  border-radius: 2px;
  padding: 14px;
}

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

.sim-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sim-actions-wrap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-sim-start,
.btn-sim-stop {
  font-size: 12px !important;
  padding: 4px 10px !important;
}

/* ==========================================================================
   Hot Numbers Telemetry
   ========================================================================== */

.hot-trends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  padding: 0.25rem 0;
}

.hot-trend-box {
  background: var(--surface-3);
  padding: 12px 14px;
  border-radius: 2px;
  border: 1px solid var(--line-neutral);
}

.hot-trend-head {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

.hot-pill-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hot-pocket-capsule {
  display: inline-flex;
  align-items: center;
  background: var(--field);
  border: 1px solid var(--line-neutral);
  border-radius: 2px;
  padding: 3px 6px;
  gap: 6px;
}

.hot-pocket-capsule.rank-top {
  border-color: var(--line-gold-strong);
  background: var(--wash-gold);
}

.hot-pocket-num {
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 2px;
  min-width: 20px;
  text-align: center;
}

.hot-pocket-val {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* ==========================================================================
   Table Cards Grid (Active Roulette Tables)
   ========================================================================== */

.table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.table-card {
  background: var(--surface-1);
  border: 1px solid var(--line-neutral);
  border-radius: 2px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.table-card:hover {
  border-color: var(--line-gold);
}

/* Table Card Color Variations */
.table-card-sapphire {
  border-top: 3px solid var(--felt-sapphire) !important;
}

.table-card-emerald {
  border-top: 3px solid var(--felt-emerald) !important;
}

.table-card-ruby {
  border-top: 3px solid var(--felt-ruby) !important;
}

.table-card-bronze {
  border-top: 3px solid var(--felt-bronze) !important;
}

/* Legacy aliases */
.table-card-blue { border-top: 3px solid var(--felt-sapphire) !important; }
.table-card-green { border-top: 3px solid var(--felt-emerald) !important; }
.table-card-purple { border-top: 3px solid var(--felt-ruby) !important; }
.table-card-gold { border-top: 3px solid var(--felt-bronze) !important; }

.table-badge-color {
  background: var(--surface-3);
  color: var(--gold-300);
  border: 1px solid var(--line-gold);
  font-size: 10px;
  font-weight: 700;
}

.table-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.timer-capsule {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-3);
  border: 1px solid var(--line-neutral);
  padding: 6px 10px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.timer-capsule.badge-betting {
  color: var(--live-text);
  border-color: rgba(63, 191, 134, 0.4);
  background: rgba(63, 191, 134, 0.08);
}

.timer-capsule.badge-result {
  color: var(--gold-300);
  border-color: var(--line-gold);
  background: var(--wash-gold);
}

.timer-capsule.badge-spinning,
.timer-capsule.badge-closed {
  color: var(--warn-text);
  border-color: rgba(224, 165, 72, 0.4);
  background: rgba(224, 165, 72, 0.08);
}

.timer-capsule.badge-instant {
  color: var(--text-primary);
  border-color: var(--line-neutral);
}

.table-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: var(--surface-3);
  padding: 8px 10px;
  border-radius: 2px;
  border: 1px solid var(--line-neutral);
}

.table-metric-item {
  display: flex;
  flex-direction: column;
}

.table-metric-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 2px;
}

.table-metric-val {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Felt Heatmaps & Containment Architecture
   ========================================================================== */

.detached-heat-section {
  display: none !important;
}

.felt-scroll-container {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: #09090b;
  scrollbar-width: thin;
  scrollbar-color: var(--line-gold) #09090b;
}

.card-heat {
  padding: 6px 4px;
  min-width: 280px;
}

.card-heat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  margin-bottom: 6px;
  padding: 0 2px;
}

.card-felt {
  display: grid;
  grid-template-columns: 24px repeat(12, minmax(18px, 1fr));
  grid-template-rows: repeat(3, 27px);
  gap: 2px;
  font-family: var(--font-mono);
}

.card-felt .cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1px 0;
  background: #141418;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  font-size: 10px;
  color: #fff;
  user-select: none;
  overflow: hidden;
  line-height: 1;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card-felt .cell.zero,
.card-felt .cell.zero-num {
  grid-row: 1 / span 3;
  grid-column: 1;
  background: rgba(39, 174, 96, 0.35);
  border-color: rgba(46, 204, 113, 0.6);
  color: #2ecc71;
  font-weight: 700;
}

.card-felt .cell.red-num {
  background: rgba(192, 57, 43, 0.28);
  border-color: rgba(231, 76, 60, 0.35);
}

.card-felt .cell.black-num {
  background: rgba(24, 24, 30, 0.85);
  border-color: rgba(255, 255, 255, 0.08);
}

.card-felt .cell b {
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  z-index: 2;
  pointer-events: none;
}

.card-felt .cell i {
  position: static;
  font-size: 7.5px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  color: var(--gold-300);
  margin-top: 1px;
  letter-spacing: -0.04em;
  z-index: 2;
  pointer-events: none;
}

/* Dynamic WR Heatmap States (Green = House Safe, Red = Player Win Risk) */
.card-felt .cell.heat-safe-zero {
  background: rgba(39, 174, 96, 0.22) !important;
  border-color: rgba(46, 204, 113, 0.45) !important;
}

.card-felt .cell.heat-safe-profit {
  background: rgba(46, 204, 113, 0.38) !important;
  border-color: #27ae60 !important;
  color: #fff !important;
}

.card-felt .cell.heat-near-breakeven {
  background: rgba(243, 156, 18, 0.45) !important;
  border-color: #f39c12 !important;
  color: #fff !important;
}

.card-felt .cell.heat-risk-loss {
  background: rgba(230, 76, 60, 0.6) !important;
  border-color: #e74c3c !important;
  color: #fff !important;
  box-shadow: inset 0 0 6px rgba(231, 76, 60, 0.5);
}

.card-felt .cell.heat-risk-jackpot {
  background: rgba(231, 76, 60, 0.88) !important;
  border-color: #ff4757 !important;
  color: #fff !important;
  font-weight: bold;
  box-shadow: 0 0 8px rgba(255, 71, 87, 0.7), inset 0 0 8px rgba(255, 71, 87, 0.8) !important;
}

.card-felt .cell.landed {
  outline: 2px solid var(--gold-300) !important;
  background: #f1c40f !important;
  color: #000 !important;
}
.card-felt .cell.landed b,
.card-felt .cell.landed i {
  color: #000 !important;
}

/* ==========================================================================
   Responsive Tables with Sticky Headers & Zebra
   ========================================================================== */

.scroll {
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-gold) var(--surface-1);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px; /* Tables 13px standard */
}

th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line-gold);
  z-index: 2;
}

th.num {
  text-align: right;
}

td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-neutral);
  color: var(--text-primary);
  font-size: 13px;
}

td.num {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

tbody tr:nth-child(even) td {
  background-color: rgba(255, 255, 255, 0.015);
}

tbody tr:hover td {
  background-color: var(--wash-gold);
}

/* Bet Row Slide-in Animation */
@keyframes betSlideIn {
  0% {
    opacity: 0;
    transform: translateY(-8px);
    background-color: var(--wash-gold);
  }
  15% {
    opacity: 1;
    transform: translateY(0);
    background-color: var(--wash-gold);
  }
  85% {
    background-color: var(--wash-gold);
  }
  100% {
    background-color: transparent;
  }
}

.new-bet-row td {
  animation: betSlideIn 1.5s ease-out forwards;
}

/* ==========================================================================
   Table Action Controls
   ========================================================================== */

.table-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.action-chip-form, .action-pw-form {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}

.action-chip-input {
  width: 58px !important;
  min-height: 28px !important;
  padding: 2px 6px !important;
  font-size: 12px !important;
  border-radius: 2px;
}

.action-pw-input {
  width: 65px !important;
  min-height: 28px !important;
  padding: 2px 6px !important;
  font-size: 12px !important;
  border-radius: 2px;
}

.btn-chip-add {
  min-height: 28px !important;
  width: 28px !important;
  padding: 0 !important;
  background: var(--live) !important;
  color: #060607 !important;
  border: none !important;
  border-radius: 2px !important;
  cursor: pointer;
  font-weight: 800;
  font-size: 15px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-chip-add:hover {
  filter: brightness(1.15);
}

.btn-chip-reduce {
  min-height: 28px !important;
  width: 28px !important;
  padding: 0 !important;
  background: var(--error) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 2px !important;
  cursor: pointer;
  font-weight: 800;
  font-size: 15px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-chip-reduce:hover {
  filter: brightness(1.15);
}

.btn-table-action {
  min-height: 28px !important;
  padding: 2px 8px !important;
  font-size: 12px !important;
  border-radius: 2px !important;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--line-neutral);
  color: var(--text-primary);
  cursor: pointer;
}

.btn-table-action:hover {
  background: var(--surface-3);
  border-color: var(--line-gold);
  color: var(--gold-300);
}

.btn-table-action.btn-danger {
  background: var(--error-bg) !important;
  border-color: var(--error) !important;
  color: var(--error-text) !important;
}

.btn-table-action.btn-unban {
  background: rgba(63, 191, 134, 0.15) !important;
  border-color: rgba(63, 191, 134, 0.4) !important;
  color: var(--live-text) !important;
}

.btn-table-action.btn-ban {
  background: var(--error-bg) !important;
  border-color: var(--error) !important;
  color: var(--error-text) !important;
}

.btn-table-action.btn-detail {
  color: var(--gold-300);
}

/* ==========================================================================
   Trustworthy Minimalist Calendar & Time Range Capsule
   ========================================================================== */

.dt-capsule-container {
  position: relative;
  display: inline-block;
}

.dt-range-capsule-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line-neutral);
  border-radius: 2px;
  padding: 6px 12px;
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  min-height: 34px;
}

.dt-range-capsule-btn:hover {
  border-color: var(--line-gold);
  background: var(--surface-3);
}

.dt-range-capsule-btn.open {
  border-color: var(--gold-300);
  box-shadow: 0 0 0 2px var(--wash-gold);
}

.dt-capsule-icon {
  font-size: 13px;
  color: var(--gold-300);
}

.dt-capsule-text {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
}

.dt-capsule-arrow {
  color: var(--text-muted);
  font-size: 10px;
  margin-left: 2px;
}

/* Dropdown popover dialog */
.dt-range-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1000;
  background: var(--surface-1);
  border: 1px solid var(--line-gold);
  border-radius: 2px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  padding: 14px 16px;
  display: none;
  flex-direction: column;
  gap: 12px;
  width: 330px;
}

.dt-range-popover.show {
  display: flex;
}

.dt-popover-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dt-popover-label {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.dt-popover-input-group {
  display: flex;
  gap: 6px;
}

.dt-popover-input-group input[type="date"],
.dt-popover-input-group input[type="time"] {
  flex: 1;
  font-size: 12px;
  padding: 5px 8px;
  background: var(--field);
  border: 1px solid var(--line-neutral);
  border-radius: 2px;
  color: var(--text-primary);
}

.dt-presets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--line-neutral);
}

.dt-preset-btn {
  background: var(--surface-2);
  border: 1px solid var(--line-neutral);
  color: var(--text-secondary);
  border-radius: 2px;
  font-size: 11px;
  font-weight: 500;
  padding: 5px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.12s ease;
}

.dt-preset-btn:hover {
  background: var(--surface-3);
  color: var(--gold-300);
  border-color: var(--line-gold);
}

.dt-popover-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line-neutral);
}

.dt-btn-done {
  background: var(--foil);
  color: var(--text-on-gold);
  border: none;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 2px;
  cursor: pointer;
}

.dt-btn-cancel {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--line-neutral);
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 2px;
  cursor: pointer;
}

/* ==========================================================================
   Login Command Portal
   ========================================================================== */

.login-auth-container {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 160px);
  padding: 1.5rem 1rem;
}

.login-auth-card {
  box-sizing: border-box;
  max-width: 100%;
  width: 100%;
  max-width: 440px;
  background: var(--surface-1);
  border: 1px solid var(--line-gold);
  border-radius: 2px;
  padding: 2.25rem 2rem;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 32px rgba(227, 197, 138, 0.05);
}

.login-brand-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-brand-logo {
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: center;
}

.login-brand-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin: 0;
  color: var(--gold-300);
  text-transform: uppercase;
}

.login-brand-sub {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0.35rem 0 0 0;
}

.login-portal-switcher {
  display: flex;
  background: var(--field);
  border: 1px solid var(--line-neutral);
  border-radius: 2px;
  padding: 4px;
  margin-bottom: 1.5rem;
  gap: 4px;
}

.portal-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 2px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.portal-tab:hover {
  color: var(--text-primary);
  background: var(--wash-gold);
}

.portal-tab.active {
  background: var(--surface-3);
  color: var(--gold-300);
  border: 1px solid var(--line-gold);
}

.captcha-input-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.captcha-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-3);
  border: 1px solid var(--line-gold);
  padding: 8px 14px;
  border-radius: 2px;
  user-select: none;
  white-space: nowrap;
}

.captcha-math-text {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold-300);
  letter-spacing: 0.05em;
}

.captcha-input-wrap {
  flex: 1;
}

.login-alert-error {
  background: var(--error-bg);
  border: 1px solid var(--error);
  border-radius: 2px;
  padding: 12px 14px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--error-text);
  font-size: 13px;
}

.login-form-box .form-field {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 1.15rem;
}

.login-form-box label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
}

.input-with-icon {
  width: 100%;
  box-sizing: border-box;
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon .field-icon {
  position: absolute;
  left: 14px; font-size: 1.1rem;
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
  z-index: 2;
}

.input-with-icon input {
  padding-left: 42px !important; min-height: 40px !important; border-radius: 6px !important;
  width: 100%;
}

.login-btn-wrap {
  margin-top: 1.5rem;
}

.login-submit-btn {
  width: 100%;
  min-height: 44px !important;
  font-size: 14px !important;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--foil) !important;
  color: var(--text-on-gold) !important;
  border: none !important;
}

.btn-arrow {
  transition: transform 0.2s ease;
}

.login-submit-btn:hover .btn-arrow {
  transform: translateX(4px);
}

.dev-login-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-neutral);
}

.dev-login-divider {
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
}

.dev-login-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line-neutral);
  z-index: 1;
}

.dev-login-divider span {
  position: relative;
  z-index: 2;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  background: var(--surface-1);
  padding: 0 10px;
}

.dev-accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.dev-account-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 8px;
  background: var(--surface-3);
  border: 1px solid var(--line-neutral);
  border-radius: 2px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: unset !important;
}

.dev-account-btn:hover {
  background: var(--wash-gold);
  border-color: var(--line-gold);
  transform: translateY(-1px);
}

.dev-user-icon {
  font-size: 14px;
  color: var(--gold-300);
  margin-bottom: 3px;
}

.dev-user-name {
  font-weight: 600;
  font-size: 13px;
}

.dev-user-role {
  font-size: 11px;
  color: var(--text-muted);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

/* Tablet: 720px - 1099px */
@media (max-width: 1099px) {
  .desktop-nav {
    display: none;
  }
  .mobile-hamburger-btn {
    display: flex;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .table-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .app-main-container {
  width: 100%;
  overflow-x: hidden;
    padding: 16px;
  }
}

/* Phone: < 720px */
@media (max-width: 719px) {
  .header-actions .live-ist-clock-badge {
    display: none;
  }
  .header-search-form {
    display: none;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .table-grid {
    grid-template-columns: 1fr;
  }
  .mobile-bottom-bar {
    display: flex;
  }
  .app-main-container {
  width: 100%;
  overflow-x: hidden;
    padding: 12px 12px 76px 12px; /* Bottom bar clearance */
  }
  button, input, select {
    min-height: 44px; /* Touch target >= 44px */
  }
}
