:root {
  --bg: #f7f4ee; --card: #fff; --brand: #0b9fe3; --brand-soft: #e6f3fa;
  --primary: #0d6efd; --text: #212529; --muted: #6c757d; --border: #dee2e6; --danger: #dc3545;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font-family: 'Lato', system-ui, sans-serif;
  display: flex; justify-content: center; align-items: flex-start; padding: 36px 16px;
}
.card { width: 100%; max-width: 460px; background: var(--card); border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.08); padding: 32px; }
.card--wide { max-width: 720px; }
.logo-slot { display: flex; justify-content: center; min-height: 52px; margin-bottom: 8px; }
h1 { margin: 0; text-align: center; color: var(--brand); font-size: 28px; font-weight: 700; }
.subtitle { margin: 8px 0 28px; text-align: center; color: var(--muted); font-size: 15px; }
.label { display: block; margin-bottom: 8px; font-size: 16px; }

/* Selector de servicio */
.services { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 24px; }
.service {
  height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: #fff; border: 2px solid var(--border); border-radius: 12px; font: inherit; font-size: 14px; color: var(--text);
  cursor: pointer; transition: background .15s, border-color .15s;
}
.service svg { width: 22px; height: 22px; stroke: var(--brand); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.service.bolt svg { fill: var(--brand); }
.service.active { background: var(--brand-soft); border-color: var(--brand); }

/* Formulario */
.field { margin-bottom: 20px; }
input[type="text"], input[type="email"] {
  width: 100%; height: 38px; padding: 6px 12px; font: inherit; font-size: 16px; color: var(--text);
  border: 1px solid var(--border); border-radius: 6px; outline: none;
}
input:focus { border-color: #86b7fe; box-shadow: 0 0 0 .2rem rgba(13,110,253,.2); }
input.invalid { border-color: var(--danger); }
.hint { margin: 6px 0 0; font-size: 13px; line-height: 1.6; color: #495057; }
.alert { margin-bottom: 20px; padding: 10px 14px; background: #f8d7da; color: #842029; border-radius: 6px; font-size: 14px; }

/* Botones y links */
.btn {
  display: inline-block; height: 38px; padding: 0 14px; background: var(--primary); color: #fff; border: 0; border-radius: 6px;
  font: inherit; font-size: 16px; cursor: pointer; text-decoration: none;
}
.btn:hover { background: #0b5ed7; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn--block { width: 100%; margin-top: 2px; }
.btn-outline {
  height: 34px; padding: 0 13px; background: #fff; color: var(--brand); border: 1px solid var(--brand);
  border-radius: 6px; font: inherit; font-size: 14px; cursor: pointer;
}
.btn-cancel {
  display: inline-flex; align-items: center; height: 38px; padding: 0 12px; color: #6c757d; border: 1px solid #6c757d;
  border-radius: 6px; font-size: 16px; text-decoration: none;
}
.back { display: block; margin-top: 24px; text-align: center; color: var(--brand); font-size: 14px; text-decoration: none; }
.back:hover { text-decoration: underline; }

/* Facturas */
.user-line { margin: 0 0 14px; font-size: 16px; color: #495057; }
.facturas { margin: 16px 0; display: grid; gap: 10px; }
.factura {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #fff;
  border: 2px solid var(--border); border-left: 6px solid var(--border); border-radius: 8px; cursor: pointer;
}
.factura--vencida { border-left-color: var(--danger); }
.factura input { width: 18px; height: 18px; accent-color: var(--primary); flex-shrink: 0; }
.factura__info { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.factura__info strong { font-size: 15px; }
.factura__info small { font-size: 13px; color: var(--muted); }
.badge { padding: 3px 9px; background: #f8d7da; color: #b02a37; border-radius: 999px; font-size: 12px; }
.factura__importe { font-weight: 700; font-size: 15px; white-space: nowrap; }
.total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-top: 18px; border-top: 1px solid #eee; font-size: 17px; }
.total strong { font-size: 22px; }

/* Resumen */
.panel { padding: 24px; border: 1px solid #e9ecef; border-radius: 12px; }
.table-wrap { overflow-x: auto; }
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th { padding: 12px 8px; text-align: left; font-size: 13px; text-transform: uppercase; color: #495057; border-bottom: 1px solid #eee; white-space: nowrap; }
.tabla td { padding: 12px 8px; white-space: nowrap; }
.tabla tfoot td { font-weight: 700; font-size: 16px; border-top: 2px solid #dee2e6; }
.acciones { display: flex; gap: 16px; margin: 24px 0 16px; }
.avisos { margin: 0; padding-left: 22px; font-size: 13px; line-height: 1.7; color: #495057; }

@media (max-width: 480px) {
  .card { padding: 24px 20px; }
  .factura { flex-wrap: wrap; }
  .panel { padding: 16px; }
}

/* Bloque informativo (SEO / orientación al cliente) */
.info { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 14px; line-height: 1.6; color: #495057; }
.info h2 { margin: 0 0 8px; font-size: 16px; color: var(--text); }
.info p { margin: 0 0 10px; }
.info ul { margin: 0; padding-left: 20px; }
.info a { color: var(--primary); }

/* Preguntas frecuentes (SEO: respalda el FAQPage de datos estructurados) */
.faq { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 14px; color: #495057; }
.faq h2 { margin: 0 0 12px; font-size: 16px; color: var(--text); }
.faq details { border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; margin-bottom: 8px; background: #fff; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--text); }
.faq details[open] summary { margin-bottom: 8px; }
.faq p { margin: 0; line-height: 1.6; }

/* Pie legal / transparencia de marca */
.legal { max-width: 460px; margin: 16px auto 0; padding: 0 8px; display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: center; font-size: 12px; color: var(--muted); text-align: center; }
.legal a { color: var(--muted); }
.card--wide ~ .legal { max-width: 720px; }

/* Logo */
.logo-slot a { display: inline-flex; }
.logo-slot img { display: block; width: 56px; height: 56px; border-radius: 12px; }
