/* Barq's theme layers over Django admin; native forms and navigation stay intact. */
:root, html[data-theme="light"], html[data-theme="auto"] {
  color-scheme: 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: #F3F1EE;
  --header-branding-color: #FFFFFF;
  --header-bg: #2B2B2B;
  --header-link-color: #FFFFFF;
  --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;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --barq-brand-accent: #F0A9AB;
  --barq-brand-ink: #F3F1EE;
  --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: #2B2B2B;
  --header-color: #F3F1EE;
  --header-branding-color: #FFFFFF;
  --header-link-color: #F3F1EE;
  --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: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; }
.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; flex-shrink: 0; padding: 18px 32px; border-top: 4px solid #AA2C2F; border-bottom: 1px solid var(--hairline-color); gap: 20px; }
#branding { display: flex; align-items: center; gap: 14px; }
.barq-brand { display: flex; align-items: center; gap: 22px; }
.barq-brand-logo { display: flex; background: #FFFFFF; border-radius: 6px; padding: 2px 8px; flex-shrink: 0; }
.barq-brand-logo img { display: block; width: 154px; height: auto; }
.barq-brand-title { border-left: 1px solid #625D58; padding-left: 22px; display: grid; gap: 7px; color: #FFFFFF; font-size: 20px; font-weight: 600; }
.barq-brand-title .barq-eyebrow { color: #E3B9BA; }
.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-size: 26px; font-weight: 600; letter-spacing: -.035em; margin-bottom: 24px; }
.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-size: 28px; letter-spacing: -.035em; font-weight: 600; 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, #header a:focus-visible, #header button:focus-visible { outline-color: #FFFFFF; }
#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(440px, 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-title { display: none; }
.login .barq-brand-logo img { width: 218px; }
.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: 17px; }
  .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: 14px; }
  .barq-brand-logo img { width: 118px; }
  .barq-brand-title { padding-left: 14px; font-size: 15px; }
  #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: 20px; }
  .login .barq-brand-logo img { width: 200px; }
}
/* 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; }
}

/* Bright, high-contrast Admin navigation with the complete corporate logo. */
#header { border-top: 4px solid #AA2C2F; }
.barq-brand-logo .barq-identity-logo { width: 190px; height: auto; }
#nav-sidebar { background: #fff; border-right: 1px solid #d6cec5; }
#nav-sidebar .module caption a, #nav-sidebar .current-app .section:link, #nav-sidebar .current-app .section:visited { color: #625d58; }
#nav-sidebar th a:link, #nav-sidebar th a:visited { color: #2b2b2b; }
#nav-sidebar td a:link, #nav-sidebar td a:visited { color: #aa2c2f; }
#nav-sidebar tbody tr:hover { background: #f3f1ee; }
#nav-sidebar .current-model { background: #f9eded; }
#nav-sidebar .current-model th a { color: #aa2c2f; }
#nav-filter { color: #2b2b2b; background: #fff; border: 1px solid #b8ada2; }
.barq-welcome { border-radius: 6px; }
.barq-welcome h2 { color: #2b2b2b; font-weight: 550; }
.barq-admin-tools { display:flex; align-items:center; gap:16px; flex-wrap:wrap; font-size:13px; text-transform:none; }
#user-tools.barq-admin-tools button { border:1px solid #aa2c2f; border-radius:5px; padding:8px 12px; color:#aa2c2f; background:#fff; cursor:pointer; font-size:13px; }
@media(max-width:700px) { .barq-brand-logo .barq-identity-logo {width:160px} .barq-admin-tools {justify-content:center;gap:10px} }

#header { background:#fff; color:#2b2b2b; }
#header a:link, #header a:visited {color:#97272a}
.barq-brand-title { display:block; border:0; padding:0; color:#2b2b2b; font:550 23px/1.2 Geist,Arial,sans-serif; }
.barq-brand-logo {padding:0; background:#fff}
.barq-brand-title .barq-wordmark-accent {color:#aa2c2f}

/* Welcome actions share one row; navigation echoes the table's light bands. */
.barq-welcome > div:first-child {flex:1 1 420px;min-width:0}
.barq-workspace-links {display:flex;align-items:center;gap:12px;flex:0 0 auto}
.barq-workspace-links .barq-docs-link {min-height:44px;box-sizing:border-box}
#nav-sidebar .module caption {background:#ece7e1;margin-top:12px;border-radius:5px;padding:14px 10px}
#nav-sidebar tbody tr:nth-child(odd) {background:#fff}
#nav-sidebar tbody tr:nth-child(even) {background:#f3f1ee}
#nav-sidebar tbody tr:hover {background:#f4e8e7}
#nav-sidebar tbody tr.current-model, #nav-sidebar tbody tr.current-model:hover {background:#f9eded}
#nav-sidebar .current-model th a:link, #nav-sidebar .current-model th a:visited, #nav-sidebar .current-model td a:link, #nav-sidebar .current-model td a:visited {color:#aa2c2f}
#nav-filter::placeholder {color:#625d58}
#nav-sidebar a:focus-visible, #nav-filter:focus-visible {outline-color:#aa2c2f}
@media(max-width:1024px) {.barq-welcome > div:first-child {flex:0 1 auto}}
@media(max-width:600px) {
 .barq-workspace-links {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:12px}
 .barq-workspace-links .barq-docs-link {white-space:normal;justify-content:space-between;font-size:13px;padding:10px 12px;gap:8px}
}

/* Compact disclosures keep secondary information close to the main content. */
.dashboard #content { grid-template-columns:minmax(0,1fr); }
.dashboard #content-related { grid-column:1 / -1; width:100%; }
#content-related .barq-recent-actions { padding:0; }
.barq-recent-actions > summary, #changelist-filter .barq-admin-filter-dropdown > summary { display:flex; align-items:center; gap:10px; list-style:none; cursor:pointer; padding:16px 18px; font-weight:600; color:#2b2b2b; }
#changelist-filter .barq-admin-filter-dropdown > summary::before, #changelist-filter .barq-admin-filter-dropdown[open] > summary::before { content:none; }
.barq-recent-actions > summary::-webkit-details-marker, .barq-admin-filter-dropdown > summary::-webkit-details-marker { display:none; }
.barq-recent-actions > summary::after, .barq-admin-filter-dropdown > summary::after { content:""; width:7px; height:7px; border-right:2px solid #77716b; border-bottom:2px solid #77716b; transform:rotate(45deg); margin-left:auto; transition:transform .15s; }
.barq-recent-actions[open] > summary::after, .barq-admin-filter-dropdown[open] > summary::after { transform:rotate(225deg); }
.barq-recent-actions > summary { background:#f3f1ee; font-size:14px; }
.barq-recent-empty { padding:0 18px 18px; }
#content-related .barq-recent-actions .actionlist { margin:0; padding:8px 24px 12px; display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:12px 24px; }
#content-related .barq-recent-actions .actionlist li { padding:12px 0 12px 20px; border-top:1px solid #ebe6e0; margin:0; background-position:0 16px; }
#changelist.filtered { flex-wrap:wrap; }
#changelist.filtered .changelist-form-container { order:2; width:100%; min-width:0; }
#changelist #changelist-filter { position:static; order:1; width:100%; flex-basis:100%; border:0; border-bottom:1px solid #dbd7d0; margin:0; background:#f8f6f3; }
.barq-admin-filter-dropdown > summary { font-size:14px; }
.barq-admin-filter-body { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:16px; padding:4px 18px 20px; }
.barq-admin-filter { display:flex; flex-direction:column; gap:8px; margin:0; padding:0; font-size:12px; font-weight:500; color:#67635d; }
.barq-admin-filter select { box-sizing:border-box; width:100%; min-height:44px; padding:10px 12px; border:1px solid #cfc6bd; border-radius:8px; background:#fff; color:#2b2b2b; font:400 13px Geist,Arial,sans-serif; }
.barq-filter-active { padding:3px 7px; border-radius:5px; background:#f9e9e8; color:#aa2c2f; font-size:11px; }
.barq-filter-links { display:flex; gap:16px; align-items:center; flex-wrap:wrap; grid-column:1 / -1; font-size:12px; }
#changelist #toolbar { padding:16px 18px; }
#toolbar form { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
#toolbar form > div { display:flex; align-items:center; gap:10px; flex:1 1 100%; min-width:0; }
#toolbar #searchbar { box-sizing:border-box; flex:1 1 240px; min-width:0; max-width:560px; width:auto; min-height:42px; border-radius:8px; padding:10px 12px; }
#toolbar input[type="submit"] { flex-shrink:0; min-height:42px; padding:10px 16px; margin:0; border-radius:8px; }
#changelist .actions { padding:12px 18px; display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
#changelist .actions label { display:inline-flex; align-items:center; gap:8px; margin:0; }
#changelist .actions select, #changelist .actions .button { margin:0; min-height:38px; box-sizing:border-box; }
#header #user-tools .barq-notification-icon-button { width:36px; height:36px; padding:0; border-color:transparent; border-radius:8px; color:#504944; }
#header .barq-notification-panel a:link, #header .barq-notification-panel a:visited { color:#2b2b2b; border-bottom:0; }
#header .barq-notification-description, #header .barq-notification-status { margin:0; }
#content .barq-welcome h2 { margin-top:0; }
.barq-workspace-links { align-items:stretch; }
@media(max-width:767px) {
 #header { flex-direction:column; align-items:center; justify-content:center; gap:16px; padding:20px 16px; }
 #branding { width:100%; justify-content:center; }
 .barq-brand { justify-content:center; gap:14px; }
 #user-tools.barq-admin-tools { display:flex; justify-content:center; align-items:center; width:100%; padding:0; margin:0; gap:12px; }
 .barq-admin-tools > span { flex-basis:100%; text-align:center; line-height:1.5; }
 #user-tools.barq-admin-tools form { margin:0; }
 #user-tools.barq-admin-tools .barq-admin-signout { min-height:44px; padding:10px 14px; border-radius:8px; }
 #user-tools.barq-admin-tools > a { font-size:11px; letter-spacing:0; }
 #content { padding:24px 16px; }
 .barq-welcome { padding:24px 20px; gap:20px; }
 .barq-welcome h2 { font-size:25px; line-height:1.25; }
 .barq-workspace-links { align-items:stretch; }
 #changelist #toolbar, #changelist .actions { padding:14px; }
 #toolbar #searchbar { flex:1; width:auto; min-width:0; }
 .barq-admin-filter-body { padding:4px 14px 16px; gap:14px; }
 .form-row { padding:16px 14px; }
 .barq-brand-title { font-size:22px; padding:0; }
}
@media(max-width:400px) { .barq-brand-logo .barq-identity-logo {width:140px;} .barq-brand-title {font-size:20px;} .barq-brand {gap:12px;} }

/* Light is the default; the explicit Dark option controls the dark palette. */
#header { position:relative; background:var(--barq-surface); color:var(--body-fg); }
.barq-brand-title { color:var(--body-fg); }
#header a:link, #header a:visited { color:var(--link-fg); }
#user-tools .theme-toggle { display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; padding:8px; border:1px solid var(--hairline-color); border-radius:8px; background:var(--barq-surface); color:var(--body-fg); }
.login .barq-admin-theme-tools { position:absolute; top:14px; right:14px; margin:0; padding:0; }
.login .barq-login-intro { margin-bottom:24px; }
.login .barq-site-footer { display:flex; flex-direction:column; justify-content:center; align-items:center; gap:10px; padding:20px; text-align:center; background:var(--barq-surface); color:var(--body-quiet-color); border-color:var(--hairline-color); }
.login .barq-site-footer > * { flex:0 0 auto; width:100%; min-width:0; order:0; }
.login .barq-footer-brand { color:var(--body-fg); }
.login .barq-footer-contact { align-items:center; text-align:center; }

/* Action links keep Django's native destinations and use Barq's palette. */
.module a.addlink, .module a.changelink, .module a.viewlink {
 display:inline-flex; align-items:center; justify-content:center; gap:6px;
 padding:6px 9px; border:1px solid var(--border-color); border-radius:6px;
 background:var(--barq-surface); background-image:none; color:var(--link-fg);
 font-size:12px; font-weight:550; line-height:1.4; white-space:nowrap;
}
.module a.addlink:hover, .module a.changelink:hover, .module a.viewlink:hover { background:var(--selected-row); border-color:var(--link-fg); }
.module a.addlink::before, .module a.changelink::before, .module a.viewlink::before {
 content:""; width:13px; height:13px; background:currentColor;
 mask:var(--barq-action-icon) center / contain no-repeat;
 -webkit-mask:var(--barq-action-icon) center / contain no-repeat;
}
.module a.addlink { --barq-action-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4v16M4 12h16' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E"); }
.module a.changelink { --barq-action-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m16 3 5 5-12 12-6 1 1-6ZM13 6l5 5' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.module a.viewlink { --barq-action-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12Z' fill='none' stroke='black' stroke-width='2'/%3E%3Ccircle cx='12' cy='12' r='3' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E"); }
#content table tbody td:not(.original), #content table tbody th { padding:14px 16px; line-height:1.6; vertical-align:middle; }
#content #result_list tbody td, #content #result_list tbody th { padding:14px 16px; }
#content #result_list thead th { padding:12px 16px; vertical-align:middle; }
#content #result_list thead th .text a, #content #result_list thead th .text span { padding:0; }
#content #result_list .action-checkbox, #content #result_list .action-checkbox-column { width:24px; padding-left:10px; padding-right:10px; }
#nav-sidebar .module th, #nav-sidebar .module td { padding:10px 8px; vertical-align:middle; }

html[data-theme="dark"] #nav-sidebar { background:var(--barq-surface); border-color:var(--hairline-color); }
html[data-theme="dark"] .barq-brand-title .barq-wordmark-accent { color:var(--barq-brand-accent); }
html[data-theme="dark"] #nav-sidebar .module caption { background:var(--darkened-bg); }
html[data-theme="dark"] #nav-sidebar .module caption a, html[data-theme="dark"] #nav-sidebar th a { color:var(--body-fg); }
html[data-theme="dark"] #nav-sidebar td a { color:var(--link-fg); }
html[data-theme="dark"] #nav-sidebar tbody tr:nth-child(odd) { background:var(--barq-surface); }
html[data-theme="dark"] #nav-sidebar tbody tr:nth-child(even) { background:var(--darkened-bg); }
html[data-theme="dark"] #nav-sidebar tbody tr:hover, html[data-theme="dark"] #nav-sidebar tbody tr.current-model { background:var(--selected-row); }
html[data-theme="dark"] #nav-filter { background:var(--barq-surface); color:var(--body-fg); border-color:var(--border-color); }
html[data-theme="dark"] .barq-welcome h2, html[data-theme="dark"] .barq-admin-filter-dropdown > summary, html[data-theme="dark"] .barq-recent-actions > summary { color:var(--body-fg); }
html[data-theme="dark"] #changelist #changelist-filter, html[data-theme="dark"] .barq-recent-actions > summary { background:var(--darkened-bg); }
html[data-theme="dark"] .barq-admin-filter select { background:var(--barq-surface); color:var(--body-fg); border-color:var(--border-color); }
@media(max-width:767px) {
 #content table tbody td:not(.original), #content table tbody th, #content #result_list tbody td, #content #result_list tbody th { padding:12px; }
 #content #result_list thead th { padding:12px; }
 .dashboard .module a.addlink, .dashboard .module a.changelink, .dashboard .module a.viewlink { padding:7px 8px; }
 .login #user-tools.barq-admin-theme-tools { width:auto; top:12px; right:12px; }
}
