/* css/windows.css
   Tema de ventanas — versión libre del estilo Windows XP "Luna".
   Cubre el marco de WinBox (.winbox / .wb-*), el shell genérico con barra
   lateral (.app-shell), el explorador de los stubs (.explorer-*), el correo
   y las barras de scroll globales. */

/* ═══════════════════════════════════════════════════════════════
   WinBox — marco de ventana estilo Windows XP "Luna"
   La barra de título es azul uniforme (se ignora app.color); la
   identidad de cada app queda en su icono.
═══════════════════════════════════════════════════════════════ */

.winbox {
  border: 3px solid #1a54c0 !important;
  border-top: 0 !important;
  border-radius: 8px 8px 4px 4px !important;
  background: #ece9d8 !important;
  font-family: Tahoma, "Segoe UI", Verdana, Arial, sans-serif !important;
  box-shadow:
    0 0 0 1px #0c3a8f,
    0 16px 34px -8px rgba(0, 0, 25, .48),
    0 6px 14px -6px rgba(0, 0, 25, .40) !important;
}
.winbox.max { border-radius: 0 !important; }

/* ── Barra de título ── */
.winbox .wb-header {
  height: 27px !important;
  border-radius: 5px 5px 0 0 !important;
  padding: 0 3px 0 6px !important;
  background:
    linear-gradient(180deg,
      rgba(255,255,255,.38) 0%,
      rgba(255,255,255,.12) 6%,
      rgba(255,255,255,0)   13%,
      rgba(0,0,0,.05)       48%,
      rgba(0,0,0,.12)       84%,
      rgba(255,255,255,.16) 91%,
      rgba(255,255,255,.03) 97%,
      rgba(0,0,0,.24)       100%),
    linear-gradient(180deg, #2e78e6 0%, #1c5ccd 52%, #1854c2 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5) !important;
}
.winbox.max .wb-header { border-radius: 0 !important; }

.winbox .wb-icon {
  width: 16px !important;
  height: 16px !important;
  margin-right: 5px !important;
  align-self: center !important;
  filter: drop-shadow(0 1px 1px rgba(0,0,20,.4)) !important;
}

.winbox .wb-title {
  font-family: Tahoma, "Segoe UI", Verdana, Arial, sans-serif !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .2px !important;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 30, .6), 0 0 1px rgba(0, 0, 30, .5) !important;
  line-height: 27px !important;
}

/* ── Botones de control ── */
.winbox .wb-control {
  display: flex !important;
  align-items: center !important;
  gap: 2px !important;
  padding-right: 2px !important;
}

.winbox .wb-full { display: none !important; }   /* XP no tiene "pantalla completa" */

.winbox .wb-min,
.winbox .wb-max,
.winbox .wb-close {
  width: 22px !important;
  height: 21px !important;
  border-radius: 3px !important;
  border: 1px solid #12429c !important;
  position: relative !important;
  opacity: 1 !important;
  filter: none !important;
  transition: filter .08s, box-shadow .08s !important;
  cursor: pointer !important;
  background: linear-gradient(180deg, #63a0f0 0%, #2f74dd 47%, #2568d2 53%, #4e8ce8 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .55),
    inset 0 0 0 1px rgba(255, 255, 255, .16) !important;
}

/* Minimizar: guion abajo */
.winbox .wb-min::after {
  content: "" !important;
  position: absolute !important;
  left: 5px !important; right: 5px !important; bottom: 4px !important;
  height: 3px !important;
  background: #fff !important;
  box-shadow: 0 1px 1px rgba(0, 0, 30, .35) !important;
}

/* Maximizar: recuadro con cabecera gruesa */
.winbox .wb-max::after {
  content: "" !important;
  position: absolute !important;
  inset: 4px 5px !important;
  border: 1.5px solid #fff !important;
  border-top-width: 3px !important;
  box-shadow: 0 1px 1px rgba(0, 0, 30, .3) !important;
}

/* Cerrar: rojo XP con aspa */
.winbox .wb-close {
  width: 24px !important;
  border-color: #8f2a19 !important;
  background: linear-gradient(180deg, #f2a892 0%, #e06b4d 47%, #cf4026 53%, #e58063 100%) !important;
}
.winbox .wb-close::before,
.winbox .wb-close::after {
  content: "" !important;
  position: absolute !important;
  top: 50% !important; left: 50% !important;
  width: 11px !important; height: 2.5px !important;
  background: #fff !important;
  box-shadow: 0 1px 1px rgba(60, 0, 0, .4) !important;
}
.winbox .wb-close::before { transform: translate(-50%, -50%) rotate(45deg) !important; }
.winbox .wb-close::after  { transform: translate(-50%, -50%) rotate(-45deg) !important; }

.winbox .wb-min:hover,
.winbox .wb-max:hover  { background: linear-gradient(180deg, #7fb2f5 0%, #3f83e8 47%, #3574dc 53%, #62a0f2 100%) !important; }
.winbox .wb-close:hover { background: linear-gradient(180deg, #f7bda9 0%, #e87a5b 47%, #db4c30 53%, #ef8e70 100%) !important; }
.winbox .wb-min:active,
.winbox .wb-max:active,
.winbox .wb-close:active {
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 30, .5),
    inset 0 0 0 1px rgba(0, 0, 30, .2) !important;
  filter: brightness(.94) !important;
}

/* ── Cuerpo de la ventana ── */
.winbox .wb-body {
  background: #ece9d8 !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35) !important;
  overflow: hidden !important;
}

/* ── Ventana inactiva: mismo azul, solo baja un poco la sombra ── */
.winbox:not(.focus) {
  box-shadow:
    0 0 0 1px #0c3a8f,
    0 12px 24px -10px rgba(0, 0, 25, .38) !important;
}

/* ═══════════════════════════════════════════════════════════════
   Shell genérico con barra lateral (bank, inventario, correo…)
═══════════════════════════════════════════════════════════════ */

.app-shell {
  display: grid;
  grid-template-columns: 168px 1fr;
  height: 100%;
  font-family: Tahoma, "Segoe UI", Verdana, Arial, sans-serif;
  font-size: 12px;
  color: #111;
}

.app-sidebar {
  background: linear-gradient(180deg, #f6f5ee 0%, #e6e3d3 100%);
  border-right: 1px solid #b3ae9e;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow-y: auto;
}

.nav-section {
  font-size: 10px;
  font-weight: bold;
  color: #6a6553;
  padding: 10px 12px 3px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  cursor: pointer;
  color: #1a1a1a;
  border-left: 3px solid transparent;
}
.nav-item:hover  { background: #eaf1ff; }
.nav-item.active {
  background: #316ac5;
  color: #fff;
  border-left-color: #1c3f7a;
}
.nav-item img { width: 16px; height: 16px; object-fit: contain; }

.app-main {
  background: #fff;
  padding: 16px 18px;
  overflow-y: auto;
}
.app-main h1 {
  font-size: 15px;
  font-weight: bold;
  color: #14337a;
  border-bottom: 1px solid #d4d0c8;
  padding-bottom: 6px;
  margin-bottom: 12px;
}
.app-main h2 {
  font-size: 13px;
  font-weight: bold;
  color: #222;
  margin-bottom: 8px;
}
.content-subtitle {
  color: #5a5a4a;
  font-size: 11px;
  margin-bottom: 10px;
}

/* ═══════════════════════════════════════════════════════════════
   Explorador de los stubs (tpl-mypc / tpl-documents)
═══════════════════════════════════════════════════════════════ */

.explorer-body {
  display: grid;
  grid-template-columns: 168px 1fr;
  height: 100%;
  font-family: Tahoma, "Segoe UI", Verdana, Arial, sans-serif;
  font-size: 11px;
}
.explorer-nav {
  background: linear-gradient(180deg, #7ba2e0 0%, #6a8fd6 8%, #a7c0ec 60%, #cfe0f6 100%);
  border-right: 1px solid #4a70b0;
  padding: 8px;
  color: #12305e;
}
.explorer-nav p {
  padding: 5px 8px;
  cursor: pointer;
  margin-bottom: 2px;
  border: 1px solid transparent;
  border-radius: 2px;
}
.explorer-nav p:hover { background: rgba(255, 255, 255, .55); border-color: #b7ccec; }

.explorer-content {
  background: #fff;
  padding: 14px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  overflow-y: auto;
}
.file-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 88px;
  cursor: pointer;
  padding: 6px 4px;
  border: 1px solid transparent;
  border-radius: 2px;
  text-align: center;
}
.file-icon:hover { background: #eaf1ff; border-color: #98b6e6; }
.file-icon img   { width: 32px; height: 32px; object-fit: contain; }
.file-icon span  { font-size: 11px; line-height: 1.3; color: #111; word-break: break-word; }

/* ═══════════════════════════════════════════════════════════════
   Correo (tpl-correo)
═══════════════════════════════════════════════════════════════ */

.mail-item {
  border: 1px solid #c3b9a1;
  border-left: 3px solid #316ac5;
  padding: 10px 12px;
  background: #fbfaf5;
  line-height: 1.7;
  margin-top: 10px;
  font-size: 12px;
  cursor: pointer;
}
.mail-item:hover { background: #eef4ff; }

/* ═══════════════════════════════════════════════════════════════
   Barras de scroll globales (versión suave, no pixel-art)
═══════════════════════════════════════════════════════════════ */

::-webkit-scrollbar        { width: 15px; height: 15px; }
::-webkit-scrollbar-track  { background: #f1f0e9; border-left: 1px solid #d4d0c8; }
::-webkit-scrollbar-thumb  {
  background: linear-gradient(90deg, #e4e2d6, #c9c5b4);
  border: 1px solid #a9a48f;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(90deg, #dfeaff, #b7cdf2); border-color: #7f9db9; }
::-webkit-scrollbar-corner { background: #f1f0e9; }
