/* Añadiendo estilos base para que ocupe 100% del ancho */
/* Tools Page Styles */
:root {
  --color-primary: #166534;
  --color-primary-light: #22c55e;
  --color-primary-dark: #14532d;
  --color-bg: #fafaf9;
  --color-card: #ffffff;
  --color-text: #1c1917;
  --color-text-muted: #78716c;
  --color-border: #e7e5e4;
  --color-risk-low: #22c55e;
  --color-risk-medium: #eab308;
  --color-risk-high: #ef4444;
}

/* Forzar 100% ancho en html y body */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Tool Page Base */
.tool-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #f5f5f4 0%, #fafaf9 100%);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Tool Header */
.tool-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  animation: slideDown 0.6s ease-out;
  width: 100%;
  box-sizing: border-box;
}

/* Responsive header móvil */
@media (max-width: 480px) {
  .tool-header {
    padding: 0.75rem 1rem;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Botón de volver */
.back-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(22, 101, 52, 0.2);
}

.back-link::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.back-link:hover::before {
  width: 200px;
  height: 200px;
}

.back-link svg {
  width: 18px;
  height: 18px;
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.back-link:hover {
  transform: translateX(-5px) scale(1.05);
  box-shadow: 0 6px 20px rgba(22, 101, 52, 0.35);
}

.back-link:hover svg {
  transform: translateX(-3px) scale(1.2);
  animation: wiggle 0.5s ease-in-out;
}

@keyframes wiggle {
  0%,
  100% {
    transform: translateX(-3px) rotate(0deg);
  }
  25% {
    transform: translateX(-5px) rotate(-5deg);
  }
  75% {
    transform: translateX(-5px) rotate(5deg);
  }
}

@media (max-width: 768px) {
  .back-link {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
  .back-link:hover {
    transform: translateX(-3px) scale(1.02);
  }
  .back-link svg {
    width: 16px;
    height: 16px;
  }
}

/* Tool Main con 100% ancho */
.tool-main {
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .tool-main {
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 480px) {
  .tool-main {
    padding: 1rem 0.75rem;
  }
}

/* Container 100% ancho */
.tool-container {
  width: 100%;
  box-sizing: border-box;
}

/* Tool Hero */
.tool-hero {
  text-align: center;
  margin-bottom: 3rem;
  animation: scaleIn 0.8s ease-out;
  padding: 0 0.5rem;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .tool-hero {
    margin-bottom: 2rem;
  }
}

.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(22, 101, 52, 0.1);
  color: var(--color-primary);
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.tool-badge svg {
  width: 16px;
  height: 16px;
}

.tool-badge.risk {
  background: rgba(234, 179, 8, 0.1);
  color: #b45309;
}

.tool-badge.simulator {
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
}

.tool-page-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.5rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.tool-page-subtitle {
  color: var(--color-text-muted);
  font-size: clamp(0.85rem, 2vw, 1.1rem);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Calculator grid responsive mejorado */
.calculator-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2rem;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .calculator-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .calculator-grid {
    gap: 1rem;
  }
}

/* Form Styles responsive */
.calc-form,
.risk-form,
.simulator-form {
  background: var(--color-card);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--color-border);
  animation: slideInLeft 0.7s ease-out;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .calc-form,
  .risk-form,
  .simulator-form {
    padding: 1.5rem;
    border-radius: 12px;
  }
}

@media (max-width: 480px) {
  .calc-form,
  .risk-form,
  .simulator-form {
    padding: 1.25rem;
    border-radius: 10px;
  }
}

.form-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 1rem;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
}

.form-section-title svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 768px) {
  .form-section-title {
    font-size: 1rem;
  }
  .form-section-title svg {
    width: 20px;
    height: 20px;
  }
}

/* Animaciones de entrada */
.form-group {
  animation: fadeInUp 0.5s ease-out backwards;
  margin-bottom: 1.25rem;
}

.form-group:nth-child(1) {
  animation-delay: 0.1s;
}
.form-group:nth-child(2) {
  animation-delay: 0.15s;
}
.form-group:nth-child(3) {
  animation-delay: 0.2s;
}
.form-group:nth-child(4) {
  animation-delay: 0.25s;
}
.form-group:nth-child(5) {
  animation-delay: 0.3s;
}
.form-group:nth-child(6) {
  animation-delay: 0.35s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .form-group {
    margin-bottom: 1rem;
  }
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .form-label {
    font-size: 0.8rem;
  }
}

/* Form inputs 100% ancho */
.form-input,
.form-select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: 10px;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-card);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .form-input,
  .form-select {
    padding: 0.75rem 0.875rem;
    font-size: 16px; /* Previene zoom en iOS */
  }
}

.form-input:hover,
.form-select:hover {
  border-color: var(--color-primary-light);
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(22, 101, 52, 0.1);
}

.form-select.large {
  padding: 1rem 1.25rem;
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .form-select.large {
    font-size: 16px;
    padding: 0.875rem 1rem;
  }
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-prefix,
.input-suffix {
  position: absolute;
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  pointer-events: none;
}

.input-prefix {
  left: 1rem;
}

.input-suffix {
  right: 1rem;
}

@media (max-width: 768px) {
  .input-prefix {
    left: 0.75rem;
  }
  .input-suffix {
    right: 0.75rem;
  }
}

.input-with-icon .form-input {
  padding-left: 2.5rem;
}

.input-with-icon .form-input:has(+ .input-suffix) {
  padding-right: 2.5rem;
}

.input-hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Range Input */
.form-range {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--color-border);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(22, 101, 52, 0.3);
  transition: transform 0.2s ease;
}

.form-range:active::-webkit-slider-thumb {
  transform: scale(1.3);
  box-shadow: 0 4px 12px rgba(22, 101, 52, 0.5);
}

.form-range::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.range-value {
  text-align: right;
  font-size: 0.875rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-top: 0.5rem;
}

@media (max-width: 768px) {
  .range-value {
    font-size: 0.8rem;
  }
}

/* Result Card */
.result-card {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  animation: popIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .result-card {
    padding: 1.25rem;
    margin-bottom: 1.25rem;
  }
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.8) rotate(-5deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.result-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

.result-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .result-label {
    font-size: 0.8rem;
  }
}

.result-value {
  color: white;
  font-size: 2rem;
  font-weight: 700;
  font-family: "Playfair Display", serif;
  animation: countUp 1s ease-out;
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.5);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 768px) {
  .result-value {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .result-value {
    font-size: 1.5rem;
  }
}

/* Calculate Button */
.btn-calculate {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .btn-calculate {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
  }
}

.btn-calculate::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-calculate:hover::before {
  width: 300px;
  height: 300px;
}

.btn-calculate svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.btn-calculate:hover svg {
  transform: translateX(5px);
}

.btn-calculate:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(22, 101, 52, 0.3);
}

@media (max-width: 768px) {
  .btn-calculate:hover {
    transform: none;
  }
  .btn-calculate:active {
    transform: scale(0.98);
  }
  .btn-calculate svg {
    width: 18px;
    height: 18px;
  }
}

.btn-calculate.risk {
  background: linear-gradient(135deg, #b45309 0%, #92400e 100%);
}

.btn-calculate.risk:hover {
  box-shadow: 0 8px 20px rgba(180, 83, 9, 0.3);
}

.btn-calculate.simulator {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.btn-calculate.simulator:hover {
  box-shadow: 0 8px 20px rgba(29, 78, 216, 0.3);
}

/* Calc Results responsive */
.calc-results,
.risk-results,
.simulator-results {
  background: var(--color-card);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--color-border);
  animation: slideInRight 0.7s ease-out;
  width: 100%;
  box-sizing: border-box;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 768px) {
  .calc-results,
  .risk-results,
  .simulator-results {
    padding: 1.5rem;
    border-radius: 12px;
  }
}

@media (max-width: 480px) {
  .calc-results,
  .risk-results,
  .simulator-results {
    padding: 1rem;
    border-radius: 10px;
  }
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.results-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
}

@media (max-width: 768px) {
  .results-header h3 {
    font-size: 1rem;
  }
}

.btn-export {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .btn-export {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
  .btn-export svg {
    width: 14px;
    height: 14px;
  }
}

.btn-export::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(22, 101, 52, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}

.btn-export:hover::after {
  width: 200px;
  height: 200px;
}

.btn-export svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.btn-export:hover svg {
  transform: translateY(-3px);
}

.btn-export:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* Table container responsive */
.table-container {
  overflow-x: auto;
  max-height: 400px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  width: 100%;
}

@media (max-width: 768px) {
  .table-container {
    max-height: 350px;
    margin: 0;
  }
}

.amortization-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 450px;
}

@media (max-width: 768px) {
  .amortization-table {
    font-size: 0.75rem;
    min-width: 400px;
  }
}

.amortization-table th {
  background: var(--color-primary);
  color: white;
  padding: 0.875rem 0.75rem;
  text-align: left;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
}

@media (max-width: 768px) {
  .amortization-table th,
  .amortization-table td {
    padding: 0.625rem 0.5rem;
  }
}

.amortization-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.amortization-table tbody tr {
  animation: fadeIn 0.4s ease-out backwards;
  transition: all 0.3s ease;
}

.amortization-table tbody tr:nth-child(1) {
  animation-delay: 0.05s;
}
.amortization-table tbody tr:nth-child(2) {
  animation-delay: 0.1s;
}
.amortization-table tbody tr:nth-child(3) {
  animation-delay: 0.15s;
}
.amortization-table tbody tr:nth-child(4) {
  animation-delay: 0.2s;
}
.amortization-table tbody tr:nth-child(5) {
  animation-delay: 0.25s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.amortization-table tbody tr:hover {
  background: var(--color-bg);
}

.amortization-table .empty-row td {
  text-align: center;
  color: var(--color-text-muted);
  padding: 3rem 1rem;
}

@media (max-width: 768px) {
  .amortization-table .empty-row td {
    padding: 2rem 1rem;
    font-size: 0.85rem;
  }
}

/* Risk Calculator Grid */
.risk-calculator-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1000px) {
  .risk-calculator-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.result-section {
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .result-section {
    margin-bottom: 1.5rem;
  }
}

.result-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-primary);
}

@media (max-width: 768px) {
  .result-section-title {
    font-size: 0.9rem;
  }
}

.diagnosis-card {
  animation: slideInUp 0.5s ease-out backwards;
  transition: all 0.3s ease;
  background: var(--color-bg);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.diagnosis-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .diagnosis-card {
    padding: 1rem;
    justify-content: center;
    text-align: center;
  }
  .diagnosis-card:hover {
    transform: translateY(-2px);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.diagnosis-label {
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .diagnosis-label {
    font-size: 0.85rem;
  }
}

.diagnosis-badge {
  animation: pulse-badge 2s ease-in-out infinite;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  background: var(--color-border);
  color: var(--color-text-muted);
}

@keyframes pulse-badge {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@media (max-width: 768px) {
  .diagnosis-badge {
    padding: 0.4rem 0.875rem;
    font-size: 0.8rem;
  }
}

.diagnosis-badge.low {
  background: rgba(34, 197, 94, 0.2);
  color: #15803d;
}

.diagnosis-badge.medium {
  background: rgba(234, 179, 8, 0.2);
  color: #a16207;
}

.diagnosis-badge.high {
  background: rgba(239, 68, 68, 0.2);
  color: #b91c1c;
}

.probability-card {
  background: var(--color-bg);
  border-radius: 12px;
  padding: 1.5rem;
}

@media (max-width: 768px) {
  .probability-card {
    padding: 1.25rem;
  }
}

.probability-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .probability-label {
    font-size: 0.8rem;
  }
}

.probability-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary);
  font-family: "Playfair Display", serif;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .probability-value {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .probability-value {
    font-size: 1.75rem;
  }
}

.probability-bar {
  height: 12px;
  background: var(--color-border);
  border-radius: 6px;
  overflow: hidden;
}

@media (max-width: 768px) {
  .probability-bar {
    height: 10px;
  }
}

.probability-fill,
.factor-fill {
  animation: fillBar 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fillBar {
  from {
    width: 0;
  }
}

.probability-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  border-radius: 6px;
  transition: width 1s ease;
}

.analysis-factors {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (max-width: 768px) {
  .analysis-factors {
    gap: 0.875rem;
  }
}

.factor-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.factor-label {
  width: 120px;
  font-size: 0.875rem;
  color: var(--color-text);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .factor-label {
    width: 100px;
    font-size: 0.8rem;
  }
}

.factor-bar {
  flex: 1;
  height: 8px;
  background: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}

.factor-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}

.factor-fill.low {
  background: var(--color-risk-low);
}

.factor-fill.medium {
  background: var(--color-risk-medium);
}

.factor-fill.high {
  background: var(--color-risk-high);
}

.factor-value {
  width: 40px;
  text-align: right;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

@media (max-width: 768px) {
  .factor-value {
    width: 35px;
    font-size: 0.8rem;
  }
}

/* Recommendations */
.recommendations-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.recommendation-item {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--color-bg);
  border-radius: 10px;
  align-items: flex-start;
  animation: fadeInUp 0.5s ease-out backwards;
  transition: all 0.3s ease;
}

.recommendation-item:hover {
  transform: translateX(5px);
  box-shadow: -4px 0 0 0 var(--color-primary);
}

@media (max-width: 768px) {
  .recommendation-item {
    padding: 0.875rem;
  }
  .recommendation-item:hover {
    transform: none;
  }
}

.recommendation-item:nth-child(1) {
  animation-delay: 0.1s;
}
.recommendation-item:nth-child(2) {
  animation-delay: 0.2s;
}
.recommendation-item:nth-child(3) {
  animation-delay: 0.3s;
}

.recommendation-icon {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .recommendation-icon {
    width: 20px;
    height: 20px;
  }
}

.recommendation-text {
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .recommendation-text {
    font-size: 0.85rem;
  }
}

/* Simulator Grid - Corregido para responsivo */
.simulator-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1000px) {
  .simulator-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .simulator-grid {
    gap: 1rem;
  }
}

/* Scenarios */
.scenarios-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .scenarios-container {
    gap: 1rem;
  }
}

.scenario-card {
  background: var(--color-bg);
  border-radius: 16px;
  padding: 1.5rem;
  border: 2px solid transparent;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  animation: fadeInUp 0.6s ease-out backwards;
}

.scenario-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .scenario-card {
    padding: 1.25rem;
    border-radius: 12px;
  }
  .scenario-card:hover {
    transform: none;
  }
}

.scenario-card:nth-child(1) {
  animation-delay: 0.1s;
}
.scenario-card:nth-child(2) {
  animation-delay: 0.2s;
}
.scenario-card:nth-child(3) {
  animation-delay: 0.3s;
}

.scenario-card.conservative {
  border-color: rgba(22, 101, 52, 0.3);
}

.scenario-card.moderate {
  border-color: rgba(59, 130, 246, 0.3);
}

.scenario-card.aggressive {
  border-color: rgba(234, 179, 8, 0.3);
}

.scenario-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.scenario-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
}

@media (max-width: 768px) {
  .scenario-title {
    font-size: 1rem;
  }
}

.scenario-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.scenario-badge.conservative {
  background: rgba(22, 101, 52, 0.1);
  color: var(--color-primary);
}

.scenario-badge.moderate {
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
}

.scenario-badge.aggressive {
  background: rgba(234, 179, 8, 0.1);
  color: #b45309;
}

.scenario-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 480px) {
  .scenario-stats {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.scenario-stat {
  text-align: center;
  padding: 0.75rem;
  background: var(--color-card);
  border-radius: 10px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  font-family: "Playfair Display", serif;
}

@media (max-width: 768px) {
  .stat-value {
    font-size: 1.1rem;
  }
}

/* Comparison Chart */
.comparison-chart {
  background: var(--color-bg);
  border-radius: 16px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

@media (max-width: 768px) {
  .comparison-chart {
    padding: 1.25rem;
    border-radius: 12px;
    margin-top: 1rem;
  }
}

.chart-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.chart-bars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chart-bar-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.chart-bar-label {
  width: 100px;
  font-size: 0.875rem;
  color: var(--color-text);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .chart-bar-label {
    width: 80px;
    font-size: 0.8rem;
  }
}

.chart-bar {
  flex: 1;
  height: 24px;
  background: var(--color-border);
  border-radius: 12px;
  overflow: hidden;
}

@media (max-width: 768px) {
  .chart-bar {
    height: 20px;
  }
}

.chart-bar-fill {
  height: 100%;
  border-radius: 12px;
  transition: width 1s ease;
  animation: fillBar 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.chart-bar-fill.conservative {
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
}

.chart-bar-fill.moderate {
  background: linear-gradient(90deg, #1d4ed8 0%, #3b82f6 100%);
}

.chart-bar-fill.aggressive {
  background: linear-gradient(90deg, #b45309 0%, #eab308 100%);
}

.chart-bar-value {
  width: 80px;
  text-align: right;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

@media (max-width: 768px) {
  .chart-bar-value {
    width: 70px;
    font-size: 0.8rem;
  }
}

/* Tool Info */
.tool-info {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  text-align: left;
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--color-bg);
  border-radius: 12px;
}

.info-icon {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.info-icon svg {
  width: 100%;
  height: 100%;
}

@media (max-width: 768px) {
  .tool-info {
    margin-top: 1.5rem;
    padding: 1.25rem;
  }
}

.tool-info p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 768px) {
  .tool-info p {
    font-size: 0.85rem;
  }
}

/* Animations */
.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

.animate-slide-up {
  animation: slideInUp 0.6s ease-out;
}

.animate-pulse-border {
  animation: pulseBorder 2s ease-in-out infinite;
}

@keyframes pulseBorder {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(22, 101, 52, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(22, 101, 52, 0);
  }
}

/* Logo en header de herramientas */
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg {
  width: 20px;
  height: 20px;
  color: white;
}

.logo-text {
  font-family: "Playfair Display", serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}

@media (max-width: 480px) {
  .logo-icon {
    width: 32px;
    height: 32px;
  }
  .logo-icon svg {
    width: 18px;
    height: 18px;
  }
  .logo-text {
    font-size: 1.1rem;
  }
}

/* Modal de confirmación */
.confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.confirm-modal.active {
  opacity: 1;
  visibility: visible;
}

.confirm-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.confirm-modal-content {
  position: relative;
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}

.confirm-modal.active .confirm-modal-content {
  transform: scale(1) translateY(0);
}

.confirm-modal-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.confirm-modal-icon svg {
  width: 35px;
  height: 35px;
  stroke: #d97706;
  stroke-width: 2;
}

.confirm-modal-title {
  font-family: "Playfair Display", serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.confirm-modal-text {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.confirm-modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn-confirm-stay {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.btn-confirm-stay:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5);
}

.btn-confirm-stay:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(34, 197, 94, 0.4);
}

.btn-confirm-stay svg {
  width: 18px;
  height: 18px;
}

.btn-confirm-leave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: white;
  color: #6b7280;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-confirm-leave:hover {
  background: #fef2f2;
  border-color: #ef4444;
  color: #ef4444;
  transform: translateY(-2px);
}

.btn-confirm-leave:active {
  transform: translateY(0);
}

.btn-confirm-leave svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 480px) {
  .confirm-modal-content {
    padding: 2rem 1.5rem;
    margin: 1rem;
  }

  .confirm-modal-icon {
    width: 60px;
    height: 60px;
  }

  .confirm-modal-icon svg {
    width: 28px;
    height: 28px;
  }

  .confirm-modal-title {
    font-size: 1.5rem;
  }

  .confirm-modal-text {
    font-size: 0.9rem;
  }

  .confirm-modal-buttons {
    flex-direction: column;
  }

  .btn-confirm-stay,
  .btn-confirm-leave {
    width: 100%;
    padding: 1rem;
  }
}
