/* =========================================================
   OLLCAIH UI — styleuniversal.css (LIBRERÍA)
   Base + FX + Componentes + Layout + Docs + Modals
   ========================================================= */

/* ====== Base / Tokens ====== */
:root{
  --bg: #0f1114;
  --panel: #14181d;
  --panel2:#101317;
  --line: #2a323b;
  --line2:#3a4653;
  --text: #e7edf6;
  --muted:#aab4c2;

  /* Y2K / PS2 accents */
  --lime: #b6d317;
  --ice:  #8cc7ff;
  --pink: #ff55cc;
  --neon: #b7ff2a;
  --ink:  #0b0d10;

  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 12px;
  --radius2: 16px;

  --hudStroke: rgba(183,255,42,.22);
  --hudGlow: 0 0 0 1px rgba(183,255,42,.18), 0 0 26px rgba(140,199,255,.08);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin: 0;
  font-family: Verdana, Arial, sans-serif;
  background: linear-gradient(180deg, var(--ink), var(--bg));
  color: var(--text);
}

html{ scrollbar-gutter: stable; }

/* ===========================
   ✅ LINK RESET
   Evita el morado/subrayado por defecto
   =========================== */
a{
  color: inherit;
  text-decoration: none;
}
a:hover{ text-decoration: none; }

/* Accesibilidad */
.sr-only{
  position:absolute;
  width:1px;height:1px;
  padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0;
}

.skiplink{
  position: absolute;
  left: -999px;
  top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(140,199,255,.45);
  background: rgba(0,0,0,.8);
  color: var(--text);
  text-decoration: none;
  z-index: 9999;
}
.skiplink:focus{ left: 10px; }

/* Focus visible (teclado) */
.tab:focus-visible,
.rail__btn:focus-visible,
.btn:focus-visible,
.docs__nav a:focus-visible,
.disclosure__summary:focus-visible,
.toTop:focus-visible,
.iconbtn:focus-visible,
.dropdown__btn:focus-visible,
.dropdown__item:focus-visible,
.row:focus-visible,
.pager__btn:focus-visible,
.pager__num:focus-visible,
.switch:focus-visible,
.input:focus-visible{
  outline: 2px solid rgba(140,199,255,.85);
  outline-offset: 2px;
}

/* ====== Helpers icon sizes ====== */
.is-24{ font-size:24px; }
.is-32{ font-size:32px; }
.is-40{ font-size:40px; }

/* ====== CRT / PS2 overlay ====== */
.crt{
  position: relative;
  overflow-x: hidden;
}

/* scanlines + viñeta */
.crt::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;

  background:
    radial-gradient(1200px 700px at 50% 30%, rgba(140,199,255,.10), transparent 60%),
    radial-gradient(900px 600px at 20% 70%, rgba(255,85,204,.06), transparent 55%),
    radial-gradient(1000px 700px at 80% 70%, rgba(182,211,23,.06), transparent 55%),
    repeating-linear-gradient(
      180deg,
      rgba(255,255,255,.03) 0px,
      rgba(255,255,255,.03) 1px,
      rgba(0,0,0,0) 3px,
      rgba(0,0,0,0) 6px
    ),
    radial-gradient(circle at 50% 50%, transparent 55%, rgba(0,0,0,.55) 100%);
  mix-blend-mode: overlay;
  opacity: .35;
}

/* ruido suave */
.crt::after{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 6;

  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.02) 0 1px, rgba(0,0,0,0) 1px 4px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.015) 0 1px, rgba(0,0,0,0) 1px 6px);
  opacity: .12;
}

/* ====== FX orbs (cosas flotando) ====== */
.fx{
  position: fixed;
  inset: 0;
  pointer-events:none;
  z-index: 1;
}
.orb{
  position:absolute;
  width: 340px;
  height: 340px;
  border-radius: 999px;
  filter: blur(1px);
  opacity: .22;
  background:
    radial-gradient(circle at 30% 30%, rgba(140,199,255,.55), transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(255,85,204,.35), transparent 55%),
    radial-gradient(circle at 50% 55%, rgba(182,211,23,.25), transparent 60%);
  outline: 1px solid rgba(183,255,42,.12);
  box-shadow: 0 0 60px rgba(140,199,255,.10);
  animation: drift 12s ease-in-out infinite;
  will-change: transform;
}
.orb--a{ top: -120px; left: -140px; animation-duration: 16s; }
.orb--b{ top: 8%; right: -160px; width: 420px; height: 420px; animation-duration: 19s; }
.orb--c{ bottom: -160px; left: 8%; width: 520px; height: 520px; opacity:.16; animation-duration: 22s; }
.orb--d{ bottom: 10%; right: 10%; width: 260px; height: 260px; opacity:.18; animation-duration: 14s; }
.orb--e{ top: 48%; left: 46%; width: 180px; height: 180px; opacity:.14; animation-duration: 18s; }

@keyframes drift{
  0%,100%{ transform: translate3d(0,0,0) scale(1); }
  50%{ transform: translate3d(22px,-14px,0) scale(1.03); }
}

/* ====== Topbar / Tabs ====== */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(182,211,23,.95), rgba(182,211,23,.78));
  border-bottom: 2px solid rgba(0,0,0,.25);
  box-shadow: var(--shadow);
}

.topbar__brand{
  display:flex;
  gap:.55rem;
  align-items:center;
  padding:.55rem .9rem .2rem;
  color:#0b0d10;
}

.brand__logo{
  width: 56px;
  height: 56px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 10px 24px rgba(0,0,0,.18);
  background: rgba(255,255,255,.25);
}

.brand__text{
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 1.15rem;
  white-space: nowrap;
}

.hudpill{
  margin-left: .65rem;
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  padding: .28rem .5rem;
  border-radius: 999px;
  background: rgba(0,0,0,.10);
  border: 1px solid rgba(0,0,0,.18);
  font-size: .86rem;
  white-space: nowrap;
}

.tabs{
  display:flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding: .35rem .7rem .65rem;
}

/* (propuesto) tab demo: evita que un preview se pegue al header */
.tabs--demo{ padding: 0; background: none; }

.tab{
  display:flex;
  align-items:center;
  gap:.45rem;

  background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,.12));
  border: 1px solid rgba(0,0,0,.25);
  border-bottom-width: 3px;
  border-radius: 10px;

  color: #0b0d10;
  text-decoration:none;
  padding: .35rem .55rem;
  font-size: .92rem;
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset;
  transition: transform .12s ease, filter .12s ease;
}

.tab i{ font-size: 1.05rem; }
.tab span{ line-height:1; }

.tab:hover{
  transform: translateY(-1px);
  filter: saturate(1.08);
}

.tab.is-active{
  background: #9fd6ff;
  color: #0b0d10;
  border: 0;
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.75),
    0 6px 18px rgba(0,0,0,.25);
}

/* ====== Layout ====== */
.layout{
  position: relative;
  z-index: 10;
  max-width: 1180px;
  margin: 0 auto;
  display:flex;
  gap: 14px;
  padding: 14px;
}

/* Left icon rail */
.rail{
  width: 58px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid var(--line);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  padding: 10px;
  display:flex;
  flex-direction:column;
  gap: 10px;
}

.rail__btn{
  display:grid;
  place-items:center;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.07);
  background: linear-gradient(180deg, rgba(140,199,255,.14), rgba(0,0,0,.0));
  color: var(--text);
  text-decoration:none;
  transition: box-shadow .14s ease, border-color .14s ease, transform .14s ease;
  position: relative;
}

.rail__btn:hover{
  border-color: rgba(183,255,42,.35);
  box-shadow: 0 0 0 3px rgba(183,255,42,.10);
  transform: translateY(-1px);
}

.rail__btn.is-active{
  background: rgba(159,214,255,.22);
  border-color: rgba(159,214,255,.55);
  box-shadow: 0 0 0 3px rgba(159,214,255,.10);
}

.rail__btn i{ font-size: 1.25rem; }
.rail__spacer{ flex:1; }

/* Main content */
.content{
  flex: 1;
  min-width: 0;
}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid var(--line);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  padding: 16px;
}

.card--hud{
  border-color: rgba(183,255,42,.16);
  box-shadow: var(--shadow), var(--hudGlow);
}

.h2{
  margin: 0 0 .55rem;
  font-size: 1.05rem;
  letter-spacing: .2px;
  display:flex;
  align-items:center;
  gap:.45rem;
}

.muted{ color: var(--muted); }

.sep{
  border:0;
  height:1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  margin: 12px 0;
}

.kicker{
  color: var(--muted);
  letter-spacing: .6px;
  text-transform: uppercase;
  font-size: .78rem;
  margin-bottom: 6px;
}

.h1{
  margin: 0 0 8px;
  font-size: 1.75rem;
  letter-spacing: .3px;
}

.lead{
  margin: 0;
  color: #dbe6f6;
  line-height: 1.45;
}

/* ====== Buttons ====== */
.btn{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  padding: .5rem .75rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(180deg, rgba(182,211,23,.18), rgba(0,0,0,.0));
  color: var(--text);
  text-decoration:none;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  cursor: pointer;
}

.btn:hover{
  border-color: rgba(183,255,42,.45);
  box-shadow: 0 0 0 3px rgba(183,255,42,.10);
  transform: translateY(-1px);
}

.btn--ghost{
  background: linear-gradient(180deg, rgba(140,199,255,.14), rgba(0,0,0,.0));
}

.btn--lime{
  border-color: rgba(183,255,42,.26);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}

/* ====== Icon button ====== */
.iconbtn{
  width: 44px;
  height: 44px;
  display:grid;
  place-items:center;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  color: var(--text);
  cursor:pointer;
  transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}
.iconbtn:hover{
  border-color: rgba(140,199,255,.55);
  box-shadow: 0 0 0 3px rgba(140,199,255,.10);
  transform: translateY(-1px);
}

/* ====== Code blocks ====== */
pre{
  margin: 10px 0 0;
  padding: 12px;
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.35);
  box-shadow: 0 0 0 1px rgba(183,255,42,.06);
}
code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  font-size: .9rem;
  color: #dfeaff;
}

/* ====== Footer ====== */
.footer{
  margin-top: 14px;
  padding: 12px 6px;
  color: var(--muted);
  display:flex;
  align-items:center;
  gap: 10px;
  justify-content:center;
  flex-wrap: wrap;
}
.footer a{ color: var(--ice); }
.footer__dot{ opacity:.6; }

/* =========================================================
   DOCS (sidebar + contenido)
   ========================================================= */
.docs{
  display:flex;
  gap: 14px;
  width: 100%;
}

.docs__sidebar{
  width: 320px;
  position: sticky;
  top: 112px;
  align-self: flex-start;
  max-height: calc(100vh - 140px);
  overflow:auto;

  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  padding: 12px;

  /* ===== Scrollbar HUD ===== */
  scrollbar-width: thin;
  scrollbar-color: rgba(140,199,255,.45) rgba(0,0,0,.18);
}

/* Chrome/Edge/Safari */
.docs__sidebar::-webkit-scrollbar{ width: 10px; }
.docs__sidebar::-webkit-scrollbar-track{
  background: rgba(0,0,0,.18);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.docs__sidebar::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg, rgba(140,199,255,.45), rgba(183,255,42,.22));
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,.22);
}
.docs__sidebar::-webkit-scrollbar-thumb:hover{
  background: linear-gradient(180deg, rgba(140,199,255,.60), rgba(183,255,42,.32));
}

.docs__title{
  display:flex;
  align-items:center;
  gap: 10px;
  margin: 0 0 8px;
  font-size: 1.05rem;
  letter-spacing: .2px;
}

.badge{
  font-size: .78rem;
  padding: .18rem .45rem;
  border-radius: 999px;
  border: 1px solid rgba(183,255,42,.22);
  background: rgba(0,0,0,.18);
  color: rgba(183,255,42,.95);
  white-space: nowrap;
}

.docs__hint{
  margin: 6px 0 0;
  line-height: 1.45;
}

.docs__nav{
  display:grid;
  gap: 6px;
  margin-top: 10px;
}

.docs__nav a{
  display:flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  text-decoration:none;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.10);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.docs__nav a:hover{
  transform: translateY(-1px);
  border-color: rgba(140,199,255,.55);
  box-shadow: 0 0 0 3px rgba(140,199,255,.10);
}

.docs__nav a.is-active{
  border-color: rgba(159,214,255,.55);
  background: rgba(159,214,255,.14);
  box-shadow: 0 0 0 3px rgba(159,214,255,.08);
}

.docs__nav small{
  display:block;
  color: var(--muted);
  font-size: .82rem;
  margin-left: 24px;
  margin-top: -2px;
}

.docs__main{
  flex: 1;
  min-width: 0;
}

/* (propuesto) tip block dentro del sidebar */
.docs__tip{
  border-radius: var(--radius2);
}

.section{ margin-top: 14px; }
.section:first-child{ margin-top: 0; }

.demo{
  margin-top: 12px;
  border-radius: var(--radius2);
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.16);
  padding: 12px;
}

.demo--row{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items:center;
}
.demo__full{ width: 100%; margin:0; }

/* ====== Item component ====== */
.item{
  margin-top: 12px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius2);
  background: rgba(0,0,0,.12);
  padding: 12px;
}

.item__head{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.item__title{
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: .2px;
}

.item__desc{
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.item__tag{
  font-size: .78rem;
  padding: .18rem .45rem;
  border-radius: 999px;
  border: 1px solid rgba(140,199,255,.22);
  background: rgba(0,0,0,.18);
  color: rgba(140,199,255,.95);
  white-space: nowrap;
}

/* ====== Disclosure (details/summary) ====== */
.disclosure{
  margin-top: 10px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  background: rgba(0,0,0,.12);
  overflow: hidden;
}

.disclosure__summary{
  list-style: none;
  cursor: pointer;
  user-select: none;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;

  padding: 10px 12px;
  font-weight: 800;
  letter-spacing: .2px;

  border-bottom: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(140,199,255,.10), rgba(0,0,0,0));
}

.disclosure__summary::-webkit-details-marker{ display:none; }

.disclosure__left{
  display:flex;
  align-items:center;
  gap: 8px;
}

.disclosure__hint{
  font-size: .78rem;
  padding: .15rem .55rem;
  border-radius: 999px;
  border: 1px solid rgba(183,255,42,.22);
  background: rgba(0,0,0,.18);
  color: rgba(183,255,42,.95);
  white-space: nowrap;
}

.disclosure__hint.is-copied{
  border-color: rgba(159,214,255,.55);
  color: rgba(159,214,255,.95);
}

.disclosure[open] .disclosure__summary{
  background: linear-gradient(180deg, rgba(182,211,23,.10), rgba(0,0,0,0));
}

/* ====== Checklist ====== */
.checklist{
  margin: 0;
  padding-left: 1.2rem;
  color: #dbe6f6;
}
.checklist li{ margin: .35rem 0; }
.checklist code{ font-size: .92rem; }

/* ====== Floating Top button ====== */
.toTop{
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.45);
  color: var(--text);
  display:grid;
  place-items:center;
  cursor:pointer;
  opacity: 0;
  transform: translateY(8px);
  pointer-events:none;
  transition: opacity .14s ease, transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.toTop.is-visible{
  opacity: 1;
  transform: translateY(0);
  pointer-events:auto;
}
.toTop:hover{
  border-color: rgba(140,199,255,.55);
  box-shadow: 0 0 0 3px rgba(140,199,255,.10);
}

/* =========================================================
   COMPONENTS: Tags / Alerts / Toast / Dropdown / Tooltip
   ========================================================= */

/* Tags */
.tag{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  padding:.22rem .55rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.16);
  color: var(--text);
  font-size: .82rem;
  white-space: nowrap;
}
.tag i{ font-size: 1rem; }
.tag--info{ border-color: rgba(140,199,255,.35); }
.tag--ok{ border-color: rgba(183,255,42,.30); }
.tag--warn{ border-color: rgba(255,210,120,.35); }
.tag--danger{ border-color: rgba(255,120,120,.35); }

/* Alerts */
.alert{
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  line-height: 1.4;
}
.alert--info{ border-color: rgba(140,199,255,.35); }
.alert--ok{ border-color: rgba(183,255,42,.30); }
.alert--warn{ border-color: rgba(255,210,120,.35); }
.alert--danger{ border-color: rgba(255,120,120,.35); }

/* Toast */
.toast{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  padding: .55rem .75rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.35);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease;
}
.toast.is-show{
  opacity: 1;
  transform: translateY(0);
}

/* Dropdown */
.dropdown{
  position: relative;
  display:inline-block;
}
.dropdown__btn{
  list-style:none;
  cursor:pointer;
  user-select:none;
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  padding:.5rem .75rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
}
.dropdown__btn::-webkit-details-marker{ display:none; }

.dropdown__menu{
  position: absolute;
  margin-top: 8px;
  min-width: 220px;
  right: 0;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(10,12,14,.92);
  box-shadow: var(--shadow);
  padding: 8px;
  z-index: 200;
}
.dropdown__item{
  display:flex;
  align-items:center;
  gap:.5rem;
  padding: .5rem .6rem;
  border-radius: 12px;
  color: var(--text);
  text-decoration:none;
  border: 1px solid transparent;
}
.dropdown__item:hover{
  border-color: rgba(140,199,255,.45);
  background: rgba(140,199,255,.10);
}
.dropdown__item.is-danger:hover{
  border-color: rgba(255,120,120,.45);
  background: rgba(255,120,120,.08);
}

/* Tooltip (data-tip) */
.tip{ position: relative; }
.tip::after{
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  top: -10px;
  transform: translate(-50%, -100%);
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.75);
  color: var(--text);
  font-size: .78rem;
  opacity: 0;
  pointer-events:none;
  white-space: nowrap;
  transition: opacity .14s ease;
}
.tip:hover::after{ opacity: 1; }

/* =========================================================
   COMPONENTS: Forms / Switch / Checks / Row / Table / Pager
   ========================================================= */

/* Forms */
.field{ display:block; }
.label{
  display:block;
  margin: 0 0 6px;
  font-weight: 700;
  letter-spacing: .2px;
}
.input{
  width: 100%;
  padding: .55rem .7rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  color: var(--text);
  outline: none;
}
.help{
  margin-top: 6px;
  color: var(--muted);
  font-size: .9rem;
}
.error{
  margin-top: 6px;
  color: rgba(255,140,140,.95);
  font-size: .9rem;
}
.field.is-error .input{ border-color: rgba(255,120,120,.45); }

/* Switch */
.switch{
  display:inline-flex;
  align-items:center;
  gap:.6rem;
  padding:.45rem .65rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  color: var(--text);
  cursor:pointer;
  transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease, background .14s ease;
}
.switch:hover{
  border-color: rgba(140,199,255,.35);
  box-shadow: 0 0 0 3px rgba(140,199,255,.08);
  transform: translateY(-1px);
}

/* Track */
.switch__thumb{
  width: 34px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  position: relative;
  transition: border-color .14s ease, background .14s ease;
}

/* Knob */
.switch__thumb::after{
  content:"";
  position:absolute;
  top: 50%;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: rgba(159,214,255,.75);
  box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 6px 16px rgba(0,0,0,.35);
  transition: transform .14s ease, background .14s ease;
}

/* Estado ON: solo CSS (depende de aria-checked="true") */
.switch[aria-checked="true"]{
  border-color: rgba(183,255,42,.30);
  box-shadow: 0 0 0 3px rgba(183,255,42,.08);
}
.switch[aria-checked="true"] .switch__thumb{
  border-color: rgba(183,255,42,.35);
  background: rgba(183,255,42,.12);
}
.switch[aria-checked="true"] .switch__thumb::after{
  transform: translate(16px, -50%);
  background: rgba(183,255,42,.85);
}

/* Estado OFF explícito */
.switch[aria-checked="false"] .switch__thumb::after{
  transform: translate(0px, -50%);
}

/* Checks */
.check, .radio{
  display:flex;
  align-items:center;
  gap:.6rem;
  cursor:pointer;
  user-select:none;
  position: relative;
}
.check input, .radio input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

/* Base box/dot */
.check__box, .radio__dot{
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
  display:inline-block;
  position: relative;
  transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
.radio__dot{ border-radius: 999px; }

/* Checkbox ON */
.check input:checked + .check__box{
  border-color: rgba(183,255,42,.45);
  background: rgba(183,255,42,.22);
  box-shadow: 0 0 0 2px rgba(183,255,42,.08);
}
.check input:checked + .check__box::after{
  content:"";
  position:absolute;
  left: 5px;
  top: 2px;
  width: 6px;
  height: 10px;
  border-right: 2px solid rgba(231,237,246,.92);
  border-bottom: 2px solid rgba(231,237,246,.92);
  transform: rotate(45deg);
}

/* Checkbox hover */
.check:hover .check__box{
  border-color: rgba(183,255,42,.28);
  box-shadow: 0 0 0 2px rgba(183,255,42,.06);
}

/* Radio ON */
.radio input:checked + .radio__dot{
  border-color: rgba(140,199,255,.55);
  box-shadow: 0 0 0 2px rgba(140,199,255,.07);
}
.radio input:checked + .radio__dot::after{
  content:"";
  position:absolute;
  inset: 4px;
  border-radius: 999px;
  background: rgba(140,199,255,.80);
  box-shadow: 0 0 0 1px rgba(0,0,0,.35);
}

/* Radio hover */
.radio:hover .radio__dot{
  border-color: rgba(140,199,255,.35);
  box-shadow: 0 0 0 2px rgba(140,199,255,.05);
}

/* Row item */
.row{
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.14);
  text-decoration:none;
  color: var(--text);
}
.row:hover{
  border-color: rgba(140,199,255,.45);
  box-shadow: 0 0 0 3px rgba(140,199,255,.10);
}
.row__icon{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
}
.row__main{ display:block; min-width: 0; }
.row__title{ display:block; font-weight: 800; }
/* ✅ FIX: esto estaba roto por caracteres raros */
.row__desc{ display:block; color: var(--muted); font-size: .92rem; }
.row__meta{ color: var(--muted); margin-left: auto; }

/* Table */
.tableWrap{ overflow:auto; }
.table{
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}
.table th, .table td{
  text-align:left;
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.table thead th{
  font-size: .85rem;
  color: var(--muted);
  letter-spacing: .3px;
  text-transform: uppercase;
}
.table tbody tr:hover{
  background: rgba(140,199,255,.06);
}

/* Pager */
.pager{
  display:flex;
  align-items:center;
  gap: 8px;
  flex-wrap: wrap;
}
.pager__btn,
.pager__num{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  padding: .45rem .6rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  color: var(--text);
  text-decoration:none;
}
.pager__num.is-active{
  border-color: rgba(140,199,255,.55);
  background: rgba(140,199,255,.10);
}

/* Meter */
.meter{
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  overflow: hidden;
}
.meter__bar{
  height: 100%;
  background: linear-gradient(90deg, rgba(140,199,255,.55), rgba(183,255,42,.45));
}

/* User chip */
.userchip{
  display:inline-flex;
  align-items:center;
  gap:.6rem;
  padding: .5rem .65rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
}
.userchip__av{
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.12);
}
.userchip__name{ font-weight: 800; }

/* Divider */
.divider{
  display:flex;
  align-items:center;
  gap: 10px;
}
.divider__line{
  flex:1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
}
.divider__text{
  font-size: .78rem;
  color: var(--muted);
  letter-spacing: .6px;
}

/* Crumbs */
.crumbs{
  display:flex;
  align-items:center;
  gap: 8px;
  color: var(--muted);
}
.crumbs__a{ color: var(--ice); text-decoration:none; }
.crumbs__here{ color: var(--text); }
.crumbs__sep{ opacity:.6; }

/* Accordion */
.accordion{
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.12);
  overflow:hidden;
  margin-bottom: 10px;
}
.accordion__sum{
  list-style:none;
  cursor:pointer;
  user-select:none;
  padding: 10px 12px;
  font-weight: 800;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(140,199,255,.08), rgba(0,0,0,0));
}
.accordion__sum::-webkit-details-marker{ display:none; }
.accordion__body{ padding: 12px; color: #dbe6f6; }

/* Mini list helper */
.mini{ padding-left: 1.1rem; }
.mini li{ margin: .3rem 0; }

/* ====== MODALS ====== */
html.is-modal-open,
body.is-modal-open{
  overflow: hidden;
}

.modal{
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
}
.modal.is-open{ display: block; }

.modal__overlay{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
}

.modal__panel{
  position: relative;
  width: min(720px, calc(100% - 26px));
  margin: 10vh auto 0;
  border-radius: 18px;
  border: 1px solid rgba(183,255,42,.16);
  background: rgba(10,12,14,.92);
  box-shadow: var(--shadow), var(--hudGlow);
  overflow: hidden;
}

.modal__head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(90deg, rgba(182,211,23,.40), rgba(0,0,0,0));
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.modal__title{
  display:flex;
  align-items:center;
  gap: 8px;
  letter-spacing: .2px;
}

.modal__body{
  padding: 14px;
}

.modal__foot{
  padding: 12px 14px 14px;
  display:flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* (Opcional pero recomendado) close button */
.modal__close{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  color: var(--text);
  cursor: pointer;
}
.modal__close:hover{
  border-color: rgba(140,199,255,.55);
  box-shadow: 0 0 0 3px rgba(140,199,255,.10);
}

/* =========================================================
   RESPONSIVE (propuesto)
   ========================================================= */
@media (max-width: 980px){
  .layout{ flex-direction: column; }
  .rail{
    width: 100%;
    flex-direction: row;
    gap: 10px;
    justify-content: space-between;
  }
  .rail__spacer{ display:none; }
  .docs{ flex-direction: column; }
  .docs__sidebar{
    width: 100%;
    position: relative;
    top: auto;
    max-height: none;
  }
}
/* =========================================================
   PATTERNS: Tiles grid + HUD panel
   (faltaban en tu CSS)
   ========================================================= */

/* Tiles grid */
.tilegrid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
}

@media (min-width: 980px){
  .tilegrid{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}

.tile{
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: var(--radius2);
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.14);
  box-shadow: 0 0 0 1px rgba(183,255,42,.06);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.tile i{ font-size: 1.35rem; }

.tile__title{
  font-weight: 900;
  letter-spacing: .2px;
}

.tile__desc{
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.3;
}

.tile:hover{
  transform: translateY(-1px);
  border-color: rgba(140,199,255,.55);
  box-shadow: 0 0 0 3px rgba(140,199,255,.10), var(--shadow);
}

/* HUD panel */
.hudpanel{
  border-radius: 18px;
  border: 1px solid rgba(183,255,42,.16);
  background: rgba(10,12,14,.92);
  box-shadow: var(--shadow), var(--hudGlow);
  overflow: hidden;
}

.hudpanel__head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(90deg, rgba(182,211,23,.35), rgba(0,0,0,0));
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.hudpanel__title{
  font-weight: 900;
  letter-spacing: .6px;
}

.hudpanel__body{ padding: 12px; }

.hudpanel__foot{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.18);
}

.hudpanel__log{
  font-weight: 900;
  letter-spacing: .6px;
  padding: .12rem .45rem;
  border-radius: 999px;
  border: 1px solid rgba(140,199,255,.22);
  color: rgba(140,199,255,.95);
}
