/* ============================================================
   xp.css — Windows XP "Luna" stylesheet
   Sections:
     1. Base / screen / desktop / wallpaper / desktop icons
     2. Taskbar / start button / quicklaunch / tray / balloons
     3. Start menu / context menus
     4. Window chrome / dialogs / controls
     5. Boot / welcome / sysmsg / standby / turn-off
     6. App interiors (Notepad, Paint, Minesweeper, Explorer,
        Control Panel, Display Props, CMD, Hang, Task Manager)
     7. Internet Explorer pages / Windows Media Player / schemes
   ============================================================ */

/* ---------- 1. BASE ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: Tahoma, "Segoe UI", "MS Sans Serif", Geneva, Verdana, sans-serif;
  font-size: 11px;
  color: #000;
  background: #000;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  cursor: default;
}

button {
  font-family: inherit;
  font-size: inherit;
  background: none;
  border: none;
  cursor: default;
}

input, textarea, select { font-family: inherit; font-size: inherit; }

.hidden { display: none !important; }

#screen {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #000;
}

/* ---------- DESKTOP ---------- */
#desktop {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

#wallpaper {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

#wallpaper canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#wp-clouds { pointer-events: none; }

#desktop-icons {
  position: absolute;
  inset: 0 0 30px 0;
  overflow: hidden;
}

/* marquee selection rectangle */
#marquee {
  position: absolute;
  display: none;
  border: 1px solid #316ac5;
  background: rgba(49, 106, 197, 0.28);
  z-index: 60;
  pointer-events: none;
}

#windows-layer {
  position: absolute;
  inset: 0 0 30px 0;
  pointer-events: none;
}
#windows-layer > * { pointer-events: auto; }

#tray-balloons {
  position: absolute;
  right: 4px;
  bottom: 36px;
  z-index: 11000;
}

/* ---------- DESKTOP ICONS ---------- */
.dicon {
  position: absolute;
  width: 76px;
  padding: 3px 2px 2px;
  text-align: center;
  cursor: default;
  z-index: 1;
}

.dicon-img {
  width: 32px;
  height: 32px;
  margin: 0 auto 2px;
}
.dicon-img svg { display: block; }

.dicon-label {
  display: inline;
  color: #fff;
  font-size: 11px;
  line-height: 1.25;
  padding: 1px 3px;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.9);
  word-wrap: break-word;
}

.dicon.selected .dicon-img {
  filter: drop-shadow(0 0 2px rgba(49, 106, 197, 0.9));
  opacity: 0.85;
}
.dicon.selected .dicon-label {
  background: rgba(49, 106, 197, 0.75);
  outline: 1px dotted #e8e4d8;
  text-shadow: none;
}

.dicon-rename {
  width: 76px;
  min-height: 28px;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  text-align: center;
  border: 1px solid #316ac5;
  background: #fff;
  color: #000;
  resize: none;
  outline: none;
  overflow: hidden;
}

/* ---------- 2. TASKBAR ---------- */
#taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30px;
  display: flex;
  align-items: stretch;
  background: linear-gradient(to bottom,
    #3f8cf3 0%, #2c6fe0 6%, #245edc 24%,
    #245edc 60%, #1e4fc0 90%, #1b45a4 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  z-index: 9000;
}

/* Start button */
#start-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 22px 0 10px;
  margin-right: 10px;
  border-radius: 0 13px 13px 0;
  background: radial-gradient(ellipse at 30% 0%,
    #7ccf7c 0%, #54b254 24%, #3c9c3c 55%, #2c7d2c 85%, #266e26 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.55),
    inset 0 -2px 3px rgba(0, 60, 0, 0.55),
    1px 0 2px rgba(0, 0, 0, 0.45);
  color: #fff;
}
#start-button:hover {
  filter: brightness(1.12);
}
#start-button.pressed, #start-button:active {
  background: radial-gradient(ellipse at 30% 100%,
    #6cbf6c 0%, #46a246 30%, #2f8a2f 60%, #236423 100%);
  box-shadow:
    inset 0 2px 4px rgba(0, 40, 0, 0.6),
    1px 0 2px rgba(0, 0, 0, 0.45);
}

#start-logo {
  width: 20px;
  height: 15px;
  transform: skewY(-4deg);
  background-image:
    linear-gradient(#f65314, #f65314),
    linear-gradient(#7cbb00, #7cbb00),
    linear-gradient(#00a1f1, #00a1f1),
    linear-gradient(#ffbb00, #ffbb00);
  background-size: 9px 7px;
  background-position: 0 0, 11px 0, 0 8px, 11px 8px;
  background-repeat: no-repeat;
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.5));
}

#start-text {
  font-size: 15px;
  font-weight: bold;
  font-style: italic;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 2px rgba(0, 45, 0, 0.75);
  padding-bottom: 1px;
}

/* Quick launch */
#quicklaunch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 8px 0 2px;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 1px 0 0 rgba(0, 0, 40, 0.35);
  margin-right: 6px;
}
.ql-btn {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
}
.ql-btn svg { width: 16px; height: 16px; display: block; }
.ql-btn:hover { background: rgba(255, 255, 255, 0.22); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.ql-btn:active { background: rgba(0, 20, 90, 0.4); }

/* Task buttons */
#task-buttons {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  overflow: hidden;
}
.task-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 160px;
  min-width: 60px;
  max-width: 180px;
  height: 23px;
  padding: 0 8px;
  border-radius: 3px;
  color: #fff;
  font-size: 11px;
  text-align: left;
  background: linear-gradient(to bottom,
    #3d7ce8 0%, #2c5fd0 8%, #2a5ccc 50%, #2455bd 92%, #3a76df 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 1px 0 0 rgba(255, 255, 255, 0.12),
    0 1px 1px rgba(0, 0, 30, 0.4);
  white-space: nowrap;
  overflow: hidden;
}
.task-btn:hover { filter: brightness(1.15); }
.task-btn.active {
  background: linear-gradient(to bottom,
    #1c49ac 0%, #2a5fd6 12%, #3b78e8 55%, #2a5fd0 95%);
  box-shadow:
    inset 0 2px 3px rgba(0, 0, 60, 0.55),
    inset 0 -1px 0 rgba(255, 255, 255, 0.18);
}
.tbq-ic { width: 16px; height: 16px; flex: none; display: flex; }
.tbq-ic svg { width: 16px; height: 16px; }
.tbq-label { overflow: hidden; text-overflow: ellipsis; }
.tbq-count { margin-left: auto; font-size: 9px; padding-left: 4px; }
.task-group { width: 120px; }

/* Tray */
#tray {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px 0 12px;
  border-radius: 8px 0 0 0;
  background: linear-gradient(to bottom,
    #1d8de0 0%, #19a2e6 8%, #1290d7 45%, #0d7ec0 90%, #1a97d8 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 2px 0 3px rgba(0, 40, 90, 0.5);
  color: #fff;
}
#tray-icons { display: flex; align-items: center; gap: 4px; }
.tray-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}
.tray-icon:hover { filter: brightness(1.25); }
#clock {
  font-size: 11px;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 40, 90, 0.6);
  padding: 0 2px;
}

/* ---------- TRAY BALLOONS ---------- */
.balloon {
  position: relative;
  width: 250px;
  margin-top: 8px;
  padding: 8px 10px 10px;
  background: #ffffe1;
  border: 1px solid #75705a;
  border-radius: 8px;
  box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.balloon.show { opacity: 1; transform: translateY(0); }
.balloon + .balloon { margin-bottom: 0; }
.balloon-title {
  font-weight: bold;
  font-size: 11px;
  margin-bottom: 4px;
  color: #000;
}
.balloon-x {
  float: right;
  width: 14px;
  height: 14px;
  line-height: 13px;
  text-align: center;
  font-weight: normal;
  color: #666;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: default;
}
.balloon-x:hover { background: #e8a08c; color: #000; border-color: #a05038; }
.balloon-text { font-size: 11px; line-height: 1.45; color: #000; }
.balloon-tail {
  position: absolute;
  right: 26px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  background: #ffffe1;
  border-right: 1px solid #75705a;
  border-bottom: 1px solid #75705a;
  transform: rotate(45deg);
}

/* ---------- 3. START MENU ---------- */
#start-menu {
  position: absolute;
  left: 0;
  bottom: 30px;
  width: 386px;
  border: 1px solid #0831d9;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: #fff;
  box-shadow: 4px 4px 12px rgba(0, 0, 30, 0.55);
  z-index: 9500;
  overflow: hidden;
}
#start-menu.opening {
  animation: sm-pop 0.16s ease-out;
}
@keyframes sm-pop {
  from { transform: translateY(10px); opacity: 0.3; }
  to { transform: translateY(0); opacity: 1; }
}

.sm-head {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 58px;
  padding: 6px 10px;
  background: linear-gradient(to bottom,
    #4a8fe8 0%, #2467d6 12%, #1c55c2 50%, #1748ab 88%, #3a78dd 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -2px 2px rgba(0, 0, 60, 0.3),
    inset 2px 0 2px rgba(0, 0, 60, 0.25);
}
.sm-avatar {
  width: 42px;
  height: 42px;
  background: #fff;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 5px;
  box-shadow: 1px 1px 4px rgba(0, 0, 40, 0.5);
  overflow: hidden;
  padding: 2px;
}
.sm-avatar svg { width: 100%; height: 100%; display: block; }
.sm-user {
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 50, 0.65);
}

.sm-cols { display: flex; min-height: 296px; }
.sm-col { padding: 6px 0; }
.sm-left { flex: 1.18; background: #fff; }
.sm-right {
  flex: 1;
  background: linear-gradient(to bottom, #d3e5fa, #c2dcf6);
  border-left: 1px solid #95bdee;
}

.sm-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  color: #000;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
}
.sm-item.bold { font-weight: bold; }
.sm-item.disabled { color: #9b9b9b; }
.sm-item:not(.disabled):hover {
  background: #316ac5;
  color: #fff;
}
.sm-item:not(.disabled):hover .sm-sub-arrow,
.sm-item:not(.disabled):hover .sm-all-arrow { color: #fff; }

.sm-ic {
  width: 28px;
  height: 28px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sm-ic svg { width: 100%; height: 100%; display: block; }
.sm-item-right { gap: 6px; }
.sm-item-right .sm-ic { width: 20px; height: 20px; }

.sm-label { overflow: hidden; text-overflow: ellipsis; }
.sm-sub-arrow { margin-left: auto; color: #316ac5; font-size: 10px; }

.sm-allprogs {
  justify-content: center;
  font-weight: bold;
  margin-top: 2px;
  padding: 6px 10px;
}
.sm-all-label { letter-spacing: 0.3px; }
.sm-all-arrow { color: #2e9e2e; font-size: 12px; margin-left: 4px; }

.sm-sep {
  height: 1px;
  margin: 3px 8px;
  background: linear-gradient(to right, transparent, #d4d0c8 12%, #d4d0c8 88%, transparent);
}
.sm-right .sm-sep {
  background: linear-gradient(to right, transparent, #95bdee 12%, #95bdee 88%, transparent);
}

.sm-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  height: 42px;
  padding: 0 12px;
  background: linear-gradient(to bottom,
    #f7b733 0%, #ef9222 12%, #e87a10 50%, #d95f04 90%, #ef9a2e 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 2px 0 2px rgba(120, 40, 0, 0.25);
}
.sm-foot-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  font-size: 11px;
  padding: 5px 8px;
  border-radius: 3px;
  text-shadow: 0 1px 1px rgba(90, 30, 0, 0.6);
}
.sm-foot-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.sm-foot-btn:active { background: rgba(120, 40, 0, 0.35); }
.sm-foot-ic {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sm-foot-ic svg { width: 100%; height: 100%; display: block; }

/* ---------- CONTEXT MENUS ---------- */
.ctx-menu {
  position: fixed;
  min-width: 170px;
  padding: 2px;
  background: #fff;
  border: 1px solid #7d7d7d;
  box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.35);
  z-index: 12000;
}
.ctx-item {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 22px;
  padding: 0 8px 0 0;
  font-size: 11px;
  color: #000;
  white-space: nowrap;
}
.ctx-item:not(.disabled):hover {
  background: #316ac5;
  color: #fff;
}
.ctx-item.disabled { color: #a1a1a1; }
.ctx-ic {
  width: 22px;
  min-width: 22px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.ctx-ic-svg { width: 16px; height: 16px; display: flex; }
.ctx-ic-svg svg { width: 16px; height: 16px; display: block; }
.ctx-label { flex: 1; padding-right: 14px; }
.ctx-arrow { font-size: 9px; color: inherit; margin-left: 8px; }
.ctx-hint { color: #808080; margin-left: 18px; font-size: 11px; }
.ctx-item:not(.disabled):hover .ctx-hint { color: #d8e4f8; }
.ctx-item.checked .ctx-ic { color: #000; font-weight: bold; }
.ctx-item.checked:not(.disabled):hover .ctx-ic { color: #fff; }
.ctx-sep {
  height: 1px;
  margin: 3px 2px 3px 26px;
  background: #d4d0c8;
}

/* ---------- 4. WINDOWS ---------- */
.window {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  min-height: 80px;
  padding: 0 3px 3px;
  border: 1px solid #0831d9;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(to right,
    #0058e6 0%, #2a7ae8 4%, #0058e6 8%,
    #0058e6 92%, #2a7ae8 96%, #0058e6 100%);
  box-shadow: 3px 4px 14px rgba(0, 0, 25, 0.5);
  overflow: hidden;
}
.window.active {
  border-color: #0831d9;
  box-shadow: 4px 6px 18px rgba(0, 0, 25, 0.6);
}
.window:not(.active) {
  background: linear-gradient(to right,
    #6a87b4 0%, #91a9c9 4%, #7690bb 8%,
    #7690bb 92%, #91a9c9 96%, #6a87b4 100%);
  border-color: #3a5a8c;
  box-shadow: 2px 3px 9px rgba(0, 0, 25, 0.35);
}
.window.dragging { opacity: 0.92; }
.window.dragging, .window.dragging * { cursor: inherit; }
.window.animating { transition: left 0.18s ease, top 0.18s ease, width 0.18s ease, height 0.18s ease; }
.window.maximized { border-radius: 0; padding: 0; border-width: 0; }
.window.maximized .rs { display: none; }
.window.closing { transition: opacity 0.09s ease, transform 0.09s ease; opacity: 0; transform: scale(0.98); }
.window.pop-in { animation: win-pop 0.18s ease-out; }
@keyframes win-pop {
  from { transform: scale(0.96); opacity: 0.4; }
  to { transform: scale(1); opacity: 1; }
}

/* minimize/restore ghost */
.win-ghost {
  position: fixed;
  z-index: 20000;
  pointer-events: none;
  border: 2px solid rgba(49, 106, 197, 0.9);
  background: rgba(49, 106, 197, 0.25);
  border-radius: 4px;
}

/* Title bar */
.title-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 2px 3px 3px 5px;
  flex: none;
  color: #fff;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(to bottom,
    #7eb4f7 0%, #3a93ff 4%, #0f6bf2 10%,
    #0058e6 45%, #0148c6 90%, #0e5de0 98%, #4a90f0 100%);
}
.window:not(.active) .title-bar {
  background: linear-gradient(to bottom,
    #b8c6da 0%, #9db2cb 8%, #8ba2c0 45%, #7f97b8 90%, #a4b7ce 100%);
  color: #e8edf4;
}
.tb-icon {
  width: 16px;
  height: 16px;
  flex: none;
  display: flex;
}
.tb-icon svg { width: 16px; height: 16px; display: block; }
.tb-title {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.2px;
  text-shadow: 1px 1px 1px rgba(0, 20, 80, 0.7);
  padding-bottom: 1px;
}
.window:not(.active) .tb-title { text-shadow: none; font-weight: normal; }
.tb-btns { display: flex; gap: 2px; align-items: center; }

.tb-btn {
  position: relative;
  width: 21px;
  height: 21px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 3px;
  background: linear-gradient(to bottom,
    #4f9bf5 0%, #2f7de8 45%, #1d63c9 55%, #3c8bef 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.55),
    inset 0 -1px 1px rgba(0, 0, 80, 0.35),
    0 1px 1px rgba(0, 0, 60, 0.35);
}
.tb-btn:hover { filter: brightness(1.18); }
.tb-btn:active {
  background: linear-gradient(to bottom, #1d63c9 0%, #2f7de8 60%, #4f9bf5 100%);
  box-shadow: inset 0 2px 2px rgba(0, 0, 80, 0.5);
}
.window:not(.active) .tb-btn {
  background: linear-gradient(to bottom, #b0c2d8 0%, #93abc6 45%, #7f9ab8 55%, #a4bad2 100%);
  border-color: rgba(255, 255, 255, 0.6);
}
.tb-btn span { position: absolute; inset: 0; }
/* minimize glyph: bar at bottom */
.tb-min span::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 5px;
  height: 3px;
  background: #fff;
  box-shadow: 1px 1px 0 rgba(0, 0, 70, 0.5);
}
/* maximize glyph: square */
.tb-max span::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 5px;
  right: 5px;
  bottom: 5px;
  border: 2px solid #fff;
  border-top-width: 3px;
  box-shadow: 1px 1px 0 rgba(0, 0, 70, 0.4);
}
/* restore glyph: two overlapping squares */
.tb-max span.restore-glyph::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 7px;
  height: 7px;
  border: 2px solid #fff;
  border-top-width: 3px;
  background: transparent;
}
.tb-max span.restore-glyph::after {
  left: 8px;
  top: 8px;
  right: 4px;
  bottom: 4px;
  background: linear-gradient(to bottom, #4f9bf5, #2f7de8);
}
/* close glyph: X */
.tb-close span::before, .tb-close span::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 9px;
  height: 3px;
  background: #fff;
  border-radius: 1px;
  box-shadow: 1px 1px 0 rgba(70, 0, 0, 0.5);
}
.tb-close span::before { transform: rotate(45deg); }
.tb-close span::after { transform: rotate(-45deg); }
.tb-close {
  background: linear-gradient(to bottom,
    #f3a08f 0%, #e26a52 10%, #d6492e 45%, #c63b22 90%, #e0715a 100%);
  border-color: rgba(255, 255, 255, 0.75);
}
.tb-close:hover { filter: brightness(1.15); }
.tb-close:active {
  background: linear-gradient(to bottom, #b03418 0%, #cf4526 60%, #e26a52 100%);
  box-shadow: inset 0 2px 2px rgba(60, 0, 0, 0.55);
}
.window:not(.active) .tb-close {
  background: linear-gradient(to bottom, #e2a294 0%, #cd8a78 45%, #c07a68 55%, #d89a8a 100%);
}

/* Window body */
.window-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #ece9d8;
  overflow: hidden;
  position: relative;
  min-height: 0;
}

/* Status bar */
.status-bar {
  flex: none;
  display: flex;
  align-items: center;
  height: 21px;
  padding: 0 8px;
  background: #ece9d8;
  border-top: 1px solid #d4d0c8;
  box-shadow: inset 0 1px 0 #fff;
  font-size: 11px;
  color: #333;
}

/* Resize handles */
.rs { position: absolute; z-index: 5; }
.rs-n  { top: -2px; left: 8px; right: 8px; height: 5px; cursor: ns-resize; }
.rs-s  { bottom: -2px; left: 8px; right: 8px; height: 5px; cursor: ns-resize; }
.rs-e  { right: -2px; top: 8px; bottom: 8px; width: 5px; cursor: ew-resize; }
.rs-w  { left: -2px; top: 8px; bottom: 8px; width: 5px; cursor: ew-resize; }
.rs-ne { top: -2px; right: -2px; width: 12px; height: 12px; cursor: nesw-resize; }
.rs-nw { top: -2px; left: -2px; width: 12px; height: 12px; cursor: nwse-resize; }
.rs-se { bottom: -2px; right: -2px; width: 12px; height: 12px; cursor: nwse-resize; }
.rs-sw { bottom: -2px; left: -2px; width: 12px; height: 12px; cursor: nesw-resize; }

/* In-app menu bar */
.menu-bar {
  flex: none;
  display: flex;
  align-items: center;
  height: 22px;
  padding: 0 2px;
  background: #ece9d8;
  border-bottom: 1px solid #d4d0c8;
}
.menu-bar-btn {
  padding: 3px 7px;
  font-size: 11px;
  color: #000;
}
.menu-bar-btn:hover { background: #316ac5; color: #fff; }
.menu-bar-btn.hot { background: #316ac5; color: #fff; }

/* ---------- DIALOGS & CONTROLS ---------- */
.dlg-body { padding: 12px; }
.dlg-content { display: flex; gap: 12px; align-items: flex-start; }
.dlg-icon { width: 34px; height: 34px; flex: none; }
.dlg-text { flex: 1; font-size: 11px; line-height: 1.5; padding-top: 2px; }
.dlg-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 14px;
}

.xp-btn {
  min-width: 74px;
  padding: 3px 12px;
  font-size: 11px;
  color: #000;
  background: linear-gradient(to bottom, #fbfaf5 0%, #ece9d8 45%, #dedac6 100%);
  border: 1px solid #003c74;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}
.xp-btn:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), inset 0 0 4px rgba(255, 165, 60, 0.8); }
.xp-btn:active {
  background: linear-gradient(to bottom, #d8d4c0 0%, #e4e0cc 60%, #f0ecdc 100%);
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.25);
}
.xp-btn.default {
  border: 2px solid #003c74;
  padding: 2px 11px;
  background: linear-gradient(to bottom, #fdfcf7 0%, #f0ede0 45%, #e2deca 100%);
}
.xp-btn:focus { outline: 1px dotted #000; outline-offset: -4px; }
.xp-btn:disabled { color: #8a8a8a; border-color: #9a9a9a; box-shadow: none; }

.xp-input {
  padding: 2px 4px;
  font-size: 11px;
  background: #fff;
  border: 1px solid #7f9db9;
  color: #000;
}
.xp-input:focus { outline: none; border-color: #316ac5; }
.xp-input[readonly] { background: #f4f3ec; }
select.xp-input { padding: 1px 2px; }

.xp-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  cursor: default;
}

/* system icons used in dialogs */
.sys-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.5), inset 0 -2px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0,0,0,.3);
}
.sys-icon.info { background: radial-gradient(circle at 35% 30%, #7ab5f5, #1663c9 70%); font-family: Georgia, serif; font-style: italic; }
.sys-icon.warn { background: radial-gradient(circle at 35% 30%, #ffe98a, #eab218 70%); color: #7a5800; text-shadow: 0 1px 0 rgba(255,255,255,.5); }
.sys-icon.error { background: radial-gradient(circle at 35% 30%, #f58a7a, #c92916 70%); }

.dlg-run-ic { width: 32px; height: 32px; }
.dlg-run-ic svg { width: 32px; height: 32px; display: block; }

/* properties table */
.props-table { border-collapse: collapse; font-size: 11px; width: 100%; }
.props-table td {
  padding: 3px 8px 3px 0;
  vertical-align: top;
  border-bottom: 1px solid #e0dcc8;
}
.props-table td:first-child { font-weight: bold; color: #0046a0; white-space: nowrap; }

/* ---------- 5. BOOT SCREEN ---------- */
#boot {
  position: absolute;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 5000;
}
#boot-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
}
#boot-logo { display: flex; align-items: center; gap: 14px; }

#boot-flag {
  display: grid;
  grid-template-columns: 22px 22px;
  grid-template-rows: 17px 17px;
  gap: 3px;
  transform: perspective(120px) rotateY(-18deg);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.15));
}
.flag-pane { display: block; }
.fp-red { background: linear-gradient(135deg, #ff7043, #e63c12); }
.fp-green { background: linear-gradient(135deg, #a2d52a, #5f9e00); }
.fp-blue { background: linear-gradient(135deg, #43b7f9, #1269d3); }
.fp-yellow { background: linear-gradient(135deg, #ffd94a, #f5a400); }

#boot-wordmark { color: #fff; line-height: 1; }
.bw-ms { font-size: 13px; font-style: italic; letter-spacing: 0.5px; }
.bw-r { font-size: 9px; vertical-align: super; }
.bw-win { font-size: 42px; font-weight: bold; letter-spacing: 1px; }
.bw-xp {
  font-size: 30px;
  font-weight: bold;
  font-style: italic;
  color: #f96b1d;
  margin-left: 6px;
  text-shadow: 0 0 8px rgba(249, 107, 29, 0.35);
}

#boot-progress {
  width: 158px;
  height: 15px;
  border: 1px solid #8a8a8a;
  border-radius: 3px;
  padding: 2px;
  overflow: hidden;
  background: #000;
}
#boot-bar {
  position: relative;
  height: 100%;
  width: 100%;
  overflow: hidden;
}
#boot-bar i {
  position: absolute;
  top: 0;
  width: 10px;
  height: 100%;
  margin-right: 3px;
  background: linear-gradient(to bottom, #7d8fe8, #2a3fa0 55%, #1a2a80);
  border-radius: 1px;
  opacity: 0;
}
#boot-bar.run i {
  animation: boot-slide 2.1s linear infinite;
}
#boot-bar.run i:nth-child(1) { animation-delay: 0s; }
#boot-bar.run i:nth-child(2) { animation-delay: 0.12s; }
#boot-bar.run i:nth-child(3) { animation-delay: 0.24s; }
@keyframes boot-slide {
  0% { left: -14px; opacity: 0; }
  8% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: 162px; opacity: 0; }
}

#boot-tagline {
  color: #cfcfcf;
  font-size: 13px;
  letter-spacing: 3px;
}
#boot-footer {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 14px 20px;
  color: #9a9a9a;
  font-size: 11px;
}
#boot-ms { font-style: italic; font-weight: bold; color: #cfcfcf; }
.mini-flag {
  display: inline-block;
  width: 12px;
  height: 9px;
  vertical-align: -1px;
  margin-right: 4px;
  background-image:
    linear-gradient(#f65314, #f65314),
    linear-gradient(#7cbb00, #7cbb00),
    linear-gradient(#00a1f1, #00a1f1),
    linear-gradient(#ffbb00, #ffbb00);
  background-size: 5px 4px;
  background-position: 0 0, 7px 0, 0 5px, 7px 5px;
  background-repeat: no-repeat;
}

/* ---------- WELCOME / LOGIN ---------- */
#welcome {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(to bottom, #00309c 0%, #2c57b8 45%, #5a7edc 100%);
  z-index: 5000;
}
.wel-strip {
  flex: none;
  height: 9%;
  min-height: 44px;
  background: linear-gradient(to bottom, #ffffff, #e8ecf6 60%, #cdd6ee);
}
.wel-strip.wel-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  background: linear-gradient(to bottom, #cdd6ee, #e8ecf6 40%, #ffffff);
}
.wel-mid { flex: 1; display: flex; min-height: 0; }
.wel-left {
  flex: 1.15;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-right: 2px solid rgba(255, 255, 255, 0.55);
  padding-bottom: 6%;
}
.wel-flag {
  display: grid;
  grid-template-columns: 16px 16px;
  grid-template-rows: 12px 12px;
  gap: 2px;
  transform: perspective(100px) rotateY(-18deg);
}
.wel-wordmark { color: #fff; line-height: 1; text-align: left; }
.wel-wordmark .bw-win { font-size: 34px; }
.wel-wordmark .bw-xp { font-size: 25px; }
.wel-hint {
  margin-top: 22px;
  color: #fff;
  font-size: 13px;
  font-style: italic;
  text-shadow: 0 1px 2px rgba(0, 0, 60, 0.6);
}
.wel-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding-bottom: 6%;
}
.wel-right.logging .wel-user { opacity: 0.55; }
.wel-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 18px 8px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.15s ease;
}
.wel-user:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.4);
}
.wel-user:active { background: rgba(0, 20, 90, 0.3); }
.wel-avatar {
  width: 56px;
  height: 56px;
  background: #fff;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 6px;
  box-shadow: 2px 2px 8px rgba(0, 0, 40, 0.55);
  overflow: hidden;
  padding: 3px;
}
.avatar-face { width: 100%; height: 100%; }
.avatar-face svg { width: 100%; height: 100%; display: block; }
.wel-name {
  color: #fff;
  font-size: 17px;
  text-shadow: 1px 1px 2px rgba(0, 0, 50, 0.7);
}
.wel-turnoff {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d95710;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px;
}
.wel-turnoff:hover { background: rgba(217, 87, 16, 0.12); text-decoration: underline; }
.wel-power {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #d95710;
  position: relative;
}
.wel-power::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -3px;
  width: 3px;
  height: 10px;
  margin-left: -1.5px;
  background: #d95710;
  border-radius: 2px;
  box-shadow: 0 0 0 2px #eef1f8;
}
.wel-note {
  font-size: 10px;
  color: #5a6a9a;
  text-align: right;
  line-height: 1.5;
}

/* ---------- SYSMSG (shutting down etc.) ---------- */
#sysmsg {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: #00309c;
  z-index: 6000;
}
#sysmsg-text {
  color: #fff;
  font-size: 16px;
  text-align: center;
  line-height: 1.6;
}
#sysmsg.safe-off { background: #00309c; }
.safe-off-btn {
  font-size: 12px;
  padding: 6px 18px;
}

/* standby blackout */
.standby-screen {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  transition: opacity 0.9s ease;
  z-index: 15000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.standby-screen.dark { opacity: 1; }
.standby-hint {
  color: #5a5a5a;
  font-size: 13px;
  text-align: center;
  line-height: 1.8;
}

/* ---------- TURN OFF COMPUTER ---------- */
.turnoff-shade {
  position: fixed;
  inset: 0;
  background: rgba(0, 10, 50, 0.55);
  z-index: 13000;
}
.turnoff-dlg {
  position: fixed;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: 344px;
  padding-bottom: 14px;
  border: 1px solid #0831d9;
  border-radius: 8px 8px 4px 4px;
  background: #ece9d8;
  box-shadow: 4px 6px 20px rgba(0, 0, 20, 0.65);
  z-index: 13100;
  overflow: hidden;
  text-align: center;
  animation: win-pop 0.16s ease-out;
}
.turnoff-title {
  padding: 7px 10px;
  text-align: left;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  text-shadow: 1px 1px 1px rgba(0, 20, 80, 0.7);
  background: linear-gradient(to bottom,
    #7eb4f7 0%, #3a93ff 4%, #0f6bf2 10%,
    #0058e6 45%, #0148c6 90%, #4a90f0 100%);
}
.turnoff-btns {
  display: flex;
  justify-content: center;
  gap: 26px;
  padding: 22px 10px 18px;
}
.turnoff-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: #0046a0;
  font-size: 11px;
  padding: 4px 2px;
  border-radius: 4px;
}
.turnoff-btn:hover { text-decoration: underline; }
.turnoff-btn:hover .to-ic { filter: brightness(1.15); }
.turnoff-btn:active .to-ic { filter: brightness(0.85); }
.to-ic {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  position: relative;
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.65),
    inset 0 -3px 4px rgba(0, 0, 0, 0.3),
    0 2px 3px rgba(0, 0, 0, 0.35);
}
/* Stand By: crescent moon on yellow */
.to-ic.standby { background: radial-gradient(circle at 35% 30%, #ffe98a, #f0b400 70%); }
.to-ic.standby::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 5px 2px 0 0 #fff8d0;
  transform: rotate(115deg);
}
/* Turn Off: power symbol on red */
.to-ic.off { background: radial-gradient(circle at 35% 30%, #f58a7a, #c92916 70%); }
.to-ic.off::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 3px;
  height: 11px;
  margin-left: -1.5px;
  background: #fff;
  border-radius: 2px;
  z-index: 2;
}
.to-ic.off::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 9px;
  width: 12px;
  height: 12px;
  margin-left: -7px;
  border: 3px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
}
/* Restart: circular arrow on green */
.to-ic.restart { background: radial-gradient(circle at 35% 30%, #8fdc7c, #2a9e1d 70%); }
.to-ic.restart::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 13px;
  height: 13px;
  margin-left: -8px;
  border: 3px solid #fff;
  border-left-color: transparent;
  border-radius: 50%;
  transform: rotate(-35deg);
}
.to-ic.restart::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 6px;
  width: 0;
  height: 0;
  border-left: 6px solid #fff;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transform: rotate(28deg);
}
.turnoff-cancel { margin: 0 auto; }

/* ---------- 6. APP INTERIORS ---------- */

/* Notepad */
.np-body { background: #fff; padding: 0; }
.notepad-ta {
  flex: 1;
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  padding: 3px 4px;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 13px;
  color: #000;
  background: #fff;
  user-select: text;
  -webkit-user-select: text;
  white-space: pre;
  overflow: auto;
}

/* File open dialog */
.filedlg { display: flex; flex-direction: column; gap: 8px; }
.filedlg-row { display: flex; align-items: center; gap: 8px; }
.filedlg-row label { white-space: nowrap; }
.filedlg-row .xp-input { flex: 1; }
.filedlg-list {
  height: 150px;
  overflow: auto;
  background: #fff;
  border: 1px solid #7f9db9;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.15);
  padding: 2px;
}
.filedlg-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 4px;
  font-size: 11px;
  white-space: nowrap;
}
.filedlg-item:hover { background: #e8f0fb; }
.filedlg-item.sel { background: #316ac5; color: #fff; }
.fd-ic { width: 16px; height: 16px; flex: none; display: flex; }
.fd-ic svg { width: 16px; height: 16px; }
.filedlg-empty { padding: 8px; color: #808080; font-style: italic; }

/* Font dialog */
.font-dlg { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.font-dlg label { font-weight: bold; }

/* Paint */
.paint-body { background: #ece9d8; }
.paint-wrap { flex: 1; display: flex; min-height: 0; }
.paint-tools {
  flex: none;
  width: 52px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px;
  border-right: 1px solid #d4d0c8;
  overflow: auto;
}
.ptool {
  width: 42px;
  height: 32px;
  font-size: 15px;
  line-height: 1;
  background: linear-gradient(to bottom, #fbfaf5, #e2decc);
  border: 1px solid #aca899;
  border-radius: 3px;
}
.ptool:hover { border-color: #316ac5; }
.ptool.sel {
  background: linear-gradient(to bottom, #cfe0f5, #a9c8ec);
  border-color: #316ac5;
  box-shadow: inset 1px 1px 2px rgba(0, 40, 100, 0.35);
}
.paint-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.paint-canvas-holder {
  flex: 1;
  overflow: auto;
  padding: 8px;
  background:
    repeating-conic-gradient(#c8c4b0 0% 25%, #b8b4a0 0% 50%) 0 0 / 16px 16px;
}
.paint-canvas {
  background: #fff;
  border: 1px solid #808080;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.35);
  cursor: crosshair;
  display: block;
}
.paint-palette {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  border-top: 1px solid #d4d0c8;
  background: #ece9d8;
}
.paint-current {
  position: relative;
  width: 34px;
  height: 30px;
  flex: none;
}
.pc-fg, .pc-bg {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1px solid #404040;
  box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.6);
}
.pc-fg { left: 0; top: 0; z-index: 2; }
.pc-bg { right: 0; bottom: 0; }
.paint-colors {
  display: grid;
  grid-template-columns: repeat(14, 18px);
  grid-template-rows: repeat(2, 18px);
  gap: 2px;
}
.pcolor {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(0, 0, 0, 0.45);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.35);
}
.pcolor:hover { outline: 1px solid #fff; }

/* Minesweeper */
.ms-body {
  background: #c0c0c0;
  align-items: center;
  padding: 8px;
}
.ms-wrap {
  border: 3px solid;
  border-color: #fff #808080 #808080 #fff;
  padding: 6px;
  background: #c0c0c0;
}
.ms-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 5px;
  margin-bottom: 6px;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  background: #c0c0c0;
}
.ms-counter {
  font-family: "Courier New", monospace;
  font-weight: bold;
  font-size: 17px;
  color: #ff2020;
  background: #000;
  padding: 1px 3px;
  border: 1px solid #808080;
  letter-spacing: 2px;
  min-width: 42px;
  text-align: center;
}
.ms-face {
  width: 28px;
  height: 28px;
  font-size: 16px;
  line-height: 1;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
}
.ms-face:active { border-color: #808080 #fff #fff #808080; }
.ms-grid {
  display: grid;
  grid-template-columns: repeat(9, 20px);
  grid-auto-rows: 20px;
  border: 3px solid;
  border-color: #808080 #fff #fff #808080;
  width: 180px;
}
.ms-cell {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Courier New", monospace;
  font-weight: bold;
  font-size: 13px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
}
.ms-cell.open {
  border: 1px solid #808080;
  background: #c0c0c0;
}
.ms-cell.mined { background: #c0c0c0; }
.ms-cell.boom { background: #ff0000; }

/* Explorer / My Computer / Recycle Bin */
.exp-body { background: #ece9d8; }
.exp-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.exp-toolbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  border-bottom: 1px solid #d4d0c8;
  background: #ece9d8;
}
.exp-tbtn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 11px;
  color: #000;
  border: 1px solid transparent;
  border-radius: 3px;
}
.exp-tbtn:hover { border-color: #aca899; background: #f5f3e8; }
.exp-tbtn:active { background: #ddd8c4; }
.exp-tbtn:disabled { color: #9a9a9a; }
.exp-tsep {
  width: 1px;
  height: 18px;
  margin: 0 4px;
  background: #aca899;
}
.exp-addr {
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  background: #ece9d8;
  border-bottom: 1px solid #d4d0c8;
}
.exp-addr label { color: #444; }
.exp-addr-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid #7f9db9;
  padding: 2px 4px;
}
.exp-addr-ic { width: 16px; height: 16px; flex: none; display: flex; }
.exp-addr-ic svg { width: 16px; height: 16px; }
.exp-addr-inp {
  flex: 1;
  border: none;
  outline: none;
  font-size: 11px;
  background: transparent;
  color: #000;
}
.exp-cols { flex: 1; display: flex; min-height: 0; background: #fff; }
.exp-tasks {
  flex: none;
  width: 196px;
  overflow: auto;
  padding: 10px;
  background: linear-gradient(to bottom, #7ba0e0 0%, #9db9e8 8%, #cdddf3 30%, #eff4fb 100%);
}
.task-block {
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.55);
  overflow: hidden;
}
.task-block-h {
  padding: 4px 8px;
  font-weight: bold;
  font-size: 11px;
  color: #fff;
  background: linear-gradient(to bottom, #5f8ad8, #3a68c0);
  text-shadow: 0 1px 1px rgba(0, 20, 80, 0.5);
}
.task-block-b { padding: 5px 8px; display: flex; flex-direction: column; gap: 3px; }
.task-entry {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #1d3f8c;
  padding: 2px 3px;
  border-radius: 2px;
}
.task-entry:hover { text-decoration: underline; color: #d95710; }
.task-entry.disabled { color: #8a9ab8; }
.task-entry.disabled:hover { text-decoration: none; color: #8a9ab8; }
.task-ic { width: 18px; height: 18px; flex: none; display: flex; }
.task-ic svg { width: 18px; height: 18px; }

.exp-list { flex: 1; overflow: auto; background: #fff; padding: 6px; }
.exp-list.view-icons {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
}
.exp-list.view-list { display: block; }
.exp-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px;
  border: 1px solid transparent;
}
.exp-list.view-icons .exp-item {
  flex-direction: column;
  width: 78px;
  text-align: center;
  gap: 3px;
}
.exp-item:hover { background: #e8f0fb; border-color: #c8ddf5; }
.exp-item.sel { background: #316ac5; color: #fff; border-color: #316ac5; }
.exp-item-ic { flex: none; display: flex; width: 16px; height: 16px; }
.exp-list.view-icons .exp-item-ic { width: 32px; height: 32px; }
.exp-item-ic svg { width: 100%; height: 100%; display: block; }
.exp-item-label {
  font-size: 11px;
  word-break: break-word;
  line-height: 1.25;
}
.exp-sub {
  display: block;
  font-size: 10px;
  color: #6a6a6a;
}
.exp-item.sel .exp-sub { color: #d8e4f8; }
.exp-empty { padding: 18px; color: #808080; font-style: italic; }
.mc-section {
  font-weight: bold;
  color: #0046a0;
  padding: 6px 4px 3px;
  border-bottom: 1px solid #c8dcf0;
  margin-bottom: 4px;
  width: 100%;
}

/* Control Panel */
.cp-body { background: #fff; }
.cp-grid {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px;
  padding: 14px;
  overflow: auto;
  background: #fff;
}
.cp-item {
  width: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 4px;
  text-align: center;
  border: 1px solid transparent;
  border-radius: 3px;
}
.cp-item:hover { background: #e8f0fb; border-color: #c8ddf5; }
.cp-item:active { background: #d4e4f8; }
.cp-ic { width: 32px; height: 32px; display: flex; }
.cp-ic svg { width: 100%; height: 100%; display: block; }
.cp-label { font-size: 11px; line-height: 1.3; }

/* Volume dialog */
.vol-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  font-size: 11px;
}
input[type="range"]#vol-slider, .wmp-vol input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: linear-gradient(to bottom, #9a9584, #c8c4b0);
  border: 1px solid #7a7660;
  border-radius: 2px;
  outline: none;
}
input[type="range"]#vol-slider::-webkit-slider-thumb,
.wmp-vol input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 9px;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(to right, #fbfaf5, #d8d4c0 50%, #b8b4a0);
  border: 1px solid #6a6650;
  box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}

/* Display Properties */
.disp-dlg { }
.tab-strip {
  display: flex;
  gap: 2px;
  padding: 0 4px;
  border-bottom: 1px solid #aca899;
}
.tab-btn {
  padding: 4px 12px;
  font-size: 11px;
  background: linear-gradient(to bottom, #f4f1e4, #e0dcc8);
  border: 1px solid #aca899;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  margin-bottom: -1px;
  position: relative;
}
.tab-btn:hover { background: linear-gradient(to bottom, #fbf9ee, #eae6d4); }
.tab-btn.sel {
  background: #fff;
  padding-bottom: 5px;
  font-weight: bold;
  z-index: 2;
}
.tab-page {
  background: #fff;
  border: 1px solid #aca899;
  border-top: none;
  padding: 14px 12px;
  min-height: 240px;
}
.tab-page label { font-size: 11px; display: block; margin: 8px 0 4px; }

.disp-monitor {
  width: 190px;
  margin: 2px auto 6px;
  padding: 10px 10px 16px;
  background: linear-gradient(to bottom, #d8d4c4, #b0ac9c);
  border: 1px solid #8a8674;
  border-radius: 4px;
  box-shadow: inset 1px 1px 2px rgba(255,255,255,.6), 0 2px 4px rgba(0,0,0,.25);
}
.disp-mon-screen {
  width: 100%;
  height: 108px;
  border: 2px solid #4a4a4a;
  border-radius: 2px;
  background: #3a6ea5;
}
.disp-mon-screen.wall-bliss {
  background: linear-gradient(to bottom, #3a78d6 0%, #6aa8ec 42%, #8fc0f4 52%, #5daa3c 53%, #3f8c26 100%);
}
.disp-mon-screen.wall-azul {
  background: linear-gradient(135deg, #12265e, #3a68c8 55%, #6aa0e8);
}
.disp-mon-screen.wall-home {
  background: linear-gradient(to bottom, #02021a, #0c1440 60%, #1c2a66);
}
.disp-mon-screen.wall-none { background: #3a6ea5; }

.wall-list {
  max-height: 92px;
  overflow: auto;
  border: 1px solid #7f9db9;
  background: #fff;
  padding: 2px;
}
.wall-item {
  padding: 2px 6px;
  font-size: 11px;
  white-space: nowrap;
}
.wall-item:hover { background: #e8f0fb; }
.wall-item.sel { background: #316ac5; color: #fff; }
.disp-note { margin-top: 8px; font-size: 11px; color: #444; }

.scheme-list {
  max-height: 86px;
  overflow: auto;
  border: 1px solid #7f9db9;
  background: #fff;
  padding: 2px;
  margin-bottom: 10px;
}
.scheme-item { padding: 2px 6px; font-size: 11px; }
.scheme-item:hover { background: #e8f0fb; }
.scheme-item.sel { background: #316ac5; color: #fff; }

.scheme-preview {
  border: 1px solid #7f9db9;
  background: #ece9d8;
  padding: 10px;
}
.scheme-preview .sp-titlebar {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: bold;
  color: #fff;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(to bottom, #3a93ff, #0058e6 55%, #0148c6);
}
.scheme-preview .sp-body {
  padding: 10px;
  font-size: 11px;
  background: #fff;
  border: 1px solid #d4d0c8;
}
.scheme-preview[data-scheme="olive"] .sp-titlebar {
  background: linear-gradient(to bottom, #c3d1a8, #96a878 55%, #7d905e);
}
.scheme-preview[data-scheme="silver"] .sp-titlebar {
  background: linear-gradient(to bottom, #e0e2ea, #a9adb9 55%, #8d92a1);
  color: #1c2440;
  text-shadow: none;
}

/* Command Prompt */
.cmd-body { background: #000; padding: 0; }
.cmd-screen {
  flex: 1;
  overflow: auto;
  padding: 4px 6px;
  background: #000;
  color: #e0e0e0;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.35;
  user-select: text;
  -webkit-user-select: text;
}
.cmd-line { white-space: pre-wrap; word-break: break-all; }
.cmd-row { display: flex; align-items: baseline; }
.cmd-ps { white-space: pre; }
.cmd-inp {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #e0e0e0;
  font-family: inherit;
  font-size: inherit;
  caret-color: #e0e0e0;
  padding: 0;
}
.cmd-typed { white-space: pre-wrap; }

/* Hung demo app */
.hang-body { padding: 12px; background: #ece9d8; }
.hang-code {
  font-family: "Lucida Console", monospace;
  font-size: 12px;
  background: #1a1a2a;
  color: #8fd48f;
  padding: 8px 10px;
  border: 1px solid #000;
  margin: 8px 0;
}
.hang-progress {
  height: 14px;
  border: 1px solid #7f9db9;
  background: #fff;
  overflow: hidden;
  margin-top: 8px;
}
.hang-bar {
  height: 100%;
  width: 40%;
  background: repeating-linear-gradient(to right,
    #316ac5 0 8px, transparent 8px 12px);
  animation: hang-slide 1.2s linear infinite;
}
@keyframes hang-slide {
  from { transform: translateX(-100%); }
  to { transform: translateX(260%); }
}

/* Task Manager */
.tm-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; background: #fff; }
.tm-list {
  flex: 1;
  overflow: auto;
  border: 1px solid #7f9db9;
  margin: 8px;
  background: #fff;
}
.tm-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 10px;
  font-size: 11px;
}
.tm-row:not(.tm-hdr):hover { background: #e8f0fb; }
.tm-row.sel { background: #316ac5; color: #fff; }
.tm-row.tm-hdr {
  background: #ece9d8;
  font-weight: bold;
  border-bottom: 1px solid #aca899;
  position: sticky;
  top: 0;
}
.tm-btns {
  flex: none;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 0 8px 8px;
}

/* ---------- 7. INTERNET EXPLORER ---------- */
.ie-body { background: #ece9d8; }
.ie-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.ie-toolbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  background: #ece9d8;
  border-bottom: 1px solid #d4d0c8;
}
.ie-tbtn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  font-size: 11px;
  color: #000;
  border: 1px solid transparent;
  border-radius: 3px;
}
.ie-tbtn:hover { border-color: #aca899; background: #f5f3e8; }
.ie-tbtn:active { background: #ddd8c4; }
.ie-tbtn:disabled { color: #a5a5a5; }
.ie-tbtn:disabled .ie-glyph { opacity: 0.35; }
.ie-tsep { width: 1px; height: 20px; margin: 0 4px; background: #aca899; }

.ie-glyph {
  position: relative;
  width: 18px;
  height: 18px;
  display: inline-block;
  flex: none;
}
.ie-glyph::before, .ie-glyph::after { content: ""; position: absolute; }
/* back / forward arrows */
.ie-glyph.back::before, .ie-glyph.fwd::before {
  top: 3px;
  width: 8px;
  height: 8px;
  border-left: 3px solid #1d8a1d;
  border-bottom: 3px solid #1d8a1d;
}
.ie-glyph.back::before { left: 5px; transform: rotate(45deg); }
.ie-glyph.fwd::before { right: 5px; transform: rotate(-135deg); }
/* stop: red X */
.ie-glyph.stop::before, .ie-glyph.stop::after {
  left: 3px; right: 3px; top: 8px;
  height: 3px;
  background: #d02a1a;
  border-radius: 1px;
}
.ie-glyph.stop::before { transform: rotate(45deg); }
.ie-glyph.stop::after { transform: rotate(-45deg); }
/* refresh: circular arrows */
.ie-glyph.refr::before {
  left: 2px; top: 2px;
  width: 10px; height: 10px;
  border: 2.5px solid #1d8a1d;
  border-right-color: transparent;
  border-radius: 50%;
  transform: rotate(30deg);
}
.ie-glyph.refr::after {
  right: 1px; top: 1px;
  border-left: 5px solid #1d8a1d;
  border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent;
  transform: rotate(-25deg);
}
/* home: little house */
.ie-glyph.home::before {
  left: 3px; top: 7px;
  width: 12px; height: 8px;
  background: #e8b400;
  border: 1px solid #9a6a00;
}
.ie-glyph.home::after {
  left: 1px; top: 1px;
  width: 0; height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 7px solid #c03a20;
}

.ie-addr {
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  background: #ece9d8;
  border-bottom: 1px solid #d4d0c8;
}
.ie-addr label { color: #444; }
.ie-addr-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid #7f9db9;
  padding: 2px 4px;
}
.ie-addr-ic { width: 16px; height: 16px; flex: none; display: flex; }
.ie-addr-ic svg { width: 16px; height: 16px; }
.ie-addr-inp {
  flex: 1;
  border: none;
  outline: none;
  font-size: 11px;
  background: transparent;
  color: #000;
}

.ie-page-holder {
  flex: 1;
  overflow: auto;
  background: #fff;
  position: relative;
}
.ie-page { min-height: 100%; background: #fff; }
.ie-page.loading { opacity: 0.6; }
.ie-spinner {
  width: 26px;
  height: 26px;
  margin: 60px auto;
  border: 3px solid #d4d0c8;
  border-top-color: #316ac5;
  border-radius: 50%;
  animation: ie-spin 0.8s linear infinite;
}
@keyframes ie-spin { to { transform: rotate(360deg); } }

/* offline pages */
.pg-msn { font-size: 12px; color: #222; }
.msn-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 8px 16px;
  color: #fff;
  background: linear-gradient(to bottom, #2f6fd0, #174a96);
}
.msn-logo {
  font-size: 22px;
  font-weight: bold;
  font-style: italic;
  letter-spacing: -1px;
  color: #fff;
}
.msn-nav { font-size: 11px; color: #cfe0f8; }
.msn-cols {
  display: flex;
  gap: 18px;
  padding: 14px 18px;
  align-items: flex-start;
}
.msn-col { flex: 1; min-width: 0; }
.msn-col h3 {
  font-size: 13px;
  color: #174a96;
  border-bottom: 1px solid #c8dcf0;
  padding-bottom: 3px;
  margin-bottom: 6px;
}
.msn-col p { margin: 5px 0; line-height: 1.5; }
.msn-col a { color: #174a96; }
.msn-search { display: flex; gap: 6px; margin: 6px 0; }
.msn-search .xp-input { flex: 1; }
.msn-muted { color: #7a7a7a; font-size: 11px; line-height: 1.5; }
.msn-foot {
  margin-top: 10px;
  padding: 10px 18px;
  border-top: 1px solid #d4d0c8;
  color: #8a8a8a;
  font-size: 10px;
}

.pg-tour { font-size: 12px; }
.tour-banner {
  padding: 22px 20px;
  font-size: 20px;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0, 0, 40, 0.5);
  background: linear-gradient(to bottom, #2f6fd0, #174a96);
}
.tour-body { padding: 16px 20px; line-height: 1.6; }
.tour-body h2 { font-size: 16px; color: #174a96; margin-bottom: 8px; }
.tour-body p { margin: 7px 0; }

.pg-help { font-size: 12px; }
.help-head {
  padding: 16px 20px;
  font-size: 17px;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(to bottom, #6aa0e8, #2a5cb0);
}
.help-body { padding: 14px 20px; line-height: 1.6; }
.help-body h3 { font-size: 13px; color: #174a96; margin-bottom: 6px; }
.help-body p { margin: 5px 0; }

.pg-error { padding: 40px 30px; font-size: 12px; line-height: 1.7; color: #222; }
.pg-error h2 { font-size: 15px; margin-bottom: 10px; }

/* ---------- WINDOWS MEDIA PLAYER ---------- */
.wmp-body { background: #20284a; }
.wmp-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: linear-gradient(to bottom, #2c3860, #1c2444);
  color: #dbe4ff;
}
.wmp-top { flex: 1; display: flex; min-height: 0; }
.wmp-viz-holder {
  flex: 1;
  position: relative;
  margin: 8px;
  background: #000;
  border: 1px solid #46528a;
  border-radius: 4px;
  overflow: hidden;
}
.wmp-viz { width: 100%; height: 100%; display: block; }
.wmp-overlay {
  position: absolute;
  left: 0;
  right: 0;
  top: 6px;
  text-align: center;
  font-size: 11px;
  color: rgba(219, 228, 255, 0.85);
  text-shadow: 0 1px 2px #000;
  pointer-events: none;
}
.wmp-side {
  flex: none;
  width: 168px;
  display: flex;
  flex-direction: column;
  margin: 8px 8px 8px 0;
  border: 1px solid #46528a;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.wmp-side-h {
  padding: 5px 8px;
  font-size: 11px;
  font-weight: bold;
  color: #9fb4ee;
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid #46528a;
}
.wmp-list { flex: 1; overflow: auto; padding: 3px; }
.wmp-track {
  padding: 4px 6px;
  border-radius: 3px;
  font-size: 11px;
}
.wmp-track:hover { background: rgba(255, 255, 255, 0.08); }
.wmp-track.sel { background: #3a56b8; color: #fff; }
.wmp-tname { font-weight: bold; }
.wmp-tartist { font-size: 10px; color: #9fb4ee; }
.wmp-track.sel .wmp-tartist { color: #ccd9ff; }

.wmp-controls {
  flex: none;
  padding: 6px 10px 9px;
  background: linear-gradient(to bottom, #38468c, #242f60);
  border-top: 1px solid #46528a;
}
.wmp-seek {
  height: 8px;
  border-radius: 4px;
  background: #0c1128;
  border: 1px solid #46528a;
  overflow: hidden;
  margin-bottom: 7px;
}
.wmp-seek-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(to bottom, #7ea4f8, #3a68d8);
}
.wmp-btns { display: flex; align-items: center; gap: 6px; }
.wmp-btn {
  min-width: 30px;
  height: 24px;
  padding: 0 8px;
  font-size: 12px;
  color: #dbe4ff;
  background: linear-gradient(to bottom, #4a5aa8, #303e78);
  border: 1px solid #5a6ab8;
  border-radius: 4px;
  text-shadow: 0 1px 1px #000;
}
.wmp-btn:hover { filter: brightness(1.25); }
.wmp-btn:active { background: linear-gradient(to bottom, #20295a, #303e78); }
.wmp-play { min-width: 38px; color: #8fe08f; }
.wmp-time {
  margin-left: auto;
  font-family: "Lucida Console", monospace;
  font-size: 11px;
  color: #9fb4ee;
}
.wmp-vol { display: flex; align-items: center; }
.wmp-vol input[type="range"] {
  width: 70px;
  background: #0c1128;
  border-color: #46528a;
}
.wmp-vol input[type="range"]::-webkit-slider-thumb {
  background: linear-gradient(to right, #7ea4f8, #3a56b8);
  border-color: #2a3a78;
  height: 12px;
}

/* ---------- COLOR SCHEMES ---------- */
/* Olive Green */
body[data-scheme="olive"] .window {
  background: linear-gradient(to right,
    #8a9c6a 0%, #aebf8e 4%, #93a876 8%,
    #93a876 92%, #aebf8e 96%, #8a9c6a 100%);
  border-color: #5a6c3e;
}
body[data-scheme="olive"] .window:not(.active) {
  background: linear-gradient(to right,
    #a8b294 0%, #c2cbae 4%, #b0ba9c 8%,
    #b0ba9c 92%, #c2cbae 96%, #a8b294 100%);
  border-color: #75805e;
}
body[data-scheme="olive"] .window.active .title-bar,
body[data-scheme="olive"] .turnoff-title {
  background: linear-gradient(to bottom,
    #d4e2bc 0%, #b9cda0 4%, #a4bc88 10%,
    #93a878 45%, #7d905e 90%, #a8bc8a 98%, #c6d4ac 100%);
}
body[data-scheme="olive"] #taskbar {
  background: linear-gradient(to bottom,
    #b9cda0 0%, #a0b884 6%, #93a878 24%,
    #8a9e6e 60%, #7d905e 90%, #6e8052 100%);
}
body[data-scheme="olive"] .task-btn {
  background: linear-gradient(to bottom,
    #acbf90 0%, #99ad7a 8%, #90a471 50%, #869a68 92%, #a4b98a 100%);
}
body[data-scheme="olive"] .task-btn.active {
  background: linear-gradient(to bottom,
    #758a58 0%, #8aa06a 12%, #9cb27c 55%, #8aa06a 95%);
}
body[data-scheme="olive"] #tray {
  background: linear-gradient(to bottom,
    #b0c49a 0%, #9cb483 8%, #8da873 45%, #7d9462 90%, #a2b98c 100%);
}
body[data-scheme="olive"] .tb-btn:not(.tb-close) {
  background: linear-gradient(to bottom,
    #c4d4a8 0%, #a8bf88 45%, #93a876 55%, #b5c898 100%);
}
body[data-scheme="olive"] .sm-head {
  background: linear-gradient(to bottom,
    #b9cda0 0%, #a0b884 12%, #8fa673 50%, #7d905e 88%, #a8bc8a 100%);
}
body[data-scheme="olive"] #start-menu { border-color: #5a6c3e; }

/* Silver */
body[data-scheme="silver"] .window {
  background: linear-gradient(to right,
    #a9adb9 0%, #c8cbd6 4%, #b2b6c4 8%,
    #b2b6c4 92%, #c8cbd6 96%, #a9adb9 100%);
  border-color: #6d7282;
}
body[data-scheme="silver"] .window:not(.active) {
  background: linear-gradient(to right,
    #c2c5cf 0%, #d8dae2 4%, #cacdd8 8%,
    #cacdd8 92%, #d8dae2 96%, #c2c5cf 100%);
  border-color: #8a8f9d;
}
body[data-scheme="silver"] .window.active .title-bar,
body[data-scheme="silver"] .turnoff-title {
  background: linear-gradient(to bottom,
    #f4f5fa 0%, #dcdfe8 4%, #c6c9d6 10%,
    #a9adb9 45%, #8d92a1 90%, #c0c4d2 98%, #e4e6ee 100%);
  color: #1c2440;
}
body[data-scheme="silver"] .window.active .tb-title { text-shadow: 0 1px 0 rgba(255,255,255,.6); }
body[data-scheme="silver"] #taskbar {
  background: linear-gradient(to bottom,
    #e3e4e8 0%, #c9ccd6 6%, #b4b8c6 24%,
    #a9adb9 60%, #9aa0ae 90%, #8b91a0 100%);
}
body[data-scheme="silver"] .task-btn {
  color: #1c2440;
  background: linear-gradient(to bottom,
    #d6d9e2 0%, #c0c4d0 8%, #b6bac8 50%, #acb0be 92%, #c8cbd6 100%);
}
body[data-scheme="silver"] .task-btn.active {
  background: linear-gradient(to bottom,
    #9aa0ae 0%, #aeb2c0 12%, #c2c6d4 55%, #aeb2c0 95%);
  box-shadow: inset 0 2px 3px rgba(20, 24, 40, 0.4);
}
body[data-scheme="silver"] #tray {
  background: linear-gradient(to bottom,
    #d8dbe4 0%, #c4c8d4 8%, #b4b8c6 45%, #a4a8b6 90%, #ccd0da 100%);
}
body[data-scheme="silver"] #clock,
body[data-scheme="silver"] .task-btn { text-shadow: none; }
body[data-scheme="silver"] .tb-btn:not(.tb-close) {
  background: linear-gradient(to bottom,
    #e8eaf2 0%, #ccd0dc 45%, #b8bcca 55%, #d8dbe4 100%);
}
body[data-scheme="silver"] .sm-head {
  background: linear-gradient(to bottom,
    #e0e2ea 0%, #c6cad8 12%, #a9adb9 50%, #8d92a1 88%, #c0c4d2 100%);
}
body[data-scheme="silver"] .sm-user { color: #1c2440; text-shadow: 0 1px 0 rgba(255,255,255,.6); }
body[data-scheme="silver"] #start-menu { border-color: #6d7282; }

