/**
 * ============================================================================
 * Spades Poker Luxury Theme ("River Card / Spades Poker Luxury")
 * Design Tokens, Application Shell, Typography & Component Styling
 * ============================================================================
 */

/* ----------------------------------------------------------------------------
 * 1. DESIGN TOKENS & ROOT VARIABLES
 * ---------------------------------------------------------------------------- */
:root {
  /* Color Scheme */
  color-scheme: dark;

  /* Foundation Palette */
  --background: #0d1715;             /* Deep obsidian emerald root background */
  --foreground: #f4efe4;             /* Warm marfim / ivory text */
  --border: #29423b;                 /* Refined dark emerald border */
  --border-color: #29423b;           /* Alias for Bootstrap compatibility */
  --muted: #172824;                  /* Dark emerald muted surface */
  --muted-foreground: #9cafaa;       /* Muted emerald sage secondary text */
  --primary: #d2ab62;                /* River Card / Spades Royale Gold */
  --primary-foreground: #14221e;     /* Deep dark green contrast text on gold */
  --radius: 0.75rem;                 /* 12px base border radius */

  /* Surfaces & Panels */
  --card: #14251f;                   /* Velvety dark emerald card background */
  --card-foreground: #f4efe4;        /* Primary text inside cards */
  --panel: #14251f;                  /* Operational floor panel background */
  --popover: #10231e;                /* Dropdown and popover container */
  --popover-foreground: #f4efe4;     /* Popover text */

  /* Extended Surface Tones */
  --surface-slate: #111a28;          /* Slate tone accent surface */
  --surface-emerald-dark: #162a24;   /* Cash game table outer surface */
  --surface-felt-deep: #10201c;      /* Deep felt accent */
  --border-slate: #243048;           /* Subtle slate border */
  --border-gold-card: #7c6638;       /* Gold card border accent */

  /* Gold & Metallic Accents */
  --gold-primary: #d2ab62;           /* Primary gold */
  --gold-light: #e4bb6e;             /* Highlight gold for headers and table numbers */
  --gold-bright: #edbd4c;            /* Active tab and badge gold */
  --gold-glow: rgba(210, 171, 98, 0.15); /* Subtle border & box-shadow glow */

  /* Operational Semantic Status Colors */
  --emerald-live: #12be88;           /* Live cash, open tables, positive flow */
  --emerald-live-alt: #2ab981;       /* Alternative bright emerald */
  --emerald-surface: #1a4435;        /* Background badge for open/live status */
  --emerald-text: #8ed4b0;           /* Soft readable green text */

  --blue-tourney: #4b8df5;           /* Tournaments, info alerts, active chips */
  --blue-surface: #173d4a;           /* Dark blue container background */
  --blue-text: #6cc3dc;              /* Light blue metric text */

  --amber-warning: #d7a24d;          /* Waitlist, scheduled events, warnings */
  --amber-surface: #493720;          /* Dark warm amber container */
  --amber-text: #e2bb78;             /* Light amber metric text */

  --ruby-danger: #ff4c6d;            /* Cashouts, stock alerts, closed tables */
  --ruby-surface: #321827;           /* Dark ruby background */
  --ruby-border: #75243b;            /* Subtle dark ruby border */
  --ruby-text: #ff7890;              /* Light ruby alert text */

  --purple-accent: #8c6dc4;          /* CRM, active player counts, high rollers */
  --purple-surface: #30224f;         /* Deep violet card background */
  --purple-text: #b794e6;            /* Light violet highlight text */

  /* Backward Compatibility Tokens (Used in existing Spades templates) */
  --bg-poker-dark: #0d1715;
  --bg-poker-card: #14251f;
  --bg-poker-card-hover: #1a352c;
  --accent-gold: #d2ab62;
  --accent-green: #12be88;
  --accent-blue: #4b8df5;
  --accent-danger: #ff4c6d;
  --text-main: #f4efe4;
  --text-muted: #9cafaa;
  --sidebar-bg: #10231e;
  --sidebar-active-bg: #1e4035;
  --sidebar-active-color: #f5f0e6;
}

/* ----------------------------------------------------------------------------
 * 2. BASE RESET & TYPOGRAPHY
 * ---------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--background);
  color: var(--foreground);
  font-family: 'Plus Jakarta Sans', Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* Headings: Georgia Serif */
h1, h2, h3, h4, h5, h6,
.font-serif,
.page-heading h1,
.floor-heading h1,
.cash-management-heading h1 {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--foreground);
  font-weight: 600;
  letter-spacing: -0.025em;
}

h1 { font-size: clamp(24px, 2.2vw, 32px); line-height: 1.1; }
h2 { font-size: clamp(18px, 1.6vw, 24px); line-height: 1.2; }
h3 { font-size: clamp(16px, 1.3vw, 20px); line-height: 1.25; }

p, span, label, input, button, select, textarea, td, th {
  font-family: 'Plus Jakarta Sans', Arial, Helvetica, sans-serif;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--gold-light);
}

/* ----------------------------------------------------------------------------
 * 3. APPLICATION SHELL & LAYOUT
 * ---------------------------------------------------------------------------- */
.app-shell {
  min-height: 100vh;
  display: flex;
  background: radial-gradient(circle at 76% -15%, #1d4035 0, transparent 34%), #0d1715;
  position: relative;
}

.main-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: transparent;
}

/* Main Content Area */
.content {
  position: relative;
  max-width: 1420px;
  width: 100%;
  margin: 0 auto;
  padding: 32px clamp(20px, 3.5vw, 52px) 36px;
  flex: 1;
}

/* Poker Suits Watermark */
.content::before {
  content: '♠   ♥   ♣   ♦';
  position: absolute;
  top: 13px;
  right: clamp(20px, 3.5vw, 52px);
  color: var(--primary);
  opacity: 0.18;
  font-family: Georgia, 'Times New Roman', serif;
  letter-spacing: 0.65rem;
  font-size: 13px;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

@media (max-width: 768px) {
  .content::before {
    display: none;
  }
}

/* ----------------------------------------------------------------------------
 * 4. SIDEBAR NAVIGATION (.sidebar)
 * ---------------------------------------------------------------------------- */
.sidebar {
  width: 244px;
  background: linear-gradient(180deg, #10231e 0%, #0b1714 100%);
  border-right: 1px solid #28463c;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  padding: 24px 14px 16px;
  flex-shrink: 0;
  min-height: 100vh;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #29423b transparent;
  z-index: 1030;
}

.sidebar::-webkit-scrollbar {
  width: 5px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: #28463c;
  border-radius: 4px;
}

/* Brand Row */
.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 22px;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(40, 70, 60, 0.4);
  margin-bottom: 18px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--primary);
  border-radius: 10px;
  color: #14221e;
  box-shadow: 0 0 0 4px rgba(210, 171, 98, 0.15);
  flex-shrink: 0;
}

.brand-mark i,
.brand-mark svg {
  color: #14221e;
  font-size: 19px;
}

.brand-row strong {
  display: block;
  font-size: 13px;
  line-height: 1.1;
  color: var(--foreground);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-row span {
  display: block;
  color: #aeb5bf;
  font-size: 12px;
  letter-spacing: 0.2em;
  margin-top: 3px;
  font-weight: 600;
}

/* Club Selector Dropdown */
.club-select {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #183129;
  border: 1px solid #335749;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 22px;
  cursor: pointer;
  color: var(--foreground);
  text-decoration: none;
  transition: all 0.2s ease;
}

.club-select:hover {
  background: #1f3d33;
  border-color: var(--primary);
  color: var(--foreground);
}

.club-avatar {
  width: 29px;
  height: 29px;
  border-radius: 8px;
  background: #46515e;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: #d2d7dc;
  font-weight: 700;
  flex-shrink: 0;
}

.club-select-info {
  flex: 1;
  min-width: 0;
}

.club-select-info span {
  display: block;
  color: var(--muted-foreground);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.club-select-info strong {
  display: block;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--foreground);
}

.club-select .chevron {
  color: #9cafaa;
  font-size: 12px;
  transition: transform 0.2s ease;
}

/* Primary Navigation Categories */
.primary-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-caption {
  color: #8f9bb2;
  font-size: 12px;
  letter-spacing: 0.14em;
  padding: 8px 10px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  text-transform: uppercase;
  user-select: none;
}

.nav-caption.second {
  padding-top: 18px;
}

.nav-caption i {
  font-size: 12px;
}

/* Navigation Items */
.nav-item,
.sidebar .nav-link {
  border: 0;
  background: transparent;
  color: #9ba8c0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: 8px;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
  margin-bottom: 2px;
}

.nav-item i,
.nav-item svg,
.sidebar .nav-link i {
  color: var(--primary);
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  font-size: 13px;
  transition: color 0.2s ease;
}

.nav-item:hover,
.nav-item.active,
.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  color: #f5f0e6;
  background: #1e4035;
}

.nav-item.active,
.sidebar .nav-link.active {
  box-shadow: inset 3px 0 var(--primary);
  font-weight: 600;
}

.nav-count {
  margin-left: auto;
  border-radius: 10px;
  background: var(--primary);
  color: #14221e;
  font-size: 12px;
  padding: 2px 7px;
  font-weight: 700;
  line-height: 1.2;
}

.pro-badge {
  margin-left: auto;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--primary);
  color: #121a24;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.pro-badge.pro-locked {
  background: rgba(210, 171, 98, 0.18);
  color: var(--primary);
  border: 1px solid var(--primary);
}

/* Sidebar Footer: Security & User Profile */
.sidebar-bottom {
  margin-top: auto;
  padding-top: 18px;
}

.security-note {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 8px;
  border-top: 1px solid #28463c;
  border-bottom: 1px solid #28463c;
  margin-bottom: 14px;
}

.security-note i {
  color: #83bd9d;
  font-size: 14px;
  flex-shrink: 0;
}

.security-note strong {
  display: block;
  font-size: 12px;
  color: var(--foreground);
  line-height: 1.2;
}

.security-note span {
  display: block;
  font-size: 12px;
  color: #838c98;
  margin-top: 2px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald-live);
  box-shadow: 0 0 6px rgba(18, 190, 136, 0.7);
  flex-shrink: 0;
  margin-left: auto;
}

.profile,
.user-badge {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 8px;
  color: var(--foreground);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.profile:hover,
.user-badge:hover {
  background: rgba(30, 64, 53, 0.4);
  color: var(--foreground);
}

.profile .avatar,
.user-badge .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ad8661;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

.profile strong,
.user-badge strong {
  display: block;
  font-size: 12px;
  color: var(--foreground);
  line-height: 1.2;
}

.profile span,
.user-badge span {
  display: block;
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 2px;
}

/* Mobile Sidebar Drawer */
@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    z-index: 1050;
    inset: 0 auto 0 0;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    width: 260px;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.7);
  }

  .sidebar.sidebar-open,
  .sidebar.show {
    transform: translateX(0);
  }

  .mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(13, 23, 21, 0.75);
    backdrop-filter: blur(2px);
  }

  .mobile-close {
    display: grid;
    margin-left: auto;
    color: #aeb5bf;
    background: transparent;
    border: 0;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
  }
}

@media (min-width: 992px) {
  .mobile-close,
  .mobile-backdrop {
    display: none !important;
  }
}

/* ----------------------------------------------------------------------------
 * 5. TOPBAR HEADER (.topbar & .navbar-poker)
 * ---------------------------------------------------------------------------- */
.topbar,
.navbar-poker {
  height: 70px;
  background: #12221e;
  border-bottom: 1px solid #29443b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 3.5vw, 52px);
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.breadcrumb {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: #91a59b;
  margin: 0;
}

.breadcrumb a {
  color: #91a59b;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb strong {
  color: var(--foreground);
  font-weight: 600;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #29443b;
  border-radius: 8px;
  background: #10201c;
  color: #9aa0a8;
  font-size: 12px;
  padding: 6px 10px;
}

.search-field kbd {
  border: 1px solid #29443b;
  border-radius: 4px;
  font-size: 12px;
  padding: 2px 5px;
  color: #9cafaa;
  background: #162a24;
  margin-left: 8px;
}

.notification-btn {
  position: relative;
  border: 1px solid #29443b;
  background: #10201c;
  color: #9cafaa;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.notification-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.notification-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 6px var(--primary);
}

/* ----------------------------------------------------------------------------
 * 6. CARDS, PANELS & CONTAINERS
 * ---------------------------------------------------------------------------- */
.card-poker,
.card,
.panel {
  background-color: var(--card) !important;
  border: 1px solid var(--border);
  border-radius: var(--radius) !important;
  color: var(--foreground);
  box-shadow: 0 5px 18px rgba(6, 16, 13, 0.4);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card-poker:hover,
.card:hover {
  border-color: rgba(210, 171, 98, 0.4) !important;
}

.card-header,
.panel-header {
  background-color: rgba(16, 32, 28, 0.5) !important;
  border-bottom: 1px solid var(--border) !important;
  color: var(--foreground);
  padding: 16px 20px;
}

.card-footer {
  background-color: rgba(16, 32, 28, 0.5) !important;
  border-top: 1px solid var(--border) !important;
  color: var(--muted-foreground);
  padding: 14px 20px;
}

.card-body {
  padding: 20px;
}

/* ----------------------------------------------------------------------------
 * 7. BUTTONS & CONTROLS
 * ---------------------------------------------------------------------------- */
/* Primary Gold Buttons */
.btn-poker-gold,
.btn-gold,
.btn-orange,
.primary-button {
  background-color: var(--primary) !important;
  color: var(--primary-foreground) !important;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 12px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(210, 171, 98, 0.25);
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-poker-gold:hover,
.btn-gold:hover,
.btn-orange:hover,
.primary-button:hover {
  background-color: var(--gold-light) !important;
  color: var(--primary-foreground) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(210, 171, 98, 0.35);
}

.btn-poker-gold i,
.btn-gold i,
.primary-button i,
.btn-poker-gold svg,
.primary-button svg {
  color: var(--primary-foreground);
}

/* Outline Gold Button */
.btn-outline-gold,
.outline-button {
  background: #172d26;
  border: 1px solid #315246;
  border-radius: 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.btn-outline-gold:hover,
.outline-button:hover {
  background: #1e4035;
  border-color: var(--primary);
  color: #fff;
}

/* Operational Blue Button */
.btn-blue,
.btn-primary:not(.btn-poker-gold) {
  background-color: var(--blue-tourney) !important;
  color: #ffffff !important;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  transition: all 0.2s ease;
}

.btn-blue:hover,
.btn-primary:not(.btn-poker-gold):hover {
  background-color: #3b7be0 !important;
  color: #ffffff !important;
}

/* Emerald Green Button */
.btn-teal,
.btn-success {
  background-color: var(--emerald-live) !important;
  color: #ffffff !important;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  transition: all 0.2s ease;
}

.btn-teal:hover,
.btn-success:hover {
  background-color: #0fa876 !important;
  color: #ffffff !important;
}

/* Ruby Danger Button */
.btn-danger {
  background-color: var(--ruby-danger) !important;
  color: #ffffff !important;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  transition: all 0.2s ease;
}

.btn-danger:hover {
  background-color: #e53e5d !important;
}

/* Secondary Button */
.btn-secondary {
  background-color: #1a3028 !important;
  border: 1px solid #28463c !important;
  color: #c0ccc7 !important;
  border-radius: 8px;
}

.btn-secondary:hover {
  background-color: #244237 !important;
  color: #fff !important;
}

/* ----------------------------------------------------------------------------
 * 8. BADGES & STATUS PILLS
 * ---------------------------------------------------------------------------- */
.badge-gold,
.badge-warning {
  background-color: var(--primary) !important;
  color: #14221e !important;
  font-weight: 700;
}

.badge-green,
.badge-teal,
.badge-success {
  background-color: var(--emerald-live) !important;
  color: #ffffff !important;
  font-weight: 700;
}

.badge-blue,
.badge-info {
  background-color: var(--blue-tourney) !important;
  color: #ffffff !important;
  font-weight: 600;
}

.badge-danger {
  background-color: var(--ruby-danger) !important;
  color: #ffffff !important;
  font-weight: 600;
}

.badge-status {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.open-badge,
.status-badge.live {
  background: var(--emerald-surface);
  color: var(--emerald-text);
  border: 1px solid #315246;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.closed-badge,
.status-badge.closed {
  background: var(--ruby-surface);
  color: var(--ruby-text);
  border: 1px solid var(--ruby-border);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.status-badge.wait {
  background: var(--amber-surface);
  color: var(--amber-text);
  border: 1px solid #6b5327;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
}

/* ----------------------------------------------------------------------------
 * 9. TABLES & DATA GRIDS
 * ---------------------------------------------------------------------------- */
.table-dark,
.table {
  --bs-table-bg: var(--card);
  --bs-table-striped-bg: #172d26;
  --bs-table-hover-bg: #1c362e;
  border-color: var(--border);
  color: var(--foreground);
  margin-bottom: 0;
}

.table th,
.table-dark th {
  background-color: #10201c !important;
  color: var(--muted-foreground) !important;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--border) !important;
  padding: 12px 14px;
}

.table td,
.table-dark td {
  color: var(--foreground) !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 12px 14px;
  vertical-align: middle;
  font-size: 12px;
}

.table-warning,
tr.table-warning,
tr.table-warning > td,
tr.table-warning > th {
  background-color: rgba(210, 171, 98, 0.18) !important;
  color: var(--primary) !important;
  font-weight: 700 !important;
  border-left: 3px solid var(--primary) !important;
}

/* ----------------------------------------------------------------------------
 * 10. FORMS & INPUTS
 * ---------------------------------------------------------------------------- */
.form-control,
.form-select {
  background-color: #10201c !important;
  border: 1px solid var(--border) !important;
  color: var(--foreground) !important;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(210, 171, 98, 0.25) !important;
  color: var(--foreground) !important;
  background-color: #10201c !important;
}

.input-group-text {
  background-color: #162a24 !important;
  border: 1px solid var(--border) !important;
  color: var(--muted-foreground) !important;
  border-radius: 8px;
}

.form-check-input {
  background-color: #10201c;
  border: 1px solid var(--border);
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* ----------------------------------------------------------------------------
 * 11. MODALS & POPUPS
 * ---------------------------------------------------------------------------- */
.modal-content {
  background-color: #14251f !important;
  border: 1px solid #29423b;
  border-radius: 14px !important;
  color: var(--foreground) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7) !important;
}

.modal-header {
  border-bottom: 1px solid var(--border) !important;
  background: rgba(16, 32, 28, 0.6) !important;
  padding: 18px 22px !important;
}

.modal-title {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--gold-light);
  font-size: 18px;
}

.modal-footer {
  border-top: 1px solid var(--border) !important;
  background: rgba(16, 32, 28, 0.6) !important;
  padding: 16px 22px !important;
}

.modal-body {
  padding: 22px !important;
}

.btn-close {
  filter: invert(1) grayscale(100%) brightness(200%) !important;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.btn-close:hover {
  opacity: 1;
}

/* ----------------------------------------------------------------------------
 * 12. DROPDOWNS & MENUS
 * ---------------------------------------------------------------------------- */
.dropdown-menu-dark,
.dropdown-menu {
  background-color: #10231e !important;
  border: 1px solid #29443b !important;
  color: var(--foreground) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
  border-radius: 10px !important;
  padding: 6px !important;
}

.dropdown-item {
  color: #cfd8d4 !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  font-size: 12px !important;
  transition: background 0.15s ease, color 0.15s ease;
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active {
  background-color: #1e4035 !important;
  color: var(--gold-light) !important;
}

.dropdown-divider {
  border-top: 1px solid #28463c !important;
  margin: 6px 0 !important;
}

.dropdown-header {
  color: var(--primary) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  padding: 6px 12px 4px !important;
}

/* ----------------------------------------------------------------------------
 * 13. ALERTS & MESSAGES FRAMEWORK
 * ---------------------------------------------------------------------------- */
.alert {
  border-radius: 10px !important;
  border-width: 1px !important;
  font-size: 13px !important;
  padding: 12px 18px !important;
  margin-bottom: 20px !important;
}

.alert-success {
  background-color: var(--emerald-surface) !important;
  border-color: #29423b !important;
  color: var(--emerald-text) !important;
}

.alert-danger {
  background-color: var(--ruby-surface) !important;
  border-color: var(--ruby-border) !important;
  color: var(--ruby-text) !important;
}

.alert-warning {
  background-color: var(--amber-surface) !important;
  border-color: #6b5327 !important;
  color: var(--amber-text) !important;
}

.alert-info {
  background-color: var(--blue-surface) !important;
  border-color: var(--border-slate) !important;
  color: var(--blue-text) !important;
}

/* ----------------------------------------------------------------------------
 * 14. NAV TABS & SEGMENTED PILLS
 * ---------------------------------------------------------------------------- */
.nav-tabs {
  border-bottom: 2px solid var(--border) !important;
  gap: 4px;
}

.nav-tabs .nav-link {
  color: var(--muted-foreground) !important;
  background-color: #10201c !important;
  border: 1px solid var(--border) !important;
  border-bottom: none !important;
  border-radius: 8px 8px 0 0 !important;
  font-weight: 600;
  font-size: 12px;
  padding: 9px 16px;
  transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
  color: #ffffff !important;
  background-color: #172d26 !important;
  border-color: #315246 !important;
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
  color: var(--primary) !important;
  background-color: var(--card) !important;
  border-color: var(--primary) var(--border) var(--card) !important;
  border-top: 3px solid var(--primary) !important;
  font-weight: 700;
}

.nav-pills-poker {
  background-color: #0d1715;
  padding: 5px;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  display: flex;
  gap: 6px;
}

.nav-pills-poker .nav-link {
  color: var(--muted-foreground) !important;
  background-color: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 0.55rem;
  padding: 7px 14px;
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 0;
  transition: all 0.2s ease;
}

.nav-pills-poker .nav-link:hover {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.05) !important;
}

.nav-pills-poker .nav-link.active {
  color: #14221e !important;
  background-color: var(--primary) !important;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(210, 171, 98, 0.35);
}

.nav-pills-poker .nav-link.active i {
  color: #14221e !important;
}

/* ----------------------------------------------------------------------------
 * 15. PODIUM CARDS (RANKINGS & PODIA)
 * ---------------------------------------------------------------------------- */
.podium-card-gold {
  background: linear-gradient(135deg, rgba(210, 171, 98, 0.22) 0%, rgba(210, 171, 98, 0.06) 100%);
  border: 2px solid var(--primary);
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(210, 171, 98, 0.25);
  transition: transform 0.2s ease;
}

.podium-card-silver {
  background: linear-gradient(135deg, rgba(156, 175, 170, 0.22) 0%, rgba(156, 175, 170, 0.06) 100%);
  border: 2px solid #9cafaa;
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(156, 175, 170, 0.15);
  transition: transform 0.2s ease;
}

.podium-card-bronze {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.22) 0%, rgba(205, 127, 50, 0.06) 100%);
  border: 2px solid #cd7f32;
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(205, 127, 50, 0.15);
  transition: transform 0.2s ease;
}

.podium-card-gold:hover,
.podium-card-silver:hover,
.podium-card-bronze:hover {
  transform: translateY(-3px);
}

/* ----------------------------------------------------------------------------
 * 16. TEXT & COLOR UTILITY OVERRIDES
 * ---------------------------------------------------------------------------- */
.text-warning, .text-gold { color: var(--primary) !important; }
.text-info, .text-blue { color: var(--blue-tourney) !important; }
.text-teal, .text-success { color: var(--emerald-live) !important; }
.text-danger { color: var(--ruby-danger) !important; }
.text-light { color: var(--foreground) !important; }
.text-secondary, .text-muted { color: var(--muted-foreground) !important; }

.bg-warning { background-color: var(--primary) !important; color: #14221e !important; }
.bg-info { background-color: var(--blue-tourney) !important; color: #ffffff !important; }
.bg-success { background-color: var(--emerald-live) !important; color: #ffffff !important; }
.bg-dark { background-color: var(--card) !important; color: var(--foreground) !important; }
.border-secondary { border-color: var(--border) !important; }

/* Luxury Semantic Border Utilities */
.border-warning, .border-gold { border-color: var(--primary) !important; }
.border-success, .border-teal { border-color: var(--emerald-live) !important; }
.border-danger, .border-ruby { border-color: var(--ruby-danger) !important; }
.border-info, .border-blue { border-color: var(--blue-tourney) !important; }

/* Font size and button sizing utilities used across Spades templates */
.fs-7 { font-size: 0.85rem !important; }
.fs-8 { font-size: 0.75rem !important; }
.fs-9 { font-size: .75rem !important; }

.btn-xs {
  padding: 3px 8px !important;
  font-size: 0.75rem !important;
  border-radius: 6px !important;
}

.btn-outline-info {
  color: var(--blue-tourney) !important;
  border-color: var(--blue-tourney) !important;
  background: transparent !important;
}
.btn-outline-info:hover {
  background-color: var(--blue-tourney) !important;
  color: #ffffff !important;
}

.btn-outline-warning {
  color: var(--primary) !important;
  border-color: var(--primary) !important;
  background: transparent !important;
}
.btn-outline-warning:hover {
  background-color: var(--primary) !important;
  color: #14221e !important;
}

.btn-outline-danger {
  color: var(--ruby-danger) !important;
  border-color: var(--ruby-danger) !important;
  background: transparent !important;
}
.btn-outline-danger:hover {
  background-color: var(--ruby-danger) !important;
  color: #ffffff !important;
}

.btn-outline-success {
  color: var(--emerald-live) !important;
  border-color: var(--emerald-live) !important;
  background: transparent !important;
}
.btn-outline-success:hover {
  background-color: var(--emerald-live) !important;
  color: #ffffff !important;
}

/* ----------------------------------------------------------------------------
 * 17. PROTOTYPE-DERIVED STAT CARDS & FLOOR MONITOR PATTERNS
 * ---------------------------------------------------------------------------- */
.eyebrow {
  color: var(--primary);
  letter-spacing: 0.15em;
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.subheading {
  color: var(--muted-foreground);
  font-size: 12px;
  margin: 8px 0 0;
}

.floor-status {
  display: flex;
  gap: 10px;
  align-items: center;
  white-space: nowrap;
}

.floor-status span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #14221e;
}

.floor-status b {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--emerald-surface);
  border: 1px solid #315246;
  color: var(--emerald-text);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  position: relative;
  min-height: 140px;
  padding: 22px 20px;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
  border: 1px solid #21423d;
  border-radius: 16px;
  background: #0d1d1a;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 16px 0 0 16px;
}

.stat-card.green::before { background: var(--emerald-live); }
.stat-card.purple::before { background: var(--purple-accent); }
.stat-card.orange::before { background: var(--amber-warning); }
.stat-card.blue::before { background: var(--blue-tourney); }
.stat-card.gold::before { background: var(--primary); }

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-right: 14px;
  flex-shrink: 0;
  font-size: 18px;
}

.stat-icon.green { color: var(--emerald-live); background: #123e31; }
.stat-icon.purple { color: #b794e6; background: #30224f; }
.stat-icon.orange { color: var(--amber-warning); background: #4a3219; }
.stat-icon.blue { color: #6cc3dc; background: #173d4a; }

.stat-copy > span {
  display: block;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.stat-copy > strong {
  display: block;
  margin-top: 10px;
  color: #f2eee6;
  font-size: 27px;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.stat-copy > small {
  display: block;
  margin-top: 10px;
  color: var(--muted-foreground);
  font-size: 12px;
}

.stat-spark {
  display: flex;
  gap: 3px;
  align-items: end;
  height: 28px;
  margin-left: auto;
  align-self: center;
}

.stat-spark i {
  width: 4px;
  background: #b79a5d;
  border-radius: 2px;
  opacity: 0.9;
}
.stat-spark i:nth-child(1) { height: 10px; }
.stat-spark i:nth-child(2) { height: 18px; }
.stat-spark i:nth-child(3) { height: 13px; }
.stat-spark i:nth-child(4) { height: 26px; }
.stat-spark i:nth-child(5) { height: 20px; }
.stat-spark i:nth-child(6) { height: 28px; }

/* ----------------------------------------------------------------------------
 * 18. 2D CASH GAME TABLES & FELT PATTERNS
 * ---------------------------------------------------------------------------- */
.admin-table-card {
  border: 1px solid var(--border-gold-card);
  border-radius: 16px;
  background: linear-gradient(145deg, #162a24 0%, #10201c 100%);
  padding: 18px;
  box-shadow: 0 12px 30px rgba(6, 16, 13, 0.5), inset 0 1px rgba(210, 171, 98, 0.09);
  min-width: 0;
}

.admin-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #315246;
  padding-bottom: 14px;
}

.admin-table-header h2 {
  margin: 0;
  color: var(--gold-light);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.admin-table-header h2 span {
  color: var(--foreground);
}

.admin-table-header p {
  margin: 5px 0 0;
  color: var(--muted-foreground);
  font-size: 12px;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 14px 0 18px;
}

.admin-metrics > div {
  border: 1px solid #2a493e;
  border-radius: 8px;
  background: #142820;
  padding: 8px 6px;
  text-align: center;
}

.admin-metrics span {
  display: block;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--gold-light);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.admin-felt {
  position: relative;
  overflow: hidden;
  padding: 18px 12px 12px;
  border: 1px solid #715d37;
  border-radius: 28px;
  background: radial-gradient(ellipse at center, #15543e 0%, #0e3c2f 55%, #09291f 100%);
  box-shadow: inset 0 0 0 8px #0b211b, inset 0 0 40px rgba(0, 0, 0, 0.5), 0 10px 22px rgba(6, 18, 14, 0.6);
}

.admin-felt::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 2px dashed rgba(168, 131, 54, 0.7);
  border-radius: 20px;
  pointer-events: none;
}

.admin-pot {
  position: relative;
  z-index: 1;
  width: 195px;
  margin: 0 auto 24px;
  padding: 10px;
  text-align: center;
  border: 1px solid #ad8a4a;
  border-radius: 10px;
  background: linear-gradient(145deg, #172b25, #101b20);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5), 0 0 20px rgba(210, 171, 98, 0.15);
}

.admin-pot span {
  display: block;
  color: #b6c8bd;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.admin-pot strong {
  display: block;
  color: var(--gold-light);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.dealer-chip {
  position: absolute;
  top: 140px;
  left: 50%;
  transform: translateX(45px);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--primary);
  border: 1px solid #f0d595;
  color: #17251f;
  font-weight: 800;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.seat-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.admin-seat {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 14px 6px 8px;
  border: 1px dashed #2e5548;
  border-radius: 10px;
  background: linear-gradient(160deg, #172a32, #111d29);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  color: #929db1;
  text-align: center;
}

.admin-seat.occupied {
  border-color: #46705c;
  border-style: solid;
  background: linear-gradient(160deg, #1a3030, #132329);
}

.admin-seat > b {
  position: absolute;
  left: 6px;
  top: 6px;
  color: #b5c4c0;
  background: #273a42;
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 12px;
  font-weight: 800;
}

.admin-seat.occupied > b {
  background: var(--primary);
  color: #16231f;
}

.admin-seat strong {
  font-size: 12px;
  color: #e6eee9;
  margin-top: 3px;
  font-weight: 700;
}

.admin-seat em {
  color: #4fd09b;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

/* ----------------------------------------------------------------------------
 * 19. RESPONSIVE UTILITIES
 * ---------------------------------------------------------------------------- */
@media (max-width: 1050px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 0 16px;
    height: 60px;
  }
  .search-field {
    display: none;
  }
  .content {
    padding: 24px 16px 24px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .stat-card {
    min-height: 120px;
    padding: 16px 14px;
  }
  .stat-spark {
    display: none;
  }
}

/* ----------------------------------------------------------------------------
 * 20. SPADES ANALYTICS PRO ("River Card / Spades Poker Luxury")
 * Executive Intelligence, CRM Churn, Tabbed Analytics & Luxury Financial Tables
 * ---------------------------------------------------------------------------- */

/* Container & Header Section */
.analytics-overview {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.analytics-heading,
.page-heading.analytics-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.analytics-eyebrow,
.analytics-heading .eyebrow {
  color: var(--primary, #d2ab62);
  letter-spacing: 0.15em;
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 8px;
  text-transform: uppercase;
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
}

.analytics-heading h1,
.page-heading.analytics-heading h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--foreground, #f4efe4);
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.analytics-heading h1 i {
  color: var(--primary, #d2ab62);
  font-size: 26px;
}

/* PRO Badge with subtle gold glow */
.analytics-heading .pro-badge,
.pro-badge-luxury {
  margin-left: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 6px;
  background: linear-gradient(135deg, #2a2210, #171308);
  color: #edbd4c;
  border: 1px solid #7c6638;
  box-shadow: 0 0 10px rgba(210, 171, 98, 0.25), inset 0 1px 0 rgba(237, 189, 76, 0.3);
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
  vertical-align: middle;
  text-transform: uppercase;
}

.analytics-subheading,
.analytics-heading .subheading {
  color: var(--muted-foreground, #9cafaa);
  font-size: 12px;
  margin: 8px 0 0;
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
  line-height: 1.5;
}

.analytics-subheading strong,
.analytics-heading .subheading strong {
  color: var(--gold-light, #e4bb6e);
}

/* Period Filters & Custom Date Picker */
.analytics-filters-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.analytics-filters {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border, #29423b);
  border-radius: 10px;
  padding: 3px;
  background: var(--muted, #172824);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  flex-wrap: wrap;
}

.analytics-filters .filter-pill,
.filter-pill,
.analytics-filters button {
  border: 0;
  border-right: 1px solid #283650;
  background: transparent;
  color: #aab6ca;
  padding: 8px 13px;
  font: 700 11px 'Plus Jakarta Sans', Arial, sans-serif;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.analytics-filters .filter-pill:last-of-type,
.filter-pill:last-of-type,
.analytics-filters button:last-of-type {
  border-right: 0;
}

.analytics-filters .filter-pill:hover,
.filter-pill:hover,
.analytics-filters button:hover {
  color: #f4efe4;
  background: rgba(237, 189, 76, 0.12);
}

.analytics-filters .filter-pill.selected,
.filter-pill.selected,
.analytics-filters button.selected {
  color: #111a26;
  background: #edbd4c;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(237, 189, 76, 0.35);
  font-weight: 800;
}

.analytics-date-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--muted, #172824);
  border: 1px solid var(--border, #29423b);
  border-radius: 10px;
  padding: 3px 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.date-input {
  background: #0d1522;
  border: 1px solid #26354f;
  color: #f4efe4;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  padding: 6px 8px;
  outline: none;
  max-width: 125px;
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
}

.date-input:focus {
  border-color: #edbd4c;
  box-shadow: 0 0 0 2px rgba(237, 189, 76, 0.2);
}

.date-sep {
  color: #7b8ba5;
  font-size: 12px;
}

.date-submit-btn,
.analytics-filters .filter-icon {
  background: transparent;
  border: 0;
  color: #edbd4c;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.date-submit-btn:hover,
.analytics-filters .filter-icon:hover {
  background: #edbd4c;
  color: #111a26;
}

/* 5 Executive KPI Cards Grid */
.analytics-metrics,
.analytics-metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1200px) {
  .analytics-metrics,
  .analytics-metrics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .analytics-metrics,
  .analytics-metrics-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

.analytics-metric,
.analytics-kpi-card {
  position: relative;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border, #2a473d);
  border-top-width: 3px;
  border-radius: 14px;
  background: var(--card, #14251f);
  box-shadow: 0 8px 24px rgba(6, 16, 13, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.analytics-metric:hover,
.analytics-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(6, 16, 13, 0.5);
}

/* Color Accent Bars (Top & Inset Glow) */
.analytics-metric.gold,
.analytics-kpi-card.gold {
  border-top-color: #d2ab62;
  box-shadow: inset 3px 0 0 #d2ab62, 0 8px 24px rgba(6, 16, 13, 0.35);
  border-color: rgba(210, 171, 98, 0.25);
  border-top-color: #d2ab62;
}

.analytics-metric.green,
.analytics-kpi-card.green {
  border-top-color: #12be88;
  box-shadow: inset 3px 0 0 #12be88, 0 8px 24px rgba(6, 16, 13, 0.35);
  border-color: rgba(18, 190, 136, 0.25);
  border-top-color: #12be88;
}

.analytics-metric.blue,
.analytics-kpi-card.blue {
  border-top-color: #4b8df5;
  box-shadow: inset 3px 0 0 #4b8df5, 0 8px 24px rgba(6, 16, 13, 0.35);
  border-color: rgba(75, 141, 245, 0.25);
  border-top-color: #4b8df5;
}

.analytics-metric.purple,
.analytics-kpi-card.purple {
  border-top-color: #8c6dc4;
  box-shadow: inset 3px 0 0 #8c6dc4, 0 8px 24px rgba(6, 16, 13, 0.35);
  border-color: rgba(140, 109, 196, 0.25);
  border-top-color: #8c6dc4;
}

.analytics-metric.red,
.analytics-kpi-card.red {
  border-top-color: #ff4c6d;
  box-shadow: inset 3px 0 0 #ff4c6d, 0 8px 24px rgba(6, 16, 13, 0.35);
  border-color: rgba(255, 76, 109, 0.25);
  border-top-color: #ff4c6d;
}

.kpi-top,
.analytics-metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #9cafaa;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
}

.kpi-top .info-icon {
  cursor: help;
  opacity: 0.75;
  font-size: 12px;
  margin-left: 4px;
  color: #9cafaa;
  transition: opacity 0.2s;
}

.kpi-top .info-icon:hover {
  opacity: 1;
}

.kpi-icon,
.analytics-icon {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 15px;
}

.kpi-icon.gold, .analytics-icon.gold { color: #14221e; background: #d2ab62; }
.kpi-icon.green, .analytics-icon.green { color: #08271c; background: #12be88; }
.kpi-icon.blue, .analytics-icon.blue { color: #0f243b; background: #4b8df5; }
.kpi-icon.purple, .analytics-icon.purple { color: #1c1333; background: #8c6dc4; }
.kpi-icon.red, .analytics-icon.red { color: #2e0813; background: #ff4c6d; }

.kpi-value,
.analytics-metric strong {
  display: block;
  margin-top: 14px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.kpi-value.gold, .analytics-metric.gold strong { color: #d2ab62; }
.kpi-value.green, .analytics-metric.green strong { color: #12be88; }
.kpi-value.blue, .analytics-metric.blue strong { color: #4b8df5; }
.kpi-value.purple, .analytics-metric.purple strong { color: #b794e6; }
.kpi-value.red, .analytics-metric.red strong { color: #ff4c6d; }

.kpi-subtitle,
.analytics-metric small {
  display: block;
  margin-top: 8px;
  color: #8fa19b;
  font-size: 12px;
  font-weight: 500;
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
}

/* Segmented Analytics Tabs Navigation */
.analytics-tabs,
.analytics-tabs-nav,
.nav-pills-luxury {
  display: flex;
  align-items: stretch;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--border, #29423b);
  border-radius: 12px;
  background: var(--card, #14251f);
  overflow-x: auto;
  scrollbar-width: thin;
  box-shadow: 0 4px 16px rgba(6, 16, 13, 0.3);
}

.analytics-tabs button,
.analytics-tab-btn,
.nav-pills-luxury .nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 0;
  min-width: max-content;
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  background: transparent;
  color: #9cafaa;
  font: 700 12px 'Plus Jakarta Sans', Arial, sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  text-decoration: none;
}

.analytics-tabs button i,
.analytics-tab-btn i,
.nav-pills-luxury .nav-link i {
  color: var(--primary, #d2ab62);
  font-size: 14px;
  transition: color 0.2s ease;
}

.analytics-tabs button:hover,
.analytics-tab-btn:hover,
.nav-pills-luxury .nav-link:hover {
  color: #f4efe4;
  background: rgba(210, 171, 98, 0.1);
}

.analytics-tabs button.active,
.analytics-tab-btn.active,
.nav-pills-luxury .nav-link.active {
  background: #edbd4c;
  color: #14221e;
  box-shadow: 0 4px 14px rgba(210, 171, 98, 0.25);
  font-weight: 800;
}

.analytics-tabs button.active i,
.analytics-tab-btn.active i,
.nav-pills-luxury .nav-link.active i {
  color: #14221e;
}

.analytics-tabs button b,
.analytics-tab-btn .tab-badge,
.tab-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  color: #ffffff;
  background: #ff4c6d;
  font: 700 10px 'Plus Jakarta Sans', Arial, sans-serif;
}

.analytics-tabs button.active b,
.analytics-tab-btn.active .tab-badge {
  color: #14221e;
  background: rgba(20, 34, 30, 0.25);
}

/* Analytical Panels & Layout Grid */
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 992px) {
  .analytics-grid {
    grid-template-columns: 1fr;
  }
}

.analytics-panel,
.panel.analytics-panel {
  background: var(--card, #14251f);
  border: 1px solid var(--border, #2a473d);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(6, 16, 13, 0.35);
  display: flex;
  flex-direction: column;
}

.analytics-panel-header,
.analytics-panel .panel-header {
  margin-bottom: 20px;
}

.analytics-panel-header h2,
.analytics-panel-header h5,
.analytics-panel .panel-header h2 {
  color: var(--primary, #d2ab62);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 19px;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.analytics-panel-header p,
.analytics-panel .panel-header p {
  color: var(--muted-foreground, #9cafaa);
  font-size: 12px;
  margin: 0;
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
}

/* Revenue Breakdown List & Progress Bars */
.revenue-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 180px;
}

.revenue-item-header,
.revenue-list > div > span:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--foreground, #f4efe4);
}

.revenue-item-header strong,
.revenue-list > div > strong {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 700;
}

.progress-luxury {
  height: 10px;
  border-radius: 999px;
  background: #0d1a16;
  border: 1px solid #1a322a;
  overflow: hidden;
}

.progress-luxury .bar-green,
.progress-luxury .bar-emerald {
  background: linear-gradient(90deg, #12be88, #2ab981);
}

.progress-luxury .bar-blue {
  background: linear-gradient(90deg, #3d7ee8, #4b8df5);
}

.progress-luxury .bar-ruby {
  background: linear-gradient(90deg, #e6395c, #ff4c6d);
}

.progress-luxury .bar-gold {
  background: linear-gradient(90deg, #c59b4c, #edbd4c);
}

.analytics-total,
.analytics-total-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding: 16px 18px;
  border: 1px solid var(--border, #2a473d);
  border-radius: 10px;
  background: #0e1e18;
  color: var(--foreground, #f4efe4);
  font-size: 13px;
}

.analytics-total strong,
.analytics-total-bar strong {
  color: var(--primary, #d2ab62);
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Cash Movement & Visitor Metrics */
.cash-metrics,
.cash-flux-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.cash-flux-box,
.cash-metrics > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--border, #2a473d);
  border-radius: 10px;
  background: #0e1e18;
}

.cash-flux-box.in,
.cash-metrics > div:first-child {
  border-color: rgba(18, 190, 136, 0.3);
}

.cash-flux-box.out,
.cash-metrics > div:last-child {
  border-color: rgba(255, 76, 109, 0.3);
}

.cash-flux-box span,
.cash-metrics > div > span {
  font-size: 12px;
  color: #9cafaa;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cash-flux-box strong,
.cash-metrics > div > strong {
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.cash-flux-box.in strong,
.cash-metrics > div:first-child > strong {
  color: #12be88;
}

.cash-flux-box.out strong,
.cash-metrics > div:last-child > strong {
  color: #ff4c6d;
}

.analytics-panel h3.section-label,
.analytics-panel h3 {
  margin: 20px 0 10px;
  color: #9cafaa;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.visitor-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border, #29423b);
  color: var(--foreground, #f4efe4);
  font-size: 13px;
}

.visitor-metric:last-of-type {
  border-bottom: 0;
}

.visitor-metric strong {
  color: var(--primary, #d2ab62);
  font-family: Georgia, serif;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

/* Tab-Specific Sub-KPI Grid */
.tab-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 992px) {
  .tab-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .tab-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.tab-kpi-card {
  padding: 16px;
  border: 1px solid var(--border, #2a473d);
  border-radius: 12px;
  background: var(--card, #14251f);
  text-align: center;
  box-shadow: 0 4px 14px rgba(6, 16, 13, 0.3);
}

.tab-kpi-card small.kpi-title {
  display: block;
  color: #9cafaa;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tab-kpi-card h3 {
  font-family: Georgia, serif;
  font-size: 24px;
  margin: 6px 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.tab-kpi-card small.kpi-desc {
  display: block;
  color: #7b8e88;
  font-size: 12px;
}

/* Luxury Tables & Table Containers */
.table-container-luxury {
  border: 1px solid var(--border, #29433a);
  border-radius: 12px;
  background: #14251f;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(6, 16, 13, 0.35);
}

.table-luxury,
.table-luxury-dark {
  width: 100%;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--foreground, #f4efe4);
}

.table-luxury thead th,
.table-luxury-dark thead th {
  background: #10221d;
  color: #9cafaa;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid #29433a;
  padding: 12px 16px;
  white-space: nowrap;
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
}

.table-luxury tbody td,
.table-luxury-dark tbody td {
  padding: 12px 16px;
  border-top: 1px solid #1c332b;
  font-size: 12px;
  color: #dce2eb;
  vertical-align: middle;
}

.table-luxury tbody tr,
.table-luxury-dark tbody tr {
  background: #14251f;
  transition: background-color 0.15s ease;
}

.table-luxury tbody tr:nth-of-type(even),
.table-luxury-dark tbody tr:nth-of-type(even) {
  background: #172d26;
}

.table-luxury tbody tr:hover,
.table-luxury-dark tbody tr:hover {
  background: #1d3930;
}

/* Badges & Chips */
.badge-luxury-gold {
  background: #d2ab62;
  color: #14221e;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-luxury-green {
  background: #1b4435;
  color: #8dd5aa;
  border: 1px solid #2a6850;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-luxury-blue {
  background: #173d4a;
  color: #82bed0;
  border: 1px solid #245b6e;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-luxury-ruby {
  background: #321827;
  color: #ff7890;
  border: 1px solid #6f2638;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-luxury-dark {
  background: #10201c;
  color: #9cafaa;
  border: 1px solid #29433a;
  font-weight: 600;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
}

/* Action Buttons */
.btn-luxury-outline-gold {
  background: #172d26;
  border: 1px solid #315246;
  color: #d2ab62;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-luxury-outline-gold:hover {
  background: #1e4035;
  border-color: #d2ab62;
  color: #f5f0e6;
}

.btn-luxury-gold {
  background: #d2ab62;
  color: #14221e;
  border: 1px solid #d2ab62;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-luxury-gold:hover {
  background: #e4bb6e;
  border-color: #e4bb6e;
  color: #0f1a16;
}

.btn-luxury-whatsapp {
  background: #12be88;
  color: #08271c;
  border: 1px solid #12be88;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-luxury-whatsapp:hover {
  background: #25d397;
  color: #061a12;
}

/* KPI Mini-Sparklines Per Tone */
.analytics-metric.gold .stat-spark i,
.analytics-kpi-card.gold .stat-spark i {
  background: #d2ab62;
}

.analytics-metric.green .stat-spark i,
.analytics-kpi-card.green .stat-spark i {
  background: #12be88;
}

.analytics-metric.blue .stat-spark i,
.analytics-kpi-card.blue .stat-spark i {
  background: #4b8df5;
}

.analytics-metric.purple .stat-spark i,
.analytics-kpi-card.purple .stat-spark i {
  background: #8c6dc4;
}

.analytics-metric.red .stat-spark i,
.analytics-kpi-card.red .stat-spark i {
  background: #ff4c6d;
}

.analytics-metric .d-flex,
.analytics-kpi-card .d-flex {
  margin-top: 14px;
}

.analytics-metric .d-flex .kpi-value,
.analytics-kpi-card .d-flex .kpi-value,
.analytics-metric .d-flex strong,
.analytics-kpi-card .d-flex strong {
  margin-top: 0;
}

/* Analytics Footer */
.analytics-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 36px;
  padding: 16px 20px;
  border-top: 1px solid var(--border, #29423b);
  color: var(--muted-foreground, #9cafaa);
  font-size: 12px;
  flex-wrap: wrap;
  gap: 12px;
}

.analytics-footer span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
