:root {
  --bg: #f2f1ee;
  --text: #252b32;
  --muted: #646b73;
  --line: #d9dcdf;
  --primary: #253c50;
  --danger: #a12828;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Segoe UI", Calibri, sans-serif; font-size: 16px; line-height: 1.5; }
button, input, select { font: inherit; }
.page-shell { width: min(1040px, calc(100% - 64px)); margin: 48px auto; }
.form-card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--primary); }
.form-header { display: flex; justify-content: space-between; align-items: center; gap: 40px; padding: 36px 44px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 16px; color: var(--primary); font-size: 14px; font-weight: 700; letter-spacing: .08em; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: "Segoe UI", Calibri, sans-serif; font-weight: 600; }
h1 { font-weight: 900; font-size: clamp(34px, 5vw, 44px); line-height: 1.2; margin-bottom: 12px; }
h2 { font-size: 26px; margin-bottom: 0; }
h3 { font-size: 17px; font-weight: 700; }
.muted { color: var(--muted); margin-bottom: 0; }
.muted.compact { margin-top: 8px; font-size: 16px; }
.type-switch { flex-shrink: 0; margin: 0; padding: 10px 0; border: 0; }
.type-switch legend { font-weight: 700; padding: 0; margin-bottom: 4px; }
.type-switch label { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; cursor: pointer; }
input[type='radio'] { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; }
.section-block { padding: 30px 44px 34px; border-bottom: 1px solid var(--line); }
.section-title-row { margin-bottom: 24px; }
.grid { display: grid; gap: 16px 24px; }
.two-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-weight: 600; font-size: 16px; }
.field small { color: var(--muted); font-size: 14px; }
input[type='text'], input[type='email'], input[type='tel'], select { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #bfc5cb; border-radius: 2px; background: #fff; color: var(--text); }
input::placeholder { color: #777e86; font-size: 16px; }
input:focus-visible, select:focus-visible, button:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
input[aria-invalid='true'], select[aria-invalid='true'] { border-color: var(--danger); }
.error { color: var(--danger) !important; font-size: 14px; }
.error:empty { display: none; }
.contact-card + .contact-card { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.contact-card h3 { margin-bottom: 16px; }
.docs-heading { margin: 26px 0 0; padding: 9px 0; border-bottom: 1px solid #929ba4; color: var(--primary); }
.doc-row { display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.doc-row:last-child { border-bottom: 0; }
.doc-label { font-size: 16px; line-height: 1.6; cursor: pointer; }
input[type='file'] { width: 100%; min-width: 0; color: var(--muted); font-size: 14px; padding: 3px; }
input[type='file']::file-selector-button { font: inherit; color: var(--primary); background: #fff; border: 1px solid #adb6be; border-radius: 2px; padding: 9px 12px; margin-right: 10px; cursor: pointer; }
input[type='file']::file-selector-button:hover { background: #f2f4f6; }
.actions { display: flex; justify-content: flex-end; gap: 10px; padding: 26px 44px; flex-wrap: wrap; }
.button { border: 1px solid #adb6be; border-radius: 2px; padding: 10px 18px; font-weight: 600; cursor: pointer; }
.button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.button.primary:hover { background: #172d40; }
.button.ghost { background: #fff; color: var(--text); }
.button.ghost:hover { background: #f2f4f6; }
#btnGuardarBorrador { margin-right: auto; }
.status { margin: 0 44px 26px; font-size: 16px; }
.status:empty { display: none; }
.status.success { padding: 12px 14px; border-left: 3px solid #3f6850; background: #f2f6f3; color: #30513e; }
.status.error-status { padding: 12px 14px; border-left: 3px solid var(--danger); background: #fcf3f3; color: var(--danger); }
@media (max-width: 800px) {
  .form-header { flex-direction: column; align-items: flex-start; gap: 22px; }
  .three-cols { grid-template-columns: 1fr; }
  .doc-row { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 560px) {
  .page-shell { width: 100%; margin: 0; }
  .form-card { border-left: 0; border-right: 0; }
  .form-header, .section-block { padding: 26px 20px; }
  .two-cols { grid-template-columns: 1fr; }
  .actions { padding: 24px 20px; }
  .button { width: 100%; }
  .status { margin: 0 20px 24px; }
}
