:root {
  --barra-alto: 56px;
  --tinta: #eaf2fb;
  --tinta-suave: #a9bed4;
  --ambar: #ffb648;
  --ambar-fuerte: #ffc56b;
  --navy: #0d2942;
  --navy-2: #123a5e;
  --cristal-borde: rgba(255, 255, 255, .13);
  --sombra: 0 30px 90px rgba(0, 0, 0, .6);
  --fuente: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: #050d18;
  color: var(--tinta);
  font-family: var(--fuente);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.escritorio { position: fixed; inset: 0; overflow: hidden; }
.escritorio__fondo {
  position: absolute;
  inset: 0;
  background: #071527 url("../img/escritorio-fondo.svg") center center / cover no-repeat;
  transition: filter .4s ease;
}
.escritorio__fondo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 100% at 50% 0%, transparent 35%, rgba(2, 7, 12, .45) 100%);
}
body[data-fondo="brasa"] .escritorio__fondo { filter: hue-rotate(-28deg) saturate(1.25) brightness(1.06); }

.marco { position: absolute; inset: 0 0 var(--barra-alto) 0; overflow: hidden; }

/* ---------- Iconos del escritorio ---------- */
.iconos {
  position: absolute;
  inset: 10px;
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(auto-fill, 104px);
  grid-auto-columns: 96px;
  gap: 2px;
  padding: 6px;
  max-height: calc(100% - 16px);
}
.iconos--libres { display: block; overflow: hidden; }
.iconos--libres .icono {
  position: absolute;
  left: 6px;
  top: 6px;
  transition: left .16s cubic-bezier(.2, .8, .2, 1), top .16s cubic-bezier(.2, .8, .2, 1), background .15s ease;
  touch-action: none;
  cursor: grab;
}
.iconos--libres .icono--arrastrando {
  transition: none;
  z-index: 6;
  cursor: grabbing;
  opacity: .92;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .5));
}
.icono {
  position: relative;
  width: 96px;
  height: 102px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 7px 4px 5px;
  cursor: default;
  user-select: none;
  outline: none;
}
.icono:hover { background: rgba(255, 255, 255, .10); }
.icono:focus-visible { outline: 2px solid var(--ambar); outline-offset: -1px; }
.icono[data-seleccionado="true"] {
  background: rgba(255, 182, 72, .18);
  box-shadow: inset 0 0 0 1px rgba(255, 182, 72, .55);
}
.icono__tile {
  width: 54px;
  height: 54px;
  flex: none;
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: 13px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .06));
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .2);
  backdrop-filter: blur(8px);
  transition: transform .15s ease, background .15s ease;
  overflow: hidden;
}
.icono:hover .icono__tile {
  transform: translateY(-1px);
  background: linear-gradient(160deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, .09));
}
.icono__tile img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.icono__letras { font-size: 20px; font-weight: 700; letter-spacing: .5px; color: #fff; }
.icono__nombre {
  font-size: 12px;
  line-height: 1.22;
  text-align: center;
  max-width: 92px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .95), 0 0 10px rgba(0, 0, 0, .65);
}
.icono__badge {
  position: absolute;
  top: 8px;
  right: 7px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(255, 182, 72, .94);
  color: #231607;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.icono[data-estado="desarrollo"] .icono__tile { opacity: .76; }

/* ---------- Ventanas ---------- */
.ventanas { position: absolute; inset: 0; pointer-events: none; }
.ventana {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 360px;
  min-height: 240px;
  background: #f7f9fc;
  color: #1b2431;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .5), 0 6px 18px rgba(0, 0, 0, .35);
  pointer-events: auto;
  animation: abrirVentana .18s cubic-bezier(.2, .8, .2, 1);
}
.ventana.ventana--activa {
  border-color: rgba(255, 182, 72, .42);
  box-shadow: 0 34px 90px rgba(0, 0, 0, .62), 0 0 0 1px rgba(255, 182, 72, .18);
}
.ventana[data-estado="minimizada"] { display: none; }
.ventana[data-estado="maximizada"] {
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 0;
}
@keyframes abrirVentana {
  from { opacity: 0; transform: scale(.975) translateY(10px); }
  to { opacity: 1; transform: none; }
}
.ventana__barra {
  height: 40px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 5px 0 10px;
  background: linear-gradient(180deg, #1a3854, #122d47);
  color: #e8f1fa;
  touch-action: none;
  user-select: none;
}
.ventana__icono { width: 18px; height: 18px; object-fit: contain; border-radius: 4px; flex: none; }
.ventana__titulo {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ventana__acciones { display: flex; gap: 1px; flex: none; }
.ventana__boton {
  width: 32px;
  height: 29px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #d6e4f2;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.ventana__boton svg { width: 15px; height: 15px; }
.ventana__boton:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.ventana__boton--cerrar:hover { background: #d13438; }
.ventana__cuerpo { position: relative; flex: 1; min-height: 0; background: #fff; }
.ventana__marco { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.ventana__carga {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  background: radial-gradient(120% 100% at 50% 0%, #173a5a, #0b1e31 70%);
  color: #dbe7f3;
  text-align: center;
  transition: opacity .25s ease;
}
.ventana--cargada .ventana__carga { opacity: 0; pointer-events: none; }
.ventana__carga-texto { font-size: 13px; color: #b9cde0; }
.ventana__carga-acciones { display: flex; gap: 8px; margin-top: 4px; }
.girador {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .16);
  border-top-color: var(--ambar);
  animation: girar .8s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }
.ventana__redimensionar {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 3;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
}
.ventana__redimensionar::before {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 9px;
  height: 9px;
  border-right: 2px solid rgba(27, 36, 49, .35);
  border-bottom: 2px solid rgba(27, 36, 49, .35);
}

/* ---------- Apps internas ---------- */
.ventana__interna {
  position: absolute;
  inset: 0;
  display: flex;
  overflow: hidden;
}
.ventana__interna > * { flex: 1; min-width: 0; }

/* Bloc de notas */
.bloc {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #fbfcfe;
  color: #1b2431;
}
.bloc__barra {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  row-gap: 6px;
  padding: 7px 10px;
  background: #eef3f9;
  border-bottom: 1px solid #dbe4ee;
}
.bloc__boton {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid #cfdbe8;
  border-radius: 6px;
  background: #fff;
  color: #24384c;
  font-size: 12px;
  cursor: pointer;
}
.bloc__boton:hover { background: #f4f8fc; border-color: #b7c8da; }
.bloc__boton svg { width: 14px; height: 14px; }
.bloc__boton--peligro { color: #a12b2b; }
.bloc__boton--peligro:hover { background: #fdf2f2; border-color: #e3bcbc; }
.bloc__sep { width: 1px; height: 18px; background: #cfdbe8; }
.bloc__guardado { font-size: 11px; color: #6b7d90; }
.bloc__flex { flex: 1; }
.bloc__cuerpo {
  flex: 1;
  min-height: 0;
  display: flex;
}
.bloc__archivos {
  flex: none;
  width: 186px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f6f9fc;
  border-right: 1px solid #dbe4ee;
}
.bloc__archivos-cab {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #6b7d90;
}
.bloc__total {
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e3ecf5;
  font-size: 10px;
  text-align: center;
  color: #52677c;
}
.bloc__lista {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin: 0;
  padding: 2px 6px 8px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bloc__archivo {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #24384c;
  text-align: left;
  cursor: pointer;
}
.bloc__archivo:hover { background: #eaf1f9; }
.bloc__archivo--activo { background: #dfeaf7; }
.bloc__archivo--activo .bloc__archivo-nombre { font-weight: 700; }
.bloc__archivo-icono { flex: none; color: #5d7c9b; }
.bloc__archivo-icono svg { display: block; width: 16px; height: 16px; }
.bloc__archivo-texto {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.bloc__archivo-nombre {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
}
.bloc__archivo-meta { font-size: 10px; color: #7b8da0; }
.bloc__vacio {
  margin: 0;
  padding: 10px 12px 14px;
  font-size: 11.5px;
  line-height: 1.45;
  color: #7b8da0;
}
.bloc__editor {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.bloc__nombre {
  flex: none;
  margin: 8px 12px 0;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #1b2431;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.bloc__nombre:hover { border-color: #d3e0ec; background: #fff; }
.bloc__nombre:focus { border-color: #7fb0dd; background: #fff; outline: 0; box-shadow: 0 0 0 3px rgba(86, 148, 205, .16); }
.bloc__area {
  flex: 1;
  min-height: 0;
  width: 100%;
  padding: 8px 16px 14px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: #22303f;
  font: 13.5px/1.65 "Cascadia Mono", "Consolas", "Courier New", monospace;
  tab-size: 4;
}
.bloc__area::placeholder { color: #9aacbd; }
.bloc__pie {
  flex: none;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 18px 5px 12px;
  border-top: 1px solid #e2eaf3;
  background: #f3f7fb;
  font-size: 11px;
  color: #6b7d90;
}

/* Notas adhesivas */
.notas-app {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #f4f0e6;
  color: #1b2431;
}
.notas-app__barra {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  background: #fffdf7;
  border-bottom: 1px solid #e6dfd1;
}
.notas-app__titulo { font-size: 13px; font-weight: 700; }
.notas-app__sub { display: block; margin-top: 1px; font-size: 10.5px; color: #8b8171; }
.notas-app__nueva {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(180deg, #ffcb6e, #f2a736);
  color: #35230a;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(160, 108, 20, .28);
}
.notas-app__nueva:hover { filter: brightness(1.05); }
.notas-app__nueva:active { transform: translateY(1px); }
.notas-app__tablero {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 14px;
  align-content: start;
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 255, 255, .85), transparent 55%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .015) 0 1px, transparent 1px 22px),
    #f0ebdf;
}
.notas-app__vacio {
  grid-column: 1 / -1;
  justify-self: center;
  align-self: center;
  max-width: 320px;
  padding: 26px 18px;
  text-align: center;
  color: #7c7364;
  font-size: 12.5px;
  line-height: 1.45;
}
.notas-app__vacio strong { display: block; margin-bottom: 6px; color: #4d4538; font-size: 14px; }
.nota {
  --nota-fondo: #ffe79a;
  --nota-borde: #e8c25c;
  --nota-tinta: #4a3610;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 172px;
  border-radius: 4px 4px 10px 4px;
  background: var(--nota-fondo);
  border: 1px solid var(--nota-borde);
  box-shadow: 0 8px 18px rgba(90, 70, 30, .16), inset 0 1px 0 rgba(255, 255, 255, .45);
  transition: transform .15s ease, box-shadow .15s ease;
}
.nota:nth-child(3n + 2) { transform: rotate(-.7deg); }
.nota:nth-child(3n) { transform: rotate(.6deg); }
.nota:hover { transform: rotate(0) translateY(-2px); box-shadow: 0 12px 24px rgba(90, 70, 30, .2); }
.nota::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  border-radius: 0 0 10px 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, .08), rgba(255, 255, 255, .35) 55%, rgba(0, 0, 0, .12));
  pointer-events: none;
}
.nota--ambar { --nota-fondo: #ffe79a; --nota-borde: #e8c25c; --nota-tinta: #4a3610; }
.nota--rosa { --nota-fondo: #ffc9d4; --nota-borde: #eea2b2; --nota-tinta: #4b1f2a; }
.nota--verde { --nota-fondo: #ccecb6; --nota-borde: #a9d68d; --nota-tinta: #233d16; }
.nota--azul { --nota-fondo: #bfe0ff; --nota-borde: #93c6ef; --nota-tinta: #16334a; }
.nota--lila { --nota-fondo: #ddd0ff; --nota-borde: #bfa9ee; --nota-tinta: #2f1f4a; }
.nota__texto {
  flex: 1;
  min-height: 0;
  padding: 13px 13px 4px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: var(--nota-tinta);
  font: 13px/1.5 "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
}
.nota__texto::placeholder { color: currentColor; opacity: .5; }
.nota__pie {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 8px 9px;
}
.nota__colores { display: flex; gap: 4px; }
.nota__color {
  width: 15px;
  height: 15px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, .16);
  border-radius: 50%;
  background: var(--color);
  cursor: pointer;
}
.nota__color[data-activo="true"] { box-shadow: 0 0 0 2px rgba(0, 0, 0, .28); }
.nota__borrar {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--nota-tinta);
  opacity: .55;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.nota__borrar:hover { opacity: 1; background: rgba(0, 0, 0, .08); }
.nota__borrar svg { width: 14px; height: 14px; }

.dialogo__pista {
  margin-top: 10px !important;
  padding: 10px 12px;
  border-left: 3px solid var(--ambar);
  border-radius: 6px;
  background: rgba(255, 182, 72, .1);
  color: #d9e6f2;
  font-size: 12px !important;
}

/* ---------- Menú Inicio ---------- */
.inicio {
  position: absolute;
  z-index: 700;
  left: 50%;
  bottom: calc(var(--barra-alto) + 8px);
  width: min(680px, calc(100vw - 20px));
  max-height: min(720px, calc(100dvh - var(--barra-alto) - 24px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(14, 28, 44, .9);
  border: 1px solid var(--cristal-borde);
  border-radius: 14px;
  box-shadow: var(--sombra);
  backdrop-filter: blur(30px) saturate(1.35);
  -webkit-backdrop-filter: blur(30px) saturate(1.35);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(12px) scale(.99);
  transition: opacity .16s ease, transform .16s ease;
}
.inicio[data-abierto="true"] {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}
.inicio__cabecera { display: flex; align-items: center; gap: 12px; padding: 16px 18px 10px; }
.buscador {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #cfe0f0;
}
.buscador:focus-within { border-color: rgba(255, 182, 72, .6); box-shadow: 0 0 0 2px rgba(255, 182, 72, .15); }
.buscador svg { width: 17px; height: 17px; flex: none; opacity: .8; }
.buscador input { width: 100%; border: 0; outline: 0; background: transparent; color: #fff; font-size: 13px; }
.buscador input::placeholder { color: #9eb3c8; }
.inicio__user { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #c7d8e8; white-space: nowrap; }
.inicio__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #ffce7c, #e58b2a);
  color: #25170a;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}
.inicio__cuerpo {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 18px 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .25) transparent;
}
.inicio__titulo {
  margin: 12px 2px 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #a9bed4;
}
.ancladas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ancla {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 104px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 10px;
  background: rgba(255, 255, 255, .055);
  color: #eaf2fb;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.ancla:hover { background: rgba(255, 255, 255, .11); transform: translateY(-1px); }
.ancla:focus-visible { outline: 2px solid var(--ambar); outline-offset: -2px; }
.ancla__icono {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  object-fit: contain;
  background: rgba(255, 255, 255, .08);
  padding: 4px;
}
.ancla__icono--svg { display: grid; place-items: center; color: var(--ambar); }
.ancla__icono.icono__letras, .fila__icono.icono__letras, .icono__img.icono__letras { display: grid; place-items: center; }
.tarea .icono__letras { font-size: 12px; font-weight: 800; }
.ancla__icono--svg svg { width: 22px; height: 22px; }
.ancla__nombre { font-size: 12.5px; font-weight: 600; line-height: 1.2; }
.ancla__desc {
  font-size: 11px;
  color: #a9bed4;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.todas { display: flex; flex-direction: column; gap: 2px; }
.grupo { margin-top: 6px; }
.grupo__titulo { margin: 10px 4px 4px; font-size: 11px; color: #8fa6bc; letter-spacing: .03em; }
.fila {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #eaf2fb;
  text-align: left;
  cursor: pointer;
}
.fila:hover { background: rgba(255, 255, 255, .08); }
.fila:focus-visible { outline: 2px solid var(--ambar); outline-offset: -2px; }
.fila__icono {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  object-fit: contain;
  background: rgba(255, 255, 255, .07);
  padding: 3px;
  flex: none;
}
.fila__texto { flex: 1; min-width: 0; }
.fila__nombre { display: block; font-size: 12.5px; font-weight: 600; }
.fila__desc { display: block; font-size: 11px; color: #9eb3c8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fila__badge { font-size: 9.5px; color: #24170a; background: var(--ambar); padding: 2px 6px; border-radius: 999px; font-weight: 700; }
.sin-resultados { color: #a9bed4; font-size: 13px; text-align: center; padding: 24px 0; }
.inicio__pie {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .18);
}
.inicio__estado { font-size: 11px; color: #9eb3c8; }
.inicio__pie-acciones { display: flex; align-items: center; gap: 4px; }
.pie-boton {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #dce9f6;
  cursor: pointer;
  font-size: 12px;
}
.pie-boton svg { width: 15px; height: 15px; }
.pie-boton:hover { background: rgba(255, 255, 255, .1); }
.pie-boton--energia { width: 34px; padding: 0; justify-content: center; }
.menu-energia {
  position: absolute;
  right: 12px;
  bottom: 48px;
  z-index: 5;
  min-width: 150px;
  padding: 6px;
  border: 1px solid var(--cristal-borde);
  border-radius: 10px;
  background: rgba(16, 32, 50, .98);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
}
.menu-energia button {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #eaf2fb;
  text-align: left;
  font-size: 12.5px;
  cursor: pointer;
}
.menu-energia button:hover { background: rgba(255, 255, 255, .1); }

/* ---------- Barra de tareas ---------- */
.barra {
  position: absolute;
  z-index: 800;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--barra-alto);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  background: rgba(9, 19, 31, .78);
  border-top: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .28);
}
.barra__centro { display: flex; align-items: center; gap: 3px; }
.barra__bandeja { position: absolute; right: 8px; display: flex; align-items: center; gap: 2px; }
.boton-barra {
  position: relative;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #dfeaf5;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .12s ease;
}
.boton-barra:hover { background: rgba(255, 255, 255, .1); }
.boton-barra:focus-visible { outline: 2px solid var(--ambar); outline-offset: -2px; }
.boton-barra svg { width: 22px; height: 22px; }
.boton-barra--inicio {
  background: linear-gradient(160deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .12);
}
.boton-barra--inicio svg { width: 24px; height: 24px; filter: drop-shadow(0 0 8px rgba(255, 182, 72, .35)); }
.boton-barra--inicio[aria-expanded="true"] { background: rgba(255, 182, 72, .18); border-color: rgba(255, 182, 72, .5); }
.tareas { display: flex; align-items: center; gap: 3px; }
.tarea {
  position: relative;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.tarea:hover { background: rgba(255, 255, 255, .1); }
.tarea:focus-visible { outline: 2px solid var(--ambar); outline-offset: -2px; }
.tarea img { width: 26px; height: 26px; object-fit: contain; border-radius: 5px; }
.tarea::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 50%;
  width: 6px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .45);
  transform: translateX(-50%);
  transition: width .15s ease, background .15s ease;
}
.tarea[data-activa="true"]::after { width: 16px; background: var(--ambar); }
.tarea[data-estado="minimizada"]::after { width: 6px; background: rgba(255, 255, 255, .35); }
.boton-bandeja { width: 38px; height: 38px; border-radius: 7px; }
.boton-bandeja svg { width: 18px; height: 18px; }
.boton-bandeja .punto {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ambar);
  box-shadow: 0 0 0 2px rgba(9, 19, 31, .9);
}
.reloj {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #e6f0fa;
  cursor: default;
  line-height: 1.25;
}
.reloj:hover { background: rgba(255, 255, 255, .08); }
#relojHora { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
#relojFecha { font-size: 10px; color: #a9bed4; text-transform: capitalize; }

/* ---------- Diálogos ---------- */
.dialogo {
  width: min(460px, calc(100vw - 24px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  background: #132a41;
  color: var(--tinta);
  box-shadow: var(--sombra);
}
.dialogo::backdrop { background: rgba(2, 8, 14, .62); backdrop-filter: blur(5px); }
.dialogo__cabecera {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 20px 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), transparent);
}
.dialogo__icono { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex: none; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }
.dialogo__icono--svg { border-radius: 12px; }
.dialogo__titulo { margin: 0; font-size: 16px; font-weight: 650; color: #fff; }
.dialogo__sub { margin: 2px 0 0; font-size: 11.5px; color: #a9bed4; }
.dialogo__cuerpo { padding: 6px 20px 18px; color: #c8d8e8; font-size: 13px; line-height: 1.55; }
.dialogo__cuerpo p { margin: 0 0 10px; }
.dialogo__acciones {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, .18);
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.boton--primario { background: var(--ambar); border-color: #e8a33a; color: #24170a; }
.boton--primario:hover { background: var(--ambar-fuerte); }
.boton--secundario { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: #eaf2fb; }
.boton--secundario:hover { background: rgba(255, 255, 255, .14); }
.boton:focus-visible { outline: 2px solid var(--ambar); outline-offset: 2px; }
.instrucciones {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 9px;
  background: rgba(255, 255, 255, .055);
  font-size: 12px;
  color: #c8d8e8;
}
.instrucciones ol { margin: 6px 0 0; padding-left: 18px; }
.instrucciones li { margin: 4px 0; }
.instrucciones strong { color: #fff; }

/* ---------- Avisos y menú contextual ---------- */
.avisos {
  position: absolute;
  z-index: 900;
  right: 14px;
  bottom: calc(var(--barra-alto) + 12px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}
.aviso {
  max-width: min(360px, calc(100vw - 28px));
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-left: 3px solid var(--ambar);
  border-radius: 9px;
  background: rgba(16, 32, 50, .96);
  color: #eaf2fb;
  font-size: 12.5px;
  line-height: 1.4;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
  animation: entrarAviso .2s ease;
}
.aviso--error { border-left-color: #e05a5e; }
.aviso--ok { border-left-color: #4ecf8d; }
@keyframes entrarAviso {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.menu-contexto {
  position: fixed;
  z-index: 950;
  min-width: 218px;
  padding: 6px;
  border: 1px solid var(--cristal-borde);
  border-radius: 9px;
  background: rgba(16, 32, 50, .98);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
  backdrop-filter: blur(18px);
}
.menu-contexto button {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #eaf2fb;
  text-align: left;
  font-size: 12.5px;
  cursor: pointer;
}
.menu-contexto button:hover { background: rgba(255, 255, 255, .1); }

/* ---------- Apagado y arranque ---------- */
.apagado { position: absolute; inset: 0; z-index: 1200; display: grid; place-items: center; background: #040b14; }
.apagado__caja { display: flex; flex-direction: column; align-items: center; gap: 16px; color: #dbe7f3; }
.apagado__caja svg { width: 64px; height: 64px; filter: drop-shadow(0 0 24px rgba(255, 182, 72, .25)); }
.apagado__caja p { margin: 0; font-size: 14px; letter-spacing: .02em; }
.arranque {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  background: radial-gradient(90% 80% at 50% 40%, #123a5e 0%, #071527 62%, #030a12 100%);
  transition: opacity .45s ease, visibility .45s ease;
}
.arranque[data-oculto="true"] { opacity: 0; visibility: hidden; pointer-events: none; }
.arranque__caja { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.arranque__logo { width: 74px; height: 74px; animation: respirar 1.8s ease-in-out infinite; filter: drop-shadow(0 0 22px rgba(255, 182, 72, .35)); }
@keyframes respirar {
  0%, 100% { transform: scale(1); opacity: .92; }
  50% { transform: scale(1.05); opacity: 1; }
}
.arranque__nombre { margin: 0; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: #c8d8e8; }
.arranque__nombre span { color: #8fa6bc; }
.arranque__barra { width: 148px; height: 3px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.arranque__barra span { display: block; width: 40%; height: 100%; border-radius: 99px; background: var(--ambar); animation: cargar 1.4s ease-in-out infinite; }
@keyframes cargar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ---------- Móvil ---------- */
@media (max-width: 780px) {
  :root { --barra-alto: 62px; }
  .iconos {
    inset: 8px;
    grid-auto-flow: row;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-columns: auto;
    gap: 2px;
    align-content: start;
    overflow-y: auto;
    padding: 2px;
  }
  .iconos--libres { display: grid; overflow-y: auto; }
  .iconos--libres .icono { position: relative; left: auto !important; top: auto !important; cursor: default; touch-action: auto; }
  .icono { width: 100%; height: 96px; padding: 5px 2px; }
  .icono__tile { width: 50px; height: 50px; }
  .icono__nombre { font-size: 10.5px; max-width: 100%; }
  .barra { justify-content: flex-start; padding: 0 6px; }
  .barra__centro { gap: 1px; }
  .barra__bandeja { right: 4px; }
  .boton-barra { width: 40px; height: 40px; }
  .boton-bandeja { width: 34px; height: 34px; }
  .tarea { width: 40px; height: 40px; }
  .reloj { padding: 0 6px; }
  #relojFecha { display: none; }
  .inicio {
    left: 0;
    bottom: var(--barra-alto);
    width: 100%;
    max-height: calc(100dvh - var(--barra-alto));
    border-radius: 14px 14px 0 0;
    transform: translateY(14px);
  }
  .inicio[data-abierto="true"] { transform: translateY(0); }
  .inicio__user span:last-child { display: none; }
  .ancladas { grid-template-columns: repeat(2, 1fr); }
  .ventana {
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0;
    min-height: 0;
    border: 0;
    border-radius: 0;
  }
  .ventana__redimensionar { display: none; }
  .ventana__boton[data-accion="maximizar"] { display: none; }
  .ventana__barra { height: 44px; }
  .bloc__area { font-size: 16px; }
  .bloc__barra { gap: 5px; padding: 6px 8px; }
  .bloc__boton { height: 30px; padding: 0 8px; font-size: 11.5px; }
  .bloc__guardado { width: 100%; order: 10; }
  .bloc__sep, .bloc__flex { display: none; }
  .bloc__cuerpo { flex-direction: column; }
  .bloc__archivos {
    width: auto;
    height: 104px;
    border-right: 0;
    border-bottom: 1px solid #dbe4ee;
  }
  .bloc__archivos-cab { padding: 5px 10px 3px; }
  .bloc__lista {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 6px 6px;
  }
  .bloc__lista li { flex: none; }
  .bloc__archivo { width: 152px; }
  .bloc__vacio { padding: 4px 12px 8px; }
  .bloc__nombre { margin: 6px 10px 0; font-size: 15px; }
  .notas-app__tablero { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); padding: 10px; gap: 10px; }
  .nota__texto { font-size: 14px; }
  .dialogo__pista { font-size: 11.5px !important; }
  .boton-barra--inicio { width: 42px; }
}
@media (max-width: 420px) {
  .inicio__user { display: none; }
  .iconos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .inicio__estado { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
