/* ============================================
   SISTEMA DE GESTIÓN DE SINIESTROS
   Hoja de estilos principal
   ============================================ */

:root {
  /* Paleta corporativa */
  --brand-primary: #171669;          /* Azul oscuro institucional */
  --brand-primary-dark: #0f0e4a;     /* Variante más oscura para hover */
  --brand-primary-soft: #2d2c8a;     /* Variante más clara */
  --brand-accent: #00cbcc;           /* Turquesa de acento */
  --brand-accent-dark: #00a8a9;      /* Hover del turquesa */
  --brand-accent-tint: #e0f9f9;      /* Fondo muy suave del turquesa */
  --brand-accent-tint-strong: #b3f0f0; /* Fondo medio del turquesa */

  /* Neutros */
  --ink: #1a1a1a;
  --ink-soft: #2d2d2d;
  --paper: #ffffff;                  /* Fondo blanco como pediste */
  --paper-warm: #f7f8fb;             /* Variante muy suave con tinte azulado */
  --paper-card: #ffffff;
  --rule: #e4e6ee;                   /* Líneas con leve tinte azulado */
  --rule-soft: #eef0f5;
  --muted: #5a5d72;                  /* Texto secundario con tinte azulado */
  --muted-soft: #8b8da0;

  /* Alias para mantener compatibilidad con el resto del CSS */
  --accent: var(--brand-primary);
  --accent-soft: var(--brand-primary-soft);
  --accent-tint: var(--brand-accent-tint);

  /* Estados */
  --error: #c8302e;
  --error-bg: #fdecec;
  --success: #1d8f7a;
  --success-bg: #e3f7f2;
  --warning: #b8860b;
  --warning-bg: #fdf6e3;

  /* Tipografía */
  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Espaciados */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* Radios */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(26, 26, 26, 0.04);
  --shadow-md: 0 4px 16px rgba(26, 26, 26, 0.06);
  --shadow-lg: 0 12px 40px rgba(26, 26, 26, 0.08);

  /* Transiciones */
  --t-fast: 150ms ease;
  --t-med: 280ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 480ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET Y BASE
   ============================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: 'kern' 1, 'liga' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg { max-width: 100%; display: block; }

[hidden] { display: none !important; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* ============================================
   HEADER
   ============================================ */

.header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.95);
}

.header__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

.header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.header__logo {
  height: 44px;
  display: flex;
  align-items: center;
  position: relative;
}

.header__logo img {
  height: 44px;
  max-width: 180px;
  object-fit: contain;
  display: block;
}

.header__logo-fallback {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--brand-primary);
  color: var(--paper);
  border-radius: var(--radius-sm);
}

.header__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.header__name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.header__subtitle {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.header__contact {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.875rem;
}

.header__contact-label {
  color: var(--muted);
  display: none;
}

.header__contact-link {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 500;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}

.header__contact-link:hover {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--paper);
}

@media (min-width: 640px) {
  .header__contact-label { display: inline; }
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.progress-wrapper {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.progress-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-5);
}

.progress-bar {
  height: 3px;
  background: var(--rule-soft);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: var(--space-3);
}

.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
  transition: width var(--t-slow);
  border-radius: 2px;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  overflow-x: auto;
  scrollbar-width: none;
}

.progress-steps::-webkit-scrollbar { display: none; }

.progress-step {
  white-space: nowrap;
  padding: var(--space-1) 0;
  font-weight: 500;
  transition: color var(--t-fast);
}

.progress-step.is-active {
  color: var(--brand-primary);
  font-weight: 600;
}

.progress-step.is-done {
  color: var(--ink);
}

/* ============================================
   PANTALLA DE BIENVENIDA
   ============================================ */

.welcome {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: var(--space-7) var(--space-5);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-7);
  align-items: center;
}

@media (min-width: 960px) {
  .welcome {
    grid-template-columns: 1.4fr 1fr;
    gap: var(--space-9);
    padding: var(--space-9) var(--space-5);
  }
}

.welcome__container {
  max-width: 600px;
}

.welcome__eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--brand-accent-dark);
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.welcome__title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 400;
  margin-bottom: var(--space-5);
  color: var(--ink);
}

.welcome__title em {
  font-style: italic;
  color: var(--brand-primary);
  font-weight: 500;
}

.welcome__lead {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: var(--space-7);
  max-width: 540px;
}

.welcome__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-bottom: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--rule);
}

.welcome__info-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-5);
  align-items: baseline;
}

.welcome__info-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--brand-primary);
  font-weight: 500;
  font-feature-settings: 'tnum' 1;
}

.welcome__info-text {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.welcome__info-text strong {
  color: var(--ink);
  font-weight: 600;
}

.welcome__legal {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: var(--space-5);
  font-style: italic;
}

.welcome__aside {
  display: none;
  position: relative;
  height: 480px;
}

@media (min-width: 960px) {
  .welcome__aside { display: block; }
}

.welcome__decoration {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.welcome__circle {
  width: 320px;
  height: 320px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  position: absolute;
  animation: rotate-slow 60s linear infinite;
}

.welcome__circle::before {
  content: '';
  position: absolute;
  inset: 30px;
  border: 1px dashed var(--brand-accent);
  border-radius: 50%;
  opacity: 0.5;
}

.welcome__line {
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--rule), transparent);
  position: absolute;
}

.welcome__dot {
  width: 12px;
  height: 12px;
  background: var(--brand-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 8px var(--brand-accent-tint);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes rotate-slow {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
}

/* ============================================
   BOTONES
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
  border: 1px solid transparent;
  letter-spacing: 0.005em;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--brand-primary);
  color: var(--paper);
}

.btn--primary:hover:not(:disabled) {
  background: var(--brand-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(23, 22, 105, 0.25);
}

.btn--ghost {
  background: transparent;
  color: var(--brand-primary);
  border-color: var(--rule);
}

.btn--ghost:hover:not(:disabled) {
  border-color: var(--brand-primary);
  background: var(--paper-warm);
}

.btn--large {
  padding: var(--space-4) var(--space-6);
  font-size: 1rem;
}

.btn--submit {
  background: linear-gradient(90deg, var(--brand-primary) 0%, var(--brand-primary) 50%, var(--brand-accent) 100%);
  background-size: 200% 100%;
  background-position: 0% 0%;
  color: var(--paper);
  transition: background-position var(--t-med), transform var(--t-fast), box-shadow var(--t-med);
}

.btn--submit:hover:not(:disabled) {
  background-position: 100% 0%;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 203, 204, 0.35);
}

/* ============================================
   FORMULARIO
   ============================================ */

.form-wrapper {
  flex: 1;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: var(--space-7) var(--space-5);
}

@media (min-width: 768px) {
  .form-wrapper {
    padding: var(--space-9) var(--space-5);
  }
}

.step {
  animation: step-in var(--t-slow) both;
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step__header {
  margin-bottom: var(--space-7);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--rule);
}

.step__num {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--brand-accent-dark);
  font-weight: 600;
  display: block;
  margin-bottom: var(--space-3);
}

.step__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: var(--space-3);
}

.step__lead {
  color: var(--muted);
  font-size: 1rem;
  max-width: 640px;
}

.form__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 640px) {
  .form__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

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

.field__label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.005em;
}

.field__req {
  color: var(--error);
  margin-left: 2px;
}

.field__optional {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.8rem;
  font-style: italic;
}

.field__input {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: var(--space-3) var(--space-4);
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  color: var(--ink);
  width: 100%;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}

.field__input:hover {
  border-color: var(--muted-soft);
}

.field__input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-accent-tint);
}

.field__input::placeholder {
  color: var(--muted-soft);
}

.field__textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.55;
}

.field__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%231a1a1a' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-7);
  cursor: pointer;
}

.field__hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: var(--space-1);
}

.field__error {
  font-size: 0.8rem;
  color: var(--error);
  min-height: 1.2em;
  display: block;
  transition: opacity var(--t-fast);
}

.field--has-error .field__input {
  border-color: var(--error);
  background: var(--error-bg);
}

/* ============================================
   RAMOS Y SUBTIPOS
   ============================================ */

.ramo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.ramo-card {
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  text-align: left;
  cursor: pointer;
  transition: all var(--t-med);
  position: relative;
  overflow: hidden;
}

.ramo-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-tint);
  opacity: 0;
  transition: opacity var(--t-med);
  pointer-events: none;
}

.ramo-card:hover {
  border-color: var(--brand-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(23, 22, 105, 0.08);
}

.ramo-card.is-selected {
  border-color: var(--brand-primary);
  background: var(--paper-warm);
  box-shadow: inset 0 0 0 1px var(--brand-primary), 0 4px 16px rgba(23, 22, 105, 0.08);
}

.ramo-card.is-selected .ramo-card__icon {
  color: var(--brand-primary);
}

.ramo-card.is-selected .ramo-card__title {
  color: var(--brand-primary);
}

.ramo-card__icon {
  color: var(--ink);
  transition: color var(--t-fast);
}

.ramo-card__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.ramo-card__desc {
  font-size: 0.825rem;
  color: var(--muted);
  line-height: 1.4;
}

.subtipo-section {
  margin-top: var(--space-7);
  padding-top: var(--space-6);
  border-top: 1px solid var(--rule);
  animation: step-in var(--t-med);
}

.subtipo-section__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: var(--space-4);
  letter-spacing: -0.01em;
}

.subtipo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-3);
}

.subtipo-card {
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  text-align: left;
  cursor: pointer;
  transition: all var(--t-fast);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.subtipo-card:hover {
  border-color: var(--brand-primary);
  background: var(--paper-warm);
}

.subtipo-card.is-selected {
  border-color: var(--brand-primary);
  background: var(--paper-warm);
  box-shadow: inset 0 0 0 1px var(--brand-primary);
}

.subtipo-card.is-selected .subtipo-card__title {
  color: var(--brand-primary);
  font-weight: 600;
}

.subtipo-card__title {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
}

.subtipo-card__desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

/* ============================================
   CAMPOS DINÁMICOS
   ============================================ */

.dynamic-fields {
  margin-top: var(--space-6);
}

.dynamic-fields:not(:empty) {
  padding-top: var(--space-6);
  border-top: 1px solid var(--rule);
}

.dynamic-section {
  margin-top: var(--space-6);
}

.dynamic-section:first-child {
  margin-top: 0;
}

.dynamic-section__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: var(--space-4);
  color: var(--ink);
  letter-spacing: -0.005em;
}

/* Bloques repetibles (ej: múltiples terceros en choque) */
.repetible-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.bloque-repetible {
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  animation: step-in var(--t-med);
}

.bloque-repetible__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--rule-soft);
}

.bloque-repetible__titulo {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--brand-primary);
}

.btn-quitar-bloque {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--muted);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: var(--font-body);
}

.btn-quitar-bloque:hover {
  border-color: var(--error);
  color: var(--error);
  background: var(--error-bg);
}

.btn-agregar-bloque {
  margin-top: var(--space-4);
  background: transparent;
  border: 1.5px dashed var(--brand-primary);
  color: var(--brand-primary);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: all var(--t-fast);
}

.btn-agregar-bloque:hover {
  background: var(--brand-accent-tint);
  border-color: var(--brand-accent-dark);
  border-style: solid;
}

/* Radio / Checkbox bonitos */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.radio-option {
  position: relative;
  flex: 1;
  min-width: 120px;
}

.radio-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-option__label {
  display: block;
  padding: var(--space-3) var(--space-4);
  text-align: center;
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--t-fast);
}

.radio-option input:checked + .radio-option__label {
  background: var(--brand-primary);
  color: var(--paper);
  border-color: var(--brand-primary);
}

.radio-option:hover .radio-option__label {
  border-color: var(--brand-primary);
}

/* Sección condicional */
.conditional {
  display: none;
  margin-top: var(--space-5);
  padding: var(--space-5);
  background: var(--paper-warm);
  border-left: 3px solid var(--brand-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  animation: step-in var(--t-med);
}

.conditional.is-visible {
  display: block;
}

/* ============================================
   CARGA DE ARCHIVOS
   ============================================ */

.docs-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.doc-field {
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

.doc-field__header {
  margin-bottom: var(--space-4);
}

.doc-field__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: var(--space-1);
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.doc-field__badge {
  font-family: var(--font-body);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.doc-field__badge--req {
  background: var(--brand-accent-tint);
  color: var(--brand-primary);
}

.doc-field__badge--opt {
  background: var(--rule-soft);
  color: var(--muted);
}

.doc-field__desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.dropzone {
  border: 2px dashed var(--rule);
  border-radius: var(--radius-sm);
  padding: var(--space-5);
  text-align: center;
  cursor: pointer;
  transition: all var(--t-fast);
  background: var(--paper);
}

.dropzone:hover {
  border-color: var(--brand-accent);
  background: var(--brand-accent-tint);
}

.dropzone.is-dragging {
  border-color: var(--brand-primary);
  background: var(--brand-accent-tint);
  border-style: solid;
}

.dropzone__icon {
  margin: 0 auto var(--space-2);
  color: var(--muted);
}

.dropzone__text {
  font-size: 0.9rem;
  color: var(--ink);
  font-weight: 500;
}

.dropzone__hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: var(--space-1);
}

.dropzone input[type="file"] {
  display: none;
}

.file-list {
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.file-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--paper-warm);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.file-item__icon {
  color: var(--brand-primary);
  flex-shrink: 0;
}

.file-item__info {
  flex: 1;
  min-width: 0;
}

.file-item__name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-item__size {
  font-size: 0.75rem;
  color: var(--muted);
}

.file-item__remove {
  color: var(--muted);
  padding: var(--space-1);
  border-radius: var(--radius-sm);
  transition: color var(--t-fast), background var(--t-fast);
}

.file-item__remove:hover {
  color: var(--error);
  background: var(--error-bg);
}

/* ============================================
   REVISIÓN
   ============================================ */

.review {
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

.review__section {
  padding-bottom: var(--space-5);
  margin-bottom: var(--space-5);
  border-bottom: 1px solid var(--rule);
}

.review__section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.review__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.review__edit {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--brand-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}

.review__edit:hover {
  color: var(--brand-accent-dark);
}

.review__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

@media (min-width: 640px) {
  .review__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.review__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

.review__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 500;
}

.review__value {
  font-size: 0.95rem;
  color: var(--ink);
}

.review__value--empty {
  color: var(--muted-soft);
  font-style: italic;
}

/* ============================================
   LEGAL / CHECKBOXES
   ============================================ */

.legal-box {
  background: var(--paper-warm);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.checkbox {
  display: flex;
  gap: var(--space-3);
  cursor: pointer;
  align-items: flex-start;
}

.checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox__mark {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: var(--paper);
  border: 1.5px solid var(--rule);
  border-radius: 4px;
  margin-top: 2px;
  display: grid;
  place-items: center;
  transition: all var(--t-fast);
}

.checkbox__mark::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--paper);
  border-bottom: 2px solid var(--paper);
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
  transition: opacity var(--t-fast);
}

.checkbox input:checked + .checkbox__mark {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}

.checkbox input:checked + .checkbox__mark::after {
  opacity: 1;
}

.checkbox__text {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.checkbox__text strong {
  color: var(--ink);
  font-weight: 600;
}

/* ============================================
   ACCIONES DEL STEP
   ============================================ */

.step__actions {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--rule);
}

.step__actions .btn--ghost:first-child {
  visibility: hidden;
}

.step[data-step-num]:not([data-step-num="1"]) .step__actions .btn--ghost:first-child {
  visibility: visible;
}

/* ============================================
   PANTALLA DE ÉXITO
   ============================================ */

.success {
  flex: 1;
  display: grid;
  place-items: center;
  padding: var(--space-9) var(--space-5);
}

.success__container {
  max-width: 540px;
  text-align: center;
}

.success__icon {
  margin: 0 auto var(--space-5);
  color: var(--brand-accent);
  background: var(--brand-accent-tint);
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  animation: scale-in 0.6s var(--t-slow) both;
}

@keyframes scale-in {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.success__eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--brand-accent-dark);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.success__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: var(--space-4);
}

.success__title em {
  font-style: italic;
  color: var(--brand-primary);
}

.success__lead {
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: var(--space-6);
}

.success__case {
  background: var(--paper-warm);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.success__case-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.success__case-num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--brand-primary);
  font-feature-settings: 'tnum' 1;
}

.success__note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: var(--space-6);
}

/* ============================================
   LOADING OVERLAY
   ============================================ */

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(250, 250, 247, 0.9);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 100;
  animation: fade-in 0.3s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.loading-overlay__content {
  text-align: center;
}

.loading-overlay__spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--rule);
  border-top-color: var(--brand-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto var(--space-4);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-overlay__text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--ink);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  border-top: 1px solid var(--rule);
  background: var(--paper);
  margin-top: auto;
}

.footer__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-5);
  text-align: center;
}

.footer__text {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: var(--space-1);
}

.footer__legal {
  font-size: 0.75rem;
  color: var(--muted-soft);
  font-style: italic;
}

/* ============================================
   UTILIDADES
   ============================================ */

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

/* ============================================
   RESPONSIVE TWEAKS
   ============================================ */

@media (max-width: 480px) {
  .step__actions {
    flex-direction: column-reverse;
  }
  .step__actions .btn {
    width: 100%;
  }
  .step__actions .btn--ghost:first-child {
    visibility: visible;
  }
  .step[data-step-num="1"] .step__actions .btn--ghost:first-child {
    display: none;
  }
}
