/* ---------- Shell: wallpaper, top bar, dock, windows, overview, grid, lock, boot ---------- */

/* wallpaper */
#desktop-area { position: absolute; inset: 32px 0 0 0; }
#wallpaper-layer { position: absolute; inset: 0; transition: background .5s; overflow: hidden; }
.wp-motif { position: absolute; inset: 0; }
#workspaces-layer { position: absolute; inset: 0; }

/* ===== top bar ===== */
#topbar {
  position: absolute; top: 0; left: 0; right: 0; height: 32px;
  background: var(--topbar-bg);
  backdrop-filter: blur(14px);
  color: var(--shell-fg);
  display: flex; align-items: stretch;
  z-index: 9000;
  font-size: calc(13.5px * var(--font-scale));
  box-shadow: 0 1px 0 rgba(0,0,0,.35);
}
.tb-item {
  background: none; border: none; color: var(--shell-fg);
  font: inherit; font-weight: 500; padding: 0 12px;
  display: flex; align-items: center;
}
.tb-item:hover { background: rgba(255,255,255,.11); }
.tb-activities { letter-spacing: .1px; }
.tb-appname { font-weight: 700; visibility: hidden; }
.tb-clock {
  position: absolute; left: 50%; transform: translateX(-50%);
  background: none; border: none; color: var(--shell-fg);
  font: inherit; padding: 0 12px; height: 100%;
  font-weight: 500; white-space: pre;
  border-radius: 0 0 6px 6px;
}
.tb-clock:hover, .tb-clock.open { background: rgba(255,255,255,.11); }
.tb-status {
  margin-left: auto;
  background: none; border: none; color: var(--shell-fg);
  display: flex; align-items: center; gap: 3px; padding: 0 10px 0 6px;
}
.tb-status:hover, .tb-status.open { background: rgba(255,255,255,.11); }
.status-ic { display: inline-flex; align-items: center; padding: 0 3px; }
.status-ic svg { width: 15px; height: 15px; }
.status-bat { gap: 3px; }
.bat-pct { font-size: calc(11.5px * var(--font-scale)); opacity: .9; margin-left: 2px; }

/* ===== panels (system menu / calendar) ===== */
#overlay-layer { position: absolute; inset: 0; pointer-events: none; z-index: 9500; }
#overlay-layer > * { pointer-events: auto; }
.os-panel {
  position: absolute;
  background: var(--menu-bg);
  color: var(--menu-fg);
  border-radius: 14px;
  box-shadow: var(--shadow-menu);
  border: 1px solid rgba(255,255,255,.07);
  z-index: 9600;
}
.panel-in { animation: popIn .16s ease-out; }
.panel-out { opacity: 0; transform: scale(.97); transition: opacity .13s, transform .13s; }

/* system menu */
.sysmenu-pop { width: 320px; }
.sysmenu { padding: 10px; }
.sysmenu-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px; border-radius: 9px;
}
.sysmenu-expando { flex-direction: column; align-items: stretch; gap: 0; padding: 2px; }
.sysmenu-expando > .sysmenu-row { width: 100%; box-sizing: border-box; }
.sysmenu-row:hover { background: rgba(255,255,255,.08); }
.sysmenu-ic { display: inline-flex; opacity: .95; }
.sysmenu-ic svg { width: 17px; height: 17px; }
.sysmenu-ic.small svg { width: 14px; height: 14px; }
.sysmenu-label { flex: 1; font-size: calc(13.5px * var(--font-scale)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sysmenu-sep { height: 1px; background: rgba(255,255,255,.12); margin: 6px 4px; }
.sysmenu-volume input[type="range"] { flex: 1; }
.sysmenu-sub { margin: 0 6px 4px 40px; }
.sysmenu-sub-note { font-size: calc(12px * var(--font-scale)); opacity: .6; padding: 4px 0; }
.sysmenu-net {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px; border-radius: 7px; font-size: calc(13px * var(--font-scale));
}
.sysmenu-net:hover { background: rgba(255,255,255,.08); }
.sysmenu-net.connected { color: #7ee2a8; }
.sysmenu-net-name { flex: 1; }
.sysmenu-net.connecting { opacity: .6; }
.sysmenu-check { display: inline-flex; }
.sysmenu-check svg { width: 14px; height: 14px; }
.sysmenu-actions {
  display: flex; gap: 6px; margin-top: 4px;
}
.sysmenu-actions .sysmenu-row {
  flex-direction: column; gap: 5px; flex: 1;
  padding: 10px 4px; text-align: center;
  background: rgba(255,255,255,.06); border-radius: 10px;
}
.sysmenu-actions .sysmenu-row:hover { background: rgba(255,255,255,.13); }
.sysmenu-actions .sysmenu-label { font-size: calc(11px * var(--font-scale)); white-space: normal; }

/* calendar popover */
.calendar-pop { width: 640px; }
.calendar-panel { display: flex; max-height: 480px; }
.cal-notifs { width: 330px; padding: 12px; display: flex; flex-direction: column; border-right: 1px solid rgba(255,255,255,.1); }
.cal-divider { width: 0; }
.cal-dnd { display: flex; align-items: center; gap: 10px; padding: 6px 4px 10px; font-size: calc(13.5px * var(--font-scale)); }
.cal-dnd .switch { margin-left: auto; }
.cal-notif-list { flex: 1; overflow-y: auto; min-height: 180px; max-height: 330px; }
.cal-empty { text-align: center; padding: 40px 0 30px; opacity: .55; }
.cal-empty-ic svg { width: 40px; height: 40px; opacity: .6; }
.cal-notif {
  display: flex; gap: 10px; padding: 10px;
  background: rgba(255,255,255,.07); border-radius: 10px; margin-bottom: 8px;
}
.cal-notif-ic svg { width: 24px; height: 24px; }
.cal-notif-body { flex: 1; min-width: 0; }
.cal-notif-title { font-weight: 700; font-size: calc(13px * var(--font-scale)); }
.cal-notif-text { font-size: calc(12.5px * var(--font-scale)); opacity: .85; margin-top: 2px; overflow-wrap: break-word; }
.cal-notif-time { font-size: calc(11px * var(--font-scale)); opacity: .55; margin-top: 4px; }
.cal-clear { margin: 4px auto 0; color: var(--menu-fg); }
.cal-calendar { flex: 1; padding: 14px 16px; }
.cal-head { display: flex; align-items: center; margin-bottom: 8px; }
.cal-title { flex: 1; text-align: center; font-weight: 700; font-size: calc(14px * var(--font-scale)); }
.cal-nav { color: var(--menu-fg); padding: 4px 8px; }
.cal-nav svg { width: 14px; height: 14px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { text-align: center; font-size: calc(11px * var(--font-scale)); opacity: .6; padding: 3px 0 6px; font-weight: 700; }
.cal-day {
  text-align: center; padding: 5.5px 0; font-size: calc(13px * var(--font-scale));
  border-radius: 7px;
}
.cal-day:hover { background: rgba(255,255,255,.1); }
.cal-other { opacity: .35; }
.cal-today { background: var(--accent); color: var(--accent-contrast); font-weight: 700; }
.cal-today:hover { background: var(--accent); filter: brightness(1.1); }
.cal-today-label { margin-top: 12px; text-align: center; font-size: calc(12.5px * var(--font-scale)); opacity: .7; }

/* ===== notifications ===== */
.notif-host {
  position: absolute; top: 36px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 9900; pointer-events: none;
}
.notif-banner {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--menu-bg); color: var(--menu-fg);
  min-width: 380px; max-width: 480px;
  padding: 12px 14px; border-radius: 13px;
  box-shadow: var(--shadow-menu);
  border: 1px solid rgba(255,255,255,.08);
}
.notif-in { animation: slideDown .3s cubic-bezier(.2,.9,.3,1.1); }
.notif-out { opacity: 0; transform: translateY(-10px) scale(.97); transition: opacity .25s, transform .25s; }
.notif-ic svg { width: 30px; height: 30px; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-weight: 700; font-size: calc(13.5px * var(--font-scale)); }
.notif-text { font-size: calc(13px * var(--font-scale)); opacity: .88; margin-top: 2px; overflow-wrap: break-word; }
.notif-close {
  background: none; border: none; color: inherit; opacity: .6;
  padding: 4px; border-radius: 50%;
}
.notif-close:hover { opacity: 1; background: rgba(255,255,255,.12); }
.notif-close svg { width: 13px; height: 13px; }
.notif-clickable { cursor: default; }

/* ===== dock ===== */
#dock {
  position: absolute; left: 0; top: 0; bottom: 0; width: 52px;
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 0; gap: 2px;
  z-index: 8000;
}
.dock-icon {
  position: relative;
  width: 48px; height: 48px;
  background: none; border: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  transition: transform .12s;
}
.dock-icon:hover { background: rgba(0,0,0,.18); }
.dock-icon:active { transform: scale(.92); }
.dock-icon svg { width: 38px; height: 38px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.dock-launching { animation: bounceDock .65s ease; }
.dock-dots {
  position: absolute; left: -4px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 3px;
}
.dock-dots i {
  display: block; width: 5px; height: 5px; border-radius: 50%;
  background: #fff; opacity: .9;
}
.dock-active .dock-dots i { background: var(--accent); }
.dock-showapps { margin-top: auto; }
.showapps-grid { display: flex; background: rgba(120,110,100,.35); border-radius: 9px; padding: 9px; }
.showapps-grid svg { width: 20px; height: 20px; filter: none; opacity: .95; }
.dock-showapps:hover .showapps-grid { background: rgba(120,110,100,.55); }
.dock-icon[data-app="trash"] { margin-top: auto; }
.dock-icon[data-app="trash"] ~ .dock-showapps { margin-top: 0; }

/* tooltips */
.os-tooltip {
  position: absolute;
  background: var(--tooltip-bg); color: #f5f5f5;
  font-size: calc(12.5px * var(--font-scale));
  padding: 5px 10px; border-radius: 7px;
  z-index: 9990; pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
  animation: fadeIn .15s;
  white-space: nowrap;
}

/* ===== context menus ===== */
.os-menu {
  position: absolute;
  min-width: 190px;
  background: var(--menu-bg); color: var(--menu-fg);
  border-radius: 11px; padding: 6px;
  box-shadow: var(--shadow-menu);
  border: 1px solid rgba(255,255,255,.08);
  z-index: 9995;
  font-size: calc(13.5px * var(--font-scale));
}
.menu-in { animation: popIn .13s ease-out; }
.menu-item {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 10px 7px 6px; border-radius: 7px;
}
.menu-item:hover { background: rgba(255,255,255,.1); }
.menu-item.disabled { opacity: .45; }
.menu-item.danger:hover { background: rgba(218,52,80,.35); }
.menu-check { width: 16px; display: inline-flex; }
.menu-check svg { width: 13px; height: 13px; }
.menu-icon { width: 16px; display: inline-flex; opacity: .85; }
.menu-icon svg { width: 15px; height: 15px; }
.menu-label { flex: 1; white-space: nowrap; }
.menu-shortcut { opacity: .5; font-size: calc(11.5px * var(--font-scale)); margin-left: 18px; }
.menu-sep { height: 1px; background: rgba(255,255,255,.12); margin: 5px 8px; }

/* ===== windows ===== */
.window {
  position: absolute;
  background: var(--window-bg); color: var(--window-fg);
  border-radius: var(--window-radius);
  box-shadow: 0 14px 44px rgba(0,0,0,.42), 0 2px 10px rgba(0,0,0,.3), 0 0 0 1px rgba(0,0,0,.22);
  display: flex; flex-direction: column;
  overflow: visible;
  transition: opacity .12s;
  z-index: 10;
}
.window.focused {
  box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 3px 14px rgba(0,0,0,.32), 0 0 0 1px rgba(0,0,0,.26);
}
.window:not(.focused) { filter: saturate(.92); }
.window:not(.focused) .window-content { opacity: .985; }
.window-opening { animation: winOpen .22s cubic-bezier(.25,.9,.3,1); }
.window-closing { animation: winClose .17s ease-in forwards; }
.window-minimizing { animation: winMin .18s ease-in forwards; }
.window-restoring { animation: winRestore .18s ease-out; }
@keyframes winOpen {
  from { opacity: 0; transform: scale(.93) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes winClose {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(.93) translateY(8px); }
}
@keyframes winMin {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(.82) translateY(60px); }
}
@keyframes winRestore {
  from { opacity: .4; transform: scale(.92); }
  to { opacity: 1; transform: scale(1); }
}
.wm-dragging { cursor: grabbing; }
.wm-dragging .window { transition: none; }

.titlebar {
  height: 42px; flex: none;
  display: flex; align-items: center;
  border-radius: var(--window-radius) var(--window-radius) 0 0;
  background: var(--headerbar-bg);
  color: var(--headerbar-fg);
  padding: 0 10px;
  position: relative;
  z-index: 5;
  box-shadow: 0 1px 0 rgba(0,0,0,.18);
}
.window:not(.focused) .titlebar {
  background: var(--headerbar-inactive-bg);
  color: var(--headerbar-inactive-fg);
}
.window.maximized .titlebar, .window.tiled .titlebar { border-radius: 0; }
.window.maximized, .window.tiled { border-radius: 0; }
.titlebar-title {
  position: absolute; left: 0; right: 90px; text-align: center;
  font-weight: 700; font-size: calc(14px * var(--font-scale));
  pointer-events: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding-left: 90px;
}
.titlebar-buttons {
  margin-left: auto;
  display: flex; gap: 8px; align-items: center;
}
.tb-btn {
  width: 24px; height: 24px; border-radius: 50%;
  border: none; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(to bottom, #5b5854, #4a4744);
  color: #e8e4e0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 1px 2px rgba(0,0,0,.3);
  transition: filter .1s;
}
.tb-btn svg { width: 13px; height: 13px; }
.tb-btn:hover { filter: brightness(1.25); }
.tb-btn:active { filter: brightness(.85); }
.tb-close { background: linear-gradient(to bottom, #f7744a, #E95420); color: #fff; }
.tb-close:hover { filter: brightness(1.12); }
.window:not(.focused) .tb-btn {
  background: linear-gradient(to bottom, #cfcdc9, #bfbdb9);
  color: #6e6a66;
}
html.dark .window:not(.focused) .tb-btn {
  background: linear-gradient(to bottom, #4c4c4e, #414143);
  color: #a09c97;
}
.window:not(.focused) .tb-close {
  background: linear-gradient(to bottom, #cfcdc9, #bfbdb9);
  color: #6e6a66;
}
html.dark .window:not(.focused) .tb-close {
  background: linear-gradient(to bottom, #4c4c4e, #414143);
  color: #a09c97;
}

.window-body { flex: 1; display: flex; flex-direction: column; min-height: 0; border-radius: 0 0 var(--window-radius) var(--window-radius); overflow: hidden; }
.window.maximized .window-body, .window.tiled .window-body { border-radius: 0; }
.window-content { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }

.resize-grip { position: absolute; z-index: 20; }
.resize-n { top: -4px; left: 10px; right: 10px; height: 8px; cursor: ns-resize; }
.resize-s { bottom: -4px; left: 10px; right: 10px; height: 8px; cursor: ns-resize; }
.resize-e { right: -4px; top: 10px; bottom: 10px; width: 8px; cursor: ew-resize; }
.resize-w { left: -4px; top: 10px; bottom: 10px; width: 8px; cursor: ew-resize; }
.resize-ne { right: -5px; top: -5px; width: 14px; height: 14px; cursor: nesw-resize; }
.resize-nw { left: -5px; top: -5px; width: 14px; height: 14px; cursor: nwse-resize; }
.resize-se { right: -5px; bottom: -5px; width: 14px; height: 14px; cursor: nwse-resize; }
.resize-sw { left: -5px; bottom: -5px; width: 14px; height: 14px; cursor: nesw-resize; }
.window.maximized .resize-grip, .window.tiled .resize-grip { display: none; }

#snap-preview {
  position: absolute;
  background: var(--accent-low);
  border: 2px solid var(--accent);
  border-radius: 10px;
  z-index: 5; pointer-events: none;
  opacity: 0; transition: all .14s ease-out;
}

/* ===== overview ===== */
#overview {
  position: absolute; inset: 32px 0 0 0;
  background: rgba(20, 18, 24, .55);
  backdrop-filter: blur(26px);
  z-index: 8500;
  display: flex; flex-direction: column;
}
.ov-in { animation: fadeIn .2s; }
.ov-out { opacity: 0; transition: opacity .18s; }
.ov-search {
  margin: 34px auto 12px;
  width: 460px;
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 10px;
  padding: 9px 14px;
  color: #fff;
}
.ov-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-low); background: rgba(255,255,255,.14); }
.ov-search-ic svg { width: 17px; height: 17px; opacity: .8; }
.ov-search-input {
  flex: 1; background: none; border: none; outline: none;
  color: #fff; font-size: calc(15px * var(--font-scale));
  padding: 0;
  box-shadow: none !important;
}
.ov-search-input::placeholder { color: rgba(255,255,255,.55); }
.ov-results { flex: 1; overflow-y: auto; padding: 6px 60px 20px; }
.ov-section-label { color: rgba(255,255,255,.65); font-size: calc(12.5px * var(--font-scale)); font-weight: 700; margin: 18px 0 10px; letter-spacing: .3px; }
.ov-apps-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ov-app-result {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  width: 108px; padding: 14px 6px 10px;
  background: none; border: none; color: #fff;
  border-radius: 12px;
}
.ov-app-result:hover { background: rgba(255,255,255,.13); }
.ov-app-ic svg { width: 56px; height: 56px; }
.ov-app-name { font-size: calc(12.5px * var(--font-scale)); text-align: center; }
.ov-files-list { display: flex; flex-direction: column; gap: 2px; max-width: 640px; margin: 0 auto; }
.ov-file-result {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.07); border: none; color: #fff;
  padding: 9px 14px; border-radius: 9px; text-align: left;
}
.ov-file-result:hover { background: rgba(255,255,255,.15); }
.ov-file-ic svg { width: 20px; height: 20px; }
.ov-file-name { font-weight: 600; font-size: calc(13.5px * var(--font-scale)); }
.ov-file-path { margin-left: auto; opacity: .55; font-size: calc(12px * var(--font-scale)); }
.ov-noresults { color: rgba(255,255,255,.7); text-align: center; margin-top: 60px; font-size: calc(15px * var(--font-scale)); }
.ov-noresults-ic svg { width: 46px; height: 46px; opacity: .5; margin-bottom: 10px; }

.ov-workspaces {
  display: flex; gap: 14px; justify-content: center;
  padding: 14px 0 22px;
}
.ov-ws {
  width: 132px; height: 78px;
  border-radius: 9px;
  background: rgba(255,255,255,.07);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  transition: border-color .15s, background .15s;
}
.ov-ws.active { border-color: var(--accent); background: rgba(255,255,255,.12); }
.ov-ws:hover { background: rgba(255,255,255,.15); }
.ov-ws-empty { opacity: .45; }
.ov-ws-mini { position: absolute; inset: 0; }
.ov-ws-add {
  width: 44px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.6);
}
.ov-ws-add svg { width: 20px; height: 20px; }
.ov-win {
  position: absolute;
  background: rgba(255,255,255,.92);
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ov-win.focused { outline: 2px solid var(--accent); }
.ov-win-ic svg { width: 22px; height: 22px; }
.ov-win-label { display: none; }
.ov-win-close {
  position: absolute; top: 2px; right: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #E95420; border: none; color: #fff;
  display: none; align-items: center; justify-content: center;
}
.ov-win-close svg { width: 9px; height: 9px; }
.ov-win:hover .ov-win-close { display: inline-flex; }
.ov-ws-empty .ov-win-close { display: none; }

/* big spread mode: when windows exist the overview centers them large */
.ov-workspaces .ov-win-ic svg { width: 20px; height: 20px; }

/* ===== app grid ===== */
#appgrid {
  position: absolute; inset: 32px 0 0 0;
  background: rgba(24, 20, 30, .62);
  backdrop-filter: blur(30px);
  z-index: 8500;
}
.ag-in { animation: fadeIn .2s; }
.ag-out { opacity: 0; transition: opacity .17s; }
.ag-wrap {
  height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding-bottom: 30px;
}
.ag-grid {
  display: grid;
  grid-template-columns: repeat(8, 118px);
  grid-auto-rows: 118px;
  gap: 4px;
}
.ag-app {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px;
  background: none; border: none; color: #fff;
  border-radius: 13px;
  padding: 8px 4px;
}
.ag-app:hover { background: rgba(255,255,255,.13); }
.ag-app:active { transform: scale(.94); }
.ag-app-ic svg { width: 58px; height: 58px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.35)); }
.ag-app-name {
  font-size: calc(12.5px * var(--font-scale));
  max-width: 108px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ag-launch { animation: popIn .3s; }
.ag-folder-ic {
  width: 58px; height: 58px;
  background: rgba(255,255,255,.16);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
}
.ag-folder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.ag-folder-mini svg { width: 21px !important; height: 21px !important; }
.ag-dots { display: flex; gap: 8px; margin-top: 22px; }
.ag-dot {
  width: 9px; height: 9px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.35);
}
.ag-dot.active { background: #fff; }
.ag-folder-detail {
  position: absolute; inset: 0;
  background: rgba(20, 16, 26, .7);
  backdrop-filter: blur(34px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 10;
}
.ag-folder-title { color: #fff; font-size: calc(17px * var(--font-scale)); font-weight: 700; margin-bottom: 26px; }
.ag-folder-apps { grid-template-columns: repeat(3, 118px); }

/* ===== dialogs ===== */
.dialog-scrim {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.32);
  display: flex; align-items: center; justify-content: center;
  z-index: 9800;
  animation: fadeIn .15s;
}
.scrim-out { opacity: 0; transition: opacity .14s; }
.os-dialog {
  width: 420px;
  background: var(--pop-bg); color: var(--pop-fg);
  border-radius: 15px;
  box-shadow: 0 18px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(0,0,0,.18);
  padding: 26px 26px 18px;
}
html.dark .os-dialog { box-shadow: 0 18px 60px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.09); }
.dialog-in { animation: popIn .17s cubic-bezier(.3,1.2,.4,1); }
.dialog-out { opacity: 0; transform: scale(.95); transition: opacity .14s, transform .14s; }
.dialog-content { display: flex; flex-direction: column; align-items: center; text-align: center; }
.dialog-icon svg { width: 42px; height: 42px; margin-bottom: 10px; }
.dialog-icon-warning, .dialog-icon-error { color: #e01b24; }
.dialog-icon-info, .dialog-icon-question { color: var(--subtle-fg); }
.dialog-icon-power { color: var(--subtle-fg); }
.dialog-title { font-size: calc(17px * var(--font-scale)); font-weight: 700; margin-bottom: 8px; }
.dialog-message { font-size: calc(14px * var(--font-scale)); color: var(--subtle-fg); line-height: 1.45; margin-bottom: 8px; }
.dialog-input { width: 100%; margin: 10px 0 4px; }
.dialog-buttons {
  display: flex; gap: 8px; margin-top: 16px;
  width: 100%;
}
.dialog-buttons-split { justify-content: stretch; }
.dialog-btn { flex: 1; padding: 8px 0; }

/* ===== lock screen ===== */
#lock-screen {
  position: absolute; inset: 0; z-index: 9900;
}
.lock-shade {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center;
  color: #fff;
  background: radial-gradient(ellipse 120% 90% at 50% 110%, rgba(233,84,32,.85) 0%, rgba(119,33,111,.9) 45%, rgba(44,0,30,.96) 100%);
  backdrop-filter: blur(40px) brightness(.8);
}
.lock-in { animation: fadeIn .35s; }
.lock-out { opacity: 0; transform: translateY(-3%); transition: opacity .35s, transform .35s; }
.lock-time {
  margin-top: 16vh;
  font-size: 86px; font-weight: 300;
  letter-spacing: -1px;
  transition: font-size .3s, margin .3s;
  font-variant-numeric: tabular-nums;
}
.lock-time-small { font-size: 44px; margin-top: 9vh; }
.lock-date { font-size: calc(19px * var(--font-scale)); opacity: .9; margin-top: 6px; font-weight: 500; }
.lock-date-hidden { opacity: 0; height: 0; overflow: hidden; }
.lock-hint { margin-top: auto; margin-bottom: 7vh; font-size: calc(13.5px * var(--font-scale)); opacity: .55; animation: fadeIn 1s .8s backwards; }
.lock-notifs { margin-top: 3vh; }
.lock-auth {
  margin-top: 4vh;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.lock-auth-in { animation: popIn .25s; }
.lock-avatar {
  width: 84px; height: 84px; border-radius: 50%;
  background: rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.lock-avatar svg { width: 52px; height: 52px; opacity: .95; }
.lock-name { font-size: calc(20px * var(--font-scale)); font-weight: 500; margin-top: 4px; }
.lock-passwrap {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px;
}
.lock-pass {
  width: 270px; padding: 9px 14px;
  border-radius: 8px; border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.13); color: #fff;
  font-size: calc(15px * var(--font-scale));
}
.lock-pass::placeholder { color: rgba(255,255,255,.5); }
.lock-pass:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-low); }
.lock-go {
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--accent); border: none; color: var(--accent-contrast);
  display: inline-flex; align-items: center; justify-content: center;
}
.lock-go:hover { filter: brightness(1.1); }
.lock-go svg { width: 17px; height: 17px; }
.lock-shake { animation: shake .4s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); } 40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); } 80% { transform: translateX(4px); }
}
.lock-msg { font-size: calc(12.5px * var(--font-scale)); opacity: .75; min-height: 18px; }

/* ===== boot / poweroff ===== */
#boot-layer {
  position: absolute; inset: 0;
  background: #000;
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
}
#boot-layer[hidden] { display: none; }
.boot-clickable { cursor: pointer; }
.boot-logo { display: flex; flex-direction: column; align-items: center; gap: 60px; }
.boot-logo-mark {
  width: 90px; height: 90px;
  background:
    radial-gradient(circle at 50% 50%, transparent 21px, #fff 21px, #fff 25px, transparent 25px),
    radial-gradient(circle at 50% 17%, #fff 4.5px, transparent 5px),
    radial-gradient(circle at 21% 69%, #fff 4.5px, transparent 5px),
    radial-gradient(circle at 79% 69%, #fff 4.5px, transparent 5px),
    radial-gradient(circle at 50% 50%, #E95420 44px, transparent 45px);
  border-radius: 50%;
  animation: fadeIn .6s;
}
.boot-spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2.6px solid rgba(255,255,255,.18);
  border-top-color: #fff;
  animation: spin 1s linear infinite;
}
.boot-fade { opacity: 0; transition: opacity .45s; }
.boot-lines {
  position: absolute; left: 30px; top: 30px; right: 30px;
  font-family: "Ubuntu Mono", "DejaVu Sans Mono", monospace;
  font-size: 13px; color: #b8b8b8;
}
.boot-line { padding: 1.5px 0; animation: fadeIn .1s; }
.boot-line::after { content: ""; }
.powered-off { text-align: center; color: #c9c9c9; }
.powered-off-hint svg { width: 42px; height: 42px; opacity: .7; }
.powered-off p { margin-top: 14px; font-size: 17px; }
.powered-off-sub { font-size: 13px !important; opacity: .5; margin-top: 6px !important; }

/* hidden helper */
[hidden] { display: none !important; }

/* big window spread in overview */
.ov-results { display: flex; flex-direction: column; align-items: center; }
.ov-spread {
  margin-top: 14px;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 34px; width: 100%;
}
.ov-big-win {
  position: relative;
  background: rgba(255,255,255,.9);
  border-radius: 9px;
  box-shadow: 0 8px 30px rgba(0,0,0,.45);
  overflow: visible;
  transition: transform .15s ease;
  flex: none;
}
.ov-big-win:hover { transform: scale(1.035); }
.ov-big-win.focused { outline: 2.5px solid var(--accent); }
.ov-big-inner {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px;
  background:
    linear-gradient(to bottom, rgba(60,58,56,.9) 0 26px, rgba(240,239,238,.96) 26px);
}
.ov-big-ic svg { width: 54px; height: 54px; filter: drop-shadow(0 2px 5px rgba(0,0,0,.3)); }
.ov-big-caption {
  position: absolute; top: 100%; left: 0; right: 0;
  margin-top: 8px;
  text-align: center;
  color: #fff; font-size: calc(13px * var(--font-scale));
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ov-big-win .ov-win-close {
  display: inline-flex;
  top: -8px; right: -8px;
  width: 24px; height: 24px;
  opacity: 0;
  transition: opacity .13s;
}
.ov-big-win:hover .ov-win-close { opacity: 1; }
.ov-big-win .ov-win-close svg { width: 12px; height: 12px; }
.ov-empty-ws { margin-top: 12vh; }
.ov-empty-hint { margin-top: 8px; font-size: calc(13px * var(--font-scale)); opacity: .6; }
