
:root {
  --font-main: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', Courier, monospace;
  --font-size-base: 17px;
  --font-size-sm: 15px;
  --font-size-xs: 13.5px;
  --font-size-lg: 19.5px;
  --font-size-xl: 23px;

  --win-bg: #2b2e33;
  --win-gray: #c0c0c0;
  --win-gray-light: #dfdfdf;
  --win-gray-dark: #808080;
  --win-gray-darker: #404040;
  --win-navy: #000080;
  --win-navy-light: #1084d0;
  --win-maroon: #800000;
  --win-maroon-dark: #5c0000;
  --win-green: #008000;
  --win-white: #ffffff;
  --win-black: #000000;
  --win-panel-bg: #ffffff;
  --win-panel-gray: #eae8e3;
  --win-text: #000000;
  --win-text-muted: #555555;
  --win-titlebar-bg: linear-gradient(90deg, #000080, #1084d0);
  --win-titlebar-text: #ffffff;
  --win-border-light: #ffffff;
  --win-border-dark: #808080;
  --win-border-darker: #404040;
  --win-shadow: 6px 6px 0px rgba(0, 0, 0, 0.45);
}

html[data-theme="cyber"], body[data-theme="cyber"], [data-theme="cyber"],
html.theme-cyber, body.theme-cyber, .theme-cyber {
  --win-bg: #06090e !important;
  --win-gray: #161b22 !important;
  --win-gray-light: #21262d !important;
  --win-gray-dark: #30363d !important;
  --win-gray-darker: #010409 !important;
  --win-navy: #58a6ff !important;
  --win-navy-light: #79c0ff !important;
  --win-maroon: #ff7b72 !important;
  --win-maroon-dark: #da3633 !important;
  --win-green: #3fb950 !important;
  --win-white: #f0f6fc !important;
  --win-black: #06090e !important;
  --win-panel-bg: #0d1117 !important;
  --win-panel-gray: #161b22 !important;
  --win-text: #e6edf3 !important;
  --win-text-muted: #8b949e !important;
  --win-titlebar-bg: linear-gradient(90deg, #1f6feb, #093c8c) !important;
  --win-titlebar-text: #ffffff !important;
  --win-border-light: #388bfd !important;
  --win-border-dark: #30363d !important;
  --win-border-darker: #010409 !important;
  --win-shadow: 0 0 20px rgba(56, 139, 253, 0.25), 6px 6px 0px #010409 !important;
  background-color: #06090e !important;
  color: #e6edf3 !important;
}

html[data-theme="mac2030"], body[data-theme="mac2030"], [data-theme="mac2030"],
html.theme-mac2030, body.theme-mac2030, .theme-mac2030 {
  --win-bg: #04060c !important;
  --win-gray: rgba(15, 23, 42, 0.35) !important;
  --win-gray-light: rgba(255, 255, 255, 0.08) !important;
  --win-gray-dark: rgba(255, 255, 255, 0.15) !important;
  --win-gray-darker: rgba(0, 0, 0, 0.7) !important;
  --win-navy: #38bdf8 !important;
  --win-navy-light: #818cf8 !important;
  --win-maroon: #f43f5e !important;
  --win-maroon-dark: #be123c !important;
  --win-green: #34d399 !important;
  --win-white: #ffffff !important;
  --win-black: #030712 !important;
  --win-panel-bg: rgba(15, 23, 42, 0.25) !important;
  --win-panel-gray: rgba(255, 255, 255, 0.03) !important;
  --win-text: #f8fafc !important;
  --win-text-muted: #94a3b8 !important;
  --win-titlebar-bg: linear-gradient(135deg, rgba(30, 41, 59, 0.35), rgba(15, 23, 42, 0.55)) !important;
  --win-titlebar-text: #ffffff !important;
  --win-border-light: rgba(255, 255, 255, 0.25) !important;
  --win-border-dark: rgba(255, 255, 255, 0.1) !important;
  --win-border-darker: rgba(0, 0, 0, 0.8) !important;
  --win-shadow: 0 35px 80px -15px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
  background-color: #04060c !important;
  color: #f8fafc !important;
}

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

html, body {
  width: 100%;
  min-height: 100vh;
  font-family: var(--font-mono);
  font-size: var(--font-size-base);
  line-height: 1.55;
  color: var(--win-text);
  background-color: var(--win-bg);
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

html[data-theme="mac2030"], body[data-theme="mac2030"],
html.theme-mac2030, body.theme-mac2030 {
  font-family: var(--font-main) !important;
  letter-spacing: -0.012em;
}

#liquid-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.92;
}

.app-viewport {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
}

.win-system-bar {
  background: var(--win-gray);
  border-top: 2px solid var(--win-border-light);
  border-left: 2px solid var(--win-border-light);
  border-right: 2px solid var(--win-border-darker);
  border-bottom: 2px solid var(--win-border-darker);
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.4);
}

[data-theme="cyber"] .win-system-bar,
.theme-cyber .win-system-bar {
  border-color: #388bfd #010409 #010409 #388bfd !important;
  box-shadow: 0 0 10px rgba(56, 139, 253, 0.2) !important;
}

[data-theme="mac2030"] .win-system-bar,
.theme-mac2030 .win-system-bar {
  background: rgba(15, 23, 42, 0.35) !important;
  -webkit-backdrop-filter: blur(28px) saturate(200%) !important;
  backdrop-filter: blur(28px) saturate(200%) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 16px !important;
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
  padding: 12px 20px !important;
}

.system-title {
  font-weight: bold;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.system-title a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}

.system-title .brand-accent {
  background: var(--win-navy);
  color: #ffffff;
  padding: 3px 8px;
  font-size: 0.95rem;
  border-radius: 2px;
}

[data-theme="cyber"] .system-title .brand-accent,
.theme-cyber .system-title .brand-accent {
  background: #1f6feb !important;
  color: #ffffff !important;
  box-shadow: 0 0 8px rgba(31, 111, 235, 0.6) !important;
}

[data-theme="mac2030"] .system-title .brand-accent,
.theme-mac2030 .system-title .brand-accent {
  background: linear-gradient(135deg, #38bdf8, #818cf8) !important;
  color: #030712 !important;
  font-weight: 800 !important;
  border-radius: 8px !important;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.5) !important;
  padding: 4px 12px !important;
}

.system-user {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 14px;
}

.theme-switch-btn {
  font-family: var(--font-mono);
  background: var(--win-gray-light);
  border: 2px outset var(--win-border-light);
  padding: 6px 12px;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  color: var(--win-text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

[data-theme="cyber"] .theme-switch-btn,
.theme-cyber .theme-switch-btn {
  background: #1f6feb !important;
  color: #ffffff !important;
  border: 2px solid #388bfd !important;
  box-shadow: 0 0 8px rgba(56, 139, 253, 0.4) !important;
}

[data-theme="mac2030"] .theme-switch-btn,
.theme-mac2030 .theme-switch-btn {
  font-family: var(--font-main) !important;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(129, 140, 248, 0.18)) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  backdrop-filter: blur(16px) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  border-radius: 10px !important;
  box-shadow: 0 6px 16px rgba(56, 189, 248, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  padding: 6px 16px !important;
}

.theme-switch-btn:active {
  border-style: inset;
}

[data-theme="mac2030"] .theme-switch-btn:active,
.theme-mac2030 .theme-switch-btn:active {
  transform: translateY(1px);
  filter: brightness(0.9);
}

.win-window {
  background: var(--win-gray);
  border-top: 2px solid var(--win-border-light);
  border-left: 2px solid var(--win-border-light);
  border-right: 2px solid var(--win-border-darker);
  border-bottom: 2px solid var(--win-border-darker);
  box-shadow: var(--win-shadow);
  margin: 0 auto 2rem auto;
  max-width: 1100px;
  width: 100%;
}

[data-theme="cyber"] .win-window,
.theme-cyber .win-window {
  border: 2px solid #388bfd !important;
  box-shadow: 0 0 15px rgba(56, 139, 253, 0.3), 6px 6px 0px #010409 !important;
}

[data-theme="mac2030"] .win-window,
.theme-mac2030 .win-window {
  background: rgba(10, 15, 30, 0.28) !important;
  -webkit-backdrop-filter: blur(32px) saturate(220%) !important;
  backdrop-filter: blur(32px) saturate(220%) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 22px !important;
  box-shadow: 
    0 35px 80px -15px rgba(0, 0, 0, 0.85),
    0 15px 30px -5px rgba(56, 189, 248, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5) !important;
  overflow: hidden;
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

[data-theme="mac2030"] .win-window:hover,
.theme-mac2030 .win-window:hover {
  box-shadow: 
    0 40px 90px -15px rgba(0, 0, 0, 0.9),
    0 20px 40px -5px rgba(56, 189, 248, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
}

.win-titlebar {
  background: var(--win-titlebar-bg);
  color: var(--win-titlebar-text);
  padding: 6px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  user-select: none;
}

[data-theme="mac2030"] .win-titlebar,
.theme-mac2030 .win-titlebar {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.35), rgba(15, 23, 42, 0.55)) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  padding: 12px 18px !important;
  font-size: 0.98rem !important;
  letter-spacing: 0.2px !important;
}

.win-titlebar.maroon {
  background: linear-gradient(90deg, var(--win-maroon), #a02020);
}

[data-theme="mac2030"] .win-titlebar.maroon,
.theme-mac2030 .win-titlebar.maroon {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.25), rgba(15, 23, 42, 0.6)) !important;
  border-bottom: 1px solid rgba(244, 63, 94, 0.4) !important;
}

.win-controls {
  display: flex;
  gap: 8px;
}

.win-ctrl-btn {
  width: 20px;
  height: 20px;
  background: var(--win-gray);
  border-top: 1px solid var(--win-border-light);
  border-left: 1px solid var(--win-border-light);
  border-right: 1px solid var(--win-border-darker);
  border-bottom: 1px solid var(--win-border-darker);
  color: var(--win-text);
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
}

[data-theme="mac2030"] .win-ctrl-btn,
.theme-mac2030 .win-ctrl-btn {
  width: 13px !important;
  height: 13px !important;
  border-radius: 50% !important;
  border: none !important;
  font-size: 0 !important;
  transition: transform 0.15s ease, filter 0.15s ease;
}

[data-theme="mac2030"] .win-controls span:nth-child(1), [data-theme="mac2030"] .win-controls .win-ctrl-btn:nth-child(1),
.theme-mac2030 .win-controls span:nth-child(1), .theme-mac2030 .win-controls .win-ctrl-btn:nth-child(1) {
  background: #f59e0b !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}
[data-theme="mac2030"] .win-controls span:nth-child(2), [data-theme="mac2030"] .win-controls .win-ctrl-btn:nth-child(2),
.theme-mac2030 .win-controls span:nth-child(2), .theme-mac2030 .win-controls .win-ctrl-btn:nth-child(2) {
  background: #10b981 !important;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}
[data-theme="mac2030"] .win-controls span:nth-child(3), [data-theme="mac2030"] .win-controls a.win-ctrl-btn,
.theme-mac2030 .win-controls span:nth-child(3), .theme-mac2030 .win-controls a.win-ctrl-btn {
  background: #ef4444 !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

.win-ctrl-btn:active {
  border-top: 1px solid var(--win-border-darker);
  border-left: 1px solid var(--win-border-darker);
  border-right: 1px solid var(--win-border-light);
  border-bottom: 1px solid var(--win-border-light);
}

.win-body {
  padding: 1.5rem;
  background: var(--win-gray);
}

[data-theme="mac2030"] .win-body,
.theme-mac2030 .win-body {
  background: transparent !important;
  padding: 1.85rem !important;
}

.win-inset {
  background: var(--win-panel-bg);
  border-top: 2px solid var(--win-border-dark);
  border-left: 2px solid var(--win-border-dark);
  border-right: 2px solid var(--win-border-light);
  border-bottom: 2px solid var(--win-border-light);
  padding: 1.25rem;
  color: var(--win-text);
}

[data-theme="cyber"] .win-inset,
.theme-cyber .win-inset {
  border-color: #30363d #388bfd #388bfd #30363d !important;
  background: #0d1117 !important;
}

[data-theme="mac2030"] .win-inset,
.theme-mac2030 .win-inset {
  background: rgba(255, 255, 255, 0.04) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 14px !important;
  box-shadow: 
    0 16px 36px -8px rgba(0, 0, 0, 0.6),
    0 4px 12px rgba(56, 189, 248, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3) !important;
}

.win-inset-gray {
  background: var(--win-panel-gray);
  border-top: 2px solid var(--win-border-dark);
  border-left: 2px solid var(--win-border-dark);
  border-right: 2px solid var(--win-border-light);
  border-bottom: 2px solid var(--win-border-light);
  padding: 1.25rem;
  color: var(--win-text);
}

[data-theme="mac2030"] .win-inset-gray,
.theme-mac2030 .win-inset-gray {
  background: rgba(255, 255, 255, 0.02) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  box-shadow: 
    0 12px 28px -6px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.win-btn {
  font-family: var(--font-mono);
  background: var(--win-gray);
  border-top: 2px solid var(--win-border-light);
  border-left: 2px solid var(--win-border-light);
  border-right: 2px solid var(--win-border-darker);
  border-bottom: 2px solid var(--win-border-darker);
  padding: 8px 18px;
  font-size: 1.05rem;
  font-weight: bold;
  color: var(--win-text);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  user-select: none;
}

[data-theme="cyber"] .win-btn,
.theme-cyber .win-btn {
  background: #21262d !important;
  border-color: #388bfd #010409 #010409 #388bfd !important;
  color: #e6edf3 !important;
}

[data-theme="mac2030"] .win-btn,
.theme-mac2030 .win-btn {
  font-family: var(--font-main) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 12px !important;
  color: #f8fafc !important;
  box-shadow: 
    0 8px 20px -4px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.win-btn:hover {
  filter: brightness(1.15);
}

[data-theme="mac2030"] .win-btn:hover,
.theme-mac2030 .win-btn:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(255, 255, 255, 0.32) !important;
  transform: translateY(-2px);
  box-shadow: 
    0 14px 28px -4px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(56, 189, 248, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

.win-btn:active, .win-btn.active {
  border-top: 2px solid var(--win-border-darker);
  border-left: 2px solid var(--win-border-darker);
  border-right: 2px solid var(--win-border-light);
  border-bottom: 2px solid var(--win-border-light);
  filter: brightness(0.92);
  padding: 9px 17px 7px 19px;
}

[data-theme="cyber"] .win-btn:active, [data-theme="cyber"] .win-btn.active,
.theme-cyber .win-btn:active, .theme-cyber .win-btn.active {
  background: #1f6feb !important;
  color: #ffffff !important;
}

[data-theme="mac2030"] .win-btn:active, [data-theme="mac2030"] .win-btn.active,
.theme-mac2030 .win-btn:active, .theme-mac2030 .win-btn.active {
  background: rgba(56, 189, 248, 0.25) !important;
  border-color: #38bdf8 !important;
  transform: translateY(1px) !important;
  padding: 8px 18px !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35) !important;
}

.win-btn-primary {
  background: #000080;
  color: #ffffff !important;
  border-color: #5c8ae6 var(--win-border-darker) var(--win-border-darker) #5c8ae6;
}

[data-theme="cyber"] .win-btn-primary,
.theme-cyber .win-btn-primary {
  background: #1f6feb !important;
  color: #ffffff !important;
  border-color: #79c0ff #010409 #010409 #79c0ff !important;
  box-shadow: 0 0 10px rgba(31, 111, 235, 0.4) !important;
}

[data-theme="mac2030"] .win-btn-primary,
.theme-mac2030 .win-btn-primary {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.3), rgba(56, 189, 248, 0.2)) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  backdrop-filter: blur(16px) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  border-radius: 12px !important;
  box-shadow: 
    0 12px 28px -4px rgba(2, 132, 199, 0.4),
    0 0 20px rgba(56, 189, 248, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

[data-theme="mac2030"] .win-btn-primary:hover,
.theme-mac2030 .win-btn-primary:hover {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.45), rgba(56, 189, 248, 0.35)) !important;
  border-color: rgba(56, 189, 248, 0.7) !important;
  box-shadow: 
    0 16px 36px -4px rgba(2, 132, 199, 0.6),
    0 0 25px rgba(56, 189, 248, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

.win-btn-maroon {
  background: var(--win-maroon);
  color: #ffffff !important;
  border-color: #c04040 var(--win-border-darker) var(--win-border-darker) #c04040;
}

[data-theme="mac2030"] .win-btn-maroon,
.theme-mac2030 .win-btn-maroon {
  background: linear-gradient(135deg, rgba(190, 18, 60, 0.3), rgba(244, 63, 94, 0.2)) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  backdrop-filter: blur(16px) !important;
  color: #ffffff !important;
  border: 1px solid rgba(244, 63, 94, 0.45) !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 28px -4px rgba(244, 63, 94, 0.35) !important;
}

.win-input, .win-textarea {
  font-family: var(--font-mono);
  font-size: 16px;
  width: 100%;
  padding: 10px 12px;
  background: var(--win-panel-bg);
  color: var(--win-text);
  border-top: 2px solid var(--win-border-dark);
  border-left: 2px solid var(--win-border-dark);
  border-right: 2px solid var(--win-border-light);
  border-bottom: 2px solid var(--win-border-light);
  outline: none;
}

[data-theme="cyber"] .win-input, [data-theme="cyber"] .win-textarea,
.theme-cyber .win-input, .theme-cyber .win-textarea {
  background: #0d1117 !important;
  color: #e6edf3 !important;
  border-color: #30363d #388bfd #388bfd #30363d !important;
}

[data-theme="mac2030"] .win-input, [data-theme="mac2030"] .win-textarea,
.theme-mac2030 .win-input, .theme-mac2030 .win-textarea {
  font-family: var(--font-mono) !important;
  background: rgba(15, 23, 42, 0.4) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  backdrop-filter: blur(16px) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 12px !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5) !important;
  padding: 14px 16px !important;
}

.win-input:focus, .win-textarea:focus {
  outline: 2px solid var(--win-navy);
}

[data-theme="mac2030"] .win-input:focus, [data-theme="mac2030"] .win-textarea:focus,
.theme-mac2030 .win-input:focus, .theme-mac2030 .win-textarea:focus {
  outline: none !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35), inset 0 2px 6px rgba(0, 0, 0, 0.5) !important;
}

.win-textarea {
  min-height: 200px;
  resize: vertical;
}

.win-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.win-table th {
  background: var(--win-gray);
  border-top: 1px solid var(--win-border-light);
  border-left: 1px solid var(--win-border-light);
  border-right: 1px solid var(--win-border-darker);
  border-bottom: 1px solid var(--win-border-darker);
  padding: 8px 12px;
  text-align: left;
  font-weight: bold;
  color: var(--win-text);
}

[data-theme="cyber"] .win-table th,
.theme-cyber .win-table th {
  background: #161b22 !important;
  color: #58a6ff !important;
  border-color: #30363d !important;
}

[data-theme="mac2030"] .win-table th,
.theme-mac2030 .win-table th {
  background: rgba(30, 41, 59, 0.35) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  backdrop-filter: blur(14px) !important;
  color: #38bdf8 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  padding: 14px 16px !important;
  font-weight: 700 !important;
}

.win-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--win-gray-dark);
  vertical-align: middle;
  color: var(--win-text);
}

[data-theme="mac2030"] .win-table td,
.theme-mac2030 .win-table td {
  padding: 16px 16px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.win-table tr:hover td {
  background: rgba(16, 132, 208, 0.15);
}

[data-theme="mac2030"] .win-table tr:hover td,
.theme-mac2030 .win-table tr:hover td {
  background: rgba(56, 189, 248, 0.08) !important;
}

.win-statusbar {
  background: var(--win-gray);
  border-top: 1px solid var(--win-gray-dark);
  padding: 6px 10px;
  font-size: 0.9rem;
  color: var(--win-text-muted);
  display: flex;
  justify-content: space-between;
}

[data-theme="mac2030"] .win-statusbar,
.theme-mac2030 .win-statusbar {
  background: rgba(15, 23, 42, 0.3) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  backdrop-filter: blur(14px) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding: 10px 18px !important;
  font-size: 0.88rem !important;
}

.win-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: -2px;
  position: relative;
  z-index: 2;
}

[data-theme="mac2030"] .win-tabs,
.theme-mac2030 .win-tabs {
  gap: 10px !important;
  margin-bottom: 10px !important;
}

.win-tab {
  background: var(--win-gray);
  border-top: 2px solid var(--win-border-light);
  border-left: 2px solid var(--win-border-light);
  border-right: 2px solid var(--win-border-darker);
  border-bottom: 2px solid var(--win-gray);
  padding: 8px 18px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  color: var(--win-text);
}

[data-theme="cyber"] .win-tab,
.theme-cyber .win-tab {
  background: #161b22 !important;
  border-color: #30363d #010409 #010409 #30363d !important;
  color: #8b949e !important;
}

[data-theme="mac2030"] .win-tab,
.theme-mac2030 .win-tab {
  font-family: var(--font-main) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 10px !important;
  color: #94a3b8 !important;
  padding: 8px 18px !important;
  transition: all 0.2s ease;
}

.win-tab.active {
  background: var(--win-gray);
  border-bottom: 2px solid var(--win-gray);
  margin-bottom: -2px;
  padding-bottom: 10px;
}

[data-theme="cyber"] .win-tab.active,
.theme-cyber .win-tab.active {
  background: #0d1117 !important;
  color: #58a6ff !important;
  border-color: #388bfd #388bfd #0d1117 #388bfd !important;
}

[data-theme="mac2030"] .win-tab.active,
.theme-mac2030 .win-tab.active {
  background: rgba(56, 189, 248, 0.2) !important;
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3) !important;
  margin-bottom: 0 !important;
  padding-bottom: 8px !important;
}

.progress-step {
  padding: 10px 14px;
  margin-bottom: 8px;
  border: 1px solid var(--win-gray-dark);
  background: var(--win-panel-bg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  font-size: 0.95rem;
  color: var(--win-text);
}

[data-theme="mac2030"] .progress-step,
.theme-mac2030 .progress-step {
  border-radius: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(15, 23, 42, 0.4) !important;
}

.progress-step.done {
  background: rgba(46, 125, 50, 0.15);
  border-color: var(--win-green);
  color: var(--win-green);
}

[data-theme="mac2030"] .progress-step.done,
.theme-mac2030 .progress-step.done {
  background: rgba(52, 211, 153, 0.18) !important;
  border-color: #34d399 !important;
  color: #34d399 !important;
}

.progress-step.active {
  background: rgba(31, 111, 235, 0.15);
  border-color: var(--win-navy);
  color: var(--win-navy-light);
  animation: pulse-step 1.4s infinite;
}

[data-theme="mac2030"] .progress-step.active,
.theme-mac2030 .progress-step.active {
  background: rgba(56, 189, 248, 0.2) !important;
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3) !important;
}

@keyframes pulse-step {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

.processing-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

[data-theme="mac2030"] .processing-modal-overlay,
.theme-mac2030 .processing-modal-overlay {
  -webkit-backdrop-filter: blur(16px) !important;
  backdrop-filter: blur(16px) !important;
}

@media (max-width: 768px) {
  .app-viewport {
    padding: 0.5rem;
  }
  .win-system-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
  }
  .system-user {
    width: 100%;
    justify-content: space-between;
    font-size: 0.9rem;
    flex-wrap: wrap;
  }
  .win-window {
    margin-bottom: 1rem;
  }
  .win-btn {
    min-height: 44px;
    padding: 10px 16px;
  }
  .win-table th, .win-table td {
    padding: 8px 6px;
    font-size: 0.9rem;
  }
}
