*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --fondo:          #0f1117;
  --fondo-tarjeta:  #1a1d27;
  --fondo-input:    #252836;
  --borde:          #2e3247;
  --primario:       #4f8ef7;
  --primario-hover: #3a78e8;
  --peligro:        #e05252;
  --peligro-hover:  #c93f3f;
  --exito:          #3db87a;
  --texto:          #e2e4ef;
  --texto-suave:    #8b90a7;
  --radio:          8px;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--fondo);
  color: var(--texto);
  font-size: 14px;
  min-height: 100vh;
}

/* ── Login ─────────────────────────────────────────── */
.ContenedorLogin {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.TarjetaLogin {
  background: var(--fondo-tarjeta);
  border: 1px solid var(--borde);
  border-radius: 12px;
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
}

.TarjetaLogin h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--texto);
}

.TarjetaLogin .Subtitulo {
  color: var(--texto-suave);
  font-size: 13px;
  margin-bottom: 28px;
}

/* ── Navegacion ─────────────────────────────────────── */
.Navegacion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: var(--fondo-tarjeta);
  border-bottom: 1px solid var(--borde);
}

.Navegacion .Logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--primario);
  letter-spacing: 1px;
}

.Navegacion .AccionNavegacion {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ── Layout principal ──────────────────────────────── */
.Contenido {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px;
}

.EncabezadoSeccion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.EncabezadoSeccion h2 {
  font-size: 18px;
  font-weight: 600;
}

/* ── Formularios ────────────────────────────────────── */
.Grupo {
  margin-bottom: 16px;
}

.Grupo label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--texto-suave);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.Grupo input {
  width: 100%;
  background: var(--fondo-input);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  color: var(--texto);
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}

.Grupo input:focus {
  border-color: var(--primario);
}

.Grupo input::placeholder {
  color: var(--texto-suave);
}

/* ── Botones ─────────────────────────────────────────── */
.Boton {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border: none;
  border-radius: var(--radio);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, opacity .2s;
}

.Boton:disabled { opacity: .5; cursor: not-allowed; }

.BotonPrimario   { background: var(--primario);  color: #fff; }
.BotonPrimario:hover:not(:disabled) { background: var(--primario-hover); }

.BotonPeligro    { background: var(--peligro);   color: #fff; }
.BotonPeligro:hover:not(:disabled) { background: var(--peligro-hover); }

.BotonSecundario { background: var(--fondo-input); color: var(--texto); border: 1px solid var(--borde); }
.BotonSecundario:hover:not(:disabled) { border-color: var(--primario); color: var(--primario); }

.BotonCompleto { width: 100%; justify-content: center; padding: 11px; font-size: 14px; }

/* ── Tabla ───────────────────────────────────────────── */
.ContenedorTabla {
  background: var(--fondo-tarjeta);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  background: var(--fondo-input);
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--texto-suave);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--borde);
}

tbody tr {
  border-bottom: 1px solid var(--borde);
  transition: background .15s;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(79,142,247,.04); }

tbody td {
  padding: 13px 16px;
  font-size: 13px;
  vertical-align: middle;
}

.Token {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: var(--texto-suave);
  background: var(--fondo-input);
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: color .2s;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

.Token:hover { color: var(--primario); }

.AccionFila {
  display: flex;
  gap: 6px;
}

/* ── Modal ───────────────────────────────────────────── */
.FondoModal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.FondoModal.Visible { display: flex; }

.Modal {
  background: var(--fondo-tarjeta);
  border: 1px solid var(--borde);
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 480px;
  position: relative;
}

.Modal h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
}

.FilaBoton {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ── Alertas ─────────────────────────────────────────── */
.Alerta {
  padding: 10px 14px;
  border-radius: var(--radio);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

.AlertaError   { background: rgba(224,82,82,.15);  border: 1px solid rgba(224,82,82,.4);  color: #f08080; }
.AlertaExito   { background: rgba(61,184,122,.15); border: 1px solid rgba(61,184,122,.4); color: #5dd49a; }
.Alerta.Visible { display: block; }

/* ── Seccion contrasena ─────────────────────────────── */
.TarjetaSeccion {
  background: var(--fondo-tarjeta);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 22px 24px;
  margin-top: 32px;
  max-width: 440px;
}

.TarjetaSeccion h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 18px;
}

/* ── Vacio ───────────────────────────────────────────── */
.VacioMensaje {
  text-align: center;
  padding: 40px;
  color: var(--texto-suave);
  font-size: 13px;
}

/* ── Tutorial ────────────────────────────────────────── */
.TarjetaTutorial { max-width: 100%; margin-top: 32px; }

.PasoTutorial {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.NumeroPaso {
  background: var(--primario);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.TextoTutorial {
  color: var(--texto-suave);
  font-size: 13px;
  margin-top: 6px;
}

.CodigoLinea {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  background: var(--fondo-input);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 8px 12px;
  color: var(--primario);
  margin-top: 6px;
}

.BloquecodIgo {
  background: var(--fondo-input);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 12px 14px;
  margin-top: 8px;
}

.BloquecodIgo pre {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--texto);
  white-space: pre;
  overflow-x: auto;
  line-height: 1.6;
}

.LineaCodigo {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--texto);
  line-height: 1.8;
}

.CodClave { color: var(--primario); font-weight: 700; }

/* Tabs */
.TabContenedor { margin-top: 10px; width: 100%; }

.TabLista {
  display: flex;
  gap: 4px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--borde);
  padding-bottom: 0;
}

.TabBoton {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--texto-suave);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color .2s, border-color .2s;
  margin-bottom: -1px;
}

.TabBoton:hover { color: var(--texto); }
.TabBoton.Activo { color: var(--primario); border-bottom-color: var(--primario); }

.TabContenido {
  display: none;
  background: var(--fondo-input);
  border: 1px solid var(--borde);
  border-top: none;
  border-radius: 0 0 var(--radio) var(--radio);
  padding: 14px;
}

.TabContenido.Activo { display: block; }

.TabContenido pre {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--texto);
  white-space: pre;
  overflow-x: auto;
  line-height: 1.7;
}
