.windows {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.window {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 280px;
  min-height: 160px;
  border: 1px solid var(--accent-dark);
  border-radius: 8px 8px 4px 4px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  overflow: hidden;
}

.window[hidden] { display: none; }

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

.window-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: linear-gradient(180deg, #4b93ea 0%, #1f5fc0 40%, #17458f 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: grab;
  user-select: none;
}

.window:not(.is-active) .window-titlebar {
  background: linear-gradient(180deg, #8fa8c8 0%, #7f93ad 100%);
}

.window-titlebar img { width: 16px; height: 16px; }
.window-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.window-controls { display: flex; gap: 4px; }

.window-control {
  width: 22px;
  height: 20px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font: 700 12px/1 var(--font-ui);
  cursor: pointer;
}

.window-control:hover { background: rgba(255, 255, 255, 0.4); }
.window-control.close:hover { background: #e04343; }

.window-body {
  flex: 1;
  padding: 16px 18px;
  background: #fff;
  overflow: auto;
  font-size: 14px;
  line-height: 1.55;
}

.window-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 50%, #9aa4b1 50%);
}

@media (max-width: 720px) {
  .window {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100% - 0px) !important;
    border-radius: 0;
  }
  .window-resize { display: none; }
}
