/* ==========================================================================
   Ulises Paiz — Vista Edition · Shell stylesheet
   Aero glass frames, taskbar, Start menu, Sidebar, logon/boot, common
   controls. Fan-made homage; original CSS recreation, no Microsoft assets.
   ========================================================================== */

/* ---------- Fonts: Selawik is Microsoft's OFL metric-compatible Segoe UI
   stand-in. Windows visitors get real Segoe UI first. ---------- */
@font-face { font-family: "Selawik"; src: url("../assets/fonts/selawik-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Selawik"; src: url("../assets/fonts/selawik-bold.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Selawik"; src: url("../assets/fonts/selawik-light.woff2") format("woff2"); font-weight: 300; font-display: swap; }

:root {
  --font: "Segoe UI", "Selawik", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: Consolas, "Lucida Console", "Cascadia Mono", "DejaVu Sans Mono", Menlo, monospace;
  --fs: 12px;                       /* 9pt */
  --link: #0066cc;
  --link-hover: #3399ff;
  --instruction: #003399;           /* task-dialog main instruction */
  --text: #000;
  --muted: #5a5a5a;
  --sel-bg: linear-gradient(#f1f8fd, #d5effc);
  --sel-border: #99defd;
  --hover-bg: linear-gradient(#fafdff, #e8f6fd);
  --hover-border: #b8d6fb;

  /* Window colour (Personalize → Window Color and Appearance) */
  --glass-rgb: 110, 160, 210;       /* "Default" sky */
  --glass-a: 0.42;
  --glass-a-inactive: 0.22;
  --glass-blur: 9px;
  --taskbar-h: 30px;
  --sidebar-w: 150px;
  --frame: 8px;
  --caption-h: 30px;
}
body[data-glass="graphite"] { --glass-rgb: 60, 64, 70;   --glass-a: .55; }
body[data-glass="blue"]     { --glass-rgb: 40, 100, 210; --glass-a: .5; }
body[data-glass="teal"]     { --glass-rgb: 20, 140, 150; --glass-a: .5; }
body[data-glass="red"]      { --glass-rgb: 200, 40, 40;  --glass-a: .5; }
body[data-glass="orange"]   { --glass-rgb: 235, 135, 20; --glass-a: .5; }
body[data-glass="pink"]     { --glass-rgb: 225, 100, 185; --glass-a: .5; }
body[data-glass="frost"]    { --glass-rgb: 225, 236, 248; --glass-a: .6; }
body[data-glass="violet"]   { --glass-rgb: 110, 70, 190; --glass-a: .5; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: var(--fs);
  color: var(--text);
  background: #0b2a3a;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
img { border: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
.hidden { display: none !important; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 1px dotted #000; outline-offset: 1px; }
.on-glass :focus-visible, .taskbar :focus-visible, .sm-right :focus-visible { outline-color: #fff; }

/* Transparency off → solid opaque frames (also the fallback when
   backdrop-filter is unsupported). */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass-a: .92; --glass-a-inactive: .85; }
}
body[data-transparency="off"] { --glass-a: .94; --glass-a-inactive: .88; }
body[data-transparency="off"] .glass { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }

/* ---------- Scrollbars (Vista) ---------- */
.vscroll, .win-client *, .sm-left, .ie-page, .np-text {
  scrollbar-width: auto;
  scrollbar-color: #c2c6cc #f0f0f0;
}
::-webkit-scrollbar { width: 17px; height: 17px; }
::-webkit-scrollbar-track { background: linear-gradient(90deg, #e5e5e5, #f4f4f4 30%, #f4f4f4 70%, #e9e9e9); }
::-webkit-scrollbar-track:horizontal { background: linear-gradient(#e5e5e5, #f4f4f4 30%, #f4f4f4 70%, #e9e9e9); }
::-webkit-scrollbar-thumb {
  border: 1px solid #9a9a9a; border-radius: 3px;
  background:
    linear-gradient(90deg, transparent 6px, #8c8c8c 6px, #8c8c8c 7px, transparent 7px, transparent 9px, #8c8c8c 9px, #8c8c8c 10px, transparent 10px) center / 15px 7px no-repeat,
    linear-gradient(90deg, #f3f3f3, #e3e3e3 45%, #d3d3d3 55%, #dcdcdc);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.8);
}
::-webkit-scrollbar-thumb:horizontal {
  background:
    linear-gradient(transparent 6px, #8c8c8c 6px, #8c8c8c 7px, transparent 7px, transparent 9px, #8c8c8c 9px, #8c8c8c 10px, transparent 10px) center / 7px 15px no-repeat,
    linear-gradient(#f3f3f3, #e3e3e3 45%, #d3d3d3 55%, #dcdcdc);
}
::-webkit-scrollbar-thumb:hover {
  border-color: #3c7fb1;
  background-color: #d9f0fc;
  background-image:
    linear-gradient(90deg, transparent 6px, #3c7fb1 6px, #3c7fb1 7px, transparent 7px, transparent 9px, #3c7fb1 9px, #3c7fb1 10px, transparent 10px),
    linear-gradient(90deg, #eaf6fd, #d9f0fc 45%, #bee6fd 55%, #a7d9f5);
}
::-webkit-scrollbar-corner { background: #f0f0f0; }
::-webkit-scrollbar-button:single-button { height: 17px; width: 17px; background: #f0f0f0 center no-repeat; }
::-webkit-scrollbar-button:single-button:vertical:decrement { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4'%3E%3Cpath d='M0 4L3.5 0 7 4z' fill='%23333'/%3E%3C/svg%3E"); }
::-webkit-scrollbar-button:single-button:vertical:increment { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4'%3E%3Cpath d='M0 0L3.5 4 7 0z' fill='%23333'/%3E%3C/svg%3E"); }
::-webkit-scrollbar-button:single-button:horizontal:decrement { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='7'%3E%3Cpath d='M4 0L0 3.5 4 7z' fill='%23333'/%3E%3C/svg%3E"); }
::-webkit-scrollbar-button:single-button:horizontal:increment { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='7'%3E%3Cpath d='M0 0L4 3.5 0 7z' fill='%23333'/%3E%3C/svg%3E"); }
.dark-scroll { scrollbar-color: rgba(255,255,255,.3) transparent; }
.dark-scroll::-webkit-scrollbar { width: 8px; }
.dark-scroll::-webkit-scrollbar-track { background: transparent; }
.dark-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border: 0; box-shadow: none; }
.dark-scroll::-webkit-scrollbar-button { display: none; }

/* ======================================================================
   COMMON CONTROLS
   ====================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 75px; height: 23px; padding: 0 12px;
  border: 1px solid #707070; border-radius: 3px;
  background: linear-gradient(#f2f2f2 0%, #ebebeb 49%, #dddddd 50%, #cfcfcf 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.75);
  color: #000; font-size: 12px; line-height: 1; white-space: nowrap; cursor: default;
  transition: background .15s, border-color .15s;
  text-decoration: none !important;
}
.btn:hover { border-color: #3c7fb1; background: linear-gradient(#eaf6fd 0%, #d9f0fc 49%, #bee6fd 50%, #a7d9f5 100%); color: #000; }
.btn:active { border-color: #2c628b; background: linear-gradient(#e5f4fc 0%, #c4e5f6 49%, #98d1ef 50%, #68b3db 100%); box-shadow: inset 1px 1px 2px rgba(0,0,0,.35); }
.btn.default { border-color: #3399ff; box-shadow: inset 0 0 0 1px #c0e6ff, 0 0 0 0 transparent; animation: btnPulse 2.4s ease-in-out infinite; }
@keyframes btnPulse { 50% { box-shadow: inset 0 0 0 1px #c0e6ff, inset 0 0 3px 1px #9bd4ff; } }
.btn:disabled, .btn.disabled { border-color: #adb2b5; background: #f4f4f4; color: #838383; box-shadow: none; animation: none; }
.btn:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }
.btn img { width: 16px; height: 16px; }

.input, .select, textarea.input {
  height: 22px; padding: 2px 4px;
  border: 1px solid #abadb3; border-top-color: #abadb3;
  border-radius: 2px; background: #fff; color: #000; font-size: 12px;
  box-shadow: inset 0 1px 0 #e3e9ef;
  outline: none;
}
textarea.input { height: auto; resize: vertical; padding: 4px; line-height: 1.4; }
.input:hover, .select:hover { border-color: #5794bf #b7d5ea #c7e2f1 #c5daed; }
.input:focus, .select:focus { border-color: #3d7bad #a4c9e3 #b7d9ed #b5cfe7; }
.input::placeholder { color: #6d6d6d; font-style: italic; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 20px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4'%3E%3Cpath d='M0 0L3.5 4 7 0z' fill='%23000'/%3E%3C/svg%3E") right 6px center no-repeat,
    linear-gradient(#f2f2f2, #ebebeb 49%, #dddddd 50%, #cfcfcf);
  border-color: #707070; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.7);
}
label.check { display: inline-flex; align-items: center; gap: 6px; cursor: default; }
label.check input { width: 13px; height: 13px; margin: 0; accent-color: #3c7fb1; }

.link-cmd { /* command link with green arrow */
  display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px 8px 8px;
  border: 1px solid transparent; border-radius: 3px; color: #151c55; cursor: default; text-decoration: none !important;
}
.link-cmd::before { content: ""; flex: 0 0 18px; height: 18px; background: url("../assets/shell/arrow-green.svg") center / 18px no-repeat; margin-top: 1px; }
.link-cmd b { display: block; font-size: 14px; font-weight: 400; color: #151c55; }
.link-cmd small { display: block; font-size: 12px; color: #151c55; opacity: .85; margin-top: 2px; }
.link-cmd:hover { border-color: #c6c6c6; background: linear-gradient(#fdfdfd, #f0f0f0); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.link-cmd:hover b { color: #072ba6; }

.groupbox { border: 1px solid #d5dfe5; border-radius: 3px; padding: 14px 10px 10px; position: relative; margin-top: 10px; }
.groupbox > legend, .groupbox > .gb-title { position: absolute; top: -8px; left: 8px; padding: 0 3px; background: #fff; color: #1e3287; }

.progress {
  height: 15px; border: 1px solid #bcbcbc; border-radius: 3px; overflow: hidden; position: relative;
  background: linear-gradient(#f3f3f3, #e0e0e0 50%, #d8d8d8 51%, #e8e8e8);
}
.progress > i {
  display: block; height: 100%; border-radius: 2px;
  background: linear-gradient(#cffecf, #8dde8d 45%, #33cc33 46%, #5ee55e);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4);
  position: relative; overflow: hidden;
}
.progress > i::after {
  content: ""; position: absolute; inset: 0; width: 60px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent);
  animation: pbSweep 2.2s linear infinite;
}
@keyframes pbSweep { from { transform: translateX(-60px); } to { transform: translateX(600px); } }

/* Tabs (property-sheet style) */
.tabs { display: flex; gap: 0; padding: 0 6px; border-bottom: 1px solid #898c95; position: relative; z-index: 1; }
.tab {
  padding: 3px 10px 3px; margin-right: -1px; margin-bottom: -1px; cursor: default;
  border: 1px solid #898c95; border-bottom: 0; border-radius: 3px 3px 0 0;
  background: linear-gradient(#f2f2f2, #ebebeb 50%, #dddddd 51%, #cfcfcf);
  font-size: 12px; color: #000; position: relative; top: 2px;
}
.tab:hover { background: linear-gradient(#eaf6fd, #d9f0fc 50%, #bee6fd 51%, #a7d9f5); }
.tab[aria-selected="true"] { background: #fff; top: 0; padding-bottom: 6px; z-index: 2; border-bottom: 1px solid #fff; }
.tabpanel { border: 1px solid #898c95; border-top: 0; background: #fff; }

/* List view (details) */
.lv { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.lv thead th {
  position: sticky; top: 0; z-index: 1;
  text-align: left; font-weight: 400; color: #4c607a; height: 24px; padding: 0 8px;
  background: linear-gradient(#fff, #fff 50%, #f7f8fa 51%, #f1f2f4);
  border-bottom: 1px solid #d5d5d5; border-right: 1px solid #e3e3e3; white-space: nowrap;
}
.lv thead th:hover { background: linear-gradient(#f3fcfe, #f3fcfe 50%, #e2f5fd 51%, #d3effc); border-right-color: #c1e9fb; }
.lv tbody td { padding: 0 8px; height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-top: 1px solid transparent; border-bottom: 1px solid transparent; }
.lv tbody td:first-child { border-left: 1px solid transparent; border-radius: 3px 0 0 3px; }
.lv tbody td:last-child { border-right: 1px solid transparent; border-radius: 0 3px 3px 0; }
.lv tbody tr { cursor: default; }
.lv tbody tr:hover td { background: var(--hover-bg); border-color: var(--hover-border); }
.lv tbody tr:hover td:not(:first-child) { border-left-color: transparent; }
.lv tbody tr:hover td:not(:last-child) { border-right-color: transparent; }
.lv tbody tr.sel td { background: var(--sel-bg); border-color: var(--sel-border); }
.lv tbody tr.sel td:not(:first-child) { border-left-color: transparent; }
.lv tbody tr.sel td:not(:last-child) { border-right-color: transparent; }
.lv .ic { display: inline-flex; align-items: center; gap: 6px; }
.lv .ic img { width: 16px; height: 16px; flex: none; }
.lv .num { text-align: right; }
.lv .dim { color: #6d6d6d; }

/* Tree view */
.tree { list-style: none; margin: 0; padding: 0; font-size: 12px; }
.tree ul { list-style: none; margin: 0; padding-left: 16px; }
.tree .node {
  display: flex; align-items: center; gap: 5px; height: 20px; padding: 0 6px 0 2px;
  border: 1px solid transparent; border-radius: 3px; cursor: default; white-space: nowrap;
}
.tree .node:hover { background: var(--hover-bg); border-color: var(--hover-border); }
.tree .node.sel { background: var(--sel-bg); border-color: var(--sel-border); }
.tree .node img { width: 16px; height: 16px; }
.tree .tw { width: 12px; height: 12px; flex: none; position: relative; }
.tree .tw.has::before { content: ""; position: absolute; left: 3px; top: 2px; border: 4px solid transparent; border-left: 5px solid #a6a6a6; }
.tree .tw.has.open::before { left: 1px; top: 4px; border: 4px solid transparent; border-top: 5px solid #595959; border-left-width: 4px; transform: rotate(-45deg) translate(1px, -1px); }

/* Menus (context menus, menu bar drop-downs) */
.menu {
  position: fixed; z-index: 30000; min-width: 180px; padding: 2px;
  background: #f0f0f0; border: 1px solid #979797;
  box-shadow: 2px 2px 3px rgba(0,0,0,.3);
  font-size: 12px; color: #000; user-select: none;
}
.menu::before { /* icon gutter */
  content: ""; position: absolute; left: 28px; top: 2px; bottom: 2px; width: 1px;
  background: #e2e3e3; box-shadow: 1px 0 0 #fff;
}
.menu .mi {
  position: relative; display: flex; align-items: center; height: 22px; padding: 0 22px 0 32px;
  border: 1px solid transparent; border-radius: 3px; white-space: nowrap; cursor: default;
}
.menu .mi img { position: absolute; left: 5px; width: 16px; height: 16px; }
.menu .mi .key { margin-left: auto; padding-left: 24px; color: #6d6d6d; }
.menu .mi.sub::after { content: ""; position: absolute; right: 8px; top: 7px; border: 4px solid transparent; border-left: 4px solid #000; }
.menu .mi.checked::before { content: "✓"; position: absolute; left: 9px; font-size: 12px; }
.menu .mi.bold { font-weight: 700; }
.menu .mi:hover, .menu .mi.open, .menu .mi:focus {
  outline: none; border-color: #aecff7;
  background: linear-gradient(#f2f7fd, #e3effc);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.8);
}
.menu .mi.dis { color: #8d8d8d; }
.menu .mi.dis:hover { border-color: #d6d6d6; background: linear-gradient(#f9f9f9, #ececec); }
.menu .sep { height: 1px; margin: 3px 2px 3px 30px; background: #e2e3e3; border-bottom: 1px solid #fff; }

/* Menu bar (Notepad, MMC…) */
.menubar { display: flex; height: 20px; padding: 0 2px; background: linear-gradient(#fff, #f0f0f0 60%, #e6e6e6); border-bottom: 1px solid #d6d6d6; font-size: 12px; user-select: none; }
.menubar > div { padding: 0 7px; line-height: 18px; border: 1px solid transparent; border-radius: 2px; cursor: default; }
.menubar > div:hover, .menubar > div.open { border-color: #aecff7; background: linear-gradient(#f2f7fd, #e3effc); }

/* Command bar (Explorer / IE toolbar) — Vista's dark teal-blue strip */
.cmdbar {
  display: flex; align-items: center; gap: 2px; height: 32px; padding: 0 6px;
  background:
    linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,.08) 50%, rgba(0,0,0,0) 51%, rgba(255,255,255,.07)),
    linear-gradient(#3e6f93, #1f4f73 50%, #133e5f 51%, #1f557c);
  border-top: 1px solid #0d2c45; border-bottom: 1px solid #0d2c45;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
  color: #fff; user-select: none;
}
.cmdbar .cb {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px;
  border: 1px solid transparent; border-radius: 3px; color: #fff; font-size: 12px; cursor: default;
  text-shadow: 0 1px 1px rgba(0,0,0,.35); background: none; text-decoration: none !important;
}
.cmdbar .cb img { width: 16px; height: 16px; }
.cmdbar .cb.dd::after { content: ""; border: 3px solid transparent; border-top: 4px solid #fff; margin-top: 4px; margin-left: 2px; }
.cmdbar .cb:hover { border-color: rgba(0,0,0,.55); color: #fff;
  background: linear-gradient(rgba(255,255,255,.45), rgba(255,255,255,.18) 50%, rgba(255,255,255,.06) 51%, rgba(255,255,255,.22));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.cmdbar .cb:active { background: linear-gradient(rgba(0,0,0,.25), rgba(0,0,0,.12)); }
.cmdbar .sp { flex: 1; }
.cmdbar .div { width: 1px; height: 20px; background: rgba(0,0,0,.35); box-shadow: 1px 0 0 rgba(255,255,255,.18); margin: 0 3px; }

/* Explorer navigation bar: back/forward pearls, breadcrumb, search — sits on the glass */
.navbar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 3px 6px 3px 4px; }
.navpearls { display: flex; align-items: center; position: relative; height: 28px; }
.navpearl {
  width: 27px; height: 27px; border-radius: 50%; border: 1px solid rgba(0,0,0,.55); padding: 0; position: relative; z-index: 1;
  background:
    radial-gradient(ellipse 80% 55% at 50% 22%, rgba(255,255,255,.85), rgba(255,255,255,0) 72%),
    radial-gradient(circle at 50% 100%, #6fd0ff, #1b6ec0 60%, #0d3e78);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45), 0 0 2px rgba(0,0,0,.4);
  cursor: default;
}
.navpearl + .navpearl { margin-left: -2px; }
.navpearl::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 10px; margin: -5px 0 0 -6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 10'%3E%3Cpath d='M5 0L0 5l5 5V6.5h6v-3H5z' fill='%23fff' stroke='%23123' stroke-width='.6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.navpearl.fwd::after { transform: scaleX(-1); margin-left: -5px; }
.navpearl:hover { background: radial-gradient(ellipse 80% 55% at 50% 22%, rgba(255,255,255,.9), rgba(255,255,255,0) 72%), radial-gradient(circle at 50% 100%, #a8ecff, #2a8be0 60%, #114f95); box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), 0 0 6px #7fd8ff; }
.navpearl:disabled { filter: grayscale(1) brightness(1.15); opacity: .55; box-shadow: inset 0 0 0 1px rgba(255,255,255,.45); }
.addr {
  flex: 1; display: flex; align-items: center; gap: 0; height: 24px; min-width: 0;
  background: rgba(255,255,255,.92); border: 1px solid rgba(0,0,0,.45); border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6); padding: 0 2px 0 4px; overflow: hidden;
}
.addr > img { width: 16px; height: 16px; margin-right: 4px; flex: none; }
.addr .crumb { height: 20px; padding: 0 4px; border: 1px solid transparent; border-radius: 2px; display: inline-flex; align-items: center; white-space: nowrap; cursor: default; }
.addr .crumb:hover { border-color: #aecff7; background: linear-gradient(#f2f7fd, #e3effc); }
.addr .chev { width: 13px; height: 20px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.addr .chev::before { content: ""; border: 3px solid transparent; border-left: 4px solid #444; margin-left: 4px; }
.addr input.url { flex: 1; border: 0; background: transparent; outline: none; height: 20px; min-width: 0; }
.searchbox {
  width: 190px; height: 24px; display: flex; align-items: center;
  background: rgba(255,255,255,.92); border: 1px solid rgba(0,0,0,.45); border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6); padding: 0 4px;
}
.searchbox input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; height: 20px; font-style: italic; color: #333; }
.searchbox input:focus { font-style: normal; }
.searchbox::after { content: ""; width: 14px; height: 14px; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Ccircle cx='5.5' cy='5.5' r='4' fill='%23e8f4ff' stroke='%23335' stroke-width='1.4'/%3E%3Cpath d='M8.5 8.5l4.5 4.5' stroke='%23335' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center no-repeat; }

/* Details pane (bottom of Explorer) */
.detailspane {
  display: flex; align-items: center; gap: 14px; min-height: 66px; padding: 8px 14px;
  background: linear-gradient(#f9fcfe, #e9f1f8 40%, #d8e6f2);
  border-top: 1px solid #a0b4c8; box-shadow: inset 0 1px 0 #fff; font-size: 12px; color: #000;
}
.detailspane > img { width: 48px; height: 48px; flex: none; filter: drop-shadow(0 2px 2px rgba(0,0,0,.2)); }
.detailspane .dp-name { font-size: 15px; color: #000; }
.detailspane .dp-type { color: #5a5a5a; }
.detailspane .dp-props { display: grid; grid-template-columns: auto auto; column-gap: 8px; row-gap: 2px; margin-left: 16px; }
.detailspane .dp-props dt { color: #5a5a5a; text-align: right; }
.detailspane .dp-props dd { margin: 0; }

/* Status bar */
.statusbar { display: flex; align-items: center; gap: 12px; height: 22px; padding: 0 8px; border-top: 1px solid #d6d6d6; background: linear-gradient(#f7f7f7, #eaeaea); color: #333; font-size: 12px; }
.statusbar > span + span { border-left: 1px solid #c8c8c8; padding-left: 12px; }

/* Task-dialog body layout */
.td { display: flex; flex-direction: column; height: 100%; background: #fff; }
.td-main { flex: 1; display: flex; gap: 12px; padding: 14px 16px 12px; }
.td-main > img { width: 32px; height: 32px; flex: none; }
.td-instr { font-size: 15px; color: var(--instruction); margin: 2px 0 8px; font-weight: 400; }
.td-text { font-size: 12px; line-height: 1.45; }
.td-foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 10px 12px; background: #f0f0f0; border-top: 1px solid #dfdfdf; }
.td-foot .left { margin-right: auto; }

/* ======================================================================
   DESKTOP
   ====================================================================== */
.desktop {
  position: fixed; inset: 0; overflow: hidden;
  background-color: var(--wall-color, #0d4b5c);
  background-image: var(--wall-img, url("../assets/wallpapers/aurora.webp"));
  background-size: cover; background-position: center;
  user-select: none; -webkit-user-select: none;
}
.desktop.solid { background-image: none; }

.icons {
  position: absolute; left: 0; top: 0; bottom: var(--taskbar-h);
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(auto-fill, 86px); grid-auto-columns: 78px;
  gap: 2px 4px; padding: 6px 4px; align-content: start;
}
.icons.large { grid-template-rows: repeat(auto-fill, 112px); grid-auto-columns: 100px; }
.icons.small { grid-template-rows: repeat(auto-fill, 66px); grid-auto-columns: 74px; }
.dicon {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 3px 2px 2px;
  border: 1px solid transparent; border-radius: 3px; cursor: default; outline: none; position: relative;
}
.dicon .dg { width: 48px; height: 48px; position: relative; }
.icons.large .dg { width: 64px; height: 64px; }
.icons.small .dg { width: 32px; height: 32px; }
.dicon .dg img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.dicon .dg .ov { position: absolute; left: 0; bottom: 0; width: 40%; height: 40%; filter: none; }
.dicon .dl {
  max-width: 74px; text-align: center; color: #fff; font-size: 12px; line-height: 1.2;
  text-shadow: 0 0 2px rgba(0,0,0,.9), 0 1px 2px rgba(0,0,0,.9), 1px 1px 1px #000;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word;
}
.dicon:hover { background: rgba(170, 210, 255, .18); border-color: rgba(200, 230, 255, .4); }
.dicon.sel { background: rgba(140, 190, 255, .38); border-color: rgba(190, 225, 255, .75); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.dicon.sel .dl { -webkit-line-clamp: unset; }
.dicon:focus-visible { outline: 1px dotted #fff; outline-offset: -2px; }
.rubber { position: absolute; z-index: 5; border: 1px solid rgba(160, 210, 255, .95); background: rgba(90, 150, 230, .28); pointer-events: none; }

/* ======================================================================
   GLASS (shared by window frames, start menu, taskbar, sidebar)
   ====================================================================== */
.glass {
  background-color: rgba(var(--glass-rgb), var(--glass-a));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
}

/* ======================================================================
   WINDOWS
   ====================================================================== */
#windows { position: absolute; inset: 0 0 var(--taskbar-h) 0; pointer-events: none; }
.win {
  position: absolute; pointer-events: auto; display: flex; flex-direction: column;
  min-width: 180px; min-height: 120px;
  padding: 0 var(--frame) var(--frame);
  border: 1px solid rgba(0,0,0,.7);
  border-radius: 7px 7px 5px 5px;
  background-color: rgba(var(--glass-rgb), var(--glass-a-inactive));
  background-image:
    linear-gradient(118deg, rgba(255,255,255,0) 0 14%, rgba(255,255,255,.16) 14.4% 17%, rgba(255,255,255,0) 17.6% 24%, rgba(255,255,255,.10) 24.4% 26%, rgba(255,255,255,0) 26.6%),
    linear-gradient(rgba(255,255,255,.42), rgba(255,255,255,.12) 30px, rgba(255,255,255,.05) 31px, rgba(255,255,255,.03));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45), 0 3px 14px rgba(0,0,0,.4);
  transform-origin: center;
  animation: winOpen .2s cubic-bezier(.2,.8,.3,1);
}
.win.active {
  background-color: rgba(var(--glass-rgb), var(--glass-a));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55), 0 6px 26px rgba(0,0,0,.55), 0 0 1px rgba(0,0,0,.6);
}
.win.maxed { border-radius: 0; padding: 0; border-left: 0; border-right: 0; border-bottom: 0; }
.win.maxed .win-caption { height: 23px; padding-left: 4px; }
.win.maxed .win-buttons { top: 0; }
@keyframes winOpen { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
.win.closing { animation: winClose .16s ease-in forwards; pointer-events: none; }
@keyframes winClose { to { opacity: 0; transform: scale(.92); } }
.win.minimizing { transition: transform .22s cubic-bezier(.5,0,.8,.5), opacity .22s ease-in; opacity: 0; pointer-events: none; }
.win.min { display: none; }
.win.restoring { transition: transform .2s cubic-bezier(.2,.8,.3,1), opacity .2s; }

.win-caption {
  flex: none; height: var(--caption-h); display: flex; align-items: center; gap: 6px;
  padding: 0 130px 0 2px; cursor: default; position: relative;
}
.win-caption .wi { width: 16px; height: 16px; flex: none; }
.win-title {
  font-size: 12px; color: #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 4px 10px; margin: -4px -4px; line-height: 18px;
  /* Aero text glow: a soft white halo behind black caption text */
  text-shadow: 0 0 8px #fff, 0 0 8px #fff, 0 0 6px #fff, 0 0 3px #fff, 0 0 1px #fff;
}
.win:not(.active) .win-title { color: #333; text-shadow: 0 0 8px rgba(255,255,255,.9), 0 0 6px #fff, 0 0 2px #fff; }

.win-buttons { position: absolute; top: -1px; right: 5px; display: flex; z-index: 2; }
.cbtn {
  width: 27px; height: 19px; padding: 0; margin: 0; position: relative;
  border: 1px solid rgba(0,0,0,.55); border-top: 0; border-right-width: 0;
  background: linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,.28) 48%, rgba(255,255,255,.08) 52%, rgba(255,255,255,.3));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); cursor: default;
}
.cbtn:first-child { border-bottom-left-radius: 4px; }
.cbtn.close { width: 44px; border-right-width: 1px; border-bottom-right-radius: 4px; }
.cbtn svg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.win.active .cbtn.close { background: linear-gradient(#efb1a4, #de8170 46%, #c4402a 52%, #d5684f); box-shadow: inset 0 0 0 1px rgba(255,220,210,.45); }
.cbtn:hover { background: linear-gradient(#e6faff, #b8ecff 48%, #64ccf5 52%, #9fe4ff); box-shadow: inset 0 0 0 1px rgba(255,255,255,.7), 0 0 8px rgba(120,220,255,.9); z-index: 1; }
.cbtn.close:hover, .win.active .cbtn.close:hover { background: linear-gradient(#ffc2b4, #f08a73 46%, #e0371b 52%, #f37a5a); box-shadow: inset 0 0 0 1px rgba(255,230,220,.7), 0 0 9px rgba(255,90,60,.9); }
.cbtn:active { background: linear-gradient(#a7cfe3, #6ba9cb 48%, #2f7fae 52%, #4b9ccb); box-shadow: inset 1px 1px 3px rgba(0,0,0,.5); }
.cbtn.close:active { background: linear-gradient(#d79686, #c0533b 48%, #9b230d 52%, #b84126); }
.cbtn:disabled { opacity: .5; pointer-events: none; }

.win-client {
  flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid rgba(0,0,0,.6);
  box-shadow: 0 0 0 1px rgba(255,255,255,.55);
  overflow: hidden; user-select: text; -webkit-user-select: text;
}
.win.maxed .win-client { border-left: 0; border-right: 0; border-bottom: 0; box-shadow: none; }
.win-body { flex: 1; min-height: 0; overflow: auto; position: relative; }
.win.glass-top .win-client { background: transparent; border: 0; box-shadow: none; } /* Explorer-type: nav bar sits on glass */
.win.glass-top .win-inner { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #fff; border: 1px solid rgba(0,0,0,.6); box-shadow: 0 0 0 1px rgba(255,255,255,.55); overflow: hidden; }
.win.maxed.glass-top .win-inner { border-left: 0; border-right: 0; border-bottom: 0; box-shadow: none; }

/* resize grips */
.rz { position: absolute; z-index: 3; }
.rz.n { top: -4px; left: 8px; right: 8px; height: 8px; cursor: n-resize; }
.rz.s { bottom: -4px; left: 8px; right: 8px; height: 8px; cursor: s-resize; }
.rz.e { right: -4px; top: 8px; bottom: 8px; width: 8px; cursor: e-resize; }
.rz.w { left: -4px; top: 8px; bottom: 8px; width: 8px; cursor: w-resize; }
.rz.ne { right: -4px; top: -4px; width: 12px; height: 12px; cursor: ne-resize; }
.rz.nw { left: -4px; top: -4px; width: 12px; height: 12px; cursor: nw-resize; }
.rz.se { right: -4px; bottom: -4px; width: 14px; height: 14px; cursor: se-resize; }
.rz.sw { left: -4px; bottom: -4px; width: 12px; height: 12px; cursor: sw-resize; }
.win.maxed .rz, .win.noresize .rz { display: none; }

/* modal dialogs: owner gets a blocking overlay */
.win.dialog { min-width: 260px; }
.win .modal-block { position: absolute; inset: 0; z-index: 50; }
.drag-shield { position: fixed; inset: 0; z-index: 99999; }

/* ======================================================================
   TASKBAR
   ====================================================================== */
.taskbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--taskbar-h); z-index: 20000;
  display: flex; align-items: center;
  background:
    linear-gradient(rgba(255,255,255,.13), rgba(255,255,255,.05) 48%, rgba(0,0,0,.08) 52%, rgba(0,0,0,0)),
    linear-gradient(rgba(30, 36, 44, .78), rgba(4, 6, 10, .9));
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-top: 1px solid rgba(0,0,0,.85);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 -1px 0 rgba(255,255,255,.08);
  color: #fff; user-select: none;
}
body[data-transparency="off"] .taskbar { background: linear-gradient(#2c323a, #0a0c10); }
.start-orb {
  position: relative; flex: none; width: 54px; height: var(--taskbar-h); margin: 0 6px 0 2px;
  border: 0; padding: 0; background: none; cursor: default;
}
.start-orb::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 54px; height: 54px; margin-top: -29px;
  background: url("../assets/shell/orb.svg") center / contain no-repeat;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.6));
}
.start-orb:hover::before { background-image: url("../assets/shell/orb-hover.svg"); }
.start-orb.active::before, .start-orb:active::before { background-image: url("../assets/shell/orb-pressed.svg"); }
.start-orb:focus-visible { outline: none; }
.start-orb:focus-visible::before { filter: drop-shadow(0 0 4px #9fe4ff); }

.quick-launch { display: flex; align-items: center; gap: 0; padding: 0 6px 0 4px; height: 100%; border-right: 1px solid rgba(0,0,0,.6); box-shadow: 1px 0 0 rgba(255,255,255,.12); }
.ql {
  width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 3px; background: none; padding: 0; cursor: default;
}
.ql img { width: 16px; height: 16px; }
.ql:hover { border-color: rgba(0,0,0,.6); background: linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.12) 50%, rgba(255,255,255,.04) 51%, rgba(255,255,255,.16)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }

.tasks { flex: 1; display: flex; align-items: center; gap: 2px; padding: 0 6px; min-width: 0; height: 100%; }
.task {
  flex: 0 1 160px; min-width: 36px; height: 24px; display: flex; align-items: center; gap: 6px; padding: 0 8px 0 6px;
  border: 1px solid rgba(0,0,0,.65); border-radius: 3px; color: #fff; font-size: 12px; cursor: default; overflow: hidden;
  background: linear-gradient(rgba(255,255,255,.2), rgba(255,255,255,.07) 48%, rgba(255,255,255,0) 52%, rgba(255,255,255,.08));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
  text-shadow: 0 1px 1px rgba(0,0,0,.8); position: relative;
}
.task img { width: 16px; height: 16px; flex: none; }
.task span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task:hover { background: linear-gradient(rgba(255,255,255,.34), rgba(255,255,255,.15) 48%, rgba(255,255,255,.06) 52%, rgba(255,255,255,.2)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.3), 0 0 6px rgba(140,200,255,.25); }
.task.active {
  background: linear-gradient(rgba(170,210,255,.38), rgba(120,170,230,.22) 48%, rgba(60,110,180,.22) 52%, rgba(110,170,240,.38));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), inset 0 0 8px rgba(120,190,255,.6);
}
.task.flash { animation: taskFlash .6s ease-in-out 6 alternate; }
@keyframes taskFlash { to { background: linear-gradient(#ffd27a, #f0a020 50%, #d48000 51%, #f2b44a); } }

.tray {
  display: flex; align-items: center; gap: 2px; height: 100%; padding: 0 4px 0 8px;
  border-left: 1px solid rgba(0,0,0,.65); box-shadow: inset 1px 0 0 rgba(255,255,255,.1);
  background: linear-gradient(rgba(255,255,255,.04), rgba(0,0,0,.06));
}
.tray-btn {
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 3px; background: none; padding: 0; cursor: default; color: #fff;
}
.tray-btn img, .tray-btn svg { width: 16px; height: 16px; }
.tray-btn:hover { border-color: rgba(0,0,0,.5); background: rgba(255,255,255,.14); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.clock {
  height: 24px; padding: 0 8px; margin-left: 4px; display: flex; align-items: center;
  border: 1px solid transparent; border-radius: 3px; font-size: 12px; color: #fff; background: none; cursor: default;
  text-shadow: 0 1px 1px #000; white-space: nowrap;
}
.clock:hover { border-color: rgba(0,0,0,.5); background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }

/* Live thumbnail */
.thumb {
  position: fixed; z-index: 21000; padding: 6px 8px 8px; width: 210px; pointer-events: none;
  border: 1px solid rgba(0,0,0,.7); border-radius: 6px;
  background: rgba(18, 26, 36, .78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.3), 0 4px 16px rgba(0,0,0,.5);
  color: #fff; font-size: 12px; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s;
}
.thumb.show { opacity: 1; transform: none; }
.thumb .tt { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 1px #000; }
.thumb .tt img { width: 16px; height: 16px; }
.thumb .tv { position: relative; height: 120px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.thumb .tv > .win { position: absolute; left: 0; top: 0; transform-origin: 0 0; animation: none; pointer-events: none; }

/* Tooltip */
.tip {
  position: fixed; z-index: 32000; max-width: 320px; padding: 3px 7px 4px; pointer-events: none;
  background: linear-gradient(#fff, #e4e5f0); border: 1px solid #767676; border-radius: 3px;
  box-shadow: 1px 2px 3px rgba(0,0,0,.25); color: #575757; font-size: 12px;
}
/* Balloon notification */
.balloon {
  position: fixed; z-index: 25000; width: 300px; padding: 10px 28px 12px 12px;
  background: linear-gradient(#fff, #e4e5f0); border: 1px solid #767676; border-radius: 6px;
  box-shadow: 2px 3px 6px rgba(0,0,0,.35); color: #000; font-size: 12px; cursor: default;
  animation: balloonIn .25s ease-out;
}
.balloon::after { content: ""; position: absolute; bottom: -10px; right: 40px; border: 10px solid transparent; border-bottom: 0; border-top-color: #e4e5f0; filter: drop-shadow(0 1px 0 #767676); }
.balloon .bt { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 4px; }
.balloon .bt img { width: 16px; height: 16px; }
.balloon .bx { position: absolute; right: 6px; top: 6px; width: 16px; height: 16px; border: 0; background: none; color: #555; font-size: 14px; line-height: 14px; padding: 0; }
.balloon .bx:hover { color: #000; background: #ddd; border-radius: 2px; }
@keyframes balloonIn { from { opacity: 0; transform: translateY(6px); } }

/* ======================================================================
   START MENU
   ====================================================================== */
.start-menu {
  position: absolute; left: 0; bottom: var(--taskbar-h); z-index: 20500;
  width: 404px; height: 520px; max-height: calc(100vh - var(--taskbar-h));
  padding: 8px 8px 8px 8px;
  border: 1px solid rgba(0,0,0,.75); border-bottom: 0; border-radius: 7px 7px 0 0;
  background-color: rgba(var(--glass-rgb), calc(var(--glass-a) + .12));
  background-image:
    linear-gradient(118deg, rgba(255,255,255,0) 0 52%, rgba(255,255,255,.10) 52.5% 55%, rgba(255,255,255,0) 55.5%),
    linear-gradient(rgba(255,255,255,.18), rgba(255,255,255,.02) 40px, rgba(0,0,0,.1)),
    linear-gradient(rgba(10,20,32,.42), rgba(10,20,32,.5));
  -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4), 2px 0 16px rgba(0,0,0,.5);
  display: grid; grid-template-columns: 250px 1fr; grid-template-rows: 1fr 34px; column-gap: 6px;
  color: #fff; user-select: none;
  transform-origin: bottom left; opacity: 0; transform: translateY(8px); pointer-events: none; visibility: hidden;
  transition: opacity .14s ease-out, transform .14s ease-out, visibility 0s .14s;
}
.start-menu.open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .14s ease-out, transform .14s ease-out; }
.sm-left {
  grid-row: 1; grid-column: 1; display: flex; flex-direction: column; min-height: 0;
  background: #fff; color: #000; border: 1px solid rgba(0,0,0,.55); border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.45);
}
.sm-list { flex: 1; overflow-y: auto; padding: 5px 4px; }
.sm-item {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px; margin-bottom: 1px;
  border: 1px solid transparent; border-radius: 3px; cursor: default; color: #000; outline: none;
}
.sm-item img { width: 32px; height: 32px; flex: none; }
.sm-item .t { display: flex; flex-direction: column; min-width: 0; }
.sm-item .t b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-item .t span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-item .t small { color: #6d6d6d; font-size: 12px; }
.sm-item:hover, .sm-item:focus, .sm-item.kb { background: linear-gradient(#f0f7fe, #d8eafc); border-color: #a8cdf3; box-shadow: inset 0 0 0 1px rgba(255,255,255,.8); }
.sm-sep { height: 1px; margin: 4px 6px; background: linear-gradient(90deg, transparent, #d5dce4 15%, #d5dce4 85%, transparent); }
.sm-small .sm-item { height: 24px; }
.sm-small .sm-item img { width: 16px; height: 16px; }
.sm-group { padding: 4px 8px 2px; color: #1e3287; font-weight: 600; }
.sm-tree .sm-item { height: 22px; }
.sm-tree .sm-item img { width: 16px; height: 16px; }
.sm-tree .sm-item.folder { font-weight: 400; }
.sm-tree .sm-sub { padding-left: 18px; }
.sm-all {
  display: flex; align-items: center; gap: 6px; height: 26px; margin: 0 4px 4px; padding: 0 8px;
  border: 1px solid transparent; border-radius: 3px; font-weight: 600; color: #000; cursor: default; outline: none;
}
.sm-all::before { content: ""; width: 0; height: 0; border: 5px solid transparent; border-left: 6px solid #2f8b2f; filter: drop-shadow(0 1px 0 rgba(0,0,0,.2)); }
.sm-all.back::before { border-left: 0; border-right: 6px solid #2f8b2f; }
.sm-all:hover, .sm-all:focus { background: linear-gradient(#f0f7fe, #d8eafc); border-color: #a8cdf3; }
.sm-search {
  grid-row: 2; grid-column: 1; align-self: center; display: flex; align-items: center; height: 26px; padding: 0 6px;
  background: rgba(255,255,255,.95); border: 1px solid rgba(0,0,0,.55); border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.4), inset 0 1px 2px rgba(0,0,0,.15);
}
.sm-search input { flex: 1; border: 0; outline: none; background: transparent; font-style: italic; color: #000; min-width: 0; }
.sm-search input:focus { font-style: normal; }
.sm-search::after { content: ""; width: 14px; height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Ccircle cx='5.5' cy='5.5' r='4' fill='%23e8f4ff' stroke='%23335' stroke-width='1.4'/%3E%3Cpath d='M8.5 8.5l4.5 4.5' stroke='%23335' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center no-repeat; }
.sm-right { grid-row: 1; grid-column: 2; display: flex; flex-direction: column; padding: 58px 0 4px; min-height: 0; position: relative; }
.sm-pic {
  position: absolute; top: -30px; left: 50%; margin-left: -34px; width: 68px; height: 68px; padding: 7px;
  border-radius: 6px; border: 1px solid rgba(0,0,0,.6);
  background: linear-gradient(rgba(255,255,255,.75), rgba(255,255,255,.3) 50%, rgba(255,255,255,.18) 51%, rgba(255,255,255,.45));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), 0 2px 6px rgba(0,0,0,.4);
}
.sm-pic img { width: 52px; height: 52px; border-radius: 2px; display: block; object-fit: cover; border: 1px solid rgba(0,0,0,.35); background: #fff; }
.sm-pic img.icon { object-fit: contain; border: 0; background: transparent; padding: 2px; }
.sm-link {
  display: flex; align-items: center; height: 31px; padding: 0 10px; margin: 0 2px;
  border: 1px solid transparent; border-radius: 3px; font-size: 12px; color: #fff; cursor: default; outline: none;
  text-shadow: 0 0 6px rgba(0,0,0,.55), 0 1px 1px rgba(0,0,0,.6);
}
.sm-link.user { font-weight: 600; }
.sm-link:hover, .sm-link:focus { border-color: rgba(0,0,0,.45); background: linear-gradient(rgba(255,255,255,.42), rgba(255,255,255,.16) 50%, rgba(255,255,255,.06) 51%, rgba(255,255,255,.2)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.sm-rsep { height: 1px; margin: 4px 8px; background: rgba(0,0,0,.25); box-shadow: 0 1px 0 rgba(255,255,255,.18); }
.sm-power { grid-row: 2; grid-column: 2; display: flex; align-items: center; justify-content: flex-end; gap: 0; padding-right: 2px; }
.pbtn {
  width: 38px; height: 26px; border: 1px solid rgba(0,0,0,.65); padding: 0; position: relative; cursor: default;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4);
}
.pbtn svg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.pbtn.power { border-radius: 4px 0 0 4px; background: linear-gradient(#f7c08b, #ec8f3b 48%, #d26206 52%, #e9883a); }
.pbtn.power:hover { background: linear-gradient(#ffd7a6, #f8a55a 48%, #e87510 52%, #fa9c48); box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), 0 0 8px rgba(255,170,80,.9); }
.pbtn.lock { border-left: 0; border-radius: 0; background: linear-gradient(#e9eef3, #c7d1da 48%, #a5b3c1 52%, #c4cfdb); }
.pbtn.lock:hover { background: linear-gradient(#f5f9fc, #d7e6f2 48%, #b0cbe2 52%, #d3e3f2); box-shadow: inset 0 0 0 1px rgba(255,255,255,.7), 0 0 7px rgba(170,215,255,.9); }
.pbtn.more { width: 20px; border-left: 0; border-radius: 0 4px 4px 0; background: linear-gradient(rgba(255,255,255,.45), rgba(255,255,255,.18) 50%, rgba(255,255,255,.06) 51%, rgba(255,255,255,.25)); }
.pbtn.more:hover { background: linear-gradient(rgba(255,255,255,.65), rgba(255,255,255,.3) 50%, rgba(255,255,255,.15) 51%, rgba(255,255,255,.35)); }

/* ======================================================================
   SIDEBAR + GADGETS
   ====================================================================== */
.sidebar {
  position: absolute; top: 0; right: 0; bottom: var(--taskbar-h); width: var(--sidebar-w); z-index: 10;
  padding: 28px 10px 8px; display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: linear-gradient(90deg, rgba(0,0,0,0), rgba(0,0,0,.28) 12px, rgba(0,0,0,.36));
  border-left: 1px solid rgba(255,255,255,.12);
  overflow: hidden; user-select: none;
}
.sidebar.hidden-bar { display: none; }
.sb-top { position: absolute; top: 4px; right: 8px; left: 8px; display: flex; justify-content: flex-end; gap: 2px; opacity: .6; transition: opacity .2s; }
.sidebar:hover .sb-top { opacity: 1; }
.sb-top button { width: 18px; height: 18px; border: 1px solid transparent; border-radius: 3px; background: none; color: #fff; padding: 0; font-size: 13px; line-height: 15px; cursor: default; text-shadow: 0 1px 2px #000; }
.sb-top button:hover { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.15); }
.gadget { position: relative; width: 130px; flex: none; color: #fff; cursor: default; }
.gadget .gx { position: absolute; right: -6px; top: -6px; width: 14px; height: 14px; display: none; border-radius: 3px; border: 1px solid rgba(0,0,0,.6); background: linear-gradient(#f0b0a0, #c4402a); color: #fff; font-size: 9px; line-height: 12px; text-align: center; padding: 0; }
.gadget:hover .gx { display: block; }
.g-panel {
  border-radius: 6px; border: 1px solid rgba(0,0,0,.55);
  background: linear-gradient(rgba(255,255,255,.22), rgba(255,255,255,.06) 40%, rgba(0,0,0,.18));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), 0 2px 6px rgba(0,0,0,.35);
  padding: 8px 9px;
}
.g-title { font-size: 11px; color: rgba(255,255,255,.75); margin-bottom: 4px; text-shadow: 0 1px 1px #000; }

/* Clock gadget */
.g-clock { width: 130px; height: 130px; }
.g-clock .face {
  position: absolute; inset: 4px; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #ffffff 0%, #f1f3f5 55%, #d6dbe0 100%);
  border: 4px solid transparent;
  box-shadow: 0 0 0 1px #4d5763, inset 0 0 0 1px rgba(0,0,0,.25), 0 4px 10px rgba(0,0,0,.5), inset 0 -6px 12px rgba(0,0,0,.08);
  background-clip: padding-box;
}
.g-clock .rim { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 200deg, #f4f6f8, #8d96a0, #eef1f4, #6c7681, #f4f6f8); -webkit-mask: radial-gradient(circle, transparent 57px, #000 58px); mask: radial-gradient(circle, transparent 57px, #000 58px); box-shadow: 0 3px 8px rgba(0,0,0,.5); }
.g-clock .tick { position: absolute; left: 50%; top: 10px; width: 2px; height: 6px; margin-left: -1px; background: #4a4a4a; transform-origin: 1px 55px; border-radius: 1px; }
.g-clock .tick.big { width: 3px; height: 10px; margin-left: -1.5px; transform-origin: 1.5px 55px; background: #222; }
.g-clock .hand { position: absolute; left: 50%; bottom: 50%; transform-origin: 50% 100%; border-radius: 2px; }
.g-clock .h { width: 5px; height: 30px; margin-left: -2.5px; background: linear-gradient(90deg, #333, #111); }
.g-clock .m { width: 3.5px; height: 44px; margin-left: -1.75px; background: linear-gradient(90deg, #333, #111); }
.g-clock .s { width: 1.5px; height: 50px; margin-left: -.75px; background: #d01818; }
.g-clock .s::after { content: ""; position: absolute; left: 50%; bottom: -10px; width: 1.5px; height: 10px; margin-left: -.75px; background: #d01818; }
.g-clock .pin { position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff8888, #b40000); box-shadow: 0 1px 2px rgba(0,0,0,.6); }
.g-clock .gloss { position: absolute; left: 14px; right: 14px; top: 10px; height: 52px; border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%; background: linear-gradient(rgba(255,255,255,.75), rgba(255,255,255,0)); pointer-events: none; }
.g-clock .brand { position: absolute; left: 0; right: 0; top: 30px; text-align: center; font-size: 9px; color: #666; letter-spacing: .04em; }

/* Calendar gadget */
.g-cal { width: 130px; height: 120px; border-radius: 6px; overflow: hidden; border: 1px solid rgba(0,0,0,.6); box-shadow: 0 3px 8px rgba(0,0,0,.45); background: #fff; text-align: center; color: #000; }
.g-cal .mo { height: 26px; line-height: 26px; color: #fff; font-size: 13px; background: linear-gradient(#f5a248, #e3741e 50%, #d0600e 51%, #e57e2c); text-shadow: 0 1px 1px rgba(0,0,0,.4); }
.g-cal .dn { font-size: 54px; font-weight: 300; line-height: 60px; color: #222; }
.g-cal .wd { font-size: 12px; color: #555; margin-top: -4px; }

/* CPU meter gadget */
.g-cpu { width: 130px; height: 92px; }
.g-cpu .plate { position: absolute; inset: 0; border-radius: 10px; background: linear-gradient(#5a6570, #1e252c 60%, #2d363f); border: 1px solid #0b0f13; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 3px 8px rgba(0,0,0,.5); }
.g-cpu .dial { position: absolute; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #fdfdfd, #d9dde1 70%, #9aa3ad); border: 2px solid #3b444d; box-shadow: inset 0 2px 6px rgba(0,0,0,.35), 0 1px 0 rgba(255,255,255,.2); }
.g-cpu .d1 { left: 6px; top: 6px; width: 70px; height: 70px; }
.g-cpu .d2 { right: 6px; top: 26px; width: 52px; height: 52px; }
.g-cpu .needle { position: absolute; left: 50%; bottom: 50%; width: 2px; margin-left: -1px; background: #d42020; transform-origin: 50% 100%; transition: transform .8s cubic-bezier(.3,1.4,.6,1); border-radius: 1px; }
.g-cpu .d1 .needle { height: 28px; }
.g-cpu .d2 .needle { height: 20px; }
.g-cpu .dial .scale { position: absolute; inset: 4px; border-radius: 50%; background: conic-gradient(from 225deg, #3a3 0 120deg, #eb2 120deg 200deg, #d33 200deg 270deg, transparent 270deg); -webkit-mask: radial-gradient(circle, transparent 62%, #000 64%, #000 74%, transparent 76%); mask: radial-gradient(circle, transparent 62%, #000 64%, #000 74%, transparent 76%); opacity: .8; }
.g-cpu .val { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-size: 10px; color: #222; font-weight: 700; }
.g-cpu .d2 .val { bottom: 7px; font-size: 9px; }
.g-cpu .lbl { position: absolute; bottom: 3px; font-size: 9px; color: #cfd8e0; text-shadow: 0 1px 1px #000; }

/* Notes gadget */
.g-notes { width: 130px; min-height: 110px; padding: 10px 10px 12px; color: #2b2b2b; font-size: 12px; line-height: 1.35;
  background: linear-gradient(#fff8b8, #fdec7a); border: 1px solid #c8b54a; box-shadow: 0 3px 8px rgba(0,0,0,.45);
  font-family: "Segoe Print", "Segoe UI", "Selawik", sans-serif; transform: rotate(-1.2deg); }
.g-notes .pg { position: absolute; right: 6px; bottom: 3px; font-size: 10px; color: #8a7a20; font-family: var(--font); }

/* Feed gadget */
.g-feed .fi { display: block; padding: 4px 5px; border-radius: 3px; color: #fff; font-size: 11.5px; line-height: 1.3; text-shadow: 0 1px 1px #000; border: 1px solid transparent; text-decoration: none; }
.g-feed .fi:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.25); text-decoration: none; color: #fff; }
.g-feed .fi small { display: block; color: rgba(255,255,255,.6); font-size: 10px; }

/* ======================================================================
   BOOT / LOGON / LOCK / SHUTDOWN / BSOD / SCREENSAVER
   ====================================================================== */
.screen { position: fixed; inset: 0; z-index: 40000; }
.boot { background: #000; color: #c0c0c0; font-family: var(--mono); font-size: 14px; cursor: default; }
.boot-post { padding: 24px 28px; line-height: 1.45; overflow: hidden; }
.boot-post .ok { color: #55ff55; } .boot-post .key { color: #55ffff; } .boot-post .dim { color: #7a7a7a; }
.boot-post .hd { color: #fff; margin-bottom: 14px; }
.boot-skip { position: absolute; left: 28px; bottom: 20px; color: #777; font-size: 13px; }
.boot-load { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.boot-load .bar { width: 182px; height: 16px; margin-top: 30vh; border: 1px solid #555; border-radius: 3px; padding: 2px; overflow: hidden; position: relative; background: #000; box-shadow: inset 0 0 0 1px #222; }
.boot-load .bar i { position: absolute; top: 2px; bottom: 2px; width: 34px; left: -40px; border-radius: 1px;
  background: linear-gradient(90deg, transparent 0 1px, #2ebd2e 1px 9px, transparent 9px 12px, #39d339 12px 20px, transparent 20px 23px, #2ebd2e 23px 31px, transparent 31px);
  box-shadow: 0 0 4px rgba(60,220,60,.6); animation: bootBar 1.6s linear infinite; }
@keyframes bootBar { to { left: 186px; } }
.boot-load .foot { position: absolute; bottom: 7vh; color: #8a8a8a; font-family: var(--font); font-size: 12px; text-align: center; }
.boot-load .foot b { color: #d8d8d8; font-weight: 400; font-size: 14px; }

.logon {
  display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; user-select: none;
  background: #0a3a4f url("../assets/wallpapers/logon.webp") center / cover no-repeat;
}
.logon::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, rgba(0,0,0,0) 30%, rgba(0,0,0,.35)); pointer-events: none; }
.logon > * { position: relative; }
.lg-tile {
  width: 128px; height: 128px; padding: 14px; border-radius: 10px; border: 1px solid rgba(0,0,0,.55); cursor: default;
  background: linear-gradient(rgba(255,255,255,.7), rgba(255,255,255,.25) 50%, rgba(255,255,255,.12) 51%, rgba(255,255,255,.4));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.65), 0 4px 18px rgba(0,0,0,.45);
  outline: none; transition: box-shadow .2s;
}
.lg-tile:hover, .lg-tile:focus-visible { box-shadow: inset 0 0 0 1px rgba(255,255,255,.85), 0 0 22px rgba(140,220,255,.75), 0 4px 18px rgba(0,0,0,.45); }
.lg-tile img { width: 98px; height: 98px; display: block; object-fit: cover; border-radius: 3px; border: 1px solid rgba(0,0,0,.4); }
.lg-name { margin-top: 14px; font-size: 26px; font-weight: 300; text-shadow: 0 1px 6px rgba(0,0,0,.55); }
.lg-sub { margin-top: 2px; font-size: 13px; color: rgba(255,255,255,.82); text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.lg-pass { margin-top: 16px; display: flex; align-items: center; gap: 6px; }
.lg-pass input {
  width: 190px; height: 25px; padding: 0 6px; border: 1px solid rgba(0,0,0,.6); border-radius: 2px;
  background: rgba(255,255,255,.95); box-shadow: inset 0 1px 2px rgba(0,0,0,.25), 0 0 0 1px rgba(255,255,255,.35); outline: none;
}
.lg-go {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(0,0,0,.6); padding: 0; position: relative; cursor: default;
  background: radial-gradient(ellipse 80% 55% at 50% 22%, rgba(255,255,255,.85), rgba(255,255,255,0) 72%), radial-gradient(circle at 50% 100%, #6fd0ff, #1b6ec0 60%, #0d3e78);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45), 0 1px 3px rgba(0,0,0,.4);
}
.lg-go::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 10px; margin: -5px 0 0 -6px; transform: scaleX(-1);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 10'%3E%3Cpath d='M5 0L0 5l5 5V6.5h6v-3H5z' fill='%23fff' stroke='%23123' stroke-width='.6'/%3E%3C/svg%3E") center / contain no-repeat; }
.lg-go:hover { box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), 0 0 8px #7fd8ff; }
.lg-hint { margin-top: 10px; font-size: 12px; color: rgba(255,255,255,.75); text-shadow: 0 1px 2px #000; }
.lg-quick { margin-top: 26px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; max-width: 520px; }
.lg-quick a { color: #fff; font-size: 12px; padding: 4px 10px; border: 1px solid transparent; border-radius: 3px; text-shadow: 0 1px 2px #000; text-decoration: none; }
.lg-quick a:hover { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.14); color: #fff; text-decoration: none; }
.lg-corner { position: absolute; bottom: 24px; display: flex; gap: 8px; }
.lg-corner.l { left: 28px; } .lg-corner.r { right: 28px; }
.lg-round {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(0,0,0,.6); padding: 0; position: relative; cursor: default;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4), 0 2px 5px rgba(0,0,0,.4);
}
.lg-round svg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.lg-round.ease { background: radial-gradient(ellipse 80% 55% at 50% 22%, rgba(255,255,255,.8), rgba(255,255,255,0) 72%), radial-gradient(circle at 50% 100%, #6fd0ff, #1b6ec0 60%, #0d3e78); }
.lg-round.power { background: radial-gradient(ellipse 80% 55% at 50% 22%, rgba(255,255,255,.75), rgba(255,255,255,0) 72%), radial-gradient(circle at 50% 100%, #ff9a7a, #d0321a 60%, #7a1205); }
.lg-round:hover { filter: brightness(1.15); box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), 0 0 10px rgba(255,255,255,.55); }
.lg-brand { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; opacity: .92; }
.lg-brand img { width: 30px; height: 30px; }
.lg-brand .b1 { font-size: 20px; font-weight: 300; letter-spacing: .01em; text-shadow: 0 0 10px rgba(255,255,255,.35); }
.lg-brand .b2 { font-size: 13px; color: rgba(255,255,255,.75); }
.lg-welcome { display: flex; align-items: center; gap: 14px; font-size: 30px; font-weight: 300; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.spin-ring { width: 28px; height: 28px; border-radius: 50%; background: conic-gradient(from 0deg, rgba(120,230,255,0) 0deg, rgba(120,230,255,.95) 300deg, rgba(255,255,255,1) 360deg); -webkit-mask: radial-gradient(circle, transparent 8px, #000 9px); mask: radial-gradient(circle, transparent 8px, #000 9px); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.shutdown { background: #000; color: #fff; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 18px; font-size: 24px; font-weight: 300; }
.shutdown .btn { margin-top: 20px; }

.bsod { background: #0000aa; color: #fff; font-family: "Lucida Console", var(--mono); font-size: 14px; padding: 6vh 6vw; line-height: 1.35; cursor: none; }
.bsod p { margin: 0 0 1em; max-width: 920px; }

.screensaver { background: #000; cursor: none; }
.screensaver canvas { width: 100%; height: 100%; display: block; }

/* ======================================================================
   FLIP 3D
   ====================================================================== */
.flip3d { position: fixed; inset: 0; z-index: 22000; perspective: 1400px; perspective-origin: 30% 30%;
  background: rgba(0, 10, 20, .35); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.flip3d .stage { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.flip3d .card { position: absolute; transform-origin: 50% 50%; transition: transform .35s cubic-bezier(.2,.8,.3,1), opacity .35s; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.flip3d .card > .win { position: relative !important; left: 0 !important; top: 0 !important; animation: none; pointer-events: none; }
.flip3d .hint { position: absolute; left: 0; right: 0; bottom: 48px; text-align: center; color: #fff; text-shadow: 0 1px 3px #000; font-size: 13px; }

/* ======================================================================
   Reduced motion
   ====================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .boot-load .bar i { animation: bootBar 3s linear infinite !important; }
}
body[data-motion="off"] *, body[data-motion="off"] *::before, body[data-motion="off"] *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
