.historial-page {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 20px 0 48px;
}

.historial-card {
  padding: clamp(20px, 4vw, 36px);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.historial-header {
  padding-bottom: 22px;
  border-bottom: 1px solid #e5e7eb;
}

.historial-eyebrow {
  margin: 0 0 8px;
  color: #2563eb;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.historial-header h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.65rem, 3.5vw, 2.25rem);
  line-height: 1.15;
}

.historial-vehicle {
  margin: 16px 0 4px;
  color: #1e293b;
  font-size: 1.05rem;
  font-weight: 700;
}

.historial-note,
.historial-description {
  margin: 0;
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.6;
}

.historial-blocks {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
}

.historial-blocks h2,
.historial-terms h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 1.15rem;
  line-height: 1.35;
}

.historial-description {
  margin-bottom: 16px;
}

.historial-options {
  display: grid;
  gap: 10px;
}

.historial-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.historial-option:has(input:checked) {
  border-color: #93c5fd;
  background: #eff6ff;
}

.historial-option input,
.historial-acceptance input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #2563eb;
  cursor: pointer;
}

.historial-option-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: #0f172a;
}

.historial-option-copy small {
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.5;
}

.historial-option-price {
  color: #1d4ed8;
  white-space: nowrap;
}

.historial-selected-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 10px 0;
  color: #334155;
}

.historial-total {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid #dbeafe;
  color: #0f172a;
  text-align: right;
}

.historial-terms {
  margin-top: 28px;
  color: #475569;
  line-height: 1.7;
}

.historial-terms h2 {
  margin-bottom: 12px;
}

.historial-terms ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

.historial-terms li {
  padding-left: 4px;
}

.historial-alert {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fef2f2;
  color: #991b1b;
  font-weight: 600;
  line-height: 1.5;
}

.historial-status {
  margin-top: 24px;
  padding: 15px 16px;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  background: #ecfdf5;
  color: #166534;
  line-height: 1.5;
}

.historial-request-status {
  margin: 16px 0;
  color: #475569;
}

.historial-form {
  display: grid;
  justify-items: start;
  gap: 18px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.historial-acceptance {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  color: #334155;
  line-height: 1.55;
  cursor: pointer;
}

.historial-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid #2563eb;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.historial-button:hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #fff;
  text-decoration: none;
}

.historial-button:focus-visible,
.historial-option:focus-within {
  outline: 3px solid rgba(37, 99, 235, 0.25);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .historial-page {
    padding: 12px 0 32px;
  }

  .historial-option {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .historial-option-price {
    grid-column: 2;
  }

  .historial-blocks {
    padding: 16px;
  }

  .historial-button {
    width: 100%;
  }
}