:root {
  --ink: #121821;
  --muted: #667085;
  --line: #dfe4ea;
  --paper: #fbfcfd;
  --panel: rgba(255, 255, 255, 0.9);
  --deep: #172033;
  --accent: #0f9f78;
  --accent-2: #c9a64b;
  --shadow: 0 24px 70px rgba(24, 32, 48, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  font-family: "Inter", Arial, sans-serif;
  background:
    linear-gradient(135deg, rgba(15, 159, 120, 0.08), transparent 32%),
    linear-gradient(315deg, rgba(201, 166, 75, 0.1), transparent 28%),
    #f5f7f9;
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(1240px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0 20px;
}

.topbar,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-kicker,
.eyebrow,
.bank-label {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand strong {
  display: block;
  margin-top: 4px;
  font-size: 1.35rem;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(340px, 0.76fr) minmax(540px, 1.24fr);
  gap: 20px;
  margin-top: 28px;
}

.control-panel,
.results-panel {
  border: 1px solid rgba(223, 228, 234, 0.9);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.control-panel {
  padding: 26px;
}

.results-panel {
  overflow: hidden;
}

.panel-head h1,
.results-head h2 {
  margin: 8px 0 0;
  letter-spacing: 0;
}

.panel-head h1 {
  max-width: 460px;
  font-size: clamp(1.75rem, 3vw, 2.7rem);
  line-height: 1.04;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 24px 0 18px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f1f4f7;
}

.mode-button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 800;
  background: transparent;
  cursor: pointer;
}

.mode-button.active {
  color: #fff;
  background: linear-gradient(135deg, #121821, #24463f);
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.16);
}

.calculator {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
  color: #344054;
  font-weight: 700;
}

.money-input,
select {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.money-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  color: var(--muted);
}

input,
select {
  color: var(--ink);
}

input {
  width: 100%;
  border: 0;
  outline: 0;
  font-weight: 800;
  background: transparent;
}

select {
  appearance: none;
  padding: 0 44px 0 16px;
  font-weight: 800;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 22px)
      24px / 6px 6px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 16px)
      24px / 6px 6px no-repeat,
    #fff;
}

.money-input:focus-within,
select:focus {
  border-color: rgba(15, 159, 120, 0.72);
  box-shadow: 0 0 0 4px rgba(15, 159, 120, 0.1);
}

.bank-card {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 112px;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid rgba(18, 24, 33, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.72)),
    repeating-linear-gradient(90deg, rgba(18, 24, 33, 0.04) 0 1px, transparent 1px 18px);
}

.bank-logo {
  display: grid;
  place-items: center;
  width: min(210px, 52%);
  min-width: 150px;
  max-width: 230px;
  height: 72px;
  flex: 0 0 auto;
}

.bank-logo img {
  display: block;
  max-width: 100%;
  max-height: 72px;
  object-fit: contain;
}

.bank-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.25rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.summary-grid div {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.summary-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 0.94rem;
}

.results-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 26px 18px;
}

.selected-bank {
  padding: 9px 12px;
  border: 1px solid rgba(15, 159, 120, 0.2);
  border-radius: 999px;
  color: #0d7f61;
  font-size: 0.85rem;
  font-weight: 800;
  background: rgba(15, 159, 120, 0.08);
  white-space: nowrap;
}

.table-wrap {
  overflow-x: auto;
  padding: 0 26px 24px;
}

table {
  width: 100%;
  min-width: 600px;
  border-collapse: separate;
  border-spacing: 0 8px;
}

th {
  color: var(--muted);
  font-size: 0.76rem;
  text-align: left;
  text-transform: uppercase;
}

th,
td {
  padding: 13px 14px;
}

tbody tr {
  background: #fff;
  box-shadow: 0 1px 0 rgba(18, 24, 33, 0.06);
}

tbody td:first-child {
  border-radius: 8px 0 0 8px;
  font-weight: 800;
}

tbody td:last-child {
  border-radius: 0 8px 8px 0;
}

td {
  color: #344054;
  font-weight: 700;
}

td:nth-child(2) {
  color: #0d7f61;
}

td:nth-child(3),
td:nth-child(4) {
  color: var(--ink);
}

.notice {
  margin: 0;
  padding: 14px 26px 24px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.footer {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer strong {
  color: var(--ink);
}

@media (max-width: 960px) {
  .workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 16px, 1240px);
    padding-top: 14px;
  }

  .topbar,
  .footer,
  .results-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .control-panel,
  .results-head,
  .table-wrap,
  .notice {
    padding-left: 14px;
    padding-right: 14px;
  }

  .control-panel {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .workspace {
    gap: 14px;
    margin-top: 18px;
  }

  .brand strong {
    font-size: 1.22rem;
  }

  .mode-switch {
    gap: 5px;
    margin: 18px 0 16px;
  }

  .mode-button {
    min-height: 42px;
    font-size: 0.92rem;
  }

  .money-input,
  select {
    min-height: 54px;
  }

  .bank-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    padding: 14px;
  }

  .bank-logo {
    width: 100%;
    max-width: 240px;
    height: 66px;
  }

  .bank-logo img {
    max-height: 66px;
  }

  .bank-card strong {
    font-size: 1.12rem;
  }

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

  .panel-head h1 {
    font-size: 1.72rem;
    line-height: 1.08;
  }

  .table-wrap {
    overflow: visible;
  }

  table,
  thead,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  table {
    border-spacing: 0;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  tbody tr {
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  th,
  td {
    padding: 0;
  }

  tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 32px;
    border-radius: 0;
    font-size: 0.9rem;
    text-align: right;
  }

  tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    text-align: left;
  }

  tbody td:first-child,
  tbody td:last-child {
    border-radius: 0;
  }
}
