/* ==========================================================================
   shell.css — Estructura del shell: escritorio, menú contextual y taskbar.
   Depende de los tokens de base.css (los temas los sobrescriben).
   Colores/medidas solo con var(--token); rgba() solo en sombras/overlays.
   ========================================================================== */

/* 1. Escritorio e iconos -------------------------------------------------- */
.desktop {
  position: fixed;
  inset: 0;
  background-color: var(--bg-desktop);
  background-image: var(--wallpaper, url("../assets/wall-pradera.webp"));
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  overflow: hidden;
  user-select: none;
}

.desktop-icons {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(auto-fill, 84px);
  gap: 4px;
  padding: 12px;
  position: absolute;
  inset: 0 0 var(--taskbar-h) 0;
  align-content: start;
  width: max-content;
}

.icon {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 76px;
  height: 80px;
  padding: 4px 2px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: #fff;
  cursor: default;
}

.icon img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.icon-label {
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  text-shadow: var(--icon-label-shadow);
  max-width: 74px;
  overflow-wrap: anywhere;
  padding: 0 2px;
}

.icon:hover {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .35);
}

.icon[aria-selected="true"],
.icon.selected {
  background: var(--selection-bg);
  border-color: rgba(255, 255, 255, .55);
}

.icon:focus-visible {
  outline: 2px dotted #fff;
}

.selection-box {
  position: absolute;
  border: 1px solid #fff;
  background: rgba(49, 106, 197, .25);
  pointer-events: none;
}

/* 2. Menú contextual ------------------------------------------------------- */
.context-menu {
  position: fixed;
  z-index: 9000;
  min-width: 180px;
  background: var(--menu-bg);
  border: 1px solid var(--menu-border);
  box-shadow: 2px 2px 6px rgba(0, 0, 0, .35);
  padding: 3px;
}

.context-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 4px 18px;
  font-size: var(--font-size);
  white-space: nowrap;
  background: none;
}

.context-menu button:hover:not(:disabled) {
  background: var(--accent);
  color: var(--accent-text);
}

.context-menu button:disabled {
  color: #9a9a9a;
}

/* 3. Barra de tareas ------------------------------------------------------- */
.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--taskbar-h);
  display: flex;
  align-items: stretch;
  background: var(--taskbar-bg);
  border-top: 1px solid var(--taskbar-border);
  color: var(--taskbar-text);
  z-index: 8000;
  user-select: none;
}

.start-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px 0 8px;
  background: var(--start-bg);
  border-right: 1px solid rgba(0, 0, 0, .35);
  font-weight: bold;
  font-size: 13px;
  border-radius: 0 8px 8px 0;
  cursor: default;
}

.start-button[aria-expanded="true"],
.start-button:active {
  box-shadow: inset 2px 2px 4px rgba(0, 0, 0, .45);
  filter: brightness(.85);
}

.start-logo {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .55) 0 18%, transparent 18%),
    linear-gradient(180deg, #7ec4ff, #1d5fb8);
}

.task-list {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 4px;
  overflow: hidden;
}

.task-button {
  display: flex;
  align-items: center;
  gap: 6px;
  height: calc(var(--taskbar-h) - 8px);
  max-width: 180px;
  padding: 0 8px;
  font-size: 11px;
  border: 1px solid rgba(0, 0, 0, .35);
  border-radius: 3px;
  background: rgba(255, 255, 255, .14);
  color: inherit;
  overflow: hidden;
}

.task-button img {
  width: 16px;
  height: 16px;
}

.task-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-button[aria-pressed="true"] {
  background: rgba(255, 255, 255, .28);
  box-shadow: inset 1px 1px 3px rgba(0, 0, 0, .3);
  font-weight: bold;
}

.tray {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 8px;
  background: rgba(0, 0, 0, .12);
  border-left: 1px solid rgba(0, 0, 0, .3);
  border-right: 1px solid rgba(255, 255, 255, .18);
}

.tray-btn {
  width: 22px;
  height: calc(var(--taskbar-h) - 6px);
  display: grid;
  place-items: center;
  color: inherit;
  border-radius: 2px;
}

.tray-btn:hover {
  background: rgba(255, 255, 255, .2);
}

.clock {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  padding: 0 6px;
  white-space: nowrap;
}

.show-desktop {
  width: 14px;
  height: 100%;
  border-left: 1px solid rgba(0, 0, 0, .35);
  background: linear-gradient(to bottom, rgba(255, 255, 255, .18), rgba(0, 0, 0, .12));
  cursor: default;
}

.legal {
  position: fixed;
  right: 10px;
  bottom: calc(var(--taskbar-h) + 6px);
  font-size: 10px;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .6);
  opacity: .8;
  pointer-events: none;
  z-index: 10;
}

/* 4. Menú de inicio -------------------------------------------------------- */
.start-menu {
  position: fixed;
  left: 0;
  bottom: var(--taskbar-h);
  width: 380px;
  max-width: calc(100vw - 8px);
  display: flex;
  flex-direction: column;
  background: var(--window-bg);
  border: 1px solid var(--window-border);
  border-radius: 6px 6px 0 0;
  box-shadow: var(--shadow-window);
  overflow: hidden;
  z-index: 8500;
}

.start-header {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: var(--titlebar-active-bg);
  color: var(--titlebar-text);
  font-weight: 700;
  font-size: 14px;
}

.start-header .avatar {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, .65);
  border-radius: 4px;
}

.start-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 6px;
  gap: 0;
}

.start-col.primary {
  border-right: 1px solid rgba(0, 0, 0, .18);
  padding-right: 4px;
}

.start-col.secondary {
  padding-left: 4px;
}

.start-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 30px;
  padding: 4px 8px;
  text-align: left;
  font-size: 12px;
  border-radius: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.start-item:hover,
.start-item:focus-visible {
  background: var(--accent);
  color: var(--accent-text);
}

.start-col.secondary .start-item {
  font-weight: 600;
}

.all-programs {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, .2);
  font-weight: 700;
}

.start-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--taskbar-bg);
  color: var(--taskbar-text);
  border-top: 1px solid var(--taskbar-border);
}

.start-action {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 2px;
}

.start-action:hover {
  background: rgba(255, 255, 255, .16);
}

.start-footer .legal {
  position: static;
  margin-left: auto;
  font-size: 10px;
  opacity: .75;
  text-shadow: none;
  color: inherit;
  pointer-events: none;
}

/* 5. Ventanas -------------------------------------------------------------- */
.windows-layer {
  position: fixed;
  inset: 0 0 var(--taskbar-h) 0;
  z-index: 5000;
  pointer-events: none;
}

.window {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 260px;
  min-height: 160px;
  overflow: hidden;
  pointer-events: auto;
}

.window.is-maximized {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.window.is-minimized {
  display: none;
}

.window-body {
  flex: 1;
  overflow: auto;
  padding: 12px;
  background: var(--window-bg);
  font-size: var(--font-size);
}

.resize-handle {
  position: absolute;
  z-index: 3;
}

.resize-handle[data-dir="n"],
.resize-handle[data-dir="s"] {
  height: 6px;
  left: 8px;
  right: 8px;
  cursor: ns-resize;
}

.resize-handle[data-dir="n"] {
  top: 0;
}

.resize-handle[data-dir="s"] {
  bottom: 0;
}

.resize-handle[data-dir="e"],
.resize-handle[data-dir="w"] {
  width: 6px;
  top: 8px;
  bottom: 8px;
  cursor: ew-resize;
}

.resize-handle[data-dir="e"] {
  right: 0;
}

.resize-handle[data-dir="w"] {
  left: 0;
}

.resize-handle[data-dir="ne"],
.resize-handle[data-dir="se"],
.resize-handle[data-dir="nw"],
.resize-handle[data-dir="sw"] {
  width: 12px;
  height: 12px;
}

.resize-handle[data-dir="ne"] {
  top: 0;
  right: 0;
  cursor: nesw-resize;
}

.resize-handle[data-dir="se"] {
  bottom: 0;
  right: 0;
  cursor: nwse-resize;
}

.resize-handle[data-dir="nw"] {
  top: 0;
  left: 0;
  cursor: nwse-resize;
}

.resize-handle[data-dir="sw"] {
  bottom: 0;
  left: 0;
  cursor: nesw-resize;
}

.window-placeholder {
  display: grid;
  place-items: center;
  gap: 10px;
  text-align: center;
  padding: 18px;
  color: inherit;
}

.window-placeholder img {
  width: 48px;
  height: 48px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.dialog-actions button,
.theme-option {
  min-height: var(--control-h);
  padding: 2px 14px;
  border: 1px solid var(--bevel-dark);
  background: linear-gradient(180deg, #fff, #e4e4da);
  border-radius: 2px;
  box-shadow: inset 1px 1px 0 var(--bevel-light);
  font-size: 12px;
}

/* 6. Propiedades de pantalla ----------------------------------------------- */
.display-properties {
  display: grid;
  gap: 10px;
}

.theme-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.theme-option[aria-pressed="true"] {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  font-weight: 700;
}

.hint {
  font-size: 11px;
  opacity: .8;
}

/* 7. Modo compacto (pantallas estrechas) ------------------------------------ */
@media (max-width: 640px) {
  html,
  body {
    overflow: hidden;
    max-width: 100vw;
  }

  .taskbar {
    display: none;
  }

  .desktop-icons {
    position: fixed;
    inset: auto 0 0 0;
    height: 64px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    width: auto;
    max-width: 100%;
    background: rgba(0, 0, 0, .45);
    z-index: 8600;
  }

  .icon {
    width: 50px;
    height: 56px;
    min-width: 44px;
    min-height: 44px;
    max-width: 100%;
  }

  .icon img {
    width: 24px;
    height: 24px;
  }

  .icon-label {
    font-size: 10px;
    max-width: 50px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .windows-layer {
    inset: 0 0 64px 0;
  }

  .window {
    position: fixed;
    inset: 0 0 64px 0;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .windows-layer .window .title-bar {
    height: 40px;
  }

  .windows-layer .window .title-bar-controls button {
    width: 34px;
    height: 30px;
  }

  .resize-handle {
    display: none;
  }

  .start-menu {
    left: 0;
    right: 0;
    bottom: 64px;
    width: auto;
    max-width: 100%;
    max-height: 72vh;
    border-radius: 0;
  }

  .legal {
    bottom: 68px;
    right: 8px;
  }
}

/* Ajustes de fidelidad y de etiquetas del escritorio */
.icon {
  width: 84px;
}

.icon-label {
  max-width: 80px;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.window .title-bar {
  cursor: move;
  user-select: none;
  touch-action: none;
}

.window .title-bar img {
  width: 16px;
  height: 16px;
}

/* ---- Barra de tareas Luna (medidas del original) ---- */
.taskbar {
  height: 30px;
  background: linear-gradient(180deg, #245edb 0%, #3f8cf3 4%, #245edb 9%, #1e50c9 88%, #1941a5 96%, #1941a5 100%);
  border-top: 1px solid #0b2f8a;
  box-shadow: inset 0 1px 0 #4a8bf0;
}

.start-button {
  height: 100%;
  gap: 6px;
  margin-right: 6px;
  padding: 0 24px 0 8px;
  border-radius: 0 9px 9px 0;
  background: linear-gradient(180deg, #59b83f 0%, #3f9b2f 46%, #2f7d1f 55%, #4ca832 100%);
  box-shadow: inset 0 1px 0 #8ed07a, inset 0 -2px 3px rgba(0, 0, 0, .25);
  font: italic 700 13px var(--font-ui);
  text-shadow: 1px 1px 1px rgba(0, 0, 0, .45);
}

.start-logo {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #bfe3ff, #2a7de1 55%, #0b3f8c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45);
}

.task-list {
  padding: 3px 4px;
  gap: 3px;
}

.task-button {
  height: 22px;
  padding: 0 8px;
  border: 1px solid #1b4fbf;
  border-radius: 3px;
  background: linear-gradient(180deg, #4f8ef0, #2f6ed6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(0, 0, 0, .2);
}

.task-button[aria-pressed="true"] {
  background: linear-gradient(180deg, #1b4fbf, #2f6ed6);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .45);
}

.tray {
  padding: 0 8px 0 6px;
  background: linear-gradient(180deg, #12a3f5 0%, #0f8ee9 8%, #0f8ee9 88%, #0b6fc0 100%);
  box-shadow: inset 1px 0 0 #1ba8ff, inset 0 1px 0 #6ec8ff;
}

.tray-btn {
  width: 18px;
}

.clock {
  font-size: 11px;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, .3);
}

.show-desktop {
  background: linear-gradient(180deg, #2b6fd6, #1941a5);
  border-left: 1px solid #0b2f8a;
}

.start-footer .credito {
  margin-left: 8px;
  font-size: 10px;
  opacity: .7;
}

.quick-launch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 4px;
  border-right: 1px solid rgba(0, 0, 0, .25);
  box-shadow: 1px 0 0 rgba(255, 255, 255, .18);
}

.ql-btn {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 2px;
}

.ql-btn:hover {
  background: rgba(255, 255, 255, .22);
}

.ql-btn img {
  width: 16px;
  height: 16px;
}

#ql-desktop {
  background:
    linear-gradient(135deg, transparent 45%, #fff 45%, #fff 55%, transparent 55%),
    linear-gradient(180deg, #6f9ff0, #2f6ed6);
  border: 1px solid #1b4fbf;
}

/* ---- Limpieza de la barra de tareas ---- */
.quick-launch {
  gap: 3px;
  padding: 0 6px 0 4px;
}

.quick-launch button {
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  border-radius: 2px;
}

.quick-launch button:focus-visible {
  outline: 1px dotted #fff;
  outline-offset: 1px;
}

.ql-btn {
  width: 20px;
  height: 20px;
}

.ql-btn img {
  width: 16px;
  height: 16px;
}

.ql-btn:hover {
  background: rgba(255, 255, 255, .25);
}

.tray {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 0 4px 0 2px;
}

.tray-arrow {
  min-width: 0;
  min-height: 0;
  width: 14px;
  height: 20px;
  padding: 0;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  box-shadow: none;
  color: #fff;
  font-size: 12px;
  line-height: 1;
}

.tray-btn {
  min-width: 0;
  min-height: 0;
  width: 18px;
  height: 20px;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}

.show-desktop {
  width: 8px;
}

.clock {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.05;
  padding: 0 2px 0 4px;
}

.clock-hora {
  font-size: 11px;
}

.clock-fecha {
  font-size: 9px;
  opacity: .9;
}

.tray-btn.is-muted {
  opacity: .45;
  filter: grayscale(1);
}

.tray-balloon {
  position: fixed;
  right: 8px;
  bottom: calc(var(--taskbar-h) + 6px);
  max-width: 220px;
  padding: 6px 8px;
  background: #ffffe1;
  border: 1px solid #000;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, .3);
  font-size: 11px;
  z-index: 6000;
}

/* ---- Menú de inicio: estructura XP ---- */
.start-header {
  min-height: 56px;
  padding: 0 10px;
  background: linear-gradient(180deg, #1c6ad6 0%, #3e8ff0 45%, #1d5fc4 100%);
  border-bottom: 2px solid #ff9a00;
}

.start-header .avatar {
  width: 34px;
  height: 34px;
}

.start-header .user-name,
.start-header span {
  font-size: 14px;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, .45);
}

.start-item img {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.start-item {
  gap: 7px;
  padding: 4px 6px;
  min-height: 30px;
}

.start-col.primary {
  border-right: 1px solid #d5d2c8;
  box-shadow: 1px 0 0 #fff;
}

.all-programs {
  position: relative;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid #cfccc2;
  box-shadow: 0 -1px 0 #fff;
  font-weight: 700;
}

.all-arrow {
  width: 0;
  height: 0;
  margin-left: auto;
  border-left: 6px solid #2f8f2f;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.start-footer {
  justify-content: flex-end;
  gap: 4px;
  padding: 4px 8px;
}

.start-action {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(0, 0, 0, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}

.start-legal {
  display: block;
  padding: 2px 8px 5px;
  font-size: 9px;
  line-height: 1.3;
  color: var(--taskbar-text);
  background: var(--taskbar-bg);
  opacity: .8;
}

.start-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-name {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0,0,0,.45);
}

.start-footer {
  justify-content: flex-end;
}

/* ---- Correcciones de la barra y del menú ---- */
.show-desktop {
  width: 8px;
  flex: 0 0 8px;
}

.start-menu {
  bottom: 30px;
  width: 400px;
}

.start-header {
  min-height: 64px;
}

.start-header .avatar {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
}

.start-columns {
  padding: 8px 6px;
}

.start-item {
  min-height: 34px;
  padding: 6px 8px;
  margin-bottom: 1px;
}

.start-item img {
  width: 24px;
  height: 24px;
}

.start-footer {
  min-height: 34px;
  padding: 6px 10px;
}

.start-legal {
  padding: 4px 10px 6px;
}

#show-desktop { min-width: 0; width: 8px; flex: 0 0 8px; padding: 0; border: 0; border-left: 1px solid #0b2f8a; border-radius: 0; box-shadow: none; background: linear-gradient(90deg, rgba(255,255,255,.18), rgba(0,0,0,.10)); }

/* ---- Pulido del menú de inicio ---- */
.start-col.secondary {
  background: #d3e5fa;
}

.start-sep {
  margin: 4px 2px 4px;
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, .14);
  box-shadow: 0 1px 0 #fff;
}

.start-action img {
  width: 24px;
  height: 24px;
}

.start-item:hover,
.start-item:focus-visible {
  background: #2f71cd;
  color: #fff;
  outline: none;
}

.start-item:hover span,
.start-item:focus-visible span {
  color: #fff;
}

/* ---- Pantalla de arranque ---- */
.arranque {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.arranque-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.arranque-logo {
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.arranque-sub {
  font-size: 14px;
  color: #c9c9c9;
}

.arranque-pista {
  width: 220px;
  height: 16px;
  padding: 2px;
  box-sizing: border-box;
  background: #3a3a3a;
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #111, inset -1px -1px 0 #555;
}

.arranque-barra {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #2f71cd, #5b9bff);
  transition: width 1.6s linear;
}

@media (prefers-reduced-motion: reduce) {
  .arranque {
    transition: none;
  }

  .arranque-barra {
    transition: none;
  }
}

/* ---- Cromo XP de ventanas (overrides sobre xp.css) ---- */
.window .title-bar {
  height: 30px;
  padding: 3px 5px;
  align-items: center;
  font-family: var(--font-ui);
}

.window .title-bar-controls button {
  width: 21px;
  height: 21px;
  min-width: 0;
  min-height: 0;
}

.window .title-bar-text {
  font-family: "TahomaLocal", Tahoma, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-shadow: none;
}

.window .window-body {
  font-size: 11px;
  line-height: 1.35;
}

.window-body input,
.window-body select,
.window-body textarea,
.window-body button:not(.bm-cell):not(.bm-face):not(.producto) {
  font-family: "TahomaLocal", Tahoma, sans-serif;
  font-size: 11px;
}

.window-body button:not(.bm-cell):not(.bm-face):not(.producto) {
  border: 1px solid #003c74;
  border-radius: 3px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f3ee 45%, #ecebe5 86%, #d8d0c4 100%);
  box-shadow: inset -1px -1px 0 #b9b4a8;
  padding: 3px 12px;
  color: #000;
}

.window-body button:not(.bm-cell):not(.bm-face):not(.producto):hover:not(:disabled) {
  border-color: #2f71cd;
}

.window-body button:not(.bm-cell):not(.bm-face):not(.producto):active:not(:disabled) {
  background: linear-gradient(180deg, #d8d0c4, #ecebe5);
  box-shadow: inset 1px 1px 0 #b9b4a8;
}

.window-body button:not(.bm-cell):not(.bm-face):not(.producto):focus-visible {
  outline: 1px dotted #003c74;
  outline-offset: -4px;
}

.window-body button:not(.bm-cell):not(.bm-face):not(.producto):disabled {
  color: #8d8d8d;
}

@media (min-width: 641px) {
  .window {
    border-radius: 8px 8px 0 0;
    background: #ece9d8;
    filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, .35));
  }

  .window .title-bar {
    height: 30px;
    padding: 3px 5px;
    display: flex;
    align-items: center;
    gap: 4px;
    border-radius: 6px 6px 0 0;
    position: relative;
    overflow: hidden;
  }

  .window .title-bar::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 45%;
    background: linear-gradient(rgba(255, 255, 255, .45), rgba(255, 255, 255, 0));
    pointer-events: none;
  }

  .window .title-bar-text {
    text-align: left;
    margin-right: auto;
    padding-left: 2px;
    z-index: 1;
    font-family: "TahomaLocal", Tahoma, sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, .35);
  }

  .window .title-bar-controls {
    margin-left: auto;
    z-index: 1;
  }

  .window .title-bar-controls button {
    width: 21px;
    height: 21px;
    min-width: 21px;
    min-height: 21px;
  }

  .window:not(.is-active) .title-bar { filter: saturate(.55) brightness(1.12); }
  .window:not(.is-active) .title-bar-text { color: #eaf0fb; text-shadow: none; }

  .window-body input, .window-body select, .window-body textarea { font-family: "TahomaLocal", Tahoma, sans-serif; font-size: 11px; }
  .window-body input[type="text"], .window-body input[type="email"], .window-body input[type="number"] { border: 1px solid #7f9db9; background: #fff; padding: 2px 3px; box-shadow: none; }

  .window .window-body {
    background: #ece9d8;
  }
}

/* ---- Submenú «Todos los programas» ---- */
.start-menu.submenu-abierto {
  overflow: visible;
}

.start-submenu {
  position: absolute;
  left: 100%;
  bottom: 0;
  width: 240px;
  max-height: 60vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #919b9c;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, .35);
  padding: 2px;
  z-index: 50;
}

.start-submenu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 4px 6px;
  border: 0;
  background: none;
  box-shadow: none;
  text-align: left;
  font-size: 12px;
}

.start-submenu-item img {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.start-submenu-item:hover,
.start-submenu-item:focus-visible {
  background: #316ac5;
  color: #fff;
}

@media (max-width: 640px) {
  .start-submenu {
    position: static;
    left: auto;
    width: 100%;
    max-height: 40vh;
  }
}
