:root {
  --po-font-sans: Inter, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --po-density-scale: 0.9;
  --po-radius-xs: 8px;
  --po-radius-sm: 12px;
  --po-radius-md: 16px;
  --po-radius-lg: 22px;
  --po-space-1: 4px;
  --po-space-2: 8px;
  --po-space-3: 12px;
  --po-space-4: 16px;
  --po-space-5: 20px;
  --po-space-6: 24px;
  --po-space-7: 32px;
  --po-space-8: 40px;
  --po-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.03);
  --po-shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.05);
  --po-shadow-md: 0 16px 40px rgba(15, 23, 42, 0.08);
  --po-shadow-lg: 0 22px 56px rgba(15, 23, 42, 0.14);
  --po-transition: 180ms ease;
  --po-overlay-scrim: rgba(15, 23, 42, 0.42);
  --po-overlay-surface: rgba(255, 255, 255, 0.96);
  --po-tooltip-bg: rgba(15, 23, 42, 0.96);
  --po-tooltip-text: #ffffff;
  --po-tooltip-shadow: 0 14px 38px rgba(15, 23, 42, 0.24);
  --po-bg-app: var(--po-body-bg, #eef3fb);
  --po-bg-surface: var(--po-surface, #ffffff);
  --po-bg-surface-2: var(--po-surface-muted, #f5f8fe);
  --po-bg-elevated: var(--po-overlay-surface, rgba(255, 255, 255, 0.96));
  --po-bg-overlay: var(--po-overlay-scrim, rgba(15, 23, 42, 0.42));
  --po-border-default: var(--po-border-soft, rgba(148, 163, 184, 0.18));
  --po-border-subtle: var(--po-border-strong, rgba(148, 163, 184, 0.28));
  --po-text-default: var(--po-text-primary, #0f172a);
  --po-text-subtle: var(--po-text-secondary, #64748b);
  --po-text-faint: var(--po-text-muted, #94a3b8);
}

html.premium-os-theme {
  font-size: calc(100% * var(--po-density-scale));
  scroll-behavior: smooth;
}

html.premium-os-theme[data-premium-os-font-size="compact"] {
  font-size: calc(94% * var(--po-density-scale));
}

html.premium-os-theme[data-premium-os-font-size="large"] {
  font-size: calc(106% * var(--po-density-scale));
}

html.premium-os-theme[data-premium-os-motion="on"] {
  scroll-behavior: auto;
}

html.premium-os-theme body {
  background: var(--po-body-bg);
  color: var(--po-text-primary);
  font-family: var(--po-font-sans);
  font-size: 0.95rem;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html.premium-os-theme body,
html.premium-os-theme button,
html.premium-os-theme input,
html.premium-os-theme select,
html.premium-os-theme textarea {
  font-family: var(--po-font-sans);
}

html.premium-os-theme h1,
html.premium-os-theme h2,
html.premium-os-theme h3,
html.premium-os-theme h4,
html.premium-os-theme h5,
html.premium-os-theme h6 {
  color: var(--po-text-strong);
  letter-spacing: -0.02em;
}

html.premium-os-theme h1 {
  font-size: 2rem;
}

html.premium-os-theme h2 {
  font-size: 1.6rem;
}

html.premium-os-theme h3 {
  font-size: 1.3rem;
}

html.premium-os-theme .text-muted,
html.premium-os-theme small,
html.premium-os-theme .small {
  color: var(--po-text-muted);
}

html.premium-os-theme a {
  transition: color var(--po-transition), background-color var(--po-transition), border-color var(--po-transition), box-shadow var(--po-transition);
}

html.premium-os-theme.premium-os-theme-switching *,
html.premium-os-theme.premium-os-theme-switching *::before,
html.premium-os-theme.premium-os-theme-switching *::after {
  animation: none !important;
  transition: none !important;
}

html.premium-os-theme[data-premium-os-motion="on"] *,
html.premium-os-theme[data-premium-os-motion="on"] *::before,
html.premium-os-theme[data-premium-os-motion="on"] *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
  transition-duration: 0.01ms !important;
}

html.premium-os-theme.premium-os-ui-booting *,
html.premium-os-theme.premium-os-ui-booting *::before,
html.premium-os-theme.premium-os-ui-booting *::after {
  animation: none !important;
  transition: none !important;
}

html.premium-os-theme.premium-os-ui-booting #header,
html.premium-os-theme.premium-os-ui-booting #menu,
html.premium-os-theme.premium-os-ui-booting #wrapper,
html.premium-os-theme.premium-os-ui-booting #setup-menu-wrapper,
html.premium-os-theme.premium-os-ui-booting .mobile-navbar,
html.premium-os-theme.premium-os-ui-booting #mobile-collapse {
  opacity: 0;
}

html.premium-os-theme.premium-os-ui-ready #header,
html.premium-os-theme.premium-os-ui-ready #menu,
html.premium-os-theme.premium-os-ui-ready #wrapper,
html.premium-os-theme.premium-os-ui-ready #setup-menu-wrapper,
html.premium-os-theme.premium-os-ui-ready .mobile-navbar,
html.premium-os-theme.premium-os-ui-ready #mobile-collapse {
  opacity: 1;
}

html.premium-os-theme hr,
html.premium-os-theme .hr-panel-separator {
  border-color: var(--po-border-soft);
}

html.premium-os-theme ::selection {
  background: rgba(53, 96, 241, 0.18);
}

html.premium-os-theme[data-premium-os-accent="azure"] {
  --po-primary: #3560f1;
  --po-primary-strong: #2547c8;
  --po-focus-ring: rgba(53, 96, 241, 0.14);
}

html.premium-os-theme[data-premium-os-accent="emerald"] {
  --po-primary: #1f8f6c;
  --po-primary-strong: #14694f;
  --po-focus-ring: rgba(31, 143, 108, 0.16);
}

html.premium-os-theme[data-premium-os-accent="violet"] {
  --po-primary: #6c5ce7;
  --po-primary-strong: #5342cf;
  --po-focus-ring: rgba(108, 92, 231, 0.16);
}

html.premium-os-theme[data-premium-os-accent="amber"] {
  --po-primary: #d97706;
  --po-primary-strong: #b45309;
  --po-focus-ring: rgba(217, 119, 6, 0.16);
}

html.premium-os-theme[data-premium-os-card-style="crisp"] {
  --po-radius-md: 12px;
  --po-radius-lg: 18px;
  --po-shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.04);
  --po-shadow-md: 0 10px 24px rgba(15, 23, 42, 0.06);
}
