/* XP-specific styles — Luna theme overrides & custom elements */

/* ── Desktop ──────────────────────────────────────────────── */
[data-theme="xp"] .os-desktop {
  width: 100vw;
  height: 100vh;
  background: url("/xp/bliss.jpg") center/cover no-repeat;
  background-color: #0059B3;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

[data-theme="xp"] .os-desktop-area {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* ── Desktop Icons ────────────────────────────────────────── */
[data-theme="xp"] .os-icon-grid {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 2px;
  padding: 8px;
  align-content: flex-start;
  height: 100%;
}

[data-theme="xp"] .os-desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 80px;
  padding: 6px 4px 4px;
  cursor: default;
  border: 1px solid transparent;
  border-radius: 2px;
}

[data-theme="xp"] .os-desktop-icon:focus,
[data-theme="xp"] .os-desktop-icon.selected {
  background: rgba(0, 70, 213, 0.3);
  border-color: rgba(0, 70, 213, 0.6);
  outline: none;
}

[data-theme="xp"] .os-desktop-icon img {
  width: 48px;
  height: 48px;
  pointer-events: none;
}

[data-theme="xp"] .os-desktop-icon-label {
  margin-top: 3px;
  text-align: center;
  color: #fff;
  font-size: 11px;
  font-family: Tahoma, sans-serif;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9), -1px -1px 2px rgba(0, 0, 0, 0.3);
  line-height: 1.2;
  word-wrap: break-word;
  max-width: 72px;
}

/* ── Taskbar ──────────────────────────────────────────────── */
[data-theme="xp"] .os-taskbar {
  height: 30px;
  background: linear-gradient(180deg, #1F5FA6 0%, #254FA8 3%, #3D80D2 50%, #1553A1 97%, #0C3B7B 100%);
  border-top: 1px solid #0997FF;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 9999;
  flex-shrink: 0;
}

[data-theme="xp"] .os-start-btn {
  height: 30px;
  padding: 0 10px 0 6px;
  background: linear-gradient(180deg, #5DB643 0%, #3C9B3D 10%, #2E8A2F 50%, #1E7B1F 90%, #177218 100%);
  border: none;
  border-top: 1px solid #7FD264;
  border-right: 1px solid #0B5E0C;
  border-bottom: 1px solid #0B5E0C;
  border-left: none;
  border-radius: 0 8px 8px 0;
  color: #fff;
  font-family: "Franklin Gothic Medium", Tahoma, sans-serif;
  font-size: 13px;
  font-weight: bold;
  font-style: italic;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.5px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

[data-theme="xp"] .os-start-btn:hover {
  background: linear-gradient(180deg, #6BC34F 0%, #44A545 10%, #36963A 50%, #268D27 90%, #1F7E20 100%);
}

[data-theme="xp"] .os-start-btn:active {
  background: linear-gradient(180deg, #4DA535 0%, #318B30 10%, #267E28 50%, #1B6E1C 90%, #156615 100%);
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="xp"] .os-start-btn img {
  width: 20px;
  height: 20px;
}

/* Quick launch separator */
[data-theme="xp"] .os-taskbar-separator {
  width: 2px;
  height: 20px;
  background: linear-gradient(180deg, #1857A1 0%, #4E94D6 50%, #1857A1 100%);
  margin: 0 4px;
  flex-shrink: 0;
}

/* Running apps area */
[data-theme="xp"] .os-taskbar-apps {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 4px;
  overflow: hidden;
}

[data-theme="xp"] .os-taskbar-app-btn {
  position: relative;
  height: 22px;
  min-width: 140px;
  max-width: 180px;
  padding: 0 8px;
  background: linear-gradient(180deg, #3C7FCA 0%, #3574BC 50%, #225CA6 100%);
  border: 1px solid #0C3B7B;
  border-top-color: #4E94D6;
  border-radius: 2px;
  color: #fff;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: visible;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

[data-theme="xp"] .os-taskbar-app-btn > span:first-of-type {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* XP-style yellow tooltip */
[data-theme="xp"] .os-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 4px;
  background: #FFFFE1;
  color: #000;
  border: 1px solid #000;
  padding: 2px 6px;
  font-size: 11px;
  font-family: Tahoma, sans-serif;
  white-space: nowrap;
  text-shadow: none;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s 0.5s;
  z-index: 99999;
}

[data-theme="xp"] .os-taskbar-app-btn:hover .os-tooltip {
  opacity: 1;
}

[data-theme="xp"] .os-taskbar-app-btn:hover {
  background: linear-gradient(180deg, #4A8FD6 0%, #4382C6 50%, #2D6AB2 100%);
}

[data-theme="xp"] .os-taskbar-app-btn.active {
  background: linear-gradient(180deg, #DFE9F5 0%, #C9D7EA 50%, #A5BAD5 100%);
  color: #000;
  text-shadow: none;
  border-color: #4580B5;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.15);
}

[data-theme="xp"] .os-taskbar-app-btn img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* System tray */
[data-theme="xp"] .os-system-tray {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  height: 30px;
  background: linear-gradient(180deg, #0F8AEE 0%, #0C68C3 50%, #0955A8 100%);
  border-left: 1px solid #1563B0;
  margin-left: auto;
}

[data-theme="xp"] .os-tray-icon {
  width: 16px;
  height: 16px;
  opacity: 0.95;
}

[data-theme="xp"] .os-clock {
  color: #fff;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  white-space: nowrap;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
}

[data-theme="xp"] .os-system-tray {
  position: relative;
}

[data-theme="xp"] .os-tray-icon-btn,
[data-theme="xp"] .os-clock-btn {
  color: #fff;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  white-space: nowrap;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
}

[data-theme="xp"] .os-calendar-popup {
  background: #fff;
  border: 1px solid #4080C0;
  border-radius: 4px;
  padding: 8px;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.25);
}

[data-theme="xp"] .os-calendar-header {
  font-weight: bold;
  color: #003399;
  padding-bottom: 4px;
  border-bottom: 1px solid #D0D0D0;
  margin-bottom: 4px;
}

[data-theme="xp"] .os-calendar-nav {
  font-size: 14px;
  color: #003399;
}

[data-theme="xp"] .os-calendar-nav:hover {
  color: #0066CC;
}

[data-theme="xp"] .os-calendar-day-label {
  font-weight: bold;
  color: #666;
  font-size: 10px;
}

[data-theme="xp"] .os-calendar-day {
  color: #333;
  border-radius: 2px;
}

[data-theme="xp"] .os-calendar-day:hover:not(.os-calendar-day--empty) {
  background: #E0E8F0;
}

[data-theme="xp"] .os-calendar-day--today {
  background: #3169C6;
  color: #fff;
  font-weight: bold;
  border-radius: 2px;
}

[data-theme="xp"] .os-calendar-day--today:hover {
  background: #2050A0;
}

/* ── Notification Balloon ────────────────────────────────── */
[data-theme="xp"] .os-balloon {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 12px;
  width: 260px;
  background: #FFFFE1;
  border: 1px solid #000;
  border-radius: 7px;
  padding: 10px 12px;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  color: #000;
  z-index: 99999;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
}

[data-theme="xp"] .os-balloon-arrow {
  position: absolute;
  bottom: -8px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #FFFFE1;
  filter: drop-shadow(0 1px 0 #000);
}

[data-theme="xp"] .os-balloon-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

[data-theme="xp"] .os-balloon-header strong {
  flex: 1;
  font-size: 11px;
}

[data-theme="xp"] .os-balloon-close {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  color: #000;
  padding: 0 2px;
  line-height: 1;
}

[data-theme="xp"] .os-balloon-close:hover {
  color: #c00;
}

[data-theme="xp"] .os-balloon-body {
  font-size: 11px;
  line-height: 1.4;
  padding-left: 22px;
}

/* ── Window overrides ─────────────────────────────────────── */
[data-theme="xp"] .os-window-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

[data-theme="xp"] .os-window-layer > * {
  pointer-events: auto;
}

/* Window frame — Luna blue outer border with rounded top */
[data-theme="xp"] .window {
  border: 3px solid #0055EA;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.35);
  animation: xp-window-open 0.12s ease-out;
}

@keyframes xp-window-open {
  from {
    transform: scale(0.96);
  }
}

[data-theme="xp"] .window.inactive {
  border-color: #7A96C8;
  box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.2);
}

/* Title bar styling for XP.css windows */
[data-theme="xp"] .window .title-bar {
  background: linear-gradient(180deg, #0997FF 0%, #0053E0 8%, #0668E4 18%, #1B8EF1 28%, #288EF0 36%, #0261DE 50%, #0142AD 65%, #024FCC 78%, #0455CE 90%, #0350CA 100%);
  padding: 3px 5px 3px 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
}

[data-theme="xp"] .window.inactive .title-bar {
  background: linear-gradient(180deg, #B9C9E0 0%, #7B9ABD 8%, #8DACC8 18%, #A7C0DA 28%, #B0C9E2 36%, #8BACC8 50%, #7B96B5 65%, #8AA6C1 78%, #8DA9C3 90%, #8BA7C1 100%);
}

[data-theme="xp"] .window .title-bar-text {
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  font-weight: bold;
  color: #fff;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-theme="xp"] .window.inactive .title-bar-text {
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
}

[data-theme="xp"] .window .title-bar-controls button {
  width: 21px;
  height: 21px;
  min-width: 21px;
  min-height: 21px;
}

[data-theme="xp"] .window-body {
  background: #ECE9D8;
  margin: 0;
  padding: 8px;
  overflow: auto;
}

/* ── Start Menu ───────────────────────────────────────────── */
[data-theme="xp"] .os-start-menu {
  position: absolute;
  bottom: 30px;
  left: 0;
  width: 380px;
  background: #fff;
  border: 2px solid #0054E3;
  border-radius: 8px 8px 0 0;
  z-index: 10000;
  font-family: Tahoma, sans-serif;
  overflow: hidden;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

[data-theme="xp"] .os-start-menu-header {
  height: 54px;
  background: linear-gradient(180deg, #1867B2 0%, #2470BA 30%, #2672BC 50%, #2068B4 70%, #1A60AC 100%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-bottom: 1px solid #0D48A3;
}

[data-theme="xp"] .os-start-menu-avatar {
  width: 48px;
  height: 48px;
  border-radius: 3px;
  border: 2px solid #fff;
  object-fit: cover;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="xp"] .os-start-menu-username {
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

[data-theme="xp"] .os-start-menu-body {
  display: flex;
}

[data-theme="xp"] .os-start-menu-left {
  flex: 1;
  background: #fff;
  padding: 4px 0;
  border-right: 1px solid #D6D2C2;
}

[data-theme="xp"] .os-start-menu-right {
  width: 190px;
  background: #D3CFC1;
  padding: 4px 0;
}

[data-theme="xp"] .os-start-menu-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 11px;
  color: #000;
  height: 28px;
}

[data-theme="xp"] .os-start-menu-item:hover {
  background: #2F71CD;
  color: #fff;
}

[data-theme="xp"] .os-start-menu-item img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

[data-theme="xp"] .os-start-menu-left .os-start-menu-item img {
  width: 32px;
  height: 32px;
}

[data-theme="xp"] .os-start-menu-left .os-start-menu-item {
  height: 36px;
  padding: 2px 8px;
}

[data-theme="xp"] .os-start-menu-right .os-start-menu-item {
  font-weight: bold;
}

[data-theme="xp"] .os-start-menu-right .os-start-menu-item img {
  width: 24px;
  height: 24px;
}

[data-theme="xp"] .os-start-menu-separator {
  height: 1px;
  background: #C5C5B8;
  margin: 2px 8px;
}

[data-theme="xp"] .os-start-menu-right .os-start-menu-separator {
  background: #B6B09D;
}

[data-theme="xp"] .os-start-menu-footer {
  height: 36px;
  background: linear-gradient(180deg, #4283C4 0%, #326BB0 100%);
  border-top: 1px solid #2E69AE;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 0 8px;
}

[data-theme="xp"] .os-start-menu-footer button {
  background: none;
  border: none;
  color: #fff;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 2px;
}

[data-theme="xp"] .os-start-menu-footer button:hover {
  background: rgba(255, 255, 255, 0.15);
}

[data-theme="xp"] .os-start-menu-footer-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Shutdown Dialog ──────────────────────────────────────── */
[data-theme="xp"] .os-shutdown-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 80, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

[data-theme="xp"] .os-shutdown-dialog {
  background: linear-gradient(180deg, #3B6DA4 0%, #335F95 30%, #2B5589 50%, #234C7E 70%, #1E4576 100%);
  border: 3px solid #5B8CC8;
  border-radius: 14px;
  padding: 24px 40px;
  text-align: center;
  color: #fff;
  font-family: Tahoma, sans-serif;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  min-width: 340px;
}

[data-theme="xp"] .os-shutdown-title {
  font-size: 13px;
  font-weight: normal;
  margin-bottom: 20px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

[data-theme="xp"] .os-shutdown-buttons {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 20px;
}

[data-theme="xp"] .os-shutdown-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: 2px solid transparent;
  cursor: pointer;
  color: #fff;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  padding: 8px 16px;
  border-radius: 8px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

[data-theme="xp"] .os-shutdown-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

[data-theme="xp"] .os-shutdown-btn:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
}

[data-theme="xp"] .os-shutdown-btn-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

[data-theme="xp"] .os-shutdown-btn-icon.standby {
  background: radial-gradient(circle at 40% 35%, #FFD862, #E8A020 60%, #C88000);
}
[data-theme="xp"] .os-shutdown-btn-icon.turnoff {
  background: radial-gradient(circle at 40% 35%, #FF6B6B, #E03030 60%, #B01818);
}
[data-theme="xp"] .os-shutdown-btn-icon.restart {
  background: radial-gradient(circle at 40% 35%, #6BDD6B, #30A830 60%, #188818);
}

[data-theme="xp"] .os-shutdown-btn-icon svg {
  width: 22px;
  height: 22px;
  fill: #fff;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3));
}

[data-theme="xp"] .os-shutdown-cancel {
  background: #ECE9D8;
  border: 1px solid #ACA899;
  padding: 4px 24px;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  cursor: pointer;
  border-radius: 3px;
  color: #000;
  box-shadow: 0 1px 0 #fff inset, 0 -1px 0 #ACA899 inset;
}

[data-theme="xp"] .os-shutdown-cancel:hover {
  background: #F0EFE3;
}

[data-theme="xp"] .os-shutdown-cancel:active {
  background: #DDD8C6;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* ── Desktop Selection Rectangle ─────────────────────────── */
[data-theme="xp"] .os-selection-rect {
  position: absolute;
  background: rgba(0, 70, 213, 0.15);
  border: 1px solid rgba(0, 70, 213, 0.6);
  pointer-events: none;
  z-index: 5;
}

/* ── Context Menu ─────────────────────────────────────────── */
[data-theme="xp"] .os-context-menu {
  position: absolute;
  z-index: 10001;
  background: #fff;
  border: 1px solid #808080;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
  padding: 2px 0;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  min-width: 180px;
}

[data-theme="xp"] .os-context-menu-item {
  padding: 4px 24px 4px 28px;
  cursor: default;
  color: #000;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

[data-theme="xp"] .os-context-menu-item:hover {
  background: #316AC5;
  color: #fff;
}

[data-theme="xp"] .os-context-menu-item.disabled {
  color: #808080;
}

[data-theme="xp"] .os-context-menu-item.disabled:hover {
  background: transparent;
  color: #808080;
}

[data-theme="xp"] .os-context-menu-separator {
  height: 1px;
  background: #D6D2C2;
  margin: 3px 2px;
}

/* ── App Menubar ─────────────────────────────────────────── */
[data-theme="xp"] .os-app-menubar {
  display: flex;
  gap: 0;
  background: #ECE9D8;
  border-bottom: 1px solid #ACA899;
  padding: 1px 0;
}

[data-theme="xp"] .os-app-menubar span,
[data-theme="xp"] .os-app-menu-label {
  padding: 2px 6px;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  cursor: default;
}

[data-theme="xp"] .os-app-menubar span:hover,
[data-theme="xp"] .os-app-menu-label:hover,
[data-theme="xp"] .os-app-menu-label.active {
  background: #316AC5;
  color: #fff;
}

[data-theme="xp"] .os-app-menu-dropdown {
  background: #fff;
  border: 1px solid #ACA899;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
  padding: 2px 0;
}

[data-theme="xp"] .os-app-menu-item {
  padding: 3px 20px;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  color: #000;
}

[data-theme="xp"] .os-app-menu-item:hover:not(:disabled) {
  background: #316AC5;
  color: #fff;
}

[data-theme="xp"] .os-app-menu-item:disabled {
  color: #808080;
}

[data-theme="xp"] .os-app-menu-separator {
  height: 1px;
  background: #ACA899;
  margin: 2px 2px;
}

[data-theme="xp"] .os-app-textarea {
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  font-family: "Lucida Console", monospace;
  font-size: 13px;
  padding: 4px;
  background: #fff;
  border: 2px inset #ACA899;
  margin: 2px;
}

[data-theme="xp"] .os-app-statusbar {
  height: 20px;
  background: #ECE9D8;
  border-top: 1px solid #ACA899;
  display: flex;
  align-items: center;
  padding: 0 4px;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  color: #000;
  flex-shrink: 0;
}

/* ── IE app extras ───────────────────────────────────────── */
[data-theme="xp"] .os-app-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  background: #ECE9D8;
  border-bottom: 1px solid #C5C5B8;
}

[data-theme="xp"] .os-app-toolbar-btn {
  padding: 2px 6px;
  background: none;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  cursor: pointer;
  color: #000;
  display: flex;
  align-items: center;
  gap: 2px;
}

[data-theme="xp"] .os-app-toolbar-btn:hover {
  border-color: #C1D2EE;
  background: linear-gradient(180deg, #FAFBFE 0%, #D6DFF7 100%);
}

[data-theme="xp"] .os-app-toolbar-btn.disabled {
  color: #808080;
}

[data-theme="xp"] .os-app-toolbar-separator {
  width: 1px;
  height: 20px;
  background: #C5C5B8;
  margin: 0 2px;
}

[data-theme="xp"] .os-app-addressbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: #ECE9D8;
  border-bottom: 1px solid #ACA899;
}

[data-theme="xp"] .os-app-addressbar label {
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  flex-shrink: 0;
}

[data-theme="xp"] .os-app-addressbar input {
  flex: 1;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  border: 1px solid #7F9DB9;
  padding: 1px 4px;
  background: #fff;
  height: 20px;
}

[data-theme="xp"] .os-app-go-btn {
  padding: 1px 8px;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  background: #ECE9D8;
  border: 1px solid #ACA899;
  border-radius: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

[data-theme="xp"] .os-app-go-btn:hover {
  background: #F0EFE3;
}

[data-theme="xp"] .os-app-addressbar-dropdown-btn {
  font-size: 8px;
  padding: 0 4px;
  color: #000;
  height: 20px;
  background: #fff;
  border: 1px solid #7F9DB9;
  border-left: none;
}

[data-theme="xp"] .os-app-addressbar-dropdown {
  background: #fff;
  border: 1px solid #7F9DB9;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
}

[data-theme="xp"] .os-app-addressbar-dropdown-item {
  padding: 2px 4px;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  color: #000;
}

[data-theme="xp"] .os-app-addressbar-dropdown-item:hover {
  background: #316AC5;
  color: #fff;
}

/* ── Throbber ────────────────────────────────────────────── */
[data-theme="xp"] .ie-throbber {
  width: 34px;
  height: 34px;
  margin-right: 2px;
}

[data-theme="xp"] .ie-throbber-icon {
  width: 22px;
  height: 22px;
  border: 2px solid #316AC5;
  border-top-color: transparent;
  border-radius: 50%;
  opacity: 0.3;
}

[data-theme="xp"] .ie-throbber--active .ie-throbber-icon {
  opacity: 1;
  animation: ie-spin 0.8s linear infinite;
}

@keyframes ie-spin {
  to { transform: rotate(360deg); }
}

/* ── Context Menu ────────────────────────────────────────── */
[data-theme="xp"] .ie-context-menu {
  background: #fff;
  border: 1px solid #ACA899;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
  padding: 2px 0;
}

[data-theme="xp"] .ie-context-menu-item {
  padding: 3px 20px;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  color: #000;
}

[data-theme="xp"] .ie-context-menu-item:hover:not(:disabled) {
  background: #316AC5;
  color: #fff;
}

[data-theme="xp"] .ie-context-menu-item:disabled {
  color: #808080;
}

[data-theme="xp"] .ie-context-menu-separator {
  height: 1px;
  background: #ACA899;
  margin: 2px 2px;
}

[data-theme="xp"] .os-app-statusbar {
  height: 20px;
  background: #ECE9D8;
  border-top: 1px solid #ACA899;
  display: flex;
  align-items: center;
  padding: 0 4px;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  color: #808080;
  flex-shrink: 0;
}

/* ── Browser Content ──────────────────────────────────────── */
[data-theme="xp"] .ie-browser {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
}

[data-theme="xp"] .ie-content {
  flex: 1;
  overflow: auto;
  background: #fff;
}

[data-theme="xp"] .ie-loading-text {
  font-family: Tahoma, sans-serif;
  color: #333;
}

[data-theme="xp"] .ie-error {
  padding: 24px;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  color: #333;
}

[data-theme="xp"] .ie-error h2 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #003399;
}

[data-theme="xp"] .ie-error p {
  margin: 4px 0;
}

[data-theme="xp"] .ie-error a {
  color: #003399;
}

[data-theme="xp"] .ie-error hr {
  border: none;
  border-top: 1px solid #CCC;
  margin: 12px 0;
}

/* ── Browser Home Page ────────────────────────────────────── */
[data-theme="xp"] .ie-home {
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  color: #333;
}

[data-theme="xp"] .ie-home-banner {
  background: linear-gradient(135deg, #003399 0%, #0055EA 60%, #316AC5 100%);
  color: #fff;
  padding: 24px;
  text-align: center;
}

[data-theme="xp"] .ie-home-banner h1 {
  margin: 0;
  font-size: 18px;
  font-weight: bold;
}

[data-theme="xp"] .ie-home-banner p {
  margin: 4px 0 0;
  font-size: 12px;
  opacity: 0.85;
}

[data-theme="xp"] .ie-home-content {
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

[data-theme="xp"] .ie-home-section h3 {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: bold;
  color: #003399;
}

[data-theme="xp"] .ie-home-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

[data-theme="xp"] .ie-home-links li {
  padding: 3px 0;
}

[data-theme="xp"] .ie-home-links a {
  color: #003399;
  text-decoration: underline;
  cursor: pointer;
}

[data-theme="xp"] .ie-home-links a:hover {
  color: #CC3300;
}

[data-theme="xp"] .ie-home-card {
  background: #F5F3EB;
  border: 1px solid #DDD;
  border-radius: 2px;
  padding: 10px 12px;
}

[data-theme="xp"] .ie-home-card p {
  margin: 0;
  line-height: 1.5;
}

[data-theme="xp"] .ie-home-footer {
  padding: 12px 24px;
  border-top: 1px solid #DDD;
  color: #999;
  font-size: 10px;
  text-align: center;
}

[data-theme="xp"] .ie-home-footer p {
  margin: 0;
}

/* ── Browser About Page ───────────────────────────────────── */
[data-theme="xp"] .ie-about {
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  color: #333;
  padding: 16px 24px;
}

[data-theme="xp"] .ie-about-header {
  border-bottom: 2px solid #003399;
  padding-bottom: 8px;
  margin-bottom: 16px;
}

[data-theme="xp"] .ie-about-header h1 {
  margin: 0;
  font-size: 18px;
  color: #003399;
}

[data-theme="xp"] .ie-about-subtitle {
  margin: 4px 0 0;
  color: #666;
  font-size: 11px;
}

[data-theme="xp"] .ie-about-section {
  margin-bottom: 16px;
}

[data-theme="xp"] .ie-about-section h2 {
  margin: 0 0 8px;
  font-size: 13px;
  color: #003399;
  border-bottom: 1px solid #DDD;
  padding-bottom: 4px;
}

[data-theme="xp"] .ie-about-card {
  background: #F5F3EB;
  border: 1px solid #DDD;
  border-radius: 2px;
  padding: 8px 12px;
  margin-bottom: 6px;
}

[data-theme="xp"] .ie-about-card h3 {
  margin: 0;
  font-size: 12px;
  font-weight: bold;
}

[data-theme="xp"] .ie-about-meta {
  margin: 2px 0 4px;
  color: #666;
  font-size: 10px;
}

[data-theme="xp"] .ie-about-card p {
  margin: 4px 0 0;
  line-height: 1.4;
}

[data-theme="xp"] .ie-about-card a {
  color: #003399;
}

/* ── Browser Search Page ─────────────────────────────────── */
[data-theme="xp"] .ie-search-page {
  font-family: Tahoma, sans-serif;
  background: #fff;
}

[data-theme="xp"] .ie-search-logo {
  text-align: center;
  margin-bottom: 20px;
}

[data-theme="xp"] .ie-search-title {
  font-size: 28px;
  color: #003399;
  margin: 0;
}

[data-theme="xp"] .ie-search-tagline {
  color: #666;
  font-size: 11px;
  margin: 4px 0 0;
}

[data-theme="xp"] .ie-search-input {
  border: 1px solid #7F9DB9;
  padding: 4px 6px;
  font-family: Tahoma, sans-serif;
  font-size: 12px;
}

[data-theme="xp"] .ie-search-btn {
  background: linear-gradient(180deg, #F0F0F0 0%, #D8D8D8 100%);
  border: 1px solid #7F9DB9;
  padding: 4px 12px;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  cursor: pointer;
}

[data-theme="xp"] .ie-search-btn:hover {
  background: linear-gradient(180deg, #E8E8E8 0%, #D0D0D0 100%);
}

[data-theme="xp"] .ie-search-links {
  font-size: 11px;
  color: #666;
}

[data-theme="xp"] .ie-search-links a {
  color: #003399;
  text-decoration: none;
}

[data-theme="xp"] .ie-search-links a:hover {
  text-decoration: underline;
}

/* ── Browser Portfolio Page (Retro) ──────────────────────── */
[data-theme="xp"] .ie-portfolio {
  font-family: "Times New Roman", Times, serif;
  font-size: 13px;
  color: #000;
  background: #FFF;
}

[data-theme="xp"] .ie-portfolio-header {
  background: #000080;
  color: #FFD700;
  padding: 12px 16px;
  text-align: center;
}

[data-theme="xp"] .ie-portfolio-header h1 {
  margin: 0;
  font-size: 20px;
  font-family: "Comic Sans MS", "Times New Roman", cursive;
}

[data-theme="xp"] .ie-portfolio-marquee {
  color: #00FF00;
  font-size: 12px;
  margin-top: 4px;
  overflow: hidden;
  white-space: nowrap;
}

[data-theme="xp"] .ie-portfolio-marquee {
  animation: marquee-scroll 12s linear infinite;
}

@keyframes marquee-scroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

[data-theme="xp"] .ie-portfolio-sidebar {
  background: #E8E8E8;
  border-right: 2px groove #CCC;
  padding: 8px;
}

[data-theme="xp"] .ie-portfolio-nav-title {
  font-weight: bold;
  font-size: 12px;
  margin: 4px 0;
  color: #000080;
}

[data-theme="xp"] .ie-portfolio-nav a {
  color: #0000FF;
  font-size: 12px;
}

[data-theme="xp"] .ie-portfolio-main {
  padding: 12px 16px;
}

[data-theme="xp"] .ie-portfolio-main h2 {
  color: #800000;
  font-size: 16px;
  margin: 8px 0 6px;
}

[data-theme="xp"] .ie-portfolio-main h3 {
  margin: 4px 0 2px;
  font-size: 13px;
}

[data-theme="xp"] .ie-portfolio-main a {
  color: #0000FF;
}

[data-theme="xp"] .ie-portfolio-item {
  margin-bottom: 12px;
}

[data-theme="xp"] .ie-portfolio-footer {
  text-align: center;
  font-size: 10px;
  color: #666;
  padding: 8px;
  border-top: 1px solid #CCC;
}

/* ── Browser Help Page ───────────────────────────────────── */
[data-theme="xp"] .ie-help {
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  color: #333;
  background: #fff;
  line-height: 1.5;
}

[data-theme="xp"] .ie-help h1 {
  font-size: 18px;
  color: #003399;
  margin: 0 0 8px;
  border-bottom: 2px solid #003399;
  padding-bottom: 6px;
}

[data-theme="xp"] .ie-help h2 {
  font-size: 13px;
  color: #003399;
  margin: 16px 0 4px;
}

[data-theme="xp"] .ie-help a {
  color: #003399;
}

[data-theme="xp"] .ie-help ul {
  padding-left: 20px;
}

/* ── My Computer app extras ──────────────────────────────── */
[data-theme="xp"] .os-app-explorer {
  display: flex;
  height: 100%;
}

[data-theme="xp"] .os-app-sidebar {
  width: 180px;
  background: linear-gradient(180deg, #6B93D6 0%, #4F77BC 20%, #6B93D6 100%);
  padding: 8px;
  flex-shrink: 0;
  border-right: 1px solid #ACA899;
}

[data-theme="xp"] .os-app-sidebar-section {
  background: #fff;
  border-radius: 5px;
  margin-bottom: 8px;
  overflow: hidden;
}

[data-theme="xp"] .os-app-sidebar-title {
  background: linear-gradient(180deg, #FFFFFF 0%, #C4DAF7 100%);
  padding: 6px 8px;
  font-weight: bold;
  font-size: 11px;
  font-family: Tahoma, sans-serif;
  color: #215DC6;
  border-bottom: 1px solid #C4DAF7;
}

[data-theme="xp"] .os-app-sidebar-item {
  padding: 3px 8px 3px 20px;
  font-size: 11px;
  font-family: Tahoma, sans-serif;
  color: #215DC6;
  cursor: pointer;
  text-decoration: none;
}

[data-theme="xp"] .os-app-sidebar-item:hover {
  text-decoration: underline;
}

[data-theme="xp"] .os-app-content {
  flex: 1;
  padding: 8px 12px;
  overflow: auto;
}

[data-theme="xp"] .os-app-section-label {
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  font-weight: bold;
  color: #215DC6;
  border-bottom: 1px solid #ACA899;
  padding-bottom: 2px;
  margin-bottom: 8px;
  margin-top: 8px;
}

[data-theme="xp"] .os-app-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 4px;
}

[data-theme="xp"] .os-app-grid-item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 200px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: default;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
}

[data-theme="xp"] .os-app-grid-item:hover {
  background: rgba(0, 70, 213, 0.1);
  border-color: rgba(0, 70, 213, 0.3);
}

[data-theme="xp"] .os-app-grid-item img {
  width: 32px;
  height: 32px;
}

[data-theme="xp"] .os-app-grid-label {
  font-weight: normal;
}

[data-theme="xp"] .os-app-grid-label strong {
  font-weight: bold;
}

/* ── Boot Screen ─────────────────────────────────────────── */
[data-theme="xp"] .os-boot-loading {
  background: #000;
}

[data-theme="xp"] .os-boot-content {
  gap: 32px;
}

[data-theme="xp"] .os-boot-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

[data-theme="xp"] .os-boot-logo img {
  width: 48px;
  height: 48px;
}

[data-theme="xp"] .os-boot-logo-text {
  display: flex;
  flex-direction: column;
}

[data-theme="xp"] .os-boot-microsoft {
  color: #fff;
  font-family: "Franklin Gothic Medium", Tahoma, sans-serif;
  font-size: 11px;
  font-weight: normal;
  letter-spacing: 4px;
  text-transform: uppercase;
  opacity: 0.9;
}

[data-theme="xp"] .os-boot-windows {
  color: #fff;
  font-family: "Franklin Gothic Medium", Tahoma, sans-serif;
  font-size: 28px;
  font-weight: bold;
  font-style: italic;
  letter-spacing: -0.5px;
}

[data-theme="xp"] .os-boot-xp {
  color: #FF6600;
  font-style: italic;
  font-weight: bold;
  margin-left: 2px;
  vertical-align: super;
  font-size: 20px;
}

[data-theme="xp"] .os-boot-progress-track {
  width: 200px;
  height: 14px;
  background: transparent;
  border: 1px solid #333;
  border-radius: 2px;
  padding: 2px;
  overflow: hidden;
}

[data-theme="xp"] .os-boot-progress-bar {
  width: 30%;
  height: 100%;
  background: linear-gradient(180deg, #4E8EDB 0%, #3565A5 50%, #2B5592 100%);
  border-radius: 1px;
  animation: os-boot-slide 1.2s ease-in-out infinite;
}

@keyframes os-boot-slide {
  0% { transform: translateX(-100%); width: 30%; }
  50% { transform: translateX(100%); width: 30%; }
  100% { transform: translateX(350%); width: 30%; }
}

[data-theme="xp"] .os-boot-copyright {
  color: #666;
  font-family: Tahoma, sans-serif;
  font-size: 10px;
}

/* ── Theme Picker ────────────────────────────────────────── */
[data-theme="xp"] .theme-picker {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ECE9D8;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  color: #000;
  position: relative;
  overflow: hidden;
}

/* Tab row */
[data-theme="xp"] .theme-picker-tabs-row {
  display: flex;
  gap: 0;
  padding: 0 12px;
  align-items: flex-end;
  flex-shrink: 0;
}

[data-theme="xp"] .theme-picker-tab {
  position: relative;
  padding: 6px 12px 4px;
  border: 1px solid #ACA899;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  background: var(--tab-color, #D6D2C2);
  cursor: pointer;
  font: inherit;
  color: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 90px;
  transition: background 0.1s, margin-bottom 0.1s;
  margin-bottom: 0;
  z-index: 1;
  opacity: 0.75;
}

[data-theme="xp"] .theme-picker-tab:hover {
  opacity: 0.9;
}

[data-theme="xp"] .theme-picker-tab--active {
  opacity: 1;
  z-index: 3;
  margin-bottom: -1px;
  padding-bottom: 5px;
  border-bottom: 1px solid transparent;
  background: var(--tab-color, #D6D2C2);
  border-bottom-color: var(--tab-color, #D6D2C2);
}

[data-theme="xp"] .theme-picker-tab--current {
  position: relative;
}

[data-theme="xp"] .theme-picker-tab-year {
  font-weight: bold;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

[data-theme="xp"] .theme-picker-tab-name {
  font-size: 9px;
  opacity: 0.75;
  white-space: nowrap;
}

[data-theme="xp"] .theme-picker-tab-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  background: #4CAF50;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

/* Body — the box containing the selected theme details */
[data-theme="xp"] .theme-picker-body {
  flex: 1;
  border: 1px solid #ACA899;
  border-top: 2px solid #ACA899;
  margin: 0 12px 12px;
  background: #FFF;
  overflow: hidden;
  position: relative;
  z-index: 2;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5),
              1px 2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="xp"] .theme-picker-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Preview area — colored banner showing the theme */
[data-theme="xp"] .theme-picker-preview-area {
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
  flex-shrink: 0;
}

[data-theme="xp"] .theme-picker-year-badge {
  font-size: 32px;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
}

[data-theme="xp"] .theme-picker-title {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
}

/* Details panel — description and action */
[data-theme="xp"] .theme-picker-details {
  flex: 1;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(180deg, #FAFAFA 0%, #F5F3EB 100%);
  border-top: 1px solid #E0DDD0;
}

[data-theme="xp"] .theme-picker-desc {
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
  color: #444;
}

[data-theme="xp"] .theme-picker-actions {
  display: flex;
  align-items: center;
  margin-top: auto;
}

[data-theme="xp"] .theme-picker-apply-btn {
  background: linear-gradient(180deg, #3C9B3D 0%, #2E8A2F 50%, #1E7B1F 100%);
  border: 1px solid #0B5E0C;
  border-radius: 3px;
  color: #fff;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  font-weight: bold;
  padding: 6px 16px;
  cursor: pointer;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

[data-theme="xp"] .theme-picker-apply-btn:hover {
  background: linear-gradient(180deg, #44A545 0%, #36963A 50%, #268D27 100%);
}

[data-theme="xp"] .theme-picker-apply-btn:active {
  background: linear-gradient(180deg, #318B30 0%, #267E28 50%, #1B6E1C 100%);
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="xp"] .theme-picker-apply-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

[data-theme="xp"] .theme-picker-current-badge {
  display: inline-block;
  background: #ECE9D8;
  border: 1px solid #ACA899;
  border-radius: 2px;
  color: #555;
  font-size: 11px;
  padding: 5px 14px;
}

[data-theme="xp"] .theme-picker-transition {
  position: absolute;
  inset: 0;
  background: #000;
  z-index: 10;
}

/* ── Oli Tray Icon ────────────────────────────────────────── */
[data-theme="xp"] .oli-tray-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
}

[data-theme="xp"] .oli-tray-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

[data-theme="xp"] .oli-tray-avatar-small {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  background-color: var(--ant-color);
}

/* ── Oli Chat App ─────────────────────────────────────────── */
[data-theme="xp"] .oli-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
}

[data-theme="xp"] .oli-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: linear-gradient(180deg, #FEFEFE 0%, #ECE9D8 100%);
  border-bottom: 1px solid #ACA899;
}

[data-theme="xp"] .oli-chat-colony-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

[data-theme="xp"] .oli-chat-title {
  font-weight: bold;
  font-size: 12px;
  color: #003399;
}

[data-theme="xp"] .oli-chat-age {
  font-size: 10px;
  color: #888;
}

[data-theme="xp"] .oli-chat-ants {
  display: flex;
  gap: 4px;
}

[data-theme="xp"] .oli-chat-ant-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

[data-theme="xp"] .oli-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

[data-theme="xp"] .oli-chat-welcome {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #999;
  font-size: 12px;
}

[data-theme="xp"] .oli-chat-msg {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

[data-theme="xp"] .oli-chat-msg--user {
  align-items: flex-end;
}

[data-theme="xp"] .oli-chat-msg--user .oli-chat-msg-text {
  background: #E3F0FF;
  border: 1px solid #B8D4F0;
  color: #003399;
  max-width: 80%;
}

[data-theme="xp"] .oli-chat-msg-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

[data-theme="xp"] .oli-chat-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  flex-shrink: 0;
}

[data-theme="xp"] .oli-chat-msg-name {
  font-weight: bold;
  font-size: 10px;
}

[data-theme="xp"] .oli-chat-delegation {
  font-size: 9px;
  color: #999;
  font-style: italic;
}

[data-theme="xp"] .oli-chat-msg-text {
  background: #F5F3EB;
  border: 1px solid #DDD;
  border-radius: 4px;
  padding: 6px 10px;
  line-height: 1.4;
  max-width: 80%;
  white-space: pre-wrap;
  word-break: break-word;
}

[data-theme="xp"] .oli-chat-input {
  display: flex;
  gap: 4px;
  padding: 8px;
  border-top: 1px solid #ACA899;
  background: #ECE9D8;
}

[data-theme="xp"] .oli-chat-input input {
  flex: 1;
  border: 1px solid #7F9DB9;
  padding: 4px 6px;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  outline: none;
}

[data-theme="xp"] .oli-chat-input input:focus {
  border-color: #316AC5;
}

[data-theme="xp"] .oli-chat-input button {
  background: #ECE9D8;
  border: 1px solid #ACA899;
  padding: 4px 12px;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  cursor: pointer;
}

[data-theme="xp"] .oli-chat-input button:hover {
  background: #FEFEFE;
}

[data-theme="xp"] .oli-chat-input input:disabled {
  opacity: 0.6;
}

[data-theme="xp"] .oli-chat-input button:disabled {
  opacity: 0.6;
  cursor: default;
}

[data-theme="xp"] .oli-chat-quota {
  font-family: Tahoma, sans-serif;
  font-size: 10px;
  color: #808080;
  background: #ECE9D8;
  border-top: 1px solid #ACA899;
}

[data-theme="xp"] .oli-chat-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

[data-theme="xp"] .oli-chat-mode-toggle {
  font-size: 10px;
  padding: 1px 6px;
  border: 1px solid #ACA899;
  background: #ECE9D8;
  border-radius: 2px;
  cursor: pointer;
  font-family: Tahoma, sans-serif;
  color: #333;
}

[data-theme="xp"] .oli-chat-mode-toggle:hover {
  background: #F6F3E7;
}

[data-theme="xp"] .oli-chat-msg--streaming .oli-chat-msg-text {
  opacity: 0.85;
}

[data-theme="xp"] .oli-chat-typing {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  padding: 2px 0;
}

[data-theme="xp"] .oli-chat-typing-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #666;
  animation: oli-typing-bounce 1.2s infinite ease-in-out;
}

[data-theme="xp"] .oli-chat-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

[data-theme="xp"] .oli-chat-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes oli-typing-bounce {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

/* ── Terminal App ──────────────────────────────────────────── */
[data-theme="xp"] .terminal {
  height: 100%;
  background: #000;
  color: #C0C0C0;
  font-family: 'Perfect DOS VGA 437 Win', 'Courier New', monospace;
  font-size: 13px;
  cursor: text;
  overflow: hidden;
}

[data-theme="xp"] .terminal-output {
  height: 100%;
  overflow-y: auto;
  padding: 8px;
}

[data-theme="xp"] .terminal-line {
  margin: 0;
  padding: 0;
  font: inherit;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.4;
}

[data-theme="xp"] .terminal-input-line {
  display: flex;
  align-items: center;
}

[data-theme="xp"] .terminal-prompt {
  flex-shrink: 0;
  color: #C0C0C0;
}

[data-theme="xp"] .terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #C0C0C0;
  font: inherit;
  outline: none;
  padding: 0;
  caret-color: #C0C0C0;
}

/* ── Icon Selection ──────────────────────────────────────── */
[data-theme="xp"] .os-desktop-icon--selected {
  background: rgba(49, 105, 198, 0.3);
  border: 1px dotted #3169C6;
}

[data-theme="xp"] .os-desktop-icon--selected .os-desktop-icon-label {
  background: #3169C6;
  color: #fff;
}

/* ── Alt+Tab Switcher ────────────────────────────────────── */
[data-theme="xp"] .os-alt-tab-container {
  background: #3169C6;
  border: 2px solid #1A3C7C;
  border-radius: 4px;
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="xp"] .os-alt-tab-item {
  color: #fff;
  border: 2px solid transparent;
  border-radius: 3px;
}

[data-theme="xp"] .os-alt-tab-item--active {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

[data-theme="xp"] .os-alt-tab-label {
  font-family: Tahoma, sans-serif;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}

/* ── Snap Preview ─────────────────────────────────────────── */

[data-theme="xp"] .os-snap-preview {
  background: rgba(51, 102, 204, 0.2);
  border: 2px solid rgba(51, 102, 204, 0.5);
  border-radius: 4px;
}

/* ── Display Properties ───────────────────────────────────── */

[data-theme="xp"] .os-display-props {
  font-family: Tahoma, sans-serif;
}

[data-theme="xp"] .os-display-props-tab {
  font-family: Tahoma, sans-serif;
  background: #ece9d8;
  border-color: #aca899;
}

[data-theme="xp"] .os-display-props-tab.active {
  background: #f1efe2;
  border-bottom-color: #f1efe2;
}

[data-theme="xp"] .os-display-props-body {
  background: #f1efe2;
  border-color: #aca899;
}

[data-theme="xp"] .os-display-props-monitor {
  border-color: #3a6ea5;
}

[data-theme="xp"] .os-display-props-list-item.selected {
  background: #316ac5;
}

[data-theme="xp"] .os-display-props-color-swatch.selected {
  border-color: #316ac5;
  box-shadow: 0 0 0 1px #316ac5;
}

[data-theme="xp"] .os-display-props-btn {
  background: #ece9d8;
  border: 1px solid #aca899;
  font-family: Tahoma, sans-serif;
}

[data-theme="xp"] .os-display-props-btn:hover {
  background: #ddd8c6;
}

/* ── Notepad Find Bar ─────────────────────────────────────── */

[data-theme="xp"] .notepad-find-bar {
  background: #ece9d8;
  border-bottom: 1px solid #aca899;
  font-family: Tahoma, sans-serif;
}

[data-theme="xp"] .notepad-find-input {
  border: 1px solid #7f9db9;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  padding: 2px 4px;
}

[data-theme="xp"] .notepad-find-btn {
  background: #ece9d8;
  border: 1px solid #aca899;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  padding: 1px 8px;
  cursor: pointer;
}

[data-theme="xp"] .notepad-find-btn:hover {
  background: #ddd8c6;
}

/* ── Paint app extras ──────────────────────────────────────── */

[data-theme="xp"] .paint-toolbox {
  background: #ECE9D8;
  border-right: 1px solid #ACA899;
}

[data-theme="xp"] .paint-tool-btn {
  background: #ECE9D8;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: Tahoma, sans-serif;
  color: #000;
}

[data-theme="xp"] .paint-tool-btn:hover {
  border-color: #C1D2EE;
  background: linear-gradient(180deg, #FAFBFE 0%, #D6DFF7 100%);
}

[data-theme="xp"] .paint-tool-btn.active {
  border-color: #316AC5;
  background: #C1D2EE;
}

[data-theme="xp"] .paint-tool-separator {
  background: #ACA899;
}

[data-theme="xp"] .paint-canvas-wrap {
  background: #808080;
  border: 1px inset #ACA899;
}

[data-theme="xp"] .paint-canvas {
  background: #fff;
}

[data-theme="xp"] .paint-palette {
  background: #ECE9D8;
  border-top: 1px solid #ACA899;
}

[data-theme="xp"] .paint-color-preview {
  border: 1px solid #808080;
}

[data-theme="xp"] .paint-color-swatch {
  border: 1px solid #808080;
}

[data-theme="xp"] .paint-color-swatch:hover {
  border-color: #000;
}

[data-theme="xp"] .paint-color-swatch.active {
  border: 2px solid #000;
}

/* ── Calculator app extras ────────────────────────────────── */

[data-theme="xp"] .calc-body {
  background: #ECE9D8;
}

[data-theme="xp"] .calc-display {
  background: #C5D5A9;
  border: 2px inset #7F9DB9;
  font-family: "Tahoma", sans-serif;
  color: #000;
}

[data-theme="xp"] .calc-btn {
  background: #ECE9D8;
  border: 1px solid #ACA899;
  border-radius: 2px;
  font-family: Tahoma, sans-serif;
  color: #000;
}

[data-theme="xp"] .calc-btn:hover {
  background: #D6DFF7;
  border-color: #316AC5;
}

[data-theme="xp"] .calc-btn:active {
  background: #C1D2EE;
}

[data-theme="xp"] .calc-btn-eq {
  background: #6B93D6;
  color: #fff;
  border-color: #4A6EA8;
}

[data-theme="xp"] .calc-btn-eq:hover {
  background: #5680C2;
}

[data-theme="xp"] .calc-btn-op {
  background: #E0D8C8;
}

[data-theme="xp"] .calc-btn-fn {
  background: #D4D0C8;
  font-size: 10px;
}

/* ── Minesweeper app extras ───────────────────────────────── */

[data-theme="xp"] .ms-body {
  background: #ECE9D8;
}

[data-theme="xp"] .ms-header {
  background: #ECE9D8;
  border: 2px inset #ACA899;
}

[data-theme="xp"] .ms-counter {
  background: #000;
  color: #FF0000;
  border: 1px inset #808080;
  font-family: "Consolas", monospace;
}

[data-theme="xp"] .ms-face {
  background: #ECE9D8;
  border: 2px outset #fff;
  font-family: Tahoma, sans-serif;
}

[data-theme="xp"] .ms-face:active {
  border-style: inset;
}

[data-theme="xp"] .ms-board {
  border: 2px inset #ACA899;
}

[data-theme="xp"] .ms-cell {
  background: #C0C0C0;
  border: 2px outset #fff;
  font-family: Tahoma, sans-serif;
}

[data-theme="xp"] .ms-cell:hover:not(.revealed) {
  background: #D4D0C8;
}

[data-theme="xp"] .ms-cell.revealed {
  border: 1px solid #808080;
  background: #D4D0C8;
}

[data-theme="xp"] .ms-cell.mine {
  background: #FF0000;
}

[data-theme="xp"] .ms-cell.flagged {
  color: #FF0000;
}

/* ── App Error Boundary ──────────────────────────────────── */

[data-theme="xp"] .os-app-error {
  color: #333;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
}

/* ── Admin / User Accounts App ─────────────────────────────── */

[data-theme="xp"] .os-app-admin {
  background: #ece9d8;
  font-family: Tahoma, sans-serif;
  color: #000;
}

[data-theme="xp"] .os-app-admin-header {
  border-bottom: 1px solid #aca899;
}

[data-theme="xp"] .os-app-admin-avatar {
  background: linear-gradient(180deg, #6b89c0 0%, #3c5a99 100%);
  color: #fff;
  border-radius: 4px;
  border: 2px solid #fff;
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

[data-theme="xp"] .os-app-admin-role {
  color: #666;
}

[data-theme="xp"] .os-app-admin-stat {
  background: #fff;
  border: 1px solid #aca899;
}

[data-theme="xp"] .os-app-admin-error {
  color: #c00;
}

[data-theme="xp"] .os-app-admin-input {
  border: 1px solid #7f9db9;
  background: #fff;
  font-family: Tahoma, sans-serif;
}

[data-theme="xp"] .os-app-admin-submit,
[data-theme="xp"] .os-app-admin-logout {
  background: #ece9d8;
  border: 1px solid #003c74;
  border-radius: 3px;
  font-family: Tahoma, sans-serif;
  color: #000;
}

[data-theme="xp"] .os-app-admin-submit:hover:not(:disabled),
[data-theme="xp"] .os-app-admin-logout:hover {
  background: #dfd8c8;
}


