:root {
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #1f2937;
  background: #f4f6fa;
  font-size: 14px;
  line-height: 22px;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-active: #1e40af;
  --accent-soft: #eff6ff;
  --text: #1f2937;
  --muted: #5f6b7d;
  --line: #dce2eb;
  --danger: #b42318;
  --surface: #fff;
  --sidebar: #12223e;
  --radius: 4px;
  --panel-radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
}

body[data-require-staff]:not([data-session-verified]) > .shell {
  visibility: hidden;
}

.admin-session-lock {
  max-width: 520px;
  min-height: 0;
  margin: 15vh auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  background: var(--surface);
}

.admin-session-lock .button,
.admin-session-lock button {
  margin: 8px 8px 0 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: var(--accent-hover);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid #bdc8d8;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 120ms, border-color 120ms, color 120ms;
}

button:hover,
.button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-hover);
  text-decoration: none;
}

button:active,
.button:active {
  border-color: var(--accent-active);
  background: #dbeafe;
  color: var(--accent-active);
}

.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.primary:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  color: #fff;
}

.primary:active {
  border-color: var(--accent-active);
  background: var(--accent-active);
  color: #fff;
}

.danger {
  border-color: #e6aaa5;
  color: var(--danger);
}

.danger:hover {
  border-color: var(--danger);
  background: #fff1f0;
  color: var(--danger);
}

.danger:active {
  border-color: #912018;
  background: #fee4e2;
  color: #912018;
}

button:disabled,
.button[aria-disabled="true"] {
  border-color: var(--line);
  background: #f1f3f7;
  color: #7d8898;
  cursor: not-allowed;
}

button[aria-busy="true"],
button.busy {
  cursor: progress;
}

.button-small {
  min-height: 24px;
  padding: 0 8px;
  font-size: 12px;
  line-height: 22px;
}

.button-medium {
  min-height: 32px;
  padding: 4px 12px;
}

:focus-visible {
  outline: 3px solid #69a0ff;
  outline-offset: 2px;
}

input,
textarea,
select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid #bdc8d8;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 8px 12px;
}

textarea {
  resize: vertical;
}

input:hover,
textarea:hover,
select:hover {
  border-color: #7d94b6;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
}

input:disabled,
textarea:disabled,
select:disabled {
  background: #f1f3f7;
  color: #7d8898;
  cursor: not-allowed;
}

input[type="file"] {
  padding: 4px;
  font-size: 12px;
}

input[type="file"]::file-selector-button {
  min-height: 30px;
  margin-right: 12px;
  border: 0;
  border-radius: 2px;
  background: #eaf1fe;
  color: var(--accent-hover);
  padding: 4px 12px;
  font: inherit;
  cursor: pointer;
}

input[type="checkbox"] {
  width: 16px;
  min-height: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: var(--danger);
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
}

.field-label {
  display: block;
}

.required-mark {
  margin-right: 4px;
  color: var(--danger);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
}

h2 {
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
}

h3 {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}

p {
  margin-bottom: 16px;
}

.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  width: 232px;
  height: 100vh;
  overflow-y: auto;
  background: var(--sidebar);
  color: #d8e4f6;
  padding: 0 16px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  margin: 0 -16px 24px;
  border-bottom: 1px solid #2a3a55;
  color: #93c5fd;
  padding: 0 24px;
  font-size: 32px;
  font-weight: 800;
  line-height: 40px;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}

.brand span {
  color: #f8fafc;
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
  letter-spacing: 1px;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--accent-hover);
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: 1px;
}

.sidebar .eyebrow {
  margin-left: 16px;
  color: #9bb0ce;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar nav button,
.sidebar nav .button {
  justify-content: flex-start;
  min-height: 40px;
  border-color: transparent;
  background: transparent;
  color: #cbd8ec;
  padding: 8px 16px;
}

.sidebar nav button:hover,
.sidebar nav .button:hover {
  background: #203656;
  color: #fff;
}

.sidebar nav button:active,
.sidebar nav .button:active {
  background: #28466e;
}

.sidebar nav button[aria-current="page"] {
  border-color: #3b74e7;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
}

.nav-more > summary {
  padding: 8px 16px;
  color: #cbd8ec;
  white-space: nowrap;
}

.nav-more > button {
  display: flex;
  width: 100%;
  margin-top: 8px;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.task-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  white-space: normal;
  font-weight: 400;
}

.task-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

.task-card strong {
  font-size: 18px;
  line-height: 26px;
}

.task-card > span:not(.task-icon):not(.task-link) {
  color: var(--muted);
}

.task-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #eaf1ff;
  color: var(--accent);
  font-size: 18px;
  font-weight: 600;
}

.task-link {
  color: var(--accent-hover);
  margin-top: auto;
}

.advanced-options > summary {
  font-weight: 600;
  color: var(--text);
}

.advanced-options[open] > summary {
  margin-bottom: 16px;
}

.advanced-options:not(.panel) {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  background: #f8faff;
}

.advanced-options .metric-grid {
  margin-bottom: 0;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 16px 32px;
  padding-left: 24px;
  margin: 16px 0 0;
}

.workflow-steps li::marker {
  color: var(--accent);
  font-weight: 600;
}

.workflow-steps li > strong,
.workflow-steps li > span {
  display: block;
}

.workflow-steps li > span {
  color: var(--muted);
  margin-top: 4px;
}

.quick-guide h2 {
  margin-top: 0;
}

.sidebar-bottom {
  margin-top: auto;
  padding: 32px 16px 0;
  color: #9bb0ce;
  font-size: 12px;
  line-height: 20px;
}

.sidebar-bottom a {
  display: block;
  margin-bottom: 16px;
  color: #bdd7ff;
  font-size: 14px;
}

.sidebar-bottom p {
  margin: 0;
}

.workspace {
  flex: 1;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  height: 64px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  padding: 16px 32px;
}

.account-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.topbar button,
.topbar .button {
  min-height: 32px;
  padding: 4px 12px;
}

#session-name {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

main {
  max-width: 1480px;
  min-height: calc(100vh - 128px);
  margin: 0 auto;
  padding: 32px;
}

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.page-heading p:last-child {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
}

.search-bar,
.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  background: var(--surface);
  padding: 16px;
}

.filter-bar {
  flex-wrap: wrap;
}

.filter-bar > label {
  flex: 1 1 160px;
  max-width: 320px;
}

.filter-bar input,
.filter-bar select,
.filter-bar button {
  min-height: 32px;
  height: 32px;
  padding: 4px 12px;
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-bar input[name="category"] {
  max-width: 208px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 16px;
}

.card,
.panel,
.row-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  background: var(--surface);
  padding: 24px;
}

.card {
  display: flex;
  flex-direction: column;
}

.card .description {
  flex: 1;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.card .card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.app-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--panel-radius);
  background: #eaf1fe;
  color: var(--accent-hover);
  font-size: 20px;
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: var(--radius);
  background: #eaf1fe;
  color: #2454a6;
  padding: 0 8px;
  font-size: 12px;
  line-height: 20px;
  white-space: nowrap;
}

.badge.warning {
  background: #fff4db;
  color: #845608;
}

.meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 20px;
  overflow-wrap: anywhere;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.card .actions {
  margin-top: 16px;
}

.actions button,
.actions .button {
  min-height: 32px;
  padding: 4px 12px;
}

.checksum {
  margin: 8px 0;
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 12px;
  line-height: 20px;
  overflow-wrap: anywhere;
}

.empty {
  grid-column: 1 / -1;
  border: 1px dashed #c9d3e1;
  border-radius: var(--panel-radius);
  background: var(--surface);
  color: var(--muted);
  padding: 40px 24px;
  text-align: center;
}

.admin-page :is(#admin-content, #catalog-content, #storefront-content) .empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.empty a {
  margin-left: 8px;
}

.empty p:empty {
  margin-bottom: 16px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel {
  margin-top: 24px;
  margin-bottom: 24px;
}

.panel-heading,
.row-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.info-banner {
  margin: 0 0 24px;
  border: 1px solid #c6d9fc;
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: #284b80;
  padding: 12px 16px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.section-heading h2,
.section-heading h3 {
  margin-bottom: 4px;
}

.section-index {
  display: inline-flex;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  height: 32px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.section-help {
  margin-bottom: 16px !important;
}

.section-heading-spaced,
.section-actions {
  margin-top: 24px;
}

.editor-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: #fbfcff;
}

.editor-card > .panel-heading h3 {
  margin: 0;
}

.editor-card > .panel-heading {
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.editor-card .row-card {
  padding: 16px;
}

.media-upload {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  border: 1px dashed #bdcce3;
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
  overflow-wrap: anywhere;
}

.media-upload > label {
  width: 100%;
}

.media-preview {
  display: block;
  max-width: 100%;
  max-height: 240px;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: contain;
}

.editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding: 24px 0 0;
}

.moderation-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.moderation-card > p {
  margin: 0;
}

.badge.success {
  background: #ecfdf3;
  color: #166534;
}

.badge.danger {
  background: #fff1f0;
  color: var(--danger);
}

.form-section {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  padding: 24px;
}

.form-section > legend {
  padding: 0 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}

.form-section > .hint,
.form-section > .installation-toggle {
  margin-bottom: 16px;
}

.form-section .form-grid {
  margin-top: 8px;
}

.panel-heading > button,
.row-heading > button {
  min-height: 32px;
  padding: 4px 12px;
}

.row-heading h3 {
  margin-bottom: 0;
}

.row-card p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.row-card > .meta {
  margin-top: 8px;
  margin-bottom: 0;
}

#admin-scene-list,
#report-list {
  margin-bottom: 24px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tabs button {
  min-height: 32px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  padding: 4px 12px;
}

.tabs button:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.tabs [aria-pressed="true"] {
  border-color: #bbd3ff;
  background: #eaf1fe;
  color: var(--accent-hover);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 20px;
}

.span-2 {
  grid-column: 1 / -1;
}

.form-actions,
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.check-label {
  flex-direction: row;
  align-items: center;
}

.hint,
.field-help {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
}

.field-error {
  margin: 0;
  color: var(--danger);
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
}

.code-input {
  font-family: Consolas, monospace;
  font-size: 12px;
  line-height: 20px;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
}

.inline-form label {
  flex: 1;
  min-width: 160px;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  border: 1px solid #bbd3ff;
  border-radius: var(--radius);
  background: #eff6ff;
  color: #1e429a;
  padding: 12px 16px;
  overflow-wrap: anywhere;
}

.notice-content {
  flex: 1;
  min-width: 0;
}

.notice.error {
  border-color: #f0b4af;
  background: #fff1f0;
  color: #912018;
}

.notice.success {
  border-color: #a9d6bc;
  background: #effaf3;
  color: #216440;
}

.notice-close {
  flex-shrink: 0;
  min-height: 24px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0 8px;
  font-size: 12px;
}

.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 20;
  max-width: calc(100vw - 32px);
  transform: translateX(-50%);
  box-shadow: 0 8px 32px #12223e1f;
}

.danger-panel {
  border-color: #e6c5c2;
}

.danger-panel h2 {
  color: var(--danger);
}

.message {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.message p {
  margin: 8px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message .actions {
  margin-top: 8px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  background: var(--surface);
  padding: 24px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 32px;
  font-weight: 600;
  line-height: 40px;
  font-variant-numeric: tabular-nums;
}

.metric span {
  color: var(--muted);
  font-size: 14px;
}

.metric:first-child {
  border-color: #b6cffc;
  background: #eaf1fe;
}

.metric:first-child strong {
  color: var(--accent-hover);
}

#catalog-import-rows th:nth-child(3),
#catalog-import-rows td:nth-child(3) {
  min-width: 6ch;
  white-space: nowrap;
}

.form-section .installation-toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.form-section .form-grid,
.form-section .form-grid > label,
#release-list .release-installation-details {
  min-width: 0;
  overflow-wrap: anywhere;
}

.table-wrap {
  min-height: 300px;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  overflow-wrap: anywhere;
}

th {
  background: #f8faff;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}

tbody tr:hover {
  background: #f8faff;
}

.numeric,
.number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table-empty {
  color: var(--muted);
}

pre {
  max-height: 384px;
  overflow: auto;
  border-radius: var(--radius);
  background: #f4f6fa;
  padding: 16px;
  font-size: 12px;
  line-height: 20px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

details {
  margin: 16px 0;
}

summary {
  color: var(--accent-hover);
  cursor: pointer;
}

dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  margin: 0;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pagination {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  color: var(--muted);
  padding: 16px 0;
}

.pagination-summary {
  margin-right: auto;
  font-size: 12px;
}

.pagination-pages,
.pagination-size,
.pagination-jump {
  display: flex;
  flex: 0 0 auto;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}

.pagination-jump label {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.pagination button,
.pagination select,
.pagination input {
  width: auto;
  min-height: 32px;
  height: 32px;
  padding: 4px 8px;
}

.pagination button {
  min-width: 32px;
}

.pagination [aria-current="page"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.pagination input {
  width: 64px;
}

dialog {
  width: min(464px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  background: var(--surface);
  color: var(--text);
  padding: 24px;
  box-shadow: 0 24px 80px #12223e33;
}

dialog::backdrop {
  background: #10203b80;
}

.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.dialog-heading h2 {
  margin: 0;
}

.dialog-heading button {
  min-height: 24px;
  padding: 0 8px;
  font-size: 12px;
}

.dialog-message {
  margin-bottom: 24px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.dialog-actions {
  justify-content: flex-end;
}

.upload-status {
  grid-column: 1 / -1;
  margin-top: 8px;
  border: 1px solid #bbd3ff;
  border-radius: var(--radius);
  background: #f7faff;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
}

.upload-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.upload-progress,
.upload-progress progress {
  display: block;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background: #dce8ff;
  accent-color: var(--accent);
}

progress::-webkit-progress-bar {
  border-radius: var(--radius);
  background: #dce8ff;
}

progress::-webkit-progress-value {
  border-radius: var(--radius);
  background: var(--accent);
}

progress::-moz-progress-bar {
  border-radius: var(--radius);
  background: var(--accent);
}

.upload-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.upload-actions button {
  min-height: 24px;
  padding: 0 8px;
  font-size: 12px;
}

.upload-status[data-state="error"] {
  border-color: #f0b4af;
  background: #fff1f0;
  color: var(--danger);
}

.upload-status[data-state="complete"] {
  border-color: #a9d6bc;
  background: #effaf3;
  color: #216440;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 20px 32px;
  font-size: 12px;
  line-height: 20px;
}

.skip-link {
  position: absolute;
  top: -64px;
  left: 8px;
  z-index: 30;
  background: var(--surface);
  padding: 12px;
}

.skip-link:focus {
  top: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  margin: -1px;
  border: 0;
  padding: 0;
  white-space: nowrap;
}

.loading {
  color: var(--muted);
}

.loading::before,
.button-spinner {
  display: inline-block;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 2px solid #b5c9eb;
  border-top-color: var(--accent);
  border-radius: 50%;
  vertical-align: middle;
  animation: spin 800ms linear infinite;
}

.loading::before {
  content: "";
  margin-right: 8px;
}

.empty.loading::before {
  margin: 0 0 16px;
}

.primary .button-spinner {
  border-color: currentColor;
  border-top-color: transparent;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 1056px) {
  main {
    padding: 24px;
  }

  .topbar,
  footer {
    padding-right: 24px;
    padding-left: 24px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel,
  .card,
  .row-card,
  .form-section {
    padding: 16px;
  }
}

@media (max-width: 720px) {
  .shell {
    display: block;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 0 16px 16px;
  }

  .brand {
    min-height: 64px;
    margin-bottom: 16px;
    padding: 0 16px;
  }

  .sidebar > .eyebrow,
  .sidebar-bottom {
    display: none;
  }

  .sidebar nav {
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .sidebar nav button,
  .sidebar nav .button {
    min-height: 32px;
    padding: 4px 12px;
  }

  .topbar {
    padding: 16px;
  }

  .topbar > span {
    display: none;
  }

  .account-bar {
    justify-content: flex-end;
    width: 100%;
  }

  main {
    min-height: calc(100vh - 256px);
    padding: 24px 16px;
  }

  .page-heading {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
  }

  .page-heading > button {
    min-height: 32px;
    padding: 4px 12px;
  }

  .search-bar {
    flex-wrap: wrap;
  }

  .search-bar input {
    flex: 1;
    min-width: 160px;
  }

  .search-bar input[name="category"],
  .filter-bar > label {
    max-width: none;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .row-heading {
    flex-wrap: wrap;
    gap: 16px;
  }

  .editor-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .section-heading {
    gap: 12px;
  }

  .metric {
    padding: 16px;
  }

  .metric strong {
    font-size: 28px;
    line-height: 36px;
  }

  footer {
    flex-direction: column;
    gap: 8px;
    padding: 16px;
  }

  dl {
    grid-template-columns: 80px 1fr;
    gap: 16px;
  }

  .pagination {
    justify-content: flex-start;
  }

  .pagination-summary {
    flex-basis: 100%;
  }

  .pagination-pages {
    gap: 4px;
  }
}
