:root {
  --bg: #f7f9fa;
  --card: #ffffff;
  --text: #39415b;
  --muted: #8a93a7;
  --primary: #006666;
  --primary-soft: #e9faf5;
  --border: #e6ebf1;
  --track: #e9edf2;
  --returns: #5867e8;
  --invested: #d9deef;
  --shadow: 0 8px 20px rgba(22, 34, 51, 0.04);
  --radius: 14px;
  --deep-shadow: 0 18px 30px rgba(32, 45, 64, 0.08);
  --main-color: #006666;
  --sec-color: #F48120;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at -10% -20%, #e9f6ff 0%, transparent 60%),
    radial-gradient(900px 500px at 110% -20%, #e8fff8 0%, transparent 55%),
    var(--bg);
  overflow-x: hidden;
}

.app {
  max-width: 1220px;
  margin: 0 auto;
  position: relative;
}

.hero {
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #404863;
}

.page-subtitle {
  margin: 5px 0 0;
  font-size: 15px;
  color: #7d8798;
  font-weight: 600;
}

.hero-badge {
  border: 1px solid #d3ede5;
  background: #f0fbf7;
  color: var(--main-color);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 9px 14px;
}

.page-grid {
  display: grid;
 /* grid-template-columns: minmax(0, 2.15fr) minmax(300px, 1fr); */
  gap: 18px;
  align-items: start;
  margin-top: 8px;
  width: 100%;
}

.calculator-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--deep-shadow);
  padding: 18px;
  animation: fadeUp 320ms ease-out;
  position: relative;
  overflow: hidden;
}

.calculator-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--main-color) 0%, #44d7b6 70%, #86e3ce 100%);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.calc-head {
  margin-bottom: 14px;
}

.toggle-tabs {
  display: inline-flex;
  align-items: center;
  background: #f0f3f7;
  border-radius: 999px;
  padding: 3px;
  gap: 4px;
  box-shadow: inset 0 0 0 1px #e3e8ee;
}

.tab {
  border: none;
  background: transparent;
  color: #80899b;
  font-weight: 700;
  font-size: 12px;
  border-radius: 999px;
  padding: 7px 16px;
  font-family: "Manrope", sans-serif;
  text-decoration: none;
  display: inline-block;
  transition: color 150ms ease, background 150ms ease;
  cursor: pointer;
}

.tab.active {
  background: #d7f2e9;
  color: #0d9f7b;
  box-shadow: 0 1px 2px rgba(17, 36, 51, 0.08);
}

.tab:not(.active):hover {
  color: #5f6980;
}

.micro-points {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.micro-points li {
  font-size: 11px;
  font-weight: 700;
  color: #6f7a8f;
  background: #f4f7fa;
  border: 1px solid #e4eaf0;
  border-radius: 999px;
  padding: 6px 10px;
}

.calc-main {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 16px;
  margin-bottom: 10px;
}

.left-panel {
  padding-right: 2px;
}

.field {
  padding: 10px 8px;
  border: 1px solid #edf2f7;
  border-radius: 10px;
  background: #ffffff;
  margin-bottom: 8px;
  transition: border-color 130ms ease, background 130ms ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field:last-child {
  margin-bottom: 0;
}

.field:hover {
  border-color: #dce6ee;
  background: #fbfdff;
}

.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 10px;
}

.label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #ccece2;
  border-radius: 6px;
  padding: 6px 8px;
  background: #e4f6f0;
  min-width: 120px;
  max-width: 100%;
  justify-content: flex-end;
  transition: border-color 130ms ease, box-shadow 130ms ease;
}

.input-wrap:focus-within {
  border-color: #89d8c1;
  box-shadow: 0 0 0 2px rgba(0, 179, 134, 0.12);
}

.prefix,
.suffix {
  font-size: 13px;
  color: var(--main-color);
  font-weight: 700;
}

.num-input {
  width: 100px;
  border: none;
  outline: none;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--main-color);
  text-align: right;
  font-family: "Manrope", sans-serif;
  background: transparent;
  padding: 2px 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.num-input::-webkit-outer-spin-button,
.num-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.num-input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.slider-row {
  padding-top: 4px;
}

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4.5px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--primary) 0%,
    var(--primary) var(--percent),
    var(--track) var(--percent),
    var(--track) 100%
  );
  cursor: pointer;
  transition: background 120ms ease;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f3f7f9;
  border: 1px solid #e4ebef;
  box-shadow: 0 1px 4px rgba(20, 33, 48, 0.14);
  transition: transform 120ms ease;
}

.slider:active::-webkit-slider-thumb {
  transform: scale(1.04);
}

.slider::-moz-range-track {
  height: 4.5px;
  border-radius: 999px;
  background: var(--track);
}

.slider::-moz-range-progress {
  height: 4.5px;
  border-radius: 999px;
  background: var(--primary);
}

.slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f3f7f9;
  border: 1px solid #e4ebef;
  box-shadow: 0 1px 4px rgba(20, 33, 48, 0.14);
}

.hints {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  color: #a0a8b7;
  font-size: 10px;
  font-weight: 600;
}

.field-error {
  display: none;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #dc3545;
}

.field.has-error .input-wrap {
  border-color: #ef9aa6;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.12);
}

.right-panel {
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chart-wrap {
  border-radius: 11px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  padding: 8px 2px 10px;
  display: grid;
  justify-items: center;
  gap: 12px;
  min-height: 300px;
}

.calc-note {
  margin: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #8d97a8;
  line-height: 1.4;
  padding-top: 2px;
}

.legend {
  width: 100%;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 12px;
  color: #8d97a8;
  font-weight: 600;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  transform: translateY(1px);
}

.dot.invested {
  background: var(--invested);
}

.dot.returns {
  background: var(--returns);
}

.chart-canvas {
  width: 100%;
  height: 100%;
  display: block;
  animation: popIn 280ms ease-out;
}

.chart-frame {
  width: 250px;
  height: 230px;
  max-width: 100%;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.summary-strip {
  border-top: 1px solid #edf1f6;
  margin-top: 8px;
  padding-top: 12px;
}

.cagr-result-strip {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #dff1eb;
  border-radius: 12px;
  background: linear-gradient(140deg, #f8fffd 0%, #eefbf6 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 8px 20px rgba(14, 167, 127, 0.08);
}

.cagr-result-strip .result-text {
  display: grid;
  gap: 4px;
}

.cagr-result-strip .result-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6f7a8f;
  font-weight: 800;
}

.cagr-result-strip #cagrValue {
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: #0e9f7b;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.cagr-reset {
  border-radius: 10px;
  min-width: 132px;
  padding: 12px 20px;
  margin-bottom: 0;
  box-shadow: 0 10px 18px rgba(14, 167, 127, 0.26);
}

.results-row {
  width: 100%;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.result-list {
  width: min(64%, 430px);
  display: grid;
  gap: 10px;
}

.metric {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}

.metric-label {
  font-size: 12px;
  color: #97a1b2;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.metric-value {
  font-size: clamp(16px, 1.8vw, 22px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #5a627c;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.metric-value.primary {
  color: #4f5fdc;
}

.btn-invest {
  border: none;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--main-color) 0%, var(--main-color) 100%);
  color: #fff;
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 12px 28px;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
  margin-bottom: 4px;
  white-space: nowrap;
  box-shadow: 0 8px 14px rgba(14, 167, 127, 0.24);
}

.btn-invest:hover {
  background: #0ea77f;
}

.btn-invest:active {
  transform: translateY(1px);
}

.btn-reset {
  border: none;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--main-color) 0%, var(--main-color) 100%);
  color: #fff;
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 12px 28px;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
  margin-bottom: 4px;
  white-space: nowrap;
  box-shadow: 0 8px 14px rgba(14, 167, 127, 0.24);
}

.btn-reset:hover {
  background: #0ea77f;
}

.btn-reset:active {
  transform: translateY(1px);
}

.sidebar {
  display: grid;
  gap: 14px;
}

.side-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.side-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(22, 34, 51, 0.08);
}

.promo {
  padding: 22px 18px;
  text-align: center;
}

.coin-wrap {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 20%, #f3fffb 0%, #dbf8f0 60%, #c7f0e4 100%);
  color: #11a781;
  font-size: 30px;
  font-weight: 800;
}

.promo h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: #3c445f;
  line-height: 1.1;
}

.promo p {
  margin: 8px 0 14px;
  font-size: 15px;
  color: #8b95a6;
}

.promo .btn-invest {
  width: 100%;
  margin: 0;
  border-radius: 7px;
}

.side-title {
  margin: 0;
  font-size: 16px;
  color: #4d566f;
  font-weight: 800;
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f6;
}

.calc-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.calc-links li {
  border-bottom: 1px solid #eef2f6;
}

.calc-links li:last-child {
  border-bottom: none;
}

.calc-links a {
  display: block;
  text-decoration: none;
  color: #6a738a;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  transition: background 120ms ease, color 120ms ease;
}

.calc-links a:hover {
  background: #f7fbfd;
  color: #3f4964;
}

@media (max-width: 900px) {
  body {
    padding: 12px;
  }

  .hero {
    align-items: start;
  }

  .page-title {
    font-size: 34px;
  }

  .page-grid {
    grid-template-columns: 1fr;
  }

  .calculator-card {
    padding: 14px;
  }

  .calc-main {
    grid-template-columns: 1fr;
  }

  .right-panel {
    padding-left: 0;
  }

  .chart-canvas {
    width: 100%;
    height: 100%;
  }

  .chart-frame {
    width: 250px;
    height: 215px;
  }

  .results-row {
    align-items: stretch;
    flex-direction: column;
  }

  .cagr-result-strip {
    align-items: stretch;
    flex-direction: column;
    text-align: center;
  }

  .cagr-reset {
    width: 100%;
  }

  .result-list {
    width: 100%;
  }

  .btn-invest {
    width: 100%;
  }

  .btn-reset {
    width: 100%;
  }

  .hero-badge {
    width: 100%;
    text-align: center;
  }

  .promo h2 {
    font-size: 24px;
  }

  .sidebar {
    order: 2;
  }
}

/* XIRR Calculator Styles */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(300px, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 8px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--deep-shadow);
  padding: 18px;
  animation: fadeUp 320ms ease-out;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--main-color) 0%, var(--main-color) 70%, var(--main-color) 100%);
}

.left {
  padding-right: 2px;
}

.right {
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.freq-group {
  padding: 12px 10px;
  border: 1px solid #edf2f7;
  border-radius: 10px;
  background: #ffffff;
  margin-bottom: 8px;
  transition: border-color 130ms ease, background 130ms ease;
}

.freq-group:last-child {
  margin-bottom: 0;
}

.freq-group:hover {
  border-color: #dce6ee;
  background: #fbfdff;
}

.freq-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
  padding: 8px;
  border: 1px solid #eef2f6;
  border-radius: 8px;
  background: #f9fbfd;
  transition: all 120ms ease;
}

.freq-item:last-child {
  margin-bottom: 0;
}

.freq-item:hover {
  background: #f0f7fa;
  border-color: #dce6ee;
}

.freq-item button {
  background: none;
  border: none;
  color: #dc3545;
  cursor: pointer;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  transition: background 120ms ease, color 120ms ease;
}

.freq-item button:hover {
  background: #ffe0e0;
  color: #c82333;
}

.xirr-box {
  border: 1px solid #edf2f7;
  border-radius: 10px;
  background: #ffffff;
  padding: 12px 14px;
  margin-bottom: 10px;
  transition: border-color 130ms ease, background 130ms ease;
}

.xirr-box:last-child {
  margin-bottom: 0;
}

.xirr-box:hover {
  border-color: #dce6ee;
  background: #fbfdff;
}

.xirr-value {
  font-size: clamp(24px, 2.05vw, 34px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #5a627c;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  padding: 8px 0;
}

.xirr-caption {
  font-size: 12px;
  color: #97a1b2;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
}

.section-title {
  margin: 12px 0 10px 0;
  font-size: 14px;
  font-weight: 700;
  color: #4d566f;
  border-bottom: 1px solid #eef2f6;
  padding-bottom: 10px;
}

.chart-title {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #8d97a8;
  line-height: 1.4;
  padding-top: 2px;
}

.legend-inline {
  width: 100%;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 12px;
  color: #8d97a8;
  font-weight: 600;
}

.info {
  margin: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #8d97a8;
  line-height: 1.4;
  padding-top: 2px;
}

.finance-part section::before{
  content: none !important;
}
.breadcrumb{
  background-color: radial-gradient(1200px 500px at -10% -20%, #e9f6ff 0%, transparent 60%), radial-gradient(900px 500px at 110% -20%, #e8fff8 0%, transparent 55%), var(--bg);
}
.page-title{
  margin: 0 !important;
}

.amortization-table {
	width: 100%;
	margin-top: 15px;
}
.amortization-table tr,.amortization-table td {
	border: 1px solid #8d97a8;
}
.amortization-table td{
  padding: 8px;
}
#amortizationToggle {
	width: 100%;
}
.active-sidebar {
	color:  var(--sec-color) !important;
}
.finace-logo a img {
	width: 210px;
}
.finace-desc ul li {
	list-style: circle !important;
}
.finace-desc ul {
	padding-left: 10px;
}
.finace-desc table {
	width: 100%;
}
.finance-title {
	margin-top: 10px !important;
}
.finace-desc {
	margin-top: 15px;
}
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .left {
    padding-right: 0;
  }

  .right {
    padding-left: 0;
  }
}
