/**
 * Ligalo Internacional - Taquilla App CSS
 * Light theme matching ligaloenlinea.com original design
 */

:root {
  --navy:        #0d1b2a;
  --navy-mid:    #132236;
  --blue:        #1565c0;
  --blue-light:  #1976d2;
  --gold:        #f9a825;
  --gold-btn:    #f0a500;
  --green:       #2e7d32;
  --red:         #c62828;
  --red-btn:     #d32f2f;
  --text:        #1a1a1a;
  --text-muted:  #666;
  --border:      #dee2e6;
  --bg:          #f5f5f5;
  --bg-white:    #ffffff;

  /* Layout dimensions */
  --topbar-h:    78px;
  --navbar-h:    50px;
  --header-total: 122px;
  --sidebar-w:   260px;
  --video-w:     400px;
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 0.88rem;
  margin: 0;
  padding: 0;
}

/* ============================================================
   TOP BAR (dark navy, full width)
   ============================================================ */
.top-bar {
  background: var(--navy);
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  padding: 0 calc((100% - 1600px) / 2 + 1.25rem);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1100;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
@media (max-width: 1640px) {
  .top-bar { padding: 0 1.25rem; }
}

.top-bar-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #b0bec5;
  font-size: 0.78rem;
}
.top-bar-left a {
  color: #b0bec5;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
}
.top-bar-left a:hover { color: #fff; }

.top-bar-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.top-bar-logo img {
  height: 56px;
  object-fit: contain;
}

.top-bar-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  color: #eceff1;
  font-size: 0.82rem;
  min-width: 200px;
  overflow: visible;
}
.top-bar-username {
  color: #f9a825;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-bar-credits {
  color: #eceff1;
  font-size: 0.8rem;
}
.top-bar-credits strong {
  color: #81c784;
  font-weight: 700;
}
.top-bar-points {
  color: #b0bec5;
  font-size: 0.78rem;
}
.top-bar-points strong {
  color: var(--gold);
  font-weight: 700;
}
.btn-salir {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  color: #eceff1;
  border-radius: 5px;
  padding: 2px 10px;
  font-size: 0.72rem;
  cursor: pointer;
  text-decoration: none;
  margin-top: 0;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s;
}
.btn-salir:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* ── Topbar Panels (new design) ── */
.topbar-panels {
  flex-direction: row !important;
  align-items: stretch !important;
  gap: 0 !important;
  min-width: auto !important;
}
.tb-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 18px;
  border-left: 1px solid rgba(255,255,255,0.12);
  gap: 2px;
}
.tb-panel:first-child { border-left: none; }
.tb-panel-label {
  font-size: 0.62rem;
  font-weight: 600;
  color: #90a4ae;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tb-panel-value {
  font-size: 0.9rem;
  color: #fff;
  white-space: nowrap;
}
.tb-panel-value.tb-big {
  font-size: 1.25rem;
  font-weight: 700;
}
.tb-credits .tb-panel-value { color: #81c784; }
.tb-lp .tb-panel-value { color: var(--gold); }
.tb-user .tb-panel-value { color: #f9a825; font-size: 0.95rem; }
.tb-user .btn-salir { margin-top: 1px; font-size: 0.7rem; }
.vip-badge-lg {
  padding: 4px 14px;
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}
.tb-bell {
  color: #fff;
  text-decoration: none;
  font-size: 1.3rem;
  position: relative;
}
.tb-bell:hover { color: var(--gold); }
.tb-bell .mensajes-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: #f44336;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 8px;
  min-width: 14px;
  text-align: center;
}


@media (max-width: 992px) {
  .topbar-panels { display: none !important; }
}


/* ============================================================
   NAV BAR (white background, dark text)
   ============================================================ */
.nav-bar {
  background: #fff;
  min-height: var(--navbar-h);
  display: flex;
  align-items: center;
  padding: 0 calc((100% - 1600px) / 2 + 1.25rem);
  position: fixed;
  top: var(--topbar-h);
  left: 0; right: 0;
  z-index: 1090;
  border-bottom: 2px solid var(--navy);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
@media (max-width: 1640px) {
  .nav-bar { padding: 0 1.25rem; }
}

.nav-bar-links {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
  flex: 1;
  overflow: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE/Edge */
}
.nav-bar-links::-webkit-scrollbar { display: none; }
.nav-bar-links .nav-link {
  color: var(--navy);
  font-size: clamp(0.58rem, 0.75vw, 0.84rem);
  font-weight: 600;
  padding: 0 clamp(0.25rem, 0.5vw, 0.9rem);
  height: var(--navbar-h);
  display: flex;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.nav-bar-links .nav-link:hover {
  background: rgba(13,27,42,0.06);
  color: var(--navy);
}
.nav-bar-links .nav-link.active {
  border-bottom-color: var(--navy);
  color: var(--navy);
}

/* Dropdown caret */
.nav-bar-links .dropdown-toggle::after {
  margin-left: 4px;
}
.nav-bar-links .dropdown-menu {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 0.35rem 0;
  min-width: 180px;
  margin-top: 2px;
}
.nav-bar-links .dropdown-item {
  font-size: 0.82rem;
  padding: 0.4rem 1rem;
  color: var(--navy);
}
.nav-bar-links .dropdown-item:hover {
  background: #f0f4f8;
}
.nav-bar-links .dropdown-item.text-danger { color: #c62828; }

.nav-bar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-retirar {
  background: var(--red-btn);
  border: none;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 1.1rem;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: background 0.15s;
  text-transform: uppercase;
}
.btn-retirar:hover { background: #b71c1c; color: #fff; }

.btn-depositar {
  background: var(--navy);
  border: none;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 1.1rem;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: background 0.15s;
  text-transform: uppercase;
}
.btn-depositar:hover { background: #1a2e45; color: #fff; }

/* ============================================================
   MARQUEE / ALERT BANNER (gold background)
   ============================================================ */
.marquee-banner {
  background: #fff;
  color: #000;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 6px calc((100% - 1600px) / 2 + 1.25rem);
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 1px solid #e0e0e0;
  position: fixed;
  top: calc(var(--topbar-h) + var(--navbar-h));
  left: 0; right: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
}
@media (max-width: 1640px) {
  .marquee-banner { padding: 6px 1.25rem; }
}
.marquee-icon {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 12px 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #000;
  font-family: 'Roboto Condensed', sans-serif;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.marquee-icon i {
  font-size: 0.95rem;
}
.marquee-track {
  flex: 1;
  overflow: hidden;
}
.marquee-inner {
  display: inline-block;
  padding-left: 100%;
  animation: marquee-scroll 40s linear infinite;
  font-family: 'Roboto Condensed', sans-serif;
  color: #000;
}
@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ============================================================
   PAGE BODY OFFSET
   ============================================================ */
.taquilla-layout {
  padding-top: calc(var(--topbar-h) + var(--navbar-h) + 32px);
}

/* ============================================================
   THREE-COLUMN MAIN LAYOUT
   ============================================================ */
.taquilla-main {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr var(--video-w);
  min-height: calc(100vh - var(--topbar-h) - var(--navbar-h) - 32px);
  background: var(--bg);
  gap: 0;
  max-width: 1600px;
  margin: 0 auto;
  box-shadow: -1px 0 0 var(--border), 1px 0 0 var(--border);
}

/* ============================================================
   LEFT SIDEBAR — Track List
   ============================================================ */
.taquilla-sidebar {
  background: #fff;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  position: sticky;
  top: calc(var(--topbar-h) + var(--navbar-h) + 32px);
  height: calc(100vh - var(--topbar-h) - var(--navbar-h) - 32px);
}

.sidebar-header {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, #0d2240, #1a3a5c);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.track-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.track-table colgroup .col-track { width: 52%; }
.track-table colgroup .col-prox  { width: 18%; }
.track-table colgroup .col-hora  { width: 30%; }
.track-table thead tr {
  background: #f0f4f8;
  border-bottom: 2px solid var(--border);
}
.track-table th {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #546e7a;
  padding: 0.4rem 0.3rem;
  letter-spacing: 0.03em;
  overflow: hidden;
}
.track-table tbody td {
  padding: 0.4rem 0.35rem;
  font-size: 0.8rem;
  vertical-align: middle;
  border-bottom: 1px solid #eaeef2;
  overflow: hidden;
}
.track-row {
  cursor: pointer;
  transition: background 0.1s;
}
.track-row:hover { background: #f0f4f8; }
.track-row.active {
  background: linear-gradient(90deg, #0d2240 0%, #1a3a5c 100%);
}
.track-row.active .track-name-text { color: #fff; }
.track-row.active .track-country { color: rgba(255,255,255,0.7); }
.track-row.active .track-fecha { color: #ffa726; }
.track-row.active .track-num-badge { color: #fff !important; }
.track-row.active .track-time-badge { background: #f15214; }
.track-row.active .track-mini-countdown { color: #ffa726; }


/* Modernized sidebar track cells */
.track-info-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.track-name-text {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.track-country {
  font-weight: 500;
  font-size: 0.65rem;
  opacity: 0.7;
}
.track-fecha {
  font-size: 0.62rem;
  font-weight: 600;
  color: #f15214;
  letter-spacing: 0.02em;
  line-height: 1;
}

.track-name-box {
  display: inline-block;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--navy);
  background: #fff;
  white-space: nowrap;
  max-width: 165px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-row.active 
/* Modernized sidebar track cells */
.track-info-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.track-name-text {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.track-country {
  font-weight: 500;
  font-size: 0.65rem;
  opacity: 0.7;
}
.track-fecha {
  font-size: 0.62rem;
  font-weight: 600;
  color: #f15214;
  letter-spacing: 0.02em;
  line-height: 1;
}

.track-name-box {
  border-color: var(--navy);
  background: #e8edf5;
}

.track-num-badge {
  font-size: 0.78rem;
  color: #546e7a;
  text-align: center;
}

.track-time-badge {
  background: var(--navy);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 12px;
  white-space: nowrap;
  display: inline-block;
}

/* Section separator headers in sidebar */
.track-section-header td {
  background: linear-gradient(90deg, #1a3a5c, #0d2240);
  color: #ffa726;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 8px !important;
  border-bottom: 1px solid #ff6b00;
  text-align: left;
}

/* ============================================================
   CENTER CONTENT — Race / Betting Area
   ============================================================ */
.taquilla-content {
  background: #fff;
  padding: 0.85rem 1rem;
  overflow-y: auto;
  border-right: 1px solid var(--border);
}

/* Race selectors row */
.race-selectors {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.race-selectors .form-select {
  font-size: 0.84rem;
  border: 1px solid #bbb;
  background: #fff;
  color: var(--navy);
  padding: 0.4rem 2rem 0.4rem 0.75rem;
  border-radius: 5px;
  flex: 1;
  min-width: 160px;
}
.race-selectors .form-select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 2px rgba(13,27,42,0.12);
}
.race-time-display {
  background: var(--navy);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.38rem 1rem;
  border-radius: 5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Bet type tabs */
.bet-type-tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.bet-type-tab {
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  color: #444;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
}
.bet-type-tab:hover {
  background: #e8edf5;
  border-color: var(--navy);
  color: var(--navy);
}
.bet-type-tab.active {
  background: var(--red-btn);
  border-color: var(--red-btn);
  color: #fff;
}
.bet-type-tab.active .tab-icon {
  color: #fff;
}

/* Horse table */
.horse-table-wrap {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}

.horse-table {
  width: 100%;
  border-collapse: collapse;
}

.horse-table thead tr {
  background: #f8f9fa;
  border-bottom: 2px solid #e0e0e0;
}

.horse-table th {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #546e7a;
  padding: 0.5rem 0.6rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.horse-table td {
  padding: 0.45rem 0.6rem;
  vertical-align: middle;
  font-size: 0.84rem;
  border-bottom: 1px solid #f0f0f0;
  color: var(--text);
}

.horse-table tbody tr {
  cursor: pointer;
  transition: background 0.1s;
}
.horse-table tbody tr:hover { background: #f5f8ff; }
.horse-table tbody tr.selected-horse { background: #e8f0fe; }
.horse-table tbody tr.retired { opacity: 0.45; pointer-events: none; text-decoration: line-through; }

/* Horse number colored circle */
.puesto-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* Horse name + jockey */
.horse-name-main {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--navy);
  text-transform: uppercase;
}
.horse-jockey {
  font-size: 0.72rem;
  color: #888;
}

/* Apostar button (light gray) */
.btn-apostar-light {
  background: #e8ecf0;
  border: 1px solid #ccc;
  color: #444;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.28rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s;
}
.btn-apostar-light:hover {
  background: #d5dce5;
  border-color: #aaa;
}

/* %Win bar */
.win-pct-display {
  font-size: 0.8rem;
  font-weight: 700;
  color: #2e7d32;
}
.win-bar-wrap {
  position: relative;
  width: 100%;
  min-width: 55px;
  height: 22px;
  background: #eaeaea;
  border-radius: 4px;
  overflow: hidden;
}
.win-bar-text {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 6px;
  font-size: .68rem;
  font-weight: 700;
  color: #000 !important;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff;
  white-space: nowrap;
}

.win-bar-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(.25,.8,.25,1);
}
.win-bar-wrap[data-pct="0"] .win-bar-text {
  color: #999 !important;
  text-shadow: none;
}


/* Tabla Fija odds */
.tf-odds-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tf-header {
  font-size: 0.68rem;
  font-weight: 700;
  color: #546e7a;
  text-transform: uppercase;
}
.tf-paga {
  font-size: 0.7rem;
  color: #888;
}
.tf-value {
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 3px;
}
.tf-value.up   { color: #2e7d32; }
.tf-value.down { color: #c62828; }
.tf-arrow {
  font-size: 0.75rem;
}

/* Apostar button with number (gold/orange) */
.btn-apostar-gold {
  background: var(--gold-btn);
  border: none;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.28rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: background 0.12s;
}
.btn-apostar-gold:hover { background: #e0950a; }
.btn-apostar-gold .num-badge {
  background: rgba(255,255,255,0.25);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 3px;
  min-width: 18px;
  text-align: center;
}

/* Bet type row (expanded) */
.bet-type-row td {
  background: #f5f8ff;
  border-bottom: 1px solid #e0eaf8;
}
.bet-type-row-inner {
  padding: 0.4rem 0;
}
.bet-type-row-label {
  font-size: 0.72rem;
  color: #666;
  margin-bottom: 0.35rem;
}
.bet-type-row-label strong { color: var(--navy); }

/* Bet type buttons in expanded row */
.bet-type-btn {
  padding: 0.28rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid #ccc;
  background: #fff;
  color: #444;
  transition: all 0.12s;
  white-space: nowrap;
}
.bet-type-btn:hover {
  background: #e8f0fe;
  border-color: var(--navy);
  color: var(--navy);
}
.bet-type-btn.selected {
  background: var(--gold-btn);
  border-color: var(--gold-btn);
  color: #fff;
  font-weight: 700;
}

/* Race tabs (carrera # tabs) */
.carrera-tab {
  padding: 0.3rem 0.65rem;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #ccc;
  background: #f5f5f5;
  color: #444;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.12s;
}
.carrera-tab:hover { background: #e8edf5; border-color: var(--navy); color: var(--navy); }
.carrera-tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.carrera-tab.status-abierta { border-color: #4caf50; }
.carrera-tab.status-en_curso { border-color: var(--gold); }
.carrera-tab.status-finalizada,
.carrera-tab.status-cerrada { opacity: 0.5; }

/* Race info bar */
.race-info-bar {
  background: #f0f4f8;
  border: 1px solid #dce6f0;
  border-radius: 6px;
  padding: 0.55rem 0.9rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.race-info-label {
  font-size: 0.7rem;
  color: #78909c;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.race-info-value {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
}

/* ============================================================
   RIGHT PANEL — Live Video
   ============================================================ */
.taquilla-video {
  background: #fff;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: calc(var(--topbar-h) + var(--navbar-h) + 32px);
  max-height: calc(100vh - var(--topbar-h) - var(--navbar-h) - 32px);
  overflow-y: auto;
}

.video-header {
  background: var(--navy);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 0.65rem 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.video-header .live-dot {
  width: 8px;
  height: 8px;
  background: #f44336;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 1.5s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.video-embed-area {
  flex: none;
  background: #111;
  display: flex;
  align-items: stretch;
  /* 16:9 landscape — wider than tall */
  aspect-ratio: 16 / 9;
  width: 100%;
}
.video-embed-area iframe,
.video-embed-area .video-placeholder {
  width: 100%;
  height: 100%;
}
.video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #546e7a;
  font-size: 0.82rem;
  padding: 2rem;
  text-align: center;
  min-height: 0;
}
.video-placeholder i { font-size: 2rem; margin-bottom: 0.5rem; color: #37474f; }

/* ============================================================
   BETSLIP (below video on right panel)
   ============================================================ */
.betslip-wrap {
  border-top: 1px solid var(--border);
  background: #fafafa;
  display: flex;
  flex-direction: column;
}

.betslip-header {
  background: var(--navy);
  color: #fff;
  padding: 0.5rem 0.75rem;
  font-weight: 700;
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.betslip-clear {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0;
}
.betslip-clear:hover { color: #fff; }

.betslip-items {
  flex: 1;
  overflow-y: auto;
  padding: 0.45rem;
  max-height: 220px;
}

.betslip-item {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 0.45rem 0.6rem;
  margin-bottom: 0.35rem;
}
.betslip-item .horse-name { font-size: 0.82rem; font-weight: 700; color: var(--navy); }
.betslip-item .bet-meta   { font-size: 0.7rem; color: #78909c; }
.betslip-item .bet-odds   { font-size: 0.8rem; font-weight: 700; color: var(--gold-btn); }
.betslip-item .remove-btn {
  background: none; border: none; color: #aaa;
  cursor: pointer; padding: 0; font-size: 0.78rem; transition: color 0.1s;
}
.betslip-item .remove-btn:hover { color: #c62828; }

.empty-betslip {
  text-align: center;
  color: #aaa;
  padding: 1.5rem 1rem;
  font-size: 0.8rem;
}
.empty-betslip i { font-size: 1.5rem; margin-bottom: 0.4rem; display: block; color: #ccc; }

.betslip-footer {
  padding: 0.65rem 0.75rem;
  border-top: 1px solid #e0e0e0;
  background: #fff;
}
.amount-row input {
  background: #fff;
  border: 1px solid #bbb;
  color: var(--navy);
  border-radius: 6px;
  padding: 0.4rem 0.65rem;
  font-size: 0.88rem;
  width: 100%;
  text-align: right;
}
.amount-row input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 2px rgba(13,27,42,0.12);
}
.btn-apostar-submit {
  background: linear-gradient(135deg, #2e7d32, #388e3c);
  border: none;
  border-radius: 7px;
  padding: 0.55rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  width: 100%;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-apostar-submit:hover { opacity: 0.9; }
.btn-apostar-submit:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================================
   MODALS (keeping dark style for contrast)
   ============================================================ */
.confirm-modal .modal-content {
  background: #0d1b2a;
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
}
.confirm-modal .modal-header { border-bottom: 1px solid rgba(255,255,255,0.07); }
.confirm-modal .modal-footer { border-top: 1px solid rgba(255,255,255,0.07); }

.modal-backdrop { background: rgba(4,8,16,0.75); }
.modal-content {
  background: #0d1b2a;
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 12px;
}
.modal-header { border-bottom: 1px solid rgba(255,255,255,0.07); padding: 0.85rem 1.25rem; }
.modal-body   { padding: 1rem 1.25rem; }
.modal-footer { border-top: 1px solid rgba(255,255,255,0.07); padding: 0.75rem 1.25rem; }
.modal-title  { font-weight: 700; font-size: 0.95rem; }
.btn-close-white { filter: invert(1) grayscale(100%) brightness(200%); }

/* Dark dropdown for betslip area */
.dropdown-menu.dropdown-dark {
  background: #0d1b2a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 0.35rem;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.dropdown-menu.dropdown-dark .dropdown-item {
  color: #90a4ae;
  font-size: 0.82rem;
  border-radius: 5px;
  padding: 0.4rem 0.85rem;
  transition: background 0.1s, color 0.1s;
}
.dropdown-menu.dropdown-dark .dropdown-item:hover {
  background: rgba(21,101,192,0.2);
  color: #fff;
}
.dropdown-menu.dropdown-dark .dropdown-item.text-danger { color: #ef9a9a; }
.dropdown-menu.dropdown-dark .dropdown-item.text-danger:hover {
  background: rgba(198,40,40,0.15);
  color: #ef5350;
}
.dropdown-menu.dropdown-dark .dropdown-divider { border-color: rgba(255,255,255,0.07); margin: 0.25rem 0; }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 3px; }

/* ============================================================
   FORMS (light theme overrides)
   ============================================================ */
.form-control {
  background: #fff;
  border: 1px solid #bbb;
  color: var(--navy);
  font-size: 0.88rem;
}
.form-control:focus {
  background: #fff;
  border-color: var(--navy);
  color: var(--navy);
  box-shadow: 0 0 0 2px rgba(13,27,42,0.12);
}
.form-select {
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23546e7a' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  border: 1px solid #bbb;
  color: var(--navy);
  font-size: 0.88rem;
}
.form-select:focus {
  background-color: #fff;
  border-color: var(--navy);
  color: var(--navy);
  box-shadow: 0 0 0 2px rgba(13,27,42,0.12);
}
.form-select option { background: #fff; color: var(--navy); }
.form-label { color: #555; font-size: 0.85rem; margin-bottom: 0.3rem; }

/* ============================================================
   MOBILE TOOLBAR
   ============================================================ */
.mobile-toolbar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 0.5rem 1rem;
  gap: 0.5rem;
  z-index: 999;
}
.mobile-toolbar button {
  flex: 1;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.mobile-toolbar .bet-count-badge {
  background: #c62828;
  color: #fff;
  font-size: 0.65rem;
  border-radius: 10px;
  padding: 1px 6px;
  margin-left: 4px;
}

/* ============================================================
   QUICK LINKS
   ============================================================ */
.quick-link-card {
  display: block;
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem 0.5rem;
  text-align: center;
  color: var(--navy);
  text-decoration: none;
  font-size: 0.82rem;
  transition: border-color 0.15s, background 0.15s;
}
.quick-link-card:hover {
  border-color: var(--navy);
  background: #e8edf5;
  color: var(--navy);
}

/* ============================================================
   SECTION HEADING
   ============================================================ */
.section-heading {
  color: #546e7a;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  margin-top: 1rem;
}

/* ============================================================
   BADGES (light theme)
   ============================================================ */
.badge { font-size: 0.68rem; font-weight: 700; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
  :root { --video-w: 300px; }
}

@media (max-width: 992px) {
  :root { --sidebar-w: 220px; --video-w: 280px; }
  .taquilla-main {
    grid-template-columns: var(--sidebar-w) 1fr;
  }
  .taquilla-video { display: none; }
}


/* ============================================================
   FOOTER
   ============================================================ */
/* Footer styles in footer.php */

/* ============================================================
   LOGIN PAGE (kept dark per original)
   ============================================================ */
body.login-page {
  background: var(--navy);
  background-image: url("/public/img/home-bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
  color: #fff;
}
.login-page .ticker {
  background: var(--blue);
  color: #fff;
  font-size: 0.8rem;
  padding: 4px 0;
  overflow: hidden;
  white-space: nowrap;
}
.login-page .ticker-inner {
  display: inline-block;
  animation: ticker-scroll 35s linear infinite;
}
@keyframes ticker-scroll {
  0%   { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.login-card {
  background: rgba(10,18,38,0.82);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  width: 100%;
  max-width: 600px;
  padding: 1.2rem 2.2rem;
}
.brand-area {
  text-align: center;
  margin-bottom: 0.8rem;
}
.brand-area img {
  max-width: 160px !important;
}
.brand-area h1 {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 900;
  margin: 0.5rem 0 0;
}
.brand-area .sub {
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1rem;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 3px;
}
.auth-tab {
  flex: 1;
  padding: 0.45rem;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  color: #78909c;
  transition: all 0.15s;
  border: none;
  background: none;
}
.auth-tab.active { background: var(--blue); color: #fff; }
.login-page .form-control {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 10px;
  padding: 0.65rem 1rem;
}
.login-page .form-control:focus {
  background: rgba(255,255,255,0.09);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(21,101,192,0.2);
}
.login-page .form-control::placeholder { color: #37474f; }
.login-page .form-label { color: #90a4ae; font-size: 0.8rem; margin-bottom: 0.25rem; }
.login-page .form-select {
  background-color: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
}
.login-page .form-select:focus {
  background-color: rgba(255,255,255,0.09);
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(21,101,192,0.2);
}
.login-page .form-select option { background: #0d1b2a; color: #fff; }
.login-page .input-group-text {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: #546e7a;
}
.btn-entrar {
  background: linear-gradient(135deg, var(--blue), #1976d2);
  border: none;
  border-radius: 10px;
  padding: 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  width: 100%;
  transition: opacity 0.2s, transform 0.1s;
  cursor: pointer;
}
.btn-entrar:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-registrar {
  background: linear-gradient(135deg, #2e7d32, #388e3c);
  border: none;
  border-radius: 10px;
  padding: 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  width: 100%;
  transition: opacity 0.2s;
  cursor: pointer;
}
.btn-registrar:hover { opacity: 0.9; }
.tasa-pill {
  background: rgba(249,168,37,0.1);
  border: 1px solid rgba(249,168,37,0.3);
  color: var(--gold);
  font-size: 0.75rem;
  padding: 3px 12px;
  border-radius: 20px;
  display: inline-block;
}
.footer-bar {
  text-align: center;
  color: #37474f;
  font-size: 0.72rem;
  padding: 0.75rem;
}
.divider-text {
  text-align: center;
  position: relative;
  margin: 0.85rem 0;
}
.divider-text::before {
  content: '';
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: rgba(255,255,255,0.07);
}
.divider-text span {
  position: relative;
  background: #0d1b2a;
  padding: 0 0.75rem;
  color: #37474f;
  font-size: 0.72rem;
}
.register-form { display: none; }
.register-form.active { display: block; }
.login-form { display: none; }
.login-form.active { display: block; }
.login-page .alert-success {
  background: rgba(46,125,50,0.12);
  border: 1px solid rgba(46,125,50,0.3);
  color: #a5d6a7;
  border-radius: 10px;
}
.login-page .alert-danger {
  background: rgba(198,40,40,0.12);
  border: 1px solid rgba(198,40,40,0.3);
  color: #ef9a9a;
  border-radius: 10px;
}


/* ============================================================
   HAMBURGER MENU (hidden on desktop)
   ============================================================ */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  color: var(--navy);
  font-size: 1.3rem;
  padding: 4px 10px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ============================================================
   MOBILE RESPONSIVE OVERRIDES
   ============================================================ */
@media (max-width: 768px) {
  /* --- HAMBURGER MENU --- */
  .hamburger-btn { display: block; }
  
  .nav-bar {
    flex-wrap: wrap;
    padding: 0 8px;
    position: fixed;
  }
  .nav-bar-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #fff;
    position: fixed;
    top: 124px; /* 48 topbar + 36 user-bar + 40 nav-bar */
    left: 0;
    right: 0;
    z-index: 1200;
    box-shadow: 0 6px 16px rgba(0,0,0,.15);
    border-top: 1px solid #e0e0e0;
    max-height: calc(100vh - 124px);
    overflow-y: auto;
  }
  .nav-bar-links.mobile-open {
    display: flex;
  }
  .nav-bar-links .nav-link {
    padding: 12px 16px !important;
    font-size: 0.88rem !important;
    border-bottom: 1px solid #f0f0f0;
    letter-spacing: 0.02em !important;
  }
  .nav-bar-links .nav-link:hover {
    background: #f5f5f5;
  }
  .nav-bar-links .dropdown {
    width: 100%;
  }
  .nav-bar-links .dropdown .nav-link {
    width: 100%;
    padding: 12px 16px !important;
    font-size: 0.88rem !important;
    border-bottom: 1px solid #f0f0f0;
  }
  .nav-bar-right {
    margin-left: auto;
  }
  .nav-bar-right .btn-retirar,
  .nav-bar-right .btn-depositar {
    font-size: 0.7rem;
    padding: 4px 10px;
  }

  /* --- TOPBAR compact --- */
  .top-bar { padding: 4px 8px; height: 48px !important; }
  .top-bar-logo img { height: 34px; }
  .top-bar-left { display: none; }
  .top-bar-right { font-size: 0.7rem; gap: 2px; }
  .top-bar-points { display: none; }
  .brand-header-img { display: none !important; }
  .nav-bar { top: 84px !important; height: 40px !important; } /* 48px top-bar + 36px mobile-user-bar */

  /* --- MARQUEE --- hide on mobile, was covering hipodromos content */
  .marquee-banner {
    display: none !important;
  }
  .taquilla-layout {
    padding-top: 124px !important; /* 48 topbar + 36 user-bar + 40 navbar (no marquee) */
  }
  .marquee-icon {
    padding: 0 6px 0 8px;
    font-size: 0.72rem;
    gap: 3px;
  }
  .marquee-icon i { font-size: 0.78rem; }
  .marquee-inner { font-size: 0.82rem; }

  /* --- LAYOUT --- */
  .taquilla-main {
    display: block;
    padding-bottom: 60px;
  }
  .taquilla-sidebar {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1050;
    height: 100vh;
    overflow-y: auto;
    background: #fff;
  }
  .taquilla-sidebar.show { display: block; }
  .taquilla-video {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1050;
  }
  .taquilla-video.show { display: flex; flex-direction: column; overflow-y: auto; padding-bottom: 64px; }
  .mobile-toolbar { display: flex !important; }

  /* --- TRACK/RACE SELECTORS --- */
  .race-header {
    flex-direction: column !important;
    gap: 6px !important;
    padding: 8px !important;
  }
  .race-header select,
  .race-header input,
  .race-header .form-control {
    font-size: 0.78rem !important;
    min-width: 0 !important;
    width: 100% !important;
  }
  .race-header-row {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .race-header-row > * {
    flex: 1 1 calc(50% - 6px) !important;
    min-width: 0 !important;
  }
  .race-countdown {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    min-width: 90px;
  }

  /* --- BETTING TABS --- */
  .bet-type-tabs {
    flex-wrap: wrap;
    gap: 4px;
  }
  .bet-type-tabs .tab-btn {
    font-size: 0.7rem;
    padding: 4px 8px;
  }

  /* --- CARRERA TABS --- */
  .carrera-tabs-wrap {
    padding: 4px 8px;
  }
  .carrera-tab {
    font-size: 0.72rem;
    padding: 3px 8px;
    min-width: 38px;
  }

  /* --- HORSE TABLE: mobile-friendly --- */
  .horse-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Hide odds columns on mobile — keep Apostar visible */
  .horse-table .col-odds {
    display: none;
  }
  
  .horse-table th,
  .horse-table td {
    padding: 6px 4px;
    font-size: 0.78rem;
  }
  .horse-table th:first-child,
  .horse-table td:first-child {
    width: 30px;
    padding: 4px 2px;
  }
  .puesto-dot {
    width: 24px;
    height: 24px;
    font-size: 0.68rem;
  }
  .horse-name-main {
    font-size: 0.78rem;
    font-weight: 700;
  }
  .horse-jockey {
    font-size: 0.65rem;
  }
  .win-bar-wrap {
    min-width: 45px;
    height: 20px;
  }
  .win-bar-text {
    font-size: 0.62rem;
  }
  
  /* Apostar button compact on mobile */
  .btn-apostar-gold {
    font-size: 0.68rem !important;
    padding: 4px 6px !important;
    min-width: 60px;
  }
  .btn-apostar-gold .num-badge {
    font-size: 0.58rem;
    width: 16px;
    height: 16px;
  }

  /* --- ACCESO RAPIDO --- */
  .acceso-rapido-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    padding: 8px !important;
  }
}

@media (max-width: 576px) {
  :root { --topbar-h: 55px; }
  .top-bar-logo img { height: 38px; }
  .top-bar-right { font-size: 0.68rem; }
  .top-bar-username .btn-salir { font-size: 0.65rem; padding: 1px 6px; }
  
  /* Even more compact horse table on tiny screens */
  .horse-table th:nth-child(3),
  .horse-table td:nth-child(3) {
    /* Keep %Win but make it very compact */
    padding: 4px 2px;
  }
  .win-bar-wrap { min-width: 38px; }
  .btn-apostar-gold { min-width: 52px; font-size: 0.65rem !important; }
}


/* ===== INFORMACIÓN JORNADA DROPDOWN ===== */
.dropdown-menu-jornada {
  /* Fixed: increased from 420px to show all items */
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  min-width: 220px;
}
.dropdown-menu-jornada .dropdown-item {
  font-size: .82rem;
  padding: 6px 16px;
}
.dropdown-menu-jornada .dropdown-item i {
  width: 18px;
  text-align: center;
  color: #0d2240;
}
.dropdown-menu-jornada .dropdown-item:hover {
  background: #0d2240;
  color: #fff;
}
.dropdown-menu-jornada .dropdown-item:hover i {
  color: #fff;
}
.dropdown-menu-jornada .dropdown-divider {
  margin: 4px 0;
}
/* Fix: ensure navbar dropdowns appear above all page content */
.nav-bar .dropdown-menu { z-index: 1100; }
.nav-bar .dropdown.show .dropdown-menu { display: block; }


/* ── Topbar Branding ── */
.top-bar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-emblem {
  height: 62px;
  object-fit: contain;
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.1;
}
.brand-name {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand-lig { color: #fff; }
.brand-en { color: #f59e0b; }
.brand-slogan {
  font-size: 0.7rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.top-bar-left { display: none; }
.top-bar-center { display: none; }

@media (max-width: 768px) {
  .brand-text { display: none; }
  .brand-emblem { height: 34px; }
  .brand-header-img { display: none !important; }
  .top-bar {
    height: 48px !important;
    padding: 0 10px;
  }
  .top-bar-logo img { height: 34px; }
  .top-bar-brand { gap: 6px; }
  .nav-bar {
    top: 84px !important; /* 48px top-bar + 36px mobile-user-bar */
    height: 40px !important;
    min-height: 40px;
    padding: 0 8px;
  }
  /* Fix layout padding with compact header (48 top + 36 user bar + 40 nav + gap) */
  .taquilla-layout {
    padding-top: 126px !important;
  }
  .marquee-banner {
    top: 124px !important;
  }
}


/* ── New Home Layout ── */
.home-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: relative;
}
.home-left {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem 2rem;
  background: none;
  z-index: 2;
}
.home-left .login-card {
  max-width: 420px;
  width: 100%;
}
.home-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1.5rem 2rem 0;
  width: 100%;
  z-index: 2;
}
.home-brand {
  margin-bottom: 1.5rem;
}
.home-brand-logo {
  max-width: 480px;
  width: 100%;
  height: auto;
}
.home-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  justify-content: center;
  margin-bottom: 1rem;
}
.home-nav a {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 0;
  transition: color 0.2s;
  white-space: nowrap;
}
.home-nav a:hover {
  color: #f59e0b;
}
.home-mascots {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 38%;
  max-width: 550px;
  pointer-events: none;
  z-index: 1;
}
.home-mascots img {
  width: 100%;
  height: auto;
  display: block;
}

/* Mobile: stack vertically */
@media (max-width: 992px) {
  .home-wrapper { flex-direction: column; }
  .home-left { flex: none; width: 100%; padding: 1.5rem 1rem; }
  .home-right { display: none; }
}

.brand-header-img {
  height: 38px;
  object-fit: contain;
}
@media (max-width: 768px) {
  .brand-header-img { display: none; }
}

.home-mascots-left {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 50%;
  max-width: 720px;
  pointer-events: none;
  z-index: 1;
}
.home-mascots-left img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: -4px;
}
@media (max-width: 992px) {
  .home-mascots-left { display: none; }
}

/* ── RETIRAR / DEPOSITAR in top bar ── */
.tb-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 8px;
}
.tb-actions .btn-retirar,
.tb-actions .btn-depositar {
  font-size: 0.72rem;
  padding: 0.35rem 0.9rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-width: 110px;
  justify-content: center;
}
@media (max-width: 768px) {
  .tb-actions { flex-direction: row; gap: 6px; }
  .tb-actions .btn-retirar,
  .tb-actions .btn-depositar { font-size: 0.65rem; padding: 0.3rem 0.6rem; min-width: auto; }
}

/* ============================================================
   MOBILE USER BAR — compact bar visible only on ≤992px
   Shows username, credits, LP, and Salir button
   ============================================================ */
.mobile-user-bar {
  display: none; /* Hidden on desktop */
}

@media (max-width: 992px) {
  .mobile-user-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #0d1b2a, #132a45);
    padding: 6px 12px;
    position: fixed;
    top: 48px; /* right below the compact top-bar */
    left: 0; right: 0;
    z-index: 1095;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    gap: 6px;
    height: 36px;
  }

  .mub-user {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #f9a825;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 1;
    min-width: 0;
  }
  .mub-user i {
    font-size: 0.85rem;
    color: #90a4ae;
    flex-shrink: 0;
  }
  .mub-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 80px;
  }

  .mub-credits {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
  }
  .mub-label {
    font-size: 0.6rem;
    color: #78909c;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
  }
  .mub-amount {
    color: #81c784;
    font-size: 0.82rem;
    font-weight: 700;
  }

  .mub-points {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
  }
  .mub-lp {
    color: #f9a825;
    font-size: 0.82rem;
    font-weight: 700;
  }

  .mub-salir {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(198,40,40,0.25);
    border: 1px solid rgba(198,40,40,0.4);
    color: #ef9a9a;
    border-radius: 5px;
    width: 30px;
    height: 26px;
    text-decoration: none;
    font-size: 0.8rem;
    flex-shrink: 0;
    transition: background 0.15s;
  }
  .mub-salir:hover {
    background: rgba(198,40,40,0.45);
    color: #fff;
  }

  /* Adjust nav-bar position to account for mobile-user-bar */
  .nav-bar {
    top: 84px !important; /* 48px top-bar + 36px mobile-user-bar */
  }

  /* Adjust layout padding */
  .taquilla-layout {
    padding-top: 126px !important; /* 48 + 36 + 40 + 2px */
  }

  /* Adjust marquee position if present */
  .marquee-banner {
    top: 124px !important;
  }
}

@media (max-width: 576px) {
  .mub-name {
    max-width: 60px;
  }
  .mub-label {
    display: none; /* Hide labels on very small screens */
  }
}

/* === FIX: Dropdown menus inside nav-bar (Mi Cuenta & Info Jornada) === */
/* Mobile: make dropdown menus expand inline (no float/absolute) */
@media (max-width: 768px) {
  .nav-bar-links .dropdown .dropdown-menu {
    position: static !important;
    float: none !important;
    box-shadow: none !important;
    border: none !important;
    background: #f5f5f5;
    padding: 0;
    margin: 0;
    transform: none !important;
    max-height: none;
    overflow: visible;
  }
  .nav-bar-links .dropdown .dropdown-menu.show {
    display: block;
  }
  .nav-bar-links .dropdown .dropdown-item {
    padding: 10px 16px 10px 36px !important;
    font-size: 0.84rem;
    border-bottom: 1px solid #eee;
  }
  .nav-bar-links .dropdown .dropdown-divider {
    margin: 0;
  }
}

/* === FIX: Dropdown menus inside nav-bar (Mi Cuenta & Info Jornada) === */
/* Mobile: make dropdown menus expand inline (no float/absolute) */
@media (max-width: 768px) {
  .nav-bar-links .dropdown .dropdown-menu {
    position: static !important;
    float: none !important;
    box-shadow: none !important;
    border: none !important;
    background: #f5f5f5;
    padding: 0;
    margin: 0;
    transform: none !important;
    max-height: none;
    overflow: visible;
  }
  .nav-bar-links .dropdown .dropdown-menu.show {
    display: block;
  }
  .nav-bar-links .dropdown .dropdown-item {
    padding: 10px 16px 10px 36px !important;
    font-size: 0.84rem;
    border-bottom: 1px solid #eee;
  }
  .nav-bar-links .dropdown .dropdown-divider {
    margin: 0;
  }
}
