:root, html[data-theme="light"] {
  --primary: #AA2C2F;
  --secondary: #2B2B2B;
  --accent: #FFFFFF;
  --primary-fg: #FFFFFF;
  --body-fg: #2B2B2B;
  --body-bg: #F3F1EE;
  --body-quiet-color: #625D58;
  --body-medium-color: #514C48;
  --body-loud-color: #2B2B2B;
  --header-color: #2B2B2B;
  --header-branding-color: #AA2C2F;
  --header-bg: #FFFFFF;
  --header-link-color: #97272A;
  --breadcrumbs-fg: #625D58;
  --breadcrumbs-link-fg: #AA2C2F;
  --breadcrumbs-bg: #FFFFFF;
  --link-fg: #97272A;
  --link-hover-color: #782023;
  --link-selected-fg: #97272A;
  --hairline-color: #D6CEC5;
  --border-color: #B8ADA2;
  --error-fg: #AA2C2F;
  --message-success-bg: #EDF5EB;
  --message-warning-bg: #FFF5DE;
  --message-error-bg: #FBE8E8;
  --darkened-bg: #F7F5F2;
  --selected-bg: #F0ECE7;
  --selected-row: #F9EDED;
  --button-fg: #FFFFFF;
  --button-bg: #AA2C2F;
  --button-hover-bg: #8C2427;
  --default-button-bg: #AA2C2F;
  --default-button-hover-bg: #8C2427;
  --close-button-bg: #625D58;
  --close-button-hover-bg: #2B2B2B;
  --delete-button-bg: #8C2427;
  --delete-button-hover-bg: #701B1E;
  --object-tools-fg: #FFFFFF;
  --object-tools-bg: #2B2B2B;
  --object-tools-hover-bg: #AA2C2F;
  --barq-surface: #FFFFFF;
  --barq-shadow: 0 4px 18px rgb(43 43 43 / 7%);
  --barq-input-border: #8D857C;
  --barq-table-hover: #F4E8E7;
  --barq-success-fg: #245B31;
  --barq-success-bg: #EDF5EB;
  --barq-error-fg: #8C2427;
  --barq-error-bg: #FBE8E8;
  --barq-serif: Geist, Arial, sans-serif;
  --barq-sans: Geist, Arial, sans-serif;
}
html[data-theme="dark"] {
  --primary: #AA2C2F;
  --secondary: #2B2B2B;
  --accent: #FFFFFF;
  --body-bg: #202020;
  --body-fg: #F3F1EE;
  --body-loud-color: #FFFFFF;
  --body-quiet-color: #C2BAB1;
  --body-medium-color: #DDD6CF;
  --header-bg: #FFFFFF;
  --header-color: #2B2B2B;
  --header-branding-color: #AA2C2F;
  --header-link-color: #97272A;
  --breadcrumbs-bg: #2B2B2B;
  --breadcrumbs-fg: #C2BAB1;
  --breadcrumbs-link-fg: #F3F1EE;
  --link-fg: #F0A9AB;
  --link-hover-color: #FFFFFF;
  --link-selected-fg: #F0A9AB;
  --hairline-color: #44403D;
  --border-color: #625D58;
  --darkened-bg: #33312F;
  --selected-bg: #3C3733;
  --selected-row: #4A2D2E;
  --error-fg: #F0A9AB;
  --message-success-bg: #263A2B;
  --message-warning-bg: #483C24;
  --message-error-bg: #4A2D2E;
  --barq-surface: #2B2B2B;
  --barq-shadow: none;
  --barq-input-border: #A99F95;
  --barq-table-hover: #473536;
  --barq-success-fg: #C3E6C9;
  --barq-success-bg: #263A2B;
  --barq-error-fg: #FFC2C4;
  --barq-error-bg: #4A2D2E;
}
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --body-bg: #202020; --body-fg: #F3F1EE; --body-loud-color: #FFFFFF;
    --body-quiet-color: #C2BAB1; --body-medium-color: #DDD6CF;
    --header-bg: #FFFFFF; --header-color: #2B2B2B;
    --header-branding-color: #AA2C2F; --header-link-color: #97272A;
    --breadcrumbs-bg: #2B2B2B; --breadcrumbs-fg: #C2BAB1;
    --breadcrumbs-link-fg: #F3F1EE; --link-fg: #F0A9AB;
    --link-hover-color: #FFFFFF; --link-selected-fg: #F0A9AB;
    --hairline-color: #44403D; --border-color: #625D58;
    --darkened-bg: #33312F; --selected-bg: #3C3733; --selected-row: #4A2D2E;
    --error-fg: #F0A9AB; --message-success-bg: #263A2B;
    --message-warning-bg: #483C24; --message-error-bg: #4A2D2E;
    --barq-surface: #2B2B2B; --barq-shadow: none;
    --barq-input-border: #A99F95; --barq-table-hover: #473536;
    --barq-success-fg: #C3E6C9; --barq-success-bg: #263A2B;
    --barq-error-fg: #FFC2C4; --barq-error-bg: #4A2D2E;
  }
}
body { font-family: var(--barq-sans); font-size: 14px; }
#footer { padding: 0; margin-top: auto; }
.login .barq-site-footer { border-radius: 0 0 14px 14px; justify-content: center; text-align: center; }
button, input, textarea, select, .form-row p { font-family: var(--barq-sans); }
.barq-activity-notice, .barq-activity-intro { color: var(--body-quiet-color); line-height: 1.65; }
.barq-activity-notice { max-width: 950px; margin: 0 0 24px; padding: 14px 18px; border-left: 3px solid var(--primary); background: var(--barq-surface); border-radius: 4px; }
.barq-activity-notice p, .barq-activity-intro p { margin: 0 0 8px; }
.barq-activity-notice p:last-child { margin-bottom: 0; }
.barq-activity-intro { padding: 18px 22px; }
.barq-activity-link { display: inline-block; margin-top: 4px; font-weight: 600; }
.barq-activity-table-scroll { overflow-x: auto; }
.barq-api-activity table { width: 100%; min-width: 960px; }
.barq-api-activity td, .barq-api-activity th { padding: 12px 18px; vertical-align: middle; }
.barq-api-activity td:first-child, .barq-api-activity th { white-space: nowrap; }
.barq-api-activity code, .model-apirequestactivity .field-endpoint { overflow-wrap: anywhere; font-size: 12px; }
.barq-activity-secondary { color: var(--body-quiet-color); font-size: 12px; }
.model-apirequestactivity #result_list { min-width: 800px; table-layout: fixed; }
.model-apirequestactivity #result_list .column-request_time { width: 12%; }
.model-apirequestactivity #result_list .column-key_identity { width: 20%; }
.model-apirequestactivity #result_list .column-source_address { width: 16%; }
.model-apirequestactivity #result_list .column-method { width: 7%; }
.model-apirequestactivity #result_list .column-endpoint { width: 23%; }
.model-apirequestactivity #result_list .column-http_status { width: 8%; }
.model-apirequestactivity #result_list .column-authentication_result { width: 14%; }
.barq-source-ip { font-size: 12px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.model-apirequestactivity #result_list th, .model-apirequestactivity #result_list td { padding: 12px 10px; vertical-align: middle; white-space: normal; overflow-wrap: anywhere; }
.model-apirequestactivity #result_list thead th { padding: 0; overflow-wrap: normal; }
.model-apirequestactivity #result_list .field-method { font-size: 12px; }
.barq-activity-scroll-hint { display: none; }
.barq-activity-table-scroll:focus-visible { outline: 3px solid var(--link-fg); outline-offset: -3px; }
.barq-activity-empty { padding: 8px 22px 22px; color: var(--body-quiet-color); }
.barq-http-status { display: inline-block; padding: 3px 8px; border-radius: 5px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.barq-http-status-success { color: var(--barq-success-fg); background: var(--barq-success-bg); }
.barq-http-status-error { color: var(--barq-error-fg); background: var(--barq-error-bg); }
.barq-http-status-neutral { color: var(--body-medium-color); background: var(--darkened-bg); }
#header { box-sizing: border-box; min-height: 104px; padding: 16px 28px; border-top: 4px solid #AA2C2F; border-bottom: 0; gap: 24px; }
#branding { display: flex; align-items: center; min-width: 0; }
.barq-brand { display: flex; align-items: center; gap: var(--barq-brand-gap); min-width: 0; }
.barq-brand-logo { display: flex; align-items: center; justify-content: center; background: #FFFFFF; padding: 0; flex-shrink: 0; }
.barq-brand-logo img { display: block; width: var(--barq-logo-width); max-width: 100%; height: auto; }
.barq-brand-title { color: var(--barq-brand-ink); font-family: Geist, Arial, sans-serif; font-size: var(--barq-title-size); font-weight: 550; line-height: 1.2; letter-spacing: -.4px; }
.barq-eyebrow { display: block; font-size: 10px; font-weight: 700; letter-spacing: .14em; color: var(--link-fg); }
#user-tools { line-height: 1.9; font-size: 11px; letter-spacing: .03em; }
#header a:link, #header a:visited, #logout-form button { color: var(--header-link-color); }
#header a.barq-brand-logo { border-bottom: 0; }
#logout-form button { font-family: inherit; }
div.breadcrumbs { padding: 14px 32px; border-bottom: 1px solid var(--hairline-color); font-size: 12px; }
#content { padding: 32px; }
#content h1 { color: var(--body-loud-color); font-family: var(--barq-serif); font-size: 26px; font-weight: 500; letter-spacing: -.02em; margin-bottom: 24px; }
#content > h2, #content-related .module h2 { font-family: var(--barq-serif); font-weight: 500; }
.module { background: var(--barq-surface); border: 1px solid var(--hairline-color); border-radius: 10px; overflow: hidden; box-shadow: var(--barq-shadow); }
.module h2, .module caption, .inline-group h2 { background: var(--secondary); color: #FFFFFF; font-size: 12px; padding: 14px 18px; letter-spacing: .045em; }
.module caption a:link, .module caption a:visited { color: #FFFFFF; font-weight: 600; }
.module th, .module td { padding: 14px 18px; }
.dashboard #content { width: auto; }
.dashboard #content-main { width: auto; float: none; margin-right: 294px; }
.dashboard #content-main .module { margin-bottom: 24px; }
.dashboard .module table { width: 100%; }
.dashboard #content-related { margin-left: -270px; width: 270px; background: transparent; }
#content-related .module { padding: 0 0 12px; background: var(--barq-surface); }
#content-related .module h2 { padding: 14px 18px; color: #FFFFFF; background: #2B2B2B; }
#content-related h3, #content-related .actionlist { margin: 18px; }
#content-related .actionlist li { padding-bottom: 16px; }
.barq-welcome { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 28px; background: var(--barq-surface); border: 1px solid var(--hairline-color); border-left: 4px solid #AA2C2F; border-radius: 10px; margin-bottom: 28px; box-shadow: var(--barq-shadow); }
.barq-welcome h2 { font-family: var(--barq-serif); font-size: 28px; letter-spacing: -.02em; font-weight: 500; margin: 10px 0; color: var(--body-loud-color); }
.barq-welcome p { margin: 0; color: var(--body-quiet-color); line-height: 1.6; }
a.barq-docs-link { display: inline-flex; align-items: center; gap: 16px; padding: 12px 18px; border: 1px solid var(--border-color); border-radius: 6px; white-space: nowrap; font-weight: 600; }
a.barq-docs-link:hover { border-color: var(--link-fg); }
#nav-sidebar { background: #2B2B2B; border-right: 1px solid #625D58; padding: 16px 10px; box-sizing: border-box; }
#nav-sidebar .module { border: 0; box-shadow: none; border-radius: 0; background: transparent; }
#nav-sidebar .module caption { background: transparent; padding: 20px 10px 10px; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
#nav-sidebar .module caption a, #nav-sidebar .current-app .section:link, #nav-sidebar .current-app .section:visited { color: #CFC6BD; }
#nav-sidebar .module th, #nav-sidebar .module td { padding: 12px 10px; border: 0; }
#nav-sidebar th a:link, #nav-sidebar th a:visited { color: #FFFFFF; }
#nav-sidebar td a:link, #nav-sidebar td a:visited { color: #E3B9BA; }
#nav-sidebar tbody tr { background: transparent; }
#nav-sidebar tbody tr:hover { background: #403A37; }
#nav-sidebar .current-model, #nav-sidebar .current-model:hover { background: #AA2C2F; }
#nav-sidebar .current-model th a, #nav-sidebar .current-model td a { color: #FFFFFF; }
#nav-sidebar a:focus-visible, #nav-filter:focus-visible, .toggle-nav-sidebar:focus-visible { outline-color: #FFFFFF; }
#header a:focus-visible, #header button:focus-visible { outline-color: #AA2C2F; }
#nav-filter { width: calc(100% - 12px); margin: 4px 6px 12px; padding: 10px 12px; border-radius: 6px; box-sizing: border-box; background: #383432; color: #FFFFFF; border: 1px solid #A99F95; }
#nav-filter::placeholder { color: #D6CEC5; opacity: 1; }
#nav-filter.no-results { background: #4A2D2E; color: #FFC2C4; }
.toggle-nav-sidebar { background: #2B2B2B; border-color: #625D58; color: #FFFFFF; }
.toggle-nav-sidebar:hover, .toggle-nav-sidebar:focus { background: #403A37; }
#changelist { border-radius: 10px; border: 1px solid var(--hairline-color); background: var(--barq-surface); box-shadow: var(--barq-shadow); }
#changelist #toolbar { padding: 16px 18px; background: var(--barq-surface); border: 0; }
#changelist .actions { padding: 12px 18px; background: var(--darkened-bg); }
#changelist .paginator { padding: 16px 18px; }
#changelist-filter { background: var(--barq-surface); border-left: 1px solid var(--hairline-color); }
#changelist-filter h2 { background: var(--secondary); color: #FFFFFF; padding: 14px 18px; }
#changelist-filter h3 { color: var(--body-loud-color); }
#changelist-filter a { color: var(--body-quiet-color); }
#changelist-filter li.selected a { color: var(--link-fg); }
#changelist-filter li.selected { border-left-color: #AA2C2F; }
/* Keep sortable labels, arrows and keyboard focus readable on dark headings. */
#changelist tbody tr, .barq-api-activity tbody tr, .dashboard #content-main tbody tr { background: var(--barq-surface); }
#changelist table thead th, #changelist table thead th.sorted, .barq-api-activity thead th { background: #2B2B2B; color: #FFFFFF; border-color: #625D58; }
#changelist table thead th a:link, #changelist table thead th a:visited { color: #FFFFFF; }
#changelist table thead th .text a:hover, #changelist table thead th .text a:focus { background: #403A37; }
#changelist table thead th .sortpriority { color: #FFFFFF; }
#changelist table thead th .sortoptions a { filter: brightness(0) invert(1); }
#changelist table thead a:focus-visible { outline: 2px solid #FFFFFF; outline-offset: -3px; }
#changelist tbody tr:nth-child(even), .barq-api-activity tbody tr:nth-child(even), .dashboard #content-main tbody tr:nth-child(even) { background: var(--darkened-bg); }
#changelist tbody tr:hover, .barq-api-activity tbody tr:hover, .dashboard #content-main tbody tr:hover { background: var(--barq-table-hover); }
#changelist tbody tr.selected, #changelist tbody tr.selected:hover { background: var(--selected-row); }
#changelist-filter li.selected { background: var(--selected-row); }
#changelist #toolbar { border-bottom: 1px solid var(--hairline-color); }
#changelist #toolbar form input[type="text"], #changelist .actions select { border-color: var(--barq-input-border); }
#changelist #toolbar form input[type="submit"] { background: var(--button-bg); color: #FFFFFF; border: 1px solid var(--button-bg); }
#changelist #toolbar form input[type="submit"]:hover { background: var(--button-hover-bg); }
input[type="text"], input[type="password"], input[type="email"], input[type="url"], input[type="number"], input[type="date"], input[type="time"], textarea, select { border-radius: 6px; padding: 9px 12px; font-family: inherit; border-color: var(--barq-input-border); background: var(--barq-surface); color: var(--body-fg); }
input::placeholder, textarea::placeholder { color: var(--body-quiet-color); opacity: 1; }
.aligned label, .form-row label { color: var(--body-fg); }
.help, p.help, form p.help, div.help, form div.help, div.help li { color: var(--body-quiet-color); }
input[type="checkbox"], input[type="radio"] { accent-color: #AA2C2F; }
.button, input[type="submit"], input[type="button"], .submit-row input, a.button { border-radius: 6px; padding: 11px 18px; font-family: inherit; font-weight: 600; }
.object-tools a { border-radius: 6px; padding: 10px 16px; }
.submit-row { background: var(--barq-surface); border-color: var(--hairline-color); border-radius: 8px; padding: 18px; }
.form-row { padding: 16px 18px; }
fieldset.module { margin-bottom: 24px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--link-fg); outline-offset: 3px; }
body.login { background: var(--body-bg); }
.login #container { width: min(560px, calc(100% - 32px)); margin: 8vh auto; border: 1px solid var(--hairline-color); border-radius: 14px; box-shadow: 0 16px 60px rgb(43 43 43 / 9%); background: var(--barq-surface); }
.login #header { padding: 24px; justify-content: center; border-radius: 14px 14px 0 0; }
.login .barq-brand { gap: var(--barq-brand-gap); text-align: left; }
.login .barq-brand-title { font-size: var(--barq-title-size); }
.login .barq-brand-logo img { width: var(--barq-logo-width); height: auto; }
.login #branding { justify-content: center; }
.login #content { padding: 30px; }
.barq-login-intro h1 { margin: 10px 0 8px !important; font-size: 28px !important; }
.barq-login-intro p { margin: 0 0 24px; color: var(--body-quiet-color); line-height: 1.6; }
.login .form-row label { color: var(--body-fg); font-weight: 600; margin-bottom: 7px; }
.login .form-row { padding: 8px 0; }
.login .form-row #id_username, .login .form-row #id_password { padding: 12px; }
.login .submit-row { padding: 16px 0 0; border: 0; background: transparent; }
.login .submit-row input { width: 100%; padding: 13px; }
@media (max-width: 1024px) {
  #header { padding: 16px 24px; }
  #content { padding: 24px; }
  .barq-brand-title { font-size: var(--barq-title-size); }
  .barq-welcome { align-items: flex-start; flex-direction: column; }
  .dashboard #content-main { margin-right: 0; }
  .dashboard #content-related { width: 100%; margin: 0; float: none; }
}
@media (max-width: 767px) {
  .barq-activity-scroll-hint { display: block; font-size: 12px; margin-top: 12px; }
  #header { padding: 14px 16px; gap: 14px; }
  #branding { max-width: 100%; }
  .barq-brand { gap: var(--barq-brand-gap); }
  .barq-brand-logo img { width: var(--barq-logo-width); height: auto; }
  .barq-brand-title { font-size: var(--barq-title-size); white-space: normal; }
  #user-tools { margin-top: 0; text-align: center; }
  #content { padding: 20px 16px; }
  div.breadcrumbs { padding: 12px 16px; }
  .barq-welcome { padding: 22px; }
  .barq-welcome h2 { font-size: 25px; }
  .module th, .module td { padding: 12px; }
  .barq-docs-link { white-space: normal; }
  .login #container { margin: 4vh auto; }
  .login #content { padding: 24px; }
  .login #header { padding: 16px; }
  .login .barq-brand-logo img { width: var(--barq-logo-width); height: auto; }
}
/* Keep the overview and recent actions in one responsive grid. */
.dashboard #content { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 24px; margin-right: 0; }
.dashboard #content > h1, .dashboard .barq-welcome { grid-column: 1 / -1; margin-bottom: 0; }
.dashboard #content-main { margin: 0; min-width: 0; }
.dashboard #content-related { float: none; margin: 0; width: auto; }
.dashboard #content > br.clear { display: none; }
@media (max-width: 1024px) { .dashboard #content { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 767px) {
  .aligned select, .aligned input[type="text"], .aligned input[type="url"], .aligned input[type="email"], .aligned input[type="number"], .aligned textarea { box-sizing: border-box; max-width: 100%; }
  .aligned .related-widget-wrapper { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; float: none; }
  .aligned .related-widget-wrapper select { width: 100%; }
}
@media (max-width: 767px) {
  .aligned .form-row > div { width: 100%; max-width: 100%; min-width: 0; }
}
