:root {
  --accent: #7c9cff;
  --accent-rgb: 124, 156, 255;
  --bg: #060c18;
  --panel: rgba(9, 15, 28, 0.7);
  --panel-solid: rgba(16, 23, 39, 0.93);
  --surface: rgba(25, 33, 51, 0.7);
  --surface-strong: rgba(19, 26, 42, 0.94);
  --raised: rgba(42, 53, 77, 0.68);
  --raised-hover: rgba(56, 69, 97, 0.7);
  --text: #f3f6ff;
  --muted: #94a3be;
  --line: rgba(196, 213, 244, 0.12);
  --line-strong: rgba(213, 227, 255, 0.2);
  --shadow: 0 26px 84px rgba(0, 0, 0, 0.5);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.2);
  --glass-blur: blur(26px) saturate(148%);
  --danger: #ff7287;
  --success: #31c997;
  --warning: #f3bc62;
  --radius: 18px;
  font-family: Inter, "SF Pro Display", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body[data-theme="daylight"] {
  --bg: #e7edf7;
  --panel: rgba(248, 250, 255, 0.73);
  --panel-solid: rgba(248, 250, 255, 0.95);
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --raised: rgba(228, 235, 248, 0.76);
  --raised-hover: rgba(214, 224, 243, 0.9);
  --text: #152238;
  --muted: #5d6c86;
  --line: rgba(28, 46, 77, 0.13);
  --line-strong: rgba(28, 46, 77, 0.2);
  --shadow: 0 24px 70px rgba(30, 47, 72, 0.2);
  --shadow-soft: 0 9px 24px rgba(36, 55, 88, 0.11);
}

body[data-theme="graphite"] {
  --bg: #121416;
  --panel: rgba(18, 20, 23, 0.73);
  --panel-solid: rgba(29, 32, 37, 0.95);
  --surface: rgba(35, 38, 44, 0.74);
  --surface-strong: rgba(34, 38, 43, 0.95);
  --raised: rgba(50, 54, 61, 0.82);
  --raised-hover: rgba(66, 71, 79, 0.92);
  --text: #f3f3f3;
  --muted: #aaaeb6;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.2);
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

button:disabled {
  cursor: default;
  opacity: 0.42;
}

input,
textarea {
  border: 1px solid var(--line);
  background: var(--raised);
  outline: none;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--raised) 84%, var(--accent));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 19%, transparent);
}

h1,
h2,
p {
  margin: 0;
}

h2 {
  font-size: 15px;
  font-weight: 600;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.boot-screen,
.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  background:
    radial-gradient(circle at 50% 43%, rgba(124, 156, 255, 0.2), transparent 30%),
    #050a13;
  color: #eff5ff;
}

.boot-mark {
  font-size: clamp(45px, 9vw, 76px);
  font-weight: 700;
  letter-spacing: 0.38em;
  margin-left: 0.38em;
}

.boot-spinner {
  height: 34px;
  width: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

.boot-screen p {
  color: #9eb0ce;
}

.boot-track {
  height: 3px;
  width: min(300px, 60vw);
  background: rgba(255, 255, 255, 0.13);
  overflow: hidden;
  border-radius: 4px;
}

.boot-track span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 180ms ease;
}

.lock-screen {
  gap: 12px;
  background:
    radial-gradient(circle at 30% 20%, rgba(87, 122, 229, 0.55), transparent 40%),
    linear-gradient(140deg, #081322, #151a32 65%, #101a21);
}

.lock-time {
  font-size: clamp(68px, 12vw, 110px);
  font-weight: 200;
  letter-spacing: -0.05em;
}

.lock-date {
  color: #c4d2e8;
  font-size: 19px;
  margin-bottom: 48px;
}

.system {
  height: 100%;
  position: relative;
  background: var(--bg);
}

.panel {
  position: fixed;
  inset: 0 0 auto;
  height: 48px;
  z-index: 500;
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  backdrop-filter: var(--glass-blur);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025), 0 8px 30px rgba(0, 0, 0, 0.12);
}

.system-button,
.status-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 36px;
  padding: 0 11px;
  color: var(--text);
  border-radius: 11px;
  background: transparent;
}

.system-button:hover,
.status-button:hover {
  background: var(--raised-hover);
}

.mark {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: white;
  font-weight: 700;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 65%, white), var(--accent));
  box-shadow: 0 5px 14px color-mix(in srgb, var(--accent) 34%, transparent);
}

.panel-separator {
  height: 20px;
  width: 1px;
  background: var(--line);
  margin: 0 14px;
}

.active-app {
  font-weight: 560;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-status {
  margin-left: auto;
}

.status-button {
  gap: 16px;
  font-variant-numeric: tabular-nums;
}

#network-indicator::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  margin-right: 7px;
  box-shadow: 0 0 10px var(--success);
}

.desktop {
  height: 100%;
  padding-top: 48px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 71% 27%, rgba(102, 130, 244, 0.3), transparent 30%),
    radial-gradient(ellipse at 16% 77%, rgba(32, 187, 164, 0.14), transparent 33%),
    radial-gradient(ellipse at 50% -8%, rgba(84, 121, 208, 0.22), transparent 36%),
    linear-gradient(136deg, #050c18, #0e1830 51%, #07131b);
}

.desktop::before,
.desktop::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.desktop::before {
  inset: 0;
  opacity: 0.28;
  background-image:
    radial-gradient(circle at 19% 24%, rgba(255, 255, 255, 0.38) 0 1px, transparent 1.2px),
    radial-gradient(circle at 76% 62%, rgba(255, 255, 255, 0.26) 0 1px, transparent 1.2px);
  background-size: 230px 230px, 310px 310px;
}

.desktop::after {
  right: -16vw;
  top: 11vh;
  width: 66vw;
  height: 66vw;
  border-radius: 50%;
  border: 1px solid rgba(141, 175, 255, 0.07);
  box-shadow:
    inset 0 0 100px rgba(77, 107, 205, 0.03),
    0 0 130px rgba(60, 95, 198, 0.04);
}

body[data-wallpaper="horizon"] .desktop {
  background:
    radial-gradient(ellipse at 50% 74%, rgba(246, 163, 85, 0.46), transparent 18%),
    linear-gradient(#07162b 12%, #172f50 48%, #b5624f 69%, #172335 70%);
}

body[data-wallpaper="grid"] .desktop {
  background-color: #080e17;
  background-image:
    linear-gradient(rgba(124, 156, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 156, 255, 0.09) 1px, transparent 1px),
    radial-gradient(circle at 50% 45%, rgba(124, 156, 255, 0.22), transparent 36%);
  background-size: 46px 46px, 46px 46px, auto;
}

body[data-theme="daylight"] .desktop {
  background:
    radial-gradient(circle at 75% 16%, rgba(82, 139, 255, 0.22), transparent 32%),
    linear-gradient(132deg, #d8e5fa, #f2f5fa 55%, #cedbf2);
}

.desktop-icons {
  position: absolute;
  top: 70px;
  left: 20px;
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(5, 82px);
  gap: 10px 15px;
}

.desktop-icon {
  min-height: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 7px 5px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #f2f6ff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
  font-size: 12px;
}

body[data-theme="daylight"] .desktop-icon {
  color: var(--text);
  text-shadow: none;
}

.desktop-icon:hover,
.desktop-icon:focus {
  border-color: rgba(194, 214, 251, 0.14);
  background: rgba(139, 166, 215, 0.13);
  backdrop-filter: blur(10px);
}

.desktop-symbol,
.dock-symbol {
  display: grid;
  place-items: center;
  height: 42px;
  width: 42px;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--icon-start), var(--icon-end));
  color: #fff;
  box-shadow:
    0 9px 21px rgba(0, 0, 0, 0.21),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.app-icon {
  --icon-start: #86a6ff;
  --icon-end: #536de6;
  overflow: hidden;
}

.app-icon[data-app="files"] {
  --icon-start: #56b3ff;
  --icon-end: #2671dd;
}

.app-icon[data-app="browser"] {
  --icon-start: #5dc8d4;
  --icon-end: #17738e;
}

.app-icon[data-app="editor"] {
  --icon-start: #9180ff;
  --icon-end: #5955dc;
}

.app-icon[data-app="terminal"] {
  --icon-start: #35d6ac;
  --icon-end: #077e83;
}

.app-icon[data-app="calendar"] {
  --icon-start: #ff8187;
  --icon-end: #e44967;
}

.app-icon[data-app="tasks"] {
  --icon-start: #4fd7bb;
  --icon-end: #188f94;
}

.app-icon[data-app="notes"] {
  --icon-start: #ffca64;
  --icon-end: #d77943;
}

.app-icon[data-app="calculator"] {
  --icon-start: #f5bb53;
  --icon-end: #e37037;
}

.app-icon[data-app="monitor"] {
  --icon-start: #49d696;
  --icon-end: #178468;
}

.app-icon[data-app="settings"] {
  --icon-start: #b4c0d5;
  --icon-end: #637087;
}

.app-icon svg {
  display: block;
  width: 57%;
  height: 57%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-icon .icon-solid {
  fill: currentColor;
  stroke: none;
}

.app-icon .icon-soft {
  fill: currentColor;
  fill-opacity: 0.26;
  stroke: none;
}

.window-layer {
  position: absolute;
  inset: 48px 0 70px;
  pointer-events: none;
}

.window {
  position: fixed;
  z-index: 20;
  min-width: 330px;
  min-height: 270px;
  max-width: calc(100vw - 14px);
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  resize: both;
  pointer-events: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
  animation: window-arrive 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transition: box-shadow 150ms ease, opacity 150ms ease, border-color 150ms ease;
}

.window.active {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line-strong));
  box-shadow:
    0 30px 96px rgba(0, 0, 0, 0.55),
    0 0 0 1px color-mix(in srgb, var(--accent) 26%, transparent),
    0 0 48px color-mix(in srgb, var(--accent) 8%, transparent);
}

.window.minimized {
  display: none;
}

.window.maximized {
  top: 55px !important;
  left: 10px !important;
  width: calc(100vw - 20px) !important;
  height: calc(100vh - 128px) !important;
  resize: none;
}

.window-titlebar {
  height: 50px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 0 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 88%, white 4%), var(--surface));
  user-select: none;
  touch-action: none;
}

.window-identification {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.window-identification strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.window-symbol {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--icon-start) 22%, var(--raised));
  color: var(--icon-start);
}

.window-controls {
  display: flex;
  gap: 9px;
  margin-right: 4px;
}

.window-controls button {
  position: relative;
  height: 13px;
  min-width: 13px;
  width: 13px;
  border-radius: 50%;
  background: #485267;
}

.window-controls button:hover {
  transform: scale(1.12);
}

.window-controls .minimize {
  background: var(--warning);
}

.window-controls .maximize {
  background: var(--success);
}

.window-controls .close {
  background: var(--danger);
}

.window-controls button::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  color: rgba(20, 23, 29, 0.62);
  font-size: 10px;
  font-weight: bold;
  transition: opacity 120ms ease;
}

.window-controls:hover button::after {
  opacity: 1;
}

.window-controls .minimize::after {
  content: "-";
}

.window-controls .maximize::after {
  content: "+";
}

.window-controls .close::after {
  content: "\00d7";
}

.window-content {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.dock {
  position: fixed;
  z-index: 520;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 25px;
  background: var(--panel);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: var(--glass-blur);
}

.dock-item {
  width: 50px;
  height: 50px;
  position: relative;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: transparent;
}

.dock-item:hover {
  background: rgba(126, 150, 191, 0.14);
  transform: translateY(-5px) scale(1.04);
}

.dock-symbol {
  height: 40px;
  width: 40px;
  border-radius: 12px;
}

.dock-item.running::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 6px;
  height: 4px;
  border-radius: 5px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.running-count {
  position: absolute;
  right: 1px;
  top: 1px;
  min-width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  padding: 1px 3px;
  border-radius: 10px;
  color: white;
  background: var(--accent);
  font-size: 9px;
}

.launcher,
.quick-panel {
  position: fixed;
  z-index: 600;
  border: 1px solid var(--line-strong);
  background: var(--panel-solid);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
  animation: panel-arrive 150ms ease-out;
}

.launcher {
  left: 18px;
  top: 57px;
  width: min(486px, calc(100vw - 36px));
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 18px;
  border-radius: 22px;
}

.search-box input {
  height: 47px;
  width: 100%;
  padding: 0 16px;
  border-radius: 13px;
  background: rgba(93, 109, 140, 0.18);
}

.section-label {
  margin: 18px 0 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.launcher-app {
  min-width: 0;
  min-height: 64px;
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: 1fr 1fr;
  column-gap: 10px;
  align-items: center;
  padding: 9px;
  color: var(--text);
  background: transparent;
  border-radius: 13px;
  text-align: left;
}

.launcher-app:hover,
.search-result:hover {
  background: var(--raised-hover);
}

.app-symbol {
  grid-row: span 2;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, var(--icon-start), var(--icon-end));
}

.launcher-app small,
.search-result small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.launcher-results {
  min-height: 43px;
}

.task-results-label {
  margin-top: 13px;
}

.search-result {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 9px;
  color: var(--text);
  text-align: left;
  background: transparent;
}

.launcher-footer {
  margin: 18px -18px -18px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
}

.launcher-footer span {
  flex: 1;
  color: var(--muted);
}

.launcher-footer button,
.text-action {
  padding: 6px 9px;
  border-radius: 7px;
  background: transparent;
  color: var(--accent);
}

.launcher-footer button:hover,
.text-action:hover {
  background: var(--raised);
}

.quick-panel {
  top: 57px;
  right: 18px;
  width: min(366px, calc(100vw - 28px));
  border-radius: 22px;
  padding: 18px;
}

.quick-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quick-header button {
  padding: 6px;
  color: var(--muted);
  background: transparent;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.toggle {
  padding: 12px 7px;
  text-align: left;
  border-radius: 11px;
  background: var(--raised);
  color: var(--text);
}

.toggle.active {
  background: color-mix(in srgb, var(--accent) 24%, var(--raised));
}

.toggle small {
  color: var(--muted);
}

.notifications {
  max-height: 315px;
  overflow: auto;
}

.notification {
  padding: 11px;
  margin-bottom: 7px;
  border-radius: 10px;
  background: var(--raised);
}

.notification.error {
  border-left: 3px solid var(--danger);
}

.notification small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.toasts {
  position: fixed;
  z-index: 800;
  top: 54px;
  right: 18px;
  width: min(335px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  opacity: 0;
  transform: translateY(-8px);
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  border-left: 3px solid var(--danger);
}

.primary,
.secondary,
.danger {
  padding: 9px 14px;
  border-radius: 9px;
  background: var(--accent);
  color: white;
}

.secondary {
  background: var(--raised);
  color: var(--text);
}

.danger {
  background: color-mix(in srgb, var(--danger) 16%, var(--raised));
  color: var(--danger);
}

.empty-message {
  padding: 10px 4px;
  color: var(--muted);
}

/* Overview */
.overview-app {
  height: 100%;
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 20px;
}

.overview-hero {
  grid-column: span 2;
  padding: 7px 4px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 8px;
}

.overview-hero h1 {
  font-size: 29px;
  margin-bottom: 7px;
}

.subtle {
  color: var(--muted);
}

.metric-grid {
  grid-column: span 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.metric-card,
.app-panel {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 13px;
  padding: 14px;
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin: 9px 0 5px;
  font-size: 24px;
}

.app-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.task-preview {
  grid-column: span 2;
}

.task-preview-row {
  display: grid;
  grid-template-columns: 11px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 5px;
  border-top: 1px solid var(--line);
}

.task-preview-row small {
  color: var(--muted);
}

.priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffd166;
}

.priority-dot.high {
  background: var(--danger);
}

.priority-dot.low {
  background: var(--success);
}

.recent-row {
  width: 100%;
  display: grid;
  grid-template-columns: 39px 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1px 8px;
  align-items: center;
  padding: 7px 4px;
  color: var(--text);
  text-align: left;
  background: transparent;
}

.recent-row:hover {
  background: var(--raised);
  border-radius: 8px;
}

.file-glyph {
  grid-row: span 2;
  padding: 9px 5px;
  border-radius: 8px;
  text-align: center;
  font-size: 9px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, var(--raised));
}

.recent-row small {
  color: var(--muted);
}

.quick-launch-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.quick-launch {
  display: grid;
  grid-template-columns: 33px 1fr;
  grid-template-rows: auto auto;
  gap: 0 8px;
  padding: 7px;
  border-radius: 9px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.quick-launch:hover {
  background: var(--raised);
}

.quick-launch .app-symbol {
  grid-row: span 2;
  width: 33px;
  height: 33px;
  border-radius: 9px;
}

.quick-launch small {
  color: var(--muted);
  font-size: 11px;
}

/* Files */
.files-app {
  height: 100%;
  display: grid;
  grid-template-columns: 164px 1fr;
}

.files-sidebar {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 9px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.location {
  padding: 9px 11px;
  color: var(--text);
  border-radius: 8px;
  background: transparent;
  text-align: left;
}

.location:hover,
.location.selected {
  background: var(--raised);
}

.location.selected {
  color: var(--accent);
}

.file-browser {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.file-toolbar {
  flex: none;
  display: flex;
  gap: 7px;
  padding: 11px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}

.file-toolbar button {
  white-space: nowrap;
}

.path-box {
  min-width: 80px;
  flex: 1;
  flex-basis: 250px;
  height: 37px;
  padding: 0 11px;
  border-radius: 8px;
}

.file-filter-bar {
  padding: 0 11px 11px;
  border-bottom: 1px solid var(--line);
}

.file-filter {
  width: 100%;
  height: 37px;
  padding: 0 11px;
  border-radius: 8px;
}

.file-list {
  flex: 1;
  overflow: auto;
  padding: 9px;
}

.file-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 170px 80px;
  align-items: center;
  padding: 10px 11px;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.file-row.header {
  color: var(--muted);
  font-size: 12px;
  cursor: default;
}

button.file-row:hover,
.file-row.selected {
  background: var(--raised);
}

.file-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-status {
  flex: none;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

/* Editor */
.editor-app {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.editor-toolbar {
  flex: none;
  display: flex;
  gap: 8px;
  padding: 11px;
  border-bottom: 1px solid var(--line);
}

.editor-path {
  height: 37px;
  flex: 1;
  border-radius: 8px;
  padding: 0 11px;
}

.document-editor {
  flex: 1;
  width: 100%;
  padding: 19px 22px;
  border: 0;
  border-radius: 0;
  resize: none;
  background: var(--surface-strong);
  color: var(--text);
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  line-height: 1.62;
}

.document-editor:focus {
  box-shadow: none;
}

.editor-status {
  flex: none;
  border-top: 1px solid var(--line);
  padding: 8px 14px;
  color: var(--muted);
  font-size: 12px;
}

/* Browser */
.browser-app {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface-strong);
}

.browser-tabbar {
  min-height: 44px;
  display: flex;
  align-items: end;
  gap: 6px;
  padding: 7px 10px 0;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
}

.browser-tablist {
  min-width: 0;
  flex: 1;
  display: flex;
  gap: 5px;
  overflow: hidden;
}

.browser-tab-wrap {
  max-width: 210px;
  min-width: 124px;
  display: flex;
  align-items: center;
  padding: 0 4px 0 0;
  border-radius: 11px 11px 0 0;
  color: var(--muted);
  background: transparent;
}

.browser-tab-wrap.selected {
  color: var(--text);
  background: var(--raised);
}

.browser-tab {
  min-width: 0;
  flex: 1;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 11px;
  color: inherit;
  background: transparent;
  text-align: left;
}

.browser-tab strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.browser-tab-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.browser-close-tab {
  height: 25px;
  width: 25px;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
}

.browser-close-tab:hover,
.browser-add-tab:hover {
  color: var(--text);
  background: var(--raised-hover);
}

.browser-add-tab {
  height: 34px;
  min-width: 34px;
  margin-bottom: 2px;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 19px;
}

.browser-toolbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.browser-navigation,
.browser-action {
  height: 37px;
  padding: 0 11px;
  border-radius: 10px;
  color: var(--muted);
  background: var(--raised);
  white-space: nowrap;
}

.browser-navigation:not(:disabled):hover,
.browser-action:not(:disabled):hover {
  color: var(--text);
  background: var(--raised-hover);
}

.browser-navigation:disabled,
.browser-action:disabled {
  opacity: 0.43;
}

.browser-address-form {
  min-width: 150px;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 39px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: color-mix(in srgb, var(--raised) 72%, transparent);
}

.browser-address-form:focus-within {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 12%, transparent);
}

.browser-security {
  flex: none;
  padding: 3px 6px;
  border-radius: 6px;
  color: var(--success);
  background: color-mix(in srgb, var(--success) 14%, transparent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.browser-security.external {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.browser-address {
  min-width: 0;
  flex: 1;
  height: 35px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.browser-go {
  height: 27px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: var(--text-secondary);
  background: rgba(104, 141, 170, 0.12);
  cursor: pointer;
}

.browser-go:hover {
  color: var(--text-primary);
  background: rgba(104, 141, 170, 0.22);
}

.browser-save.selected {
  color: var(--warning);
}

.browser-bookmark-bar {
  flex: none;
  min-height: 39px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  padding: 5px 12px;
  border-bottom: 1px solid var(--line);
}

.browser-bookmark-chip {
  overflow: hidden;
  max-width: 145px;
  padding: 5px 10px;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-bookmark-chip:hover,
.browser-bookmark-chip.built-in:hover {
  color: var(--text);
  background: var(--raised);
}

.browser-bookmark-chip.built-in {
  color: var(--accent);
}

.browser-embed-notice {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: color-mix(in srgb, var(--warning) 8%, var(--surface));
  font-size: 12px;
}

.browser-embed-notice strong {
  color: var(--warning);
}

.browser-stage {
  min-height: 0;
  flex: 1;
  display: flex;
  background: var(--surface-strong);
}

.browser-frame {
  min-width: 0;
  min-height: 0;
  flex: 1;
  width: 100%;
  border: 0;
  background: #fff;
}

.browser-page {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 27px;
}

.browser-start-hero {
  max-width: 650px;
  margin: 18px auto 28px;
  text-align: center;
}

.browser-start-hero h1 {
  margin-bottom: 8px;
  font-size: 34px;
  letter-spacing: -0.05em;
}

.browser-home-search {
  display: flex;
  gap: 8px;
  margin: 23px auto 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.browser-home-search input {
  min-width: 0;
  flex: 1;
  height: 43px;
  padding: 0 13px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.browser-start-sections {
  max-width: 760px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin: 0 auto;
}

.browser-start-panel,
.browser-library {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.browser-start-panel h2 {
  margin-bottom: 9px;
}

.browser-link-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.browser-link-row:hover,
.browser-library-link:hover {
  background: var(--raised-hover);
}

.browser-link-row small,
.browser-library-link small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-page-heading {
  max-width: 760px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px auto 17px;
}

.browser-page-heading h1 {
  font-size: 31px;
  letter-spacing: -0.045em;
}

.browser-library {
  max-width: 760px;
  margin: 0 auto;
}

.browser-library-row {
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--line);
}

.browser-library-row:last-child {
  border-bottom: 0;
}

.browser-library-link {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 10px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.browser-status {
  flex: none;
  padding: 7px 13px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

/* Terminal */
.terminal-app {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #08101c;
  color: #dce7f8;
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 13px;
}

.terminal-output {
  flex: 1;
  padding: 17px 18px 4px;
  overflow: auto;
}

.terminal-line {
  margin: 0 0 8px;
  white-space: pre-wrap;
  line-height: 1.45;
}

.terminal-line.system {
  color: #879cbd;
}

.terminal-line.command {
  color: var(--accent);
}

.terminal-line.error {
  color: #ff8494;
}

.terminal-form {
  flex: none;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px 16px;
}

.terminal-prompt {
  color: #48cf9b;
  white-space: nowrap;
}

.terminal-input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  padding: 3px;
  box-shadow: none !important;
}

.terminal-submit {
  padding: 7px 12px;
  border-radius: 7px;
  color: #dce7f8;
  background: rgba(124, 156, 255, 0.2);
}

.terminal-submit:hover {
  background: rgba(124, 156, 255, 0.32);
}

/* Taskboard */
.tasks-app {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 20px;
}

.tasks-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.tasks-header h1 {
  font-size: 28px;
}

.task-counters {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  column-gap: 7px;
  row-gap: 2px;
  color: var(--muted);
  text-align: right;
}

.task-counters strong {
  font-size: 22px;
  color: var(--text);
}

.task-compose {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 142px 142px auto;
  gap: 8px;
}

.task-compose input,
.task-compose select {
  height: 41px;
  min-width: 0;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  background: var(--raised);
}

.task-compose select:focus {
  outline: none;
  border-color: var(--accent);
}

.task-filters {
  display: flex;
  gap: 6px;
}

.task-filter {
  padding: 8px 17px;
  border-radius: 20px;
  color: var(--muted);
  background: var(--raised);
}

.task-filter.selected {
  color: white;
  background: var(--accent);
}

.task-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.task-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 13px;
  align-items: center;
  min-height: 68px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
}

.task-row:last-child {
  border-bottom: 0;
}

.task-row input {
  width: 19px;
  height: 19px;
  accent-color: var(--accent);
}

.task-row.completed .task-copy strong {
  color: var(--muted);
  text-decoration: line-through;
}

.task-copy strong {
  display: block;
  margin-bottom: 7px;
}

.task-metadata {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.priority-badge {
  padding: 3px 7px;
  border-radius: 12px;
  text-transform: capitalize;
  color: #eab952;
  background: rgba(234, 185, 82, 0.14);
}

.priority-badge.high {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 14%, transparent);
}

.priority-badge.low {
  color: var(--success);
  background: color-mix(in srgb, var(--success) 14%, transparent);
}

.tasks-empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
}

/* Calculator */
.calculator-app {
  height: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.calculator-display {
  flex: none;
  width: 100%;
  height: 70px;
  border-radius: 12px;
  padding: 0 16px;
  text-align: right;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}

.calculator-keys {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}

.calculator-keys button {
  border-radius: 11px;
  background: var(--raised);
  font-size: 18px;
}

.calculator-keys button:hover {
  background: color-mix(in srgb, var(--accent) 20%, var(--raised));
}

.calculator-keys .equals {
  color: white;
  background: var(--accent);
}

/* Monitor */
.monitor-app {
  height: 100%;
  overflow: auto;
  padding: 19px;
}

.monitor-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-bottom: 17px;
}

.monitor-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}

.monitor-card small {
  display: block;
  color: var(--muted);
  margin-bottom: 7px;
}

.monitor-card strong {
  font-size: 19px;
}

.process-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: var(--surface);
}

.process-panel h2 {
  margin-bottom: 13px;
}

.process-row {
  display: grid;
  grid-template-columns: 52px 1fr 90px 58px;
  align-items: center;
  gap: 8px;
  padding: 9px 8px;
  border-top: 1px solid var(--line);
}

.process-row small {
  color: var(--muted);
}

/* Settings */
.settings-app {
  height: 100%;
  overflow: auto;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 13px;
  padding: 20px;
}

.settings-section {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.settings-section h2 {
  margin-bottom: 18px;
}

.setting-label {
  display: block;
  margin-bottom: 20px;
  color: var(--muted);
}

.choice-row,
.color-row {
  display: flex;
  gap: 7px;
  margin-top: 8px;
}

.choice {
  flex: 1;
  padding: 10px 8px;
  border-radius: 8px;
  color: var(--text);
  background: var(--raised);
}

.choice.selected {
  color: white;
  background: var(--accent);
}

.color-swatch {
  width: 37px;
  height: 37px;
  border-radius: 50%;
  background: var(--swatch);
  border: 3px solid transparent;
}

.color-swatch.selected {
  border-color: var(--text);
}

.switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.switch-row input {
  width: 42px;
  height: 23px;
  accent-color: var(--accent);
}

.reset-system {
  margin-top: 25px;
  width: 100%;
}

/* Calendar */
.calendar-app {
  height: 100%;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  padding: 19px;
}

.calendar-sheet,
.agenda {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  padding: 14px;
}

.calendar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
}

.calendar-controls button {
  padding: 7px 13px;
}

.calendar-week,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.calendar-week {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
}

.day {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 8px;
}

.day.today {
  color: white;
  background: var(--accent);
}

.agenda {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.agenda textarea {
  flex: 1;
  border-radius: 9px;
  resize: none;
  padding: 11px;
  line-height: 1.5;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.reduce-motion *,
.reduce-motion *::before,
.reduce-motion *::after {
  animation-duration: 1ms !important;
  transition-duration: 1ms !important;
}

/* Interaction and application polish */
::selection {
  background: color-mix(in srgb, var(--accent) 38%, transparent);
}

* {
  scrollbar-color: color-mix(in srgb, var(--muted) 38%, transparent) transparent;
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

*::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 12px;
  background: color-mix(in srgb, var(--muted) 40%, transparent);
  background-clip: padding-box;
}

.boot-mark {
  background: linear-gradient(110deg, #fff, #9db8ff 52%, #fff);
  background-clip: text;
  color: transparent;
}

.lock-screen .primary {
  min-width: 170px;
  padding: 12px 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 30px rgba(40, 77, 173, 0.3);
}

.panel {
  height: 48px;
  padding: 0 16px;
  backdrop-filter: var(--glass-blur);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025), 0 8px 30px rgba(0, 0, 0, 0.12);
}

.system-button,
.status-button {
  height: 36px;
  padding: 0 11px;
  border-radius: 11px;
}

.system-button:hover,
.status-button:hover {
  background: var(--raised-hover);
}

.mark {
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 65%, white), var(--accent));
  box-shadow: 0 5px 14px color-mix(in srgb, var(--accent) 34%, transparent);
}

.active-app {
  color: var(--text);
  font-weight: 560;
}

.command-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  margin-left: auto;
  padding: 0 8px 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: rgba(70, 84, 110, 0.15);
}

.command-toggle:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--raised);
}

.command-toggle kbd,
.command-palette kbd {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 23px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--raised);
  color: var(--muted);
  font-size: 11px;
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
}

.panel-status {
  margin-left: 12px;
}

#network-indicator::before {
  box-shadow: 0 0 10px var(--success);
}

.desktop {
  padding-top: 48px;
  background:
    radial-gradient(ellipse at 71% 27%, rgba(102, 130, 244, 0.3), transparent 30%),
    radial-gradient(ellipse at 16% 77%, rgba(32, 187, 164, 0.14), transparent 33%),
    radial-gradient(ellipse at 50% -8%, rgba(84, 121, 208, 0.22), transparent 36%),
    linear-gradient(136deg, #050c18, #0e1830 51%, #07131b);
}

.desktop::before,
.desktop::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.desktop::before {
  inset: 0;
  opacity: 0.27;
  background-image:
    radial-gradient(circle at 19% 24%, rgba(255, 255, 255, 0.38) 0 1px, transparent 1.2px),
    radial-gradient(circle at 76% 62%, rgba(255, 255, 255, 0.26) 0 1px, transparent 1.2px);
  background-size: 230px 230px, 310px 310px;
}

.desktop::after {
  right: -16vw;
  top: 11vh;
  width: 66vw;
  height: 66vw;
  border-radius: 50%;
  border: 1px solid rgba(141, 175, 255, 0.07);
  box-shadow: inset 0 0 100px rgba(77, 107, 205, 0.03), 0 0 130px rgba(60, 95, 198, 0.04);
}

body[data-wallpaper="horizon"] .desktop::after,
body[data-theme="daylight"] .desktop::after {
  opacity: 0.32;
}

.desktop-icons {
  top: 70px;
  left: 20px;
  gap: 10px 15px;
}

.desktop-icon {
  border: 1px solid transparent;
  border-radius: 14px;
}

.desktop-icon:hover,
.desktop-icon:focus {
  border-color: rgba(194, 214, 251, 0.14);
  background: rgba(139, 166, 215, 0.13);
  backdrop-filter: blur(10px);
}

.desktop-symbol,
.dock-symbol {
  box-shadow: 0 9px 21px rgba(0, 0, 0, 0.21), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.window-layer {
  inset: 48px 0 70px;
}

.window {
  border-color: var(--line-strong);
  backdrop-filter: var(--glass-blur);
  animation: window-arrive 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transition: box-shadow 150ms ease, opacity 150ms ease, border-color 150ms ease;
}

.window.active {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line-strong));
  box-shadow:
    0 30px 96px rgba(0, 0, 0, 0.55),
    0 0 0 1px color-mix(in srgb, var(--accent) 26%, transparent),
    0 0 48px color-mix(in srgb, var(--accent) 8%, transparent);
}

.window.maximized {
  top: 55px !important;
  left: 10px !important;
  width: calc(100vw - 20px) !important;
  height: calc(100vh - 128px) !important;
}

.window-titlebar {
  height: 50px;
  padding: 0 14px 0 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, white), var(--surface));
}

.window-identification {
  gap: 11px;
}

.window-symbol {
  width: 29px;
  height: 29px;
  border-radius: 10px;
}

.window-controls {
  gap: 9px;
  margin-right: 4px;
}

.window-controls button {
  position: relative;
  height: 13px;
  width: 13px;
  min-width: 13px;
  border-radius: 50%;
  background: #485267;
}

.window-controls .minimize {
  background: var(--warning);
}

.window-controls .maximize {
  background: var(--success);
}

.window-controls .close {
  background: var(--danger);
}

.window-controls button:hover {
  transform: scale(1.12);
}

.window-controls button::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  color: rgba(20, 23, 29, 0.62);
  font-size: 10px;
  font-weight: bold;
  transition: opacity 120ms ease;
}

.window-controls:hover button::after {
  opacity: 1;
}

.window-controls .minimize::after {
  content: "-";
}

.window-controls .maximize::after {
  content: "+";
}

.window-controls .close::after {
  content: "\00d7";
}

.dock {
  bottom: 16px;
  gap: 7px;
  padding: 9px 12px;
  border-color: var(--line-strong);
  border-radius: 25px;
  background: var(--panel);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: var(--glass-blur);
}

.dock-item {
  width: 50px;
  height: 50px;
  border-radius: 15px;
}

.dock-item:hover {
  background: rgba(126, 150, 191, 0.14);
  transform: translateY(-5px) scale(1.04);
}

.dock-symbol {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.dock-item.running::after {
  bottom: 0;
  width: 6px;
  height: 4px;
  border-radius: 5px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.launcher,
.quick-panel {
  border-color: var(--line-strong);
  backdrop-filter: var(--glass-blur);
  animation: panel-arrive 150ms ease-out;
}

.launcher {
  left: 18px;
  top: 57px;
  width: min(486px, calc(100vw - 36px));
  padding: 18px;
  border-radius: 22px;
}

.search-box input {
  height: 47px;
  padding: 0 16px;
  border-radius: 13px;
  background: rgba(93, 109, 140, 0.18);
}

.launcher-app {
  min-height: 64px;
  padding: 9px;
  border-radius: 13px;
}

.launcher-app:hover,
.search-result:hover {
  background: var(--raised-hover);
}

.launcher-footer {
  margin: 18px -18px -18px;
  padding: 14px 18px;
}

.quick-panel {
  top: 57px;
  right: 18px;
  padding: 18px;
  border-radius: 22px;
}

.command-palette {
  position: fixed;
  z-index: 700;
  top: 70px;
  left: 50%;
  width: min(636px, calc(100vw - 34px));
  padding: 11px;
  border: 1px solid var(--line-strong);
  border-radius: 21px;
  background: var(--panel-solid);
  box-shadow: 0 28px 86px rgba(0, 0, 0, 0.48);
  backdrop-filter: var(--glass-blur);
  transform: translateX(-50%);
  animation: command-arrive 150ms ease-out;
}

.command-search {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 1px 5px 11px;
  border-bottom: 1px solid var(--line);
}

.command-key {
  padding: 7px 9px;
  border-radius: 8px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.command-search input {
  flex: 1;
  min-width: 0;
  height: 42px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.command-results {
  max-height: min(464px, calc(100vh - 224px));
  overflow: auto;
  padding: 8px 0;
}

.command-result {
  width: 100%;
  display: grid;
  grid-template-columns: 45px 1fr;
  grid-template-rows: 1fr 1fr;
  column-gap: 11px;
  align-items: center;
  min-height: 56px;
  padding: 7px 9px;
  border-radius: 12px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.command-result:hover,
.command-result.selected {
  background: var(--raised-hover);
}

.command-icon,
.command-glyph {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: white;
  background: linear-gradient(145deg, var(--icon-start), var(--icon-end));
}

.command-glyph {
  background: var(--raised);
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.command-result small {
  color: var(--muted);
}

.command-empty {
  padding: 19px 12px;
  color: var(--muted);
}

.command-footer {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 8px 2px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.command-footer span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.toggle {
  border-radius: 13px;
}

.toggle:hover {
  background: var(--raised-hover);
}

.toast {
  border-radius: 14px;
  backdrop-filter: var(--glass-blur);
}

.primary,
.secondary,
.danger {
  border-radius: 10px;
  font-weight: 530;
}

.primary {
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 78%, white), var(--accent));
}

.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 18px color-mix(in srgb, var(--accent) 26%, transparent);
}

.secondary:hover {
  background: var(--raised-hover);
}

.danger:hover {
  background: color-mix(in srgb, var(--danger) 22%, var(--raised));
}

.overview-app {
  gap: 15px;
  padding: 22px;
}

.overview-hero {
  position: relative;
  overflow: hidden;
  padding: 21px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: radial-gradient(circle at 90% 0, color-mix(in srgb, var(--accent) 22%, transparent), transparent 43%), var(--surface);
}

.overview-hero::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 23px;
  width: 54px;
  height: 54px;
  border-radius: 17px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 70%, white), var(--accent));
  opacity: 0.24;
}

.overview-hero h1,
.tasks-header h1 {
  font-size: 31px;
  letter-spacing: -0.045em;
}

.metric-card,
.app-panel {
  border-radius: 15px;
  padding: 15px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 96%, white), var(--surface));
  box-shadow: var(--shadow-soft);
}

.metric-card {
  transition: border-color 150ms ease, transform 150ms ease;
}

.metric-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.metric-card strong {
  font-size: 25px;
  letter-spacing: -0.03em;
}

.task-preview-row {
  padding: 11px 5px;
}

.note-preview {
  grid-column: span 2;
}

.note-preview-row {
  --note-accent: #a28bff;
  display: grid;
  width: 100%;
  gap: 4px;
  padding: 10px 12px;
  margin-top: 7px;
  border-left: 3px solid var(--note-accent);
  border-radius: 10px;
  color: var(--text);
  background: color-mix(in srgb, var(--note-accent) 7%, transparent);
  text-align: left;
}

.note-preview-row:hover {
  background: color-mix(in srgb, var(--note-accent) 14%, transparent);
}

.note-preview-row small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-preview-row.sky,
.note-list-item.sky {
  --note-accent: #55b9ec;
}

.note-preview-row.mint,
.note-list-item.mint {
  --note-accent: #36c89e;
}

.note-preview-row.amber,
.note-list-item.amber {
  --note-accent: #e9aa45;
}

.note-preview-row.rose,
.note-list-item.rose {
  --note-accent: #e8708e;
}

.recent-row {
  padding: 8px 5px;
}

.recent-row:hover,
.quick-launch:hover {
  background: var(--raised-hover);
}

.quick-launch {
  padding: 8px;
  border-radius: 11px;
}

.quick-launch:hover {
  transform: translateY(-1px);
}

.files-sidebar {
  padding: 15px 10px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
}

.location,
.path-box,
.file-filter {
  border-radius: 10px;
}

.location:hover,
.location.selected {
  background: var(--raised-hover);
}

.location.selected {
  box-shadow: inset 2px 0 0 var(--accent);
}

.file-toolbar {
  padding: 13px;
}

.file-filter-bar {
  padding: 0 13px 12px;
}

.file-list {
  padding: 10px;
}

.file-row {
  padding: 11px 12px;
  border-radius: 10px;
}

button.file-row:hover,
.file-row.selected {
  background: var(--raised-hover);
}

.file-row.selected {
  box-shadow: inset 2px 0 0 var(--accent);
}

.document-editor {
  padding: 23px 26px;
  line-height: 1.68;
}

.terminal-app {
  background: radial-gradient(circle at 78% -15%, rgba(76, 111, 193, 0.17), transparent 38%), #07101c;
}

.terminal-output {
  padding: 21px 21px 5px;
}

.terminal-form {
  margin: 0 15px 15px;
  padding: 11px 12px;
  border: 1px solid rgba(143, 168, 212, 0.12);
  border-radius: 12px;
  background: rgba(62, 78, 108, 0.18);
}

.terminal-submit {
  border-radius: 8px;
}

.tasks-app {
  gap: 15px;
  padding: 22px;
}

.task-counters {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.task-compose input,
.task-compose select {
  border-radius: 11px;
}

.task-filter.selected {
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 76%, white), var(--accent));
  box-shadow: 0 5px 15px color-mix(in srgb, var(--accent) 21%, transparent);
}

.task-list,
.monitor-card,
.process-panel,
.settings-section,
.calendar-sheet,
.agenda {
  border-radius: 15px;
  box-shadow: var(--shadow-soft);
}

.task-row {
  padding: 13px 17px;
}

.task-row:hover {
  background: rgba(130, 149, 186, 0.08);
}

.notes-app {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 22px;
}

.notes-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.notes-header h1 {
  font-size: 31px;
  letter-spacing: -0.045em;
}

.notes-workspace {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 12px;
}

.notes-sidebar,
.note-editor {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.notes-sidebar {
  display: flex;
  flex-direction: column;
  padding: 10px;
}

.notes-search {
  height: 41px;
  width: 100%;
  padding: 0 11px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: var(--raised);
}

.notes-list {
  min-height: 0;
  flex: 1;
  overflow: auto;
}

.note-list-item {
  --note-accent: #a28bff;
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  margin-bottom: 5px;
  padding: 11px 10px;
  border-left: 3px solid var(--note-accent);
  border-radius: 10px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.note-list-item:hover,
.note-list-item.selected {
  background: var(--raised-hover);
}

.note-list-item small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-editor {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.note-editor-toolbar,
.note-editor-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
}

.note-editor-toolbar {
  border-bottom: 1px solid var(--line);
}

.note-title {
  min-width: 0;
  flex: 1;
  height: 41px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--raised);
  font-size: 16px;
  font-weight: 560;
}

.note-content {
  min-height: 0;
  flex: 1;
  padding: 17px 18px;
  border: 0;
  resize: none;
  color: var(--text);
  background: transparent;
  line-height: 1.62;
  box-shadow: none;
}

.note-content:focus {
  background: transparent;
  box-shadow: none;
}

.note-editor-footer {
  border-top: 1px solid var(--line);
}

.note-colors {
  display: flex;
  gap: 6px;
}

.note-color {
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #a28bff;
}

.note-color.sky {
  background: #55b9ec;
}

.note-color.mint {
  background: #36c89e;
}

.note-color.amber {
  background: #e9aa45;
}

.note-color.rose {
  background: #e8708e;
}

.note-color.selected {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.note-state {
  min-width: 0;
  flex: 1;
  color: var(--muted);
  text-align: right;
}

/* Layered application icon system */
.app-icon {
  --icon-start: #88a6ff;
  --icon-mid: #6274f2;
  --icon-end: #4149bd;
  --icon-detail: #b9ddff;
  --icon-shadow: rgba(63, 79, 192, 0.42);
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  background:
    radial-gradient(circle at 23% 13%, rgba(255, 255, 255, 0.18), transparent 35%),
    linear-gradient(148deg, var(--icon-start), var(--icon-mid) 47%, var(--icon-end));
  box-shadow:
    0 4px 9px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(10, 15, 30, 0.18);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.app-icon::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(132deg, rgba(255, 255, 255, 0.07), transparent 39%, rgba(0, 0, 0, 0.1));
  pointer-events: none;
}

.app-icon::after {
  content: "";
  position: absolute;
  z-index: 0;
  right: 16%;
  bottom: 9%;
  left: 16%;
  height: 1px;
  border-radius: 100%;
  background: rgba(255, 255, 255, 0.16);
  pointer-events: none;
}

.app-icon svg {
  position: relative;
  z-index: 1;
  width: 59%;
  height: 59%;
  fill: none;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 1.7;
}

.app-icon .icon-wash {
  fill: rgba(255, 255, 255, 0.13);
  stroke: rgba(255, 255, 255, 0.94);
}

.app-icon .icon-faint {
  fill: rgba(255, 255, 255, 0.18);
  stroke: none;
}

.app-icon .icon-solid {
  fill: rgba(255, 255, 255, 0.9);
  stroke: none;
}

.app-icon .icon-accent {
  fill: var(--icon-detail);
  stroke: none;
}

.app-icon .icon-accent-stroke {
  stroke: var(--icon-detail);
  stroke-width: 2.05;
}

.app-icon .icon-shine {
  stroke: rgba(255, 255, 255, 0.48);
  stroke-width: 1;
}

.app-icon .generated-icon {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: contain;
  transform: scale(1.27);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.16));
  transition: opacity 120ms ease, transform 150ms ease;
}

.app-icon.image-ready {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.app-icon.image-ready::before,
.app-icon.image-ready::after {
  opacity: 0;
}

.app-icon.image-ready .generated-icon {
  opacity: 1;
}

.app-icon.image-ready svg {
  opacity: 0;
}

.app-icon[data-app="overview"] {
  --icon-start: #8fafff;
  --icon-mid: #6979f3;
  --icon-end: #4146b5;
  --icon-detail: #b1e7ff;
  --icon-shadow: rgba(64, 70, 183, 0.45);
}

.app-icon[data-app="files"] {
  --icon-start: #68d7ff;
  --icon-mid: #278fe8;
  --icon-end: #1850bd;
  --icon-detail: #cdf3ff;
  --icon-shadow: rgba(23, 104, 207, 0.46);
}

.app-icon[data-app="browser"] {
  --icon-start: #67d4dc;
  --icon-mid: #258ea8;
  --icon-end: #16566d;
  --icon-detail: #e3fcff;
  --icon-shadow: rgba(17, 85, 108, 0.3);
}

.app-icon[data-app="editor"] {
  --icon-start: #c092ff;
  --icon-mid: #8564ef;
  --icon-end: #5335c7;
  --icon-detail: #ffd18a;
  --icon-shadow: rgba(82, 52, 192, 0.46);
}

.app-icon[data-app="terminal"] {
  --icon-start: #59e0bd;
  --icon-mid: #1fa49b;
  --icon-end: #086170;
  --icon-detail: #b6fff0;
  --icon-shadow: rgba(8, 94, 103, 0.43);
}

.app-icon[data-app="calendar"] {
  --icon-start: #ff98a4;
  --icon-mid: #ef6377;
  --icon-end: #c3315a;
  --icon-detail: #ffe0a4;
  --icon-shadow: rgba(190, 42, 76, 0.42);
}

.app-icon[data-app="tasks"] {
  --icon-start: #64e3b7;
  --icon-mid: #25b695;
  --icon-end: #087172;
  --icon-detail: #e5ffb9;
  --icon-shadow: rgba(11, 113, 101, 0.4);
}

.app-icon[data-app="notes"] {
  --icon-start: #ffd36a;
  --icon-mid: #eea346;
  --icon-end: #bf5a32;
  --icon-detail: #fff0ab;
  --icon-shadow: rgba(178, 84, 38, 0.42);
}

.app-icon[data-app="calculator"] {
  --icon-start: #ffc866;
  --icon-mid: #f08c3f;
  --icon-end: #c4472f;
  --icon-detail: #fff1a7;
  --icon-shadow: rgba(182, 64, 38, 0.42);
}

.app-icon[data-app="monitor"] {
  --icon-start: #65e6b0;
  --icon-mid: #28b887;
  --icon-end: #087059;
  --icon-detail: #baffde;
  --icon-shadow: rgba(9, 104, 78, 0.43);
}

.app-icon[data-app="settings"] {
  --icon-start: #d5def0;
  --icon-mid: #8b99b3;
  --icon-end: #505d74;
  --icon-detail: #e9f6ff;
  --icon-shadow: rgba(39, 49, 68, 0.38);
}

.desktop-icons {
  grid-template-rows: repeat(5, 88px);
}

.desktop-icon {
  min-height: 84px;
  gap: 7px;
}

.desktop-symbol {
  width: 46px;
  height: 46px;
  border-radius: 15px;
}

.desktop-icon:hover .desktop-symbol,
.desktop-icon:focus .desktop-symbol {
  transform: translateY(-2px);
  box-shadow:
    0 7px 12px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.desktop-icon:hover .app-icon.image-ready,
.desktop-icon:focus .app-icon.image-ready {
  box-shadow: none;
}

.desktop-icon:hover .app-icon.image-ready .generated-icon,
.desktop-icon:focus .app-icon.image-ready .generated-icon {
  transform: translateY(-1px) scale(1.29);
}

.dock-item {
  width: 54px;
  height: 54px;
}

.dock-symbol {
  width: 43px;
  height: 43px;
  border-radius: 14px;
}

.dock-item:hover .dock-symbol {
  box-shadow:
    0 7px 12px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.dock-item:hover .app-icon.image-ready {
  box-shadow: none;
}

.dock-item:hover .app-icon.image-ready .generated-icon {
  transform: scale(1.29);
}

.app-symbol {
  width: 42px;
  height: 42px;
  border-radius: 13px;
}

.launcher-app {
  grid-template-columns: 44px 1fr;
  min-height: 68px;
}

.quick-launch .app-symbol {
  width: 35px;
  height: 35px;
  border-radius: 11px;
}

.window-symbol.app-icon {
  width: 31px;
  height: 31px;
  border-radius: 10px;
  color: #fff;
}

.command-icon.app-icon {
  width: 40px;
  height: 40px;
  border-radius: 13px;
}

.calculator-display {
  border-radius: 14px;
}

.calculator-keys button {
  border-radius: 13px;
}

.calculator-keys button:hover {
  background: color-mix(in srgb, var(--accent) 20%, var(--raised-hover));
  transform: translateY(-1px);
}

.day.today {
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 76%, white), var(--accent));
  box-shadow: 0 5px 13px color-mix(in srgb, var(--accent) 22%, transparent);
}

@keyframes window-arrive {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes panel-arrive {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes command-arrive {
  from {
    opacity: 0;
    transform: translate(-50%, -7px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateX(-50%);
  }
}

@media (max-width: 760px) {
  .desktop-icons {
    display: none;
  }

  .window {
    left: 7px !important;
    top: 49px !important;
    width: calc(100vw - 14px) !important;
    height: calc(100vh - 112px) !important;
    resize: none;
  }

  .overview-app,
  .settings-app,
  .calendar-app {
    display: block;
  }

  .overview-app > *,
  .settings-section,
  .calendar-sheet {
    margin-bottom: 12px;
  }

  .files-app {
    grid-template-columns: 1fr;
  }

  .files-sidebar {
    display: none;
  }

  .file-toolbar {
    flex-wrap: wrap;
  }

  .task-compose {
    grid-template-columns: 1fr 1fr;
  }

  .task-title {
    grid-column: span 2;
  }

  .command-toggle span {
    display: none;
  }

  .command-palette {
    top: 57px;
    width: calc(100vw - 18px);
  }

  .command-footer {
    gap: 10px;
  }

  .notes-workspace {
    grid-template-columns: 1fr;
  }

  .notes-sidebar {
    max-height: 178px;
  }

  .browser-toolbar {
    flex-wrap: wrap;
  }

  .browser-address-form {
    order: -1;
    flex-basis: 100%;
  }

  .browser-external {
    margin-left: auto;
  }

  .browser-start-sections {
    grid-template-columns: 1fr;
  }

  .file-row {
    grid-template-columns: 1fr 88px;
  }

  .file-row span:nth-child(2) {
    display: none;
  }

  .dock {
    max-width: calc(100vw - 18px);
    overflow-x: auto;
  }
}
