/* UUSC admin shell — white theme (sidebar + top bar, partner/vibe pattern) */

@import url('https://fonts.googleapis.com/icon?family=Material+Icons');

body.adm-shell {
  margin: 0;
  min-height: 100vh;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  font-family: var(--font-primary);
  color: var(--text-primary);
}

/* Compact site header (black bar) — admin + login */
.adm-site-header {
  flex-shrink: 0;
  background: var(--bg-dark, #111827);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.adm-site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 100%;
  min-height: 2.75rem;
  padding: 0.35rem 1.25rem;
  box-sizing: border-box;
}

.adm-site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
  text-decoration: none;
  color: #fff;
}

.adm-site-header__brand:hover {
  color: #fff;
  opacity: 0.92;
}

.adm-site-header__logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.adm-site-header__title {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adm-site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  flex-shrink: 0;
}

.adm-site-header__user {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.72);
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adm-site-header__link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.adm-site-header__link:hover {
  color: var(--primary-light, #00c94a);
}

.adm-site-header__btn {
  padding: 0.3rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.35;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
}

.adm-site-header__btn:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 40rem) {
  .adm-site-header__user {
    display: none;
  }

  .adm-site-header__title {
    font-size: 0.8125rem;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

.adm-layout {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.adm-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-primary);
  border-right: 1px solid var(--border);
  padding: 1rem 0 1.5rem;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.adm-sidebar-heading {
  padding: 0.5rem 1.25rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.adm-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.adm-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.25rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  border-left: 3px solid transparent;
}

.adm-nav-item .material-icons {
  font-size: 1.25rem;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.adm-nav-item:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.adm-nav-item.active {
  background: rgba(0, 177, 63, 0.08);
  color: var(--primary-dark);
  border-left-color: var(--primary);
  font-weight: 600;
}

.adm-nav-item.active .material-icons {
  color: var(--primary);
}

.adm-sidebar-foot {
  margin-top: 1.5rem;
  padding: 0 1.25rem;
  font-size: 0.75rem;
  color: var(--text-light);
  line-height: 1.45;
}

.adm-main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 1.75rem 2rem 3rem;
  scrollbar-gutter: stable;
}

.adm-page-title {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.adm-lede {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 42rem;
}

.adm-section {
  margin-bottom: 1.75rem;
}

.adm-panel {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.04));
}

.adm-panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.0625rem;
  font-weight: 600;
}

.adm-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.adm-stat-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  padding: 1rem 1.15rem;
}

.adm-stat-card .label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.adm-stat-card .value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.adm-table-wrap {
  overflow-x: auto;
  margin-top: 0.5rem;
}

.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.adm-table th,
.adm-table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.adm-table th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  background: var(--bg-secondary);
}

.adm-table tbody tr:hover {
  background: rgba(0, 177, 63, 0.04);
}

.adm-page-row--clickable {
  cursor: pointer;
}

.adm-page-row--clickable:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.adm-table code {
  font-size: 0.8125rem;
  word-break: break-all;
}

.adm-dl {
  display: grid;
  grid-template-columns: minmax(6rem, 10rem) 1fr;
  gap: 0.5rem 1rem;
  margin: 0;
  font-size: 0.9375rem;
}

.adm-dl dt {
  font-weight: 600;
  color: var(--text-secondary);
}

.adm-dl dd {
  margin: 0;
  word-break: break-word;
}

.adm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 1.5rem;
}

.adm-hint {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0.75rem 0 0;
}

.adm-muted {
  color: var(--text-light);
}

.adm-search-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-secondary);
}

.adm-search-input {
  display: block;
  width: 100%;
  max-width: 24rem;
  margin-bottom: 1rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  font: inherit;
  font-size: 0.9375rem;
}

.adm-search-input:focus {
  outline: 2px solid rgba(0, 177, 63, 0.35);
  border-color: var(--primary);
}

.adm-tag {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 4px;
  vertical-align: middle;
}

.adm-tag--admin {
  background: rgba(0, 177, 63, 0.12);
  color: var(--primary-dark);
}

.adm-tag--manager {
  background: #eff6ff;
  color: #1d4ed8;
}

.adm-tag--applying {
  background: #fffbeb;
  color: #b45309;
}

.adm-tag--user {
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.adm-tag--revoked {
  background: #fef2f2;
  color: #b91c1c;
}

.adm-allowlist {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.adm-allowlist li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.adm-allowlist-form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem;
}

.adm-allowlist-form-row .adm-search-input {
  flex: 1 1 12rem;
  margin-bottom: 0;
}

.adm-inline-error {
  color: #b91c1c;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.adm-pending-page .adm-pending {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem 3rem;
}

.adm-pending__card {
  width: 100%;
  max-width: 28rem;
  text-align: center;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl, 16px);
  box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1));
  padding: 2rem 1.75rem;
}

.adm-pending__card h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.adm-pending__lead {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  margin: 0 0 1rem;
}

.adm-tag--hint {
  background: #eff6ff;
  color: #1d4ed8;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  margin-left: 0.25rem;
}

.adm-nowrap {
  white-space: nowrap;
}

.adm-user-actions {
  text-align: right;
  white-space: nowrap;
}

.adm-user-row--self {
  background: rgba(0, 177, 63, 0.04);
}

/* Full-width page editor (no sidebar) */
body.adm-shell--editor .adm-sidebar {
  display: none;
}

body.adm-shell--editor .adm-main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0.65rem 1rem 0.85rem;
}

.adm-editor-workspace {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.adm-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  flex-shrink: 0;
  margin-bottom: 0.35rem;
}

.adm-editor-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  min-width: 0;
  flex: 1 1 8rem;
}

.adm-editor-meta {
  flex-shrink: 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0 0 0.5rem;
}

.adm-editor-meta code {
  font-size: 0.75rem;
}

.adm-editor-split {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  background: var(--bg-primary);
}

.adm-editor-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.adm-editor-pane--source {
  flex: 0 0 50%;
  max-width: 82%;
  min-width: 18%;
}

.adm-editor-pane--preview {
  flex: 1 1 auto;
}

.adm-editor-resizer {
  flex: 0 0 6px;
  width: 6px;
  cursor: col-resize;
  touch-action: none;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.adm-editor-resizer::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3px;
  height: 2.5rem;
  border-radius: 2px;
  background: var(--border);
  opacity: 0.85;
}

.adm-editor-resizer:hover,
.adm-editor-resizer:focus-visible,
.adm-editor-resizer.is-dragging {
  background: rgba(0, 177, 63, 0.12);
}

.adm-editor-resizer:hover::after,
.adm-editor-resizer:focus-visible::after,
.adm-editor-resizer.is-dragging::after {
  background: var(--primary);
}

.adm-editor-resizer:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(0, 177, 63, 0.45);
}

.adm-editor-pane__label {
  flex-shrink: 0;
  padding: 0.4rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.adm-editor-pane__head {
  display: flex;
  align-items: center;
  gap: 0.5rem 0.75rem;
  flex-shrink: 0;
  padding: 0.3rem 0.45rem 0.3rem 0.75rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.adm-editor-pane__head .adm-editor-pane__label {
  padding: 0;
  border: none;
  background: transparent;
}

.adm-editor-pane__head .adm-editor-status {
  margin-left: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adm-editor-pane__actions {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}

.adm-editor-save-btn {
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  padding: 0.2rem 0.55rem;
  color: var(--text-secondary);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  cursor: default;
}

.adm-editor-save-btn--active {
  color: #fff;
  background: var(--primary, #00b13f);
  border-color: var(--primary, #00b13f);
  cursor: pointer;
}

.adm-editor-save-btn--active:hover:not(:disabled) {
  background: var(--primary-dark, #009a36);
  border-color: var(--primary-dark, #009a36);
}

.adm-editor-save-btn:disabled:not(.adm-editor-save-btn--active) {
  opacity: 0.85;
}

.adm-editor-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md, 8px);
}

.adm-editor-icon-btn:hover {
  color: var(--primary-dark);
  background: rgba(0, 177, 63, 0.08);
}

.adm-editor-icon-btn .material-icons {
  font-size: 1.125rem;
}

.adm-editor-icon-btn--danger:hover {
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.08);
}

.adm-form-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.adm-form-row-actions .adm-editor-icon-btn {
  border: 1px solid var(--border);
  background: var(--bg-primary);
  cursor: pointer;
}

#editor {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  padding: 0.75rem 1rem;
  border: none;
  resize: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.55;
  box-sizing: border-box;
}

#editor:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(0, 177, 63, 0.25);
}

.adm-preview-host {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  background: var(--bg-secondary);
}

.adm-preview-host .adm-muted,
.adm-preview-host .adm-preview-note {
  padding: 1rem 1.15rem;
  font-size: 0.875rem;
}

.adm-preview-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: none;
  background: #fff;
}

.adm-editor-status {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.adm-editor-status--dirty {
  color: #b45309;
  font-weight: 600;
}

.adm-editor-status--ok {
  color: var(--primary-dark);
  font-weight: 600;
}

@media (max-width: 52rem) {
  body.adm-shell {
    height: auto;
    max-height: none;
    overflow: auto;
  }

  .adm-layout {
    flex-direction: column;
    overflow: visible;
  }

  .adm-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0 1rem;
  }

  .adm-sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0 0.5rem;
  }

  .adm-nav-item {
    flex: 1 1 auto;
    min-width: 9rem;
    border-left: none;
    border-radius: var(--radius-md, 8px);
  }

  .adm-nav-item.active {
    border-left: none;
    box-shadow: inset 0 0 0 2px var(--primary);
  }

  .adm-main {
    overflow: visible;
    padding: 1.25rem 1rem 2.5rem;
  }

  body.adm-shell--editor {
    height: auto;
    max-height: none;
    overflow: auto;
  }

  body.adm-shell--editor .adm-main {
    overflow: visible;
    padding: 0.75rem 0.75rem 1.25rem;
  }

  body.adm-shell--editor .adm-editor-split {
    flex-direction: column;
    flex: none;
    min-height: auto;
  }

  body.adm-shell--editor .adm-editor-pane--source {
    flex: 0 0 auto;
    max-width: none;
    min-width: 0;
  }

  body.adm-shell--editor .adm-editor-resizer {
    display: none;
  }

  body.adm-shell--editor #editor {
    min-height: 14rem;
  }

  body.adm-shell--editor .adm-preview-host {
    min-height: 14rem;
  }
}

.adm-site-settings-panel {
  margin-top: 0.75rem;
}

.adm-content-bundle__actions {
  margin: 0.75rem 0 1.25rem;
}

.adm-content-bundle__import {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.adm-content-bundle__confirm {
  margin: 0.75rem 0;
  max-width: 28rem;
}

.adm-content-bundle__warning {
  margin: 0 0 0.75rem;
  color: var(--text-secondary);
}

.adm-content-bundle__success {
  margin-top: 0.75rem;
  color: var(--primary);
}

.adm-site-settings-form__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.adm-module-card {
  display: block;
  padding: 1rem 1.1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.adm-module-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.08));
}

.adm-module-card__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
}

.adm-module-card__desc {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.adm-badge {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.adm-site-module-panel {
  margin-top: 0.5rem;
}

.adm-field {
  margin-bottom: 0.85rem;
}

.adm-field__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}

.adm-field__label-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
  margin-bottom: 0.3rem;
  position: relative;
}

.adm-field__label-row .adm-field__label {
  margin-bottom: 0;
}

.adm-field-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border: none;
  border-radius: var(--radius-full, 9999px);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
}

.adm-field-info:hover,
.adm-field-info:focus-visible {
  color: var(--primary);
  background: rgba(0, 177, 63, 0.08);
  outline: none;
}

.adm-field-info .material-icons {
  font-size: 1.05rem;
}

.adm-field-info__tip {
  flex: 1 1 100%;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  padding: 0.45rem 0.6rem;
}

.adm-field__label .adm-hint {
  display: inline;
  margin: 0;
  font-size: inherit;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
}

.adm-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.4;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.adm-input:hover:not(:disabled):not(:focus) {
  border-color: rgba(0, 0, 0, 0.22);
}

.adm-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 177, 63, 0.18);
}

.adm-input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  background: var(--bg-secondary);
}

.adm-input--textarea {
  resize: vertical;
  min-height: 4.5rem;
}

.adm-input--select {
  cursor: pointer;
  appearance: none;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 12px;
}

.adm-input--checkbox {
  display: inline-block;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  padding: 0;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
  border: none;
  box-shadow: none;
}

.adm-input--checkbox:focus {
  outline: 2px solid rgba(0, 177, 63, 0.45);
  outline-offset: 2px;
  box-shadow: none;
}

.adm-subheading {
  margin: 1.25rem 0 0.65rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.adm-subsection {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.adm-subsection:last-child {
  border-bottom: none;
}

.adm-collapse-item {
  margin-bottom: 0.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
}

.adm-collapse-item__head {
  display: flex;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0.45rem 2.35rem 0.45rem 0.35rem;
  background: var(--bg-secondary);
  cursor: pointer;
  user-select: none;
  position: relative;
}

.adm-collapse-item__drag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  color: var(--text-secondary);
  cursor: grab;
  border-radius: var(--radius-md, 8px);
  touch-action: none;
}

.adm-collapse-item__drag:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.05);
}

.adm-collapse-item__drag:active {
  cursor: grabbing;
}

.adm-collapse-item__drag .material-icons {
  font-size: 1.25rem;
}

.adm-collapse-item--dragging {
  opacity: 0.55;
}

.adm-collapse-item--drop-before {
  box-shadow: inset 0 2px 0 var(--primary);
}

.adm-collapse-item--drop-after {
  box-shadow: inset 0 -2px 0 var(--primary);
}

.adm-collapse-item__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-md, 8px);
  flex-shrink: 0;
}

.adm-collapse-item__toggle:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

.adm-collapse-item__toggle .material-icons {
  font-size: 1.25rem;
}

.adm-collapse-item__summary {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adm-collapse-item__delete {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  border-radius: var(--radius-md, 8px);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.adm-collapse-item__delete:hover {
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.08);
}

.adm-collapse-item__delete:focus-visible {
  outline: 2px solid #b91c1c;
  outline-offset: 1px;
}

.adm-collapse-item__delete .material-icons {
  font-size: 1.125rem;
}

.adm-collapse-item__body {
  padding: 0.85rem 0.85rem 0.75rem;
  border-top: 1px solid var(--border);
}

.adm-collapse-item__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.adm-collapse-item--panel {
  margin-bottom: 0.75rem;
}

.adm-list-editor__row {
  padding: 0.85rem;
  margin-bottom: 0.65rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
}

.adm-list-editor__fields {
  display: grid;
  gap: 0.5rem;
}

.adm-list-editor__add {
  margin-top: 0.5rem;
}


.adm-image-upload__preview {
  margin-bottom: 0.5rem;
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
}

.adm-image-upload__img {
  max-width: 100%;
  max-height: 12rem;
  display: block;
}

.adm-form-editor {
  padding: 1.25rem 1.35rem 1.5rem;
}

.adm-form-editor .adm-subheading {
  margin: 0 0 0.85rem;
}

.adm-form-settings-block {
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.adm-form-settings-header {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.adm-form-settings-header .adm-subheading {
  margin: 0;
  flex-shrink: 0;
}

.adm-form-settings-header .adm-form-url-preview {
  margin: 0;
}

.adm-form-grid {
  display: grid;
  gap: 0.85rem 1rem;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
}

.adm-form-grid--wide {
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}

.adm-form-grid--full {
  grid-column: 1 / -1;
}

.adm-form-grid .adm-field {
  margin-bottom: 0;
}

.adm-field.adm-form-check {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  margin-bottom: 0;
}

/* Align checkbox row with labeled inputs in the same grid row */
.adm-field.adm-form-check::before {
  content: "\00a0";
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.3rem;
  visibility: hidden;
  user-select: none;
}

.adm-form-check-block .adm-form-check__label {
  width: auto;
  max-width: 100%;
}

.adm-form-check__label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.5rem 0.65rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  background: var(--bg-primary);
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.adm-form-check__label:hover {
  border-color: rgba(0, 0, 0, 0.22);
}

.adm-form-check__label:has(.adm-input--checkbox:focus) {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 177, 63, 0.18);
}

.adm-form-fields-section {
  margin-bottom: 0;
}

.adm-form-fields-heading {
  margin: 0 0 0.75rem;
}

.adm-form-fields-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.adm-form-fields-footer {
  display: flex;
  justify-content: flex-start;
  margin-top: 0.75rem;
}

.adm-form-field {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  background: var(--bg-secondary);
}

.adm-form-field__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.adm-form-field__title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.adm-form-field__actions {
  display: flex;
  gap: 0.35rem;
}

.adm-form-field .adm-form-grid {
  margin-bottom: 0;
}

.adm-form-options {
  margin-top: 0.85rem;
  margin-bottom: 0;
}

.adm-form-options.hidden {
  display: none;
}

.adm-form-file-settings.hidden {
  display: none;
}

.adm-file-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.adm-file-list li {
  margin-bottom: 0.25rem;
}

.adm-file-list a {
  font-weight: 500;
}

.adm-form-field [data-help-input].hidden,
.adm-form-field [data-info-content].hidden,
.adm-form-field [data-input-only].hidden,
.adm-form-field [data-translation-label].hidden {
  display: none;
}

.adm-form-url-preview {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.adm-form-url-preview code {
  font-size: 0.8125rem;
}

.adm-form-captcha-hint {
  margin: 0.35rem 0 0;
}

.adm-form-check__label--disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.adm-form-settings .adm-actions {
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}

.adm-submissions-actions {
  margin-bottom: 0.75rem;
}

.adm-table--submissions-summary .adm-submission-preview {
  min-width: 12rem;
}

.adm-submission-preview__line {
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-primary);
}

.adm-submission-preview__more {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-style: italic;
}

.adm-submission-row {
  cursor: pointer;
}

.adm-submission-detail-meta {
  margin-bottom: 1rem;
}

.adm-submission-detail-dl {
  margin: 0;
}

.adm-submission-detail-dl dt {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-top: 0.85rem;
}

.adm-submission-detail-dl dt:first-child {
  margin-top: 0;
}

.adm-submission-detail-dl dd {
  margin: 0.25rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.adm-table--submissions td {
  max-width: 14rem;
  overflow-wrap: anywhere;
}

.adm-tag--muted {
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

/* Dialog (new page, etc.) */
.adm-dialog {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.adm-dialog[hidden] {
  display: none !important;
}

.adm-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
}

.adm-dialog__panel {
  position: relative;
  width: min(32rem, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  padding: 1.25rem 1.5rem 1.5rem;
}

.adm-dialog__title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.adm-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.adm-fieldset {
  border: 0;
  margin: 0 0 1rem;
  padding: 0;
}

.adm-fieldset__legend {
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.adm-radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 0.9375rem;
  cursor: pointer;
}

.adm-menu-editor .adm-field {
  display: block;
  margin-bottom: 1rem;
}

.adm-menu-editor .adm-field__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-secondary);
}

.adm-menu-editor .adm-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.65rem;
  font-size: 0.9375rem;
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 0.375rem;
  font-family: inherit;
}

.adm-menu-editor .adm-field--inline {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.adm-menu-editor .adm-field--grow {
  flex: 2;
}

/* Menu editor */
.adm-menu-editor {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.adm-menu-item {
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 0.375rem;
  padding: 0.75rem;
  background: #fff;
}

.adm-menu-item--child {
  margin-top: 0.5rem;
  background: var(--bg-secondary, #f9fafb);
}

.adm-menu-item__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: flex-end;
}

.adm-menu-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex-shrink: 0;
}

.adm-menu-children {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-color, #e5e7eb);
}

.adm-menu-children > .adm-menu-add-child {
  margin-top: 0.5rem;
}

.adm-editor-revert-btn {
  margin-right: 0.35rem;
  cursor: pointer;
}

.adm-editor-revert-btn:hover:not(:disabled) {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}
