﻿.loan-panel {
  overflow: hidden;
}
.loan-calculator {
  --lc-accent: #9b6cff;
  --lc-accent-strong: #7847f2;
  --lc-accent-soft: rgba(155, 108, 255, 0.14);
  --lc-bg: rgba(7, 9, 20, 0.72);
  --lc-surface: rgba(18, 17, 35, 0.72);
  --lc-surface-soft: rgba(255, 255, 255, 0.035);
  --lc-border: rgba(255, 255, 255, 0.1);
  --lc-text: #f5f3ff;
  --lc-muted: #aaa7bd;
  --lc-success: #64d9ae;
  --lc-warning: #f4bf67;
  --lc-danger: #ff718b;
  color: var(--lc-text);
}
.loan-calculator *,
.loan-calculator *::before,
.loan-calculator *::after {
  box-sizing: border-box;
}
.loan-calculator button,
.loan-calculator input,
.loan-calculator select {
  font: inherit;
}
.loan-calculator button {
  cursor: pointer;
}
.loan-calculator button:focus-visible,
.loan-calculator input:focus-visible,
.loan-calculator select:focus-visible {
  outline: 3px solid rgba(155, 108, 255, 0.42);
  outline-offset: 3px;
}
.lc-tool-header {
  margin-bottom: 20px;
  padding: 20px;
  border: 1px solid rgba(155, 108, 255, 0.25);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(45, 27, 91, 0.36), rgba(9, 11, 24, 0.76));
}
.lc-tool-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #d7c8ff;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.lc-tool-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lc-accent);
  box-shadow: 0 0 13px rgba(155, 108, 255, 0.78);
}
.lc-tool-header h2 {
  margin: 9px 0 6px;
  color: #fff;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  letter-spacing: -0.03em;
}
.lc-tool-header p {
  max-width: 690px;
  margin: 0;
  color: var(--lc-muted);
  line-height: 1.55;
}
.lc-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(330px, 0.98fr);
  gap: 20px;
  align-items: start;
}
.lc-card {
  padding: 20px;
  border: 1px solid var(--lc-border);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(27, 22, 49, 0.62), var(--lc-bg));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}
.lc-card-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 19px;
}
.lc-card-icon {
  display: grid;
  width: 33px;
  height: 33px;
  flex: 0 0 33px;
  place-items: center;
  border: 1px solid rgba(155, 108, 255, 0.38);
  border-radius: 10px;
  color: #e8e0ff;
  background: rgba(155, 108, 255, 0.13);
  font-size: 0.9rem;
}
.lc-card-heading h3,
.lc-section-heading h3,
.lc-advanced summary {
  margin: 0;
  color: #f4f1fc;
  font-size: 1rem;
}
.lc-card-heading p {
  margin: 3px 0 0;
  color: var(--lc-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}
.lc-mode-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 19px;
}
.lc-mode-button,
.lc-button,
.lc-text-button {
  min-height: 40px;
  border: 1px solid var(--lc-border);
  border-radius: 10px;
  color: #eeebf8;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.86rem;
  font-weight: 750;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.lc-mode-button:hover,
.lc-button:hover,
.lc-text-button:hover {
  border-color: rgba(155, 108, 255, 0.64);
  background: rgba(155, 108, 255, 0.13);
}
.lc-mode-button.is-active {
  border-color: rgba(155, 108, 255, 0.84);
  color: #fff;
  background: rgba(155, 108, 255, 0.21);
  box-shadow: inset 0 0 0 1px rgba(155, 108, 255, 0.14);
}
.lc-fields {
  display: grid;
  gap: 15px;
}
.lc-field {
  display: grid;
  gap: 7px;
}
.lc-field label,
.lc-field-label {
  color: #e9e5f6;
  font-size: 0.84rem;
  font-weight: 750;
}
.lc-field-note {
  margin: -2px 0 0;
  color: var(--lc-muted);
  font-size: 0.75rem;
  line-height: 1.4;
}
.lc-input-wrap {
  display: flex;
  align-items: center;
  min-height: 44px;
  overflow: hidden;
  border: 1px solid var(--lc-border);
  border-radius: 10px;
  background: rgba(4, 6, 14, 0.58);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.lc-input-wrap:focus-within {
  border-color: rgba(155, 108, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(155, 108, 255, 0.12);
}
.lc-prefix,
.lc-suffix {
  padding: 0 12px;
  color: #bfb9d2;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
}
.lc-input,
.lc-select {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 0;
  outline: 0;
  color: #f7f5ff;
  background: transparent;
}
.lc-input {
  padding: 0 12px;
}
.lc-input-wrap .lc-input {
  padding: 0;
}
.lc-select {
  padding: 0 31px 0 11px;
  appearance: auto;
}
.lc-input::placeholder {
  color: #78748b;
}
.lc-input[type="number"]::-webkit-inner-spin-button,
.lc-input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
}
.lc-term-row,
.lc-inline-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(115px, 0.62fr);
  gap: 10px;
}
.lc-field-error {
  min-height: 1.1em;
  margin: 0;
  color: var(--lc-danger);
  font-size: 0.74rem;
  line-height: 1.3;
}
.lc-advanced {
  margin-top: 18px;
  border-top: 1px solid var(--lc-border);
  border-bottom: 1px solid var(--lc-border);
}
.lc-advanced summary {
  display: flex;
  min-height: 54px;
  align-items: center;
  cursor: pointer;
  font-size: 0.89rem;
  font-weight: 750;
  list-style: none;
}
.lc-advanced summary::-webkit-details-marker {
  display: none;
}
.lc-advanced summary::after {
  content: "+";
  margin-left: auto;
  color: #cdbdff;
  font-size: 1.15rem;
  font-weight: 400;
}
.lc-advanced[open] summary::after {
  content: "−";
}
.lc-advanced-content {
  display: grid;
  gap: 15px;
  padding: 0 0 18px;
}
.lc-mortgage-only {
  display: none;
}
.loan-calculator.is-mortgage .lc-mortgage-only {
  display: grid;
}
.lc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 19px;
}
.lc-button {
  flex: 1 1 140px;
  padding: 10px 14px;
}
.lc-button-primary {
  border-color: rgba(155, 108, 255, 0.85);
  color: #fff;
  background: linear-gradient(135deg, #9565ff, #7144e9);
  box-shadow: 0 8px 20px rgba(102, 59, 226, 0.25);
}
.lc-button-primary:hover {
  border-color: #c3aaff;
  background: linear-gradient(135deg, #a47aff, #7d51ef);
}
.lc-button-danger {
  color: #ffc2cf;
}
.lc-status {
  min-height: 1.3em;
  margin: 13px 1px 0;
  color: var(--lc-muted);
  font-size: 0.82rem;
}
.lc-status.is-success {
  color: var(--lc-success);
}
.lc-status.is-error {
  color: var(--lc-danger);
}
.lc-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.lc-metric {
  min-height: 97px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  background: var(--lc-surface-soft);
}
.lc-metric.is-primary {
  grid-column: 1 / -1;
  border-color: rgba(155, 108, 255, 0.43);
  background: linear-gradient(135deg, rgba(116, 71, 242, 0.22), rgba(255, 255, 255, 0.04));
}
.lc-metric-label {
  display: block;
  color: #aaa5bd;
  font-size: 0.75rem;
}
.lc-metric-value {
  display: block;
  margin-top: 8px;
  color: #f7f4ff;
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.lc-metric.is-primary .lc-metric-value {
  color: #f9f7ff;
  font-size: clamp(1.55rem, 4vw, 2.08rem);
}
.lc-breakdown {
  margin-top: 19px;
  padding-top: 18px;
  border-top: 1px solid var(--lc-border);
}
.lc-breakdown-title {
  margin: 0 0 12px;
  color: #f1edf9;
  font-size: 0.91rem;
}
.lc-breakdown-chart {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}
.lc-breakdown-principal,
.lc-breakdown-interest {
  display: inline-block;
  height: 100%;
  vertical-align: top;
  transition: width 180ms ease;
}
.lc-breakdown-principal {
  width: 50%;
  background: linear-gradient(90deg, #9a6eff, #7850f1);
}
.lc-breakdown-interest {
  width: 50%;
  background: #4ecda5;
}
.lc-breakdown-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--lc-muted);
  font-size: 0.76rem;
}
.lc-breakdown-labels strong {
  display: block;
  margin-top: 3px;
  color: #f2eff9;
  font-size: 0.84rem;
}
.lc-extra-analysis {
  display: none;
  margin-top: 18px;
  padding: 15px;
  border: 1px solid rgba(100, 217, 174, 0.3);
  border-radius: 13px;
  background: rgba(70, 184, 130, 0.075);
}
.lc-extra-analysis.is-visible {
  display: block;
}
.lc-extra-analysis h4 {
  margin: 0 0 12px;
  color: #dcf9e9;
  font-size: 0.9rem;
}
.lc-extra-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.lc-extra-value {
  display: block;
  margin-top: 4px;
  color: #f0fff7;
  font-size: 0.85rem;
  font-weight: 800;
}
.lc-privacy,
.lc-disclaimer {
  margin-top: 19px;
  padding: 15px;
  border-radius: 13px;
  font-size: 0.8rem;
  line-height: 1.5;
}
.lc-privacy {
  border: 1px solid rgba(100, 217, 174, 0.25);
  color: #bcebd0;
  background: rgba(70, 184, 130, 0.075);
}
.lc-privacy strong {
  color: #e0faeb;
}
.lc-disclaimer {
  border: 1px solid var(--lc-border);
  color: var(--lc-muted);
  background: rgba(255, 255, 255, 0.025);
}
.lc-section {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--lc-border);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(27, 22, 49, 0.5), var(--lc-bg));
}
.lc-section-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.lc-section-heading p {
  margin: 4px 0 0;
  color: var(--lc-muted);
  font-size: 0.82rem;
}
.lc-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lc-text-button {
  padding: 8px 11px;
  min-height: 36px;
}
.lc-amortization-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 15px;
}
.lc-amortization-stat {
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 11px;
  background: var(--lc-surface-soft);
}
.lc-amortization-stat span {
  display: block;
  color: #938fa5;
  font-size: 0.72rem;
}
.lc-amortization-stat strong {
  display: block;
  margin-top: 5px;
  color: #f3effb;
  font-size: 0.86rem;
}
.lc-table-wrap {
  overflow: auto;
  max-height: 560px;
  border: 1px solid var(--lc-border);
  border-radius: 12px;
  background: rgba(4, 6, 14, 0.36);
}
.lc-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-size: 0.79rem;
}
.lc-table th,
.lc-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  text-align: right;
  white-space: nowrap;
}
.lc-table th:first-child,
.lc-table td:first-child,
.lc-table th:nth-child(2),
.lc-table td:nth-child(2) {
  text-align: left;
}
.lc-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #ddd5f3;
  background: #171329;
  font-size: 0.73rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.lc-table td {
  color: #c9c4d8;
}
.lc-table tbody tr:last-child td {
  border-bottom: 0;
}
.lc-table tbody tr:hover td {
  background: rgba(155, 108, 255, 0.065);
}
@media (max-width: 800px) {
  .lc-dashboard {
    grid-template-columns: 1fr;
  }
  .lc-amortization-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 510px) {
  .lc-card,
  .lc-section,
  .lc-tool-header {
    padding: 16px;
    border-radius: 14px;
  }
  .lc-term-row,
  .lc-inline-fields,
  .lc-extra-grid {
    grid-template-columns: 1fr;
  }
  .lc-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .lc-button {
    min-width: 0;
  }
  .lc-summary-grid {
    grid-template-columns: 1fr;
  }
  .lc-metric.is-primary {
    grid-column: auto;
  }
  .lc-amortization-summary {
    grid-template-columns: 1fr 1fr;
  }
}
@media print {
  body {
    background: #fff !important;
    color: #111 !important;
  }
  #site-header,
  #site-footer,
  .page-head,
  .lc-settings-card,
  .lc-section-actions,
  .lc-actions,
  .lc-status,
  .lc-privacy,
  .lc-disclaimer {
    display: none !important;
  }
  main,
  .wrap,
  .panel,
  .loan-panel,
  .loan-calculator,
  .lc-card,
  .lc-section {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    color: #111 !important;
    background: #fff !important;
    box-shadow: none !important;
  }
  .lc-tool-header {
    display: block !important;
    margin: 0 0 18px !important;
    padding: 0 !important;
    border: 0 !important;
    color: #111 !important;
    background: #fff !important;
  }
  .lc-tool-header *,
  .lc-card *,
  .lc-section * {
    color: #111 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .lc-dashboard {
    grid-template-columns: 1fr 1fr !important;
    gap: 18px !important;
  }
  .lc-table-wrap {
    max-height: none !important;
    overflow: visible !important;
    border: 0 !important;
  }
  .lc-table {
    min-width: 0 !important;
    font-size: 8pt !important;
  }
  .lc-table th {
    position: static !important;
    border-bottom: 1px solid #555 !important;
  }
  .lc-table th,
  .lc-table td {
    border-bottom: 1px solid #bbb !important;
  }
  .lc-section {
    page-break-inside: avoid;
  }
}
