/* INMOVILIZADORES ECU — hoja de estilos
   Línea visual inspirada en el lenguaje de EAATA: cabecera cian, banners azul profundo con destellos de luz,
   titulares Montserrat en mayúsculas muy gruesas, píldoras de color y tarjetas blancas limpias.
   Colores medidos en eu.eaata.pro (no se usan logos ni imágenes de EAATA). */
:root {
  --cyan: #009ee0;
  --cyan-2: #0088c4;
  --aqua: #01e5f1;
  --navy: #15446d;
  --navy-2: #103757;
  --deep: #0a1e35;
  --ink: #1c1c22;
  --grey: #3c3c3b;
  --line: #d9dbe1;
  --mute: #b4b4bd;
  --red: #d10000;
  --yellow: #ffb800;
  --yellow-2: #f2a900;

  --bg: #ffffff;
  --bg-soft: #f2f6f9;
  --surface: #ffffff;
  --text: #1c1c22;
  --muted: #5a6270;
  --cyan-soft: #e3f4fc;
  --ok: #0f8a4a;
  --ok-soft: #e4f5eb;
  --warn: #8a5a00;
  --warn-soft: #fff4d4;
  --danger: var(--red);
  --danger-soft: #fdeaea;

  --r-lg: 16px;
  --r-md: 12px;
  --r-xl: 24px;
  --pill: 99px;
  --shadow-sm: 0 1px 2px rgba(10, 30, 53, .06);
  --shadow: 0 10px 30px -12px rgba(10, 30, 53, .22);
  --shadow-lg: 0 30px 60px -20px rgba(10, 30, 53, .38);
  --ease: cubic-bezier(.2, .75, .2, 1);
  --glow:
    radial-gradient(60% 90% at 78% 30%, rgba(0, 158, 224, .55), transparent 60%),
    radial-gradient(40% 60% at 8% 100%, rgba(1, 229, 241, .20), transparent 70%),
    linear-gradient(115deg, var(--deep) 0%, var(--navy) 58%, #0d3254 100%);
  --font: "Montserrat", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { scroll-padding-top: 80px; }
body { background: var(--bg-soft); color: var(--text); font: 400 15px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { line-height: 1.15; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--cyan); color: #fff; }

.boot { height: 100vh; display: grid; place-items: center; background: var(--glow); }
.boot img { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; transform: scale(.94); } }

/* Barra de carga entre vistas */
html::before {
  content: ""; position: fixed; z-index: 100; top: 0; left: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, transparent, var(--aqua) 40%, var(--yellow) 60%, transparent);
  transform: translateX(-100%); opacity: 0; pointer-events: none;
}
html.is-loading::before { opacity: 1; animation: loadbar 1s var(--ease) infinite; }
@keyframes loadbar { to { transform: translateX(100%); } }

/* ---------- Píldoras (como las de EAATA) ---------- */
.pill { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: var(--pill); font-size: 12px; font-weight: 700; color: #fff; letter-spacing: .01em; }
.pill-navy { background: var(--navy); }
.pill-aqua { background: var(--aqua); color: var(--deep); }
.pill-red { background: var(--red); }
.pill-yellow { background: var(--yellow); color: var(--ink); }

/* ---------- Botones y campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s, box-shadow .2s, transform .15s var(--ease);
}
.btn:hover { border-color: var(--cyan); color: var(--navy); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-pill { border-radius: var(--pill); }
.btn-primary { background: var(--cyan); border-color: var(--cyan); color: #fff; }
.btn-primary:hover { background: var(--cyan-2); border-color: var(--cyan-2); color: #fff; box-shadow: 0 8px 20px -8px rgba(0, 158, 224, .8); }
.btn-primary:disabled { background: var(--cyan); color: #fff; }
.btn-navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--deep); border-color: var(--deep); color: #fff; }
.btn-cta { background: var(--yellow); border-color: var(--yellow); color: var(--ink); font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.btn-cta:hover { background: var(--yellow-2); border-color: var(--yellow-2); color: var(--ink); box-shadow: 0 10px 24px -8px rgba(255, 184, 0, .8); }
.btn-ghost-light { background: transparent; border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .12); border-color: #fff; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--ink); border-color: transparent; }
.btn-danger { color: var(--red); border-color: #f0c4c4; background: var(--surface); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--red); color: var(--red); }
.btn-sm { height: 34px; padding: 0 13px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-sm svg { width: 16px; height: 16px; }
.btn.is-busy::before { content: ""; width: 16px; height: 16px; border-radius: 50%; flex: none; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--navy); }
.field small { color: var(--muted); font-size: 12px; }
.input, .select, .textarea {
  width: 100%; height: 48px; padding: 0 16px; border-radius: var(--r-md); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--mute); }
.input::placeholder, .textarea::placeholder { color: #9aa1ad; }
.textarea { height: auto; min-height: 90px; padding: 12px 16px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(0, 158, 224, .16); }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--cyan); }
.form-grid { display: grid; gap: 16px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
.form-error { color: var(--red); font-size: 14px; font-weight: 500; padding: 10px 14px; border-radius: var(--r-md); background: var(--danger-soft); animation: shake .3s var(--ease); }
.form-error:empty { display: none; }
@keyframes shake { 25% { transform: translateX(-4px); } 60% { transform: translateX(3px); } }
.sub { color: var(--muted); font-size: 13px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 52px; }
.pw-toggle { position: absolute; right: 6px; top: 6px; height: 36px; width: 40px; border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 10px; display: grid; place-items: center; }
.pw-toggle:hover { color: var(--navy); background: var(--bg-soft); }
.pw-toggle svg { width: 18px; height: 18px; }

/* ---------- Marca ---------- */
.brandmark { display: inline-flex; align-items: center; gap: 12px; color: #fff; }
.brandmark img { width: 42px; height: 42px; transition: transform .4s var(--ease); }
.brandmark:hover img { transform: rotate(-8deg) scale(1.05); }
.brandmark b { display: block; font-size: 16px; font-weight: 800; letter-spacing: .01em; line-height: 1.1; }
.brandmark b span { color: var(--deep); }
.brandmark small { display: block; font-size: 12px; font-weight: 500; color: rgba(255, 255, 255, .85); }

/* =====================================================================
   LANDING PÚBLICO
   ===================================================================== */
.landing { background: #fff; overflow-x: clip; }
.wrap { width: min(1200px, 100% - 48px); margin: 0 auto; }

.util-bar { background: #fff; color: var(--grey); font-size: 13px; font-weight: 500; border-bottom: 1px solid var(--line); }
.util-bar .wrap { display: flex; justify-content: space-between; align-items: center; height: 38px; gap: 12px; }
.util-right { color: var(--cyan); font-weight: 600; }

.l-head { position: sticky; top: 0; z-index: 40; background: var(--cyan); color: #fff; transition: box-shadow .3s, background .3s; }
.l-head .wrap { display: flex; align-items: center; gap: 28px; height: 78px; transition: height .3s var(--ease); }
.l-head.is-stuck { box-shadow: 0 10px 30px -10px rgba(10, 30, 53, .45); }
.l-head.is-stuck .wrap { height: 64px; }
.l-nav { display: flex; gap: 4px; margin-left: auto; }
.l-nav button {
  position: relative; border: 0; background: none; color: #fff; font-weight: 500; font-size: 15px; padding: 8px 14px; cursor: pointer; border-radius: var(--pill);
  transition: background .2s;
}
.l-nav button:hover { background: rgba(255, 255, 255, .16); }
.l-head .btn-navy { height: 42px; }

/* ---- Héroe en carrusel ---- */
.hero { position: relative; min-height: clamp(560px, 78vh, 700px); background: var(--glow); color: #fff; overflow: hidden; isolation: isolate; }
.hero-glow { position: absolute; inset: -40%; z-index: -1; pointer-events: none;
  background: conic-gradient(from 0deg at 70% 45%, transparent 0 20%, rgba(1, 229, 241, .12) 25%, transparent 32% 60%, rgba(0, 158, 224, .18) 66%, transparent 74%);
  animation: sweep 18s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(transparent, rgba(10, 30, 53, .45)); pointer-events: none; z-index: 0; }
.slides { position: relative; min-height: inherit; }
.slide { position: absolute; inset: 0; display: flex; align-items: center; opacity: 0; visibility: hidden; transition: opacity .8s var(--ease), visibility 0s .8s; }
.slide.is-active { opacity: 1; visibility: visible; transition: opacity .8s var(--ease); z-index: 1; }
.slide-grid > * { min-width: 0; }
.slide-grid { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 48px; padding: 56px 0 80px; }
.slide-copy > * { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.slide.is-active .slide-copy > * { opacity: 1; transform: none; }
.slide.is-active .slide-copy > :nth-child(2) { transition-delay: .1s; }
.slide.is-active .slide-copy > :nth-child(3) { transition-delay: .2s; }
.slide.is-active .slide-copy > :nth-child(4) { transition-delay: .3s; }
.slide-copy p { font-size: 18px; color: rgba(255, 255, 255, .82); max-width: 44ch; margin: 18px 0 30px; }
.display {
  margin: 18px 0 0; font-weight: 900; text-transform: uppercase; letter-spacing: -.015em; line-height: .98;
  font-size: clamp(34px, 4vw, 62px);
}
.display .hl { color: var(--yellow); }
.display.sm { font-size: clamp(34px, 4vw, 54px); margin: 0; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-row .btn { height: 52px; padding: 0 28px; font-size: 15px; }

.slide-art { position: relative; display: grid; place-items: center; transition: transform .3s var(--ease); transform-style: preserve-3d; }
.slide-art > * { opacity: 0; transform: translateX(60px) scale(.94); transition: opacity .9s var(--ease) .15s, transform .9s var(--ease) .15s; }
.slide.is-active .slide-art > * { opacity: 1; transform: none; }
.device-float { position: relative; width: min(100%, 540px); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { translate: 0 -14px; } }
.device-card { position: relative; border-radius: var(--r-xl); overflow: hidden; background: #fff; box-shadow: 0 40px 80px -24px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .25), 0 0 80px rgba(0, 158, 224, .45); }
.device-card video { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.float-tag {
  position: absolute; padding: 8px 14px; border-radius: var(--pill); font-size: 12px; font-weight: 800; letter-spacing: .04em;
  background: rgba(255, 255, 255, .95); color: var(--navy); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5);
  animation: bob 5s ease-in-out infinite;
}
.float-tag::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); margin-right: 8px; box-shadow: 0 0 0 4px rgba(0, 158, 224, .2); }
.float-tag.t1 { left: -26px; top: 14%; }
.float-tag.t2 { right: -20px; top: 46%; animation-delay: -1.6s; }
.float-tag.t3 { left: 12%; bottom: -18px; animation-delay: -3.2s; }
@keyframes bob { 50% { translate: 0 -10px; } }

.art-brands { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; width: min(100%, 480px); }
.ab {
  display: grid; gap: 6px; justify-items: start; padding: 18px; border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(6px);
  font-size: 12px; font-weight: 700; letter-spacing: .04em; color: rgba(255, 255, 255, .8);
  animation: lit 7s ease-in-out infinite;
}
.ab b { font-size: 26px; font-weight: 900; color: #fff; line-height: 1; }
.ab-1 { animation-delay: -1s; } .ab-2 { animation-delay: -2s; } .ab-3 { animation-delay: -3s; } .ab-4 { animation-delay: -4s; } .ab-5 { animation-delay: -5s; } .ab-6 { animation-delay: -6s; }
.ab-6 { grid-column: 2; }
@keyframes lit { 0%, 70%, 100% { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .16); } 80% { background: var(--cyan); border-color: var(--aqua); box-shadow: 0 0 40px rgba(0, 158, 224, .6); } }

.art-key { width: min(100%, 360px); overflow: visible; }
.art-key .wave { stroke: var(--aqua); stroke-width: 2; opacity: 0; transform-origin: 160px 160px; animation: wave 3.6s ease-out infinite; }
.art-key .w2 { animation-delay: 1.2s; } .art-key .w3 { animation-delay: 2.4s; }
@keyframes wave { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(2.2); } }
.art-key .chip-glow { animation: chip 1.8s ease-in-out infinite; }
@keyframes chip { 50% { opacity: .25; } }

.hero-arrow {
  position: absolute; top: 50%; z-index: 3; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .3); background: rgba(10, 30, 53, .3); color: #fff; cursor: pointer; backdrop-filter: blur(6px);
  transition: background .2s, transform .2s var(--ease);
}
.hero-arrow svg { width: 22px; height: 22px; }
.hero-arrow:hover { background: var(--cyan); border-color: var(--cyan); }
.hero-arrow.prev { left: 20px; } .hero-arrow.prev:hover { transform: translateX(-3px); }
.hero-arrow.next { right: 20px; } .hero-arrow.next:hover { transform: translateX(3px); }
.hero-dots { position: absolute; left: 50%; bottom: 28px; z-index: 3; display: flex; gap: 8px; transform: translateX(-50%); }
.hero-dots button { width: 44px; height: 18px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; align-items: center; }
.hero-dots i { display: block; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .3); overflow: hidden; position: relative; }
.hero-dots i::after { content: ""; position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; }
.hero-dots .is-active i::after { animation: progress 7s linear forwards; }
.hero:hover .hero-dots .is-active i::after { animation-play-state: paused; }
@keyframes progress { to { transform: scaleX(1); } }

/* ---- Franja de marcas en movimiento ---- */
.marquee { background: var(--cyan); color: #fff; overflow: hidden; padding: 22px 0; position: relative; }
.marquee-track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { display: inline-flex; align-items: center; font-size: clamp(28px, 4vw, 48px); font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; white-space: nowrap; }
.marquee span:nth-child(even) { color: transparent; -webkit-text-stroke: 1.5px #fff; }
.marquee span::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--deep); margin: 0 36px; flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---- Secciones ---- */
.l-section { padding: 96px 0; background: #fff; }
.sec-title {
  margin: 0 0 40px; padding-bottom: 16px; font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; color: var(--cyan);
  background: linear-gradient(90deg, var(--cyan), rgba(0, 158, 224, .1)) left bottom / 100% 2px no-repeat;
}
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feat {
  position: relative; padding: 28px 24px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.feat:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--cyan); }
.feat-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--cyan), var(--navy)); margin-bottom: 20px; transition: transform .35s var(--ease); }
.feat:hover .feat-ic { transform: rotate(-8deg) scale(1.06); }
.feat-ic svg { width: 26px; height: 26px; }
.feat h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; color: var(--ink); }
.feat p { margin: 0; color: var(--muted); font-size: 14px; }

.tool-spot { margin-top: 64px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; padding: 40px; border-radius: var(--r-xl); background: var(--bg-soft); }
.spot-media { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); background: #fff; }
.spot-media video { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.spot-copy h3 { margin: 16px 0 12px; font-size: clamp(26px, 2.6vw, 36px); font-weight: 800; color: var(--navy); letter-spacing: -.01em; }
.spot-copy p { margin: 0 0 20px; color: var(--muted); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 12px; align-items: center; font-weight: 600; color: var(--ink); }
.checks li::before { content: "✓"; flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; background: var(--cyan); }

.steps-sec { background: var(--bg-soft); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: st; position: relative; }
.steps::before { content: ""; position: absolute; left: 8%; right: 8%; top: 40px; height: 2px; background: linear-gradient(90deg, var(--cyan), var(--aqua)); transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease) .3s; }
.steps:has(.is-in)::before { transform: scaleX(1); }
.steps li { counter-increment: st; position: relative; display: grid; gap: 6px; justify-items: center; text-align: center; padding: 0 12px; }
.steps li::before {
  content: counter(st); width: 80px; height: 80px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 14px;
  font-size: 34px; font-weight: 900; color: var(--cyan); background: #fff; border: 2px solid var(--cyan); box-shadow: 0 0 0 8px var(--bg-soft);
}
.steps b { font-size: 19px; font-weight: 800; color: var(--navy); }
.steps span { color: var(--muted); max-width: 30ch; }

.access { padding: 96px 0; background: var(--glow); color: #fff; position: relative; overflow: hidden; }
.access::before { content: ""; position: absolute; width: 520px; height: 520px; right: -120px; top: -160px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 0 0 60px rgba(255, 255, 255, .03), 0 0 0 120px rgba(255, 255, 255, .02); pointer-events: none; }
.access-grid { display: grid; grid-template-columns: 1fr 440px; gap: 64px; align-items: center; position: relative; }
.access-copy p { font-size: 18px; color: rgba(255, 255, 255, .82); max-width: 40ch; margin: 20px 0 28px; }
.access-help { padding: 18px 20px; border-radius: var(--r-lg); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .8); font-size: 14px; max-width: 46ch; }
.access-help b { display: block; color: #fff; margin-bottom: 2px; }
.login-card { background: #fff; color: var(--ink); border-radius: var(--r-xl); padding: 36px; box-shadow: var(--shadow-lg); }
.login-card h3 { margin: 0 0 22px; font-size: 24px; font-weight: 800; color: var(--navy); }
.login-card form { display: grid; gap: 18px; }
.login-card .btn-primary { height: 52px; font-size: 15px; font-weight: 700; margin-top: 4px; }

.l-foot { background: var(--navy); color: rgba(255, 255, 255, .75); padding: 48px 0 40px; }
.l-foot .wrap { display: grid; gap: 10px; justify-items: start; }
.l-foot .brandmark b span { color: var(--aqua); }
.l-foot p { margin: 8px 0 0; }
.l-foot small { color: rgba(255, 255, 255, .55); }

/* Aparición al hacer scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .1s; } .reveal.d2 { transition-delay: .2s; } .reveal.d3 { transition-delay: .3s; }

/* ---------- Primer ingreso (cambio de contraseña) ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: #fff; }
.login-hero { padding: 40px clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.login-hero .eyebrow { color: var(--yellow); }
.hero-title { font-size: clamp(34px, 4.4vw, 60px); font-weight: 900; text-transform: uppercase; line-height: 1; letter-spacing: -.015em; margin: 0 0 16px; }
.hero-text { color: rgba(255, 255, 255, .82); font-size: 17px; max-width: 44ch; margin: 0; }
.hero-foot { color: rgba(255, 255, 255, .6); font-size: 13px; }
.login-panel { display: grid; place-items: center; padding: 48px 28px; }
.login-panel .login-card { width: 100%; max-width: 420px; box-shadow: none; padding: 0; }
.login-panel .login-card > img { border-radius: 14px; box-shadow: var(--shadow); }
.login-panel .login-card h2 { font-size: 30px; font-weight: 800; color: var(--navy); margin: 22px 0 6px; }
.login-panel .lead { color: var(--muted); margin: 0 0 26px; }

/* =====================================================================
   APLICACIÓN INTERNA
   ===================================================================== */
.banner-bg { position: relative; overflow: hidden; color: #fff; background: var(--glow); isolation: isolate; }
.banner-bg::before { content: ""; position: absolute; inset: -60%; z-index: -1; pointer-events: none;
  background: conic-gradient(from 0deg at 75% 40%, transparent 0 22%, rgba(1, 229, 241, .10) 27%, transparent 34% 62%, rgba(0, 158, 224, .16) 68%, transparent 76%);
  animation: sweep 24s linear infinite; }

.topbar {
  position: sticky; top: 0; z-index: 30; height: 70px; display: flex; align-items: center; gap: 24px; padding: 0 32px;
  background: var(--cyan); color: #fff; box-shadow: 0 6px 20px -10px rgba(10, 30, 53, .4);
}
.nav { display: flex; gap: 6px; margin-left: 12px; }
.nav a { padding: 7px 16px; border-radius: var(--pill); color: #fff; font-weight: 500; font-size: 15px; transition: background .2s; }
.nav a:hover { background: rgba(255, 255, 255, .16); }
.nav a.active { background: var(--navy); font-weight: 700; }
.spacer { flex: 1; }
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 10px; padding: 4px 16px 4px 4px; border-radius: var(--pill); border: 1px solid rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; transition: background .2s, border-color .2s; }
.user-btn:hover, .user-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .22); border-color: #fff; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--navy); color: #fff; }
.user-btn .who { text-align: left; line-height: 1.25; }
.user-btn .who b { display: block; font-size: 13px; font-weight: 700; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-btn .who small { color: rgba(255, 255, 255, .85); font-size: 12px; }
.dropdown { position: absolute; right: 0; top: calc(100% + 10px); min-width: 250px; padding: 6px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); transform-origin: top right; animation: pop .18s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.97); } }
.dropdown button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 10px 12px; border: 0; background: none; border-radius: 10px; cursor: pointer; text-align: left; font-size: 14px; }
.dropdown button svg { width: 18px; height: 18px; color: var(--cyan); }
.dropdown button:hover { background: var(--cyan-soft); color: var(--navy); }
.dropdown .sep { height: 1px; background: var(--line); margin: 6px 0; }
.dropdown .meta { padding: 8px 12px; color: var(--muted); font-size: 12px; word-break: break-all; }

.page { max-width: 1280px; margin: 0 auto; padding: 28px 32px 72px; animation: enter .4s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
.crumbs { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; margin-bottom: 14px; flex-wrap: wrap; }
.crumbs a { color: var(--cyan); font-weight: 600; }
.crumbs a:hover { color: var(--navy); }
.crumbs > span:last-child:not(:only-child) { color: var(--ink); font-weight: 600; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--cyan); margin: 0 0 8px; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; padding: 40px 48px; min-height: 190px; border-radius: var(--r-xl); }
.page-head .eyebrow { color: var(--aqua); }
.page-head h1 { margin: 0; font-size: clamp(30px, 3.6vw, 50px); font-weight: 900; text-transform: uppercase; line-height: 1; letter-spacing: -.015em; }
.page-head p { margin: 12px 0 0; color: rgba(255, 255, 255, .82); max-width: 60ch; }
.banner-mark { font-size: 110px; font-weight: 900; letter-spacing: -.04em; line-height: .85; color: transparent; -webkit-text-stroke: 2px rgba(255, 255, 255, .22); text-transform: uppercase; user-select: none; }

/* ---------- Tarjetas de herramienta ---------- */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.tool-card { position: relative; overflow: hidden; display: flex; flex-direction: column; border-radius: var(--r-xl); border: 1px solid var(--line); background: #fff; transition: box-shadow .35s var(--ease), border-color .35s, transform .35s var(--ease); }
.tool-card:hover { box-shadow: var(--shadow-lg); border-color: var(--cyan); transform: translateY(-4px); }
.tools-grid:has(> .tool-card:only-child) { grid-template-columns: 1fr; }
.tools-grid > .tool-card:only-child { flex-direction: row; min-height: 360px; }
.tools-grid > .tool-card:only-child .tool-visual { flex: 1.15; aspect-ratio: auto; border-bottom: 0; }
.tools-grid > .tool-card:only-child .tool-body { flex: 1; padding: 40px 44px; justify-content: center; }
.tools-grid > .tool-card:only-child .tool-body .btn { margin-top: 14px; align-self: flex-start; width: auto; padding: 0 30px; }
.tool-visual { height: 200px; position: relative; display: grid; place-items: center; background: var(--glow); overflow: hidden; }
.tool-visual.has-video { height: auto; aspect-ratio: 16 / 9; background: #fff; }
.tool-visual.has-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.tool-card:hover .tool-visual.has-video video { transform: scale(1.04); }
.tool-visual .device { width: 170px; height: 108px; border-radius: 16px; color: var(--navy); background: #fff; box-shadow: 0 20px 40px rgba(0, 0, 0, .3); display: grid; place-items: center; }
.tool-visual .device b { font-size: 40px; font-weight: 900; }
.tool-badge { position: absolute; top: 16px; left: 16px; z-index: 1; height: 26px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: var(--pill); font-size: 12px; font-weight: 700; background: var(--navy); color: #fff; }
.tool-body { padding: 26px 28px 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.tool-body h3 { margin: 0; font-size: 44px; font-weight: 900; letter-spacing: -.02em; color: var(--navy); line-height: 1; text-transform: uppercase; }
.tool-body h3 small { display: block; font-size: 16px; font-weight: 600; letter-spacing: 0; color: var(--cyan); margin-top: 10px; text-transform: none; }
.tool-body p { margin: 0; color: var(--muted); font-size: 14px; max-width: 52ch; }
.tool-stats { display: flex; margin: 8px 0 4px; gap: 12px; }
.tool-stats div { flex: 1; font-size: 13px; font-weight: 500; color: var(--muted); padding: 14px 18px; border-radius: var(--r-lg); background: var(--bg-soft); }
.tool-stats b { display: block; font-size: 32px; font-weight: 900; color: var(--cyan); line-height: 1.05; font-variant-numeric: tabular-nums; }
.tool-body .btn { margin-top: auto; }
.serial { font-size: 13px; color: var(--muted); }
.serial b { color: var(--ink); font-weight: 700; }

/* ---------- Estados vacíos ---------- */
.empty { display: grid; justify-items: center; gap: 4px; border: 1.5px dashed var(--line); border-radius: var(--r-xl); padding: 56px 24px; text-align: center; color: var(--muted); background: #fff; }
.empty-icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 12px; color: #fff; background: linear-gradient(135deg, var(--cyan), var(--navy)); box-shadow: 0 12px 24px -10px rgba(0, 158, 224, .7); animation: float 5s ease-in-out infinite; }
.empty-icon svg { width: 28px; height: 28px; }
.empty h3 { color: var(--navy); margin: 0; font-size: 19px; font-weight: 800; }
.empty p { margin: 0 0 14px; max-width: 46ch; }

/* ---------- Vista de herramienta ---------- */
.tool-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 28px; align-items: start; }
.brand-menu { position: sticky; top: 94px; border: 1px solid var(--line); border-radius: var(--r-xl); background: #fff; overflow: hidden; }
.brand-menu h4 { margin: 0; padding: 18px 22px 10px; font-size: 18px; font-weight: 600; color: var(--cyan); }
.brand-menu nav { display: grid; padding: 0 10px 10px; gap: 2px; }
.brand-link { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--r-md); font-weight: 700; font-size: 14px; color: var(--ink); transition: background .2s, color .2s, transform .2s var(--ease); }
.brand-link:hover { background: var(--bg-soft); transform: translateX(3px); }
.brand-link.active { background: var(--cyan); color: #fff; }
.brand-link.is-empty { color: var(--mute); }
.brand-mono { width: 36px; height: 36px; border-radius: 10px; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--navy); color: #fff; }
.brand-link.active .brand-mono { background: #fff; color: var(--cyan); }
.brand-link.is-empty .brand-mono { background: #e6e8ee; color: var(--mute); }
.brand-link.active.is-empty { color: #fff; }
.brand-link.active.is-empty .brand-mono { background: #fff; color: var(--cyan); }
.brand-link .count { margin-left: auto; font-size: 12px; font-weight: 700; min-width: 26px; text-align: center; padding: 2px 8px; border-radius: var(--pill); background: var(--bg-soft); color: var(--muted); font-variant-numeric: tabular-nums; }
.brand-link.active .count { background: rgba(255, 255, 255, .25); color: #fff; }
.brand-link.is-empty .count { background: transparent; }

.toolbar { display: flex; gap: 12px; align-items: flex-end; margin-bottom: 20px; flex-wrap: wrap; }
.result-count { font-size: 13px; color: var(--muted); white-space: nowrap; align-self: center; }
.result-count b { color: var(--cyan); font-weight: 800; }
.search { position: relative; flex: 1; min-width: 220px; }
.search .input { padding-left: 48px; height: 52px; border-radius: var(--pill); }
.search svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; color: var(--cyan); pointer-events: none; }

.brand-strip { display: none; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px 14px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.brand-strip::-webkit-scrollbar { display: none; }
.brand-strip a { flex: none; padding: 8px 16px; border-radius: var(--pill); background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--navy); }
.brand-strip a.active { background: var(--cyan); border-color: var(--cyan); color: #fff; }
.brand-strip a.is-empty { color: var(--mute); }

.diagram-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.diagram-card { display: flex; flex-direction: column; text-align: left; padding: 0; cursor: pointer; font: inherit; border-radius: var(--r-lg); border: 1px solid var(--line); background: #fff; overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.diagram-card:hover, .diagram-card:focus-visible { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--cyan); }
.diagram-thumb { position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; background: var(--bg-soft); }
.diagram-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; background: #fff; transition: transform .8s var(--ease); }
.diagram-card:hover .diagram-thumb img { transform: scale(1.06); }
.diagram-thumb .open { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px; border-radius: var(--pill); font-size: 12px; font-weight: 700; color: #fff; background: var(--cyan); opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s var(--ease); }
.diagram-thumb .open svg { width: 14px; height: 14px; }
.diagram-card:hover .open, .diagram-card:focus-visible .open { opacity: 1; transform: none; }
.diagram-thumb .pdf { display: grid; place-items: center; gap: 6px; color: var(--muted); font-weight: 800; letter-spacing: .1em; font-size: 13px; }
.diagram-thumb .pdf svg { width: 44px; height: 44px; color: var(--red); }
.diagram-info { padding: 14px 16px 16px; display: grid; gap: 4px; border-top: 1px solid var(--line); }
.diagram-info b { font-size: 14px; font-weight: 700; line-height: 1.4; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.diagram-info > span { font-size: 12px; color: var(--muted); }
.sync-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sync-list { margin: 0 0 12px; padding-left: 18px; color: var(--muted); font-size: 13px; word-break: break-word; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tag { display: inline-flex; align-items: center; height: 22px; font-size: 11px; font-weight: 700; padding: 0 10px; border-radius: var(--pill); background: var(--cyan-soft); color: var(--navy); white-space: nowrap; }
.tag.red { background: var(--red); color: #fff; }
.tag.green { background: var(--ok-soft); color: var(--ok); }
.tag.amber { background: var(--warn-soft); color: var(--warn); }
.tag.sys { background: var(--navy); color: #fff; }

/* ---------- Visor ---------- */
.viewer { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: var(--deep); color: #fff; animation: fade .2s; }
.viewer-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 22px; background: var(--cyan); }
.viewer-bar .title { min-width: 0; }
.viewer-bar .title b { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-bar .title span { color: rgba(255, 255, 255, .85); font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zoom-group { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: var(--pill); background: rgba(10, 30, 53, .25); }
.zoom-group .btn { background: transparent; border-color: transparent; color: #fff; padding: 0 10px; border-radius: var(--pill); }
.zoom-group .btn:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.viewer-bar .btn-close { background: var(--navy); border-color: var(--navy); color: #fff; border-radius: var(--pill); }
.viewer-bar .btn-close:hover { background: var(--deep); border-color: var(--deep); color: #fff; }
.viewer-stage { position: relative; flex: 1; overflow: hidden; cursor: grab; user-select: none; touch-action: none; background: var(--glow); }
.viewer-stage.dragging { cursor: grabbing; }
.vwrap { position: absolute; left: 50%; top: 50%; transform-origin: center; overflow: hidden; border-radius: 6px; box-shadow: 0 30px 80px rgba(0, 0, 0, .55); opacity: 0; transition: opacity .4s; }
.viewer-stage.is-ready .vwrap { opacity: 1; }
.vwrap img { display: block; max-width: none; pointer-events: none; -webkit-user-drag: none; user-select: none; }
.vwrap > #vimg { width: 100%; height: 100%; }
/* Resaltado de cables: la línea de la leyenda queda clara, el resto se oscurece y el cable brilla encima */
.pin-hot { position: absolute; z-index: 1; padding: 0; border: 0; border-radius: 6px; background: transparent; cursor: pointer; transition: background .2s, box-shadow .25s; }
.pin-hot:hover, .pin-hot:focus-visible { outline: none; background: rgba(1, 229, 241, .12); box-shadow: 0 0 0 2px rgba(0, 158, 224, .7); }
.pin-hot.is-on { background: rgba(1, 229, 241, .1); box-shadow: 0 0 0 2px var(--aqua), 0 0 22px 4px rgba(1, 229, 241, .55), 0 0 0 100vmax rgba(8, 20, 36, .62); }
.pin-layer { position: absolute; z-index: 2; pointer-events: none; opacity: 0; transform: scale(.995); transition: opacity .25s, transform .25s; }
.pin-layer.is-on { opacity: 1; transform: none; animation: pin-glow 1.6s ease-in-out .25s infinite; }
@keyframes pin-glow { 50% { filter: brightness(1.35) drop-shadow(0 0 3px rgba(255, 255, 255, .6)); } }
.viewer-hint.is-pins { animation: none; background: var(--navy); box-shadow: 0 0 0 1px rgba(1, 229, 241, .45), 0 8px 24px rgba(0, 0, 0, .35); }
@media (prefers-reduced-motion: reduce) { .pin-layer.is-on { animation: none; } }
.viewer-stage:not(.is-ready):not(.is-pdf)::after { content: ""; position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--aqua); animation: spin .8s linear infinite; }
.viewer-stage iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.viewer-hint { position: absolute; left: 50%; bottom: 18px; z-index: 3; transform: translateX(-50%); pointer-events: none; padding: 8px 16px; border-radius: var(--pill); font-size: 12px; font-weight: 500; color: #fff; background: rgba(10, 30, 53, .8); width: max-content; max-width: calc(100% - 32px); text-align: center; animation: hintout .4s 4s forwards; }
@keyframes hintout { to { opacity: 0; } }
.watermark { position: absolute; inset: -50%; pointer-events: none; z-index: 2; display: flex; flex-wrap: wrap; gap: 80px 110px; align-content: center; justify-content: center; transform: rotate(-24deg); opacity: .12; font-weight: 900; font-size: clamp(30px, 4.2vw, 58px); letter-spacing: -.01em; text-transform: uppercase; color: var(--navy); overflow: hidden; }
.viewer-notes { padding: 12px 22px; background: var(--navy); color: rgba(255, 255, 255, .85); font-size: 14px; }
.zoom-label { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; width: 48px; text-align: center; }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(10, 30, 53, .6); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; animation: fade .2s; }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: var(--r-xl); box-shadow: var(--shadow-lg); animation: rise .3s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 18px 28px; background: var(--cyan); color: #fff; }
.modal-head h3 { margin: 0; font-size: 20px; font-weight: 800; }
.modal-head .btn-ghost { color: #fff; }
.modal-head .btn-ghost:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.modal-head .btn-ghost svg { width: 20px; height: 20px; }
.modal-body { padding: 24px 28px; }
.modal-body p { margin-top: 0; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 28px; border-top: 1px solid var(--line); background: var(--bg-soft); }
@keyframes fade { from { opacity: 0; } }

/* ---------- Admin ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 10px 20px; font-weight: 600; font-size: 14px; color: var(--navy); white-space: nowrap; border-radius: var(--pill); background: #fff; border: 1px solid var(--line); transition: background .2s, color .2s, border-color .2s; }
.tabs a:hover { border-color: var(--cyan); color: var(--cyan); }
.tabs a.active { color: #fff; background: var(--navy); border-color: var(--navy); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat { padding: 20px 24px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); transition: transform .3s var(--ease), border-color .3s; }
.stat:hover { transform: translateY(-3px); border-color: var(--cyan); }
.stat span { font-size: 13px; font-weight: 600; color: var(--muted); }
.stat b { display: block; font-size: 40px; font-weight: 900; color: var(--cyan); line-height: 1.1; font-variant-numeric: tabular-nums; }
.card { border: 1px solid var(--line); background: #fff; border-radius: var(--r-xl); overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h3 { margin: 0; font-size: 19px; font-weight: 600; color: var(--cyan); }
.card-head h3 .n { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 8px; margin-left: 8px; border-radius: var(--pill); background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; vertical-align: 2px; }
.card-head .search .input { height: 44px; }
.card-head .search { min-width: 300px; }
.card-head .select { height: 42px; width: auto; border-radius: var(--pill); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; color: var(--navy); font-weight: 700; padding: 12px 22px; background: var(--bg-soft); white-space: nowrap; }
td { padding: 14px 22px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: #f7fbfe; }
td b { font-weight: 700; }
td .sub { display: block; font-size: 12px; }
td .tag { margin: 2px 4px 2px 0; }
td.actions { text-align: right; white-space: nowrap; }
td.actions .btn + .btn { margin-left: 6px; }
.thumb-sm { width: 72px; height: 46px; border-radius: 10px; object-fit: cover; object-position: top; background: #fff; border: 1px solid var(--line); display: block; }
.admin-split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.brand-row { display: flex; align-items: center; gap: 12px; padding: 11px 22px; border-bottom: 1px solid var(--line); }
.brand-row .grow { flex: 1; font-weight: 700; }
.brand-row .sub { white-space: nowrap; }
.inline-form { display: flex; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--bg-soft); }
.inline-form .input { flex: 1; height: 40px; border-radius: var(--pill); }
.tool-pick { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-soft); }
.tool-pick-row { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; align-items: center; }
.tool-pick-row .input { height: 40px; font-size: 13px; }
.pw-show { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 16px; padding: 12px 16px; border-radius: var(--r-md); background: var(--cyan-soft); color: var(--navy); border: 1px solid #b8e2f5; word-break: break-all; }
.drop { display: grid; justify-items: center; gap: 6px; border: 2px dashed #8fd0ef; border-radius: var(--r-lg); padding: 28px 20px; text-align: center; color: var(--muted); background: #f5fbfe; cursor: pointer; transition: border-color .2s, background .2s, transform .2s var(--ease); }
.drop svg { width: 30px; height: 30px; color: var(--cyan); transition: transform .3s var(--ease); }
.drop:hover svg, .drop.over svg { transform: translateY(-4px); }
.drop:hover, .drop.over { border-color: var(--cyan); background: var(--cyan-soft); color: var(--navy); }
.drop.over { transform: scale(1.01); }
.drop b { color: var(--navy); }
.notice { padding: 14px 18px; border-radius: var(--r-lg); background: var(--warn-soft); color: #5e4100; font-size: 14px; margin-bottom: 20px; border: 1px solid #f6dd8f; }

/* ---------- Avisos ---------- */
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: grid; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 380px; padding: 12px 18px 12px 12px; border-radius: var(--pill); background: var(--navy); color: #fff; box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 600; animation: slide .35s var(--ease); }
.toast::before { content: "✓"; flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: var(--cyan); color: #fff; }
.toast.error::before { content: "!"; background: var(--red); }
@keyframes slide { from { opacity: 0; transform: translateY(12px) scale(.97); } }

.footer { text-align: center; color: rgba(255, 255, 255, .75); font-size: 13px; padding: 28px; background: var(--navy); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .tools-grid > .tool-card:only-child { flex-direction: column; }
  .tools-grid > .tool-card:only-child .tool-visual { aspect-ratio: 16 / 9; }
  .tools-grid > .tool-card:only-child .tool-body { padding: 26px 28px 28px; }
}
@media (max-width: 900px) {
  .l-nav { display: none; }
  .l-head .btn-navy { margin-left: auto; }
  .hero { min-height: 0; }
  .slides { min-height: 760px; }
  .slide-grid { grid-template-columns: 1fr; gap: 36px; padding: 44px 0 90px; }
  .slide-art { order: 2; }
  .hero-arrow { display: none; }
  .tool-spot { grid-template-columns: 1fr; padding: 24px; gap: 28px; }
  .steps { grid-template-columns: 1fr; gap: 36px; }
  .steps::before { display: none; }
  .access-grid { grid-template-columns: 1fr; gap: 36px; }
  .login { grid-template-columns: 1fr; }
  .login-panel { order: -1; }
  .tool-layout { grid-template-columns: 1fr; }
  .brand-menu { display: none; }
  .brand-strip { display: flex; }
  .admin-split { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .banner-mark { font-size: 72px; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .wrap { width: calc(100% - 32px); }
  .util-bar { font-size: 12px; }
  .util-right { display: none; }
  .l-head .wrap { height: 64px; gap: 12px; }
  .l-head .brandmark > span:not(.logo-anim) { display: none; }
  .l-head .btn-navy { height: 40px; padding: 0 16px; font-size: 13px; }
  .slides { min-height: 700px; }
  .slide-grid { padding: 32px 0 80px; gap: 28px; }
  .slide-copy p { font-size: 16px; margin: 14px 0 22px; }
  .cta-row .btn { height: 48px; padding: 0 18px; font-size: 13px; flex: 1 1 auto; }
  .display { font-size: clamp(28px, 8.4vw, 40px); }
  .display.sm { font-size: clamp(30px, 9vw, 40px); }
  .float-tag { font-size: 11px; padding: 6px 10px; }
  .float-tag.t1 { left: -6px; } .float-tag.t2 { right: -6px; }
  .art-brands { gap: 8px; }
  .ab { padding: 12px; font-size: 10px; }
  .ab b { font-size: 20px; }
  .art-key { width: 240px; }
  .marquee { padding: 16px 0; }
  .marquee span::after { margin: 0 22px; width: 9px; height: 9px; }
  .l-section, .access { padding: 64px 0; }
  .sec-title { margin-bottom: 28px; }
  .feat-grid { grid-template-columns: 1fr; gap: 14px; }
  .feat { padding: 22px 20px; display: grid; grid-template-columns: 52px 1fr; column-gap: 16px; }
  .feat-ic { margin: 0; grid-row: span 2; }
  .tool-spot { margin-top: 40px; padding: 16px; }
  .login-card { padding: 26px 22px; }

  .topbar { padding: 0 12px; gap: 6px; height: 62px; }
  .topbar .brandmark > span:not(.logo-anim), .user-btn .who { display: none; }
  .brandmark img { width: 38px; height: 38px; }
  .user-btn { padding: 3px; }
  .nav { margin-left: 2px; gap: 2px; }
  .nav a { padding: 6px 11px; font-size: 13px; }
  .page { padding: 16px 14px 48px; }
  .page-head { padding: 28px 22px; min-height: 0; border-radius: var(--r-lg); margin-bottom: 20px; }
  .banner-mark { display: none; }
  .form-grid.two { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .tool-body h3 { font-size: 34px; }
  .diagram-grid { grid-template-columns: 1fr; gap: 14px; }
  .diagram-thumb .open { display: none; }
  .result-count { display: none; }
  .stats { gap: 10px; }
  .stat { padding: 14px 16px; }
  .stat b { font-size: 30px; }
  .card-head { padding: 14px 16px; }
  .card-head .input-group { width: 100%; flex-wrap: wrap; }
  .card-head .input-group .search { flex-basis: 100%; min-width: 0; }
  .card-head .input-group .btn { flex: 1; }
  .toolbar .field { flex: 1 1 100%; }
  .sync-box, .sync-box .btn { width: 100%; }
  .stack thead { display: none; }
  .stack, .stack tbody, .stack tr, .stack td { display: block; width: 100%; }
  .stack tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .stack tr:last-child { border-bottom: 0; }
  .stack td { padding: 3px 0; border: 0; }
  .stack td:empty { display: none; }
  .stack td.actions { text-align: left; white-space: normal; padding-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
  .stack td.actions .btn + .btn { margin-left: 0; }
  .brand-row { padding: 10px 14px; gap: 10px; }
  .brand-row .grow { font-size: 13px; }
  .viewer-bar { padding: 8px 10px; gap: 8px; flex-wrap: wrap; }
  .viewer-bar .title { flex: 1 1 100%; order: -1; }
  .viewer-bar .spacer { display: none; }
  .viewer-bar .btn-close { margin-left: auto; }
  .modal-back { padding: 0; place-items: end center; }
  .modal { border-radius: var(--r-xl) var(--r-xl) 0 0; max-height: 92vh; }
  .modal-body { padding: 18px 20px; }
  .modal-foot { padding: 14px 20px; }
  .modal-foot .btn { flex: 1; }
  #toasts { left: 12px; right: 12px; bottom: 12px; }
  .toast { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .marquee-track { animation: none; }
  .reveal { opacity: 1; transform: none; }
  html.is-loading::before { animation: none; transform: none; }
}

.login-hero .brandmark b span, .page-head .brandmark b span { color: var(--aqua); }

/* =====================================================================
   FONDOS DE LLAVES (fotos propias, recortadas sin logo)
   Muy transparentes, en luminosidad sobre el azul, con movimiento lento.
   ===================================================================== */
.key-wall {
  position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  opacity: .14; mix-blend-mode: luminosity;
  -webkit-mask-image: radial-gradient(120% 90% at 70% 50%, #000 30%, transparent 80%);
  mask-image: radial-gradient(120% 90% at 70% 50%, #000 30%, transparent 80%);
}
.kw-plane {
  position: absolute; left: 50%; top: 50%; width: 150%; height: 220%;
  display: flex; gap: 18px; justify-content: center;
  transform: translate(-50%, -50%) rotate(-14deg);
}
.kw-col { flex: 0 0 clamp(150px, 15vw, 230px); }
.kw-track { display: grid; gap: 18px; animation: kw-up 70s linear infinite; }
.kw-col:nth-child(even) .kw-track { animation-name: kw-down; animation-duration: 85s; }
.kw-c2 .kw-track { animation-duration: 60s; }
.kw-c4 .kw-track { animation-duration: 95s; }
.kw-track img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 18px; filter: grayscale(.2) contrast(1.1); }
@keyframes kw-up { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes kw-down { from { transform: translateY(-50%); } to { transform: translateY(0); } }
/* Héroe: el muro se concentra a la derecha, detrás del arte, y desaparece hacia el texto */
.kw-hero { opacity: .13; -webkit-mask-image: linear-gradient(100deg, transparent 18%, #000 60%); mask-image: linear-gradient(100deg, transparent 18%, #000 60%); }
/* Acceso clientes: muro más tenue detrás del texto de la izquierda */
.access .kw-access { z-index: 0; opacity: .09; -webkit-mask-image: linear-gradient(90deg, #000 20%, transparent 70%); mask-image: linear-gradient(90deg, #000 20%, transparent 70%); }
.access .kw-access .kw-plane { left: 25%; width: 90%; }
.access-grid { z-index: 1; }

/* Encabezados de la app: una foto de llave con zoom lento (Ken Burns), muy desvanecida */
.page-head.kb::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 60%; z-index: -1; pointer-events: none;
  background: center / cover no-repeat; opacity: .16; mix-blend-mode: luminosity;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 55%); mask-image: linear-gradient(90deg, transparent, #000 55%);
  animation: kenburns 26s ease-in-out infinite alternate;
}
.page-head.kb-0::after { background-image: url(/media/llaves/k03.webp); }
.page-head.kb-1::after { background-image: url(/media/llaves/k08.webp); }
.page-head.kb-2::after { background-image: url(/media/llaves/k13.webp); }
.page-head.kb-3::after { background-image: url(/media/llaves/k16.webp); }
.page-head.kb-4::after { background-image: url(/media/llaves/k05.webp); }
.page-head.kb-5::after { background-image: url(/media/llaves/k18.webp); }
@keyframes kenburns { from { transform: scale(1) translateX(0); } to { transform: scale(1.18) translateX(-4%); } }

@media (max-width: 640px) {
  .kw-col { flex-basis: 120px; }
  .kw-plane { gap: 10px; width: 260%; }
  .kw-track { gap: 10px; }
  .kw-hero { opacity: .11; -webkit-mask-image: linear-gradient(180deg, transparent 5%, #000 55%); mask-image: linear-gradient(180deg, transparent 5%, #000 55%); }
  .page-head.kb::after { width: 100%; opacity: .12; }
}
@media (prefers-reduced-motion: reduce) {
  .kw-track, .page-head.kb::after { animation: none !important; }
}

/* =====================================================================
   LOGO ANIMADO (video de la llave que cambia de marca)
   Ficha redonda con fondo pizarra oscuro (igual al del video), aro cian→aqua y un brillo que respira.
   ===================================================================== */
.logo-anim {
  position: relative; flex: none; width: 82px; height: 48px; border-radius: 12px; overflow: hidden; isolation: isolate;
  background: radial-gradient(circle at 50% 40%, #2b3238, #15191c 75%);
  box-shadow: 0 6px 16px -4px rgba(10, 30, 53, .6);
  transition: transform .4s var(--ease), box-shadow .4s;
}
/* borde de luz: un degradado cónico gira detrás y el video lo tapa dejando ver solo 2px de contorno */
.logo-anim::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 300%; aspect-ratio: 1; z-index: 0; pointer-events: none;
  background: conic-gradient(from 0deg, var(--navy) 0 55%, var(--cyan) 72%, var(--aqua) 80%, #fff 82%, var(--navy) 92%);
  transform: translate(-50%, -50%); animation: ring 4s linear infinite;
}
@keyframes ring { to { transform: translate(-50%, -50%) rotate(360deg); } }
/* viñeta que funde el video con el contorno */
.logo-anim::after { content: ""; position: absolute; inset: 2px; z-index: 2; border-radius: 10px; pointer-events: none; box-shadow: inset 0 0 10px 2px rgba(10, 18, 26, .8); }
.logo-anim video { position: absolute; inset: 2px; z-index: 1; width: calc(100% - 4px); height: calc(100% - 4px); object-fit: cover; border-radius: 10px; background: #15191c; }
.brandmark:hover .logo-anim { transform: scale(1.06); box-shadow: 0 0 24px rgba(1, 229, 241, .65); }
.logo-anim.lg { width: 136px; height: 78px; border-radius: 18px; }
.logo-anim.lg::after, .logo-anim.lg video { border-radius: 16px; }
/* en el pie y en fondos oscuros el aro exterior va en aqua */
.l-foot .logo-anim, .login-hero .logo-anim { box-shadow: 0 0 22px rgba(1, 229, 241, .35); }
@media (max-width: 640px) { .logo-anim { width: 68px; height: 40px; border-radius: 10px; } .topbar .logo-anim { width: 56px; height: 34px; } }
@media (prefers-reduced-motion: reduce) { .logo-anim::before { animation: none; } }

/* ===================================================================== CURSOS
   Motivo propio del curso: el calendario de 3 meses × 4 clases. Cada clase es una ficha numerada
   (01–12) con su icono de video o teoría; se repite en el landing, la tarjeta y la página del curso. */
.syllabus { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; }
.sy-month { display: grid; gap: 8px; align-content: start; }
.sy-month > b { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--aqua); padding: 0 2px 2px; border-bottom: 2px solid rgba(1, 229, 241, .35); }
.sy-cls { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); color: #fff; }
.sy-cls i { font-style: normal; font-size: 22px; font-weight: 900; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.sy-cls em { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(1, 229, 241, .14); color: var(--aqua); }
.sy-cls em svg { width: 15px; height: 15px; }
.sy-cls.is-seen { background: rgba(255, 184, 0, .16); border-color: rgba(255, 184, 0, .5); }
.sy-cls.is-seen em { background: var(--yellow); color: var(--ink); }
.syllabus-card { position: relative; padding: 24px; border-radius: var(--r-xl); background: linear-gradient(160deg, rgba(21, 68, 109, .92), rgba(10, 30, 53, .96)); border: 1px solid rgba(1, 229, 241, .25); box-shadow: var(--shadow-lg); }
.slide-art .syllabus-card { width: min(100%, 460px); margin-inline: auto; }
/* las fichas se encienden en orden, como un temario que avanza */
.syllabus-card .sy-cls { animation: sy-on 6s var(--ease) infinite; }
.syllabus-card .sy-month:nth-child(1) .sy-cls:nth-of-type(1) { animation-delay: 0s; }
.syllabus-card .sy-month .sy-cls:nth-of-type(2) { animation-delay: .4s; }
.syllabus-card .sy-month .sy-cls:nth-of-type(3) { animation-delay: .8s; }
.syllabus-card .sy-month .sy-cls:nth-of-type(4) { animation-delay: 1.2s; }
.syllabus-card .sy-month:nth-child(2) .sy-cls { animation-name: sy-on2; }
.syllabus-card .sy-month:nth-child(3) .sy-cls { animation-name: sy-on3; }
@keyframes sy-on { 0%, 100% { border-color: rgba(255, 255, 255, .14); } 8%, 22% { border-color: var(--aqua); box-shadow: 0 0 18px rgba(1, 229, 241, .35); } }
@keyframes sy-on2 { 0%, 30%, 100% { border-color: rgba(255, 255, 255, .14); } 38%, 52% { border-color: var(--aqua); box-shadow: 0 0 18px rgba(1, 229, 241, .35); } }
@keyframes sy-on3 { 0%, 60%, 100% { border-color: rgba(255, 255, 255, .14); } 68%, 82% { border-color: var(--yellow); box-shadow: 0 0 18px rgba(255, 184, 0, .35); } }
.sy-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .75); }
.sy-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sy-legend svg { width: 16px; height: 16px; color: var(--aqua); }

/* Landing: sección del curso */
.course-sec { position: relative; overflow: hidden; color: #fff; background: var(--glow); }
.course-spot { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.course-copy p { color: rgba(255, 255, 255, .82); max-width: 54ch; }
.course-copy .display { color: #fff; margin: 14px 0 6px; }
.course-nums { display: flex; gap: 12px; margin: 26px 0; flex-wrap: wrap; }
.course-nums div { flex: 1; min-width: 120px; padding: 16px 18px; border-radius: var(--r-lg); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); }
.course-nums dt { font-size: 44px; font-weight: 900; line-height: 1; color: var(--yellow); }
.course-nums dt svg { width: 40px; height: 44px; }
.course-nums dd { margin: 6px 0 0; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .85); }
.course-note { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.course-note svg { flex: none; width: 20px; height: 20px; color: var(--aqua); margin-top: 2px; }

/* Tarjeta de curso en "Tus cursos" */
.course-visual { position: relative; display: grid; place-items: center; padding: 28px; background: var(--glow); }
.tools-grid > .course-card:only-child .course-visual { flex: 1.15; }
.progress { position: relative; height: 30px; border-radius: var(--pill); background: var(--bg-soft); overflow: hidden; }
.progress i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--yellow), #ffd25a); transition: width .8s var(--ease); }
.progress span { position: relative; display: block; text-align: center; line-height: 30px; font-size: 12px; font-weight: 800; color: var(--navy); }

/* Página del curso */
.course-head { align-items: flex-end; }
.course-head > div:first-child { flex: 1 1 520px; }
.course-head .btn-cta { margin-top: 22px; }
.course-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.course-facts span { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: var(--pill); background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); font-size: 13px; font-weight: 700; }
.course-facts svg { width: 17px; height: 17px; color: var(--aqua); }
.ring { --p: 0; position: relative; flex: none; width: 168px; height: 168px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: conic-gradient(var(--yellow) calc(var(--p) * 1%), rgba(255, 255, 255, .14) 0); }
.ring::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--deep); }
.ring b, .ring small { position: relative; }
.ring b { font-size: 38px; font-weight: 900; line-height: 1; }
.ring small { display: block; max-width: 110px; margin-top: 4px; font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, .75); }
.month-block { margin-bottom: 34px; }
.month-title { display: flex; align-items: baseline; gap: 14px; margin: 0 0 14px; font-size: 26px; font-weight: 900; text-transform: uppercase; color: var(--navy); letter-spacing: -.01em; }
.month-title small { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: none; letter-spacing: 0; }
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.lesson-card { position: relative; display: flex; gap: 16px; padding: 20px; border-radius: var(--r-lg); border: 1px solid var(--line); background: #fff; transition: border-color .25s, box-shadow .3s var(--ease), transform .3s var(--ease); }
.lesson-card:hover { border-color: var(--cyan); box-shadow: var(--shadow); transform: translateY(-3px); }
.lc-num { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; font-size: 22px; font-weight: 900; letter-spacing: -.02em; color: #fff; background: linear-gradient(135deg, var(--cyan), var(--navy)); font-variant-numeric: tabular-nums; }
.lc-body { min-width: 0; display: grid; gap: 4px; align-content: start; padding-right: 22px; }
.lc-body b { font-size: 16px; font-weight: 800; color: var(--ink); line-height: 1.25; }
.lc-body p { margin: 0; font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--cyan); }
.lc-meta span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.lc-meta svg { width: 15px; height: 15px; }
.lesson-card.is-empty .lc-meta { color: var(--mute); }
.lesson-card.is-empty .lc-num { background: var(--bg-soft); color: var(--navy); }
.lc-check { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); color: transparent; }
.lc-check svg { width: 14px; height: 14px; }
.lesson-card.is-seen .lc-check { border-color: var(--yellow); background: var(--yellow); color: var(--ink); }
.lesson-card.is-seen .lc-num { background: linear-gradient(135deg, var(--yellow), var(--yellow-2)); color: var(--ink); }

/* Página de la clase */
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-xl); overflow: hidden; background: #000; box-shadow: var(--shadow-lg); }
.player video, .player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.player.is-empty { aspect-ratio: auto; background: none; box-shadow: none; }
.player-wm { position: absolute; inset: -40%; z-index: 2; pointer-events: none; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 70px 120px; transform: rotate(-24deg); font-size: clamp(16px, 2.2vw, 28px); font-weight: 900; text-transform: uppercase; color: #fff; opacity: .07; overflow: hidden; }
.lesson-title { display: flex; gap: 16px; align-items: center; margin: 24px 0 8px; }
.lesson-title .eyebrow { margin: 0 0 4px; }
.lesson-title h1 { margin: 0; font-size: clamp(22px, 2.4vw, 32px); font-weight: 900; text-transform: uppercase; color: var(--navy); line-height: 1.08; }
.lesson-summary { color: var(--muted); max-width: 70ch; white-space: pre-line; }
.lesson-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.lesson-actions .spacer { flex: 1; }
.lesson-actions .btn svg { width: 18px; height: 18px; }
.btn-done { background: var(--yellow); border-color: var(--yellow); color: var(--ink); font-weight: 800; }
.btn-done:hover { background: var(--yellow-2); border-color: var(--yellow-2); color: var(--ink); }
.lesson-side { display: grid; gap: 16px; position: sticky; top: 92px; }
.side-block { padding: 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: #fff; }
.side-block h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 15px; font-weight: 800; color: var(--navy); }
.side-block h3 .n { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 7px; border-radius: var(--pill); background: var(--cyan-soft); color: var(--navy); font-size: 11px; }
.playlist, .docs, .mini-lessons { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.playlist button, .docs button, .docs a { width: 100%; display: flex; gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid transparent; background: var(--bg-soft); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; transition: border-color .2s, background .2s; }
.playlist button:hover, .docs button:hover, .docs a:hover { border-color: var(--cyan); background: #fff; }
.playlist button.is-active { background: var(--navy); color: #fff; }
.playlist svg, .docs svg { flex: none; width: 20px; height: 20px; color: var(--cyan); }
.playlist button.is-active svg { color: var(--aqua); }
.docs b { display: block; font-size: 14px; }
.docs small { display: block; font-size: 12px; color: var(--muted); }
.mini-lessons { max-height: 360px; overflow-y: auto; gap: 2px; }
.mini-lessons a { display: flex; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 10px; font-size: 13px; color: var(--ink); }
.mini-lessons a:hover { background: var(--bg-soft); }
.mini-lessons i { flex: none; font-style: normal; display: grid; place-items: center; width: 30px; height: 26px; border-radius: 8px; font-size: 12px; font-weight: 800; background: var(--bg-soft); color: var(--navy); }
.mini-lessons span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-lessons a.is-seen i { background: var(--yellow); color: var(--ink); }
.mini-lessons a.is-active { background: var(--cyan-soft); font-weight: 700; }
.mini-lessons a.is-active i { background: var(--cyan); color: #fff; }

/* Administración: tipos de cuenta y cursos */
.tag.gold { background: #fff4d4; color: #7a5200; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.chips button { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: var(--pill); border: 1px solid var(--line); background: #fff; font: inherit; font-size: 13px; font-weight: 600; color: var(--navy); cursor: pointer; }
.chips button span { min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: var(--pill); background: var(--bg-soft); font-size: 11px; font-weight: 800; }
.chips button.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.chips button.active span { background: rgba(255, 255, 255, .2); }
.admin-cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; margin-bottom: 20px; }
.admin-cols .card > :not(.card-head) { margin: 18px 22px; }
.tree { margin: 0 22px; padding: 14px 16px; border-radius: var(--r-md); background: var(--deep); color: #cfe9f7; font: 600 12.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-x: auto; }
.lesson-admin { display: grid; }
.la { border-top: 1px solid var(--line); }
.la:first-child { border-top: 0; }
.la summary { display: flex; align-items: center; gap: 14px; padding: 14px 22px; cursor: pointer; list-style: none; }
.la summary::-webkit-details-marker { display: none; }
.la summary .lc-num { width: 40px; height: 40px; font-size: 16px; border-radius: 11px; }
.la summary b { flex: 1; color: var(--ink); }
.la summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
.la[open] summary::after { transform: rotate(-135deg); }
.la[open] summary { background: var(--bg-soft); }
.la-body { display: grid; gap: 18px; padding: 18px 22px 24px; }
.mat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mat-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); }
.mat-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--cyan-soft); color: var(--cyan); flex: none; }
.mat-ic svg { width: 18px; height: 18px; }
.mat-title { flex: 1; min-width: 0; }
.mat-title b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat-title small { font-size: 12px; color: var(--muted); }
.la-add { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.la-add form { display: grid; gap: 8px; align-content: start; padding: 14px; border-radius: var(--r-md); background: var(--bg-soft); }
.la-add b { font-size: 13px; color: var(--navy); }
.la-add .input { height: 40px; font-size: 13px; background: #fff; }
.la-add .btn { justify-self: start; }

@media (max-width: 980px) {
  .course-spot, .lesson-layout, .admin-cols { grid-template-columns: 1fr; }
  .lesson-side { position: static; }
  .tools-grid > .course-card:only-child { flex-direction: column; }
}
@media (max-width: 640px) {
  .syllabus { gap: 8px; }
  .sy-cls { padding: 8px; }
  .sy-cls i { font-size: 17px; }
  .sy-cls em { width: 22px; height: 22px; }
  .syllabus-card { padding: 16px; }
  .course-nums dt { font-size: 34px; }
  .ring { width: 130px; height: 130px; }
  .ring b { font-size: 30px; }
  .la-add { grid-template-columns: 1fr; }
  .la summary { padding: 12px 16px; }
  .la-body { padding: 14px 16px 20px; }
  .lesson-actions .spacer { display: none; }
  .lesson-actions .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { .syllabus-card .sy-cls { animation: none; } }

/* Barra superior con tres secciones (administrador): en pantallas medianas se oculta el texto de la marca
   y del usuario; si aun así no cabe, las pestañas se desplazan de lado en vez de desbordar la página. */
.nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { flex: none; white-space: nowrap; }
@media (max-width: 1080px) {
  .topbar:has(.nav a:nth-child(3)) .brandmark > span:not(.logo-anim),
  .topbar:has(.nav a:nth-child(3)) .user-btn .who { display: none; }
}
.tool-pick-row:has(> :only-child) { grid-template-columns: 1fr; }

/* ---------- Cursos: banner de catálogo, apartados integral / especializados ---------- */
.is-special, .spec-chip, .bw, .sw, .spec-day { --brand: var(--aqua); }
.brand-renault, .is-special.brand-renault, .spec-chip.brand-renault, .spec-day.brand-renault { --brand: var(--yellow); }
.brand-volkswagen, .is-special.brand-volkswagen, .spec-chip.brand-volkswagen, .spec-day.brand-volkswagen { --brand: #74adff; }

.courses-hero { align-items: stretch; gap: 32px; min-height: 270px; }
.courses-hero .ch-copy { flex: 1 1 440px; display: flex; flex-direction: column; justify-content: center; }
.courses-hero h1 { max-width: 15ch; }
.ch-jump { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.ch-jump .btn svg { width: 18px; height: 18px; }
.ch-jump .btn-cta { text-transform: none; letter-spacing: 0; }
.ch-art { flex: 0 1 400px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; align-content: center; }
.ch-tile:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.ch-tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 108px; padding: 36px 18px 18px; border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); color: #fff; overflow: hidden; backdrop-filter: blur(2px);
  transition: transform .3s var(--ease), background .3s, border-color .3s; }
.ch-tile:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .4); color: #fff; }
.ch-tile::before { content: ""; position: absolute; top: 16px; left: 18px; width: 30px; height: 4px; border-radius: 4px; background: var(--brand, var(--aqua)); }
.ch-tile { container-type: inline-size; }
.ch-tile b { font-size: min(24px, 13cqi); font-weight: 900; letter-spacing: -.01em; text-transform: uppercase; line-height: 1; white-space: nowrap; }
.ch-tile b .bw { display: block; color: var(--brand); }
.ch-tile.is-multi b .bw + .bw { margin-top: 4px; }
.ch-tile.is-multi::before { background: linear-gradient(90deg, var(--yellow) 50%, #74adff 50%); }
.ch-tile > span { margin-top: 6px; font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, .78); }

.course-group { margin-top: 44px; scroll-margin-top: 90px; }
.page-head + .course-group { margin-top: 8px; }
.cg-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 24px; flex-wrap: wrap; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--line); }
.cg-head h2 { margin: 0; font-size: clamp(22px, 2.2vw, 30px); font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; color: var(--navy); }
.cg-head p { margin: 0; font-size: 14px; color: var(--muted); }

/* Tarjeta de curso especializado: la marca como protagonista y un bloque por día */
.course-card.is-special .course-visual { min-height: 230px; padding: 30px 32px; place-items: stretch; }
.course-group .tools-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); }
.course-card.is-special .course-visual { container-type: inline-size; }
.course-card.is-special .tool-body h3 { font-size: clamp(22px, 2.1vw, 28px); overflow-wrap: anywhere; }
.spec-art { width: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; }
.spec-word { white-space: nowrap; font-size: min(64px, 13.5cqi); font-weight: 900; letter-spacing: -.03em; line-height: .88; text-transform: uppercase;
  color: transparent; -webkit-text-stroke: 1.6px var(--brand); transition: color .4s var(--ease); }
.spec-word .sw { display: block; -webkit-text-stroke: 1.6px var(--brand); }
.spec-art.is-multi .spec-word { font-size: min(52px, 11cqi); }
.spec-art.is-multi .spec-word .sw:nth-child(2) { margin-top: .06em; }
.course-card.is-special:hover .spec-word, .course-card.is-special:hover .spec-word .sw { color: var(--brand); }
.spec-days { display: flex; gap: 10px; }
.spec-day { flex: 1; display: flex; flex-direction: column; padding: 12px 14px; border-radius: var(--r-md); background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); }
.spec-day small { font-size: 11px; font-weight: 700; color: rgba(255, 255, 255, .72); }
.spec-day b { font-size: 32px; font-weight: 900; line-height: 1; color: var(--brand); }
.spec-day.is-seen { background: var(--brand); border-color: var(--brand); }
.spec-day.is-seen small, .spec-day.is-seen b { color: var(--deep); }

/* Landing: los especializados junto al curso integral */
.spec-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 20px; }
.spec-strip-label { margin-right: 4px; font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .85); }
.spec-chip { padding: 6px 13px; border-radius: var(--pill); border: 1.5px solid var(--brand); color: var(--brand); font-size: 12px; font-weight: 900; letter-spacing: .04em; }

/* Administración de cursos */
.course-switch { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.cs-chips { flex: 1; display: flex; gap: 8px; flex-wrap: wrap; }
.cs-chips a { display: flex; flex-direction: column; padding: 9px 16px; border-radius: var(--r-md); background: #fff; border: 1px solid var(--line); font-size: 14px; font-weight: 800; line-height: 1.2; color: var(--navy); }
.cs-chips a small { font-size: 11px; font-weight: 600; color: var(--muted); }
.cs-chips a:hover { border-color: var(--cyan); }
.cs-chips a.active { background: var(--cyan); border-color: var(--cyan); color: #fff; }
.cs-chips a.active small { color: rgba(255, 255, 255, .85); }
.card-actions { display: flex; gap: 8px; margin-left: auto; }
.pick-group { margin: 12px 0 6px; font-size: 12px; font-weight: 800; color: var(--navy); }

@media (max-width: 640px) {
  .courses-hero { gap: 20px; }
  .ch-art { flex-basis: 100%; }
  .ch-tile { min-height: 88px; }
  .course-card.is-special .course-visual { min-height: 0; padding: 24px; }
}
