:root {
  --ut-sidebar-width: 236px;
  --ut-blue: #2563eb;
  --ut-text: #1e293b;
  --ut-muted: #64748b;
  --ut-border: #e5eaf1;
  --ut-background: #f3f5f9;
}
body.ut-console, body.ut-admin {
  margin: 0; color: var(--ut-text); background: var(--ut-background);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px; line-height: 1.6; color-scheme: light;
}
.ut-console *, .ut-sidebar *, .ut-topbar * { box-sizing: border-box; }
.ut-sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 100;
  width: var(--ut-sidebar-width); background: #152239; color: #b5c2d6;
  display: flex; flex-direction: column; border-right: 1px solid #23334c;
}
.ut-sidebar a, .ut-sidebar summary { text-decoration: none; }
.ut-brand {
  min-height: 84px; display: flex; align-items: center; gap: 12px;
  padding: 16px 22px; border-bottom: 1px solid #29354b;
}
.ut-brand-mark {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; background: #3b78f5; border-radius: 9px; color: #fff; font-size: 24px; font-weight: 700;
}
.ut-brand strong { display: block; color: #fff; font-size: 17px; font-weight: 650; line-height: 1.35; }
.ut-brand small { color: #9aabc3; display: block; font-size: 11px; margin-top: 4px; letter-spacing: 1px; }
.ut-menu { padding: 16px 10px; flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #41506b transparent; }
.ut-menu-group { border: 0; margin: 0 0 7px; background: transparent; }
.ut-menu-group > summary {
  display: flex; align-items: center; gap: 11px; padding: 10px 13px;
  color: #d0daea; font-size: 14px; font-weight: 500; cursor: pointer; list-style: none;
  border-radius: 5px; min-height: 42px;
}
.ut-menu-group > summary::-webkit-details-marker { display: none; }
.ut-menu-group > summary:hover { background: #21334f; color: #fff; }
.ut-menu-group.is-current > summary { color: #f2f6ff; }
.ut-menu-group svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.7; fill: none; flex-shrink: 0; }
.ut-chevron { margin-left: auto; height: 6px; width: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }
.ut-menu-group[open] .ut-chevron { transform: rotate(45deg); margin-top: -4px; }
.ut-submenu { padding: 3px 0 3px; }
.ut-submenu a { display: flex; align-items: center; gap: 13px; padding: 8px 15px 8px 29px; min-height: 38px; margin: 2px 0; border-radius: 5px; color: #9fb0c8; font-size: 13px; }
.ut-submenu a:hover { color: #fff; background: #20324e; }
.ut-submenu a.is-active { color: #fff; background: #2864d8; font-weight: 500; }
.ut-menu-dot { height: 4px; width: 4px; border: 1px solid currentColor; border-radius: 50%; flex-shrink: 0; }
.ut-sidebar-footer { padding: 14px 20px; border-top: 1px solid #29354b; font-size: 11px; color: #899bb7; display: flex; gap: 8px; align-items: center; }
.ut-sidebar-footer > span:last-child { margin-left: auto; }
.ut-status-dot { width: 6px; height: 6px; border-radius: 50%; background: #50c99d; }
.ut-icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.ut-workspace { margin-left: var(--ut-sidebar-width); min-width: 0; min-height: 100vh; }
.ut-topbar#header {
  position: sticky; top: 0; z-index: 30; min-height: 64px; padding: 0 30px; width: auto;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  background: #fff; color: var(--ut-text); border-bottom: 1px solid var(--ut-border); box-sizing: border-box;
}
.ut-topbar-left { display: flex; gap: 14px; align-items: center; }
.ut-breadcrumb { display: flex; gap: 13px; align-items: center; font-size: 13px; color: #94a3b8; }
.ut-breadcrumb strong { color: #334155; font-weight: 500; }
.ut-user-tools { display: flex; gap: 12px; align-items: center; font-size: 12px; white-space: nowrap; }
.ut-env-label { border: 1px solid #dbe5f4; color: #58708f; border-radius: 4px; padding: 1px 7px; background: #f6f9fd; }
.ut-user-avatar { background: #eaf0fc; color: #3766b4; height: 29px; width: 29px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; margin-left: 7px; }
.ut-username { color: #334155; }
.ut-user-tools form { margin: 0; padding: 0; }
.ut-user-tools button.ut-logout { color: #64748b; background: transparent; border: 0; border-left: 1px solid #e2e8f0; border-radius: 0; padding: 0 0 0 14px; font: inherit; cursor: pointer; }
.ut-user-tools button.ut-logout:hover { color: #2563eb; }
.ut-menu-toggle { display: none; border: 0; background: transparent; width: 25px; padding: 2px; cursor: pointer; }
.ut-menu-toggle span { display: block; height: 2px; margin: 4px 0; background: #334155; }
.ut-sidebar-backdrop { display: none; }
.ut-page { max-width: 1800px; padding: 26px 30px; margin: 0 auto; }
.ut-console h1 { font-size: 23px; line-height: 1.4; color: #1e293b; font-weight: 650; margin: 0 0 18px; }
.ut-console h2 { font-size: 16px; color: #26364c; font-weight: 600; margin: 0 0 16px; }
.ut-console a { color: var(--ut-blue); text-decoration: none; }
.ut-console a:hover { text-decoration: underline; }
.ut-console .ut-sidebar a { text-decoration: none; }
.ut-console .ut-sidebar .ut-submenu a { color: #9fb0c8; }
.ut-console .ut-sidebar .ut-submenu a.is-active, .ut-console .ut-sidebar .ut-submenu a:hover { color: #fff; }
.ut-console .card { background: #fff; border: 1px solid var(--ut-border); border-radius: 7px; padding: 22px; margin: 20px 0; overflow: auto; }
.ut-console table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ut-console td, .ut-console th { text-align: left; border-bottom: 1px solid #edf0f5; padding: 13px 12px; vertical-align: middle; }
.ut-console th { background: #f7f9fc; color: #6b7b90; font-weight: 500; }
.ut-console tbody tr:hover { background: #fafcff; }
.ut-console .card table tr:last-child td { border-bottom: 0; }
.ut-console button, .ut-console .button { background: var(--ut-blue); color: #fff; padding: 9px 17px; border: 1px solid var(--ut-blue); border-radius: 5px; font: inherit; cursor: pointer; display: inline-block; line-height: 1.4; }
.ut-console .button.secondary { background: #fff; color: #475569; border-color: #dce3ec; }
.ut-console .button:hover { text-decoration: none; opacity: .9; }
.ut-console .ut-menu-toggle { display: none; background: transparent; border: 0; padding: 2px; width: 25px; }
.ut-console .ut-sidebar-backdrop { display: none; }
.ut-console input, .ut-console select, .ut-console textarea { padding: 9px 11px; border: 1px solid #d5dce7; border-radius: 5px; font: inherit; max-width: 100%; background: #fff; color: #1e293b; }
.ut-console input:focus, .ut-console select:focus, .ut-console textarea:focus { border-color: #5084ec; outline: 2px solid #e8efff; }
.ut-console form p { display: flex; flex-direction: column; gap: 7px; max-width: 660px; margin: 0 0 18px; }
.ut-console form label { color: #475569; }
.ut-console form .helptext { color: #7c8da3; font-size: 12px; }
.ut-console .stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 15px; margin: 20px 0; }
.ut-console .stat { background: #fff; border: 1px solid var(--ut-border); border-radius: 7px; padding: 18px 20px; color: #7a889c; font-size: 13px; }
.ut-console .stat strong { display: block; color: #26364c; font-size: 27px; line-height: 1.2; font-weight: 650; margin-top: 12px; font-variant-numeric: tabular-nums; }
.ut-console .note { color: #718096; font-size: 13px; line-height: 1.8; }
.ut-console .errorlist { color: #b42318; padding-left: 20px; }
.ut-console code { overflow-wrap: anywhere; }
.ut-console textarea.codes { width: 100%; height: 340px; font-family: monospace; }
.ut-console .ut-toolbar, .ut-console .ut-filter { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ut-console .ut-filter select { min-width: 180px; }
.ut-console .ut-empty { color: #8c99ab; text-align: center; padding: 32px; }
.ut-messages { list-style: none; margin: 0 0 20px; padding: 0; }
.ut-messages li { border: 1px solid #d2e9da; background: #eff9f2; color: #296544; padding: 12px 16px; border-radius: 5px; }
.ut-page-footer { display: flex; justify-content: space-between; color: #9ba8b9; font-size: 11px; margin: 28px 0 0; }
.ut-skip-link { position: fixed; top: -50px; left: 250px; z-index: 200; background: #fff; padding: 8px; }
.ut-skip-link:focus { top: 8px; }
/* Keep Django model lists, filters and edit widgets inside the same application shell. */
body.ut-admin { --primary: #2563eb; --secondary: #2563eb; --accent: #fff; --primary-fg: #fff; --body-fg: #334155; --body-bg: #fff; --body-quiet-color: #64748b; --body-loud-color: #1e293b; --header-color: #334155; --header-branding-color: #1e293b; --header-bg: #fff; --header-link-color: #2563eb; --link-fg: #2563eb; --link-hover-color: #174dbb; --hairline-color: #e5eaf1; --border-color: #dce3ec; --darkened-bg: #f5f7fb; --selected-bg: #edf3ff; --selected-row: #eef4ff; --button-bg: #2563eb; --button-hover-bg: #1c53ca; --default-button-bg: #2563eb; --default-button-hover-bg: #1c53ca; --close-button-bg: #64748b; }
body.ut-admin:not(.login):not(.popup) #container { padding-left: var(--ut-sidebar-width); width: 100%; min-width: 0; box-sizing: border-box; }
body.ut-admin.ut-anonymous:not(.login) #container { padding-left: 0; }
body.ut-admin #main.main { min-width: 0; }
body.ut-admin #content-start { min-width: 0; }
body.ut-admin #content { padding: 24px 30px 30px; width: auto; max-width: none; box-sizing: border-box; }
body.ut-admin #content h1 { font-size: 23px; font-weight: 650; color: #1e293b; margin-bottom: 20px; }
body.ut-admin #content h2 { font-size: 14px; }
body.ut-admin .ut-sidebar a { color: #9fb0c8; }
body.ut-admin .ut-sidebar .ut-brand strong { color: white; }
body.ut-admin .ut-sidebar a.is-active, body.ut-admin .ut-sidebar a:hover { color: white; }
.ut-admin-breadcrumbs { display: flex; gap: 10px; padding: 18px 30px 0; color: #8a98ac; font-size: 12px; }
.ut-admin-breadcrumbs a { color: #64748b; }
.ut-admin-breadcrumbs strong { color: #52657c; font-weight: 400; }
body.ut-admin #changelist { background: transparent; gap: 20px; }
body.ut-admin #changelist .changelist-form-container { min-width: 0; }
body.ut-admin #changelist-form, body.ut-admin .module { background: white; border: 1px solid var(--ut-border); border-radius: 6px; overflow: hidden; }
body.ut-admin #changelist table { border-collapse: collapse; }
body.ut-admin #changelist table thead th { background: #f5f8fc; padding: 12px 10px; color: #62748c; }
body.ut-admin #changelist table tbody td, body.ut-admin #changelist table tbody th { padding: 13px 10px; font-size: 13px; }
body.ut-admin #changelist .actions { border: 0; background: #fff; padding: 13px 15px; }
body.ut-admin #changelist .paginator { padding: 14px 15px; border-top: 1px solid #e5eaf1; background: #fff; }
body.ut-admin #toolbar { background: #fff; padding: 15px; border: 1px solid var(--ut-border); border-radius: 6px; margin-bottom: 18px; }
body.ut-admin #changelist-filter { background: #fff; border: 1px solid var(--ut-border); border-radius: 6px; }
body.ut-admin #changelist-filter h2 { background: #f5f8fc; color: #475569; padding: 14px 15px; }
body.ut-admin .object-tools a { background: #2563eb; border-radius: 5px; padding: 9px 15px; }
body.ut-admin .object-tools a:hover { background: #1d4ed8; }
body.ut-admin .module h2, body.ut-admin .module caption { background: #f1f5fb; color: #43566f; }
body.ut-admin .module caption a.section { color: #43566f; }
body.ut-admin .submit-row { border: 1px solid var(--ut-border); border-radius: 6px; background: #fff; padding: 15px; }
body.ut-admin #footer { padding: 0 30px 22px; }
body.ut-admin .row1, body.ut-admin .row2 { background: #fff; }
body.ut-admin .row1:hover, body.ut-admin .row2:hover { background: #f9fbff; }
body.ut-admin .aligned label { color: #475569; }
body.ut-admin .form-row { padding: 15px; border-color: #edf0f5; }
/* Login uses a centered form and never shows business navigation. */
.ut-list-filters { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 16px; padding: 18px; margin-bottom: 20px; background: #fff; border: 1px solid #e0e6ef; border-radius: 6px; }
.ut-list-filters label { display: flex; flex-direction: column; gap: 7px; color: #52657c; font-size: 13px; }
.ut-list-filters input, .ut-list-filters select { box-sizing: border-box; min-width: 170px; max-width: 260px; height: 36px; padding: 6px 10px; border: 1px solid #d8e0eb; border-radius: 4px; background: #fff; color: #334155; }
.ut-filter-actions { display: flex; gap: 10px; align-items: center; }
.ut-list-filters button, .ut-list-filters .ut-reset { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 18px; border: 1px solid #2563eb; border-radius: 4px; background: #2563eb; color: #fff; font-size: 13px; cursor: pointer; text-decoration: none; }
.ut-list-filters .ut-reset { background: #fff; border-color: #d8e0eb; color: #52657c; }
body.ut-admin #changelist.filtered .results, body.ut-admin #changelist.filtered .paginator, body.ut-admin #changelist.filtered #toolbar { margin-right: 0; width: auto; }
.ut-pagination { display: flex; flex-wrap: wrap; gap: 16px; padding: 14px 0; color: #64748b; font-size: 13px; }
body.ut-admin.login { background: #f3f5f9; }
body.ut-admin.login #container { width: 410px; min-width: 0; margin: 9vh auto 30px; padding: 0; border: 1px solid #e0e6ef; border-radius: 10px; overflow: hidden; background: #fff; }
body.ut-admin.login #content { padding: 10px 30px 26px; }
body.ut-admin.login #header.ut-login-brand { display: block; background: #fff; color: #334155; padding: 30px 30px 12px; text-align: center; }
.ut-login-brand h1 { color: #1e293b; font-size: 23px; margin: 10px 0 3px; font-weight: 650; }
.ut-login-brand p { color: #8a98ac; font-size: 12px; }
body.ut-admin.login .submit-row { padding: 12px 0 0; border: 0; }
body.ut-admin.login .submit-row input { width: 100%; padding: 11px; }
body.ut-admin.login #footer { display: none; }
@media (min-width: 1600px) { .ut-console .stats { grid-template-columns: repeat(6,minmax(0,1fr)); } }
@media (max-width: 1100px) { .ut-console .stats { grid-template-columns: repeat(3,minmax(0,1fr)); } .ut-page, body.ut-admin #content { padding: 22px; } }
@media (max-width: 850px) {
  .ut-sidebar { transform: translateX(-100%); transition: transform .18s ease; }
  .ut-workspace { margin-left: 0; }
  body.ut-admin:not(.login):not(.popup) #container { padding-left: 0; }
  .ut-menu-toggle, .ut-console .ut-menu-toggle { display: block; }
  .ut-menu-visible .ut-sidebar { transform: translateX(0); }
  .ut-menu-visible .ut-sidebar-backdrop, .ut-console.ut-menu-visible .ut-sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 90; background: #0f172a66; border: 0; padding: 0; }
  .ut-topbar#header { padding: 0 18px; min-height: 60px; }
  .ut-page, body.ut-admin #content { padding: 20px 16px; }
  .ut-admin-breadcrumbs { padding: 16px 16px 0; }
  .ut-console .stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .ut-console .stat { padding: 16px; }
  .ut-console .card { padding: 16px; }
  .ut-breadcrumb > span:first-child, .ut-breadcrumb > span:nth-child(2), .ut-env-label { display: none; }
  .ut-user-tools { gap: 8px; }
  .ut-page-footer span { display: none; }
  body.ut-admin.login #container { width: calc(100% - 36px); max-width: 410px; margin-top: 50px; }
}
@media (prefers-reduced-motion: reduce) { .ut-sidebar { transition: none; } }
