@font-face {
  font-family: "APD Manrope";
  src: url("../fonts/manrope-latin-variable.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

/* Read-only product release history. */
.apd-changelog-page {
  display: grid;
  gap: 20px;
}

.apd-changelog-summary {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 24px 28px;
  border-radius: 8px;
  background: var(--apd-surface);
  box-shadow: var(--apd-shadow-soft);
}

.apd-changelog-summary > div {
  display: grid;
  gap: 5px;
}

.apd-changelog-summary span,
.apd-changelog-entry aside span {
  color: var(--apd-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.apd-changelog-summary strong {
  color: var(--apd-text);
  font-size: 30px;
  line-height: 1;
}

.apd-changelog-summary p {
  max-width: 760px;
  margin: 0;
  color: var(--apd-muted);
  line-height: 1.7;
}

.apd-changelog-feed {
  display: grid;
  gap: 14px;
}

.apd-changelog-entry {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 30px;
  padding: 30px;
  border-radius: 8px;
  background: var(--apd-surface);
  box-shadow: var(--apd-shadow-soft);
}

.apd-changelog-entry aside {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 7px;
}

.apd-changelog-entry aside strong {
  color: var(--apd-text);
  font-size: 22px;
}

.apd-changelog-entry aside time {
  color: var(--apd-muted);
  font-size: 12px;
}

.apd-changelog-entry h2 {
  margin: 0 0 8px;
  font-size: 21px;
}

.apd-changelog-entry h2 a {
  color: var(--apd-text);
  text-decoration: none;
}

.apd-changelog-entry h2 a:hover,
.apd-changelog-entry h2 a:focus {
  color: var(--apd-accent);
}

.apd-changelog-entry__excerpt {
  max-width: 820px;
  margin: 0 0 22px;
  color: var(--apd-muted);
  font-size: 14px;
  line-height: 1.7;
}

.apd-changelog-entry__notes {
  color: var(--apd-text);
  line-height: 1.7;
}

.apd-changelog-entry__notes h3 {
  margin: 22px 0 8px;
  font-size: 14px;
}

.apd-changelog-entry__notes ul {
  margin: 0;
  padding-left: 18px;
}

.apd-changelog-empty {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 30px;
  border-radius: 8px;
  background: var(--apd-surface);
  box-shadow: var(--apd-shadow-soft);
}

.apd-changelog-empty .dashicons {
  width: 32px;
  height: 32px;
  color: var(--apd-accent);
  font-size: 32px;
}

.apd-changelog-empty h2,
.apd-changelog-empty p {
  margin: 0;
}

.apd-changelog-empty p {
  margin-top: 6px;
  color: var(--apd-muted);
}

@media (max-width: 720px) {
  .apd-changelog-summary,
  .apd-changelog-entry {
    grid-template-columns: 1fr;
  }
}

/* Reusable designer themes */
.apd-theme-library {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
  padding: 28px 30px;
  border: 1px solid var(--apd-border);
  border-radius: 8px;
  background: var(--apd-surface);
  box-shadow: var(--apd-shadow-soft);
}

.apd-theme-library__header,
.apd-theme-library__header > div,
.apd-theme-library-card__name,
.apd-settings-theme-picker,
.apd-settings-theme-preview,
.apd-product-theme-preview {
  display: flex;
  align-items: center;
}

.apd-theme-library__header {
  justify-content: space-between;
  gap: 24px;
}

.apd-theme-library__header > div {
  align-items: flex-start;
  flex-direction: column;
}

.apd-theme-library__header h1 {
  margin: 6px 0 0;
  color: var(--apd-text);
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
}

.apd-theme-library__header p {
  max-width: 760px;
  margin: 7px 0 0;
  color: var(--apd-muted);
  font-size: 13px;
  line-height: 1.65;
}

.apd-theme-library__header .button .dashicons {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  font-size: 16px;
  line-height: 16px;
}

.apd-theme-library__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.apd-theme-library-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 18px;
  gap: 14px;
  min-height: 92px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--apd-border);
  border-radius: 8px;
  background: var(--apd-surface);
  color: var(--apd-text);
  text-decoration: none;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.apd-theme-library-card:hover,
.apd-theme-library-card:focus {
  border-color: var(--apd-border-strong);
  color: var(--apd-text);
  box-shadow: var(--apd-shadow-soft);
  transform: translateY(-1px);
}

.apd-theme-library-card.is-active {
  border-color: var(--apd-accent);
  box-shadow: 0 0 0 2px var(--apd-accent-soft);
}

.apd-theme-library-card__preview {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr;
  grid-template-rows: 16px 1fr;
  width: 64px;
  height: 58px;
  overflow: hidden;
  border: 1px solid rgba(124, 141, 170, .2);
  border-radius: 7px;
  background: var(--theme-card-bg);
}

.apd-theme-library-card__preview i:nth-child(1) { grid-column: 1 / -1; background: var(--theme-card-panel); }
.apd-theme-library-card__preview i:nth-child(2) { background: var(--theme-card-text); opacity: .82; }
.apd-theme-library-card__preview i:nth-child(3) { margin: 9px; border-radius: 4px; background: var(--theme-card-accent); }

.apd-theme-library-card__body,
.apd-theme-library-card__body strong,
.apd-theme-library-card__body small {
  display: block;
  min-width: 0;
}

.apd-theme-library-card__name {
  gap: 7px;
}

.apd-theme-library-card__body strong {
  overflow: hidden;
  color: var(--apd-text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.apd-theme-library-card__body small {
  margin-top: 5px;
  color: var(--apd-muted);
  font-size: 10px;
  line-height: 1.45;
}

.apd-theme-library-card__name em,
.apd-theme-default-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--apd-accent-soft);
  color: var(--apd-accent);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.apd-theme-library-card > .dashicons {
  color: var(--apd-muted);
  font-size: 17px;
}

.apd-theme-library-create {
  display: grid;
  grid-template-columns: 34px minmax(150px, 1fr) minmax(150px, .8fr) minmax(140px, .7fr) auto;
  grid-column: 1 / -1;
  gap: 10px;
  align-items: center;
  padding: 13px;
  border: 1px dashed var(--apd-border-strong);
  border-radius: 8px;
  background: color-mix(in srgb, var(--apd-accent-soft) 45%, var(--apd-surface));
}

.apd-theme-library-create > .dashicons {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: var(--apd-accent-soft);
  color: var(--apd-accent);
}

.apd-theme-library-create strong,
.apd-theme-library-create small {
  display: block;
}

.apd-theme-library-create strong { color: var(--apd-text); font-size: 12px; }
.apd-theme-library-create small { margin-top: 3px; color: var(--apd-muted); font-size: 10px; }

.apd-theme-library-create input,
.apd-theme-library-create select {
  width: 100%;
  min-height: 40px;
  border-color: var(--apd-border);
  border-radius: 7px;
  color: var(--apd-text);
  box-shadow: none;
}

.apd-theme-studio__heading h2 {
  margin: 0;
  color: var(--apd-text);
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: 0;
}

.apd-theme-delete-button:not(:disabled) {
  color: #b42335;
}

.apd-settings-card--theme {
  grid-column: 1 / -1;
}

.apd-settings-card--theme .apd-card-head {
  align-items: flex-start;
}

.apd-settings-theme-picker {
  display: grid;
  grid-template-columns: minmax(280px, .75fr) minmax(320px, 1.25fr);
  gap: 24px;
  margin-top: 20px;
}

.apd-settings-theme-preview {
  gap: 16px;
  min-height: 92px;
  padding: 12px;
  border-radius: 8px;
  background: var(--apd-subtle-surface, #f7f9fc);
}

.apd-settings-theme-preview__canvas,
.apd-product-theme-preview > span {
  display: grid;
  grid-template-columns: 22px 1fr;
  grid-template-rows: 18px 1fr;
  width: 96px;
  height: 66px;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--theme-text) 16%, transparent);
  border-radius: 7px;
  background: var(--theme-bg);
}

.apd-settings-theme-preview__canvas i:nth-child(1),
.apd-product-theme-preview > span i:nth-child(1) { grid-column: 1 / -1; background: var(--theme-panel); }
.apd-settings-theme-preview__canvas i:nth-child(2),
.apd-product-theme-preview > span i:nth-child(2) { background: var(--theme-text); opacity: .84; }
.apd-settings-theme-preview__canvas i:nth-child(3),
.apd-product-theme-preview > span i:nth-child(3) { margin: 10px; border-radius: 4px; background: var(--theme-accent); }

.apd-settings-theme-preview strong,
.apd-settings-theme-preview small,
.apd-product-theme-preview strong,
.apd-product-theme-preview small {
  display: block;
}

.apd-settings-theme-preview strong,
.apd-product-theme-preview strong { color: var(--apd-text); font-size: 13px; }
.apd-settings-theme-preview small,
.apd-product-theme-preview small { margin-top: 4px; color: var(--apd-muted); font-size: 10px; }

.apd-product-theme-picker > p:first-child {
  margin-top: 0;
}

.apd-product-theme-preview {
  gap: 11px;
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  background: #f5f7fb;
}

.apd-product-theme-preview > span {
  grid-template-columns: 16px 1fr;
  grid-template-rows: 13px 1fr;
  width: 68px;
  height: 48px;
}

.apd-product-theme-preview > span i:nth-child(3) {
  margin: 7px;
}

@media (max-width: 1200px) {
  .apd-theme-library__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apd-theme-library-create { grid-template-columns: 34px minmax(140px, 1fr) minmax(140px, 1fr); }
  .apd-theme-library-create > label:last-of-type { grid-column: 2; }
  .apd-theme-library-create > .button { grid-column: 3; }
}

@media (max-width: 782px) {
  .apd-theme-library { margin-right: 10px; padding: 18px; }
  .apd-theme-library__header { align-items: flex-start; flex-direction: column; }
  .apd-theme-library__grid,
  .apd-settings-theme-picker { grid-template-columns: 1fr; }
  .apd-theme-library-create { grid-template-columns: 34px minmax(0, 1fr); }
  .apd-theme-library-create > label,
  .apd-theme-library-create > label:last-of-type,
  .apd-theme-library-create > .button { grid-column: 1 / -1; }
  .apd-theme-studio__heading h2 { font-size: 28px; }
}

/* Support center */
.apd-support-center__header-actions,
.apd-support-access__action,
.apd-support-public-contact > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.apd-support-access {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) minmax(190px, auto);
  align-items: center;
  gap: 28px;
  padding: 30px;
  border: 1px solid var(--apd-border);
  border-radius: 8px;
  background: var(--apd-surface);
  box-shadow: var(--apd-shadow-soft);
}

.apd-support-access.is-active {
  border-color: color-mix(in srgb, var(--apd-success, #138a68) 30%, var(--apd-border));
}

.apd-support-access__status {
  display: flex;
  width: 72px;
  height: 72px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--apd-accent-soft);
  color: var(--apd-accent);
}

.apd-support-access.is-active .apd-support-access__status {
  background: color-mix(in srgb, var(--apd-success, #138a68) 12%, var(--apd-surface));
  color: var(--apd-success, #138a68);
}

.apd-support-access__status span {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.apd-support-access__copy h2,
.apd-support-public-contact h2,
.apd-support-options h2 {
  margin: 0;
  color: var(--apd-text);
}

.apd-support-access__copy h2 {
  max-width: 720px;
  font-size: 20px;
  line-height: 1.35;
}

.apd-support-access__copy p {
  max-width: 780px;
  margin: 9px 0 0;
  color: var(--apd-muted);
  font-size: 12px;
  line-height: 1.65;
}

.apd-support-access__action {
  align-items: flex-end;
  flex-direction: column;
  text-align: right;
}

.apd-support-access__action form {
  margin: 0;
}

.apd-support-access__action small {
  max-width: 220px;
  color: var(--apd-muted);
  font-size: 10px;
  line-height: 1.5;
}

.apd-support-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px;
  margin: 42px 0;
}

.apd-support-options article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 4px 0;
}

.apd-support-options article > span {
  color: var(--apd-accent);
  font-size: 18px;
  font-weight: 760;
  line-height: 1.2;
}

.apd-support-options h2 {
  font-size: 14px;
}

.apd-support-options p,
.apd-support-public-contact p {
  margin: 7px 0 0;
  color: var(--apd-muted);
  font-size: 11px;
  line-height: 1.65;
}

.apd-support-options a {
  display: inline-block;
  margin-top: 9px;
  color: var(--apd-accent);
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
}

.apd-support-public-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 26px 0;
  border-top: 1px solid var(--apd-border);
}

.apd-support-public-contact .dashicons {
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--apd-accent-soft);
  color: var(--apd-accent);
  font-size: 19px;
}

.apd-support-public-contact h2 {
  font-size: 15px;
}

@media (max-width: 1080px) {
  .apd-support-access {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .apd-support-access__action {
    grid-column: 2;
    align-items: flex-start;
    text-align: left;
  }

  .apd-support-options {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 782px) {
  .apd-support-center__header-actions,
  .apd-support-public-contact,
  .apd-support-public-contact > div:last-child {
    align-items: stretch;
    flex-direction: column;
  }

  .apd-support-center__header-actions .button,
  .apd-support-access__action .button,
  .apd-support-public-contact .button {
    width: 100%;
  }

  .apd-support-access {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px;
  }

  .apd-support-access__status {
    width: 58px;
    height: 58px;
  }

  .apd-support-access__action {
    grid-column: auto;
    align-items: stretch;
  }
}

/* V13.1 independent template module destinations */
.apd-template-placement-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.apd-template-placement-option {
  display: grid;
  grid-template-columns: 18px 22px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  min-width: 0;
  padding: 12px;
  border: 1px solid #dce4ef;
  border-radius: 7px;
  background: #fff;
  color: #536078;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.apd-template-placement-option:hover {
  border-color: #b9c8e0;
  background: #fbfcff;
}

.apd-template-placement-option:has(input[type="checkbox"]:checked) {
  border-color: #9db4ed;
  background: #f1f5ff;
  box-shadow: inset 0 0 0 1px rgba(53, 100, 223, .05);
}

.apd-template-module-card.is-in-page .apd-template-placement-option:has([data-apd-template-module-page-content]:checked) {
  border-color: #7395ec;
  background: linear-gradient(145deg, #f5f8ff 0%, #edf3ff 100%);
  box-shadow: inset 0 0 0 1px rgba(53, 100, 223, .08), 0 8px 20px rgba(38, 74, 166, .08);
}

.apd-template-placement-option input[type="checkbox"] {
  margin: 2px 0 0;
  accent-color: #3564df;
}

.apd-template-placement-option > .dashicons {
  width: 22px;
  height: 22px;
  color: #71819a;
  font-size: 18px;
  line-height: 22px;
}

.apd-template-placement-option:has(input[type="checkbox"]:checked) > .dashicons {
  color: #3564df;
}

.apd-template-placement-option strong,
.apd-template-placement-option small {
  display: block;
}

.apd-template-placement-option strong {
  color: #263148;
  font-size: 11px;
  line-height: 1.4;
}

.apd-template-placement-option small {
  margin-top: 3px;
  color: #7b879d;
  font-size: 10px;
  line-height: 1.45;
}

.apd-template-placement-empty {
  margin: 10px 0 0;
  padding: 9px 11px;
  border-left: 3px solid #d29b35;
  background: #fff8e8;
  color: #73581f;
  font-size: 10px;
  line-height: 1.5;
}

.apd-template-layout-placement-settings:not([hidden]) {
  display: grid;
}

.apd-template-layout-placement-settings {
  border-top: 1px solid #e4eaf2;
}

.apd-template-module-card__badges [data-apd-template-selection-badge] {
  background: #eaf7f3;
  color: #1e745f;
}

.apd-template-module-card__badges [data-apd-template-unplaced-badge] {
  background: #fff3d9;
  color: #805f19;
}

@media (max-width: 782px) {
  .apd-template-placement-options {
    grid-template-columns: minmax(0, 1fr);
  }
}

.apd-demo-admin__summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 22px 0;
}

.apd-demo-admin .apd-summary-card {
    display: grid;
    gap: 6px;
    min-height: 112px;
    align-content: center;
    padding: 18px 20px;
    border: 1px solid var(--apd-border);
    border-radius: 8px;
    background: var(--apd-surface);
    box-shadow: var(--apd-shadow-soft);
}

.apd-demo-admin .apd-summary-card > span,
.apd-demo-admin .apd-summary-card > small {
    color: var(--apd-muted);
}

.apd-demo-admin .apd-summary-card > strong {
    color: var(--apd-text);
    font-size: 26px;
    line-height: 1;
}

.apd-demo-admin__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.65fr);
    gap: 18px;
    align-items: start;
}

.apd-demo-admin .apd-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.apd-demo-admin .apd-form-field--wide {
    grid-column: 1 / -1;
}

.apd-demo-admin .apd-check-row {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 12px;
    align-items: start;
    padding: 15px;
    border: 1px solid var(--apd-border);
    border-radius: 8px;
    background: var(--apd-surface-soft);
}

.apd-demo-admin .apd-check-row input {
    margin-top: 2px;
}

.apd-demo-admin .apd-check-row span {
    display: grid;
    gap: 4px;
}

.apd-demo-admin .apd-check-row small,
.apd-demo-admin .apd-field small {
    color: var(--apd-muted);
    line-height: 1.5;
}

.apd-demo-admin__mail {
    position: sticky;
    top: 48px;
}

.apd-demo-admin__mail h2 {
    margin-top: 8px;
}

.apd-demo-admin__requests {
    margin-top: 18px;
}

.apd-demo-admin__header-actions,
.apd-demo-workspace-card__actions,
.apd-demo-status-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.apd-demo-admin__header-actions form,
.apd-demo-workspace-card__actions form,
.apd-demo-admin__requests form {
    margin: 0;
}

.apd-demo-fleet {
    margin: 36px 0 26px;
}

.apd-demo-fleet .apd-section-heading {
    align-items: end;
}

.apd-demo-fleet .apd-section-heading p {
    max-width: 650px;
    margin: 6px 0 0;
    color: var(--apd-muted);
}

.apd-demo-capacity {
    padding: 8px 11px;
    border-radius: 6px;
    background: var(--apd-accent-soft);
    color: var(--apd-accent);
    font-size: 11px;
    font-weight: 750;
}

.apd-demo-command-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.apd-demo-workspace-card {
    display: flex;
    min-width: 0;
    min-height: 330px;
    flex-direction: column;
    padding: 22px;
    border: 1px solid var(--apd-border);
    border-radius: 8px;
    background: var(--apd-surface);
    box-shadow: var(--apd-shadow-soft);
}

.apd-demo-workspace-card.is-urgent {
    border-color: #e5c46f;
}

.apd-demo-workspace-card > header,
.apd-demo-workspace-card__identity {
    display: flex;
    align-items: center;
}

.apd-demo-workspace-card > header {
    justify-content: space-between;
    gap: 14px;
}

.apd-demo-workspace-card__identity {
    min-width: 0;
    gap: 11px;
}

.apd-demo-workspace-card__identity > div {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.apd-demo-workspace-card__identity strong,
.apd-demo-workspace-card__identity small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.apd-demo-workspace-card__identity strong {
    color: var(--apd-text);
    font-size: 13px;
}

.apd-demo-workspace-card__identity small {
    color: var(--apd-muted);
    font-size: 10px;
}

.apd-demo-avatar {
    display: inline-flex;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #12213a;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.apd-demo-workspace-card__time {
    display: grid;
    gap: 6px;
    margin: 26px 0 20px;
}

.apd-demo-workspace-card__time strong {
    color: var(--apd-text);
    font-size: 20px;
}

.apd-demo-workspace-card__time > span {
    color: var(--apd-muted);
    font-size: 10px;
}

.apd-demo-progress {
    height: 5px;
    margin-top: 7px;
    overflow: hidden;
    border-radius: 3px;
    background: #e8edf5;
}

.apd-demo-progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--apd-accent-2);
}

.apd-demo-workspace-card.is-urgent .apd-demo-progress > span {
    background: #d29b35;
}

.apd-demo-workspace-card dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 22px;
}

.apd-demo-workspace-card dl > div {
    min-width: 0;
}

.apd-demo-workspace-card dt,
.apd-demo-workspace-card dd {
    margin: 0;
}

.apd-demo-workspace-card dt {
    color: var(--apd-muted);
    font-size: 8px;
    font-weight: 750;
    text-transform: uppercase;
}

.apd-demo-workspace-card dd {
    margin-top: 4px;
    overflow: hidden;
    color: var(--apd-text);
    font-size: 10px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.apd-demo-workspace-card__actions {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--apd-border);
}

.apd-demo-workspace-card__actions .button {
    min-height: 32px;
}

.apd-demo-workspace-card__actions .button-link-delete {
    min-height: 32px;
    padding: 0 7px;
}

.apd-demo-empty-state {
    margin-top: 18px;
    padding: 48px 24px;
}

.apd-demo-empty-state .dashicons {
    width: 34px;
    height: 34px;
    color: var(--apd-accent);
    font-size: 34px;
}

.apd-demo-empty-state strong {
    display: block;
    margin-top: 10px;
    color: var(--apd-text);
}

.apd-demo-history-heading {
    align-items: center;
    gap: 20px;
}

.apd-demo-status-filters {
    justify-content: flex-end;
}

.apd-demo-status-filters a {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
    border: 1px solid var(--apd-border);
    border-radius: 15px;
    background: var(--apd-surface);
    color: var(--apd-muted);
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
}

.apd-demo-status-filters a.is-active {
    border-color: var(--apd-accent);
    background: var(--apd-accent-soft);
    color: var(--apd-accent);
}

.apd-demo-status-filters a span {
    display: inline-flex;
    min-width: 19px;
    height: 19px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #edf1f7;
    color: var(--apd-text);
    font-size: 9px;
}

.apd-demo-error {
    display: inline-block;
    max-width: 280px;
    margin-top: 6px;
    color: #a52b2b;
}

.apd-demo-policy {
    margin-top: 18px;
    padding: 0;
}

.apd-demo-policy > summary {
    display: flex;
    min-height: 74px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 22px;
    cursor: pointer;
    list-style: none;
}

.apd-demo-policy > summary::-webkit-details-marker {
    display: none;
}

.apd-demo-policy > summary > span:first-child {
    display: grid;
    gap: 4px;
}

.apd-demo-policy > summary small {
    color: var(--apd-accent);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.apd-demo-policy > summary strong {
    color: var(--apd-text);
    font-size: 14px;
}

.apd-demo-policy[open] > summary {
    border-bottom: 1px solid var(--apd-border);
}

.apd-demo-policy[open] > summary .dashicons {
    transform: rotate(180deg);
}

.apd-demo-policy .apd-demo-admin__layout {
    padding: 24px;
}

.apd-demo-policy .apd-demo-admin__mail {
    position: static;
    padding: 20px;
    border-radius: 8px;
    background: var(--apd-surface-soft);
}

.apd-demo-admin .apd-table-scroll {
    overflow-x: auto;
}

.apd-demo-admin table td {
    vertical-align: top;
}

.apd-status-badge.is-active {
    background: #e5f7f1;
    color: #08765f;
}

.apd-status-badge.is-pending,
.apd-status-badge.is-provisioning {
    background: #eef3ff;
    color: #2857c7;
}

.apd-status-badge.is-expired,
.apd-status-badge.is-revoked {
    background: #f0f2f5;
    color: #5d6b7c;
}

.apd-status-badge.is-failed {
    background: #fff0f0;
    color: #b42323;
}

@media (max-width: 1100px) {
    .apd-demo-admin__summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .apd-demo-admin__layout {
        grid-template-columns: 1fr;
    }

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

    .apd-demo-admin__mail {
        position: static;
    }
}

@media (max-width: 700px) {
    .apd-demo-admin__summary {
        grid-template-columns: 1fr;
    }

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

    .apd-demo-command-grid {
        grid-template-columns: 1fr;
    }

    .apd-demo-admin__header-actions,
    .apd-demo-admin__header-actions form,
    .apd-demo-admin__header-actions .button {
        width: 100%;
    }

    .apd-demo-history-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (min-width: 783px) and (max-width: 1180px) {
  .apd-template-placement-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

:root {
  --apd-bg: #f4f7fb;
  --apd-surface: #ffffff;
  --apd-surface-soft: #f8fbff;
  --apd-surface-strong: #eef4ff;
  --apd-border: #dce6f5;
  --apd-border-strong: #cfdcf2;
  --apd-text: #142033;
  --apd-muted: #5c6b84;
  --apd-accent: #4c6fff;
  --apd-accent-2: #11bfae;
  --apd-accent-soft: rgba(76, 111, 255, 0.08);
  --apd-success-soft: rgba(17, 191, 174, 0.14);
  --apd-shadow: 0 16px 38px rgba(31, 51, 84, 0.08);
  --apd-shadow-soft: 0 10px 24px rgba(31, 51, 84, 0.06);
  --apd-radius: 20px;
}

.apd-admin-theme-midnight {
  --apd-bg: #0f1728;
  --apd-surface: #121d33;
  --apd-surface-soft: #18243d;
  --apd-surface-strong: #0f1a2d;
  --apd-border: rgba(255,255,255,0.08);
  --apd-border-strong: rgba(255,255,255,0.12);
  --apd-text: #eff4ff;
  --apd-muted: #afbdd8;
  --apd-accent-soft: rgba(124,156,255,0.16);
  --apd-success-soft: rgba(89,225,185,0.18);
  --apd-shadow: 0 20px 40px rgba(4, 10, 24, 0.28);
  --apd-shadow-soft: 0 12px 28px rgba(4, 10, 24, 0.24);
}

.apd-admin-theme-violet {
  --apd-bg: #f8f4ff;
  --apd-surface: rgba(255,255,255,0.95);
  --apd-surface-soft: #fbf8ff;
  --apd-surface-strong: #f4edff;
  --apd-border: #e7dff8;
  --apd-border-strong: #d9cdf5;
  --apd-text: #24183d;
  --apd-muted: #75698f;
  --apd-accent: #875cff;
  --apd-accent-2: #55c7ff;
  --apd-accent-soft: rgba(135, 92, 255, 0.1);
}

.apd-admin-shell {
  margin: 20px 20px 0 0;
  color: var(--apd-text);
}
.apd-admin-shell *, .apd-admin-shell *::before, .apd-admin-shell *::after { box-sizing: border-box; }
.apd-admin-shell a { color: inherit; }
.apd-admin-shell h1, .apd-admin-shell h2, .apd-admin-shell h3, .apd-admin-shell p { margin-top: 0; }

.apd-admin-hero,
.apd-card,
.apd-tab-nav,
.apd-tab-panel,
.apd-preview-shell {
  background: var(--apd-surface);
  border: 1px solid var(--apd-border);
  border-radius: var(--apd-radius);
  box-shadow: var(--apd-shadow);
}

.apd-admin-hero {
  display: grid;
  grid-template-columns: 1.35fr .95fr;
  gap: 24px;
  padding: 32px;
  background-image: radial-gradient(circle at top right, rgba(76,111,255,.14), transparent 32%), linear-gradient(180deg, rgba(255,255,255,.86), rgba(247,250,255,.94));
  margin-bottom: 22px;
}

.apd-admin-hero h1,
.apd-page-heading h1 { font-size: 34px; line-height: 1.08; margin-bottom: 12px; color: var(--apd-text); letter-spacing: -0.03em; }
.apd-admin-hero p,
.apd-page-heading p,
.apd-card p,
.apd-side-help p,
.apd-help-grid p,
.apd-preview-meta p { color: var(--apd-muted); font-size: 14px; line-height: 1.65; }

.apd-page-heading { margin-bottom: 20px; }
.apd-grid { display: grid; gap: 20px; margin-bottom: 20px; }
.apd-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apd-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.apd-card { padding: 24px; }
.apd-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.apd-card h2, .apd-preview-head h2 { font-size: 18px; margin-bottom: 12px; color: var(--apd-text); }

.apd-badge, .apd-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  border-radius: 999px; padding: 7px 12px;
  border: 1px solid var(--apd-border); color: var(--apd-text);
  background: #fff;
}
.apd-badge-live { background: var(--apd-success-soft); border-color: transparent; }
.apd-chip-row, .apd-inline-actions, .apd-hero-actions, .apd-preview-toolbar, .apd-preview-metrics { display: flex; flex-wrap: wrap; gap: 10px; }

.apd-stat-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apd-stat-card, .apd-mini-stat {
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, var(--apd-surface-soft), #ffffff);
  border: 1px solid var(--apd-border);
  box-shadow: var(--apd-shadow-soft);
}
.apd-stat-card strong, .apd-mini-stat strong { display: block; font-size: 24px; margin-bottom: 6px; color: var(--apd-text); word-break: break-word; }
.apd-stat-card span, .apd-mini-stat span { color: var(--apd-muted); font-size: 12px; }

.apd-list { margin: 0; padding-left: 18px; color: var(--apd-muted); }
.apd-list li { margin-bottom: 8px; }
.apd-list-numbered { padding-left: 20px; }

.apd-admin-shell .button {
  border-radius: 14px; min-height: 42px; padding: 0 16px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: none;
}
.apd-admin-shell .button.button-primary,
#poststuff .apd-admin-shell .button.button-primary,
.post-type-apd_product_config .button.button-primary {
  background: linear-gradient(135deg, var(--apd-accent), var(--apd-accent-2));
  border-color: transparent; color: white;
}
.apd-admin-shell .button.button-secondary,
.post-type-apd_product_config .button.button-secondary {
  background: #fff;
  border-color: var(--apd-border); color: var(--apd-text);
}
.apd-admin-shell .button.button-hero { min-width: 140px; }

.apd-form-grid { display: grid; gap: 18px; }
.apd-form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apd-field { display: grid; gap: 8px; color: var(--apd-text); font-weight: 600; }
.apd-field span { font-size: 13px; }
.apd-field small { font-size: 12px; color: var(--apd-muted); font-weight: 500; }
.apd-field input[type="text"],
.apd-field input[type="number"],
.apd-field select,
.apd-field textarea {
  width: 100%; border-radius: 14px; border: 1px solid var(--apd-border);
  background: #fff; color: var(--apd-text);
  padding: 12px 14px; min-height: 46px;
}
.apd-field textarea.apd-codearea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  line-height: 1.5; min-height: 180px; resize: vertical;
}
.apd-field input:focus,
.apd-field select:focus,
.apd-field textarea:focus,
.apd-preview-toolbar select:focus,
.apd-preview-toolbar input:focus {
  outline: none;
  border-color: rgba(76,111,255,.55);
  box-shadow: 0 0 0 4px rgba(76,111,255,.12);
}
.apd-toggle {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--apd-border);
}
.apd-toggle span { color: var(--apd-text); }

.apd-editor-overview .apd-editor-kpis { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-bottom: 14px; }
.apd-config-builder { display: grid; gap: 16px; }
.apd-tab-nav { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px; }
.apd-tab-button {
  border: 0; border-radius: 12px; cursor: pointer; padding: 10px 14px;
  font-weight: 700; color: var(--apd-muted); background: transparent;
}
.apd-tab-button.is-active { background: var(--apd-accent-soft); color: var(--apd-text); }
.apd-tab-panel { display: none; padding: 18px; }
.apd-tab-panel.is-active { display: block; }
.apd-field-stacked { margin-bottom: 16px; }
.apd-side-help .apd-inline-actions { margin-top: 14px; }

.apd-editor-shell { display: grid; gap: 20px; }
.apd-preview-shell { padding: 20px; background: linear-gradient(180deg, #ffffff, var(--apd-surface-soft)); }
.apd-preview-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.apd-preview-head p { margin-bottom: 0; }
.apd-preview-toolbar { padding: 14px; border: 1px solid var(--apd-border); border-radius: 16px; background: #fff; margin-bottom: 16px; align-items: end; }
.apd-preview-toolbar .apd-field { min-width: 170px; flex: 1; }
.apd-preview-canvas {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--apd-border);
  background: linear-gradient(180deg, #f8fbff, #eef4ff);
  min-height: 420px;
}
.apd-preview-stage {
  min-height: 420px;
  padding: 8px;
}
.apd-preview-empty, .apd-preview-error {
  padding: 16px;
  font-size: 13px;
  color: var(--apd-muted);
}
.apd-preview-metrics { margin-top: 14px; }
.apd-preview-metrics .apd-chip { background: #fff; }
.apd-help-grid { display: grid; gap: 14px; }
.apd-callout {
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--apd-border);
}
.apd-callout strong { display: block; margin-bottom: 6px; }
.apd-notice {
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(76,111,255,0.07), rgba(17,191,174,0.06));
  border: 1px solid var(--apd-border);
  padding: 16px 18px;
  margin-bottom: 18px;
}
.apd-config-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: 20px; }

.post-type-apd_product_config #poststuff,
.post-type-apd_product_config #post-body-content,
.post-type-apd_product_config .wrap.apd-admin-shell { color: var(--apd-text); }
.post-type-apd_product_config #post-body.columns-2 #postbox-container-1,
.post-type-apd_product_config #post-body.columns-2 #postbox-container-2 { min-width: 0; }
.post-type-apd_product_config .postbox,
.post-type-apd_product_config #titlediv,
.post-type-apd_product_config #submitdiv { border: 1px solid var(--apd-border); border-radius: 18px; box-shadow: var(--apd-shadow); overflow: hidden; background: var(--apd-surface); }
.post-type-apd_product_config .postbox-header,
.post-type-apd_product_config #titlediv h2.hndle,
.post-type-apd_product_config .handlediv { background: var(--apd-surface); color: var(--apd-text); border-color: var(--apd-border); }
.post-type-apd_product_config .inside, .post-type-apd_product_config #titlediv .inside { background: var(--apd-surface); color: var(--apd-text); }
.post-type-apd_product_config #titlewrap input,
.post-type-apd_product_config #postcustomstuff input,
.post-type-apd_product_config #postcustomstuff textarea { min-height: 46px; border-radius: 14px; }
.post-type-apd_product_config #major-publishing-actions, .post-type-apd_product_config #minor-publishing-actions { background: var(--apd-surface); border-color: var(--apd-border); }
.post-type-apd_product_config .misc-pub-section, .post-type-apd_product_config .stuffbox .inside { color: var(--apd-muted); }

@media (max-width: 1200px) {
  .apd-admin-hero, .apd-grid-2, .apd-grid-3, .apd-editor-overview .apd-editor-kpis, .apd-config-layout, .apd-form-grid-2 { grid-template-columns: 1fr; }
}

.apd-tool-form {
  display: grid;
  gap: 16px;
}

.apd-portability-intro {
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--apd-accent-soft) 64%, transparent), transparent 58%),
    var(--apd-surface);
}

.apd-portability-intro::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, var(--apd-accent), var(--apd-accent-2));
  content: "";
}

.apd-portability-intro p:last-child {
  margin-bottom: 0;
}

.apd-package-extension {
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 6px;
  background: var(--apd-surface-strong);
  color: var(--apd-accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}

.apd-portability-grid > .apd-card {
  min-width: 0;
}

.apd-package-options {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.apd-package-options legend {
  margin-bottom: 2px;
  color: var(--apd-text);
  font-size: 11px;
  font-weight: 750;
}

.apd-package-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 11px 12px;
  border: 1px solid var(--apd-border);
  border-radius: 7px;
  background: var(--apd-surface-soft);
}

.apd-package-option input {
  margin: 1px 0 0;
}

.apd-package-option strong,
.apd-package-option small {
  display: block;
}

.apd-package-option strong {
  margin-bottom: 3px;
  color: var(--apd-text);
  font-size: 11px;
}

.apd-package-option small {
  color: var(--apd-muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.45;
}

.apd-package-drop-field input[type="file"] {
  min-height: 86px;
  padding: 26px 14px;
  border-style: dashed;
  background: var(--apd-surface-soft);
  cursor: pointer;
}

.apd-package-preview {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--apd-border);
  border-radius: 7px;
  background: var(--apd-surface-soft);
}

.apd-package-preview-title strong,
.apd-package-preview-title span {
  display: block;
}

.apd-package-preview-title strong {
  margin-bottom: 3px;
  color: var(--apd-text);
  font-size: 14px;
}

.apd-package-preview-title span {
  color: var(--apd-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
}

.apd-package-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.apd-package-facts div {
  min-width: 0;
  padding: 10px;
  border-radius: 6px;
  background: var(--apd-surface);
}

.apd-package-facts dt {
  margin-bottom: 3px;
  color: var(--apd-muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.apd-package-facts dd {
  overflow-wrap: anywhere;
  margin: 0;
  color: var(--apd-text);
  font-size: 11px;
  font-weight: 700;
}

.apd-package-warning {
  margin: 0 !important;
  padding: 10px 11px;
  border-left: 3px solid #d69e2e;
  border-radius: 4px;
  background: color-mix(in srgb, #f6c453 14%, var(--apd-surface));
}

.apd-package-discard {
  margin-top: 10px;
}

.apd-portability-legacy {
  padding: 0;
}

.apd-portability-legacy > summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  list-style: none;
  cursor: pointer;
}

.apd-portability-legacy > summary::-webkit-details-marker {
  display: none;
}

.apd-portability-legacy > summary strong,
.apd-portability-legacy > summary small {
  display: block;
}

.apd-portability-legacy > summary small {
  margin-top: 3px;
  color: var(--apd-muted);
  font-size: 10px;
}

.apd-portability-legacy-content {
  margin: 0;
  padding: 0 20px 20px;
  border-top: 1px solid var(--apd-border);
}

.apd-portability-legacy-pane {
  min-width: 0;
  padding-top: 20px;
}

.apd-portability-legacy-pane h3 {
  margin-bottom: 6px;
}

@media (max-width: 782px) {
  .apd-package-facts {
    grid-template-columns: 1fr;
  }

  .apd-portability-legacy > summary {
    align-items: flex-start;
  }
}

.apd-stack-list {
  display: grid;
  gap: 12px;
}

.apd-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--apd-border);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--apd-surface), var(--apd-surface-soft));
  text-decoration: none;
  color: var(--apd-text);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.apd-list-item:hover {
  transform: translateY(-1px);
  border-color: var(--apd-border-strong);
  box-shadow: var(--apd-shadow-soft);
}

.apd-list-item span {
  color: var(--apd-muted);
  font-size: 12px;
}

.apd-linked-products {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--apd-border);
}

.apd-chip-link {
  text-decoration: none;
}

.apd-inline-actions-wrap {
  flex-wrap: wrap;
}

.apd-product-binding p {
  margin-top: 0;
}


/* V4.1 spacing refinement */
.apd-admin-shell {
  --apd-space-1: 8px;
  --apd-space-2: 12px;
  --apd-space-3: 16px;
  --apd-space-4: 20px;
  --apd-space-5: 24px;
}

.post-type-apd_product_config #wpbody-content .wrap.apd-admin-shell {
  margin-top: 16px;
  margin-right: 20px;
}

.post-type-apd_product_config #titlediv {
  margin-bottom: 18px;
}

.post-type-apd_product_config #titlediv .inside {
  margin: 0;
  padding: 0;
}

.post-type-apd_product_config #titlewrap {
  padding: 0;
}

.post-type-apd_product_config #titlewrap input {
  margin: 0;
  padding: 16px 18px;
}

.post-type-apd_product_config .postbox {
  margin-bottom: 18px;
}

.post-type-apd_product_config .postbox .inside {
  margin: 0;
  padding: 16px 18px 18px;
}

.post-type-apd_product_config .postbox-header {
  padding: 0 14px;
  min-height: 46px;
}

.post-type-apd_product_config .postbox-header .hndle {
  padding: 14px 4px;
}

.post-type-apd_product_config #submitdiv .inside,
.post-type-apd_product_config #apd_config_help .inside {
  padding: 14px;
}

.apd-editor-overview {
  display: grid;
  gap: 16px;
}

.apd-editor-overview > p:last-child {
  margin-bottom: 0;
}

.apd-editor-overview .apd-editor-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 0;
}

.apd-mini-stat {
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.apd-linked-products {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.apd-config-layout {
  align-items: start;
  gap: 18px;
}

.apd-config-builder,
.apd-preview-shell {
  min-width: 0;
}

.apd-tab-nav {
  padding: 10px;
}

.apd-tab-panel {
  padding: 16px;
}

.apd-form-grid {
  gap: 16px;
}

.apd-field-stacked {
  margin-bottom: 0;
}

.apd-field textarea.apd-codearea {
  min-height: 172px;
}

.apd-preview-shell {
  padding: 18px;
}

.apd-preview-head {
  margin-bottom: 14px;
}

.apd-preview-head h2 {
  margin-bottom: 8px;
}

.apd-preview-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
  margin-bottom: 14px;
}

.apd-preview-toolbar .apd-field {
  min-width: 0;
}

.apd-preview-toolbar .apd-inline-actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.apd-preview-metrics {
  gap: 8px;
}

.apd-side-help .apd-help-grid {
  gap: 12px;
}

.apd-callout {
  padding: 14px;
}

.apd-page-heading .apd-inline-actions-wrap > .button,
.apd-card-head .apd-inline-actions-wrap > .button,
.apd-side-help .button {
  width: 100%;
  justify-content: center;
}

.apd-row-actions {
  gap: 8px;
  align-items: center;
}

.apd-row-actions .apd-inline-form {
  display: inline-flex;
  margin: 0;
}

.apd-row-actions .button {
  width: auto;
  min-width: 0;
  justify-content: center;
}

@media (max-width: 1440px) {
  .apd-editor-overview .apd-editor-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .apd-preview-toolbar {
    grid-template-columns: 1fr;
  }

  .apd-page-heading .apd-inline-actions-wrap > .button,
  .apd-card-head .apd-inline-actions-wrap > .button,
  .apd-side-help .button {
    width: 100%;
  }

  .apd-row-actions .button {
    width: auto;
  }
}


/* V4.2 nested panel cleanup */
.post-type-apd_product_config #apd_config_overview .inside,
.post-type-apd_product_config #apd_config_builder .inside,
.post-type-apd_product_config #apd_config_help .inside,
.post-type-apd_product_config #submitdiv .inside {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.post-type-apd_product_config #apd_config_overview .inside {
  padding: 18px;
}

.post-type-apd_product_config #apd_config_builder .inside,
.post-type-apd_product_config #apd_config_help .inside {
  padding: 16px 18px 18px;
}

.apd-editor-overview .apd-notice {
  margin-bottom: 0;
}

.apd-overview-actions { margin: 0 0 12px; }
.apd-binding-summary { display: grid; gap: 10px; margin: 14px 0; }
.apd-binding-summary .apd-mini-stat { padding: 14px 16px; }
.apd-studio-page .apd-studio-card { padding: 20px; }
.apd-studio-page .apd-shell__stage { margin-bottom: 16px; }
.apd-studio-page .apd-mount { min-height: 880px; }
.post-type-product .apd-product-binding .apd-inline-actions { margin-top: 12px; }
.post-type-product .apd-product-binding .apd-field select { min-height: 42px; }
.post-type-product .apd-product-binding .apd-mini-stat strong { font-size: 18px; }

/* V7 canvas-first studio */
.apd-page-heading-tight {
  margin-bottom: 18px;
}

.apd-studio-v7 .apd-studio-intro-card,
.apd-studio-v7 .apd-studio-stage-card,
.apd-studio-v7 .apd-studio-sidebar-card {
  border-radius: 18px;
}

.apd-studio-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.apd-studio-linked-row {
  margin-top: 14px;
}

.apd-studio-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.apd-studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(360px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.apd-card-head-compact {
  margin-bottom: 14px;
}

.apd-studio-shell {
  overflow: hidden;
  border-radius: 16px;
  background: #f6f8fc;
  border: 1px solid #e3e8f2;
}

.apd-studio-shell .apd-shell__stage {
  padding: 14px;
}

.apd-studio-shell .apd-shell__actions {
  border-top: 1px solid #e3e8f2;
  background: #fff;
}

.apd-studio-shell .apd-mount {
  min-height: 860px;
  border-radius: 14px;
  background: #fff;
}

.apd-studio-sidebar-card {
  position: sticky;
  top: 44px;
}

.apd-tab-nav-compact {
  margin-bottom: 14px;
}

.apd-studio-form,
.apd-studio-panels {
  display: grid;
  gap: 16px;
}

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

.apd-studio-form-footer {
  display: grid;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid #e8edf5;
}

.apd-studio-note {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #dde6f3;
  background: linear-gradient(180deg, #fbfdff 0%, #f6f8fc 100%);
}

.apd-studio-note p {
  margin: 6px 0 0;
}

.apd-studio-page .apd-inline-actions-wrap > .button {
  width: auto;
}

.apd-studio-page textarea[name="_apd_initial_document"] {
  min-height: 320px;
}

@media (max-width: 1400px) {
  .apd-studio-grid,
  .apd-studio-intro-grid {
    grid-template-columns: 1fr;
  }

  .apd-studio-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .apd-studio-sidebar-card {
    position: static;
  }
}

@media (max-width: 782px) {
  .apd-studio-kpis {
    grid-template-columns: 1fr;
  }

  .apd-studio-shell .apd-mount {
    min-height: 620px;
  }
}

.apd-catalog-editor-layout {
  display: grid;
  grid-template-columns: minmax(250px, 310px) minmax(0, 1fr);
  gap: 24px;
}

.apd-catalog-preview-panel,
.apd-catalog-editor-fields {
  display: grid;
  gap: 16px;
  align-content: start;
}

.apd-color-preview {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--apd-border);
  border-radius: 12px;
  background: #223056;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
}

.apd-color-preview > span,
.apd-color-preview > code {
  position: relative;
  z-index: 1;
  display: table;
  max-width: 100%;
  margin-bottom: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,.9);
  color: #142033;
  box-shadow: 0 4px 12px rgba(15,23,42,.1);
  word-break: break-word;
}

.apd-color-preview > span {
  font-weight: 800;
}

.apd-color-preview > code {
  font-size: 10px;
}

.apd-color-type-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.apd-color-type-picker button {
  min-height: 72px;
  padding: 11px;
  border: 1px solid var(--apd-border);
  border-radius: 10px;
  background: var(--apd-surface);
  color: var(--apd-text);
  text-align: left;
  cursor: pointer;
}

.apd-color-type-picker button:hover,
.apd-color-type-picker button.is-active {
  border-color: var(--apd-accent);
  background: var(--apd-accent-soft);
}

.apd-color-type-picker strong,
.apd-color-type-picker small {
  display: block;
}

.apd-color-type-picker small {
  margin-top: 4px;
  color: var(--apd-muted);
  font-size: 10px;
  line-height: 1.35;
}

.apd-color-input-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: end;
}

.apd-color-input-row input[type="color"],
.apd-source-workspace .apd-field input[type="color"] {
  width: 100%;
  height: 46px;
  padding: 4px;
  border: 1px solid var(--apd-border);
  border-radius: 10px;
  background: var(--apd-surface);
  cursor: pointer;
}

.apd-color-value-control {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.apd-color-value-control input[type="text"] {
  min-width: 0;
  min-height: 46px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.apd-number-suffix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.apd-number-suffix input {
  border-radius: 10px 0 0 10px !important;
}

.apd-number-suffix > span {
  display: grid;
  min-height: 46px;
  padding: 0 12px;
  place-items: center;
  border: 1px solid var(--apd-border);
  border-left: 0;
  border-radius: 0 10px 10px 0;
  background: var(--apd-surface-soft);
  color: var(--apd-muted);
}

.apd-relation-mode {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--apd-border);
  border-radius: 10px;
  background: var(--apd-surface-soft);
}

.apd-relation-mode button {
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--apd-muted);
  font-weight: 700;
  cursor: pointer;
}

.apd-relation-mode button.is-active {
  background: var(--apd-surface);
  color: var(--apd-accent);
  box-shadow: 0 3px 10px rgba(31,51,84,.08);
}

.apd-relation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  transition: opacity .18s ease;
}

.apd-relation-grid.is-disabled {
  opacity: .48;
}

.apd-relation-option {
  position: relative;
  cursor: pointer;
}

.apd-relation-option > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.apd-relation-option > span {
  display: grid;
  min-height: 60px;
  align-content: center;
  padding: 11px 13px;
  border: 1px solid var(--apd-border);
  border-radius: 9px;
  background: var(--apd-surface);
}

.apd-relation-option > input:checked + span {
  border-color: var(--apd-accent);
  background: var(--apd-accent-soft);
  box-shadow: inset 3px 0 0 var(--apd-accent);
}

.apd-relation-option > input:focus-visible + span {
  outline: 2px solid var(--apd-accent);
  outline-offset: 2px;
}

.apd-relation-option strong,
.apd-relation-option small {
  display: block;
}

.apd-relation-option small {
  margin-top: 3px;
  color: var(--apd-muted);
  font-size: 10px;
}

.apd-relation-option--color > span {
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 10px;
}

.apd-relation-option--color i {
  grid-row: 1 / span 2;
  display: block;
  width: 30px;
  height: 30px;
  align-self: center;
  border: 1px solid rgba(15,23,42,.1);
  border-radius: 7px;
}

.apd-empty-inline {
  grid-column: 1 / -1;
  padding: 14px;
  border: 1px dashed var(--apd-border-strong);
  border-radius: 9px;
  color: var(--apd-muted);
  font-size: 12px;
}

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

.apd-method-preview {
  display: grid;
  gap: 16px;
  min-height: 250px;
  align-content: start;
  padding: 20px;
  border: 1px solid var(--apd-border);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--apd-surface), var(--apd-surface-soft));
}

.apd-method-preview__title {
  color: var(--apd-text);
  font-size: 19px;
  font-weight: 800;
}

.apd-method-preview__swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.apd-method-preview__swatches i {
  display: block;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(15,23,42,.1);
  border-radius: 8px;
}

.apd-method-preview__swatches span {
  color: var(--apd-muted);
  font-size: 12px;
}

.apd-method-preview > strong {
  margin-top: auto;
  color: var(--apd-accent);
  font-size: 24px;
}

@media (max-width: 1180px) {
  .apd-color-type-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .apd-catalog-editor-layout {
    grid-template-columns: 1fr;
  }

  .apd-color-preview,
  .apd-method-preview {
    min-height: 220px;
  }
}

@media (max-width: 600px) {
  .apd-color-type-picker,
  .apd-relation-mode,
  .apd-relation-grid,
  .apd-visibility-row {
    grid-template-columns: 1fr;
  }
}


.apd-product-canvas-box { display: grid; gap: 16px; }
.apd-product-canvas-actions { margin-top: -4px; }
.apd-product-canvas-stage .apd-shell { border: 1px solid #d9e2f2; border-radius: 18px; overflow: hidden; background: #fff; }
.apd-product-canvas-stage .apd-shell__actions { border-top: 1px solid #eef2f7; background: #fafcff; }
.apd-product-canvas-store { display:none; }
.apd-empty-state-soft { border: 1px dashed #c7d5ea; border-radius: 18px; padding: 28px; background: linear-gradient(180deg, #fbfdff 0%, #f3f8ff 100%); }
.apd-notice-inline { margin-bottom: 0; }

/* V8 canvas-first builder */
.post-type-apd_product_config #apd_config_builder .inside {
  margin: 0;
  padding: 0;
}

.apd-builder-page {
  padding: 18px;
}

.apd-builder-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) 320px;
  gap: 18px;
  align-items: start;
}

.apd-builder-stage-card,
.apd-sidebar-card {
  background: var(--apd-surface);
  border: 1px solid var(--apd-border);
  border-radius: 18px;
  box-shadow: var(--apd-shadow-soft);
}

.apd-builder-stage-card {
  padding: 18px;
}

.apd-builder-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.apd-builder-header h2 {
  margin: 10px 0 8px;
  font-size: 24px;
  line-height: 1.15;
}

.apd-builder-header p {
  margin-bottom: 0;
  color: var(--apd-muted);
}

.apd-builder-actions,
.apd-sidebar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.apd-builder-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(180px, 220px) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--apd-border);
  border-radius: 16px;
  background: #fff;
}

.apd-builder-toolbar-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-self: center;
}

.apd-builder-canvas-wrap {
  min-height: 820px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--apd-border);
  background: linear-gradient(180deg, #f8fbff, #eef4ff);
}

.apd-builder-stage {
  min-height: 820px;
  padding: 0;
}

.apd-builder-sidebar {
  display: grid;
  gap: 16px;
}

.apd-sidebar-card {
  padding: 16px;
}

.apd-sidebar-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.apd-sidebar-card p,
.apd-sidebar-card code {
  color: var(--apd-muted);
}

.apd-chip-stack {
  align-items: flex-start;
}

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

@media (max-width: 1280px) {
  .apd-builder-shell,
  .apd-builder-toolbar {
    grid-template-columns: 1fr;
  }

  .apd-builder-toolbar-meta {
    justify-content: flex-start;
  }
}


/* V10.3.4 builder simplification */
.post-type-apd_product_config #titlewrap #title {
  border: 1px solid #cfd8e6 !important;
  box-shadow: none !important;
  outline: none;
  background: #fff;
  color: var(--apd-text);
}

.post-type-apd_product_config #titlewrap #title:focus {
  border-color: rgba(76,111,255,.45) !important;
  box-shadow: 0 0 0 3px rgba(76,111,255,.10) !important;
}

.apd-builder-page {
  padding: 0;
}

.apd-builder-stage-shell {
  position: relative;
}

.apd-builder-stage,
.apd-builder-stage.apd-preview-stage {
  min-height: 820px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* The embedded designer owns its responsive height. A fixed 820px host left a
   large empty strip below shorter layouts, especially before the first view. */
.post-type-apd_product_config #apd_config_builder .apd-builder-stage,
.post-type-apd_product_config #apd_config_builder .apd-builder-stage.apd-preview-stage,
.post-type-apd_template #apd_template_builder .apd-builder-stage,
.post-type-apd_template #apd_template_builder .apd-builder-stage.apd-preview-stage {
  min-height: 0;
  height: auto;
}

/* Removed dangerous all: unset reset on builder containers. */

.post-type-apd_product_config #apd_config_builder .inside {
  margin: 0;
  padding: 0;
}


.apd-woo-panel .form-field select {
  min-width: 320px;
}

.apd-woo-panel-note .description {
  display: inline-block;
  max-width: 720px;
}

.apd-variation-custom-product {
  padding-top: 8px;
}

#apd_product_designer_canvas, .apd-product-canvas-box { display:none !important; }

.apd-collection-card .apd-card-head { align-items: flex-start; }
.apd-collection { display: grid; gap: 14px; }
.apd-collection-rows { display: grid; gap: 14px; }
.apd-collection-row {
  border: 1px solid var(--apd-border);
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, var(--apd-surface-soft), #fff);
}
.apd-collection-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.apd-collection-fields { align-items: start; }
.apd-field-full { grid-column: 1 / -1; }
.apd-filter-box { display: grid; gap: 16px; }
.apd-filter-group {
  border-top: 1px solid var(--apd-border);
  padding-top: 14px;
}
.apd-filter-checklist {
  display: grid;
  gap: 8px;
  max-height: 180px;
  overflow: auto;
  padding: 8px 2px 2px;
}
.apd-filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.apd-collection-toolbar {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.apd-collection-search input[type="search"] {
  min-height: 46px;
}

.apd-collection-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.apd-collection-categories .button.is-active {
  background: linear-gradient(135deg, var(--apd-accent), var(--apd-accent-2));
  color: #fff;
  border-color: transparent;
}

.apd-collection-row__layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 18px;
}

.apd-collection-row__meta {
  display: grid;
  gap: 12px;
  align-content: start;
}

.apd-asset-preview {
  min-height: 180px;
  border-radius: 18px;
  border: 1px dashed var(--apd-border-strong);
  background: linear-gradient(180deg, #fff, var(--apd-surface-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 12px;
}

.apd-asset-preview img,
.apd-shape-preview svg {
  max-width: 100%;
  max-height: 160px;
  display: block;
}

.apd-asset-preview > span,
.apd-asset-preview em {
  color: var(--apd-muted);
  font-size: 13px;
}

.apd-asset-preview__swatch {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  border: 1px solid rgba(17, 24, 39, .12);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4);
}

.apd-font-preview {
  font-size: 56px;
  line-height: 1;
  color: var(--apd-text);
}

.apd-asset-summary {
  display: grid;
  gap: 6px;
}

.apd-asset-summary strong {
  font-size: 15px;
  color: var(--apd-text);
}

.apd-asset-summary span {
  color: var(--apd-muted);
  font-size: 12px;
  word-break: break-word;
}

.apd-media-field,
.apd-color-field {
  display: grid;
  gap: 10px;
}

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

.apd-color-field {
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
}

.apd-color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(17,24,39,.12);
  background: #fff;
}

.apd-collection-row[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .apd-collection-row__layout {
    grid-template-columns: 1fr;
  }
}


/* V8 classic catalog list + editor */
.apd-card-head-stack {
  align-items: flex-start;
}

.apd-collection-toolbar-classic {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.apd-collection-editor {
  margin-bottom: 18px;
  border: 1px solid var(--apd-border);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--apd-surface-soft), #fff);
  box-shadow: var(--apd-shadow-soft);
  overflow: hidden;
}

.apd-collection-editor__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--apd-border);
}

.apd-collection-editor__head p {
  margin: 6px 0 0;
}

.apd-collection-editor__body {
  padding: 18px;
}

.apd-collection-list {
  display: grid;
  gap: 12px;
}

.apd-collection-row {
  border: 1px solid var(--apd-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--apd-shadow-soft);
  overflow: hidden;
}

.apd-collection-row.is-editing {
  border-color: var(--apd-accent);
  box-shadow: 0 0 0 3px var(--apd-accent-soft), var(--apd-shadow-soft);
}

.apd-collection-row__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}

.apd-collection-row__summary-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.apd-asset-preview--small {
  width: 74px;
  height: 74px;
  min-width: 74px;
  border-radius: 16px;
}

.apd-asset-preview--small img,
.apd-asset-preview--small svg {
  max-width: 100%;
  max-height: 100%;
}

.apd-asset-summary {
  min-width: 0;
}

.apd-asset-summary__top {
  margin-bottom: 6px;
}

.apd-asset-summary strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
  color: var(--apd-text);
  word-break: break-word;
}

.apd-asset-summary span {
  display: block;
  color: var(--apd-muted);
}

.apd-chip-soft {
  background: var(--apd-accent-soft);
  border-color: transparent;
}

.apd-collection-row__body {
  border-top: 1px solid var(--apd-border);
  background: transparent;
}

.apd-collection-fields {
  gap: 16px;
}

@media (max-width: 960px) {
  .apd-collection-row__summary,
  .apd-collection-editor__head {
    flex-direction: column;
    align-items: stretch;
  }

  .apd-collection-row__summary-main {
    align-items: flex-start;
  }

  .apd-asset-preview--small {
    width: 64px;
    height: 64px;
    min-width: 64px;
  }
}


.apd-crud-editor {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid #dcdcde;
  border-radius: 12px;
  background: #fff;
}

.apd-crud-editor__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.apd-crud-table td { vertical-align: middle; }
.apd-list-preview {
  width: 56px;
  height: 56px;
  border: 1px solid #dcdcde;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f6f7f7;
}
.apd-list-preview img,
.apd-list-preview svg {
  max-width: 100%;
  max-height: 100%;
  display: block;
}
.apd-list-preview--color span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.1);
  display: inline-block;
}
.apd-list-preview--empty span { font-size: 11px; color: #646970; text-align: center; }
.apd-inline-form { display: inline-block; margin: 0; }
.apd-crud-card + .apd-crud-card { margin-top: 18px; }

.apd-field.is-hidden,
.apd-catalog-editor-v2 .is-hidden {
  display: none !important;
}

.apd-field-readonly textarea {
  background: var(--apd-surface-soft);
}

.apd-pricing-builder-summary {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px dashed var(--apd-border-strong);
  border-radius: 14px;
  background: var(--apd-surface-soft);
  color: var(--apd-text);
}

.apd-pricing-builder-summary strong {
  display: block;
  font-size: 13px;
}

.apd-pricing-builder-summary span {
  color: var(--apd-muted);
  font-size: 12px;
  line-height: 1.5;
}

.apd-fonts-shell {
  display: grid;
  gap: 20px;
}

.apd-font-editor {
  background: linear-gradient(180deg, var(--apd-surface), var(--apd-surface-soft));
  border-color: var(--apd-border-strong);
}

.apd-font-editor__layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 22px;
}

.apd-font-editor__preview-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.apd-font-preview-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--apd-border);
  background: #fff;
  box-shadow: var(--apd-shadow-soft);
}

.apd-font-preview-card__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--apd-text);
}

.apd-font-preview-card__meta {
  font-size: 12px;
  color: var(--apd-muted);
}

.apd-font-preview-card__sample {
  min-height: 180px;
  display: flex;
  align-items: center;
  font-size: clamp(24px, 3.2vw, 40px);
  line-height: 1.2;
  color: var(--apd-text);
  word-break: break-word;
}

.apd-font-tips {
  display: grid;
  gap: 10px;
}

.apd-font-editor__fields {
  display: grid;
  gap: 16px;
}

.apd-font-source-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.apd-font-source-option {
  appearance: none;
  border: 1px solid var(--apd-border);
  background: #fff;
  color: var(--apd-text);
  border-radius: 16px;
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--apd-shadow-soft);
}

.apd-font-source-option.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--apd-accent), var(--apd-accent-2));
  color: #fff;
}

.apd-font-form-grid {
  align-items: start;
}

.apd-font-helper-row {
  padding: 14px 16px;
  border: 1px dashed var(--apd-border-strong);
  border-radius: 16px;
  background: var(--apd-surface-soft);
}

.apd-font-list {
  display: grid;
  gap: 16px;
}

.apd-font-list__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.apd-font-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.apd-font-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--apd-border);
  background: #fff;
  box-shadow: var(--apd-shadow-soft);
}

.apd-font-card__preview {
  min-height: 92px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--apd-surface-soft), #fff);
  border: 1px solid var(--apd-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.apd-font-card__content {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.apd-font-card__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.apd-font-card__head h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.apd-font-card__head p {
  margin: 0;
  color: var(--apd-muted);
  word-break: break-word;
}

.apd-chip-row-wrap {
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  .apd-font-editor__layout,
  .apd-font-source-picker,
  .apd-font-card {
    grid-template-columns: 1fr;
  }
}


.apd-catalog-toolbar{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:0 0 16px}.apd-catalog-search input,.apd-catalog-filter select{min-width:220px}.apd-import-panel{display:none;margin:0 0 20px;padding:16px;border:1px solid #dcdcde;border-radius:12px;background:#fff}.apd-import-panel.is-open{display:block}.apd-import-panel__head{margin-bottom:12px}.apd-import-form .apd-form-grid{align-items:start}.apd-media-picker-row{margin-top:8px}.apd-crud-table td .button[disabled]{opacity:.45;pointer-events:none}.apd-crud-card .apd-inline-actions-wrap{gap:6px}.apd-catalog-toolbar .apd-chip{margin-left:auto}@media (max-width:782px){.apd-catalog-toolbar .apd-chip{margin-left:0}}

.apd-media-import-selection {
  margin-top: 12px;
  border: 1px dashed var(--apd-border, #dcdcde);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}

.apd-media-import-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.apd-media-import-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--apd-border, #dcdcde);
  border-radius: 12px;
  padding: 10px;
  background: var(--apd-surface-soft, #f8fafc);
}

.apd-media-import-card__preview {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--apd-border, #dcdcde);
  display: flex;
  align-items: center;
  justify-content: center;
}

.apd-media-import-card__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.apd-media-import-card__body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.apd-media-import-card__body strong,
.apd-media-import-card__body small {
  word-break: break-word;
}

.apd-structured-panel .apd-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.apd-field-grid {
  display: grid;
  gap: 10px;
}

.apd-field-grid--two {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.apd-filter-checklist--compact {
  gap: 10px;
}

.apd-audit-list {
  display: grid;
  gap: 8px;
}

.apd-audit-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f1;
}

.apd-audit-row:last-child {
  border-bottom: 0;
}


.apd-qa-toolbar{display:flex;gap:12px;align-items:center;justify-content:flex-end;margin:16px 0 20px;flex-wrap:wrap}
.apd-qa-summary-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:18px 0 22px}
.apd-qa-card{background:#fff;border:1px solid #dcdcde;border-radius:12px;padding:16px;display:flex;flex-direction:column;gap:6px;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.apd-qa-card__label{font-size:12px;color:#646970;text-transform:uppercase;letter-spacing:.04em}
.apd-qa-card__value{font-size:28px;line-height:1.1}
.apd-qa-card--passed{border-color:#4ab866;background:#f3fff6}
.apd-qa-card--failed{border-color:#d63638;background:#fff5f5}
.apd-qa-card--blocked{border-color:#dba617;background:#fffaf0}
.apd-qa-diagnostic-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px;margin:0 0 24px}
.apd-qa-panel{background:#fff;border:1px solid #dcdcde;border-radius:12px;padding:16px}
.apd-qa-panel h2{margin:0 0 12px;font-size:16px}
.apd-qa-panel__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.apd-qa-panel__heading h2 {
  margin: 0;
}
.apd-readiness-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: #42526b;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.apd-readiness-pill.is-pass {
  background: #e6f7f0;
  color: #087357;
}
.apd-readiness-pill.is-warning {
  background: #fff5da;
  color: #8a5b00;
}
.apd-readiness-pill.is-fail {
  background: #fdecec;
  color: #a32323;
}
.apd-readiness-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: #7b8798;
}
.apd-readiness-dot.is-pass {
  background: #0f9f75;
}
.apd-readiness-dot.is-warning {
  background: #d89000;
}
.apd-readiness-dot.is-fail {
  background: #d63638;
}
.apd-qa-panel--fail {
  border-color: #efc4c4;
}
.apd-qa-panel--warning {
  border-color: #ecd9a7;
}
.apd-qa-panel--summary {
  grid-column: 1 / -1;
}
.apd-qa-panel--summary .apd-qa-dl {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
}
.apd-qa-panel--summary .apd-qa-dl div:nth-child(2) {
  border-top: 0;
  padding-top: 0;
}
.apd-qa-panel--summary .apd-qa-dl dd {
  max-width: 56ch;
  color: #59677d;
  font-weight: 500;
  line-height: 1.45;
}
@media (max-width: 900px) {
  .apd-qa-panel--summary .apd-qa-dl {
    grid-template-columns: 1fr;
  }
  .apd-qa-panel--summary .apd-qa-dl div:nth-child(2) {
    border-top: 1px solid #f0f0f1;
    padding-top: 8px;
  }
}
.apd-qa-dl{display:grid;gap:10px;margin:0}
.apd-qa-dl div{display:grid;grid-template-columns:1fr auto;gap:10px;padding:8px 0;border-top:1px solid #f0f0f1}
.apd-qa-dl div:first-child{border-top:0;padding-top:0}
.apd-qa-dl dt{margin:0;color:#50575e}
.apd-qa-dl dd{margin:0;font-weight:600;text-align:right}
.apd-qa-checklist-group{margin:0 0 24px}
.apd-qa-checklist-group h2{margin:0 0 10px}
.apd-qa-table td,.apd-qa-table th{vertical-align:top}
.apd-qa-page .widefat select{max-width:100%}


.apd-crud-table .apd-row-actions,
.apd-font-card .apd-row-actions {
  display: flex;
  flex-wrap: wrap;
}


/* V10.3.86 form action spacing cleanup */
.apd-inline-actions,
.apd-inline-actions-wrap {
  align-items: center;
}

.apd-inline-actions {
  row-gap: 12px;
}

.apd-inline-actions > .submit,
.apd-inline-actions-wrap > .submit {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

.apd-inline-actions > .submit .button,
.apd-inline-actions-wrap > .submit .button {
  margin: 0;
}

.apd-crud-editor__form .apd-inline-actions,
.apd-font-editor__form .apd-inline-actions,
.apd-structure-page form .apd-inline-actions,
.apd-studio-page form .apd-inline-actions {
  margin-top: 20px;
}

.apd-crud-editor__form .apd-inline-actions > .button,
.apd-crud-editor__form .apd-inline-actions > .submit,
.apd-font-editor__form .apd-inline-actions > .button,
.apd-font-editor__form .apd-inline-actions > .submit,
.apd-structure-page form .apd-inline-actions > .button,
.apd-structure-page form .apd-inline-actions > .submit,
.apd-studio-page form .apd-inline-actions > .button,
.apd-studio-page form .apd-inline-actions > .submit {
  flex: 0 0 auto;
}

@media (max-width: 782px) {
  .apd-inline-actions {
    align-items: stretch;
  }

  .apd-inline-actions > .button,
  .apd-inline-actions > .submit,
  .apd-inline-actions-wrap > .button,
  .apd-inline-actions-wrap > .submit {
    width: 100%;
  }

  .apd-inline-actions > .submit .button,
  .apd-inline-actions-wrap > .submit .button {
    width: 100%;
  }
}

.apd-template-module-grid {
  display: grid;
  gap: 14px;
}

.apd-template-module-card {
  border: 1px solid var(--apd-border);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--apd-surface), var(--apd-surface-soft));
  padding: 16px;
}

.apd-template-module-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.apd-template-module-toggle {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.apd-template-module-toggle input[type="checkbox"] {
  margin-top: 3px;
}

.apd-template-module-card__body {
  display: grid;
  gap: 12px;
}

.apd-template-module-card.is-icon-text .apd-template-icon-image-field,
.apd-template-module-card.is-icon-image .apd-template-icon-text-field {
  display: none;
}

.apd-template-module-card .apd-media-field input[type="text"] {
  width: 100%;
}


.apd-collapsible-group {
  border: 1px solid var(--apd-border);
  border-radius: 18px;
  background: var(--apd-surface-soft);
  margin: 0 0 14px;
  overflow: hidden;
}

.apd-collapsible-group__summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.apd-collapsible-group__summary::-webkit-details-marker {
  display: none;
}

.apd-collapsible-group__summary::after {
  content: '▾';
  color: var(--apd-text-soft);
  font-size: 14px;
  line-height: 1;
}

.apd-collapsible-group:not([open]) .apd-collapsible-group__summary::after {
  content: '▸';
}

.apd-collapsible-group__body {
  padding: 0 16px 16px;
}


/* Template module card (details) overrides for clean collapsible items */
.apd-template-module-card {
  padding: 0;
  overflow: hidden;
}

.apd-template-module-card__head {
  list-style: none;
  cursor: pointer;
  margin: 0;
  padding: 14px 16px;
}

.apd-template-module-card__head::-webkit-details-marker { display: none; }

.apd-template-module-card__head::after {
  content: '▾';
  color: var(--apd-text-soft);
  font-size: 12px;
  line-height: 1;
  margin-left: 10px;
}

.apd-template-module-card:not([open]) .apd-template-module-card__head::after { content: '▸'; }

.apd-template-module-card__body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--apd-border);
}


.apd-template-zone-grid {
  display: grid;
  gap: 12px;
}

.apd-template-zone-card {
  border: 1px solid var(--apd-border);
  border-radius: 16px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.apd-template-zone-card h4 {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.apd-template-module-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.apd-template-module-toggle {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.apd-template-module-toggle span {
  display: block;
  min-width: 0;
}

.apd-template-module-card__head::after {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.apd-template-module-card__body {
  padding: 14px 16px 16px;
  gap: 14px;
}

.apd-template-module-card__body .apd-field > span,
.apd-template-zone-card .apd-field > span {
  display: block;
  margin: 0 0 8px;
  line-height: 1.35;
}

.apd-template-module-flags {
  display: grid;
  gap: 8px;
}

.apd-check--compact {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
}

.apd-check--compact input[type="checkbox"] {
  margin: 2px 0 0;
}

.apd-check--compact span {
  display: block;
  margin: 0;
  line-height: 1.4;
}

@media (min-width: 900px) {
  .apd-template-zone-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.apd-translation-locale-list {
  display: grid;
  gap: 10px;
}

.apd-translation-scope-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 22px;
  padding: 5px;
  background: var(--apd-surface-strong);
  border-radius: 8px;
}

.apd-translation-scope-tabs a {
  display: grid;
  gap: 3px;
  min-height: 62px;
  align-content: center;
  padding: 10px 14px;
  color: var(--apd-muted);
  text-decoration: none;
  border-radius: 6px;
}

.apd-translation-scope-tabs a:hover {
  color: var(--apd-text);
  background: color-mix(in srgb, var(--apd-surface) 72%, transparent);
}

.apd-translation-scope-tabs a.is-active {
  color: var(--apd-text);
  background: var(--apd-surface);
  box-shadow: var(--apd-shadow-soft);
}

.apd-translation-scope-tabs strong {
  font-size: 13px;
}

.apd-translation-scope-tabs span {
  font-size: 11px;
}

.apd-translation-native-note {
  display: grid;
  gap: 3px;
  margin-bottom: 18px;
  padding: 13px 15px;
  color: var(--apd-muted);
  background: var(--apd-surface-soft);
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.45;
}

.apd-translation-native-note strong {
  color: var(--apd-text);
}

.apd-translation-source {
  display: block;
  margin-top: 7px;
  color: var(--apd-muted);
  font-size: 10px;
  line-height: 1.45;
}

.apd-translation-table--plugin .apd-col-namespace {
  width: 110px;
}

.apd-translation-sidebar .apd-list-item {
  display: grid;
  justify-content: stretch;
  align-items: start;
}

.apd-translation-sidebar .apd-list-item.is-active {
  border-color: var(--apd-accent);
  background: linear-gradient(180deg, var(--apd-accent-soft), #fff);
}

.apd-translation-tools {
  align-items: end;
}

.apd-translation-visible-count {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--apd-border);
  background: #fff;
  color: var(--apd-text);
  font-weight: 700;
}

.apd-translation-table-wrap {
  overflow: auto;
  border: 1px solid var(--apd-border);
  border-radius: 18px;
}

.apd-translation-table {
  border: 0;
  box-shadow: none;
}

.apd-translation-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--apd-surface-soft);
}

.apd-translation-table td,
.apd-translation-table th {
  vertical-align: top;
}

.apd-translation-default {
  white-space: pre-wrap;
  color: var(--apd-text);
  line-height: 1.45;
  font-size: 13px;
}

.apd-translation-input {
  width: 100%;
  min-height: 62px;
  border-radius: 12px;
  border: 1px solid var(--apd-border);
  padding: 10px 12px;
  resize: vertical;
}

@media (max-width: 1180px) {
  .apd-translation-layout {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 620px) {
  .apd-translation-scope-tabs {
    grid-template-columns: 1fr;
  }
}

/* V11 admin harmonization */
.apd-admin-theme-light {
  --apd-bg: #f4f7fb;
  --apd-surface: #ffffff;
  --apd-surface-soft: #f8fbff;
  --apd-surface-strong: #eef4ff;
  --apd-border: #dce6f5;
  --apd-border-strong: #cfdcf2;
  --apd-text: #142033;
  --apd-muted: #5c6b84;
  --apd-accent: #4c6fff;
  --apd-accent-2: #11bfae;
  --apd-accent-soft: rgba(76, 111, 255, 0.08);
  --apd-success-soft: rgba(17, 191, 174, 0.14);
  --apd-shadow: 0 16px 38px rgba(31, 51, 84, 0.08);
  --apd-shadow-soft: 0 10px 24px rgba(31, 51, 84, 0.06);
}

.apd-admin-screen {
  color: var(--apd-text);
}

.apd-page-heading-wide {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.apd-card-head-stack {
  align-items: flex-start;
}

.apd-card-head-stack p {
  margin-bottom: 0;
}

.apd-admin-shell .notice,
.apd-admin-screen .notice.inline,
.apd-admin-screen .notice.is-dismissible {
  border-left: 0;
  border-radius: 16px;
  box-shadow: var(--apd-shadow-soft);
  padding: 10px 14px;
  margin: 0 0 18px;
}

.apd-admin-shell .notice p,
.apd-admin-screen .notice p {
  margin: 0.35em 0;
}

.apd-admin-shell .widefat,
.apd-admin-screen .widefat,
.apd-admin-shell .wp-list-table,
.apd-admin-screen .wp-list-table,
.apd-admin-shell .apd-table {
  width: 100%;
  border: 1px solid var(--apd-border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--apd-surface);
  box-shadow: var(--apd-shadow-soft);
  border-collapse: separate;
  border-spacing: 0;
}

.apd-admin-shell .widefat thead th,
.apd-admin-screen .widefat thead th,
.apd-admin-shell .wp-list-table thead th,
.apd-admin-screen .wp-list-table thead th,
.apd-admin-shell .apd-table thead th {
  background: linear-gradient(180deg, var(--apd-surface-soft), #fff);
  color: var(--apd-muted);
  border-bottom: 1px solid var(--apd-border);
  font-size: 12px;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.apd-admin-shell .widefat td,
.apd-admin-shell .widefat th,
.apd-admin-screen .widefat td,
.apd-admin-screen .widefat th,
.apd-admin-shell .wp-list-table td,
.apd-admin-shell .wp-list-table th,
.apd-admin-screen .wp-list-table td,
.apd-admin-screen .wp-list-table th,
.apd-admin-shell .apd-table td,
.apd-admin-shell .apd-table th {
  padding: 14px 16px;
  vertical-align: top;
}

.apd-admin-shell .striped > tbody > :nth-child(odd),
.apd-admin-screen .striped > tbody > :nth-child(odd),
.apd-admin-shell .apd-table tbody tr:nth-child(odd),
.apd-admin-screen .apd-table tbody tr:nth-child(odd) {
  background: rgba(76, 111, 255, 0.02);
}

.apd-table-wrap {
  overflow: auto;
}

.apd-admin-shell input.regular-text,
.apd-admin-shell textarea.large-text,
.apd-admin-shell select.regular-text,
.apd-admin-screen .regular-text,
.apd-admin-screen .large-text {
  border-radius: 14px;
  border-color: var(--apd-border);
  min-height: 46px;
  padding: 10px 14px;
}

.apd-admin-shell textarea.large-text,
.apd-admin-screen textarea.large-text {
  min-height: 92px;
}

.apd-admin-shell .description,
.apd-admin-screen .description {
  color: var(--apd-muted);
}

.apd-button-danger {
  border-color: rgba(214, 54, 56, 0.22) !important;
  color: #a02224 !important;
  background: rgba(214, 54, 56, 0.08) !important;
}

.apd-section-card {
  border: 1px solid var(--apd-border);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--apd-surface), var(--apd-surface-soft));
  padding: 16px;
  box-shadow: var(--apd-shadow-soft);
}

.apd-section-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.apd-section-card__head h3 {
  margin: 0;
  font-size: 17px;
}

.apd-chip-status {
  border-color: transparent;
}

.apd-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  box-shadow: none;
}

.apd-status--pending {
  background: rgba(255, 170, 0, 0.12);
  color: #8a5400;
}

.apd-status--in_progress {
  background: rgba(76, 111, 255, 0.12);
  color: #2447d6;
}

.apd-status--produced {
  background: rgba(17, 191, 174, 0.14);
  color: #0e8f83;
}

.apd-status--delivered {
  background: rgba(135, 92, 255, 0.12);
  color: #6a45d8;
}

.apd-production-page,
.apd-qa-page {
  display: grid;
  gap: 18px;
}

.apd-production-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(200px, 280px) auto;
  gap: 14px;
  align-items: end;
}

.apd-production-toolbar__group {
  display: grid;
  gap: 8px;
}

.apd-production-toolbar__group label,
.apd-qa-page label {
  color: var(--apd-text);
}

.apd-production-card,
.apd-qa-summary-shell,
.apd-qa-diagnostics-shell,
.apd-qa-checklist-shell {
  margin: 0;
}

.apd-production-table td,
.apd-production-table th,
.apd-qa-table td,
.apd-qa-table th {
  vertical-align: top;
}

.apd-production-table .button + .button {
  margin-left: 6px;
}

.apd-production-detail__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.apd-production-detail__head h2 {
  margin: 0 0 6px;
}

.apd-production-detail__head p {
  margin: 0;
  color: var(--apd-muted);
}

.apd-production-detail__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 20px;
  align-items: start;
}

.apd-production-dl {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 0;
}

.apd-production-dl dt {
  font-weight: 700;
}

.apd-production-dl dd {
  margin: 0;
}

.apd-production-actions,
.apd-production-statusbar,
.apd-production-notes__actions,
.apd-qa-toolbar-actions,
.apd-qa-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.apd-production-actions,
.apd-production-statusbar {
  margin-top: 16px;
}

.apd-production-preview {
  border-radius: 18px;
  border: 1px solid var(--apd-border);
  background: linear-gradient(180deg, #fff, var(--apd-surface-soft));
  padding: 14px;
  box-shadow: var(--apd-shadow-soft);
}

.apd-production-preview img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--apd-border);
  background: #fff;
}

.apd-production-notes {
  margin-top: 18px;
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--apd-border);
  background: linear-gradient(180deg, var(--apd-surface-soft), #fff);
}

.apd-production-notes textarea {
  width: 100%;
  min-height: 130px;
  border-radius: 14px;
  border: 1px solid var(--apd-border);
  padding: 12px 14px;
}

.apd-production-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.apd-production-section-grid > section {
  border: 1px solid var(--apd-border);
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, var(--apd-surface), var(--apd-surface-soft));
  box-shadow: var(--apd-shadow-soft);
}

.apd-production-section-grid h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.apd-production-list {
  margin: 0;
  padding-left: 18px;
}

.apd-production-list li {
  margin-bottom: 8px;
}

.apd-qa-summary-cards {
  margin: 0;
}

.apd-qa-card {
  border-radius: 18px;
  border-color: var(--apd-border);
  box-shadow: var(--apd-shadow-soft);
}

.apd-qa-card--passed {
  border-color: rgba(17, 191, 174, 0.22);
  background: linear-gradient(180deg, rgba(17, 191, 174, 0.12), rgba(255,255,255,0.98));
}

.apd-qa-card--failed {
  border-color: rgba(214, 54, 56, 0.22);
  background: linear-gradient(180deg, rgba(214, 54, 56, 0.08), rgba(255,255,255,0.98));
}

.apd-qa-card--blocked {
  border-color: rgba(219, 166, 23, 0.22);
  background: linear-gradient(180deg, rgba(219, 166, 23, 0.1), rgba(255,255,255,0.98));
}

.apd-qa-diagnostic-grid {
  margin: 0;
}

.apd-qa-panel {
  border-radius: 18px;
  border-color: var(--apd-border);
  background: linear-gradient(180deg, var(--apd-surface), var(--apd-surface-soft));
  box-shadow: var(--apd-shadow-soft);
}

.apd-qa-dl div {
  border-top-color: var(--apd-border);
}

.apd-qa-checklist-list {
  display: grid;
  gap: 16px;
}

.apd-qa-checklist-group {
  margin: 0;
}

.apd-qa-table select,
.apd-qa-table textarea {
  width: 100%;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config #wpbody-content > .wrap,
body.apd-admin-screen.edit-php.post-type-apd_template #wpbody-content > .wrap,
body.apd-admin-screen.edit-php.post-type-apd_user_design #wpbody-content > .wrap {
  margin: 18px 20px 0 0;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .wp-heading-inline,
body.apd-admin-screen.edit-php.post-type-apd_template .wp-heading-inline,
body.apd-admin-screen.edit-php.post-type-apd_user_design .wp-heading-inline {
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--apd-text);
  margin-right: 12px;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .page-title-action,
body.apd-admin-screen.edit-php.post-type-apd_template .page-title-action,
body.apd-admin-screen.edit-php.post-type-apd_user_design .page-title-action {
  border-radius: 14px;
  border-color: var(--apd-border);
  padding: 8px 14px;
  background: #fff;
  color: var(--apd-text);
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .tablenav,
body.apd-admin-screen.edit-php.post-type-apd_template .tablenav,
body.apd-admin-screen.edit-php.post-type-apd_user_design .tablenav,
body.apd-admin-screen.edit-php.post-type-apd_product_config .subsubsub,
body.apd-admin-screen.edit-php.post-type-apd_template .subsubsub,
body.apd-admin-screen.edit-php.post-type-apd_user_design .subsubsub {
  background: var(--apd-surface);
  border: 1px solid var(--apd-border);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: var(--apd-shadow-soft);
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .subsubsub,
body.apd-admin-screen.edit-php.post-type-apd_template .subsubsub,
body.apd-admin-screen.edit-php.post-type-apd_user_design .subsubsub {
  margin: 0 0 14px;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .tablenav.top,
body.apd-admin-screen.edit-php.post-type-apd_template .tablenav.top,
body.apd-admin-screen.edit-php.post-type-apd_user_design .tablenav.top {
  margin-bottom: 14px;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .wp-list-table,
body.apd-admin-screen.edit-php.post-type-apd_template .wp-list-table,
body.apd-admin-screen.edit-php.post-type-apd_user_design .wp-list-table {
  border-radius: 20px;
  overflow: hidden;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .search-box input[type="search"],
body.apd-admin-screen.edit-php.post-type-apd_template .search-box input[type="search"],
body.apd-admin-screen.edit-php.post-type-apd_user_design .search-box input[type="search"] {
  min-height: 40px;
  border-radius: 12px;
  border-color: var(--apd-border);
}

.post-type-apd_template #poststuff,
.post-type-apd_template #post-body-content,
.post-type-apd_template .wrap.apd-admin-shell { color: var(--apd-text); }
.post-type-apd_template #post-body.columns-2 #postbox-container-1,
.post-type-apd_template #post-body.columns-2 #postbox-container-2 { min-width: 0; }
.post-type-apd_template .postbox,
.post-type-apd_template #titlediv,
.post-type-apd_template #submitdiv { border: 1px solid var(--apd-border); border-radius: 18px; box-shadow: var(--apd-shadow); overflow: hidden; background: var(--apd-surface); }
.post-type-apd_template .postbox-header,
.post-type-apd_template #titlediv h2.hndle,
.post-type-apd_template .handlediv { background: var(--apd-surface); color: var(--apd-text); border-color: var(--apd-border); }
.post-type-apd_template .inside,
.post-type-apd_template #titlediv .inside { background: var(--apd-surface); color: var(--apd-text); }
.post-type-apd_template #titlewrap input,
.post-type-apd_template #postcustomstuff input,
.post-type-apd_template #postcustomstuff textarea { min-height: 46px; border-radius: 14px; }
.post-type-apd_template #major-publishing-actions,
.post-type-apd_template #minor-publishing-actions { background: var(--apd-surface); border-color: var(--apd-border); }
.post-type-apd_template .misc-pub-section,
.post-type-apd_template .stuffbox .inside { color: var(--apd-muted); }
.post-type-apd_template #wpbody-content .wrap.apd-admin-shell { margin-top: 16px; margin-right: 20px; }
.post-type-apd_template #titlediv { margin-bottom: 18px; }
.post-type-apd_template #titlediv .inside { margin: 0; padding: 0; }
.post-type-apd_template #titlewrap { padding: 0; }
.post-type-apd_template #titlewrap input { margin: 0; padding: 16px 18px; }
.post-type-apd_template .postbox { margin-bottom: 18px; }
.post-type-apd_template .postbox .inside { margin: 0; padding: 16px 18px 18px; }
.post-type-apd_template .postbox-header { padding: 0 14px; min-height: 46px; }
.post-type-apd_template .postbox-header .hndle { padding: 14px 4px; }
.post-type-apd_template #submitdiv .inside,
.post-type-apd_template #apd_config_help .inside { padding: 14px; }
.post-type-apd_template #apd_config_overview .inside,
.post-type-apd_template #apd_config_builder .inside,
.post-type-apd_template #apd_config_help .inside,
.post-type-apd_template #submitdiv .inside { background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.post-type-apd_template #apd_config_overview .inside { padding: 18px; }
.post-type-apd_template #apd_config_builder .inside,
.post-type-apd_template #apd_config_help .inside { padding: 16px 18px 18px; }
.post-type-apd_template #titlewrap #title { border: 1px solid #cfd8e6 !important; box-shadow: none !important; outline: none; background: #fff; color: var(--apd-text); }
.post-type-apd_template #titlewrap #title:focus { border-color: rgba(76,111,255,.45) !important; box-shadow: 0 0 0 3px rgba(76,111,255,.10) !important; }
.post-type-apd_template #apd_config_builder .inside { margin: 0; padding: 0; }

@media (max-width: 1100px) {
  .apd-page-heading-wide,
  .apd-production-detail__grid,
  .apd-production-section-grid,
  .apd-production-toolbar {
    grid-template-columns: 1fr;
  }

  .apd-production-detail__grid,
  .apd-production-section-grid {
    display: grid;
  }

  .apd-production-dl {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 782px) {
  .apd-qa-toolbar-actions,
  .apd-qa-footer-actions,
  .apd-production-actions,
  .apd-production-statusbar,
  .apd-production-notes__actions {
    align-items: stretch;
  }

  .apd-qa-toolbar-actions > form,
  .apd-qa-footer-actions > form,
  .apd-production-actions > .button,
  .apd-production-statusbar > .button,
  .apd-production-notes__actions > .submit,
  .apd-production-notes__actions > .button,
  .apd-qa-toolbar-actions .button,
  .apd-qa-footer-actions .button {
    width: 100%;
  }
}

.apd-translation-layout--main {
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: start;
}

.apd-stack-top {
  margin-top: 16px;
}

.apd-spacing-bottom {
  margin-bottom: 18px;
}

.apd-translation-label-field {
  margin-bottom: 18px;
  max-width: 420px;
}

@media (max-width: 1200px) {
  .apd-translation-layout--main {
    grid-template-columns: 1fr;
  }
}


/* V11.1 admin finishing pass */
.apd-inline-actions-top {
  margin-top: 10px;
}

.apd-inline-actions-tight {
  margin-top: 8px;
}

.apd-description-top {
  margin-top: 10px;
}

.apd-help-text,
.apd-help-text-inline,
.apd-inline-count {
  color: var(--apd-muted);
}

.apd-help-text {
  display: block;
}

.apd-divider {
  margin: 16px 0;
  border: 0;
  border-top: 1px solid var(--apd-border);
}

.apd-section-intro {
  margin: 0 0 14px;
}

.apd-help-text-inline {
  display: inline;
}

.apd-subsection-title,
.apd-order-section-title {
  margin: 14px 0 8px;
}

.apd-col-status,
.apd-col-updated {
  width: 180px;
}

.apd-col-key {
  width: 220px;
}

.apd-col-namespace {
  width: 120px;
}

.apd-order-summary {
  display: grid;
  gap: 16px;
}

.apd-order-card {
  border: 1px solid var(--apd-border);
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, var(--apd-surface), var(--apd-surface-soft));
  box-shadow: var(--apd-shadow-soft);
}

.apd-order-card__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.apd-order-card__title {
  font-weight: 700;
  font-size: 15px;
  margin: 0;
  color: var(--apd-text);
}

.apd-order-card__meta {
  color: var(--apd-muted);
  font-size: 12px;
  margin-top: 4px;
}

.apd-order-card__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 16px;
}

.apd-order-dl {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
}

.apd-order-dl dt {
  font-weight: 700;
}

.apd-order-dl dd {
  margin: 0;
}

.apd-order-pricing,
.apd-order-production {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--apd-border);
}

.apd-order-pricing__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.apd-order-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--apd-surface-strong);
  font-size: 12px;
  line-height: 1.3;
  font-weight: 700;
  border: 1px solid var(--apd-border);
}

.apd-order-pill--pending {
  background: rgba(219, 166, 23, 0.1);
  color: #7a4b00;
  border-color: rgba(219, 166, 23, 0.2);
}

.apd-order-pill--in_progress {
  background: rgba(76, 111, 255, 0.1);
  color: #1f3e9a;
  border-color: rgba(76, 111, 255, 0.18);
}

.apd-order-pill--produced {
  background: rgba(17, 191, 174, 0.12);
  color: #0d6a61;
  border-color: rgba(17, 191, 174, 0.18);
}

.apd-order-pill--delivered {
  background: rgba(135, 92, 255, 0.1);
  color: #5a36c8;
  border-color: rgba(135, 92, 255, 0.18);
}

.apd-order-preview {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.apd-order-preview img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 180px;
  border: 1px solid var(--apd-border);
  border-radius: 12px;
  background: #fff;
}

.apd-order-rules {
  margin: 12px 0 0;
  padding-left: 18px;
}

.apd-order-rules li {
  margin: 0 0 6px;
}

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

.apd-order-empty-spaced {
  margin-top: 12px;
}

.apd-inline-order-summary {
  margin-top: 8px;
  padding: 10px 12px;
  background: linear-gradient(180deg, var(--apd-surface-soft), #fff);
  border-left: 3px solid var(--apd-accent);
  border-radius: 0 12px 12px 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--apd-text);
}

.apd-inline-order-summary strong {
  font-weight: 700;
}

.apd-order-actions,
.apd-order-statusbar,
.apd-order-notes__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.apd-order-notes {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--apd-border);
}

.apd-order-notes textarea {
  width: 100%;
  min-height: 120px;
  border-radius: 14px;
  border: 1px solid var(--apd-border);
  padding: 12px 14px;
}

.apd-woo-select-wide {
  width: 100%;
  max-width: 420px;
}

.apd-woo-select-full {
  width: 100%;
}

body.apd-admin-screen--order #poststuff .postbox,
body.apd-admin-screen--order #poststuff .stuffbox {
  border: 1px solid var(--apd-border);
  border-radius: 18px;
  box-shadow: var(--apd-shadow-soft);
  overflow: hidden;
  background: var(--apd-surface);
}

body.apd-admin-screen--order #poststuff .postbox-header,
body.apd-admin-screen--order #poststuff .hndle,
body.apd-admin-screen--order #poststuff .handlediv {
  background: var(--apd-surface);
  color: var(--apd-text);
  border-color: var(--apd-border);
}

body.apd-admin-screen--order #poststuff .inside {
  background: var(--apd-surface);
  color: var(--apd-text);
}

@media (max-width: 960px) {
  .apd-order-card__body {
    grid-template-columns: 1fr;
  }

  .apd-order-preview {
    justify-content: flex-start;
  }

  .apd-order-dl,
  .apd-order-pricing__grid {
    grid-template-columns: 1fr;
  }
}

/* V11.4 micro polish */
body.apd-admin-screen {
  background: var(--apd-bg);
}

body.apd-admin-screen #wpbody-content > .wrap:not(.apd-admin-shell) {
  margin-top: 18px;
}

body.apd-admin-screen #wpbody-content > .wrap > hr.wp-header-end {
  display: none;
}

.apd-page-heading,
.apd-admin-hero,
.apd-card-head,
.apd-section-card__head {
  position: relative;
}

.apd-page-heading h1,
.apd-admin-hero h1,
body.apd-admin-screen .wp-heading-inline {
  text-wrap: balance;
}

.apd-page-heading p,
.apd-admin-hero p {
  max-width: 78ch;
}

.apd-page-heading .apd-chip-row,
.apd-page-heading .apd-inline-actions-wrap {
  align-items: center;
}

.apd-card > :last-child,
.apd-section-card > :last-child,
.apd-admin-hero > :last-child,
.apd-empty-state > :last-child,
.apd-empty-state-soft > :last-child,
.apd-translation-editor > :last-child,
.apd-translation-sidebar > :last-child {
  margin-bottom: 0;
}

.apd-card-head {
  margin-bottom: 14px;
}

.apd-card-head h2,
.apd-card-head h3,
.apd-section-card__head h3 {
  letter-spacing: -0.02em;
}

.apd-admin-shell .button.button-link,
.apd-admin-screen .button.button-link {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--apd-accent);
  padding-left: 0;
  padding-right: 0;
  min-height: auto;
}

.apd-admin-shell .button.button-link:hover,
.apd-admin-screen .button.button-link:hover {
  color: var(--apd-text);
  background: transparent;
}

.apd-admin-shell .widefat tbody tr,
.apd-admin-screen .widefat tbody tr,
.apd-admin-shell .wp-list-table tbody tr,
.apd-admin-screen .wp-list-table tbody tr,
.apd-admin-shell .apd-table tbody tr,
.apd-admin-screen .apd-table tbody tr {
  transition: background-color .18s ease;
}

.apd-admin-shell .widefat tbody tr:hover,
.apd-admin-screen .widefat tbody tr:hover,
.apd-admin-shell .wp-list-table tbody tr:hover,
.apd-admin-screen .wp-list-table tbody tr:hover,
.apd-admin-shell .apd-table tbody tr:hover,
.apd-admin-screen .apd-table tbody tr:hover {
  background: rgba(76, 111, 255, 0.035);
}

.apd-admin-screen .row-actions,
.apd-admin-screen .description,
.apd-admin-screen .tablenav .displaying-num,
.apd-admin-screen .tablenav-pages,
.apd-admin-screen .tablenav-pages-navspan,
.apd-admin-screen .tablenav-pages .paging-input {
  color: var(--apd-muted);
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .column-title strong a,
body.apd-admin-screen.edit-php.post-type-apd_template .column-title strong a,
body.apd-admin-screen.edit-php.post-type-apd_user_design .column-title strong a {
  color: var(--apd-text);
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .page-title-action:hover,
body.apd-admin-screen.edit-php.post-type-apd_template .page-title-action:hover,
body.apd-admin-screen.edit-php.post-type-apd_user_design .page-title-action:hover {
  background: var(--apd-surface-soft);
  border-color: var(--apd-border-strong);
  color: var(--apd-text);
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .tablenav .button,
body.apd-admin-screen.edit-php.post-type-apd_template .tablenav .button,
body.apd-admin-screen.edit-php.post-type-apd_user_design .tablenav .button,
body.apd-admin-screen.edit-php.post-type-apd_product_config .search-box .button,
body.apd-admin-screen.edit-php.post-type-apd_template .search-box .button,
body.apd-admin-screen.edit-php.post-type-apd_user_design .search-box .button {
  min-height: 40px;
  border-radius: 12px;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .tablenav .actions select,
body.apd-admin-screen.edit-php.post-type-apd_template .tablenav .actions select,
body.apd-admin-screen.edit-php.post-type-apd_user_design .tablenav .actions select {
  min-height: 40px;
  border-radius: 12px;
  border-color: var(--apd-border);
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .view-switch a,
body.apd-admin-screen.edit-php.post-type-apd_template .view-switch a,
body.apd-admin-screen.edit-php.post-type-apd_user_design .view-switch a {
  border-radius: 10px;
}

.post-type-apd_product_config #post-body,
.post-type-apd_template #post-body {
  gap: 18px;
}

.post-type-apd_product_config #submitdiv .misc-pub-section,
.post-type-apd_template #submitdiv .misc-pub-section,
body.apd-admin-screen--order #submitdiv .misc-pub-section,
body.apd-admin-screen--product #submitdiv .misc-pub-section {
  padding-top: 12px;
  padding-bottom: 12px;
}

.post-type-apd_product_config #submitdiv #major-publishing-actions,
.post-type-apd_template #submitdiv #major-publishing-actions,
body.apd-admin-screen--order #submitdiv #major-publishing-actions,
body.apd-admin-screen--product #submitdiv #major-publishing-actions,
.post-type-apd_product_config #submitdiv #minor-publishing-actions,
.post-type-apd_template #submitdiv #minor-publishing-actions,
body.apd-admin-screen--order #submitdiv #minor-publishing-actions,
body.apd-admin-screen--product #submitdiv #minor-publishing-actions {
  padding-left: 14px;
  padding-right: 14px;
}

.post-type-apd_product_config .postbox-header .handle-actions .handle-order-higher,
.post-type-apd_product_config .postbox-header .handle-actions .handle-order-lower,
.post-type-apd_product_config .postbox-header .handle-actions .handlediv,
.post-type-apd_template .postbox-header .handle-actions .handle-order-higher,
.post-type-apd_template .postbox-header .handle-actions .handle-order-lower,
.post-type-apd_template .postbox-header .handle-actions .handlediv,
body.apd-admin-screen--order #poststuff .handle-actions .handlediv,
body.apd-admin-screen--product #poststuff .handle-actions .handlediv {
  color: var(--apd-muted);
}

body.apd-admin-screen--order #poststuff .inside .form-field,
body.apd-admin-screen--product #poststuff .inside .form-field {
  margin-bottom: 16px;
}

body.apd-admin-screen--order #poststuff .inside .form-field:last-child,
body.apd-admin-screen--product #poststuff .inside .form-field:last-child {
  margin-bottom: 0;
}

body.apd-admin-screen--product .woocommerce_options_panel .options_group {
  border-top-color: var(--apd-border);
}

body.apd-admin-screen--product .woocommerce_options_panel .form-field label,
body.apd-admin-screen--order .inside label {
  color: var(--apd-text);
  font-weight: 600;
}

.apd-order-resume-link {
  margin-top: 8px;
}

.apd-order-resume-link a {
  color: var(--apd-accent);
  font-weight: 600;
  text-decoration: none;
}

.apd-order-resume-link a:hover {
  color: var(--apd-text);
}

@media (max-width: 782px) {
  .apd-page-heading {
    margin-bottom: 18px;
  }

  .apd-page-heading .apd-chip-row,
  .apd-page-heading .apd-inline-actions-wrap {
    width: 100%;
  }

  body.apd-admin-screen.edit-php.post-type-apd_product_config .tablenav,
  body.apd-admin-screen.edit-php.post-type-apd_template .tablenav,
  body.apd-admin-screen.edit-php.post-type-apd_user_design .tablenav,
  body.apd-admin-screen.edit-php.post-type-apd_product_config .subsubsub,
  body.apd-admin-screen.edit-php.post-type-apd_template .subsubsub,
  body.apd-admin-screen.edit-php.post-type-apd_user_design .subsubsub {
    padding: 12px;
  }
}


/* V11.5 builder and admin visual hardening */
.post-type-apd_product_config #titlediv,
.post-type-apd_template #titlediv {
  margin-bottom: 18px;
}

.post-type-apd_product_config #titlediv .inside,
.post-type-apd_template #titlediv .inside {
  margin: 0;
  padding: 16px 18px 18px;
  background: transparent;
}

.post-type-apd_product_config #titlewrap,
.post-type-apd_template #titlewrap {
  margin: 0;
  padding: 0;
}

.post-type-apd_product_config #titlewrap #title,
.post-type-apd_template #titlewrap #title {
  display: block;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  min-height: 48px;
  border: 1px solid var(--apd-border) !important;
  border-radius: 14px;
  background: #fff;
  box-shadow: none !important;
  outline: none;
}

.post-type-apd_product_config #titlewrap #title:focus,
.post-type-apd_template #titlewrap #title:focus {
  border-color: rgba(76,111,255,.45) !important;
  box-shadow: 0 0 0 3px rgba(76,111,255,.10) !important;
}

.post-type-apd_product_config .js-apd-live-preview,
.post-type-apd_template .js-apd-live-preview {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.post-type-apd_product_config .js-apd-live-preview .ask-shell-card,
.post-type-apd_product_config .js-apd-live-preview .ask-theme-shell,
.post-type-apd_template .js-apd-live-preview .ask-shell-card,
.post-type-apd_template .js-apd-live-preview .ask-theme-shell {
  width: 100%;
  max-width: 100%;
  margin: 0 !important;
}

.post-type-apd_product_config .js-apd-live-preview button,
.post-type-apd_product_config .js-apd-live-preview input,
.post-type-apd_product_config .js-apd-live-preview select,
.post-type-apd_product_config .js-apd-live-preview textarea,
.post-type-apd_template .js-apd-live-preview button,
.post-type-apd_template .js-apd-live-preview input,
.post-type-apd_template .js-apd-live-preview select,
.post-type-apd_template .js-apd-live-preview textarea {
  font: inherit;
  letter-spacing: inherit;
  text-transform: none;
}

.post-type-apd_product_config .js-apd-live-preview .ask-zone-toggle-strip,
.post-type-apd_template .js-apd-live-preview .ask-zone-toggle-strip {
  flex: 0 0 40px;
  min-width: 40px;
  padding: 8px 4px;
}

.post-type-apd_product_config .js-apd-live-preview .ask-zone-toggle-wrapper--horizontal,
.post-type-apd_template .js-apd-live-preview .ask-zone-toggle-wrapper--horizontal {
  padding-inline: 6px;
}

.post-type-apd_product_config .js-apd-live-preview .ask-theme-shell-header,
.post-type-apd_product_config .js-apd-live-preview .ask-theme-toolbar,
.post-type-apd_template .js-apd-live-preview .ask-theme-shell-header,
.post-type-apd_template .js-apd-live-preview .ask-theme-toolbar {
  overflow: visible;
}

.post-type-apd_product_config .js-apd-live-preview .ask-theme-sidebar,
.post-type-apd_template .js-apd-live-preview .ask-theme-sidebar {
  min-width: 0;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .tablenav.top,
body.apd-admin-screen.edit-php.post-type-apd_template .tablenav.top,
body.apd-admin-screen.edit-php.post-type-apd_user_design .tablenav.top {
  margin-bottom: 0;
  border-radius: 18px 18px 0 0;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .wp-list-table,
body.apd-admin-screen.edit-php.post-type-apd_template .wp-list-table,
body.apd-admin-screen.edit-php.post-type-apd_user_design .wp-list-table {
  margin-top: 0;
  border-radius: 0;
  overflow: hidden;
  border-left: 1px solid var(--apd-border);
  border-right: 1px solid var(--apd-border);
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .tablenav.bottom,
body.apd-admin-screen.edit-php.post-type-apd_template .tablenav.bottom,
body.apd-admin-screen.edit-php.post-type-apd_user_design .tablenav.bottom {
  margin-top: 0;
  border-top: 0;
  border-radius: 0 0 18px 18px;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .tablenav .alignleft.actions,
body.apd-admin-screen.edit-php.post-type-apd_template .tablenav .alignleft.actions,
body.apd-admin-screen.edit-php.post-type-apd_user_design .tablenav .alignleft.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .tablenav .actions select,
body.apd-admin-screen.edit-php.post-type-apd_template .tablenav .actions select,
body.apd-admin-screen.edit-php.post-type-apd_user_design .tablenav .actions select {
  margin-right: 0;
}

.post-type-apd_template #apd_template_modules .inside {
  padding: 16px !important;
  background: linear-gradient(180deg, var(--apd-surface) 0%, var(--apd-surface-soft) 100%);
}

.apd-structured-panel[data-apd-template-modules="1"] {
  gap: 14px;
}

.apd-structured-panel[data-apd-template-modules="1"] > p {
  margin: 0;
  color: var(--apd-muted);
  line-height: 1.6;
}

.apd-structured-panel[data-apd-template-modules="1"] .apd-collapsible-group {
  margin-bottom: 0;
  background: linear-gradient(180deg, #ffffff 0%, var(--apd-surface-soft) 100%);
  box-shadow: none;
}

.apd-structured-panel[data-apd-template-modules="1"] .apd-collapsible-group__summary {
  padding: 14px 16px;
}

.apd-structured-panel[data-apd-template-modules="1"] .apd-collapsible-group__summary strong {
  font-size: 14px;
}

.apd-structured-panel[data-apd-template-modules="1"] .apd-collapsible-group__body {
  padding: 0 16px 16px;
}

.apd-template-zone-card {
  background: linear-gradient(180deg, #ffffff 0%, var(--apd-surface-soft) 100%);
  padding: 14px;
  gap: 12px;
}

.apd-template-zone-card h4 {
  font-size: 14px;
  font-weight: 700;
}

.apd-template-module-grid {
  gap: 12px;
}

.apd-template-module-card {
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--apd-shadow-soft);
}

.apd-template-module-card__head {
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(76,111,255,.05) 0%, rgba(255,255,255,.9) 100%);
}

.apd-template-module-toggle span strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}

.apd-template-module-toggle span .apd-help-text {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
}

.apd-template-module-card__body {
  background: #fff;
}

.apd-template-module-card__body .apd-field,
.apd-template-zone-card .apd-field {
  gap: 6px;
}

.apd-template-module-card__body .apd-field > input[type="text"],
.apd-template-module-card__body .apd-field > select,
.apd-template-icon-image-field .apd-media-field input[type="text"],
.apd-template-zone-card .apd-field > select {
  min-height: 42px;
}

.apd-template-module-flags {
  padding: 12px;
  border: 1px solid var(--apd-border);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--apd-surface-soft) 0%, #ffffff 100%);
}

.apd-template-module-flags > span {
  font-weight: 700;
  color: var(--apd-text);
}

.apd-template-icon-image-field .apd-media-field {
  display: grid;
  gap: 8px;
}

.apd-template-icon-image-field .apd-inline-actions {
  margin: 0;
}

@media (max-width: 782px) {
  body.apd-admin-screen.edit-php.post-type-apd_product_config .tablenav .alignleft.actions,
  body.apd-admin-screen.edit-php.post-type-apd_template .tablenav .alignleft.actions,
  body.apd-admin-screen.edit-php.post-type-apd_user_design .tablenav .alignleft.actions {
    align-items: stretch;
  }

  .apd-template-module-card__head {
    align-items: flex-start;
  }
}


/* V11.7 rollback unsafe column forcing + compact title field */
.post-type-apd_product_config #titlediv,
.post-type-apd_template #titlediv {
  padding: 0;
  overflow: hidden;
  background: var(--apd-surface);
}

.post-type-apd_product_config #titlewrap,
.post-type-apd_template #titlewrap {
  margin: 0;
  padding: 0;
}

.post-type-apd_product_config #titlewrap #title,
.post-type-apd_template #titlewrap #title {
  display: block;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 14px 16px;
  border: 0 !important;
  border-radius: 0;
  background: #fff;
  box-shadow: none !important;
  outline: none;
}

.post-type-apd_product_config #titlewrap #title:focus,
.post-type-apd_template #titlewrap #title:focus {
  box-shadow: inset 0 0 0 2px rgba(76,111,255,.22) !important;
}

.post-type-apd_product_config #titlediv .inside,
.post-type-apd_template #titlediv .inside {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* V11.8 native WordPress list-table layout reset
   Keep the Asuka admin card UI scoped to real plugin pages/editors, but do not
   restyle the native WordPress post list screens. The previous broad
   .apd-admin-screen table rules made the Product Configurations list look like
   a broken card layout with oversized rows and boxed filters. */
body.apd-admin-screen.edit-php.post-type-apd_product_config,
body.apd-admin-screen.edit-php.post-type-apd_template,
body.apd-admin-screen.edit-php.post-type-apd_user_design {
  background: #f0f0f1;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config #wpbody-content > .wrap,
body.apd-admin-screen.edit-php.post-type-apd_template #wpbody-content > .wrap,
body.apd-admin-screen.edit-php.post-type-apd_user_design #wpbody-content > .wrap {
  margin: 10px 20px 0 2px;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .wp-heading-inline,
body.apd-admin-screen.edit-php.post-type-apd_template .wp-heading-inline,
body.apd-admin-screen.edit-php.post-type-apd_user_design .wp-heading-inline {
  font-size: 23px;
  line-height: 1.3;
  letter-spacing: normal;
  color: #1d2327;
  margin-right: 5px;
  text-wrap: initial;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .page-title-action,
body.apd-admin-screen.edit-php.post-type-apd_template .page-title-action,
body.apd-admin-screen.edit-php.post-type-apd_user_design .page-title-action {
  border-radius: 0;
  padding: 4px 8px;
  background: #f6f7f7;
  border-color: #2271b1;
  color: #2271b1;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .subsubsub,
body.apd-admin-screen.edit-php.post-type-apd_template .subsubsub,
body.apd-admin-screen.edit-php.post-type-apd_user_design .subsubsub,
body.apd-admin-screen.edit-php.post-type-apd_product_config .tablenav,
body.apd-admin-screen.edit-php.post-type-apd_template .tablenav,
body.apd-admin-screen.edit-php.post-type-apd_user_design .tablenav {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .subsubsub,
body.apd-admin-screen.edit-php.post-type-apd_template .subsubsub,
body.apd-admin-screen.edit-php.post-type-apd_user_design .subsubsub {
  margin: 8px 0 0;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .tablenav,
body.apd-admin-screen.edit-php.post-type-apd_template .tablenav,
body.apd-admin-screen.edit-php.post-type-apd_user_design .tablenav {
  clear: both;
  height: auto;
  margin: 6px 0 4px;
  padding-top: 5px;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .tablenav.top,
body.apd-admin-screen.edit-php.post-type-apd_template .tablenav.top,
body.apd-admin-screen.edit-php.post-type-apd_user_design .tablenav.top {
  margin-bottom: 4px;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .wp-list-table,
body.apd-admin-screen.edit-php.post-type-apd_template .wp-list-table,
body.apd-admin-screen.edit-php.post-type-apd_user_design .wp-list-table {
  width: 100%;
  border: 1px solid #c3c4c7;
  border-radius: 0;
  overflow: visible;
  background: #fff;
  box-shadow: none;
  border-collapse: collapse;
  border-spacing: 0;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .wp-list-table thead th,
body.apd-admin-screen.edit-php.post-type-apd_template .wp-list-table thead th,
body.apd-admin-screen.edit-php.post-type-apd_user_design .wp-list-table thead th,
body.apd-admin-screen.edit-php.post-type-apd_product_config .wp-list-table tfoot th,
body.apd-admin-screen.edit-php.post-type-apd_template .wp-list-table tfoot th,
body.apd-admin-screen.edit-php.post-type-apd_user_design .wp-list-table tfoot th {
  background: #fff;
  color: #2c3338;
  border-bottom: 1px solid #c3c4c7;
  font-size: 14px;
  letter-spacing: normal;
  line-height: 1.4em;
  text-transform: none;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .wp-list-table tfoot th,
body.apd-admin-screen.edit-php.post-type-apd_template .wp-list-table tfoot th,
body.apd-admin-screen.edit-php.post-type-apd_user_design .wp-list-table tfoot th {
  border-top: 1px solid #c3c4c7;
  border-bottom: 0;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .wp-list-table td,
body.apd-admin-screen.edit-php.post-type-apd_product_config .wp-list-table th,
body.apd-admin-screen.edit-php.post-type-apd_template .wp-list-table td,
body.apd-admin-screen.edit-php.post-type-apd_template .wp-list-table th,
body.apd-admin-screen.edit-php.post-type-apd_user_design .wp-list-table td,
body.apd-admin-screen.edit-php.post-type-apd_user_design .wp-list-table th {
  padding: 8px 10px;
  vertical-align: top;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .wp-list-table .column-cb,
body.apd-admin-screen.edit-php.post-type-apd_template .wp-list-table .column-cb,
body.apd-admin-screen.edit-php.post-type-apd_user_design .wp-list-table .column-cb {
  width: 2.2em;
  padding: 8px 0 8px 3px;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .wp-list-table .column-title,
body.apd-admin-screen.edit-php.post-type-apd_template .wp-list-table .column-title,
body.apd-admin-screen.edit-php.post-type-apd_user_design .wp-list-table .column-title {
  width: auto;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .wp-list-table .column-apd_mode,
body.apd-admin-screen.edit-php.post-type-apd_template .wp-list-table .column-apd_mode,
body.apd-admin-screen.edit-php.post-type-apd_user_design .wp-list-table .column-apd_mode {
  width: 160px;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .wp-list-table .column-apd_views,
body.apd-admin-screen.edit-php.post-type-apd_template .wp-list-table .column-apd_views,
body.apd-admin-screen.edit-php.post-type-apd_user_design .wp-list-table .column-apd_views {
  width: 90px;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .wp-list-table .column-date,
body.apd-admin-screen.edit-php.post-type-apd_template .wp-list-table .column-date,
body.apd-admin-screen.edit-php.post-type-apd_user_design .wp-list-table .column-date {
  width: 14%;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .striped > tbody > :nth-child(odd),
body.apd-admin-screen.edit-php.post-type-apd_template .striped > tbody > :nth-child(odd),
body.apd-admin-screen.edit-php.post-type-apd_user_design .striped > tbody > :nth-child(odd) {
  background-color: #f6f7f7;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .wp-list-table tbody tr:hover,
body.apd-admin-screen.edit-php.post-type-apd_template .wp-list-table tbody tr:hover,
body.apd-admin-screen.edit-php.post-type-apd_user_design .wp-list-table tbody tr:hover {
  background: inherit;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .tablenav .button,
body.apd-admin-screen.edit-php.post-type-apd_template .tablenav .button,
body.apd-admin-screen.edit-php.post-type-apd_user_design .tablenav .button,
body.apd-admin-screen.edit-php.post-type-apd_product_config .search-box .button,
body.apd-admin-screen.edit-php.post-type-apd_template .search-box .button,
body.apd-admin-screen.edit-php.post-type-apd_user_design .search-box .button {
  min-height: 30px;
  border-radius: 3px;
  padding: 0 10px;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .tablenav .actions select,
body.apd-admin-screen.edit-php.post-type-apd_template .tablenav .actions select,
body.apd-admin-screen.edit-php.post-type-apd_user_design .tablenav .actions select,
body.apd-admin-screen.edit-php.post-type-apd_product_config .search-box input[type="search"],
body.apd-admin-screen.edit-php.post-type-apd_template .search-box input[type="search"],
body.apd-admin-screen.edit-php.post-type-apd_user_design .search-box input[type="search"] {
  min-height: 30px;
  border-radius: 3px;
  border-color: #8c8f94;
}

/* V11.8 compact template module sidebar + live layout feedback */
.apd-structured-panel[data-apd-template-modules="1"] {
  gap: 10px;
}

.apd-structured-panel[data-apd-template-modules="1"] > p {
  font-size: 12px;
  line-height: 1.45;
}

.apd-structured-panel[data-apd-template-modules="1"] .apd-collapsible-group__summary {
  padding: 10px 12px;
  gap: 8px;
}

.apd-structured-panel[data-apd-template-modules="1"] .apd-collapsible-group__body {
  padding: 0 12px 12px;
}

.apd-template-group-count {
  margin-left: auto;
  padding: 2px 8px;
  border: 1px solid var(--apd-border);
  border-radius: 999px;
  color: var(--apd-muted);
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.apd-template-zone-grid,
.apd-template-module-grid {
  gap: 8px;
}

.apd-template-zone-card {
  padding: 10px;
  gap: 8px;
}

.apd-template-zone-card h4 {
  font-size: 12px;
}

.apd-template-module-card:not([open]) .apd-template-module-card__head {
  padding: 9px 12px;
  align-items: center;
}

.apd-template-module-card:not([open]) .apd-template-module-toggle {
  align-items: center;
}

.apd-template-module-card:not([open]) .apd-template-module-toggle input[type="checkbox"] {
  margin-top: 0;
}

.apd-template-module-card:not([open]) .apd-template-module-toggle span .apd-help-text {
  display: none;
}

.apd-template-module-card:not([open]) .apd-template-module-toggle span strong {
  font-size: 13px;
}

.apd-template-module-card.is-disabled:not([open]) {
  opacity: .68;
  background: #fff;
  box-shadow: none;
}

.apd-template-module-card.is-enabled:not([open]) {
  border-color: rgba(34, 113, 177, .28);
  background: linear-gradient(180deg, rgba(34, 113, 177, .06), #fff);
}

.apd-template-module-card.is-enabled .apd-chip {
  border-color: rgba(34, 113, 177, .24);
  color: #135e96;
  background: rgba(34, 113, 177, .08);
}

.apd-template-module-card__body {
  padding: 12px;
  gap: 10px;
}

.apd-template-module-card__body .apd-field > span,
.apd-template-zone-card .apd-field > span {
  margin-bottom: 5px;
  font-size: 12px;
}

.apd-template-module-card__body .apd-field > input[type="text"],
.apd-template-module-card__body .apd-field > select,
.apd-template-icon-image-field .apd-media-field input[type="text"],
.apd-template-zone-card .apd-field > select {
  min-height: 34px;
}

.apd-template-module-flags {
  padding: 9px;
  gap: 6px;
}

/* Operational dashboard and workspace hubs. */
.apd-dashboard,
.apd-hub-page {
  width: auto;
  max-width: 1440px;
  padding-bottom: 44px;
  font-family: "APD Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.apd-dashboard *,
.apd-hub-page * {
  letter-spacing: 0;
}

.apd-dashboard .button,
.apd-hub-page .button {
  min-height: 38px;
  border-radius: 6px;
  padding: 0 14px;
  font-weight: 700;
}

.apd-dashboard .button.button-primary,
.apd-hub-page .button.button-primary {
  background: var(--apd-accent);
}

.apd-dashboard-header,
.apd-workspace-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  align-items: center;
  gap: 48px;
  padding: 30px 4px 34px;
  border-bottom: 1px solid var(--apd-border);
}

.apd-dashboard-header__copy,
.apd-workspace-header > div {
  max-width: 760px;
}

.apd-workspace-header > .button {
  justify-self: end;
}

.apd-dashboard-eyebrow,
.apd-dashboard-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--apd-accent);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
  text-transform: uppercase;
}

.apd-dashboard-identity {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.apd-dashboard-identity img {
  display: block;
  width: 34px;
  height: 34px;
}

.apd-dashboard-identity .apd-dashboard-eyebrow {
  margin: 0;
}

.apd-dashboard-header h1,
.apd-workspace-header h1 {
  margin: 0 0 10px;
  color: var(--apd-text);
  font-size: 30px;
  font-weight: 750;
  line-height: 1.2;
}

.apd-dashboard-header__copy > p,
.apd-workspace-header > div > p {
  max-width: 680px;
  margin: 0;
  color: var(--apd-muted);
  font-size: 14px;
  line-height: 1.7;
}

.apd-dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.apd-setup-summary {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--apd-border);
  border-radius: 8px;
  background: var(--apd-surface);
  box-shadow: 0 8px 24px rgba(31, 51, 84, 0.06);
}

.apd-setup-summary__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.apd-setup-summary__top span:first-child {
  display: block;
  margin-bottom: 4px;
  color: var(--apd-muted);
  font-size: 12px;
}

.apd-setup-summary__top strong {
  display: block;
  color: var(--apd-text);
  font-size: 15px;
}

.apd-setup-summary__percent {
  color: var(--apd-accent);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.apd-progress {
  width: 100%;
  height: 7px;
  margin: 17px 0 13px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--apd-surface-strong);
}

.apd-progress::-webkit-progress-bar {
  border-radius: 999px;
  background: var(--apd-surface-strong);
}

.apd-progress::-webkit-progress-value {
  border-radius: 999px;
  background: var(--apd-accent);
}

.apd-progress::-moz-progress-bar {
  border-radius: 999px;
  background: var(--apd-accent);
}

.apd-setup-summary p {
  margin: 0 0 6px;
  color: var(--apd-muted);
  font-size: 12px;
  line-height: 1.55;
}

.apd-setup-summary a,
.apd-text-link,
.apd-workspace-card > a {
  color: var(--apd-accent);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.apd-setup-summary a:hover,
.apd-text-link:hover,
.apd-workspace-card > a:hover {
  text-decoration: underline;
}

.apd-dashboard-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid #c8daf8;
  border-radius: 8px;
  background: #f4f8ff;
  color: #1d3f74;
}

.apd-dashboard-notice.is-warning {
  border-color: #efd7a6;
  background: #fff9ed;
  color: #6d4b0d;
}

.apd-dashboard-notice > .dashicons {
  width: 20px;
  height: 20px;
  font-size: 20px;
}

.apd-dashboard-notice strong {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
}

.apd-dashboard-notice p {
  margin: 0;
  color: inherit;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.82;
}

.apd-dashboard-notice > a {
  color: inherit;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.apd-dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.apd-dashboard-metric {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 148px;
  flex-direction: column;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--apd-border);
  border-radius: 8px;
  background: var(--apd-surface);
  color: var(--apd-text);
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.apd-dashboard-metric:hover {
  border-color: var(--apd-border-strong);
  box-shadow: 0 8px 22px rgba(31, 51, 84, 0.07);
  color: var(--apd-text);
}

.apd-dashboard-metric::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: #aeb9ca;
  content: "";
}

.apd-dashboard-metric.is-ready::before {
  background: #18a878;
}

.apd-dashboard-metric.is-warning::before,
.apd-dashboard-metric.is-attention::before {
  background: #e49c29;
}

.apd-dashboard-metric__label {
  margin-bottom: 11px;
  color: var(--apd-muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.apd-dashboard-metric > strong {
  margin-bottom: 7px;
  overflow-wrap: anywhere;
  color: var(--apd-text);
  font-size: 23px;
  font-weight: 750;
  line-height: 1.15;
}

.apd-dashboard-metric > small {
  max-width: 90%;
  color: var(--apd-muted);
  font-size: 11px;
  line-height: 1.5;
}

.apd-dashboard-metric__arrow {
  position: absolute;
  right: 16px;
  bottom: 14px;
  color: var(--apd-accent);
  font-size: 16px;
}

.apd-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}

.apd-dashboard-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--apd-border);
  border-radius: 8px;
  background: var(--apd-surface);
  box-shadow: 0 6px 20px rgba(31, 51, 84, 0.04);
}

.apd-dashboard-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.apd-dashboard-card__head h2 {
  margin: 0;
  color: var(--apd-text);
  font-size: 17px;
  line-height: 1.35;
}

.apd-dashboard-kicker {
  margin-bottom: 4px;
  color: var(--apd-muted);
  font-size: 10px;
}

.apd-dashboard-count {
  display: inline-flex;
  min-width: 38px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--apd-border);
  border-radius: 999px;
  background: var(--apd-surface-soft);
  color: var(--apd-muted);
  font-size: 11px;
  font-weight: 750;
}

.apd-checklist,
.apd-dashboard-list,
.apd-quick-links {
  border-top: 1px solid var(--apd-border);
}

.apd-checklist__item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--apd-border);
  color: var(--apd-text);
  text-decoration: none;
}

.apd-checklist__item:hover {
  color: var(--apd-text);
}

.apd-checklist__status {
  display: inline-flex;
  width: 25px;
  height: 25px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--apd-border-strong);
  border-radius: 50%;
  color: var(--apd-muted);
  font-size: 11px;
  font-weight: 800;
}

.apd-checklist__item.is-complete .apd-checklist__status {
  border-color: transparent;
  background: #e5f7f0;
  color: #087d58;
}

.apd-checklist__copy {
  min-width: 0;
}

.apd-checklist__copy strong,
.apd-checklist__copy small {
  display: block;
}

.apd-checklist__copy strong {
  margin-bottom: 3px;
  font-size: 12px;
}

.apd-checklist__copy small {
  color: var(--apd-muted);
  font-size: 11px;
  line-height: 1.45;
}

.apd-checklist__action {
  color: var(--apd-accent);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.apd-status-list {
  margin: 0;
  border-top: 1px solid var(--apd-border);
}

.apd-status-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--apd-border);
}

.apd-status-list dt {
  color: var(--apd-muted);
  font-size: 12px;
}

.apd-status-list dd {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--apd-text);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.apd-status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #aeb9ca;
}

.apd-status-dot.is-ready {
  background: #18a878;
  box-shadow: 0 0 0 3px rgba(24, 168, 120, 0.12);
}

.apd-status-dot.is-warning,
.apd-status-dot.is-attention {
  background: #e49c29;
  box-shadow: 0 0 0 3px rgba(228, 156, 41, 0.12);
}

.apd-dashboard-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.apd-dashboard-list > a {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--apd-border);
  color: var(--apd-text);
  text-decoration: none;
}

.apd-dashboard-list > a > span:first-child {
  min-width: 0;
}

.apd-dashboard-list strong,
.apd-dashboard-list small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.apd-dashboard-list strong {
  margin-bottom: 3px;
  font-size: 12px;
}

.apd-dashboard-list small {
  color: var(--apd-muted);
  font-size: 11px;
}

.apd-dashboard-list > a > span:last-child {
  color: var(--apd-accent);
}

.apd-dashboard-empty {
  padding: 22px 2px 4px;
}

.apd-dashboard-empty strong {
  display: block;
  margin-bottom: 6px;
  color: var(--apd-text);
  font-size: 13px;
}

.apd-dashboard-empty p {
  max-width: 500px;
  margin-bottom: 16px;
  color: var(--apd-muted);
  font-size: 12px;
  line-height: 1.6;
}

.apd-quick-links > a {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--apd-border);
  color: var(--apd-text);
  text-decoration: none;
}

.apd-quick-links .dashicons {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--apd-accent-soft);
  color: var(--apd-accent);
  font-size: 16px;
}

.apd-quick-links strong,
.apd-quick-links small {
  display: block;
}

.apd-quick-links strong {
  margin-bottom: 2px;
  font-size: 12px;
}

.apd-quick-links small {
  color: var(--apd-muted);
  font-size: 11px;
}

.apd-runtime-pill {
  display: inline-flex;
  justify-self: end;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--apd-border);
  border-radius: 999px;
  background: var(--apd-surface);
  color: var(--apd-text);
  font-size: 11px;
  font-weight: 750;
}

.apd-runtime-pill > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #aeb9ca;
}

.apd-runtime-pill.is-ready > span {
  background: #18a878;
}

.apd-runtime-pill.is-warning > span {
  background: #e49c29;
}

.apd-workspace-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.apd-workspace-card {
  display: flex;
  min-width: 0;
  min-height: 220px;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--apd-border);
  border-radius: 8px;
  background: var(--apd-surface);
  box-shadow: 0 6px 20px rgba(31, 51, 84, 0.04);
}

.apd-workspace-card__icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  border-radius: 7px;
  background: var(--apd-accent-soft);
  color: var(--apd-accent);
}

.apd-workspace-card__icon .dashicons {
  width: 18px;
  height: 18px;
  font-size: 18px;
}

.apd-workspace-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.apd-workspace-card__head h2 {
  margin: 0;
  color: var(--apd-text);
  font-size: 16px;
  line-height: 1.35;
}

.apd-workspace-card__head > span {
  display: inline-flex;
  min-width: 28px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--apd-surface-strong);
  color: var(--apd-muted);
  font-size: 11px;
  font-weight: 750;
}

.apd-workspace-card > p {
  margin: 10px 0 15px;
  color: var(--apd-muted);
  font-size: 12px;
  line-height: 1.6;
}

.apd-workspace-card__value {
  display: block;
  margin: auto 0 12px;
  color: var(--apd-text);
  font-size: 12px;
}

.apd-workspace-card > a {
  margin-top: auto;
}

.apd-feature-locked {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  gap: 16px;
  max-width: 760px;
}

.apd-feature-locked > .dashicons {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--apd-accent-soft);
  color: var(--apd-accent);
}

.apd-feature-locked h2 {
  margin-bottom: 6px;
}

.apd-feature-locked p {
  margin-bottom: 16px;
}

.apd-admin-theme-midnight .apd-dashboard-notice.is-info {
  border-color: rgba(124, 156, 255, 0.3);
  background: rgba(76, 111, 255, 0.12);
  color: #dbe5ff;
}

.apd-admin-theme-midnight .apd-dashboard-notice.is-warning {
  border-color: rgba(228, 156, 41, 0.35);
  background: rgba(228, 156, 41, 0.12);
  color: #ffe3ad;
}

.apd-admin-theme-midnight .apd-checklist__item.is-complete .apd-checklist__status {
  background: rgba(24, 168, 120, 0.16);
  color: #7be0bd;
}

@media (max-width: 1180px) {
  .apd-dashboard-metrics,
  .apd-workspace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .apd-dashboard-header,
  .apd-workspace-header {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .apd-runtime-pill {
    justify-self: start;
  }

  .apd-workspace-header > .button {
    justify-self: start;
  }

  .apd-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 782px) {
  .apd-dashboard,
  .apd-hub-page {
    margin: 10px 10px 0 0;
  }

  .apd-dashboard-header,
  .apd-workspace-header {
    padding: 22px 0 26px;
  }

  .apd-dashboard-header h1,
  .apd-workspace-header h1 {
    font-size: 26px;
  }
}

@media (max-width: 600px) {
  .apd-dashboard-metrics,
  .apd-workspace-grid {
    grid-template-columns: 1fr;
  }

  .apd-dashboard-notice {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .apd-dashboard-notice > a {
    grid-column: 2;
    justify-self: start;
  }

  .apd-checklist__item {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .apd-checklist__action {
    grid-column: 2;
    white-space: normal;
  }

  .apd-status-list > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .apd-status-list dd {
    text-align: left;
  }
}

/* V12 catalog editors */
.apd-admin-shell {
  font-family: "APD Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.apd-admin-shell .apd-card,
.apd-admin-shell .apd-crud-editor,
.apd-admin-shell .apd-tab-nav,
.apd-admin-shell .apd-tab-panel {
  border-radius: 12px;
}

.apd-field input[type="search"],
.apd-field input[type="url"],
.apd-field input[type="email"],
.apd-field input[type="file"] {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--apd-border);
  border-radius: 10px;
  background: var(--apd-surface);
  color: var(--apd-text);
  box-shadow: none;
}

.apd-catalog-editor-v2 {
  padding: 24px;
  border-color: var(--apd-border);
  background: var(--apd-surface);
  box-shadow: var(--apd-shadow-soft);
}

.apd-catalog-editor-v2 .apd-crud-editor__head {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--apd-border);
}

.apd-catalog-editor-v2 .apd-crud-editor__head h3 {
  margin: 4px 0 6px;
  font-size: 23px;
  line-height: 1.25;
}

.apd-editor-eyebrow {
  display: block;
  color: var(--apd-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.apd-editor-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--apd-muted);
  font-size: 12px;
  font-weight: 700;
}

.apd-editor-note {
  padding: 15px 16px;
  border: 1px solid var(--apd-border);
  border-radius: 10px;
  background: var(--apd-surface-soft);
}

.apd-editor-note strong {
  display: block;
  margin-bottom: 4px;
  color: var(--apd-text);
}

.apd-editor-note p {
  margin: 0;
}

.apd-catalog-editor-v2 .apd-font-preview-card {
  border-radius: 12px;
  box-shadow: none;
}

.apd-catalog-editor-v2 .apd-font-preview-card__sample {
  min-height: 190px;
  font-size: 34px;
}

.apd-catalog-editor-v2 .apd-font-source-picker {
  gap: 12px;
}

.apd-catalog-editor-v2 .apd-font-source-option {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 78px;
  padding: 13px;
  border-radius: 10px;
  box-shadow: none;
}

.apd-font-source-option__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--apd-accent-soft);
  color: var(--apd-accent);
  font-size: 15px;
  font-weight: 800;
}

.apd-font-source-option strong,
.apd-font-source-option small {
  display: block;
}

.apd-font-source-option small {
  margin-top: 3px;
  color: var(--apd-muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
}

.apd-font-source-option.is-active {
  border-color: var(--apd-accent);
  background: var(--apd-accent-soft);
  color: var(--apd-text);
}

.apd-font-source-option.is-active .apd-font-source-option__icon {
  background: var(--apd-accent);
  color: #fff;
}

.apd-source-workspace {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--apd-border);
  border-radius: 12px;
  background: var(--apd-surface);
}

.apd-source-workspace--details {
  background: var(--apd-surface-soft);
}

.apd-source-workspace__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.apd-source-workspace__head h4 {
  margin: 4px 0 5px;
  color: var(--apd-text);
  font-size: 17px;
}

.apd-source-workspace__head p,
.apd-option-builder p {
  margin: 0;
  color: var(--apd-muted);
  font-size: 12px;
  line-height: 1.55;
}

.apd-live-indicator {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: #fff3d6;
  color: #8a5700;
  font-size: 11px;
  font-weight: 800;
}

.apd-live-indicator.is-ready {
  background: var(--apd-success-soft);
  color: #087b6f;
}

.apd-font-combobox {
  position: relative;
}

.apd-font-results {
  position: absolute;
  z-index: 30;
  top: calc(100% - 2px);
  right: 0;
  left: 0;
  max-height: 330px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--apd-border-strong);
  border-radius: 10px;
  background: var(--apd-surface);
  box-shadow: 0 18px 36px rgba(31, 51, 84, .16);
}

.apd-font-result {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--apd-text);
  text-align: left;
  cursor: pointer;
}

.apd-font-result:hover,
.apd-font-result.is-active {
  background: var(--apd-accent-soft);
}

.apd-font-result strong,
.apd-font-result small {
  display: block;
}

.apd-font-result small,
.apd-font-result em {
  color: var(--apd-muted);
  font-size: 11px;
  font-style: normal;
}

.apd-font-results__empty,
.apd-font-catalog-status {
  padding: 11px 13px;
  border-radius: 9px;
  background: var(--apd-surface-soft);
  color: var(--apd-muted);
  font-size: 12px;
}

.apd-font-catalog-status.is-loading {
  color: var(--apd-accent);
}

.apd-font-catalog-status.is-error {
  background: #fff1f1;
  color: #b42318;
}

.apd-font-selection-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid var(--apd-border);
  border-radius: 10px;
  background: var(--apd-surface-soft);
}

.apd-font-selection-summary strong,
.apd-font-selection-summary span {
  display: block;
}

.apd-font-selection-summary > div > span {
  margin-top: 2px;
  color: var(--apd-muted);
  font-size: 11px;
  text-transform: capitalize;
}

.apd-option-builder {
  display: grid;
  grid-template-columns: minmax(150px, .34fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding-top: 16px;
  border-top: 1px solid var(--apd-border);
}

.apd-choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.apd-choice-pill {
  position: relative;
  cursor: pointer;
}

.apd-choice-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.apd-choice-pill span {
  display: inline-flex;
  min-width: 48px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border: 1px solid var(--apd-border);
  border-radius: 8px;
  background: var(--apd-surface);
  color: var(--apd-text);
  font-size: 12px;
  font-weight: 700;
}

.apd-choice-pill input:checked + span {
  border-color: var(--apd-accent);
  background: var(--apd-accent-soft);
  color: var(--apd-accent);
}

.apd-choice-pill input:focus-visible + span {
  outline: 2px solid var(--apd-accent);
  outline-offset: 2px;
}

.apd-system-font-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.apd-system-font-option {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--apd-border);
  border-radius: 10px;
  background: var(--apd-surface);
  color: var(--apd-text);
  text-align: left;
  cursor: pointer;
}

.apd-system-font-option:hover,
.apd-system-font-option.is-active {
  border-color: var(--apd-accent);
  background: var(--apd-accent-soft);
}

.apd-system-font-option__sample {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 8px;
  background: var(--apd-surface-soft);
  font-size: 24px;
}

.apd-system-font-option strong,
.apd-system-font-option small,
.apd-system-font-option em {
  display: block;
}

.apd-system-font-option small,
.apd-system-font-option em {
  margin-top: 2px;
  color: var(--apd-muted);
  font-size: 10px;
  font-style: normal;
}

.apd-system-font-option em.is-available {
  color: #087b6f;
}

.apd-segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--apd-border);
  border-radius: 10px;
  background: var(--apd-surface-soft);
}

.apd-segmented-control button {
  min-height: 38px;
  padding: 7px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--apd-muted);
  font-weight: 700;
  cursor: pointer;
}

.apd-segmented-control button.is-active {
  background: var(--apd-surface);
  color: var(--apd-text);
  box-shadow: 0 3px 10px rgba(31, 51, 84, .08);
}

.apd-custom-font-panel {
  display: grid;
  gap: 16px;
}

.apd-form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.apd-advanced-details {
  border-top: 1px solid var(--apd-border);
}

.apd-advanced-details summary {
  padding: 14px 0 0;
  color: var(--apd-text);
  font-weight: 700;
  cursor: pointer;
}

.apd-advanced-details__body {
  padding-top: 14px;
}

.apd-editor-actions {
  padding-top: 4px;
}

@media (max-width: 1180px) {
  .apd-catalog-editor-v2 .apd-font-editor__layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .apd-catalog-editor-v2 .apd-font-source-picker,
  .apd-form-grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .apd-catalog-editor-v2 .apd-font-editor__layout,
  .apd-system-font-grid,
  .apd-option-builder {
    grid-template-columns: 1fr;
  }

  .apd-catalog-editor-v2 .apd-font-source-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 782px) {
  .apd-catalog-editor-v2 {
    padding: 16px;
  }

  .apd-catalog-editor-v2 .apd-font-source-picker,
  .apd-source-workspace__head {
    grid-template-columns: 1fr;
  }

  .apd-source-workspace__head {
    display: grid;
  }

  .apd-live-indicator {
    justify-self: start;
  }
}

/* Template workspace */
.post-type-apd_template #poststuff {
  max-width: none;
}

.post-type-apd_template #poststuff #post-body.columns-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  width: 100%;
  margin-right: 0 !important;
}

.post-type-apd_template #post-body-content {
  grid-column: 1;
  grid-row: 1;
  float: none;
  width: auto;
  margin: 0;
}

.post-type-apd_template #postbox-container-1 {
  position: sticky;
  top: 46px;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  float: none !important;
  width: 280px !important;
  margin: 0 !important;
}

.post-type-apd_template #postbox-container-2 {
  grid-column: 1;
  grid-row: 2;
  float: none !important;
  width: auto !important;
  margin: 0;
}

.post-type-apd_template .postbox,
.post-type-apd_template #titlediv,
.post-type-apd_template #submitdiv {
  border-radius: 8px;
}

.post-type-apd_template #apd_template_modules .postbox-header {
  display: none;
}

.post-type-apd_template #apd_template_modules .inside {
  padding: 0 !important;
  background: #fff;
}

.apd-template-workspace {
  color: #172033;
  font-family: "APD Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.apd-template-workspace *,
.apd-template-workspace *::before,
.apd-template-workspace *::after {
  box-sizing: border-box;
  letter-spacing: 0;
}

.apd-template-workspace__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding: 28px 30px 24px;
  border-bottom: 1px solid #e3e9f2;
  background: #fff;
}

.apd-template-workspace__eyebrow {
  display: block;
  margin-bottom: 7px;
  color: #3664df;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
}

.apd-template-workspace__header h2,
.apd-template-panel__intro h3,
.apd-template-portal-copy h3 {
  margin: 0;
  color: #111a2c;
  font-weight: 750;
}

.apd-template-workspace__header h2 {
  font-size: 22px;
  line-height: 1.25;
}

.apd-template-workspace__header p,
.apd-template-panel__intro p,
.apd-template-portal-copy > p {
  max-width: 720px;
  margin: 8px 0 0;
  color: #647087;
  font-size: 13px;
  line-height: 1.6;
}

.apd-template-workspace__summary {
  display: grid;
  flex: 0 0 auto;
  min-width: 132px;
  padding-left: 24px;
  border-left: 1px solid #e3e9f2;
  text-align: right;
}

.apd-template-workspace__summary strong {
  color: #2959df;
  font-size: 28px;
  line-height: 1;
}

.apd-template-workspace__summary span {
  margin-top: 6px;
  color: #6e7a91;
  font-size: 11px;
  white-space: nowrap;
}

.apd-template-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 18px;
  border-bottom: 1px solid #e3e9f2;
  background: #f8fafd;
}

.apd-template-tab {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #657189;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.apd-template-tab:hover {
  color: #1d49c6;
  background: #edf2ff;
}

.apd-template-tab.is-active {
  color: #1d49c6;
  background: #fff;
  box-shadow: 0 1px 4px rgba(30, 50, 82, .12);
}

.apd-template-tab:focus-visible {
  outline: 2px solid #4774ec;
  outline-offset: 1px;
}

.apd-template-tab .dashicons {
  width: 18px;
  height: 18px;
  font-size: 18px;
}

.apd-template-panel {
  padding: 26px 30px 30px;
  background: #fff;
}

.apd-template-panel[hidden] {
  display: none;
}

.apd-template-module-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 220px) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 28px;
}

.apd-template-search {
  position: relative;
  display: block;
}

.apd-template-search .dashicons {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 13px;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  color: #8290a8;
  font-size: 18px;
  pointer-events: none;
}

.apd-template-search input[type="search"],
.apd-template-filter select,
.apd-template-workspace .apd-field input[type="text"],
.apd-template-workspace .apd-field select {
  width: 100%;
  min-height: 42px;
  margin: 0;
  border: 1px solid #d5deeb;
  border-radius: 6px;
  background: #fff;
  color: #1c2638;
  box-shadow: none;
  font: inherit;
  font-size: 13px;
}

.apd-template-search input[type="search"] {
  padding-left: 40px;
}

.apd-template-search input[type="search"]:focus,
.apd-template-filter select:focus,
.apd-template-workspace .apd-field input[type="text"]:focus,
.apd-template-workspace .apd-field select:focus {
  border-color: #6d91ef;
  box-shadow: 0 0 0 3px rgba(54, 100, 223, .10);
  outline: none;
}

.apd-template-active-filter {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid #d5deeb;
  border-radius: 6px;
  background: #fff;
  color: #4f5c73;
  font-weight: 700;
  white-space: nowrap;
}

.apd-template-active-filter input {
  margin: 0;
}

.apd-template-module-groups {
  display: grid;
  gap: 34px;
}

.apd-template-module-group__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.apd-template-module-group__header h3 {
  margin: 0;
  color: #182238;
  font-size: 15px;
  line-height: 1.3;
}

.apd-template-module-group__header p {
  margin: 4px 0 0;
  color: #738097;
  font-size: 12px;
  line-height: 1.45;
}

.apd-template-group-count {
  border: 0;
  border-radius: 4px;
  background: #edf2ff;
  color: #365bc4;
}

.apd-template-workspace .apd-template-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 12px;
}

.apd-template-workspace .apd-template-module-card {
  padding: 0;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  overflow: hidden;
  transition: border-color .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.apd-template-workspace .apd-template-module-card:hover {
  border-color: #bccae0;
}

.apd-template-workspace .apd-template-module-card.is-enabled {
  border-color: #aabff1;
  box-shadow: 0 7px 20px rgba(36, 63, 112, .07);
}

.apd-template-workspace .apd-template-module-card.is-disabled {
  opacity: .76;
}

.apd-template-workspace .apd-template-module-card.is-locked {
  border-color: #d8e0ec;
  background: #f8fafc;
  opacity: 1;
}

.apd-template-workspace .apd-template-module-card.is-locked .apd-template-module-card__head {
  background: #f8fafc;
}

.apd-template-workspace .apd-template-module-card.is-locked .apd-template-module-switch {
  cursor: not-allowed;
}

.apd-template-workspace .apd-template-module-card.is-locked .apd-template-module-switch > span:not(.screen-reader-text) {
  background: #dce3ed;
}

.apd-template-workspace .apd-template-module-card.has-invalid-portal {
  border-color: #d66b6b;
}

.apd-template-workspace .apd-template-module-card__head {
  display: grid;
  grid-template-columns: 38px 40px minmax(0, 1fr) auto 18px;
  gap: 11px;
  align-items: center;
  min-height: 76px;
  margin: 0;
  padding: 12px 14px;
  list-style: none;
  background: #fff;
  cursor: pointer;
}

.apd-template-workspace .apd-template-module-card__head::-webkit-details-marker {
  display: none;
}

.apd-template-workspace .apd-template-module-card__head::after {
  content: "\f347";
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  margin: 0;
  color: #8b98ae;
  font-family: dashicons;
  font-size: 16px;
}

.apd-template-workspace .apd-template-module-card[open] > .apd-template-module-card__head::after {
  content: "\f343";
}

.apd-template-module-switch {
  position: relative;
  display: inline-flex;
  width: 36px;
  height: 22px;
  align-items: center;
  cursor: pointer;
}

.apd-template-module-switch input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.apd-template-module-switch > span:not(.screen-reader-text) {
  position: relative;
  display: block;
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: #c9d2df;
  transition: background .16s ease;
}

.apd-template-module-switch > span:not(.screen-reader-text)::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(17, 26, 44, .24);
  transition: transform .16s ease;
}

.apd-template-module-switch input:checked + span {
  background: #3564df;
}

.apd-template-module-switch input:checked + span::after {
  transform: translateX(16px);
}

.apd-template-module-switch input:focus-visible + span {
  outline: 2px solid #3564df;
  outline-offset: 2px;
}

.apd-template-module-symbol {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 7px;
  background: #f1f4f9;
  color: #526078;
  font-size: 13px;
  font-weight: 800;
}

.apd-template-module-card.is-enabled .apd-template-module-symbol {
  background: #eaf0ff;
  color: #2d58cf;
}

.apd-template-module-card__identity {
  min-width: 0;
}

.apd-template-module-card__identity strong,
.apd-template-module-card__identity small {
  display: block;
}

.apd-template-module-card__identity strong {
  color: #172033;
  font-size: 13px;
  line-height: 1.35;
}

.apd-template-module-card__identity small {
  margin-top: 3px;
  color: #748198;
  font-size: 11px;
  line-height: 1.35;
}

.apd-template-module-card__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.apd-template-module-card__badges span {
  padding: 3px 7px;
  border-radius: 4px;
  background: #f1f4f8;
  color: #67748a;
  font-size: 10px;
  font-weight: 700;
}

.apd-template-module-card__badges .is-premium {
  background: #edf2ff;
  color: #3158bd;
}

.apd-template-module-card__badges .is-locked {
  background: #f4f0ff;
  color: #6750a4;
}

.apd-template-lock-note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #dce4ef;
  border-radius: 7px;
  background: #f3f6fa;
  color: #58667d;
}

.apd-template-lock-note .dashicons {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: #66758d;
  font-size: 17px;
}

.apd-template-lock-note p {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
}

.apd-template-workspace .apd-template-module-card__body {
  display: grid;
  gap: 0;
  padding: 2px 16px 16px;
  border-top: 1px solid #e4eaf2;
  background: #fbfcfe;
}

.apd-template-setting-section {
  padding: 16px 0;
}

.apd-template-setting-section + .apd-template-setting-section,
.apd-template-advanced {
  border-top: 1px solid #e4eaf2;
}

.apd-template-setting-section__title {
  display: grid;
  gap: 2px;
  margin-bottom: 12px;
}

.apd-template-setting-section__title strong {
  color: #263148;
  font-size: 12px;
}

.apd-template-setting-section__title span {
  color: #7b879d;
  font-size: 11px;
}

.apd-template-workspace .apd-field {
  display: grid;
  gap: 6px;
  margin: 0;
}

.apd-template-workspace .apd-field > span {
  margin: 0;
  color: #3c4860;
  font-size: 11px;
  font-weight: 750;
}

.apd-template-workspace .apd-field small {
  color: #7a879c;
  font-size: 10px;
  line-height: 1.45;
}

.apd-field-grid {
  display: grid;
  gap: 12px;
}

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

.apd-template-portal-shared-note,
.apd-template-portal-custom-field {
  display: none;
}

.apd-template-module-card[data-apd-template-portal-mode-current="shared"] .apd-template-portal-shared-note {
  display: block;
}

.apd-template-module-card[data-apd-template-portal-mode-current="custom"] .apd-template-portal-custom-field {
  display: grid;
}

.apd-template-module-card.is-inline .apd-template-portal-setting {
  display: none;
}

.apd-template-portal-shared-note,
.apd-template-context-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 3px solid #6c8fec;
  background: #f1f5ff;
  color: #53627a;
  font-size: 11px;
  line-height: 1.5;
}

.apd-template-context-note {
  display: flex;
  gap: 9px;
  margin: 16px 0 4px;
}

.apd-template-context-note p {
  margin: 0;
}

.apd-template-module-flags,
.apd-template-check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.apd-template-workspace .apd-template-module-flags {
  padding: 16px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.apd-template-workspace .apd-check--compact {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #4c5870;
  font-size: 11px;
}

.apd-template-workspace .apd-check--compact input {
  margin: 0;
}

.apd-template-advanced > summary {
  padding: 14px 0 4px;
  color: #335fce;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.apd-template-advanced__body {
  display: grid;
  gap: 12px;
  padding-top: 12px;
}

.apd-template-module-id {
  justify-self: start;
  padding: 3px 6px;
  border-radius: 4px;
  background: #eef2f7;
  color: #67748b;
  font-size: 10px;
}

.apd-template-empty-filter {
  margin: 0;
  padding: 40px 20px;
  color: #718097;
  text-align: center;
}

.apd-template-panel__intro {
  margin-bottom: 22px;
}

.apd-template-panel__intro h3,
.apd-template-portal-copy h3 {
  font-size: 18px;
}

.apd-template-zone-map {
  display: grid;
  grid-template:
    ". top ." 44px
    "left canvas right" 118px
    ". bottom ." 44px /
    minmax(92px, .45fr) minmax(180px, 1fr) minmax(92px, .45fr);
  gap: 8px;
  max-width: 700px;
  margin: 0 auto 28px;
}

.apd-template-zone-map span {
  display: grid;
  place-items: center;
  border: 1px solid #d7e0ed;
  border-radius: 6px;
  background: #f5f7fb;
  color: #65738a;
  font-size: 11px;
  font-weight: 750;
}

.apd-template-zone-map .is-top { grid-area: top; }
.apd-template-zone-map .is-left { grid-area: left; }
.apd-template-zone-map .is-canvas {
  grid-area: canvas;
  border-style: dashed;
  border-color: #9bb2ec;
  background: #edf2ff;
  color: #3159c1;
}
.apd-template-zone-map .is-right { grid-area: right; }
.apd-template-zone-map .is-bottom { grid-area: bottom; }

.apd-template-workspace .apd-template-zone-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.apd-template-workspace .apd-template-zone-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #fff;
}

.apd-template-zone-card > header {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.apd-template-zone-card > header .dashicons {
  color: #3f69da;
}

.apd-template-zone-card h4,
.apd-template-zone-card p {
  margin: 0;
}

.apd-template-workspace .apd-template-zone-card h4 {
  color: #1e2940;
  font-size: 13px;
}

.apd-template-zone-card p {
  margin-top: 2px;
  color: #77849a;
  font-size: 10px;
  line-height: 1.4;
}

.apd-template-portal-layout {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(320px, 1.2fr);
  gap: 36px;
  align-items: start;
}

.apd-template-portal-steps {
  display: grid;
  gap: 13px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.apd-template-portal-steps li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: #536078;
  font-size: 12px;
  line-height: 1.45;
}

.apd-template-portal-steps li span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #eaf0ff;
  color: #315bd0;
  font-size: 11px;
  font-weight: 800;
}

.apd-template-portal-config {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #f9fbfe;
}

.apd-template-portal-status {
  min-height: 36px;
  padding: 9px 11px;
  border-radius: 5px;
  background: #eef2f7;
  color: #59667d;
  font-size: 11px;
  line-height: 1.45;
}

.apd-template-portal-status.is-valid {
  background: #eaf8f3;
  color: #16715f;
}

.apd-template-portal-status.is-warning {
  background: #fff6df;
  color: #8b6210;
}

.apd-template-portal-status.is-error {
  background: #fff0f0;
  color: #a83d3d;
}

.apd-template-portal-code {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  align-items: center;
}

.apd-template-portal-code > span {
  grid-column: 1 / -1;
  color: #647188;
  font-size: 10px;
  font-weight: 750;
}

.apd-template-portal-code code {
  display: block;
  min-width: 0;
  padding: 10px 11px;
  border-radius: 5px;
  background: #1d2738;
  color: #e8edf6;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.apd-template-portal-code .button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 5px;
  border-radius: 6px;
}

@media (max-width: 1180px) {
  .post-type-apd_template #poststuff #post-body.columns-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-type-apd_template #postbox-container-1 {
    position: static;
    grid-column: 1;
    grid-row: 3;
    width: 100% !important;
  }

  .post-type-apd_template #postbox-container-2 {
    grid-column: 1;
  }

  .apd-template-portal-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 782px) {
  .apd-template-workspace__header {
    display: grid;
    padding: 22px 18px;
  }

  .apd-template-workspace__summary {
    min-width: 0;
    padding: 14px 0 0;
    border-top: 1px solid #e3e9f2;
    border-left: 0;
    text-align: left;
  }

  .apd-template-tabs {
    overflow-x: auto;
  }

  .apd-template-tab {
    flex: 0 0 auto;
  }

  .apd-template-panel {
    padding: 20px 16px 24px;
  }

  .apd-template-module-toolbar,
  .apd-template-workspace .apd-template-zone-grid,
  .apd-field-grid--two {
    grid-template-columns: 1fr;
  }

  .apd-template-workspace .apd-template-module-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .apd-template-workspace .apd-template-module-card__head {
    grid-template-columns: 38px 36px minmax(0, 1fr) 18px;
  }

  .apd-template-module-card__badges {
    display: none;
  }

  .apd-template-zone-map {
    grid-template:
      ". top ." 40px
      "left canvas right" 94px
      ". bottom ." 40px /
      70px minmax(120px, 1fr) 70px;
  }
}

/* V13 unified admin workspace
   Keep this final layer intentionally scoped to Asuka screens. It consolidates
   the older admin generations without changing native WordPress screens. */
body.apd-admin-screen {
  --apd-radius: 8px;
  --apd-shadow: 0 8px 26px rgba(31, 51, 84, .055);
  --apd-shadow-soft: 0 5px 18px rgba(31, 51, 84, .045);
  background: var(--apd-bg);
  color: var(--apd-text);
  font-family: "APD Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.apd-admin-screen--plugin #wpbody-content {
  min-height: calc(100vh - 32px);
  padding-bottom: 52px;
}

body.apd-admin-screen--plugin #wpfooter {
  color: var(--apd-muted);
}

.apd-admin-shell,
.apd-dashboard,
.apd-hub-page {
  width: auto;
  max-width: none;
  margin: 0 18px 0 0;
  padding: 0 0 44px;
  color: var(--apd-text);
  font-family: "APD Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.apd-admin-shell *,
.apd-dashboard *,
.apd-hub-page * {
  letter-spacing: 0;
}

.apd-page-heading,
.apd-dashboard-header,
.apd-workspace-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px;
  width: 100%;
  max-width: none;
  margin: 0 0 18px;
  padding: 30px 4px 28px;
  border: 0;
  border-bottom: 1px solid var(--apd-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.apd-page-heading > div:first-child,
.apd-dashboard-header__copy,
.apd-workspace-header > div:first-child {
  max-width: 820px;
}

.apd-page-heading .apd-badge,
.apd-dashboard-eyebrow {
  display: block;
  width: max-content;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--apd-accent);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
  text-transform: uppercase;
}

.apd-page-heading h1,
.apd-dashboard-header h1,
.apd-workspace-header h1 {
  margin: 0 0 9px;
  color: var(--apd-text);
  font-size: 30px;
  font-weight: 760;
  line-height: 1.2;
  letter-spacing: 0;
}

.apd-page-heading p,
.apd-dashboard-header__copy > p,
.apd-workspace-header > div > p {
  max-width: 78ch;
  margin: 0;
  color: var(--apd-muted);
  font-size: 13px;
  line-height: 1.65;
}

.apd-page-heading-wide,
.apd-page-heading-tight {
  max-width: none;
}

.apd-admin-shell .apd-card,
.apd-admin-shell .apd-crud-editor,
.apd-admin-shell .apd-tab-nav,
.apd-admin-shell .apd-tab-panel,
.apd-dashboard-card,
.apd-dashboard-metric,
.apd-setup-summary,
.apd-workspace-card {
  border: 1px solid var(--apd-border);
  border-radius: 8px;
  background: var(--apd-surface);
  box-shadow: var(--apd-shadow-soft);
}

.apd-admin-shell .apd-card {
  padding: 22px;
}

.apd-card-head {
  gap: 18px;
  margin: 0 0 18px;
}

.apd-page-heading .apd-inline-actions-wrap > .button,
.apd-card-head .apd-inline-actions-wrap > .button {
  width: auto;
}

.apd-card-head-stack {
  padding-bottom: 17px;
  border-bottom: 1px solid var(--apd-border);
}

.apd-card-head h2,
.apd-card-head h3,
.apd-admin-shell .apd-card > h2 {
  margin: 0 0 6px;
  color: var(--apd-text);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: 0;
}

.apd-card-head p,
.apd-admin-shell .apd-card > p {
  margin: 0;
  color: var(--apd-muted);
  font-size: 12px;
  line-height: 1.6;
}

.apd-grid {
  gap: 16px;
  margin-bottom: 16px;
}

.apd-admin-shell .button,
.apd-dashboard .button,
.apd-hub-page .button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  border: 1px solid var(--apd-border-strong);
  border-radius: 6px;
  background: var(--apd-surface);
  color: var(--apd-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
  text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.apd-admin-shell .button:hover,
.apd-dashboard .button:hover,
.apd-hub-page .button:hover {
  border-color: var(--apd-accent);
  background: var(--apd-surface-soft);
  color: var(--apd-accent);
}

.apd-admin-shell .button.button-primary,
.apd-admin-shell .button.button-hero,
.apd-dashboard .button.button-primary,
.apd-hub-page .button.button-primary,
#poststuff .apd-admin-shell .button.button-primary,
.post-type-apd_product_config .apd-admin-shell .button.button-primary {
  border-color: var(--apd-accent);
  background: var(--apd-accent);
  color: #fff;
}

.apd-admin-shell .button.button-primary:hover,
.apd-admin-shell .button.button-hero:hover,
.apd-dashboard .button.button-primary:hover,
.apd-hub-page .button.button-primary:hover {
  border-color: #2f59d1;
  background: #2f59d1;
  color: #fff;
  box-shadow: 0 5px 14px rgba(53, 100, 223, .18);
}

.apd-admin-shell .button.button-secondary {
  border-color: var(--apd-border-strong);
  background: var(--apd-surface);
  color: var(--apd-text);
}

.apd-admin-shell .button.button-link {
  min-height: 32px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--apd-accent);
}

.apd-admin-shell input[type="text"],
.apd-admin-shell input[type="password"],
.apd-admin-shell input[type="number"],
.apd-admin-shell input[type="search"],
.apd-admin-shell input[type="url"],
.apd-admin-shell input[type="email"],
.apd-admin-shell input[type="date"],
.apd-admin-shell input[type="time"],
.apd-admin-shell input[type="file"],
.apd-admin-shell select,
.apd-admin-shell textarea {
  width: 100%;
  max-width: none;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--apd-border-strong);
  border-radius: 6px;
  background: var(--apd-surface);
  color: var(--apd-text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 1px 2px rgba(31, 51, 84, .025);
}

.apd-admin-shell textarea {
  min-height: 112px;
  resize: vertical;
}

.apd-admin-shell input::placeholder,
.apd-admin-shell textarea::placeholder {
  color: color-mix(in srgb, var(--apd-muted) 72%, transparent);
}

.apd-admin-shell input:focus,
.apd-admin-shell select:focus,
.apd-admin-shell textarea:focus {
  outline: none;
  border-color: var(--apd-accent);
  box-shadow: 0 0 0 3px var(--apd-accent-soft);
}

.apd-field {
  gap: 6px;
  color: var(--apd-text);
}

.apd-field > span,
.apd-admin-shell label > strong {
  color: var(--apd-text);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.4;
}

.apd-field small,
.apd-admin-shell .description {
  color: var(--apd-muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
}

.apd-toggle {
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid var(--apd-border);
  border-radius: 6px;
  background: var(--apd-surface-soft);
}

.apd-toggle input {
  flex: 0 0 auto;
  margin: 0;
}

.apd-stat-card,
.apd-mini-stat {
  padding: 16px;
  border: 1px solid var(--apd-border);
  border-radius: 7px;
  background: var(--apd-surface-soft);
  box-shadow: none;
}

.apd-stat-card strong,
.apd-mini-stat strong {
  margin-bottom: 4px;
  color: var(--apd-text);
  font-size: 20px;
  line-height: 1.25;
}

.apd-stat-card span,
.apd-mini-stat span {
  color: var(--apd-muted);
  font-size: 10px;
  line-height: 1.4;
}

.apd-admin-shell .notice {
  margin: 14px 0;
  padding: 11px 14px;
  border-top: 1px solid var(--apd-border);
  border-right: 1px solid var(--apd-border);
  border-bottom: 1px solid var(--apd-border);
  border-radius: 6px;
  background: var(--apd-surface);
  box-shadow: none;
}

.apd-admin-shell .notice p {
  font-size: 12px;
  line-height: 1.55;
}

.apd-tab-nav {
  gap: 4px;
  padding: 5px;
  background: var(--apd-surface-soft);
  box-shadow: none;
}

.apd-tab-button {
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 5px;
  color: var(--apd-muted);
  font-size: 11px;
}

.apd-tab-button.is-active {
  background: var(--apd-surface);
  color: var(--apd-text);
  box-shadow: 0 1px 4px rgba(31, 51, 84, .08);
}

.apd-chip,
.apd-badge:not(.apd-page-heading .apd-badge) {
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 5px;
  background: var(--apd-surface-soft);
  font-size: 10px;
}

.apd-table-wrap {
  overflow: auto;
  border: 1px solid var(--apd-border);
  border-radius: 8px;
  background: var(--apd-surface);
}

.apd-admin-shell .widefat,
.apd-admin-shell .wp-list-table,
.apd-admin-shell .apd-table {
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--apd-surface);
  box-shadow: none;
}

.apd-admin-shell .widefat thead th,
.apd-admin-shell .wp-list-table thead th,
.apd-admin-shell .apd-table thead th {
  padding: 11px 13px;
  border-bottom: 1px solid var(--apd-border);
  background: var(--apd-surface-soft);
  color: var(--apd-muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
  text-transform: uppercase;
}

.apd-admin-shell .widefat td,
.apd-admin-shell .widefat th,
.apd-admin-shell .wp-list-table td,
.apd-admin-shell .wp-list-table th,
.apd-admin-shell .apd-table td,
.apd-admin-shell .apd-table th {
  padding: 12px 13px;
  border-bottom-color: var(--apd-border);
}

.apd-dashboard-metrics {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.apd-dashboard-grid {
  gap: 16px;
}

.apd-dashboard-card,
.apd-dashboard-metric,
.apd-setup-summary {
  box-shadow: var(--apd-shadow-soft);
}

.apd-dashboard-metric {
  min-height: 142px;
}

.apd-workspace-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.apd-workspace-card {
  min-height: 205px;
  padding: 20px;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.apd-workspace-card:hover {
  border-color: var(--apd-border-strong);
  box-shadow: 0 9px 24px rgba(31, 51, 84, .075);
  transform: translateY(-1px);
}

.apd-workspace-card__icon {
  margin-bottom: 18px;
}

.apd-workspace-card__head > span,
.apd-dashboard-count {
  border-radius: 5px;
}

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

.apd-settings-card--half {
  grid-column: span 6;
}

.apd-settings-card--license {
  grid-column: 1 / -1;
}

.apd-settings-card--providers {
  grid-column: span 8;
}

.apd-settings-card--retention {
  grid-column: span 4;
}

.apd-settings-card > h2 {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--apd-border);
}

.apd-settings-card--license .apd-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 18px 0;
}

.apd-settings-actions {
  position: sticky;
  z-index: 15;
  bottom: 12px;
  grid-column: 1 / -1;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 13px 16px;
  border: 1px solid var(--apd-border-strong);
  border-radius: 8px;
  background: color-mix(in srgb, var(--apd-surface) 94%, transparent);
  box-shadow: 0 12px 34px rgba(31, 51, 84, .12);
  backdrop-filter: blur(14px);
}

.apd-settings-actions strong,
.apd-settings-actions span {
  display: block;
}

.apd-settings-actions strong {
  margin-bottom: 2px;
  color: var(--apd-text);
  font-size: 12px;
}

.apd-settings-actions span {
  color: var(--apd-muted);
  font-size: 10px;
  line-height: 1.45;
}

.apd-settings-actions .submit {
  margin: 0;
  padding: 0;
}

.apd-settings-local-mail {
  margin-top: 16px;
}

.apd-settings-local-mail .apd-card-head {
  align-items: flex-start;
}

.apd-mailpit-stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0;
}

.apd-mailpit-test-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: end;
  gap: 16px;
  max-width: 760px;
}

.apd-mailpit-test-form .button {
  min-height: 40px;
  margin-bottom: 1px;
}

.apd-inline-note {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--apd-border);
  border-radius: 7px;
  background: var(--apd-surface-soft);
}

.apd-inline-note code {
  width: fit-content;
  max-width: 100%;
}

.apd-inline-note p {
  margin: 0;
  color: var(--apd-muted);
}

.apd-catalog-page .apd-crud-card {
  width: 100%;
  max-width: none;
}

.apd-catalog-toolbar {
  border-radius: 7px;
  background: var(--apd-surface-soft);
}

.apd-crud-editor,
.apd-catalog-editor-v2 {
  border-radius: 8px;
  box-shadow: none;
}

.apd-crud-editor__head {
  border-color: var(--apd-border);
}

.apd-import-panel,
.apd-section-card,
.apd-qa-panel,
.apd-qa-checklist-group {
  border-radius: 7px;
  box-shadow: none;
}

.apd-font-preview-card,
.apd-font-card,
.apd-font-source-option,
.apd-font-helper-row,
.apd-collection-row,
.apd-collection-editor,
.apd-media-import-selection,
.apd-media-import-card,
.apd-translation-table-wrap,
.apd-production-preview,
.apd-production-detail__grid,
.apd-production-section-grid > section,
.apd-order-card,
.apd-empty-state-soft,
.apd-sidebar-card,
.apd-builder-canvas-wrap {
  border-radius: 8px;
  box-shadow: none;
}

.apd-font-card__preview,
.apd-list-preview,
.apd-asset-preview,
.apd-media-import-card__preview,
.apd-production-preview img,
.apd-order-preview img {
  border-radius: 6px;
}

.apd-font-preview-card,
.apd-font-card,
.apd-font-source-option {
  border-color: var(--apd-border);
  background: var(--apd-surface);
}

.apd-collection-row,
.apd-collection-editor,
.apd-media-import-selection,
.apd-media-import-card,
.apd-translation-table-wrap,
.apd-production-detail__grid,
.apd-production-section-grid > section,
.apd-order-card,
.apd-sidebar-card,
.apd-builder-canvas-wrap,
.apd-qa-card,
.apd-qa-panel {
  border-color: var(--apd-border);
  background: var(--apd-surface);
  color: var(--apd-text);
}

.apd-empty-state-soft,
.apd-font-card__preview,
.apd-asset-preview {
  background: var(--apd-surface-soft);
}

.apd-font-source-option {
  padding: 12px 14px;
  box-shadow: none;
}

.apd-font-source-option.is-active {
  border-color: var(--apd-accent);
  background: var(--apd-accent);
  color: #fff;
}

.apd-font-card__preview {
  background: var(--apd-surface-soft);
}

.apd-admin-theme-midnight .apd-qa-card--passed {
  border-color: rgba(24, 168, 120, .34);
  background: rgba(24, 168, 120, .1);
}

.apd-admin-theme-midnight .apd-qa-card--failed {
  border-color: rgba(214, 54, 56, .4);
  background: rgba(214, 54, 56, .1);
}

.apd-admin-theme-midnight .apd-qa-card--blocked {
  border-color: rgba(219, 166, 23, .4);
  background: rgba(219, 166, 23, .1);
}

.apd-production-page,
.apd-qa-page,
.apd-translations-page,
.apd-tools-page,
.apd-structure-page,
.apd-studio-page {
  max-width: none;
}

/* Native list screens owned by the plugin use the same visual language while
   preserving WordPress table semantics and responsive behavior. */
body.apd-admin-screen.edit-php.post-type-apd_product_config,
body.apd-admin-screen.edit-php.post-type-apd_template,
body.apd-admin-screen.edit-php.post-type-apd_user_design {
  background: var(--apd-bg);
  font-family: "APD Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config #wpbody-content > .wrap,
body.apd-admin-screen.edit-php.post-type-apd_template #wpbody-content > .wrap,
body.apd-admin-screen.edit-php.post-type-apd_user_design #wpbody-content > .wrap {
  width: auto;
  max-width: none;
  margin: 22px 20px 0 2px;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .wp-heading-inline,
body.apd-admin-screen.edit-php.post-type-apd_template .wp-heading-inline,
body.apd-admin-screen.edit-php.post-type-apd_user_design .wp-heading-inline {
  margin: 0 8px 12px 0;
  color: var(--apd-text);
  font-size: 28px;
  font-weight: 760;
  line-height: 1.25;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .page-title-action,
body.apd-admin-screen.edit-php.post-type-apd_template .page-title-action,
body.apd-admin-screen.edit-php.post-type-apd_user_design .page-title-action {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  margin: 0 0 12px;
  padding: 0 13px;
  border: 1px solid var(--apd-accent);
  border-radius: 6px;
  background: var(--apd-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .page-title-action:hover,
body.apd-admin-screen.edit-php.post-type-apd_template .page-title-action:hover,
body.apd-admin-screen.edit-php.post-type-apd_user_design .page-title-action:hover {
  border-color: #2f59d1;
  background: #2f59d1;
  color: #fff;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .subsubsub,
body.apd-admin-screen.edit-php.post-type-apd_template .subsubsub,
body.apd-admin-screen.edit-php.post-type-apd_user_design .subsubsub {
  display: block;
  float: none;
  clear: both;
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .tablenav.top,
body.apd-admin-screen.edit-php.post-type-apd_template .tablenav.top,
body.apd-admin-screen.edit-php.post-type-apd_user_design .tablenav.top {
  min-height: 48px;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid var(--apd-border);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: var(--apd-surface-soft);
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .wp-list-table,
body.apd-admin-screen.edit-php.post-type-apd_template .wp-list-table,
body.apd-admin-screen.edit-php.post-type-apd_user_design .wp-list-table {
  overflow: hidden;
  border: 1px solid var(--apd-border);
  border-radius: 0 0 8px 8px;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--apd-surface);
  box-shadow: var(--apd-shadow-soft);
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .wp-list-table thead th,
body.apd-admin-screen.edit-php.post-type-apd_template .wp-list-table thead th,
body.apd-admin-screen.edit-php.post-type-apd_user_design .wp-list-table thead th {
  padding: 11px 10px;
  border-bottom: 1px solid var(--apd-border);
  background: var(--apd-surface-soft);
  color: var(--apd-muted);
  font-size: 11px;
  font-weight: 750;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .wp-list-table td,
body.apd-admin-screen.edit-php.post-type-apd_product_config .wp-list-table th,
body.apd-admin-screen.edit-php.post-type-apd_template .wp-list-table td,
body.apd-admin-screen.edit-php.post-type-apd_template .wp-list-table th,
body.apd-admin-screen.edit-php.post-type-apd_user_design .wp-list-table td,
body.apd-admin-screen.edit-php.post-type-apd_user_design .wp-list-table th {
  padding-top: 12px;
  padding-bottom: 12px;
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .striped > tbody > :nth-child(odd),
body.apd-admin-screen.edit-php.post-type-apd_template .striped > tbody > :nth-child(odd),
body.apd-admin-screen.edit-php.post-type-apd_user_design .striped > tbody > :nth-child(odd) {
  background: color-mix(in srgb, var(--apd-surface-soft) 65%, var(--apd-surface));
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .wp-list-table tbody tr:hover,
body.apd-admin-screen.edit-php.post-type-apd_template .wp-list-table tbody tr:hover,
body.apd-admin-screen.edit-php.post-type-apd_user_design .wp-list-table tbody tr:hover {
  background: var(--apd-accent-soft);
}

body.apd-admin-screen.edit-php.post-type-apd_product_config .tablenav .button,
body.apd-admin-screen.edit-php.post-type-apd_template .tablenav .button,
body.apd-admin-screen.edit-php.post-type-apd_user_design .tablenav .button,
body.apd-admin-screen.edit-php.post-type-apd_product_config .search-box .button,
body.apd-admin-screen.edit-php.post-type-apd_template .search-box .button,
body.apd-admin-screen.edit-php.post-type-apd_user_design .search-box .button,
body.apd-admin-screen.edit-php.post-type-apd_product_config .tablenav .actions select,
body.apd-admin-screen.edit-php.post-type-apd_template .tablenav .actions select,
body.apd-admin-screen.edit-php.post-type-apd_user_design .tablenav .actions select,
body.apd-admin-screen.edit-php.post-type-apd_product_config .search-box input[type="search"],
body.apd-admin-screen.edit-php.post-type-apd_template .search-box input[type="search"],
body.apd-admin-screen.edit-php.post-type-apd_user_design .search-box input[type="search"] {
  min-height: 34px;
  border-color: var(--apd-border-strong);
  border-radius: 6px;
  box-shadow: none;
}

body.apd-admin-screen.post-php.post-type-apd_product_config #poststuff .postbox,
body.apd-admin-screen.post-new-php.post-type-apd_product_config #poststuff .postbox,
body.apd-admin-screen.post-php.post-type-apd_template #poststuff .postbox,
body.apd-admin-screen.post-new-php.post-type-apd_template #poststuff .postbox {
  border: 1px solid var(--apd-border);
  border-radius: 8px;
  box-shadow: var(--apd-shadow-soft);
}

@media (max-width: 1180px) {
  .apd-settings-card--providers,
  .apd-settings-card--retention {
    grid-column: 1 / -1;
  }

  .apd-settings-card--license .apd-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .apd-page-heading,
  .apd-dashboard-header,
  .apd-workspace-header {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 18px;
  }

  .apd-page-heading .apd-inline-actions-wrap,
  .apd-workspace-header > .button,
  .apd-runtime-pill {
    justify-self: start;
  }

  .apd-settings-card--half {
    grid-column: 1 / -1;
  }
}

@media (max-width: 782px) {
  .apd-admin-shell,
  .apd-dashboard,
  .apd-hub-page {
    margin: 0 10px 0 0;
    padding-bottom: 32px;
  }

  .apd-page-heading,
  .apd-dashboard-header,
  .apd-workspace-header {
    padding: 22px 0 23px;
  }

  .apd-page-heading h1,
  .apd-dashboard-header h1,
  .apd-workspace-header h1 {
    font-size: 25px;
  }

  .apd-grid-2,
  .apd-grid-3,
  .apd-form-grid-2,
  .apd-form-grid-3,
  .apd-stat-grid,
  .apd-dashboard-grid,
  .apd-translation-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .apd-admin-shell .apd-card {
    padding: 17px;
  }

  .apd-card-head,
  .apd-card-head-stack {
    align-items: flex-start;
    flex-direction: column;
  }

  .apd-settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .apd-settings-card--half,
  .apd-settings-card--license,
  .apd-settings-card--providers,
  .apd-settings-card--retention,
  .apd-settings-actions {
    grid-column: 1;
  }

  .apd-settings-card--license .apd-stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .apd-settings-actions {
    position: static;
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .apd-settings-actions .button {
    width: 100%;
  }

  .apd-mailpit-test-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .apd-mailpit-test-form .button {
    width: 100%;
  }

  .apd-inline-actions,
  .apd-inline-actions-wrap {
    width: 100%;
  }

  .apd-inline-actions > .button,
  .apd-inline-actions-wrap > .button {
    flex: 1 1 auto;
  }

  body.apd-admin-screen.edit-php.post-type-apd_product_config #wpbody-content > .wrap,
  body.apd-admin-screen.edit-php.post-type-apd_template #wpbody-content > .wrap,
  body.apd-admin-screen.edit-php.post-type-apd_user_design #wpbody-content > .wrap {
    margin: 14px 10px 0 0;
  }
}

/* Documentation workspace */
.apd-docs-header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.apd-docs-start {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(360px, 1.1fr);
  align-items: center;
  gap: 54px;
  margin: 0 0 38px;
  padding: 44px 46px;
  border-radius: 8px;
  background: #12213a;
  color: #fff;
  box-shadow: 0 18px 40px rgba(18, 33, 58, .14);
}

.apd-docs-start h2 {
  max-width: 560px;
  margin: 8px 0 12px;
  color: #fff;
  font-size: 25px;
  line-height: 1.3;
}

.apd-docs-start p {
  max-width: 620px;
  margin: 0;
  color: #a9b8cd;
  font-size: 12px;
  line-height: 1.7;
}

.apd-docs-start .apd-dashboard-kicker {
  color: #71d2c5;
}

.apd-docs-start ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.apd-docs-start li {
  display: grid;
  min-height: 43px;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 7px 11px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .055);
  color: #e7edf7;
  font-size: 11px;
  font-weight: 650;
}

.apd-docs-start li > span {
  display: inline-flex;
  width: 25px;
  height: 25px;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: rgba(112, 152, 255, .16);
  color: #a8bbff;
  font-size: 9px;
  font-weight: 800;
}

.apd-docs-start > a {
  grid-column: 2;
  width: max-content;
  color: #72d7c9;
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
}

.apd-docs-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 18px;
}

.apd-docs-section-head h2 {
  margin: 4px 0 0;
  color: var(--apd-text);
  font-size: 22px;
}

.apd-docs-section-head > p {
  max-width: 420px;
  margin: 0;
  color: var(--apd-muted);
  font-size: 11px;
  line-height: 1.6;
  text-align: right;
}

.apd-docs-search {
  display: grid;
  min-height: 58px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 26px 0 38px;
  padding: 0 18px;
  border: 1px solid var(--apd-border);
  border-radius: 8px;
  background: var(--apd-surface);
  box-shadow: 0 12px 30px rgba(36, 55, 92, .06);
}

.apd-docs-search .dashicons {
  color: var(--apd-accent);
}

.apd-docs-search input[type="search"] {
  width: 100%;
  min-height: 56px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  color: var(--apd-text);
  font-size: 14px;
}

.apd-docs-search input[type="search"]:focus {
  border: 0;
  box-shadow: none;
}

.apd-docs-search > span:last-child {
  display: inline-flex;
  min-width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--apd-accent-soft);
  color: var(--apd-accent);
  font-size: 11px;
  font-weight: 800;
}

.apd-docs-group {
  margin-top: 42px;
}

.apd-docs-group[hidden] {
  display: none;
}

.apd-docs-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--apd-border);
}

.apd-docs-group > header h3 {
  margin: 0;
  color: var(--apd-text);
  font-size: 17px;
}

.apd-docs-group > header span {
  color: var(--apd-muted);
  font-size: 11px;
  font-weight: 700;
}

.apd-docs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.apd-docs-card {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  padding: 25px;
  border: 1px solid var(--apd-border);
  border-radius: 8px;
  background: var(--apd-surface);
  color: var(--apd-text);
  box-shadow: var(--apd-shadow-soft);
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.apd-docs-card:hover {
  border-color: rgba(53, 100, 223, .42);
  color: var(--apd-text);
  box-shadow: 0 12px 26px rgba(31, 51, 84, .09);
  transform: translateY(-2px);
}

.apd-docs-card__number {
  display: inline-flex;
  width: 33px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: var(--apd-accent-soft);
  color: var(--apd-accent);
  font-size: 9px;
  font-weight: 800;
}

.apd-docs-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 34px;
}

.apd-docs-card__meta .apd-status-badge {
  text-transform: capitalize;
}

.apd-docs-card > strong {
  margin-bottom: 8px;
  color: var(--apd-text);
  font-size: 15px;
}

.apd-docs-card > p {
  margin: 0 0 20px;
  color: var(--apd-muted);
  font-size: 11px;
  line-height: 1.65;
}

.apd-docs-card__action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
  color: var(--apd-accent);
  font-size: 10px;
  font-weight: 750;
}

.apd-docs-card__action a {
  color: inherit;
  text-decoration: none;
}

.apd-docs-card__action a:hover,
.apd-docs-card__action a:focus-visible {
  color: var(--apd-text);
}

.apd-status-badge.is-draft,
.apd-status-badge.is-private,
.apd-status-badge.is-pending {
  background: #fff5d9;
  color: #765513;
}

body.apd-admin-screen.apd-post-type-apd_documentation #wpbody-content > .wrap {
  width: auto;
  max-width: none;
  margin: 22px 24px 0 20px;
}

body.apd-admin-screen.apd-post-type-apd_documentation .wp-heading-inline {
  color: var(--apd-text);
  font-family: "APD Manrope", sans-serif;
  font-size: 28px;
  font-weight: 750;
}

body.apd-admin-screen.apd-post-type-apd_documentation .page-title-action {
  border-color: var(--apd-accent);
  border-radius: 6px;
  background: var(--apd-accent);
  color: #fff;
}

body.apd-admin-screen.apd-post-type-apd_documentation .wp-list-table {
  overflow: hidden;
  border-color: var(--apd-border);
  border-radius: 8px;
  background: var(--apd-surface);
  box-shadow: var(--apd-shadow-soft);
}

body.apd-admin-screen.apd-post-type-apd_documentation #titlewrap input,
body.apd-admin-screen.apd-post-type-apd_documentation .editor-post-title__input {
  color: var(--apd-text);
  font-family: "APD Manrope", sans-serif;
}

.apd-docs-card__action i {
  font-style: normal;
  transition: transform .15s ease;
}

.apd-docs-card:hover .apd-docs-card__action i {
  transform: translateX(3px);
}

.apd-docs-card[hidden] {
  display: none;
}

.apd-docs-empty {
  padding: 64px 28px;
  border: 1px dashed var(--apd-border);
  border-radius: 8px;
  text-align: center;
}

.apd-docs-empty .dashicons {
  width: 38px;
  height: 38px;
  color: var(--apd-accent);
  font-size: 38px;
}

.apd-docs-empty strong {
  display: block;
  margin-top: 14px;
  color: var(--apd-text);
  font-size: 16px;
}

.apd-docs-empty p {
  margin: 7px 0 0;
  color: var(--apd-muted);
}

.apd-docs-glossary {
  margin-top: 54px;
}

.apd-docs-glossary dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 24px 0 0;
  border-top: 1px solid var(--apd-border);
  border-bottom: 1px solid var(--apd-border);
}

.apd-docs-glossary dl > div {
  padding: 26px 24px;
}

.apd-docs-glossary dl > div + div {
  border-left: 1px solid var(--apd-border);
}

.apd-docs-glossary dt {
  margin-bottom: 8px;
  color: var(--apd-text);
  font-size: 13px;
  font-weight: 800;
}

.apd-docs-glossary dd {
  margin: 0;
  color: var(--apd-muted);
  font-size: 12px;
  line-height: 1.65;
}

.apd-docs-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-top: 38px;
  padding: 27px 30px;
  border-top: 1px solid var(--apd-border);
  border-bottom: 1px solid var(--apd-border);
}

.apd-docs-help > div {
  display: flex;
  align-items: center;
  gap: 16px;
}

.apd-docs-help .dashicons {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--apd-accent-soft);
  color: var(--apd-accent);
  font-size: 18px;
}

.apd-docs-help h2 {
  margin: 0 0 5px;
  color: var(--apd-text);
  font-size: 15px;
}

.apd-docs-help p {
  max-width: 720px;
  margin: 0;
  color: var(--apd-muted);
  font-size: 11px;
  line-height: 1.55;
}

@media (max-width: 1100px) {
  .apd-docs-start {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .apd-docs-start > a {
    grid-column: auto;
  }

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

  .apd-docs-glossary dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .apd-docs-glossary dl > div:nth-child(3) {
    border-top: 1px solid var(--apd-border);
    border-left: 0;
  }

  .apd-docs-glossary dl > div:nth-child(4) {
    border-top: 1px solid var(--apd-border);
  }
}

@media (max-width: 782px) {
  .apd-docs-header-actions,
  .apd-docs-section-head,
  .apd-docs-help {
    align-items: stretch;
    flex-direction: column;
  }

  .apd-docs-header-actions .button {
    width: 100%;
  }

  .apd-docs-start {
    padding: 32px 24px;
  }

  .apd-docs-section-head > p {
    max-width: none;
    text-align: left;
  }

  .apd-docs-grid {
    grid-template-columns: 1fr;
  }

  .apd-docs-search {
    margin-top: 20px;
  }

  .apd-docs-glossary dl {
    grid-template-columns: 1fr;
  }

  .apd-docs-glossary dl > div + div,
  .apd-docs-glossary dl > div:nth-child(3),
  .apd-docs-glossary dl > div:nth-child(4) {
    border-top: 1px solid var(--apd-border);
    border-left: 0;
  }

  .apd-docs-card {
    min-height: 190px;
  }

  .apd-docs-help > div:last-child {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* Newsletter studio */
.apd-newsletter-admin {
  width: auto;
  max-width: none;
  margin: 0 18px 0 0;
  padding: 0 0 48px;
  color: var(--apd-text);
  font-family: "APD Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.apd-newsletter-admin *,
.apd-newsletter-admin *::before,
.apd-newsletter-admin *::after {
  box-sizing: border-box;
  letter-spacing: 0;
}

.apd-newsletter-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}

.apd-newsletter-tabs .nav-tab {
  min-height: 38px;
  margin: 0;
  padding: 9px 14px;
  border: 1px solid var(--apd-border);
  border-radius: 7px;
  background: var(--apd-surface);
  color: var(--apd-muted);
  font-size: 12px;
  font-weight: 700;
}

.apd-newsletter-tabs .nav-tab:hover,
.apd-newsletter-tabs .nav-tab:focus {
  border-color: #b7c8eb;
  color: var(--apd-accent);
}

.apd-newsletter-tabs .nav-tab-active {
  border-color: rgba(47, 92, 230, .28);
  background: #edf2ff;
  color: var(--apd-accent);
  box-shadow: none;
}

.apd-newsletter-admin > .apd-card,
.apd-newsletter-overview > .apd-card,
.apd-newsletter-editor > .apd-card,
.apd-newsletter-subscriber-layout > .apd-card,
.apd-newsletter-settings-layout > .apd-card {
  padding: 24px;
  border: 1px solid var(--apd-border);
  border-radius: 8px;
  background: var(--apd-surface);
  box-shadow: var(--apd-shadow-soft);
}

.apd-newsletter-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 18px;
}

.apd-newsletter-summary .apd-summary-card {
  display: grid;
  gap: 6px;
  min-height: 112px;
  align-content: center;
  padding: 18px 20px;
  border: 1px solid var(--apd-border);
  border-radius: 8px;
  background: var(--apd-surface);
  box-shadow: var(--apd-shadow-soft);
}

.apd-newsletter-summary .apd-summary-card > span,
.apd-newsletter-summary .apd-summary-card > small {
  color: var(--apd-muted);
}

.apd-newsletter-summary .apd-summary-card > strong {
  color: var(--apd-text);
  font-size: 26px;
  line-height: 1;
}

.apd-newsletter-overview,
.apd-newsletter-editor,
.apd-newsletter-subscriber-layout,
.apd-newsletter-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, .72fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.apd-newsletter-overview h2,
.apd-newsletter-editor h2,
.apd-newsletter-subscriber-layout h2,
.apd-newsletter-settings-layout h2 {
  margin: 7px 0 10px;
  color: var(--apd-text);
  font-size: 20px;
  line-height: 1.3;
}

.apd-newsletter-overview p,
.apd-newsletter-editor p,
.apd-newsletter-subscriber-layout p,
.apd-newsletter-settings-layout p {
  color: var(--apd-muted);
  font-size: 12px;
  line-height: 1.65;
}

.apd-newsletter-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 22px 0 0;
  padding: 0;
  border-top: 1px solid var(--apd-border);
  list-style: none;
  counter-reset: newsletter-step;
}

.apd-newsletter-steps li {
  position: relative;
  min-height: 112px;
  padding: 24px 22px 20px 42px;
  border-bottom: 1px solid var(--apd-border);
  counter-increment: newsletter-step;
}

.apd-newsletter-steps li:nth-child(odd) {
  border-right: 1px solid var(--apd-border);
}

.apd-newsletter-steps li::before {
  position: absolute;
  top: 25px;
  left: 4px;
  color: var(--apd-accent);
  font-size: 11px;
  font-weight: 800;
  content: "0" counter(newsletter-step);
}

.apd-newsletter-steps strong,
.apd-newsletter-steps span {
  display: block;
}

.apd-newsletter-steps strong {
  margin-bottom: 6px;
  color: var(--apd-text);
  font-size: 13px;
}

.apd-newsletter-steps span {
  color: var(--apd-muted);
  font-size: 12px;
  line-height: 1.55;
}

.apd-newsletter-delivery-note {
  border-top: 3px solid var(--apd-accent) !important;
}

.apd-newsletter-campaign-form,
.apd-newsletter-manual-form,
.apd-newsletter-test-card form {
  display: grid;
  gap: 16px;
}

.apd-newsletter-editor-field {
  display: grid;
  gap: 9px;
  margin: 20px 0;
}

.apd-newsletter-editor-field > span,
.apd-newsletter-campaign-form .apd-field > span,
.apd-newsletter-manual-form .apd-field > span,
.apd-newsletter-test-card .apd-field > span {
  color: var(--apd-text);
  font-size: 12px;
  font-weight: 750;
}

.apd-newsletter-editor-field .wp-editor-wrap {
  overflow: hidden;
  border-radius: 7px;
}

.apd-newsletter-editor-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--apd-border);
}

.apd-newsletter-editor-actions span {
  color: var(--apd-muted);
  font-size: 11px;
  line-height: 1.5;
}

.apd-newsletter-test-card {
  position: sticky;
  top: 48px;
}

.apd-newsletter-test-card hr {
  width: 100%;
  margin: 8px 0;
  border: 0;
  border-top: 1px solid var(--apd-border);
}

.apd-newsletter-filters {
  display: grid;
  grid-template-columns: 180px minmax(220px, 1fr) auto;
  gap: 8px;
  margin: 0 0 16px;
}

.apd-newsletter-filters input,
.apd-newsletter-filters select {
  width: 100%;
  min-height: 40px;
}

.apd-newsletter-table-actions {
  white-space: nowrap;
}

.apd-newsletter-table-actions .button + .button {
  margin-left: 4px;
}

.apd-newsletter-admin .apd-status-badge.is-active,
.apd-newsletter-admin .apd-status-badge.is-sent {
  background: #e6f8f1;
  color: #08755f;
}

.apd-newsletter-admin .apd-status-badge.is-pending,
.apd-newsletter-admin .apd-status-badge.is-draft {
  background: #edf2ff;
  color: #2f5ce6;
}

.apd-newsletter-admin .apd-status-badge.is-sending {
  background: #fff4d8;
  color: #8a5d00;
}

.apd-newsletter-admin .apd-status-badge.is-unsubscribed,
.apd-newsletter-admin .apd-status-badge.is-failed {
  background: #f7e9eb;
  color: #a13845;
}

@media (max-width: 1100px) {
  .apd-newsletter-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .apd-newsletter-overview,
  .apd-newsletter-editor,
  .apd-newsletter-subscriber-layout,
  .apd-newsletter-settings-layout {
    grid-template-columns: 1fr;
  }

  .apd-newsletter-test-card {
    position: static;
  }
}

@media (max-width: 782px) {
  .apd-newsletter-admin {
    margin-right: 10px;
  }

  .apd-newsletter-tabs {
    overflow-x: auto;
  }

  .apd-newsletter-steps {
    grid-template-columns: 1fr;
  }

  .apd-newsletter-summary {
    grid-template-columns: 1fr;
  }

  .apd-newsletter-steps li:nth-child(odd) {
    border-right: 0;
  }

  .apd-newsletter-filters {
    grid-template-columns: 1fr;
  }

  .apd-newsletter-editor-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Designer Theme Studio */
body.apd-screen-asuka-designer_page_apd-theme #wpcontent,
body.apd-screen-toplevel_page_apd-theme #wpcontent {
  padding-left: 0;
}

.apd-theme-studio {
  max-width: none;
  font-family: "APD Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.apd-theme-cpt-editor {
  display: grid;
  gap: 22px;
  margin: 0;
  padding: 0;
}

.apd-theme-cpt-editor .apd-theme-identity {
  grid-template-columns: minmax(0, 1fr);
}

.post-type-apd_theme #apd_theme_designer .inside {
  margin: 0;
  padding: 18px;
  background: var(--apd-page-bg, #f5f7fb);
}

.post-type-apd_theme #apd_theme_designer,
.post-type-apd_theme #submitdiv,
.post-type-apd_theme #titlediv {
  overflow: hidden;
  border: 1px solid var(--apd-border);
  border-radius: 8px;
  background: var(--apd-surface);
  box-shadow: var(--apd-shadow-soft);
}

.post-type-apd_theme #titlewrap input {
  display: block;
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 10px 14px;
  border: 0 !important;
  border-radius: 0;
  outline: 0;
  background: var(--apd-surface);
  color: var(--apd-text);
  box-shadow: none !important;
  font-family: "APD Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
}

.post-type-apd_theme #titlewrap {
  margin: 0;
  padding: 0;
}

.post-type-apd_theme #titlediv:focus-within {
  border-color: var(--apd-accent);
  box-shadow: var(--apd-shadow-soft);
}

.post-type-apd_theme #titlewrap input:focus {
  border: 0 !important;
  outline: 0;
  box-shadow: none !important;
}

.post-type-apd_theme #titlediv .inside {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.post-type-apd_theme .column-apd_theme_preview { width: 94px; }
.post-type-apd_theme .column-apd_theme_default { width: 120px; }
.post-type-apd_theme .column-apd_theme_usage { width: 120px; }

.apd-theme-list-preview {
  display: grid;
  grid-template-columns: 15px 1fr;
  grid-template-rows: 12px 1fr;
  width: 64px;
  height: 42px;
  overflow: hidden;
  border: 1px solid #dbe2ed;
  border-radius: 6px;
  background: var(--theme-bg);
}

.apd-theme-list-preview i:nth-child(1) { grid-column: 1 / -1; background: var(--theme-panel); }
.apd-theme-list-preview i:nth-child(2) { background: #17233b; opacity: .72; }
.apd-theme-list-preview i:nth-child(3) { margin: 7px; border-radius: 3px; background: var(--theme-accent); }

.apd-theme-list-default {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e8f8f3;
  color: #08755f;
  font-size: 11px;
  font-weight: 750;
}

.apd-theme-studio > form {
  display: grid;
  gap: 22px;
}

.apd-theme-studio__header,
.apd-theme-identity,
.apd-theme-editor,
.apd-theme-portability,
.apd-theme-savebar {
  width: 100%;
}

.apd-theme-studio__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding: 28px 30px;
  border: 1px solid var(--apd-border);
  border-radius: 8px;
  background: var(--apd-surface);
  box-shadow: var(--apd-shadow-soft);
}

.apd-theme-studio__heading {
  max-width: 780px;
}

.apd-theme-studio__heading h1 {
  margin: 0;
  color: var(--apd-text);
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: 0;
}

.apd-theme-studio__heading > p,
.apd-theme-identity p,
.apd-theme-editor__toolbar p,
.apd-theme-token-section > header p,
.apd-theme-portability p {
  margin: 7px 0 0;
  color: var(--apd-muted);
  font-size: 13px;
  line-height: 1.65;
}

.apd-theme-studio__title-row,
.apd-theme-studio__header-actions,
.apd-theme-history-actions,
.apd-theme-preview-panel > header,
.apd-theme-preview-panel > header > div:first-child,
.apd-theme-editor__toolbar,
.apd-theme-editor__toolbar > div,
.apd-theme-token-section > header,
.apd-theme-portability__intro,
.apd-theme-portability__actions,
.apd-theme-savebar,
.apd-theme-savebar > div {
  display: flex;
  align-items: center;
}

.apd-theme-studio__title-row {
  gap: 14px;
  margin-top: 8px;
}

.apd-theme-studio__header-actions,
.apd-theme-history-actions,
.apd-theme-portability__actions,
.apd-theme-savebar > div {
  gap: 8px;
}

.apd-theme-studio__header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.apd-theme-studio .button .dashicons {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  font-size: 16px;
  line-height: 16px;
}

.apd-theme-studio .button.button-icon {
  width: 42px;
  min-width: 42px;
  padding: 0;
}

.apd-theme-studio .button.button-icon .dashicons {
  margin: 0;
}

.apd-theme-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 27px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f1f5fb;
  color: #62718a;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
  white-space: nowrap;
}

.apd-theme-status > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.apd-theme-status.is-published {
  background: #e8f8f3;
  color: #08755f;
}

.apd-theme-status.is-draft {
  background: #fff5de;
  color: #8b6200;
}

.apd-theme-identity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 24px;
  align-items: end;
  padding: 0 2px;
}

.apd-theme-identity__copy,
.apd-theme-portability__intro {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.apd-theme-identity h2,
.apd-theme-editor__toolbar h2,
.apd-theme-preview-panel h2,
.apd-theme-portability h2 {
  margin: 0;
  color: var(--apd-text);
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: 0;
}

.apd-theme-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 7px;
  background: var(--apd-accent-soft);
  color: var(--apd-accent);
  font-size: 10px;
  font-weight: 800;
}

.apd-theme-name-field {
  display: grid;
  gap: 7px;
  color: var(--apd-text);
  font-size: 11px;
  font-weight: 750;
}

.apd-theme-name-field input,
.apd-theme-search input,
.apd-theme-token__control input[type="text"],
.apd-theme-json-details textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--apd-border);
  border-radius: 7px;
  background: var(--apd-surface);
  color: var(--apd-text);
  box-shadow: none;
  font: inherit;
}

.apd-theme-name-field input:focus,
.apd-theme-search input:focus,
.apd-theme-token__control input[type="text"]:focus,
.apd-theme-json-details textarea:focus {
  outline: 0;
  border-color: var(--apd-accent);
  box-shadow: 0 0 0 3px var(--apd-accent-soft);
}

.apd-theme-presets {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.apd-theme-preset {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 11px;
  min-height: 92px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--apd-border);
  border-radius: 8px;
  background: var(--apd-surface);
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.apd-theme-preset:hover {
  border-color: var(--apd-border-strong);
  transform: translateY(-1px);
}

.apd-theme-preset.is-active {
  border-color: var(--apd-accent);
  box-shadow: 0 0 0 2px var(--apd-accent-soft), var(--apd-shadow-soft);
}

.apd-theme-preset > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.apd-theme-preset__preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 1px solid rgba(124, 141, 170, .2);
  border-radius: 7px;
  background: var(--preset-bg);
}

.apd-theme-preset__preview span:nth-child(1) { background: var(--preset-bg); }
.apd-theme-preset__preview span:nth-child(2) { background: var(--preset-panel); }
.apd-theme-preset__preview span:nth-child(3) { background: var(--preset-text); }
.apd-theme-preset__preview span:nth-child(4) { background: var(--preset-accent); }

.apd-theme-preset__content {
  min-width: 0;
}

.apd-theme-preset__content strong,
.apd-theme-preset__content small {
  display: block;
}

.apd-theme-preset__content strong {
  color: var(--apd-text);
  font-size: 12px;
  line-height: 1.35;
}

.apd-theme-preset__content small {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  color: var(--apd-muted);
  font-size: 9px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.apd-theme-preset__check {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 16px;
  height: 16px;
  color: var(--apd-accent);
  font-size: 16px;
  opacity: 0;
}

.apd-theme-preset.is-active .apd-theme-preset__check {
  opacity: 1;
}

.apd-theme-editor {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  overflow: hidden;
  border: 1px solid var(--apd-border);
  border-radius: 8px;
  background: var(--apd-surface);
  box-shadow: var(--apd-shadow-soft);
}

.apd-theme-editor__nav {
  position: sticky;
  top: 42px;
  display: grid;
  gap: 14px;
  min-height: 660px;
  padding: 18px 14px;
  border-right: 1px solid var(--apd-border);
  background: var(--apd-surface-soft);
}

.apd-theme-search {
  position: relative;
}

.apd-theme-search > .dashicons {
  position: absolute;
  top: 12px;
  left: 11px;
  width: 16px;
  height: 16px;
  color: var(--apd-muted);
  font-size: 16px;
}

.apd-theme-search input {
  padding-right: 32px;
  padding-left: 34px;
  font-size: 11px;
}

.apd-theme-search button {
  position: absolute;
  top: 7px;
  right: 6px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--apd-muted);
  cursor: pointer;
}

.apd-theme-editor__nav nav {
  display: grid;
  gap: 6px;
  align-content: start;
}

.apd-theme-section-link {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: start;
  width: 100%;
  padding: 11px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--apd-muted);
  text-align: left;
  cursor: pointer;
}

.apd-theme-section-link:hover {
  background: rgba(76, 111, 255, .05);
}

.apd-theme-section-link.is-active {
  background: var(--apd-accent-soft);
  color: var(--apd-accent);
}

.apd-theme-section-link > .dashicons {
  width: 28px;
  height: 28px;
  padding: 6px;
  border-radius: 6px;
  background: var(--apd-surface);
  font-size: 16px;
  line-height: 16px;
}

.apd-theme-section-link span strong,
.apd-theme-section-link span small {
  display: block;
}

.apd-theme-section-link span strong {
  color: var(--apd-text);
  font-size: 11px;
  line-height: 1.4;
}

.apd-theme-section-link span small {
  margin-top: 2px;
  color: var(--apd-muted);
  font-size: 8px;
  line-height: 1.4;
}

.apd-theme-section-link em {
  min-width: 24px;
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--apd-surface);
  color: var(--apd-muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
  text-align: center;
}

.apd-theme-editor__nav-tools {
  display: grid;
  gap: 4px;
  align-self: end;
}

.apd-theme-editor__nav-tools .button {
  width: 100%;
}

.apd-theme-editor__tokens {
  min-width: 0;
  padding: 22px;
}

.apd-theme-editor__toolbar,
.apd-theme-token-section > header {
  justify-content: space-between;
  gap: 18px;
}

.apd-theme-editor__toolbar {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--apd-border);
}

.apd-theme-editor__toolbar > div {
  align-items: flex-start;
  gap: 11px;
}

.apd-theme-token-section[hidden],
.apd-theme-token[hidden],
.apd-theme-token-group[hidden] {
  display: none !important;
}

.apd-theme-token-section > header {
  align-items: flex-start;
  margin-bottom: 18px;
}

.apd-theme-token-section > header h3 {
  margin: 0;
  color: var(--apd-text);
  font-size: 21px;
  letter-spacing: 0;
}

.apd-theme-token-group + .apd-theme-token-group {
  margin-top: 22px;
}

.apd-theme-token-group__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--apd-muted);
}

.apd-theme-token-group__title strong {
  color: var(--apd-text);
  font-size: 11px;
  text-transform: uppercase;
}

.apd-theme-token-group__title span {
  font-size: 9px;
}

.apd-theme-token-list {
  overflow: hidden;
  border: 1px solid var(--apd-border);
  border-radius: 8px;
  background: var(--apd-surface);
}

.apd-theme-token {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(245px, .8fr);
  gap: 18px;
  align-items: center;
  min-height: 76px;
  padding: 13px 14px;
}

.apd-theme-token + .apd-theme-token {
  border-top: 1px solid var(--apd-border);
}

.apd-theme-token:hover {
  background: var(--apd-surface-soft);
}

.apd-theme-token__copy {
  min-width: 0;
}

.apd-theme-token__copy strong,
.apd-theme-token__copy small,
.apd-theme-token__copy code {
  display: block;
}

.apd-theme-token__copy strong {
  color: var(--apd-text);
  font-size: 11px;
}

.apd-theme-token__copy small {
  margin-top: 2px;
  color: var(--apd-muted);
  font-size: 9px;
  line-height: 1.45;
}

.apd-theme-token__copy code {
  width: fit-content;
  margin-top: 4px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--apd-surface-soft);
  color: #73819a;
  font-size: 8px;
}

.apd-theme-token__control {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  gap: 7px;
  align-items: center;
}

.apd-theme-token__control input[type="text"] {
  min-height: 38px;
  padding: 7px 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
}

.apd-theme-token__control input[type="text"].is-invalid {
  border-color: #d93e52;
  box-shadow: 0 0 0 3px rgba(217, 62, 82, .1);
}

.apd-theme-color-swatch {
  position: relative;
  display: block;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border: 1px solid var(--apd-border);
  border-radius: 7px;
  background-image: linear-gradient(45deg, #dfe5ee 25%, transparent 25%), linear-gradient(-45deg, #dfe5ee 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #dfe5ee 75%), linear-gradient(-45deg, transparent 75%, #dfe5ee 75%);
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  background-size: 12px 12px;
  cursor: pointer;
}

.apd-theme-color-swatch > span {
  position: absolute;
  inset: 3px;
  border-radius: 4px;
  background: var(--token-color);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .06);
}

.apd-theme-color-swatch input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.apd-theme-search-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 60px 20px;
  color: var(--apd-muted);
  text-align: center;
}

.apd-theme-search-empty[hidden] {
  display: none;
}

.apd-theme-search-empty .dashicons {
  width: 30px;
  height: 30px;
  font-size: 30px;
}

.apd-theme-preview-column {
  grid-column: 1 / -1;
  padding: 0 22px 22px 242px;
  background: var(--apd-surface);
}

.apd-theme-preview-panel {
  padding: 18px;
  border: 1px solid var(--apd-border);
  border-radius: 8px;
  background: var(--apd-surface-soft);
}

.apd-theme-preview-panel > header {
  justify-content: space-between;
  margin-bottom: 14px;
}

.apd-theme-preview-panel > header > div:first-child {
  align-items: flex-start;
  gap: 10px;
}

.apd-theme-preview-panel > header p {
  margin: 2px 0 0;
  color: var(--apd-muted);
  font-size: 9px;
}

.apd-theme-preview-modes {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--apd-border);
  border-radius: 7px;
  background: var(--apd-surface);
}

.apd-theme-preview-modes button,
.apd-theme-preview__toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--apd-muted);
  cursor: pointer;
}

.apd-theme-preview-modes button.is-active {
  background: var(--apd-accent-soft);
  color: var(--apd-accent);
}

.apd-theme-preview {
  display: grid;
  place-items: center;
  min-height: 430px;
  padding: 24px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--apd-designer-layout-appBg, #f5f7fb);
  transition: background .18s ease;
}

.apd-theme-preview__shell {
  width: min(100%, 860px);
  overflow: hidden;
  border: 1px solid var(--apd-designer-border-subtle, #e8edf5);
  border-radius: 8px;
  background: var(--apd-designer-layout-shellBg, #fff);
  box-shadow: 0 18px 50px rgba(31, 51, 84, .1);
  color: var(--apd-designer-text-primary, #0f172a);
  transition: width .2s ease;
}

.apd-theme-preview__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
  padding: 0 10px;
  border-bottom: 1px solid var(--apd-designer-border-subtle, #e8edf5);
  background: var(--apd-designer-layout-toolbarBg, #fff);
}

.apd-theme-preview__brand {
  display: flex;
  gap: 3px;
}

.apd-theme-preview__brand i {
  display: block;
  width: 8px;
  height: 17px;
  border-radius: 5px 2px 2px 5px;
  background: var(--apd-designer-accent-primary, #2563eb);
  transform: skew(-8deg);
}

.apd-theme-preview__brand i:first-child {
  background: var(--apd-designer-accent-success, #16a34a);
  transform: skew(8deg);
}

.apd-theme-preview__topbar > div {
  display: flex;
  gap: 5px;
}

.apd-theme-preview__topbar > div span {
  width: 22px;
  height: 5px;
  border-radius: 4px;
  background: var(--apd-designer-border-default, #d7dfeb);
}

.apd-theme-preview__body {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 190px;
  min-height: 340px;
}

.apd-theme-preview__sidebar {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 8px;
  border-right: 1px solid var(--apd-designer-border-subtle, #e8edf5);
  background: var(--apd-designer-layout-sidebarBg, #fff);
}

.apd-theme-preview__sidebar button {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 8px 4px;
  border: 0;
  border-radius: 6px;
  background: var(--apd-designer-layout-sidebarItemBg, #fff);
  color: var(--apd-designer-text-secondary, #64748b);
}

.apd-theme-preview__sidebar button.is-active {
  background: var(--apd-designer-layout-sidebarItemActiveBg, rgba(37, 99, 235, .08));
  color: var(--apd-designer-accent-primary, #2563eb);
}

.apd-theme-preview__sidebar small {
  font-size: 7px;
}

.apd-theme-preview__workarea {
  display: grid;
  grid-template-rows: 38px minmax(0, 1fr) 58px;
  min-width: 0;
}

.apd-theme-preview__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px;
  border-bottom: 1px solid var(--apd-designer-border-subtle, #e8edf5);
  background: var(--apd-designer-layout-toolbarBg, #fff);
  color: var(--apd-designer-text-secondary, #64748b);
  font-size: 8px;
}

.apd-theme-preview__toolbar > div {
  display: flex;
  gap: 4px;
}

.apd-theme-preview__toolbar button {
  width: 25px;
  height: 25px;
  border: 1px solid var(--apd-designer-iconButton-border, #d7dfeb);
  background: var(--apd-designer-iconButton-bg, #fff);
  color: var(--apd-designer-iconButton-text, #334155);
}

.apd-theme-preview__toolbar button:hover {
  background: var(--apd-designer-iconButton-hoverBg, #f8fafc);
}

.apd-theme-preview__stage {
  display: grid;
  place-items: center;
  min-height: 235px;
  padding: 20px;
  background: var(--apd-designer-layout-canvasStageBg, #eef2f7);
}

.apd-theme-preview__product {
  position: relative;
  display: grid;
  place-items: center;
  width: 190px;
  aspect-ratio: 1.25;
  border-radius: 42% 42% 12% 12%;
  background: var(--apd-designer-layout-panelBg, #fff);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
  clip-path: polygon(19% 8%, 37% 0, 50% 9%, 63% 0, 81% 8%, 100% 30%, 84% 45%, 76% 32%, 76% 100%, 24% 100%, 24% 32%, 16% 45%, 0 30%);
}

.apd-theme-preview__product strong {
  padding: 5px 12px;
  border: 1px dashed var(--apd-designer-thumbnail-activeBorder, #2563eb);
  color: var(--apd-designer-accent-primary, #2563eb);
  font-size: 10px;
}

.apd-theme-preview__thumbnails {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border-top: 1px solid var(--apd-designer-border-subtle, #e8edf5);
  background: var(--apd-designer-layout-shellBg, #fff);
}

.apd-theme-preview__thumbnails small {
  margin-right: 5px;
  color: var(--apd-designer-text-secondary, #64748b);
  font-size: 8px;
}

.apd-theme-preview__thumbnails button {
  display: grid;
  place-items: center;
  width: 43px;
  height: 38px;
  border: 1px solid var(--apd-designer-border-subtle, #e8edf5);
  border-radius: 6px;
  background: var(--apd-designer-thumbnail-bg, #fff);
  color: var(--apd-designer-text-secondary, #64748b);
}

.apd-theme-preview__thumbnails button.is-active {
  border-color: var(--apd-designer-thumbnail-activeBorder, #2563eb);
  background: var(--apd-designer-thumbnail-activeBg, rgba(37, 99, 235, .1));
}

.apd-theme-preview__thumbnails button span {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--apd-designer-text-primary, #0f172a);
  color: var(--apd-designer-text-inverse, #fff);
  font-size: 7px;
}

.apd-theme-preview__panel {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  border-left: 1px solid var(--apd-designer-border-subtle, #e8edf5);
  background: var(--apd-designer-layout-panelBg, #fff);
}

.apd-theme-preview__panel > header {
  margin: -12px -12px 2px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--apd-designer-border-subtle, #e8edf5);
  background: var(--apd-designer-layout-panelHeaderBg, #f8fafc);
}

.apd-theme-preview__panel > header strong,
.apd-theme-preview__panel > header small,
.apd-theme-preview__panel label span {
  display: block;
}

.apd-theme-preview__panel > header strong {
  color: var(--apd-designer-text-primary, #0f172a);
  font-size: 10px;
}

.apd-theme-preview__panel > header small,
.apd-theme-preview__panel label span {
  margin-top: 2px;
  color: var(--apd-designer-text-secondary, #64748b);
  font-size: 7px;
}

.apd-theme-preview__panel input {
  width: 100%;
  min-height: 32px;
  margin-top: 5px;
  padding: 6px 8px;
  border: 1px solid var(--apd-designer-input-border, #d7dfeb);
  border-radius: 5px;
  background: var(--apd-designer-input-bg, #fff);
  color: var(--apd-designer-input-text, #0f172a);
  font-size: 8px;
  box-shadow: 0 0 0 0 var(--apd-designer-input-focusRing, transparent);
}

.apd-theme-preview__panel input::placeholder {
  color: var(--apd-designer-input-placeholder, #94a3b8);
}

.apd-theme-preview__states {
  display: flex;
  gap: 5px;
}

.apd-theme-preview__states i {
  display: block;
  width: 25px;
  height: 5px;
  border-radius: 999px;
}

.apd-theme-preview__states .is-success { background: var(--apd-designer-accent-success, #16a34a); }
.apd-theme-preview__states .is-warning { background: var(--apd-designer-accent-warning, #f59e0b); }
.apd-theme-preview__states .is-danger { background: var(--apd-designer-accent-danger, #dc2626); }

.apd-theme-preview__panel > button {
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 5px;
  font-size: 8px;
  font-weight: 750;
}

.apd-theme-preview__panel > button.is-primary {
  border: 1px solid var(--apd-designer-button-primary-border, #2563eb);
  background: var(--apd-designer-button-primary-bg, #2563eb);
  color: var(--apd-designer-button-primary-text, #fff);
}

.apd-theme-preview__panel > button.is-secondary {
  border: 1px solid var(--apd-designer-button-secondary-border, #d7dfeb);
  background: var(--apd-designer-button-secondary-bg, #fff);
  color: var(--apd-designer-button-secondary-text, #0f172a);
}

.apd-theme-preview__panel > button.is-ghost {
  border: 0;
  background: transparent;
  color: var(--apd-designer-button-ghost-text, #334155);
}

.apd-theme-preview.is-mobile .apd-theme-preview__shell {
  width: 330px;
}

.apd-theme-preview.is-mobile .apd-theme-preview__body {
  grid-template-columns: 1fr;
}

.apd-theme-preview.is-mobile .apd-theme-preview__sidebar,
.apd-theme-preview.is-mobile .apd-theme-preview__panel {
  display: none;
}

.apd-theme-preview.is-mobile .apd-theme-preview__stage {
  min-height: 280px;
}

.apd-theme-contrast {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.apd-theme-contrast > div {
  display: grid;
  grid-template-columns: 9px auto 1fr;
  gap: 7px;
  align-items: center;
  min-height: 38px;
  padding: 7px 9px;
  border-radius: 7px;
  background: var(--apd-surface);
  color: var(--apd-muted);
}

.apd-theme-contrast > div > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.apd-theme-contrast > div.is-good > span { background: #16a34a; }
.apd-theme-contrast > div.is-warning > span { background: #f59e0b; }
.apd-theme-contrast > div.is-poor > span { background: #dc2626; }

.apd-theme-contrast strong {
  color: var(--apd-text);
  font-size: 10px;
}

.apd-theme-contrast small {
  font-size: 8px;
}

.apd-theme-compare {
  width: 100%;
  margin-top: 10px !important;
}

.apd-theme-compare.is-active {
  border-color: var(--apd-accent) !important;
  background: var(--apd-accent-soft) !important;
  color: var(--apd-accent) !important;
}

.apd-theme-portability {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 22px 24px;
  border: 1px solid var(--apd-border);
  border-radius: 8px;
  background: var(--apd-surface);
}

.apd-theme-import-button {
  position: relative;
  cursor: pointer;
}

.apd-theme-import-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.apd-theme-json-details {
  grid-column: 1 / -1;
  padding-top: 14px;
  border-top: 1px solid var(--apd-border);
}

.apd-theme-json-details > summary {
  width: fit-content;
  color: var(--apd-muted);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.apd-theme-json-details > div {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.apd-theme-json-details textarea {
  min-height: 260px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  line-height: 1.6;
}

.apd-theme-json-details .button {
  width: fit-content;
}

.apd-theme-savebar {
  position: sticky;
  z-index: 20;
  bottom: 0;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 14px;
  border: 1px solid var(--apd-border);
  border-radius: 8px 8px 0 0;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 -12px 30px rgba(31, 51, 84, .08);
  backdrop-filter: blur(14px);
}

.apd-theme-savebar small {
  color: var(--apd-muted);
  font-size: 10px;
}

.apd-theme-flash {
  position: fixed;
  z-index: 100000;
  right: 24px;
  bottom: 24px;
  max-width: 360px;
  padding: 11px 14px;
  border-radius: 7px;
  background: #142033;
  color: #fff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, .24);
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}

.apd-theme-flash.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.apd-theme-flash.is-error {
  background: #b42335;
}

@media (min-width: 1440px) {
  .apd-theme-editor {
    grid-template-columns: 220px minmax(500px, 1fr) minmax(350px, .76fr);
  }

  .apd-theme-preview-column {
    position: sticky;
    top: 42px;
    grid-column: auto;
    padding: 18px 18px 18px 0;
  }

  .apd-theme-preview {
    min-height: 520px;
    padding: 14px;
  }

  .apd-theme-preview__body {
    grid-template-columns: 58px minmax(0, 1fr) 150px;
  }

  .apd-theme-preview__product {
    width: 150px;
  }
}

@media (max-width: 1400px) {
  .apd-theme-presets {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .apd-theme-studio__header,
  .apd-theme-identity,
  .apd-theme-portability {
    grid-template-columns: 1fr;
  }

  .apd-theme-studio__header {
    display: grid;
  }

  .apd-theme-studio__header-actions {
    justify-content: flex-start;
  }

  .apd-theme-editor {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .apd-theme-preview-column {
    padding-left: 212px;
  }

  .apd-theme-token {
    grid-template-columns: 1fr;
    gap: 9px;
  }
}

@media (max-width: 782px) {
  .apd-theme-studio {
    margin-right: 10px;
  }

  .apd-theme-studio__header,
  .apd-theme-identity,
  .apd-theme-portability,
  .apd-theme-savebar {
    padding: 18px;
  }

  .apd-theme-studio__title-row,
  .apd-theme-savebar,
  .apd-theme-portability,
  .apd-theme-portability__actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .apd-theme-studio__heading h1 {
    font-size: 28px;
  }

  .apd-theme-presets {
    grid-template-columns: 1fr;
  }

  .apd-theme-editor {
    display: block;
  }

  .apd-theme-editor__nav {
    position: static;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--apd-border);
  }

  .apd-theme-editor__nav nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .apd-theme-section-link span small {
    display: none;
  }

  .apd-theme-preview-column {
    padding: 0 14px 14px;
  }

  .apd-theme-preview {
    min-height: 390px;
    padding: 12px;
  }

  .apd-theme-preview__body {
    grid-template-columns: 1fr;
  }

  .apd-theme-preview__sidebar,
  .apd-theme-preview__panel {
    display: none;
  }

  .apd-theme-contrast {
    grid-template-columns: 1fr;
  }

  .apd-theme-savebar {
    position: static;
  }

  .apd-theme-savebar > div:last-child,
  .apd-theme-savebar .button {
    width: 100%;
  }
}
