:root{
  --brand:#1E2A5A;
  --accent:#6A9EFF;
  --text:#0F172A;
  --muted:#475569;
  --bg:white;
  --surface:#FFFFFF;
}

html, body {
  margin:0;
  padding:0;
  height:100%;
  background:var(--bg);
  font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color:var(--text);
}

.topbar{
  width:100%;
  padding:24px 20px 0;
}
.logo{
  height:48px;
  width:auto;
  display:block;
}

.container{
  max-width:860px;
  margin:10px auto;
  padding:0 24px;
  text-align:center;
}

/* HERO */
.hero{
  margin-bottom:40px;
}
.hero-content{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:40px;
  flex-wrap:wrap;
}
.hero-text{
  flex:1 1 420px;
}
.hero-text h1{
  font-size:42px;
  line-height:1.2;
  color:var(--brand);
  font-weight:800;
  margin:0 0 24px;
}
.hero-text .sub{
  font-size:20px;
  color:var(--muted);
  line-height:1.7;
  margin:0 0 16px;
  max-width:60ch;
}
.hero-image{
  flex:0 0 240px;
  display:flex;
  justify-content:center;
}
.hero-image img{
  height:200px;
  margin-bottom:10px;
}

/* RESPONSIVE */
@media (max-width:680px){
  .hero-text h1{ font-size:34px; }
  .hero-content{ flex-direction:column; text-align:center; }
  .hero-text{ flex:1 1 100%; }
}

.cta {
  display: inline-block;
  margin-top: 24px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
  padding: 16px 32px;
  border-radius: 12px;
  transition: background 0.2s ease, transform 0.05s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 18px rgba(30, 42, 90, 0.18);
  text-align: center;
  cursor:pointer;
}

.cta:hover {
  background: #192249;
  box-shadow: 0 8px 24px rgba(30, 42, 90, 0.22);
}

.cta:active {
  transform: translateY(1px);
}

.email-block {
  margin-top: 32px;
  max-width: 420px;
}

.email-label {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 10px;
}

.email-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 18px;
  border: 2px solid #d1d5db;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.email-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(106, 158, 255, 0.25);
}

.email-help {
  font-size: 16px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.6;
}

.container {
  padding-bottom: 75px; /* 👈 margen inferior permanente */
}

/* Estado de error del input */
.email-input.email-error {
  border: 2px solid #dc2626 !important;      /* rojo principal */
  background-color: #fee2e2 !important;      /* fondo rojo muy clarito */
  box-shadow: none !important;
}

/* Contenedor del spinner */
.loading {
  width: 56px;
  height: 56px;
  border: 5px solid rgba(30, 42, 90, 0.15); /* anillo base suave */
  border-top-color: var(--brand);           /* color principal */
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin-top: 28px;
  margin-left: auto;
  margin-right: auto;
}

/* Animación del giro */
@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== Desktop igual que móvil: columna centrada ===== */
@media (min-width: 900px){
  .container{
    /* ancho mayor, pero sigue centrado */
    max-width: clamp(720px, 70vw, 1000px);
    margin: 10px auto;
    padding: 0 24px;
  }

  .hero-content{
    flex-direction: column;      /* 👈 columna, como en móvil */
    align-items: center;
    justify-content: center;
    gap: 32px;
    text-align: center;          /* 👈 centra texto */
  }

  .hero-image{
    order: -1;                   /* imagen arriba */
    align-self: center;
  }

  .hero-text{
    flex: 0 1 auto;
    text-align: center;          /* 👈 texto centrado */
  }

  .hero-text h1{
    margin: 0 0 18px;
  }

  .hero-text .sub{
    max-width: 70ch;
    margin-left: auto;
    margin-right: auto;
  }

  .cta{
    margin-left: auto;
    margin-right: auto;
  }
}



.topbar {
  width: 100%;
  padding: 24px 20px 0;
  box-sizing: border-box;
  text-align: center; /* 👈 centra el logo */
}

.logo {
  height: 48px;
  width: auto;
  display: inline-block; /* 👈 para que el centrado funcione bien */
}

.email-block {
  margin-top: 32px;
  max-width: 420px;
  margin-left: auto;   /* 👈 centrado horizontal */
  margin-right: auto;  /* 👈 centrado horizontal */
  text-align: center;  /* 👈 centra contenido interno */
}

.email-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 18px;
  border: 2px solid #d1d5db;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  text-align: center; /* 👈 centra el texto dentro del input */
}

/* Estilos mínimos de las casillas */
.code-input{
  display:flex; gap:12px; justify-content:center; align-items:center; margin:18px 0 10px;
}
.code-input .code{
  width:48px; height:56px; text-align:center; font-size:28px; line-height:56px;
  border:1px solid #e5e7eb; border-radius:12px; outline:none; transition:box-shadow .15s, border-color .15s;
}
.code-input .code:focus{
  border-color:#3b82f6; box-shadow:0 0 0 3px rgba(59,130,246,.2);
}
#botoncodigo.disabled{ opacity:.5; pointer-events:none; }



/* ====== TrustMyAge · Página Legal ====== */
.legal .container{
  max-width:1100px;
  width:min(1100px, 92vw);
  margin:0 auto;
  padding:24px;
}
.legal .topbar{
  padding:24px 20px 8px;
  text-align:center;
  border-bottom:1px solid #e5e7eb;
  box-sizing:border-box; /* evita desbordes */
}
.legal .logo{ height:48px; display:inline-block; }

.legal h1{ font-size:clamp(26px,3.2vw,36px); margin:20px 0 8px; text-align:center; }
.legal .lead{ color:#64748b; text-align:center; margin:0 0 18px; }

.legal .nav{
  display:flex; flex-wrap:wrap; gap:8px;
  justify-content:center; margin:12px 0 24px;
}
.legal .nav a{
  display:inline-block; padding:10px 14px;
  border:1px solid #e5e7eb; border-radius:12px;
  text-decoration:none; color:#0f172a;
}
.legal .nav a:hover{ border-color:#3b82f6; }

.legal section{
  border:1px solid #e5e7eb; border-radius:16px;
  padding:18px; margin:18px 0; background:#fff;
}
.legal section h2{ font-size:clamp(20px,2.4vw,24px); margin:0 0 12px; }
.legal h3{ font-size:clamp(16px,2vw,18px); margin:16px 0 8px; }

.legal .badge{
  display:inline-block; margin-left:8px; font-size:12px;
  padding:2px 8px; border:1px solid #e5e7eb;
  border-radius:999px; background:#f1f5f9;
}

.legal ul{ margin:8px 0 8px 22px; }
.legal .footer{ margin:24px 0 12px; text-align:center; color:#64748b; font-size:13px; }
.legal .cta{
  display:inline-block; margin-top:10px; padding:10px 14px;
  border-radius:12px; background:#3b82f6; color:#fff; text-decoration:none;
}

/* ====== Selector de idioma (más discreto) ====== */
.legal .lang-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 16px 0 20px;
}

.legal .lang-selector a {
  display: inline-block;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 20px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #374151;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.legal .lang-selector a:hover {
  background: #e5e7eb;
  border-color: #3b82f6;
  color: #1e40af;
}

.legal .lang-selector a[aria-current="true"] {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
  font-weight: 500;
}

/* ===== Casilla de Términos (paso 1) ===== */
.terms-block{
  margin-top: 16px;
  display: flex;
  justify-content: center;
}
.terms-label{
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  color: var(--muted);
  user-select: none;
}
.terms-label input[type="checkbox"]{
  width: 18px;
  height: 18px;
  accent-color: var(--brand); /* colorea el check nativo */
  cursor: pointer;
}
.terms-label a{
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px dashed #cbd5e1;
}
.terms-label a:hover{
  text-decoration: underline;
}

/* Mensaje de error elegante (sin alert) */
.error-condiciones{
  margin-top: 10px;
  font-size: 14px;
  color: #dc2626;
  background: #fee2e2;
  border: 1px solid #fecaca;
  padding: 10px 12px;
  border-radius: 10px;
  text-align: center;
}

.cta.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* === Estilo mejorado del bloque de términos === */
.terms-block {
  margin-top: 28px;
  text-align: center;
}

.terms-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  padding: 12px 20px;
  background: #f9fafb;
  border: 2px solid #d1d5db;
  border-radius: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.terms-label:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(106, 158, 255, 0.25);
}

.terms-label input[type="checkbox"] {
  appearance: none;
  width: 24px;
  height: 24px;
  border: 2px solid #94a3b8;
  border-radius: 6px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.terms-label input[type="checkbox"]:checked {
  border-color: var(--brand);
  background: var(--brand);
}

.terms-label input[type="checkbox"]:checked::after {
  content: "✓";
  color: #fff;
  font-weight: bold;
  font-size: 16px;
  position: absolute;
  left: 4px;
  top: -2px;
}

.terms-label a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed #cbd5e1;
}

.terms-label a:hover {
  text-decoration: underline;
}

/* ===== Footer principal ===== */
.footer-main {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 28px 20px;
  text-align: center;
  margin-top: 30px;
}

.footer-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.footer-copy {
  font-size: 15px;
  color: #64748b;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--brand);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease-in-out;
}

.footer-links a:hover {
  border-bottom: 1px solid var(--brand);
  color: #192249;
}

/* Sticky footer */
body{
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.footer-main{
  margin-top: auto;   /* empuja el footer al fondo cuando hay poco contenido */
}

/* ===== OTP · Estilo "app moderna" alto contraste ===== */
.code-input{
  display:flex;
  gap:14px;
  justify-content:center;
  align-items:center;
  margin:22px 0 12px;
}

.code-input .code{
  width:72px;
  height:80px;
  font-size:36px;
  font-weight:800;
  letter-spacing:1px;
  text-align:center;
  color: var(--text);
  background:#ffffff;
  border:3px solid #1E2A5A;        /* borde grueso y visible */
  border-radius:16px;
  outline:none;
  box-shadow: 0 8px 24px rgba(30,42,90,0.10); /* profundidad sutil */
  transition: box-shadow .15s ease, transform .06s ease, border-color .2s ease;
}

.code-input .code:focus{
  border-color:#6A9EFF;             /* foco con color de acento */
  box-shadow: 0 0 0 6px rgba(106,158,255,0.20);
  transform: translateY(-1px);
}

.code-input .code:hover{
  box-shadow: 0 10px 28px rgba(30,42,90,0.14);
}

/* Estado deshabilitado del botón ya lo tienes; por si quieres alinear spacing */
#botoncodigo{ margin-top: 8px; }

/* Arreglo responsive OTP: cabe en móviles sin scroll horizontal */
.code-input{
  display:flex;
  justify-content:center;
  align-items:center;
  gap: clamp(6px, 2.4vw, 14px);
  margin:22px 0 12px;
  padding: 0 8px;                 /* margen interno para evitar desbordes por padding del contenedor */
  box-sizing: border-box;
}

.code-input .code{
  width:  clamp(40px, 11.8vw, 72px);
  height: clamp(52px, 14vw, 80px);
  font-size: clamp(22px, 6vw, 36px);
  font-weight: 800;
  letter-spacing: 1px;
  text-align: center;
  color: var(--text);
  background: #ffffff;
  border: 3px solid #1E2A5A;
  border-radius: clamp(10px, 3.6vw, 16px);
  outline: none;
  box-shadow: 0 8px 24px rgba(30,42,90,0.10);
  transition: box-shadow .15s ease, transform .06s ease, border-color .2s ease;
}

.code-input .code:focus{
  border-color:#6A9EFF;
  box-shadow: 0 0 0 6px rgba(106,158,255,0.20);
  transform: translateY(-1px);
}

/* Salvaguarda contra scroll lateral accidental */
html, body { overflow-x: hidden; }

/* Estado de error para las casillas del código */
.code-input .code.code-error{
  border: 3px solid #dc2626 !important;
  background: #fee2e2 !important;
  box-shadow: none !important;
}

/* ===== Paso 4 · Opciones en tarjetas ===== */
.options-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:18px;
  margin:24px 0 10px;
}

@media (min-width:720px){
  .options-grid{
    grid-template-columns:1fr 1fr;
    gap:20px;
  }
}

.option-card{
  list-style:none;
}

.option-hit{
  /* reset button */
  appearance:none;
  border:0;
  background:var(--surface);
  width:100%;
  text-align:left;
  cursor:pointer;

  display:flex;
  flex-direction:column;
  gap:10px;

  padding:18px 16px;
  border:2px solid #e5e7eb;
  border-radius:16px;
  box-shadow: 0 6px 18px rgba(30,42,90,0.08);
  transition: border-color .2s ease, box-shadow .2s ease, transform .05s ease;
}

.option-hit:hover{
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(30,42,90,0.12);
}

.option-hit:active{
  transform: translateY(1px);
}

.option-hit:focus-visible{
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 6px rgba(106,158,255,.20);
}

.option-icon{
  font-size:28px;
  line-height:1;
}

.option-title{
  margin:0;
  font-size:20px;
  font-weight:800;
  color:var(--brand);
}

.option-subtitle{
  margin:0;
  font-size:16px;
  color:var(--muted);
  font-weight:600;
}

.option-text{
  margin:0;
  font-size:16px;
  color:var(--text);
  line-height:1.6;
}

.option-bullets{
  margin:4px 0 6px 18px;
  color:var(--muted);
  font-size:15px;
  line-height:1.6;
}

.option-hit .cta{
  align-self:flex-start;
  font-size:16px;         /* un poco más compacto dentro de la tarjeta */
  padding:12px 16px;
  border-radius:10px;
  margin-top:8px;
}

/* ===== Paso 4 · Bloque final de tranquilidad ===== */
.reassure{
  margin-top:26px;
  padding:16px;
  border:2px dashed #d1d5db;
  border-radius:14px;
  background:#f8fafc;
}

.reassure-title{
  margin:0 0 8px 0;
  font-size:18px;
  font-weight:800;
  color:var(--brand);
  text-align:center;
}

.reassure-text{
  margin:6px 0;
  font-size:16px;
  color:var(--muted);
  text-align:center;
  line-height:1.7;
}

/* Accesibilidad: mejor objetivo táctil en móviles */
@media (max-width:680px){
  .option-hit{
    padding:16px;
  }
  .option-hit .cta{
    width:90%;
    text-align:center;
  }
}

/* ===== Frase destacada (texto23) ===== */
.highlight {
  background: #e8f0ff;                   /* azul suave */
  color: var(--brand);                   /* azul principal */
  font-size: 20px;
  padding: 16px 20px;
  border-radius: 14px;
  margin: 26px auto;
  text-align: center;
  box-shadow: 0 4px 12px rgba(106,158,255,0.15);
  max-width: 80ch;                       /* mantiene la línea legible */
}

/* ===== Verificar con tarjeta · Contenedor Stripe ===== */
#stripe-container{
  margin-top: 22px;
  padding: 18px;
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(30,42,90,0.08);
  min-height: 120px;                 /* espacio mínimo antes de montar Stripe */
  display: grid;
  place-items: center;               /* centra el contenido de Stripe */
}

/* Estado opcional por si muestras un spinner mientras carga */
#stripe-container.is-loading{
  opacity: .7;
}

/* Ifames/inputs que inserta Stripe: bordes y foco coherentes */
#stripe-container iframe,
#stripe-container input,
#stripe-container .StripeElement{
  width: 100%;
  max-width: 520px;                  /* cómodo en desktop */
  border-radius: 12px;
  outline: none;
}

#stripe-container .StripeElement--focus{
  box-shadow: 0 0 0 6px rgba(106,158,255,.20);
  border-color: var(--accent);
}

/* Ajuste responsive */
@media (max-width: 680px){
  #stripe-container{
    padding: 14px;
    min-height: 100px;
  }
}

.once-note {
  margin-top: 28px;
  font-size: 18px;
  font-weight: 600;
  color: var(--brand);
  text-align: center;
  line-height: 1.6;
}

/* ===== Callout: "Solo una vez" (más protagonista, distinto a highlight) ===== */
.once-callout{
  display:flex;
  align-items:center;
  gap:14px;
  margin:32px auto 10px;
  padding:18px 20px;
  border:2px solid var(--brand);
  border-left:8px solid var(--accent);     /* acento vertical potente */
  background:#f8fbff;                      /* sutil, distinto del highlight */
  border-radius:18px;
  box-shadow:0 10px 28px rgba(30,42,90,0.10);
  max-width: 900px;                        /* respira en desktop */
}

.once-emoji{
  font-size:28px;
  line-height:1;
}

.once-content{
  font-size:18px;
  line-height:1.55;
  color:var(--text);
}

.once-content strong{
  display:block;
  font-size:20px;
  color:var(--brand);
  margin-bottom:4px;
}

@media (max-width:680px){
  .once-callout{ padding:16px; border-left-width:6px; }
  .once-content{ font-size:17px; }
  .once-content strong{ font-size:19px; }
}

/* ===== Mensaje "Solo una vez" · Versión fuerte verde ===== */
.once-strong{
  display:flex;
  align-items:center;
  gap:16px;
  margin:36px auto;
  padding:20px 24px;
  background:#ecfdf5;                 /* verde muy claro */
  border:2px solid #34d399;           /* borde verde brillante */
  border-radius:18px;
  box-shadow:0 10px 28px rgba(30,42,90,0.10);
  max-width:900px;
  text-align:left;
}

.once-icon{
  font-size:32px;
  flex-shrink:0;
}

.once-text{
  font-size:18px;
  line-height:1.6;
  color:#065f46;                      /* verde oscuro texto */
}

.once-text strong{
  display:block;
  font-size:20px;
  font-weight:800;
  color:#047857;                      /* verde principal */
  margin-bottom:4px;
}

@media (max-width:680px){
  .once-strong{
    flex-direction:column;
    text-align:center;
  }
  .once-icon{
    font-size:28px;
  }
}

/* ===== Paso 5 · Liveness ===== */
.tma-live-stage{
  position: relative;
  max-width: 520px;
  margin: 14px auto 10px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(30,42,90,0.10);
  background:#000;
}
#tmaVideo{ width:100%; display:block; }
#tmaOverlay{
  position:absolute; inset:0; width:100%; height:100%;
  pointer-events:none;
}
.tma-badge{
  position:absolute; top:10px; left:10px;
  background: rgba(0,0,0,.60); color:#fff;
  padding:6px 10px; border-radius:10px; font-size:13px;
}
.tma-actions{ display:flex; gap:10px; justify-content:center; margin:8px 0 6px; }
.tma-ok{ text-align:center; color:#047857; font-weight:700; margin:6px 0 0; }

/* Documento */
.doc-drop{
  display:block; margin:10px auto 6px; max-width:520px; cursor:pointer;
  border:2px dashed #cbd5e1; border-radius:16px; padding:16px;
  background:#ffffff; transition:border-color .2s ease, box-shadow .2s ease;
}
.doc-drop:hover{ border-color: var(--accent); box-shadow:0 0 0 6px rgba(106,158,255,0.10); }
.doc-drop input{ display:none; }
.doc-ui{ display:flex; gap:12px; align-items:center; justify-content:center; }
.doc-icon{ font-size:28px; }
.doc-text{ font-weight:600; color:var(--brand); text-align:center; }
.doc-hint{ font-weight:400; color:var(--muted); font-size:14px; margin-top:2px; }
#tmaDocPreview{
  width:100%; margin-top:10px; border-radius:12px; display:block; object-fit:contain;
  max-height: 360px;
}

/* Desactivar botón continuar hasta que esté todo listo */
#tmaBtnContinuar.disabled{ opacity:.5; pointer-events:none; }

.tma-live-stage[style*="display:none"] {
  margin: 0;
  padding: 0;
  height: 0;
  overflow: hidden;
}

/* ===== Guía fija arriba del vídeo ===== */
.tma-instruction {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  color: #ffffff;
  background: rgba(30, 42, 90, 0.6);
  padding: 8px 16px;
  border-radius: 12px;
  font-size: clamp(14px, 2.6vw, 20px);
  font-weight: 600;
  z-index: 3;
  text-align: center;
  max-width: 90%;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

/* ===== Cartel central si no hay movimiento ===== */
.tma-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  background: rgba(220, 38, 38, 0.75); /* rojo traslúcido */
  font-size: clamp(20px, 3.4vw, 28px);
  font-weight: 800;
  text-align: center;
  padding: 18px 26px;
  border-radius: 18px;
  line-height: 1.4;
  max-width: 85%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  z-index: 2;
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: none; /* 👈 oculto por defecto */
}

/* cuando no hay mensaje, el bloque no ocupa espacio */
.tma-badge:empty {
  display: none !important;
}

.tma-instruction { display: none; }

.tma-instruction {
  display: none; /* 👈 oculto por defecto */
}

/* Forzar que el video rellene el contenedor sin franjas */
.tma-live-stage{
  position: relative;
  max-width: 520px;
  margin: 14px auto 10px;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 3 / 4;        /* alto tipo retrato; ajusta a 9/16 si prefieres */
}

#tmaVideo,
#tmaOverlay{
  width: 100%;
  height: 100%;
  object-fit: cover;          /* rellena recortando, sin barras */
  display: block;
  position: relative;
}

/* === Instrucción superior === */
.tma-instruction {
  display: none; /* ya lo tienes oculto por defecto */
  width: 90%; /* 👈 un poco más estrecho que el video */
  max-width: 480px; /* control en pantallas grandes */
  margin: 0 auto 12px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--brand);
  font-size: 18px; /* 👈 un poco más pequeño */
  font-weight: 600;
  text-align: center;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: opacity 0.3s ease;
}

/* === Parpadeo suave del cartel de "mueve la cabeza" === */
@keyframes tmaBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; } /* 👈 se atenúa a mitad de ciclo */
}

.tma-overlay-alert {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(220, 38, 38, 0.85); /* rojo semitransparente */
  color: #fff;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  display: none;
  animation: tmaBlink 1s ease-in-out infinite; /* 👈 parpadeo activo */
}

/* Contenedor de vídeo */
.tma-live-stage{
  position: relative;
  max-width: 520px;
  margin: 14px auto 10px;
  border-radius: 16px;
  overflow: hidden;
  background:#000;
  aspect-ratio: 3 / 4;
}
#tmaVideo, #tmaOverlay{
  width:100%; height:100%; object-fit:cover; display:block; position:relative;
}

/* Instrucción superior (se muestra solo durante grabación) */
.tma-instruction{
  display:none;
  position:absolute; top:10px; left:50%; transform:translateX(-50%);
  width:90%; max-width:480px; margin:0 auto 12px;
  background:rgba(255,255,255,0.6); color:var(--brand);
  font-size:18px; font-weight:600; text-align:center;
  padding:10px 14px; border-radius:12px; z-index:3;
  box-shadow:0 2px 8px rgba(0,0,0,.08);
}

/* Cartel rojo centrado cuando NO hay movimiento */
.tma-badge{
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  color:#fff; background:rgba(220,38,38,.85);
  font-size:clamp(20px,3.4vw,28px); font-weight:800; text-align:center;
  padding:18px 26px; border-radius:18px; line-height:1.4; max-width:85%;
  box-shadow:0 4px 16px rgba(0,0,0,.25); z-index:2; display:none;
}

/* Parpadeo suave */
@keyframes tmaBlink { 0%,100%{opacity:1} 50%{opacity:.35} }
.tma-badge.blink{ animation:tmaBlink 1s ease-in-out infinite; }

/* Cuando el contenedor está oculto, que no deje hueco */
.tma-live-stage[style*="display:none"]{ margin:0; padding:0; height:0; overflow:hidden; }

/* === Toast (notificación flotante) === */
#tmaToast{
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: none;
  padding: 14px 22px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 8px 24px rgba(30,42,90,0.25);
  max-width: 90vw;
  min-width: 240px;
  background: var(--brand);
  color: #fff;
}

#tmaToast.show {
  display: block;
  animation: tmaToastFade 3.2s ease forwards;
}

/* Variantes (opcional) */
#tmaToast.success { background: #047857; } /* verde */
#tmaToast.error   { background: #b91c1c; } /* rojo */
#tmaToast.info    { background: var(--brand); } /* por defecto */

/* Animación */
@keyframes tmaToastFade {
  0%   { opacity: 0; transform: translate(-50%, 40px); }
  10%  { opacity: 1; transform: translate(-50%, 0); }
  80%  { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 40px); }
}

/* === Fix toast overlay (forzar posición fija y z-index alto) === */
#tmaToast{
  position: fixed !important;
  left: 50% !important;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 24px) !important;
  transform: translateX(-50%) !important;
  z-index: 2147483647 !important; /* por encima de todo */
}

/* Caja de error visible en paso 5 */
.tma-error{
  margin: 14px auto 6px;
  max-width: 520px;
  padding: 14px 16px;
  border: 2px solid #fecaca;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(30,42,90,0.06);
}
.tma-error-msg{
  font-weight: 800;
  margin-bottom: 6px;
}
.tma-error-hint{
  color: #7f1d1d;
  font-weight: 600;
}

.once-strong .once-text strong{
  display:inline;   /* antes era block */
  margin:0;
  font-weight:800;
  color:#047857;
}
.once-strong .once-text{
  word-break: normal;
  overflow-wrap: anywhere;
}

/* === Vista previa de documentos: limitar tamaño === */
#tmaDocFrontPreview,
#tmaDocBackPreview {
  display: block;
  margin: 10px auto;
  max-width: 250px;
  max-height: 250px;
  object-fit: contain; /* mantiene proporción */
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}


/* Botones SÍ/NO compactos */
.qbtns{ display:flex; gap:10px; margin-top:8px; }
.qbtn{
  appearance:none; border:2px solid #d1d5db; background:#fff; color:var(--text);
  padding:10px 14px; border-radius:12px; font-weight:700; cursor:pointer;
  transition:border-color .2s, box-shadow .2s, background .2s;
}
.qbtn:hover{ border-color:var(--accent); box-shadow:0 0 0 4px rgba(106,158,255,.15); }
.qbtn.is-active{ background:var(--brand); color:#fff; border-color:var(--brand); }
.qgroup{ background:#f8fafc; border:1px solid #e5e7eb; border-radius:12px; padding:12px; }

/* ====== Botones de preguntas SÍ / NO (paso documentación) ====== */
.qbtn {
  display: inline-block;
  background: #ffffff;
  border: 2px solid #d1d5db;
  color: var(--text);
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(30, 42, 90, 0.05);
}

.qbtn:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 5px rgba(106, 158, 255, 0.15);
}

.qbtn.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 6px 18px rgba(30, 42, 90, 0.15);
}

.qbtn:active {
  transform: translateY(1px);
}

.qbtn + .qbtn {
  margin-left: 10px;
}

#tmaDocQuestions strong {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand);
}

#tmaDocFrontPreview,
#tmaDocBackPreview {
  display: block;
  margin: 12px auto;          /* 👈 centra horizontalmente */
  max-width: 250px;
  max-height: 250px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* ===== Centrar cámara y vista previa ===== */
#docCameraStage,
#backCameraStage {
  text-align: center;              /* centra el contenido dentro */
}

#docVideo,
#backVideo,
#tmaDocFrontPreview,
#tmaDocBackPreview,
#docCanvas,
#backCanvas {
  display: block;
  margin-left: auto;
  margin-right: auto;              /* 👈 centra horizontalmente */
  border-radius: 12px;
  max-width: 100%;
}

/* ===== Confirm bonito ===== */
.tma-confirm{
  position: fixed; inset: 0; z-index: 2147483646;
  display: none;
}
.tma-confirm.is-open{ display:block; }
.tma-confirm__backdrop{
  position:absolute; inset:0;
  background: rgba(15,23,42,0.45); /* capa oscura */
  backdrop-filter: saturate(120%) blur(2px);
}
.tma-confirm__card{
  position: relative;
  width: min(520px, 92vw);
  margin: clamp(80px, 12vh, 140px) auto 0;
  background: var(--surface);
  color: var(--text);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(30,42,90,0.35);
  padding: 20px;
  animation: tmaPop .12s ease-out;
}
@keyframes tmaPop { from { transform: translateY(6px); opacity:.85 } to { transform:none; opacity:1 } }

.tma-confirm__title{
  margin:0 0 8px; font-size:20px; font-weight:800; color: var(--brand);
}
.tma-confirm__msg{
  margin:0 0 16px; font-size:16px; color: var(--muted); line-height:1.6;
}
.tma-confirm__actions{
  display:flex; gap:10px; justify-content:flex-end;
}

.tma-confirm__btn{
  appearance:none; border:2px solid #d1d5db; background:#fff; color:var(--text);
  padding:12px 16px; border-radius:12px; font-weight:700; cursor:pointer;
  transition: border-color .2s, box-shadow .2s, transform .05s;
}
.tma-confirm__btn:hover{
  border-color: var(--accent);
  box-shadow: 0 0 0 5px rgba(106,158,255,.15);
}
.tma-confirm__btn:active{ transform: translateY(1px); }

.tma-confirm__btn--ok{
  background: var(--brand); color:#fff; border-color: var(--brand);
  box-shadow: 0 6px 18px rgba(30,42,90,0.15);
}
.tma-confirm__btn--ok:hover{
  border-color:#192249; box-shadow:0 8px 24px rgba(30,42,90,0.22);
}

/* ===== Prompt con input elegante ===== */
.tma-prompt__inputblock{
  margin: 14px 0 18px;
  display: flex;
  justify-content: center;
}

#tmaPromptInput{
  width: 100%;
  max-width: 420px;
  font-size: 18px;
  padding: 14px 16px;
  border: 2px solid #d1d5db;
  border-radius: 12px;
  text-align: center;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 18px rgba(30,42,90,0.08);
}

#tmaPromptInput:focus{
  border-color: var(--accent);
  box-shadow: 0 0 0 5px rgba(106,158,255,0.20);
}

#tmaPromptInput::placeholder{
  color: #94a3b8;
  font-style: italic;
}

#ifLiveness {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

#amazon {
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
}

.cta .loading{
  display: inline-block;
  margin: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;

  /* Override de colores: aro claro sobre botón oscuro */
  border: 3px solid rgba(255,255,255,0.35);
  border-top-color: #ffffff;

  animation: spin 0.9s linear infinite;
}

/* Checklist de requisitos de contraseña */
#tma-pass-rules{
  margin-top: 10px;
  text-align: left;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.pass-rule{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #991b1b;         /* rojo por defecto */
  margin-bottom: 4px;
}

.pass-icon{
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid #dc2626;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

/* Cuando la regla se cumple → verde */
.pass-rule.ok{
  color: #047857;
}
.pass-rule.ok .pass-icon{
  border-color: #16a34a;
  background: #16a34a;
  color: #ffffff;
  content: "✓";
}

/* Cuando NO se cumple → rojo */
.pass-rule.ko{
  color: #991b1b;
}
.pass-rule.ko .pass-icon{
  border-color: #dc2626;
  background: #fee2e2;
  color: #dc2626;
}

/* Más espacio entre contraseña y repetir contraseña */
.tma-campo-pass2{
  margin-top: 18px;
}

/* Wrapper de contraseña con botón "ver" */
.password-wrapper{
  position: relative;
  display: block;       /* antes era flex; ahora se comporta como un bloque normal */
}

/* El input ocupa el mismo ancho que cualquier .email-input normal */
.password-wrapper .email-input{
  width: 100%;
  box-sizing: border-box;
  padding-right: 44px;  /* hueco para el ojo */
}

/* Botón ojo dentro del campo */
.pass-toggle{
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: rgba(15,23,42,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  padding: 0;
}

.pass-toggle:hover{
  background: rgba(15,23,42,0.12);
}

.pass-toggle:active{
  transform: translateY(-50%) scale(0.96);
}

/* Enlace "¿Has olvidado tu contraseña?" en el login */
.link-forgot{
  font-size: 13px;
  color: #64748b;              /* gris azulado suave */
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.link-forgot:hover{
  color: #0f172a;              /* un poco más oscuro */
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* Hacer que el campo de contraseña tenga exactamente el mismo ancho que el campo email */
.tma-campo-pass2{
    width: 100%;
    padding: 0 !important;
    margin: 0 !important;
}

.tma-campo-pass2 .password-wrapper{
    width: 100%;
}

.tma-campo-pass2 .email-input{
    width: 100% !important;
}


/* =======================================
   TrustMyAge - PANEL DE CONTROL (Área clientes API)
   (Usa las mismas variables y estilo global)
   ======================================= */

body.tma-panel{
  display:block;              /* anulamos el flex del sticky-footer para el panel */
  min-height:100vh;
  background:var(--bg);
}

/* Layout general del panel */
.tma-panel-wrapper{
  display:flex;
  min-height:100vh;
}

/* SIDEBAR */
.tma-sidebar{
  width:240px;
  background:#0f172a;         /* oscuro corporativo */
  color:#fff;
  padding:24px 20px;
  display:flex;
  flex-direction:column;
}

.tma-logo img{
  width:150px;
  height:auto;
  display:block;
  margin-bottom:32px;
}

/* Menú lateral */
.tma-menu{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.tma-item{
  display:block;
  padding:10px 14px;
  border-radius:10px;
  font-size:15px;
  color:#cbd5f5;
  text-decoration:none;
  transition:background .15s ease, color .15s ease, transform .05s ease;
}

.tma-item:hover{
  background:#1e293b;
  color:#ffffff;
  transform:translateY(-1px);
}

.tma-item.logout{
  margin-top:18px;
  color:#fecaca;
}

.tma-item.logout:hover{
  background:#3f1d1d;
  color:#ffe4e6;
}

/* CONTENIDO PRINCIPAL */
.tma-content{
  flex:1;
  padding:32px 28px;
  background:#f7f8fa;
}

.tma-content h1{
  font-size:26px;
  margin-bottom:16px;
  color:var(--brand);
  font-weight:800;
}

.tma-content p{
  font-size:16px;
  margin-bottom:10px;
  color:var(--muted);
  line-height:1.6;
}

/* Responsive: menú más compacto en pantallas pequeñas */
@media (max-width:900px){
  .tma-sidebar{
    width:200px;
  }
}

@media (max-width:700px){
  body.tma-panel{
    display:flex;
    flex-direction:column;
  }

  .tma-panel-wrapper{
    flex-direction:column;
  }

  .tma-sidebar{
    width:100%;
    flex-direction:row;
    align-items:center;
    padding:12px 10px;
    overflow-x:auto;
  }

  .tma-logo{
    margin-right:16px;
  }

  .tma-logo img{
    margin-bottom:0;
    height:36px;
    width:auto;
  }

  .tma-menu{
    flex-direction:row;
    gap:8px;
  }

  .tma-content{
    padding:20px 16px;
  }
}

/* =======================================
   DASHBOARD - Estética SaaS
   ======================================= */

.tma-dashboard h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--brand);
    margin-bottom: 10px;
}

.tma-dashboard h2.tma-subtitle {
    margin-top: 40px;
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 700;
    color: #1d1d1f;
}

/* Aviso 2FA */
.tma-warning-box {
    background: #fff3cd;
    border: 1px solid #ffe69c;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 30px;
    font-size: 15px;
    color: #664d03;
}
.tma-warning-box a {
    color: #664d03;
    font-weight: bold;
    margin-left: 8px;
    text-decoration: underline;
}

/* Tarjetas de estadísticas */
.tma-stats {
    display: flex;
    gap: 20px;
    margin: 25px 0;
}

.tma-stat-card {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.tma-stat-card .label {
    font-size: 14px;
    color: var(--muted);
}
.tma-stat-card .value {
    font-size: 26px;
    font-weight: 700;
    display: block;
    margin-top: 5px;
}

/* Accesos rápidos */
.tma-quicklinks {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.tma-quicklink {
    background: #ffffff;
    padding: 14px 20px;
    border-radius: 10px;
    text-decoration: none;
    color: #111;
    font-size: 15px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
    transition: all .15s ease;
}

.tma-quicklink:hover {
    background: #f1f5f9;
    border-color: #d8dee4;
}

/* Modal 2FA login */
#tma-2fa-overlay{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,0.55);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9999;
}

#tma-2fa-modal{
  background:#ffffff;
  border-radius:14px;
  padding:24px 22px;
  max-width:360px;
  width:100%;
  box-shadow:0 15px 40px rgba(15,23,42,0.25);
}

#tma-2fa-modal h2{
  font-size:20px;
  margin-bottom:10px;
}

#tma-2fa-modal p{
  font-size:14px;
  margin-bottom:15px;
}

#tma-2fa-modal label{
  display:block;
  font-size:13px;
  font-weight:600;
  color: var(--brand);
  margin-bottom:4px;
  width:80%;
  max-width:240px;
  margin-left:auto;
  margin-right:auto;
  text-align:left;
}

#tma-2fa-modal input{
  width:80%;
  max-width:240px;
  display:block;
  margin:4px auto 16px;
  padding:10px 12px;
  font-size:16px;
  border-radius:12px;
  border:2px solid #d1d5db;
  outline:none;
  text-align:center;
  transition:border-color .2s ease, box-shadow .2s ease;
}

#tma-2fa-modal input:focus{
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(106,158,255,0.25);
}


#tma-2fa-modal #tma-2fa-mensaje{
  margin-bottom:10px;
  font-size:14px;
}

#tma-2fa-mensaje.error{
  color:#b91c1c;
}

#tma-2fa-mensaje.ok{
  color:#15803d;
}

#tma-2fa-modal .cta{
  width:100%;
  text-align:center;
}

/* Login: que la etiqueta ocupe toda la línea
   y los inputs usen el 100% del ancho del bloque */
.tma-campo label{
  display:block;
  margin-bottom:6px;
}

.tma-campo .email-input{
  display:block;
  width:100%;
  box-sizing:border-box;
}

#form-cambiar-pass .cta {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Botón de añadir IP (+) */
.tma-icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e5e7eb; /* gris suave */
    border: 1px solid #d1d5db;
    font-size: 22px;
    font-weight: bold;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.tma-icon-btn:hover {
    background: #d1d5db;
    border-color: #9ca3af;
}

/* Lista de IPs permitidas: con punto a la izquierda y texto un poco más grande */
.tma-api-ips-list {
    margin-top: 6px;
    margin-left: 18px;      /* separa el bullet del borde */
    padding-left: 0;
    list-style: disc;       /* recupera el punto a la izquierda */
    font-size: 15px;
}

.tma-api-ips-list li {
    margin-bottom: 4px;
}

.tma-api-ips-list code {
    font-size: 15px;
}

/* Botón papelera: icono dentro de botón redondeado, más grande y con pointer */
/* Botón para borrar IP: cuadrado, minimalista, elegante */
.tma-api-ip-delete {
    cursor: pointer;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px; /* cuadrado con esquinas suaves */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    font-size: 15px; /* tamaño del icono ✖ */
    margin-left: 8px;
    color: #6b7280; /* gris suave */
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tma-api-ip-delete:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
    color: #374151;
}


.tma-consumo-box {
    margin-top: 15px;
    padding: 15px 20px;
    border-radius: 10px;
    background: #111827;         /* fondo oscuro */
    border: 1px solid #1f2937;
    color: #ffffff;              /* ← TODO el texto en blanco */
}

.tma-consumo-box p,
.tma-consumo-box strong {
    color: #ffffff;              /* ← garantiza que los <p> y <strong> salen blancos */
}

.tma-consumo-barra {
    margin: 10px 0;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #1f2937;         /* fondo barra */
    overflow: hidden;
}

.tma-consumo-barra-inner {
    height: 100%;
    border-radius: 999px;
    background: #3b82f6;         /* color barra progreso */
}

/* Logs table */
.tma-logs-wrapper {
    margin-top: 20px;
    overflow-x: auto;
}

.tma-logs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
    font-size: 14px;
}

.tma-logs-table th {
    text-align: left;
    padding: 10px 12px;
    background: #0f172a;
    color: #fff;
    font-weight: 600;
}

.tma-logs-table td {
    padding: 8px 12px;
    background: #1e293b;
    color: #fff;
    border-top: 1px solid #334155;
    border-bottom: 1px solid #334155;
}

/* Rounded rows */
.tma-logs-table tr > td:first-child {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.tma-logs-table tr > td:last-child {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

/* Highlight OK/KO */
.tma-logs-table td:nth-child(5) { /* resultado */
    font-weight: bold;
}

.tma-logs-table td:nth-child(5):contains("ok") {
    color: #22c55e;
}

.tma-logs-table td:nth-child(5):contains("ko") {
    color: #ef4444;
}

/* Logs filters */
.tma-logs-filters {
  margin-top: 20px;
  margin-bottom: 10px;
}

.tma-logs-filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: flex-end;
}

.tma-logs-filter-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tma-logs-filter-item label {
  font-size: 13px;
  color: #4b5563;
}

.tma-logs-filter-item input[type="date"],
.tma-logs-filter-item select {
  padding: 9px 20px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  min-width: 160px;
}

.tma-logs-filter-submit button {
  padding: 11px 20px;
  border-radius: 10px;
  border: 0;
  background: #111827;
  color: #ffffff;
  font-size: 14px;
  cursor: pointer;
}

.tma-logs-filter-submit button:hover {
  background: #020617;
}

.tma-logs-filter-hint {
  margin-top: 6px;
  font-size: 12px;
  color: #6b7280;
}

/* Logs table */
.tma-logs-wrapper {
  margin-top: 15px;
  overflow-x: auto;
}

.tma-logs-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;
  font-size: 14px;
}

.tma-logs-table th {
  text-align: left;
  padding: 8px 10px;
  background: #f3f4f6;
  color: #111827;
  font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
}

.tma-logs-table td {
  padding: 6px 10px;
  background: rgba(15,23,42,0.02); /* súper sutil */
  color: #111827;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

/* rounded row */
.tma-logs-table tr > td:first-child {
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}

.tma-logs-table tr > td:last-child {
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

/* Pagination */
.tma-pagination {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tma-page-link {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  font-size: 13px;
  text-decoration: none;
  color: #111827;
}

.tma-page-link.active {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

.tma-panel-wrapper {
    display: flex;
    height: 100vh; /* Alto exacto de la ventana */
    overflow: hidden; /* así el scroll se controla solo en el main */
}

.tma-sidebar {
    flex: 0 0 260px;   /* ancho fijo de la barra izquierda */
    height: 100vh;     /* ocupa toda la altura visible */
    box-sizing: border-box;
}

.tma-content {
    flex: 1;                 /* ocupa todo el espacio restante */
    height: 100vh;           /* igual altura que la ventana */
    overflow-y: auto;         /* scroll solo vertical en el contenido */
    overflow-x: hidden;       /* evita scroll horizontal si algo se desborda */
    box-sizing: border-box;
    padding: 20px;            /* opcional, solo para margen interno */
}

.tma-table-btn {
    font-size: 13px;
    padding: 6px 10px;
    background: #ffffff;
    color: #000000;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
    border:1px solid black;
}

.tma-table-btn:hover {
    background: rgba(192,192,192,0.5);
}

.amplify-liveness-cancel-container,
.amplify-liveness-cancel-button {
  display: none !important;
}

/* ===== Botones filtro resultado OK / KO (logs) ===== */
.tma-status-buttons{
  display:flex;
  gap:8px;
  align-items:center;
}

.tma-status-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:10px;
  border:2px solid #d1d5db;
  background:#f9fafb;
  font-size:15px;
  text-decoration:none;
  color:#111827;
  cursor:pointer;
  box-shadow:0 2px 5px rgba(15,23,42,0.08);
  transition:
    background .15s ease,
    border-color .15s ease,
    box-shadow .15s ease,
    transform .05s ease;
}

.tma-status-btn:hover{
  border-color:var(--accent);
  box-shadow:0 0 0 4px rgba(106,158,255,.18);
}

.tma-status-btn-active{
  background:var(--brand);
  border-color:var(--brand);
  color:#ffffff;
  box-shadow:0 6px 16px rgba(30,42,90,.25);
  transform:translateY(1px);
}
