﻿* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Manrope", "Segoe UI", Arial, sans-serif;
  background: #f4f7ff;
  color: #0b1326;
  min-height: 100vh;
  padding: 0;
}

a { color: inherit; text-decoration: none; }

.calc-page {
  /* max-width: 1000px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 22px; */
  padding: 28px;
  /* box-shadow: 0 20px 40px rgba(11, 19, 38, 0.12); */
  margin-top: 5%;
  /* margin-bottom: 60px; */
}

.back-link {
  display: inline-block;
  font-weight: 600;
  margin-bottom: 18px;
  color: #1a2a57;
}

h1 {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 12px;
}

p {
  color: #2a3561;
  line-height: 1.6;
}

.calc-placeholder {
  margin-top: 24px;
  padding: 18px;
  background: #f6f8ff;
  border-radius: 16px;
  border: 1px dashed rgba(11, 19, 38, 0.18);
}

.calc-placeholder h2 {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.export-actions {
  margin: 12px 0 12px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.export-btn {
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  color: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.export-pdf {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.25);
}

.export-excel {
  background: linear-gradient(135deg, #16a34a, #065f46);
  box-shadow: 0 10px 20px rgba(22, 163, 74, 0.25);
}

.slider-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
}

.slider-row.single {
  grid-template-columns: 1fr;
}

.range-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e5e7eb;
  outline: none;
  cursor: pointer;
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1d4ed8;
  border: 3px solid #1d4ed8;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.2);
}

.range-input::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1d4ed8;
  border: 3px solid #1d4ed8;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.2);
}

.summary-stack {
  display: grid;
  gap: 18px;
}

/* .results {
  display: grid;
  grid-template-columns: repeat(3, minmax(200px, 260px));
  gap: 20px;
  justify-content: center;
} */

/* .results-card {
  margin-top: 22px;
} */

.result-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(19, 24, 36, 0.08);
  width: 100%;
  max-width: 260px;
  box-shadow: 0 12px 24px rgba(11, 19, 38, 0.08);
}

.result-card span {
  display: block;
  font-size: 0.9rem;
  color: #2a3561;
  margin-bottom: 6px;
}

.result-card strong {
  font-size: 1.1rem;
  color: #0b1326;
}

.chart-card {
  position: relative;
  min-height: 360px;
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
}

.chart-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 320px;
  margin: 0 auto;
}

.chart-canvas canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

.chart-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.chart-center span {
  display: block;
  font-size: 0.9rem;
  color: #5b6577;
  margin-bottom: 6px;
}

.chart-center strong {
  font-size: 1.3rem;
  color: #0b1326;
}

.chart-legend {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legend-item span {
  display: block;
  font-size: 0.85rem;
  color: #5b6577;
}

.legend-item strong {
  display: block;
  font-size: 1rem;
  color: #0b1326;
  margin-top: 4px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.dot.principal {
  background: #2563eb;
}

.dot.interest {
  background: #f59e0b;
}

.schedule-section {
  margin-top: 32px;
}

.schedule-section h2 {
  font-size: 1.15rem;
  margin-bottom: 14px;
  color: #0b1326;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.table-wrap {
  overflow-x: auto;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(11, 19, 38, 0.08);
  box-shadow: 0 12px 24px rgba(11, 19, 38, 0.08);
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.schedule-table thead th {
  background: #8e1447;
  color: #ffffff;
  text-align: center;
  padding: 14px 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

.schedule-table tbody td {
  text-align: center;
  padding: 12px 10px;
  border-top: 1px solid rgba(11, 19, 38, 0.08);
  color: #1d2946;
  font-size: 0.95rem;
}

.schedule-table tbody tr:nth-child(even) td {
  background: #fafbff;
}

.table-pagination {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  font-size: 0.95rem;
  color: #1d2946;
}

.yearly-chart-card {
  margin-top: 24px;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(11, 19, 38, 0.08);
  box-shadow: 0 12px 24px rgba(11, 19, 38, 0.08);
  padding: 18px 18px 14px;
}

.yearly-chart-card h3 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: #0b1326;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.yearly-chart-canvas {
  position: relative;
  width: 100%;
  height: 300px;
}

.page-btn {
  border: 1px solid rgba(11, 19, 38, 0.2);
  background: #ffffff;
  color: #0b1326;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.page-btn:hover:not(:disabled) {
  background: #f2f4ff;
  border-color: rgba(11, 19, 38, 0.35);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.suggested-calculators {
  margin-top: 36px;
}

.suggested-calculators.outside {
  width: 100%;
  max-width: none;
  margin: 0 auto 80px;
  padding: 0 30px;
  box-sizing: border-box;
}

.suggested-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.suggested-header span {
  width: 32px;
  height: 2px;
  background: #1a2a57;
  display: inline-block;
  opacity: 0.7;
}

.suggested-header h2 {
  font-size: 1.2rem;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.suggested-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 16px;
}

.suggested-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 18px 18px 16px;
  border: 1px solid rgba(15, 26, 55, 0.08);
  box-shadow: 0 12px 26px rgba(11, 19, 38, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  min-height: 200px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.suggested-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(11, 19, 38, 0.16);
  border-color: rgba(15, 26, 55, 0.16);
}

.suggested-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(140deg, rgba(108, 212, 255, 0.2), rgba(139, 255, 177, 0.25));
  display: grid;
  place-items: center;
}

.suggested-icon img {
  width: 26px;
  height: 26px;
}

.suggested-card h3 {
  font-size: 1.02rem;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.suggested-card p {
  font-size: 0.9rem;
  color: #2a3561;
  line-height: 1.5;
}

.suggested-card span {
  margin-top: auto;
  font-size: 0.85rem;
  text-transform: uppercase;
  font-weight: 600;
  color: #1a2a57;
}

@media (min-width: 901px) and (max-width: 1200px) {
  .calc-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  }
}

@media (min-width: 769px) and (max-width: 900px) {
  .chart-legend {
    grid-template-columns: 1fr;
  }

  .table-pagination {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .export-actions {
    justify-content: center;
  }

  .chart-legend {
    grid-template-columns: 1fr;
  }

  .table-pagination {
    justify-content: center;
    flex-wrap: wrap;
  }

  .results {
    grid-template-columns: 1fr;
  }

  .yearly-chart-canvas {
    height: 240px;
  }

  .suggested-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 600px) {
  .suggested-grid {
    grid-template-columns: 1fr;
  }
}
