/* XFce Desktop Preview
   Defaults from: xfce4-panel migrate/default.xml.in, xfdesktop, garcon xfce-applications.menu
   Panel: dual (top 26px full + bottom 48px dock), dark-mode=true
   Theme / icons / wallpaper: Adwaita Dark + Adwaita icons + xfce-light
*/

:root {
  --panel-top-h: 26px;
  --panel-dock-h: 48px;

  /* Adwaita Dark (GTK) */
  --theme-bg: #242424;
  --theme-base: #1e1e1e;
  --theme-fg: #eeeeec;
  --theme-fg-dim: #9a9a9a;
  --theme-selected-bg: #3584e4;
  --theme-selected-fg: #ffffff;
  --theme-border: #3d3d3d;
  --theme-border-dark: #1a1a1a;
  --menu-bg: #2d2d2d;
  --menu-hover-bg: #3584e4;
  --menu-hover-fg: #ffffff;
  --entry-bg: #1e1e1e;
  --sidebar-bg: #2a2a2a;
  --button-bg: #363636;
  --button-hover: #424242;
  --button-border: #1a1a1a;
  --headerbar: #303030;

  /* xfwm4 / Adwaita-style chrome */
  --title-bg: #303030;
  --title-text: #eeeeec;
  --title-inactive: #888888;
  --frame-border: #1a1a1a;

  /* Panels (dark-mode) */
  --panel-bg: #1c1c1c;
  --panel-fg: #eeeeec;
  --panel-hover: rgba(255, 255, 255, 0.1);
  --panel-active: rgba(53, 132, 228, 0.35);
  --panel-border: #0a0a0a;
  --dock-bg: rgba(28, 28, 28, 0.92);
  --dock-border: rgba(255, 255, 255, 0.08);

  --font: "Noto Sans", "Cantarell", "DejaVu Sans", "Sans", system-ui, sans-serif;
  --wallpaper: url("assets/wallpapers/xfce-light.png");
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
  --transition-fast: 80ms ease;
  --accent: #3584e4;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  font-size: 11px;
  color: var(--theme-fg);
  background: #0d2a3a;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

button:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 1px;
}

img {
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

[hidden] {
  display: none !important;
}

/* ---------- Desktop shell ---------- */

.desktop {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.wallpaper {
  position: absolute;
  inset: 0;
  background: #0d3a4a var(--wallpaper) center / cover no-repeat;
  z-index: 0;
}

/* ---------- Desktop icons ---------- */

.desktop-icons {
  position: absolute;
  top: calc(var(--panel-top-h) + 12px);
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 5;
  max-height: calc(100vh - var(--panel-top-h) - var(--panel-dock-h) - 40px);
}

.desk-icon {
  width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  border-radius: 4px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.desk-icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.desk-icon span {
  font-size: 11px;
  text-align: center;
  line-height: 1.2;
  max-width: 76px;
  word-break: break-word;
}

.desk-icon:hover {
  background: rgba(255, 255, 255, 0.12);
}

.desk-icon.selected {
  background: rgba(53, 132, 228, 0.45);
  outline: 1px solid rgba(53, 132, 228, 0.8);
}

/* ---------- Top panel ---------- */

.panel-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--panel-top-h);
  background: linear-gradient(180deg, #2a2a2a 0%, var(--panel-bg) 100%);
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  z-index: 100;
  color: var(--panel-fg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.panel-left,
.panel-right {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 100%;
  min-width: 0;
}

.panel-left {
  flex: 1;
  overflow: hidden;
}

.panel-apps-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px 0 4px;
  border-radius: 3px;
  white-space: nowrap;
  font-weight: 500;
}

.panel-apps-btn img {
  width: 16px;
  height: 16px;
}

.panel-apps-btn:hover,
.panel-apps-btn[aria-expanded="true"] {
  background: var(--panel-hover);
}

.taskbar {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  margin-left: 4px;
  height: 100%;
}

.task-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  max-width: 180px;
  min-width: 80px;
  padding: 0 8px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid transparent;
  overflow: hidden;
  flex-shrink: 1;
}

.task-btn img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.task-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.task-btn:hover {
  background: var(--panel-hover);
}

.task-btn.active {
  background: var(--panel-active);
  border-color: rgba(53, 132, 228, 0.4);
}

.task-btn.minimized {
  opacity: 0.7;
}

.workspace-switcher {
  display: flex;
  gap: 2px;
  padding: 0 2px;
}

.ws-btn {
  width: 16px;
  height: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 1px;
  background: rgba(0, 0, 0, 0.35);
}

.ws-btn.active {
  background: var(--accent);
  border-color: #5a9de8;
}

.ws-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.15);
}

.panel-sep {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 3px;
}

.panel-tray {
  display: flex;
  align-items: center;
  gap: 1px;
}

.panel-applet {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 22px;
  min-width: 22px;
  padding: 0 4px;
  border-radius: 3px;
}

.panel-applet img {
  width: 16px;
  height: 16px;
  /* Lighten symbolic icons on dark panel */
  filter: brightness(0) invert(0.9);
}

.panel-applet:hover,
.panel-applet[aria-expanded="true"] {
  background: var(--panel-hover);
}

.battery-pct {
  font-size: 10px;
  opacity: 0.9;
}

.panel-clock {
  height: 22px;
  padding: 0 8px;
  border-radius: 3px;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  white-space: nowrap;
}

.panel-clock:hover,
.panel-clock[aria-expanded="true"] {
  background: var(--panel-hover);
}

.panel-actions-btn img {
  filter: none;
  width: 16px;
  height: 16px;
}

/* ---------- Bottom dock panel ---------- */

.panel-bottom {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  height: var(--panel-dock-h);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
  background: var(--dock-bg);
  border: 1px solid var(--dock-border);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  z-index: 100;
  backdrop-filter: blur(12px);
}

.dock-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.dock-btn img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.dock-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.dock-btn:active {
  transform: scale(0.94);
}

.dock-sep {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 2px;
}

/* ---------- Menus ---------- */

.app-menu {
  position: absolute;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.5));
}

.menu-panel {
  position: relative;
  min-width: 220px;
  max-width: 280px;
  background: var(--menu-bg);
  border: 1px solid var(--theme-border);
  border-radius: 6px;
  padding: 4px 0;
  color: var(--theme-fg);
}

.menu-panel.submenu {
  position: absolute;
  min-width: 200px;
  margin-left: 0;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 5px 12px 5px 10px;
  text-align: left;
  white-space: nowrap;
  border-radius: 0;
}

.menu-item:hover,
.menu-item.open {
  background: var(--menu-hover-bg);
  color: var(--menu-hover-fg);
}

.menu-item:hover .menu-ico,
.menu-item.open .menu-ico {
  /* keep icons readable on blue hover */
  filter: none;
}

.menu-ico {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Symbolic SVG icons need invert on dark; leave full-color PNGs alone */
.menu-ico[src$=".svg"] {
  filter: brightness(0) invert(0.85);
}

.menu-item:hover .menu-ico[src$=".svg"],
.menu-item.open .menu-ico[src$=".svg"] {
  filter: brightness(0) invert(1);
}

.menu-arrow {
  margin-left: auto;
  opacity: 0.7;
  font-size: 10px;
  padding-left: 16px;
}

.menu-sep {
  height: 1px;
  background: var(--theme-border);
  margin: 4px 8px;
}

/* ---------- GTK-ish controls ---------- */

.gtk-entry {
  background: var(--entry-bg);
  border: 1px solid var(--theme-border);
  border-radius: 6px;
  color: var(--theme-fg);
  padding: 6px 10px;
  font: inherit;
  outline: none;
}

.gtk-entry:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.gtk-btn {
  background: var(--button-bg);
  border: 1px solid var(--button-border);
  border-radius: 6px;
  color: var(--theme-fg);
  padding: 6px 14px;
  min-width: 72px;
}

.gtk-btn:hover {
  background: var(--button-hover);
}

.gtk-btn-default {
  background: var(--accent);
  border-color: #1c6fd1;
  color: #fff;
}

.gtk-btn-default:hover {
  background: #4a94e8;
}

/* ---------- xfwm window chrome ---------- */

.xfwm-window {
  position: absolute;
  display: flex;
  flex-direction: column;
  background: var(--theme-bg);
  border: 1px solid var(--frame-border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 24;
  color: var(--theme-fg);
}

.xfwm-window.minimized {
  visibility: hidden;
  pointer-events: none;
}

.xfwm-window.maximized {
  top: var(--panel-top-h) !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-bottom: none;
}

.xfwm-window.dragging {
  opacity: 0.95;
  user-select: none;
}

.xfwm-titlebar {
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 6px 0 4px;
  background: var(--title-bg);
  border-bottom: 1px solid var(--theme-border-dark);
  cursor: default;
  flex-shrink: 0;
  user-select: none;
}

.xfwm-menu-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  margin-right: 4px;
}

.xfwm-menu-btn img {
  width: 16px;
  height: 16px;
}

.xfwm-menu-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.xfwm-title {
  flex: 1;
  text-align: center;
  font-weight: 600;
  font-size: 11px;
  color: var(--title-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 8px;
}

.xfwm-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.xfwm-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: #4a4a4a;
  border: 1px solid #2a2a2a;
}

.xfwm-btn:hover {
  filter: brightness(1.15);
}

.xfwm-btn::after {
  font-size: 9px;
  line-height: 1;
  color: #ddd;
  font-weight: 700;
}

.xfwm-shade::after {
  content: "⌃";
  font-size: 10px;
  transform: translateY(1px);
}

.xfwm-min::after {
  content: "";
  width: 8px;
  height: 1.5px;
  background: #ddd;
  border-radius: 1px;
}

.xfwm-max::after {
  content: "";
  width: 7px;
  height: 7px;
  border: 1.5px solid #ddd;
  border-radius: 1px;
}

.xfwm-close {
  background: #c44;
  border-color: #922;
}

.xfwm-close::after {
  content: "×";
  font-size: 13px;
  color: #fff;
  font-weight: 600;
}

.xfwm-close:hover {
  background: #e05555;
}

/* ---------- Thunar ---------- */

.thunar-window {
  top: 80px;
  left: 120px;
  width: 860px;
  height: 520px;
  min-width: 480px;
  min-height: 300px;
}

.thunar-menubar {
  display: flex;
  align-items: center;
  height: 24px;
  padding: 0 4px;
  background: var(--headerbar);
  border-bottom: 1px solid var(--theme-border-dark);
  flex-shrink: 0;
}

.thunar-menubar-item {
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
}

.thunar-menubar-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.thunar-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  background: var(--theme-bg);
  border-bottom: 1px solid var(--theme-border);
  flex-shrink: 0;
}

.thunar-tb-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
}

.thunar-tb-btn img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(0.85);
}

.thunar-tb-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
}

.thunar-tb-btn.active {
  background: rgba(53, 132, 228, 0.3);
}

.thunar-tb-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.thunar-tb-sep {
  width: 1px;
  height: 18px;
  background: var(--theme-border);
  margin: 0 4px;
}

.thunar-location {
  flex: 1;
  min-width: 0;
  height: 28px;
  display: flex;
  align-items: center;
  background: var(--entry-bg);
  border: 1px solid var(--theme-border);
  border-radius: 6px;
  padding: 0 6px;
  margin: 0 4px;
  overflow: hidden;
}

.thunar-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow: hidden;
  white-space: nowrap;
  min-width: 0;
}

.thunar-crumb {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  max-width: 140px;
}

.thunar-crumb img {
  width: 14px;
  height: 14px;
}

.thunar-crumb span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.thunar-crumb:hover {
  background: rgba(255, 255, 255, 0.08);
}

.thunar-crumb.active {
  font-weight: 600;
}

.thunar-crumb-sep {
  opacity: 0.4;
  font-size: 10px;
  padding: 0 1px;
}

.thunar-body {
  display: flex;
  flex: 1;
  min-height: 0;
  background: var(--theme-bg);
}

.thunar-sidebar {
  width: 180px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--theme-border);
  overflow-y: auto;
  padding: 6px 0;
}

.thunar-side-heading {
  padding: 8px 12px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--theme-fg-dim);
}

.thunar-side-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 5px 12px;
  text-align: left;
  border-radius: 0;
}

.thunar-side-item img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.thunar-side-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.thunar-side-item.active {
  background: var(--theme-selected-bg);
  color: var(--theme-selected-fg);
}

.thunar-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.thunar-content {
  flex: 1;
  overflow: auto;
  padding: 4px;
  background: var(--theme-base);
}

/* Icon view */
.thunar-content.view-icons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 4px;
  align-content: start;
  padding: 10px;
}

.thunar-content.view-icons .thunar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 6px;
  text-align: center;
  min-height: 88px;
}

.thunar-content.view-icons .thunar-item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.thunar-content.view-icons .thunar-item span {
  font-size: 11px;
  line-height: 1.25;
  word-break: break-word;
  max-width: 84px;
}

.thunar-content.view-icons .thunar-item .thunar-meta {
  display: none;
}

/* List / details view */
.thunar-content.view-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

.thunar-list-header {
  display: grid;
  grid-template-columns: 1fr 90px 100px 110px;
  gap: 8px;
  padding: 4px 10px;
  background: var(--headerbar);
  border-bottom: 1px solid var(--theme-border);
  font-weight: 600;
  font-size: 11px;
  color: var(--theme-fg-dim);
  position: sticky;
  top: 0;
  z-index: 1;
}

.thunar-content.view-list .thunar-item {
  display: grid;
  grid-template-columns: 1fr 90px 100px 110px;
  gap: 8px;
  align-items: center;
  padding: 4px 10px;
  border-radius: 0;
  text-align: left;
  border-bottom: 1px solid transparent;
}

.thunar-content.view-list .thunar-item:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.thunar-content.view-list .thunar-item .thunar-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.thunar-content.view-list .thunar-item img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
}

.thunar-content.view-list .thunar-item .thunar-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thunar-content.view-list .thunar-meta {
  font-size: 11px;
  color: var(--theme-fg-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thunar-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}

.thunar-item.selected {
  background: var(--theme-selected-bg) !important;
  color: var(--theme-selected-fg);
}

.thunar-item.selected .thunar-meta {
  color: rgba(255, 255, 255, 0.85);
}

.thunar-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 22px;
  padding: 0 10px;
  background: var(--headerbar);
  border-top: 1px solid var(--theme-border);
  font-size: 11px;
  color: var(--theme-fg-dim);
  flex-shrink: 0;
}

/* ---------- Terminal ---------- */

.term-window {
  top: 160px;
  left: 280px;
  width: 640px;
  height: 380px;
}

.term-menubar {
  display: flex;
  align-items: center;
  height: 24px;
  padding: 0 4px;
  background: var(--headerbar);
  border-bottom: 1px solid var(--theme-border-dark);
  flex-shrink: 0;
}

.term-body {
  flex: 1;
  background: #000;
  overflow: auto;
  padding: 6px 10px;
  min-height: 0;
}

.term-output {
  margin: 0;
  font-family: "DejaVu Sans Mono", "Noto Sans Mono", "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.4;
  color: #33ff33;
  white-space: pre-wrap;
}

.term-cursor {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ---------- Application Finder ---------- */

.appfinder-window {
  top: 100px;
  left: 200px;
  width: 560px;
  height: 420px;
}

.appfinder-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.appfinder-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--theme-border);
}

.appfinder-search-ico {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(0.7);
  flex-shrink: 0;
}

.appfinder-search {
  flex: 1;
}

.appfinder-main {
  display: flex;
  flex: 1;
  min-height: 0;
}

.appfinder-cats {
  width: 160px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--theme-border);
  overflow-y: auto;
  padding: 4px 0;
}

.appfinder-cat {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 12px;
  font-size: 11px;
}

.appfinder-cat:hover {
  background: rgba(255, 255, 255, 0.06);
}

.appfinder-cat.active {
  background: var(--theme-selected-bg);
  color: var(--theme-selected-fg);
}

.appfinder-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
  background: var(--theme-base);
}

.appfinder-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 12px;
  text-align: left;
}

.appfinder-item img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.appfinder-item .af-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.appfinder-item .af-name {
  font-weight: 500;
}

.appfinder-item .af-comment {
  font-size: 10px;
  color: var(--theme-fg-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appfinder-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.appfinder-item.selected {
  background: var(--theme-selected-bg);
  color: var(--theme-selected-fg);
}

.appfinder-item.selected .af-comment {
  color: rgba(255, 255, 255, 0.8);
}

.appfinder-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--theme-border);
  background: var(--headerbar);
}

/* ---------- Dialogs ---------- */

.dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
}

.run-window {
  width: 420px;
  position: relative;
}

.run-body {
  padding: 14px 16px 16px;
  background: var(--theme-bg);
}

.run-prompt {
  margin: 0 0 12px;
  line-height: 1.4;
  color: var(--theme-fg);
}

.run-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.run-icon {
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(0.85);
}

.run-input {
  flex: 1;
}

.run-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 11px;
}

.run-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.logout-window {
  width: 480px;
  position: relative;
}

.logout-body {
  padding: 16px;
  background: var(--theme-bg);
}

.logout-msg {
  margin: 0 0 16px;
  text-align: center;
  font-size: 12px;
}

.logout-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.logout-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  border-radius: 8px;
  background: var(--button-bg);
  border: 1px solid var(--button-border);
}

.logout-action img {
  width: 32px;
  height: 32px;
}

.logout-action:hover {
  background: var(--button-hover);
  border-color: var(--accent);
}

.logout-footer {
  display: flex;
  justify-content: center;
}

.about-window {
  width: 360px;
  position: relative;
}

.about-body {
  padding: 20px;
  text-align: center;
  background: var(--theme-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.about-logo {
  width: 64px;
  height: 64px;
  margin-bottom: 4px;
}

.about-body h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.about-ver {
  margin: 0;
  color: var(--theme-fg-dim);
  font-size: 12px;
}

.about-desc {
  margin: 8px 0;
  line-height: 1.4;
  max-width: 280px;
}

.about-link {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 11px;
}

/* ---------- Clock / volume popovers ---------- */

.clock-popover {
  position: absolute;
  z-index: 220;
  width: 260px;
  background: var(--menu-bg);
  border: 1px solid var(--theme-border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 12px;
  color: var(--theme-fg);
}

.cal-header {
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 10px;
  text-align: center;
}

.cal-month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cal-nav-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 16px;
}

.cal-nav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.cal-month-label {
  font-weight: 600;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 10px;
  color: var(--theme-fg-dim);
  margin-bottom: 4px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 11px;
}

.cal-day.other {
  opacity: 0.35;
}

.cal-day.today {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.volume-popup {
  position: absolute;
  z-index: 220;
  width: 240px;
  background: var(--menu-bg);
  border: 1px solid var(--theme-border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 12px 14px;
}

.volume-popup-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.volume-popup-row img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(0.9);
  flex-shrink: 0;
}

.volume-popup-row input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
}

#volume-label {
  min-width: 36px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------- Toast ---------- */

.toast {
  position: absolute;
  bottom: calc(var(--panel-dock-h) + 24px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 30, 30, 0.95);
  color: #fff;
  border: 1px solid var(--theme-border);
  border-radius: 8px;
  padding: 8px 16px;
  z-index: 400;
  box-shadow: var(--shadow);
  font-size: 12px;
  max-width: 80vw;
  text-align: center;
}
