html.cms-auth-pending body,
html.cms-locked body {
  overflow: hidden;
}

html.cms-auth-pending::before {
  content: "";
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: #0a0b09;
}

.cms-auth-overlay {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #0a0b09;
  color: #f5f5ef;
}

.cms-auth-panel {
  width: min(440px, 100%);
  padding: 34px;
  border: 1px solid #34362f;
  border-radius: 7px;
  background: #11120f;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .42);
}

.cms-auth-panel > p {
  margin: 0 0 34px;
  color: #bdff00;
  font-size: 11px;
  font-weight: 800;
}

.cms-auth-panel h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: 0;
}

.cms-auth-panel > span {
  display: block;
  margin-top: 10px;
  color: #a9aca2;
  font-size: 13px;
  line-height: 1.7;
}

.cms-auth-panel form {
  margin-top: 28px;
  display: grid;
  gap: 12px;
}

.cms-auth-panel label {
  display: grid;
  gap: 8px;
  color: #cfd1ca;
  font-size: 11px;
}

.cms-auth-panel input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #464940;
  border-radius: 5px;
  outline: 0;
  background: #0a0b09;
  color: #fff;
  font: inherit;
}

.cms-auth-panel input:focus {
  border-color: #bdff00;
}

.cms-auth-panel button {
  min-height: 48px;
  border: 0;
  border-radius: 5px;
  background: #bdff00;
  color: #0a0b09;
  font-weight: 800;
  cursor: pointer;
}

.cms-auth-panel button:disabled {
  opacity: .5;
  cursor: wait;
}

.cms-auth-panel output {
  min-height: 20px;
  color: #ff9f87;
  font-size: 12px;
}

.cms-auth-panel > small {
  display: block;
  margin-top: 18px;
  color: #74786e;
  font-size: 10px;
}

.save-state[data-cms-state="saving"] { color: #746500; }
.save-state[data-cms-state="saved"] { color: #527000; }
.save-state[data-cms-state="published"] { color: #527000; font-weight: 800; }
.save-state[data-cms-state="error"] { color: #a32626; }

[data-cms-logout] {
  border-color: #c8cac2 !important;
  background: transparent !important;
}

.version-row[data-cms-version-id] {
  grid-template-columns: minmax(120px, .8fr) minmax(140px, 1fr) auto auto;
}

.cms-release-dialog {
  width: min(560px, calc(100% - 36px));
  padding: 30px;
  border: 1px solid #252720;
  border-radius: 7px;
  background: #f5f5f0;
  color: #10110e;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .34);
}

.cms-release-dialog::backdrop {
  background: rgba(7, 8, 6, .68);
  backdrop-filter: blur(4px);
}

.cms-release-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #cfd1c8;
  font-size: 10px;
  font-weight: 800;
}

.cms-release-meta span { color: #527000; }

.cms-release-dialog h2 {
  margin: 24px 0 8px;
  font-size: 28px;
  letter-spacing: 0;
}

.cms-release-dialog > p {
  margin: 0;
  color: #676a61;
  font-size: 13px;
}

.cms-release-dialog ol {
  margin: 22px 0 26px;
  padding: 0;
  list-style: none;
  border-top: 1px solid #d8dad2;
}

.cms-release-dialog li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid #d8dad2;
  font-size: 13px;
  line-height: 1.55;
}

.cms-release-dialog li::before {
  content: counter(list-item, decimal-leading-zero);
  color: #6e9600;
  font-size: 10px;
  font-weight: 800;
}

.cms-release-dialog > button {
  width: 100%;
  min-height: 48px;
  border: 1px solid #10110e;
  border-radius: 5px;
  background: #10110e;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.cms-release-dialog > button:hover { background: #bdff00; color: #10110e; }

.cms-version-preview {
  width: min(1500px, calc(100% - 32px));
  height: calc(100dvh - 32px);
  max-height: none;
  padding: 0;
  border: 1px solid #c8cac2;
  border-radius: 6px;
  background: #f5f5f0;
  color: #10110e;
}
.cms-version-preview[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.cms-version-preview::backdrop { background: rgba(7, 8, 6, .75); }
.cms-version-preview > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; border-bottom: 1px solid #c8cac2; }
.cms-version-preview header div { display: grid; gap: 4px; }
.cms-version-preview header strong { font-size: 16px; }
.cms-version-preview header span { font-size: 12px; color: #61645b; }
.cms-version-preview header button { width: 44px; height: 44px; flex: 0 0 44px; border: 1px solid #c8cac2; border-radius: 4px; background: #fff; font-size: 26px; cursor: pointer; }
.cms-version-preview iframe { width: 100%; height: 100%; border: 0; }
.cms-version-preview button:focus-visible { outline: 2px solid #527000; outline-offset: 3px; }

.admin-workspace :is(.field > span, .settings-status, .module-copy small,
  .home-project-links button, .home-tier-options button, .module-actions button,
  .version-row button, .team-avatar-buttons button, .project-switcher button) {
  font-size: 12px;
}
.admin-workspace .home-project-links,
.admin-workspace .module-actions { flex-wrap: wrap; }
.admin-workspace .team-avatar-buttons button { min-width: 0; padding: 5px 4px; overflow-wrap: anywhere; }
.admin-workspace .field :is(input, textarea, select) { font-size: 14px; }
.admin-workspace [data-cover-nudge]:disabled { opacity: .38; cursor: default; }
.admin-workspace :is(button, input, select, textarea):focus-visible { outline: 2px solid #617f00; outline-offset: 2px; }

@media (max-width: 700px) {
  .admin-workspace .field :is(input, textarea, select) { font-size: 16px; }
}

@media (max-width: 700px) {
  .cms-auth-panel { padding: 26px 22px; }
  .cms-release-dialog { padding: 24px 20px; }
  .cms-release-dialog h2 { font-size: 24px; }
  .version-row[data-cms-version-id] { grid-template-columns: 1fr auto; }
  .version-row[data-cms-version-id] strong { grid-column: 1 / -1; }
}
