* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f0f2f5;
  color: #1e293b;
  min-height: 100dvh;
}

body.dark {
  background: #020617;
  color: #f8fafc;
}

.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 14px 14px calc(96px + env(safe-area-inset-bottom));
}

.container.wide {
  max-width: 1200px;
}

body.auth-screen {
  display: grid;
  place-items: start center;
}

body.auth-screen .container {
  width: min(560px, calc(100% - 20px));
  margin-top: 24px;
}

.auth-links {
  display: grid;
  gap: 10px;
  margin: 2px 0 0;
}

.auth-links .link-btn {
  margin: 0;
}

.auth-link-primary {
  border: 1px solid #1d4ed8;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.2);
}

.auth-link-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.24);
}

.auth-link-secondary {
  background: #ffffff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.auth-link-secondary:hover {
  background: #eff6ff;
  color: #1e3a8a;
}

body.dark .auth-link-secondary {
  background: #0f172a;
  color: #93c5fd;
  border-color: #334155;
}

body.dark .auth-link-secondary:hover {
  background: #1e293b;
  color: #bfdbfe;
}

h1 {
  margin: 0 0 10px;
  font-weight: 700;
  font-size: 1.5rem;
  color: #0f172a;
}

body.dark h1 { color: #f8fafc; }

h2 {
  font-weight: 600;
  font-size: 1.1rem;
  color: #1e293b;
  margin: 0 0 12px 0;
}

body.dark h2 { color: #e2e8f0; }

.subtitle {
  margin-top: 0;
  color: #64748b;
  font-size: 0.95rem;
}

body.dark .subtitle {
  color: #94a3b8;
}

.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

body.dark .card {
  background: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border-color: #1e293b;
}

label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #334155;
}

body.dark label { color: #cbd5e1; }

input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  margin-top: 6px;
  font-size: 16px;
  min-height: 44px;
  background: #ffffff;
  color: #1e293b;
}

input::placeholder { color: #94a3b8; }

body.dark input {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin-top: 0;
}

.small-text {
  margin: 8px 0 12px;
  font-size: 13px;
  color: #64748b;
}

body.dark .small-text {
  color: #94a3b8;
}

button,
.link-btn {
  display: inline-block;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  background: #2563eb;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s ease;
}
button:hover, .link-btn:hover { background: #1d4ed8; }

.quick-stats {
  background: #f8fafc;
  border: 1px solid #dbe6f3;
  box-shadow: none;
  padding: 12px;
}

.info-pills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.info-pill {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
}

.info-pill-label {
  margin: 0 0 4px;
  font-size: 12px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.info-pill-value {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

body.dark .quick-stats {
  background: #0b1221;
  border-color: #23324b;
}

body.dark .info-pill {
  background: #0f172a;
  border-color: #334155;
}

body.dark .info-pill-label { color: #94a3b8; }
body.dark .info-pill-value { color: #e2e8f0; }

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  margin: -14px -14px 14px;
  padding: 10px 14px;
  background: rgba(241, 245, 249, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #dbe6f3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

body.dark .app-topbar {
  background: rgba(2, 6, 23, 0.9);
  border-bottom-color: #1e293b;
}

.app-topbar .help-link {
  color: #2563eb;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.app-topbar .help-link:hover { text-decoration: underline; }
body.dark .app-topbar .help-link { color: #60a5fa; }

.help-link { color: #2563eb; text-decoration: none; font-weight: 500; }
.help-link:hover { text-decoration: underline; }
body.dark .help-link { color: #60a5fa; }

.session-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 78%;
  background: #e2e8f0;
  color: #0f172a;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
}

body.dark .session-chip {
  background: #1e293b;
  color: #e2e8f0;
}

.session-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-top-btn {
  width: auto;
  min-width: 92px;
  padding: 10px 12px;
  font-size: 14px;
  background: #334155;
}

.mobile-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  pointer-events: none;
}

.mobile-nav-inner {
  width: min(760px, 100%);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 8px;
  background: rgba(15, 23, 42, 0.94);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.35);
  pointer-events: auto;
}

.mobile-nav-item {
  border-radius: 10px;
  border: 1px solid transparent;
  color: #e2e8f0;
  text-decoration: none;
  text-align: center;
  padding: 10px 8px;
  font-size: 13px;
  background: #1e293b;
  min-height: 42px;
}

.mobile-nav-item.active {
  border-color: #38bdf8;
  background: #0c4a6e;
}

button.mobile-nav-item {
  width: 100%;
  margin: 0;
  cursor: pointer;
}

.secondary {
  margin-top: 10px;
  background: #64748b;
}
.secondary:hover { background: #475569; }

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

button[data-success-toggle="on"] {
  background: #16a34a;
}
button[data-success-toggle="on"]:hover { background: #15803d; }

button[data-success-toggle="off"] {
  background: #2563eb;
}

.success-pulse {
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.35);
}

/* Bloque Totales al estilo mockup: valores destacados */
.totals-block h2 { margin-bottom: 14px; }
.totals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}
.totals-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px;
}
.totals-label {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}
.totals-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
}
body.dark .totals-label { color: #94a3b8; }
body.dark .totals-value { color: #f8fafc; }
body.dark .totals-item {
  background: #0b1221;
  border-color: #23324b;
}

.card-form h2 { margin-bottom: 16px; }

/* Tarjeta de estado: simple, una sola línea */
.card.status {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 18px;
  margin-bottom: 14px;
  box-shadow: none;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.card.status h2 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin: 0;
  border: none;
  padding: 0;
  flex-shrink: 0;
}
.card.status p {
  margin: 0;
  font-size: 15px;
  color: #334155;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}
body.dark .card.status {
  background: #1e293b;
  border-color: #334155;
  box-shadow: none;
}
body.dark .card.status h2 { color: #94a3b8; }
body.dark .card.status p { color: #e2e8f0; }

.card.status.status-sale {
  display: block;
  background: #f8fafc;
  border: 1px solid #dbe6f3;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

.card.status.status-sale h2 {
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.card.status.status-sale #statusMessage {
  margin: 0 0 10px;
  font-size: 15px;
  color: #1e293b;
}

.sale-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.sale-result-grid p {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sale-result-grid p strong {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sale-result-grid p span {
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
}

.sale-result-tickets {
  margin-top: 10px;
}

.sale-result-tickets > strong {
  display: block;
  margin-bottom: 6px;
  color: #334155;
  font-size: 13px;
}

.ticket-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ticket-tag {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
}

body.dark .card.status.status-sale {
  background: #0b1221;
  border-color: #23324b;
}

body.dark .card.status.status-sale #statusMessage { color: #e2e8f0; }

body.dark .sale-result-grid p {
  background: #0f172a;
  border-color: #334155;
}

body.dark .sale-result-grid p strong { color: #94a3b8; }
body.dark .sale-result-grid p span { color: #f8fafc; }
body.dark .sale-result-tickets > strong { color: #cbd5e1; }
body.dark .ticket-tag {
  border-color: #334155;
  background: #1e293b;
  color: #93c5fd;
}

/* Estado en esquina superior derecha (auth, registro, etc.) */
.card.status.status-corner {
  position: fixed;
  top: 12px;
  right: 12px;
  padding: 8px 12px;
  margin: 0;
  max-width: 280px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  z-index: 10;
  background: rgba(248, 250, 252, 0.95);
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.card.status.status-corner .status-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  flex-shrink: 0;
}
.card.status.status-corner #authStatus {
  margin: 0;
  font-size: 12px;
  color: #475569;
  line-height: 1.3;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.dark .card.status.status-corner {
  background: rgba(30, 41, 59, 0.95);
  border-color: #334155;
}
body.dark .card.status.status-corner .status-label { color: #94a3b8; }
body.dark .card.status.status-corner #authStatus { color: #cbd5e1; }

.center {
  text-align: center;
  position: relative;
}

.jackpot-machine {
  width: min(95vw, 1000px);
  margin: 0 auto 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, #475569 0%, #1e293b 35%, #0f172a 100%);
  border: 4px solid #94a3b8;
  box-shadow: 0 24px 44px rgba(2, 6, 23, 0.8);
  overflow: hidden;
  position: relative;
}

.machine-lights {
  display: flex;
  justify-content: space-evenly;
  padding: 10px 8px 4px;
  background: #111827;
}

.light {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #facc15;
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.95);
  animation: pulseLight 0.9s infinite ease-in-out;
}

.light:nth-child(2n) {
  animation-delay: 0.15s;
}

.machine-header {
  background: linear-gradient(90deg, #ef4444, #f59e0b, #22c55e, #3b82f6);
  color: #ffffff;
  font-size: 28px;
  font-weight: bold;
  letter-spacing: 2px;
  padding: 12px;
}

.machine-body {
  position: relative;
  padding: 18px 20px 26px;
}

.payline {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  border-top: 4px dashed rgba(248, 250, 252, 0.9);
  border-bottom: 4px dashed rgba(248, 250, 252, 0.9);
  height: 84px;
  pointer-events: none;
}

.reels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}

.reel {
  background: linear-gradient(180deg, #020617 0%, #0f172a 50%, #020617 100%);
  border: 2px solid #475569;
  border-radius: 12px;
  overflow: hidden;
}

.slot {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  color: #cbd5e1;
  font-weight: bold;
  font-size: 22px;
  letter-spacing: 1px;
  border-bottom: 1px solid #1e293b;
}

.slot.middle {
  color: #facc15;
  background: rgba(250, 204, 21, 0.16);
  text-shadow: 0 0 12px rgba(250, 204, 21, 0.45);
}

.machine-footer {
  background: #111827;
  color: #e2e8f0;
  letter-spacing: 3px;
  font-size: 12px;
  font-weight: bold;
  padding: 10px 12px;
}

.reel.spinning .slot.middle {
  animation: jackpotBlink 0.25s linear infinite;
}

.reel.spinning {
  animation: reelSpinMotion 0.12s linear infinite;
}

.reel.spinning .slot {
  filter: blur(1.1px);
  opacity: 0.9;
}

@keyframes jackpotBlink {
  0% {
    background: rgba(250, 204, 21, 0.08);
    color: #facc15;
  }
  50% {
    background: rgba(59, 130, 246, 0.2);
    color: #ffffff;
  }
  100% {
    background: rgba(250, 204, 21, 0.08);
    color: #facc15;
  }
}

@keyframes pulseLight {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.6;
  }
}

@keyframes reelSpinMotion {
  0% {
    transform: translateY(-6px);
  }
  50% {
    transform: translateY(6px);
  }
  100% {
    transform: translateY(-6px);
  }
}

.raffle-row {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.raffle-row p {
  margin: 0 0 4px;
}

.raffle-row.active {
  border-color: #22c55e;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 6px;
}
.badge-activo {
  background: #dcfce7;
  color: #166534;
}
body.dark .badge-activo {
  background: #14532d;
  color: #86efac;
}
.badge-inactivo {
  background: #f1f5f9;
  color: #64748b;
}
body.dark .badge-inactivo {
  background: #334155;
  color: #94a3b8;
}

.row-actions {
  min-width: 170px;
}

.row-actions button {
  margin-bottom: 6px;
}

.danger {
  border-left: 6px solid #ef4444;
}

.danger-btn {
  background: #dc2626;
}

.table-wrap {
  overflow-x: auto;
}

.sales-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
  font-size: 14px;
}

.sales-table th,
.sales-table td {
  border: 1px solid #cbd5e1;
  padding: 8px;
  text-align: left;
}

.sales-table thead th {
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 700;
}

body.dark .sales-table th,
body.dark .sales-table td {
  border-color: #334155;
}

body.dark .sales-table thead th {
  background: #1e293b;
  color: #e2e8f0;
}

.empty-cell {
  text-align: center;
  color: #64748b;
}

.pdf-designer-preview {
  position: relative;
  width: 100%;
  max-width: 980px;
  margin: 12px auto;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
}

.pdf-designer-preview img {
  width: 100%;
  display: block;
}

.designer-marker {
  position: absolute;
  color: #111827;
  background: rgba(14, 165, 233, 0.18);
  border: 1px dashed #0284c7;
  border-radius: 4px;
  padding: 1px 4px;
  white-space: nowrap;
  transform-origin: left bottom;
  pointer-events: none;
}

#pdfLayoutTableBody input {
  min-width: 88px;
}

.sale-email-tools {
  display: flex;
  gap: 8px;
  min-width: 260px;
}

.sale-email-tools input {
  margin-top: 0;
}

.sale-email-tools button {
  width: auto;
  white-space: nowrap;
  padding: 8px 10px;
  font-size: 13px;
}

.resend-sale-email-btn {
  width: auto;
  white-space: nowrap;
  padding: 8px 10px;
  font-size: 13px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
  z-index: 80;
}

.modal-backdrop.open {
  display: flex;
}

.sale-block-ui {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 110;
}

.sale-block-ui.open {
  display: flex;
}

.sale-block-ui-card {
  min-width: 260px;
  max-width: min(420px, 92vw);
  border-radius: 12px;
  border: 1px solid #dbe6f3;
  background: #ffffff;
  padding: 16px 18px;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sale-block-ui-card p {
  margin: 0;
  color: #0f172a;
  font-weight: 600;
}

.sale-block-ui-spinner {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 3px solid #bfdbfe;
  border-top-color: #2563eb;
  animation: saleSpin 0.8s linear infinite;
}

@keyframes saleSpin {
  to {
    transform: rotate(360deg);
  }
}

body.dark .sale-block-ui {
  background: rgba(2, 6, 23, 0.6);
}

body.dark .sale-block-ui-card {
  background: #0f172a;
  border-color: #334155;
}

body.dark .sale-block-ui-card p {
  color: #e2e8f0;
}

.modal-card {
  width: min(520px, 100%);
  background: #ffffff;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.3);
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.modal-actions .secondary {
  margin-top: 0;
}

body.dark .modal-card {
  background: #0f172a;
}

.leaderboard-list {
  display: grid;
  gap: 10px;
}

.leaderboard-row {
  border: 1px solid #dbe6f3;
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px;
}

.leaderboard-row.is-current {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.18);
}

.leaderboard-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.leaderboard-rank {
  min-width: 36px;
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  color: #0f172a;
  background: #e2e8f0;
  border-radius: 999px;
  padding: 4px 8px;
}

.leaderboard-seller {
  font-size: 14px;
}

.leaderboard-meta {
  font-size: 12px;
  color: #475569;
}

.leaderboard-bar-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #dbe6f3;
  overflow: hidden;
}

.leaderboard-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0ea5e9, #0284c7);
}

body.dark .leaderboard-row {
  background: #0b1221;
  border-color: #23324b;
}

body.dark .leaderboard-rank {
  background: #23324b;
  color: #cbd5e1;
}

body.dark .leaderboard-meta {
  color: #94a3b8;
}

body.dark .leaderboard-bar-track {
  background: #1e293b;
}

@media (max-width: 800px) {
  body.auth-screen .container {
    margin-top: 12px;
  }
  .slot {
    font-size: 15px;
    height: 62px;
    padding: 0 6px;
  }

  .sales-table.mobile-cards {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 10px;
    font-size: 13px;
  }

  .sales-table.mobile-cards thead {
    display: none;
  }

  .sales-table.mobile-cards tbody tr {
    display: block;
    background: #f8fafc;
    border: 1px solid #dbe6f3;
    border-radius: 12px;
    overflow: hidden;
  }

  body.dark .sales-table.mobile-cards tbody tr {
    background: #0b1221;
    border-color: #23324b;
  }

  .sales-table.mobile-cards tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    border: 0;
    border-bottom: 1px dashed #d1dbe8;
    padding: 9px 10px;
    text-align: right;
  }

  body.dark .sales-table.mobile-cards tbody td {
    border-bottom-color: #2b3950;
  }

  .sales-table.mobile-cards tbody td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #334155;
    text-align: left;
  }

  body.dark .sales-table.mobile-cards tbody td::before {
    color: #cbd5e1;
  }

  .sales-table.mobile-cards tbody td:last-child {
    border-bottom: 0;
  }

  .sales-table.mobile-cards tbody td.empty-cell {
    display: block;
    text-align: center;
  }

  .sales-table.mobile-cards tbody td.empty-cell::before {
    content: "";
  }

  .sales-table.mobile-cards .sale-email-tools {
    width: 100%;
    min-width: 0;
    flex-direction: column;
  }

  .sales-table.mobile-cards .sale-email-tools button {
    width: 100%;
  }

  /* Prioridad visual en cards de ventas (mobile) */
  #salesReportBody tr td:nth-child(4) {
    order: 1; /* Comprador */
    font-weight: 700;
  }

  #salesReportBody tr td:nth-child(9) {
    order: 2; /* Total */
    font-weight: 700;
    color: #0f766e;
  }

  #salesReportBody tr td:nth-child(7) {
    order: 3; /* Cantidad */
  }

  #salesReportBody tr td:nth-child(2) {
    order: 4; /* Rifa */
  }

  #salesReportBody tr td:nth-child(1) {
    order: 5; /* Fecha */
  }

  #salesReportBody tr td:nth-child(8) {
    order: 6; /* Precio */
  }

  #salesReportBody tr td:nth-child(5) {
    order: 7; /* Telefono */
  }

  #salesReportBody tr td:nth-child(6) {
    order: 8; /* Correo */
  }

  #salesReportBody tr td:nth-child(3) {
    order: 9; /* Vendedor */
  }

  #salesReportBody tr td:nth-child(10) {
    order: 10; /* Acciones */
  }

  body.dark #salesReportBody tr td:nth-child(9) {
    color: #5eead4;
  }

  /* Prioridad visual en cards de ganadores (mobile) */
  #winnersTableBody tr td:nth-child(3) {
    order: 1; /* Boleto */
    font-weight: 700;
    color: #0369a1;
  }

  #winnersTableBody tr td:nth-child(2) {
    order: 2; /* Comprador */
    font-weight: 700;
  }

  #winnersTableBody tr td:nth-child(1) {
    order: 3; /* Fecha */
  }

  body.dark #winnersTableBody tr td:nth-child(3) {
    color: #38bdf8;
  }
}

@media (min-width: 900px) {
  .container {
    padding-bottom: 28px;
  }

  .mobile-nav {
    padding-bottom: 12px;
  }
}
