/* Ubuntu shell: wallpaper, top bar, dock, windows, overview and system overlays. */
:root {
  --accent: #e95420;
  --accent-strong: #c64212;
  --accent-soft: #fbe3d6;
  --aubergine: #2c001e;
  --surface: #f7f6f5;
  --surface-raised: #ffffff;
  --surface-alt: #efeeec;
  --surface-header: #f2f1ef;
  --text: #2c2c2c;
  --text-muted: #747474;
  --border: #d8d5d0;
  --border-strong: #b9b5af;
  --selection: #f1d3c4;
  --danger: #c62727;
  --success: #2e7d32;
  --warning: #b26a00;
  --shadow-window: 0 14px 38px rgba(0, 0, 0, .28), 0 3px 10px rgba(0, 0, 0, .2);
  --shadow-menu: 0 10px 30px rgba(0, 0, 0, .22), 0 2px 6px rgba(0, 0, 0, .12);
  --radius-window: 12px;
  --radius-control: 8px;
  --topbar-height: 30px;
  --dock-width: 66px;
  --ui-scale: 1;
  --motion: 180ms cubic-bezier(.2, .8, .2, 1);
  font-synthesis: none;
}

:root[data-theme="dark"] {
  --surface: #2b2b2b;
  --surface-raised: #333333;
  --surface-alt: #262626;
  --surface-header: #353535;
  --text: #f2f1f0;
  --text-muted: #b0adaa;
  --border: #4a4a4a;
  --border-strong: #626262;
  --selection: #5a3526;
  --shadow-window: 0 14px 38px rgba(0, 0, 0, .55), 0 3px 10px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #1b0d14;
  color: var(--text);
  font-family: "Ubuntu", "Noto Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: calc(14px * var(--ui-scale));
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.os-root {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  isolation: isolate;
}

.desktop {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.wallpaper {
  position: absolute;
  inset: 0;
  background-color: var(--aubergine);
  background-size: cover;
  background-position: center;
  transition: background 400ms ease;
}

.desktop::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, .16), transparent 18%, transparent 80%, rgba(0, 0, 0, .1));
}

.window-layer { position: absolute; inset: 0; }
body.overview-open .window-layer { visibility: hidden; }

/* Top bar */
.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-height);
  z-index: 9000;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 8px 0 4px;
  color: #fff;
  background: rgba(20, 12, 18, .62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  font-size: .88rem;
  letter-spacing: .005em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

.topbar-left, .topbar-right { display: flex; align-items: center; min-width: 0; }
.topbar-right { justify-content: flex-end; }

.topbar-button {
  height: 26px;
  min-width: 30px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  white-space: nowrap;
  transition: background var(--motion);
}

.topbar-button:hover, .topbar-button[aria-expanded="true"] { background: rgba(255, 255, 255, .15); }
.activities-button { padding: 0 9px; }
.activities-glyph { display: grid; grid-template-columns: repeat(2, 5px); gap: 2px; }
.activities-glyph i { width: 5px; height: 5px; border-radius: 1px; background: currentColor; }
.activities-glyph i:nth-child(2) { opacity: .72; }
.activities-glyph i:nth-child(3) { opacity: .72; }
.app-menu-button { max-width: 220px; }
.app-menu-label { overflow: hidden; text-overflow: ellipsis; }
.app-menu-icon { display: inline-flex; width: 16px; height: 16px; }
.app-menu-icon svg { width: 100%; height: 100%; }
.clock-button { font-variant-numeric: tabular-nums; }
.status-icons { display: inline-flex; align-items: center; gap: 9px; }
.status-icons svg { width: 16px; height: 16px; display: block; }
.status-caret { width: 0; height: 0; border: 4px solid transparent; border-top-color: currentColor; margin: 4px 0 0 2px; opacity: .8; }

.popover-layer { position: absolute; inset: 0; pointer-events: none; }
.popover {
  position: absolute;
  top: calc(var(--topbar-height) + 4px);
  min-width: 260px;
  color: var(--text);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-menu);
  pointer-events: auto;
  text-shadow: none;
  overflow: hidden;
  animation: pop-in 140ms ease-out;
}
.popover[hidden] { display: none; }
.popover.calendar-popover { right: 12px; width: 330px; }
.popover.status-popover { right: 12px; width: 320px; }
.popover.app-popover { left: 6px; width: 260px; }

@keyframes pop-in { from { opacity: 0; transform: translateY(-5px) scale(.985); } to { opacity: 1; transform: none; } }

.popover-section { padding: 14px 16px; }
.popover-section + .popover-section { border-top: 1px solid var(--border); }
.popover-title { font-size: .86rem; font-weight: 600; margin: 0 0 10px; }
.calendar-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.calendar-head strong { font-size: .95rem; }
.calendar-nav { display: flex; gap: 2px; }
.icon-button {
  width: 28px; height: 28px; display: inline-grid; place-items: center;
  border: 0; border-radius: 6px; background: transparent; color: inherit;
}
.icon-button:hover { background: var(--surface-alt); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.calendar-weekday { text-align: center; font-size: .72rem; color: var(--text-muted); padding: 4px 0; }
.calendar-day {
  height: 30px; display: grid; place-items: center; border-radius: 50%;
  font-size: .82rem; font-variant-numeric: tabular-nums;
}
.calendar-day.empty { visibility: hidden; }
.calendar-day.today { background: var(--accent); color: #fff; font-weight: 700; }
.calendar-day.has-event::after { content: ""; position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--accent); transform: translateY(9px); }
.calendar-day { position: relative; }
.calendar-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; font-size: .78rem; color: var(--text-muted); }
.calendar-notifications { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 10px; }
.calendar-notification { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; font-size: .8rem; }
.calendar-notification .note-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 5px; flex: none; }
.calendar-notification button { margin-left: auto; }

.status-rows { display: grid; gap: 8px; }
.status-row { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; font-size: .84rem; }
.status-row svg { width: 18px; height: 18px; }
.status-row .status-name { font-weight: 600; }
.status-row .status-detail { color: var(--text-muted); font-size: .76rem; font-weight: 400; }
.range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 5px;
  border-radius: 99px; background: var(--surface-alt); outline: none;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%;
  background: var(--accent); border: 0; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.range::-moz-range-thumb { width: 15px; height: 15px; border-radius: 50%; background: var(--accent); border: 0; }
.status-actions { display: grid; gap: 2px; margin-top: 4px; }
.status-action {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px;
  border: 0; border-radius: 6px; background: transparent; text-align: left; font-size: .84rem;
}
.status-action:hover { background: var(--surface-alt); }
.status-action svg { width: 17px; height: 17px; color: var(--text-muted); }
.status-action .value { margin-left: auto; color: var(--text-muted); font-size: .78rem; }
.switch { position: relative; width: 34px; height: 19px; border-radius: 99px; background: var(--border-strong); transition: background var(--motion); flex: none; }
.switch::after { content: ""; position: absolute; width: 13px; height: 13px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: transform var(--motion); }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(15px); }

.app-popover-menu { padding: 6px; }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px;
  border: 0; border-radius: 6px; background: transparent; text-align: left; font-size: .84rem;
}
.menu-item:hover { background: var(--surface-alt); }
.menu-item svg { width: 16px; height: 16px; color: var(--text-muted); }
.menu-item .shortcut { margin-left: auto; font-size: .72rem; color: var(--text-muted); }
.menu-separator { height: 1px; background: var(--border); margin: 5px 8px; }

/* Dock */
.dock {
  position: absolute;
  left: 0;
  top: var(--topbar-height);
  bottom: 0;
  width: var(--dock-width);
  z-index: 8500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 0 8px;
  background: linear-gradient(90deg, rgba(25, 14, 20, .72), rgba(25, 14, 20, .42));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid rgba(255, 255, 255, .08);
  transition: transform var(--motion), opacity var(--motion);
}
.dock.hidden-dock { transform: translateX(-100%); opacity: 0; pointer-events: none; }
.dock-items { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 0; overflow: hidden auto; scrollbar-width: none; }
.dock-items::-webkit-scrollbar { display: none; }
.dock-divider { width: 28px; height: 1px; background: rgba(255, 255, 255, .22); margin: 5px 0; flex: none; }
.dock-button {
  position: relative;
  width: 48px;
  height: 48px;
  flex: none;
  padding: 5px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
  transition: transform var(--motion), background var(--motion);
}
.dock-button:hover { background: rgba(255, 255, 255, .14); transform: scale(1.08); }
.dock-button:active { transform: scale(.94); }
.dock-button svg { width: 38px; height: 38px; display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .28)); }
.dock-button .dock-running-dot {
  position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .3);
}
.dock-button.dock-active { background: rgba(255, 255, 255, .13); }
.dock-grid-button { margin-top: auto; }
.dock-grid-button svg { width: 34px; height: 34px; }

.dock-button::after, [data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  padding: 5px 9px;
  border-radius: 6px;
  background: #2b2b2b;
  color: #fff;
  font-size: .76rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease;
  z-index: 9500;
}
.dock-button:hover::after, [data-tooltip]:hover::after { opacity: 1; }
[data-tooltip] { position: relative; }
[data-tooltip]:hover::after { left: 50%; top: calc(100% + 8px); transform: translateX(-50%); }

/* Windows */
.os-window {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 260px;
  min-height: 160px;
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: var(--radius-window);
  box-shadow: var(--shadow-window);
  overflow: hidden;
  transform-origin: center;
  animation: window-open 170ms cubic-bezier(.2, .9, .2, 1);
}
.os-window.closing { animation: window-close 130ms ease-in forwards; pointer-events: none; }
.os-window.minimized { display: none; }
.os-window.maximized { border-radius: 0; border-left: 0; border-right: 0; }
.os-window.unfocused { box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.os-window.unfocused .os-titlebar { opacity: .78; }
.os-window.snapping { transition: left 120ms ease, top 120ms ease, width 120ms ease, height 120ms ease; }
.os-window.dragging, .os-window.resizing { transition: none; user-select: none; }

@keyframes window-open { from { opacity: 0; transform: scale(.94) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes window-close { to { opacity: 0; transform: scale(.92); } }

.os-titlebar {
  position: relative;
  height: 40px;
  flex: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 9px 0 14px;
  background: var(--surface-header);
  border-bottom: 1px solid var(--border);
  user-select: none;
  touch-action: none;
}
.os-titlebar::before {
  content: "";
  position: absolute;
  left: 50%; top: 6px; width: 34px; height: 4px; border-radius: 99px;
  transform: translateX(-50%); background: var(--border-strong); opacity: .7;
}
.os-window-title {
  grid-column: 2;
  font-size: .85rem;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.os-window-controls { grid-column: 3; display: flex; justify-content: flex-end; gap: 7px; }
.os-window-control {
  width: 14px; height: 14px; padding: 0; border: 0; border-radius: 50%;
  background: var(--border-strong); color: rgba(0, 0, 0, .6);
  display: grid; place-items: center;
  transition: background 130ms ease, transform 130ms ease;
}
.os-window-control:hover { transform: scale(1.14); }
.os-window-control svg { width: 9px; height: 9px; opacity: 0; }
.os-window-control:hover svg { opacity: 1; }
.os-window-control[data-action="close"]:hover { background: #e95420; color: #fff; }
.os-window-control[data-action="minimize"]:hover { background: #e5a50a; color: #fff; }
.os-window-control[data-action="maximize"]:hover { background: #19b619; color: #fff; }
.os-window-body { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; background: var(--surface); }

.resize-handle { position: absolute; z-index: 3; }
.resize-handle.n { top: -3px; left: 10px; right: 10px; height: 7px; cursor: ns-resize; }
.resize-handle.s { bottom: -3px; left: 10px; right: 10px; height: 7px; cursor: ns-resize; }
.resize-handle.e { right: -3px; top: 10px; bottom: 10px; width: 7px; cursor: ew-resize; }
.resize-handle.w { left: -3px; top: 10px; bottom: 10px; width: 7px; cursor: ew-resize; }
.resize-handle.ne { right: -4px; top: -4px; width: 14px; height: 14px; cursor: nesw-resize; }
.resize-handle.nw { left: -4px; top: -4px; width: 14px; height: 14px; cursor: nwse-resize; }
.resize-handle.se { right: -4px; bottom: -4px; width: 14px; height: 14px; cursor: nwse-resize; }
.resize-handle.sw { left: -4px; bottom: -4px; width: 14px; height: 14px; cursor: nesw-resize; }
.os-window.maximized .resize-handle { display: none; }

.snap-preview {
  position: absolute;
  z-index: 8000;
  border: 2px solid rgba(255, 255, 255, .7);
  background: rgba(233, 84, 32, .28);
  border-radius: 10px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease, left 90ms ease, top 90ms ease, width 90ms ease, height 90ms ease;
}
.snap-preview.visible { opacity: 1; }
.snap-preview span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: .8rem; text-shadow: 0 1px 3px rgba(0, 0, 0, .4); }

/* Overview */
.overview {
  position: absolute;
  inset: 0;
  z-index: 8800;
  padding: calc(var(--topbar-height) + 24px) 32px 28px;
  display: flex;
  flex-direction: column;
  background: rgba(20, 10, 16, .62);
  backdrop-filter: blur(22px) saturate(1.1);
  -webkit-backdrop-filter: blur(22px) saturate(1.1);
  color: #fff;
  animation: overview-in 180ms ease-out;
}
.overview[hidden] { display: none; }
@keyframes overview-in { from { opacity: 0; } to { opacity: 1; } }
.overview-top { display: flex; justify-content: center; align-items: center; gap: 14px; margin-bottom: 22px; }
.overview-search-wrap {
  position: relative;
  width: min(560px, 72vw);
  display: flex; align-items: center;
  background: rgba(255, 255, 255, .95);
  color: #333;
  border-radius: 9px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}
.overview-search-icon { width: 38px; display: grid; place-items: center; color: #777; }
.overview-search-icon svg { width: 17px; height: 17px; }
.overview-search {
  flex: 1; border: 0; background: transparent; outline: none;
  padding: 10px 12px 10px 0; font-size: .92rem;
}
.overview-close {
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .13); color: #fff; display: grid; place-items: center;
}
.overview-close:hover { background: rgba(255, 255, 255, .24); }
.overview-close svg { width: 17px; height: 17px; }
.overview-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 116px; gap: 24px; }
.overview-center { min-width: 0; display: flex; flex-direction: column; }
.overview-section-heading { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.overview-section-heading h2 { font-size: 1rem; margin: 0; font-weight: 600; }
.overview-section-heading span { font-size: .76rem; color: rgba(255, 255, 255, .65); }
.overview-windows {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: center;
  gap: 18px;
  overflow: auto;
  padding: 10px;
}
.overview-window-card {
  position: relative;
  width: 260px;
  height: 158px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .25);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--motion), border-color var(--motion);
}
.overview-window-card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, .6); }
.overview-window-card .window-preview {
  position: absolute;
  top: 8px; left: 8px;
  width: 900px; height: 560px;
  transform: scale(.266);
  transform-origin: top left;
  pointer-events: none;
  opacity: .93;
}
.overview-window-card .window-preview .os-window { position: relative; left: 0 !important; top: 0 !important; width: 900px !important; height: 560px !important; animation: none; }
.overview-window-card .card-label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 16px 10px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .78));
  font-size: .78rem;
  display: flex; align-items: center; gap: 7px;
}
.overview-window-card .card-label svg { width: 14px; height: 14px; }
.overview-window-card .card-close {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px;
  border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff;
  display: grid; place-items: center; z-index: 2;
}
.overview-empty { align-self: center; color: rgba(255, 255, 255, .72); text-align: center; line-height: 1.7; }
.overview-empty strong { display: block; font-size: 1.05rem; color: #fff; }

.overview-apps {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  align-content: start;
  gap: 14px 8px;
  overflow: auto;
  padding: 8px;
}
.app-grid-item {
  border: 0; background: transparent; color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 8px 4px; border-radius: 10px;
}
.app-grid-item:hover { background: rgba(255, 255, 255, .14); }
.app-grid-item svg { width: 52px; height: 52px; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .3)); }
.app-grid-item span { font-size: .78rem; text-align: center; line-height: 1.2; }
.app-folder-heading {
  grid-column: 1 / -1;
  font-size: .76rem; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: rgba(255, 255, 255, .7);
  padding: 2px 8px 4px;
}
.app-grid-folder { grid-column: span 3; }
.app-grid-folder button { width: 100%; border: 0; background: transparent; color: #fff; font-size: .74rem; opacity: .8; text-align: left; padding: 4px 8px; }
.workspace-switcher { display: flex; flex-direction: column; align-items: center; gap: 10px; overflow: auto; }
.workspace-tile {
  width: 104px; height: 64px; padding: 4px;
  border: 2px solid transparent; border-radius: 8px;
  background: rgba(255, 255, 255, .12); cursor: pointer;
}
.workspace-tile.active { border-color: #fff; background: rgba(255, 255, 255, .25); }
.workspace-tile-inner { width: 100%; height: 100%; border-radius: 4px; background: rgba(0, 0, 0, .2); position: relative; overflow: hidden; }
.workspace-mini { position: absolute; border-radius: 2px; background: rgba(255, 255, 255, .42); }
.workspace-add {
  width: 34px; height: 34px; border: 1px dashed rgba(255, 255, 255, .55);
  border-radius: 8px; background: transparent; color: #fff; display: grid; place-items: center; font-size: 1.2rem;
}
.workspace-add:hover { background: rgba(255, 255, 255, .14); }
.overview-pagination { display: flex; justify-content: center; gap: 7px; margin-top: 12px; }
.overview-pagination button { width: 8px; height: 8px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .4); padding: 0; }
.overview-pagination button.active { background: #fff; transform: scale(1.25); }

/* Notifications and dialogs */
.notification-list {
  position: absolute; top: calc(var(--topbar-height) + 10px); right: 12px;
  z-index: 9100; width: 330px; display: flex; flex-direction: column; gap: 9px;
  pointer-events: none;
}
.notification {
  pointer-events: auto;
  display: grid; grid-template-columns: 36px 1fr 22px; gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 12px;
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: var(--shadow-menu);
  animation: note-in 240ms cubic-bezier(.2, .9, .2, 1);
}
.notification.leaving { animation: note-out 180ms ease-in forwards; }
@keyframes note-in { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes note-out { to { opacity: 0; transform: translateX(40px); } }
.notification-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent); }
.notification-icon svg { width: 20px; height: 20px; }
.notification-title { font-size: .82rem; font-weight: 700; margin-bottom: 2px; }
.notification-body { font-size: .78rem; color: var(--text-muted); line-height: 1.35; }
.notification-time { font-size: .68rem; color: var(--text-muted); margin-top: 5px; }
.notification-close { width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: var(--text-muted); display: grid; place-items: center; }
.notification-close:hover { background: var(--surface-alt); }

.toast-layer { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 9200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 15px; border-radius: 8px;
  background: #2d2d2d; color: #fff; font-size: .82rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
  animation: toast-in 200ms ease-out;
}
.toast.leaving { animation: toast-out 200ms ease-in forwards; }
.toast svg { width: 16px; height: 16px; color: #f5a623; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }

.modal-layer { position: absolute; inset: 0; z-index: 9300; pointer-events: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .38); pointer-events: auto; animation: overview-in 140ms ease; }
.modal-dialog {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(400px, calc(100vw - 40px));
  background: var(--surface-raised); color: var(--text);
  border-radius: 12px; box-shadow: var(--shadow-menu); overflow: hidden;
  pointer-events: auto;
}
.modal-head { display: flex; align-items: center; gap: 12px; padding: 20px 22px 8px; }
.modal-head svg { width: 28px; height: 28px; color: var(--accent); flex: none; }
.modal-head h2 { margin: 0; font-size: 1.02rem; }
.modal-body { padding: 4px 22px 18px; font-size: .85rem; color: var(--text-muted); line-height: 1.5; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; background: var(--surface-alt); }
.modal-actions button { padding: 7px 15px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface-raised); }
.modal-actions button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.modal-actions button:hover { filter: brightness(1.05); }

.context-menu {
  position: absolute; z-index: 9400; min-width: 180px; padding: 6px;
  background: var(--surface-raised); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: var(--shadow-menu); color: var(--text);
}
.context-menu button {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 7px 9px; border: 0; border-radius: 5px; background: transparent; text-align: left; font-size: .82rem;
}
.context-menu button:hover { background: var(--surface-alt); }
.context-menu button svg { width: 15px; height: 15px; color: var(--text-muted); }
.context-menu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 6px; }

/* Lock, suspend and boot */
.lock-screen, .power-screen, .boot-screen {
  position: absolute; inset: 0; z-index: 9600;
  display: grid; place-items: center; color: #fff;
  background-size: cover; background-position: center;
}
.lock-screen[hidden], .power-screen[hidden], .boot-screen[hidden] { display: none; }
.lock-screen { background: rgba(18, 8, 14, .55); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.lock-glow { position: absolute; inset: 0; background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .12), transparent 45%); }
.lock-content { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lock-avatar { width: 92px; height: 92px; border-radius: 50%; background: linear-gradient(145deg, #f5c6a5, #d98c5f); box-shadow: 0 6px 24px rgba(0, 0, 0, .35); display: grid; place-items: center; font-size: 2.2rem; }
.lock-avatar::after { content: "AM"; font-weight: 600; color: #5d3019; }
.lock-content h1 { margin: 8px 0 0; font-size: 1.35rem; font-weight: 500; }
.lock-content > p { margin: 0; font-size: 3.1rem; font-weight: 300; font-variant-numeric: tabular-nums; }
.lock-form { display: flex; gap: 8px; margin-top: 14px; }
.lock-form input { width: 190px; padding: 8px 10px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .14); color: #fff; outline: none; }
.lock-form input::placeholder { color: rgba(255, 255, 255, .65); }
.lock-form button { padding: 8px 14px; border: 0; border-radius: 7px; background: var(--accent); color: #fff; }
.lock-hint { font-size: .72rem !important; color: rgba(255, 255, 255, .6); margin-top: 6px !important; }

.power-screen { background: #101010; text-align: center; }
.power-orb { width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 26px 8px rgba(255, 255, 255, .18); }
.power-screen p { font-size: 1.1rem; margin-top: 22px; }
.power-screen button { padding: 7px 14px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, .4); background: transparent; color: #fff; }

.boot-screen { background: #111; }
.boot-mark { position: relative; width: 84px; height: 84px; }
.boot-ring { position: absolute; inset: 0; border: 8px solid #e95420; border-radius: 50%; border-bottom-color: transparent; animation: spin 1.1s linear infinite; }
.boot-dot { position: absolute; left: 50%; top: 50%; width: 13px; height: 13px; background: #fff; border-radius: 50%; transform: translate(-50%, -50%); }
.boot-progress { width: 220px; height: 3px; background: #333; border-radius: 99px; overflow: hidden; margin-top: 28px; }
.boot-progress i { display: block; height: 100%; width: 40%; background: #e95420; animation: boot-slide 1.4s ease-in-out infinite; }
.boot-screen p { margin-top: 14px; letter-spacing: .18em; text-transform: uppercase; font-size: .72rem; color: #bbb; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes boot-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }

@media (max-width: 900px) {
  .overview { padding-left: 18px; padding-right: 18px; }
  .overview-main { grid-template-columns: 1fr 86px; gap: 12px; }
  .workspace-tile { width: 76px; height: 48px; }
  .app-menu-label { display: none; }
}

@media (max-width: 640px) {
  :root { --dock-width: 54px; }
  .dock-button { width: 42px; height: 42px; padding: 3px; }
  .dock-button svg { width: 34px; height: 34px; }
  .clock-button { font-size: .76rem; }
  .status-icons { gap: 5px; }
  .overview { padding: calc(var(--topbar-height) + 12px) 10px 16px; }
  .overview-main { grid-template-columns: 1fr 64px; }
  .overview-window-card { width: 210px; height: 128px; }
  .overview-window-card .window-preview { transform: scale(.21); }
  .notification-list { width: min(330px, calc(100vw - 70px)); }
  .topbar { grid-template-columns: auto 1fr auto; }
  .app-menu-button { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
