:root {
  color-scheme: light;
  --ink: #101827;
  --muted: #6f7480;
  --line: #dfe3e8;
  --line-strong: #ccd3dc;
  --panel: #ffffff;
  --field: #f6f3f4;
  --surface: #fbf7f8;
  --navy: #061527;
  --green: #079447;
  --green-soft: #dff8ea;
  --orange: #ff6b00;
  --red: #df1f26;
  font-family:
    Inter, Pretendard, "Segoe UI", "Noto Sans KR", system-ui, -apple-system,
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: #f6f8fa;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.documents-shell {
  width: 100%;
  min-height: 100vh;
  background: #f6f8fa;
}

.documents-topline {
  display: grid;
  min-height: 78px;
  place-items: center;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.documents-topline h1 {
  font-size: 1.26rem;
  font-weight: 950;
  letter-spacing: 0;
}

.documents-panel {
  display: grid;
  gap: 18px;
  width: min(100% - 48px, 760px);
  margin: 24px auto 40px;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--panel);
  box-shadow: 0 1px 4px rgba(16, 24, 39, 0.08);
}

.page-heading,
.title-row,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.page-heading {
  align-items: flex-start;
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
}

.page-heading h2 {
  font-size: 1.45rem;
  line-height: 1.12;
  font-weight: 950;
  letter-spacing: 0;
}

.progress-steps {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
}

.progress-step {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  white-space: nowrap;
}

.progress-step + .progress-step::before {
  position: absolute;
  right: calc(100% + 7px);
  width: 12px;
  height: 1px;
  background: var(--line);
  content: "";
}

.progress-number,
.step-badge {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-size: 0.78rem;
}

.progress-step.active {
  color: var(--green);
}

.progress-step.active .progress-number,
.step-badge {
  border-color: rgba(7, 148, 71, 0.34);
  color: var(--green);
  background: var(--green-soft);
}

.documents-form,
.form-section,
.additional-info,
.section-intro,
.bank-list-panel,
.bank-list,
.bank-group,
.upload-card,
.step-actions {
  display: grid;
}

.documents-form {
  gap: 16px;
}

.form-section {
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.form-section[hidden],
.bank-list-panel[hidden] {
  display: none;
}

.section-heading {
  justify-content: flex-start;
}

.section-heading h2 {
  font-size: 1.08rem;
  line-height: 1.2;
}

.section-intro {
  gap: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.section-intro strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.readonly-card {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--field);
}

.readonly-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 40px;
  padding: 10px 13px;
}

.readonly-row + .readonly-row {
  border-top: 1px solid var(--line);
}

.readonly-row span,
.bank-list-head span,
.file-preview small {
  color: var(--muted);
  font-size: 0.84rem;
}

.readonly-row strong {
  line-height: 1.35;
  font-weight: 900;
}

.additional-info {
  gap: 14px;
}

.additional-info h3 {
  font-size: 0.98rem;
}

label,
.field-group {
  display: grid;
  gap: 8px;
  color: #333943;
  font-size: 0.94rem;
  font-weight: 850;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--field);
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(7, 148, 71, 0.12);
}

.field-group {
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

.field-group legend {
  padding: 0;
}

.address-fields {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.address-row {
  display: grid;
  grid-template-columns: minmax(96px, 132px) 96px;
  gap: 8px;
  justify-content: start;
}

.address-row input {
  text-align: center;
}

.bank-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

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

.bank-field > label {
  display: block;
}

.bank-toggle {
  align-self: end;
  min-height: 48px;
  padding: 0 10px;
  font-size: 0.88rem;
  white-space: nowrap;
}

.bank-list-panel {
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(7, 148, 71, 0.2);
  border-radius: 5px;
  background: var(--field);
}

.bank-list-head,
.bank-group {
  gap: 8px;
}

.bank-list-head strong,
.bank-group-title {
  color: var(--green);
  font-weight: 950;
}

.bank-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.bank-option {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 9px;
  color: #333943;
  background: #fff;
  font-size: 0.84rem;
  font-weight: 900;
}

.bank-option:hover,
.bank-option:focus,
.bank-option.selected {
  border-color: var(--green);
  outline: none;
  box-shadow: 0 0 0 3px rgba(7, 148, 71, 0.12);
}

.bank-option.selected {
  color: var(--green);
  background: var(--green-soft);
}

.secondary-button,
.primary-button,
.remove-file {
  min-height: 48px;
  border-radius: 4px;
  font-weight: 900;
}

.secondary-button {
  border: 1px solid var(--line-strong);
  color: var(--navy);
  background: #fff;
}

.primary-button {
  border: 0;
  color: #fff;
  background: var(--navy);
}

.primary-button:hover {
  background: #10233a;
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.64;
}

.agreement {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.agreement input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 2px;
  accent-color: var(--green);
}

.upload-card {
  gap: 8px;
}

.upload-title {
  color: #333943;
  font-size: 0.94rem;
  font-weight: 900;
}

.upload-title span {
  color: var(--orange);
  font-size: 0.84rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.upload-target {
  display: block;
  cursor: pointer;
}

.file-preview {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 96px;
  padding: 12px;
  border: 1px dashed rgba(7, 148, 71, 0.34);
  border-radius: 5px;
  color: var(--muted);
  background: var(--field);
  font-size: 0.9rem;
}

.file-preview.empty {
  grid-template-columns: 1fr;
  min-height: 128px;
  place-items: center;
  text-align: center;
}

.upload-icon {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin-bottom: 8px;
  border: 1px solid rgba(7, 148, 71, 0.24);
  border-radius: 50%;
  background: var(--green-soft);
}

.upload-icon::before {
  content: "";
  width: 16px;
  height: 16px;
  border-top: 3px solid var(--green);
  border-left: 3px solid var(--green);
  transform: translateY(3px) rotate(45deg);
}

.upload-icon::after {
  position: absolute;
  width: 3px;
  height: 20px;
  border-radius: 999px;
  background: var(--green);
  content: "";
}

.file-preview img,
.file-preview .file-icon {
  width: 82px;
  height: 82px;
  border-radius: 5px;
}

.file-preview img {
  object-fit: cover;
  background: #fff;
}

.file-preview .file-icon {
  display: grid;
  place-items: center;
  color: var(--green);
  background: var(--green-soft);
  font-weight: 950;
}

.file-preview strong {
  display: block;
  color: var(--ink);
  font-weight: 900;
  word-break: break-all;
}

.file-preview small {
  display: block;
  margin-top: 5px;
  line-height: 1.45;
}

.file-preview-body {
  display: grid;
  gap: 10px;
}

.remove-file {
  justify-self: start;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  color: var(--orange);
  background: #fff;
}

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

.step-actions {
  gap: 8px;
}

.step-actions.split {
  grid-template-columns: 0.72fr 1fr;
}

.message {
  min-height: 22px;
  color: var(--muted);
  font-weight: 750;
}

.message.error {
  color: var(--orange);
}

@media (max-width: 679px) {
  body {
    background: #f6f8fa;
  }

  .documents-shell {
    width: 100%;
    margin: 0 auto;
    border: 0;
    border-radius: 0;
    background: #f6f8fa;
    box-shadow: none;
  }

  .documents-topline {
    min-height: 74px;
    border-radius: 0;
    background: #fffafa;
  }

  .documents-panel {
    width: auto;
    margin: 0;
    padding: 18px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .page-heading {
    display: grid;
    gap: 12px;
  }

  .progress-steps {
    gap: 16px;
  }

  .progress-step {
    gap: 4px;
    font-size: 0.72rem;
  }

  .progress-number {
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
  }

  .bank-grid {
    grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
    gap: 7px;
  }

  .bank-grid input {
    padding: 0 10px;
  }

  .bank-toggle {
    padding: 0 7px;
    font-size: 0.78rem;
  }

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

@media (max-width: 420px) {
  .progress-label {
    display: none;
  }

  .progress-steps {
    gap: 12px;
  }

  .progress-step + .progress-step::before {
    right: calc(100% + 5px);
    width: 8px;
  }

  .readonly-row,
  .address-row,
  .bank-options {
    grid-template-columns: 1fr;
  }
}
