:root {
  --green: #16ba3a;
  --green-dark: #0c9c2d;
  --bank-color: #69b641;
  --bank-dark: #34781f;
  --green-soft: #d9f8df;
  --line: #e8ecf2;
  --text: #202838;
  --muted: #8d97a8;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18px 18px, color-mix(in srgb, var(--bank-color) 8%, transparent) 1px, transparent 1px),
    #fff;
  background-size: 28px 28px;
}

body.modal-open {
  overflow: hidden;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  padding: 24px 72px 28px;
  overflow-x: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: block;
}

.brand img {
  display: block;
  width: min(300px, 42vw);
  height: auto;
}

.eyebrow {
  margin: 0 0 4px;
  color: #9aa4b5;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.1;
  text-transform: uppercase;
}

.security-card {
  display: flex;
  align-items: center;
  gap: 22px;
  width: min(670px, 100%);
  margin: 22px 0 2px;
  padding: 26px 30px;
  color: var(--text);
  text-align: left;
  border: 0;
  border-left: 8px solid #ef2b2d;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
  cursor: pointer;
}

.security-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.13);
}

.security-icon {
  display: grid;
  flex: 0 0 auto;
  width: 88px;
  height: 88px;
  place-items: center;
  font-size: 42px;
  border-radius: 18px;
  background: #fff0f1;
}

.security-card strong {
  display: block;
  color: #9e1d20;
  font-size: 30px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.security-card small {
  display: block;
  margin-top: 2px;
  color: #4a5567;
  font-size: 23px;
  font-weight: 700;
}

.layout {
  display: grid;
  grid-template-columns: minmax(360px, 39%) 1fr;
  gap: 32px;
  padding-top: 20px;
}

.panel,
.table-section,
.layout,
.topbar,
.form-card {
  min-width: 0;
}

.tabs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.tab {
  min-width: 0;
  min-height: 68px;
  color: #3c4453;
  font: inherit;
  font-size: 22px;
  font-weight: 900;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f7f7fa;
  box-shadow: 0 6px 24px rgba(16, 24, 40, 0.04);
}

.tab.active {
  color: #fff;
  border-color: var(--bank-color);
  background: linear-gradient(180deg, var(--bank-color), var(--bank-dark));
}

.form-card {
  padding: 28px 22px 26px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--bank-color);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(18, 125, 48, 0.08);
}

.field {
  display: grid;
  gap: 12px;
  color: #586475;
  font-size: 23px;
  font-weight: 750;
}

.input-wrap,
.bank-select-button {
  width: 100%;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfdff;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.02);
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
  color: #9aa4b5;
}

input,
.bank-select-button {
  color: #202838;
  font: inherit;
  font-size: 22px;
  font-weight: 850;
  outline: none;
}

input {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
}

.bank-select {
  position: relative;
  z-index: 5;
}

.bank-select-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-color: color-mix(in srgb, var(--bank-color) 70%, white);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--bank-color) 18%, transparent);
  cursor: pointer;
}

.chevron {
  color: #9aa4b5;
  font-size: 24px;
  line-height: 1;
}

.bank-select-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  display: none;
  overflow: hidden;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--bank-color) 45%, white);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 50px color-mix(in srgb, var(--bank-color) 18%, transparent);
}

.bank-select.open .bank-select-menu {
  display: grid;
  gap: 4px;
}

.bank-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 8px 12px;
  color: #202838;
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  text-align: left;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.bank-option img {
  width: 92px;
  height: 34px;
  object-fit: contain;
  object-position: left center;
}

.bank-option:hover,
.bank-option.active {
  color: #fff;
  background: linear-gradient(180deg, var(--bank-color), var(--bank-dark));
}

.divider {
  height: 1px;
  margin: 20px 0 24px;
  background: var(--line);
}

.logo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(420px, 60%);
  min-width: 300px;
  min-height: 132px;
  margin: 24px auto 0;
  border: 1px solid color-mix(in srgb, var(--bank-color) 70%, white);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 16px 44px color-mix(in srgb, var(--bank-color) 14%, transparent);
}

.logo-card img {
  display: block;
  max-width: 82%;
  max-height: 82px;
  object-fit: contain;
}

.table-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

h2 {
  font-size: 28px;
}

.table-title strong {
  color: var(--bank-color);
  font-size: 20px;
}

.payment-table {
  overflow: hidden;
  width: 100%;
  min-height: 0;
  border: 1px solid color-mix(in srgb, var(--bank-color) 68%, white);
  border-radius: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--bank-color) 20%, white), rgba(245, 252, 247, 0.88));
  box-shadow: 0 24px 70px color-mix(in srgb, var(--bank-color) 15%, transparent);
}

.table-head,
.payment-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1.1fr;
  align-items: center;
}

.table-head {
  min-height: 60px;
  padding: 0 28px;
  color: #778091;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.72);
}

.table-head span:nth-child(2),
.payment-row span:nth-child(2) {
  text-align: center;
}

.table-head span:last-child,
.payment-row span:last-child {
  text-align: right;
}

.payment-row {
  min-height: 58px;
  padding: 0 28px;
  font-size: 19px;
  font-weight: 800;
  border-top: 1px solid color-mix(in srgb, var(--bank-color) 18%, transparent);
  background: rgba(255, 255, 255, 0.26);
}

footer {
  display: grid;
  justify-items: end;
  margin-top: 18px;
  color: #979797;
  font-size: 18px;
  font-weight: 600;
}

footer strong {
  font-weight: 950;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(18, 24, 38, 0.68);
  backdrop-filter: blur(5px);
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  position: relative;
  width: min(720px, 100%);
  max-height: min(92vh, 920px);
  overflow: auto;
  padding: 40px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.modal-close {
  position: absolute;
  top: 22px;
  right: 22px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #4b5563;
  font: inherit;
  font-size: 28px;
  font-weight: 850;
  border: 0;
  border-radius: 999px;
  background: #f1f3f7;
  cursor: pointer;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.modal-title span {
  font-size: 28px;
}

.modal-title h2,
.commitment-modal h2 {
  font-size: 25px;
}

.warning-modal h3 {
  margin: 24px 0 12px;
  font-size: 16px;
}

.warning-modal p,
.warning-modal li,
.commitment-text,
.legal-box {
  color: #374151;
  font-size: 15px;
  line-height: 1.65;
}

.danger-box,
.notice-box,
.scenario-box,
.legal-box {
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: 10px;
}

.danger-box {
  color: #9e1d20;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.55;
  text-transform: uppercase;
  border-left: 4px solid #ef4444;
  background: #fff0f1;
}

.notice-box {
  color: #943d0d;
  border-left: 4px solid #f59e0b;
  background: #fff8e5;
}

.notice-box strong,
.scenario-box strong {
  display: block;
  margin-bottom: 10px;
}

.notice-box ul,
.scenario-box ul {
  margin: 0;
  padding-left: 20px;
}

.notice-box li + li,
.scenario-box li + li {
  margin-top: 6px;
}

.scenario-box {
  border: 1px solid #dfe5ee;
  background: #f9fafb;
}

.scenario-box li::marker {
  color: #ef4444;
}

.warning-line {
  margin-top: 22px;
  color: #d97706 !important;
  font-weight: 850;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.primary-action,
.danger-action,
.dark-action {
  min-height: 48px;
  padding: 0 28px;
  color: #fff;
  font: inherit;
  font-weight: 850;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.primary-action {
  background: #2563eb;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.commitment-modal {
  width: min(820px, 100%);
}

.commitment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid #dce3ee;
}

.commitment-header img {
  display: block;
  width: 190px;
  height: auto;
}

.commitment-header strong {
  color: #465266;
  font-size: 14px;
}

.commitment-modal h2 {
  margin: 20px 0;
  text-transform: uppercase;
}

.commitment-table {
  display: grid;
  border: 1px solid #cbd5e1;
}

.commitment-table div {
  display: grid;
  grid-template-columns: 28% 1fr;
}

.commitment-table div + div {
  border-top: 1px solid #cbd5e1;
}

.commitment-table strong,
.commitment-table span {
  min-height: 38px;
  padding: 10px 12px;
  font-size: 14px;
}

.commitment-table strong {
  background: #eef2f7;
}

.commitment-table span {
  border-left: 1px solid #cbd5e1;
}

.commitment-text {
  margin-top: 22px;
}

.legal-box {
  color: #b91c1c;
  font-weight: 750;
  border-left: 4px solid #ef4444;
  background: #fff1f2;
}

.legal-box strong {
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.signature-grid {
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: 32px;
  margin-top: 28px;
}

.identity-lines p {
  margin: 0 0 10px;
  color: #1f2937;
  font-size: 14px;
  font-weight: 650;
}

.signature-box {
  display: grid;
  min-height: 120px;
  place-items: center;
  align-content: center;
  gap: 30px;
  color: #3f4a5d;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
}

.signature-box span {
  color: #8fa0b8;
  font-size: 12px;
}

.commitment-actions {
  justify-content: center;
}

.danger-action {
  background: #dc2626;
}

.dark-action {
  background: #111827;
}

@media print {
  body * {
    visibility: hidden;
  }

  #commitmentModal,
  #commitmentModal * {
    visibility: visible;
  }

  #commitmentModal {
    position: static;
    display: block !important;
    padding: 0;
    background: #fff;
  }

  #commitmentModal .modal-card {
    width: 100%;
    max-height: none;
    overflow: visible;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .modal-close,
  .commitment-actions {
    display: none !important;
  }
}

@media (max-width: 1180px) {
  .app-shell {
    padding: 22px 36px 28px;
  }

  .layout {
    grid-template-columns: minmax(320px, 36%) 1fr;
    gap: 24px;
  }

  .payment-row {
    font-size: 18px;
  }
}

@media (max-width: 980px) {
  .app-shell {
    padding: 10px;
  }

  .brand img {
    width: min(170px, 52vw);
  }

  .layout {
    display: grid;
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .security-card {
    width: 100%;
    gap: 12px;
    margin-top: 14px;
    padding: 13px 12px;
    border-left-width: 6px;
    border-radius: 15px;
  }

  .security-icon {
    width: 46px;
    height: 46px;
    font-size: 25px;
    border-radius: 12px;
  }

  .security-card strong {
    font-size: 18px;
  }

  .security-card small {
    font-size: 13px;
  }

  .tabs {
    gap: 7px;
    margin-bottom: 14px;
  }

  .tab {
    min-height: 46px;
    padding: 0 6px;
    font-size: 14px;
    border-radius: 12px;
  }

  .form-card {
    padding: 15px 12px;
    border-radius: 15px;
  }

  .field {
    gap: 9px;
    font-size: 15px;
  }

  .input-wrap,
  .bank-select-button {
    height: 52px;
    border-radius: 12px;
  }

  input,
  .bank-select-button {
    font-size: 16px;
  }

  .input-wrap {
    gap: 14px;
    padding: 0 14px;
  }

  .divider {
    margin: 14px 0 18px;
  }

  .logo-card {
    width: 100%;
    min-width: 0;
    min-height: 96px;
    margin-top: 18px;
    border-radius: 18px;
  }

  .logo-card img {
    max-height: 58px;
  }

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

  .signature-box {
    min-height: 110px;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 10px;
  }

  .brand img {
    width: min(170px, 52vw);
  }

  .eyebrow {
    font-size: 13px;
  }

  h1 {
    font-size: 22px;
  }

  .security-card {
    gap: 12px;
    margin-top: 14px;
    padding: 13px 12px;
    border-left-width: 6px;
    border-radius: 15px;
  }

  .security-icon {
    width: 46px;
    height: 46px;
    font-size: 25px;
    border-radius: 12px;
  }

  .security-card strong {
    font-size: 18px;
  }

  .security-card small {
    font-size: 13px;
  }

  .tabs {
    gap: 7px;
    margin-bottom: 14px;
  }

  .tab {
    min-height: 46px;
    padding: 0 6px;
    font-size: 14px;
    border-radius: 12px;
  }

  .form-card {
    padding: 15px 12px;
    border-radius: 15px;
  }

  .field {
    gap: 9px;
    font-size: 15px;
  }

  .input-wrap,
  .bank-select-button {
    height: 52px;
    border-radius: 12px;
  }

  input,
  .bank-select-button {
    font-size: 16px;
  }

  .input-wrap {
    gap: 14px;
    padding: 0 14px;
  }

  .divider {
    margin: 14px 0 18px;
  }

  .bank-option {
    min-height: 46px;
    font-size: 15px;
  }

  .bank-option img {
    width: 74px;
    height: 28px;
  }

  .logo-card {
    min-height: 96px;
    margin-top: 18px;
    border-radius: 18px;
  }

  .logo-card img {
    max-height: 58px;
  }

  h2 {
    font-size: 19px;
  }

  .table-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
  }

  .table-title strong {
    font-size: 16px;
  }

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

  .table-head,
  .payment-row {
    grid-template-columns: 70px minmax(92px, 1fr) minmax(98px, 1fr);
    min-width: 0;
    width: 100%;
  }

  .table-head {
    min-height: 42px;
    padding: 0 8px;
    font-size: 10px;
  }

  .payment-row {
    min-height: 46px;
    padding: 0 8px;
    font-size: 12.5px;
  }

  footer {
    justify-items: center;
    margin-top: 14px;
    font-size: 13px;
    text-align: center;
  }

  .modal-backdrop {
    align-items: stretch;
    padding: 10px;
  }

  .modal-card {
    max-height: calc(100vh - 20px);
    padding: 26px 18px;
    border-radius: 18px;
  }

  .modal-close {
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    font-size: 24px;
  }

  .modal-title {
    gap: 10px;
    padding-right: 42px;
  }

  .modal-title h2,
  .commitment-modal h2 {
    font-size: 19px;
  }

  .danger-box,
  .notice-box,
  .scenario-box,
  .legal-box {
    margin-top: 18px;
    padding: 14px;
  }

  .danger-box {
    font-size: 14px;
  }

  .warning-modal p,
  .warning-modal li,
  .commitment-text,
  .legal-box {
    font-size: 13px;
  }

  .modal-actions {
    justify-content: stretch;
    flex-direction: column;
  }

  .primary-action,
  .danger-action,
  .dark-action {
    width: 100%;
  }

  .commitment-header {
    align-items: flex-start;
    flex-direction: column;
    padding-right: 42px;
  }

  .commitment-header img {
    width: 150px;
  }

  .commitment-table div {
    grid-template-columns: 1fr;
  }

  .commitment-table span {
    border-left: 0;
    border-top: 1px solid #cbd5e1;
    word-break: break-word;
  }

  .identity-lines p {
    font-size: 13px;
  }
}

/* Premium compact pass */
:root {
  --surface: rgba(255, 255, 255, 0.94);
  --surface-strong: #ffffff;
  --shadow-soft: 0 10px 34px rgba(15, 23, 42, 0.08);
  --shadow-tight: 0 6px 18px rgba(15, 23, 42, 0.06);
}

body {
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 82% 12%, color-mix(in srgb, var(--bank-color) 10%, transparent), transparent 28%),
    #f8fafc;
  background-size: 64px 64px, 64px 64px, auto, auto;
}

.app-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 18px 40px 22px;
}

.topbar {
  padding: 12px 0 18px;
  border-bottom-color: rgba(148, 163, 184, 0.22);
}

.brand img {
  width: min(220px, 36vw);
}

.security-card {
  width: min(560px, 100%);
  gap: 14px;
  margin: 18px 0 0;
  padding: 16px 18px;
  border-left-width: 5px;
  border-radius: 12px;
  box-shadow: var(--shadow-tight);
}

.security-icon {
  width: 48px;
  height: 48px;
  font-size: 24px;
  border-radius: 12px;
}

.security-card strong {
  font-size: 18px;
  letter-spacing: 0.02em;
}

.security-card small {
  margin-top: 1px;
  font-size: 13px;
}

.layout {
  grid-template-columns: minmax(310px, 360px) minmax(0, 1fr);
  gap: 22px;
  padding-top: 18px;
}

.tabs {
  gap: 8px;
  margin-bottom: 12px;
}

.tab {
  min-height: 46px;
  font-size: 14px;
  border-radius: 10px;
  box-shadow: none;
}

.form-card,
.payment-table {
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.form-card {
  padding: 18px;
}

.field {
  gap: 8px;
  font-size: 14px;
}

.input-wrap,
.bank-select-button {
  height: 50px;
  border-radius: 10px;
}

.input-wrap {
  gap: 12px;
  padding: 0 14px;
}

input,
.bank-select-button {
  font-size: 15px;
}

.divider {
  margin: 16px 0;
}

.bank-select-menu {
  border-radius: 12px;
  box-shadow: 0 16px 34px color-mix(in srgb, var(--bank-color) 16%, transparent);
}

.bank-option {
  min-height: 44px;
  font-size: 13px;
  border-radius: 8px;
}

.bank-option img {
  width: 72px;
  height: 26px;
}

.logo-card {
  width: 100%;
  min-width: 0;
  min-height: 98px;
  margin-top: 16px;
  border-radius: 14px;
  box-shadow: var(--shadow-tight);
}

.logo-card img {
  max-height: 56px;
}

.table-title {
  margin-bottom: 10px;
}

h2 {
  font-size: 20px;
}

.table-title strong {
  font-size: 14px;
}

.payment-table {
  border-color: color-mix(in srgb, var(--bank-color) 40%, #e2e8f0);
  background: linear-gradient(135deg, color-mix(in srgb, var(--bank-color) 10%, white), rgba(255, 255, 255, 0.92));
}

.table-head {
  min-height: 44px;
  padding: 0 18px;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.payment-row {
  min-height: 46px;
  padding: 0 18px;
  font-size: 14px;
}

footer {
  margin-top: 14px;
  font-size: 12px;
}

.modal-card {
  border-radius: 16px;
  padding: 28px;
}

.modal-title h2,
.commitment-modal h2 {
  font-size: 19px;
}

.warning-modal p,
.warning-modal li,
.commitment-text,
.legal-box {
  font-size: 13px;
}

@media (max-width: 980px) {
  .app-shell {
    padding: 12px;
  }

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

@media (max-width: 640px) {
  .topbar {
    gap: 12px;
  }

  .brand img {
    width: min(160px, 52vw);
  }

  .table-head,
  .payment-row {
    grid-template-columns: 64px minmax(98px, 1fr) minmax(104px, 1fr);
  }
}
