/* Registro público (/registro/) en el lenguaje visual de Documentos emitidos (factura electrónica).
   Plantilla: templates/registration/public_signup.html (body.su-eb) · base: core/css/auth-flow.css.
   Tokens tomados de templates/invoicing/document_list.html (--document-*): tinta #0d2947, línea #dce6f0,
   azul #1769bd; encabezado con barra lateral, tarjetas planas con franja de título y campos de 42 px.
   Sólo estilos: la estructura y los data-* que usa core/js/auth-flow.js no cambian. */

body.su-eb {
  --eb-ink: #0d2947;
  --eb-text: #253247;
  --eb-muted: #526781;
  --eb-faint: #8a9bb0;
  --eb-line: #dce6f0;
  --eb-field: #cbd5e1;
  --eb-soft: #f8fbfe;
  --eb-page: #f4f7fb;
  --eb-blue: #1769bd;
  --eb-blue-600: #125aa3;
  --eb-blue-50: #edf5ff;
  --eb-accent: #4f7ea8;
  --eb-ok: #16865c;
  --eb-ok-bg: #e9f8f1;
  --eb-danger: #cf3f4f;
  --eb-ring: 0 0 0 3px rgba(23, 105, 189, .16);
  --eb-shadow: 0 1px 2px rgba(16, 26, 38, .045);
  --login-ink: var(--eb-ink);
  --login-muted: var(--eb-muted);
  --login-border: var(--eb-line);

  background: var(--eb-page);
  font-family: Inter, "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--eb-text);
  padding: 28px 20px 40px;
  align-items: start;
}

/* ------------------------------------------------------------------ escenario y encabezado */
body.su-eb .login-stage { max-width: 880px; gap: 14px; }
body.su-eb .auth-back { min-height: 30px; font-size: 13px; font-weight: 600; color: var(--eb-muted); }
body.su-eb .auth-back:hover { color: var(--eb-blue); }

/* El contenedor deja de ser una tarjeta: cada sección es su propia tarjeta, como en factura electrónica. */
body.su-eb .login-card { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }

body.su-eb .login-header {
  position: relative; display: flex; flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 16px 24px;
  margin: 0 0 14px; padding: 18px 22px 18px 26px;
  background: #fff; border: 1px solid var(--eb-line); border-radius: 12px; box-shadow: var(--eb-shadow); text-align: left;
}
body.su-eb .su-pagehead::before {
  content: ""; position: absolute; left: -26px; top: 2px; bottom: 2px; width: 4px;
  border-radius: 0 999px 999px 0; background: var(--eb-accent);
}
body.su-eb .login-header > a { flex: none; }
body.su-eb .login-logo { width: 132px; }
body.su-eb .su-pagehead { position: relative; min-width: 0; }
body.su-eb .auth-eyebrow { display: block; margin-bottom: 4px; color: var(--eb-accent); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
body.su-eb h1 { margin: 0; color: var(--eb-ink); font-size: 24px; font-weight: 750; letter-spacing: -.01em; line-height: 1.15; }
body.su-eb .login-header p { margin: 4px 0 0; color: var(--eb-muted); font-size: 13px; line-height: 1.5; }

/* ------------------------------------------------------------------ secciones como tarjetas */
body.su-eb .su-form { gap: 14px; }
body.su-eb .su-section,
body.su-eb .su-form > .su-section:first-of-type {
  grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0;
  background: #fff; border: 1px solid var(--eb-line); border-radius: 10px; box-shadow: var(--eb-shadow);
}
body.su-eb .su-section-title {
  align-items: center; gap: 10px; padding: 12px 16px;
  background: var(--eb-soft); border-bottom: 1px solid var(--eb-line); border-radius: 10px 10px 0 0;
  color: var(--eb-ink); font-size: 14px; font-weight: 700;
}
body.su-eb .su-section-title > span:nth-child(2) { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; min-width: 0; }
body.su-eb .su-section-title small { margin: 0; font-size: 12.5px; font-weight: 500; color: var(--eb-muted); }
body.su-eb .su-step { flex-basis: 22px; width: 22px; height: 22px; border-radius: 6px; background: var(--eb-blue-50); color: var(--eb-blue); font-size: 12px; font-weight: 800; }
body.su-eb .su-section-check { margin-top: 0; border-color: var(--eb-field); }
body.su-eb .su-section.is-complete .su-section-check { background: var(--eb-ok); border-color: var(--eb-ok); }
body.su-eb .su-section.is-complete .su-step { background: var(--eb-ok-bg); color: var(--eb-ok); }
body.su-eb .su-section > .su-grid,
body.su-eb .su-section > .su-stack { gap: 14px 16px; padding: 16px; }

/* ------------------------------------------------------------------ campos */
body.su-eb .auth-field label,
body.su-eb .su-label,
body.su-eb .auth-location-search > label {
  margin-bottom: 6px; color: var(--eb-text); font-size: 12.5px; font-weight: 650;
}
body.su-eb .input {
  min-height: 42px; padding: 9px 12px; border: 1px solid var(--eb-field); border-radius: 8px;
  background-color: #fff; color: var(--eb-ink); font-size: 14px; box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
body.su-eb .input:hover { border-color: #98a2b3; }
body.su-eb .input:focus,
body.su-eb .input:focus-visible,
body.su-eb .auth-location-combobox .input:focus-visible { outline: none; border-color: var(--eb-blue); box-shadow: var(--eb-ring); }
body.su-eb .input::placeholder { color: var(--eb-faint); }
body.su-eb .has-errors .input { border-color: var(--eb-danger); }
body.su-eb .auth-required, body.su-eb .auth-field-errors { color: var(--eb-danger); }
body.su-eb .auth-help { margin-top: 5px; font-size: 12px; color: var(--eb-muted); }
body.su-eb .auth-show-password { top: 1px; width: 40px; height: 40px; color: var(--eb-muted); }
body.su-eb .auth-show-password:hover { background: var(--eb-blue-50); color: var(--eb-blue); }
body.su-eb .su-lookup { height: 42px; right: 12px; }
body.su-eb .auth-location-chevron { top: 15px; }
body.su-eb .auth-flow textarea.input, body.su-eb textarea.input { min-height: 84px; }

/* tipo de identificación: control segmentado */
body.su-eb .su-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; border: 1px solid var(--eb-line); border-radius: 9px; background: var(--eb-soft); }
body.su-eb .su-chip { height: 34px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; color: var(--eb-muted); font-size: 13px; font-weight: 650; }
body.su-eb .su-chip:hover { color: var(--eb-ink); background: #fff; }
body.su-eb .su-chip[aria-checked=true] { background: #fff; color: var(--eb-blue); box-shadow: 0 1px 3px rgba(16, 26, 38, .12); }
body.su-eb .su-chip:focus-visible { outline: none; box-shadow: var(--eb-ring); }

body.su-eb .su-badge { height: 20px; border-radius: 6px; background: var(--eb-ok-bg); color: var(--eb-ok); font-weight: 700; }
body.su-eb .su-activity-search-button,
body.su-eb .auth-location-retry {
  min-height: 32px; margin-top: 8px; padding: 6px 12px; border: 1px solid #d5dfeb; border-radius: 8px;
  background: #fff; color: var(--eb-blue); font-size: 13px; font-weight: 650;
}
body.su-eb .su-activity-search-button:hover, body.su-eb .auth-location-retry:hover { background: var(--eb-blue-50); border-color: #b9cde3; }
body.su-eb .auth-location-results { border-color: var(--eb-line); border-radius: 8px; box-shadow: 0 14px 30px rgba(16, 26, 38, .12); }
body.su-eb .auth-location-option:hover, body.su-eb .auth-location-option[aria-selected=true] { background: var(--eb-blue-50); color: var(--eb-blue); }

/* ------------------------------------------------------------------ factura electrónica */
body.su-eb .su-invoice-toggle { border: 1px solid var(--eb-line); border-radius: 10px; background: #fff; box-shadow: var(--eb-shadow); }
body.su-eb .su-invoice-toggle:has(:checked) { border-color: #9cc3e8; box-shadow: 0 0 0 3px var(--eb-blue-50); }
body.su-eb .su-invoice-toggle label { padding: 14px 16px; }
body.su-eb .su-invoice-icon { flex-basis: 36px; width: 36px; height: 36px; border-radius: 8px; background: var(--eb-blue-50); color: var(--eb-blue); }
body.su-eb .su-invoice-icon svg { width: 19px; height: 19px; }
body.su-eb .auth-billing-option strong { color: var(--eb-ink); font-weight: 700; }
body.su-eb .auth-billing-option small { color: var(--eb-muted); }
body.su-eb .su-invoice-toggle .auth-checkbox:checked ~ .su-switch { background: var(--eb-blue); }

body.su-eb .su-billing:not([hidden]) { display: grid; gap: 14px; }
body.su-eb .su-billing-intro { margin: 0 !important; padding: 11px 14px; border: 1px solid #c8dcf3; border-radius: 8px; background: var(--eb-blue-50); color: #174f78; font-size: 12.5px; }

/* ------------------------------------------------------------------ pie */
body.su-eb .su-foot { gap: 8px; padding: 16px; border: 1px solid var(--eb-line); border-radius: 10px; background: #fff; box-shadow: var(--eb-shadow); }
body.su-eb .su-foot .auth-submit { margin-top: 0; }
body.su-eb .auth-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; border: 1px solid var(--eb-blue); border-radius: 8px; background: var(--eb-blue);
  color: #fff; font-size: 14.5px; font-weight: 750; box-shadow: 0 2px 6px rgba(23, 105, 189, .22); transform: none;
}
body.su-eb .auth-submit:hover { background: var(--eb-blue-600); border-color: var(--eb-blue-600); box-shadow: 0 2px 6px rgba(23, 105, 189, .3); }
body.su-eb .auth-submit:focus-visible { outline: none; box-shadow: var(--eb-ring); }
body.su-eb .auth-reassurance { font-size: 12px; }
body.su-eb .auth-account-link { margin: 4px 0 0; font-size: 13px; }
body.su-eb .auth-help a, body.su-eb .auth-account-link a, body.su-eb .auth-footer a { color: var(--eb-blue); }
body.su-eb .auth-notice { margin: 0; border-radius: 8px; }

/* ------------------------------------------------------------------ modal de actividad */
body.su-eb .su-modal-backdrop { background: rgba(15, 23, 42, .6); backdrop-filter: none; }
body.su-eb .su-modal-panel { border-radius: 14px; border-color: var(--eb-line); box-shadow: 0 28px 80px rgba(15, 23, 42, .4); }
body.su-eb .su-modal-head h2 { color: var(--eb-ink); font-size: 20px; font-weight: 750; }
body.su-eb .su-modal-panel .btn-primary { min-height: 40px; padding: 0 16px; border-radius: 8px; background: var(--eb-blue); box-shadow: none; font-weight: 750; }
body.su-eb .su-activity-results { border-color: var(--eb-line); border-radius: 8px; }
body.su-eb .su-activity-results .activity-result:hover,
body.su-eb .su-activity-results .activity-result.is-selected { background: var(--eb-blue-50); }
body.su-eb .su-activity-results .activity-result.is-selected .activity-result-radio { border-color: var(--eb-blue); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 720px) {
  body.su-eb .login-header { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px 18px 16px 22px; }
  body.su-eb .login-logo { width: 112px; }
  body.su-eb .su-pagehead::before { left: -22px; }
  body.su-eb .su-section-title > span:nth-child(2) { display: block; }
  body.su-eb .su-section-title small { display: block; margin-top: 2px; }
}
@media (max-width: 560px) {
  body.su-eb { padding: 16px 12px 28px; }
  body.su-eb .login-card { padding: 0; }
  body.su-eb .input { font-size: 16px; }
  body.su-eb .su-section > .su-grid, body.su-eb .su-section > .su-stack { padding: 14px; }
  body.su-eb .su-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.su-eb .su-chip { padding: 0 6px; justify-content: center; }
}

/* ================================================================== buscadores y desplegables
   Mismo componente que el formulario de facturas (invoice_form + electronic-bill-components.css):
   desplegable con segmento de flecha, menú con barra superior navy, resultados con barra lateral al pasar. */
body.su-eb { --eb-navy: #0f4c81; --eb-menu-line: #e2e8f0; }

/* fuente del desplegable: el <select> nativo queda oculto y sigue recibiendo los cambios */
body.su-eb .electronic-bill-select-source {
  position: absolute !important; width: 1px !important; height: 1px !important; min-height: 1px !important;
  margin: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0 !important; pointer-events: none !important;
}
body.su-eb .electronic-bill-select-control { position: relative; display: block; width: 100%; min-width: 0; }
body.su-eb .electronic-bill-select-control.is-open { z-index: 40; }
body.su-eb .auth-field:has(.electronic-bill-select-control.is-open) { position: relative; z-index: 40; }
body.su-eb .electronic-bill-select-trigger {
  display: grid; grid-template-columns: minmax(0, 1fr) 40px; align-items: center; width: 100%;
  height: 42px; padding: 0 0 0 12px; border: 1px solid var(--eb-field); border-radius: 8px; background: #fff;
  color: var(--eb-ink); font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1.1; text-align: left; cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
body.su-eb .electronic-bill-select-trigger:hover { border-color: #98a2b3; }
body.su-eb .electronic-bill-select-trigger:focus-visible,
body.su-eb .electronic-bill-select-control.is-open .electronic-bill-select-trigger { outline: none; border-color: var(--eb-blue); box-shadow: var(--eb-ring); }
body.su-eb .electronic-bill-select-control.is-placeholder .electronic-bill-select-label { color: var(--eb-faint); font-weight: 400; }
body.su-eb .electronic-bill-select-control.is-disabled .electronic-bill-select-trigger { background: #f1f5f9; color: var(--eb-muted); border-style: dashed; cursor: not-allowed; }
body.su-eb .electronic-bill-select-control.has-errors .electronic-bill-select-trigger { border-color: var(--eb-danger); }
body.su-eb .electronic-bill-select-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.su-eb .electronic-bill-select-arrow { display: inline-flex; align-items: center; justify-content: center; height: 22px; border-left: 1px solid #d9e1ea; color: #50627a; }
body.su-eb .electronic-bill-select-arrow::before { content: ""; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; transition: transform .18s ease; }
body.su-eb .electronic-bill-select-control.is-open .electronic-bill-select-arrow::before { transform: rotate(180deg); }

body.su-eb .electronic-bill-select-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 41; display: none;
  max-height: 260px; overflow: auto; overscroll-behavior: contain; padding: 0 0 3px;
  border: 1px solid #cbd5e1; border-top: 3px solid var(--eb-navy); border-radius: 8px; background: #fff;
  box-shadow: 0 18px 38px rgba(16, 26, 38, .18);
}
body.su-eb .electronic-bill-select-control.is-open .electronic-bill-select-menu { display: grid; animation: su-menu .14s ease-out both; }
body.su-eb .electronic-bill-select-item {
  display: flex; align-items: center; width: 100%; min-height: 36px; padding: 8px 12px;
  border: 0; border-bottom: 1px solid var(--eb-menu-line); background: #fff; color: var(--eb-ink);
  font-family: inherit; font-size: 13.5px; font-weight: 450; line-height: 1.3; text-align: left; cursor: pointer;
}
body.su-eb .electronic-bill-select-item:last-child { border-bottom: 0; }
body.su-eb .electronic-bill-select-item:hover { background: #eef6fc; box-shadow: inset 4px 0 0 var(--eb-navy); }
body.su-eb .electronic-bill-select-item.is-selected { background: #f1f5f9; font-weight: 650; }
body.su-eb .electronic-bill-select-item:disabled { color: var(--eb-faint); cursor: default; background: #fff; box-shadow: none; }
@keyframes su-menu { from { opacity: 0; transform: translateY(-3px); } }

/* buscadores: lupa a la izquierda, como «Buscar cliente» en el formulario de facturas */
body.su-eb input[type="search"].input {
  padding-left: 36px; padding-right: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2350627a' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 12px center; background-size: 16px;
}
body.su-eb input[type="search"].input::-webkit-search-cancel-button { display: none; }
body.su-eb .auth-location-combobox .input { padding-right: 12px; }
body.su-eb .auth-location-chevron { display: none; }

/* resultados de ubicación: panel con barra navy y barra lateral al pasar */
body.su-eb .auth-location-results {
  top: calc(100% + 4px); max-height: min(52vh, 320px); padding: 0;
  border: 1px solid #cbd5e1; border-top: 3px solid var(--eb-navy); border-radius: 8px;
  box-shadow: 0 18px 38px rgba(16, 26, 38, .18); scrollbar-color: var(--eb-navy) #e8f1f8;
}
body.su-eb .auth-location-option { padding: 10px 14px; border-bottom: 1px solid var(--eb-menu-line); color: var(--eb-ink); font-size: 13.5px; }
body.su-eb .auth-location-option:hover,
body.su-eb .auth-location-option[aria-selected=true] { background: #eef6fc; color: var(--eb-ink); box-shadow: inset 4px 0 0 var(--eb-navy); }
body.su-eb .auth-location-selection { margin-top: 2px; font-size: 12.5px; color: var(--eb-ok); font-weight: 600; }

/* modal de actividad: resultados como el selector de actividad receptor */
body.su-eb .su-modal-panel > .input[type="search"] { min-height: 42px; }
body.su-eb .su-activity-results { border: 1px solid #cbd5e1; border-top: 3px solid var(--eb-navy); border-radius: 8px; scrollbar-color: var(--eb-navy) #e8f1f8; }
body.su-eb .su-activity-results .activity-result { border-bottom-color: var(--eb-menu-line); transition: background-color .14s ease, box-shadow .14s ease; }
body.su-eb .su-activity-results .activity-result:hover,
body.su-eb .su-activity-results .activity-result.is-selected { background: #eef6fc; box-shadow: inset 4px 0 0 var(--eb-navy); }
body.su-eb .su-activity-results .activity-result strong { color: var(--eb-ink); }
body.su-eb .su-activity-results .activity-result span { color: var(--eb-muted); font-family: ui-monospace, "IBM Plex Mono", Consolas, monospace; font-size: 12px; }
body.su-eb .su-activity-results .activity-result.is-selected .activity-result-radio { border: 5px solid var(--eb-blue); }
body.su-eb .su-result-heading { color: var(--eb-ink); }
body.su-eb .su-selected-summary { border-color: #c8dcf3; background: var(--eb-blue-50); color: #174f78; }
@media (prefers-reduced-motion: reduce) { body.su-eb .electronic-bill-select-menu { animation: none !important; } }
body.su-eb .su-activity.is-filled .electronic-bill-select-trigger { border-color: color-mix(in srgb, var(--eb-ok) 45%, var(--eb-field)); }

/* desplegables con buscador: el trigger es un campo de texto y la flecha un botón aparte */
body.su-eb input.electronic-bill-select-trigger { display: block; padding: 0 44px 0 12px; cursor: text; }
body.su-eb input.electronic-bill-select-trigger::placeholder { color: var(--eb-faint); font-weight: 400; }
body.su-eb input.electronic-bill-select-trigger:disabled { background: #f1f5f9; color: var(--eb-muted); border-style: dashed; cursor: not-allowed; }
body.su-eb .electronic-bill-select-control > .electronic-bill-select-arrow {
  position: absolute; top: 10px; right: 0; width: 40px; padding: 0; border: 0; border-left: 1px solid #d9e1ea;
  background: transparent; cursor: pointer;
}
body.su-eb .electronic-bill-select-control.is-disabled > .electronic-bill-select-arrow { cursor: not-allowed; opacity: .6; }
body.su-eb .electronic-bill-select-item.is-active { background: #eef6fc; box-shadow: inset 4px 0 0 var(--eb-navy); }
body.su-eb .electronic-bill-select-empty { padding: 12px 14px; color: var(--eb-muted); font-size: 13px; text-align: center; }
