:root {
  --txt: #f4f3ff; --muted: rgba(220, 232, 255, .68); --line: rgba(255, 255, 255, .16);
  --panel: rgba(6, 16, 46, .52); --accent: #4f8bff; --err: #ff9d95;
  --warn-bg: rgba(255, 196, 80, .14); --warn-txt: #ffd98a;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; color: var(--txt); background: #040b1f;
  font: 16px/1.5 "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Fondo */
#fondo { position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(900px 600px at 15% 0%, rgba(31, 91, 255, .30), transparent 60%),
    radial-gradient(800px 600px at 90% 100%, rgba(16, 58, 156, .35), transparent 60%),
    linear-gradient(160deg, #071a4a 0%, #050f2e 45%, #040b1f 100%); }
#fondo::after { content: ""; position: absolute; inset: 0; opacity: .06; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns=%27http://www.w3.org/2000/svg%27 width=%27160%27 height=%27160%27><filter id=%27n%27><feTurbulence type=%27fractalNoise%27 baseFrequency=%270.9%27 numOctaves=%272%27/></filter><rect width=%27100%25%27 height=%27100%25%27 filter=%27url(%23n)%27/></svg>"); }
.silk-container { position: relative; width: 100%; height: 100%; overflow: hidden; }
.silk-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.velo { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(4, 11, 31, 0) 30%, rgba(4, 11, 31, .55) 100%); }
#vista-login, #vista-hub { position: relative; z-index: 2; }

/* Tipografía */
h1 { margin: 0; font-weight: 700; letter-spacing: -.02em; }
.sub { color: var(--muted); margin: .35rem 0 0; }
code { background: rgba(255,255,255,.12); padding: 1px 6px; border-radius: 5px; font-size: .88em; }

/* Login */
.centro { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 24px;
  backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 30px 80px rgba(2, 6, 24, .55), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.login { width: 100%; max-width: 410px; padding: 40px 34px 28px; text-align: center; }
.logo { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 20px;
  background: rgba(255, 255, 255, .08); border: 1px solid var(--line); margin-bottom: 18px;
  box-shadow: 0 8px 30px rgba(79, 139, 255, .35); }
.marca { font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; }
.marca span { background: linear-gradient(120deg, #ffffff, #9cc2ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lema { color: var(--muted); font-size: .95rem; margin: .4rem 0 1.8rem; }

.campo { text-align: left; margin-bottom: 1rem; }
label { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); margin-bottom: .4rem; }
input {
  width: 100%; padding: 13px 14px; font: inherit; font-size: .98rem; color: var(--txt);
  background: rgba(255, 255, 255, .07); border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
input::placeholder { color: rgba(220, 232, 255, .35); }
input:hover { background: rgba(255, 255, 255, .1); }
input:focus { outline: none; border-color: #9cc2ff; background: rgba(255, 255, 255, .11);
  box-shadow: 0 0 0 4px rgba(79, 139, 255, .28); }
input:-webkit-autofill { -webkit-text-fill-color: var(--txt); transition: background-color 9999s; }
.con-boton { position: relative; }
.con-boton input { padding-right: 46px; }
.ojo { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px;
  display: grid; place-items: center; background: none; border: 0; border-radius: 9px; color: var(--muted); cursor: pointer; }
.ojo:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.ojo[aria-pressed="true"] { color: #fff; }

.btn {
  width: 100%; margin-top: .6rem; padding: 14px; font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer;
  color: #071a4a; background: linear-gradient(180deg, #ffffff, #d6e6ff); border: 0; border-radius: 12px;
  box-shadow: 0 10px 26px rgba(79, 139, 255, .45); transition: transform .12s, box-shadow .12s, filter .12s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(79, 139, 255, .6); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid rgba(255, 255, 255, .6); outline-offset: 2px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-link { display: block; margin: .6rem auto 0; background: none; border: 0; padding: 0; color: #c6dcff;
  cursor: pointer; font: inherit; font-size: .88rem; text-decoration: underline; }
.error { color: var(--err); margin: .2rem 0 .4rem; font-size: .88rem; text-align: left; }
.aviso { margin-top: 1.2rem; padding: 12px 14px; border-radius: 12px; background: var(--warn-bg);
  color: var(--warn-txt); font-size: .85rem; text-align: left; }
.pie { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 1.6rem 0 0;
  font-size: .78rem; color: rgba(220, 232, 255, .5); }

/* Hub */
.barra { display: flex; justify-content: space-between; align-items: center; padding: 16px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line); background: rgba(5, 12, 38, .45);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.marca-barra { font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.marca-barra span { color: #9cc2ff; }
.usuario { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: .88rem; min-width: 0; }
.usuario span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-sec { padding: 8px 16px; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; color: var(--txt);
  background: rgba(255, 255, 255, .08); border: 1px solid var(--line); border-radius: 10px; transition: background .15s; }
.btn-sec:hover { background: rgba(255, 255, 255, .16); }
.contenido { max-width: 1040px; margin: 0 auto; padding: clamp(32px, 7vw, 72px) clamp(16px, 4vw, 40px); }
.etiqueta { margin: 0 0 .5rem; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #9cc2ff; }
.contenido h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.rejilla { display: grid; gap: 18px; margin-top: 2.2rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.modulo {
  display: block; padding: 24px; color: inherit; text-decoration: none; border-radius: 20px;
  background: var(--panel); border: 1px solid var(--line);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); transition: transform .15s, border-color .15s, box-shadow .15s;
}
a.modulo:hover { transform: translateY(-4px); border-color: rgba(169, 156, 255, .7); box-shadow: 0 20px 50px rgba(4, 14, 60, .6), inset 0 1px 0 rgba(255, 255, 255, .14); }
a.modulo:focus-visible { outline: 3px solid rgba(255, 255, 255, .6); outline-offset: 3px; }
.icono { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(79, 139, 255, .55), rgba(79, 139, 255, .15)); border: 1px solid var(--line); }
.icono svg { width: 26px; height: 26px; }
.modulo h2 { font-size: 1.2rem; margin: 0 0 .3rem; letter-spacing: -.01em; }
.modulo p { margin: 0; color: var(--muted); font-size: .9rem; }
.entrar { display: inline-flex; align-items: center; gap: 6px; margin-top: 1rem; font-size: .85rem; font-weight: 700; color: #c6dcff; }
.modulo.pronto { opacity: .5; border-style: dashed; }
.chip { display: inline-block; margin-top: .9rem; font-size: .72rem; padding: 3px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); color: var(--muted); }

@media (max-width: 480px) { .login { padding: 32px 22px 22px; border-radius: 20px; } .marca { font-size: 1.8rem; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
