/* =========================
   CALCULATOR PAGE
========================= */

.calculator-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 90px 20px;
}

.calculator-hero {
  max-width: 820px;
  margin-bottom: 42px;
}

.calculator-hero h1 {
  margin-top: 16px;
  letter-spacing: -0.05em;
}

.calculator-hero p {
  margin-top: 18px;
  font-size: 1.08rem;
}

/* =========================
   LAYOUT
========================= */

.calculator-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.calculator-card,
.result-card,
.info-card {
  background: linear-gradient(180deg, #09111d, #0b1522);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

/* =========================
   FORM
========================= */

.calculator-form {
  display: grid;
  gap: 20px;
}

.form-group {
  display: grid;
  gap: 8px;
}

.form-group label {
  color: #dce6f5;
  font-size: 0.95rem;
  font-weight: 600;
}

.form-group input,
.form-group select {
  width: 100%;
  height: 52px;

  padding: 0 16px;

  background: #07101b;
  color: var(--text);

  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;

  outline: none;

  font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
  border-color: rgba(41, 227, 208, 0.55);
  box-shadow: 0 0 0 4px rgba(41, 227, 208, 0.08);
}

.form-hint {
  color: #7f8ca3;
  font-size: 0.84rem;
}

/* =========================
   BUTTONS
========================= */

.calc-button {
  height: 54px;

  border: none;
  border-radius: 14px;

  background: linear-gradient(90deg, #1ab8aa, #29e3d0);
  color: #041016;

  font-size: 1rem;
  font-weight: 800;

  cursor: pointer;

  transition: 0.25s ease;
}

.calc-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.calc-button:active {
  transform: translateY(0);
}

/* =========================
   RESULTS
========================= */

.result-card h2 {
  font-size: 1.6rem;
  margin-bottom: 22px;
}

.result-list {
  display: grid;
  gap: 14px;
}

.result-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;

  padding: 16px;

  background: rgba(255, 255, 255, 0.035);

  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
}

.result-item span {
  color: #aeb9cc;
}

.result-item strong {
  color: var(--text);
  text-align: right;
}

.result-highlight {
  margin-top: 18px;
  padding: 22px;

  background: rgba(41, 227, 208, 0.09);
  border: 1px solid rgba(41, 227, 208, 0.20);
  border-radius: 16px;
}

.result-highlight span {
  display: block;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.result-highlight strong {
  display: block;
  font-size: 2rem;
  line-height: 1.1;
}

/* =========================
   CHART PLACEHOLDER
========================= */

.chart-box {
  width: 100%;
  max-width: 100%;
  min-width: 0;

  overflow-x: auto;
  overflow-y: hidden;

  min-height: 280px;

  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 16px;

  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.03),
    rgba(255,255,255,0.01)
  );

  -webkit-overflow-scrolling: touch;
}

/* =========================
   INFO BELOW
========================= */

.info-section {
  display: grid;
  gap: 22px;

  margin-top: 34px;
}

.info-card h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.info-card p {
  margin-bottom: 12px;
}

.info-card ul {
  padding-left: 20px;
  color: var(--text-soft);
}

.info-card li {
  margin-bottom: 8px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {
  .calculator-layout {
    grid-template-columns: 1fr;
  }

  .calculator-page {
    padding-top: 70px;
  }
}

@media (max-width: 520px) {
  .calculator-page {
    padding-left: 16px;
    padding-right: 16px;
  }

  .calculator-card,
  .result-card,
  .info-card {
    padding: 22px;
  }

  .result-item {
    flex-direction: column;
  }

  .result-item strong {
    text-align: left;
  }

  .result-highlight strong {
    font-size: 1.65rem;
  }
}

/* =========================
   MINI CHART
========================= */

.mini-chart {
  height: 240px;

  display: flex;
  align-items: flex-end;
  gap: 8px;

  padding: 18px;

  width: fit-content;
  min-width: 100%;
}

.chart-column {
  flex: 0 0 32px;

  height: 100%;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;

  gap: 8px;
}

.chart-bar {
  width: 24px;
  min-height: 6px;

  background: linear-gradient(180deg, #29e3d0, #1ab8aa);

  border-radius: 999px 999px 4px 4px;
}

.chart-column span {
  color: #7f8ca3;
  font-size: 0.68rem;
  white-space: nowrap;
}


/* =========================
   COMPARISON CHART
========================= */

.comparison-chart {
  width: 100%;
  max-width: 100%;
  height: 230px;

  display: flex;
  align-items: flex-end;
  gap: 8px;

  padding: 18px;
}

.comparison-column {
  flex: 1;
  min-width: 0;
  height: 100%;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;

  gap: 8px;
}

.comparison-bars {
  width: 100%;
  height: 100%;

  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
}

.comparison-bars .chart-bar {
  width: 45%;
  max-width: 12px;
  min-height: 6px;

  border-radius: 999px 999px 4px 4px;
}

.cdi-bar {
  background: linear-gradient(180deg, #29e3d0, #1ab8aa);
}

.savings-bar {
  background: linear-gradient(180deg, #8aa4ff, #4f6cff);
}

.comparison-column span {
  max-width: 100%;

  color: #7f8ca3;
  font-size: 0.68rem;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 18px;

  margin-top: 12px;

  color: #aeb9cc;
  font-size: 0.85rem;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  color: #aeb9cc;
}

.chart-legend i {
  width: 10px;
  height: 10px;

  display: inline-block;

  border-radius: 999px;
}

.legend-cdi {
  background: #29e3d0;
}

.legend-savings {
  background: #8aa4ff;
}

.dividend-bar {
  background: linear-gradient(180deg, #facc15, #f59e0b);
}

.legend-dividend {
  background: #facc15;
}
.comparison-chart {
  min-width: max-content;
  width: 100%;
  height: 230px;

  display: flex;
  align-items: flex-end;
  gap: 8px;

  padding: 18px;
}

.comparison-column {
  width: 36px;
  min-width: 36px;
  height: 100%;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;

  gap: 8px;
}

.calculator-layout,
.calculator-card,
.result-card {
  min-width: 0;
}
