/* Unfold adapter. Palette values are generated from docs/brand/identity.json. */
:root {
  --brand-hover-surface: color-mix(in srgb, var(--brand-background) 65%, var(--brand-border));
}
body {
  background: var(--brand-background);
  color: var(--brand-wordmark);
  font-family: var(--brand-font-sans);
}
/* The staff sign-in has its own quiet composition, using the shared brand assets. */
.brand-admin-login-shell {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 6rem 1.25rem 3rem;
  background: radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--brand-action) 5%, var(--brand-background)), var(--brand-background) 65%);
}
.brand-admin-login-card {
  width: 100%;
  max-width: 28rem;
  padding: 2.5rem;
  border-radius: 1.5rem;
  background: var(--brand-surface);
  box-shadow: 0 24px 64px color-mix(in srgb, var(--brand-wordmark) 6%, transparent);
}
.brand-admin-login-heading { margin-bottom: 2rem; }
.brand-admin-login-logo { margin-bottom: 2rem; line-height: 0; }
.brand-admin-login-logo .brand-logo { width: 13rem; }
.brand-admin-login-eyebrow { color: var(--brand-muted); font-size: .6875rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.brand-admin-login-heading h1 { margin-top: .625rem; color: var(--brand-wordmark); font-size: 1.75rem; font-weight: 600; line-height: 1.2; letter-spacing: -.035em; }
.brand-admin-login-description { margin-top: .75rem; color: var(--brand-muted); font-size: .875rem; line-height: 1.5; }
.brand-admin-login #login-form .form-field { margin-bottom: 1.25rem; }
.brand-admin-login #login-form :is(input:not([type="hidden"]), button[type="submit"]) { min-height: 2.75rem; border-radius: var(--brand-radius); }
@media (max-width: 480px) {
  .brand-admin-login-shell { padding: 5rem 1rem 2rem; }
  .brand-admin-login-card { padding: 1.75rem 1.5rem; }
}
/* Unfold uses white utilities for panels and base-900 for several dark surfaces. */
.bg-white { background-color: var(--brand-surface); }
#main, #nav-sidebar, #nav-sidebar-inner { background-color: var(--brand-background); }
[class*="border-base-"] { border-color: var(--brand-border); }
/* Group content with headings, spacing and surfaces instead of nested frames. */
body :is(.brand-panel, .brand-list-toolbar, .form-rows, .aligned,
.dynamic-agent-policy,
#content-related) {
  border-width: 0;
  box-shadow: none;
}
.brand-panel-heading, .brand-panel-footer, .field-line,
.module > [class~="border-b"], .form-rows > [class~="border-b"], .aligned > h2,
#content-related > h2,
.formset .form-row, .formset .form-actions,
.formset .form-nested > [class*="border-base-"],
.form-rows > [class~="border-dashed"] {
  border-width: 0;
}
#result_list :is(th, td), table.formset :is(th, td),
.brand-panel .data-row > :is(th, td), table.brand-panel :is(th, td),
.pipeline-component-grid__row { border-width: 0; }
.brand-panel { background-color: var(--brand-surface); }
/* Focus rings must be able to extend beyond a fieldset's former card frame. */
.form-rows { overflow: visible; }
:is(input, select, textarea):not([type="checkbox"], [type="radio"], [type="hidden"]) {
  border-color: var(--brand-control-border);
}
/* Unlayered brand rules must preserve Unfold's layered validation utilities. */
.errors :is(input, select, textarea),
:is(input, select, textarea)[aria-invalid="true"] {
  border-color: var(--color-red-600);
}
.dark .errors :is(input, select, textarea),
.dark :is(input, select, textarea)[aria-invalid="true"] {
  border-color: var(--color-red-500);
}
/* Select2's visible control is a span, while its original select is hidden. */
.select2.select2-container {
  border-color: var(--brand-control-border);
  background-color: var(--brand-surface);
}
.select2-container .select2-selection {
  border-color: var(--brand-control-border);
}
.select2.select2-container.select2-container--focus,
.select2.select2-container.select2-container--open {
  border-color: var(--brand-control-border);
  border-bottom-width: 1px;
  outline: 2px solid var(--brand-action);
  outline-offset: 3px;
}
.select2-container.select2-container--open .select2-dropdown {
  border-color: var(--brand-control-border);
  background-color: var(--brand-surface);
}
/* Keep hover/keyboard highlights legible across Select2 and Unfold themes. */
.select2-container .select2-results__option[aria-selected]:not([aria-disabled="true"]):is(:hover, .select2-results__option--highlighted) {
  color: var(--brand-wordmark);
  /* Unfold marks its highlight background important. */
  background-color: var(--brand-success-surface) !important;
}
.errors .select2.select2-container,
.errors .select2-container .select2-selection {
  border-color: var(--color-red-600);
}
.dark .errors .select2.select2-container,
.dark .errors .select2-container .select2-selection {
  border-color: var(--color-red-500);
}
.errors .select2.select2-container--focus,
.errors .select2.select2-container--open {
  outline-color: var(--color-red-600);
}
.dark .errors .select2.select2-container--focus,
.dark .errors .select2.select2-container--open {
  outline-color: var(--color-red-500);
}
/* A base shade is used for both borders and text by Unfold; keep text legible. */
[class~="text-base-700"], [class~="text-base-800"], [class~="text-base-900"],
[class~="hover:text-base-700"]:hover, [class~="hover:text-base-800"]:hover,
[class~="hover:text-base-900"]:hover { color: var(--brand-wordmark); }
[class~="bg-primary-600"], [class~="bg-primary-500"],
[class~="bg-primary-700"], [class~="bg-primary-800"],
[class~="bg-primary-900"], [class~="bg-primary-950"] {
  color: var(--brand-action-foreground);
}
/* The bulk-action bar uses inverted ink; Run should read as a distinct control. */
#changelist-actions button[name="index"] {
  min-height: 0;
  padding: .25rem .875rem;
  border: 1px solid color-mix(in srgb, var(--brand-action-foreground) 60%, transparent);
  background-color: transparent;
  color: var(--brand-action-foreground);
  transition: background-color .15s, border-color .15s;
}
#changelist-actions button[name="index"]:hover {
  border-color: var(--brand-action-foreground);
  background-color: color-mix(in srgb, var(--brand-action-foreground) 12%, transparent);
}
#changelist-actions button[name="index"]:focus-visible {
  outline: 2px solid var(--brand-action-foreground);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  #changelist-actions button[name="index"] { transition: none; }
}
.brand-account-link { display: flex; align-items: center; gap: .625rem; min-height: 2.25rem; }
.brand-account-link > .material-symbols-outlined { flex-shrink: 0; width: 1.25rem; font-size: 1.125rem; line-height: 1; text-align: center; }
.brand-nav-row {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 2.375rem;
  margin: 0.125rem -0.75rem;
  border-radius: 0.375rem;
  color: var(--brand-wordmark);
}
.brand-nav-row:hover { background-color: var(--brand-hover-surface); }
.brand-nav-link {
  display: flex;
  flex: 1;
  align-items: center;
  align-self: stretch;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  line-height: 1.4;
  border-radius: inherit;
}
.brand-nav-icon, .brand-nav-toggle { color: var(--brand-muted); }
.brand-nav-parent-current { font-weight: 600; }
.brand-nav-parent-current .brand-nav-icon { color: var(--brand-action); }
.brand-nav-current {
  background-color: color-mix(in srgb, var(--brand-symbol) 8%, var(--brand-background));
  color: var(--brand-wordmark);
  font-weight: 600;
}
.brand-nav-current:hover {
  background-color: color-mix(in srgb, var(--brand-symbol) 12%, var(--brand-background));
}
.brand-nav-current::before {
  content: "";
  position: absolute;
  top: 0.625rem;
  bottom: 0.625rem;
  left: 0;
  width: 2px;
  border-radius: 2px;
  background-color: var(--brand-action);
  pointer-events: none;
}
.brand-nav-current .brand-nav-icon { color: var(--brand-action); }
.brand-nav-toggle {
  align-self: stretch;
  padding: 0 0.75rem;
  cursor: pointer;
  border-radius: inherit;
}
.brand-nav-toggle:hover { color: var(--brand-wordmark); }
.brand-nav-children {
  display: flex;
  flex-direction: column;
  margin: 0.25rem 0 0.5rem 0.75rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--brand-border);
}
input[type="checkbox"]:checked, input[type="radio"]:checked {
  background-color: var(--brand-action);
  border-color: var(--brand-action);
}
input[type="checkbox"]:checked::after, input[type="radio"]:checked::after {
  color: var(--brand-action-foreground);
}
input[type="checkbox"][class~="rounded-full"]::after {
  background-color: var(--brand-surface);
}
:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--brand-action);
  outline-offset: 3px;
}
.errors :is(input, select, textarea):focus,
:is(input, select, textarea)[aria-invalid="true"]:focus {
  outline-color: var(--color-red-600);
}
.dark .errors :is(input, select, textarea):focus,
.dark :is(input, select, textarea)[aria-invalid="true"]:focus {
  outline-color: var(--color-red-500);
}
/* Search is one compound control: focus belongs to its wrapper, not its input. */
.brand-search-control {
  border: 1px solid var(--brand-control-border);
  background-color: var(--brand-surface);
}
.brand-search-control:focus-within {
  outline: 2px solid var(--brand-action);
  outline-offset: 3px;
}
.brand-search-control :is(input, button):focus {
  outline: none;
  box-shadow: none;
}
.brand-command-search {
  border-radius: var(--border-radius, 6px) var(--border-radius, 6px) 0 0;
}
/* The command panel clips its contents; keep its single focus ring inside. */
.brand-command-search:focus-within { outline-offset: -2px; }
.brand-navigation-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  min-height: 7rem;
  border-bottom: 1px solid var(--brand-border);
  flex-shrink: 0;
}
.brand-navigation-heading {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 0.5rem;
}
.brand-sidebar-identity {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  width: 100%;
}
.brand-sidebar-home { display: block; line-height: 0; }
.brand-sidebar-identity .brand-logo { width: 100%; max-width: 15rem; }
.brand-sidebar-subtitle {
  font-size: 0.8125rem;
  line-height: 1.5;
  font-weight: 400;
  color: var(--brand-muted);
  overflow-wrap: anywhere;
}
.brand-sidebar-close {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.25rem;
  cursor: pointer;
  color: var(--brand-muted);
}
.brand-user-avatar { width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; object-fit: cover; }
.brand-user-avatar--initials { display: inline-flex; align-items: center; justify-content: center; background: var(--brand-success-surface); color: var(--brand-wordmark); font-size: .75rem; font-weight: 600; }
.brand-switch-label { font-weight: 500; }
.brand-switch-label > label { margin-left: 0; }
.brand-switch-value { display: flex; flex: 1; flex-wrap: wrap; align-items: start; gap: .5rem .75rem; min-width: 0; }
.brand-switch-value > input { flex: none; }
.brand-switch-help { flex: 1 1 15rem; min-width: 0; max-width: 42rem; }
.brand-switch-help > div { margin: 0; }
@media (max-width: 1023px) { .brand-switch-value { width: 100%; } .brand-switch-label { margin-bottom: .5rem; } }
