/* public/assets/windows.css — I7-C-ordinador (brief §12.5, §12.6). Estils de la targeta de
 * missions a «Avui», del simulador de Windows (escriptori, finestres, barra de tasques,
 * menú d'Inici, Explorador, Bloc de notes, Paint, Edge i paperera) i de la targeta del
 * semàfor «Informàtica — mans i teclat» al panell dels pares. Autocontingut: no depèn de
 * cap variable d'altres carrils. El semàfor NOMÉS té verd, groc i gris: mai vermell. */

/* ---------- targeta de missions a «Avui» ---------- */
.aw-card { margin-top: 12px; }
.aw-card .aw-text { margin: 6px 0 10px; color: #555; }
.aw-missio-actual {
  margin: 8px 0 12px; padding: 10px 12px;
  background: #f3f7ff; border: 1px solid #d7e3ff; border-radius: 10px;
}
.aw-missio-actual .aw-subtitol { margin: 0 0 6px; font-size: 1.02rem; color: #1a3a6b; }
.aw-missio-cos { margin: 0 0 8px; color: #444; line-height: 1.5; }
.aw-llista { list-style: none; margin: 0 0 8px; padding: 0; }
.aw-llista-fila {
  display: flex; align-items: center; gap: 8px; padding: 5px 6px;
  border-bottom: 1px solid #eef1f6; font-size: .95rem;
}
.aw-llista-fila:last-child { border-bottom: none; }
.aw-estat { font-size: .78rem; border-radius: 10px; padding: 2px 9px; white-space: nowrap; }
.aw-estat-feta { background: #e8f5e9; color: #2e7d32; }
.aw-estat-en-curs { background: #fff3e0; color: #e65100; }
.aw-estat-pendent { background: #e3f2fd; color: #1565c0; }
.aw-estat-blocada { background: #f1f3f6; color: #8a93a3; }
.aw-nota { color: #8a93a3; font-size: .85rem; margin: 0 0 8px; }
.aw-missatge { margin-top: 10px; padding: 8px 10px; background: #f3f7ff; border-radius: 8px; color: #333; }

/* ---------- overlay del simulador ---------- */
.aw-overlay {
  position: fixed; inset: 0; z-index: 3200; background: #0e4d92;
  display: flex; flex-direction: column; overflow: hidden;
}
.aw-desktop {
  position: relative; flex: 1; padding: 14px; overflow: hidden;
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 12px;
  background: radial-gradient(circle at 20% 12%, #3f7fd0, #0e4d92 72%);
}
.aw-icona {
  width: 84px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 2px; border-radius: 8px; cursor: pointer; user-select: none; color: #fff;
}
.aw-icona .aw-icona-glif { font-size: 2.1rem; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.aw-icona .aw-icona-nom { font-size: .8rem; text-align: center; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.aw-icona:focus-visible { outline: 3px solid #ffd54f; outline-offset: 1px; }

/* ---------- barra de tasques ---------- */
.aw-taskbar {
  display: flex; align-items: center; gap: 6px; padding: 6px 10px;
  background: #1b2a44; color: #fff; box-shadow: 0 -2px 8px rgba(0,0,0,.25);
}
.aw-inici {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
  background: #2c66b2; border: none; border-radius: 6px; color: #fff; cursor: pointer;
  font-size: .95rem;
}
.aw-inici:hover { background: #3574c6; }
.aw-boto-finestra {
  padding: 5px 12px; background: transparent; border: 1px solid transparent;
  border-radius: 6px; color: #e6edf5; cursor: pointer; font-size: .9rem; max-width: 180px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.aw-boto-finestra.aw-finestra-activa { background: #2c66b2; border-color: #4c86cf; }
.aw-rellotge {
  margin-left: auto; padding: 4px 10px; text-align: right; cursor: pointer;
  font-variant-numeric: tabular-nums; color: #fff; border-radius: 6px; line-height: 1.15;
}
.aw-rellotge:hover { background: rgba(255,255,255,.1); }
.aw-rellotge .aw-hora { font-size: 1rem; }
.aw-rellotge .aw-data { font-size: .72rem; color: #cfe0f5; }

/* ---------- menú d'Inici ---------- */
.aw-menu-inici {
  position: absolute; left: 10px; bottom: 52px; z-index: 3300; min-width: 220px;
  background: #fff; color: #222; border-radius: 10px; box-shadow: 0 10px 34px rgba(0,0,0,.35);
  padding: 8px 6px; display: flex; flex-direction: column; gap: 2px;
}
.aw-menu-entrada {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  background: none; border: none; border-radius: 7px; text-align: left; cursor: pointer;
  font-size: .95rem; color: #222;
}
.aw-menu-entrada:hover { background: #eef4ff; }
.aw-menu-entrada .aw-entrada-glif { font-size: 1.15rem; }
.aw-menu-separador { height: 1px; background: #e6eaf0; margin: 4px 2px; }

/* ---------- finestres ---------- */
.aw-finestra {
  position: absolute; min-width: 260px; min-height: 140px;
  background: #fff; color: #222; border-radius: 9px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.35); display: flex; flex-direction: column;
  z-index: 20;
}
.aw-finestra.aw-finestra-max { inset: 60px 10px 58px 10px; width: auto !important; height: auto !important; }
.aw-finestra.aw-finestra-min { display: none; }
.aw-finestra-cap {
  display: flex; align-items: center; gap: 6px; padding: 6px 8px;
  background: #dfe8f5; border-bottom: 1px solid #c7d4e8; cursor: grab;
  user-select: none; touch-action: none;
}
.aw-finestra-cap.aw-arrossegant { cursor: grabbing; }
.aw-finestra-titol { flex: 1; font-size: .95rem; color: #1b2a44; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aw-finestra-botons { display: flex; gap: 4px; }
.aw-b {
  width: 26px; height: 24px; border: 1px solid #b7c5d8; border-radius: 5px;
  background: #fff; color: #334; cursor: pointer; font-size: .8rem; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.aw-b:hover { background: #eef4ff; }
.aw-b-tanca:hover { background: #f6c4c4; }
.aw-finestra-cos { flex: 1; overflow: auto; padding: 10px; font-size: .9rem; }

/* ---------- Explorador i sistema de fitxers ---------- */
.aw-explorador-cos { padding: 8px 10px; }
.aw-barra-eines { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.aw-boto-eina {
  padding: 4px 9px; border: 1px solid #c7d4e8; border-radius: 6px;
  background: #f4f7fb; cursor: pointer; font-size: .82rem;
}
.aw-boto-eina:hover { background: #e6eef9; }
.aw-fs-lista { list-style: none; margin: 0; padding: 0; }
.aw-fs-fila {
  display: flex; align-items: center; gap: 7px; padding: 4px 6px; border-radius: 6px; cursor: pointer;
}
.aw-fs-fila.aw-fs-seleccionat { background: #d9e8ff; }
.aw-fs-fila .aw-fs-glif { font-size: 1.05rem; }
.aw-fs-fila .aw-fs-nom { flex: 1; }
.aw-fs-buit { color: #8a93a3; font-style: italic; padding: 4px 6px; }

/* ---------- Bloc de notes ---------- */
.aw-bloc-cos { padding: 0; display: flex; flex-direction: column; }
.aw-bloc-textarea {
  flex: 1; resize: none; border: none; outline: none; padding: 10px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 1rem; line-height: 1.5;
  min-height: 120px; background: #fffdf5;
}
.aw-bloc-barra { display: flex; gap: 6px; padding: 6px 8px; background: #f4f7fb; border-top: 1px solid #e2e8f2; }

/* ---------- Paint ---------- */
.aw-paint-cos { padding: 0; }
.aw-paint-lona { display: block; width: 100%; height: 220px; background: #fff; cursor: crosshair; touch-action: none; }
.aw-paint-barra { display: flex; gap: 6px; align-items: center; padding: 6px 8px; background: #f4f7fb; border-top: 1px solid #e2e8f2; }
.aw-paint-color { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #c7d4e8; cursor: pointer; }

/* ---------- Edge (de mentida, pàgines locals) ---------- */
.aw-edge-cos { padding: 8px 10px; }
.aw-edge-barra { display: flex; gap: 6px; margin-bottom: 8px; }
.aw-edge-pagina { padding: 12px; background: #f6f9ff; border: 1px solid #dbe6f5; border-radius: 8px; min-height: 120px; }
.aw-edge-pagina h4 { margin: 0 0 6px; color: #1a3a6b; }
.aw-edge-pagina p { margin: 0; color: #444; line-height: 1.5; }

/* ---------- paperera ---------- */
.aw-paperera-cos { padding: 8px 10px; }
.aw-paperera-buit { color: #8a93a3; font-style: italic; }

/* ---------- W7: finestra estranya (trampa) ---------- */
.aw-popup {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 3400;
  width: 300px; background: #fff; border-radius: 10px; box-shadow: 0 14px 44px rgba(0,0,0,.45);
  padding: 14px 16px;
}
.aw-popup h4 { margin: 0 0 8px; color: #b71c1c; }
.aw-popup p { margin: 0 0 12px; color: #444; line-height: 1.45; }
.aw-popup-barra { display: flex; gap: 8px; flex-wrap: wrap; }
.aw-popup-barra .aw-boto-eina { font-size: .9rem; }

/* ---------- llista de passos i botó d'acabar ---------- */
.aw-checklist { list-style: none; margin: 0 0 10px; padding: 0; }
.aw-checklist-fila { display: flex; align-items: center; gap: 7px; padding: 3px 0; color: #667; font-size: .85rem; }
.aw-checklist-fila .aw-check {
  width: 16px; height: 16px; border: 2px solid #b7c5d8; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  font-size: .7rem; color: transparent;
}
.aw-checklist-fila.aw-fet { color: #2e7d32; }
.aw-checklist-fila.aw-fet .aw-check { background: #2e7d32; border-color: #2e7d32; color: #fff; }
.aw-boto-acaba {
  padding: 7px 16px; background: #2c66b2; border: none; border-radius: 8px;
  color: #fff; font-size: .95rem; cursor: pointer;
}
.aw-boto-acaba:hover { background: #3574c6; }
.aw-boto-acaba:disabled { background: #b7c5d8; cursor: not-allowed; }

/* ---------- targeta del semàfor «Informàtica — mans i teclat» (panell pares) ---------- */
.awp-semafor { margin: 4px 0 12px; }
.awp-linia {
  display: flex; align-items: center; gap: 9px; padding: 5px 6px;
  border-bottom: 1px solid #eef1f6; font-size: .92rem;
}
.awp-linia:last-child { border-bottom: none; }
.awp-punt { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.awp-punt-verd { background: #2e7d32; }
.awp-punt-groc { background: #f9a825; }
.awp-punt-gris { background: #b0b6c0; }
.awp-zona { font-weight: 600; color: #1b2a44; min-width: 118px; }
.awp-text { color: #555; }
.awp-frase-fixa { margin: 10px 0; padding: 8px 10px; background: #f3f7ff; border-radius: 8px; color: #333; font-size: .9rem; }

.awp-bloc { margin: 12px 0; }
.awp-titol { font-size: .95rem; color: #1a3a6b; margin: 0 0 6px; }
.awp-tecles { list-style: none; margin: 0; padding: 0; }
.awp-tecla {
  display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: .88rem;
  border-bottom: 1px solid #f0f2f6;
}
.awp-tecla:last-child { border-bottom: none; }
.awp-tecla-nom { font-weight: 600; color: #1b2a44; min-width: 64px; }
.awp-tecla-xifra { color: #555; }
.awp-missio-pendent {
  display: flex; align-items: center; gap: 8px; padding: 6px 0;
  border-bottom: 1px solid #eef1f6; font-size: .92rem;
}
.awp-missio-pendent .awp-missio-codi { font-weight: 600; color: #1b2a44; }
.awp-missio-pendent .awp-missio-titol { color: #555; flex: 1; }
.awp-boto-valida {
  padding: 4px 12px; background: #2c66b2; border: none; border-radius: 7px;
  color: #fff; cursor: pointer; font-size: .86rem;
}
.awp-boto-valida:hover { background: #3574c6; }
.awp-camp { margin: 8px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.awp-camp input[type="number"] {
  width: 64px; padding: 5px 7px; border: 1px solid #c7d4e8; border-radius: 6px; font-size: .9rem;
}
.awp-camp label { font-size: .9rem; color: #444; }
.awp-nota { color: #8a93a3; font-size: .8rem; margin: 4px 0 0; }
.awp-missatge { margin: 8px 0 0; padding: 6px 9px; background: #e8f5e9; border-radius: 7px; color: #2e7d32; font-size: .86rem; }
.awp-error { background: #fff3e0; color: #e65100; }

/* ---------- barra de missió (a dalt de tot del simulador) ---------- */
.aw-missio-barra {
  display: flex; align-items: center; gap: 10px; padding: 7px 12px;
  background: #12315f; color: #fff; flex-wrap: wrap;
}
.aw-missio-barra strong { font-size: .98rem; }
.aw-missio-barra-cos { flex: 1; font-size: .85rem; color: #cfe0f5; min-width: 180px; }
.aw-boto-tanca {
  padding: 4px 12px; background: #c62828; border: none; border-radius: 6px;
  color: #fff; cursor: pointer; font-size: .86rem;
}
.aw-boto-tanca:hover { background: #b71c1c; }

/* ---------- panell flotant de la llista de passos ---------- */
.aw-panel {
  position: absolute; top: 10px; right: 10px; z-index: 3000;
  width: 230px; max-height: calc(100% - 20px); overflow: auto;
  background: #fff; color: #222; border-radius: 10px; padding: 10px 12px;
  box-shadow: 0 8px 26px rgba(0,0,0,.3);
}
.aw-panel-titol { margin: 0 0 8px; font-size: .8rem; color: #555; line-height: 1.35; }

/* ---------- avís transitori i panell de dreceres ---------- */
.aw-avis {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 3100;
  max-width: 80%; padding: 8px 14px; background: #1b2a44; color: #fff;
  border-radius: 8px; font-size: .88rem; box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.aw-dreceres {
  position: absolute; top: 10px; left: 10px; z-index: 3000;
  display: flex; flex-wrap: wrap; gap: 6px; width: 230px;
  background: #fff; border-radius: 10px; padding: 10px 12px; box-shadow: 0 8px 26px rgba(0,0,0,.3);
}
.aw-dreceres .aw-boto-eina { font-size: .9rem; }

/* ---------- contenidor dels botons de finestra a la barra de tasques ---------- */
.aw-tasca-botons { display: flex; gap: 4px; overflow-x: auto; max-width: 55%; }

/* ---------- botó d'obrir la missió a la targeta ---------- */
.aw-boto-obre { margin-bottom: 4px; }

/* ---------- entrega (W8-W15) ---------- */
.aw-entrega {
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(8, 34, 70, .92);
}
.aw-entrega-caixa {
  width: min(460px, 100%); background: #fff; color: #222; border-radius: 12px;
  padding: 18px 20px; box-shadow: 0 12px 40px rgba(0,0,0,.4);
}
.aw-entrega-caixa h3 { margin: 0 0 8px; color: #1a3a6b; }
.aw-entrega-cos { margin: 0 0 12px; color: #444; line-height: 1.5; }
.aw-entrega-msg { margin: 10px 0 0; padding: 8px 10px; background: #e8f5e9; border-radius: 7px; color: #2e7d32; }
.aw-entrega-barra { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.aw-entrega-input { display: none; }
