/* 🌈 style.css — interfaz limpia tipo dashboard */

:root {
  --color-bg: #f7f9fb;
  --color-primary: #0066cc;
  --color-accent: #0099ff;
  --color-card: #ffffff;
  --color-text: #222;
  --color-muted: #555;
  --radius: 12px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Roboto, sans-serif;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header fijo */
header {
  background: var(--color-primary);
  color: #fff;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

header h1 {
  font-size: 1.4rem;
  letter-spacing: 0.5px;
}

/* Contenido */
main {
  flex: 1;
  max-width: 1100px;
  margin: 2rem auto;
  padding: 1rem;
}

.dashboard-botes {
  margin: 1.5rem 0;
}

.dashboard-botes h3 {
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
  color: var(--color-primary);
}

.botes-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.bote-card {
  flex: 1 1 calc(33.33% - 1rem);
  min-width: 220px;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  color: #fff;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.bote-label {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
  opacity: 0.85;
}

.bote-importe {
  font-size: 1.75rem;
  font-weight: 600;
}

.bote-meta {
  font-size: 0.85rem;
  opacity: 0.9;
}

.bote-card.bote-euromillones {
  background: linear-gradient(135deg, #152c8f, #274bce);
}

.bote-card.bote-primitiva {
  background: linear-gradient(135deg, #0c6134, #1caa5d);
}

.bote-card.bote-gordo {
  background: linear-gradient(135deg, #7a1f2d, #c33f2f);
}

/* Tarjetas de boletos */
.card {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.card h3 {
  color: var(--color-primary);
  margin-bottom: 0.4rem;
}

.card p {
  margin: 0.2rem 0;
  color: var(--color-muted);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  text-decoration: underline;
}

/* Imagen del boleto */
.ticket-image {
  max-width: 500px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 1rem;
}

/* Botones */
.btn {
  display: inline-block;
  background: var(--color-primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  margin-top: 0.5rem;
  transition: background 0.2s ease;
}

.btn:hover {
  background: var(--color-accent);
}

/* Detalle JSON */
pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-top: 1rem;
}

/* Pie */
footer {
  text-align: center;
  color: var(--color-muted);
  font-size: 0.9rem;
  padding: 1rem;
}

/* 🔽 Filtros en la cabecera */
.filtros {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.filtros label {
  font-weight: 500;
}

.filtros select {
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  background-color: #fff;
  font-size: 0.9rem;
}

/* Combinaciones ganadoras */
.results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}

.results h4 {
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.combo-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.combo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.combo-date {
  width: 60px;
  font-weight: 600;
  text-transform: lowercase;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.combo-balls,
.combo-extras {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  align-items: center;
}

.combo-ball {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.25), inset 0 -3px 6px rgba(0,0,0,0.2);
}

.combo-ball-sm {
  width: 26px;
  height: 26px;
  font-size: 0.75rem;
}

.combo-ball-eu {
  background: linear-gradient(145deg, #0b64d4, #084da3);
}

.combo-ball-pr {
  background: linear-gradient(145deg, #1f9a3d, #147130);
}

.combo-ball-go {
  background: linear-gradient(145deg, #d63031, #aa1f20);
}

.combo-stars .combo-star {
  width: 42px;
  height: 40px;
  background: radial-gradient(circle at 30% 30%, #ffe8a3, #f7c539 45%, #f4a61f);
  color: #362500;
  /* font-weight: 700; */
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(50% 0%, 61% 34%, 98% 35%, 68% 57%, 79% 91%, 50% 72%, 21% 91%, 32% 57%, 2% 35%, 39% 34%);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
  text-shadow: 0 1px 1px rgba(255,255,255,0.6);
  border: none;
  box-shadow: inset 0 -2px 4px rgba(0,0,0,0.2);
}

.combo-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-muted);
}

.bet-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.bet-section {
  background: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.profile {
  max-width: 640px;
  margin: 1.5rem auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.profile-form .form-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.profile-form label {
  font-weight: 400;
  color: var(--color-muted);
}

.profile-form input {
  width: 100%;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.4rem;
  font-size: 1.3rem;
  background: var(--color-bg);
}

.profile-form input:focus {
  outline: 2px solid var(--color-primary);
  border-color: transparent;
}

.password-change {
  border: 1px dashed rgba(0,0,0,0.15);
  border-radius: var(--radius);
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.password-change legend {
  font-weight: 700;
  color: var(--color-primary);
  padding: 0 0.3rem;
}

.password-change small {
  color: var(--color-muted);
  line-height: 1.3;
}

.bet-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.bet-section-header h3 {
  margin: 0;
}

.bet-section-header p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ticket-apuesta {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ticket-info {
  font-size: 0.95rem;
}

.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--color-muted);
  gap: 0.5rem;
}

.ticket-id {
  font-weight: 600;
  text-transform: uppercase;
}

.ticket-link {
  font-size: 0.85rem;
  color: var(--color-accent);
}

.ticket-link.icon-only {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1rem;
  box-shadow: var(--shadow);
}

.ticket-link.icon-only:hover {
  background: var(--color-accent);
  color: #fff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.ticket-combo {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.empty-note {
  font-size: 0.9rem;
  color: var(--color-muted);
  font-style: italic;
  margin: 0;
}

.bet-results h4 {
  margin: 0 0 0.4rem;
  color: var(--color-primary);
}

.bet-hits {
  border-top: 1px solid rgba(0,0,0,0.08);
  padding-top: 0.6rem;
}

.bet-hits h4 {
  margin: 0 0 0.4rem;
  color: #b34700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hits-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.hit-info {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  flex: 1;
}

.hit-date {
  font-weight: 600;
  color: var(--color-muted);
  min-width: 60px;
}

.hit-detail {
  flex: 1;
}

.hit-id {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.hit-prize {
  font-size: 0.85rem;
  font-weight: 600;
  color: #0b6c3a;
  white-space: nowrap;
}

.admin-scan .qr-reader {
  width: 100%;
  min-height: 320px;
  border: 2px dashed rgba(0, 0, 0, 0.15);
  border-radius: var(--radius);
  overflow: hidden;
}

.admin-scan .scan-check {
  border-radius: var(--radius);
  background: var(--color-card);
  box-shadow: var(--shadow);
}

.ticket-add .qr-reader {
  width: 100%;
  min-height: 280px;
  border: 2px dashed rgba(0, 0, 0, 0.15);
  border-radius: var(--radius);
  overflow: hidden;
}

.ticket-viewer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.viewer-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.viewer-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.viewer-main {
  background: #0d1117;
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}

.viewer-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.viewer-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.viewer-details {
  border-radius: var(--radius);
}
