/* Aceptación de documentos en la activación (tme-legal.js): paso 1 contraseña, paso 2 documentos */

/* Encabezado propio en lugar del original del paso */
#step-password.legal-on > .auth-icon, #step-password.legal-on > .auth-title, #step-password.legal-on > .auth-sub { display: none; }
/* Reglas: la lista larga se cambia por una línea */
#step-password.legal-on > .auth-reglas-titulo, #step-password.legal-on > #pass-reglas { display: none; }
/* Paso 1: contraseña (sin documentos ni botón final) */
#step-password.lg-p1 #legal-bloque, #step-password.lg-p1 #btn_password { display: none; }
/* Paso 2: documentos (sin campos de contraseña) */
#step-password.lg-p2 > .auth-label, #step-password.lg-p2 > .auth-in, #step-password.lg-p2 #lg-reglas, #step-password.lg-p2 #lg-continuar { display: none; }
#step-password:not(.legal-on) #lg-reglas, #step-password:not(.legal-on) #lg-continuar, #step-password:not(.legal-on) .lg-regresar { display: none; }

.lg-paso { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--azul); margin: 0 0 4px; }
#legal-cab .auth-title { margin-bottom: 8px; }
#legal-cab .auth-sub { margin-bottom: 18px; }
.lg-sub { color: var(--texto-2); font-size: 14px; margin: 4px 0 14px; }
.lg-datos { margin: 6px 0 4px; }
.lg-dato { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border: 1px solid var(--borde); border-radius: 10px; background: var(--campo); margin-bottom: 6px; font-size: 13.5px; }
.lg-dato span { color: var(--texto-2); }
.lg-dato strong { color: var(--texto); font-weight: 600; text-align: right; word-break: break-word; }
.lg-sms { font-size: 11.5px; line-height: 1.45; color: var(--texto-2); margin: 0 2px 12px; }

/* Reglas de contraseña en una línea */
#lg-reglas { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 18px; font-size: 12px; }
#lg-reglas span { padding: 3px 9px; border-radius: 999px; background: var(--campo); border: 1px solid var(--borde); color: var(--texto-2); }
#lg-reglas span.ok { background: #f0fdf4; border-color: #86efac; color: #15803d; }
#lg-reglas span.ok::before { content: "✓ "; }
#lg-reglas small { flex-basis: 100%; color: var(--texto-2); font-size: 11.5px; }

/* Documentos */
.lg-caja { border: 1px solid var(--borde); background: #fff; border-radius: 12px; padding: 14px 16px; margin: 0 0 12px; }
.lg-aviso { font-weight: 600; font-size: 13px; line-height: 1.5; color: var(--texto); margin: 0 0 10px; }
.lg-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--texto); margin: 0; cursor: pointer; }
.lg-check input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--azul); cursor: pointer; }
.lg-check a { color: var(--link); font-weight: 600; text-decoration: underline; }
.lg-check.lg-apagado { opacity: .5; cursor: not-allowed; }
.lg-check.lg-apagado input { cursor: not-allowed; }
.lg-nota { font-size: 12px; color: var(--texto-2); margin: 8px 0 0 28px; }

.lg-esign { background: #f8f9fc; }
.lg-esign-tit { font-size: 14px; font-weight: 700; color: var(--texto); margin: 0 0 6px; }
.lg-esign-txt { font-size: 12.5px; line-height: 1.5; color: var(--texto-2); margin: 0 0 12px; }
.lg-esign-txt a { color: var(--link); font-weight: 600; }
.lg-esign-conf { font-size: 13px; font-weight: 600; color: var(--texto); margin: 0 0 8px; }
.lg-num { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 10px; }
.lg-num > span { flex: 0 0 22px; height: 22px; border-radius: 50%; background: var(--azul); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.lg-num > div { flex: 1 1 auto; }
.lg-num p { font-size: 13px; color: var(--texto); margin: 0 0 6px; }
.lg-btn-pdf { height: 40px; padding: 0 16px; border-radius: 10px; border: 1.5px solid var(--azul); background: #fff; color: var(--azul); font-weight: 600; font-size: 14px; cursor: pointer; }
.lg-btn-pdf:hover { background: rgba(18, 50, 154, .06); }
.lg-btn-pdf:disabled { opacity: .6; cursor: wait; }
.auth #lg-codigo { width: 120px; height: 40px; padding: 0 10px; text-align: center; font: 600 17px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .3em; text-transform: uppercase; border-radius: 10px; }
.auth #lg-codigo.ok { border-color: #15803d; background: #f0fdf4; color: #15803d; }
.lg-esign-msg { font-size: 12.5px; color: var(--texto-2); margin: 6px 0 0; }
.lg-esign-msg:empty { display: none; }
.lg-esign-msg.ok { color: #15803d; font-weight: 600; }
.lg-esign-msg.ok::before { content: "✓ "; }
.lg-esign-msg.error { color: #b91c1c; }
.lg-esign .lg-check { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--borde); }

#step-password.legal-on #btn_password:disabled, #lg-continuar:disabled { background: #a9b3c4; border-color: #a9b3c4; }
.lg-regresar { text-align: center; margin: 12px 0 0; font-size: 14px; }
.lg-regresar a { color: var(--link); }

.lg-ver { font-weight: 600; color: var(--link); white-space: nowrap; }
.lg-detalle { margin-top: -6px; }

/* Documentos legales (menú del perfil) */
#tmeDocsModal .modal-title { font-weight: 700; color: #12329a; }
.dl-intro { color: #4b5563; font-size: 14px; margin: 0 0 14px; }
.dl-firma { display: flex; gap: 12px; align-items: flex-start; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; font-size: 14px; color: #14532d; }
.dl-firma i { font-size: 26px; color: #16a34a; line-height: 1; }
.dl-firma span { color: #166534; font-size: 13px; }
.dl-doc { border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px 14px; margin: 0 0 10px; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; }
.dl-doc-tit { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.dl-doc-tit strong { font-size: 15px; color: #111827; }
.dl-ver { font-size: 12px; color: #6b7280; }
.dl-doc-est { grid-column: 1; font-size: 13px; }
.dl-doc-ligas { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.dl-ok { color: #15803d; }
.dl-pend { color: #b45309; }
.dl-btn { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 8px; border: 1px solid #12329a; color: #12329a; text-decoration: none; white-space: nowrap; }
.dl-btn:hover { background: rgba(18, 50, 154, .06); color: #12329a; }
.dl-btn-2 { border-color: #d1d5db; color: #374151; }
.dl-pronto { font-size: 12px; color: #9ca3af; white-space: nowrap; }
.dl-ayuda { font-size: 12.5px; color: #6b7280; margin: 14px 0 0; }
@media (max-width: 575px) {
  .dl-doc { grid-template-columns: 1fr; }
  .dl-doc-ligas { grid-column: 1; grid-row: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
}
