:root {
  --anse-admin-ink: oklch(19% 0.018 255);
  --anse-admin-muted: oklch(43% 0.026 255);
  --anse-admin-line: oklch(87.5% 0.012 250);
  --anse-admin-orange: #ff5900;
  --anse-admin-panel: oklch(98% 0.004 250);
  --primary: oklch(24% 0.032 245);
  --secondary: oklch(31% 0.034 245);
  --accent: #fff;
  --header-color: #fff;
  --header-branding-color: #fff;
  --header-bg: oklch(20% 0.018 255);
  --link-fg: oklch(43% 0.09 238);
  --button-bg: oklch(24% 0.032 245);
  --button-hover-bg: oklch(19% 0.03 245);
  --body-bg: #f4f6f8;
  --body-fg: #162231;
  --body-quiet-color: #516071;
  --body-medium-color: #354253;
  --border-color: #d6dee6;
  --hairline-color: #e5eaf0;
  --darkened-bg: #fbfcfd;
  --selected-bg: #eef3f7;
  color-scheme: light;
}

html[data-theme="auto"],
html[data-theme="dark"],
html[data-theme="light"] {
  --primary: oklch(24% 0.032 245);
  --secondary: oklch(31% 0.034 245);
  --accent: #fff;
  --body-bg: #f4f6f8;
  --body-fg: #162231;
  --body-quiet-color: #516071;
  --body-medium-color: #354253;
  --border-color: #d6dee6;
  --hairline-color: #e5eaf0;
  --darkened-bg: #fbfcfd;
  --selected-bg: #eef3f7;
  --link-fg: oklch(43% 0.09 238);
  --button-bg: #101923;
  --button-hover-bg: #1d2a38;
  color-scheme: light;
}

html,
body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
}

body.anse-admin-shell:not(.anse-admin-login-page) {
  min-height: 100svh;
  background: #f4f6f8;
  color: var(--anse-admin-ink);
}

.anse-admin-shell:not(.anse-admin-login-page) #container {
  min-height: 100svh;
  display: block;
  background: transparent;
}

#header {
  min-height: 66px;
  padding: 10px 24px;
}

.anse-admin-shell:not(.anse-admin-login-page) #header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 12px clamp(20px, 4vw, 56px);
  border: 0;
  background: #101923;
  box-shadow: 0 8px 22px rgba(16, 25, 35, 0.14);
}

#site-name a {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #fff;
  font-size: 1rem;
  font-weight: 750;
}

.anse-admin-brand-lockup {
  display: block;
  line-height: 0;
}

#site-name img {
  display: block;
  width: 210px;
  height: auto;
  object-fit: contain;
  background: transparent;
}

.anse-admin-shell:not(.anse-admin-login-page) #site-name a {
  gap: 18px;
  text-decoration: none;
}

.anse-admin-shell:not(.anse-admin-login-page) #site-name img {
  width: 220px;
  height: auto;
}

.anse-admin-shell:not(.anse-admin-login-page) #site-name span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.94rem;
}

.anse-admin-shell:not(.anse-admin-login-page) #user-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: none;
}

.anse-admin-shell:not(.anse-admin-login-page) #user-tools strong {
  color: #fff;
}

.anse-admin-shell:not(.anse-admin-login-page) .anse-admin-welcome {
  white-space: nowrap;
}

.anse-admin-shell:not(.anse-admin-login-page) .anse-admin-user-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.anse-admin-shell:not(.anse-admin-login-page) #user-tools a,
.anse-admin-shell:not(.anse-admin-login-page) #logout-form button {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.anse-admin-shell:not(.anse-admin-login-page) #logout-form {
  display: inline-flex;
}

.anse-admin-shell:not(.anse-admin-login-page) #logout-form button {
  cursor: pointer;
  font: inherit;
}

.anse-admin-shell:not(.anse-admin-login-page) #user-tools a:hover,
.anse-admin-shell:not(.anse-admin-login-page) #logout-form button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.anse-admin-shell:not(.anse-admin-login-page) .skip-to-content-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.anse-admin-shell:not(.anse-admin-login-page) .theme-toggle,
.anse-admin-shell:not(.anse-admin-login-page) #toggle-nav-sidebar,
.anse-admin-shell:not(.anse-admin-login-page) #nav-filter,
.anse-admin-shell:not(.anse-admin-login-page) #nav-sidebar,
.anse-admin-shell:not(.anse-admin-login-page) .breadcrumbs {
  display: none !important;
}

.anse-admin-shell:not(.anse-admin-login-page) #main.main,
.anse-admin-shell:not(.anse-admin-login-page) #main.shifted {
  margin-left: 0 !important;
}

.anse-admin-shell:not(.anse-admin-login-page) #main,
.anse-admin-shell:not(.anse-admin-login-page) #content-start,
.anse-admin-shell:not(.anse-admin-login-page) #content {
  display: block;
  width: 100% !important;
  max-width: none;
  margin: 0;
  padding: 0;
}

.anse-admin-shell:not(.anse-admin-login-page) #content-start.content,
.anse-admin-shell:not(.anse-admin-login-page) #content.colM,
.anse-admin-shell:not(.anse-admin-login-page) #content.colMS {
  box-sizing: border-box;
  flex: 1 1 auto;
  min-width: 0;
}

.anse-admin-shell:not(.anse-admin-login-page) #content {
  color: var(--anse-admin-ink);
}

.anse-admin-shell:not(.anse-admin-login-page) a {
  color: #152333;
}

.anse-admin-dashboard {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(28px, 4vw, 48px) 0 56px;
}

.anse-admin-hero {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  overflow: hidden;
  min-height: 210px;
  padding: clamp(28px, 4vw, 44px);
  border-radius: 10px;
  background:
    linear-gradient(118deg, #ffffff 0%, #ffffff 62%, #eef2f5 62.2%, #e4e9ee 100%);
  box-shadow: 0 6px 18px rgba(22, 34, 48, 0.08);
}

.anse-admin-hero::after {
  content: "";
  position: absolute;
  right: clamp(28px, 7vw, 120px);
  bottom: 26px;
  width: min(34vw, 410px);
  height: 1px;
  background: rgba(42, 52, 64, 0.22);
  transform: rotate(4deg);
  transform-origin: right center;
}

.anse-admin-kicker,
.anse-admin-card-head span {
  color: var(--anse-admin-muted);
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0;
}

.anse-admin-hero h1 {
  max-width: 560px;
  margin: 12px 0 0;
  color: #111923;
  font-size: clamp(2.35rem, 4vw, 4.15rem);
  font-weight: 850;
  line-height: 0.96;
  letter-spacing: 0;
}

.anse-admin-hero p {
  max-width: 510px;
  margin: 18px 0 0;
  color: #364352;
  font-size: 1.02rem;
  line-height: 1.5;
}

.anse-admin-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  min-width: 250px;
}

.anse-admin-actions a,
.anse-admin-model-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 8px;
  font-weight: 790;
  text-decoration: none;
}

.anse-admin-action-primary {
  background: #101923;
  color: #fff !important;
}

.anse-admin-action-secondary {
  border: 1px solid rgba(16, 25, 35, 0.22);
  background: #fff;
}

.anse-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  margin-top: 18px;
}

.anse-admin-card {
  border: 1px solid var(--anse-admin-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 18px rgba(28, 40, 55, 0.06);
}

.anse-admin-card-main {
  padding: 22px;
}

.anse-admin-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--anse-admin-line);
}

.anse-admin-card-head strong {
  color: #111923;
  font-size: 1.02rem;
}

.anse-admin-app {
  padding-top: 20px;
}

.anse-admin-app h2 {
  margin: 0 0 12px;
  color: #111923;
  font-size: 1.15rem;
}

.anse-admin-models {
  display: grid;
  gap: 10px;
}

.anse-admin-model {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 16px;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  background: #fbfcfd;
}

.anse-admin-model-title {
  display: inline-flex;
  color: #111923 !important;
  font-size: 1rem;
  font-weight: 820;
  text-decoration: none;
}

.anse-admin-model-title:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.anse-admin-model-note {
  display: block;
  margin-top: 5px;
  color: var(--anse-admin-muted);
  font-size: 0.88rem;
}

.anse-admin-model-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.anse-admin-model-actions a {
  min-height: 36px;
  border: 1px solid #cfd7df;
  background: #fff;
  color: #152333 !important;
  font-size: 0.86rem;
}

.anse-admin-model-actions a:last-child {
  border-color: #101923;
  background: #101923;
  color: #fff !important;
}

.anse-admin-recent {
  align-self: start;
  padding: 22px;
}

.anse-admin-recent ol {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.anse-admin-recent li {
  padding: 13px 0;
  border-bottom: 1px solid var(--anse-admin-line);
}

.anse-admin-recent li:last-child {
  border-bottom: 0;
}

.anse-admin-recent li span {
  display: block;
  color: #111923;
  font-weight: 760;
  line-height: 1.35;
}

.anse-admin-recent li small,
.anse-admin-empty {
  display: block;
  margin-top: 5px;
  color: var(--anse-admin-muted);
  font-size: 0.86rem;
}

.anse-admin-shell.change-list #content,
.anse-admin-shell.change-form #content,
.anse-admin-shell.delete-confirmation #content,
.anse-admin-shell.history #content,
.anse-admin-shell.password-change #content,
.anse-admin-shell.password-change-done #content {
  box-sizing: border-box;
  flex: 0 1 auto;
  min-width: 0;
  width: min(1280px, calc(100% - 40px)) !important;
  margin: 0 auto;
  padding: 36px 0 64px;
}

.anse-admin-shell.change-list #content h1,
.anse-admin-shell.change-form #content h1,
.anse-admin-shell.delete-confirmation #content h1,
.anse-admin-shell.history #content h1,
.anse-admin-shell.password-change #content h1,
.anse-admin-shell.password-change-done #content h1 {
  margin: 0 0 20px;
  color: #111923;
  font-size: 2rem;
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: 0;
}

.anse-admin-shell #content-main {
  color: var(--anse-admin-ink);
}

.anse-admin-shell .object-tools {
  display: flex;
  float: none !important;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.anse-admin-shell .object-tools li {
  display: block;
}

.anse-admin-shell .object-tools a,
.anse-admin-shell .addlink,
.anse-admin-shell .historylink,
.anse-admin-shell .viewsitelink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #101923;
  border-radius: 8px;
  background: #101923;
  color: #fff !important;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.anse-admin-shell .object-tools a:hover,
.anse-admin-shell .addlink:hover,
.anse-admin-shell .historylink:hover,
.anse-admin-shell .viewsitelink:hover {
  background: #1d2a38;
}

.anse-admin-shell #changelist {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  background: transparent;
  border: 0;
}

.anse-admin-shell #changelist.filtered {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
}

.anse-admin-shell #changelist .changelist-form-container,
.anse-admin-shell.change-form #content-main > form,
.anse-admin-shell.delete-confirmation #content-main,
.anse-admin-shell.history #content-main,
.anse-admin-shell.password-change #content-main,
.anse-admin-shell.password-change-done #content-main {
  min-width: 0;
  border: 1px solid var(--anse-admin-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(28, 40, 55, 0.06);
}

.anse-admin-shell #changelist .changelist-form-container {
  grid-column: 1;
  grid-row: 1;
  width: auto !important;
  margin-right: 0 !important;
  overflow: hidden;
}

.anse-admin-shell #toolbar {
  padding: 16px 18px;
  border-bottom: 1px solid var(--anse-admin-line);
  background: #fbfcfd;
}

.anse-admin-shell #toolbar form div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.anse-admin-shell #toolbar label img {
  display: none;
}

.anse-admin-shell #toolbar label::before {
  content: "Поиск";
  color: var(--anse-admin-muted);
  font-size: 0.88rem;
  font-weight: 760;
}

.anse-admin-shell input[type="text"],
.anse-admin-shell input[type="password"],
.anse-admin-shell input[type="email"],
.anse-admin-shell input[type="url"],
.anse-admin-shell input[type="number"],
.anse-admin-shell textarea,
.anse-admin-shell select {
  min-height: 40px;
  max-width: 100%;
  padding: 9px 11px;
  border: 1px solid #cbd4dd;
  border-radius: 8px;
  background: #fff;
  color: var(--anse-admin-ink);
  font: inherit;
}

.anse-admin-shell textarea {
  min-height: 92px;
}

.anse-admin-shell input:focus,
.anse-admin-shell textarea:focus,
.anse-admin-shell select:focus {
  border-color: #536273;
  outline: 3px solid rgba(16, 25, 35, 0.12);
}

.anse-admin-shell input[type="submit"],
.anse-admin-shell button.button,
.anse-admin-shell .button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #101923;
  border-radius: 8px;
  background: #101923;
  color: #fff !important;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.anse-admin-shell input[type="submit"]:hover,
.anse-admin-shell button.button:hover,
.anse-admin-shell .button:hover {
  background: #1d2a38;
}

.anse-admin-shell a:focus-visible,
.anse-admin-shell button:focus-visible,
.anse-admin-shell input[type="submit"]:focus-visible,
.anse-admin-shell input[type="checkbox"]:focus-visible,
.anse-admin-shell select:focus-visible {
  outline: 3px solid var(--anse-admin-orange);
  outline-offset: 3px;
}

.anse-admin-shell #changelist .actions,
.anse-admin-shell .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--anse-admin-line);
  background: #fff !important;
  color: var(--anse-admin-ink);
}

.anse-admin-shell #changelist .actions label,
.anse-admin-shell .actions label {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--anse-admin-muted);
  font-size: 0.9rem;
  font-weight: 740;
}

.anse-admin-shell .action-counter,
.anse-admin-shell .small.quiet {
  color: var(--anse-admin-muted);
  font-size: 0.88rem;
}

.anse-admin-shell #changelist .results,
.anse-admin-shell .results {
  overflow-x: auto;
  background: #fff;
}

.anse-admin-shell #result_list {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

.anse-admin-shell #result_list caption {
  padding: 12px 18px;
  color: var(--anse-admin-muted);
  text-align: left;
}

.anse-admin-shell #result_list th,
.anse-admin-shell #result_list td {
  padding: 12px 14px;
  border-bottom: 1px solid #e5eaf0;
  background: #fff;
  color: #1b2734;
  font-size: 0.92rem;
  line-height: 1.35;
  vertical-align: middle;
}

.anse-admin-shell #result_list thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f6f9 !important;
  color: #263443;
  font-size: 0.82rem;
  font-weight: 850;
  white-space: nowrap;
}

.anse-admin-shell #result_list tbody tr {
  background: #fff !important;
}

.anse-admin-shell #result_list tbody tr:hover,
.anse-admin-shell #result_list tbody tr:hover th,
.anse-admin-shell #result_list tbody tr:hover td {
  background: #f8fafc;
}

.anse-admin-shell #result_list th a,
.anse-admin-shell #result_list td a {
  color: #152333 !important;
  font-weight: 780;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.anse-admin-shell .admin-user-name,
.anse-admin-shell .admin-user-email {
  display: block;
}

.anse-admin-shell .admin-user-email {
  margin-top: 3px;
  color: var(--anse-admin-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.anse-admin-shell .admin-access-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  border: 1px solid #cbd4dd;
  border-radius: 999px;
  background: #f4f6f8;
  color: #354253;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.anse-admin-shell .admin-access-status.is-active {
  border-color: #bad6c3;
  background: #edf8f0;
  color: #205f35;
}

.anse-admin-shell #result_list input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #101923;
}

.anse-admin-shell #changelist .paginator,
.anse-admin-shell .paginator {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 14px 18px;
  border-top: 1px solid var(--anse-admin-line);
  color: var(--anse-admin-muted);
  background: #fbfcfd !important;
  font-size: 0.9rem;
}

.anse-admin-shell .paginator a,
.anse-admin-shell .paginator .this-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid #d4dce5;
  border-radius: 8px;
  background: #fff;
  color: #152333 !important;
  font-weight: 800;
  text-decoration: none;
}

.anse-admin-shell .paginator .this-page {
  border-color: #101923;
  background: #101923;
  color: #fff !important;
}

.anse-admin-shell #changelist-filter {
  position: sticky;
  grid-column: 2;
  grid-row: 1;
  top: 18px;
  width: auto !important;
  min-width: 0;
  margin: 0 !important;
  padding: 18px;
  border: 1px solid var(--anse-admin-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(28, 40, 55, 0.06);
}

.anse-admin-shell #changelist-filter h2,
.anse-admin-shell #changelist-filter-header {
  margin: 0 0 14px;
  padding: 0;
  background: transparent !important;
  color: #111923;
  font-size: 1.15rem;
  font-weight: 850;
}

.anse-admin-shell #changelist-filter h3 {
  margin: 0 0 10px;
  font-size: 0.9rem;
}

.anse-admin-shell #changelist-filter details {
  padding: 12px 0;
  border-top: 1px solid #e5eaf0;
}

.anse-admin-shell #changelist-filter summary {
  color: #263443;
  font-weight: 830;
  cursor: pointer;
}

.anse-admin-shell #changelist-filter ul {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.anse-admin-shell #changelist-filter li a {
  display: block;
  padding: 7px 9px;
  border-radius: 8px;
  color: #2f3c49 !important;
  text-decoration: none;
}

.anse-admin-shell #changelist-filter li.selected a,
.anse-admin-shell #changelist-filter li a:hover {
  background: #eef3f7;
  color: #111923 !important;
  font-weight: 780;
}

.anse-admin-shell.change-form #content-main > form {
  overflow: hidden;
}

.anse-admin-shell.change-form fieldset.module,
.anse-admin-shell.change-form .inline-group {
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--anse-admin-line);
  background: #fff;
}

.anse-admin-shell.change-form .fieldset-heading,
.anse-admin-shell.change-form .inline-group h2 {
  margin: 0;
  padding: 18px 22px;
  border-bottom: 1px solid var(--anse-admin-line);
  background: #f7f9fb;
  color: #111923;
  font-size: 1.05rem;
  font-weight: 850;
}

.anse-admin-shell.change-form .form-row {
  margin: 0;
  padding: 16px 22px;
  border-bottom: 1px solid #edf1f5;
}

.anse-admin-shell.change-form .form-row > div {
  display: grid;
  grid-template-columns: minmax(170px, 230px) minmax(0, 1fr);
  gap: 6px 18px;
  align-items: start;
}

.anse-admin-shell.change-form .form-row:last-child {
  border-bottom: 0;
}

.anse-admin-shell.change-form .form-row > div,
.anse-admin-shell.change-form .flex-container {
  min-width: 0;
}

.anse-admin-shell.change-form .form-row .flex-container {
  display: contents;
}

.anse-admin-shell.change-form .form-row label {
  display: block;
  padding-top: 10px;
  color: #25313e;
  font-size: 0.9rem;
  font-weight: 800;
}

.anse-admin-shell.change-form .form-row .flex-container.checkbox-row {
  display: flex;
  grid-column: 2;
  gap: 10px;
  align-items: flex-start;
  min-height: 40px;
  padding-top: 8px;
}

.anse-admin-shell.change-form .checkbox-row label {
  padding-top: 0;
}

.anse-admin-shell.change-form .checkbox-row input[type="checkbox"] {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #101923;
}

.anse-admin-shell.change-form .help,
.anse-admin-shell.change-form .readonly,
.anse-admin-shell.change-form .description {
  width: auto !important;
  max-width: 70ch;
  margin-top: 6px;
  color: var(--anse-admin-muted);
  font-size: 0.86rem;
  line-height: 1.42;
}

.anse-admin-shell.change-form .form-row div.help,
.anse-admin-shell.change-form .form-row .help {
  grid-column: 2;
  margin-left: 0 !important;
  padding-left: 0 !important;
}

.anse-admin-shell.change-form .form-row .readonly {
  min-width: 0;
  padding-top: 9px;
  overflow-wrap: anywhere;
}

.anse-admin-shell .admin-password-management {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}

.anse-admin-shell .admin-password-management .button {
  min-height: 44px;
}

@media (max-width: 1024px) {
  .anse-admin-shell.change-form .form-row > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .anse-admin-shell.change-form .form-row label {
    padding-top: 0;
  }

  .anse-admin-shell.change-form .form-row .flex-container.checkbox-row,
  .anse-admin-shell.change-form .form-row div.help,
  .anse-admin-shell.change-form .form-row .help {
    grid-column: 1;
  }

  .anse-admin-shell.change-form .form-row .flex-container.checkbox-row {
    padding-top: 0;
  }
}

.anse-admin-shell .errornote,
.anse-admin-shell .errorlist,
.anse-admin-shell .messagelist {
  border-radius: 8px;
}

.anse-admin-shell .messagelist {
  display: grid;
  gap: 8px;
  width: min(1280px, calc(100% - 40px));
  margin: 18px auto 0;
  padding: 0;
  list-style: none;
}

.anse-admin-shell .messagelist li {
  padding: 12px 14px;
  border: 1px solid #cbded0;
  border-radius: 8px;
  background: #f2fbf4;
  color: #21482b;
  font-weight: 720;
}

.anse-admin-shell .errorlist {
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid #f0b4aa;
  background: #fff1ef;
  color: #8b2d20;
  list-style: none;
}

.anse-admin-shell.delete-confirmation #content-main,
.anse-admin-shell.history #content-main,
.anse-admin-shell.password-change #content-main,
.anse-admin-shell.password-change-done #content-main {
  padding: 22px;
}

.anse-admin-shell.password-change #content-main form {
  display: grid;
  gap: 16px;
}

.anse-admin-shell.password-change .form-row {
  display: grid;
  grid-template-columns: minmax(170px, 240px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin: 0;
}

.anse-admin-shell.password-change .form-row label {
  display: block;
  padding-top: 10px;
  color: #25313e;
  font-size: 0.9rem;
  font-weight: 800;
}

.anse-admin-shell.password-change .form-row div {
  min-width: 0;
}

.anse-admin-shell .module h2,
.anse-admin-shell .module caption {
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--anse-admin-line);
  background: #f7f9fb;
  color: #111923;
  font-size: 0.98rem;
  font-weight: 850;
  text-align: left;
}

.anse-admin-shell .submit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
  padding: 18px 22px;
  border: 0;
  background: #fbfcfd;
}

.anse-admin-shell .submit-row input.default {
  background: #101923;
}

.anse-admin-shell .submit-row .deletelink {
  margin-right: auto;
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid #d6a39c;
  border-radius: 8px;
  background: #fff;
  color: #8b2d20 !important;
  font-weight: 800;
  text-decoration: none;
}

.anse-admin-shell .submit-row .closelink {
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid #d4dce5;
  border-radius: 8px;
  color: #152333 !important;
  font-weight: 800;
  text-decoration: none;
}

.anse-admin-login-page #header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  background: transparent;
}

.anse-admin-login-page {
  overflow: hidden;
}

.anse-admin-login-page .skip-to-content-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.anse-admin-login-page #site-name span,
.anse-admin-login-page .theme-toggle {
  color: var(--anse-admin-ink);
}

.anse-admin-login-page #site-name img {
  content: url("/brand_assets/anse-school-expert-logo-compact-light-transparent.png");
  width: 240px;
  height: auto;
}

.anse-admin-login-page #container,
.anse-admin-login-page #main,
.anse-admin-login-page #content {
  min-height: 100svh;
}

.anse-admin-login-page #main,
.anse-admin-login-page #content {
  padding: 0;
}

.anse-admin-login-page #content {
  width: 100%;
  max-width: none;
  margin: 0;
}

.anse-admin-login {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.95fr);
  min-height: 100svh;
  color: var(--anse-admin-ink);
  background: #fff;
}

.anse-admin-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 110px clamp(48px, 7vw, 110px) 72px;
  background: var(--anse-admin-panel);
}

.anse-admin-intro > span,
.anse-admin-label {
  color: var(--anse-admin-muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.anse-admin-intro h1 {
  max-width: 520px;
  margin: 18px 0 0;
  color: var(--anse-admin-ink);
  font-size: 3.4rem;
  font-weight: 820;
  line-height: 1;
  letter-spacing: 0;
}

.anse-admin-intro p {
  max-width: 470px;
  margin: 24px 0 0;
  color: #3a4654;
  font-size: 1.05rem;
  line-height: 1.55;
}

.anse-admin-intro > img {
  position: absolute;
  right: clamp(20px, 4vw, 64px);
  bottom: 0;
  width: min(34vw, 350px);
  max-height: 56vh;
  object-fit: contain;
  object-position: bottom;
  background: transparent;
  pointer-events: none;
}

.anse-admin-login-page #footer {
  display: none;
}

.anse-admin-form-panel {
  display: grid;
  place-items: center;
  padding: 96px clamp(36px, 7vw, 108px) 54px;
  border-left: 1px solid var(--anse-admin-line);
}

.anse-admin-form-panel > div {
  width: min(100%, 430px);
}

.anse-admin-form-panel h2 {
  margin: 14px 0 32px;
  color: var(--anse-admin-ink);
  font-size: 2.15rem;
  line-height: 1.1;
}

.anse-admin-form-panel .form-row {
  padding: 0 0 18px;
  border: 0;
}

.anse-admin-form-panel .form-row label {
  display: block;
  margin-bottom: 8px;
  color: var(--anse-admin-ink);
  font-size: 0.9rem;
  font-weight: 720;
}

.anse-admin-form-panel input[type="text"],
.anse-admin-form-panel input[type="password"] {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid #c7cfd8;
  border-radius: 8px;
  background: #fff;
  color: var(--anse-admin-ink);
  font: inherit;
}

.anse-admin-form-panel input:focus {
  border-color: var(--anse-admin-orange);
  outline: 3px solid rgba(255, 89, 0, 0.18);
}

.anse-admin-form-panel .submit-row {
  padding: 0;
  background: transparent;
}

.anse-admin-form-panel .submit-row input {
  width: 100%;
  min-height: 52px;
  border-radius: 8px;
  background: var(--anse-admin-orange);
  color: #fff;
  font-size: 0.96rem;
  font-weight: 800;
}

.anse-admin-form-panel .submit-row input:hover {
  background: #e84f00;
}

.anse-admin-back {
  display: inline-block;
  margin-top: 24px;
  color: var(--anse-admin-ink);
  font-weight: 680;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.anse-admin-form-panel .errornote {
  margin: 0 0 18px;
  border-radius: 8px;
}

@media (max-width: 820px) {
  .anse-admin-shell:not(.anse-admin-login-page) #header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
  }

  .anse-admin-shell:not(.anse-admin-login-page) #site-name img {
    width: 190px;
  }

  .anse-admin-shell:not(.anse-admin-login-page) #site-name span {
    padding-left: 12px;
    font-size: 0.86rem;
  }

  .anse-admin-shell:not(.anse-admin-login-page) #user-tools {
    width: 100%;
    display: grid;
    gap: 8px;
  }

  .anse-admin-shell:not(.anse-admin-login-page) .anse-admin-welcome {
    font-size: 0.78rem;
  }

  .anse-admin-shell:not(.anse-admin-login-page) .anse-admin-user-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .anse-admin-shell:not(.anse-admin-login-page) #user-tools a,
  .anse-admin-shell:not(.anse-admin-login-page) #logout-form button {
    justify-content: center;
    min-height: 44px;
    padding: 0 8px;
    line-height: 1.15;
    text-align: center;
  }

  .anse-admin-shell:not(.anse-admin-login-page) #logout-form,
  .anse-admin-shell:not(.anse-admin-login-page) #logout-form button {
    width: 100%;
  }

  .anse-admin-dashboard {
    width: min(100% - 28px, 720px);
    padding-top: 18px;
  }

  .anse-admin-hero {
    align-items: stretch;
    flex-direction: column;
    min-height: auto;
    padding: 24px;
    background: #fff;
  }

  .anse-admin-hero::after {
    display: none;
  }

  .anse-admin-actions {
    display: none;
  }

  .anse-admin-grid {
    grid-template-columns: 1fr;
  }

  .anse-admin-shell.change-list #content,
  .anse-admin-shell.change-form #content,
  .anse-admin-shell.delete-confirmation #content,
  .anse-admin-shell.history #content,
  .anse-admin-shell.password-change #content,
  .anse-admin-shell.password-change-done #content {
    width: min(100% - 28px, 720px) !important;
    padding: 22px 0 42px;
  }

  .anse-admin-shell #changelist,
  .anse-admin-shell #changelist.filtered {
    grid-template-columns: 1fr;
  }

  .anse-admin-shell #changelist-filter {
    position: static;
    grid-column: 1;
    grid-row: auto;
    order: 1;
  }

  .anse-admin-shell #changelist .results,
  .anse-admin-shell .results {
    overflow-x: visible;
  }

  .anse-admin-shell #result_list {
    table-layout: fixed;
  }

  .anse-admin-shell #result_list th,
  .anse-admin-shell #result_list td {
    padding: 10px 8px;
    font-size: 0.875rem;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .anse-admin-shell #result_list .action-checkbox-column,
  .anse-admin-shell #result_list .action-checkbox {
    width: 32px;
    padding-right: 4px;
    padding-left: 8px;
  }

  .anse-admin-shell #result_list .column-profile_role,
  .anse-admin-shell #result_list .field-profile_role {
    width: 26%;
  }

  .anse-admin-shell #result_list .column-access_status,
  .anse-admin-shell #result_list .field-access_status {
    width: 72px;
  }

  .anse-admin-shell #result_list .column-staff_status,
  .anse-admin-shell #result_list .field-staff_status,
  .anse-admin-shell #result_list .column-date_joined,
  .anse-admin-shell #result_list .field-date_joined {
    display: none;
  }

  .anse-admin-shell #changelist .actions,
  .anse-admin-shell .actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .anse-admin-shell #changelist .actions label,
  .anse-admin-shell .actions label {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .anse-admin-shell #changelist .actions select,
  .anse-admin-shell #changelist .actions button,
  .anse-admin-shell .actions select,
  .anse-admin-shell .actions button {
    width: 100%;
    min-height: 44px;
  }

  .anse-admin-shell .admin-user-email {
    font-size: 0.78rem;
  }

  .anse-admin-shell .admin-access-status {
    min-height: 26px;
    padding: 2px 7px;
    white-space: normal;
  }

  .anse-admin-shell.change-form .form-row {
    padding: 15px 16px;
  }

  .anse-admin-shell.password-change .form-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .anse-admin-shell.change-form .form-row label {
    padding-top: 0;
  }

  .anse-admin-shell.password-change .form-row label {
    padding-top: 0;
  }

  .anse-admin-shell .submit-row {
    justify-content: stretch;
  }

  .anse-admin-shell .submit-row input,
  .anse-admin-shell .submit-row a {
    width: 100%;
  }

  .anse-admin-model {
    align-items: stretch;
    flex-direction: column;
  }

  .anse-admin-model-actions {
    justify-content: flex-start;
  }

  .anse-admin-login {
    grid-template-columns: 1fr;
  }

  .anse-admin-intro {
    display: none;
  }

  .anse-admin-form-panel {
    min-height: 100svh;
    padding: 94px 24px 42px;
    border-left: 0;
  }
}

@media (max-width: 560px) {
  .anse-admin-login-page #site-name img {
    content: url("/brand_assets/anse-school-expert-logo-mobile-light-transparent.png");
    width: 184px;
  }

  .anse-admin-shell:not(.anse-admin-login-page) #site-name img {
    width: 168px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
