/* =============================================
   IDEAS MVP GENERATOR — ESTILOS
   ============================================= */

#imgn-app {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 900px;
  margin: 0 auto;
  color: #1a1a2e;
}

/* HEADER */
.imgn-header {
  text-align: center;
  padding: 40px 20px 30px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: 16px;
  margin-bottom: 24px;
  color: white;
}

.imgn-header-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.imgn-header h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 10px;
  color: white !important;
  border: none !important;
}

.imgn-header p {
  font-size: 15px;
  opacity: 0.85;
  margin: 0;
  color: white;
}

/* GATE (no acceso) */
.imgn-gate {
  background: #fff8e1;
  border: 1px solid #ffcc02;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  font-size: 16px;
}

.imgn-gate a {
  color: #e63946;
  font-weight: 600;
}

/* TABS */
.imgn-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.imgn-tab {
  padding: 10px 20px;
  border: 2px solid #e2e8f0;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  transition: all 0.2s;
}

.imgn-tab.active {
  border-color: #0f3460;
  background: #0f3460;
  color: white;
}

.imgn-tab-content { display: none; }
.imgn-tab-content.active { display: block; }

/* FORM BOX */
.imgn-form-box {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.imgn-form-box label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 6px;
}

.imgn-hint {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: #64748b;
  margin-top: 4px;
  margin-bottom: 12px;
}

.imgn-form-box textarea {
  width: 100%;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.2s;
  box-sizing: border-box;
  font-family: inherit;
}

.imgn-form-box textarea:focus {
  border-color: #0f3460;
  outline: none;
}

.imgn-char-count {
  text-align: right;
  font-size: 12px;
  color: #94a3b8;
  margin: 6px 0 16px;
}

/* BOTONES */
.imgn-btn-primary {
  background: linear-gradient(135deg, #0f3460, #16213e);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
}

.imgn-btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.imgn-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.imgn-btn-secondary {
  background: white;
  color: #0f3460;
  border: 2px solid #0f3460;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.imgn-btn-secondary:hover { background: #f0f4ff; }

/* CARDS */
.imgn-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.imgn-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: #0f3460;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
}

.imgn-card h5 {
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  margin: 16px 0 10px;
}

/* VIABILIDAD */
.imgn-viabilidad-card {
  background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
  color: white;
  border: none;
}

.imgn-viabilidad-card h4 { display: none; }

.imgn-viabilidad-score {
  display: flex;
  align-items: center;
  gap: 24px;
}

.imgn-score-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 3px solid rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  flex-direction: column;
  line-height: 1;
}

.imgn-score-circle small {
  font-size: 11px;
  opacity: 0.7;
  font-weight: 400;
}

.imgn-viabilidad-score > div strong {
  font-size: 18px;
  display: block;
  margin-bottom: 6px;
  color: white;
}

.imgn-viabilidad-score > div p {
  font-size: 14px;
  opacity: 0.85;
  margin: 0;
  color: white;
  line-height: 1.5;
}

/* GRID 2 COLUMNAS */
.imgn-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .imgn-grid-2 { grid-template-columns: 1fr; }
  .imgn-viabilidad-score { flex-direction: column; text-align: center; }
}

/* STAT ROWS */
.imgn-stat-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 12px;
  font-size: 14px;
}

.imgn-stat-label {
  font-weight: 600;
  color: #64748b;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.imgn-stat-row span:last-child {
  color: #1a1a2e;
  line-height: 1.5;
}

/* COMPETIDORES */
.imgn-competidor {
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13px;
}

.imgn-competidor strong {
  display: block;
  color: #e63946;
  margin-bottom: 2px;
}

/* HERRAMIENTAS IA */
.imgn-herramienta {
  display: flex;
  gap: 10px;
  background: #f0f7ff;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13px;
  align-items: flex-start;
}

.imgn-herramienta-nombre {
  font-weight: 700;
  color: #0f3460;
  min-width: 90px;
  flex-shrink: 0;
}

/* PRÓXIMOS PASOS */
.imgn-pasos-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.imgn-paso {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.imgn-paso-dia {
  background: #0f3460;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

.imgn-paso-accion {
  font-size: 14px;
  line-height: 1.5;
  color: #1a1a2e;
}

/* RIESGOS */
.imgn-riesgo {
  border-left: 3px solid #f59e0b;
  padding-left: 14px;
  margin-bottom: 14px;
}

.imgn-riesgo strong {
  display: block;
  color: #92400e;
  font-size: 14px;
  margin-bottom: 4px;
}

.imgn-riesgo p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* VEREDICTO */
.imgn-veredicto-card {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-color: #86efac;
}

.imgn-veredicto-card h4 { color: #15803d; border-color: #bbf7d0; }

#imgn-veredicto {
  font-size: 15px;
  line-height: 1.7;
  color: #166534;
  margin: 0;
}

/* RESULTADO HEADER */
.imgn-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.imgn-result-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
}

/* ACCIONES */
.imgn-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 20px 0;
  flex-wrap: wrap;
}

/* ERROR */
.imgn-error-box {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  padding: 16px;
  color: #be123c;
  font-size: 14px;
}

/* HISTORIAL */
.imgn-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.imgn-history-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
}

.imgn-history-item {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.imgn-history-idea {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 4px;
  flex: 1;
}

.imgn-history-date {
  font-size: 12px;
  color: #94a3b8;
}

.imgn-history-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.imgn-btn-view {
  background: #0f3460;
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.imgn-btn-delete {
  background: #fee2e2;
  color: #be123c;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.imgn-loading-text {
  text-align: center;
  color: #94a3b8;
  padding: 40px;
  font-size: 14px;
}

.imgn-empty-history {
  text-align: center;
  color: #94a3b8;
  padding: 60px 20px;
  font-size: 15px;
}
