:root, html[data-theme="light"] {
  --primary: #236b50;
  --secondary: #142e25;
  --accent: #c0f0cf;
  --primary-fg: #fff;
  --header-color: #f1fbf4;
  --header-branding-color: #f1fbf4;
  --breadcrumbs-bg: #236b50;
  --link-fg: #27664b;
  --link-hover-color: #194631;
  --selected-row: #e3f0e5;
  --darkened-bg: #f0f4ed;
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --primary: #2b5440;
    --secondary: #142e25;
    --accent: #b1ebc0;
    --primary-fg: #f7f7f7;
    --header-color: #f1fbf4;
    --header-branding-color: #f1fbf4;
    --breadcrumbs-bg: #1f4031;
    --breadcrumbs-link-fg: #dceee3;
    --link-fg: #8fd9b2;
    --link-hover-color: #c5f0d8;
    --link-selected-fg: #a4ddbd;
    --body-bg: #111815;
    --body-fg: #eaf2ed;
    --body-quiet-color: #a9bdb2;
    --body-medium-color: #cad9d0;
    --body-loud-color: #ffffff;
    --darkened-bg: #18231e;
    --selected-bg: #1e2d26;
    --selected-row: #1f3b2e;
    --hairline-color: #24332c;
    --border-color: #2f4239;
    --button-bg: #254737;
    --button-hover-bg: #2f5b46;
    --default-button-bg: #2b6b4d;
    --default-button-hover-bg: #35805d;
    --object-tools-bg: #23382e;
    --object-tools-hover-bg: #2e4a3d;
  }
}

html[data-theme="dark"] {
  --primary: #2b5440;
  --secondary: #142e25;
  --accent: #b1ebc0;
  --primary-fg: #f7f7f7;
  --header-color: #f1fbf4;
  --header-branding-color: #f1fbf4;
  --breadcrumbs-bg: #1f4031;
  --breadcrumbs-link-fg: #dceee3;
  --link-fg: #8fd9b2;
  --link-hover-color: #c5f0d8;
  --link-selected-fg: #a4ddbd;
  --body-bg: #111815;
  --body-fg: #eaf2ed;
  --body-quiet-color: #a9bdb2;
  --body-medium-color: #cad9d0;
  --body-loud-color: #ffffff;
  --darkened-bg: #18231e;
  --selected-bg: #1e2d26;
  --selected-row: #1f3b2e;
  --hairline-color: #24332c;
  --border-color: #2f4239;
  --button-bg: #254737;
  --button-hover-bg: #2f5b46;
  --default-button-bg: #2b6b4d;
  --default-button-hover-bg: #35805d;
  --object-tools-bg: #23382e;
  --object-tools-hover-bg: #2e4a3d;
}

#header { gap: 10px 22px; flex-wrap: wrap; padding-inline: clamp(14px, 3vw, 38px); }
#site-name a { display: inline-flex; align-items: center; gap: 10px; font-weight: 660; text-decoration: none; }
.admin-brand-glyph {
  display: inline-grid; place-items: center; width: 30px; height: 30px;
  color: #18382e; background: #a0e3ba; border-radius: 10px;
}
.staff-workspaces { display: flex; flex-wrap: wrap; gap: 5px; }
.staff-workspaces a:link, .staff-workspaces a:visited {
  display: inline-block; padding: 8px 10px; border-radius: 6px; text-decoration: none;
}
.staff-workspaces a:hover { background: #3b624d; }
#content h1 { font-weight: 660; }
.dashboard #content { max-width: 1200px; width: 100%; box-sizing: border-box; }
.dashboard #content-main { width: 100%; }

/* Polish list/filter/sidebar surfaces */
.module, #changelist #toolbar, #changelist-filter {
  border-radius: 8px;
  overflow: hidden;
}
#changelist #toolbar {
  border: 1px solid var(--hairline-color);
  padding: 10px 12px;
  margin-bottom: 12px;
}
#changelist-search input[type="text"] {
  border-radius: 6px;
  padding: 6px 10px;
}
#changelist-search input[type="submit"],
.object-tools a {
  border-radius: 6px;
}
#changelist-filter {
  border: 1px solid var(--hairline-color);
}
#changelist-filter h2 {
  padding: 10px 15px;
}
#result_list thead th {
  padding: 10px 12px;
}
#result_list tbody td, #result_list tbody th {
  padding: 10px 12px;
  vertical-align: middle;
}
#nav-sidebar .module caption {
  border-radius: 6px 6px 0 0;
}

@media (max-width: 700px) {
  #header .staff-workspaces { width: 100%; }
}
