/* ================================================================
   ESTILOS — Tablero Creator
   ================================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #2c3e50;
  --accent: #e67e22;
  --accent-light: #f39c12;
  --bg: #f0ebe3;
  --card-bg: #ffffff;
  --text: #333;
  --text-light: #777;
  --success: #27ae60;
  --danger: #e74c3c;
  --border: #ddd;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ================================================================
   HEADER
   ================================================================ */
.app-header {
  background: var(--primary);
  color: white;
  padding: 1.5rem 2rem;
  text-align: center;
}

.app-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
}

.app-header h1 span { color: var(--accent-light); }

.app-header p {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-top: 0.3rem;
}

/* ================================================================
   STEP INDICATOR
   ================================================================ */
.step-indicator {
  display: flex;
  justify-content: center;
  gap: 0;
  padding: 1.5rem 1rem;
  background: white;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--text-light);
  white-space: nowrap;
  position: relative;
}

.step .step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: all 0.3s;
}

.step .step-label {
  display: none;
}

.step.activo .step-num {
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(230, 126, 34, 0.4);
}

.step.activo .step-label {
  display: inline;
  color: var(--accent);
  font-weight: 600;
}

.step.completado .step-num {
  background: var(--success);
}

.step.completado .step-label {
  display: inline;
  color: var(--success);
}

.step:not(:last-child)::after {
  content: '';
  width: 30px;
  height: 2px;
  background: var(--border);
  margin-left: 0.5rem;
}

.step.completado:not(:last-child)::after {
  background: var(--success);
}

/* ================================================================
   MAIN CONTENT
   ================================================================ */
.main-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* ================================================================
   STEP CONTENT (pages)
   ================================================================ */
.step-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.step-content.activo { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-content h2 {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.step-content h2 .paso-tag {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  margin-right: 0.5rem;
  vertical-align: middle;
}

/* ================================================================
   MODELOS
   ================================================================ */
.modelos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.modelo-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
}

.modelo-card:hover {
  border-color: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.modelo-card.activo {
  border-color: var(--accent);
  background: #fef9f4;
  box-shadow: 0 4px 16px rgba(230, 126, 34, 0.15);
}

.modelo-icono {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.modelo-nombre {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.modelo-desc {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.8rem;
}

.modelo-detalles {
  font-size: 0.8rem;
  color: var(--text-light);
  background: var(--bg);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  display: inline-block;
}

/* Info del modelo */
.modelo-info {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 1.5rem;
  border: 1px solid var(--border);
}

.modelo-info h3 { margin-bottom: 0.5rem; }
.modelo-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 0.8rem 0;
  font-size: 0.9rem;
}

.modelo-info-grid .label { color: var(--text-light); }

.modelo-info h4 {
  margin-top: 1rem;
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.modelo-info ul {
  list-style: none;
  padding-left: 0;
  font-size: 0.85rem;
}

.modelo-info ul li {
  padding: 0.2rem 0;
  color: var(--text-light);
}

.modelo-info ul li .esp-icono { margin-right: 0.3rem; }

/* ================================================================
   FILE UPLOADS
   ================================================================ */
.file-group {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

.file-group h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.file-group .hint {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.file-group input[type="file"] {
  display: block;
  margin-bottom: 0.8rem;
}

.file-preview {
  width: 100px;
  height: 100px;
  border: 2px dashed var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
}

.file-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-hint {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.3rem;
}

/* Slots grid — tarjetas de puntos de control */
.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
}

.file-slot {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.file-slot:hover {
  border-color: var(--accent-light);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* Card visual preview */
.slot-card {
  display: flex;
  flex-direction: column;
}

.slot-card-band {
  background: var(--banda-color, #f5f0e8);
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 110px;
}

.slot-card-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255,255,255,0.9);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.slot-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slot-placeholder {
  font-size: 2rem;
  opacity: 0.4;
}

.slot-card-body {
  padding: 0.8rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.slot-card-body .slot-descripcion {
  width: 100%;
  font-size: 0.82rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  resize: vertical;
  font-family: inherit;
  background: #fafafa;
  transition: border-color 0.2s;
  min-height: 3.2em;
}

.slot-card-body .slot-descripcion:focus {
  border-color: var(--accent);
  outline: none;
  background: #fff;
}

.slot-card-body .slot-posiciones {
  font-size: 0.75rem;
  color: var(--text-light);
  text-align: center;
}

/* Footer with file input */
.slot-footer {
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--border);
  background: #fafafa;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.slot-footer .slot-label {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text);
}

.slot-footer input[type="file"] {
  font-size: 0.75rem;
  width: 100%;
  color: var(--text-light);
}

/* Fichas grid */
.fichas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.ficha-slot {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
}

.ficha-slot label {
  font-weight: 600;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.3rem;
}

/* ================================================================
   PREVIEW
   ================================================================ */
#preview-container {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 1rem;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

#preview-container canvas {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.preview-hint {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn-row {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover { background: #d35400; }

.btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--primary);
  color: white;
}
.btn-secondary:hover { background: #1a252f; }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: white; }

.btn-success {
  background: var(--success);
  color: white;
}
.btn-success:hover { background: #1e8449; }

/* ================================================================
   FOOTER
   ================================================================ */
.app-footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
  font-size: 0.8rem;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 600px) {
  .app-header h1 { font-size: 1.3rem; }
  .step { padding: 0.3rem 0.5rem; }
  .step .step-label { display: none !important; }
  .step.activo .step-label { display: none !important; }
  .step:not(:last-child)::after { width: 15px; }
  .modelos-grid { grid-template-columns: 1fr; }
  .slots-grid { grid-template-columns: 1fr; }
  .fichas-grid { grid-template-columns: 1fr; }
  .modelo-info-grid { grid-template-columns: 1fr; }
  .slot-card-band { min-height: 90px; }
  .slot-card-img { width: 65px; height: 65px; }
}

@media print {
  .step-indicator, .btn-row, .app-header, .app-footer { display: none; }
  .main-content { padding: 0; max-width: 100%; }
  #preview-container { border: none; padding: 0; }
}

/* ================================================================
   CORTE / UNIÓN DE PÁGINAS - indicación visual
   ================================================================ */
.corte-info {
  background: #fff3e0;
  border: 1px solid #ffe0b2;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.corte-info strong { color: var(--accent); }

/* ================================================================
   FREEMIUM — tarjetas de descarga
   ================================================================ */
.freemium-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto 1.5rem;
}

.freemium-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.freemium-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}

.freemium-free {
  border: 2px solid var(--border);
}

.freemium-premium {
  border: 2px solid var(--accent);
  background: linear-gradient(135deg, #fef9f4 0%, #fff 100%);
  box-shadow: 0 4px 16px rgba(230, 126, 34, 0.10);
}

.freemium-badge {
  display: inline-block;
  padding: 0.25rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: #e8e8e8;
  color: #666;
  margin-bottom: 0.8rem;
}

.freemium-badge-premium {
  background: var(--accent);
  color: white;
}

.freemium-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.freemium-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.freemium-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 1rem;
}

.freemium-price-label {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-light);
  display: block;
}

.freemium-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
  text-align: left;
  width: 100%;
  font-size: 0.85rem;
  line-height: 1.8;
}

.freemium-features li {
  padding: 0.15rem 0;
}

.freemium-features .freemium-restricted {
  color: var(--text-light);
  font-size: 0.8rem;
}

.freemium-email {
  width: 100%;
  margin-bottom: 0.8rem;
}

.freemium-email input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.freemium-email input:focus {
  border-color: var(--accent);
  outline: none;
}

.email-verify-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.email-verify-row input {
  flex: 1;
}

.btn-verify, .btn-confirm {
  white-space: nowrap;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: all 0.15s;
  min-width: 100px;
}

.btn-verify:hover, .btn-confirm:hover {
  background: var(--accent);
  color: #fff;
}

.btn-verify:disabled, .btn-confirm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-verify.sent {
  background: var(--success, #27ae60);
  border-color: var(--success, #27ae60);
  color: #fff;
}

.otp-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}

.otp-row input {
  flex: 1;
  text-align: center;
  font-size: 1.2rem;
  letter-spacing: 0.3rem;
  font-weight: 700;
}

.email-verified {
  font-size: 0.85rem;
  color: var(--success, #27ae60);
  font-weight: 600;
  margin-top: 0.4rem;
  text-align: center;
}

.freemium-status {
  margin-bottom: 0.5rem;
  min-height: 1.2rem;
  font-weight: 500;
  font-size: 0.85rem;
  display: none;
}

.freemium-hint {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

.freemium-local-ref {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: -0.3rem;
  margin-bottom: 0.8rem;
  padding: 0.3rem 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  display: inline-block;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

@media (max-width: 640px) {
  .freemium-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .freemium-card {
    padding: 1.5rem 1rem;
  }
}


