/* Inspire — sistema visual de los paneles (central y de cada sitio). Blanco cálido, tinta neutra y
   un solo acento: el azul Inspire (cobalto, no marino). Los nombres de variable antiguos se conservan
   como alias para no tocar las pantallas: --marino = tinta, --oro = azul Inspire. */
:root {
  --azul: #2250d9;
  --azul-hondo: #1a41b8;
  --azul-claro: #6d8ff0;
  --azul-velo: #edf2fe;
  --tinta: #14171f;
  --tinta-2: #2a2f3a;
  --tinta-3: #4b5260;
  --fondo: #fafaf8;
  --papel: #ffffff;
  --linea: #e9e7e2;
  --texto: #14171f;
  --suave: #6a7080;
  --bien: #1f7a55;
  --alerta: #b4402a;
  --sombra: 0 1px 2px rgba(20, 23, 31, .04), 0 6px 20px rgba(20, 23, 31, .04);
  --radio: 12px;
  --curva: cubic-bezier(.2, .7, .2, 1);
  --titulo: "Inter Tight", Inter, system-ui, sans-serif;
  /* alias */
  --marino: var(--tinta); --marino-2: var(--tinta-2); --marino-3: var(--tinta-3);
  --oro: var(--azul); --oro-claro: var(--azul-claro); --marfil: var(--fondo); --serif: var(--titulo);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 15px;
  color: var(--texto);
  background: var(--fondo);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--titulo); font-weight: 600; letter-spacing: -.02em; margin: 0; color: var(--tinta); }
h1 { font-size: 32px; line-height: 1.1; }
h2 { font-size: 24px; }
h3 { font-size: 17px; letter-spacing: -.01em; }
a { color: var(--azul); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }

/* ---- marca */
.inspire-logo { display: block; color: var(--tinta); flex: none; }
.marca { display: flex; align-items: center; gap: 12px; color: var(--tinta); text-decoration: none; }
.marca b { font-family: var(--titulo); font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.marca small { display: block; font-size: 11px; letter-spacing: .04em; color: var(--suave); margin-top: 1px; }
/* Qué se administra: el sitio del cliente (con su logo) o la administración global. */
.contexto { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--linea); border-radius: 10px; background: var(--fondo); min-width: 0; }
.contexto b { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contexto small { display: block; font-size: 11.5px; color: var(--suave); }
.contexto .sello { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--azul-velo); color: var(--azul); flex: none; }
.contexto .sello svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.contexto > span:last-child { min-width: 0; }

/* ---- controles */
label { display: block; font-size: 12.5px; font-weight: 500; color: var(--tinta-3); margin: 14px 0 6px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--texto); background: var(--papel);
  border: 1px solid var(--linea); border-radius: 10px; padding: 11px 13px;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 4px rgba(34, 80, 217, .12); }
textarea { min-height: 84px; resize: vertical; }
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 500; font-size: 14px;
  border: 1px solid var(--tinta); background: var(--tinta); color: #fff;
  border-radius: 999px; padding: 10px 18px; cursor: pointer; text-decoration: none;
  transition: background .2s, border-color .2s, transform .15s var(--curva);
}
.boton:hover { background: var(--tinta-2); border-color: var(--tinta-2); }
.boton:active { transform: scale(.98); }
.boton:disabled { opacity: .5; cursor: default; }
.boton.oro { background: var(--azul); border-color: var(--azul); color: #fff; }
.boton.oro:hover { background: var(--azul-hondo); border-color: var(--azul-hondo); }
.boton.sutil { background: var(--papel); color: var(--tinta); border-color: var(--linea); }
.boton.sutil:hover { border-color: var(--tinta-3); background: var(--papel); }
.boton.chico { padding: 6px 12px; font-size: 13px; }
.error { color: var(--alerta); font-size: 13.5px; min-height: 20px; margin-top: 10px; }

/* ---- ingreso */
.ingreso { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; background: var(--papel); }
.ingreso .lado { background: var(--fondo); border-right: 1px solid var(--linea); padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.ingreso .lado .corriente-fija { position: absolute; left: -10%; right: -10%; bottom: 18%; width: 120%; height: 160px; pointer-events: none; }
.ingreso .lado .corriente-fija path { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; animation: fluir 2.4s var(--curva) .3s forwards; }
.ingreso .lema { position: relative; }
.ingreso .lema .inspire-logo { color: var(--tinta); }
.ingreso .lema p { font-family: var(--titulo); font-size: clamp(30px, 3.4vw, 46px); line-height: 1.08; letter-spacing: -.03em; margin: 28px 0 0; max-width: 12ch; color: var(--tinta); }
.ingreso .lema p span { color: var(--azul); }
.ingreso .lado small { color: var(--suave); font-size: 12.5px; position: relative; }
.ingreso .form { display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.ingreso form { width: 100%; max-width: 360px; }
.ingreso form h1 { margin-bottom: 6px; }
.ingreso form .sub { color: var(--suave); margin: 0 0 22px; }
.ingreso form .boton { width: 100%; margin-top: 24px; padding: 13px; }
.ingreso form .contexto { margin-bottom: 26px; }
.ingreso .marca-movil { display: none; margin-bottom: 30px; }

/* ---- panel */
.panel { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.menu { background: var(--papel); border-right: 1px solid var(--linea); padding: 24px 14px 18px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; }
.menu > .marca { padding: 4px 10px 2px; }
.menu nav { display: flex; flex-direction: column; gap: 2px; }
.menu nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px;
  color: var(--tinta-3); text-decoration: none; font-size: 14px; transition: background .2s, color .2s;
}
.menu nav a:hover { background: var(--fondo); color: var(--tinta); }
.menu nav a.activo { background: var(--azul-velo); color: var(--azul); font-weight: 500; }
.menu nav svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; flex: none; }
.menu .perfil { margin-top: auto; border-top: 1px solid var(--linea); padding: 16px 10px 0; font-size: 13px; }
.menu .perfil b { display: block; color: var(--tinta); font-weight: 600; }
.menu .perfil span { color: var(--suave); font-size: 12px; }
.menu .perfil button { margin-top: 12px; background: none; border: 1px solid var(--linea); color: var(--tinta-3); border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 13px; cursor: pointer; }
.menu .perfil button:hover { border-color: var(--tinta-3); color: var(--tinta); }

main { padding: 40px 48px 64px; min-width: 0; animation: aparecer .5s var(--curva) both; }
.cabeza { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.cabeza .eyebrow { font-size: 12.5px; color: var(--azul); font-weight: 500; margin-bottom: 6px; }
.cabeza p { color: var(--suave); margin: 8px 0 0; }

.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 28px; }
.cifra { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 18px 20px; }
.cifra b { display: block; font-family: var(--titulo); font-size: 32px; font-weight: 600; letter-spacing: -.03em; color: var(--tinta); line-height: 1.05; }
.cifra span { font-size: 12.5px; color: var(--suave); }

.tarjeta { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); box-shadow: var(--sombra); padding: 22px 24px; }
.tarjeta + .tarjeta { margin-top: 16px; }
.tarjeta h3 { margin-bottom: 12px; }

.sitios { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.sitio { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: border-color .25s, transform .25s var(--curva), box-shadow .25s; }
.sitio:hover { border-color: rgba(34, 80, 217, .45); transform: translateY(-2px); box-shadow: var(--sombra); }
.sitio .portada { height: 88px; background: var(--azul-velo); display: flex; align-items: flex-end; padding: 14px 18px; }
.sitio .portada span { font-family: var(--titulo); font-size: 30px; font-weight: 600; color: var(--azul); line-height: 1; letter-spacing: -.03em; }
.sitio .cuerpo { padding: 14px 18px 18px; flex: 1; }
.sitio .cuerpo h3 { font-size: 18px; margin-bottom: 4px; }
.sitio .cuerpo p { color: var(--suave); font-size: 13px; margin: 0; overflow-wrap: anywhere; }
.sitio .pie { display: flex; justify-content: space-between; align-items: center; padding: 0 18px 16px; font-size: 12.5px; color: var(--suave); }

.etiqueta { display: inline-block; font-size: 11.5px; font-weight: 500; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--linea); color: var(--tinta-3); background: var(--fondo); white-space: nowrap; }
.etiqueta.publicado { color: var(--bien); border-color: rgba(31, 122, 85, .25); background: rgba(31, 122, 85, .06); }
.etiqueta.construccion { color: var(--azul); border-color: rgba(34, 80, 217, .25); background: var(--azul-velo); }
.etiqueta.pausado, .etiqueta.archivado, .etiqueta.inactivo { color: var(--suave); }

.vacio { text-align: center; padding: 48px 20px; color: var(--suave); }
.vacio h3 { margin-bottom: 8px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; color: var(--suave); font-weight: 500; padding: 10px 12px; border-bottom: 1px solid var(--linea); }
td { padding: 13px 12px; border-bottom: 1px solid var(--linea); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td small { color: var(--suave); display: block; overflow-wrap: anywhere; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--fondo); }

.actividad { list-style: none; margin: 0; padding: 0; }
.actividad li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--linea); font-size: 13.5px; }
.actividad li:last-child { border-bottom: 0; }
.actividad time { color: var(--suave); font-size: 12px; white-space: nowrap; }

/* ---- ventana */
.velo { position: fixed; inset: 0; background: rgba(20, 23, 31, .32); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 20; animation: aparecer-velo .25s ease both; }
.ventana { background: var(--papel); border-radius: 16px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; padding: 26px 26px 22px; box-shadow: 0 24px 64px rgba(20, 23, 31, .18); animation: aparecer .35s var(--curva) both; }
.ventana .acciones { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.ventana .dos { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.checks { display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow: auto; border: 1px solid var(--linea); border-radius: 10px; padding: 10px 12px; }
.checks label { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 400; color: var(--texto); font-size: 14px; }
.checks input { width: auto; accent-color: var(--azul); }
.clave { font-family: ui-monospace, Menlo, monospace; font-size: 20px; background: var(--fondo); border: 1px dashed var(--azul); border-radius: 10px; padding: 14px; text-align: center; margin: 14px 0 4px; user-select: all; }
.aviso { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--tinta); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; z-index: 30; box-shadow: var(--sombra); max-width: calc(100vw - 32px); animation: aparecer .3s var(--curva) both; }

@keyframes aparecer { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes aparecer-velo { from { opacity: 0; } }

/* ---- teléfono: nada se desplaza hacia el lado */
@media (max-width: 820px) {
  .ingreso { grid-template-columns: 1fr; }
  .ingreso .lado { display: none; }
  .ingreso .marca-movil { display: block; }

  .panel { grid-template-columns: 1fr; }
  .menu { position: sticky; top: 0; height: auto; z-index: 10; flex-direction: row; align-items: center; padding: 12px 16px; gap: 12px; border-right: 0; border-bottom: 1px solid var(--linea); background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); }
  .menu > .marca { padding: 0; }
  .menu .contexto { padding: 6px 10px; border: 0; background: transparent; }
  .menu .contexto .sello, .menu .contexto small { display: none; }
  .menu nav { position: fixed; left: 0; right: 0; bottom: 0; flex-direction: row; justify-content: space-around; background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--linea); }
  .menu nav a { flex-direction: column; gap: 3px; font-size: 11px; padding: 6px 4px; flex: 1; text-align: center; }
  .menu nav a.activo { background: transparent; }
  .menu .perfil { margin: 0 0 0 auto; border: 0; padding: 0; text-align: right; }
  .menu .perfil b, .menu .perfil span { display: none; }
  .menu .perfil button { margin: 0; }

  main { padding: 24px 16px 96px; }
  h1 { font-size: 27px; }
  .ventana .dos { grid-template-columns: 1fr; }
  table.adaptable thead { display: none; }
  table.adaptable tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--linea); }
  table.adaptable td { display: block; border: 0; padding: 2px 4px; }
}

/* ---- ficha de proyecto y editor de contenido (v1) */
.cabeza .eyebrow a { color: inherit; text-decoration: none; }
.cabeza .eyebrow a:hover { text-decoration: underline; }
a.sitio { color: inherit; text-decoration: none; }
.sitio.modulo .cuerpo { padding-top: 18px; }
.ficha { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; align-items: start; }
.ficha .tarjeta + .tarjeta { margin-top: 0; }
dl.datos { display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px; margin: 0; font-size: 14px; }
dl.datos dt { color: var(--suave); font-size: 12.5px; }
dl.datos dd { margin: 0; overflow-wrap: anywhere; }
.muestra { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; border: 1px solid var(--linea); }
.checks label span { display: block; }
.editor { max-width: 760px; }
.editor .campo + .campo { margin-top: 4px; }
.editor .acciones { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.ayuda { display: block; color: var(--suave); font-size: 12.5px; margin-top: 6px; }
.req { color: var(--oro); }
.interruptor { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--texto); }
.interruptor input { width: auto; }
.imagenes { display: flex; flex-wrap: wrap; gap: 10px; }
.imagenes figure { position: relative; margin: 0; width: 112px; height: 112px; border-radius: 10px; overflow: hidden; border: 1px solid var(--linea); background: var(--marfil); }
.imagenes figure img { width: 100%; height: 100%; object-fit: contain; }
.imagenes .quitar { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(20, 23, 31, .72); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.imagenes .subir { display: flex; align-items: center; justify-content: center; text-align: center; width: 112px; height: 112px; margin: 0; border: 1px dashed var(--oro); border-radius: 8px; color: var(--marino-3); font-size: 12.5px; cursor: pointer; padding: 8px; }
.imagenes .subir:hover { background: var(--marfil); }
.logo-cliente { width: 28px; height: 28px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--linea); padding: 2px; flex: none; }

/* ---- pantallas de extensiones: lista, chips, paso (reutilizables) */
.sitio.modulo.destacado { border-color: var(--oro); }
.buscador { margin-bottom: 12px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: none; }
.chips button { flex: none; font: inherit; font-size: 13px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--linea); background: var(--papel); color: var(--tinta-3); cursor: pointer; transition: background .2s, color .2s; }
.chips button.activo { background: var(--marino); border-color: var(--marino); color: #fff; }
.lista { display: flex; flex-direction: column; gap: 8px; }
.fila { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); color: inherit; text-decoration: none; transition: border-color .2s; }
.fila:hover { border-color: rgba(34, 80, 217, .45); }
.fila img, .fila .sin-foto { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--marfil); flex: none; }
.fila .texto { flex: 1; min-width: 0; }
.fila .texto b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fila small { color: var(--suave); font-size: 12.5px; }
.fila .lado { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.paso { display: flex; }
.paso input { text-align: center; border-radius: 0; min-width: 0; }
.paso button { flex: none; width: 44px; font: inherit; font-size: 18px; border: 1px solid var(--linea); background: var(--marfil); cursor: pointer; }
.paso button:first-child { border-radius: 8px 0 0 8px; border-right: 0; }
.paso button:last-child { border-radius: 0 8px 8px 0; border-left: 0; }
.codigos { margin-top: 16px; font-size: 13px; color: var(--suave); }
.codigos code { background: var(--marfil); padding: 2px 6px; border-radius: 4px; margin-right: 4px; display: inline-block; margin-bottom: 4px; }

/* ---- Inspire: entrada «el primer aliento» (public/inspire.js). ≈2,4 s, una vez por sesión. */
.inspire-entrada { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--fondo); pointer-events: none; animation: entrada-sale .5s var(--curva) 1.95s forwards; }
.inspire-entrada .composicion { width: min(560px, 86vw); text-align: center; animation: composicion-sale .5s var(--curva) 1.95s forwards; }
.inspire-entrada .escena { width: 100%; height: auto; overflow: visible; color: var(--tinta); }
.inspire-entrada .corriente { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; animation: fluir .8s cubic-bezier(.45, 0, .2, 1) .1s forwards, desvanecer .5s ease .85s forwards; }
.inspire-entrada .aliento, .inspire-entrada .pulso { transform-box: fill-box; transform-origin: center; }
.inspire-entrada .aliento { transform: scale(0); animation: nacer .55s cubic-bezier(.2, .9, .3, 1.35) .72s forwards; }
.inspire-entrada .pulso { opacity: 0; animation: pulso 1s cubic-bezier(.2, .7, .2, 1) .8s forwards; }
.inspire-entrada .marca-entrada path { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; animation: trazar .62s cubic-bezier(.5, 0, .2, 1) calc(.86s + var(--i) * .06s) forwards; }
.inspire-entrada .marca-entrada .segundo { opacity: 0; animation: surgir .3s ease 1.2s forwards; }
.inspire-entrada .eslogan { margin: 6px 0 0; font-family: var(--titulo); font-size: clamp(15px, 2.2vw, 19px); letter-spacing: -.01em; color: var(--tinta-3); opacity: 0; animation: aparecer .6s var(--curva) 1.32s forwards; }
/* Un trazo sin dibujar es invisible: si no, sus puntas redondas se verían como puntos sueltos. */
@keyframes fluir { 0% { opacity: 0; } 1% { opacity: 1; } to { opacity: 1; stroke-dashoffset: 0; } }
@keyframes trazar { 0% { opacity: 0; } 1% { opacity: 1; } to { opacity: 1; stroke-dashoffset: 0; } }
@keyframes desvanecer { to { opacity: 0; } }
@keyframes nacer { to { transform: scale(1); } }
@keyframes surgir { to { opacity: 1; } }
@keyframes pulso { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(7); } }
@keyframes entrada-sale { to { opacity: 0; visibility: hidden; } }
@keyframes composicion-sale { to { transform: translateY(-8px) scale(.985); } }
@media (prefers-reduced-motion: reduce) {
  .inspire-entrada { animation: entrada-sale .3s ease .7s forwards; }
  .inspire-entrada *, .ingreso .lado .corriente-fija path { animation: none !important; stroke-dashoffset: 0 !important; opacity: 1 !important; transform: none !important; }
  .inspire-entrada .corriente, .inspire-entrada .pulso { opacity: 0 !important; }
  main, .ventana, .velo, .aviso { animation: none; }
}

/* Selector de tema en el perfil del menú */
.menu .perfil label { margin: 12px 0 4px; font-size: 11.5px; }
.menu .perfil select { padding: 6px 10px; font-size: 13px; border-radius: 999px; }

/* =====================================================================
   Temas «Cristal» (traídos del panel de Mensajero). <html data-tema="cristal"> o "cristal-noche";
   cada usuario elige el suyo (usuarios.tema). El acento sigue siendo el azul Inspire.
   ===================================================================== */
:root[data-tema="cristal"] {
  --fondo: rgba(255, 255, 255, .32);
  --papel: rgba(255, 255, 255, .5);
  --linea: rgba(255, 255, 255, .62);
  --texto: #1d1915; --tinta: #17140f; --tinta-2: #2b261f; --tinta-3: #4f463c; --suave: #6e6359;
  --azul-velo: rgba(34, 80, 217, .12);
  --sobre-tinta: #fff;
  --cristal-solido: rgba(250, 245, 238, .92);
  --cristal-blur: blur(22px) saturate(160%);
  --sombra: 0 10px 34px rgba(70, 45, 20, .13), inset 0 1px 0 rgba(255, 255, 255, .75);
  --radio: 18px;
  --pagina: radial-gradient(55% 45% at 10% 12%, rgba(255, 248, 236, .95), transparent 70%),
    radial-gradient(40% 38% at 88% 8%, rgba(198, 160, 118, .55), transparent 70%),
    radial-gradient(50% 55% at 80% 82%, rgba(146, 104, 68, .42), transparent 70%),
    radial-gradient(42% 46% at 22% 88%, rgba(220, 196, 166, .75), transparent 70%),
    linear-gradient(135deg, #f0e6d8 0%, #dcc8ae 55%, #c8ab88 100%);
  background-color: #e7d9c6;
  color-scheme: light;
}
:root[data-tema="cristal-noche"] {
  --fondo: rgba(255, 255, 255, .05);
  --papel: rgba(255, 255, 255, .07);
  --linea: rgba(255, 255, 255, .13);
  --texto: #eeece8; --tinta: #f4f2ee; --tinta-2: #dcd8d1; --tinta-3: #c3beb6; --suave: #a7a19a;
  --azul: #6d8ff0; --azul-hondo: #8aa6f4; --azul-velo: rgba(109, 143, 240, .16);
  --bien: #4fd39a; --alerta: #ff8077;
  --sobre-tinta: #14171a;
  --cristal-solido: rgba(28, 32, 37, .95);
  --cristal-blur: blur(24px) saturate(140%);
  --sombra: 0 12px 40px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .08);
  --radio: 18px;
  --pagina: radial-gradient(45% 40% at 12% 10%, rgba(34, 80, 217, .3), transparent 70%),
    radial-gradient(40% 40% at 90% 15%, rgba(190, 125, 60, .22), transparent 70%),
    radial-gradient(55% 55% at 75% 90%, rgba(70, 90, 140, .28), transparent 70%),
    linear-gradient(135deg, #0e1215 0%, #171c21 55%, #1f1914 100%);
  background-color: #12161a;
  color-scheme: dark;
}
:root[data-tema^="cristal"] { background-image: var(--pagina); background-attachment: fixed; min-height: 100%; }
[data-tema^="cristal"] body { background: transparent; }
[data-tema^="cristal"] .tarjeta, [data-tema^="cristal"] .cifra, [data-tema^="cristal"] .menu {
  background: var(--papel); border: 1px solid var(--linea); box-shadow: var(--sombra);
  -webkit-backdrop-filter: var(--cristal-blur); backdrop-filter: var(--cristal-blur);
}
[data-tema^="cristal"] .ventana { background: var(--cristal-solido); }
[data-tema^="cristal"] .velo { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@media (min-width: 861px) {
  [data-tema^="cristal"] .menu { margin: 12px 0 12px 12px; top: 12px; height: calc(100vh - 24px); border-radius: 22px; }
}
[data-tema^="cristal"] .menu nav a.activo { background: var(--tinta); color: var(--sobre-tinta); box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
[data-tema^="cristal"] .boton, [data-tema^="cristal"] .aviso, [data-tema^="cristal"] .chips button.activo { color: var(--sobre-tinta); }
[data-tema^="cristal"] .boton.oro { color: #fff; }
[data-tema^="cristal"] .boton.sutil { background: var(--fondo); color: var(--tinta); }
[data-tema^="cristal"] input, [data-tema^="cristal"] select, [data-tema^="cristal"] textarea { border-radius: 12px; }
[data-tema^="cristal"] select option { background: var(--cristal-solido); color: var(--texto); }
[data-tema^="cristal"] .cifra { transition: transform .25s ease; }
[data-tema^="cristal"] .cifra:hover { transform: translateY(-4px); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  [data-tema^="cristal"] .tarjeta, [data-tema^="cristal"] .cifra, [data-tema^="cristal"] .menu { background: var(--cristal-solido); }
}
@media (prefers-reduced-motion: reduce) { [data-tema^="cristal"] .cifra:hover { transform: none; } }
@media (max-width: 820px) {
  .menu .perfil { display: flex; align-items: center; gap: 8px; }
  .menu .perfil label { display: none; }
  .menu .perfil select { width: auto; padding: 5px 8px; }
  [data-tema^="cristal"] .menu, [data-tema^="cristal"] .menu nav { background: var(--cristal-solido); }
  [data-tema^="cristal"] .menu nav a.activo { background: transparent; color: var(--azul); box-shadow: none; }
}

/* Bienvenida en cristal: el logotipo sobre el fondo del tema. */
[data-tema^="cristal"] .inspire-entrada { background: var(--pagina); background-color: inherit; }
:root[data-tema="cristal"] .inspire-entrada { background-color: #e7d9c6; }
:root[data-tema="cristal-noche"] .inspire-entrada { background-color: #12161a; }
/* Sin lámina detrás del logotipo: al desvanecerse la entrada, la lámina quedaba a la vista sin el logo. */
[data-tema^="cristal"] .ingreso, [data-tema^="cristal"] .ingreso .lado { background: transparent; }
[data-tema^="cristal"] .ingreso form { background: var(--papel); border: 1px solid var(--linea); box-shadow: var(--sombra); border-radius: 24px; padding: 30px 26px;
  -webkit-backdrop-filter: var(--cristal-blur); backdrop-filter: var(--cristal-blur); }

/* Ojo de contraseña: el ojo tachado indica que se está mostrando */
.con-ojo { position: relative; display: block; }
.con-ojo input { padding-right: 44px; }
.ojo { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: none; color: var(--suave); cursor: pointer; border-radius: 8px; padding: 0; }
.ojo:hover { color: var(--tinta); }
.ojo svg { width: 19px; height: 19px; }
.ojo .tachado { display: none; }
.ojo.visible .tachado { display: inline; }
