:root {
  --color-ink: #12263f;
  --color-ink-soft: #5a6a7c;
  --color-brand: #12385b;
  --color-brand-strong: #0c2941;
  --color-brand-soft: #e8eef4;
  --color-accent: #c6a45c;
  --color-accent-soft: #f6efdf;
  --color-surface: #ffffff;
  --color-surface-alt: #f4f7f9;
  --color-line: #d9e1e8;
  --color-success: #27644b;
  --color-success-soft: #e6f2ec;
  --color-danger: #8a3135;
  --color-danger-soft: #f7e7e8;
  --shadow-card: 0 20px 40px rgba(18, 38, 63, 0.08);
  --shadow-soft: 0 10px 24px rgba(18, 38, 63, 0.06);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --site-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--color-ink);
  background:
    radial-gradient(circle at top left, rgba(198, 164, 92, 0.16), transparent 30%),
    linear-gradient(180deg, #eff3f6 0%, #f8fafb 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

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

#app {
  min-height: 100vh;
}

.site-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(248, 250, 251, 0.88);
  border-bottom: 1px solid rgba(18, 38, 63, 0.08);
}

.site-header-inner,
.site-section,
.application-shell,
.processing-shell {
  width: min(var(--site-width), calc(100% - 32px));
  margin: 0 auto;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
}

.brand-mark {
  display: grid;
  gap: 4px;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  color: var(--color-ink-soft);
}

.brand-title,
.brand-subtitle,
.hero-copy h1,
.section-heading,
.card h3,
.card h4,
.processing-card h2,
.page-title {
  margin: 0;
}

.brand-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
}

.brand-subtitle {
  color: var(--color-ink-soft);
}

.header-actions,
.button-row,
.inline-list,
.detail-row,
.account-header,
.row-between,
.list-item,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero {
  padding: 54px 0 26px;
}

.hero-grid,
.application-layout,
.grid,
.topbar {
  display: grid;
  gap: 22px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(360px, 0.8fr);
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.card,
.processing-card,
.summary-card,
.decision-card {
  border: 1px solid rgba(18, 38, 63, 0.08);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
}

.hero-copy {
  padding: 42px;
  background:
    linear-gradient(135deg, rgba(12, 41, 65, 0.98) 0%, rgba(18, 56, 91, 0.98) 100%),
    var(--color-brand);
  color: #f6f9fb;
}

.hero-copy h1 {
  max-width: 12ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 5vw, 4.7rem);
  line-height: 0.96;
}

.hero-copy p {
  max-width: 52ch;
  margin: 18px 0 0;
  color: rgba(246, 249, 251, 0.82);
  line-height: 1.65;
}

.hero-panel {
  padding: 34px;
}

.hero-panel .summary-stat {
  padding: 18px 0;
  border-bottom: 1px solid var(--color-line);
}

.hero-panel .summary-stat:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.hero-panel strong {
  display: block;
  font-size: 1.8rem;
}

.site-section {
  padding: 18px 0 12px;
}

.section-head {
  margin-bottom: 18px;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--color-ink-soft);
}

.section-heading {
  font-size: 1.5rem;
}

.grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  padding: 24px;
}

.card.soft {
  background: var(--color-surface-alt);
  box-shadow: var(--shadow-soft);
}

.card h3 {
  font-size: 1.12rem;
}

.card p,
.summary-card p,
.decision-card p,
.processing-card p {
  color: var(--color-ink-soft);
  line-height: 1.6;
}

.pill,
.micro-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border-radius: 999px;
  font-size: 0.92rem;
}

.pill {
  padding: 7px 12px;
  background: var(--color-surface-alt);
  color: var(--color-ink-soft);
}

.pill.success {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.pill.warning {
  background: var(--color-accent-soft);
  color: #7d5d19;
}

.pill.danger {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

.micro-pill {
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(246, 249, 251, 0.82);
}

.stats-strip {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.stats-strip .card {
  background: rgba(255, 255, 255, 0.78);
}

.metric {
  display: grid;
  gap: 10px;
}

.metric strong {
  font-size: 1.8rem;
}

.rate-panel {
  display: grid;
  gap: 14px;
}

.rate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--color-line);
}

.rate-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.application-shell,
.processing-shell {
  padding: 36px 0 60px;
}

.application-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  align-items: start;
}

.summary-card,
.decision-card,
.processing-card {
  padding: 28px;
}

.summary-card,
.decision-card {
  position: sticky;
  top: 98px;
}

.decision-card {
  margin-bottom: 18px;
}

.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.93rem;
  color: var(--color-ink-soft);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--color-line);
  border-radius: 14px;
  background: #ffffff;
}

.field textarea {
  min-height: 120px;
  padding: 14px;
  resize: vertical;
}

.budget-section {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
}

.budget-section h4,
.budget-section p {
  margin: 0;
}

.field-hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--color-ink-soft);
}

.helper-text,
.muted {
  color: var(--color-ink-soft);
}

.summary-list,
.stack,
.list {
  display: grid;
  gap: 14px;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-line);
}

.summary-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.progress-track {
  height: 12px;
  border-radius: 999px;
  background: #dfe7ee;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-brand) 0%, var(--color-accent) 100%);
  transition: width 180ms linear;
}

.countdown {
  font-size: clamp(2.8rem, 7vw, 4.3rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.bank-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 24px;
  background: linear-gradient(180deg, var(--color-brand-strong) 0%, var(--color-brand) 100%);
  color: #f7fafc;
}

.sidebar-copy {
  margin: 10px 0 0;
  color: rgba(247, 250, 252, 0.76);
  line-height: 1.55;
}

.sidebar-nav {
  display: grid;
  gap: 10px;
}

.nav-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.nav-button:hover,
.nav-button:focus-visible,
.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.nav-button.active {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(198, 164, 92, 0.92);
}

.sidebar-footer {
  display: grid;
  gap: 8px;
  color: rgba(247, 250, 252, 0.76);
}

.sidebar-footer strong {
  color: #ffffff;
}

.main-panel {
  padding: 28px;
}

.topbar {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  align-items: start;
  margin-bottom: 22px;
}

.page-title {
  font-size: 2rem;
  line-height: 1.06;
}

.page-subtitle {
  margin: 8px 0 0;
  color: var(--color-ink-soft);
}

.customer-chip {
  padding: 18px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
}

.customer-chip strong,
.customer-chip span {
  display: block;
}

.customer-chip span {
  margin-top: 4px;
  color: var(--color-ink-soft);
}

.page-content {
  display: grid;
  gap: 20px;
}

.stat-card {
  display: grid;
  gap: 8px;
}

.stat-label {
  color: var(--color-ink-soft);
}

.stat-value {
  font-size: 1.9rem;
  font-weight: 700;
}

.account-card {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}

.account-name {
  margin: 0;
  font-size: 1.1rem;
}

.amount {
  font-weight: 700;
}

.amount.large {
  font-size: 1.85rem;
}

.list {
  width: 100%;
}

.list-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--color-line);
}

.list-item:first-child {
  padding-top: 0;
}

.list-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.list-item-copy {
  display: grid;
  gap: 4px;
}

.list-item-copy p {
  margin: 0;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--color-line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--color-ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
}

tr:last-child td {
  border-bottom: 0;
}

.message-item,
.document-card,
.policy-card {
  display: grid;
  gap: 8px;
}

.message-item {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-line);
}

.message-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.policy-card {
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
}

.empty-state {
  padding: 28px;
  border: 1px dashed var(--color-line);
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--color-ink-soft);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--color-brand);
  color: #ffffff;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease, background-color 120ms ease;
}

.button.secondary {
  background: #e7edf2;
  color: var(--color-ink);
}

.button.ghost {
  background: transparent;
  color: var(--color-ink);
  border: 1px solid var(--color-line);
}

.button.accent {
  background: var(--color-accent);
  color: #2c220e;
}

.button.danger {
  background: var(--color-danger);
}

.button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.site-footer {
  width: min(var(--site-width), calc(100% - 32px));
  margin: 26px auto 0;
  padding: 20px 0 32px;
  border-top: 1px solid rgba(18, 38, 63, 0.08);
  justify-content: center;
  color: var(--color-ink-soft);
}

.footer-credit {
  min-width: 220px;
}

@media (max-width: 1180px) {
  .hero-grid,
  .application-layout,
  .topbar {
    grid-template-columns: 1fr;
  }

  .grid,
  .grid.two,
  .grid.three,
  .stats-strip {
    grid-template-columns: 1fr;
  }

  .summary-card,
  .decision-card {
    position: static;
  }
}

@media (max-width: 940px) {
  .bank-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding-bottom: 24px;
  }

  .sidebar-nav {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    overflow-x: auto;
  }

  .main-panel {
    padding: 18px;
  }
}

@media (max-width: 720px) {
  .site-header-inner,
  .header-actions,
  .button-row,
  .inline-list,
  .detail-row,
  .account-header,
  .row-between,
  .list-item,
  .site-footer {
    flex-direction: column;
    align-items: center;
  }

  .hero {
    padding-top: 34px;
  }

  .hero-copy,
  .hero-panel,
  .card,
  .summary-card,
  .decision-card,
  .processing-card {
    padding: 22px;
  }

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

  .sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  th,
  td {
    padding: 12px 8px;
  }
}
