@charset "UTF-8";
/* =============================================================================
   Login Page Styles
   ============================================================================= */
.app-scope.login-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(24px, 5vw, 56px) 16px;
  background: var(--studio-canvas);
  color: var(--studio-text);
}

.app-scope.login-page .login-form {
  width: 100%;
  max-width: 420px;
  padding: clamp(24px, 4vw, 32px);
  background: var(--studio-surface-solid);
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-panel);
  box-shadow: var(--studio-shadow-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.app-scope.login-page .cms-title {
  font-family: var(--font-heading);
  font-size: 22px;
  color: var(--studio-text);
  font-weight: 600;
  margin: 0 0 1.5rem;
  text-align: center;
}

.app-scope.login-page .logo {
  width: 76px;
  height: auto;
  margin-bottom: 1rem;
}

.app-scope.login-page form {
  width: 100%;
  gap: 10px;
}

.app-scope.login-page .field {
  margin-bottom: 0;
}

.app-scope.login-page .password-field input {
  padding-right: 54px;
}

.app-scope.login-page .password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--studio-radius-control);
  background: transparent;
  color: var(--studio-text-muted);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background var(--motion-duration-base) var(--motion-ease-standard), box-shadow var(--motion-duration-base) var(--motion-ease-standard), color var(--motion-duration-fast) var(--motion-ease-standard);
}

.app-scope.login-page .password-toggle::before {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: url("/assets/icons/eye.svg") center/contain no-repeat;
}

.app-scope.login-page .password-toggle.is-password-visible::before {
  mask-image: url("/assets/icons/eye-off.svg");
}

.app-scope.login-page .password-toggle:hover,
.app-scope.login-page .password-toggle:focus-visible {
  background: var(--studio-surface-solid);
  color: var(--studio-text);
  box-shadow: var(--studio-shadow-control);
}

.app-scope.login-page .password-toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent);
  outline-offset: 2px;
}

.app-scope.login-page .password-toggle__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.app-scope.login-page .error-message {
  width: 100%;
  min-height: 1rem;
  margin-top: 0.25rem;
  color: var(--color-error);
  font-size: 14px;
}

.app-scope.login-page .button.primary {
  box-shadow: var(--studio-shadow-control);
}

.app-scope.login-page .secondary-actions {
  width: 100%;
  margin-top: 1rem;
  text-align: center;
  display: grid;
  gap: 0.65rem;
  font-size: 14px;
}

.app-scope.login-page .secondary-actions a {
  color: var(--studio-text-muted);
  text-decoration: none;
  transition: color var(--motion-duration-fast) var(--motion-ease-standard), opacity var(--motion-duration-fast) var(--motion-ease-standard);
}

.app-scope.login-page .secondary-actions a:hover,
.app-scope.login-page .secondary-actions a:focus-visible {
  color: var(--studio-text);
  opacity: 1;
  outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent);
  outline-offset: 3px;
}

.app-scope.login-page .strategy-buttons {
  display: grid;
  gap: 8px;
  width: 100%;
}

.app-scope.login-page .strategy-label {
  color: var(--studio-text-muted);
  font-size: 13px;
}

.app-scope form:not(.step) {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.app-scope :where(input:not([type]),
input[type=text],
input[type=email],
input[type=password],
input[type=search],
input[type=url],
input[type=tel],
input[type=number],
textarea) {
  box-sizing: border-box;
  width: 100%;
  min-height: var(--studio-field-min-height);
  padding: 10px var(--studio-field-padding-x);
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-field-radius);
  background: var(--studio-surface-muted);
  color: var(--studio-text);
  box-shadow: none;
  font: inherit;
  line-height: 1.4;
  transition: background-color var(--motion-duration-base) var(--motion-ease-standard), border-color var(--motion-duration-base) var(--motion-ease-standard), box-shadow var(--motion-duration-base) var(--motion-ease-standard);
}

.app-scope textarea {
  min-height: 112px;
  resize: vertical;
}

.app-scope :where(input:not([type]),
input[type=text],
input[type=email],
input[type=password],
input[type=search],
input[type=url],
input[type=tel],
input[type=number],
textarea):hover:not(:disabled):not([readonly]) {
  border-color: var(--studio-border-strong);
}

.app-scope :where(input:not([type]),
input[type=text],
input[type=email],
input[type=password],
input[type=search],
input[type=url],
input[type=tel],
input[type=number],
textarea):focus {
  outline: none;
  border-color: transparent;
  background: var(--studio-surface-solid);
  box-shadow: none;
  border-color: var(--studio-border-strong);
}

.app-scope :where(input, textarea)::placeholder {
  color: var(--studio-text-muted);
  opacity: 0.8;
}

.app-scope :where(input, textarea):disabled,
.app-scope :where(input, textarea)[readonly] {
  cursor: not-allowed;
  opacity: 0.62;
}

.app-scope :where(input, textarea)[aria-invalid=true] {
  border-color: color-mix(in srgb, var(--color-error) 55%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-error) 14%, transparent);
}

.app-scope .form-field {
  display: grid;
  gap: var(--studio-field-gap);
  min-width: 0;
}

.media-storage-panel[aria-label]::after {
  content: none;
  display: none;
}

.app-scope .form-field > label,
.app-scope .form-field__label {
  color: var(--studio-text);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}

.app-scope .form-field__hint,
.app-scope .form-field__error,
.app-scope .form-status {
  min-height: 18px;
  color: var(--studio-text-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.app-scope .form-field__error,
.app-scope .form-status.is-error {
  color: var(--color-error);
}

.app-scope .form-choice {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--studio-text);
  font-size: 0.94rem;
  font-weight: 500;
  cursor: pointer;
}

.app-scope .form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.app-scope .form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.app-scope .field {
  position: relative;
  width: 100%;
}

.app-scope .field input,
.app-scope .field textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--studio-field-radius);
  border: 1px solid var(--studio-border);
  background-color: var(--studio-surface-muted);
  font-size: 15px;
  color: var(--studio-text);
  transition: border-color var(--motion-duration-base) var(--motion-ease-standard), box-shadow 0.2s ease, --user-color 5s;
  box-shadow: none;
}

.app-scope .field input:focus,
.app-scope .field textarea:focus {
  outline: none;
  border-color: transparent;
  box-shadow: var(--studio-focus-ring);
  background-color: var(--studio-surface-solid);
}

.app-scope .field label {
  position: absolute;
  top: 14px;
  left: 18px;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--studio-text-muted);
  pointer-events: none;
  font-size: 14px;
  transition: all 0.2s ease;
}

.app-scope .field input:not(:placeholder-shown) + label,
.app-scope .field input:focus + label,
.app-scope .field textarea:not(:placeholder-shown) + label,
.app-scope .field textarea:focus + label {
  top: -7px;
  left: 14px;
  font-size: 12px;
  color: var(--user-color);
  background: var(--studio-surface-solid);
  padding: 0 4px;
  font-weight: 500;
  transition: color 0.2s ease, --user-color 5s;
}

.app-scope form .button {
  margin-top: 4px;
}

.app-scope .form-actions .button {
  margin-top: 0;
}

.app-scope input[type=checkbox] {
  width: 16px;
  height: 16px;
  border: 1px solid var(--studio-border-strong);
  border-radius: 4px;
  background: var(--studio-surface-solid);
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  position: relative;
  flex: 0 0 16px;
}
.app-scope input[type=checkbox]:checked {
  background: var(--user-color, #007bff);
  border-color: var(--user-color, #007bff);
}
.app-scope input[type=checkbox]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 10px;
  font-weight: bold;
}
.app-scope input[type=checkbox]:hover {
  border-color: var(--user-color, #007bff);
}

.app-scope input[type=radio] {
  appearance: none;
  position: relative;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1px solid var(--studio-border-strong);
  border-radius: 50%;
  background: var(--studio-surface-solid);
  cursor: pointer;
}
.app-scope input[type=radio]:checked {
  border-color: var(--user-color);
  box-shadow: inset 0 0 0 4px var(--user-color);
}
.app-scope input[type=radio]:focus-visible {
  box-shadow: var(--studio-focus-ring);
}

.app-scope .form-switch {
  display: inline-grid;
  grid-template-columns: 38px minmax(0, auto);
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--studio-text);
  font-size: 0.94rem;
  font-weight: 500;
  cursor: pointer;
}

.app-scope .form-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.app-scope .form-switch__track {
  position: relative;
  width: 38px;
  height: 22px;
  border: 1px solid var(--studio-border-strong);
  border-radius: 999px;
  background: var(--studio-surface-muted);
  transition: background-color var(--motion-duration-fast) var(--motion-ease-standard), border-color var(--motion-duration-fast) var(--motion-ease-standard);
}

.app-scope .form-switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--studio-surface-solid);
  box-shadow: var(--studio-shadow-control);
  transition: transform var(--motion-duration-fast) var(--motion-ease-standard);
}

.app-scope .form-switch input:checked + .form-switch__track {
  border-color: var(--user-color);
  background: var(--user-color);
}

.app-scope .form-switch input:checked + .form-switch__track::after {
  transform: translateX(16px);
}

.app-scope .form-switch input:focus-visible + .form-switch__track {
  box-shadow: var(--studio-focus-ring);
}

.app-scope .form-switch input:disabled ~ * {
  cursor: not-allowed;
  opacity: 0.58;
}

@media (max-width: 680px) {
  .app-scope .form-row {
    grid-template-columns: minmax(0, 1fr);
  }
}
.app-scope.install-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(24px, 5vw, 56px) 16px;
  background: var(--studio-canvas);
  color: var(--studio-text);
}

.app-scope.install-page .login-form {
  max-width: 420px;
  background: var(--studio-surface-solid);
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-panel);
  box-shadow: var(--studio-shadow-soft);
}

.app-scope.install-page .cms-title {
  color: var(--studio-text);
}

.app-scope.install-page p {
  color: var(--studio-text-muted);
  text-align: center;
}

.install-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.install-steps li {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--studio-border-strong);
  opacity: 0.7;
}
.install-steps li.active {
  background: var(--user-color);
  opacity: 1;
  transform: scale(1.1);
}

.app-scope .step {
  display: none;
}

.app-scope form.step.active {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.app-scope .step.active:not(form) {
  display: block;
}

.login-form .actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

#siteForm .actions {
  width: 100%;
}

#siteForm .actions .button {
  flex: 1 1 140px;
}

.login-form .actions .button.primary {
  min-width: 140px;
}

.color-picker-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.color-picker-field label {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--studio-text-muted);
  font-size: 14px;
}

.app-scope form.step.active {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

body:has(> .admin-panel) {
  margin: 0;
  min-height: 100vh;
  background: var(--studio-canvas-subtle);
  color: var(--studio-text);
}

.main-content {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  background: transparent;
}

.main-content > #sidebar {
  position: relative;
  z-index: 20;
  flex-shrink: 0;
  overflow: visible;
}

#content[data-dashboard-layout=custom],
#content[data-dashboard-layout=custom] #adminGrid {
  background: transparent;
}

#adminGrid {
  --dashboard-columns: 12;
  --dashboard-grid-gap: clamp(14px, 2vw, 24px);
  --dashboard-snap-column: 1;
  --dashboard-snap-span: 12;
  min-height: 100vh;
  display: grid;
  grid-template-columns: repeat(var(--dashboard-columns), minmax(0, 1fr));
  grid-auto-flow: row dense;
  gap: var(--dashboard-grid-gap);
  align-items: start;
  align-content: start;
  padding: 0 0 clamp(56px, 6vw, 96px);
  scroll-margin-top: clamp(72px, 12vh, 128px);
  position: relative;
  background: var(--studio-canvas);
  overflow: visible;
}

#adminGrid:has(> .dashboard-widget[data-dashboard-slot=page]),
#adminGrid:has(> .dashboard-drop-placeholder[data-dashboard-slot=page]) {
  min-height: 0;
  padding-bottom: 0;
  overflow: hidden;
}

.main-content:has(#adminGrid > .dashboard-widget[data-dashboard-slot=page]),
.main-content:has(#adminGrid > .dashboard-drop-placeholder[data-dashboard-slot=page]) {
  min-height: 0;
}

.admin-panel:has(#content[data-dashboard-layout=fixed]) {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}
.admin-panel:has(#content[data-dashboard-layout=fixed]) > #top-header,
.admin-panel:has(#content[data-dashboard-layout=fixed]) > #main-header {
  flex: 0 0 auto;
}
.admin-panel:has(#content[data-dashboard-layout=fixed]) > .main-content {
  flex: 1 1 0;
  min-height: 0;
}
.admin-panel:has(#content[data-dashboard-layout=fixed]) #sidebar {
  min-height: 0;
}
.admin-panel:has(#content[data-dashboard-layout=fixed]) .sidebar {
  height: 100%;
  overflow: visible;
}
.admin-panel:has(#content[data-dashboard-layout=fixed]) .sidebar.settings-sidebar {
  overflow-y: auto;
}
.admin-panel:has(#content[data-dashboard-layout=fixed]) #content {
  min-height: 0;
  background: transparent;
}
.admin-panel:has(#content[data-dashboard-layout=fixed]) #adminGrid {
  flex: 1 1 0;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
  background: transparent;
}
.admin-panel:has(#content[data-dashboard-layout=fixed]) #adminGrid > .dashboard-widget[data-dashboard-slot=page] {
  height: 100%;
  min-height: 0;
  max-height: none;
}

body.has-content-footer .admin-panel #content[data-dashboard-layout=fixed] {
  padding-bottom: var(--studio-content-footer-height, 60px);
}

#adminGrid::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: calc((var(--dashboard-snap-column) - 1) * 100% / var(--dashboard-columns));
  width: calc(var(--dashboard-snap-span) * 100% / var(--dashboard-columns));
  border-radius: var(--studio-radius-panel);
  background: linear-gradient(180deg, color-mix(in srgb, var(--studio-border-strong) 12%, transparent), color-mix(in srgb, var(--studio-surface-solid) 20%, transparent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--studio-border-strong) 26%, transparent), 0 10px 30px color-mix(in srgb, var(--studio-border-strong) 12%, transparent);
  opacity: 0;
  pointer-events: none;
  transition: left var(--motion-duration-fast) var(--motion-ease-standard), width var(--motion-duration-fast) var(--motion-ease-standard), opacity var(--motion-duration-fast) var(--motion-ease-standard);
}

#adminGrid.is-dashboard-snap-active::after {
  opacity: 0.34;
}

#adminGrid.is-dashboard-snap-pulse::after {
  animation: dashboard-snap-pulse 240ms var(--motion-ease-standard);
}

#adminGrid > .dashboard-widget,
#adminGrid > .dashboard-drop-placeholder {
  position: relative;
  z-index: 1;
}

#adminGrid .dashboard-widget,
#adminGrid .dashboard-drop-placeholder {
  grid-column: 1/-1;
  min-height: var(--dashboard-min-height, 140px);
  height: var(--dashboard-height, auto);
  max-height: var(--dashboard-max-height, none);
}

#adminGrid .dashboard-drop-placeholder {
  min-height: var(--dashboard-placeholder-height, var(--dashboard-min-height, 140px));
  border: 1px dashed color-mix(in srgb, var(--studio-border-strong) 72%, transparent);
  border-radius: var(--studio-radius-panel);
  background: color-mix(in srgb, var(--studio-surface-solid) 72%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--studio-text) 7%, transparent), var(--studio-shadow-soft);
  pointer-events: none;
  transition: min-height var(--motion-duration-fast) var(--motion-ease-standard), opacity var(--motion-duration-fast) var(--motion-ease-standard);
}

.dashboard-drag-preview {
  position: fixed;
  z-index: 2200;
  left: 0;
  top: 0;
  box-sizing: border-box;
  width: min(var(--dashboard-preview-width, min(320px, 48vw)), 100vw - 24px);
  min-height: min(var(--dashboard-preview-height, 92px), 64vh);
  max-height: min(var(--dashboard-preview-height, 260px), 64vh);
  overflow: hidden;
  display: flex;
  align-items: stretch;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--studio-border-strong) 45%, transparent);
  border-radius: var(--studio-radius-panel);
  background: color-mix(in srgb, var(--studio-surface-solid) 92%, transparent);
  box-shadow: 0 18px 46px color-mix(in srgb, var(--studio-text) 13%, transparent), 0 8px 18px color-mix(in srgb, var(--studio-border-strong) 18%, transparent);
  color: var(--studio-text);
  font: inherit;
  pointer-events: none;
  opacity: 0.94;
  transform: translate3d(-9999px, -9999px, 0);
  transition: box-shadow var(--motion-duration-fast) var(--motion-ease-standard), opacity var(--motion-duration-fast) var(--motion-ease-standard);
  backdrop-filter: blur(18px);
}

.dashboard-drag-preview > * {
  min-width: 0;
  width: 100%;
}

.dashboard-drag-preview .widget-remove,
.dashboard-drag-preview .widget-resize,
.dashboard-drag-preview .widget-menu,
.dashboard-drag-preview .resize-handle {
  display: none !important;
}

.dashboard-drag-preview__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

#adminGrid .dashboard-widget.is-dragging {
  display: none;
}

@keyframes dashboard-snap-pulse {
  0% {
    opacity: 0.12;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--studio-border-strong) 12%, transparent), 0 0 0 color-mix(in srgb, var(--studio-border-strong) 0%, transparent);
  }
  45% {
    opacity: 0.5;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--studio-border-strong) 34%, transparent), 0 12px 32px color-mix(in srgb, var(--studio-border-strong) 16%, transparent);
  }
  100% {
    opacity: 0.34;
  }
}
#adminGrid .dashboard-widget[data-dashboard-height-mode=dynamic],
#adminGrid .dashboard-widget[data-dashboard-height-mode=auto],
#adminGrid .dashboard-drop-placeholder[data-dashboard-height-mode=dynamic],
#adminGrid .dashboard-drop-placeholder[data-dashboard-height-mode=auto] {
  height: auto;
}

#adminGrid .dashboard-widget[data-dashboard-height-mode=scroll] .canvas-item-content {
  overflow: auto;
}

#adminGrid .dashboard-widget[data-dashboard-slot=third],
#adminGrid .dashboard-drop-placeholder[data-dashboard-slot=third] {
  grid-column: span 4;
}

#adminGrid .dashboard-widget[data-dashboard-slot=half],
#adminGrid .dashboard-drop-placeholder[data-dashboard-slot=half] {
  grid-column: span 6;
}

#adminGrid .dashboard-widget[data-dashboard-slot=twoThird],
#adminGrid .dashboard-drop-placeholder[data-dashboard-slot=twoThird] {
  grid-column: span 8;
}

#adminGrid .dashboard-widget[data-dashboard-column],
#adminGrid .dashboard-drop-placeholder[data-dashboard-column] {
  grid-column: var(--dashboard-column-start, auto)/span var(--dashboard-column-span, 12);
}

#adminGrid .dashboard-widget[data-dashboard-slot=full],
#adminGrid .dashboard-widget[data-dashboard-slot=page],
#adminGrid .dashboard-drop-placeholder[data-dashboard-slot=full],
#adminGrid .dashboard-drop-placeholder[data-dashboard-slot=page] {
  grid-column: 1/-1;
}

#adminGrid .dashboard-widget[data-dashboard-slot=page],
#adminGrid .dashboard-drop-placeholder[data-dashboard-slot=page] {
  min-height: var(--dashboard-min-height, calc(100vh - clamp(120px, 16vh, 180px)));
}

@media (max-width: 1179px) {
  #adminGrid {
    --dashboard-columns: 6;
  }
  #adminGrid .dashboard-widget[data-dashboard-slot=third],
  #adminGrid .dashboard-widget[data-dashboard-slot=half],
  #adminGrid .dashboard-drop-placeholder[data-dashboard-slot=third],
  #adminGrid .dashboard-drop-placeholder[data-dashboard-slot=half] {
    grid-column: span 3;
  }
  #adminGrid .dashboard-widget[data-dashboard-slot=twoThird],
  #adminGrid .dashboard-widget[data-dashboard-slot=full],
  #adminGrid .dashboard-widget[data-dashboard-slot=page],
  #adminGrid .dashboard-drop-placeholder[data-dashboard-slot=twoThird],
  #adminGrid .dashboard-drop-placeholder[data-dashboard-slot=full],
  #adminGrid .dashboard-drop-placeholder[data-dashboard-slot=page] {
    grid-column: 1/-1;
  }
}
@media (max-width: 767px) {
  #adminGrid {
    --dashboard-columns: 1;
  }
  #adminGrid .dashboard-widget,
  #adminGrid .dashboard-drop-placeholder {
    grid-column: 1/-1;
  }
}
#content:has(#adminGrid[data-dashboard-layout=custom]) {
  container: dashboard-workspace/inline-size;
}

#adminGrid[data-dashboard-layout=custom] > .dashboard-widget {
  container: dashboard-widget/inline-size;
  min-width: 0;
}

@container dashboard-workspace (max-width: 1080px) {
  #adminGrid[data-dashboard-layout=custom] > .dashboard-widget,
  #adminGrid[data-dashboard-layout=custom] > .dashboard-drop-placeholder {
    grid-column: 1/-1;
  }
}
.resize-handle.br {
  position: absolute;
  width: 12px;
  height: 12px;
  bottom: 0;
  right: 0;
  cursor: se-resize;
  background: url("/assets/icons/move-diagonal-2.svg") no-repeat center;
}

.app-scope,
.app-scope * {
  scrollbar-width: thin;
  scrollbar-color: var(--studio-text-muted) transparent;
}

#content {
  position: relative;
  z-index: 0;
  overflow: auto;
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  margin-top: 0;
  background: var(--studio-canvas);
  box-shadow: none;
  border-radius: 0;
  transition: opacity var(--motion-duration-base) var(--motion-ease-standard), transform var(--motion-duration-base) var(--motion-ease-standard);
}

#content:has(#adminGrid > .dashboard-widget[data-dashboard-slot=page]),
#content:has(#adminGrid > .dashboard-drop-placeholder[data-dashboard-slot=page]) {
  overflow: hidden;
}

#content.is-content-refreshing {
  opacity: 0.78;
  transform: translateY(2px);
}

#content.is-content-ready {
  animation: studio-content-ready var(--motion-duration-slow) var(--motion-ease-standard);
}

@keyframes studio-content-ready {
  from {
    opacity: 0.86;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  #content,
  #content.is-content-refreshing,
  #content.is-content-ready {
    animation: none;
    opacity: 1;
    transform: none;
    transition: none;
  }
}
.canvas-grid,
.canvas-grid *,
.pixel-grid,
.pixel-grid * {
  box-sizing: content-box;
}

.canvas-grid,
.pixel-grid {
  min-height: 300px;
  position: relative;
  background: transparent;
  overflow-x: auto;
  overflow-y: visible;
  height: auto;
}

.canvas-grid {
  contain: layout size;
}

#adminGrid.canvas-grid {
  contain: none;
  overflow: visible;
}

#adminGrid.canvas-grid:has(> .dashboard-widget[data-dashboard-slot=page]),
#adminGrid.canvas-grid:has(> .dashboard-drop-placeholder[data-dashboard-slot=page]) {
  overflow: hidden;
}

.canvas-item {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  padding: 28px 22px 14px 22px;
  position: relative;
  background: var(--studio-surface);
  border-radius: var(--studio-radius-panel);
  transition: border-color var(--motion-duration-base) var(--motion-ease-standard), box-shadow var(--motion-duration-base) var(--motion-ease-standard), transform var(--motion-duration-base) var(--motion-ease-standard);
  backdrop-filter: blur(18px);
  box-shadow: var(--studio-shadow-lift);
  position: absolute;
  overflow: hidden;
  border: 1px solid var(--studio-border);
  will-change: transform;
  z-index: 0;
}

:where(#adminGrid) .canvas-item {
  background: var(--studio-surface-solid);
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-panel);
  box-shadow: var(--studio-shadow-soft);
  backdrop-filter: none;
}

#adminGrid .canvas-item {
  box-sizing: border-box;
  width: auto !important;
  min-height: var(--dashboard-min-height, 0);
  height: var(--dashboard-height, auto);
  max-height: var(--dashboard-max-height, none);
  position: relative;
  transform: none !important;
  will-change: auto;
}

#adminGrid .canvas-item[data-dashboard-height-mode=dynamic],
#adminGrid .canvas-item[data-dashboard-height-mode=auto] {
  height: auto;
}

#adminGrid .canvas-item[data-dashboard-height-mode=scroll] .canvas-item-content {
  overflow: auto;
}

#adminGrid.is-dashboard-dragging {
  cursor: grabbing;
}

#adminGrid.is-dashboard-dragging .dashboard-widget:not(.is-dragging) {
  transition: border-color var(--motion-duration-fast) var(--motion-ease-standard), box-shadow var(--motion-duration-fast) var(--motion-ease-standard), transform var(--motion-duration-fast) var(--motion-ease-standard);
}

.canvas-item:before {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  border-radius: var(--studio-radius-control);
  background-color: color-mix(in srgb, var(--studio-text) 14%, transparent);
  cursor: move;
  opacity: 0;
  pointer-events: none;
  touch-action: none;
}

.canvas-item.dragging {
  transition: none !important;
  box-shadow: none !important;
  filter: none !important;
  will-change: transform;
}

.canvas-item-content {
  width: 100%;
  height: 100%;
}

#adminGrid .canvas-item-content {
  min-height: 100%;
}

.canvas-item .widget-remove,
.canvas-item .widget-resize,
.canvas-item .widget-menu {
  display: none;
  opacity: 0;
  pointer-events: none;
}

body.dashboard-edit-mode .canvas-item {
  border-color: var(--studio-border);
  outline: 1px solid transparent;
  outline-offset: -1px;
  transition: border-color var(--motion-duration-base) var(--motion-ease-standard), box-shadow var(--motion-duration-fast) var(--motion-ease-standard), outline-color var(--motion-duration-base) var(--motion-ease-standard), transform var(--motion-duration-base) var(--motion-ease-standard);
}

body.dashboard-edit-mode .canvas-item:before {
  opacity: 0.45;
  pointer-events: all;
}

body.dashboard-edit-mode .canvas-item .widget-remove,
body.dashboard-edit-mode .canvas-item .widget-resize,
body.dashboard-edit-mode .canvas-item .widget-menu {
  display: block;
}

body.dashboard-edit-mode .canvas-item-content {
  pointer-events: none;
}

body.dashboard-edit-mode .canvas-item.overflow .canvas-item-content,
body.dashboard-edit-mode .canvas-item .canvas-item-content.overflow {
  pointer-events: auto;
}

.canvas-item.overflow {
  overflow: auto;
}

body.dashboard-edit-mode .canvas-item .widget-remove {
  position: absolute;
  top: 2px;
  left: 2px;
  background: transparent;
  border: none;
  padding: 2px;
  cursor: pointer;
  z-index: 1000;
  transition: opacity var(--motion-duration-base) var(--motion-ease-standard);
}

body.dashboard-edit-mode .canvas-item .widget-resize {
  position: absolute;
  top: 2px;
  right: 26px;
  background: transparent;
  border: none;
  padding: 2px;
  cursor: pointer;
  z-index: 1000;
  transition: opacity var(--motion-duration-base) var(--motion-ease-standard);
}

body.dashboard-edit-mode .canvas-item.dragging .widget-remove,
body.dashboard-edit-mode .canvas-item.selected .widget-remove,
body.dashboard-edit-mode .canvas-item.is-dragging .widget-remove,
body.dashboard-edit-mode .canvas-item.dragging .widget-resize,
body.dashboard-edit-mode .canvas-item.selected .widget-resize,
body.dashboard-edit-mode .canvas-item.is-dragging .widget-resize,
body.dashboard-edit-mode .canvas-item.dragging .widget-menu,
body.dashboard-edit-mode .canvas-item.selected .widget-menu,
body.dashboard-edit-mode .canvas-item.is-dragging .widget-menu {
  opacity: 1;
  pointer-events: auto;
}

body.dashboard-edit-mode .canvas-item:not(.dragging):not(.selected):not(.is-dragging):hover .widget-remove,
body.dashboard-edit-mode .canvas-item:not(.dragging):not(.selected):not(.is-dragging):hover .widget-resize,
body.dashboard-edit-mode .canvas-item:not(.dragging):not(.selected):not(.is-dragging):hover .widget-menu {
  opacity: 0;
  pointer-events: none;
}

body.dashboard-edit-mode .canvas-item.selected {
  outline-color: var(--studio-border-strong);
  box-shadow: var(--studio-shadow-soft);
}

body.dashboard-edit-mode .canvas-item[data-global=true].dragging,
body.dashboard-edit-mode .canvas-item[data-global=true].selected {
  outline-color: var(--shared-widget-color, #d4af37);
}

body.dashboard-edit-mode .canvas-item.dragging,
body.dashboard-edit-mode .canvas-item.is-dragging {
  outline-color: var(--studio-border-strong);
  box-shadow: var(--studio-shadow-lift);
}

body.dashboard-edit-mode .canvas-item:not(.dragging):not(.selected):not(.is-dragging):hover {
  border-color: var(--studio-border-strong);
  outline-color: var(--studio-border-strong);
  box-shadow: var(--studio-shadow-soft);
}

/* =============================================================================
   Fonts
   ============================================================================= */
/* HarmonyOS Sans is hosted unmodified from the vendor package; keep its
   license notice next to the files when updating these sources. */
@font-face {
  font-family: "HarmonyOS Sans";
  src: url("/assets/fonts/HarmonyOS_Sans_Thin.ttf") format("truetype");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "HarmonyOS Sans";
  src: url("/assets/fonts/HarmonyOS_Sans_Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "HarmonyOS Sans";
  src: url("/assets/fonts/HarmonyOS_Sans_Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "HarmonyOS Sans";
  src: url("/assets/fonts/HarmonyOS_Sans_Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "HarmonyOS Sans";
  src: url("/assets/fonts/HarmonyOS_Sans_Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "HarmonyOS Sans";
  src: url("/assets/fonts/HarmonyOS_Sans_Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "HarmonyOS Sans";
  src: url("/assets/fonts/HarmonyOS_Sans_Thin_Italic.ttf") format("truetype");
  font-weight: 100;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "HarmonyOS Sans";
  src: url("/assets/fonts/HarmonyOS_Sans_Light_Italic.ttf") format("truetype");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "HarmonyOS Sans";
  src: url("/assets/fonts/HarmonyOS_Sans_Regular_Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "HarmonyOS Sans";
  src: url("/assets/fonts/HarmonyOS_Sans_Medium_Italic.ttf") format("truetype");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "HarmonyOS Sans";
  src: url("/assets/fonts/HarmonyOS_Sans_Bold_Italic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "HarmonyOS Sans";
  src: url("/assets/fonts/HarmonyOS_Sans_Black_Italic.ttf") format("truetype");
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Variable";
  src: url("/assets/fonts/NotoSans-VariableFont_wdth,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-stretch: 75% 100%;
  font-style: normal;
}
@font-face {
  font-family: "Noto Sans Variable";
  src: url("/assets/fonts/NotoSans-Italic-VariableFont_wdth,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-stretch: 75% 100%;
  font-style: italic;
}
@font-face {
  font-family: "Open Sans Variable";
  src: url("/assets/fonts/OpenSans-VariableFont_wdth,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-stretch: 75% 100%;
  font-style: normal;
}
@font-face {
  font-family: "Open Sans Variable";
  src: url("/assets/fonts/OpenSans-Italic-VariableFont_wdth,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-stretch: 75% 100%;
  font-style: italic;
}
/* ================================
 Google Fonts imports (zentral)
 ================================ */
/* Google fonts are loaded dynamically when the provider is enabled. */
/* =============================================================================
   Global Variables (Branding)
   ============================================================================= */
:root {
  color-scheme: light dark;
  --color-bg: #ffffff;
  --color-secondary-light: #F5F5F5;
  --color-text: #222222;
  --color-white: #FFFFFF;
  --color-white-dark: #F7F7F7;
  --color-border: #e5e7eb;
  --accent-h: 0;
  --accent-s: 0%;
  --accent-l: 9%;
  --accent-dark-l: 92%;
  --accent-contrast: #ffffff;
  --accent-dark-contrast: #171717;
  --user-color: hsl(var(--accent-h), var(--accent-s), var(--accent-l));
  --color-primary: var(--user-color);
  --color-primary-contrast: var(--accent-contrast);
  --brand: var(--color-primary);
  --brand-2: var(--color-primary);
  --color-card: #ffffff;
  --color-dark: #111827;
  --color-error: #d93025;
  --color-success: #16835a;
  --color-warning: #a15c08;
  --color-info: #2563eb;
  --gradient-primary: linear-gradient(
    180deg,
    hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.12) 0%,
    hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.04) 100%
  );
  --shared-widget-color: #d4af37;
  --shadow-card: 0 1px 28px rgba(0,0,0,0.07);
  --shadow-default: 0px 0px 0px 1px rgba(64, 87, 109, .04), 0px 6px 20px -4px rgba(64, 87, 109, .3);
  --studio-canvas: #ffffff;
  --studio-canvas-subtle: #fbfbfc;
  --studio-surface: rgba(255, 255, 255, 0.92);
  --studio-surface-solid: #ffffff;
  --studio-surface-muted: #f6f7f8;
  --studio-text: #1f2933;
  --studio-icon-filter: none;
  --studio-text-muted: rgba(31, 41, 51, 0.58);
  --studio-border: rgba(17, 24, 39, 0.08);
  --studio-border-strong: rgba(17, 24, 39, 0.14);
  --studio-radius-control: 999px;
  --studio-radius-panel: 18px;
  --studio-control-size: 40px;
  --studio-field-radius: 12px;
  --studio-field-min-height: 44px;
  --studio-field-padding-x: 14px;
  --studio-field-gap: 7px;
  --studio-header-search-open-width: 240px;
  --studio-inline-create-width: 452px;
  --studio-inline-create-gap: 8px;
  --studio-inline-create-padding: 0;
  --studio-inline-create-surface: var(--studio-surface-solid);
  --studio-inline-create-input-surface: var(--studio-surface-muted);
  --studio-inline-create-border: var(--studio-border);
  --studio-inline-create-shadow: var(--studio-shadow-control);
  --studio-inline-create-panel-shadow: none;
  --studio-shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.04), 0 14px 36px rgba(15, 23, 42, 0.06);
  --studio-shadow-lift: 0 1px 1px rgba(15, 23, 42, 0.03), 0 22px 50px rgba(15, 23, 42, 0.08);
  --studio-shadow-control: 0 1px 2px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.10);
  --studio-focus-ring: 0 0 0 3px color-mix(in srgb, var(--user-color) 24%, transparent);
  --motion-duration-fast: 140ms;
  --motion-duration-base: 220ms;
  --motion-duration-slow: 320ms;
  --motion-ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --motion-ease-enter: cubic-bezier(0, 0, 0, 1);
  --motion-ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --font-body: 'HarmonyOS Sans', 'Noto Sans Variable', system-ui, sans-serif;
  --font-heading: var(--font-body);
  --font-mono: monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --color-bg: #1a1a1a;
    --color-secondary-light: #2a2a2a;
    --color-text: #f0f0f0;
    --user-color: hsl(var(--accent-h), var(--accent-s), var(--accent-dark-l));
    --color-primary-contrast: var(--accent-dark-contrast);
    --brand: var(--color-primary);
    --brand-2: var(--color-primary);
    --color-card: #2a2a2a;
    --color-dark: #f0f0f0;
    --color-error: #f28b82;
    --color-success: #52d6a0;
    --color-warning: #f5b94c;
    --color-info: #8bbcff;
    --gradient-primary: linear-gradient(
      180deg,
      hsla(var(--accent-h), var(--accent-s), calc(var(--accent-l) * 0.8), 0.20) 0%,
      hsla(var(--accent-h), var(--accent-s), calc(var(--accent-l) * 0.8), 0.06) 100%
    );
    --color-border: #333333;
    --studio-canvas: #151515;
    --studio-canvas-subtle: #1d1d1d;
    --studio-surface: rgba(35, 35, 35, 0.9);
    --studio-surface-solid: #242424;
    --studio-surface-muted: #2a2a2a;
    --studio-text: #f0f0f0;
    --studio-icon-filter: brightness(0) invert(1);
    --studio-text-muted: rgba(240, 240, 240, 0.62);
    --studio-border: rgba(255, 255, 255, 0.09);
    --studio-border-strong: rgba(255, 255, 255, 0.16);
    --studio-shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.22), 0 14px 36px rgba(0, 0, 0, 0.24);
    --studio-shadow-lift: 0 1px 1px rgba(0, 0, 0, 0.2), 0 22px 50px rgba(0, 0, 0, 0.28);
    --studio-shadow-control: 0 1px 2px rgba(0, 0, 0, 0.36), 0 4px 12px rgba(0, 0, 0, 0.34);
  }
}
:root[data-theme=light] {
  color-scheme: light;
}

:root[data-theme=dark] {
  color-scheme: dark;
  --color-bg: #1a1a1a;
  --color-secondary-light: #2a2a2a;
  --color-text: #f0f0f0;
  --user-color: hsl(var(--accent-h), var(--accent-s), var(--accent-dark-l));
  --color-primary-contrast: var(--accent-dark-contrast);
  --brand: var(--color-primary);
  --brand-2: var(--color-primary);
  --color-card: #2a2a2a;
  --color-dark: #f0f0f0;
  --color-error: #f28b82;
  --color-success: #52d6a0;
  --color-warning: #f5b94c;
  --color-info: #8bbcff;
  --gradient-primary: linear-gradient(
    180deg,
    hsla(var(--accent-h), var(--accent-s), calc(var(--accent-l) * 0.8), 0.20) 0%,
    hsla(var(--accent-h), var(--accent-s), calc(var(--accent-l) * 0.8), 0.06) 100%
  );
  --color-border: #333333;
  --studio-canvas: #151515;
  --studio-canvas-subtle: #1d1d1d;
  --studio-surface: rgba(35, 35, 35, 0.9);
  --studio-surface-solid: #242424;
  --studio-surface-muted: #2a2a2a;
  --studio-text: #f0f0f0;
  --studio-icon-filter: brightness(0) invert(1);
  --studio-text-muted: rgba(240, 240, 240, 0.62);
  --studio-border: rgba(255, 255, 255, 0.09);
  --studio-border-strong: rgba(255, 255, 255, 0.16);
  --studio-shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.22), 0 14px 36px rgba(0, 0, 0, 0.24);
  --studio-shadow-lift: 0 1px 1px rgba(0, 0, 0, 0.2), 0 22px 50px rgba(0, 0, 0, 0.28);
  --studio-shadow-control: 0 1px 2px rgba(0, 0, 0, 0.36), 0 4px 12px rgba(0, 0, 0, 0.34);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-duration-fast: 1ms;
    --motion-duration-base: 1ms;
    --motion-duration-slow: 1ms;
  }
}
/* =============================================================================
   Global Styles (ohne Login-spezifischen Kram)
   ============================================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Default font for all body text */
body {
  font-family: var(--font-body);
  color: var(--color-text);
}

.widget-container.admin-widget.loading,
canvas-item.loading {
  opacity: 0;
}

.widget-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--color-text);
  background: var(--color-secondary-light);
  opacity: 0.6;
}

.canvas-item.loading {
  background: var(--color-secondary-light);
}

/* Canvas grid relies on content-box sizing. Reset inside its container */
/* Basic Text Styles */
h1,
h2,
h3 {
  font-family: var(--font-heading);
  margin: 0 0 16px;
  color: var(--color-text);
}

h1 {
  font-size: 36px;
  font-weight: 700;
}

h2 {
  font-size: 28px;
  font-weight: 600;
}

h3 {
  font-size: 24px;
  font-weight: 600;
}

p {
  margin: 0 0 16px;
}

/* External links are marked by the shared link enhancer after origin checks. */
.app-scope a[data-external-link=true] {
  text-decoration: none;
}

.app-scope a[data-external-link=true]::after {
  content: "↗";
  display: inline-block;
  margin-left: 0.28em;
  font-size: 0.78em;
  line-height: 1;
  opacity: 0.7;
  transform: translateY(-0.08em);
  transition: opacity var(--motion-duration-base) var(--motion-ease-standard);
}

.app-scope a[data-external-link=true]:hover::after,
.app-scope a[data-external-link=true]:focus-visible::after {
  opacity: 1;
}

/* Remove default focus outline for better custom focus styles */
*:focus-visible {
  outline: none;
}

.dev-mode-banner {
  position: fixed;
  bottom: 8px;
  left: 8px;
  background: rgba(255, 0, 0, 0.1);
  color: #c00;
  padding: 2px 6px;
  font-size: 12px;
  border-radius: 4px;
  z-index: 9999;
  pointer-events: none;
}

body.has-content-footer .dev-mode-banner {
  bottom: calc(var(--studio-content-footer-height, 60px) + 8px);
}

/* Restrict admin widget hover and drag handle to dashboard edit mode */
body.dashboard-edit-mode .widget-container.admin-widget:hover,
body.dashboard-edit-mode canvas-item:hover {
  box-shadow: var(--studio-shadow-soft);
}

body:not(.dashboard-edit-mode) .widget-container.admin-widget:hover,
body:not(.dashboard-edit-mode) canvas-item:hover {
  box-shadow: var(--studio-shadow-soft);
}

body.dashboard-edit-mode .widget-container.admin-widget::before {
  display: block;
}

body.dashboard-edit-mode canvas-item::before,
body.dashboard-edit-mode .canvas-item::before {
  display: none !important;
}

body:not(.dashboard-edit-mode) .widget-container.admin-widget::before,
body:not(.dashboard-edit-mode) canvas-item::before,
body:not(.dashboard-edit-mode) .canvas-item::before {
  display: none;
}

/* ===== Global Buttons ===== */
:root {
  --btn-radius: var(--studio-radius-control);
  --btn-h: var(--studio-control-size);
  --btn-gap: 8px;
  --btn-shadow: var(--studio-shadow-soft);
  --btn-hover-shadow: var(--studio-shadow-control);
  --btn-hover-delay: 80ms;
}

/* Base */
.app-scope .button {
  --bg: var(--color-card);
  --fg: var(--color-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--btn-gap);
  height: var(--btn-h);
  padding: 0 16px;
  border-radius: var(--btn-radius);
  border: 0;
  min-width: 120px;
  background: var(--bg);
  color: var(--fg);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  transition: filter var(--motion-duration-fast) var(--motion-ease-standard), box-shadow var(--motion-duration-slow) var(--motion-ease-standard) var(--btn-hover-delay), background var(--motion-duration-slow) var(--motion-ease-standard) var(--btn-hover-delay), color var(--motion-duration-slow) var(--motion-ease-standard) var(--btn-hover-delay);
}

.app-scope .button:disabled,
.app-scope .button[aria-disabled=true] {
  opacity: 0.6;
  filter: saturate(0.8) brightness(0.96);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Focus */
.app-scope .button:not(.text),
.app-scope .icon-button {
  text-decoration: none;
}

.app-scope .button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent);
  outline-offset: 2px;
}

.app-scope .button.ghost:focus-visible,
.app-scope .button.outline:focus-visible {
  outline-color: color-mix(in srgb, var(--brand) 60%, transparent);
}

/* Variants */
.app-scope .button.primary {
  --bg: var(--color-primary);
  --fg: var(--color-primary-contrast);
  box-shadow: var(--btn-shadow);
}

.app-scope .button.primary:disabled {
  filter: saturate(0.85) brightness(0.95);
  opacity: 0.75;
  box-shadow: none;
}

.app-scope .button.ghost {
  --bg: var(--studio-surface-solid);
  --fg: var(--studio-text);
  box-shadow: none;
}

.app-scope .button.secondary {
  --bg: var(--studio-surface-muted);
  --fg: var(--studio-text);
  box-shadow: inset 0 0 0 1px var(--studio-border);
}

.app-scope .button.outline {
  --bg: transparent;
  --fg: var(--brand);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 45%, var(--studio-border));
}

.app-scope .button.text {
  --bg: transparent;
  --fg: var(--brand);
  height: auto;
  line-height: normal;
  padding: 4px 6px;
}

/* Danger */
.app-scope .button.danger {
  --bg: linear-gradient(180deg,#ff5a5a,#e33a3a);
  --fg:#fff;
  box-shadow: var(--btn-shadow);
}

.app-scope .button.danger:not(:disabled):hover {
  filter: brightness(0.97) saturate(1.05);
}

/* Hover micro-interaction: barely-there motion, no layout shift. */
.app-scope .button:not(:disabled):hover {
  filter: brightness(0.99) saturate(1.02);
  box-shadow: var(--btn-hover-shadow);
}

.app-scope .button:not(:disabled):active {
  filter: brightness(0.97) saturate(1.01);
}

.app-scope .button.ghost:not(:disabled):hover,
.app-scope .button.ghost:not(:disabled):active {
  box-shadow: none;
}

/* Sizes */
.app-scope .button.sm {
  --btn-h: 34px;
  padding: 0 12px;
  font-weight: 600;
}

.app-scope .button.lg {
  --btn-h: 48px;
  padding: 0 20px;
}

.app-scope .button.block {
  width: 100%;
  min-width: 0;
}

/* Icon support */
.app-scope .button .icon {
  display: inline-flex;
  width: 1.1em;
  height: 1.1em;
  line-height: 0;
}

.app-scope .button .icon + span,
.app-scope .button span + .icon {
  margin-left: 0;
}

/* Compact icon actions reuse the floating language of the dashboard chrome. */
.app-scope :where(.icon-button,
.page-action-button,
.page-list-home-button,
.page-list-toggle) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: var(--studio-radius-control);
  background: var(--studio-surface-solid);
  color: var(--studio-text);
  box-shadow: var(--studio-shadow-control);
  cursor: pointer;
  transition: background-color var(--motion-duration-fast) var(--motion-ease-standard), box-shadow var(--motion-duration-base) var(--motion-ease-standard);
}

.app-scope :where(.icon-button,
.page-action-button,
.page-list-home-button,
.page-list-toggle):hover:not(:disabled) {
  background: var(--studio-surface-muted);
  box-shadow: var(--studio-shadow-lift);
}

.app-scope :where(.icon-button,
.page-action-button,
.page-list-home-button,
.page-list-toggle):focus-visible {
  outline: none;
  box-shadow: var(--studio-focus-ring), var(--studio-shadow-control);
}

.app-scope :where(.icon-button,
.page-action-button,
.page-list-home-button,
.page-list-toggle):disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.app-scope :where(.icon-button,
.page-action-button,
.page-list-home-button,
.page-list-toggle) img {
  display: block;
  width: 17px;
  height: 17px;
}

.app-scope .icon-button.lg {
  flex-basis: var(--studio-control-size);
  width: var(--studio-control-size);
  height: var(--studio-control-size);
}

.app-scope .page-action-button.delete-page:hover:not(:disabled) {
  color: var(--color-error);
  background: color-mix(in srgb, var(--color-error) 8%, var(--studio-surface-solid));
}

/* Loading state */
.app-scope .button.is-loading {
  pointer-events: none;
  position: relative;
  color: transparent;
}

.app-scope .button.is-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--fg) 30%, transparent);
  border-top-color: var(--fg);
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/* Button group */
.app-scope .button-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .app-scope .button {
    transition: none;
  }
  .app-scope .button.is-loading::after {
    animation: none;
  }
}
/* =============================================================================
   components/_dashboard-dialog.scss - Shared dashboard modal and prompts
   ============================================================================= */
.bp-dialog-root {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 48px);
  background: color-mix(in srgb, var(--studio-canvas) 72%, transparent);
  backdrop-filter: blur(18px);
  opacity: 0;
  transition: opacity var(--motion-duration-base) var(--motion-ease-standard);
}

.bp-dialog-root.is-open {
  opacity: 1;
}

.bp-dialog {
  width: min(520px, 100%);
  max-height: min(680px, 100vh - 48px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-panel);
  background: var(--studio-surface);
  color: var(--studio-text);
  box-shadow: var(--studio-shadow-lift);
  backdrop-filter: blur(20px);
  transform: translateY(8px) scale(0.98);
  transition: transform var(--motion-duration-base) var(--motion-ease-enter), opacity var(--motion-duration-base) var(--motion-ease-standard);
}

.bp-dialog-root.is-open .bp-dialog {
  transform: translateY(0) scale(1);
}

.bp-dialog__header,
.bp-dialog__body,
.bp-dialog__actions {
  min-width: 0;
}

.bp-dialog__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 20px;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: 0;
  color: var(--studio-text);
}

.bp-dialog__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
}

.bp-dialog__message,
.bp-dialog__custom-body p {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--studio-text-muted);
}

.bp-dialog__field {
  display: grid;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--studio-text);
}

.bp-dialog__input {
  width: 100%;
  min-height: var(--studio-control-size);
  padding: 0 14px;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-field-radius);
  background: var(--studio-surface-solid);
  color: var(--studio-text);
  font: inherit;
  font-weight: 500;
  transition: border-color var(--motion-duration-base) var(--motion-ease-standard), box-shadow var(--motion-duration-base) var(--motion-ease-standard), background var(--motion-duration-base) var(--motion-ease-standard);
}

textarea.bp-dialog__input {
  min-height: 112px;
  padding: 12px 14px;
  border-radius: var(--studio-radius-panel);
  resize: vertical;
}

.bp-dialog__input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--user-color) 36%, var(--studio-border));
  box-shadow: var(--studio-focus-ring);
  background: var(--studio-surface-solid);
}

.bp-dialog__error {
  margin: -4px 0 0;
  color: var(--color-error);
  font-size: 12px;
  line-height: 1.4;
}

.bp-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.bp-dialog__actions .button {
  min-width: 104px;
}

@media (max-width: 560px) {
  .bp-dialog-root {
    align-items: end;
    padding: 16px;
  }
  .bp-dialog {
    width: 100%;
    padding: 20px;
  }
  .bp-dialog__actions {
    justify-content: stretch;
  }
  .bp-dialog__actions .button {
    flex: 1 1 0;
    min-width: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bp-dialog-root,
  .bp-dialog {
    transition: none;
  }
  .bp-dialog {
    transform: none;
  }
}
.custom-select__native {
  display: none !important;
}

.custom-select {
  --custom-select-control-h: var(--studio-control-size, 40px);
  --custom-select-radius: var(--studio-radius-control, 999px);
  --custom-select-source-width: auto;
  position: relative;
  display: inline-grid;
  width: var(--custom-select-source-width);
  min-width: min(220px, 100%);
  max-width: 100%;
  color: var(--studio-text, var(--color-text));
  font-family: var(--font-body);
  font-size: 0.94rem;
}

.app-scope .field .custom-select,
.app-scope .form-field .custom-select,
.app-scope .custom-select[data-full-width=true] {
  width: 100%;
}

.custom-select .display {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: var(--custom-select-control-h);
  padding: 0 14px 0 18px;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-field-radius, var(--custom-select-radius));
  background: var(--studio-surface-solid);
  color: inherit;
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color var(--motion-duration-base) var(--motion-ease-standard), box-shadow var(--motion-duration-base) var(--motion-ease-standard), transform var(--motion-duration-base) var(--motion-ease-standard), background-color var(--motion-duration-base) var(--motion-ease-standard);
}

.custom-select .display:hover,
.custom-select.open .display {
  background: var(--studio-surface-solid);
  border-color: var(--studio-border-strong);
}

/* The field already has a visible label. The global floating-label helper is
   intended for icon actions and would otherwise widen every select by the
   generated aria-label tooltip. */
.custom-select .display[aria-label]::after {
  content: none;
  display: none;
}

.custom-select .display:focus-visible {
  outline: none;
  border-color: transparent;
  box-shadow: var(--studio-focus-ring);
}

.custom-select.is-disabled {
  opacity: 0.6;
}

.custom-select.is-disabled .display {
  cursor: not-allowed;
  transform: none;
}

.custom-select__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select__chevron {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background: currentColor;
  opacity: 0.7;
  mask: url("/assets/icons/chevron-down.svg") center/contain no-repeat;
  transform-origin: center;
  transition: opacity var(--motion-duration-base) var(--motion-ease-standard), transform var(--motion-duration-base) var(--motion-ease-standard);
}

.custom-select.open .custom-select__chevron {
  opacity: 0.9;
  transform: rotate(180deg);
}

.custom-select .options {
  box-sizing: border-box;
  position: absolute;
  z-index: 1000;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  min-width: 100%;
  max-height: min(280px, 48vh);
  padding: 6px;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-field-radius, var(--studio-radius-panel));
  background: var(--studio-surface-solid);
  box-shadow: var(--studio-shadow-lift);
  opacity: 0;
  pointer-events: none;
  overflow: auto;
  transform: translateY(-4px);
  transform-origin: top center;
  transition: opacity var(--motion-duration-fast) var(--motion-ease-standard), transform var(--motion-duration-fast) var(--motion-ease-standard);
}

.custom-select.open .options {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.custom-select .option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background-color var(--motion-duration-fast) var(--motion-ease-standard), color var(--motion-duration-fast) var(--motion-ease-standard);
}

.custom-select .option:hover,
.custom-select .option:focus-visible,
.custom-select .option[aria-selected=true] {
  outline: none;
  background: var(--studio-surface-muted);
}

.custom-select .option:disabled,
.custom-select .option.disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

@media (prefers-reduced-motion: reduce) {
  .custom-select .display,
  .custom-select__chevron,
  .custom-select .options,
  .custom-select .option {
    transition: none;
  }
  .custom-select .display:hover,
  .custom-select.open .display,
  .custom-select .options,
  .custom-select.open .options {
    transform: none;
  }
}
.color-picker {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  height: auto;
  position: relative;
  min-width: 0;
  color: var(--studio-text);
  font: inherit;
  box-sizing: border-box;
}
.color-picker [hidden], .color-picker .hidden {
  display: none !important;
}
.color-picker [aria-label]:not(.cp-color-area)::after {
  content: none !important;
}
.color-picker > div {
  min-width: 0;
}
.color-picker .color-search {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.color-picker .color-input-error {
  margin: 0;
  color: var(--color-error);
  font-size: 12px;
}
.color-picker .show-more {
  align-self: flex-start;
  margin-top: 8px;
}
.color-picker button:focus-visible, .color-picker input:focus-visible, .color-picker .cp-color-area:focus-visible {
  outline: 2px solid var(--studio-text);
  outline-offset: 3px;
}
.color-picker .color-section {
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  justify-items: center;
}
.color-picker .color-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--color-border);
  padding: 0;
  background: none;
}
.color-picker .color-circle.active {
  outline: 2px solid var(--studio-text);
  outline-offset: 3px;
  border-color: var(--studio-surface-solid);
}
.color-picker .color-circle.add-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--studio-surface-solid);
  border: 1px dashed #ccc;
  color: #555;
}
.color-picker .hue-wrapper {
  display: none;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  padding: 8px;
  background: var(--studio-surface-solid);
  border: 1px solid var(--studio-border);
  border-radius: 8px;
  box-shadow: none;
  position: relative;
  box-sizing: border-box;
  width: 100%;
}
.color-picker .hue-wrapper.hidden {
  display: none;
}
.color-picker .hue-wrapper:not(.hidden) {
  display: flex;
}
.color-picker .hue-wrapper .color-picker-close {
  align-self: flex-end;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.color-picker .hue-wrapper .cp-color-area {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 150px;
  touch-action: none;
  border-radius: 4px;
  cursor: crosshair;
  background: hsl(0, 100%, 50%);
  overflow: hidden;
}
.color-picker .hue-wrapper .cp-color-area::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
}
.color-picker .hue-wrapper .cp-color-area::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 1;
  transform: none;
  visibility: visible;
  pointer-events: none;
  background: linear-gradient(to top, #000, rgba(0, 0, 0, 0));
}
.color-picker .hue-wrapper .cp-color-area .cp-cursor {
  position: absolute;
  z-index: 1;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
  transform: translate(-6px, -6px);
  pointer-events: none;
}
.color-picker .hue-wrapper .cp-hue,
.color-picker .hue-wrapper .cp-alpha {
  -webkit-appearance: none;
  width: 100%;
  height: 12px;
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  border: 0;
}
.color-picker .hue-wrapper .cp-hue::-webkit-slider-thumb,
.color-picker .hue-wrapper .cp-alpha::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #171717;
  box-shadow: 0 0 0 1px #555;
}
.color-picker .hue-wrapper .cp-hue::-moz-range-thumb,
.color-picker .hue-wrapper .cp-alpha::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #171717;
  box-shadow: 0 0 0 1px #555;
}
.color-picker .hue-wrapper .cp-hue {
  background: linear-gradient(to right, red, yellow, lime, cyan, blue, magenta, red);
}
.color-picker .hue-wrapper .cp-alpha {
  background: repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%);
  background-size: 8px 8px;
}
.color-picker .hue-wrapper .cp-input-row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.color-picker .hue-wrapper .cp-preview {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  background: repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%);
  background-size: 8px 8px;
}
.color-picker .hue-wrapper .cp-preview .cp-preview-color {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}
.color-picker .hue-wrapper .cp-hex {
  flex: 1;
  padding: 2px 4px;
  border: 1px solid var(--studio-border);
  border-radius: 4px;
  font-size: 12px;
  text-align: center;
  text-transform: uppercase;
}
.color-picker .hue-wrapper .cp-dropper {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.color-picker .color-section-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  margin-right: 4px;
  font-size: 12px;
  color: var(--studio-text);
}
.color-picker .saved-color-library {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--user-color) 16%, transparent);
  border-radius: 12px;
  background: var(--studio-surface-muted);
}
.color-picker .saved-color-library__header,
.color-picker .saved-color-row,
.color-picker .saved-color-item,
.color-picker .saved-color-library__link,
.color-picker .saved-color-row__actions,
.color-picker .saved-color-form__actions {
  display: flex;
  align-items: center;
}
.color-picker .saved-color-library__header {
  justify-content: space-between;
  gap: 12px;
}
.color-picker .saved-color-library__header .color-section-label {
  margin: 0;
}
.color-picker .saved-color-library__link {
  gap: 6px;
  font-size: 11px;
}
.color-picker .saved-color-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.color-picker .saved-color-row {
  gap: 6px;
}
.color-picker .saved-color-item {
  flex: 1;
  gap: 10px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--studio-surface-solid);
  color: var(--studio-text);
  text-align: left;
}
.color-picker .saved-color-item.active {
  border-color: var(--user-color);
}
.color-picker .saved-color-item__swatch {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 1px solid var(--color-border);
  border-radius: 9px;
}
.color-picker .saved-color-item__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.color-picker .saved-color-item__text strong,
.color-picker .saved-color-item__text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.color-picker .saved-color-item__text small {
  opacity: 0.68;
}
.color-picker .saved-color-row__actions {
  gap: 2px;
}
.color-picker .saved-color-row__actions button {
  border: 0;
  background: transparent;
  color: var(--studio-text);
  font-size: 10px;
}
.color-picker .saved-color-library__add,
.color-picker .saved-color-form button,
.color-picker .saved-color-form input {
  min-height: 32px;
  border-radius: 8px;
}
.color-picker .saved-color-library__add {
  border: 1px dashed var(--user-color);
  background: transparent;
  color: var(--user-color);
}
.color-picker .saved-color-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px;
  gap: 7px;
}
.color-picker .saved-color-form.hidden {
  display: none;
}
.color-picker .saved-color-form input {
  min-width: 0;
  padding: 0 9px;
  border: 1px solid var(--color-border);
}
.color-picker .saved-color-form__actions {
  grid-column: 1/-1;
  gap: 7px;
}
.color-picker .saved-color-form__save {
  flex: 1;
  border: 1px solid var(--user-color);
  background: var(--user-color);
  color: var(--color-white);
}
.color-picker .saved-color-library__empty,
.color-picker .saved-color-library__error {
  margin: 0;
  font-size: 11px;
}
.color-picker .saved-color-library__error {
  color: #b42318;
}
.color-picker .saved-color-library__error.hidden,
.color-picker .saved-color-library__add.hidden {
  display: none;
}

.color-picker.floating {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 1000;
  background: var(--studio-surface-solid);
  padding: 8px;
  border: 1px solid var(--studio-border);
  box-shadow: none;
  border-radius: 8px;
  width: min(320px, 100vw - 24px);
  height: auto;
  max-height: min(520px, 100vh - 24px);
  overflow: auto;
}

.bp-popover:has(> .color-picker) {
  width: 320px;
  padding: 16px;
  max-height: min(560px, 100vh - 24px);
}

.app-scope .color-picker-toggle {
  width: 36px;
  height: 36px;
  border: 2px solid var(--studio-surface-solid);
  outline: 1px solid var(--studio-border);
}

.bp-popover-layer {
  --bp-layer-popover: 5300;
  position: fixed;
  inset: 0;
  z-index: 5300;
  pointer-events: none;
}

.bp-popover {
  position: fixed;
  display: grid;
  gap: 10px;
  width: max-content;
  min-width: 220px;
  max-width: min(360px, 100vw - 24px);
  max-height: min(420px, 100vh - 24px);
  padding: 10px;
  overflow: auto;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-panel);
  background: var(--studio-surface-solid);
  color: var(--studio-text);
  box-shadow: var(--studio-shadow-lift);
  opacity: 0;
  pointer-events: auto;
  transform: translateY(-5px) scale(0.98);
  transition: opacity var(--motion-duration-fast) var(--motion-ease-standard), transform var(--motion-duration-fast) var(--motion-ease-enter);
}

/* A popover's accessible name labels the region; it must not become a second
   visual tooltip through the legacy global aria-label helper. */
.bp-popover[aria-label]::after {
  content: none;
  display: none;
}

.bp-popover.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.bp-popover.bp-tooltip {
  min-width: 0;
  width: max-content;
  max-width: min(300px, 100vw - 24px);
  padding: 7px 10px;
  border-radius: 10px;
  box-shadow: var(--studio-shadow-control);
}

.bp-tooltip .bp-popover__message {
  padding: 0;
  color: var(--studio-text);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

[data-bp-tooltip]::after {
  content: none !important;
  display: none !important;
}

.bp-popover.is-leaving {
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
}

.bp-popover__message {
  margin: 0;
  padding: 6px 8px;
  color: var(--studio-text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.bp-popover__menu {
  display: grid;
  gap: 4px;
}

.bp-popover__item {
  text-decoration: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 0 11px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--studio-text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.bp-popover__item:hover,
.bp-popover__item:focus-visible {
  background: var(--studio-surface-muted);
  box-shadow: none;
  outline: none;
}

.bp-popover__item img {
  width: 17px;
  height: 17px;
}

@media (prefers-reduced-motion: reduce) {
  .bp-popover {
    transition: none;
    transform: none;
  }
}
.bp-toast-region {
  position: fixed;
  z-index: 5400;
  top: calc(72px + var(--maintenance-banner-height, 0px));
  right: 18px;
  display: grid;
  gap: 8px;
  width: min(360px, 100vw - 32px);
  pointer-events: none;
}

/* Region and dismiss labels are assistive names, not floating tooltip text.
   Keeping the generated pseudo elements disabled avoids hidden overflow. */
.bp-toast-region[aria-label]::after,
.bp-toast__close[aria-label]::after {
  content: none;
  display: none;
}

.bp-toast {
  --bp-toast-tone: var(--studio-text-muted);
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--studio-border-strong);
  border-radius: var(--studio-field-radius);
  background: var(--studio-surface-solid);
  color: var(--studio-text);
  box-shadow: var(--studio-shadow-soft);
  opacity: 0;
  pointer-events: auto;
  transform: translateY(-8px) scale(0.98);
  transition: opacity var(--motion-duration-base) var(--motion-ease-standard), transform var(--motion-duration-base) var(--motion-ease-enter);
}

.bp-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.bp-toast.is-leaving {
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
}

.bp-toast--info {
  --bp-toast-tone: var(--color-info);
}

.bp-toast--success {
  --bp-toast-tone: var(--color-success);
}

.bp-toast--warning {
  --bp-toast-tone: var(--color-warning);
}

.bp-toast--error {
  --bp-toast-tone: var(--color-error);
}

.bp-toast__symbol {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--bp-toast-tone) 12%, transparent);
}

.bp-toast__icon {
  width: 16px;
  height: 16px;
}

.bp-toast__content {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.bp-toast__title {
  color: var(--studio-text);
  font-size: 0.85rem;
  line-height: 1.35;
}

.bp-toast__message {
  margin: 0;
  color: var(--studio-text-muted);
  font-size: 0.8rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.bp-toast__actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bp-toast__action.button {
  min-width: 0;
  margin: 0;
}

.bp-toast__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.bp-toast__close:hover,
.bp-toast__close:focus-visible {
  background: var(--studio-surface-muted);
  box-shadow: var(--studio-focus-ring);
}

.bp-toast__close img {
  width: 15px;
  height: 15px;
}

@media (max-width: 560px) {
  .bp-toast-region {
    top: auto;
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));
    left: 16px;
    width: auto;
  }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) .bp-toast__icon,
  :root:not([data-theme=light]) .bp-toast__close img {
    filter: invert(1);
  }
}
:root[data-theme=dark] .bp-toast__icon,
:root[data-theme=dark] .bp-toast__close img {
  filter: invert(1);
}

@media (prefers-reduced-motion: reduce) {
  .bp-toast {
    transition: none;
    transform: none;
  }
}
.bp-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bp-loader {
  color: var(--studio-text-muted);
  font-size: 0.88rem;
}

.bp-loader--inline,
.bp-loader--spinner,
.bp-loader--overlay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.bp-loader--overlay {
  width: 100%;
  min-height: 132px;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-panel);
  background: var(--studio-surface-muted);
}

.bp-loader__spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 2px solid color-mix(in srgb, var(--user-color) 22%, var(--studio-border));
  border-top-color: var(--user-color);
  border-radius: 50%;
  animation: bp-loader-spin 700ms linear infinite;
}

.bp-loader--skeleton {
  position: relative;
  display: grid;
  gap: 11px;
  width: 100%;
  min-height: 132px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-panel);
  background: var(--studio-surface-muted);
}

.bp-loader__skeleton-line {
  display: block;
  width: var(--bp-skeleton-width, 100%);
  height: 13px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--studio-border) 20%, color-mix(in srgb, var(--studio-border-strong) 72%, transparent) 45%, var(--studio-border) 70%);
  background-size: 220% 100%;
  animation: bp-loader-shimmer 1.35s ease-in-out infinite;
  animation-delay: var(--bp-skeleton-delay, 0ms);
}

.bp-progress {
  display: grid;
  gap: 8px;
  width: 100%;
}

.admin-panel .admin-shell-feedback {
  min-width: 0;
}
.admin-panel .admin-shell-error {
  display: none;
  padding: 16px;
}
.admin-panel [data-admin-loading=error] > .admin-shell-feedback {
  display: block;
}
.admin-panel [data-admin-loading=error] > .admin-shell-feedback > .bp-loader {
  display: none;
}
.admin-panel [data-admin-loading=error] > .admin-shell-feedback > .admin-shell-error {
  display: block;
}
.admin-panel :where(#top-header, #main-header, .main-header nav) > .admin-shell-feedback .bp-loader {
  min-height: 0;
  height: 40px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  display: flex;
  gap: 20px;
  align-items: center;
}
.admin-panel :where(#top-header, #main-header, .main-header nav) > .admin-shell-feedback .bp-loader .bp-loader__skeleton-line {
  width: clamp(32px, 10vw, 120px);
}
.admin-panel :where(#sidebar, #subpage-nav) > .admin-shell-feedback .bp-loader {
  min-height: 0;
  width: 48px;
  padding: 8px;
  border: 0;
  background: transparent;
}
.admin-panel :where(#sidebar, #subpage-nav) > .admin-shell-feedback .bp-loader .bp-loader__skeleton-line {
  height: 32px;
}
.admin-panel #sidebar[data-admin-loading=error] > .admin-shell-feedback {
  width: 104px;
  padding: 0;
}
.admin-panel #sidebar[data-admin-loading=error] > .admin-shell-feedback .admin-shell-error {
  padding: 8px;
  overflow-wrap: anywhere;
}
.admin-panel #sidebar[data-admin-loading=error] > .admin-shell-feedback .button {
  white-space: normal;
}
.admin-panel #content[data-admin-loading=loading],
.admin-panel #content[data-admin-loading=error] {
  min-height: min(28rem, 65vh);
}
.admin-panel #content[data-admin-loading=loading] > .admin-shell-feedback,
.admin-panel #content[data-admin-loading=error] > .admin-shell-feedback {
  position: absolute;
  inset: 64px 20px auto;
}
.admin-panel #content[data-admin-loading=loading] > [data-admin-loading-stale],
.admin-panel #content[data-admin-loading=error] > [data-admin-loading-stale] {
  visibility: hidden;
}

.bp-progress__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--studio-text-muted);
  font-size: 0.84rem;
}

.bp-progress__track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--studio-border);
}

.bp-progress__bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--user-color);
  transition: width var(--motion-duration-base) var(--motion-ease-standard);
}

@keyframes bp-loader-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes bp-loader-shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -20% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bp-loader__spinner,
  .bp-loader__skeleton-line {
    animation: none;
  }
}
.bp-alert {
  --bp-alert-tone: var(--studio-text-muted);
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--bp-alert-tone) 30%, var(--studio-border));
  border-radius: var(--studio-field-radius);
  background: color-mix(in srgb, var(--bp-alert-tone) 7%, var(--studio-surface-solid));
  color: var(--studio-text);
}

.bp-alert--info {
  --bp-alert-tone: var(--color-info);
}

.bp-alert--success {
  --bp-alert-tone: var(--color-success);
}

.bp-alert--warning {
  --bp-alert-tone: var(--color-warning);
}

.bp-alert--error {
  --bp-alert-tone: var(--color-error);
}

.bp-alert img {
  width: 18px;
  height: 18px;
}

.bp-alert__content {
  display: grid;
  gap: 3px;
}

.bp-alert__content strong {
  font-size: 0.9rem;
}

.bp-alert__content p {
  margin: 0;
  color: var(--studio-text-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.bp-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--studio-surface-muted);
  color: var(--studio-text-muted);
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1;
}

.bp-badge--info {
  color: var(--color-info);
  background: color-mix(in srgb, var(--color-info) 10%, transparent);
}

.bp-badge--success {
  color: var(--color-success);
  background: color-mix(in srgb, var(--color-success) 10%, transparent);
}

.bp-badge--warning {
  color: var(--color-warning);
  background: color-mix(in srgb, var(--color-warning) 11%, transparent);
}

.bp-badge--error {
  color: var(--color-error);
  background: color-mix(in srgb, var(--color-error) 10%, transparent);
}

.bp-empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 28px 20px;
  border: 1px dashed var(--studio-border-strong);
  border-radius: var(--studio-radius-panel);
  background: var(--studio-surface-muted);
  text-align: center;
}

.bp-empty-state img {
  width: 28px;
  height: 28px;
  opacity: 0.68;
}

.bp-empty-state strong {
  color: var(--studio-text);
}

.bp-empty-state p {
  max-width: 42ch;
  margin: 0;
  color: var(--studio-text-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.bp-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

.bp-tabs .button {
  flex: 0 0 auto;
  min-width: 0;
}

.bp-tabs .button.active {
  background: var(--studio-surface-muted);
  box-shadow: var(--studio-shadow-control);
}

.bp-tab-panel:focus {
  outline: none;
}

.bp-tabs.bp-tabs--underline {
  gap: 20px;
  padding: 0 2px;
  border-bottom: 1px solid var(--studio-border);
}
.bp-tabs.bp-tabs--underline > .button {
  margin: 0;
  padding: 12px 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--studio-text-muted);
  white-space: nowrap;
  transform: none;
}
.bp-tabs.bp-tabs--underline > .button:hover {
  color: var(--studio-text);
  background: transparent;
  box-shadow: none;
  transform: none;
}
.bp-tabs.bp-tabs--underline > .button.active {
  color: var(--studio-text);
  border-bottom-color: currentColor;
}
.bp-tabs.bp-tabs--underline > .button:focus-visible {
  outline: 2px solid var(--studio-text);
  outline-offset: -3px;
  box-shadow: none;
}

.bp-card {
  padding: 18px;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-panel);
  background: var(--studio-surface-solid);
  box-shadow: var(--studio-shadow-soft);
}

.bp-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-panel);
}

.bp-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--studio-text);
  font-size: 0.86rem;
}

.bp-table th,
.bp-table td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--studio-border);
  text-align: left;
  white-space: nowrap;
}

.bp-table th {
  background: var(--studio-surface-muted);
  color: var(--studio-text-muted);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.bp-table tbody tr:last-child td {
  border-bottom: 0;
}

.bp-table tbody tr:hover {
  background: color-mix(in srgb, var(--user-color) 4%, transparent);
}

.bp-pagination {
  display: flex;
  align-items: center;
  gap: 7px;
}

.bp-pagination button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: var(--studio-surface-solid);
  color: var(--studio-text);
  box-shadow: var(--studio-shadow-control);
  cursor: pointer;
}

.bp-pagination button[aria-current=page] {
  background: var(--user-color);
  color: var(--color-primary-contrast);
}

.bp-pagination button:focus-visible {
  box-shadow: var(--studio-focus-ring), var(--studio-shadow-control);
}

/* =============================================================================
   Cards (optional)
   ============================================================================= */
.app-scope .card {
  background-color: var(--studio-surface-solid);
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-panel);
  box-shadow: var(--studio-shadow-soft);
  padding: 16px;
  position: relative;
}
.app-scope .card--paragraph {
  background-color: #F3E8FF;
}
.app-scope .card--quote, .app-scope .card--image {
  border: 2px solid var(--gradient-primary);
}

/* =============================================================================
   Responsive Anpassungen
   ============================================================================= */
@media (max-width: 500px) {
  .app-scope .login-form {
    padding: 24px;
    margin: 0 16px;
  }
}
/* =============================================================================
   components/_sidebar-bubble.scss — Bubble-Style Sidebar
   ============================================================================= */
.sidebar {
  --studio-sidebar-shadow-bleed: 16px;
  position: relative;
  left: 0;
  height: 100vh;
  width: calc(88px + var(--studio-sidebar-shadow-bleed));
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px calc(18px + var(--studio-sidebar-shadow-bleed)) 0 18px;
  overflow: visible;
  z-index: 10;
}
.sidebar .sidebar-nav {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible;
}
.sidebar .sidebar-nav .sidebar-item, .sidebar .sidebar-nav .sidebar-add-subpage {
  position: relative;
  z-index: 1;
  width: var(--studio-control-size);
  height: var(--studio-control-size);
  margin: 7px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--studio-surface-solid);
  border: 0;
  border-radius: var(--studio-radius-control);
  box-shadow: none;
  isolation: isolate;
  transition: background var(--motion-duration-base) var(--motion-ease-standard);
}
.sidebar .sidebar-nav .sidebar-item::before, .sidebar .sidebar-nav .sidebar-add-subpage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--studio-surface-solid);
  box-shadow: var(--studio-shadow-control);
  transform: scale(1);
  transform-origin: center;
  transition: background var(--motion-duration-base) var(--motion-ease-standard), box-shadow var(--motion-duration-base) var(--motion-ease-standard), transform var(--motion-duration-base) var(--motion-ease-standard);
}
.sidebar .sidebar-nav .sidebar-item .icon, .sidebar .sidebar-nav .sidebar-add-subpage .icon {
  width: 20px;
  height: 20px;
  display: block;
  margin: auto;
  fill: var(--studio-text);
  opacity: 0.68;
  transition: opacity var(--motion-duration-base) var(--motion-ease-standard);
}
.sidebar .sidebar-nav .sidebar-item .label, .sidebar .sidebar-nav .sidebar-add-subpage .label {
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%) translateX(0) scale(0.8);
  transform-origin: left center;
  background: var(--studio-surface-solid);
  padding: 6px 10px;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-control);
  box-shadow: var(--studio-shadow-soft);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--studio-text);
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--motion-duration-base) var(--motion-ease-standard), transform var(--motion-duration-base) var(--motion-ease-standard);
  pointer-events: none;
  z-index: 1000;
}
.sidebar .sidebar-nav .sidebar-item:hover, .sidebar .sidebar-nav .sidebar-add-subpage:hover {
  background: transparent;
  transform: none;
}
.sidebar .sidebar-nav .sidebar-item:hover::before, .sidebar .sidebar-nav .sidebar-add-subpage:hover::before {
  background: var(--studio-surface-solid);
  box-shadow: var(--studio-shadow-control);
  transform: scale(1.045);
}
.sidebar .sidebar-nav .sidebar-item:hover .label, .sidebar .sidebar-nav .sidebar-add-subpage:hover .label {
  opacity: 1;
  transform: translateY(-50%) translateX(8px) scale(1);
}
.sidebar .sidebar-nav .sidebar-item.active, .sidebar .sidebar-nav .active.sidebar-add-subpage {
  background: transparent;
  box-shadow: none;
}
.sidebar .sidebar-nav .sidebar-item.active::before, .sidebar .sidebar-nav .active.sidebar-add-subpage::before {
  background: color-mix(in srgb, var(--user-color) 10%, var(--studio-surface-solid));
  box-shadow: var(--studio-shadow-control);
}
.sidebar .sidebar-nav .sidebar-item.active .icon, .sidebar .sidebar-nav .active.sidebar-add-subpage .icon {
  opacity: 0.96;
}
.sidebar .sidebar-nav .sidebar-add-subpage {
  margin-top: 8px;
}

@media (max-width: 700px) {
  .sidebar {
    width: calc(64px + var(--studio-sidebar-shadow-bleed));
    padding: 16px calc(10px + var(--studio-sidebar-shadow-bleed)) 0 10px;
  }
  .sidebar .sidebar-nav .sidebar-item, .sidebar .sidebar-nav .sidebar-add-subpage {
    margin: 4px 0;
  }
}
/* =============================================================================
   components/_floating-labels.scss — Global floating labels using sidebar style
   ============================================================================= */
[alt]::after, [title]::after, [aria-label]::after, [data-label]::after {
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%) translateX(0) scale(0.8);
  transform-origin: left center;
  background: var(--studio-surface-solid);
  padding: 4px 8px;
  border-radius: 4px;
  box-shadow: var(--studio-shadow-soft);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--studio-text);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 1000;
}
[alt]:hover::after, [title]:hover::after, [aria-label]:hover::after, [data-label]:hover::after, [alt]:focus::after, [title]:focus::after, [aria-label]:focus::after, [data-label]:focus::after {
  opacity: 1;
  transform: translateY(-50%) translateX(8px) scale(1);
}

[data-label]::after {
  content: attr(data-label);
}

[aria-label]::after {
  content: attr(aria-label);
}

[title]::after {
  content: attr(title);
}

[alt]::after {
  content: attr(alt);
}

/* Header controls use their own visible labels/icon layout. Keep aria-labels
   for assistive tech without drawing duplicate floating labels in the chrome. */
:where(.top-header, .main-header, .content-header, .sidebar) [data-label]::after,
:where(.top-header, .main-header, .content-header, .sidebar) [aria-label]::after,
:where(.top-header, .main-header, .content-header, .sidebar) [title]::after,
:where(.top-header, .main-header, .content-header, .sidebar) [alt]::after {
  content: none;
  display: none;
}
:where(.top-header, .main-header, .content-header, .sidebar) [data-label]:hover::after, :where(.top-header, .main-header, .content-header, .sidebar) [data-label]:focus::after,
:where(.top-header, .main-header, .content-header, .sidebar) [aria-label]:hover::after,
:where(.top-header, .main-header, .content-header, .sidebar) [aria-label]:focus::after,
:where(.top-header, .main-header, .content-header, .sidebar) [title]:hover::after,
:where(.top-header, .main-header, .content-header, .sidebar) [title]:focus::after,
:where(.top-header, .main-header, .content-header, .sidebar) [alt]:hover::after,
:where(.top-header, .main-header, .content-header, .sidebar) [alt]:focus::after {
  opacity: 0;
  transform: none;
}

/* =============================================================================
   components/_header-main.scss — Icon‐Style Header Nav
   ============================================================================= */
.main-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px 12px;
  padding-left: 24px;
  justify-content: space-between;
  backdrop-filter: none;
  background: transparent;
  border-bottom: 0;
}
.main-header .site-title {
  flex-grow: 1;
  font-family: var(--font-heading);
  font-size: 30px;
  margin: 0;
  color: var(--color-text);
}
.main-header .nav-icons {
  display: flex;
  gap: 10px;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
}
.main-header .nav-icons--end {
  flex: 0 0 auto;
  justify-content: flex-end;
  margin-left: auto;
}
.main-header .nav-icons a,
.main-header .nav-icons .nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  width: auto;
  min-width: var(--studio-control-size);
  height: var(--studio-control-size);
  padding: 0 12px;
  position: relative;
  overflow: visible;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.86rem;
  line-height: 1;
  color: var(--studio-text);
  opacity: 0.72;
  transition: opacity var(--motion-duration-base) var(--motion-ease-standard), background var(--motion-duration-base) var(--motion-ease-standard), border-color var(--motion-duration-base) var(--motion-ease-standard), box-shadow var(--motion-duration-base) var(--motion-ease-standard);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--studio-radius-control);
  box-shadow: none;
  cursor: pointer;
  isolation: isolate;
}
.main-header .nav-icons a::before,
.main-header .nav-icons .nav-button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid transparent;
  border-radius: inherit;
  background: transparent;
  box-shadow: none;
  transform: scale(1);
  transform-origin: center;
  transition: background var(--motion-duration-base) var(--motion-ease-standard), border-color var(--motion-duration-base) var(--motion-ease-standard), box-shadow var(--motion-duration-base) var(--motion-ease-standard), transform var(--motion-duration-fast) var(--motion-ease-standard);
}
.main-header .nav-icons a .icon,
.main-header .nav-icons .nav-button .icon {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: currentColor;
  transition: opacity var(--motion-duration-base) var(--motion-ease-standard);
}
.main-header .nav-icons a .label,
.main-header .nav-icons .nav-button .label {
  position: static;
  z-index: 1;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  overflow: visible;
  white-space: nowrap;
  border: 0;
  clip: auto;
  clip-path: none;
  color: currentColor;
  font-weight: 400;
}
.main-header .nav-icons a::after,
.main-header .nav-icons .nav-button::after {
  display: none;
}
.main-header .nav-icons a:hover,
.main-header .nav-icons .nav-button:hover {
  opacity: 1;
  transform: none;
  border-color: transparent;
  background: transparent;
}
.main-header .nav-icons a:hover::before,
.main-header .nav-icons .nav-button:hover::before {
  transform: none;
}
.main-header .nav-icons a.active,
.main-header .nav-icons .nav-button.active {
  opacity: 1;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
.main-header .nav-icons a.active::before,
.main-header .nav-icons .nav-button.active::before {
  border-color: var(--studio-border);
  background: var(--studio-surface-solid);
  box-shadow: none;
  transform: none;
}
.main-header .nav-icons #workspace-create {
  width: var(--studio-control-size);
  min-width: var(--studio-control-size);
  padding: 0;
  gap: 0;
  font-size: 0;
  line-height: 0;
}
.main-header .nav-icons--end a, .main-header .nav-icons--end .nav-button {
  width: var(--studio-control-size);
  min-width: var(--studio-control-size);
  padding: 0;
  gap: 0;
  font-size: 0;
  line-height: 0;
}
.main-header .nav-icons--end a .label, .main-header .nav-icons--end .nav-button .label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.editor-quick-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: 12px;
  align-items: center;
}

@media (max-width: 700px) {
  .main-header {
    padding-left: 12px;
    padding-right: 12px;
  }
}
#widgets-toggle-inline,
#admin-delete-page {
  display: none;
}

body.dashboard-edit-mode #widgets-toggle-inline,
body.dashboard-edit-mode #admin-delete-page {
  display: inline-flex;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--studio-control-size);
  height: var(--studio-control-size);
  border-radius: var(--studio-radius-control);
  border: 1px solid var(--studio-border);
  background: var(--bg, var(--studio-surface-solid));
  color: var(--studio-text);
  box-shadow: var(--studio-shadow-soft);
  cursor: pointer;
  transition: background var(--motion-duration-base) var(--motion-ease-standard), border-color var(--motion-duration-base) var(--motion-ease-standard), box-shadow var(--motion-duration-base) var(--motion-ease-standard), transform var(--motion-duration-fast) var(--motion-ease-standard);
}

.icon-btn img,
.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn:hover {
  background: var(--hover, var(--studio-surface-muted));
  border-color: color-mix(in srgb, var(--user-color) 24%, var(--studio-border));
  transform: translateY(-1px);
}

.icon-btn.danger {
  border-color: color-mix(in srgb, var(--color-error) 28%, var(--studio-border));
}

.icon-btn.danger svg {
  fill: currentColor;
  stroke: currentColor;
}

.icon-btn.danger:hover {
  background: color-mix(in srgb, var(--color-error) 10%, var(--studio-surface-solid));
  color: #dc2626;
}

body.dashboard-edit-mode #edit-toggle:hover {
  background: color-mix(in srgb, var(--user-color) 10%, var(--studio-surface-solid));
  border-color: color-mix(in srgb, var(--user-color) 30%, var(--studio-border));
  color: var(--studio-text);
}

/* =============================================================================
   components/_top-header.scss — Clean Header mit Icons und zentriertem Logo
   ============================================================================= */
.top-header {
  --maintenance-banner-height: 0px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  padding: 8px 24px;
  min-height: 48px;
  position: relative;
  z-index: 140;
  font-family: var(--font-body);
  background: color-mix(in srgb, var(--studio-surface-solid) 86%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--studio-border);
  box-shadow: none;
}
.top-header .maintenance-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-field-radius);
  background: var(--studio-surface-muted);
  color: var(--studio-text);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.top-header .maintenance-banner[hidden] {
  display: none;
}
.top-header .maintenance-banner:hover {
  background: var(--studio-surface-solid);
  border-color: var(--studio-border-strong);
}
.top-header .maintenance-banner:focus-visible {
  box-shadow: var(--studio-focus-ring);
}
.top-header .maintenance-banner__label {
  color: var(--studio-text-muted);
}
.top-header .maintenance-banner__action {
  color: var(--studio-text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.top-header .top-header__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.top-header .left-icons,
.top-header .right-icons {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.top-header .left-icons {
  justify-self: start;
}
.top-header .right-icons {
  justify-self: end;
}
.top-header .account-menu {
  position: relative;
  display: inline-flex;
}
.top-header .top-header__icon-button,
.top-header .left-icons a,
.top-header .right-icons a {
  width: var(--studio-control-size);
  height: var(--studio-control-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--studio-radius-control);
  background: transparent;
  color: var(--studio-text);
  cursor: pointer;
  transition: background var(--motion-duration-base) var(--motion-ease-standard), border-color var(--motion-duration-base) var(--motion-ease-standard), transform var(--motion-duration-fast) var(--motion-ease-standard);
}
.top-header .top-header__icon-button {
  padding: 0;
  appearance: none;
  font: inherit;
}
.top-header .left-icons a.project-link {
  width: var(--studio-control-size);
  min-width: var(--studio-control-size);
  max-width: min(220px, 44vw);
  justify-content: center;
  gap: 8px;
  padding: 0;
  text-decoration: none;
  transform-origin: center;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  isolation: isolate;
  position: relative;
}
.top-header .left-icons a.project-link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid transparent;
  border-radius: inherit;
  background: transparent;
  box-shadow: none;
  transform: scale(1);
  transform-origin: center;
  transition: background var(--motion-duration-base) var(--motion-ease-standard), border-color var(--motion-duration-base) var(--motion-ease-standard), box-shadow var(--motion-duration-base) var(--motion-ease-standard), transform var(--motion-duration-fast) var(--motion-ease-standard);
}
.top-header .project-link__name {
  display: none;
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 160px;
  overflow: hidden;
  color: var(--studio-text);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top-header .left-icons a.project-link .icon {
  position: relative;
  z-index: 1;
  width: 17px;
  height: 17px;
  opacity: 0.68;
}
.top-header .top-header__icon-button:hover,
.top-header .top-header__icon-button:focus-visible,
.top-header .left-icons a:hover,
.top-header .left-icons a:focus-visible,
.top-header .right-icons a:hover,
.top-header .right-icons a:focus-visible {
  background: var(--studio-surface-muted);
  border-color: transparent;
  outline: none;
  transform: translateY(-1px);
}
.top-header .left-icons a.project-link:hover,
.top-header .left-icons a.project-link:focus-visible {
  background: transparent;
  border-color: transparent;
  transform: none;
}
.top-header .left-icons a.project-link:hover::before,
.top-header .left-icons a.project-link:focus-visible::before {
  background: var(--studio-surface-solid);
  border-color: transparent;
  transform: scale(1.015);
}
.top-header .account-menu__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 120;
  display: grid;
  gap: 4px;
  width: min(220px, 100vw - 32px);
  padding: 6px;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-panel);
  background: var(--studio-surface-solid);
  box-shadow: var(--studio-shadow-lift);
}
.top-header .account-menu__dropdown[hidden] {
  display: none;
}
.top-header .account-menu__item,
.top-header .right-icons a.account-menu__item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  height: auto;
  padding: 0 10px;
  border: 0;
  border-radius: var(--studio-radius-control);
  background: transparent;
  color: var(--studio-text);
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  transform: none;
  transition: background var(--motion-duration-fast) var(--motion-ease-standard), color var(--motion-duration-fast) var(--motion-ease-standard);
}
.top-header .account-menu__item:hover,
.top-header .account-menu__item:focus-visible,
.top-header .right-icons a.account-menu__item:hover,
.top-header .right-icons a.account-menu__item:focus-visible {
  background: var(--studio-surface-muted);
  border-color: transparent;
  outline: none;
  transform: none;
}
.top-header .account-menu__item .icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  opacity: 0.72;
}
.top-header .account-menu__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top-header .icon {
  width: 18px;
  height: 18px;
  fill: var(--studio-text);
  opacity: 0.72;
  cursor: pointer;
  transition: fill var(--motion-duration-base) var(--motion-ease-standard), opacity var(--motion-duration-base) var(--motion-ease-standard), transform var(--motion-duration-fast) var(--motion-ease-standard);
}
.top-header .icon:hover {
  opacity: 1;
  transform: translateY(-1px);
}
.top-header .logo {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 0 0 auto;
  margin: 0;
  min-width: var(--studio-control-size);
  overflow: visible;
}
.top-header .logo .logo-icon {
  width: auto;
  height: 26px;
  display: block;
  opacity: 0.82;
}
.top-header .search-container {
  position: relative;
  display: flex;
  align-items: center;
  width: var(--studio-control-size);
  min-width: var(--studio-control-size);
  height: var(--studio-control-size);
  border: 1px solid transparent;
  border-radius: var(--studio-radius-control);
  background: transparent;
  box-shadow: none;
  transform-origin: left center;
  isolation: isolate;
  transition: width var(--motion-duration-base) var(--motion-ease-standard), border-color var(--motion-duration-base) var(--motion-ease-standard), background var(--motion-duration-base) var(--motion-ease-standard);
}
.top-header .search-container::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid transparent;
  border-radius: inherit;
  background: transparent;
  transform: scale(1);
  transform-origin: left center;
  transition: background var(--motion-duration-base) var(--motion-ease-standard), border-color var(--motion-duration-base) var(--motion-ease-standard), transform var(--motion-duration-fast) var(--motion-ease-standard);
}
.top-header .search-container:hover {
  border-color: transparent;
  background: transparent;
  transform: none;
}
.top-header .search-container:hover::before {
  border-color: transparent;
  background: var(--studio-surface-solid);
  transform: scale(1.015);
}
.top-header .search-container:focus-within, .top-header .search-container.open, .top-header .search-container.is-expanded {
  width: var(--studio-header-search-open-width);
  max-width: calc(100vw - 128px);
  border-color: transparent;
  background: transparent;
}
.top-header .search-container:focus-within::before, .top-header .search-container.open::before, .top-header .search-container.is-expanded::before {
  border-color: transparent;
  background: var(--studio-surface-solid);
  transform: none;
}
.top-header .search-container #search-toggle {
  position: relative;
  z-index: 1;
  width: calc(var(--studio-control-size) - 2px);
  min-width: calc(var(--studio-control-size) - 2px);
  height: calc(var(--studio-control-size) - 2px);
  border: 0;
  background: transparent;
  box-shadow: none;
}
.top-header .search-container #search-toggle:hover, .top-header .search-container #search-toggle:focus-visible {
  border-color: transparent;
  background: transparent;
  transform: none;
}
.top-header .search-container input {
  position: static;
  z-index: 1;
  min-width: 0;
  width: 0;
  flex: 1 1 auto;
  opacity: 0;
  pointer-events: none;
  transition: width var(--motion-duration-base) var(--motion-ease-standard), opacity var(--motion-duration-base) var(--motion-ease-standard), padding var(--motion-duration-base) var(--motion-ease-standard);
  padding: 0;
  border: none;
  border-radius: 0;
  font-size: 0.9rem;
  line-height: 1;
  background: transparent;
  font-family: var(--font-body);
  color: var(--studio-text);
}
.top-header .search-container input:focus {
  outline: none;
  box-shadow: none;
}
.top-header .search-container.open input, .top-header .search-container.is-expanded input, .top-header .search-container:focus-within input {
  width: 100%;
  opacity: 1;
  padding-right: 12px;
  pointer-events: auto;
}
.top-header .search-container .search-results {
  position: absolute;
  left: 0;
  width: 100%;
  min-width: 220px;
  top: calc(100% + 8px);
  background: var(--studio-surface-solid);
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-panel);
  box-shadow: var(--studio-shadow-soft);
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  z-index: 20;
}
.top-header .search-container .search-results li {
  padding: 4px 8px;
  cursor: pointer;
}
.top-header .search-container .search-results li:hover {
  background: var(--studio-surface-muted);
}
.top-header .search-container.active .search-results {
  display: block;
}

@media (max-width: 700px) {
  .top-header {
    padding-inline: 12px;
  }
}
/* A compact history panel using the same surfaces as the CMS workspaces. */
.notification-hub {
  position: fixed;
  top: calc(64px + var(--maintenance-banner-height, 0px));
  right: 16px;
  z-index: 5300;
  display: flex;
  flex-direction: column;
  width: min(380px, 100vw - 32px);
  max-height: min(520px, 100dvh - 88px - var(--maintenance-banner-height, 0px));
  overflow: hidden;
  border: 1px solid var(--studio-border-strong);
  border-radius: var(--studio-radius-panel);
  background: var(--studio-surface-solid);
  color: var(--studio-text);
  box-shadow: var(--studio-shadow-lift);
  font-family: var(--font-body);
}
.notification-hub[hidden] {
  display: none;
}
.notification-hub__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--studio-border);
}
.notification-hub__header h2 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
}
.notification-hub__header p {
  margin: 3px 0 0;
  color: var(--studio-text-muted);
  font-size: 0.75rem;
}
.notification-hub__actions {
  display: flex;
  gap: 4px;
}
.notification-hub__control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: var(--studio-radius-control);
  background: transparent;
  color: var(--studio-text);
  cursor: pointer;
}
.notification-hub__control img {
  width: 16px;
  height: 16px;
}
.notification-hub__control:hover {
  background: var(--studio-surface-muted);
}
.notification-hub__control:focus-visible {
  outline: none;
  box-shadow: var(--studio-focus-ring);
}
.notification-hub__control:disabled {
  opacity: 0.4;
  cursor: wait;
}
.notification-hub__body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.notification-hub ul {
  margin: 0;
  padding: 0 16px;
  list-style: none;
}
.notification-hub__item {
  --notification-tone: var(--color-info);
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding: 14px 0;
  font-size: 0.8rem;
}
.notification-hub__item + .notification-hub__item {
  border-top: 1px solid var(--studio-border);
}
.notification-hub__item.priority-critical, .notification-hub__item.priority-error {
  --notification-tone: var(--color-error);
}
.notification-hub__item.priority-warning {
  --notification-tone: var(--color-warning);
}
.notification-hub__item.priority-success {
  --notification-tone: var(--color-success);
}
.notification-hub__symbol {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--notification-tone) 12%, transparent);
}
.notification-hub__symbol img {
  width: 16px;
  height: 16px;
}
.notification-hub__content {
  min-width: 0;
}
.notification-hub__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 3px 8px;
  line-height: 1.5;
}
.notification-hub__meta strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 600;
}
.notification-hub__meta time {
  color: var(--studio-text-muted);
  font-size: 0.7rem;
  white-space: nowrap;
}
.notification-hub__message {
  margin: 4px 0 0;
  color: var(--studio-text-muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.notification-hub__link {
  display: inline-block;
  margin-top: 8px;
  color: var(--studio-text);
  font-size: 0.75rem;
  font-weight: 600;
  text-underline-offset: 3px;
}
.notification-hub__link:focus-visible {
  outline: none;
  border-radius: 3px;
  box-shadow: var(--studio-focus-ring);
}
.notification-hub__status {
  margin: 0;
  padding: 24px 20px;
  color: var(--studio-text-muted);
  font-size: 0.8rem;
  line-height: 1.6;
  text-align: center;
  overflow-wrap: anywhere;
}
.notification-hub__status.is-error {
  color: var(--studio-text);
}
.notification-hub__status[hidden] {
  display: none;
}

.notification-hub [aria-label]::after,
.top-header .logo[aria-label]::after {
  content: none;
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) .notification-hub img {
    filter: invert(1);
  }
}
:root[data-theme=dark] .notification-hub img {
  filter: invert(1);
}

@media (max-width: 560px) {
  .notification-hub {
    right: 12px;
    width: calc(100vw - 24px);
  }
}
.content-header {
  --studio-content-footer-height: 60px;
  display: flex;
  align-items: center;
  padding: 10px 24px;
  padding-left: 24px;
  background: transparent;
  border-top: 0;
  border-bottom: 0;
  min-height: 36px;
  position: static;
  right: 0;
  bottom: 0;
  left: 88px;
  backdrop-filter: none;
  z-index: 70;
  transition: box-shadow var(--motion-duration-base) var(--motion-ease-standard);
  box-shadow: none;
}
.content-header #content-breadcrumb {
  flex: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-left: 0;
}
.content-header #content-breadcrumb .breadcrumb-segment {
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.content-header #content-breadcrumb .breadcrumb-segment a {
  color: var(--studio-text-muted);
  text-decoration: none;
}
.content-header #content-breadcrumb .breadcrumb-segment.current a {
  font-weight: 600;
}
.content-header #content-breadcrumb .breadcrumb-segment + .breadcrumb-segment {
  margin-left: 0;
}
.content-header #content-breadcrumb .breadcrumb-segment + .breadcrumb-segment::before {
  content: "›";
  margin: 0 6px;
  color: var(--studio-text-muted);
}
.content-header .content-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.content-header #admin-delete-page {
  margin-right: 8px;
}
.content-header .icon {
  width: 20px;
  height: 20px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity var(--motion-duration-base) var(--motion-ease-standard), transform var(--motion-duration-base) var(--motion-ease-standard);
}
.content-header .icon:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.admin-panel > #content-header {
  flex: 0 0 auto;
}

#content-header[hidden], .content-header[hidden] {
  display: none;
}

body.has-content-footer #content {
  padding-bottom: calc(var(--studio-content-footer-height, 60px) + 16px);
}

@media (max-width: 700px) {
  .content-header {
    left: 64px;
    padding-inline: 12px;
    padding-left: 12px;
  }
}
/* =============================================================================
   components/_dashboard-icons.scss - Shared dashboard icon color handling
   ============================================================================= */
.app-scope img.icon,
.app-scope img.logo-icon {
  filter: var(--studio-icon-filter, none);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) .sidebar .sidebar-nav .sidebar-item .icon,
  :root:not([data-theme=light]) .sidebar .sidebar-nav .sidebar-add-subpage .icon,
  :root:not([data-theme=light]) .main-header .nav-icons a .icon,
  :root:not([data-theme=light]) .main-header .nav-icons .nav-button .icon,
  :root:not([data-theme=light]) .top-header .top-header__icon-button .icon,
  :root:not([data-theme=light]) .top-header .left-icons a .icon,
  :root:not([data-theme=light]) .top-header .right-icons a .icon,
  :root:not([data-theme=light]) .top-header .account-menu__item .icon,
  :root:not([data-theme=light]) .content-header .icon,
  :root:not([data-theme=light]) .app-scope .page-actions .icon,
  :root:not([data-theme=light]) .app-scope .page-list-toggle .icon,
  :root:not([data-theme=light]) .app-scope .page-slug-row .icon,
  :root:not([data-theme=light]) .app-scope .collections-list-toggle .icon,
  :root:not([data-theme=light]) .app-scope .add-page-btn .icon,
  :root:not([data-theme=light]) .app-scope .top-header #account-menu-toggle img,
  :root:not([data-theme=light]) .icon-btn img,
  :root:not([data-theme=light]) .icon-btn svg {
    color: #fff;
    fill: #fff;
    stroke: #fff;
    filter: brightness(0) invert(1);
    opacity: 1;
  }
}
:root[data-theme=dark] .sidebar .sidebar-nav .sidebar-item .icon,
:root[data-theme=dark] .sidebar .sidebar-nav .sidebar-add-subpage .icon,
:root[data-theme=dark] .main-header .nav-icons a .icon,
:root[data-theme=dark] .main-header .nav-icons .nav-button .icon,
:root[data-theme=dark] .top-header .top-header__icon-button .icon,
:root[data-theme=dark] .top-header .left-icons a .icon,
:root[data-theme=dark] .top-header .right-icons a .icon,
:root[data-theme=dark] .top-header .account-menu__item .icon,
:root[data-theme=dark] .content-header .icon,
:root[data-theme=dark] .app-scope .page-actions .icon,
:root[data-theme=dark] .app-scope .page-list-toggle .icon,
:root[data-theme=dark] .app-scope .page-slug-row .icon,
:root[data-theme=dark] .app-scope .collections-list-toggle .icon,
:root[data-theme=dark] .app-scope .add-page-btn .icon,
:root[data-theme=dark] .app-scope .top-header #account-menu-toggle img,
:root[data-theme=dark] .icon-btn img,
:root[data-theme=dark] .icon-btn svg {
  color: #fff;
  fill: #fff;
  stroke: #fff;
  filter: brightness(0) invert(1);
  opacity: 1;
}

/* =============================================================================
   components/_inline-add.scss — Inline sliding form for quick adds
   ============================================================================= */
.inline-create-field {
  position: absolute;
  top: 50%;
  left: calc(100% + 8px);
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: var(--studio-inline-create-gap);
  overflow: visible;
  width: 0;
  opacity: 0;
  transition: width var(--motion-duration-slow) var(--motion-ease-standard), opacity var(--motion-duration-slow) var(--motion-ease-standard);
}

.inline-create-field.open {
  width: min(var(--studio-inline-create-width), 100vw - 128px);
  opacity: 1;
}

.inline-create-field input {
  flex: 1;
  min-width: 0;
  height: var(--studio-control-size);
  padding: 0 18px;
  border: 1px solid var(--studio-inline-create-border);
  border-radius: var(--studio-radius-control);
  background-color: var(--studio-inline-create-input-surface);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--studio-text);
  box-shadow: var(--studio-inline-create-shadow);
}

.inline-create-field input::placeholder {
  color: var(--studio-text-muted);
}

.inline-create-field input:focus {
  outline: none;
  box-shadow: var(--studio-focus-ring);
  background-color: var(--studio-inline-create-surface);
}

.inline-create-field button {
  padding: 0;
}

.inline-create-field .icon-button {
  width: var(--studio-control-size);
  min-width: var(--studio-control-size);
  height: var(--studio-control-size);
  padding: 0;
  background: var(--studio-inline-create-surface);
  border: 1px solid var(--studio-inline-create-border);
  border-radius: var(--studio-radius-control);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--studio-inline-create-shadow);
  cursor: pointer;
}

.inline-create-field .icon-button img {
  width: 20px;
  height: 20px;
}

.inline-create-field .icon-list {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + var(--studio-inline-create-gap));
  background: var(--studio-inline-create-surface);
  border: 1px solid var(--studio-inline-create-border);
  border-radius: var(--studio-radius-panel);
  padding: 8px;
  gap: 8px;
  z-index: 10;
  width: min(var(--studio-inline-create-width), 100vw - 128px);
  max-height: 200px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(24px, 1fr));
}

.inline-create-field .icon-list.open {
  display: grid;
}

.inline-create-field .icon-list button {
  background: none;
  border: none;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.inline-create-field .icon-list button img {
  width: 24px;
  height: 24px;
}

#subpage-floating-field,
#workspace-floating-field {
  background: transparent;
  padding: var(--studio-inline-create-padding);
  border: 0;
  border-radius: var(--studio-radius-panel);
  box-shadow: var(--studio-inline-create-panel-shadow);
  box-sizing: border-box;
}

/* =============================================================================
   components/_designer-loader.scss — Shared skeleton loaders & error states
   ============================================================================= */
.designer-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.designer-loader {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background: var(--color-card);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}
.designer-loader::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 45%, rgba(255, 255, 255, 0) 100%);
  transform: translateX(-100%);
  animation: designer-loader-shimmer 1.6s infinite;
}
.designer-loader__bar {
  position: relative;
  display: block;
  height: 0.875rem;
  width: var(--loader-bar-width, 100%);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(226, 232, 240, 0.7), rgba(148, 163, 184, 0.25), rgba(226, 232, 240, 0.7));
  background-size: 200% 100%;
  animation: designer-loader-bar 1.2s ease-in-out infinite;
  animation-delay: var(--loader-bar-delay, 0s);
  mix-blend-mode: plus-lighter;
}
.designer-loader--sidebar {
  min-height: 28rem;
}
.designer-loader--panel {
  min-height: 20rem;
}
.designer-loader--section {
  min-height: 8rem;
}

@keyframes designer-loader-shimmer {
  0% {
    transform: translateX(-100%);
  }
  60% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(100%);
  }
}
@keyframes designer-loader-bar {
  0% {
    background-position: 200% 0;
    opacity: 0.6;
  }
  50% {
    background-position: 0 0;
    opacity: 1;
  }
  100% {
    background-position: -200% 0;
    opacity: 0.6;
  }
}
@media (prefers-reduced-motion: reduce) {
  .designer-loader::before,
  .designer-loader__bar {
    animation-duration: 3.2s;
  }
}
.designer-load-error {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem;
  border-radius: 16px;
  border: 1px solid rgba(217, 48, 37, 0.35);
  border: 1px solid color-mix(in srgb, var(--color-error) 55%, transparent);
  background: rgba(217, 48, 37, 0.08);
  background: color-mix(in srgb, var(--color-error) 8%, var(--color-card));
  box-shadow: 0 6px 18px rgba(217, 48, 37, 0.08);
}
.designer-load-error__title {
  margin: 0;
  font-weight: 600;
  color: var(--color-error);
}
.designer-load-error__message {
  margin: 0;
  color: var(--color-text);
  font-size: 0.95rem;
  line-height: 1.4;
}
.designer-load-error--sidebar {
  min-height: 12rem;
}
.designer-load-error--panel {
  min-height: 10rem;
}

.page-list-card {
  margin: 0 auto;
  min-width: 280px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.add-page-btn {
  width: 22px;
  height: 22px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.add-page-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.app-scope .add-page-btn.icon-button {
  width: var(--studio-control-size);
  height: var(--studio-control-size);
  opacity: 1;
}

.page-list-inline-error {
  margin: 0 16px 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--color-error) 35%, transparent);
  background: color-mix(in srgb, var(--color-error) 10%, var(--studio-surface-solid));
  color: var(--color-error);
  font-size: 0.92rem;
}

.page-list-table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  padding: 0 0 6px;
  overscroll-behavior-inline: contain;
}

.page-list-table {
  width: 100%;
  min-width: 960px;
  border-collapse: separate;
  border-spacing: 0 10px;
  color: var(--studio-text);
  font-family: var(--font-body);
  table-layout: fixed;
}
.page-list-table th {
  padding: 0 12px 2px;
  color: var(--studio-text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: left;
}
.page-list-table th:nth-child(1) {
  width: 26%;
}
.page-list-table th:nth-child(2) {
  width: 22%;
}
.page-list-table th:nth-child(3) {
  width: 90px;
}
.page-list-table th:nth-child(4) {
  width: 210px;
}
.page-list-table th:nth-child(5) {
  width: 220px;
}
.page-list-table td {
  box-sizing: border-box;
  padding: 12px;
  vertical-align: middle;
  background: var(--studio-surface-muted);
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;
  transition: border-color var(--motion-duration-fast) var(--motion-ease-standard);
}
.page-list-table td:first-child {
  border-left: 1px solid transparent;
  border-radius: var(--studio-field-radius) 0 0 var(--studio-field-radius);
}
.page-list-table td:last-child {
  border-right: 1px solid transparent;
  border-radius: 0 var(--studio-field-radius) var(--studio-field-radius) 0;
}

.page-list-row:hover > td,
.page-list-row-expanded > td {
  border-color: var(--studio-border-strong);
}

.page-list-row[data-parent-row-id] .page-list-title-inner {
  position: relative;
}
.page-list-row[data-parent-row-id] .page-list-title-inner::before {
  content: "";
  position: absolute;
  left: calc((var(--page-depth) - 1) * 24px + 15px);
  top: -18px;
  width: 14px;
  height: calc(50% + 18px);
  border-left: 2px solid var(--studio-border-strong);
  border-bottom: 2px solid var(--studio-border-strong);
  border-bottom-left-radius: 5px;
  pointer-events: none;
}

.page-list-row[data-parent-row-id] > td:first-child {
  border-left-color: var(--studio-border-strong);
}

.page-list-actions-cell {
  display: table-cell;
}

.page-list-title-inner,
.page-slug-row {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.page-list-toggle,
.page-list-toggle-placeholder {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
}

.app-scope .page-list-toggle {
  flex-basis: 32px;
  width: 32px;
  height: 32px;
  box-shadow: none;
}

.page-list-title-cell .page-name,
.page-list-slug-cell .page-slug {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-list-title-cell .page-name {
  color: var(--studio-text);
  font-size: 0.94rem;
  font-weight: 650;
}

.page-list-slug-cell .page-slug,
.page-list-status-cell {
  color: var(--studio-text-muted);
  font-size: 0.88rem;
}

.page-list-home-indicator,
.page-list-home-button {
  flex: 0 0 32px;
}

.app-scope .page-slug-row .page-list-home-button {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  box-shadow: none;
}

.page-list-home-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-list-home-indicator .icon {
  width: 17px;
  height: 17px;
}

.page-actions.page-list-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  white-space: nowrap;
}

.app-scope .page-list-actions .page-action-button {
  flex-basis: 32px;
  width: 32px;
  height: 32px;
}

.app-scope .page-list-actions .page-action-button .icon {
  width: 16px;
  height: 16px;
  opacity: 0.78;
  transform: none;
}

.page-list-empty-row td {
  border: 0;
  border-radius: var(--studio-field-radius);
}

.collections-list-table-wrap {
  overflow-x: auto;
  padding-bottom: 4px;
}

.collections-list-table {
  width: 100%;
  min-width: 680px;
  border-collapse: separate;
  border-spacing: 0 10px;
  font-family: var(--font-body);
}
.collections-list-table thead th {
  padding: 0 12px 2px;
  text-align: left;
  color: var(--studio-text-muted, #667085);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}
.collections-list-table tbody td {
  vertical-align: middle;
}

.collections-list-table > tbody > tr.collections-list-row > td {
  padding: 14px 12px;
  background: var(--studio-surface-muted);
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
  transition: border-color 0.16s, box-shadow 0.16s;
}

.collections-list-table > tbody > tr.collections-list-row > td:first-child {
  border-left: 1px solid transparent;
  border-radius: 8px 0 0 8px;
}

.collections-list-table > tbody > tr.collections-list-row > td:last-child {
  border-right: 1px solid transparent;
  border-radius: 0 8px 8px 0;
}

.collections-list-table > tbody > tr.collections-list-row:hover > td,
.collections-list-table > tbody > tr.collections-list-row-expanded > td {
  border-color: var(--user-color);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.collections-list-title-inner {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.collections-list-toggle,
.collections-list-toggle-placeholder {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
}

.collections-list-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}
.collections-list-toggle .expand-collection,
.collections-list-toggle img {
  width: 18px;
  height: 18px;
  opacity: 0.72;
  transition: opacity 0.14s, transform 0.14s;
}
.collections-list-toggle:hover .expand-collection, .collections-list-toggle:hover img {
  opacity: 1;
  transform: scale(1.08);
}

.collections-list-empty-row .empty-state {
  color: var(--studio-text-muted);
  padding: 20px 0 8px 0;
  text-align: center;
  font-size: 16px;
  font-family: var(--font-body);
  text-align: left;
}

.collections-list-child-row > td {
  padding: 0 0 10px 34px;
}

.collections-list-child-table {
  width: calc(100% - 8px);
  border-collapse: collapse;
  border-left: 2px solid var(--studio-border-strong);
  background: var(--studio-surface-solid);
}
.collections-list-child-table th,
.collections-list-child-table td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--studio-border);
}
.collections-list-child-table th {
  color: var(--studio-text-muted, #667085);
  font-size: 12px;
  font-weight: 600;
}
.collections-list-child-table tr:last-child td {
  border-bottom: none;
}

.page-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 4px;
}
.page-filters .filter {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-dark);
  background: none;
  border: none;
  padding: 5px 12px;
  cursor: pointer;
  position: relative;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.page-filters .filter::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 3px;
  background: var(--user-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.page-filters .filter:hover {
  opacity: 1;
}
.page-filters .filter.active {
  opacity: 1;
}
.page-filters .filter.active::after {
  transform: scaleX(1);
}

.page-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.page-list .empty-state {
  color: var(--studio-text-muted);
  padding: 20px 0 8px 0;
  text-align: center;
  font-size: 16px;
  font-family: var(--font-body);
}

.page-list li {
  border-radius: 8px;
  background: var(--studio-surface-muted);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  padding: 14px 12px 10px 14px;
  gap: 4px;
  transition: box-shadow 0.16s;
  border: 1px solid transparent;
}
.page-list li:hover {
  border: 1px solid var(--user-color);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.page-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.page-name {
  font-family: var(--font-body);
  font-size: 1.04rem;
  color: var(--studio-text);
  font-weight: 600;
  letter-spacing: 0.01em;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 6px 2px 0;
  border-radius: 6px;
  outline: none;
  border: 1px solid transparent;
  transition: border 0.18s;
}
.page-name[contenteditable=true]:focus {
  border: 1px solid var(--studio-border-strong);
  background: var(--studio-surface-solid);
  color: var(--studio-text);
}

.page-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: flex-end;
}
.page-actions .icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  fill: #888;
  cursor: pointer;
  opacity: 0.72;
  transition: fill 0.16s, opacity 0.14s, transform 0.14s;
}
.page-actions .icon:hover {
  fill: var(--user-color);
  opacity: 1;
  transform: scale(1.13);
}

.page-slug-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.page-slug {
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--studio-text-muted);
  padding: 2px 7px 2px 0;
  border-radius: 6px;
  min-width: 40px;
  background: none;
  outline: none;
  border: 1px solid transparent;
  transition: border 0.18s;
}
.page-slug[contenteditable=true]:focus {
  border: 1px solid var(--studio-border-strong);
  background: var(--studio-surface-solid);
  color: var(--studio-text);
}

.page-slug-row .home-indicator,
.page-slug-row .set-home {
  width: 18px;
  height: 18px;
}

.page-slug-row .set-home {
  cursor: pointer;
  opacity: 0.8;
}
.page-slug-row .set-home:hover {
  opacity: 1;
}

.page-parent-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.page-parent-label {
  display: grid;
  gap: 6px;
  font-size: 0.86rem;
  color: var(--studio-text-muted);
}

.page-parent-label .custom-select {
  width: 100%;
  min-width: 0;
  font-size: 0.84rem;
}

.page-parent-label .custom-select .display {
  min-height: 36px;
  padding-inline: 12px;
}

.page-list-parent-cell .page-parent-row {
  margin-top: 0;
}

.page-list-parent-cell .page-parent-label-text,
.page-list-parent-cell .page-parent-feedback:empty {
  display: none;
}

.page-parent-feedback {
  min-height: 16px;
  font-size: 0.79rem;
  color: var(--studio-text-muted);
}

.page-parent-feedback.is-success {
  color: color-mix(in srgb, #1d7f3f 84%, var(--studio-text));
}

.page-parent-feedback.is-error {
  color: var(--color-error);
}

@media (max-width: 1000px) {
  .page-list-table {
    display: block;
    min-width: 0;
  }
  .page-list-table thead {
    display: none;
  }
  .page-list-table tbody {
    display: grid;
    gap: 12px;
  }
  .page-list-table .page-list-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(210px, 0.9fr);
    gap: 10px 18px;
    padding: 14px;
    border: 1px solid var(--studio-border);
    border-radius: var(--studio-radius-panel);
    background: var(--studio-surface-muted);
  }
  .page-list-table .page-list-row > td {
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .page-list-table .page-list-title-cell {
    grid-column: 1;
    grid-row: 1;
  }
  .page-list-table .page-list-status-cell {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
  }
  .page-list-table .page-list-slug-cell {
    grid-column: 1;
    grid-row: 2;
  }
  .page-list-table .page-list-parent-cell {
    grid-column: 2;
    grid-row: 2;
  }
  .page-list-table .page-list-actions {
    grid-column: 1/-1;
    grid-row: 3;
    justify-content: flex-end;
    padding-top: 2px;
  }
  .page-list-table .page-parent-row {
    width: 100%;
    margin-top: 0;
  }
  .page-list-row:hover > td,
  .page-list-row-expanded > td {
    background: transparent;
  }
}
@media (max-width: 680px) {
  .page-list-table .page-list-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .page-list-table .page-list-title-cell,
  .page-list-table .page-list-status-cell,
  .page-list-table .page-list-slug-cell,
  .page-list-table .page-list-parent-cell,
  .page-list-table .page-list-actions {
    grid-column: 1;
    grid-row: auto;
    justify-content: flex-start;
  }
  .page-list-table .page-list-actions {
    flex-wrap: wrap;
  }
}
.page-stats-widget {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  font-family: var(--font-body);
  color: var(--studio-text);
}
.page-stats-widget__title {
  margin: 0 0 16px;
  font-family: var(--font-heading);
  font-size: 22px;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--studio-text);
}
.page-stats-widget__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.page-stats-widget__item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  color: var(--studio-text-muted);
  font-size: 15px;
  line-height: 1.38;
}
.page-stats-widget__label {
  color: inherit;
}
.page-stats-widget__value {
  color: var(--studio-text);
  font-weight: 500;
}

#pagePickerGrid {
  width: 100%;
}

.page-manager {
  display: grid;
  gap: 24px;
  min-width: 0;
  width: 100%;
  color: var(--studio-text);
  font-family: var(--font-body);
  container: page-manager/inline-size;
}

.page-manager [hidden],
#content[data-dashboard-layout=fixed] :is(#widgets-toggle-inline, #edit-toggle) {
  display: none !important;
}

:is(.page-manager, .navigation-studio)[aria-label]::after,
:is(.page-manager, .navigation-studio) [aria-label]::after {
  content: none;
  display: none;
}

.page-manager__header,
.page-manager__actions,
.page-manager__save {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.page-manager__header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.page-manager__header > div:first-child {
  display: none;
}

.page-manager__header > .page-manager__layout-context {
  grid-column: 2;
}

.page-manager__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}
.page-manager__header > button, .page-manager__header > .page-manager__header-actions {
  justify-self: end;
}

.page-manager__header-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.page-manager__layout-context {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 250px;
  text-align: center;
  overflow-wrap: anywhere;
}
.page-manager__layout-context > span, .page-manager__layout-context > small {
  font-size: 11px;
  color: var(--studio-text-muted);
}
.page-manager__layout-context > a {
  font-size: 13px;
  font-weight: 600;
  color: var(--studio-text);
  text-decoration: none;
}
.page-manager__layout-context > a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 760px) {
  .page-manager__header {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .page-manager__layout-context {
    grid-row: 2;
    grid-column: 1/-1;
    justify-self: center;
  }
}
.page-manager__header p {
  margin: 6px 0 0;
  color: var(--studio-text-muted);
  font-size: 0.82rem;
}

.page-manager__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 360px);
  gap: 28px;
  align-items: start;
}

.page-manager__structure {
  min-width: 0;
}

.page-manager__search input,
.page-manager__form input {
  box-sizing: border-box;
  width: 100%;
  min-height: var(--studio-control-size);
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-field-radius);
  padding: 8px 12px;
  background: var(--studio-surface-solid);
  color: var(--studio-text);
  font: inherit;
  font-size: 0.85rem;
}

.page-manager__search input {
  background: var(--studio-surface-muted);
}

.page-manager__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--studio-border);
}

.page-manager__filters .filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 10px;
  border: 0;
  border-radius: var(--studio-field-radius);
  background: transparent;
  color: var(--studio-text-muted);
  box-shadow: none;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.page-manager__filters .filter[aria-pressed=true] {
  color: var(--studio-text);
  background: var(--studio-surface-muted);
}

.page-manager__filters .filter span {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--studio-text-muted);
}

.page-manager__tree {
  padding-top: 12px;
}

.page-manager__row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: min(var(--page-depth) * 20px, 100px);
  position: relative;
  border-radius: var(--studio-field-radius);
}

.page-manager__toggle-space {
  display: none;
}

.page-manager__toggle {
  flex: 0 0 28px;
  width: 28px;
  height: 32px;
  order: 2;
}

.page-manager__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: var(--studio-field-radius);
  background: transparent;
  color: var(--studio-text-muted);
  cursor: pointer;
}

.page-manager__toggle:disabled {
  cursor: default;
}

.page-manager__select {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  padding: 12px;
  border: 0;
  border-radius: var(--studio-field-radius);
  color: var(--studio-text);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.page-manager__row:has(.page-manager__select:hover),
.page-manager__toggle:hover:not(:disabled) {
  background: var(--studio-surface-muted);
}

.page-manager__row:has(.page-manager__select[aria-pressed=true]) {
  background: color-mix(in srgb, var(--brand) 7%, var(--studio-surface-solid));
}

.page-manager__identity {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.page-manager__identity strong {
  font-size: 0.87rem;
  font-weight: 600;
}

.page-manager__identity > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-manager__identity > span,
.page-manager__home,
.page-manager__status {
  color: var(--studio-text-muted);
  font-size: 0.76rem;
}

.page-manager__status {
  flex-shrink: 0;
}

.page-manager__status[data-status=published]::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--color-success);
  vertical-align: middle;
}

.page-manager__page-icon {
  display: flex;
  flex: 0 0 16px;
  color: var(--studio-text-muted);
}

.page-manager .icon {
  width: 16px;
  height: 16px;
}

.page-manager__details {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-panel);
  background: var(--studio-surface-muted);
}

.page-manager__back {
  display: none !important;
}

.page-manager__details-heading > span {
  color: var(--studio-text-muted);
  font-size: 0.68rem;
  letter-spacing: 0.07em;
}

.page-manager__details-heading h3 {
  margin: 6px 0 18px;
  font-size: 1.1rem;
  overflow-wrap: anywhere;
}

.page-manager__actions {
  justify-content: flex-start;
  margin-bottom: 20px;
}

.page-manager__form {
  display: grid;
  gap: 16px;
}

.page-manager__form label {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--studio-text-muted);
}

.page-manager__form small {
  font-size: 0.72rem;
  line-height: 1.5;
}

.page-manager__form .custom-select > .display {
  background: var(--studio-surface-solid);
}

.page-manager__save,
.page-manager__secondary {
  padding-top: 16px;
  border-top: 1px solid var(--studio-border);
}

.page-manager__save-state,
.page-manager__hint,
.page-manager__feedback,
.page-manager__empty {
  color: var(--studio-text-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.page-manager__feedback:empty {
  display: none;
}

.page-manager__feedback[data-error=true] {
  color: var(--color-error);
}

.page-manager__empty {
  padding: 24px 12px;
}

.page-manager__empty strong {
  color: var(--studio-text);
}

.page-manager__secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: 20px;
}

.app-scope .page-manager__secondary .button {
  min-width: 0;
  font-weight: 400;
  color: var(--studio-text-muted);
}

.app-scope .page-manager__secondary .page-manager__delete {
  color: var(--color-error);
}

.page-manager :is(input, button, select):focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 60%, transparent);
  outline-offset: 2px;
}

@container page-manager (max-width: 800px) {
  .page-manager__layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .page-manager__back {
    display: inline-flex !important;
    margin-bottom: 16px;
  }
}
@container page-manager (max-width: 480px) {
  .page-manager__row {
    margin-left: min(var(--page-depth) * 12px, 48px);
  }
  .page-manager__select {
    gap: 8px;
    padding: 10px 8px;
  }
  .page-manager__home,
  .page-manager__page-icon {
    display: none;
  }
}
.page-manager__layout {
  grid-template-columns: minmax(0, 1fr);
}

.page-manager__row:has(> .is-inline) {
  background: var(--studio-surface-muted);
}

.page-manager__row:has(> .is-inline) > .page-manager__select {
  display: none;
}

.page-manager__details.is-inline {
  flex: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.page-manager__details.is-inline .page-manager__form {
  flex: 1 1 180px;
  gap: 2px;
}
.page-manager__details.is-inline .page-manager__form > label > span,
.page-manager__details.is-inline .page-manager__form small,
.page-manager__details.is-inline .page-manager__form > label:nth-of-type(n + 3) {
  display: none;
}
.page-manager__details.is-inline .page-manager__form input {
  min-height: 28px;
  padding: 3px 6px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
.page-manager__details.is-inline .page-manager__form input:focus {
  background: var(--studio-surface-solid);
}
.page-manager__details.is-inline .page-manager__form input[name=title] {
  font-weight: 600;
  color: var(--studio-text);
}
.page-manager__details.is-inline .page-manager__form input[name=slug] {
  color: var(--studio-text-muted);
  font-size: 12px;
}
.page-manager__details.is-inline .page-manager__save {
  border: 0;
  padding: 0;
  justify-content: flex-start;
  gap: 8px;
}
.page-manager__details.is-inline .page-manager__save:has(button:disabled) {
  display: none;
}

.page-manager__row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}
.page-manager__row-actions .page-manager__actions {
  margin: 0;
  gap: 6px;
}

.page-manager__details.is-inline .page-manager__form > label:first-of-type {
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-manager__details.is-inline .page-manager__form > label:first-of-type input {
  width: auto;
  min-width: 60px;
  max-width: 100%;
  flex: 0 1 auto;
  field-sizing: content;
}
.page-manager__details.is-inline .page-manager__form > label:first-of-type > .page-manager__status {
  display: inline;
  flex: 0 0 auto;
}

.page-manager__row-actions .icon-button {
  background: transparent;
  box-shadow: none;
}
.page-manager__row-actions .icon-button:hover:not(:disabled) {
  background: var(--studio-surface-solid);
  box-shadow: var(--studio-shadow-control);
}
.page-manager__row-actions .icon-button:focus-visible {
  box-shadow: var(--studio-focus-ring);
}

.page-manager--creation-dialog {
  padding: 0;
}
.page-manager--creation-dialog .page-manager__details {
  padding: 0;
  border: 0;
  background: transparent;
}
.page-manager--creation-dialog .page-manager__details-heading, .page-manager--creation-dialog [data-action=cancel], .page-manager--creation-dialog .page-manager__save {
  display: none;
}

.page-manager__details.is-inline .page-manager__form > label:nth-of-type(2) {
  display: flex;
  align-items: center;
  gap: 4px;
}
.page-manager__details.is-inline .page-manager__form > label:nth-of-type(2) input {
  width: auto;
  min-width: 60px;
  max-width: 100%;
  field-sizing: content;
}
.page-manager__details.is-inline .page-manager__form > label:nth-of-type(2) .icon-button {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  background: transparent;
  box-shadow: none;
}
.page-manager__details.is-inline .page-manager__form > label:nth-of-type(2) .icon-button:hover:not(:disabled) {
  background: var(--studio-surface-solid);
  box-shadow: var(--studio-shadow-control);
}

.page-manager__header-actions .button.secondary {
  --bg: var(--studio-surface-solid);
  border: 1px solid var(--studio-border);
  box-shadow: none;
}

.page-manager__header-actions [data-action=add] {
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.page-manager__header-actions [data-action=add] .icon + span {
  margin-left: 0;
}

.page-manager__header-actions [hidden] {
  display: none;
}

.page-manager__header-actions > .icon-button {
  background: transparent;
  box-shadow: none;
  border: 0;
}
.page-manager__header-actions > .icon-button:hover {
  background: var(--studio-surface-muted);
}

.app-scope .page-manager__form input:focus {
  outline: none;
  box-shadow: none;
  border: 1px solid var(--studio-border-strong);
}

.app-scope .page-manager__details.is-inline .page-manager__form input:focus {
  background: transparent;
  border-color: transparent;
  border-bottom-color: var(--studio-border-strong);
  border-radius: 0;
}

.page-manager--creation-dialog {
  container-type: normal;
}

.page-manager__identity-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-manager__hover-actions {
  visibility: hidden;
}

.page-manager__row:hover > .page-manager__hover-actions,
.page-manager__row:focus-within > .page-manager__hover-actions {
  visibility: visible;
}

.page-manager__filter-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--studio-border);
}
.page-manager__filter-toolbar .page-manager__filters {
  flex: 1;
  border: 0;
}
.page-manager__filter-toolbar .page-manager__header-actions {
  flex: 0 0 auto;
  align-items: center;
}

.page-manager__row {
  min-height: 72px;
}
.page-manager__row > .page-manager__toggle, .page-manager__row > .page-manager__toggle-space {
  order: 0;
  flex: 0 0 28px;
  width: 28px;
  display: block;
}

.page-manager__select, .page-manager__details.is-inline {
  gap: 12px;
  padding: 8px 12px;
}

.page-manager__details.is-inline {
  flex-wrap: nowrap;
}

.page-manager__identity {
  gap: 0;
}

.page-manager__identity-line, .page-manager__address-line {
  height: 28px;
}

.page-manager__identity-line .page-name {
  color: var(--studio-text);
  flex: 0 1 auto;
}

.page-manager .page-manager__status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 2px 4px;
  font-size: 13px;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-decoration: none;
  width: auto;
  flex: 0 0 auto;
}
.page-manager .page-manager__status .icon {
  width: 12px;
  height: 12px;
}

.page-manager__address-line {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-manager__hover-link {
  visibility: hidden;
}

.page-manager__address-line .icon-button {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  background: transparent;
  box-shadow: none;
}

.page-manager__row:hover .page-manager__hover-link,
.page-manager__row:focus-within .page-manager__hover-link {
  visibility: visible;
}

.page-manager__details.is-inline .page-manager__form {
  gap: 0;
}

.page-manager__details.is-inline .page-manager__form > label {
  width: fit-content;
  max-width: 100%;
  justify-self: start;
}

.page-manager__details.is-inline .page-manager__form input {
  padding-inline: 0;
  font-size: 0.87rem;
}

.page-manager__row > .page-manager__row-actions {
  padding-right: 12px;
}

@container page-manager (max-width: 650px) {
  .page-manager__filter-toolbar {
    flex-wrap: wrap;
    gap: 4px;
  }
  .page-manager__filter-toolbar .page-manager__header-actions {
    margin-left: auto;
  }
  .page-manager__row-actions {
    gap: 2px;
  }
}
.media-explorer-dialog {
  width: min(1040px, 100vw - 32px);
  max-width: none;
  height: min(760px, 100vh - 32px);
  padding: 18px;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-panel);
  background: var(--studio-surface-solid);
  color: var(--studio-text);
  box-shadow: var(--studio-shadow-lift);
}

.media-explorer-dialog::backdrop {
  background: rgba(0, 0, 0, 0.32);
}

.media-explorer-dialog__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-control);
  background: var(--studio-surface-solid);
  color: var(--studio-text);
  cursor: pointer;
}

.media-explorer-dialog__close img {
  width: 16px;
  height: 16px;
}

.media-explorer-dialog__close::after {
  display: none !important;
}

.media-explorer {
  --media-command-size: 34px;
  container: media-workspace/inline-size;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  height: 100%;
  min-height: min(660px, 100vh - 180px);
  min-width: 0;
  color: var(--studio-text);
}
.media-explorer, .media-explorer * {
  box-sizing: border-box;
}
.media-explorer [hidden] {
  display: none !important;
}
.media-explorer::after, .media-explorer [aria-label]::after, .media-explorer button::after {
  display: none !important;
}
.media-explorer button, .media-explorer input {
  font: inherit;
}
.media-explorer button {
  box-shadow: none;
}
.media-explorer button:focus-visible, .media-explorer a:focus-visible, .media-explorer input:focus-visible {
  outline: 2px solid var(--user-color);
  outline-offset: 2px;
}
.media-explorer img:not(.media-thumbnail) {
  filter: var(--studio-icon-filter);
}

.media-explorer--picker {
  min-height: 0;
  padding-top: 12px;
}

.media-explorer-dialog__close img {
  filter: var(--studio-icon-filter);
}

.media-explorer__heading h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.media-explorer--manage > .media-explorer__heading {
  display: none;
}

.media-explorer__heading p {
  margin: 6px 0 0;
  color: var(--studio-text-muted);
  font-size: 13px;
}

.media-explorer__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.media-explorer__commands, .media-explorer__nav, .media-explorer__views {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.media-explorer__commands {
  flex-wrap: wrap;
  gap: 6px;
}

.media-explorer__views {
  flex: 0 0 auto;
  padding: 3px;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-control);
}

.media-command {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  width: var(--media-command-size);
  min-height: var(--media-command-size);
  padding: 6px;
  border: 1px solid transparent;
  border-radius: var(--studio-radius-control);
  background: transparent;
  color: var(--studio-text);
  cursor: pointer;
  font-size: 12px !important;
}

.media-command--label {
  width: auto;
  padding-inline: 10px;
  white-space: nowrap;
}

.media-command img {
  width: 16px;
  height: 16px;
}

.media-command:hover:not(:disabled), .media-command[aria-pressed=true] {
  background: var(--studio-surface-muted);
  border-color: var(--studio-border);
}

.media-command.primary {
  background: var(--user-color);
  color: var(--color-on-primary, #fff);
}
.media-command.primary img {
  filter: brightness(0) invert(1);
}
.media-command.primary:hover:not(:disabled) {
  background: var(--user-color);
  opacity: 0.9;
}

.media-command:disabled {
  opacity: 0.38;
  cursor: default;
}

.media-command.danger:hover:not(:disabled) {
  color: var(--color-error);
}

.media-explorer__address {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) minmax(150px, 240px);
  gap: 10px;
  padding-block: 12px;
  border-block: 1px solid var(--studio-border);
}

.media-explorer__crumbs {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  overflow: auto;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-control);
  background: var(--studio-surface-muted);
  padding: 2px 8px;
}

.media-explorer__crumbs button {
  flex: 0 0 auto;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 6px;
  background: transparent;
  border: 0;
  color: var(--studio-text-muted);
  cursor: pointer;
}
.media-explorer__crumbs button[aria-current] {
  color: var(--studio-text);
  font-weight: 600;
}

.media-explorer__crumbs span {
  color: var(--studio-text-muted);
}

.media-explorer__search {
  width: 100%;
  min-width: 0;
  min-height: var(--media-command-size);
  padding: 6px 12px;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-control);
  background: var(--studio-surface-muted);
  color: var(--studio-text);
}

.media-explorer__body {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
  flex: 1 1 auto;
  min-height: 300px;
  min-width: 0;
}
.media-explorer__body.has-selection {
  grid-template-columns: 190px minmax(0, 1fr) 220px;
}

.media-explorer__folders {
  min-width: 0;
  overflow: auto;
  border-right: 1px solid var(--studio-border);
  padding-right: 12px;
}

.media-explorer__folders h3 {
  margin: 4px 10px 14px;
  font-size: 11px;
  color: var(--studio-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.media-explorer__folders ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.media-folder {
  display: flex;
  align-items: center;
  padding-left: calc(min(var(--folder-depth), 5) * 10px);
  min-width: 0;
}

.media-folder .media-command {
  --media-command-size: 22px;
  padding: 3px;
  border-radius: 5px;
}

.media-folder__name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  min-height: 34px;
  padding: 6px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--studio-text-muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: left;
  cursor: pointer;
  font-size: 12px !important;
}
.media-folder__name img {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}
.media-folder__name:hover {
  background: var(--studio-surface-muted);
}
.media-folder__name[aria-current] {
  background: color-mix(in srgb, var(--user-color) 10%, transparent);
  color: var(--studio-text);
  font-weight: 600;
}

.media-explorer__main {
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

.media-explorer__folder-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.media-explorer__columns, .media-explorer__items--list .media-item__main {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 82px 110px 65px;
  gap: 10px;
  align-items: center;
}

.media-explorer__columns {
  padding: 0 10px 8px;
  border-bottom: 1px solid var(--studio-border);
}

.media-explorer__columns button {
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: var(--studio-text-muted);
  text-align: left;
  cursor: pointer;
  font-size: 11px !important;
}
.media-explorer__columns button[data-direction=ascending]::before {
  content: "↑ ";
  color: var(--user-color);
}
.media-explorer__columns button[data-direction=descending]::before {
  content: "↓ ";
  color: var(--user-color);
}

.media-explorer__items {
  min-width: 0;
  padding-top: 4px;
}

.media-explorer__items--list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.media-item {
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 8px;
}

.media-item:hover {
  background: var(--studio-surface-muted);
}

.media-item.selected {
  background: color-mix(in srgb, var(--user-color) 9%, transparent);
  border-color: color-mix(in srgb, var(--user-color) 26%, transparent);
}

.media-item__main {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 9px;
  background: transparent;
  color: var(--studio-text);
  text-align: left;
  cursor: default;
  border-radius: inherit;
}

.media-item__identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.media-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.media-icon img {
  width: 20px;
  height: 20px;
}

.media-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.media-item__type, .media-item__modified, .media-item__size {
  font-size: 11px;
  color: var(--studio-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-item__size {
  text-align: right;
}

.media-explorer__items--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
  align-content: start;
}
.media-explorer__items--grid .media-item__main {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: center;
}
.media-explorer__items--grid .media-item__identity {
  width: 100%;
  flex-direction: column;
}
.media-explorer__items--grid .media-icon {
  width: 100%;
  height: 86px;
  margin-bottom: 5px;
  border-radius: 7px;
  background: var(--studio-surface-muted);
  overflow: hidden;
}
.media-explorer__items--grid .media-icon img {
  width: 38px;
  height: 38px;
}
.media-explorer__items--grid .media-icon .media-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none;
}
.media-explorer__items--grid .media-name {
  max-width: 100%;
}
.media-explorer__items--grid .media-item__modified, .media-explorer__items--grid .media-item__size {
  display: none;
}

.media-explorer__details {
  min-width: 0;
  overflow: auto;
  border-left: 1px solid var(--studio-border);
  padding-left: 18px;
}

.media-explorer__preview {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  border-radius: 10px;
  background: var(--studio-surface-muted);
  overflow: hidden;
}
.media-explorer__preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: none !important;
}
.media-explorer__preview img[src^="/assets/icons/"] {
  width: 46px;
  height: 46px;
  filter: var(--studio-icon-filter) !important;
}

.media-explorer__details h3 {
  margin: 16px 0 6px;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.media-explorer__details p {
  font-size: 12px;
  line-height: 1.5;
  color: var(--studio-text-muted);
  overflow-wrap: anywhere;
}

.media-explorer__details dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  font-size: 11px;
  margin-block: 18px;
}

.media-explorer__details dt {
  color: var(--studio-text-muted);
}

.media-explorer__details dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.media-explorer__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid var(--studio-border);
  padding-top: 12px;
}

.media-explorer__status {
  min-height: 18px;
  color: var(--studio-text-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.media-explorer__status[data-kind=error] {
  color: var(--color-error);
}

.media-explorer__empty {
  grid-column: 1/-1;
  padding: 35px 15px;
  margin: 0;
  text-align: center;
  color: var(--studio-text-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

@container media-workspace (max-width: 1050px) {
  .media-explorer__body, .media-explorer__body.has-selection {
    grid-template-columns: 155px minmax(0, 1fr);
  }
  .media-explorer__details {
    grid-column: 2;
    border: 0;
    border-top: 1px solid var(--studio-border);
    padding: 14px 0;
  }
  .media-explorer__preview {
    float: left;
    width: 100px;
    height: 100px;
    margin: 0 15px 10px 0;
  }
  .media-explorer__details h3 {
    margin-top: 0;
  }
  .media-explorer__columns, .media-explorer__items--list .media-item__main {
    grid-template-columns: minmax(100px, 1fr) 65px 65px;
  }
  .media-item__modified, .media-explorer__columns button:nth-child(3) {
    display: none;
  }
}
@container media-workspace (max-width: 650px) {
  .media-explorer__toolbar {
    align-items: flex-start;
  }
  .media-explorer__commands {
    gap: 3px;
  }
  .media-command--label {
    padding-inline: 7px;
    font-size: 11px !important;
  }
  .media-explorer__address {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .media-explorer__search {
    grid-column: 1/-1;
  }
  .media-explorer__body, .media-explorer__body.has-selection {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 14px;
  }
  .media-explorer__main {
    overflow: visible;
    min-height: 180px;
  }
  .media-explorer__details {
    overflow: visible;
  }
  .media-explorer__folders {
    max-height: 120px;
    border: 0;
    border-bottom: 1px solid var(--studio-border);
    padding-bottom: 8px;
  }
  .media-explorer__folders h3 {
    margin-bottom: 5px;
  }
  .media-explorer__details {
    grid-column: 1;
  }
  .media-explorer__columns, .media-explorer__items--list .media-item__main {
    grid-template-columns: minmax(100px, 1fr) 65px;
  }
  .media-item__type, .media-explorer__columns button:nth-child(2) {
    display: none;
  }
  .media-explorer__items--grid .media-item__type {
    display: block;
  }
  .media-explorer__nav {
    gap: 0;
  }
  .media-explorer__nav .media-command {
    --media-command-size: 28px;
  }
}
#content:has(> .settings-surface) {
  overflow: hidden;
  padding: 0 20px 20px 0;
}

body.has-content-footer .admin-panel #content[data-dashboard-layout=fixed]:has(> .settings-surface) {
  padding-bottom: 20px;
}

body:has(#content > .settings-surface) .content-header > :not(#content-breadcrumb) {
  display: none;
}

body.has-content-footer:has(#content > .settings-surface) .dev-mode-banner {
  bottom: 0;
}

.settings-surface {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  gap: 24px;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: clamp(20px, 2.4vw, 36px);
  overflow: hidden;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-panel);
  background: var(--studio-surface-solid);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--studio-text) 6%, transparent);
  color: var(--studio-text);
  container: settings-workspace/inline-size;
}
.settings-surface [hidden] {
  display: none !important;
}
.settings-surface :is(nav, [role=tablist], [role=tabpanel])[aria-label]::after {
  content: none;
  display: none;
}

.settings-surface-header {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.settings-surface-header .page-title {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  color: var(--studio-text);
}

.settings-surface-header:has(.settings-header-actions) {
  padding-right: 52px;
}

.settings-header-actions {
  position: absolute;
  right: 0;
  top: 0;
}

.settings-surface-header > :is(.page-title, .settings-hint) {
  display: none;
}

.settings-surface-header:not(:has(.settings-header-actions)) {
  display: none;
}

.settings-hint {
  margin: 0;
  max-width: 72ch;
  color: var(--studio-text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.settings-tabs {
  flex: 0 0 auto;
  min-width: 0;
}
.settings-tabs:empty {
  display: none;
}

.settings-tab-panels {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--studio-text-muted) transparent;
  padding: 2px 6px 12px 2px;
}

.settings-section {
  display: grid;
  align-content: start;
  gap: 24px;
  min-width: 0;
}

.settings-section[hidden] {
  display: none;
}

.settings-section--form {
  max-width: 800px;
}

.settings-section .form-actions .button {
  min-width: 0;
}

.settings-surface :is(.page-list-card, .user-list-card, .settings-section) {
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.settings-surface .login-strategy-title {
  display: none;
}

.settings-surface :is(.access-settings-title, .access-settings-subtitle) {
  font-size: 1.05rem;
  margin: 0;
}

.settings-surface .access-settings-badge {
  background: var(--studio-surface-muted);
  color: var(--studio-text-muted);
}

.settings-group {
  display: grid;
  gap: 16px;
  min-width: 0;
  max-width: 800px;
}

.settings-group + .settings-group {
  padding-top: 24px;
  border-top: 1px solid var(--studio-border);
}

.settings-group :is(.form-status, .access-settings-status):empty {
  display: none;
}

.settings-group .access-settings-agent-form {
  align-items: end;
}

.settings-surface .page-title-bar:empty {
  display: none;
}

.settings-save-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--studio-border);
}

.settings-save-state {
  color: var(--studio-text-muted);
  font-size: 0.85rem;
}

.settings-surface > .form-status {
  flex: 0 0 auto;
  margin: 0;
  padding: 12px 16px;
  border-radius: var(--studio-field-radius);
  color: var(--studio-text);
  background: var(--studio-surface-muted);
}
.settings-surface > .form-status:empty {
  display: none;
}
.settings-surface > .form-status[role=alert] {
  color: var(--color-error);
}

.settings-loading {
  justify-content: center;
  align-items: center;
}

.settings-surface.ui-kit {
  overflow: auto;
}

.settings-surface.ui-kit > * {
  flex-shrink: 0;
}

.settings-surface .ui-kit__jump-nav {
  top: 0;
}

.settings-panel-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.settings-surface .user-edit-widget {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 960px;
}
.settings-surface .user-edit-widget > :is(.permission-group-section, .permission-advanced-section, .form-actions, .form-status),
.settings-surface .user-edit-widget > .form-field:has(textarea) {
  grid-column: 1/-1;
}
.settings-surface .user-edit-widget > .form-status:empty {
  display: none;
}

.user-edit-widget > .permission-group-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
.user-edit-widget > .permission-group-section > strong {
  flex-basis: 100%;
}
.user-edit-widget > .permission-group-section .permission-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.permission-advanced-section {
  display: grid;
  justify-items: start;
  gap: 8px;
}
.permission-advanced-section p {
  margin: 0;
}

.bp-dialog:has(.user-permissions-dialog) {
  width: min(720px, 100%);
}

.user-permissions-dialog {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.user-permissions-dialog [hidden] {
  display: none !important;
}
.user-permissions-dialog > input {
  width: 100%;
  min-width: 0;
}
.user-permissions-dialog p {
  margin: 0;
}

.user-permissions-list {
  display: grid;
  gap: 20px;
}

.user-permissions-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.user-permissions-group legend {
  width: 100%;
  padding: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
}

.user-permissions-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 8px;
  border-top: 1px solid var(--studio-border, #e5e7eb);
  cursor: pointer;
}
.user-permissions-option > input {
  flex: 0 0 auto;
  margin: 3px 0 0;
}
.user-permissions-option > span {
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.user-permissions-option small {
  color: var(--studio-text-muted, #64748b);
  font-size: 12px;
}
.user-permissions-option:hover {
  background: var(--studio-surface-muted, #f6f7f8);
}

.settings-surface .login-strategy-edit {
  max-width: 800px;
}

.settings-surface :is(.users-list, .roles-list, .login-strategies-list) {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
}
.settings-surface :is(.users-list, .roles-list, .login-strategies-list) > li {
  padding: 18px 4px;
  border: 0;
  border-bottom: 1px solid var(--studio-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--studio-text);
}

.settings-surface .users-list a {
  color: var(--studio-text);
  text-decoration: none;
  font-weight: 600;
}

.settings-surface :is(.page-name-row, .login-strategy-name-row) {
  flex-wrap: wrap;
}

.settings-surface :is(.login-strategy-desc, .login-strategy-scope, .access-settings-tips) {
  color: var(--studio-text-muted);
}

.sidebar.settings-sidebar {
  width: 224px;
  padding: 16px;
}
.sidebar.settings-sidebar .sidebar-nav {
  align-items: stretch;
}
.sidebar.settings-sidebar .settings-nav-group {
  margin: 20px 10px 8px;
  color: var(--studio-text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.sidebar.settings-sidebar .sidebar-nav .sidebar-item {
  width: 100%;
  height: auto;
  min-height: 40px;
  margin: 2px 0;
  padding: 10px;
  gap: 10px;
  justify-content: flex-start;
  border-radius: var(--studio-field-radius);
  background: transparent;
  box-shadow: none;
  color: var(--studio-text-muted);
  text-decoration: none;
}
.sidebar.settings-sidebar .sidebar-nav .sidebar-item::before, .sidebar.settings-sidebar .sidebar-nav .sidebar-item::after {
  content: none;
  display: none;
}
.sidebar.settings-sidebar .sidebar-nav .sidebar-item .icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
}
.sidebar.settings-sidebar .sidebar-nav .sidebar-item .label {
  position: static;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  white-space: normal;
  font-size: 0.88rem;
}
.sidebar.settings-sidebar .sidebar-nav .sidebar-item:hover, .sidebar.settings-sidebar .sidebar-nav .sidebar-item.active {
  color: var(--studio-text);
  background: var(--studio-surface-muted);
}
.sidebar.settings-sidebar .sidebar-nav .sidebar-item.active {
  font-weight: 600;
}
.sidebar.settings-sidebar .sidebar-nav .sidebar-item:focus-visible {
  outline: 2px solid var(--studio-text);
  outline-offset: -2px;
}

@container settings-workspace (max-width: 680px) {
  .settings-surface .user-edit-widget {
    grid-template-columns: minmax(0, 1fr);
  }
  .settings-surface .modules-access-layout {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
  }
  .settings-surface .modules-access-layout > .modules-list-mount {
    max-height: 36vh;
  }
  .settings-save-bar > .button {
    flex: 1 1 auto;
  }
}
@media (max-width: 760px) {
  .main-content:has(.settings-sidebar) {
    flex-direction: column;
  }
  .admin-panel:has(#content[data-dashboard-layout=fixed]) .sidebar.settings-sidebar {
    width: 100%;
    height: auto;
    padding: 4px 12px 12px;
    overflow: visible;
  }
  .admin-panel:has(#content[data-dashboard-layout=fixed]) .sidebar.settings-sidebar .sidebar-nav {
    flex-direction: row;
    gap: 4px;
    overflow-x: auto;
  }
  .admin-panel:has(#content[data-dashboard-layout=fixed]) .sidebar.settings-sidebar .settings-nav-group {
    display: none;
  }
  .admin-panel:has(#content[data-dashboard-layout=fixed]) .sidebar.settings-sidebar .sidebar-item {
    flex: 0 0 auto;
    width: auto;
    padding: 10px 12px;
  }
  .admin-panel:has(#content[data-dashboard-layout=fixed]) .sidebar.settings-sidebar .sidebar-item .label {
    white-space: nowrap;
  }
  #content:has(> .settings-surface) {
    padding: 0 12px 12px;
  }
  .settings-surface {
    padding: 20px 16px;
    gap: 20px;
  }
}
.core-update-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  height: auto;
  min-height: 0;
}
.core-update-panel p, .core-update-panel pre, .core-update-panel h4 {
  margin: 0;
}
.core-update-panel > :is(p, pre):empty {
  display: none;
}
.core-update-panel [hidden] {
  display: none !important;
}
.core-update-panel > [role=status], .core-update-panel > [role=alert] {
  padding: 12px 14px;
  border-radius: var(--studio-field-radius);
  background: var(--studio-surface-muted);
  font-size: 13px;
  line-height: 1.5;
}

.core-update-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.core-update-summary .form-actions {
  margin: 0;
}

.core-update-identity {
  display: grid;
  gap: 5px;
}

.core-module-updates {
  display: grid;
  gap: 0;
  margin-top: 8px;
  border-top: 1px solid var(--studio-border);
  padding-top: 20px;
}
.core-module-updates > h4 {
  font-size: 14px;
  margin-bottom: 6px;
}
.core-module-updates > .settings-hint {
  margin-bottom: 12px;
}

.core-module-update-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--studio-border);
}
.core-module-update-row p {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.core-module-update-row .button {
  flex-shrink: 0;
}

.core-update-document-area {
  padding: 0;
  background: transparent;
  border-radius: var(--studio-field-radius);
}

.core-update-document {
  box-sizing: border-box;
  min-height: 220px;
  margin: 0;
  padding: clamp(20px, 4vw, 40px);
  border: 1px solid var(--studio-border);
  background: var(--studio-surface-solid);
  box-shadow: none;
}
.core-update-document h3 {
  margin: 0 0 6px;
  font-size: 20px;
}
.core-update-document pre {
  margin: 24px 0;
  font-size: 14px;
  line-height: 1.75;
}
.core-update-document a {
  font-size: 13px;
}

.settings-update-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.settings-update-toolbar .settings-tabs {
  flex: 1;
}
.settings-update-toolbar > .icon-button {
  flex: 0 0 36px;
  background: transparent;
  box-shadow: none;
}

.core-module-update-selection {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  flex-basis: 100%;
}
.core-module-update-selection > label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.core-module-update-selection > [role=status] {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.core-module-update-entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.core-module-update-entry > input[type=checkbox] {
  margin-top: 14px;
}
.core-module-update-entry > details {
  min-width: 0;
}
.core-module-update-entry summary {
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}

.core-update-document, .core-module-update-row, .modules-list .module-details {
  padding: 0;
  min-height: 0;
  border: 0;
  border-bottom: 1px solid var(--studio-border);
  background: transparent;
  box-shadow: none;
}
.core-update-document > summary, .core-module-update-row > summary, .modules-list .module-details > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  cursor: pointer;
  list-style: none;
}
.core-update-document > summary::after, .core-module-update-row > summary::after, .modules-list .module-details > summary::after {
  content: "⌄";
  flex: 0 0 auto;
}
.core-update-document[open] > summary::after, .core-module-update-row[open] > summary::after, .modules-list .module-details[open] > summary::after {
  transform: rotate(180deg);
}
.core-update-document > pre, .core-update-document > p, .core-update-document > .button, .core-update-document > a, .core-update-document > .module-actions, .core-module-update-row > pre, .core-module-update-row > p, .core-module-update-row > .button, .core-module-update-row > a, .core-module-update-row > .module-actions, .modules-list .module-details > pre, .modules-list .module-details > p, .modules-list .module-details > .button, .modules-list .module-details > a, .modules-list .module-details > .module-actions {
  margin: 0 0 16px;
}
.core-update-document pre, .core-module-update-row pre, .modules-list .module-details pre {
  white-space: pre-wrap;
  font: inherit;
  line-height: 1.6;
}
.core-update-document .module-name-row, .core-module-update-row .module-name-row, .modules-list .module-details .module-name-row {
  width: 100%;
}

.core-module-updates {
  padding-top: 0;
  margin-top: 0;
  border: 0;
}

.core-module-update-row {
  display: block;
}

.update-versions {
  margin-left: auto;
  white-space: nowrap;
  color: var(--studio-text-muted);
  font-size: 13px;
}

.core-update-document > summary, .core-module-update-row > summary,
.modules-list .module-details > summary {
  padding: 12px 0;
  font-size: 13px;
  font-weight: 400;
}

.core-update-identity > [role=status] {
  font-size: 13px;
}

.core-update-identity h4 {
  font-size: 14px;
}

.core-module-updates {
  padding-top: 20px;
  border-top: 1px solid var(--studio-border);
}

.core-module-updates > .settings-hint {
  margin-bottom: 6px;
}

.core-update-panel {
  gap: 0;
}

.core-update-summary,
.core-module-updates,
.installed-update-panel .modules-list-mount {
  box-sizing: border-box;
  min-height: 260px;
  padding-top: 20px;
  align-content: start;
  align-items: start;
}

.installed-update-panel h4 {
  font-size: 14px;
  margin: 0 0 8px;
}

.installed-update-panel .settings-hint {
  margin: 0 0 6px;
}

.branding-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.branding-image {
  min-width: 0;
}

.branding-image h4 {
  margin: 0 0 12px;
  font-size: 14px;
}

.branding-image__preview {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #72767d;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-field-radius);
  padding: 20px;
}
.branding-image__preview > img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.branding-image--logoDarkUrl .branding-image__preview {
  background: #202327;
  color: #bac0c8;
}

.branding-image__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

.branding-image__actions .button {
  min-width: 0;
}

.branding-image__actions .icon-button {
  background: transparent;
  box-shadow: none;
}

.branding-image__url summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--studio-text-muted);
}

.branding-image__url input {
  margin-top: 8px;
}

.branding-image--faviconUrl {
  grid-column: 1/-1;
  border-top: 1px solid var(--studio-border);
  padding-top: 20px;
}

.branding-image--faviconUrl .branding-image__preview {
  width: 64px;
  height: 64px;
  padding: 12px;
  float: left;
  margin-right: 16px;
}

.branding-image--faviconUrl .branding-image__url {
  clear: both;
}

.branding-image .settings-hint {
  margin: 8px 0;
  min-height: 18px;
}

.branding-settings .branding-save {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.branding-save .settings-save-state {
  order: -2;
  margin-right: auto;
}

.branding-save .button.ghost {
  order: -1;
}

.branding-fields [hidden] {
  display: none !important;
}

@media (max-width: 600px) {
  .branding-fields {
    grid-template-columns: 1fr;
  }
}
.scene-panel-shell[data-active-sidebar-panel=design],
.scene-panel-shell[data-active-sidebar-panel=layout] {
  --scene-sidebar-flyout-width: 372px;
}

.style-library-panel {
  min-width: 0;
}

.style-library-panel-host {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.global-design-settings {
  display: grid;
  gap: 14px;
}

.global-design-settings__group {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--scene-border);
  border-radius: 10px;
  background: var(--scene-surface);
}

.global-design-settings__group > h3 {
  margin: 0 0 10px;
  color: var(--scene-ink);
  font-size: 12px;
  font-weight: 750;
}

.global-design-background-field,
.global-design-background-inherit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--scene-ink);
  font-size: 12px;
}

.global-design-background-field input[type=color] {
  width: 42px;
  height: 30px;
  padding: 2px;
  border: 1px solid var(--scene-border);
  border-radius: 8px;
  background: var(--scene-surface);
}

.global-design-background-inherit {
  justify-content: flex-start;
  margin-top: 9px;
  color: var(--scene-muted);
}

.style-library-intro {
  margin: 0;
  color: var(--scene-muted);
  font-size: 12px;
  line-height: 1.55;
}

.style-library-color-picker.color-picker {
  width: 100%;
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.font-package-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.font-package-select,
.font-package-role-select,
.site-preset-panel select,
.font-package-field input,
.font-package-field select,
.font-package-create input {
  width: 100%;
  min-width: 0;
  height: 34px;
  box-sizing: border-box;
  padding: 0 10px;
  border: 1px solid var(--scene-border);
  border-radius: 8px;
  background: var(--scene-surface);
  color: var(--scene-ink);
  font: inherit;
  font-size: 12px;
  outline: none;
}

.font-package-select:focus,
.font-package-role-select:focus,
.site-preset-panel select:focus,
.font-package-field input:focus,
.font-package-field select:focus,
.font-package-create input:focus {
  border-color: var(--scene-accent-line);
  box-shadow: 0 0 0 3px var(--scene-accent-soft);
}

.color-scheme-value {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 7px;
}

.color-scheme-value input[type=color] {
  padding: 3px;
}

.site-preset-panel {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--scene-border);
}

.site-preset-panel h4 {
  margin: 0;
  color: var(--scene-ink);
  font-size: 12px;
  font-weight: 700;
}

.site-preset-demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.font-package-active {
  min-width: 48px;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--scene-accent-soft);
  color: var(--scene-accent);
  font-size: 10px;
  font-weight: 750;
  text-align: center;
  text-transform: uppercase;
}

.font-package-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  color: var(--scene-muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.font-package-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.font-package-action,
.font-package-create button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--scene-border);
  border-radius: 8px;
  background: var(--scene-surface);
  color: var(--scene-ink);
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.font-package-action:hover,
.font-package-create button:hover {
  border-color: var(--scene-border-strong);
  background: var(--scene-surface-soft);
}

.font-package-action--primary,
.font-package-create button {
  border-color: transparent;
  background: var(--scene-action-bg);
  color: var(--scene-action-text);
}

.font-package-action--primary:hover,
.font-package-create button:hover {
  background: var(--scene-action-bg-hover);
}

.font-package-action--danger {
  color: #b42318;
}

.font-package-action:disabled,
.font-package-create button:disabled {
  opacity: 0.45;
  cursor: default;
}

.font-package-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--scene-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--scene-surface-soft) 76%, transparent);
}

.font-package-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--scene-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--scene-surface-soft) 72%, transparent);
}

.font-package-editor .font-package-field:first-child,
.font-package-editor .font-package-field:nth-child(2),
.font-package-editor .font-package-field:nth-child(3) {
  grid-column: 1/-1;
}

.font-package-preview {
  min-height: 74px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--scene-border);
  border-radius: 10px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--scene-accent) 8%, transparent), transparent 62%), var(--scene-surface);
  overflow-wrap: anywhere;
}

.font-package-error {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid rgba(180, 35, 24, 0.24);
  border-radius: 8px;
  background: rgba(180, 35, 24, 0.06);
  color: #b42318;
  font-size: 11px;
  line-height: 1.4;
}

.font-package-error.hidden {
  display: none;
}

.site-preset-json {
  min-width: 0;
  border-top: 1px solid var(--scene-border);
  padding-top: 12px;
}
.site-preset-json summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--scene-text);
  margin-bottom: 10px;
}
.site-preset-json textarea {
  width: 100%;
  min-height: 160px;
  box-sizing: border-box;
  resize: vertical;
  padding: 10px;
  border: 1px solid var(--scene-border);
  border-radius: 10px;
  background: var(--scene-surface-soft);
  color: var(--scene-text);
  font: 11px/1.6 ui-monospace, monospace;
}

@media (max-width: 720px) {
  .scene-panel-shell[data-active-sidebar-panel=design],
  .scene-panel-shell[data-active-sidebar-panel=layout] {
    --scene-sidebar-flyout-width: min(372px, calc(100vw - 88px));
  }
}
.ui-kit {
  display: grid;
  gap: 20px;
  min-width: 0;
  padding-bottom: 24px;
}

.ui-kit__header {
  align-items: flex-start;
}

.ui-kit__header-copy {
  display: grid;
  gap: 6px;
}

.ui-kit__header-copy .page-title,
.ui-kit__header-copy p {
  margin: 0;
}

.ui-kit__jump-nav {
  position: sticky;
  z-index: 8;
  top: calc(66px + var(--maintenance-banner-height, 0px));
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  padding: 8px;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-control);
  background: color-mix(in srgb, var(--studio-surface-solid) 90%, transparent);
  box-shadow: var(--studio-shadow-soft);
  backdrop-filter: blur(16px);
}

.ui-kit__jump-nav .button {
  flex: 0 0 auto;
  min-width: 0;
  margin: 0;
}

/* Structural accessibility labels describe regions; they are not tooltips.
   Suppressing the legacy floating-label pseudo element prevents hidden
   content from introducing horizontal overflow in the reference page. */
.ui-kit :where(nav, [role=tablist], [role=tabpanel], [role=progressbar])[aria-label]::after {
  content: none;
  display: none;
}

.ui-kit__sections {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  min-width: 0;
}

.ui-kit__section {
  grid-column: span 6;
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
  padding: 20px;
  scroll-margin-top: 126px;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-panel);
  background: var(--studio-surface-solid);
  box-shadow: var(--studio-shadow-soft);
}

.ui-kit__section--wide {
  grid-column: 1/-1;
}

.ui-kit__section-header {
  display: grid;
  gap: 4px;
}

.ui-kit__section-header h2,
.ui-kit__section-header p {
  margin: 0;
}

.ui-kit__section-header h2 {
  color: var(--studio-text);
  font-size: 1.05rem;
  line-height: 1.3;
}

.ui-kit__section-header p,
.ui-kit__caption {
  color: var(--studio-text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.ui-kit__caption {
  margin: 0;
  font-family: var(--font-mono);
}

.ui-kit__specimen,
.ui-kit__stack,
.ui-kit__form,
.ui-kit__choices,
.ui-kit__alerts {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.ui-kit__specimen {
  padding: 16px;
  border-radius: var(--studio-field-radius);
  background: var(--studio-canvas-subtle);
}

.ui-kit__row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.ui-kit__row .button {
  min-width: 0;
  margin: 0;
}

.ui-kit__field-grid,
.ui-kit__feedback-grid,
.ui-kit__loading-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ui-kit__field-grid {
  align-items: start;
}

.ui-kit__field-grid .form-field--wide {
  grid-column: 1/-1;
}

.ui-kit__choice-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.ui-kit__color-picker {
  min-height: 390px;
  max-height: 520px;
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-field-radius);
  background: var(--studio-surface-muted);
}

.ui-kit__popover-anchor {
  position: relative;
}

.ui-kit__loading-grid > * {
  min-width: 0;
}

.ui-kit__icon-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(72px, 1fr));
  gap: 10px;
}

.ui-kit__icon-tile {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  padding: 12px 8px;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-field-radius);
  background: var(--studio-surface-muted);
  color: var(--studio-text-muted);
  font-size: 0.72rem;
  text-align: center;
}

.ui-kit__icon-tile img {
  width: 22px;
  height: 22px;
}

.ui-kit__token-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ui-kit__token {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: var(--studio-text-muted);
  font-size: 0.74rem;
}

.ui-kit__token-swatch {
  display: block;
  min-height: 54px;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-field-radius);
  background: var(--ui-kit-token-color);
}

.ui-kit__data-tabs .bp-tab-panel {
  max-width: none;
  margin-top: 12px;
  padding: 14px;
  box-shadow: none;
}

@media (max-width: 1080px) {
  .ui-kit__section {
    grid-column: 1/-1;
  }
}
@media (max-width: 680px) {
  .ui-kit__jump-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .ui-kit__field-grid,
  .ui-kit__feedback-grid,
  .ui-kit__loading-grid,
  .ui-kit__token-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .ui-kit__icon-grid {
    grid-template-columns: repeat(3, minmax(72px, 1fr));
  }
  .ui-kit__section {
    padding: 16px;
  }
}
.access-settings-card {
  margin: 0 auto;
  min-width: 280px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.access-settings-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.access-settings-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.access-settings-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
}
.access-settings-badge[data-state=pending] {
  background: rgba(234, 179, 8, 0.12);
  color: #b45309;
}

.access-settings-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.access-settings-toggle input[type=checkbox] {
  width: 1rem;
  height: 1rem;
}

.access-settings-status {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: rgba(34, 197, 94, 0.8);
}

.access-settings-subtitle {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.access-settings-tips {
  padding-left: 1.25rem;
  margin: 0;
  color: rgba(17, 24, 39, 0.8);
}
.access-settings-tips li + li {
  margin-top: 0.35rem;
}

.access-settings-agent-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 160px) auto;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}
.access-settings-agent-form input,
.access-settings-agent-form select {
  min-height: var(--studio-control-size);
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-control);
  background: var(--studio-surface-solid);
  color: var(--studio-text);
  padding: 0 0.75rem;
}

.access-settings-agent-code {
  width: 100%;
  min-height: 5rem;
  resize: vertical;
  margin-bottom: 0.75rem;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-control);
  background: var(--studio-surface-muted);
  color: var(--studio-text);
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
  padding: 0.75rem;
}

.access-settings-agent-list {
  display: grid;
  gap: 0.5rem;
}

.access-settings-agent-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 0;
  border-top: 1px solid var(--studio-border);
}

.access-settings-agent-meta {
  min-width: 0;
  color: var(--studio-text-muted);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .access-settings-agent-form,
  .access-settings-agent-row {
    grid-template-columns: 1fr;
  }
}
.system-settings-card {
  margin: 0 auto;
  min-width: 280px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.system-settings-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.system-settings-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.system-settings-card label {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

.system-settings-card input[type=text],
.system-settings-card textarea,
.system-settings-card select {
  width: 100%;
  margin-bottom: 12px;
}

.favicon-picker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.favicon-preview {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 4px;
}

.login-strategies-card {
  margin: 0 auto;
  min-width: 280px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-strategy-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.login-strategy-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.login-strategies-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-strategies-list .empty-state {
  color: var(--studio-text-muted);
  padding: 20px 0 8px 0;
  text-align: center;
  font-size: 16px;
  font-family: var(--font-body);
}

.login-strategies-list li {
  border-radius: 8px;
  background: var(--studio-surface-muted);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  padding: 14px 12px 10px 14px;
  gap: 4px;
  transition: box-shadow 0.16s;
  border: 1px solid transparent;
}
.login-strategies-list li:hover {
  border: 1px solid var(--user-color);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.login-strategy-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.login-strategy-name {
  font-family: var(--font-body);
  font-size: 1.04rem;
  color: var(--studio-text);
  font-weight: 600;
  letter-spacing: 0.01em;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 6px 2px 0;
  border-radius: 6px;
  outline: none;
  border: 1px solid transparent;
  transition: border 0.18s;
}
.login-strategy-name[contenteditable=true]:focus {
  border: 1px solid var(--studio-border-strong);
  background: var(--studio-surface-solid);
  color: var(--studio-text);
}

.login-strategy-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: flex-end;
}
.login-strategy-actions .icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  fill: #888;
  cursor: pointer;
  opacity: 0.72;
  transition: fill 0.16s, opacity 0.14s, transform 0.14s;
}
.login-strategy-actions .icon:hover {
  fill: var(--user-color);
  opacity: 1;
  transform: scale(1.13);
}

.login-strategy-scope {
  margin-left: 0.25rem;
  font-size: 0.85rem;
  color: #777;
}

.login-strategy-desc {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: #555;
}

.fonts-list-card {
  margin: 0 auto;
  min-width: 280px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fonts-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fonts-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.fonts-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fonts-list .empty-state {
  color: var(--studio-text-muted);
  padding: 20px 0 8px 0;
  text-align: center;
  font-size: 16px;
  font-family: var(--font-body);
}

.fonts-list li {
  border-radius: 8px;
  background: var(--studio-surface-muted);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  padding: 14px 12px 10px 14px;
  gap: 4px;
  transition: box-shadow 0.16s;
  border: 1px solid transparent;
}
.fonts-list li:hover {
  border: 1px solid var(--user-color);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.font-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.font-name {
  font-family: var(--font-body);
  font-size: 1.04rem;
  color: var(--studio-text);
  font-weight: 600;
  letter-spacing: 0.01em;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 6px 2px 0;
  border-radius: 6px;
  outline: none;
  border: 1px solid transparent;
  transition: border 0.18s;
}
.font-name[contenteditable=true]:focus {
  border: 1px solid var(--studio-border-strong);
  background: var(--studio-surface-solid);
  color: var(--studio-text);
}

.font-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: flex-end;
}
.font-actions .icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  fill: #888;
  cursor: pointer;
  opacity: 0.72;
  transition: fill 0.16s, opacity 0.14s, transform 0.14s;
}
.font-actions .icon:hover {
  fill: var(--user-color);
  opacity: 1;
  transform: scale(1.13);
}

.font-desc {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: #555;
}

.font-toggle-icon {
  cursor: pointer;
}

.login-strategy-edit {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 400px;
}

.login-strategy-edit input,
.login-strategy-edit select {
  padding: 0.4rem 0.6rem;
}

.modules-list-card {
  margin: 0 auto;
  min-width: 280px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modules-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  display: none;
}

.modules-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.modules-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modules-list .empty-state {
  color: var(--studio-text-muted);
  padding: 20px 0 8px 0;
  text-align: center;
  font-size: 16px;
  font-family: var(--font-body);
}

.modules-list li {
  border-radius: 8px;
  background: var(--studio-surface-muted);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  padding: 14px 12px 10px 14px;
  gap: 4px;
  transition: box-shadow 0.16s;
  border: 1px solid transparent;
}
.modules-list li:hover {
  border: 1px solid var(--user-color);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.module-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.module-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.module-name {
  font-family: var(--font-body);
  font-size: 1.04rem;
  color: var(--studio-text);
  font-weight: 600;
  letter-spacing: 0.01em;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 6px 2px 0;
  border-radius: 6px;
  outline: none;
  border: 1px solid transparent;
  transition: border 0.18s;
}
.module-name[contenteditable=true]:focus {
  border: 1px solid var(--studio-border-strong);
  background: var(--studio-surface-solid);
  color: var(--studio-text);
}

.module-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: flex-end;
}
.module-actions .icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  fill: #888;
  cursor: pointer;
  opacity: 0.72;
  transition: fill 0.16s, opacity 0.14s, transform 0.14s;
}
.module-actions .icon:hover {
  fill: var(--user-color);
  opacity: 1;
  transform: scale(1.13);
}

.module-meta {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--studio-text-muted);
}

.modules-access-layout {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(280px, 1.4fr);
  gap: 1rem;
  align-items: start;
}

.modules-list-mount {
  min-width: 0;
}

.modules-list li {
  cursor: pointer;
}

.modules-list li.is-selected {
  background: var(--studio-surface-muted);
  background: color-mix(in srgb, var(--brand) 7%, var(--studio-surface-solid));
}

.module-detail-mount {
  min-width: 0;
}

.module-detail-panel {
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-field-radius);
  padding: 20px;
  background: var(--studio-surface-solid);
}

.module-detail-header {
  display: grid;
  gap: 0.35rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--studio-border);
}
.module-detail-header h3 {
  margin: 0;
  font-size: 1.05rem;
}
.module-detail-header p {
  margin: 0;
  color: var(--studio-text-muted);
  font-size: 0.9rem;
}

.module-detail-status-row,
.module-detail-access-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.module-detail-section {
  padding-top: 0.9rem;
}
.module-detail-section h4 {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--studio-text-muted);
}

.module-detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.module-detail-list li {
  display: grid;
  gap: 0.2rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--studio-border);
  cursor: default;
}
.module-detail-list small {
  color: var(--studio-text-muted);
  font-size: 0.8rem;
}

.module-detail-empty {
  margin: 0;
  color: var(--studio-text-muted);
  font-size: 0.88rem;
}

.module-access-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 1.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--studio-surface-muted);
  color: var(--studio-text);
  font-size: 0.76rem;
  font-weight: 700;
}

.module-access-badge--ok {
  background: #e7f5ed;
  color: #17623a;
}

.module-access-badge--warning {
  background: #fff4d8;
  color: #715000;
}

.module-access-badge--danger {
  background: #fde9e7;
  color: #8a2f22;
}

.module-access-prompt {
  display: grid;
  gap: 0.65rem;
}

.module-access-prompt-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.35fr) 1fr;
  gap: 0.7rem;
  align-items: baseline;
}
.module-access-prompt-row span {
  color: var(--studio-text-muted);
  font-size: 0.82rem;
}
.module-access-prompt-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.92rem;
}

.module-access-prompt-reason {
  margin: 0;
  color: var(--studio-text);
}

.module-access-prompt-payload {
  max-height: 12rem;
  overflow: auto;
  margin: 0;
  padding: 0.7rem;
  border-radius: 6px;
  background: var(--studio-surface-muted);
  color: var(--studio-text);
  font-size: 0.78rem;
}

.module-access-review {
  display: grid;
  gap: 1rem;
}

.module-access-section {
  display: grid;
  gap: 0.45rem;
}
.module-access-section strong {
  font-size: 0.85rem;
  color: var(--studio-text);
}
.module-access-section p {
  margin: 0;
  color: var(--studio-text-muted);
}
.module-access-section ul {
  margin: 0;
  padding-left: 1.1rem;
}

.module-access-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.55rem;
  align-items: start;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--studio-border);
}
.module-access-option input {
  margin-top: 0.2rem;
}
.module-access-option small {
  grid-column: 2;
  color: var(--studio-text-muted);
  font-size: 0.8rem;
}
.module-access-option.is-disabled {
  opacity: 0.72;
}

.module-toggle-btn {
  background: var(--studio-surface-muted);
  border: none;
  border-radius: 5px;
  padding: 2px 8px;
  cursor: pointer;
  font-size: 0.85rem;
}

.module-upload-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.module-upload-box {
  background: var(--studio-surface-solid);
  padding: 20px;
  border-radius: var(--studio-radius-panel);
  text-align: center;
  width: min(440px, 100vw - 40px);
}

.module-upload-dropzone {
  display: grid;
  place-items: center;
  min-height: 160px;
  padding: 24px;
  border: 2px dashed var(--studio-border);
  border-radius: var(--studio-radius-panel);
  cursor: pointer;
}
.module-upload-dropzone:focus-visible {
  outline: 2px solid var(--user-color);
  outline-offset: 3px;
}

.module-upload-overlay[aria-label]::after {
  display: none;
}

.extension-store-button[aria-label]::after {
  display: none;
}

.module-upload-box.dragover {
  border: 2px dashed #888;
}

@media (max-width: 780px) {
  .modules-access-layout {
    grid-template-columns: 1fr;
  }
}
.settings-surface .modules-list > li {
  margin: 0;
  padding: 16px;
  border-radius: var(--studio-field-radius);
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
}
.settings-surface .modules-list > li:hover {
  background: var(--studio-surface-muted);
}
.settings-surface .modules-list > li.is-selected {
  background: var(--studio-surface-muted);
  border-color: var(--studio-border);
}

.settings-surface .module-detail-panel {
  background: var(--studio-surface-muted);
}

.module-select {
  appearance: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.module-select:focus-visible {
  outline: 2px solid var(--studio-text);
  outline-offset: 2px;
}

.module-meta {
  overflow-wrap: anywhere;
  line-height: 1.5;
  font-size: 0.85rem;
}

.module-toggle-btn {
  min-height: 32px;
  padding: 6px 12px;
  border-radius: var(--studio-radius-control);
  border: 1px solid var(--studio-border);
  color: var(--studio-text);
}
.module-toggle-btn:hover {
  background: var(--studio-surface-solid);
}
.module-toggle-btn:focus-visible {
  outline: 2px solid var(--studio-text);
}
.module-toggle-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.modules-tab-panel[hidden] {
  display: none;
}

.settings-tab-panels > .modules-list-card {
  height: 100%;
  min-height: 0;
}

.settings-surface .modules-access-layout {
  flex: 1 1 0;
  min-height: 0;
  align-items: stretch;
}

.settings-surface .modules-access-layout > :is(.modules-list-mount, .module-detail-mount) {
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
}

.module-access-badge--ok {
  color: var(--color-success);
  background: color-mix(in srgb, var(--color-success) 12%, transparent);
}

.module-access-badge--warning {
  color: var(--color-warning);
  background: color-mix(in srgb, var(--color-warning) 12%, transparent);
}

.module-access-badge--danger {
  color: var(--color-error);
  background: color-mix(in srgb, var(--color-error) 12%, transparent);
}

.layout-list-card {
  margin: 0 auto;
  min-width: 280px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.layout-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.layout-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.layout-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 4px;
}
.layout-filters .filter {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-dark);
  background: none;
  border: none;
  padding: 5px 12px;
  cursor: pointer;
  position: relative;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.layout-filters .filter::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 3px;
  background: var(--user-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.layout-filters .filter:hover {
  opacity: 1;
}
.layout-filters .filter.active {
  opacity: 1;
}
.layout-filters .filter.active::after {
  transform: scaleX(1);
}
.layout-filters {
  margin-bottom: 0;
}

.layout-tabs-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.layout-sort {
  margin-left: auto;
}

.add-layout-btn {
  width: 22px;
  height: 22px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.add-layout-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.app-scope .add-layout-btn.icon-button {
  width: var(--studio-control-size);
  height: var(--studio-control-size);
}

.layout-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.layout-list .empty-state {
  color: var(--studio-text-muted);
  padding: 20px 0 8px 0;
  text-align: center;
  font-size: 16px;
  font-family: var(--font-body);
}

.layout-list li {
  border-radius: 8px;
  background: var(--studio-surface-muted);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  padding: 14px 12px 10px 14px;
  gap: 4px;
  transition: box-shadow 0.16s;
  border: 1px solid transparent;
}
.layout-list li:hover {
  border: 1px solid var(--user-color);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.layout-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.layout-preview {
  width: 100px;
  height: 70px;
  background: var(--studio-surface-muted);
  border-radius: 6px;
  object-fit: cover;
}

.layout-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.layout-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.layout-name {
  font-family: var(--font-body);
  font-size: 1.04rem;
  color: var(--studio-text);
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layout-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: flex-end;
}

.layout-actions .icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  fill: #888;
  cursor: pointer;
  opacity: 0.72;
  transition: fill 0.16s, opacity 0.14s, transform 0.14s;
}
.layout-actions .icon:hover {
  fill: #ff00ff;
  opacity: 1;
  transform: scale(1.13);
}

.layout-usage {
  font-size: 0.85rem;
  color: #555;
}

.layout-gallery-card {
  margin: 0 auto;
  min-width: 280px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.layout-gallery-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.layout-gallery-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.layout-gallery, .uploaded-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}

.layout-gallery-item {
  position: relative;
  text-align: center;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background 0.15s ease;
}
.layout-gallery-item:hover {
  background: color-mix(in srgb, var(--user-color), transparent 85%);
}

.layout-menu-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  display: none;
  opacity: 0.8;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.layout-gallery-item:hover .layout-menu-btn {
  display: block;
}

.layout-card-menu {
  position: absolute;
  top: 28px;
  right: 4px;
  background: var(--studio-surface-solid);
  border: 1px solid var(--studio-border);
  border-radius: 6px;
  box-shadow: var(--shadow-card, 0 2px 8px rgba(0, 0, 0, 0.1));
  display: none;
  flex-direction: column;
  z-index: 10;
}

.layout-card-menu.open {
  display: flex;
}

.layout-card-menu .menu-item {
  font-family: var(--font-body);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.layout-card-menu .menu-item:hover {
  background: color-mix(in srgb, var(--user-color), transparent 85%);
}

.layout-gallery-preview {
  width: 100%;
  height: 80px;
  object-fit: cover;
  background: var(--studio-surface-muted);
  border-radius: 6px;
}

.layout-gallery-name {
  font-size: 0.9rem;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.designer-layouts-list {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 16px;
}

.page-manager__design-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin: 14px 0;
  color: inherit;
  text-decoration: none;
}
.page-manager__design-preview img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--studio-surface-muted);
}
.page-manager__design-preview img.is-placeholder {
  object-fit: contain;
  padding: 48px;
  box-sizing: border-box;
}
.page-manager__design-preview strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.page-manager__design-preview small {
  color: var(--studio-text-muted);
}
.page-manager__design-preview span {
  text-decoration: underline;
  font-size: 0.85rem;
}

.designer-layout-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.designer-layout-item .layout-gallery-preview {
  height: 180px;
}
.designer-layout-item .layout-gallery-preview--placeholder {
  object-fit: contain;
  padding: 40px;
  box-sizing: border-box;
}
.designer-layout-item .layout-gallery-details {
  min-width: 0;
}
.designer-layout-item .layout-gallery-name, .designer-layout-item .layout-gallery-meta {
  display: block;
}
.designer-layout-item .layout-gallery-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.designer-layout-item .layout-gallery-meta {
  color: var(--studio-text-muted);
  font-size: 0.8rem;
  margin-top: 4px;
}
.designer-layout-item .layout-gallery-actions {
  margin-top: auto;
}

.layout-section-title {
  grid-column: 1/-1;
  font-weight: 600;
  margin: 8px 0 4px;
  font-size: 0.95rem;
}

.global-layout {
  box-shadow: 0 0 0 2px var(--user-color);
}

.navigation-studio {
  --navigation-studio-card-border: var(--studio-border);
  --navigation-studio-card-border-strong: var(--studio-border-strong);
  --navigation-studio-card-border-width: 2px;
  display: grid;
  gap: 24px;
  min-width: 0;
  width: 100%;
  color: var(--studio-text);
  font-family: var(--font-body);
  container: navigation-studio/inline-size;
}

.navigation-studio [hidden] {
  display: none !important;
}

.navigation-studio__feedback:empty {
  display: none;
}

.navigation-studio .icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.navigation-studio__header,
.navigation-studio__toolbar,
.navigation-studio__menu-picker,
.navigation-studio__add-target,
.navigation-studio__panel-title,
.navigation-studio__check-row,
.navigation-studio__inspector-actions,
.navigation-studio__save-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.navigation-studio__header {
  justify-content: space-between;
  align-items: flex-start;
}

.navigation-studio__header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.navigation-studio__header p {
  margin: 6px 0 0;
  font-size: 0.82rem;
}

.navigation-studio__toolbar {
  margin-left: auto;
}

.navigation-studio__menu-picker .custom-select {
  width: min(360px, 100%);
}

.navigation-studio__header p,
.navigation-studio__feedback,
.navigation-studio__hint,
.navigation-studio__empty,
.navigation-studio__menu-picker,
.navigation-studio__add-target,
.navigation-studio__save-bar {
  color: var(--studio-text-muted);
}

.navigation-studio__feedback,
.navigation-studio__menu-picker,
.navigation-studio__add-target,
.navigation-studio__save-bar {
  font-size: 0.82rem;
}

.navigation-studio__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 360px);
  gap: 28px;
  align-items: start;
}

.navigation-studio__card,
.navigation-studio__panel {
  box-sizing: border-box;
  min-width: 0;
  border: 0;
  border-radius: 8px;
  background: var(--studio-surface-solid);
  box-shadow: none;
}

.navigation-studio__card--bordered,
.navigation-studio__panel {
  border: var(--navigation-studio-card-border-width) solid var(--navigation-studio-card-border);
}

.navigation-studio__panel-title {
  justify-content: space-between;
  min-height: 42px;
  padding: 10px 12px;
  font-weight: 600;
}

.navigation-studio__panel-title h3,
h3.navigation-studio__panel-title {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
}

.navigation-studio__panel-title h3 small {
  margin-left: 8px;
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--studio-text-muted);
}

.navigation-studio__structure > .navigation-studio__panel-title {
  padding: 0 0 12px;
  border-bottom: 1px solid var(--studio-border);
}

.navigation-studio__hint {
  margin: 0;
  padding: 10px 12px;
  font-size: 0.8rem;
  line-height: 1.5;
}

.navigation-studio__structure > .navigation-studio__hint {
  padding-left: 0;
  padding-right: 0;
}

.navigation-studio__empty,
.navigation-studio__loading,
.navigation-studio__error {
  padding: 14px;
}

.navigation-studio__empty strong {
  display: block;
  margin-bottom: 6px;
  color: var(--studio-text);
}

.navigation-studio__empty p {
  margin: 0;
}

.navigation-studio__add {
  display: grid;
  gap: 10px;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-field-radius);
  padding: 12px;
  background: var(--studio-surface-muted);
}

.navigation-studio__search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-field-radius);
  background: var(--studio-surface-solid);
}

.navigation-studio__search input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--studio-text);
  font: inherit;
}

.navigation-studio__search-results {
  display: grid;
  gap: 4px;
  max-height: 260px;
  overflow-y: auto;
}

.navigation-studio__search-result {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--studio-field-radius);
  padding: 9px;
  background: transparent;
  color: var(--studio-text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.navigation-studio__search-result:hover {
  border-color: var(--studio-border-strong);
}

.navigation-studio__search-result > span {
  display: grid;
  min-width: 0;
}

.navigation-studio__search-result strong,
.navigation-studio__search-result small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.navigation-studio__search-result strong {
  font-weight: 500;
}

.navigation-studio__search-result small {
  font-size: 0.75rem;
  color: var(--studio-text-muted);
}

.navigation-studio__tree {
  min-height: 140px;
  padding: 8px 0 18px;
}

.navigation-studio__tree-list {
  display: grid;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0 0 0 20px;
  border-left: 0;
}

.navigation-studio__tree > .navigation-studio__tree-list {
  padding-left: 0;
  border-left: 0;
}

.navigation-studio__tree-row {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.navigation-studio__item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 60px;
  border: 1px solid transparent;
  border-radius: var(--studio-field-radius);
  background: var(--studio-surface-muted);
  box-shadow: none;
  padding: 8px;
}

.navigation-studio__item.is-selected {
  border-color: var(--studio-border-strong);
  background: color-mix(in srgb, var(--brand) 7%, var(--studio-surface-solid));
}

.navigation-studio__item-grip {
  display: inline-flex;
  flex: 0 0 16px;
  color: var(--studio-text-muted);
  cursor: grab;
}

.navigation-studio__item-main {
  display: grid;
  min-width: 0;
  flex: 1;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.navigation-studio__item-main strong,
.navigation-studio__item-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.navigation-studio__item-main small {
  font-size: 0.76rem;
  color: var(--studio-text-muted);
}

.navigation-studio__item-actions,
.navigation-studio__item-badges {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.navigation-studio__item-actions button,
.navigation-studio__item > button[data-collapse],
.navigation-studio__panel-title > button:not(.button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 30px;
  border: 0;
  border-radius: var(--studio-radius-control);
  background: transparent;
  color: var(--studio-text);
  cursor: pointer;
}

.navigation-studio__item-actions button:disabled {
  opacity: 0.3;
  cursor: default;
}

.navigation-studio__item-actions button:not(:disabled):hover,
.navigation-studio__item > button[data-collapse]:hover {
  background: var(--studio-surface-solid);
}

.navigation-studio__badge {
  border-radius: var(--studio-radius-control);
  background: var(--studio-surface-solid);
  color: var(--studio-text-muted);
  font-size: 0.72rem;
  padding: 3px 7px;
}

.navigation-studio__drop-child {
  display: none;
  border: 1px dashed var(--studio-border-strong);
  border-radius: 8px;
  color: var(--studio-text-muted);
  font-size: 0.75rem;
  padding: 5px 8px;
}

.navigation-studio.is-dragging .navigation-studio__drop-child {
  display: block;
  min-height: 30px;
}

.navigation-studio__side {
  display: grid;
  gap: 0;
  padding: 6px;
  background: var(--studio-surface-muted);
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-panel);
}

.navigation-studio__side > .navigation-studio__card {
  background: transparent;
}

.navigation-studio__side > details {
  border-top: 1px solid var(--studio-border);
  border-radius: 0;
}

.navigation-studio__inspector > .navigation-studio__panel-title {
  padding: 14px 12px 4px;
}

.navigation-studio__form {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.navigation-studio__form label {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--studio-text-muted);
}

.navigation-studio__form input:not([type=checkbox]),
.navigation-studio__form textarea,
.navigation-studio__form .custom-select > .display {
  background: var(--studio-surface-solid);
}

.navigation-studio__form textarea {
  min-height: 150px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.navigation-studio__check-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.navigation-studio__check-row input[type=checkbox] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.navigation-studio__save-bar {
  justify-content: space-between;
  border-top: 1px solid var(--studio-border);
  padding-top: 12px;
}

.navigation-studio summary {
  cursor: pointer;
  color: var(--studio-text);
  font-size: 0.85rem;
}

.navigation-studio summary.navigation-studio__panel-title {
  display: list-item;
  list-style-position: inside;
}

.navigation-studio__options {
  border-top: 1px solid var(--studio-border);
  padding-top: 12px;
}

.navigation-studio__options > :not(summary) {
  margin-top: 12px;
}

.navigation-studio__tools {
  border-top: 1px solid var(--studio-border);
  padding: 12px 0;
}

.navigation-studio__tools > button {
  margin-top: 12px;
}

.navigation-studio__modes,
.navigation-studio__preview-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-field-radius);
  background: var(--studio-surface-muted);
}

.navigation-studio__mode,
.navigation-studio__preview-tab {
  border: 0;
  border-radius: var(--studio-field-radius);
  background: transparent;
  color: var(--studio-text-muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  padding: 6px 10px;
}

.navigation-studio__mode.is-active,
.navigation-studio__preview-tab.is-active {
  background: var(--studio-surface-solid);
  color: var(--studio-text);
  box-shadow: none;
}

.navigation-studio__preview-tabs {
  margin: 12px 12px 0;
}

.navigation-studio__preview {
  padding: 14px;
}

.navigation-studio__preview nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navigation-studio__preview--footer nav ul,
.navigation-studio__preview--mobile nav ul {
  display: grid;
}

.navigation-studio__preview nav ul ul {
  display: grid;
  border-left: 1px solid var(--studio-border);
  padding-left: 12px;
  margin-top: 8px;
}

.navigation-studio__preview a {
  color: var(--studio-text);
  font-weight: 600;
  text-decoration: none;
}

.navigation-studio__mega-preview {
  display: grid;
  gap: 2px;
  margin-top: 8px;
  border: 1px solid var(--studio-border);
  border-radius: 8px;
  padding: 10px;
}

.navigation-studio__diagnostic {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px;
  border: 0;
  background: transparent;
  color: var(--studio-text-muted);
  font: inherit;
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
}

.navigation-studio__diagnostic strong {
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

.navigation-studio__diagnostic.is-warning {
  background: color-mix(in srgb, var(--studio-text) 4%, transparent);
}

.navigation-studio__diagnostic.is-ok {
  cursor: default;
}

.navigation-studio :is(button, input, summary, a):focus-visible {
  outline: 2px solid var(--studio-border-strong);
  outline-offset: 2px;
}

@container navigation-studio (max-width: 800px) {
  .navigation-studio__layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .navigation-studio__toolbar {
    margin-left: 0;
  }
}
@container navigation-studio (max-width: 480px) {
  .navigation-studio__item {
    flex-wrap: wrap;
  }
  .navigation-studio__item-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .navigation-studio__menu-picker {
    width: 100%;
  }
}
.navigation-studio__header > div:first-child {
  display: none;
}

.heading-widget {
  display: flex;
  align-items: center;
}

.bp-dialog-root:has(.article-editor) {
  padding: 16px;
  align-items: center;
  grid-template-columns: minmax(0, 1fr);
}

.bp-dialog:has(.article-editor) {
  width: min(1100px, 100%);
  height: calc(100dvh - 32px);
  max-height: none;
  max-width: none;
  box-sizing: border-box;
  gap: 12px;
}

.bp-dialog:has(.article-editor) .bp-dialog__header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.bp-dialog:has(.article-editor) .bp-dialog__title {
  flex: 1;
  min-width: 0;
}

.bp-dialog:has(.article-editor) .bp-dialog__body {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  gap: 0;
}

.bp-dialog:has(.article-editor) .bp-dialog__message:empty {
  display: none;
}

.bp-dialog:has(.article-editor) .bp-dialog__custom-body {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
}

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

.article-editor__title {
  width: 100%;
  min-width: 0;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: inherit;
  font: inherit;
}

.article-editor__title:focus {
  outline: none;
  border-bottom-color: var(--studio-border);
}

.article-editor__studio {
  flex: 0 0 auto;
}

.article-editor__header-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
}

.content-language-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  padding-inline: 8px;
}

.content-language-control span {
  font-size: 12px;
}

.article-editor__source-language {
  opacity: 0.5;
}

.article-editor__block-language {
  float: right;
  opacity: 1;
  margin-inline-start: 8px;
}

.article-editor__toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 0;
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--studio-surface-solid);
  border-bottom: 1px solid var(--studio-border);
}

.bp-dialog-root .article-editor__toolbar .icon-button {
  background: transparent;
  box-shadow: none;
}

.bp-dialog-root .article-editor__toolbar .icon-button[aria-pressed=true] {
  background: var(--studio-surface-muted);
}

.bp-dialog-root .article-editor__toolbar :is(button, select):disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.article-editor__block-language {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.content-language-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}

.article-editor__toolbar select {
  height: 34px;
  padding: 4px 8px;
  border: 1px solid var(--studio-border);
  border-radius: 8px;
  background: transparent;
  color: inherit;
}

.article-editor__document {
  padding: 24px clamp(12px, 4vw, 60px);
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.article-editor__document .tiptap {
  outline: none;
  min-height: 100%;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.article-editor__document .tiptap p {
  color: inherit;
  font: inherit;
  line-height: 1.7;
}

.article-editor__source {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 8px;
}

.article-editor__source textarea {
  flex: 1;
  min-height: 0;
  width: 100%;
  resize: none;
  font: 14px/1.5 monospace;
}

.article-editor__source [hidden] {
  display: none;
}

.article-editor__source-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 0 12px;
}

.article-editor__source-toolbar .button {
  width: auto;
  min-width: 0;
  padding-inline: 12px;
}

.article-editor__source-toolbar button[aria-pressed=true] {
  background: var(--studio-surface-muted);
  font-weight: 650;
}

.article-editor__source-toolbar button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.article-editor__code-pane {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--studio-border);
  border-radius: 10px;
}

.article-editor__code-pane > .cm-editor {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
}

.article-editor__code-pane > textarea {
  border: 0;
  border-radius: 0;
}

.article-editor__document :is(p, h1, h2, h3, ul, ol, blockquote, pre, table) {
  margin: 0 0 16px;
}

.article-editor__document ul {
  list-style: disc;
  padding-left: 24px;
}

.article-editor__document ol {
  list-style: decimal;
  padding-left: 24px;
}

.article-editor__document blockquote {
  border-left: 3px solid var(--studio-border);
  padding-left: 18px;
}

.article-editor__document pre {
  background: var(--studio-surface-muted);
  padding: 16px;
  border-radius: 8px;
  white-space: pre-wrap;
}

.article-editor__document :is(img, video) {
  max-width: 100%;
  max-height: 450px;
}

.article-editor__document table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.article-editor__document :is(td, th) {
  border: 1px solid var(--studio-border);
  padding: 8px;
  min-width: 40px;
}

.article-editor__document .selectedCell {
  background: var(--studio-surface-muted);
}

.article-editor__footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bp-dialog-root .article-editor__footer .button[hidden] {
  display: none;
}

/* Controls use the shared tooltip portal. Legacy pseudo labels on the textbox
   and toolbar would create duplicate hints and horizontal overflow. */
.bp-dialog:has(.article-editor) [aria-label]::after, .bp-dialog:has(.article-editor) [title]::after {
  content: none;
  display: none;
}

.article-editor__status {
  font-size: 13px;
  margin: 8px 0;
}

.article-editor__status[role=alert] {
  color: var(--color-error);
}

.article-editor__link {
  display: grid;
  gap: 12px;
  min-width: 240px;
}

.content-language-picker {
  width: min(320px, 100vw - 46px);
}

.content-language-picker .form-field {
  display: grid;
  gap: 8px;
}

.content-language-picker p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.content-language-picker p:empty {
  display: none;
}

.widget-action-bar .designer-locale-selection {
  flex: 0 0 auto;
  width: auto;
  min-width: 32px;
  padding-inline: 6px;
}

.designer-locale-selection[hidden] {
  display: none;
}

.designer-locale-source > .canvas-item-content {
  opacity: 0.5;
}

.builder-header .header-actions .content-language-control {
  width: auto;
  min-width: 36px;
  gap: 6px;
  padding-inline: 8px;
}

.page-editor-widget {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-edit-widget {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.delete-user-btn {
  width: 20px;
  height: 20px;
  cursor: pointer;
  align-self: flex-end;
  transition: opacity 0.2s;
}

.delete-user-btn:hover {
  opacity: 0.7;
}

.page-editor-widget label,
.user-edit-widget label {
  font-weight: 500;
}

.user-field-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.color-choices {
  display: flex;
  gap: 6px;
}

.color-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  padding: 0;
  background: none;
}

.color-circle.active {
  border-color: var(--user-color);
}

.color-circle.add-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px dashed #ccc;
  color: #555;
}

.color-picker-toggle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--user-color);
}

.color-picker.hidden {
  display: none;
}

.page-editor-workspace {
  container: page-editor/inline-size;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  padding: clamp(16px, 2vw, 28px);
  color: var(--studio-text);
}
.page-editor-workspace .page-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.page-editor-workspace h2 {
  margin: 10px 0 6px;
  font-size: 23px;
  overflow-wrap: anywhere;
}
.page-editor-workspace h3 {
  margin: 0;
  font-size: 15px;
}
.page-editor-workspace p {
  margin: 0;
  color: var(--studio-text-muted);
  line-height: 1.5;
}
.page-editor-workspace .page-editor-back {
  color: var(--studio-text-muted);
  font-size: 13px;
}
.page-editor-workspace .page-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.page-editor-workspace .page-editor-feedback:empty {
  display: none;
}
.page-editor-workspace [role=alert] {
  color: var(--color-error);
}
.page-editor-workspace .page-editor-body {
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
  gap: 28px;
}
.page-editor-workspace .page-editor-widget {
  padding: 20px;
  background: var(--studio-surface-muted);
  border-radius: 12px;
  gap: 18px;
  min-width: 0;
}
.page-editor-workspace .page-editor-content {
  min-width: 0;
}
.page-editor-workspace .form-field {
  min-width: 0;
  margin: 0;
}
.page-editor-workspace .form-field input, .page-editor-workspace .form-field textarea, .page-editor-workspace .form-field select {
  width: 100%;
}
.page-editor-workspace .form-field textarea {
  resize: vertical;
}
.page-editor-workspace::after, .page-editor-workspace [aria-label]::after {
  display: none !important;
}
@container page-editor (max-width: 850px) {
  .page-editor-workspace .page-editor-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .page-editor-workspace .page-editor-actions {
    width: 100%;
  }
}

.page-editor-workspace .page-editor-body {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.page-editor-workspace .page-editor-widget {
  display: contents;
}
.page-editor-workspace .page-editor-general, .page-editor-workspace .page-editor-seo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--studio-border);
}
.page-editor-workspace .page-editor-general > h3, .page-editor-workspace .page-editor-seo > h3 {
  grid-column: 1/-1;
  margin: 0;
}
.page-editor-workspace .page-editor-general {
  order: 0;
}
.page-editor-workspace .page-editor-content {
  order: 1;
}
.page-editor-workspace .page-editor-seo {
  order: 2;
}
.page-editor-workspace input[type=datetime-local] {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  box-sizing: border-box;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-field-radius);
  background: var(--studio-surface-solid);
  color: var(--studio-text);
  font: inherit;
}
.page-editor-workspace .page-editor-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--studio-border);
}
.page-editor-workspace .page-editor-footer .page-editor-feedback {
  margin: 0 auto 0 0;
}
.page-editor-workspace .page-content-source {
  border-block: 1px solid var(--studio-border);
  padding: 12px 0;
}
.page-editor-workspace .page-content-source summary {
  cursor: pointer;
  font-size: 13px;
}
.page-editor-workspace .page-content-source[open] summary {
  margin-bottom: 12px;
}
.page-editor-workspace .page-content-source textarea {
  min-height: 240px;
}
.page-editor-workspace .page-editor-seo .form-actions {
  justify-content: flex-start;
  gap: 8px;
  border: 0;
  padding: 0;
  margin: 8px 0;
}
@media (max-width: 650px) {
  .page-editor-workspace .page-editor-general, .page-editor-workspace .page-editor-seo {
    grid-template-columns: 1fr;
  }
  .page-editor-workspace .page-editor-footer {
    flex-wrap: wrap;
  }
}

.page-editor-workspace .page-editor-body > .bp-tab-panel {
  min-height: 300px;
}

.page-editor-workspace .page-editor-general,
.page-editor-workspace .page-editor-seo {
  border-bottom: 0;
}

.page-editor-workspace .page-editor-footer .page-editor-actions {
  width: auto;
  margin-left: auto;
}

.page-editor-workspace .page-editor-seo {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.page-editor-workspace .page-editor-seo-text {
  display: grid;
  gap: 18px;
  max-width: 720px;
  width: 100%;
}
.page-editor-workspace .page-editor-seo-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  border-top: 1px solid var(--studio-border);
  padding-top: 24px;
}
.page-editor-workspace .form-field {
  align-self: start;
  align-content: start;
  gap: 8px;
}
.page-editor-workspace .page-editor-image-preview {
  min-height: 120px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-field-radius);
}
.page-editor-workspace .page-editor-image-preview img[hidden], .page-editor-workspace .page-editor-image-preview p:empty {
  display: none;
}
.page-editor-workspace .page-editor-image .icon-button {
  background: transparent;
  box-shadow: none;
}
.page-editor-workspace .page-editor-image summary, .page-editor-workspace .page-layout-help summary, .page-editor-workspace .page-content-library summary {
  font-size: 13px;
  cursor: pointer;
}
.page-editor-workspace .page-content-library {
  border-top: 1px solid var(--studio-border);
  padding-top: 16px;
}
.page-editor-workspace .page-content-library[open] > summary {
  margin-bottom: 16px;
}
.page-editor-workspace .page-content-library .design-gallery {
  margin-top: 12px;
}
.page-editor-workspace .page-content-widget .selected-content {
  background: transparent;
  border-radius: 0;
  border-width: 0 0 1px;
  padding: 12px 0;
}
.page-editor-workspace .page-layout-help p {
  margin-top: 8px;
}
.page-editor-workspace .page-layout-fields select {
  min-height: 40px;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-field-radius);
  padding: 8px 12px;
  background: var(--studio-surface-solid);
  font: inherit;
}
@media (max-width: 650px) {
  .page-editor-workspace .page-editor-seo-images {
    grid-template-columns: 1fr;
  }
}

.page-editor-tab-toolbar {
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--studio-border);
}

.page-editor-tab-toolbar .page-editor-tabs {
  flex: 1;
  min-width: 0;
  border-bottom: 0;
}

.page-editor-tab-actions {
  margin-left: auto;
  flex: 0 0 auto;
}

.page-editor-tab-actions[hidden] {
  display: none;
}

.page-editor-tab-actions .page-content-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 700px) {
  .page-editor-tab-toolbar {
    flex-wrap: wrap;
    padding-bottom: 8px;
    gap: 8px;
  }
}
.page-manager__create-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

/* Reserve equal space on both sides so the label itself stays centered. The
   existing plus asset is masked with currentColor, including custom themes. */
.app-scope .page-manager .button[data-action=add] {
  position: relative;
  padding-inline: 32px;
  gap: 0;
  justify-content: center;
}

.page-manager .button[data-action=add] > .icon {
  display: none;
}

.page-manager .button[data-action=add]::before {
  content: "";
  position: absolute;
  inset-inline-start: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background: currentColor;
  mask: url("/assets/icons/plus.svg") center/contain no-repeat;
}

.page-manager__slot-warning {
  display: inline-flex;
  align-items: center;
  color: #c52828;
  flex: 0 0 auto;
  margin-left: 6px;
}

.page-manager__slot-warning img {
  width: 16px;
  height: 16px;
  filter: invert(22%) sepia(92%) saturate(2400%) hue-rotate(345deg);
}

.page-manager__slot-warning::after {
  content: none;
  display: none;
}

.page-content-widget {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  color: var(--studio-text);
}
.page-content-widget h3, .page-content-widget p {
  margin: 0;
}
.page-content-widget h3 {
  font-size: 15px;
  margin-bottom: 6px;
}
.page-content-widget p, .page-content-widget .empty-state {
  color: var(--studio-text-muted);
  line-height: 1.5;
}
.page-content-widget [role=alert] {
  color: var(--color-error);
}
.page-content-widget [aria-label]::after {
  display: none !important;
}
.page-content-widget .content-title-bar, .page-content-widget .page-content-actions, .page-content-widget .selected-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.page-content-widget .selected-content {
  justify-content: space-between;
  padding: 16px;
  border: 1px solid var(--studio-border);
  border-radius: 12px;
  background: var(--studio-surface-muted);
  overflow-wrap: anywhere;
}
.page-content-widget .page-content-search input {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  font: inherit;
  color: var(--studio-text);
  background: var(--studio-surface-muted);
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-field-radius);
}
.page-content-widget .page-content-feedback:empty, .page-content-widget .page-content-library-status:empty {
  display: none;
}
.page-content-widget .page-layout-control {
  display: grid;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--studio-border);
}
.page-content-widget .page-layout-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.page-content-widget .page-layout-fields label, .page-content-widget .page-content-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.page-content-widget .page-layout-fields label[hidden] {
  display: none;
}
.page-content-widget .page-layout-fields label > span, .page-content-widget .page-content-body > span {
  font-size: 12px;
  color: var(--studio-text-muted);
}
.page-content-widget .page-layout-source, .page-content-widget .page-layout-hint {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.page-content-widget .page-layout-source a {
  color: var(--studio-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.page-content-widget .page-content-body textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 200px;
  padding: 14px;
  resize: vertical;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-field-radius);
  background: var(--studio-surface-solid);
  color: var(--studio-text);
  line-height: 1.6;
  font-family: ui-monospace, monospace;
}
.page-content-widget .page-content-body textarea:focus-visible {
  outline: 2px solid var(--user-color);
  outline-offset: 2px;
}
@media (max-width: 640px) {
  .page-content-widget .page-layout-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}
.page-content-widget .design-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
  gap: 12px;
}
.page-content-widget .design-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 12px;
  min-width: 0;
  text-align: left;
  font: inherit;
  color: var(--studio-text);
  background: var(--studio-surface-solid);
  border: 1px solid var(--studio-border);
  border-radius: 12px;
  box-shadow: none;
  cursor: pointer;
}
.page-content-widget .design-card:hover {
  background: var(--studio-surface-muted);
  border-color: var(--user-color);
}
.page-content-widget .design-card:focus-visible {
  outline: 2px solid var(--user-color);
  outline-offset: 3px;
}
.page-content-widget .design-card span {
  font-size: 12px;
  color: var(--studio-text-muted);
}
.page-content-widget .design-preview {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 6px;
}
.page-content-widget .design-name {
  font-size: 13px;
  overflow-wrap: anywhere;
  font-family: inherit;
}

/* =============================================================================
   components/_text-editor-toolbar.scss
   Styles for the fixed text block editor toolbar
   ============================================================================= */
.text-block-editor-toolbar {
  position: fixed;
  top: 0;
  left: 0;
  width: max-content;
  transform: none;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  background: var(--color-white);
  border: 1px solid #eee;
  border-radius: 21px;
  box-shadow: var(--shadow-default);
  z-index: 1000;
}
.text-block-editor-toolbar .tb-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  color: var(--color-text);
}
.text-block-editor-toolbar .tb-btn:hover {
  background: var(--color-secondary-light);
}
.text-block-editor-toolbar .tb-btn.active {
  background: color-mix(in srgb, var(--user-color), black 20%);
  color: var(--color-white);
}
@supports not (background: color-mix(in srgb, #000, black 20%)) {
  .text-block-editor-toolbar .tb-btn.active {
    background: var(--user-color);
    opacity: 0.8;
  }
}
.text-block-editor-toolbar .font-size-control {
  background: var(--color-white-dark);
  border-radius: 4px;
}
.text-block-editor-toolbar .font-size-control .fs-dec {
  border-right: 1px solid var(--color-secondary-light);
}
.text-block-editor-toolbar .font-size-control .fs-inc {
  border-left: 1px solid var(--color-secondary-light);
}
.text-block-editor-toolbar .font-size-control .fs-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.text-block-editor-toolbar .font-size-control .fs-dropdown {
  position: relative;
}
.text-block-editor-toolbar .font-size-control .fs-dropdown.open .fs-options {
  display: block;
}
.text-block-editor-toolbar .font-family-control,
.text-block-editor-toolbar .font-size-control {
  display: flex;
  align-items: center;
  gap: 4px;
}
.text-block-editor-toolbar .opacity-control {
  position: relative;
}
.text-block-editor-toolbar .opacity-control .opacity-slider {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 260px;
  padding: 10px 14px;
  background: var(--color-white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 200;
  gap: 12px;
  display: none;
  align-items: center;
}
.text-block-editor-toolbar .opacity-control .opacity-slider.open {
  display: flex;
}
.text-block-editor-toolbar .opacity-control .opacity-slider .opacity-range {
  flex: 1;
}
.text-block-editor-toolbar .opacity-control .opacity-slider .opacity-value {
  font-size: 14px;
  color: var(--color-text);
  min-width: 48px;
  text-align: right;
}
.text-block-editor-toolbar .ff-options,
.text-block-editor-toolbar .fs-options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-white);
  border: 1px solid #eee;
  box-shadow: var(--shadow-default);
  border-radius: 4px;
  padding: 4px;
  z-index: 1000;
}
.text-block-editor-toolbar .ff-options span,
.text-block-editor-toolbar .fs-options span {
  display: block;
  padding: 2px 4px;
  cursor: pointer;
}
.text-block-editor-toolbar .ff-options span:hover,
.text-block-editor-toolbar .fs-options span:hover {
  background: var(--color-secondary-light);
}
.text-block-editor-toolbar .fs-input {
  width: 50px;
  padding: 2px 4px;
  border: 1px solid var(--color-secondary-light);
  border-radius: 4px;
  font-size: 14px;
  text-align: center;
  background: var(--color-white);
  color: var(--color-text);
}

.html-widget {
  width: 100%;
  height: 100%;
}

.widget-textbox {
  width: 100%;
  padding: 0.25rem;
  box-sizing: border-box;
  min-height: 1rem;
}
.widget-textbox .editable {
  all: unset;
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  color: #333;
  background-color: #fff;
  outline: none;
  user-select: text;
  cursor: text;
}
.widget-textbox .editable b,
.widget-textbox .editable strong {
  font-weight: bold;
}
.widget-textbox .editable i,
.widget-textbox .editable em {
  font-style: italic;
}
.widget-textbox .editable u {
  text-decoration: underline;
}

.half-width {
  width: 50%;
}

.third-width {
  width: 33.333%;
}

.max {
  max-width: 100%;
  max-height: 100%;
}

.max-width {
  max-width: 100%;
}

.max-height {
  max-height: 100%;
}

.overflow {
  overflow: auto;
}

.user-list-card {
  margin: 0 auto;
  min-width: 280px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.user-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.add-user-btn {
  width: 22px;
  height: 22px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.add-user-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.add-group-btn {
  width: 22px;
  height: 22px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.add-group-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.users-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.users-list .empty-state {
  color: var(--studio-text-muted);
  padding: 20px 0 8px 0;
  text-align: center;
  font-size: 16px;
  font-family: var(--font-body);
}

.users-list li {
  border-radius: 8px;
  background: var(--studio-surface-muted);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  padding: 14px 12px 10px 14px;
  gap: 4px;
  transition: box-shadow 0.16s;
  border: 1px solid transparent;
}
.users-list li:hover {
  border: 1px solid var(--user-color);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.roles-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.roles-list .empty-state {
  color: var(--studio-text-muted);
  padding: 20px 0 8px 0;
  text-align: center;
  font-size: 16px;
  font-family: var(--font-body);
}

.roles-list li {
  border-radius: 8px;
  background: var(--studio-surface-muted);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  padding: 14px 12px 10px 14px;
  gap: 4px;
  transition: box-shadow 0.16s;
  border: 1px solid transparent;
}
.roles-list li:hover {
  border: 1px solid var(--user-color);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.roles-list .page-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.roles-list .page-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: flex-end;
}
.roles-list .page-actions .icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  fill: #888;
  cursor: pointer;
  opacity: 0.72;
  transition: fill 0.16s, opacity 0.14s, transform 0.14s;
}
.roles-list .page-actions .icon:hover {
  fill: var(--user-color);
  opacity: 1;
  transform: scale(1.13);
}

.users-tabs {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.5rem;
}

.users-tab {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  position: relative;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}
.users-tab::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 3px;
  background: var(--user-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.users-tab:hover {
  opacity: 1;
}
.users-tab.active {
  opacity: 1;
  font-weight: 600;
}
.users-tab.active::after {
  transform: scaleX(1);
}

.permissions-card {
  margin: 0 auto;
  min-width: 280px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.permissions-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.permissions-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.permissions-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.roles-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.permissions-list .empty-state {
  color: var(--studio-text-muted);
  padding: 20px 0 8px 0;
  text-align: center;
  font-size: 16px;
  font-family: var(--font-body);
}

.roles-list .empty-state {
  color: var(--studio-text-muted);
  padding: 20px 0 8px 0;
  text-align: center;
  font-size: 16px;
  font-family: var(--font-body);
}

.permissions-list li {
  border-radius: 8px;
  background: var(--studio-surface-muted);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  padding: 14px 12px 10px 14px;
  gap: 4px;
  transition: box-shadow 0.16s;
  border: 1px solid transparent;
}
.permissions-list li:hover {
  border: 1px solid var(--user-color);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.roles-list li {
  border-radius: 8px;
  background: var(--studio-surface-muted);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  padding: 14px 12px 10px 14px;
  gap: 4px;
  transition: box-shadow 0.16s;
  border: 1px solid transparent;
}
.roles-list li:hover {
  border: 1px solid var(--user-color);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.roles-list .page-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.roles-list .page-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: flex-end;
}
.roles-list .page-actions .icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  fill: #888;
  cursor: pointer;
  opacity: 0.72;
  transition: fill 0.16s, opacity 0.14s, transform 0.14s;
}
.roles-list .page-actions .icon:hover {
  fill: var(--user-color);
  opacity: 1;
  transform: scale(1.13);
}

.add-permission-btn {
  width: 22px;
  height: 22px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.add-permission-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.add-group-btn {
  width: 22px;
  height: 22px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.add-group-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.permissions-sub-title {
  font-family: var(--font-heading);
  font-size: 18px;
  margin-top: 8px;
}

.widget-list-card {
  margin: 0 auto;
  min-width: 280px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.widget-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.widget-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.widget-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.widget-list .empty-state {
  color: var(--studio-text-muted);
  padding: 20px 0 8px 0;
  text-align: center;
  font-size: 16px;
  font-family: var(--font-body);
}

.widget-list li {
  border-radius: 8px;
  background: var(--studio-surface-muted);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  padding: 14px 12px 10px 14px;
  gap: 4px;
  transition: box-shadow 0.16s;
  border: 1px solid transparent;
}
.widget-list li:hover {
  border: 1px solid var(--user-color);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}
.widget-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-name {
  flex: 1;
}

.widget-tabs {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.5rem;
}

.widget-tab {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  position: relative;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}
.widget-tab::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 3px;
  background: var(--user-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.widget-tab:hover {
  opacity: 1;
}
.widget-tab.active {
  opacity: 1;
  font-weight: 600;
}
.widget-tab.active::after {
  transform: scaleX(1);
}

.global-widget:hover,
.template-widget:hover {
  box-shadow: 0 0 0 2px var(--user-color);
}

.widget-library {
  container: widget-library/inline-size;
  color: var(--studio-text);
  font-family: var(--font-body);
  min-width: 0;
}

.widget-library[aria-label]::after,
.widget-library [aria-label]::after {
  content: none;
  display: none;
}

.widget-library__header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.widget-library h2 {
  margin: 0;
  font-size: 1.35rem;
}

.widget-library__header p,
.widget-library__summary,
.widget-library__details p,
.widget-library__empty {
  color: var(--studio-text-muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.widget-library__header p {
  margin-bottom: 0;
}

.widget-library__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 360px);
  gap: 28px;
  align-items: start;
}

.widget-library__browse {
  min-width: 0;
}

.widget-library__search {
  box-sizing: border-box;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-field-radius);
  background: var(--studio-surface-muted);
  color: var(--studio-text);
  font: inherit;
  font-size: 0.85rem;
}

.widget-library__filters {
  display: flex;
  gap: 6px;
  padding: 12px 0;
  border-bottom: 1px solid var(--studio-border);
}

.widget-library__filters button {
  border: 0;
  border-radius: var(--studio-field-radius);
  padding: 8px 12px;
  background: transparent;
  color: var(--studio-text-muted);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.widget-library__filters [aria-pressed=true] {
  background: var(--studio-surface-muted);
  color: var(--studio-text);
}

.widget-library__list {
  display: grid;
  gap: 4px;
}

.widget-library__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  min-width: 0;
  border: 0;
  border-radius: var(--studio-field-radius);
  background: transparent;
  color: var(--studio-text);
  font: inherit;
  font-size: 0.87rem;
  text-align: left;
  cursor: pointer;
}

.widget-library__item strong {
  overflow-wrap: anywhere;
  min-width: 0;
}

.widget-library__item .icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.widget-library__item:hover {
  background: var(--studio-surface-muted);
}

.widget-library__item[aria-pressed=true] {
  background: color-mix(in srgb, var(--brand) 7%, var(--studio-surface-solid));
}

.widget-library__details {
  padding: 20px;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-panel);
  background: var(--studio-surface-muted);
  min-width: 0;
  overflow-wrap: anywhere;
}

.widget-library__details h3 {
  font-size: 1.1rem;
  margin: 6px 0 16px;
}

.widget-library__details .widget-library__kicker {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
}

.widget-library__summary[role=alert] {
  color: var(--color-error);
}

.widget-library__back {
  display: none !important;
}

.widget-library :is(input, button):focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 60%, transparent);
  outline-offset: 2px;
}

@container widget-library (max-width: 800px) {
  .widget-library__layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .widget-library__back {
    display: inline-flex !important;
    margin-top: 16px;
  }
}
.widget-library__header > div:first-child {
  display: none;
}

.news-list-card {
  margin: 0 auto;
  min-width: 280px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.news-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.news-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.news-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-list .empty-state {
  color: var(--studio-text-muted);
  padding: 20px 0 8px 0;
  text-align: center;
  font-size: 16px;
  font-family: var(--font-body);
}

.news-list li {
  border-radius: 8px;
  background: var(--studio-surface-muted);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  padding: 14px 12px 10px 14px;
  gap: 4px;
  transition: box-shadow 0.16s;
  border: 1px solid transparent;
}
.news-list li:hover {
  border: 1px solid var(--user-color);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.news-list li a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.news-text {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: #555;
}

.news-timestamp {
  font-size: 0.8rem;
  color: #777;
  margin-top: 4px;
}

.news-detail-card {
  margin: 0 auto;
  min-width: 280px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.news-detail-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.03em;
  margin-bottom: 8px;
  margin-bottom: 1rem;
}

.news-json {
  font-family: var(--font-body);
  line-height: 1.4;
}

/* ============================================================
   Collapsible widgets side panel
   ============================================================ */
.widgets-panel,
.widgets-toggle {
  display: none;
}

.dashboard-edit-mode .widgets-toggle {
  display: block;
}
.dashboard-edit-mode .widgets-panel {
  display: flex;
}

.widgets-toggle {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 1000;
  background: var(--studio-surface-solid);
  color: var(--studio-text);
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-control) 0 0 var(--studio-radius-control);
  box-shadow: var(--studio-shadow-soft);
  padding: 8px 12px;
  cursor: pointer;
  transition: background var(--motion-duration-base) var(--motion-ease-standard), border-color var(--motion-duration-base) var(--motion-ease-standard), transform var(--motion-duration-fast) var(--motion-ease-standard);
}

.widgets-toggle:hover {
  background: var(--studio-surface-muted);
  border-color: color-mix(in srgb, var(--user-color) 24%, var(--studio-border));
}

.widgets-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 100vw);
  height: 100dvh;
  box-sizing: border-box;
  transform: translateX(100%);
  background: var(--studio-surface);
  border-left: 1px solid var(--studio-border);
  box-shadow: var(--studio-shadow-lift);
  backdrop-filter: blur(18px);
  transition: transform var(--motion-duration-slow) var(--motion-ease-standard);
  z-index: 1000;
  flex-direction: column;
}

.widgets-panel.open {
  transform: translateX(0);
}

.widgets-panel-inner {
  min-height: 0;
  min-width: 0;
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

.widgets-search {
  box-sizing: border-box;
  width: 100%;
  margin-bottom: 12px;
  padding: 6px 8px;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-control);
  background: var(--studio-surface-solid);
  color: var(--studio-text);
}

.widgets-category {
  margin-bottom: 20px;
}

.category-title {
  font-weight: 600;
  margin-bottom: 8px;
}

.widgets-list {
  display: grid;
  gap: 8px;
}

.widget-card {
  min-width: 0;
  overflow-wrap: anywhere;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: var(--studio-surface-solid);
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-panel);
  cursor: grab;
  box-shadow: var(--studio-shadow-soft);
  transition: background var(--motion-duration-base) var(--motion-ease-standard), border-color var(--motion-duration-base) var(--motion-ease-standard), transform var(--motion-duration-fast) var(--motion-ease-standard);
}

.widget-card:hover {
  background: var(--studio-surface-muted);
  border-color: color-mix(in srgb, var(--user-color) 20%, var(--studio-border));
  transform: translateY(-1px);
}

.widget-card:focus-visible {
  box-shadow: var(--studio-focus-ring);
}

.widget-card:active {
  cursor: grabbing;
}

.widget-card .icon {
  width: 20px;
  height: 20px;
}

body.grid-mode .canvas-item:not(:where(.dashboard-widget)) {
  border: none;
}
body.grid-mode .bounding-box {
  position: absolute;
  top: 0;
  left: 0;
  border: 1px dashed var(--studio-border-strong);
  pointer-events: none;
  box-sizing: border-box;
  z-index: 1000;
  will-change: transform, width, height;
  cursor: move;
  touch-action: none;
  --edge-hit: calc(var(--edge-base) * var(--inv-scale));
}
body.grid-mode .bounding-box .bbox-edge {
  position: absolute;
  pointer-events: auto;
  touch-action: none;
}
body.grid-mode .bounding-box .bbox-handle {
  position: absolute;
  pointer-events: auto;
  touch-action: none;
}
body.grid-mode .bounding-box .bbox-edge.n {
  cursor: ns-resize;
  left: 0;
  right: 0;
  top: calc(-0.5 * var(--edge-hit));
  height: var(--edge-hit);
}
body.grid-mode .bounding-box .bbox-edge.s {
  cursor: ns-resize;
  left: 0;
  right: 0;
  bottom: calc(-0.5 * var(--edge-hit));
  height: var(--edge-hit);
}
body.grid-mode .bounding-box .bbox-edge.e {
  cursor: ew-resize;
  top: 0;
  bottom: 0;
  right: calc(-0.5 * var(--edge-hit));
  width: var(--edge-hit);
}
body.grid-mode .bounding-box .bbox-edge.w {
  cursor: ew-resize;
  top: 0;
  bottom: 0;
  left: calc(-0.5 * var(--edge-hit));
  width: var(--edge-hit);
}
body.grid-mode .bounding-box .bbox-edge.ne {
  cursor: nesw-resize;
  top: calc(-0.5 * var(--edge-hit));
  right: calc(-0.5 * var(--edge-hit));
  width: var(--edge-hit);
  height: var(--edge-hit);
}
body.grid-mode .bounding-box .bbox-edge.se {
  cursor: nwse-resize;
  bottom: calc(-0.5 * var(--edge-hit));
  right: calc(-0.5 * var(--edge-hit));
  width: var(--edge-hit);
  height: var(--edge-hit);
}
body.grid-mode .bounding-box .bbox-edge.sw {
  cursor: nesw-resize;
  bottom: calc(-0.5 * var(--edge-hit));
  left: calc(-0.5 * var(--edge-hit));
  width: var(--edge-hit);
  height: var(--edge-hit);
}
body.grid-mode .bounding-box .bbox-edge.nw {
  cursor: nwse-resize;
  top: calc(-0.5 * var(--edge-hit));
  left: calc(-0.5 * var(--edge-hit));
  width: var(--edge-hit);
  height: var(--edge-hit);
}
body.grid-mode .bounding-box.disabled {
  display: none;
}

.home-update-widget,
.home-roadmap-widget,
.home-drag-widget {
  box-sizing: border-box;
  width: 100%;
  min-height: 100%;
  padding: 20px;
  border: 1px solid var(--studio-border);
  border-radius: 8px;
  background: var(--studio-surface-solid);
  color: var(--studio-text);
  box-shadow: var(--studio-shadow-soft);
  font-family: var(--font-body);
}

.home-getting-started-widget {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.home-widget-kicker {
  margin: 0;
  color: var(--studio-text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-update-widget h2,
.home-roadmap-widget h3,
.home-drag-widget h3 {
  margin: 0;
  color: var(--studio-text);
  font-family: var(--font-heading);
  font-size: 22px;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: 0;
}

.home-widget-copy {
  margin: 0;
  max-width: 66ch;
  color: var(--studio-text-muted);
  font-size: 15px;
  line-height: 1.5;
}

.home-start-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.home-start-action {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--studio-border);
  border-radius: 8px;
  background: var(--studio-surface-muted);
  color: var(--studio-text);
  text-decoration: none;
  transition: border-color var(--motion-duration-fast) var(--motion-ease-standard), box-shadow var(--motion-duration-fast) var(--motion-ease-standard);
}
.home-start-action:hover, .home-start-action:focus-visible {
  border-color: var(--studio-border-strong);
  box-shadow: var(--studio-shadow-control);
}
.home-start-action span {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--studio-surface-solid);
  color: var(--studio-text);
  font-size: 13px;
  font-weight: 700;
}
.home-start-action strong {
  min-width: 0;
  color: inherit;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 650;
}

.home-start-action--primary {
  border-color: color-mix(in srgb, var(--user-color) 36%, var(--studio-border));
  background: color-mix(in srgb, var(--user-color) 10%, var(--studio-surface-solid));
}

.home-check-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.home-check-list li {
  position: relative;
  padding-left: 20px;
  color: var(--studio-text);
  font-size: 14px;
  line-height: 1.4;
}
.home-check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--user-color);
  transform: translateY(-50%);
}

@media (max-width: 860px) {
  .home-start-actions {
    grid-template-columns: 1fr;
  }
}
.analytics-workspace {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 24px;
  color: var(--studio-text);
  font-family: var(--font-body);
}
.analytics-workspace h2 {
  margin: 0;
  font-size: 24px;
}
.analytics-workspace > p {
  margin: 8px 0 20px;
  color: var(--studio-text-muted);
}
.analytics-workspace .analytics-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.analytics-workspace .analytics-toolbar a.button,
.analytics-workspace .analytics-toolbar a.button:hover,
.analytics-workspace .analytics-toolbar a.button:focus-visible {
  text-decoration: none;
}
.analytics-workspace .analytics-toolbar label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
}
.analytics-workspace .analytics-toolbar .custom-select {
  width: 160px;
  min-width: 160px;
  flex-shrink: 0;
}
.analytics-workspace .analytics-content {
  display: grid;
  gap: 24px;
  min-width: 0;
}
.analytics-workspace .analytics-content > p {
  margin: 0;
  color: var(--studio-text-muted);
  font-size: 13px;
}
.analytics-workspace .analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 20px;
  min-width: 0;
}
.analytics-workspace .analytics-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--studio-border);
  border-radius: 8px;
  background: var(--studio-surface-solid);
}
.analytics-workspace .analytics-panel h3 {
  margin: 0 0 16px;
  font-size: 16px;
}
.analytics-workspace .analytics-panel > p {
  color: var(--studio-text-muted);
  font-size: 14px;
}
.analytics-workspace .analytics-table-scroll {
  max-height: 320px;
  overflow: auto;
}
.analytics-workspace table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}
.analytics-workspace th, .analytics-workspace td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--studio-border);
  text-align: left;
  overflow-wrap: anywhere;
  vertical-align: top;
}
.analytics-workspace th {
  position: sticky;
  top: 0;
  background: var(--studio-surface-solid);
  color: var(--studio-text-muted);
  font-weight: 500;
}
.analytics-workspace td:last-child {
  font-variant-numeric: tabular-nums;
}

.analytics-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 16px;
}
.analytics-summary .analytics-metric {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--studio-border);
  border-radius: 8px;
  background: var(--studio-surface-solid);
}
.analytics-summary span, .analytics-summary small {
  color: var(--studio-text-muted);
  font-size: 13px;
}
.analytics-summary strong {
  color: var(--studio-text);
  font-size: 32px;
  line-height: 1.1;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 600px) {
  .analytics-workspace {
    padding: 12px;
  }
}
@container dashboard-widget (max-width: 600px) {
  .analytics-workspace {
    padding: 12px;
  }
  .analytics-workspace .analytics-toolbar label {
    min-width: 0;
    flex-wrap: wrap;
  }
  .analytics-workspace .analytics-panel {
    padding: 12px;
  }
}

/*# sourceMappingURL=site.css.map */
