.window-dialog {
  position: fixed;
  inset: auto;
  left: max(12px, calc(50vw - 300px));
  top: 8vh;
  width: min(600px, calc(100vw - 24px));
  height: min(700px, 84vh);
  min-width: 320px;
  min-height: 240px;
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
  margin: 0;
  padding: 0;
  overflow: auto;
  resize: both;
  z-index: 1100;
  border: 1px solid #b9c7d8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 60px #17283b50;
}
#fueling-dialog.window-dialog {
  left: max(12px, calc(50vw - 380px));
  width: min(760px, calc(100vw - 24px));
  height: min(750px, 84vh);
}
.window-titlebar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding-left: 16px;
  background: #eef3f8;
  border-bottom: 1px solid #cbd6e2;
  cursor: move;
  user-select: none;
}
.window-titlebar h2 {
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 15px;
  line-height: 1.2;
}
.window-buttons { display: flex; align-self: stretch; margin-left: 12px; }
.window-buttons button {
  width: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #26384a;
  font: 20px/1 Arial, sans-serif;
  cursor: pointer;
}
.window-buttons button:hover { background: #d9e4ee; }
.window-buttons button[data-window-action="close"]:hover { background: #c53737; color: #fff; }
.window-content { padding: 20px 24px 24px; }
.window-dialog.window-maximized {
  top: 8px !important;
  left: 8px !important;
  width: calc(100vw - 16px) !important;
  height: calc(100vh - 16px) !important;
  max-width: none !important;
  max-height: none !important;
  resize: none;
}
.minimized-windows {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 2100;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.window-restore {
  padding: 9px 14px;
  border: 1px solid #b9c7d8;
  border-radius: 7px;
  background: #eef3f8;
  color: #17283b;
  box-shadow: 0 3px 14px #17283b30;
  cursor: pointer;
}
@media (max-width: 640px) {
  .window-dialog, #fueling-dialog.window-dialog {
    left: 8px;
    top: 8px;
    width: calc(100vw - 16px);
    height: calc(100vh - 16px);
    min-width: 0;
    max-width: none;
    max-height: none;
    resize: none;
  }
}
