/* XP UI v10 — FULL MERGED (без вырезаний старого)
   Содержит всё из прошлых версий + новые блоки.
   Работает только в XP-скинах (ag-skin-xp-blue / ag-skin-xp-olive / ag-skin-xp-silver).

   Содержимое:
   1) Context menu (XP)
   2) Display Properties (XP) + плавные градиенты под XP-shell
   3) Tints per skin
   4) Desktop helpers
   5) Screen Saver overlay
   6) XP Clock: старый компактный popup-календарь (.xp-clock-popup) — оставлен
   7) XP Date/Time Properties окно (.xp-dtwin) — новый вариант, фиксированный размер, без автосайза
*/

/* ===========================
   1) Context menu (desktop)
   =========================== */
.ag-skin-xp-olive .xp-menu,
.ag-skin-xp-blue .xp-menu,
.ag-skin-xp-silver .xp-menu {
  position: fixed;
  min-width: 230px;
  background: #f7f7ff;
  color: #000;
  border: 1px solid #7a90c7;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, .35);
  font: 12px Tahoma, Arial, sans-serif;
  z-index: 60000;
  user-select: none;
  border-radius: 4px;
}

.xp-menu.hidden {
  display: none;
}

.xp-menu .xp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 28px;
  cursor: default;
  position: relative;
  white-space: nowrap;
}

.xp-menu .xp-item:hover {
  background: #cfe3ff;
}

.xp-menu .xp-item.disabled {
  color: #808080;
  pointer-events: none;
}

.xp-menu .xp-sep {
  height: 1px;
  margin: 4px 6px;
  background: #c0c0c0;
}

.xp-menu .mark {
  position: absolute;
  left: 8px;
  width: 14px;
  height: 14px;
  background-repeat: no-repeat;
  background-position: center;
  opacity: .95;
}

.xp-menu .mark.check {
  border: 1px solid #6c8ccd;
  background: #fff;
  border-radius: 2px;
  top: 6px;
}

.xp-menu .xp-item.checked .mark.check {
  background: linear-gradient(#2e8bff, #0b61d8);
}

.xp-menu .arrow {
  margin-left: auto;
  color: #345;
  font-weight: bold;
}

.xp-menu.xp-sub {
  position: fixed;
  min-width: 220px;
}

/* ===========================
   2) Display Properties (XP)
   =========================== */
.ag-skin-xp-olive .xp-prop,
.ag-skin-xp-blue .xp-prop,
.ag-skin-xp-silver .xp-prop {
  font: 12px Tahoma, Arial, sans-serif;
  color: #000;
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Fix AnimGraph close button for XP */
.ag-skin-xp-blue .ag-win-close,
.ag-skin-xp-olive .ag-win-close,
.ag-skin-xp-silver .ag-win-close {
  width: 21px;
  height: 21px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.7);
  background: linear-gradient(#fca2a2, #e24238);
  box-shadow: 0 1px 2px rgba(0,0,0,.3);
  color: transparent !important;
  font-size: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}
.ag-skin-xp-blue .ag-win-close::before,
.ag-skin-xp-olive .ag-win-close::before,
.ag-skin-xp-silver .ag-win-close::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  background: linear-gradient(#fff, #fff) center/10px 2px no-repeat,
              linear-gradient(#fff, #fff) center/2px 10px no-repeat;
  transform: rotate(45deg);
}
.ag-skin-xp-blue .ag-win-close:hover,
.ag-skin-xp-olive .ag-win-close:hover,
.ag-skin-xp-silver .ag-win-close:hover {
  background: linear-gradient(#fcc2c2, #f25248);
}


.xp-prop .xp-tabs {
  display: flex;
  gap: 2px;
  padding: 6px 6px 0;
  border-bottom: 1px solid #c0c0c0;
  background: #eef3ff;
}

.xp-prop .xp-tab-btn {
  padding: 4px 10px;
  background: #e6e6f6;
  border: 1px solid #9aa7d0;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
}

.xp-prop .xp-tab-btn.active {
  background: #fff;
  font-weight: bold;
}

.xp-prop .xp-pages {
  background: #fff;
  flex: 1;
  overflow: hidden;
  position: relative;
}

.xp-prop .xp-page {
  display: none;
  padding: 10px;
  height: 100%;
  box-sizing: border-box;
  overflow-y: auto;
}

.xp-prop .xp-page.active {
  display: flex;
  flex-direction: column;
}

.xp-prop .row {
  display: flex;
  align-items: center;
  margin: 6px 0;
  gap: 8px;
}

.xp-prop .col {
  flex: 1;
}

.xp-prop label {
  min-width: 100px;
}

.xp-prop input[type="text"],
.xp-prop select,
.xp-prop input[type="color"],
.xp-prop input[type="number"] {
  font: 12px Tahoma, Arial, sans-serif;
  padding: 2px 4px;
  border: 1px solid #9aa7d0;
  border-radius: 3px;
  background: #fff;
}

.xp-prop .wallpaper-list {
  border: 1px solid #9aa7d0;
  height: 180px;
  overflow: auto;
  background: #fff;
  padding: 4px;
}

.xp-prop .wallpaper-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px;
  border-radius: 3px;
  cursor: default;
}

.xp-prop .wallpaper-item.active {
  background: #cfe3ff;
}

.xp-prop .thumb {
  width: 48px;
  height: 36px;
  border: 1px solid #9aa7d0;
  background: #ddd;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  flex: 0 0 auto;
}

.xp-prop .preview {
  width: 200px;
  height: 150px;
  background: #1e90ff;
  border: 1px solid #9aa7d0;
  margin-left: 10px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.xp-prop .footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px;
  border-top: 1px solid #c0c0c0;
  background: #eef3ff;
  margin: auto -10px -10px -10px;
}

.xp-prop .btn {
  padding: 4px 12px;
  border: 1px solid #9aa7d0;
  border-radius: 3px;
  background: #f5f7ff;
  cursor: pointer;
}

.xp-prop .btn:hover {
  background: #e7efff;
}

.xp-prop .inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Под XP-оболочку — мягкие градиенты (сохранено) */
.ag-skin-xp-blue .xp-prop .xp-tabs,
.ag-skin-xp-olive .xp-prop .xp-tabs,
.ag-skin-xp-silver .xp-prop .xp-tabs {
  background: linear-gradient(#edf2ff, #dfe8ff);
  border-bottom: 1px solid rgba(0, 0, 0, .15);
}

.ag-skin-xp-blue .xp-prop .footer,
.ag-skin-xp-olive .xp-prop .footer,
.ag-skin-xp-silver .xp-prop .footer {
  background: linear-gradient(#eef3ff, #dae6ff);
  border-top: 1px solid rgba(0, 0, 0, .15);
}

/* ===========================
   3) Tints per skin (из ранних версий)
   =========================== */
.ag-skin-xp-olive .xp-menu {
  border-color: #8aa15b;
}

.ag-skin-xp-silver .xp-menu {
  border-color: #9c9c9c;
}

.ag-skin-xp-olive .xp-prop .footer {
  background: #f1f6ea;
}

.ag-skin-xp-silver .xp-prop .footer {
  background: #f3f3f3;
}

/* ===========================
   4) Desktop helpers
   =========================== */
.desktop-icons-hidden #icons {
  display: none !important;
}

#desktop.icon-shadow .icon-label {
  text-shadow: 1px 1px 0 rgba(0, 0, 0, .55);
}

#desktop.icon-aa .icon-label {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#desktop .icon-label {
  font-family: var(--icon-font-family, Tahoma, Arial, sans-serif);
  font-size: var(--icon-font-size, 12px);
  font-weight: var(--icon-font-weight, normal);
}

/* ===========================
   5) Screen Saver overlay
   =========================== */
.xp-saver {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 99999999;
  pointer-events: auto;
  cursor: none;
}

.xp-saver.hidden {
  display: none;
}

.xp-saver canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.xp-saver .label {
  position: absolute;
  left: 12px;
  bottom: 10px;
  color: #0f0;
  font: 12px Consolas, monospace;
  opacity: .75;
}

/* ===========================
   6) Старый компактный popup-календарь (оставлен)
   =========================== */
.ag-skin-xp-blue .xp-clock-popup,
.ag-skin-xp-olive .xp-clock-popup,
.ag-skin-xp-silver .xp-clock-popup {
  position: fixed;
  z-index: 70000;
  min-width: 220px;
  background: #fff;
  border: 1px solid #9aa7d0;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  overflow: hidden;
  color: #112;
  font: 12px Tahoma, Arial, sans-serif;
}

.xp-clock-popup .xp-head {
  padding: 8px 10px;
  background: linear-gradient(#edf2ff, #dfe8ff);
  border-bottom: 1px solid rgba(0, 0, 0, .12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.xp-clock-popup .xp-head .title {
  font-weight: bold;
}

.xp-clock-popup .xp-head .nav {
  display: flex;
  gap: 4px;
}

.xp-clock-popup .xp-head .nav button {
  width: 22px;
  height: 22px;
  border: 1px solid #9aa7d0;
  border-radius: 4px;
  background: #f5f7ff;
  cursor: pointer;
}

.xp-clock-popup .xp-head .nav button:hover {
  background: #e7efff;
}

.xp-clock-popup .xp-body {
  padding: 8px;
}

.xp-clock-popup table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.xp-clock-popup th {
  text-align: center;
  font-weight: bold;
  color: #345;
  padding: 4px 0;
}

.xp-clock-popup td {
  text-align: center;
  padding: 4px 0;
  border-radius: 4px;
  cursor: default;
}

.xp-clock-popup td.today {
  background: #cfe3ff;
  font-weight: bold;
}

.xp-clock-popup td.out {
  color: #98a3b3;
}

.xp-clock-popup td:hover {
  background: #e7efff;
}

.xp-clock-popup .xp-foot {
  padding: 6px 8px;
  border-top: 1px solid rgba(0, 0, 0, .12);
  background: #f7f9ff;
  color: #123;
  text-align: center;
}

/* ===========================
   7) Новое окно: "Date and Time Properties" (фиксированный размер, без автосайза)
   =========================== */
.ag-skin-xp-blue .xp-dtwin,
.ag-skin-xp-olive .xp-dtwin,
.ag-skin-xp-silver .xp-dtwin {
  position: fixed;
  z-index: 70000;
  display: none;
  width: 430px;
  height: 330px;
  /* фиксируем размер */
  max-width: 92vw;
  max-height: 90vh;
  background: #fff;
  color: #112;
  border: 1px solid #9aa7d0;
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .35);
}

/* Заголовок — стиль заголовка берёт градиент из XP shell; здесь только отступ под кнопку */
.xp-dtwin .titlebar {
  padding-right: 34px !important;
}

.xp-dtwin .titlebar .title {
  font-weight: bold;
}

/* Крестик */
.xp-dtwin .window-controls {
  position: absolute;
  right: 6px;
  top: 3px;
  display: flex;
  gap: 6px;
}

.xp-dtwin .window-controls .close {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, .32);
  background: linear-gradient(#ffb6b6, #ff6a6a);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.xp-dtwin .window-controls .close::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  background:
    linear-gradient(#fff, #fff) center/10px 2px no-repeat,
    linear-gradient(#fff, #fff) center/2px 10px no-repeat;
  transform: rotate(45deg);
}

/* Вкладки */
.xp-dtwin .xp-tabs {
  display: flex;
  gap: 2px;
  padding: 6px 6px 0;
  border-bottom: 1px solid #c0c0c0;
  background: #eef3ff;
}

.xp-dtwin .xp-tab-btn {
  padding: 4px 10px;
  background: #e6e6f6;
  border: 1px solid #9aa7d0;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
}

.xp-dtwin .xp-tab-btn.active {
  background: #fff;
  font-weight: bold;
}

/* Статичная область контента — без автосайза */
.xp-dtwin .xp-pages {
  background: #fff;
  height: 230px;
  overflow: hidden;
}

.xp-dtwin .xp-page {
  display: none;
  height: 100%;
  padding: 10px;
}

.xp-dtwin .xp-page.active {
  display: block;
}

/* Сетка Date & Time */
.xp-dtwin .dt-grid {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 12px;
  align-items: start;
}

/* Навигация месяца + стрелки */
.xp-dtwin .nav-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  align-items: center;
}

.xp-dtwin .nav-row button.m-prev,
.xp-dtwin .nav-row button.m-next {
  width: 24px;
  height: 24px;
  border: 1px solid #9aa7d0;
  border-radius: 4px;
  background: #f5f7ff;
  cursor: pointer;
  line-height: 22px;
  text-align: center;
}

.xp-dtwin .nav-row button.m-prev:hover,
.xp-dtwin .nav-row button.m-next:hover {
  background: #e7efff;
}

.xp-dtwin .nav-row select {
  font: 12px Tahoma, Arial, sans-serif;
  padding: 2px 4px;
  border: 1px solid #9aa7d0;
  border-radius: 4px;
  background: #fff;
}

/* Календарь */
.xp-dtwin table.calendar {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  border: 1px solid #cfd8f0;
  border-radius: 6px;
  overflow: hidden;
}

.xp-dtwin table.calendar th {
  text-align: center;
  font-weight: bold;
  color: #345;
  padding: 4px 0;
  background: #f3f6ff;
}

.xp-dtwin table.calendar td {
  text-align: center;
  padding: 5px 0;
  cursor: default;
}

.xp-dtwin table.calendar td.today {
  background: #cfe3ff;
  font-weight: bold;
}

.xp-dtwin table.calendar td.out {
  color: #98a3b3;
}

.xp-dtwin table.calendar td:hover {
  background: #e7efff;
}

/* Правый блок (аналоговые часы + время) */
.xp-dtwin .right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  height: 100%;
}

.xp-dtwin .right canvas.analog {
  display: block;
  background: radial-gradient(ellipse at center, #ffffff 0%, #eef3ff 100%);
  border: 1px solid #cfd8f0;
  border-radius: 8px;
}

.xp-dtwin .right .time-row input.time {
  width: 140px;
  text-align: center;
  font: 12px Tahoma, Arial, sans-serif;
  padding: 4px 6px;
  border: 1px solid #9aa7d0;
  border-radius: 4px;
  background: #fff;
}

/* Вкладки TZ/Internet */
.xp-dtwin .pad {
  padding: 4px 2px;
  color: #123;
}

/* Низ окна */
.xp-dtwin .xp-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px;
  border-top: 1px solid #cfd8f0;
  background: #f7f9ff;
}

.xp-dtwin .xp-foot .btn {
  padding: 4px 12px;
  border: 1px solid #9aa7d0;
  border-radius: 4px;
  background: #f5f7ff;
  cursor: pointer;
}

.xp-dtwin .xp-foot .btn:hover {
  background: #e7efff;
}

/* Видимость окна */
.xp-dtwin.open {
  display: block;
}

/* ===========================
   8) System Tray (Notification Area)
   =========================== */
.tray {
  /* Override default block/text-align behavior */
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

#system-tray {
  display: flex;
  align-items: center;
  gap: 2px;
  /* Tray creates separation from clock */
  padding-left: 4px;
  padding-right: 4px;
}

.tray-icon {
  width: 16px;
  height: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tray-icon img {
  width: 16px;
  height: 16px;
  display: block;
}

.tray-icon:hover {
  /* Simple hover effect */
  opacity: 0.8;
}

/* ===========================
   9) Display Properties (Revised)
   =========================== */
/* ===========================
   9) Display Properties (Revised)
   =========================== */
.xp-prop .theme-preview {
  height: 140px;
  border: 1px solid #9aa7d0;
  background: #eee;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* Mini Theme Preview (generated via JS) */
.xp-prop .mini-win {
  width: 160px;
  height: 120px;
  background: #ECE9D8;
  border: 1px solid #0055EA;
  /* Default blue border */
  border-radius: 3px 3px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
  position: relative;
}

.xp-prop .mini-win.winxp-blue {
  border-color: #0055EA;
  background: #ECE9D8;
}

.xp-prop .mini-win.winxp-olive {
  border-color: #94A670;
  background: #F5F5F4;
}

.xp-prop .mini-win.winxp-silver {
  border-color: #70728F;
  background: #E3E3E3;
}

.xp-prop .mini-title {
  height: 20px;
  color: #fff;
  font-weight: bold;
  font-size: 10px;
  display: flex;
  align-items: center;
  padding-left: 4px;
  background: linear-gradient(to bottom, #0058EE 0%, #3593FF 4%, #288EFF 18%, #127DFF 20%, #0369FC 39%, #0262EF 40%, #0057E5 100%);
  text-shadow: 1px 1px #0f306d;
}

.xp-prop .mini-win.winxp-olive .mini-title {
  background: linear-gradient(to bottom, #A6B790 0%, #C8D6B7 10%, #A2B58C 25%, #8FA578 100%);
  text-shadow: none;
}

.xp-prop .mini-win.winxp-silver .mini-title {
  background: linear-gradient(to bottom, #B3B6CC 0%, #E3E4EA 10%, #BFC2D3 25%, #8E92AE 100%);
  text-shadow: none;
  color: #000;
}

.xp-prop .mini-body {
  flex: 1;
  padding: 6px;
  font-family: Tahoma, sans-serif;
  font-size: 10px;
  color: #000;
  position: relative;
}

.xp-prop .mini-text {
  margin-bottom: 4px;
}

.xp-prop .mini-btn {
  border: 1px solid #003c74;
  background: linear-gradient(to bottom, #fff 0%, #ece9d8 100%);
  padding: 2px 8px;
  display: inline-block;
  border-radius: 3px;
  margin-top: 10px;
}

/* Desktop tab split */
.xp-prop .row.scale-fix {
  align-items: flex-start;
}

.xp-prop .col-left {
  flex: 0 0 140px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.xp-prop .col-right {
  flex: 1;
  margin-left: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Unified Monitor Frame (CSS only) */
.xp-prop .monitor-base {
  width: 152px;
  height: 130px;
  background: #d4d0c8;
  /* bezel color */
  border: 1px solid #999;
  border-radius: 10px 10px 0 0;
  position: relative;
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);
  margin: 0 auto 10px auto;
  border-bottom: none;
}

/* Inner bezel */
.xp-prop .monitor-base::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 24px;
  background: #333;
  border-radius: 4px;
  border-bottom: 1px solid #555;
  box-shadow: inset 0 0 2px #000;
}

/* Stand */
.xp-prop .monitor-base::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 20%;
  right: 20%;
  height: 12px;
  background: #d4d0c8;
  border: 1px solid #999;
  border-top: none;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(to right, #ccc, #eee 30%, #eee 70%, #ccc);
}

.xp-prop .monitor-screen {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  bottom: 30px;
  background: #003399;
  overflow: hidden;
  border: 1px solid #000;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.5);
  background-size: 100% 100%;
}

/* Settings Tab Layout Overrides */
.xp-prop .monitor-layout {
  height: 180px;
  background: #eef3ff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  border: 1px solid #fff;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
  padding-bottom: 20px;
}

/* Re-style monitor inside content to fit nicely */
.xp-prop .monitor-layout .monitor-base {
  margin-bottom: 0;
}

.xp-prop .monitor-info {
  margin-top: 10px;
  text-align: center;
  width: 100%;
  font-size: 11px;
}

.xp-prop .settings-controls {
  display: flex;
  gap: 10px;
  height: 120px;
}

.xp-prop .grp-res,
.xp-prop .grp-col {
  flex: 1;
  margin: 0;
  padding: 4px 8px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.xp-prop .grp-res legend,
.xp-prop .grp-col legend {
  margin-left: 4px;
}

.xp-prop .res-slider-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 0;
}

.xp-prop .res-slider-row input[type=range] {
  flex: 1;
}

.xp-prop .res-label {
  text-align: center;
  margin-top: auto;
  padding-bottom: 4px;
}

.xp-prop .row-adv {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

/* Effects Box */
.xp-prop .effects-box {
  border: 1px solid #9aa7d0;
  background: #fff;
  padding: 8px;
  margin-top: 6px;
  position: absolute;
  z-index: 10;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

}

.xp-prop .mini-win.winxp-olive .mini-title {
  background: linear-gradient(to bottom, #A6B790 0%, #C8D6B7 10%, #A2B58C 25%, #8FA578 100%);
  text-shadow: none;
}

.xp-prop .mini-win.winxp-silver .mini-title {
  background: linear-gradient(to bottom, #B3B6CC 0%, #E3E4EA 10%, #BFC2D3 25%, #8E92AE 100%);
  text-shadow: none;
  color: #000;
}

.xp-prop .mini-body {
  flex: 1;
  padding: 6px;
  font-family: Tahoma, sans-serif;
  font-size: 10px;
  color: #000;
  position: relative;
}

.xp-prop .mini-text {
  margin-bottom: 4px;
}

.xp-prop .mini-btn {
  border: 1px solid #003c74;
  background: linear-gradient(to bottom, #fff 0%, #ece9d8 100%);
  padding: 2px 8px;
  display: inline-block;
  border-radius: 3px;
  margin-top: 10px;
}

/* Desktop tab split */
.xp-prop .row.scale-fix {
  align-items: flex-start;
}

.xp-prop .col-left {
  flex: 0 0 140px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.xp-prop .col-right {
  flex: 1;
  margin-left: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Unified Monitor Frame (CSS only) */
.xp-prop .monitor-base {
  width: 152px;
  height: 130px;
  background: #d4d0c8;
  /* bezel color */
  border: 1px solid #999;
  border-radius: 10px 10px 0 0;
  position: relative;
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);
  margin: 0 auto 10px auto;
  border-bottom: none;
}

/* Inner bezel */
.xp-prop .monitor-base::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 24px;
  background: #333;
  border-radius: 4px;
  border-bottom: 1px solid #555;
  box-shadow: inset 0 0 2px #000;
}

/* Stand */
.xp-prop .monitor-base::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 20%;
  right: 20%;
  height: 12px;
  background: #d4d0c8;
  border: 1px solid #999;
  border-top: none;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(to right, #ccc, #eee 30%, #eee 70%, #ccc);
}

.xp-prop .monitor-screen {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  bottom: 30px;
  background: #003399;
  overflow: hidden;
  border: 1px solid #000;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.5);
  background-size: 100% 100%;
}

/* Settings Tab Layout Overrides */
.xp-prop .monitor-layout {
  height: 180px;
  background: #eef3ff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  border: 1px solid #fff;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
  padding-bottom: 20px;
}

/* Re-style monitor inside content to fit nicely */
.xp-prop .monitor-layout .monitor-base {
  margin-bottom: 0;
}

.xp-prop .monitor-info {
  margin-top: 10px;
  text-align: center;
  width: 100%;
  font-size: 11px;
}

.xp-prop .settings-controls {
  display: flex;
  gap: 10px;
  height: 120px;
}

.xp-prop .grp-res,
.xp-prop .grp-col {
  flex: 1;
  margin: 0;
  padding: 4px 8px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.xp-prop .grp-res legend,
.xp-prop .grp-col legend {
  margin-left: 4px;
}

.xp-prop .res-slider-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 0;
}

.xp-prop .res-slider-row input[type=range] {
  flex: 1;
}

.xp-prop .res-label {
  text-align: center;
  margin-top: auto;
  padding-bottom: 4px;
}

.xp-prop .row-adv {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

/* Effects Box */
.xp-prop .effects-box {
  border: 1px solid #9aa7d0;
  background: #fff;
  padding: 8px;
  margin-top: 6px;
  position: absolute;
  z-index: 10;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

.xp-prop .effects-box.hidden {
  display: none;
}

/* Styling for context-menu in XP skin */
.ag-skin-xp-olive .context-menu,
.ag-skin-xp-blue .context-menu,
.ag-skin-xp-silver .context-menu {
  position: fixed;
  z-index: 99990;
  background: #f7f7ff;
  color: #000;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, .35);
  font: 12px Tahoma, Arial, sans-serif;
  border-radius: 0;
}

.ag-skin-xp-olive .context-menu { border: 1px solid #92a85a; }
.ag-skin-xp-blue .context-menu { border: 1px solid #003c74; }
.ag-skin-xp-silver .context-menu { border: 1px solid #828292; }

.ag-skin-xp-olive .context-menu .cm-list,
.ag-skin-xp-blue .context-menu .cm-list,
.ag-skin-xp-silver .context-menu .cm-list {
  padding: 2px 0;
}

.ag-skin-xp-olive .context-menu .cm-item,
.ag-skin-xp-blue .context-menu .cm-item,
.ag-skin-xp-silver .context-menu .cm-item {
  padding: 1px 10px;
  margin: 0 1px;
  font: 11px Tahoma, Arial, sans-serif;
  color: #000;
  cursor: default;
  border: 1px solid transparent;
}

.ag-skin-xp-olive .context-menu .cm-item:hover,
.ag-skin-xp-blue .context-menu .cm-item:hover,
.ag-skin-xp-silver .context-menu .cm-item:hover {
  background: #cfe3ff;
  color: #000;
}
.ag-skin-xp-olive .context-menu .cm-item:hover { border-color: #92a85a; }
.ag-skin-xp-blue .context-menu .cm-item:hover { border-color: #003c74; }
.ag-skin-xp-silver .context-menu .cm-item:hover { border-color: #828292; }

.ag-skin-xp-olive .context-menu .cm-sep,
.ag-skin-xp-blue .context-menu .cm-sep,
.ag-skin-xp-silver .context-menu .cm-sep {
  height: 1px;
  background: #c0c0c0;
  margin: 3px 2px;
}

.ag-skin-xp-olive .context-menu .cm-item.disabled,
.ag-skin-xp-blue .context-menu .cm-item.disabled,
.ag-skin-xp-silver .context-menu .cm-item.disabled {
  color: #808080;
  background: none;
  pointer-events: none;
  border-color: transparent;
}

/* Adaptive Dialog Overrides */
.ag-skin-xp-blue .window.dialog .content,
.ag-skin-xp-olive .window.dialog .content,
.ag-skin-xp-silver .window.dialog .content {
  background: #ece9d8 !important;
}

.ag-skin-xp-blue .sys-btn,
.ag-skin-xp-olive .sys-btn,
.ag-skin-xp-silver .sys-btn {
  height: 23px;
  min-width: 75px;
  padding: 0 10px;
  background: linear-gradient(180deg, #f2f2f2 0%, #ebebeb 45%, #dddddd 50%, #cfcfcf 100%);
  color: #000;
  border: 1px solid #707070;
  border-radius: 3px;
  box-shadow: inset 0 0 1px #fff;
  cursor: pointer;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
}
.ag-skin-xp-blue .sys-btn:active,
.ag-skin-xp-olive .sys-btn:active,
.ag-skin-xp-silver .sys-btn:active {
  background: linear-gradient(180deg, #e4e4e4 0%, #d8d8d8 45%, #c8c8c8 50%, #b8b8b8 100%);
  box-shadow: inset 1px 1px 2px rgba(0,0,0,0.2);
}

.ag-skin-xp-blue .sys-input,
.ag-skin-xp-olive .sys-input,
.ag-skin-xp-silver .sys-input {
  border: 1px solid #7f9db9;
  padding: 3px 4px;
  background: #fff;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
}
