/* Calm Workspace: presentation-only layer for Hermes Personal. */
:root {
  color-scheme: light;
  --background: #f4f6f8 !important;
  --background-base: #f4f6f8 !important;
  --background-alpha: 1 !important;
  --midground: #506176 !important;
  --midground-base: #506176 !important;
  --midground-alpha: 1 !important;
  --foreground: #111827 !important;
  --foreground-base: #111827 !important;
  --foreground-alpha: 1 !important;
  --text-primary: #111827 !important;
  --text-secondary: #48566a !important;
  --text-tertiary: #69778a !important;
  --border: #d9e0e8 !important;
  --primary: #315f9e !important;
  --success: #38745c !important;
  --warning: #956d2e !important;
  --destructive: #a64242 !important;
}

html, body, #root {
  min-height: 100%;
  background: #f4f6f8 !important;
  color: #111827 !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
}

/* Application shell and navigation */
#app-sidebar {
  background: #fbfcfd !important;
  border-color: #dbe2ea !important;
  box-shadow: 1px 0 0 rgb(17 24 39 / 0.025), 10px 0 28px rgb(17 24 39 / 0.025);
}

#app-sidebar > div:first-child { border-color: #dbe2ea !important; }
#app-sidebar nav { border-color: #e5eaf0 !important; padding: 0.55rem 0.5rem !important; }

#app-sidebar a {
  margin: 0.08rem 0;
  border-radius: 0.55rem;
  color: #3f4c5e;
}

#app-sidebar a:hover { background: #edf2f7 !important; color: #111827 !important; }

#app-sidebar a[aria-current="page"] {
  background: #e7effa !important;
  color: #173d70 !important;
  font-weight: 650;
}

#app-sidebar [class*="text-midground"] { color: #315f9e !important; }

/* Main content: reduce visual noise while keeping focus states obvious. */
main, [role="main"], [class*="bg-background"] { background-color: transparent; }
[class*="border"] { border-color: #dbe2ea; }
[class*="shadow"] { box-shadow: 0 1px 2px rgb(17 24 39 / 0.04); }
[class*="rounded"] { border-radius: 0.7rem; }

[class*="bg-midground"] { background-color: #506176 !important; }
[class*="bg-midground/"], [class*="hover:bg-midground"]:hover { background-color: rgb(80 97 118 / 0.09) !important; }
[class*="text-text-primary"], [class*="text-foreground"] { color: #111827 !important; }
[class*="text-text-secondary"], [class*="text-muted-foreground"] { color: #48566a !important; }
[class*="text-text-tertiary"] { color: #69778a !important; }

/* Inputs, menus, dialogs, and buttons share a quiet readable surface. */
input, textarea, select, [contenteditable="true"] {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #111827 !important;
  border-radius: 0.55rem !important;
  box-shadow: inset 0 1px 1px rgb(17 24 39 / 0.02);
}

input::placeholder, textarea::placeholder { color: #7a8798 !important; opacity: 1; }

input:focus, textarea:focus, select:focus, [contenteditable="true"]:focus,
button:focus-visible, a:focus-visible {
  outline: 3px solid rgb(49 95 158 / 0.22) !important;
  outline-offset: 2px;
  border-color: #315f9e !important;
}

button {
  border-radius: 0.55rem;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

button:hover:not(:disabled) { box-shadow: 0 1px 2px rgb(17 24 39 / 0.06); }
button:active:not(:disabled) { transform: translateY(1px); }

/* Tables and session content benefit from stronger structure. */
table {
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border: 1px solid #dbe2ea;
  border-radius: 0.7rem;
  overflow: hidden;
}

thead, th { background: #f0f3f7 !important; color: #374151 !important; }
tr:hover td { background: #f8fafc; }
code, pre { background: #edf1f5 !important; color: #172033 !important; border-color: #d8e0e8 !important; }

/* A single intentional base appearance replaces the old palette menu. */
button[aria-label="Сменить тему"], button[aria-label="Switch theme"] { display: none !important; }

@media (max-width: 1023px) {
  header.lg\:hidden {
    background: #fbfcfd !important;
    border-color: #dbe2ea !important;
    box-shadow: 0 1px 8px rgb(17 24 39 / 0.04);
  }
}

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