:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --ink: #0e1726;
  --muted: #64748b;
  --brand: #00303d;
  --accent: #d1fc00;
  --ring: rgba(0, 141, 169, .25);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --card: #0f172a;
    --ink: #e2e8f0;
    --muted: #94a3b8;
    --ring: rgba(209, 252, 0, .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, #e6f7ff 0%, transparent 40%),
              radial-gradient(900px 500px at 110% 10%, #f0ffe0 0%, transparent 35%),
              var(--bg);
  color: var(--ink);
}

.page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 24px;
}
.brand { margin-top: 8px; }
.brand__logo { height: 44px; }

.card {
  width: 100%;
  max-width: 680px;
  background: var(--card);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 20px 40px rgba(2, 8, 23, .06), 0 2px 8px rgba(2, 8, 23, .05);
}

.title    { margin: 0 0 6px; font-size: clamp(1.4rem, 1rem + 1.8vw, 2.2rem);
            color: var(--brand); letter-spacing: -.02em; }
.subtitle { margin: 0 0 18px; color: var(--muted); }

.alert {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
}
.alert.success { background: #f0fff4; border-color: #a7f3d0; color: #047857; }

/* ─── Form ──────────────────────────────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: 18px; }
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field  { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.label  { font-weight: 600; font-size: .92rem; color: var(--ink); }
.req    { color: #dc2626; }
.field-hint { font-size: .78rem; color: var(--muted); }

.input {
  appearance: none;
  width: 100%;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: var(--ink);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 1rem;
  line-height: 1.2;
  transition: border-color .2s, box-shadow .2s, transform .02s;
  font-family: inherit;
}
.input::placeholder { color: #9aa4b2; }
.input:focus {
  outline: none;
  border-color: #7dd3fc;
  box-shadow: 0 0 0 6px var(--ring);
}
.input:active { transform: translateY(0.5px); }

/* Currency compound input */
.input-currency {
  display: flex;
  gap: 0;
}
.input--currency-sel {
  width: 90px;
  border-radius: 14px 0 0 14px;
  border-right: none;
  flex-shrink: 0;
}
.input--currency-val {
  border-radius: 0 14px 14px 0;
  flex: 1;
}

/* ─── File Upload ───────────────────────────────────────────────────────── */
.file-upload {
  border: 2px dashed #e5e7eb;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  overflow: hidden;
}
.file-upload:hover,
.file-upload.drag-over {
  border-color: #7dd3fc;
  background: #f0f9ff;
}
.file-upload.drag-over { border-style: solid; }

.file-input { display: none; }

.file-upload__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 16px;
  text-align: center;
}
.file-upload__icon { font-size: 2rem; }
.file-upload__text { font-size: .9rem; color: var(--ink); }
.file-upload__hint { font-size: .78rem; color: var(--muted); }

.file-upload__selected {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #f0f9ff;
  border-top: 1px solid #e0f2fe;
}
.file-icon   { font-size: 1.2rem; }
.file-remove {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: .9rem;
  padding: 2px 6px;
  border-radius: 6px;
}
.file-remove:hover { background: #e5e7eb; color: var(--ink); }

/* ─── Términos ──────────────────────────────────────────────────────────── */
.field-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 4px;
}
.input-checkbox {
  appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-top: 2px;
  cursor: pointer;
  position: relative;
  transition: all .2s;
}
.input-checkbox:checked {
  background-color: var(--brand);
  border-color: var(--brand);
}
.input-checkbox:checked::after {
  content: '✔';
  position: absolute;
  color: #fff;
  font-size: 12px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.input-checkbox:focus { outline: none; box-shadow: 0 0 0 4px var(--ring); }

.terms-text         { font-size: .88rem; line-height: 1.4; color: var(--muted); }
.terms-text a       { color: var(--brand); text-decoration: none; font-weight: 600; }
.terms-text a:hover { text-decoration: underline; }

/* ─── Button ────────────────────────────────────────────────────────────── */
.btn {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(2, 8, 23, .08);
  font-family: inherit;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
}
.btn--primary {
  background: linear-gradient(180deg, var(--accent), #bce800);
  color: #0a0a0a;
}
.btn--primary:hover  { filter: brightness(.97); }
.btn--primary:active { transform: translateY(1px); }
.btn--outline {
  background: transparent;
  border: 1px solid #e5e7eb;
  color: var(--ink);
}

/* ─── Modal ─────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-box {
  background: #fff;
  border-radius: 20px;
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .2);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #f1f5f9;
}
.modal-title  { font-size: 1rem; font-weight: 700; color: var(--brand); }
.modal-close  {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 6px;
}
.modal-close:hover { background: #f1f5f9; }
.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  font-size: .88rem;
  line-height: 1.65;
  color: #374151;
}
.modal-body h4 { margin: 14px 0 6px; color: var(--brand); font-size: .9rem; }
.modal-body ul { padding-left: 18px; margin: 4px 0 10px; }
.modal-body li { margin-bottom: 4px; }
.modal-body a  { color: var(--brand); }
.modal-footer  { padding: 16px 24px; border-top: 1px solid #f1f5f9; }

/* ─── Inclusión / ajustes razonables ────────────────────────────────────── */
.inclusion-section {
  margin-top: 20px;
  padding: 18px 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.inclusion-intro {
  font-size: .82rem;
  color: #64748b;
  margin: 0 0 14px;
  line-height: 1.5;
}
.field-row {
  margin-bottom: 14px;
}
.field-row:last-child { margin-bottom: 0; }
.field-row > .label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .88rem;
  color: #374151;
  cursor: pointer;
}
.radio-label input[type="radio"] {
  accent-color: var(--brand, #00303d);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ─── Footer / misc ─────────────────────────────────────────────────────── */
.footer { opacity: .7; font-size: .85rem; margin-top: auto; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .card   { padding: 24px 18px; border-radius: 20px; }
  .grid   { grid-template-columns: 1fr; }
  .input--currency-sel { width: 80px; }
}
