/* ==========================================================================
   DokuHub - macOS Sonoma & Sequoia Aesthetic Stylesheet
   ========================================================================== */

:root,
[data-theme="light"] {
  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --menu-bg: rgba(255, 255, 255, 0.45);
  --menu-border: rgba(255, 255, 255, 0.25);
  --menu-text: #1d1d1f;
  --window-bg: #ffffff;
  --window-header-bg: #f5f5f7;
  --window-border: rgba(0, 0, 0, 0.12);
  --window-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.08);
  --dock-bg: rgba(255, 255, 255, 0.35);
  --dock-border: rgba(255, 255, 255, 0.4);
  --accent-color: #007aff;
  --sidebar-bg: #f6f6f8;
  --card-bg: #ffffff;
  --text-main: #1d1d1f;
  --text-muted: #6e6e73;
}

[data-theme="dark"] {
  --menu-bg: rgba(30, 30, 35, 0.65);
  --menu-border: rgba(255, 255, 255, 0.1);
  --menu-text: #f5f5f7;
  --window-bg: rgba(35, 36, 42, 0.94);
  --window-header-bg: rgba(45, 46, 52, 0.88);
  --window-border: rgba(255, 255, 255, 0.12);
  --window-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
  --dock-bg: rgba(30, 30, 35, 0.45);
  --dock-border: rgba(255, 255, 255, 0.15);
  --accent-color: #0a84ff;
  --sidebar-bg: rgba(28, 28, 32, 0.85);
  --card-bg: #222329;
  --text-main: #f5f5f7;
  --text-muted: #a1a1a6;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body,
html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-family);
  color: var(--text-main);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-image 0.4s ease-in-out;
}

/* --------------------------------------------------------------------------
   Desktop Wallpaper Background
   -------------------------------------------------------------------------- */
#desktop-screen {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------------------------------
   macOS Top Menu Bar
   -------------------------------------------------------------------------- */
.mac-menubar {
  height: 30px;
  width: 100%;
  background: var(--menu-bg);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border-bottom: 1px solid var(--menu-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--menu-text);
  z-index: 99999;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.menubar-left,
.menubar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.apple-logo {
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 15px;
}

.app-title-menu {
  font-weight: 600;
  cursor: pointer;
}

.menu-item {
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s;
}

.menu-item:hover {
  background: rgba(125, 125, 125, 0.18);
}

.tenant-pill {
  background: rgba(0, 122, 255, 0.15);
  color: var(--accent-color);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(0, 122, 255, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.tenant-pill:hover {
  background: rgba(0, 122, 255, 0.25);
}

.status-icon {
  cursor: pointer;
  display: flex;
  align-items: center;
}

/* --------------------------------------------------------------------------
   Desktop Work Area
   -------------------------------------------------------------------------- */
#window-space {
  position: relative;
  flex: 1;
  width: 100%;
  height: calc(100vh - 30px);
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   macOS Floating Window
   -------------------------------------------------------------------------- */
.mac-window {
  position: absolute;
  background: var(--window-bg);
  backdrop-filter: blur(35px) saturate(190%);
  -webkit-backdrop-filter: blur(35px) saturate(190%);
  border: 1px solid var(--window-border);
  border-radius: 12px;
  box-shadow: var(--window-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.2s, opacity 0.15s;
  min-width: 420px;
  min-height: 280px;
}

.mac-window.active-window {
  box-shadow: 0 35px 70px -15px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 122, 255, 0.3);
}

.mac-window.minimized {
  display: none !important;
}

.mac-titlebar {
  height: 38px;
  background: var(--window-header-bg);
  border-bottom: 1px solid var(--window-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  cursor: grab;
  position: relative;
}

.mac-titlebar:active {
  cursor: grabbing;
}

/* macOS Traffic Lights */
.traffic-lights {
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

.traffic-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.traffic-btn svg {
  opacity: 0;
  transition: opacity 0.1s;
}

.traffic-lights:hover .traffic-btn svg {
  opacity: 0.7;
}

.btn-close {
  background: #ff5f56;
  border: 1px solid #e0443e;
}

.btn-min {
  background: #ffbd2e;
  border: 1px solid #dea123;
}

.btn-max {
  background: #27c93f;
  border: 1px solid #1aab29;
}

.window-title {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.window-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

.mac-body {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  user-select: text;
}

/* Window Resize Handles */
.resize-handle {
  position: absolute;
  z-index: 10;
}

.resize-handle.n {
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  cursor: n-resize;
}

.resize-handle.s {
  bottom: 0;
  left: 0;
  right: 0;
  height: 6px;
  cursor: s-resize;
}

.resize-handle.w {
  top: 0;
  bottom: 0;
  left: 0;
  width: 6px;
  cursor: w-resize;
}

.resize-handle.e {
  top: 0;
  bottom: 0;
  right: 0;
  width: 6px;
  cursor: e-resize;
}

.resize-handle.nw {
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  cursor: nw-resize;
}

.resize-handle.ne {
  top: 0;
  right: 0;
  width: 10px;
  height: 10px;
  cursor: ne-resize;
}

.resize-handle.sw {
  bottom: 0;
  left: 0;
  width: 10px;
  height: 10px;
  cursor: sw-resize;
}

.resize-handle.se {
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  cursor: se-resize;
}

/* --------------------------------------------------------------------------
   macOS Bottom / Side Dock (Dynamic Resizing & Magnification)
   -------------------------------------------------------------------------- */
.mac-dock-container {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 99998;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.mac-dock-container.dock-left {
  left: 12px;
  top: 40px;
  bottom: 12px;
  right: auto;
  align-items: center;
}

.mac-dock-container.dock-left .mac-dock {
  flex-direction: column;
  align-items: center;
}

.mac-dock-container.dock-right {
  right: 12px;
  top: 40px;
  bottom: 12px;
  left: auto;
  align-items: center;
}

.mac-dock-container.dock-right .mac-dock {
  flex-direction: column;
  align-items: center;
}

.mac-dock {
  pointer-events: auto;
  background: var(--dock-bg);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid var(--dock-border);
  border-radius: calc(var(--dock-item-size, 52px) * 0.38);
  padding: 6px 10px;
  display: flex;
  align-items: flex-end;
  gap: calc(var(--dock-item-size, 52px) * 0.18);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
  transition: padding 0.15s, gap 0.15s, border-radius 0.15s;
}

.dock-item {
  position: relative;
  width: var(--dock-item-size, 52px);
  height: var(--dock-item-size, 52px);
  border-radius: calc(var(--dock-item-size, 52px) * 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: width 0.15s, height 0.15s, transform 0.18s cubic-bezier(0.25, 1, 0.5, 1);
}

.dock-item:hover {
  transform: translateY(-8px) scale(var(--dock-hover-scale, 1.18));
}

.dock-icon {
  width: calc(var(--dock-item-size, 52px) - 6px);
  height: calc(var(--dock-item-size, 52px) - 6px);
  border-radius: calc(var(--dock-item-size, 52px) * 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  font-size: calc(var(--dock-item-size, 52px) * 0.44);
  transition: width 0.15s, height 0.15s, font-size 0.15s;
}

.dock-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-main);
  margin-top: 3px;
  opacity: 0;
  transition: opacity 0.2s;
}

.dock-item.running .dock-dot {
  opacity: 0.9;
}

.dock-item .dock-tooltip {
  position: absolute;
  top: -36px;
  background: rgba(30, 30, 35, 0.85);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s, transform 0.15s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dock-item:hover .dock-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.dock-divider {
  width: 1px;
  height: calc(var(--dock-item-size, 52px) * 0.72);
  background: rgba(125, 125, 125, 0.3);
  margin: 0 4px;
  align-self: center;
}

/* --------------------------------------------------------------------------
   Finder / File Manager Styles
   -------------------------------------------------------------------------- */
.finder-layout {
  display: flex;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.finder-sidebar {
  width: 210px;
  min-width: 210px;
  max-width: 210px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--window-border);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  box-sizing: border-box;
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 8px;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-item:hover {
  background: rgba(125, 125, 125, 0.12);
}

.sidebar-item.active {
  background: var(--accent-color);
  color: #fff;
}

.finder-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--window-bg);
  overflow: hidden;
}

.finder-toolbar {
  min-height: 44px;
  height: 44px;
  border-bottom: 1px solid var(--window-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  gap: 8px;
  flex-shrink: 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.finder-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.finder-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mac-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--window-border);
  background: var(--card-bg);
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.mac-btn:hover {
  background: rgba(125, 125, 125, 0.1);
}

.mac-btn.primary {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}

.mac-btn.primary:hover {
  opacity: 0.9;
}

.file-grid {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 16px;
  align-content: flex-start;
}

.file-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}

.file-card:hover {
  background: rgba(125, 125, 125, 0.12);
}

.file-card.selected {
  background: rgba(0, 122, 255, 0.2);
}

.file-icon-box {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin-bottom: 6px;
}

.file-name {
  font-size: 12px;
  font-weight: 500;
  max-width: 95px;
  word-break: break-word;
  line-height: 1.3;
}

.file-badge-share {
  position: absolute;
  top: 4px;
  right: 12px;
  background: #10b981;
  color: #fff;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   WordCraft Editor Styles
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   WordCraft Professional Word Processor (Adapted from storytold/wordcraft)
   -------------------------------------------------------------------------- */
.wordcraft-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #f1f3f5;
  overflow: hidden;
  user-select: none;
}

[data-theme="dark"] .wordcraft-layout {
  background: #18191c;
}

/* 1. WordCraft Top Ribbon Tabs */
.wordcraft-ribbon-bar {
  background: var(--window-bg);
  border-bottom: 1px solid var(--window-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.wordcraft-tabs-header {
  display: flex;
  align-items: center;
  padding: 2px 8px 0;
  gap: 2px;
  background: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid var(--window-border);
}

[data-theme="dark"] .wordcraft-tabs-header {
  background: rgba(255, 255, 255, 0.03);
}

.wordcraft-tab-btn {
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.12s;
  border-radius: 4px 4px 0 0;
}

.wordcraft-tab-btn:hover {
  color: var(--text-main);
  background: rgba(125, 125, 125, 0.08);
}

.wordcraft-tab-btn.active {
  color: #2563eb;
  font-weight: 600;
  border-bottom-color: #2563eb;
  background: var(--card-bg);
}

.wordcraft-tab-btn.tab-file {
  background: #1e40af;
  color: #ffffff !important;
  font-weight: 600;
  border-radius: 4px;
  padding: 3px 12px;
  margin-right: 6px;
  border: none;
}

.wordcraft-tab-btn.tab-file:hover {
  background: #1d4ed8;
}

/* 2. Ribbon Groups Container */
.wordcraft-ribbon-panel {
  padding: 6px 12px 4px;
  background: var(--card-bg);
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-height: 84px;
  overflow-x: auto;
}

.ribbon-group {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2px 8px;
  border-right: 1px solid var(--window-border);
  flex-shrink: 0;
}

.ribbon-group-title {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 500;
}

.ribbon-row {
  display: flex;
  align-items: center;
  gap: 3px;
}

.ribbon-btn {
  height: 26px;
  min-width: 26px;
  padding: 0 6px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-main);
  transition: all 0.1s;
}

.ribbon-btn:hover {
  background: rgba(125, 125, 125, 0.15);
  border-color: var(--window-border);
}

.ribbon-btn.active {
  background: rgba(37, 99, 235, 0.16);
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.3);
}

.griidcraft-layout .ribbon-btn.active {
  background: rgba(16, 124, 65, 0.16);
  color: #107c41;
  border-color: rgba(16, 124, 65, 0.3);
}

.ribbon-select {
  height: 24px;
  padding: 0 4px;
  font-size: 11px;
  background: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--window-border);
  border-radius: 4px;
  outline: none;
}

/* Styles Gallery (Live Word Styles) */
.styles-gallery {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  max-width: 440px;
  padding: 2px;
}

.style-card {
  border: 1px solid var(--window-border);
  background: var(--card-bg);
  border-radius: 6px;
  padding: 4px 10px;
  min-width: 74px;
  height: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.12s;
  text-align: center;
}

.style-card:hover {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.05);
  transform: translateY(-1px);
}

.style-card.active {
  border: 2px solid #2563eb;
  background: rgba(37, 99, 235, 0.1);
}

.style-card .style-preview {
  font-size: 13px;
  margin-bottom: 2px;
  pointer-events: none;
}

.style-card .style-label {
  font-size: 10px;
  color: var(--text-muted);
  pointer-events: none;
}

/* 3. WordCraft Precision Interactive Ruler (Margin & Paragraph Alignment) */
.wordcraft-ruler-container {
  background: var(--card-bg);
  border-bottom: 1px solid var(--window-border);
  height: 24px;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  user-select: none;
}

.wordcraft-ruler {
  width: 816px;
  height: 100%;
  position: relative;
  background: #ffffff;
  border-left: 1px solid var(--window-border);
  border-right: 1px solid var(--window-border);
  box-sizing: border-box;
}

[data-theme="dark"] .wordcraft-ruler {
  background: #2a2b2f;
}

.ruler-margin-left {
  position: absolute;
  top: 0;
  left: 0;
  width: 80px;
  height: 100%;
  background: rgba(125, 125, 125, 0.16);
  border-right: 1px solid var(--window-border);
  pointer-events: none;
}

.ruler-margin-right {
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 100%;
  background: rgba(125, 125, 125, 0.16);
  border-left: 1px solid var(--window-border);
  pointer-events: none;
}

.ruler-white-area {
  position: absolute;
  top: 0;
  left: 80px;
  right: 80px;
  height: 100%;
  pointer-events: none;
}

.ruler-tick {
  position: absolute;
  bottom: 2px;
  transform: translateX(-50%);
  font-size: 9px;
  color: var(--text-muted);
  font-family: -apple-system, sans-serif;
  font-weight: 600;
  pointer-events: none;
}

.ruler-subtick {
  position: absolute;
  bottom: 0;
  width: 1px;
  height: 4px;
  background: rgba(125, 125, 125, 0.35);
  pointer-events: none;
}

.ruler-subtick.mid {
  height: 7px;
  background: rgba(125, 125, 125, 0.5);
}

/* Interactive Markers */
.ruler-marker {
  position: absolute;
  cursor: ew-resize;
  z-index: 20;
  user-select: none;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
  transition: transform 0.05s;
}

.ruler-marker:hover {
  filter: drop-shadow(0 1px 3px rgba(37, 99, 235, 0.8));
}

.marker-first-line {
  top: 0;
  width: 10px;
  height: 8px;
  margin-left: -5px;
}

.marker-hanging {
  bottom: 5px;
  width: 10px;
  height: 8px;
  margin-left: -5px;
}

.marker-left-base {
  bottom: 0px;
  width: 10px;
  height: 5px;
  margin-left: -5px;
  background: #64748b;
  border-radius: 1px;
  border: 1px solid #334155;
  box-sizing: border-box;
}

.marker-right-indent {
  bottom: 0px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
}

/* Vertical guide line that drops across document paper while dragging */
.ruler-guide-line {
  position: absolute;
  top: 24px;
  height: 1100px;
  width: 1px;
  border-left: 1px dashed #2563eb;
  z-index: 9999;
  pointer-events: none;
  display: none;
}

/* 4. Canvas & A4 Page Layout */
.wordcraft-canvas-wrapper {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

.wordcraft-nav-pane {
  width: 210px;
  background: var(--card-bg);
  border-right: 1px solid var(--window-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  font-size: 12px;
  flex-shrink: 0;
  transition: width 0.2s;
}

.wordcraft-nav-pane.hidden {
  width: 0;
  overflow: hidden;
  border-right: none;
}

.wordcraft-canvas {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
  padding: 30px 20px 60px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  user-select: text;
}

.wordcraft-page-wrapper {
  transition: transform 0.15s ease-out;
  transform-origin: top center;
}

.a4-page {
  width: 816px;
  min-height: 1056px;
  background: #ffffff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.16);
  border-radius: 2px;
  padding: 72px 80px;
  color: #111827;
  outline: none;
  font-family: 'Calibri', 'Inter', -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  box-sizing: border-box;
  margin-bottom: 30px;
  position: relative;
}

[data-theme="dark"] .a4-page {
  background: #ffffff;
  color: #111827;
}

.a4-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.a4-page th, .a4-page td {
  border: 1px solid #cbd5e1;
  padding: 8px 12px;
}

.a4-page th {
  background: #f1f5f9;
  font-weight: 600;
}

.a4-page blockquote {
  border-left: 4px solid #3b82f6;
  margin: 16px 0;
  padding: 8px 16px;
  color: #475569;
  background: #f8fafc;
  font-style: italic;
}

.a4-page hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 20px 0;
}

/* 5. Professional Status Bar */
.wordcraft-statusbar {
  height: 26px;
  background: var(--card-bg);
  border-top: 1px solid var(--window-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
  user-select: none;
}

.wordcraft-status-left, .wordcraft-status-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wordcraft-view-pills {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(125, 125, 125, 0.1);
  padding: 2px;
  border-radius: 4px;
}

.wordcraft-view-pill {
  border: none;
  background: transparent;
  padding: 2px 6px;
  font-size: 11px;
  border-radius: 3px;
  cursor: pointer;
  color: var(--text-muted);
}

.wordcraft-view-pill.active {
  background: var(--card-bg);
  color: var(--text-main);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* --------------------------------------------------------------------------
   GriidCraft Spreadsheet Styles (Full-fidelity storytold/gridcraft)
   -------------------------------------------------------------------------- */
.griidcraft-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.griidcraft-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.griidcraft-tab-btn:hover {
  color: var(--text-main);
  background: rgba(125, 125, 125, 0.08);
  border-radius: 4px;
}

.griidcraft-tab-btn.active {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
  font-weight: 700;
}

.griid-formula-bar {
  height: 36px;
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--window-border);
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 8px;
}

.cell-coord-box {
  min-width: 50px;
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  background: rgba(125, 125, 125, 0.1);
  padding: 4px 6px;
  border-radius: 4px;
}

.formula-input {
  flex: 1;
  border: 1px solid var(--window-border);
  border-radius: 4px;
  padding: 4px 8px;
  font-family: monospace;
  font-size: 13px;
  background: var(--card-bg);
  color: var(--text-main);
  outline: none;
}

.griid-sheet-scroll {
  flex: 1;
  overflow: auto;
  background: var(--card-bg);
}

.excel-grid {
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
  background: var(--card-bg);
}

.excel-grid th {
  background: var(--sidebar-bg);
  border: 1px solid var(--window-border);
  font-weight: 600;
  text-align: center;
  color: var(--text-muted);
  user-select: none;
}

.excel-grid td {
  border: 1px solid var(--window-border);
  background: var(--card-bg);
  padding: 2px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  outline: none;
}

.excel-grid td.selected {
  outline: 2px solid #107c41 !important;
  z-index: 2;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.griidcraft-sheet-tab:hover {
  background: rgba(125, 125, 125, 0.08) !important;
}

.griidcraft-sheet-tab.active {
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.06);
}

/* --------------------------------------------------------------------------
   DeckCraft Presentation Styles
   -------------------------------------------------------------------------- */
.deckcraft-layout {
  display: flex;
  height: 100%;
}

.deck-sidebar {
  width: 180px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--window-border);
  padding: 12px 8px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.slide-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 2px solid var(--window-border);
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: border-color 0.15s;
}

.slide-thumb.active {
  border-color: var(--accent-color);
}

.deck-editor {
  flex: 1;
  background: #2a2b30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
}

.slide-canvas {
  width: 800px;
  height: 450px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   DokuMeet WebRTC Styles
   -------------------------------------------------------------------------- */
.meet-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #111827;
  color: #fff;
}

.meet-video-grid {
  flex: 1;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  align-items: center;
  justify-items: center;
  overflow-y: auto;
}

.video-tile {
  width: 100%;
  height: 100%;
  min-height: 220px;
  background: #1f2937;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
}

.video-tile.active-speaker {
  border-color: #10b981;
}

.video-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.peer-name-tag {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.65);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.meet-controls-bar {
  height: 64px;
  background: #1f2937;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.meet-ctrl-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #374151;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background 0.15s;
}

.meet-ctrl-btn:hover {
  background: #4b5563;
}

.meet-ctrl-btn.danger {
  background: #ef4444;
}

.meet-ctrl-btn.active {
  background: #10b981;
}

/* --------------------------------------------------------------------------
   Notes App Styles
   -------------------------------------------------------------------------- */
.notes-layout {
  display: flex;
  height: 100%;
}

.notes-list-col {
  width: 260px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--window-border);
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.note-item-card {
  padding: 10px 12px;
  background: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--window-border);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.note-item-card:hover {
  border-color: var(--accent-color);
}

.note-item-card.active {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 1px var(--accent-color);
}

.note-item-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-item-preview {
  font-size: 11px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notes-editor-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--window-bg);
}

.note-title-input {
  font-size: 22px;
  font-weight: 700;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-main);
  margin-bottom: 12px;
}

.note-body-textarea {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.6;
  resize: none;
  font-family: inherit;
}

/* --------------------------------------------------------------------------
   Spotlight Search Modal
   -------------------------------------------------------------------------- */
.spotlight-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  z-index: 999999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}

.spotlight-box {
  width: 640px;
  background: var(--window-bg);
  backdrop-filter: blur(40px) saturate(200%);
  border: 1px solid var(--window-border);
  border-radius: 14px;
  box-shadow: 0 35px 70px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.spotlight-search-bar {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  gap: 12px;
  border-bottom: 1px solid var(--window-border);
}

.spotlight-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 18px;
  color: var(--text-main);
}

.spotlight-results {
  max-height: 340px;
  overflow-y: auto;
  padding: 8px;
}

.spotlight-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.spotlight-result-item:hover,
.spotlight-result-item.highlighted {
  background: var(--accent-color);
  color: #fff;
}

/* ==========================================================================
   macOS Tahoe Liquid Glass Morphism & Lock Screen Styling
   ========================================================================== */

.tahoe-login-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999999;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 40px 20px 30px;
  background-size: cover;
  background-position: center;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.tahoe-login-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.04);
}

/* Fluid Liquid Background Mesh Behind Glass */
.liquid-mesh-bg {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.35), transparent 45%),
    radial-gradient(circle at 80% 30%, rgba(168, 85, 247, 0.35), transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(236, 72, 153, 0.3), transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(16, 185, 129, 0.3), transparent 40%),
    rgba(10, 12, 18, 0.65);
  backdrop-filter: blur(60px) saturate(220%);
  -webkit-backdrop-filter: blur(60px) saturate(220%);
  animation: liquidPulse 14s ease-in-out infinite alternate;
  z-index: 1;
}

@keyframes liquidPulse {
  0% {
    transform: scale(1) rotate(0deg);
  }

  50% {
    transform: scale(1.05) rotate(1deg);
  }

  100% {
    transform: scale(1) rotate(0deg);
  }
}

.tahoe-top-bar {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}

.tahoe-glass-pill {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.5);
  border-radius: 30px;
  padding: 6px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Big Tahoe Clock */
.tahoe-clock-section {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #ffffff;
  margin-top: -20px;
}

.tahoe-time {
  font-size: 82px;
  font-weight: 700;
  letter-spacing: -2px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  line-height: 1;
}

.tahoe-date {
  font-size: 19px;
  font-weight: 500;
  opacity: 0.9;
  margin-top: 8px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Central Liquid Glass Login Card */
.tahoe-login-card {
  position: relative;
  z-index: 2;
  width: 440px;
  max-width: 92vw;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(50px) saturate(230%);
  -webkit-backdrop-filter: blur(50px) saturate(230%);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 28px;
  padding: 32px 28px;
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.6),
    inset 0 1.5px 1.5px rgba(255, 255, 255, 0.7),
    inset 0 -1.5px 1.5px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #fff;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tahoe-avatar-wrapper {
  position: relative;
  width: 90px;
  height: 90px;
  margin-bottom: 16px;
}

.tahoe-avatar-glass {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), inset 0 2px 4px rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  color: #ffffff;
}

.tahoe-user-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tahoe-user-tenant {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 22px;
  background: rgba(255, 255, 255, 0.12);
  padding: 3px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Password Input Capsule with Liquid Glass */
.tahoe-password-box {
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}

.tahoe-password-input {
  width: 100%;
  height: 46px;
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 0 46px 0 20px;
  font-size: 14px;
  color: #ffffff;
  outline: none;
  backdrop-filter: blur(25px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.tahoe-password-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.tahoe-password-input:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tahoe-login-submit-btn {
  position: absolute;
  right: 6px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  border: none;
  color: #0f172a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s, background 0.15s;
}

.tahoe-login-submit-btn:hover {
  transform: scale(1.08);
  background: #ffffff;
}

.tahoe-login-submit-btn:active {
  transform: scale(0.95);
}

/* Quick User Switcher Pills */
.tahoe-demo-users {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  width: 100%;
}

.tahoe-user-pill {
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all 0.15s;
}

.tahoe-user-pill:hover {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.tahoe-user-pill.active {
  background: #007aff;
  border-color: #38bdf8;
  color: #fff;
  font-weight: 600;
}

/* Bottom System Actions */
.tahoe-bottom-actions {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 20px;
  color: #ffffff;
}

.tahoe-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.tahoe-action-btn .action-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  transition: transform 0.2s, background 0.2s;
}

.tahoe-action-btn:hover .action-circle {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.28);
}

/* ==========================================================================
   macOS Tahoe 2-Step Animated Login & Morph Transitions
   ========================================================================== */
.tahoe-stage-container {
  width: 100%;
  position: relative;
  min-height: 270px;
}

.tahoe-step {
  width: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, filter 0.3s ease;
}

.tahoe-step.active {
  display: flex;
  transform: translateX(0) scale(1);
  opacity: 1;
  filter: blur(0);
}

.tahoe-step.slide-out-left {
  display: flex;
  position: absolute;
  top: 0;
  left: 0;
  transform: translateX(-60px) scale(0.92);
  opacity: 0;
  filter: blur(6px);
  pointer-events: none;
}

.tahoe-step.slide-in-right {
  display: flex;
  animation: tahoeSlideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tahoe-step.slide-out-right {
  display: flex;
  position: absolute;
  top: 0;
  left: 0;
  transform: translateX(60px) scale(0.92);
  opacity: 0;
  filter: blur(6px);
  pointer-events: none;
}

.tahoe-step.slide-in-left {
  display: flex;
  animation: tahoeSlideInLeft 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes tahoeSlideInRight {
  from {
    transform: translateX(60px) scale(0.92);
    opacity: 0;
    filter: blur(6px);
  }

  to {
    transform: translateX(0) scale(1);
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes tahoeSlideInLeft {
  from {
    transform: translateX(-60px) scale(0.92);
    opacity: 0;
    filter: blur(6px);
  }

  to {
    transform: translateX(0) scale(1);
    opacity: 1;
    filter: blur(0);
  }
}

.tahoe-user-avatar-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  color: #fff;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  margin-bottom: 8px;
  text-align: left;
}

.tahoe-user-avatar-btn:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.tahoe-back-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 3px 12px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: all 0.15s;
}

.tahoe-back-pill:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.28);
  transform: translateX(-3px);
}

/* ==========================================================================
   macOS Finder Native Tree/List & Column View Styles (Matching Screenshot)
   ========================================================================== */

.finder-segmented-view {
  display: inline-flex;
  background: rgba(125, 125, 125, 0.16);
  border-radius: 6px;
  padding: 2px;
  border: 1px solid var(--window-border);
}

.finder-segment-btn {
  background: transparent;
  border: none;
  padding: 3px 8px;
  font-size: 13px;
  color: var(--text-main);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.finder-segment-btn.active {
  background: var(--card-bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  color: var(--text-main);
}

.finder-search-input {
  width: 140px;
  border-radius: 6px;
  border: 1px solid var(--window-border);
  background: rgba(125, 125, 125, 0.12);
  padding: 3px 8px 3px 24px;
  font-size: 12px;
  color: var(--text-main);
  outline: none;
  transition: width 0.2s, background 0.2s;
}

.finder-search-input:focus {
  width: 200px;
  background: var(--card-bg);
  border-color: var(--accent-color);
}

#finder-view-container {
  background: var(--window-bg);
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Finder Tree/List Table */
.finder-table-container,
[data-theme="light"] .finder-table-container {
  flex: 1;
  overflow-y: auto;
  user-select: none;
  font-size: 12px;
  background: repeating-linear-gradient(
    to bottom,
    #ffffff 0px,
    #ffffff 24px,
    #f5f5f7 24px,
    #f5f5f7 48px
  ) !important;
  color: #1d1d1f !important;
}

[data-theme="dark"] .finder-table-container {
  background: repeating-linear-gradient(
    to bottom,
    #1e1e1e 0px,
    #1e1e1e 24px,
    #242424 24px,
    #242424 48px
  ) !important;
  color: #f5f5f7 !important;
}

.finder-list-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.finder-list-table th {
  position: sticky;
  top: 0;
  background: var(--window-bg);
  border-bottom: 1px solid var(--window-border);
  padding: 4px 12px;
  text-align: left;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 11px;
  z-index: 5;
  white-space: nowrap;
}

.finder-list-table tr,
[data-theme="light"] .finder-list-table tr {
  height: 24px;
  cursor: pointer;
  border-bottom: none;
  transition: background 0.06s;
  color: #1d1d1f;
}

.finder-list-table tr:nth-child(even),
[data-theme="light"] .finder-list-table tr:nth-child(even) {
  background: transparent;
}

[data-theme="dark"] .finder-list-table tr {
  border-bottom: none;
  background: transparent;
  color: #f5f5f7;
}

[data-theme="dark"] .finder-list-table tr:nth-child(even) {
  background: transparent;
}

.finder-list-table tr:hover {
  background: rgba(0, 122, 255, 0.12) !important;
}

[data-theme="dark"] .finder-list-table tr:hover {
  background: rgba(0, 122, 255, 0.22) !important;
}

.finder-list-table tr.selected {
  background: #007aff !important;
  color: #ffffff !important;
}

.finder-list-table tr.selected .tree-chevron,
.finder-list-table tr.selected .file-item-meta {
  color: #ffffff !important;
  opacity: 0.9;
}

.finder-list-table td {
  padding: 0 12px;
  height: 24px;
  line-height: 24px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.tree-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.finder-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 14px;
  background: var(--window-bg);
  border-top: 1px solid var(--window-border);
  font-size: 11px;
  color: var(--text-muted);
  user-select: none;
  height: 24px;
  flex-shrink: 0;
}

/* Sidebar Sections */
.sidebar-tag-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

/* Toolbar button pills & icons */
.finder-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.finder-icon-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 13px;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.finder-icon-btn:hover {
  background: rgba(125, 125, 125, 0.15);
  border-color: var(--window-border);
}

.finder-menu-item {
  color: var(--text-main);
  transition: background 0.1s;
}

.finder-menu-item:hover {
  background: var(--accent-color) !important;
  color: #ffffff !important;
}

.finder-nav-arrows {
  display: inline-flex;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--window-border);
  background: rgba(125, 125, 125, 0.08);
}

.finder-nav-btn {
  background: transparent;
  border: none;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}

.finder-nav-btn:hover:not(:disabled) {
  background: rgba(125, 125, 125, 0.18);
}

.finder-nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Miller Columns View */
.finder-columns-container {
  flex: 1;
  display: flex;
  overflow-x: auto;
  background: var(--window-bg);
  height: 100%;
}

.miller-column {
  min-width: 220px;
  max-width: 260px;
  border-right: 1px solid var(--window-border);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.miller-item {
  padding: 6px 12px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.miller-item:hover {
  background: rgba(125, 125, 125, 0.1);
}

.miller-item.selected {
  background: var(--accent-color);
  color: #fff;
}

.miller-preview-pane {
  flex: 1;
  min-width: 280px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Gallery View */
.finder-gallery-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.gallery-preview-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

.gallery-carousel-strip {
  height: 86px;
  border-top: 1px solid var(--window-border);
  background: rgba(125, 125, 125, 0.05);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  overflow-x: auto;
}

.gallery-thumb-card {
  min-width: 64px;
  height: 64px;
  border-radius: 8px;
  border: 1px solid var(--window-border);
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 4px;
}

.gallery-thumb-card.selected {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px var(--accent-color);
}


/* ==========================================================================
   About This DokuHub - macOS Tahoe / Sonoma Glassmorphic Styling
   ========================================================================== */

.about-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 16px 20px;
  background: var(--card-bg);
  color: var(--text-main);
  font-family: var(--font-family);
  overflow-y: auto;
  user-select: text;
}

.about-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--window-border);
}

.about-orb-wrapper {
  flex-shrink: 0;
}

.about-tahoe-orb {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: linear-gradient(135deg, #007aff 0%, #5856d6 50%, #af52de 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px -4px rgba(0, 122, 255, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.about-orb-shine {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  border-radius: 20px 20px 80px 80px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.about-orb-inner {
  font-size: 34px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.about-hero-details {
  flex: 1;
}

.about-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.about-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin: 0;
  color: var(--text-main);
}

.about-badge-enterprise {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.15), rgba(88, 86, 214, 0.2));
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
}

.about-version {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.about-version-dot {
  font-size: 9px;
  opacity: 0.6;
}

.about-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.about-pill {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(125, 125, 125, 0.1);
  border: 1px solid var(--window-border);
  color: var(--text-main);
}

/* Segmented Control Bar */
.about-segmented-control {
  display: flex;
  background: rgba(125, 125, 125, 0.12);
  border-radius: 8px;
  padding: 3px;
  margin: 14px 0 12px 0;
  gap: 2px;
  border: 1px solid var(--window-border);
}

.about-segment-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.about-segment-btn:hover {
  color: var(--text-main);
}

.about-segment-btn.active {
  background: var(--card-bg);
  color: var(--text-main);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.segment-icon {
  font-size: 13px;
}

/* Tab Body */
.about-tab-content {
  flex: 1;
  min-height: 220px;
}

/* Grid & Spec Cards */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.about-spec-card {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(125, 125, 125, 0.06);
  border: 1px solid var(--window-border);
}

.spec-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 3px;
}

.spec-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}

.spec-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.25;
}

.badge-role {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0, 122, 255, 0.15);
  color: var(--accent-color);
  margin-left: 4px;
}

.system-health-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #34c759;
  box-shadow: 0 0 8px #34c759;
  display: inline-block;
  animation: pulseHealth 2s infinite ease-in-out;
}

@keyframes pulseHealth {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.9); }
}

/* Storage Tab */
.about-storage-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0;
}

.storage-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.storage-drive-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drive-icon {
  font-size: 28px;
}

.drive-name {
  font-size: 13.5px;
  font-weight: 600;
}

.drive-capacity {
  font-size: 12px;
  color: var(--text-muted);
}

.storage-bar-track {
  height: 18px;
  width: 100%;
  border-radius: 6px;
  background: rgba(125, 125, 125, 0.18);
  display: flex;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

.storage-segment {
  height: 100%;
  transition: width 0.3s ease;
}

.seg-docx { background: #007aff; }
.seg-xlsx { background: #34c759; }
.seg-pptx { background: #ff9500; }
.seg-pdf  { background: #ff3b30; }
.seg-notes{ background: #af52de; }
.seg-toon { background: #5ac8fa; }

.storage-legend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
}

.legend-bullet {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.legend-name {
  color: var(--text-muted);
}

.legend-val {
  font-weight: 500;
  color: var(--text-main);
}

/* Architecture Tab */
.about-arch-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.arch-card {
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(125, 125, 125, 0.06);
  border: 1px solid var(--window-border);
}

.arch-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.arch-icon {
  font-size: 18px;
}

.arch-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.arch-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.arch-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.35;
  margin-left: 26px;
}

/* Security Tab */
.about-security-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.security-item {
  display: flex;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(125, 125, 125, 0.06);
  border: 1px solid var(--window-border);
}

.sec-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.sec-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}

.sec-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Footer & Buttons */
.about-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px solid var(--window-border);
}

.about-footer-left,
.about-footer-right {
  display: flex;
  gap: 8px;
}

.about-btn-secondary {
  background: rgba(125, 125, 125, 0.12);
  color: var(--text-main);
  border: 1px solid var(--window-border);
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.about-btn-secondary:hover {
  background: rgba(125, 125, 125, 0.22);
}

.about-copyright {
  text-align: center;
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 8px;
  opacity: 0.8;
}

/* Update Modal Backdrop */
.about-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-modal-card {
  width: 320px;
  background: var(--card-bg);
  border: 1px solid var(--window-border);
  border-radius: 12px;
  padding: 24px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: modalScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.about-update-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(125, 125, 125, 0.2);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 14px;
}

.about-update-check-done {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 12px;
}

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

.about-modal-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.about-modal-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 16px;
}

.about-modal-actions {
  width: 100%;
  display: flex;
  justify-content: center;
}


/* ==========================================================================
   Activity Monitor (Task Manager & System Summary) - macOS Tahoe Style
   ========================================================================== */

.actmon-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--card-bg);
  color: var(--text-main);
  font-family: var(--font-family);
  overflow: hidden;
  user-select: none;
}

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

.actmon-tabs {
  display: flex;
  background: rgba(125, 125, 125, 0.12);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--window-border);
}

.actmon-tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.actmon-tab-btn:hover {
  color: var(--text-main);
}

.actmon-tab-btn.active {
  background: var(--card-bg);
  color: var(--text-main);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.actmon-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.actmon-search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(125, 125, 125, 0.1);
  border: 1px solid var(--window-border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
}

.actmon-search-box input {
  border: none;
  background: transparent;
  outline: none;
  color: var(--text-main);
  font-size: 12px;
  width: 140px;
}

.actmon-btn-kill {
  font-size: 11.5px;
  padding: 4px 10px;
  background: rgba(255, 59, 48, 0.12);
  color: #ff3b30;
  border: 1px solid rgba(255, 59, 48, 0.3);
}

.actmon-btn-kill:hover {
  background: rgba(255, 59, 48, 0.22);
}

.actmon-btn-inspect {
  font-size: 11.5px;
  padding: 4px 10px;
}

/* Executive Cockpit Top Strip */
.actmon-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 12px 16px;
  background: rgba(125, 125, 125, 0.04);
  border-bottom: 1px solid var(--window-border);
}

.actmon-stat-card {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--card-bg);
  border: 1px solid var(--window-border);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}

.stat-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.stat-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.stat-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.stat-metric {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
  line-height: 1.1;
}

.stat-bar-track {
  height: 5px;
  width: 100%;
  border-radius: 3px;
  background: rgba(125, 125, 125, 0.18);
  overflow: hidden;
  margin: 6px 0 4px 0;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.stat-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main Workspace */
.actmon-workspace {
  flex: 1;
  min-height: 0;
  padding: 12px 16px;
  overflow-y: auto;
}

.actmon-split-view {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 14px;
  height: 100%;
}

.actmon-graphs-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.actmon-chart-card {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--card-bg);
  border: 1px solid var(--window-border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.chart-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-main);
}

.chart-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 4px;
  background: rgba(0, 122, 255, 0.15);
  color: #007aff;
}

.actmon-canvas {
  width: 100%;
  height: 85px;
  display: block;
  border-radius: 6px;
  background: rgba(125, 125, 125, 0.05);
}

.actmon-table-panel,
.actmon-detail-view {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.table-header-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 600;
}

.process-count-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(125, 125, 125, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
}

.actmon-table-wrapper {
  flex: 1;
  min-height: 180px;
  overflow-y: auto;
  border: 1px solid var(--window-border);
  border-radius: 8px;
  background: var(--card-bg);
}

.actmon-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.actmon-table th {
  position: sticky;
  top: 0;
  background: var(--window-header-bg);
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--window-border);
  z-index: 2;
}

.actmon-table td {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(125, 125, 125, 0.08);
  white-space: nowrap;
}

.process-row {
  cursor: pointer;
  transition: background 0.1s ease;
}

.process-row:hover {
  background: rgba(125, 125, 125, 0.06);
}

.process-row.selected {
  background: rgba(0, 122, 255, 0.18) !important;
  color: var(--text-main);
}

.proc-icon {
  margin-right: 6px;
  font-size: 13px;
}

.proc-type {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(125, 125, 125, 0.1);
  color: var(--text-muted);
  margin-left: 6px;
}

.proc-status {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
}

.status-running {
  background: rgba(52, 199, 89, 0.15);
  color: #34c759;
}

.status-idle {
  background: rgba(125, 125, 125, 0.12);
  color: var(--text-muted);
}

.status-recycled {
  background: rgba(255, 149, 0, 0.15);
  color: #ff9500;
}

.status-badge-ok {
  color: #34c759;
  font-weight: 600;
}

/* Detail Views */
.cpu-cores-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.core-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px;
  border-radius: 6px;
  background: rgba(125, 125, 125, 0.06);
  border: 1px solid var(--window-border);
  font-size: 11px;
}

.memory-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-top: 10px;
  padding: 6px;
  border-radius: 6px;
  background: rgba(125, 125, 125, 0.06);
  border: 1px solid var(--window-border);
}

.mem-break-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
}

.storage-summary-dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.storage-dash-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--card-bg);
  border: 1px solid var(--window-border);
}

.dash-card-icon {
  font-size: 32px;
}

.dash-card-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.dash-card-metric {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin: 2px 0;
}

.dash-card-sub {
  font-size: 11px;
  color: var(--text-muted);
}

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


/* ==========================================================================
   macOS Preview App (Pratinjau Gambar & Wallpaper Switcher)
   ========================================================================== */

.preview-app-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--card-bg);
  color: var(--text-main);
  font-family: var(--font-family);
  overflow: hidden;
  user-select: none;
}

.preview-toolbar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: var(--window-header-bg);
  border-bottom: 1px solid var(--window-border);
  gap: 12px;
}

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

.preview-file-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--accent-color);
  color: #ffffff;
  letter-spacing: 0.5px;
}

.preview-file-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-tool-btn {
  padding: 4px 10px;
  font-size: 12px;
}

.preview-zoom-level {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 44px;
  text-align: center;
}

.preview-btn-wallpaper {
  background: linear-gradient(135deg, #007aff, #0051a8);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.preview-btn-wallpaper:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.45);
}

.preview-canvas-viewport {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-color: rgba(125, 125, 125, 0.08);
  background-image: 
    linear-gradient(45deg, rgba(125, 125, 125, 0.05) 25%, transparent 25%), 
    linear-gradient(-45deg, rgba(125, 125, 125, 0.05) 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, rgba(125, 125, 125, 0.05) 75%), 
    linear-gradient(-45deg, transparent 75%, rgba(125, 125, 125, 0.05) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  padding: 24px;
}

.preview-canvas-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
}

.preview-image-element {
  max-width: calc(100vw - 320px);
  max-height: calc(100vh - 300px);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  border-radius: 6px;
  border: 1px solid var(--window-border);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center center;
}

.preview-statusbar {
  height: 28px;
  border-top: 1px solid var(--window-border);
  background: var(--window-header-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 11.5px;
  color: var(--text-muted);
}


/* ==========================================================================
   macOS DYNAMIC ISLAND NOTIFICATION & ALERT SYSTEM
   ========================================================================== */

.dynamic-island {
  position: fixed;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999999;
  background: #000000;
  color: #ffffff;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", sans-serif;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: all 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  user-select: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 1. Idle Pill State (MacBook Pro / iPhone Notch Island) */
.dynamic-island.idle {
  width: 140px;
  height: 28px;
  border-radius: 20px;
  cursor: pointer;
  opacity: 0.85;
}

.dynamic-island.idle:hover {
  opacity: 1;
  width: 160px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.island-pill-idle {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.island-sensor-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.island-camera-lens {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a3b5c, #0d121d 60%, #000 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 0 2px rgba(0, 200, 255, 0.5);
}

.island-mic-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

/* 2. Expanded Alert State */
.dynamic-island.expanded {
  min-width: 380px;
  max-width: 500px;
  border-radius: 26px;
  padding: 12px 18px 14px 18px;
  background: rgba(15, 15, 18, 0.94);
  backdrop-filter: blur(40px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), inset 0 1px 1.5px rgba(255, 255, 255, 0.4);
  animation: islandSpringIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes islandSpringIn {
  0% {
    width: 140px;
    height: 28px;
    transform: translateX(-50%) scale(0.9);
    opacity: 0.6;
  }
  60% {
    transform: translateX(-50%) scale(1.03);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
}

.dynamic-island.collapsing {
  animation: islandSpringOut 0.35s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes islandSpringOut {
  0% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) scale(0.85);
    opacity: 0.5;
  }
}

.island-content-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.island-leading-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 700;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.badge-success {
  background: linear-gradient(135deg, #34c759, #28a745);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(52, 199, 89, 0.5);
}

.badge-error {
  background: linear-gradient(135deg, #ff3b30, #d32f2f);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(255, 59, 48, 0.5);
}

.badge-warn {
  background: linear-gradient(135deg, #ff9500, #f57c00);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(255, 149, 0, 0.5);
}

.badge-info {
  background: linear-gradient(135deg, #007aff, #0056b3);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(0, 122, 255, 0.5);
}

.island-text-block {
  flex: 1;
  min-width: 0;
}

.island-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.island-title {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.island-time {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.island-message {
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.85);
  word-break: break-word;
  max-height: 48px;
  overflow-y: auto;
}

.island-trailing {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.island-action-btn {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  border-radius: 14px;
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.island-action-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.04);
}

.island-btn-close {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: rgba(255, 255, 255, 0.7);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
}

.island-btn-close:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  transform: scale(1.1);
}

.island-progress-bar {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}

.island-progress-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #007aff, #34c759);
  animation: islandProgress linear forwards;
}

@keyframes islandProgress {
  0% { transform: scaleX(1); transform-origin: left; }
  100% { transform: scaleX(0); transform-origin: left; }
}


/* ==========================================================================
   LIQUID GLASS MORPHISM ENHANCEMENTS ACROSS MACOS GOLDEN GATE
   ========================================================================== */

/* Specular Multi-Layer Blur on macOS Windows */
.mac-window {
  backdrop-filter: blur(40px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(40px) saturate(190%) !important;
  background: rgba(24, 25, 30, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
}

/* Window Header Liquid Glass Specular Bar */
.mac-window-header {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.03) 100%), rgba(28, 29, 36, 0.7) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3) !important;
}

/* macOS Menubar Liquid Glass */
.menubar {
  background: rgba(18, 19, 24, 0.65) !important;
  backdrop-filter: blur(40px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(40px) saturate(190%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25), inset 0 -0.5px 0.5px rgba(255, 255, 255, 0.2) !important;
}

/* macOS Dock Liquid Glass Shelf */
.dock-container {
  background: rgba(255, 255, 255, 0.16) !important;
  backdrop-filter: blur(45px) saturate(210%) !important;
  -webkit-backdrop-filter: blur(45px) saturate(210%) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.45), inset 0 -1px 2px rgba(0, 0, 0, 0.15) !important;
}

/* Liquid Glass Buttons */
.mac-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0.5px rgba(255, 255, 255, 0.35) !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.mac-btn:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22), inset 0 1px 1px rgba(255, 255, 255, 0.5) !important;
  transform: translateY(-0.5px);
}

.mac-btn:active {
  transform: translateY(0.5px);
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

.mac-btn.primary {
  background: linear-gradient(180deg, rgba(0, 122, 255, 0.88) 0%, rgba(0, 100, 220, 0.95) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.5) !important;
}

.mac-btn.primary:hover {
  background: linear-gradient(180deg, rgba(10, 132, 255, 0.95) 0%, rgba(0, 110, 230, 1) 100%) !important;
  box-shadow: 0 6px 20px rgba(0, 122, 255, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.6) !important;
}


/* ==========================================================================
   MACOS ANIMATED CURSIVE "HELLO" WELCOME & ONBOARDING
   ========================================================================== */

.macos-welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000000;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  overflow: hidden;
  background: rgba(5, 5, 8, 0.75);
  backdrop-filter: blur(60px);
  -webkit-backdrop-filter: blur(60px);
  transition: opacity 0.6s ease;
}

.macos-welcome-overlay.hidden {
  display: none;
}

/* Ambient Liquid Aurora Mesh */
.welcome-aurora-bg {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 30% 35%, rgba(0, 122, 255, 0.35), transparent 45%),
              radial-gradient(circle at 70% 65%, rgba(255, 45, 85, 0.3), transparent 45%),
              radial-gradient(circle at 50% 50%, rgba(175, 82, 222, 0.25), transparent 50%),
              radial-gradient(circle at 20% 80%, rgba(52, 199, 89, 0.2), transparent 40%);
  filter: blur(80px);
  animation: welcomeAuroraShift 14s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes welcomeAuroraShift {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(8deg) scale(1.08); }
  100% { transform: rotate(-8deg) scale(1.02); }
}

.welcome-center-container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 680px;
  padding: 24px;
}

/* Cursive Handwriting Stage */
.welcome-script-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
}

.cursive-text-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cursive-word {
  font-family: "Brush Script MT", "Caveat", "Segoe Script", "Apple Chancery", cursive;
  font-size: 88px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 1px;
  color: #ffffff;
  text-shadow: 0 4px 25px rgba(255, 255, 255, 0.5), 0 0 50px rgba(0, 122, 255, 0.4);
  background: linear-gradient(135deg, #ffffff 30%, #e2e8f0 70%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
}

.cursive-word.stroke-animating {
  animation: cursiveWritingStroke 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes cursiveWritingStroke {
  0% {
    clip-path: polygon(0 0, 0 0, 0 100%, 0% 100%);
    opacity: 0.2;
    transform: translateY(10px) scale(0.97);
  }
  50% {
    clip-path: polygon(0 0, 60% 0, 60% 100%, 0% 100%);
    opacity: 0.8;
  }
  100% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cursive-lang-tag {
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  transition: opacity 0.3s;
}

/* Glass Onboarding Card */
.welcome-card-glass {
  background: rgba(28, 28, 35, 0.82);
  backdrop-filter: blur(50px) saturate(200%);
  -webkit-backdrop-filter: blur(50px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.65), inset 0 1px 2px rgba(255, 255, 255, 0.4);
  border-radius: 28px;
  padding: 36px 40px;
  width: 100%;
  max-width: 580px;
  color: #ffffff;
}

.welcome-card-header {
  text-align: center;
  margin-bottom: 24px;
}

.welcome-apple-logo {
  font-size: 36px;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.95);
  filter: drop-shadow(0 2px 10px rgba(255, 255, 255, 0.3));
}

.welcome-headline {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin: 0 0 8px 0;
}

.welcome-subheadline {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

/* User Identity Chip in Welcome Card */
.welcome-user-chip {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  padding: 14px 18px;
  margin-bottom: 22px;
}

.welcome-user-name {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.welcome-user-email {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 6px;
}

.welcome-badges-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.welcome-role-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(0, 122, 255, 0.25);
  border: 1px solid rgba(0, 122, 255, 0.4);
  color: #60a5fa;
}

.welcome-tenant-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

/* Feature Highlights Grid */
.welcome-feature-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px 14px;
}

.feature-icon {
  font-size: 20px;
  line-height: 1;
  padding-top: 2px;
}

.feature-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.feature-desc {
  font-size: 11.5px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.65);
}

/* Get Started Button */
.welcome-actions {
  display: flex;
  justify-content: center;
}

.welcome-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 24px;
  border-radius: 16px;
  background: linear-gradient(180deg, #007aff 0%, #0056b3 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 122, 255, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.welcome-btn-primary:hover {
  background: linear-gradient(180deg, #1a8cff 0%, #0066cc 100%);
  transform: translateY(-1.5px);
  box-shadow: 0 14px 30px rgba(0, 122, 255, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.welcome-btn-primary:active {
  transform: translateY(0.5px);
  box-shadow: 0 6px 16px rgba(0, 122, 255, 0.35);
}

.btn-arrow {
  font-size: 18px;
  transition: transform 0.2s;
}

.welcome-btn-primary:hover .btn-arrow {
  transform: translateX(4px);
}

/* Skip Button */
.welcome-skip-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  padding: 6px 14px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.2s;
}

.welcome-skip-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}


/* ==========================================================================
   MACOS DESKTOP WIDGETS SYSTEM (SONOMA / SEQUOIA / GOLDEN GATE)
   ========================================================================== */

.desktop-widgets-layer {
  position: absolute;
  top: 36px;
  right: 22px;
  bottom: 90px;
  width: 370px;
  z-index: 15;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 6px;
  overflow-y: auto;
  overflow-x: hidden;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.desktop-widgets-layer::-webkit-scrollbar {
  width: 5px;
}

.desktop-widgets-layer::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.desktop-widgets-layer.hidden {
  opacity: 0;
  transform: translateX(30px) scale(0.96);
  pointer-events: none !important;
}

.desktop-widgets-layer * {
  pointer-events: auto;
}

/* Header bar above widgets */
.widgets-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
}

.widgets-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.25);
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.widgets-manage-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.2s;
}

.widgets-manage-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.05);
}

.widgets-grid-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Common Widget Card Glass Morphism */
.mac-widget-card {
  background: rgba(22, 24, 32, 0.58);
  backdrop-filter: blur(40px) saturate(190%);
  -webkit-backdrop-filter: blur(40px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 22px;
  padding: 16px 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), inset 0 1px 1.5px rgba(255, 255, 255, 0.32);
  color: #ffffff;
  user-select: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
}

.mac-widget-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.45);
}

/* Common Widget Header */
.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.widget-title-icon {
  font-size: 15px;
  margin-right: 6px;
}

.widget-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.1px;
  color: rgba(255, 255, 255, 0.9);
  flex: 1;
}

.widget-badge-sub {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: 8px;
}

/* -------------------------------------------------------------------------
   1. Clock Widget Styles
   ------------------------------------------------------------------------- */
.widget-clock-body {
  display: flex;
  align-items: center;
  gap: 16px;
}

.analog-clock-wrap {
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}

.analog-clock-svg {
  width: 100%;
  height: 100%;
}

.clock-dial {
  fill: rgba(0, 0, 0, 0.45);
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 2.5;
}

.clock-tick {
  stroke: rgba(255, 255, 255, 0.4);
  stroke-width: 1.5;
}

.clock-tick.major {
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 2.2;
}

.clock-hand {
  stroke-linecap: round;
  transform-origin: 50px 50px;
  transition: transform 0.1s cubic-bezier(0.4, 2.08, 0.55, 0.44);
}

.hand-hour {
  stroke: #ffffff;
  stroke-width: 3.5;
}

.hand-min {
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 2.5;
}

.hand-sec {
  stroke: #ff9500;
  stroke-width: 1.5;
}

.clock-pin {
  fill: #ff9500;
}

.digital-clock-details {
  flex: 1;
}

.digital-time-display {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", monospace;
  color: #ffffff;
  line-height: 1.1;
}

.digital-day-label {
  font-size: 13px;
  font-weight: 600;
  color: #ff9500;
  margin-top: 2px;
}

.digital-city-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
}

.digital-subinfo {
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 2px;
}

/* -------------------------------------------------------------------------
   2. Calendar Widget Styles
   ------------------------------------------------------------------------- */
.cal-nav-buttons {
  display: flex;
  gap: 4px;
}

.cal-nav-buttons button {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.2s;
}

.cal-nav-buttons button:hover {
  background: rgba(255, 255, 255, 0.25);
}

.widget-calendar-body {
  display: flex;
  gap: 16px;
  align-items: stretch;
}

.cal-big-banner {
  background: linear-gradient(180deg, #ff3b30 0%, #d32f2f 100%);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80px;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(255, 59, 48, 0.35);
}

.cal-big-month {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.9);
}

.cal-big-number {
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  margin: 2px 0;
  color: #ffffff;
}

.cal-big-year {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
}

.cal-grid-section {
  flex: 1;
}

.cal-month-header {
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.85);
}

.cal-weekdays-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 9.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 4px;
}

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

.cal-day {
  font-size: 10.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.cal-day.other-month {
  color: rgba(255, 255, 255, 0.2);
}

.cal-day.today {
  background: #007aff;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(0, 122, 255, 0.7);
}

.cal-agenda-footer {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* -------------------------------------------------------------------------
   3. Weather Widget Styles
   ------------------------------------------------------------------------- */
.city-selector-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.city-selector-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.weather-current-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.weather-icon-large {
  font-size: 38px;
  line-height: 1;
}

.weather-temp-wrap {
  flex: 1;
  margin-left: 12px;
}

.weather-temp-main {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
}

.weather-condition-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 2px;
}

.weather-hi-low {
  text-align: right;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

.aqi-badge {
  font-size: 9.5px;
  font-weight: 700;
  background: rgba(52, 199, 89, 0.25);
  color: #34c759;
  border: 1px solid rgba(52, 199, 89, 0.4);
  border-radius: 6px;
  padding: 1px 6px;
  margin-top: 4px;
  display: inline-block;
}

.weather-hourly-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hourly-forecast-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 6px 10px;
  flex: 1;
}

.hourly-time {
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.55);
}

.hourly-icon {
  font-size: 16px;
  margin: 2px 0;
}

.hourly-temp {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
}

/* -------------------------------------------------------------------------
   4. Resources Widget Styles (Radial Gauges)
   ------------------------------------------------------------------------- */
.res-refresh-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: all 0.2s;
}

.res-refresh-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transform: rotate(90deg);
}

.widget-resources-body {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 4px 0 10px 0;
}

.radial-gauge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gauge-svg-wrap {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gauge-svg {
  transform: rotate(-90deg);
}

.gauge-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 5;
}

.gauge-fill {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gauge-center-text {
  position: absolute;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
}

.gauge-label {
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 6px;
}

.gauge-sub {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
}

.resources-footer-note {
  font-size: 9.5px;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* -------------------------------------------------------------------------
   5. Sticky Note Widget Styles
   ------------------------------------------------------------------------- */
.widget-stickynote {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(245, 158, 11, 0.4) !important;
}

.sticky-pin {
  font-size: 14px;
}

.widget-stickynote-body {
  width: 100%;
}

.sticky-textarea {
  width: 100%;
  height: 72px;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 12px;
  line-height: 1.45;
  color: #fef3c7;
}

.sticky-textarea::placeholder {
  color: rgba(254, 243, 199, 0.4);
}

.sticky-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(245, 158, 11, 0.2);
  font-size: 10px;
  color: rgba(254, 243, 199, 0.6);
}

.sticky-clear-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fef3c7;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* -------------------------------------------------------------------------
   Manage Widgets Modal Styles
   ------------------------------------------------------------------------- */
.widgets-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(25px);
  display: none;
  align-items: center;
  justify-content: center;
}

.widgets-modal-card {
  width: 480px;
  max-width: 90vw;
  background: rgba(28, 29, 36, 0.9);
  backdrop-filter: blur(45px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  padding: 24px;
  color: #ffffff;
}

.widgets-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.widgets-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  max-height: 380px;
  overflow-y: auto;
}

.widget-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px 14px;
  transition: background 0.2s;
}

.widget-toggle-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.widget-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.widget-row-icon {
  font-size: 24px;
}

.widget-row-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}

.widget-row-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2px;
}

.widgets-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* macOS Toggle Switch */
.mac-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.mac-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.mac-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(120, 120, 128, 0.32);
  transition: 0.3s;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.mac-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.mac-switch input:checked + .mac-slider {
  background-color: #34c759;
}

.mac-switch input:checked + .mac-slider:before {
  transform: translateX(20px);
}
