:root {
  --bg: #eef1f4;
  --paper: #ffffff;
  --panel: #f7f8fa;
  --ink: #16181b;
  --muted: #5d6670;
  --line: #cfd5db;
  --line-strong: #9da7b1;
  --alert-bg: #f8ecec;
  --alert-line: #b44545;
  --error: #b42318;
  --error-bg: #fff1f1;
  --button: #1f2933;
  --button-hover: #111827;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #e8edf2 0%, #eef1f4 220px, #eef1f4 100%);
  color: var(--ink);
  line-height: 1.5;
}

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.document-shell {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(18, 24, 32, 0.08);
  overflow: hidden;
}

.header {
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafb 100%);
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 700;
}

.intro {
  margin-top: 12px;
  max-width: 760px;
  color: var(--muted);
  font-size: 14px;
}

.local-note {
  margin-top: 16px;
  display: inline-block;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  font-size: 12px;
  color: var(--ink);
  border-radius: 999px;
}

.form-body {
  padding: 28px;
  counter-reset: section-count;
}

.progress-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fafb 0%, #f2f5f7 100%);
}

.translation-notice {
  margin-bottom: 24px;
  padding: 18px;
  border: 2px solid #8aa1b5;
  background: linear-gradient(180deg, #f3f8fc 0%, #edf4f9 100%);
}

.translation-notice-copy strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}

.translation-notice-copy p {
  margin: 0 0 14px;
  font-size: 14px;
  color: #41505f;
}

.translation-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #9db0c1;
  background: #fff;
  cursor: pointer;
}

.translation-toggle input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  flex: 0 0 auto;
}

.translation-toggle span {
  font-size: 14px;
  font-weight: 700;
  color: #1f2c36;
}

.progress-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.progress-label {
  font-size: 13px;
  font-weight: 700;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  background: #f4f6f8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-chip.complete {
  border-color: #6d8a70;
  background: #edf6ee;
  color: #234127;
}

.status-chip.incomplete {
  border-color: #bfa26a;
  background: #fff7e8;
  color: #6b4d12;
}

.disclaimer,
.footer-disclaimer {
  border: 2px solid var(--alert-line);
  background: var(--alert-bg);
  padding: 16px 18px;
  font-size: 13px;
}

.disclaimer {
  margin-bottom: 24px;
}

.disclaimer strong,
.footer-disclaimer strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.section {
  counter-increment: section-count;
  margin-bottom: 28px;
  padding: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  scroll-margin-top: 20px;
}

.section:last-of-type {
  margin-bottom: 0;
}

.section-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.section-title::before {
  content: counter(section-count, decimal-leading-zero);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  background: #f3f5f7;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.section-note {
  margin: -4px 0 16px;
  color: var(--muted);
  font-size: 13px;
}

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

.field,
.field-full {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

label {
  font-size: 13px;
  font-weight: 700;
}

.required-mark {
  color: var(--error);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  border-radius: 0;
  font: inherit;
}

textarea {
  min-height: 132px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #9aa5b1;
  outline-offset: 1px;
  border-color: #6b7280;
}

.hint,
.upload-format,
.upload-help,
.file-size {
  font-size: 12px;
  color: var(--muted);
}

.upload-card {
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  margin-bottom: 14px;
  border-radius: 6px;
}

.upload-card.invalid-field {
  border-width: 2px;
}

.upload-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 8px;
}

.upload-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.upload-title {
  font-size: 15px;
  font-weight: 700;
}

.upload-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.upload-badge.required {
  color: #7b1e1e;
  border-color: #d2a1a1;
  background: #fff6f6;
}

.upload-badge.optional {
  color: #4d5966;
}

.upload-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.upload-button,
.btn-generate,
.btn-secondary,
.btn-remove {
  font: inherit;
  cursor: pointer;
}

.upload-button,
.btn-generate,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--button);
}

.upload-button,
.btn-generate {
  background: var(--button);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.upload-button {
  position: relative;
  overflow: hidden;
  min-width: 180px;
}

.upload-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.btn-generate:hover,
.upload-button:hover {
  background: var(--button-hover);
}

.btn-secondary,
.btn-remove {
  background: #fff;
  color: var(--ink);
  border-color: var(--line-strong);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.file-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 4px;
}

.file-meta {
  min-width: 0;
}

.file-name {
  font-size: 13px;
  font-weight: 700;
  word-break: break-word;
}

.btn-remove {
  padding: 7px 10px;
  white-space: nowrap;
}

.validation-box {
  display: none;
  margin-bottom: 20px;
  border: 1px solid var(--error);
  background: var(--error-bg);
  padding: 14px 16px;
}

.validation-box.active {
  display: block;
}

.validation-box strong {
  display: block;
  margin-bottom: 8px;
}

.validation-box ul {
  margin: 0;
  padding-left: 18px;
}

.invalid-field {
  border-color: var(--error) !important;
  background: var(--error-bg);
}

.actions {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  background: #f8fafb;
}

.footer-disclaimer {
  margin-top: 28px;
}

@media (max-width: 760px) {
  .page {
    padding: 0;
  }

  .document-shell {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .header,
  .form-body {
    padding: 20px;
  }

  .grid,
  .progress-panel {
    grid-template-columns: 1fr;
  }

  .upload-head,
  .file-item,
  .section-meta,
  .action-row,
  .translation-toggle {
    flex-direction: column;
    align-items: flex-start;
  }

  .actions {
    padding: 16px;
  }

  .btn-generate,
  .btn-secondary,
  .upload-button {
    width: 100%;
  }
}
