:root {
  --font-win: "Segoe UI Variable", "Segoe UI", "Inter", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --accent: #0067c0;
  --accent-hover: #005a9e;
  --gm-green: #0f5e2c;
  --gm-gold: #f5c518;
  --text-primary: #1a1f2c;
  --text-secondary: #4e5969;
  --text-muted: #768090;
  --acrylic-bg: rgba(244, 249, 255, 0.82);
  --acrylic-strong: rgba(249, 252, 255, 0.94);
  --acrylic-border: rgba(255, 255, 255, 0.72);
  --card-bg: rgba(255, 255, 255, 0.88);
  --card-border: rgba(15, 23, 42, 0.08);
  --hover-bg: rgba(255, 255, 255, 0.65);
  --active-item-bg: rgba(0, 103, 192, 0.12);
  --window-bg: #ffffff;
  --window-header: rgba(243, 247, 253, 0.95);
  --window-shadow: 0 24px 64px rgba(8, 28, 64, 0.3), 0 4px 16px rgba(8, 28, 64, 0.12);
  --taskbar-height: 48px;
  --radius-win: 10px;
}

body.theme-dark {
  --accent: #4cc2ff;
  --accent-hover: #38b6f7;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --acrylic-bg: rgba(24, 30, 44, 0.82);
  --acrylic-strong: rgba(22, 28, 41, 0.94);
  --acrylic-border: rgba(255, 255, 255, 0.14);
  --card-bg: rgba(34, 42, 60, 0.92);
  --card-border: rgba(255, 255, 255, 0.1);
  --hover-bg: rgba(255, 255, 255, 0.1);
  --active-item-bg: rgba(76, 194, 255, 0.18);
  --window-bg: #181f2c;
  --window-header: rgba(28, 35, 49, 0.97);
  --window-shadow: 0 26px 68px rgba(0, 0, 0, 0.62), 0 4px 16px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  height: var(--mob-app-height, 100dvh);
  overflow: hidden;
  font-family: var(--font-win);
  color: var(--text-primary);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  background: #050a14;
}

input, textarea, [contenteditable="true"], pre, code {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

.hidden {
  display: none !important;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

/* ============================================================
   WALLPAPER (Windows 11 & macOS Photographic/3D Wallpapers)
   ============================================================ */
.os-wallpaper {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  transition: background 0.4s ease;
}

.wp-win11-bloom-light { background: #cbe5fb; }
.wp-win11-bloom-dark { background: #071226; }
.wp-win11-captured-motion { background: #d6e4f2; }
.wp-macos-sonoma { background: #1e3a28; }
.wp-macos-sequoia { background: #142a1f; }
.wp-macos-ventura { background: #0468c8; }

.os-wallpaper-custom {
  position: absolute;
  inset: 0;
  background-image: url("/assets/wallpapers/win11-bloom-light.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.36s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.os-wallpaper-custom.wp-switching {
  opacity: 0.72;
  transform: scale(1.018);
}

.win11-acrylic {
  background: var(--acrylic-bg);
  backdrop-filter: blur(30px) saturate(165%);
  -webkit-backdrop-filter: blur(30px) saturate(165%);
  border: 1px solid var(--acrylic-border);
}

/* ============================================================
   LOCK, LOGIN, LOCKOFF OVERLAYS
   ============================================================ */
.os-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.lock-screen {
  cursor: pointer;
  z-index: 9200;
  color: #ffffff;
  text-shadow: 0 4px 24px rgba(0, 20, 50, 0.48);
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1), transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.lock-screen.lock-dismissing {
  opacity: 0;
  transform: translateY(-48px) scale(1.02);
  pointer-events: none;
}

.lock-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 22, 48, 0.2) 0%, rgba(4, 15, 36, 0.42) 100%);
}

.lock-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  padding: 10vh 20px 8vh;
}

.lock-top-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lock-clock {
  font-size: clamp(64px, 10vw, 108px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -2px;
}

.lock-date {
  font-size: clamp(18px, 2.3vw, 24px);
  font-weight: 500;
  opacity: 0.96;
}

.lock-brand-badge {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-weight: 600;
  font-size: 14.5px;
}

.lock-brand-badge img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #fff;
  padding: 2px;
}

.lock-hint {
  margin-top: auto;
}

.lock-hint-pill {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.44);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 14px;
  animation: pulseHint 2.2s ease-in-out infinite;
}

@keyframes pulseHint {
  0%, 100% { opacity: 0.85; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}

.login-screen {
  z-index: 9100;
}

.login-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 26, 52, 0.38);
  backdrop-filter: blur(36px) saturate(145%);
  -webkit-backdrop-filter: blur(36px) saturate(145%);
}

.login-card {
  position: relative;
  z-index: 2;
  width: min(410px, calc(100vw - 32px));
  padding: 28px 28px 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 28px 70px rgba(0, 15, 42, 0.4);
  color: #ffffff;
  text-align: center;
  animation: loginCardEnter 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loginCardEnter {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-brand-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 4px 12px 4px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 13px;
  font-weight: 600;
}

.login-brand-logo {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  padding: 2px;
}

.login-avatar-ring {
  width: 112px;
  height: 112px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #15803d, #0f5e2c);
  border: 3px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  overflow: hidden;
}

.login-avatar-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-title { font-size: 24px; font-weight: 600; margin-bottom: 4px; }
.login-subtitle { font-size: 13px; color: rgba(255, 255, 255, 0.88); margin-bottom: 18px; }

/* Windows 11 Bottom-Left Account Switcher Dock */
.login-accounts-dock {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 3;
  width: 276px;
  max-height: min(380px, calc(100vh - 140px));
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-accounts-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  padding: 0 8px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.login-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.win11-acc-item {
  position: relative;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: #ffffff;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}

.win11-acc-item:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
}

.win11-acc-item:active { transform: scale(0.985); }

.win11-acc-item.active {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.48);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.win11-acc-item.active::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 999px;
  background: #4cc2ff;
}

.win11-acc-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  overflow: hidden;
  flex-shrink: 0;
}

.win11-acc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.win11-acc-other-ico {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(255, 255, 255, 0.3);
}

.win11-acc-other {
  margin-top: 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.win11-acc-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.win11-acc-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win11-acc-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win11-acc-remove {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-size: 15px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.win11-acc-item:hover .win11-acc-remove,
.win11-acc-item:focus-within .win11-acc-remove {
  opacity: 0.85;
}

.win11-acc-remove:hover {
  opacity: 1 !important;
  background: rgba(239, 68, 68, 0.78);
  color: #ffffff;
}

@media (hover: none) {
  .win11-acc-remove {
    opacity: 0.75;
  }
}

.login-form { display: flex; flex-direction: column; gap: 10px; }

.win11-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
  font-size: 14px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.win11-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 103, 192, 0.24);
}

.login-input {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.65);
  height: 42px;
}

.login-pass-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-pass-wrap .login-input { padding-right: 82px; }

.login-eye-btn,
.login-submit-arrow {
  position: absolute;
  top: 5px;
  height: 32px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-eye-btn {
  right: 43px;
  width: 32px;
  background: transparent;
  color: #475569;
}

.login-submit-arrow {
  right: 5px;
  width: 34px;
  background: var(--accent);
  color: #fff;
}

.login-submit-arrow:hover { background: var(--accent-hover); }

.login-error {
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.9);
  color: #fff;
  font-size: 13px;
  text-align: left;
}

.login-helper-links { margin-top: 14px; }

.text-link-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12.5px;
  cursor: pointer;
}

.text-link-btn:hover { text-decoration: underline; color: #fff; }

.login-bottom-bar {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.glass-icon-btn {
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(16px);
  color: #fff;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.glass-icon-btn:hover { background: rgba(255, 255, 255, 0.32); }

.lockoff-screen { z-index: 9400; color: #fff; }

.lockoff-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 28, 58, 0.74);
  backdrop-filter: blur(32px);
}

.lockoff-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.lockoff-logo {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: #fff;
  padding: 6px;
}

.lockoff-message { font-size: 18px; font-weight: 500; }

/* ============================================================
   DESKTOP WORKSPACE & 2D SNAP GRID
   ============================================================ */
.desktop-shell {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
}

.desktop-area {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.desktop-icons-grid {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.desktop-icon-item {
  position: absolute;
  pointer-events: auto;
  padding: 6px 5px 6px;
  border-radius: 8px;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  cursor: pointer;
  transition: left 0.16s cubic-bezier(0.2, 0.8, 0.2, 1), top 0.16s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.14s ease, border-color 0.14s ease;
}

.desktop-icon-item:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(4px);
}

.desktop-icon-item:active .app-icon-box,
.tb-app-item:active .app-icon-box {
  transform: scale(0.9);
}

.desktop-icon-item.selected {
  background: rgba(255, 255, 255, 0.34);
  border-color: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(6px);
}

.desktop-icon-item.dragging {
  opacity: 0.4;
  transform: scale(0.95);
}

.desktop-icon-item.drag-over {
  border-color: var(--accent);
  background: rgba(0, 103, 192, 0.24);
}

.desktop-grid-preview {
  position: absolute;
  z-index: 4;
  border-radius: 10px;
  border: 2px dashed rgba(255, 255, 255, 0.82);
  background: rgba(0, 103, 192, 0.22);
  backdrop-filter: blur(4px);
  pointer-events: none;
  transition: left 0.08s ease, top 0.08s ease;
}

.app-icon-box {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  flex-shrink: 0;
  transition: transform 0.14s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.app-icon-box.is-image-icon {
  filter: drop-shadow(0 5px 10px rgba(10, 22, 46, 0.25));
  box-shadow: none;
}

body[data-icon-size="small"] .desktop-icon-item .app-icon-box { width: 42px; height: 42px; border-radius: 10px; }
body[data-icon-size="large"] .desktop-icon-item .app-icon-box { width: 60px; height: 60px; border-radius: 14px; }

@media (pointer: coarse) and (min-width: 769px) {
  .desktop-icon-item .app-icon-box { width: 58px; height: 58px; border-radius: 15px; }
  body[data-icon-size="small"] .desktop-icon-item .app-icon-box { width: 48px; height: 48px; border-radius: 12px; }
  body[data-icon-size="large"] .desktop-icon-item .app-icon-box { width: 68px; height: 68px; border-radius: 17px; }
  .desktop-icon-label { font-size: 13px; }
  .group-folder-tile .app-icon-box { width: 64px; height: 64px; border-radius: 16px; }
}

.app-icon-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.app-icon-box svg { width: 28px; height: 28px; }
.app-icon-emoji { font-size: 26px; line-height: 1; }

.desktop-icon-label {
  font-size: 12px;
  line-height: 1.38;
  padding-bottom: 2px;
  font-weight: 600;
  text-align: center;
  color: #0b162a;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.92), 0 0 8px rgba(255, 255, 255, 0.65);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

body.theme-dark .desktop-icon-label,
body[data-wp-tone="dark"] .desktop-icon-label {
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.88), 0 0 10px rgba(0, 0, 0, 0.55);
}

/* ============================================================
   WINDOWS SYSTEM (Windows 11 Fluent Window Chrome)
   ============================================================ */
.window-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
}

.win-frame {
  position: absolute;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  background: var(--window-bg);
  border-radius: var(--radius-win);
  border: 1px solid rgba(15, 23, 42, 0.16);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.win-frame.win-opening {
  animation: winOpenSpring 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.win-frame.win-closing {
  animation: winCloseSmooth 0.16s ease-in forwards;
  pointer-events: none;
}

.win-frame.win-animating {
  transition: left 0.22s cubic-bezier(0.2, 0.9, 0.2, 1),
              top 0.22s cubic-bezier(0.2, 0.9, 0.2, 1),
              width 0.22s cubic-bezier(0.2, 0.9, 0.2, 1),
              height 0.22s cubic-bezier(0.2, 0.9, 0.2, 1),
              border-radius 0.22s ease,
              opacity 0.18s ease,
              transform 0.18s ease;
}

@keyframes winOpenSpring {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes winCloseSmooth {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.95) translateY(6px); }
}

body.theme-dark .win-frame { border-color: rgba(255, 255, 255, 0.16); }

.win-frame.win-active {
  box-shadow: 0 28px 72px rgba(8, 28, 64, 0.34), 0 4px 18px rgba(8, 28, 64, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  border-color: rgba(0, 103, 192, 0.38);
}

body.theme-dark .win-frame.win-active {
  box-shadow: var(--window-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  border-color: rgba(76, 194, 255, 0.42);
}

.win-frame.win-active .win-titlebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, var(--window-header) 100%);
}

body.theme-dark .win-frame.win-active .win-titlebar {
  background: linear-gradient(180deg, rgba(38, 48, 68, 0.98) 0%, var(--window-header) 100%);
}

.win-frame.win-minimized {
  opacity: 0;
  transform: scale(0.86) translateY(44px);
  pointer-events: none;
}

.win-frame.win-maximized {
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 0;
  border: none;
}

.win-titlebar {
  height: 38px;
  min-height: 38px;
  padding: 0 0 0 12px;
  background: var(--window-header);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: move;
}

.win-title-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.win-title-icon {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  filter: none !important;
}

.win-title-icon svg { width: 14px; height: 14px; }
.win-title-icon img { width: 100%; height: 100%; object-fit: cover; }

.win-title-text {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win-sso-badge {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
  font-weight: 600;
  flex-shrink: 0;
}

body.theme-dark .win-sso-badge { color: #34d399; }

.win-controls {
  display: flex;
  align-items: stretch;
  height: 38px;
  position: relative;
}

.win-btn {
  width: 42px;
  height: 38px;
  border: none;
  border-radius: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background 0.12s ease, color 0.12s ease;
}

.win-btn-utility {
  width: 34px;
  color: var(--text-muted);
  position: relative;
}

.win-btn-online-bar.is-bar-visible {
  color: var(--accent);
  background: rgba(0, 103, 192, 0.08);
}

.win-btn-online-bar.is-bar-visible::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}

.win-btn:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.win-btn-close {
  width: 46px;
}

.win-btn-close:hover {
  background: #c42b1c;
  color: #ffffff;
}

/* Snap Layout Flyout */
.win-snap-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}

.win-snap-popup {
  position: absolute;
  top: 100%;
  right: -24px;
  margin-top: 2px;
  padding: 10px;
  border-radius: 10px;
  display: none;
  grid-template-columns: repeat(3, 44px);
  gap: 8px;
  z-index: 60;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  animation: popUpSlide 0.14s cubic-bezier(0.16, 1, 0.3, 1);
}

.win-snap-popup::before {
  content: "";
  position: absolute;
  left: -12px;
  right: -12px;
  top: -10px;
  height: 12px;
}

.win-snap-wrap:hover .win-snap-popup { display: grid; }

.snap-choice-btn {
  width: 44px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.snap-choice-btn:hover {
  background: var(--active-item-bg);
  border-color: var(--accent);
}

.snap-mini-grid {
  width: 100%;
  height: 100%;
  display: grid;
  gap: 2px;
}

.snap-mini-cell {
  border-radius: 2px;
  background: rgba(100, 116, 139, 0.25);
}

.snap-mini-cell.active {
  background: var(--accent);
}

.snap-preview-overlay {
  position: absolute;
  z-index: 15;
  border-radius: 10px;
  background: rgba(0, 103, 192, 0.22);
  border: 2px solid rgba(0, 103, 192, 0.65);
  backdrop-filter: blur(6px);
  pointer-events: none;
  transition: all 0.12s ease;
}

.win-body {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: var(--window-bg);
  display: flex;
  flex-direction: column;
}

.win-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
}

.win-online-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  max-height: 52px;
  overflow: hidden;
  font-size: 12px;
  background: rgba(59, 130, 246, 0.07);
  border-bottom: 1px solid var(--card-border);
  color: var(--text-secondary);
  opacity: 1;
  transition: max-height 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
              padding 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
              opacity 0.18s ease,
              border-bottom-width 0.18s ease;
}

body.theme-dark .win-online-bar {
  background: rgba(56, 189, 248, 0.08);
}

.win-online-bar.is-collapsed {
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-bottom-width: 0 !important;
  opacity: 0;
  pointer-events: none;
}

.win-online-url-pill {
  flex: 1;
  min-width: 0;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--window-bg);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: 7px;
}

.win-online-ico {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  flex-shrink: 0;
}

.win-online-url-text {
  font-size: 11.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: text;
}

.win-online-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.win-online-chip-btn {
  height: 28px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid var(--card-border);
  background: var(--window-bg);
  color: var(--text-primary);
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.win-online-chip-btn:hover {
  background: var(--active-item-bg);
  border-color: var(--accent);
  color: var(--accent);
}

.win-online-hide-btn,
.mob-online-hide-btn {
  width: 28px;
  padding: 0;
  justify-content: center;
  color: var(--text-muted);
}

.win-online-hide-btn:hover,
.mob-online-hide-btn:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #dc2626;
}

.win-focus-shield {
  position: absolute;
  inset: 0;
  z-index: 8;
  background: transparent;
}

.win-frame.win-active .win-focus-shield { display: none; }

.global-drag-shield {
  position: fixed;
  inset: 0;
  z-index: 8900;
  cursor: move;
}

.win-resize-handle { position: absolute; z-index: 12; }
.win-frame.win-maximized .win-resize-handle { display: none; }
.win-r-n  { top: -3px; left: 8px; right: 8px; height: 6px; cursor: ns-resize; }
.win-r-s  { bottom: -3px; left: 8px; right: 8px; height: 6px; cursor: ns-resize; }
.win-r-w  { left: -3px; top: 8px; bottom: 8px; width: 6px; cursor: ew-resize; }
.win-r-e  { right: -3px; top: 8px; bottom: 8px; width: 6px; cursor: ew-resize; }
.win-r-nw { top: -4px; left: -4px; width: 12px; height: 12px; cursor: nwse-resize; }
.win-r-ne { top: -4px; right: -4px; width: 12px; height: 12px; cursor: nesw-resize; }
.win-r-sw { bottom: -4px; left: -4px; width: 12px; height: 12px; cursor: nesw-resize; }
.win-r-se { bottom: -4px; right: -4px; width: 12px; height: 12px; cursor: nwse-resize; }

/* ============================================================
   START MENU (Windows 11 Style)
   ============================================================ */
.start-menu {
  position: fixed;
  bottom: calc(var(--taskbar-height) + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: min(610px, calc(100vw - 24px));
  max-height: calc(100vh - var(--taskbar-height) - 28px);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(10, 30, 66, 0.3);
  z-index: 5000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: popUpSlideCenter 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popUpSlide {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes popUpSlideCenter {
  from { opacity: 0; transform: translate(-50%, 14px) scale(0.98); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.start-search-wrap {
  margin: 20px 24px 12px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-bottom: 2px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
}

.start-search-icon {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
}

.start-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13.5px;
}

.start-body {
  padding: 6px 26px 18px;
  overflow-y: auto;
  flex: 1;
}

.start-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.start-section-title { font-size: 13.5px; font-weight: 700; }

.start-pill-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  font-size: 12px;
  cursor: pointer;
}

.start-pill-btn:hover { background: var(--hover-bg); }

.start-pinned-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px 4px;
}

.start-app-tile {
  padding: 10px 4px 8px;
  border-radius: 8px;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.start-app-tile:hover { background: var(--hover-bg); }
.start-app-tile.drag-over { outline: 2px solid var(--accent); }
.start-app-tile .app-icon-box { width: 40px; height: 40px; border-radius: 10px; }

.start-app-tile span {
  font-size: 11.5px;
  text-align: center;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.start-recent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
}

.start-recent-item {
  padding: 8px 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border: none;
  background: transparent;
  text-align: left;
}

.start-recent-item:hover { background: var(--hover-bg); }
.start-recent-item .app-icon-box { width: 32px; height: 32px; border-radius: 8px; }
.start-recent-meta { min-width: 0; }
.start-recent-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.start-recent-time { font-size: 11px; color: var(--text-muted); }

.start-all-apps-list { display: flex; flex-direction: column; gap: 4px; }

.start-list-row {
  padding: 7px 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  border: none;
  background: transparent;
  text-align: left;
  width: 100%;
}

.start-list-row:hover { background: var(--hover-bg); }
.start-list-row .app-icon-box { width: 32px; height: 32px; border-radius: 8px; }

.start-footer {
  height: 54px;
  padding: 0 24px;
  background: rgba(0, 0, 0, 0.035);
  border-top: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.start-user-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px 5px 5px;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.start-user-btn:hover { background: var(--hover-bg); }

.start-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #15803d, #0f5e2c);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.start-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.start-user-name { font-size: 13px; font-weight: 600; }

.start-power-wrap { position: relative; }

.start-power-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.start-power-btn:hover { background: var(--hover-bg); }

.power-menu {
  position: absolute;
  right: 0;
  bottom: 44px;
  width: 195px;
  padding: 6px;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 6000;
}

.power-menu button {
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.power-menu button:hover { background: var(--hover-bg); }

/* ============================================================
   TASKBAR
   ============================================================ */
.taskbar {
  position: relative;
  z-index: 4000;
  height: var(--taskbar-height);
  padding: 0 4px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-left: none;
  border-right: none;
  border-bottom: none;
}

.taskbar-main {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

body[data-taskbar-align="center"] .taskbar-main {
  justify-content: center;
  padding-left: 160px;
}

.tb-start-btn {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.tb-start-btn:hover,
.tb-start-btn.active { background: var(--hover-bg); }

.tb-start-logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #fff;
  padding: 2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
}

.tb-search-pill {
  height: 32px;
  width: 175px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
}

.tb-search-icon { display: flex; align-items: center; }
.tb-search-pill:hover { background: var(--acrylic-strong); }

.tb-divider {
  width: 1px;
  height: 20px;
  background: var(--card-border);
  margin: 0 4px;
}

.tb-apps {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tb-apps::-webkit-scrollbar { display: none; }

.tb-app-item {
  position: relative;
  width: 40px;
  height: 38px;
  border-radius: 7px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.14s ease, transform 0.14s ease;
}

.tb-app-item:hover { background: var(--hover-bg); }

.tb-app-item.is-active {
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(0, 103, 192, 0.18);
}

body.theme-dark .tb-app-item.is-active { background: rgba(255, 255, 255, 0.14); }
.tb-app-item.drag-over { outline: 2px solid var(--accent); }

.tb-app-item .app-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
}
.tb-app-item .app-icon-box.is-image-icon { box-shadow: none; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18)); }
.tb-app-item .app-icon-box svg { width: 16px; height: 16px; }
.tb-app-item .app-icon-emoji { font-size: 16px; }

.tb-app-item.is-open::after {
  content: "";
  position: absolute;
  bottom: 2px;
  width: 8px;
  height: 3px;
  border-radius: 999px;
  background: var(--text-muted);
  transition: width 0.16s ease, background 0.16s ease;
}

.tb-app-item.is-active::after {
  width: 18px;
  background: var(--accent);
}

.tb-add-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px dashed var(--card-border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.tb-add-btn:hover {
  background: var(--hover-bg);
  color: var(--accent);
  border-color: var(--accent);
}

.taskbar-tray {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.tray-btn,
.tray-clock-btn {
  height: 36px;
  padding: 0 8px;
  border-radius: 6px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 12px;
}

.tray-btn:hover,
.tray-clock-btn:hover { background: var(--hover-bg); }

.tray-clock-btn {
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.tray-clock-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tray-clock-text {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
}

.tray-notif-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tray-notif-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 103, 192, 0.35);
}

.tray-dnd-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f59e0b;
}

/* Floating Taskbar Acrylic Tooltip */
.tb-app-tooltip {
  position: fixed;
  bottom: calc(var(--taskbar-height) + 8px);
  z-index: 5200;
  padding: 6px 11px;
  border-radius: 9px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  pointer-events: none;
  white-space: nowrap;
  animation: ctxPopIn 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}

.tb-tip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tb-tip-dot.active { background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22); }
.tb-tip-dot.open { background: var(--accent); }
.tb-tip-dot.min { background: #f59e0b; }
.tb-tip-dot.pinned { background: var(--text-muted); opacity: 0.65; }

.tb-tip-name {
  font-size: 12.5px;
  font-weight: 600;
}

.tb-tip-state {
  font-size: 10.5px;
  color: var(--text-muted);
  padding-left: 5px;
  border-left: 1px solid var(--card-border);
}

.tb-clock-time { font-size: 12px; font-weight: 600; }
.tb-clock-date { font-size: 11px; color: var(--text-secondary); }

.tb-show-desktop {
  width: 7px;
  height: 34px;
  border: none;
  border-left: 1px solid var(--card-border);
  background: transparent;
  cursor: pointer;
  margin-left: 4px;
}

.tb-show-desktop:hover { background: var(--hover-bg); }

/* Flyouts */
.tray-flyout {
  position: fixed;
  bottom: calc(var(--taskbar-height) + 10px);
  right: 12px;
  width: 320px;
  padding: 14px;
  border-radius: 12px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.25);
  z-index: 5000;
  animation: popUpSlide 0.14s ease-out;
}

.taskbar-pin-picker {
  right: auto;
  left: 220px;
  width: 356px;
  max-width: calc(100vw - 24px);
  max-height: 440px;
  padding: 14px;
  border-radius: 14px;
  overflow-y: auto;
}

.pin-picker-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--card-border);
}

.pin-picker-header strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
}

.pin-picker-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.pin-picker-count {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  background: rgba(0, 103, 192, 0.12);
  color: var(--accent);
}

.flyout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
}

.mini-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tray-runtime-list,
.pin-picker-list { display: flex; flex-direction: column; gap: 7px; }

.runtime-row,
.pin-picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  font-size: 12.5px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.pin-picker-row:hover {
  background: var(--acrylic-strong);
}

.pin-picker-row.is-pinned {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.34);
}

body.theme-dark .pin-picker-row.is-pinned {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.42);
}

.pin-picker-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.pin-picker-text {
  min-width: 0;
  flex: 1;
}

.pin-picker-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pin-picker-type {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.pin-toggle-btn {
  min-width: 96px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.pin-toggle-btn:active {
  transform: scale(0.95);
}

.pin-toggle-btn .pin-state-default,
.pin-toggle-btn .pin-state-hover {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.pin-toggle-btn .pin-state-hover {
  display: none;
}

.pin-toggle-btn.is-pinned {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.36);
}

body.theme-dark .pin-toggle-btn.is-pinned {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.42);
}

.pin-toggle-btn.is-pinned:hover {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.38);
}

body.theme-dark .pin-toggle-btn.is-pinned:hover {
  background: rgba(239, 68, 68, 0.22);
  color: #fca5a5;
}

.pin-toggle-btn.is-pinned:hover .pin-state-default { display: none; }
.pin-toggle-btn.is-pinned:hover .pin-state-hover { display: inline-flex; }

.pin-toggle-btn.is-unpinned {
  background: var(--window-bg);
  color: var(--accent);
  border: 1px solid rgba(0, 103, 192, 0.34);
}

.pin-toggle-btn.is-unpinned:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}
.status-dot.ok { background: #10b981; }
.status-dot.warn { background: #f59e0b; }
.status-dot.err { background: #ef4444; }

.qs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.qs-tile {
  padding: 12px 6px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.12s ease, box-shadow 0.16s ease;
}

.qs-tile:hover { background: var(--active-item-bg); border-color: var(--accent); }
.qs-tile:active { transform: scale(0.96); }
.qs-tile.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(0, 103, 192, 0.28);
}
.qs-tile.is-on:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.qs-icon { display: flex; align-items: center; justify-content: center; }
.qs-label { font-size: 11px; text-align: center; font-weight: 500; }

.qs-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

.qs-gear-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 6px;
}
.qs-gear-btn:hover { background: var(--hover-bg); }

/* Notification & Calendar Center Flyout */
.calendar-flyout {
  width: 372px;
  max-width: calc(100vw - 24px);
  max-height: min(650px, calc(100vh - var(--taskbar-height) - 24px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.nc-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  flex: 1;
}

.nc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.nc-title-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
}

.nc-unread-pill {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 103, 192, 0.14);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.nc-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nc-action-btn {
  height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.nc-action-btn:hover { background: var(--active-item-bg); border-color: var(--accent); color: var(--accent); }
.nc-action-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

.nc-compose {
  padding: 10px;
  border-radius: 10px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.nc-compose-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.nc-compose-foot {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.nc-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.06);
  align-self: flex-start;
}

body.theme-dark .nc-tabs { background: rgba(255, 255, 255, 0.08); }

.nc-tab {
  padding: 4px 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--text-secondary);
  cursor: pointer;
}

.nc-tab.active {
  background: var(--window-bg);
  color: var(--accent);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}

.nc-list {
  flex: 1;
  min-height: 110px;
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-right: 2px;
}

.nc-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 28px 9px 10px;
  border-radius: 10px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.nc-card:hover { background: var(--acrylic-strong); border-color: rgba(0, 103, 192, 0.25); }
.nc-card.is-unread {
  border-left: 3px solid var(--accent);
  background: var(--acrylic-strong);
}

.nc-card-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0, 103, 192, 0.12);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nc-card.is-success .nc-card-ico { background: rgba(16, 185, 129, 0.14); color: #059669; }
.nc-card.is-warning .nc-card-ico { background: rgba(245, 158, 11, 0.15); color: #d97706; }
.nc-card.is-error .nc-card-ico { background: rgba(239, 68, 68, 0.15); color: #dc2626; }
.nc-card.is-announcement .nc-card-ico { background: rgba(124, 58, 237, 0.14); color: #7c3aed; }

.nc-card-body { flex: 1; min-width: 0; }
.nc-card-top { display: flex; align-items: center; gap: 6px; }
.nc-card-title { font-size: 12.5px; font-weight: 700; line-height: 1.3; }
.nc-unread-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.nc-card-msg {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 2px;
  word-break: break-word;
}
.nc-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 6px;
  font-size: 10.5px;
  color: var(--text-muted);
}
.nc-card-meta > span {
  min-width: 0;
  line-height: 1.35;
}
.nc-link-app-btn {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 103, 192, 0.3);
  background: rgba(0, 103, 192, 0.08);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nc-link-app-btn:hover { background: var(--accent); color: #fff; }

.nc-card-dismiss {
  position: absolute;
  top: 7px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.nc-card:hover .nc-card-dismiss { opacity: 1; }
.nc-card-dismiss:hover { background: rgba(239, 68, 68, 0.14); color: #dc2626; }

.nc-empty {
  padding: 22px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.nc-empty-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
}

.nc-calendar-section {
  padding-top: 8px;
  border-top: 1px solid var(--card-border);
  flex-shrink: 0;
}

.nc-cal-toggle {
  width: 100%;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 2px 0;
}

.nc-cal-chevron {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.16s ease;
}

.nc-cal-toggle.is-collapsed .nc-cal-chevron { transform: rotate(-90deg); }
.nc-cal-body { margin-top: 6px; }

.cal-full-date { font-size: 13.5px; font-weight: 700; }
.cal-year { font-size: 11.5px; color: var(--text-muted); margin-bottom: 4px; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
  font-size: 11px;
}

.cal-day-head { color: var(--text-muted); font-weight: 600; padding: 2px 0; }
.cal-day { padding: 4px 0; border-radius: 6px; }
.cal-day.today { background: var(--accent); color: #fff; font-weight: 700; }
.cal-day.muted { opacity: 0.35; }

/* ============================================================
   CONTEXT MENU (with Submenus), DIALOGS & TOASTS
   ============================================================ */
.os-context-menu {
  position: fixed;
  z-index: 9800;
  min-width: 240px;
  padding: 6px;
  border-radius: 10px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.28);
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: visible;
}

.os-context-menu.ctx-anim {
  animation: ctxPopIn 0.14s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ctxPopIn {
  from { opacity: 0; transform: scale(0.96) translateY(-4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes ctxSubIn {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}

.ctx-item-wrap {
  position: relative;
}

.ctx-item {
  width: 100%;
  padding: 7px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background 0.12s ease;
}

.ctx-item-main {
  display: flex;
  align-items: center;
  gap: 9px;
}

.ctx-ico {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: transform 0.14s ease;
}

.ctx-item:hover,
.ctx-item-wrap.is-sub-open > .ctx-item { background: var(--active-item-bg); }

.ctx-item-wrap.is-sub-open > .ctx-item .ctx-arrow {
  transform: rotate(90deg);
}

.ctx-submenu {
  position: absolute;
  left: calc(100% + 2px);
  top: -4px;
  min-width: 220px;
  padding: 6px;
  border-radius: 10px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.3);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 9810;
}

.ctx-submenu::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -8px;
  width: 10px;
}

.ctx-submenu.flip-left {
  left: auto;
  right: calc(100% + 2px);
}

.ctx-submenu.flip-left::before {
  left: auto;
  right: -8px;
}

.ctx-item-wrap:hover > .ctx-submenu,
.ctx-item-wrap.is-sub-open > .ctx-submenu {
  display: flex;
  animation: ctxSubIn 0.12s ease-out;
}

.ctx-sep {
  height: 1px;
  background: var(--card-border);
  margin: 4px 6px;
}

/* Windows 11 Fluent Dialog */
.win11-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9850;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.win11-dialog {
  width: min(440px, 100%);
  border-radius: 12px;
  background: var(--acrylic-strong);
  box-shadow: 0 28px 68px rgba(15, 23, 42, 0.36);
  overflow: hidden;
  animation: dialogPopIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dialogPopIn {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.win11-dialog-head {
  padding: 18px 20px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.win11-dialog-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(0, 103, 192, 0.12);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.win11-dialog-icon.is-danger {
  background: rgba(239, 68, 68, 0.14);
  color: #dc2626;
}

.win11-dialog-head h3 { font-size: 16px; font-weight: 700; }

.win11-dialog-body {
  padding: 0 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.win11-dialog-foot {
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.03);
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.toast-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9900;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.os-toast {
  position: relative;
  overflow: hidden;
  pointer-events: auto;
  min-width: 260px;
  max-width: 375px;
  padding: 11px 12px 13px;
  border-radius: 12px;
  background: var(--acrylic-strong);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--card-border);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.24);
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: toastSlideIn 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.os-toast.is-closing {
  opacity: 0;
  transform: translateX(18px) scale(0.96);
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(22px) scale(0.96); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.os-toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(0, 103, 192, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.os-toast-body { flex: 1; min-width: 0; }
.os-toast-title { font-size: 12.5px; font-weight: 700; margin-bottom: 2px; }
.os-toast-msg { font-size: 12.5px; line-height: 1.4; color: var(--text-primary); word-break: break-word; }

.os-toast-close {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.os-toast-close:hover { background: var(--hover-bg); color: var(--text-primary); }

.os-toast-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--accent);
  transform-origin: left center;
  animation: toastProgress linear forwards;
  opacity: 0.72;
}
.os-toast.is-paused .os-toast-progress { animation-play-state: paused; }

@keyframes toastProgress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

.os-toast.success { border-left: 4px solid #10b981; }
.os-toast.success .os-toast-icon { color: #059669; background: rgba(16, 185, 129, 0.14); }
.os-toast.success .os-toast-progress { background: #10b981; }

.os-toast.error { border-left: 4px solid #ef4444; }
.os-toast.error .os-toast-icon { color: #dc2626; background: rgba(239, 68, 68, 0.14); }
.os-toast.error .os-toast-progress { background: #ef4444; }

.os-toast.warning { border-left: 4px solid #f59e0b; }
.os-toast.warning .os-toast-icon { color: #d97706; background: rgba(245, 158, 11, 0.16); }
.os-toast.warning .os-toast-progress { background: #f59e0b; }

.os-toast.announcement { border-left: 4px solid #7c3aed; }
.os-toast.announcement .os-toast-icon { color: #7c3aed; background: rgba(124, 58, 237, 0.14); }
.os-toast.announcement .os-toast-progress { background: #7c3aed; }

.os-toast.info { border-left: 4px solid var(--accent); }
.os-toast.info .os-toast-icon { color: var(--accent); }

/* ============================================================
   BUILT-IN SYSTEM APPS (Users, Apps, Settings)
   ============================================================ */
.sys-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  user-select: text;
}

.sys-toolbar {
  padding: 12px 16px;
  background: var(--window-header);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sys-toolbar-left,
.sys-toolbar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.sys-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sys-btn {
  min-height: 34px;
  padding: 5px 12px;
  border-radius: 7px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.1s ease;
}

.sys-btn:hover {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.18);
  color: var(--text-primary);
}

body.theme-dark .sys-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.24);
  color: #f8fafc;
}

.sys-btn:disabled,
.sys-btn.is-loading {
  opacity: 0.78;
  cursor: wait;
  pointer-events: none;
}

.btn-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  display: inline-block;
  flex-shrink: 0;
  animation: btnSpin 0.65s linear infinite;
}

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

.sys-btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.sys-btn-primary:hover,
body.theme-dark .sys-btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #ffffff;
}
.sys-btn-success { background: #10b981; color: #fff; border-color: #10b981; }
.sys-btn-success:hover,
body.theme-dark .sys-btn-success:hover {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}
.sys-btn-danger { background: #dc2626; color: #fff; border-color: #dc2626; }
.sys-btn-danger:hover,
body.theme-dark .sys-btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #ffffff;
}
.sys-btn-sm { min-height: 28px; height: auto; padding: 4px 10px; font-size: 12px; line-height: 1.25; }

.sys-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 14px 16px;
  flex-shrink: 0;
}

.sys-card-title {
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sys-table-wrap { width: 100%; overflow-x: auto; }
.sys-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sys-table th,
.sys-table td { padding: 10px; text-align: left; border-bottom: 1px solid var(--card-border); vertical-align: middle; }
.sys-table th { font-size: 12px; color: var(--text-secondary); font-weight: 600; }

.sys-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}

.badge-blue { background: rgba(37, 99, 235, 0.14); color: #1d4ed8; }
.badge-green { background: rgba(16, 185, 129, 0.14); color: #047857; }
.badge-amber { background: rgba(245, 158, 11, 0.16); color: #b45309; }
.badge-red { background: rgba(239, 68, 68, 0.14); color: #b91c1c; }
.badge-gray { background: rgba(100, 116, 139, 0.14); color: #475569; }

body.theme-dark .badge-blue { color: #93c5fd; }
body.theme-dark .badge-green { color: #6ee7b7; }
body.theme-dark .badge-amber { color: #fcd34d; }
body.theme-dark .badge-red { color: #fca5a5; }
body.theme-dark .badge-gray { color: #cbd5e1; }

.sys-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sys-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sys-field { display: flex; flex-direction: column; gap: 5px; }
.sys-field label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }

.sys-input,
.sys-select,
.sys-textarea {
  padding: 8px 10px;
  border-radius: 7px;
  border: 1px solid var(--card-border);
  background: var(--window-bg);
  font-size: 13px;
  outline: none;
}

.sys-input:focus,
.sys-select:focus,
.sys-textarea:focus { border-color: var(--accent); }

.sys-tabs { display: flex; gap: 6px; flex-wrap: wrap; }

.sys-tab {
  height: 32px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.sys-tab.active {
  background: var(--active-item-bg);
  color: var(--accent);
  border-color: rgba(0, 103, 192, 0.25);
}

.sys-modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  transition: opacity 0.14s ease;
}

.sys-modal-backdrop.is-closing {
  opacity: 0;
  pointer-events: none;
}

.sys-modal-backdrop.is-closing .sys-modal {
  transform: scale(0.96) translateY(6px);
  transition: transform 0.14s ease;
}

.sys-modal {
  width: min(720px, 100%);
  max-height: 92%;
  background: var(--acrylic-strong);
  backdrop-filter: blur(26px);
  border: 1px solid var(--acrylic-border);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow: clip;
  animation: popUpSlide 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

.sys-modal-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.sys-modal-body { flex: 1; min-height: 0; padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.sys-modal-foot { padding: 12px 16px; border-top: 1px solid var(--card-border); display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
.sys-modal-foot .sys-btn { white-space: nowrap; flex-shrink: 0; }

/* Fluent Permissions Studio */
.perm-modal {
  width: min(860px, 100%);
}

.perm-modal-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.perm-modal-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #0d9488);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.perm-toolbar {
  padding: 10px 16px;
  background: var(--window-header);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.perm-app-card {
  border-radius: 12px;
  background: var(--window-bg);
  border: 1px solid var(--card-border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  overflow: hidden;
  flex-shrink: 0;
}

.perm-app-card.is-enabled {
  border-color: rgba(0, 103, 192, 0.34);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.perm-card-head {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--card-bg);
}

.perm-app-card.is-enabled .perm-card-head {
  background: linear-gradient(90deg, rgba(0, 103, 192, 0.06) 0%, var(--card-bg) 70%);
}

.perm-card-meta {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.perm-card-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.perm-expand-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--card-border);
  background: var(--window-bg);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.14s ease, opacity 0.18s ease;
}

.perm-expand-btn:hover { background: var(--hover-bg); color: var(--accent); }
.perm-app-card:not(.is-enabled) .perm-expand-btn { opacity: 0.4; }
.perm-app-card.is-collapsed .perm-expand-btn { transform: rotate(-90deg); }

.win-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.win-switch input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.win-switch-track {
  position: relative;
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.28);
  border: 1px solid rgba(100, 116, 139, 0.34);
  transition: background 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.win-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.28);
  transition: transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

.win-switch input:checked + .win-switch-track {
  background: var(--accent);
  border-color: var(--accent);
}

.win-switch input:checked + .win-switch-track .win-switch-thumb {
  transform: translateX(20px);
}

.win-switch-text {
  font-size: 12px;
  font-weight: 700;
  min-width: 58px;
  color: var(--text-muted);
}

.win-switch input:checked ~ .win-switch-text {
  color: var(--accent);
}

.perm-details-collapse {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.24s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.perm-app-card.is-enabled:not(.is-collapsed) .perm-details-collapse {
  grid-template-rows: 1fr;
  opacity: 1;
}

.perm-details-inner {
  overflow: hidden;
  min-height: 0;
}

.perm-details-pad {
  padding: 12px 14px 14px;
  border-top: 1px solid var(--card-border);
}

.perm-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.perm-mini-link {
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 5px;
}

.perm-mini-link:hover { background: var(--active-item-bg); }

.perm-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.perm-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.1s ease;
}

.perm-chip:hover {
  border-color: rgba(0, 103, 192, 0.4);
  background: var(--hover-bg);
}

.perm-chip:active { transform: scale(0.96); }

.perm-chip input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.perm-chip-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.perm-chip:has(input:checked) {
  background: rgba(0, 103, 192, 0.12);
  border-color: var(--accent);
  color: var(--accent);
}

body.theme-dark .perm-chip:has(input:checked) {
  background: rgba(76, 194, 255, 0.16);
}

.perm-chip input:checked + .perm-chip-dot {
  background: var(--accent);
  border-color: var(--accent);
}

.perm-chip input:checked + .perm-chip-dot::after {
  content: "";
  width: 6px;
  height: 3.5px;
  border-left: 1.8px solid #fff;
  border-bottom: 1.8px solid #fff;
  transform: rotate(-45deg) translateY(-0.5px);
}

.perm-chip-compact { padding: 5px 9px; }

.perm-time-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.perm-time-row .sys-input {
  width: 68px;
  padding: 5px 8px;
}

.perm-time-row .sys-input:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.wp-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.wp-choice {
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--card-border);
  cursor: pointer;
  background: var(--window-bg);
  text-align: center;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.wp-choice:hover { transform: translateY(-2px); }
.wp-choice.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(0, 103, 192, 0.18); }

.wp-preview-box {
  height: 82px;
  width: 100%;
  background-size: cover;
  background-position: center;
}

.wp-choice span {
  display: block;
  padding: 7px 6px;
  font-size: 11.5px;
  font-weight: 600;
}

.icon-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 6px;
}

.icon-pick-btn {
  height: 46px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: var(--window-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-pick-btn.active { border: 2px solid var(--accent); background: var(--active-item-bg); }

/* Windows 11 Multi-Tab Settings Shell */
.settings-shell {
  flex-direction: row !important;
}

.settings-nav {
  width: 230px;
  flex-shrink: 0;
  border-right: 1px solid var(--card-border);
  background: var(--window-header);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.settings-nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}

.settings-nav-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #15803d, #0f5e2c);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.settings-nav-avatar img { width: 100%; height: 100%; object-fit: cover; }
.settings-nav-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settings-nav-handle { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.settings-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-nav-btn {
  position: relative;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.settings-nav-btn:hover { background: var(--hover-bg); color: var(--text-primary); }

.settings-nav-btn.active {
  background: var(--active-item-bg);
  color: var(--accent);
}

.settings-nav-btn.active::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: var(--accent);
}

.settings-nav-ico {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.settings-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 16px;
}

.settings-pane {
  display: none;
  flex-direction: column;
  gap: 14px;
  animation: settingsPaneFade 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.settings-pane.active {
  display: flex;
}

@keyframes settingsPaneFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.profile-hero-card,
.about-hero-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.profile-hero-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1 1 260px;
}

.profile-avatar-lg {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #15803d, #0f5e2c);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--card-border);
}

.profile-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }

.pass-strength-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
  overflow: hidden;
}

.pass-strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.2s ease, background-color 0.2s ease;
}

.accent-swatch-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.accent-swatch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--card-border);
  background: var(--window-bg);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.14s ease, transform 0.14s ease;
}

.accent-swatch:hover { transform: translateY(-1px); }
.accent-swatch.active { border-color: var(--accent); background: var(--active-item-bg); }
.accent-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }

.about-hero-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.about-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.about-spec-item {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--window-bg);
  border: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.spec-k { font-size: 11.5px; color: var(--text-muted); }
.spec-v { font-size: 13px; color: var(--text-primary); word-break: break-word; }

.changelog-item {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--window-bg);
  border: 1px solid var(--card-border);
}

@media (max-width: 768px) {
  .sys-grid-2,
  .sys-grid-3,
  .about-spec-grid { grid-template-columns: 1fr; }
}

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

/* ============================================================
   SMARTPHONE-STYLE ICON FOLDER GROUPS & POPUP
   ============================================================ */
.app-group-box {
  position: relative;
  padding: 5px !important;
  backdrop-filter: blur(18px) saturate(165%);
  -webkit-backdrop-filter: blur(18px) saturate(165%);
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow: 0 8px 20px rgba(10, 22, 46, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

body[data-icon-size="small"] .desktop-icon-item .app-group-box { padding: 4px !important; }
body[data-icon-size="large"] .desktop-icon-item .app-group-box { padding: 6px !important; }

.grp-tint-glass { background: rgba(255, 255, 255, 0.36); }
.grp-tint-blue { background: rgba(59, 130, 246, 0.26); border-color: rgba(147, 197, 253, 0.65); }
.grp-tint-green { background: rgba(16, 185, 129, 0.24); border-color: rgba(110, 231, 183, 0.62); }
.grp-tint-purple { background: rgba(139, 92, 246, 0.26); border-color: rgba(196, 181, 253, 0.65); }
.grp-tint-amber { background: rgba(245, 158, 11, 0.24); border-color: rgba(252, 211, 77, 0.65); }
.grp-tint-rose { background: rgba(244, 63, 94, 0.24); border-color: rgba(253, 164, 175, 0.65); }

body.theme-dark .grp-tint-glass { background: rgba(30, 41, 59, 0.56); border-color: rgba(255, 255, 255, 0.22); }

.group-mini-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 3px;
}

.group-mini-item {
  border-radius: 5px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.group-mini-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.group-mini-item svg {
  width: 65%;
  height: 65%;
}

.group-mini-emoji {
  font-size: 11px;
  line-height: 1;
}

.group-count-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border: 1.5px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.desktop-icon-item.merge-target {
  transform: scale(1.08);
  background: rgba(0, 103, 192, 0.28);
  border-color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 0 0 4px rgba(0, 103, 192, 0.34);
  z-index: 12;
}

.desktop-icon-item.merge-target::after {
  content: "Gộp nhóm";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.24);
}

.group-folder-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9700;
  background: rgba(8, 16, 36, 0.42);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: folderBackdropIn 0.18s ease-out;
}

.group-folder-backdrop.is-closing {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.group-folder-backdrop.is-closing .group-folder-card {
  transform: scale(0.88);
  opacity: 0;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

@keyframes folderBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes folderOpenSpring {
  from { opacity: 0; transform: scale(0.82) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.group-folder-card {
  width: min(420px, 100%);
  max-height: 86dvh;
  border-radius: 24px;
  padding: 18px;
  background: rgba(248, 250, 255, 0.88);
  backdrop-filter: blur(36px) saturate(175%);
  -webkit-backdrop-filter: blur(36px) saturate(175%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 30px 76px rgba(8, 16, 36, 0.44);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  animation: folderOpenSpring 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

body.theme-dark .group-folder-card {
  background: rgba(22, 31, 50, 0.9);
  border-color: rgba(255, 255, 255, 0.18);
  color: #f8fafc;
}

.group-folder-card.grp-tint-blue { background: linear-gradient(160deg, rgba(235, 244, 255, 0.92), rgba(219, 234, 254, 0.88)); }
.group-folder-card.grp-tint-green { background: linear-gradient(160deg, rgba(236, 253, 245, 0.92), rgba(209, 250, 229, 0.88)); }
.group-folder-card.grp-tint-purple { background: linear-gradient(160deg, rgba(245, 243, 255, 0.92), rgba(233, 226, 255, 0.88)); }
.group-folder-card.grp-tint-amber { background: linear-gradient(160deg, rgba(255, 251, 235, 0.92), rgba(254, 243, 199, 0.88)); }
.group-folder-card.grp-tint-rose { background: linear-gradient(160deg, rgba(255, 241, 242, 0.92), rgba(255, 228, 230, 0.88)); }

body.theme-dark .group-folder-card.grp-tint-blue { background: linear-gradient(160deg, rgba(23, 37, 84, 0.92), rgba(30, 58, 138, 0.86)); }
body.theme-dark .group-folder-card.grp-tint-green { background: linear-gradient(160deg, rgba(6, 78, 59, 0.92), rgba(4, 120, 87, 0.86)); }
body.theme-dark .group-folder-card.grp-tint-purple { background: linear-gradient(160deg, rgba(46, 16, 101, 0.92), rgba(76, 29, 149, 0.86)); }
body.theme-dark .group-folder-card.grp-tint-amber { background: linear-gradient(160deg, rgba(69, 26, 3, 0.92), rgba(120, 53, 15, 0.86)); }
body.theme-dark .group-folder-card.grp-tint-rose { background: linear-gradient(160deg, rgba(76, 5, 25, 0.92), rgba(136, 19, 55, 0.86)); }

.group-folder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.group-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.group-title-input {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  outline: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.group-title-input:hover { background: rgba(255, 255, 255, 0.45); }
.group-title-input:focus { background: var(--window-bg); border-color: var(--accent); }
body.theme-dark .group-title-input:hover { background: rgba(255, 255, 255, 0.1); }

.group-count-pill {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(0, 103, 192, 0.12);
  color: var(--accent);
  white-space: nowrap;
}

.group-close-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.group-close-btn:hover { background: #ef4444; color: #fff; border-color: #ef4444; }

.group-folder-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 10px;
  padding: 4px 2px;
}

.group-folder-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 12px 6px 10px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.44);
  cursor: pointer;
  transition: transform 0.14s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.14s ease, border-color 0.14s ease;
}

body.theme-dark .group-folder-tile { background: rgba(255, 255, 255, 0.08); }
.group-folder-tile:hover { background: rgba(255, 255, 255, 0.78); transform: translateY(-2px); border-color: rgba(0, 103, 192, 0.25); }
body.theme-dark .group-folder-tile:hover { background: rgba(255, 255, 255, 0.16); }
.group-folder-tile:active { transform: scale(0.94); }
.group-folder-tile.dragging { opacity: 0.45; }
.group-folder-tile.drag-over { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(0, 103, 192, 0.28); }

.group-folder-tile .app-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 15px;
}

.group-tile-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.group-tile-eject {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.14s ease, background 0.14s ease;
}

.group-folder-tile:hover .group-tile-eject,
.group-tile-eject:focus-visible { opacity: 1; }
.group-tile-eject:hover { background: #dc2626; }

@media (max-width: 768px) {
  .group-tile-eject { opacity: 0.85; }
}

.group-add-drawer {
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.group-add-drawer-title { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.group-add-drawer-list { display: flex; flex-wrap: wrap; gap: 6px; }

.group-add-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--window-bg);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.group-add-chip:hover { border-color: var(--accent); color: var(--accent); }

.group-folder-footer {
  padding-top: 10px;
  border-top: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.group-tint-dots { display: flex; align-items: center; gap: 7px; }

.group-tint-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(15, 23, 42, 0.2);
  cursor: pointer;
  transition: transform 0.12s ease;
}

.group-tint-dot.active {
  transform: scale(1.18);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 103, 192, 0.25);
}

.group-footer-actions { display: flex; align-items: center; gap: 6px; }

.group-create-checklist {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  border-radius: 10px;
  background: var(--window-bg);
  border: 1px solid var(--card-border);
}

.group-check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.group-check-row:hover { background: var(--hover-bg); }
