@import 'variables.css';

.admin-body {
  display: flex;
  min-height: 100vh;
  background: var(--black-deep);
  color: var(--white-soft);
  overflow-x: hidden;
}

.admin-sidebar {
  width: 260px;
  background: linear-gradient(180deg, var(--blue-tech) 0%, var(--black-deep) 100%);
  border-right: 1px solid rgba(212, 175, 55, 0.2);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-brand {
  padding: 1.25rem 1rem 1.35rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.18);
  text-align: center;
}

.sidebar-brand-link {
  display: block;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.sidebar-brand-link:hover {
  transform: translateY(-1px);
}

/* Logo PNG — integrado al fondo oscuro del admin */
.sidebar-logo,
.login-logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45));
}

.sidebar-logo {
  max-height: 96px;
  margin: 0 auto;
}

.login-logo {
  max-height: 128px;
  margin: 0 auto 0.5rem;
}

.sidebar-brand-label {
  margin: 0.85rem 0 0.2rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-premium);
}

.sidebar-brand-app {
  margin: 0;
  font-size: 0.78rem;
  color: var(--gray-muted);
  line-height: 1.35;
}

.login-brand {
  margin-bottom: 1.75rem;
  text-align: center;
}

.login-brand h1 {
  margin-top: 1rem;
}

.login-app-name {
  text-align: center;
  color: var(--gray-muted);
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  color: var(--gray-muted);
  transition: all var(--transition-smooth);
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--gold-bright);
  background: rgba(212, 175, 55, 0.08);
  border-left-color: var(--gold-premium);
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem 2rem;
  padding-top: max(1.5rem, env(safe-area-inset-top));
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.admin-header-inner {
  flex: 1;
  min-width: 0;
}

.admin-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  color: var(--gold-bright);
  line-height: 1.2;
  word-break: break-word;
}

.admin-menu-btn {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-top: 0.15rem;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-bright);
  cursor: pointer;
  transition: background 0.2s;
}

.admin-menu-btn:hover {
  background: rgba(212, 175, 55, 0.22);
}

.admin-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1090;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(2px);
}

.admin-subtitle {
  color: var(--gray-muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.admin-content {
  padding: clamp(1rem, 3vw, 2rem);
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: linear-gradient(135deg, rgba(15,43,70,0.8), rgba(10,10,10,0.9));
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.stat-card .value {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--gold-bright);
}

.stat-card .label {
  font-size: 0.85rem;
  color: var(--gray-muted);
  margin-top: 0.25rem;
}

.charts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.chart-card {
  background: rgba(15, 43, 70, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.chart-card h3 {
  font-size: 1rem;
  color: var(--gold-premium);
  margin-bottom: 1rem;
}

/* Tabla */
.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  align-items: center;
}

.table-toolbar input,
.table-toolbar select {
  padding: 0.6rem 1rem;
  background: rgba(15, 43, 70, 0.6);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 8px;
  color: var(--white-soft);
  min-width: min(180px, 100%);
  flex: 1 1 160px;
}

.table-toolbar input[type="search"],
#search-input {
  flex: 1 1 220px;
}

#participants-tbody.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

.th-actions,
.td-actions {
  width: 100px;
  text-align: center;
  white-space: nowrap;
}

.td-actions {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  align-items: center;
}

.btn-table-edit,
.btn-table-del {
  width: 2.1rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s;
}

.btn-table-edit {
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.35);
  color: var(--gold-bright);
}

.btn-table-edit:hover {
  background: rgba(212, 175, 55, 0.22);
}

.btn-table-del {
  background: rgba(231, 76, 60, 0.12);
  border-color: rgba(231, 76, 60, 0.35);
  color: #ff8a80;
}

.btn-table-del:hover {
  background: rgba(231, 76, 60, 0.28);
}

.modal-box--wide {
  width: min(640px, 95vw);
}

.form-inline-error {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: rgba(231, 76, 60, 0.12);
  border: 1px solid rgba(231, 76, 60, 0.4);
  color: #ff8a80;
  font-size: 0.88rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.data-table th {
  color: var(--gold-premium);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table tr:hover td {
  background: rgba(212, 175, 55, 0.05);
}

.pagination {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  align-items: center;
}

.pagination button {
  padding: 0.5rem 1rem;
  background: rgba(15, 43, 70, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--gold-bright);
  border-radius: 8px;
  cursor: pointer;
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Botones admin */
a.btn-admin {
  text-decoration: none;
}

.btn-admin {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: linear-gradient(180deg, rgba(212,175,55,0.25), rgba(15,43,70,0.9));
  border: 1px solid var(--gold-premium);
  color: var(--gold-bright);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-smooth);
}

.btn-admin:hover {
  box-shadow: var(--glow-gold);
}

.btn-admin.primary {
  background: linear-gradient(180deg, var(--gold-premium), #9a7b1a);
  color: var(--black-deep);
}

.btn-admin.danger {
  border-color: #c0392b;
  color: #e74c3c;
}

.btn-draw-big {
  font-size: 1.25rem;
  padding: 1.25rem 2.5rem;
  margin: 2rem 0;
}

/* Login */
.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: radial-gradient(ellipse at center, var(--blue-tech) 0%, var(--black-deep) 70%);
}

.login-box {
  width: min(440px, 92vw);
  padding: 2rem 2rem 2.25rem;
  background: linear-gradient(165deg, rgba(15, 43, 70, 0.92), rgba(10, 10, 10, 0.95));
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: var(--radius-xl);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 48px rgba(212, 175, 55, 0.12);
}

.login-box h1 {
  font-family: var(--font-display);
  color: var(--gold-bright);
  text-align: center;
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.login-box .form-group {
  margin-bottom: 1.25rem;
}

.login-box label {
  display: block;
  color: var(--gold-premium);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.login-box input {
  width: 100%;
  padding: 0.875rem;
  background: rgba(10, 10, 10, 0.5);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 8px;
  color: var(--white-soft);
}

.login-error {
  background: rgba(231, 76, 60, 0.2);
  border: 1px solid #e74c3c;
  color: #e74c3c;
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* Premios */
.prizes-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(15, 43, 70, 0.5), rgba(10, 10, 10, 0.7));
}

.prizes-toolbar-text p {
  margin: 0;
  color: var(--gray-muted);
  font-size: 0.92rem;
}

.btn-prize-new {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--black-deep);
  background: linear-gradient(135deg, var(--gold-premium), var(--gold-bright));
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-prize-new:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(212, 175, 55, 0.45);
}

.prizes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.35rem;
}

.prizes-empty {
  grid-column: 1 / -1;
  color: var(--gray-muted);
  padding: 2rem;
  text-align: center;
}

.prize-card {
  position: relative;
  background: linear-gradient(165deg, rgba(15, 43, 70, 0.75), rgba(10, 10, 10, 0.9));
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.35rem 1.1rem;
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.prize-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--prize-accent, var(--gold-premium));
  opacity: 0.9;
}

.prize-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.prize-card--legendary {
  box-shadow: 0 0 24px rgba(212, 175, 55, 0.12);
}

.prize-card--legendary:hover {
  box-shadow: 0 12px 40px rgba(212, 175, 55, 0.22);
}

.prize-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.prize-card__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--prize-accent, var(--gold-premium));
  box-shadow: 0 0 12px var(--prize-accent, var(--gold-premium));
}

.prize-card__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--gold-bright);
  line-height: 1.3;
}

.prize-card__desc {
  margin: 0 0 1rem;
  color: var(--gray-muted);
  font-size: 0.88rem;
  line-height: 1.45;
  min-height: 2.5em;
}

.prize-card__stats {
  list-style: none;
  margin: 0 0 1.15rem;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.prize-card__stats li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.35);
  font-size: 0.82rem;
}

.prize-card__stat-label {
  color: var(--gray-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.prize-card__stat-label i {
  color: var(--gold-premium);
  font-size: 0.75rem;
}

.prize-card__stats strong {
  color: var(--gold-bright);
  font-weight: 600;
}

.prize-card__actions {
  display: flex;
  gap: 0.5rem;
  padding-top: 0.25rem;
  border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.btn-prize-edit {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.08);
  color: var(--gold-bright);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-prize-edit:hover {
  background: rgba(212, 175, 55, 0.18);
  border-color: var(--gold-premium);
}

.btn-prize-del {
  width: 2.75rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(231, 76, 60, 0.4);
  background: rgba(231, 76, 60, 0.12);
  color: #ff8a80;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-prize-del:hover {
  background: rgba(231, 76, 60, 0.28);
}

.modal-box--prize {
  width: min(560px, 95vw);
}

.modal-box__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.modal-close {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 8px;
  background: transparent;
  color: var(--gray-muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.modal-close:hover {
  color: var(--gold-bright);
  border-color: var(--gold-premium);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.badge-rarity {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.badge-COMMON { background: #555; color: #fff; }
.badge-RARE { background: #2980b9; color: #fff; }
.badge-EPIC { background: #8e44ad; color: #fff; }
.badge-LEGENDARY { background: linear-gradient(90deg, #D4AF37, #F7D774); color: #0A0A0A; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-overlay.open {
  display: flex !important;
}

.modal-box {
  background: var(--blue-tech);
  border: 1px solid var(--gold-premium);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: min(500px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-box h3 {
  color: var(--gold-bright);
  margin-bottom: 1.25rem;
}

.modal-box .form-group {
  margin-bottom: 1rem;
}

.modal-box label {
  display: block;
  color: var(--gold-premium);
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
}

.modal-box input,
.modal-box select,
.modal-box textarea {
  width: 100%;
  padding: 0.6rem;
  background: rgba(10,10,10,0.5);
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 6px;
  color: var(--white-soft);
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Dashboard */
.dashboard-hero {
  margin-bottom: 1.75rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(15, 43, 70, 0.65), rgba(10, 10, 10, 0.85));
}

.dashboard-hero-tag {
  font-family: var(--font-display);
  color: var(--gold-bright);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
}

.dashboard-hero-sub {
  color: var(--gray-muted);
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
}

.stats-grid-premium {
  margin-bottom: 1.75rem;
}

.stats-grid-premium .stat-card {
  position: relative;
  padding: 1.75rem 1.5rem 1.5rem;
}

.stats-grid-premium .stat-card .value,
.stats-grid-premium .stat-card .label {
  margin: 0;
}

.stat-card-accent {
  border-color: var(--gold-premium);
  box-shadow: var(--glow-gold);
}

.stat-icon {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  color: rgba(212, 175, 55, 0.35);
  font-size: 1.35rem;
}

/* Paneles dashboard */
.dash-mid-grid,
.dash-charts-grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.dash-mid-grid {
  grid-template-columns: 1.35fr 0.85fr;
}

.dash-charts-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dash-panel {
  background: linear-gradient(160deg, rgba(15, 43, 70, 0.55), rgba(10, 10, 10, 0.75));
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.6rem;
}

.dash-panel--table {
  margin-bottom: 0.5rem;
}

.dash-panel-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.35rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
}

.dash-panel-head i {
  color: var(--gold-premium);
  font-size: 1rem;
}

.dash-panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold-bright);
  letter-spacing: 0.02em;
}

/* Medidores de participación */
.dash-meters {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.dash-meter {
  padding: 1.1rem 1.15rem;
  border-radius: 12px;
  background: rgba(10, 10, 10, 0.35);
  border: 1px solid rgba(212, 175, 55, 0.1);
}

.dash-meter-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.dash-meter-label {
  font-size: 0.9rem;
  color: var(--gray-muted);
  line-height: 1.4;
}

.dash-meter-value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--gold-bright);
  white-space: nowrap;
}

.dash-meter-value span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-muted);
}

.dash-meter-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.6);
  overflow: hidden;
}

.dash-meter-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-premium), var(--gold-bright));
  transition: width 0.7s ease;
}

.dash-meter--green .dash-meter-fill {
  background: linear-gradient(90deg, #0a7a45, var(--green-success));
}

.dash-meter-pct {
  display: inline-block;
  margin-top: 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-premium);
  letter-spacing: 0.04em;
}

/* Acciones rápidas */
.dash-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dash-action-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  background: rgba(10, 10, 10, 0.35);
  color: var(--white-soft);
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.dash-action-btn:hover {
  transform: translateY(-1px);
  border-color: var(--gold-premium);
  background: rgba(212, 175, 55, 0.08);
}

.dash-action-btn--primary {
  border-color: var(--gold-premium);
  background: rgba(212, 175, 55, 0.14);
  color: var(--gold-bright);
}

.dash-action-btn--disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.dash-action-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-bright);
  flex-shrink: 0;
}

.dash-action-text {
  font-size: 0.92rem;
  font-weight: 500;
}

/* Ranking áreas / profesiones */
.dash-rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dash-rank-item {
  padding: 0.95rem 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.08);
}

.dash-rank-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.dash-rank-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.55rem;
}

.dash-rank-label {
  font-size: 0.92rem;
  color: var(--white-soft);
  line-height: 1.35;
}

.dash-rank-badge {
  min-width: 2rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--black-deep);
  background: linear-gradient(135deg, var(--gold-premium), var(--gold-bright));
}

.dash-rank-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.55);
  overflow: hidden;
}

.dash-rank-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.55), var(--gold-bright));
}

.dash-empty {
  color: var(--gray-muted);
  font-size: 0.9rem;
  padding: 0.5rem 0;
  margin: 0;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(212, 175, 55, 0.12);
}

.data-table-participants {
  min-width: 880px;
}

.data-table-compact {
  min-width: 520px;
}

.data-table-compact td,
.data-table-compact th {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
}

/* Sorteo en vivo — panel admin */
.draw-launch-hero {
  margin-bottom: 1.75rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(15, 43, 70, 0.65), rgba(10, 10, 10, 0.85));
}

.draw-launch-hero-tag {
  margin: 0;
  font-family: var(--font-display);
  color: var(--gold-bright);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.draw-launch-hero-sub {
  margin: 0.5rem 0 0;
  color: var(--gray-muted);
  font-size: 0.95rem;
}

.draw-launch-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem;
  margin-bottom: 1.75rem;
}

.draw-stat-card .value,
.draw-stat-card .label {
  margin: 0;
}

.draw-launch-cta {
  margin-bottom: 1.75rem;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(212, 175, 55, 0.25);
  background: linear-gradient(160deg, rgba(15, 43, 70, 0.6), rgba(10, 10, 10, 0.85));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.draw-launch-cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.draw-launch-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 720px;
}

.draw-step {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: rgba(10, 10, 10, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.12);
  text-align: left;
}

.draw-step p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--gray-muted);
  line-height: 1.45;
}

.draw-step strong {
  color: var(--gold-bright);
}

.draw-step-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--black-deep);
  background: linear-gradient(135deg, var(--gold-premium), var(--gold-bright));
}

.draw-launch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-width: min(420px, 100%);
  padding: 1.1rem 2rem;
  border: none;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--black-deep);
  background: linear-gradient(135deg, var(--gold-premium), var(--gold-bright));
  box-shadow: 0 6px 28px rgba(212, 175, 55, 0.4);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.draw-launch-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(212, 175, 55, 0.5);
}

.draw-launch-btn--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #555;
  color: #ccc;
  box-shadow: none;
}

.draw-launch-hint {
  margin: 0;
  max-width: 480px;
  font-size: 0.88rem;
  color: var(--gray-muted);
  line-height: 1.4;
}

.draw-launch-alert {
  margin: 0;
  color: #ff8a80;
  font-size: 0.9rem;
}

.draw-launch-history {
  margin-bottom: 0.5rem;
}

.draw-winners-table td:first-child {
  font-weight: 500;
  color: var(--white-soft);
}

.draw-history-hint {
  margin: -0.5rem 0 1rem;
  font-size: 0.88rem;
  color: var(--gray-muted);
  line-height: 1.45;
}

.draw-history-hint strong {
  color: var(--gold-bright);
}

.btn-revoke-winner {
  width: 2.1rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-bright);
  transition: background 0.2s;
}

.btn-revoke-winner:hover {
  background: rgba(212, 175, 55, 0.25);
}

/* ——— Responsive: tablet y móvil ——— */
@media (max-width: 1200px) {
  .admin-sidebar {
    width: 240px;
  }

  .dash-mid-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .dash-charts-grid,
  .draw-launch-stats {
    grid-template-columns: 1fr;
  }

  .draw-launch-steps {
    grid-template-columns: 1fr;
  }

  .prizes-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

@media (max-width: 991px) {
  .admin-menu-btn {
    display: inline-flex;
  }

  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1100;
    width: min(300px, 88vw);
    max-width: 100%;
    transform: translateX(-105%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.5);
  }

  .admin-body.sidebar-open .admin-sidebar {
    transform: translateX(0);
  }

  .admin-body.sidebar-open .admin-sidebar-overlay {
    display: block;
  }

  .admin-main {
    width: 100%;
  }

  .admin-header {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .sidebar-nav a {
    min-height: 48px;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-actions .btn-admin {
    width: 100%;
    justify-content: center;
  }

  .dash-actions {
    flex-direction: column;
  }

  .dash-action-btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .admin-content {
    padding: 1rem;
  }

  .stats-grid,
  .stats-grid-premium {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }

  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .table-toolbar input,
  .table-toolbar select,
  .table-toolbar .btn-admin {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
  }

  .prizes-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-prize-new {
    width: 100%;
    justify-content: center;
  }

  .prizes-grid {
    grid-template-columns: 1fr;
  }

  .draw-launch-hero,
  .dashboard-hero {
    padding: 1.15rem 1.25rem;
  }

  .draw-launch-btn {
    width: 100%;
    min-width: 0;
  }

  .login-box {
    padding: 1.75rem 1.25rem;
    margin: 1rem;
  }

  .modal-box,
  .modal-box--wide,
  .modal-box--prize {
    width: 100%;
    max-width: none;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
    padding: 1.25rem;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  }

  .modal-overlay.open {
    align-items: flex-end;
  }

  .pagination {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .stats-grid,
  .stats-grid-premium {
    grid-template-columns: 1fr;
  }

  .sidebar-brand {
    padding: 1rem;
  }

  .sidebar-logo {
    max-height: 72px;
  }

  .admin-header h1 {
    font-size: 1.2rem;
  }

  .data-table {
    font-size: 0.82rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.65rem 0.75rem;
  }

  .btn-draw-big {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1.05rem;
  }
}

@media (max-width: 380px) {
  .admin-menu-btn {
    width: 2.5rem;
    height: 2.5rem;
  }
}
