:root {
  --pr-bg-0: #f6f8fb;
  --pr-bg-1: #edf2f7;
  --pr-surface: #ffffff;
  --pr-surface-soft: rgba(255, 255, 255, 0.96);
  --pr-border: #dde5ee;
  --pr-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --pr-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
  --pr-radius-sm: 3px;
  --pr-radius-md: 4px;
  --pr-radius-lg: 6px;
}

html,
body {
  background: linear-gradient(180deg, var(--pr-bg-0) 0%, var(--pr-bg-1) 100%);
  color: #1f2937;
  overflow-x: hidden;
  font-family:
    "Avenir Next",
    "Trebuchet MS",
    "Segoe UI Variable Text",
    "Noto Sans",
    sans-serif;
}

#app,
.nicegui-content,
.q-page {
  background: transparent !important;
}

.app-header {
  filter: none;
}

.app-brand-title {
  font-family:
    "Avenir Next Condensed",
    "Trebuchet MS",
    "Segoe UI Variable Text",
    sans-serif;
  letter-spacing: 0.16em;
}

.header-metrics-panel {
  border-radius: var(--pr-radius-lg);
  background: rgba(255, 255, 255, 0.04) !important;
}

.stat-chip {
  border-radius: var(--pr-radius-md);
}

.manager-surface,
.generator-surface,
.generator-settings-card {
  border-radius: var(--pr-radius-lg);
  background: #ffffff;
  box-shadow: var(--pr-shadow-sm);
  will-change: auto;
}

.generator-settings-card {
  box-shadow: var(--pr-shadow-sm) !important;
}

.q-card {
  border: 1px solid var(--pr-border);
  box-shadow: var(--pr-shadow-sm);
  border-radius: var(--pr-radius-lg);
}

.q-btn {
  border-radius: var(--pr-radius-md);
}

.q-field--outlined .q-field__control {
  border-radius: var(--pr-radius-md) !important;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.q-field--focused .q-field__control {
  box-shadow: none;
}

.q-separator {
  opacity: 0.7;
}

.task-card {
  contain: layout paint style;
  transition: border-color 0.1s ease, box-shadow 0.1s ease;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.task-card:hover {
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.10);
}

.sidebar-shell {
  background: #ffffff;
}

.sidebar-nav-btn {
  min-height: 50px;
  border-radius: var(--pr-radius-md);
}

.monitor-sidebar {
  background: #ffffff;
}

.monitor-main-panel {
  border-top-left-radius: var(--pr-radius-lg);
  border-top-right-radius: var(--pr-radius-lg);
  overflow: hidden;
}

/* readonly codemirror */
.readonly-cm .cm-focused {
  outline: none !important;
}
.readonly-cm .cm-cursor {
  display: none !important;
}
.readonly-cm .cm-activeLine {
  background: transparent !important;
}
.readonly-cm .cm-content {
  cursor: default;
}
.readonly-cm .cm-gutters {
  cursor: default;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
