/* loan/main.css */
.loan_panel {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: calc(var(--space-unit) * 4.5);
}
.summary_header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}
.loan_filters {
  display: grid;
  gap: 8px;
  min-width: 130px;
}
.loan_filter {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  cursor: pointer;
}
.loan_filter input {
  accent-color: #2563eb;
}
.loan_swatch {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}
.chart_section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--panel-border, #d9d1c3);
}
.chart_title_row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  flex-wrap: wrap;
}
.chart_title_row h2 {
  margin: 0;
  font-family: var(--font-display, Georgia, serif);
  font-size: 19px;
  font-weight: 400;
}
.chart_legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 10px;
  color: #887f72;
}
.chart_legend span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}
.chart_legend i {
  display: inline-block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
}
.legend_balance {
  background: #2563eb;
}
.legend_interest {
  background: #d97706;
}
.legend_paid {
  background: #16a34a;
}
.legend_principal {
  background: #2563eb;
}
.legend_bar_interest {
  background: #d97706;
}
.chart_frame {
  width: 100%;
  overflow-x: auto;
  margin-top: 12px;
}
.chart_frame svg {
  display: block;
  width: 100%;
  min-width: 560px;
  height: auto;
}
.chart_grid {
  stroke: #ded8ce;
  stroke-width: 1;
}
.chart_axis {
  stroke: #b9b0a2;
  stroke-width: 1;
}
.chart_line {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart_balance {
  stroke: #2563eb;
}
.chart_interest {
  stroke: #d97706;
}
.chart_paid {
  stroke: #16a34a;
}
.chart_bar_principal {
  fill: #2563eb;
}
.chart_bar_interest {
  fill: #d97706;
}
.chart_axis_label {
  fill: #887f72;
  font: 10px var(--font-mono, monospace);
}
.chart_empty {
  padding: 56px 0;
  text-align: center;
  color: #887f72;
  font-size: 13px;
}
@media (max-width: 620px) {
  .summary_header {
    flex-direction: column;
  }
  .loan_filters {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
    width: 100%;
  }
}

/* loan/theme.css */
:root {
  --color-bg: #F7F4EE;
  --color-ink: #1C2B33;
  --color-ink-soft: #5C6B73;
  --color-hairline: #C9C0AC;
  --color-gold: #B99B5A;
  --color-gold-muted: #8A7B5C;
  --color-panel: #1C2B33;
  --color-panel-text: #F7F4EE;
  --color-panel-text-muted: #C9C0AC;
  --color-panel-border: #3A4A52;
  --color-white: #FFFFFF;
  --color-error-red: #ff8282;
  --font-display: "Georgia", serif;
  --font-mono:
    "IBM Plex Mono",
    "Courier New",
    monospace;
  --font-size-input: 16px;
  --font-size-label: 12px;
  --space-unit: 4px;
  --radius: 4px;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* loan/components/components.css */
.vflexbox_wrapper {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  height: 100%;
  gap: calc(var(--space-unit) * 2);
}
.hflexbox_wrapper {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  width: 100%;
  gap: calc(var(--space-unit) * 2);
}
.vcenter_wrapper {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  height: 100%;
}
.hcenter_wrapper {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  width: 100%;
}
.vcenter_wrapper > .center_flex_stretch,
.hcenter_wrapper > .center_flex_stretch {
  flex: auto;
}
.vcenter_wrapper > .center_flex_fixed,
.hcenter_wrapper > .center_flex_fixed {
  flex: 0;
}
.field_label {
  display: block;
  font-size: var(--font-size-label);
  letter-spacing: 0.05em;
  color: var(--color-ink-soft);
  margin-bottom: calc(var(--space-unit) * 1.5);
}
.numeric_field,
.dropdown_field {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius);
  background: var(--color-white);
  padding: 10px 14px;
}
.numeric_field.invalid {
  background: var(--color-error-red);
}
.numeric_field_prefix {
  margin-right: 6px;
  color: var(--color-gold-muted);
}
.numeric_field_suffix {
  margin-left: 6px;
  color: var(--color-gold-muted);
}
.numeric_field_input,
.dropdown_field_input {
  border: none;
  outline: none;
  width: 100%;
  font-size: var(--font-size-input);
  font-family: var(--font-mono);
  color: var(--color-panel);
  background: transparent;
}
.radio_option {
  display: flex;
  align-items: center;
  gap: calc(var(--space-unit) * 1);
  font-size: var(--font-size-label);
  color: var(--color-ink-soft);
  cursor: pointer;
}
.radio_input {
  accent-color: var(--color-gold-muted);
  cursor: pointer;
}
