:root { color-scheme: light; --line: #e3e5e8; --line-soft: #f0f1f3; --ink: #202123; --muted: #6f6f6f; --bg: #f7f7f5; --panel: #fff; --brand: #10a37f; --brand-soft: #eef8f4; --danger: #b42318; --ok: #168253; --shadow: 0 1px 2px rgba(0, 0, 0, .04); }
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.5; font-size: 14px; }
a { color: var(--brand); text-decoration: none; }
.layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { display: flex; flex-direction: column; background: #fbfbfa; color: var(--ink); border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar h2 { margin: 4px 10px 22px; font-size: 16px; font-weight: 600; letter-spacing: 0; }
.sidebar-group { display: grid; gap: 2px; margin: 0 0 10px; }
.sidebar-label { margin: 10px 10px 6px; color: #8b8b8b; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.sidebar a, .sidebar-logout button { color: #4a4a4a; display: block; width: 100%; padding: 9px 10px; border-radius: 8px; font-weight: 400; text-align: left; background: transparent; border: 0; font: inherit; }
.sidebar a:hover, .sidebar-logout button:hover { background: #f0f0ee; color: var(--ink); }
.sidebar a.active { background: #ededeb; color: var(--ink); }
.sidebar-logout { margin: auto 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.admin-frontend-shortcut {
  position: fixed;
  top: 22px;
  right: 28px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  box-shadow: none;
  color: var(--ink);
  font-weight: 400;
}

.admin-frontend-shortcut:hover {
  border-color: #c8ded6;
  background: var(--brand-soft);
  color: var(--ink);
}
.admin-frontend-shortcut svg {
  width: 16px;
  height: 16px;
  color: var(--brand);
}
.main { padding: 28px 34px; width: min(1180px, 100%); }
h1 { margin: 0 0 20px; font-size: 28px; line-height: 1.15; font-weight: 500; letter-spacing: 0; }
h2 { margin: 0 0 14px; font-size: 17px; font-weight: 500; letter-spacing: 0; }
.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.page-title-row h1 { margin: 0; }
.title-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.thumbnail-refresh-form {
  margin: 0;
}
button.thumbnail-refresh-button[type=submit] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  color: #4a4a4a;
  font-weight: 400;
}
button.thumbnail-refresh-button[type=submit]:hover {
  border-color: #cfd4d1;
  background: #f0f0ee;
  color: var(--ink);
  filter: none;
}
.thumbnail-refresh-button svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.85;
}
.panel-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.undo-import-form {
  margin: 0;
}
button.undo-import-button,
button.undo-import-button[type=submit] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid #f1c5c0;
  background: #fff7f5;
  color: var(--danger);
  font-weight: 400;
}
button.undo-import-button:hover,
button.undo-import-button[type=submit]:hover {
  border-color: #e6aca5;
  background: #ffece8;
  color: var(--danger);
  filter: none;
}
.undo-import-button svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.85;
}
button.undo-import-button:disabled {
  border-color: var(--line);
  background: #fafaf9;
  color: #929292;
  cursor: not-allowed;
  opacity: .8;
}
.admin-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -4px 0 18px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfbfa;
  box-shadow: var(--shadow);
}
.admin-subnav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 8px;
  padding: 8px 12px;
  color: #4a4a4a;
  font-size: 13px;
  font-weight: 400;
}
.admin-subnav a:hover {
  background: #f0f0ee;
  color: var(--ink);
}
.admin-subnav a.active {
  background: var(--ink);
  color: #fff;
}
.managed-page-switch {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}
.managed-page-switch a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: #4a4a4a;
  font-weight: 400;
}
.managed-page-switch a:hover,
.managed-page-switch a.active {
  border-color: #bddfd6;
  background: var(--brand-soft);
  color: var(--ink);
}
.managed-page-switch svg {
  width: 19px;
  height: 19px;
  color: var(--brand);
}
.automation-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfbfa;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}
.automation-status svg {
  width: 16px;
  height: 16px;
}
.automation-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}
.automation-flow article {
  display: grid;
  gap: 9px;
  padding: 15px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: #fbfbfa;
}
.automation-flow svg,
.automation-placeholder svg {
  width: 20px;
  height: 20px;
  color: var(--brand);
  stroke-width: 1.8;
}
.automation-flow strong {
  font-size: 13.5px;
  font-weight: 500;
}
.automation-flow p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}
.automation-placeholder {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
  padding: 16px;
  border: 1px dashed #d7dad8;
  border-radius: 11px;
  background: #fbfbfa;
}
.automation-placeholder div {
  display: grid;
  gap: 3px;
}
.automation-placeholder strong {
  font-weight: 500;
}
.automation-placeholder span {
  color: var(--muted);
  font-size: 13px;
}
.automation-workflow-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 16px;
  min-height: 660px;
}
.automation-workflow-library,
.automation-workflow-stage {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}
.automation-workflow-library {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
}
.automation-workflow-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.automation-workflow-brand > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(37, 99, 235, .14);
  color: #7db3ff;
}
.automation-workflow-brand svg {
  width: 18px;
  height: 18px;
}
.automation-workflow-brand strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.automation-workflow-brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.automation-workflow-list {
  display: grid;
  gap: 8px;
}
.automation-workflow-list button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 54px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.automation-workflow-list button:not(:disabled) {
  cursor: pointer;
}
.automation-workflow-list button.is-active {
  background: rgba(37, 99, 235, .14);
}
.automation-workflow-list button:disabled {
  opacity: .58;
}
.automation-workflow-list svg {
  width: 17px;
  height: 17px;
  color: var(--brand);
}
.automation-workflow-list strong,
.automation-workflow-list small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.automation-workflow-list strong {
  font-size: 13px;
  font-weight: 500;
}
.automation-workflow-list small {
  color: var(--muted);
  font-size: 11px;
}
.automation-workflow-stage {
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(360px, 1fr) auto;
}
.automation-workflow-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}
.automation-workflow-toolbar h2 {
  margin: 7px 0 3px;
  font-size: 22px;
}
.automation-flow-version {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(37, 99, 235, .12);
  color: var(--brand);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
}
.automation-workflow-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.automation-workflow-actions a,
.automation-workflow-actions button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 11px;
  border-radius: 9px;
}
.automation-workflow-actions svg {
  width: 16px;
  height: 16px;
}
.automation-workflow-canvas {
  overflow: auto;
  min-height: 430px;
  padding: 46px 34px;
  background:
    radial-gradient(circle at 1px 1px, rgba(125, 179, 255, .22) 1px, transparent 1px),
    linear-gradient(180deg, rgba(37, 99, 235, .055), transparent 42%);
  background-size: 18px 18px, 100% 100%;
}
.automation-flow-row {
  display: grid;
  grid-template-columns: repeat(8, minmax(188px, 1fr));
  align-items: center;
  gap: 28px;
  min-width: 1660px;
}
.automation-node {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 188px;
  padding: 15px;
  border-radius: 15px;
  background: color-mix(in srgb, var(--panel) 92%, #2563eb 8%);
}
.automation-node.is-role-ai {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .24), rgba(14, 165, 233, .08)),
    color-mix(in srgb, var(--panel) 88%, #2563eb 12%);
}
.automation-node.is-role-quality {
  background:
    linear-gradient(135deg, rgba(20, 184, 166, .15), rgba(37, 99, 235, .06)),
    color-mix(in srgb, var(--panel) 90%, #14b8a6 10%);
}
.automation-node.is-role-data {
  background:
    linear-gradient(135deg, rgba(168, 85, 247, .12), rgba(37, 99, 235, .05)),
    color-mix(in srgb, var(--panel) 90%, #8b5cf6 10%);
}
.automation-node::after {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(100% + 5px);
  width: 18px;
  height: 2px;
  background: color-mix(in srgb, var(--brand) 55%, var(--line));
  transform: translateY(-50%);
}
.automation-node:last-child::after {
  display: none;
}
.automation-node.is-ready {
  outline: 1px solid rgba(74, 222, 128, .26);
}
.automation-node.is-warning {
  outline: 1px solid rgba(250, 204, 21, .28);
}
.automation-node.is-paused {
  outline: 1px solid rgba(148, 163, 184, .22);
  opacity: .86;
}
.automation-node-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.automation-node-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: rgba(37, 99, 235, .14);
  color: #7db3ff;
}
.automation-node.is-ready .automation-node-icon {
  color: var(--ok);
  background: rgba(74, 222, 128, .11);
}
.automation-node.is-warning .automation-node-icon {
  color: #facc15;
  background: rgba(250, 204, 21, .12);
}
.automation-node-icon svg {
  width: 17px;
  height: 17px;
}
.automation-node-type {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.automation-node h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}
.automation-node p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}
.automation-node-ai-note {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: flex-start;
  margin-top: 2px;
  padding: 9px 10px;
  border-radius: 11px;
  background: rgba(125, 179, 255, .08);
  color: var(--text-secondary, var(--muted));
  font-size: 11.5px;
  line-height: 1.35;
}
.automation-node.is-role-ai .automation-node-ai-note {
  background: rgba(37, 99, 235, .18);
  color: #cfe0ff;
}
.automation-node-ai-note svg {
  width: 15px;
  height: 15px;
  color: var(--brand);
}
.automation-node-edit {
  align-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.automation-node-edit:hover {
  color: var(--text-primary, var(--ink));
}
.automation-node-edit svg {
  width: 14px;
  height: 14px;
}
.automation-workflow-modal {
  width: min(1040px, calc(100% - 32px));
}
.automation-workflow-modal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.automation-workflow-modal-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--surface-subtle, rgba(37, 99, 235, .08));
  color: var(--text-secondary, var(--muted));
  font-size: 12px;
  font-weight: 500;
}
.automation-workflow-modal-nav a:hover {
  color: var(--text-primary, var(--ink));
  background: var(--surface-hover, rgba(37, 99, 235, .13));
}
.automation-workflow-modal-section {
  display: grid;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line-soft, var(--line));
}
.automation-workflow-modal-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.automation-workflow-modal-section h3 {
  margin: 0;
  color: var(--text-heading, var(--ink));
  font-size: 15px;
  font-weight: 500;
}
.automation-workflow-modal-kicker {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.automation-workflow-modal-kicker strong,
.automation-workflow-modal-kicker small {
  display: block;
}
.automation-workflow-modal-kicker strong {
  color: var(--text-primary, var(--ink));
  font-size: 13px;
  font-weight: 500;
}
.automation-workflow-modal-kicker small {
  margin-top: 2px;
  color: var(--text-muted, var(--muted));
  font-size: 12px;
  line-height: 1.45;
}
.automation-ai-explain {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  padding: 13px;
  border-radius: 12px;
  background: var(--surface-subtle, rgba(37, 99, 235, .08));
}
.automation-ai-explain.is-ai {
  background: linear-gradient(135deg, rgba(37, 99, 235, .2), rgba(14, 165, 233, .08));
}
.automation-ai-explain svg {
  width: 18px;
  height: 18px;
  color: var(--brand);
}
.automation-ai-explain p {
  margin: 0;
  color: var(--text-primary, var(--ink));
  font-size: 13px;
  line-height: 1.5;
}
.automation-modal-form {
  display: grid;
  gap: 14px;
}
.automation-modal-form button[type="submit"] {
  justify-self: start;
}
.automation-workflow-readonly {
  display: grid;
  gap: 12px;
}
.automation-workflow-readonly p {
  margin: 0;
  color: var(--text-secondary, var(--muted));
  font-size: 13px;
  line-height: 1.5;
}
.automation-output-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.automation-output-grid span {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 11px;
  border-radius: 11px;
  background: var(--surface-subtle, rgba(37, 99, 235, .08));
  color: var(--text-primary, var(--ink));
  font-size: 13px;
}
.automation-output-grid strong {
  color: var(--text-muted, var(--muted));
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}
.automation-workflow-inspector {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}
.automation-workflow-inspector article {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-left: 1px solid var(--line);
}
.automation-workflow-inspector article:first-child {
  border-left: 0;
}
.automation-workflow-inspector span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.automation-workflow-inspector strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.automation-empty {
  display: flex;
  gap: 9px;
  justify-content: center;
  align-items: center;
}
.automation-empty svg {
  width: 18px;
  height: 18px;
}
.automation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.automation-state-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: stretch;
  border-color: rgba(120, 150, 184, .24);
}
.automation-state-summary {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, .72fr);
  gap: 18px;
  align-items: start;
}
.automation-state-panel.is-ready {
  border-color: rgba(74, 222, 128, .36);
}
.automation-state-panel.is-paused {
  border-color: rgba(250, 204, 21, .32);
}
.automation-state-main {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.automation-state-main svg {
  width: 32px;
  height: 32px;
  color: var(--brand);
  stroke-width: 1.7;
}
.automation-state-panel.is-ready .automation-state-main svg {
  color: var(--ok);
}
.automation-state-panel.is-paused .automation-state-main svg {
  color: #facc15;
}
.automation-state-main span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.automation-state-main strong {
  display: block;
  margin-top: 2px;
  font-size: 20px;
  font-weight: 500;
}
.automation-state-main p {
  max-width: 760px;
  margin: 5px 0 0;
  color: var(--muted);
}
.automation-state-checks {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: min(420px, 100%);
}
.automation-state-checks span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}
.automation-state-checks span.ok {
  border-color: rgba(74, 222, 128, .24);
  color: var(--ok);
}
.automation-state-checks span.warn {
  border-color: rgba(250, 204, 21, .24);
  color: #facc15;
}
.automation-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.automation-overview-grid.compact {
  align-items: stretch;
}

.automation-dashboard-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.automation-dashboard-strip .automation-kpi {
  min-height: 118px;
}

.automation-kpi-status.is-ready {
  border-color: rgba(74, 222, 128, .22);
  background: linear-gradient(135deg, rgba(22, 163, 74, .16), rgba(255, 255, 255, .035));
}

.automation-kpi-status.is-paused {
  border-color: rgba(245, 158, 11, .22);
  background: linear-gradient(135deg, rgba(245, 158, 11, .12), rgba(255, 255, 255, .035));
}

.automation-calendar-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.automation-calendar-panel .panel-head {
  margin-bottom: 0;
}

.automation-calendar-panel .automation-mini-calendar {
  grid-column: 1 / -1;
  width: 100%;
  max-width: none;
  grid-template-columns: repeat(21, minmax(0, 1fr));
}

.automation-empty-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  color: var(--muted);
}

.automation-empty-panel svg {
  width: 24px;
  height: 24px;
  color: var(--brand);
}

.automation-empty-panel p {
  margin: 0;
}

.automation-manual-cron-test {
  display: grid;
  gap: 16px;
}

.automation-manual-test-form {
  margin: 0;
}

.automation-manual-test-main {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.automation-manual-test-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-bottom: 2px;
}

.automation-manual-test-settings span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, .1);
  color: var(--muted);
  font-size: 12.5px;
}

.automation-manual-test-settings svg {
  width: 15px;
  height: 15px;
  color: var(--brand);
}

.automation-testflow.compact .automation-testflow-track {
  padding-bottom: 2px;
}

.automation-test-decision {
  max-width: 920px;
}

.automation-manual-test-result {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(15, 23, 42, .42);
}

.automation-manual-test-result.is-success {
  background: rgba(22, 163, 74, .12);
}

.automation-manual-test-result.is-error {
  background: rgba(239, 68, 68, .1);
}

.automation-manual-test-result.is-skipped {
  background: rgba(245, 158, 11, .1);
}

.automation-manual-test-result-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.automation-manual-test-result-head > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(37, 99, 235, .14);
  color: var(--brand);
  flex: 0 0 auto;
}

.automation-manual-test-result.is-success .automation-manual-test-result-head > span {
  color: #4ade80;
  background: rgba(34, 197, 94, .14);
}

.automation-manual-test-result.is-error .automation-manual-test-result-head > span {
  color: #fb7185;
  background: rgba(239, 68, 68, .14);
}

.automation-manual-test-result.is-skipped .automation-manual-test-result-head > span {
  color: #fbbf24;
  background: rgba(245, 158, 11, .14);
}

.automation-manual-test-result-head svg {
  width: 17px;
  height: 17px;
}

.automation-manual-test-result-head strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.automation-manual-test-result-head small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.automation-manual-test-result-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.automation-manual-test-result-grid div {
  min-width: 0;
}

.automation-manual-test-result-grid dt {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.automation-manual-test-result-grid dd {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.automation-manual-test-result p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.automation-run-card {
  margin-bottom: 18px;
}
.automation-run-facts {
  display: grid;
  gap: 10px;
  margin: 0;
}
.automation-run-facts div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
}
.automation-run-facts div:first-child {
  border-top: 0;
}
.automation-run-facts dt {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.automation-run-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.automation-kpi {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 7px 12px;
  align-items: center;
}
.automation-kpi svg {
  grid-row: span 3;
  width: 22px;
  height: 22px;
  color: var(--brand);
}
.automation-kpi span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.automation-kpi strong {
  font-size: 19px;
  font-weight: 500;
}
.automation-kpi p {
  grid-column: 2;
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}
.automation-status.active {
  color: var(--ok);
}
.automation-form .sticky-actions,
.automation-actions,
.automation-run-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
}
.automation-overview-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(118, 150, 184, .18);
}
.automation-overview-tools > div:first-child {
  display: grid;
  gap: 2px;
}
.automation-overview-tools strong {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}
.automation-overview-tools span {
  font-size: 12px;
  color: var(--muted);
}
.automation-overview-tools .automation-run-actions {
  margin-top: 0;
  justify-content: flex-end;
}
.automation-overview-tools .automation-run-actions button {
  min-height: 36px;
  padding: 8px 11px;
  font-size: 12.5px;
}
.automation-overview-tools .automation-run-actions button.danger {
  color: var(--danger) !important;
}
.automation-run-actions form {
  margin: 0;
}
.inline-action-form {
  margin: 0;
}
.automation-run-actions button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.automation-testflow {
  --flow-accent: #4c8df6;
  --flow-ok: #16a34a;
  margin-top: 20px;
}
.automation-testflow-track {
  display: flex;
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  padding: 5px 2px 10px;
  scrollbar-width: none;
}
.automation-testflow-track::-webkit-scrollbar {
  display: none;
}
.automation-testflow-card {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: start;
  gap: 10px;
  flex: 0 0 230px;
  min-height: 152px;
  padding: 15px;
  overflow: hidden;
  border: 1px solid rgba(84, 99, 116, .58);
  border-radius: 13px;
  background: rgba(12, 20, 29, .68);
  color: var(--text-secondary, var(--muted));
  transition: border-color .25s ease, background .25s ease, opacity .25s ease, transform .25s ease;
}
.automation-testflow-card::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(130deg, transparent 0 38%, rgba(255, 255, 255, .07) 49%, transparent 60%);
  opacity: 0;
  transform: translateX(-145%);
}
.automation-testflow-card::after {
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  content: "";
  background: var(--flow-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s ease;
}
.automation-testflow-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.automation-testflow-status-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 15px;
  margin-left: auto;
  border-radius: 999px;
  background: rgba(128, 134, 139, .62);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), background .22s ease, box-shadow .22s ease;
}
.automation-testflow-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(84, 99, 116, .58);
  border-radius: 10px;
  background: rgba(255, 255, 255, .035);
  color: #9aa4af;
}
.automation-testflow-icon svg {
  width: 18px;
  height: 18px;
}
.automation-testflow-number {
  color: var(--text-muted, #80868b);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
}
.automation-testflow-card strong,
.automation-testflow-card small {
  display: block;
  min-width: 0;
}
.automation-testflow-card strong {
  color: var(--text-primary, var(--ink));
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
}
.automation-testflow-card small {
  color: var(--text-muted, var(--muted));
  font-size: 12px;
  line-height: 1.45;
}
.automation-testflow-card.is-upcoming {
  opacity: .68;
}
.automation-testflow-card.is-active {
  border-color: rgba(76, 141, 246, .52);
  background: linear-gradient(180deg, rgba(20, 26, 33, .96), rgba(12, 20, 29, .92));
  transform: translateY(-3px);
}
.automation-testflow-card.is-active::before {
  opacity: 1;
  animation: automationFlowSweep 1.7s cubic-bezier(.2, .8, .2, 1) infinite;
}
.automation-testflow-panel.is-live-running .automation-testflow-card.is-active .automation-testflow-icon {
  animation: automationIconBreathe 1.7s ease-in-out infinite;
}
.automation-testflow-card.is-active::after,
.automation-testflow-card.is-complete::after {
  transform: scaleX(1);
}
.automation-testflow-card.is-active .automation-testflow-icon {
  border-color: rgba(76, 141, 246, .32);
  background: rgba(76, 141, 246, .14);
  color: var(--flow-accent);
}
.automation-testflow-card.is-active .automation-testflow-status-dot {
  background: var(--flow-accent);
  box-shadow: 0 0 0 6px rgba(76, 141, 246, .1);
  transform: scale(1.12);
}
.automation-testflow-card.is-complete {
  border-color: rgba(34, 197, 94, .32);
  background: rgba(12, 26, 19, .78);
}
.automation-testflow-card.is-complete::after {
  background: var(--flow-ok);
}
.automation-testflow-card.is-complete .automation-testflow-icon {
  border-color: rgba(34, 197, 94, .3);
  background: rgba(22, 163, 74, .1);
  color: #5ad184;
}
.automation-testflow-card.is-complete .automation-testflow-status-dot {
  background: var(--flow-ok);
}
.automation-testflow-connector {
  position: relative;
  align-self: center;
  flex: 0 0 34px;
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(84, 99, 116, .54);
}
.automation-testflow-connector::after {
  position: absolute;
  inset: 0;
  content: "";
  background: var(--flow-ok);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s ease;
}
.automation-testflow-connector.is-complete::after {
  transform: scaleX(1);
}
.automation-testflow-connector.is-active::before {
  position: absolute;
  top: 50%;
  left: 0;
  z-index: 2;
  width: 7px;
  height: 7px;
  content: "";
  border-radius: 999px;
  background: var(--flow-accent);
  transform: translate(-50%, -50%);
  animation: automationConnectorTravel 1.25s cubic-bezier(.2, .8, .2, 1) infinite;
}
.automation-fish-progress {
  display: flex;
  gap: 7px;
  margin-top: 10px;
}
.automation-fish-progress span {
  position: relative;
  display: block;
  flex: 1 1 0;
  min-width: 28px;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(37, 45, 56, .82);
}
.automation-fish-progress i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: var(--flow-accent);
  transition: width .42s cubic-bezier(.2, .8, .2, 1), background .25s ease;
}
.automation-fish-progress span.is-complete i {
  width: 100%;
  background: var(--flow-ok);
}
.automation-fish-progress span.is-current i {
  background: var(--flow-accent);
}
@keyframes automationFlowSweep {
  0% { transform: translateX(-145%); }
  62%, 100% { transform: translateX(145%); }
}
@keyframes automationConnectorTravel {
  0% { left: 0; opacity: 0; }
  18% { opacity: 1; }
  82% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}
@keyframes automationIconBreathe {
  0%, 100% { transform: scale(1.02); }
  50% { transform: scale(1.1); }
}
.automation-run-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .025);
}
.automation-run-settings span {
  display: inline-grid;
  grid-template-columns: auto auto;
  column-gap: 6px;
  align-items: center;
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  color: var(--text-secondary, var(--muted));
  font-size: 11.5px;
}
.automation-run-settings svg {
  width: 14px;
  height: 14px;
  color: var(--brand);
}
.automation-run-settings strong {
  color: var(--text-primary, var(--ink));
  font-weight: 500;
  font-size: 11.5px;
}
.automation-stepchain {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.automation-step {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 10px;
  border-radius: 12px;
  color: var(--text-secondary, var(--muted));
  background: rgba(255, 255, 255, .022);
  font-size: 12px;
  font-weight: 500;
}
.automation-step svg {
  width: 32px;
  height: 32px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(37, 99, 235, .1);
  color: #7db3ff;
}
.automation-step small,
.automation-step strong,
.automation-step em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.automation-step small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.automation-step strong {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
}
.automation-step em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}
.automation-step.is-done {
  color: rgba(134, 239, 172, .95);
  background: rgba(34, 197, 94, .09);
}
.automation-step.is-active {
  background: rgba(37, 99, 235, .18);
}
.automation-step.is-active svg {
  background: var(--brand);
  color: #fff;
}
.automation-step.is-active strong {
  color: #fff;
}
.automation-run-empty {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  color: var(--muted);
}
.automation-run-empty svg {
  width: 18px;
  height: 18px;
  color: var(--brand);
}
.automation-model-result {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}
.automation-model-result strong {
  color: var(--ink);
  font-weight: 500;
}
.automation-api-panel {
  display: grid;
  gap: 18px;
}
.automation-provider-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.automation-provider-option {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  margin: 0;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}
.automation-provider-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.automation-provider-option.is-selected {
  background: rgba(37, 99, 235, .16);
}
.automation-provider-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(37, 99, 235, .13);
  color: #7db3ff;
}
.automation-provider-icon svg {
  width: 19px;
  height: 19px;
}
.automation-provider-option strong {
  display: block;
  color: var(--ink);
  font-weight: 500;
}
.automation-provider-option small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.4;
}
.automation-provider-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.automation-provider-card {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}
.automation-provider-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.automation-provider-card-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.automation-provider-card-head h3 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 500;
}
.automation-provider-card-head em {
  display: inline-flex;
  max-width: 45%;
  min-height: 28px;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.automation-field-stack {
  display: grid;
  gap: 12px;
}
.automation-two-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.automation-remove-key {
  min-height: auto;
  padding: 0;
  color: var(--muted);
}
.automation-cost-box,
.automation-image-settings {
  margin-top: 18px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}
.automation-import-panel {
  display: grid;
  gap: 18px;
}
.automation-import-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.automation-import-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}
.automation-import-card-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.automation-import-card-head > svg {
  width: 40px;
  height: 40px;
  padding: 10px;
  border-radius: 13px;
  background: rgba(37, 99, 235, .13);
  color: #7db3ff;
}
.automation-import-card-head h3 {
  margin: 0 0 3px;
  font-size: 16px;
  font-weight: 500;
}
.automation-import-card-head p {
  margin: 0;
  font-size: 12.5px;
}
.automation-media-switch {
  width: fit-content;
}
.automation-cost-box strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-weight: 500;
}
.automation-cost-box {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) 1.2fr;
  gap: 16px;
  align-items: center;
  margin-top: 0;
}
.automation-cost-box .automation-result-summary {
  margin: 0;
}
.automation-image-settings .panel-head {
  margin-bottom: 14px;
  padding-bottom: 0;
}
.automation-run-actions button:disabled,
.automation-run-actions button[disabled] {
  opacity: .45;
  cursor: not-allowed;
}
.automation-run-actions svg {
  width: 17px;
  height: 17px;
}
.automation-subnav-toggle {
  margin: 0 0 0 auto;
}
.automation-toggle-button,
.automation-toggle-button[type="submit"] {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 500;
  border: 0;
}
.automation-toggle-button svg {
  width: 16px;
  height: 16px;
}
.automation-toggle-button.is-active,
.automation-toggle-button.is-active[type="submit"] {
  background: rgba(248, 113, 113, .14) !important;
  color: #fecaca !important;
}
.automation-toggle-button.is-inactive,
.automation-toggle-button.is-inactive[type="submit"] {
  background: rgba(74, 222, 128, .17) !important;
  color: #bbf7d0 !important;
}
.automation-toggle-button:hover,
.automation-toggle-button[type="submit"]:hover {
  filter: none;
  color: #fff !important;
}
.automation-state-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: min(460px, 100%);
}
.automation-state-grid span {
  display: grid;
  gap: 2px;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
}
.automation-state-grid span small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
}
.automation-state-grid .automation-status-card {
  border-color: rgba(74, 222, 128, .28);
  background: linear-gradient(135deg, rgba(22, 163, 74, .22), rgba(16, 185, 129, .08));
  color: #bff8ce;
}
.automation-state-grid .automation-status-card.is-inactive {
  border-color: rgba(245, 165, 36, .32);
  background: linear-gradient(135deg, rgba(245, 165, 36, .18), rgba(255, 255, 255, .04));
  color: #ffdca3;
}
.automation-state-grid .automation-status-card strong {
  color: inherit;
}
.automation-state-grid strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
}
.auto2-candidate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.auto2-candidate-card {
  grid-template-columns: minmax(92px, 132px) minmax(0, 1fr);
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(74, 222, 128, .22);
  border-radius: 14px;
  background: rgba(20, 83, 45, .08);
}
.auto2-candidate-card .generated-item-media > img,
.auto2-candidate-card .generated-item-media > span {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(255, 255, 255, .045);
}
.auto2-candidate-card .generated-item-media svg {
  width: 30px;
  height: 30px;
  color: rgba(74, 222, 128, .78);
}
.generated-item-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.generated-item-head small {
  color: var(--ok);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.generated-item-head h3 {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 600;
}
.generated-item-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-style: italic;
}
.generated-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}
.generated-item-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}
.generated-item-meta svg {
  width: 14px;
  height: 14px;
  color: var(--brand);
}
.auto2-gallery-preview {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.auto2-gallery-preview img {
  width: 42px;
  height: 34px;
  border-radius: 7px;
  object-fit: cover;
}
.generated-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}
.generated-item-actions details {
  min-width: 100%;
}
.generated-item-actions summary {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}
.generated-item-actions summary svg {
  width: 14px;
  height: 14px;
}
.code-preview {
  max-height: 260px;
  margin: 10px 0 0;
  overflow: auto;
}
.automation-check {
  align-self: center;
}
.automation-form label,
.automation-prompt-form label,
.automation-import-form label,
.automation-schedule-form label,
.automation-inline-form label {
  color: var(--muted);
  font-weight: 400;
}
.automation-inline-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.switch-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin: 0;
  font-weight: 400;
}
.switch-inline input {
  width: 18px;
  height: 18px;
}
.automation-code {
  max-height: 520px;
  overflow: auto;
  white-space: pre;
}
.automation-result.ok {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.automation-result.error {
  border-color: rgba(255, 82, 82, .32);
}
.automation-result-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.automation-result-summary span {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, .035);
  color: var(--ink);
}
.automation-result-summary strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.automation-debug {
  margin-top: 12px;
}
.automation-debug summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 500;
}
.automation-log-table code {
  white-space: nowrap;
}
.automation-explain {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 14px 0 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .035);
  color: var(--muted);
}
.automation-explain svg {
  width: 17px;
  height: 17px;
  color: var(--brand);
  flex: 0 0 auto;
  margin-top: 2px;
}
.automation-explain p,
.automation-live {
  margin: 0;
}
.automation-batch-progress {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(37, 99, 235, .13), rgba(14, 165, 233, .055));
}
.automation-batch-progress > div:first-child {
  display: grid;
  gap: 3px;
}
.automation-batch-progress strong {
  color: var(--text-primary, var(--ink));
  font-size: 14px;
  font-weight: 500;
}
.automation-batch-progress span {
  color: var(--text-secondary, var(--muted));
  font-size: 13px;
}
.automation-batch-bar {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .22);
}
.automation-batch-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width .25s ease;
}
.automation-batch-progress form {
  justify-self: start;
}
.automation-candidate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
  margin-top: 18px;
}
.automation-candidate-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 40%) 1fr;
  gap: 34px;
  width: min(100%, 1240px);
  margin-inline: auto;
  padding: 30px 32px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 78% 6%, rgba(34, 197, 94, .19), transparent 40%),
    linear-gradient(135deg, rgba(10, 42, 34, .94), rgba(5, 15, 26, .96));
  border: 1px solid rgba(74, 222, 128, .26);
}
.automation-candidate-card.is-imported {
  border-color: rgba(74, 222, 128, .36);
}
.automation-candidate-card.is-discarded {
  opacity: .62;
}
.automation-candidate-media {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  border-radius: 16px;
  background:
    linear-gradient(45deg, rgba(255,255,255,.025) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,.025) 25%, transparent 25%),
    rgba(4, 14, 24, .62);
  background-size: 24px 24px;
}
.automation-candidate-media img,
.automation-candidate-placeholder {
  width: 100%;
  height: 100%;
  min-height: 330px;
  object-fit: contain;
}
.automation-candidate-placeholder {
  display: grid;
  place-items: center;
  color: rgba(134, 239, 172, .86);
}
.automation-candidate-placeholder svg {
  width: 92px;
  height: 92px;
  opacity: .5;
}
.automation-ai-badge {
  position: absolute;
  z-index: 1;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 9px;
  color: #86efac;
  background: rgba(20, 83, 45, .64);
  border: 1px solid rgba(74, 222, 128, .22);
  font-size: .92rem;
  font-weight: 500;
}
.automation-ai-badge svg {
  width: 16px;
  height: 16px;
}
.automation-candidate-main {
  position: relative;
  display: grid;
  gap: 18px;
  align-content: start;
  padding-right: 22px;
}
.automation-candidate-more {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(226, 232, 240, .65);
  cursor: default;
}
.automation-candidate-more:hover {
  background: transparent;
}
.automation-candidate-more svg {
  width: 22px;
  height: 22px;
}
.automation-candidate-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}
.automation-candidate-head h3 {
  margin: 0;
  color: var(--text-primary, var(--ink));
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  font-weight: 600;
}
.automation-candidate-head h3 span {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 10px;
  padding: 5px 10px;
  border-radius: 10px;
  color: #86efac;
  border: 1px solid rgba(74, 222, 128, .35);
  font-size: .9rem;
  font-weight: 500;
}
.automation-candidate-head em {
  color: var(--text-secondary, var(--muted));
  display: block;
  margin-top: 8px;
  font-size: 1.2rem;
}
.automation-candidate-card p {
  color: rgba(226, 232, 240, .86);
  font-size: 1.04rem;
  line-height: 1.7;
  margin: 0;
}
.automation-candidate-thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.automation-candidate-thumbs span {
  display: grid;
  place-items: center;
  min-height: 116px;
  border-radius: 14px;
  background: rgba(15, 23, 42, .62);
  border: 1px solid rgba(148, 163, 184, .16);
  color: rgba(134, 239, 172, .72);
}
.automation-candidate-thumbs img {
  width: 100%;
  height: 116px;
  object-fit: cover;
  border-radius: inherit;
}
.automation-candidate-thumbs svg {
  width: 34px;
  height: 34px;
  opacity: .55;
}
.automation-candidate-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 20px 0;
  border-top: 1px solid rgba(148, 163, 184, .14);
  border-bottom: 1px solid rgba(148, 163, 184, .14);
}
.automation-candidate-facts span {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  row-gap: 2px;
  padding: 0 18px;
  color: rgba(226, 232, 240, .78);
  font-size: 1rem;
}
.automation-candidate-facts span:not(:last-child) {
  border-right: 1px solid rgba(148, 163, 184, .14);
}
.automation-candidate-facts svg {
  grid-row: span 2;
  width: 26px;
  height: 26px;
  color: #4ade80;
}
.automation-candidate-facts strong {
  color: rgba(226, 232, 240, .68);
  font-weight: 500;
}
.automation-candidate-actions {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
}
.automation-candidate-actions form {
  margin: 0;
}
.automation-candidate-action-spacer {
  min-width: 1px;
}
.automation-candidate-actions button,
.automation-candidate-actions .secondary-button,
.automation-candidate-preview summary {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.automation-candidate-preview {
  position: relative;
}
.automation-candidate-preview summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 10px;
  color: var(--text-primary, var(--ink));
  background: rgba(15, 23, 42, .5);
  border: 1px solid rgba(148, 163, 184, .22);
}
.automation-candidate-preview summary::-webkit-details-marker {
  display: none;
}
.automation-candidate-preview pre {
  position: absolute;
  z-index: 10;
  left: 0;
  bottom: calc(100% + 10px);
  width: min(640px, 80vw);
  max-height: 420px;
  overflow: auto;
}
@media (max-width: 820px) {
  .automation-candidate-card {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 16px;
  }
  .automation-run-settings,
  .automation-stepchain {
    grid-template-columns: 1fr;
  }
  .automation-candidate-media,
  .automation-candidate-media img,
  .automation-candidate-placeholder {
    min-height: 210px;
  }
  .automation-candidate-main {
    padding-right: 0;
  }
  .automation-candidate-more {
    display: none;
  }
  .automation-candidate-head {
    display: grid;
  }
  .automation-candidate-head h3 {
    font-size: 2rem;
  }
  .automation-candidate-facts {
    grid-template-columns: 1fr;
  }
  .automation-candidate-facts span {
    padding: 10px 0;
  }
  .automation-candidate-facts span:not(:last-child) {
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, .14);
  }
  .automation-candidate-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .automation-candidate-preview pre {
    position: static;
    width: 100%;
    max-height: 280px;
    margin-top: 10px;
  }
}
.admin-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, .34);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: admin-spin .8s linear infinite;
}
form.is-loading button[type="submit"] {
  pointer-events: none;
  opacity: .82;
}
@keyframes admin-spin {
  to { transform: rotate(360deg); }
}
.panel, .card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.panel-head h2,
.panel-head p { margin: 0; }
.panel-head p { margin-top: 4px; }
.narrow { max-width: 420px; margin: 10vh auto; }
.grid { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 20px; }
.card strong { display: block; font-size: 28px; font-weight: 500; }
.card span { color: var(--muted); }
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(135px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.dashboard-stat {
  display: grid;
  grid-template-columns: 39px 1fr;
  gap: 1px 12px;
  align-items: center;
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.dashboard-stat svg {
  grid-row: span 2;
  width: 39px;
  height: 39px;
  padding: 10px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
}
.dashboard-stat strong {
  font-size: 25px;
  line-height: 1.15;
  font-weight: 500;
}
.dashboard-stat span {
  color: var(--muted);
  font-size: 12px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(330px, .9fr);
  gap: 18px;
}
.coverage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.coverage-grid article {
  display: grid;
  gap: 5px;
  padding: 14px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fbfbfa;
}
.coverage-grid svg {
  width: 20px;
  height: 20px;
  color: var(--brand);
}
.coverage-grid strong {
  font-size: 25px;
  line-height: 1.2;
  font-weight: 500;
}
.coverage-grid span {
  font-size: 13px;
}
.coverage-grid code {
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}
.dashboard-item-list {
  display: grid;
  gap: 5px;
}
.dashboard-item-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--ink);
}
.dashboard-item-list a:hover {
  background: #f6f6f4;
}
.dashboard-item-list span {
  display: grid;
  gap: 2px;
}
.dashboard-item-list strong {
  font-weight: 500;
}
.dashboard-item-list small {
  color: var(--muted);
}
.status-pill {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f2f3f5;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}
.status-pill.status-published {
  background: var(--brand-soft);
  color: var(--ok);
}
.database-backups .panel-head {
  align-items: start;
}
.database-backups .panel-head form {
  margin: 0;
}
.database-backups button svg,
.backup-list a svg,
.backup-list button svg {
  width: 16px;
  height: 16px;
}
.database-backups button,
.backup-list a,
.backup-list button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.backup-list {
  display: grid;
  gap: 8px;
}
.backup-list article {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 9px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fbfbfa;
}
.backup-list article > div {
  display: grid;
  gap: 3px;
}
.backup-list article > div strong {
  font-weight: 500;
}
.backup-list article > div small {
  color: var(--muted);
}
.backup-list form {
  margin: 0;
}
button.restore-button[type=submit] {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}
button.restore-button[type=submit]:hover {
  border-color: #d8d9dc;
  background: #f6f6f4;
  color: var(--ink);
}
label { display: grid; gap: 6px; margin: 0 0 16px; font-weight: 400; color: #3f3f3f; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 18px; align-items: end; }
.form-grid label { margin: 0; }
.check { display: flex; gap: 8px; align-items: center; min-height: 42px; }
.check input { width: auto; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; font: inherit; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(16, 163, 127, .18); border-color: var(--brand); }
button { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; background: #fff; color: var(--ink); font-weight: 500; cursor: pointer; }
a.button { display: inline-flex; align-items: center; border-radius: 8px; padding: 10px 14px; background: var(--brand); color: #fff; font-weight: 500; }
button.button { display: inline-flex; align-items: center; gap: 8px; }
a.button.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
button.primary, button[type=submit] { background: var(--brand); color: #fff; }
button:hover { background: #f6f6f4; }
a.button:hover, button.primary:hover, button[type=submit]:hover {
  border-color: #0d8f70;
  background: #0d8f70;
  color: #fff;
  filter: none;
}
a.button.secondary:hover {
  background: #f6f6f4;
  color: var(--ink);
  filter: none;
}
.sidebar-logout button[type=submit] {
  border: 0;
  background: transparent;
  color: #4a4a4a;
}
.sidebar-logout button[type=submit]:hover {
  background: #f0f0ee;
  color: var(--ink);
}
.actions { display: flex; gap: 10px; align-items: center; }
.inline-upload { display: flex; gap: 10px; align-items: center; margin: 0; }
.inline-upload input { max-width: 280px; }
.settings-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.settings-media-card {
  display: grid;
  gap: 12px;
  align-content: start;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 16px;
  background: #fbfbfa;
}
.settings-media-card strong {
  font-weight: 500;
}
.settings-preview {
  display: grid;
  place-items: center;
  min-height: 128px;
  border: 1px dashed #d6d8dc;
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
}
.settings-preview img {
  max-width: min(220px, 80%);
  max-height: 92px;
  object-fit: contain;
}
.settings-preview-dark {
  border-color: #26384e;
  background: #071526;
  color: #a9b8ca;
}
.favicon-preview {
  min-height: 96px;
}
.favicon-preview img {
  width: 48px;
  height: 48px;
}
.theme-settings-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 20px;
  align-items: start;
}
.header-line-settings {
  align-items: end;
  margin-top: 20px;
}
.header-line-settings[hidden] {
  display: none !important;
}
.header-range-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 10px;
  align-items: center;
}
.header-range-control input {
  min-width: 0;
}
.header-range-control output {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}
.theme-color-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 16px;
  background: #fbfbfa;
}
.theme-color-card label {
  margin: 0;
}
.theme-color-card input[type=color] {
  height: 50px;
  padding: 4px;
  cursor: pointer;
}
.theme-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}
.theme-preview span {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--theme-preview-color);
}
.theme-preview strong {
  flex: 1;
  color: var(--theme-preview-color);
  font-weight: 500;
}
.theme-preview button {
  border-color: var(--theme-preview-color);
  background: var(--theme-preview-color);
  color: #fff;
  pointer-events: none;
}
.theme-font-grid {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}
.compliance-check {
  margin-top: 20px;
  padding: 15px 16px;
  border: 1px solid #f0d5a0;
  border-radius: 11px;
  background: #fffaf0;
}
.compliance-check.is-ready {
  border-color: #bce2d3;
  background: #f1fbf7;
}
.compliance-check label {
  margin: 0 0 6px;
  color: var(--ink);
  font-weight: 500;
}
.compliance-check p,
.setting-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.ads-txt-preview {
  display: grid;
  gap: 6px;
  margin: 10px 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: #fbfbfa;
}
.ads-txt-preview small {
  color: var(--muted);
}
.ads-txt-preview code {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13px;
}
.placement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(300px, 1fr));
  gap: 14px;
}
.placement-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: #fbfbfa;
}
.placement-card.status-preview { border-color: #d4dce9; }
.placement-card.status-active { border-color: #bce2d3; }
.placement-card-head {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.placement-card-head > span {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
}
.placement-card-head select {
  width: 128px;
  padding: 7px 9px;
}
.placement-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 500;
}
.placement-card p {
  min-height: 40px;
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
}
.placement-fields {
  grid-template-columns: 160px 1fr;
  align-items: start;
}
.placement-preview {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 62px;
  margin-top: 15px;
  border: 1px dashed #cbd3df;
  border-radius: 8px;
  color: #697386;
  background: #fff;
  text-align: center;
}
.placement-preview small {
  font-size: 10px;
  text-transform: uppercase;
}
.placement-preview strong {
  font-size: 12px;
  font-weight: 500;
}
.placement-preview-rectangle { max-width: 220px; min-height: 90px; margin-inline: auto; }
.placement-preview-vertical { max-width: 150px; min-height: 118px; margin-inline: auto; }
.guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.guide-grid article {
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  padding: 15px;
  background: #fbfbfa;
}
.guide-grid svg {
  width: 20px;
  height: 20px;
  margin-bottom: 10px;
  color: var(--brand);
}
.guide-grid h3 {
  margin: 0 0 7px;
  font-size: 14px;
  font-weight: 500;
}
.guide-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}
.adops-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  color: #414141;
}
.theme-size-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}
.item-create-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.item-roundtrip-panel .panel-head {
  margin-bottom: 18px;
}
.roundtrip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
  align-items: start;
  margin-bottom: 18px;
}
.roundtrip-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 13px;
  min-height: 268px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fbfbfa;
}
.roundtrip-step {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
}
.roundtrip-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-right: 34px;
}
.roundtrip-card-head svg {
  width: 20px;
  height: 20px;
  color: var(--brand);
  stroke-width: 1.8;
}
.roundtrip-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}
.roundtrip-card p {
  margin: 0;
  color: #555;
  font-size: 13px;
  line-height: 1.55;
}
.roundtrip-card p code {
  padding: 1px 4px;
  border-radius: 4px;
  background: #f0f0ee;
}
.roundtrip-card > a.button {
  gap: 8px;
  justify-self: start;
  margin-top: auto;
}
.roundtrip-card > a.button svg {
  width: 16px;
  height: 16px;
}
.roundtrip-upload {
  display: grid;
  gap: 10px;
  margin: auto 0 0;
}
.roundtrip-export-form {
  display: grid;
  gap: 12px;
  margin: 0;
}
.roundtrip-export-form label {
  margin: 0;
}
.roundtrip-export-form label > small {
  color: var(--muted);
  font-weight: 400;
}
.roundtrip-data-options {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
}
.roundtrip-data-options .check {
  min-height: auto;
  font-size: 13px;
}
.roundtrip-field-selector {
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: #fff;
  overflow: hidden;
}
.roundtrip-field-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
}
.roundtrip-field-head strong {
  font-weight: 500;
}
.roundtrip-field-head span {
  display: flex;
  gap: 5px;
}
button.text-action,
button.text-action:hover {
  padding: 3px 7px;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 12px;
  font-weight: 500;
  filter: none;
}
.roundtrip-fields {
  display: grid;
  gap: 2px;
  max-height: 216px;
  padding: 7px;
  overflow-y: auto;
}
.roundtrip-fields .check {
  gap: 7px;
  min-height: auto;
  padding: 5px 4px;
  color: var(--ink);
  font-size: 12.5px;
}
.roundtrip-fields .check span {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: baseline;
}
.roundtrip-fields small {
  color: var(--muted);
  font-size: 11px;
}
.roundtrip-export-form > button,
.roundtrip-upload button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.roundtrip-export-form > button svg {
  width: 16px;
  height: 16px;
}
.roundtrip-export-form > button {
  justify-self: start;
}
.roundtrip-upload button {
  justify-self: start;
}
.create-card {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  align-items: center;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.create-card:hover {
  background: #fbfbfa;
  border-color: #cfd4d1;
}
.create-card-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
}
.create-card-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
}
.create-card strong,
.create-card small {
  display: block;
}
.create-card strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
}
.create-card small {
  color: var(--muted);
  margin-top: 3px;
  font-weight: 400;
}
.create-item-upload {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: stretch;
  flex: 1;
  min-width: 420px;
  margin: 0;
}
.upload-drop {
  display: grid;
  gap: 3px;
  width: 100%;
  margin: 0;
  border: 1px dashed #c9cfcc;
  border-radius: 10px;
  background: #fbfbfa;
  padding: 12px 14px;
  cursor: pointer;
}
.upload-drop:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.upload-drop.has-file {
  border-color: #94d8c4;
  background: var(--brand-soft);
}
.upload-drop span {
  color: var(--ink);
  font-weight: 500;
}
.upload-drop small {
  color: var(--muted);
  font-weight: 400;
}
.upload-drop input {
  max-width: none;
  margin-top: 6px;
  padding: 8px;
  background: #fff;
}
.create-item-upload button {
  align-self: end;
  min-height: 42px;
  white-space: nowrap;
}
.admin-modal {
  width: min(760px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  padding: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .18);
}
.admin-modal::backdrop {
  background: rgba(32, 33, 35, .34);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.modal-head h2,
.modal-head p {
  margin: 0;
}
.modal-head p {
  margin-top: 5px;
}
.modal-close {
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}
.modal-close:hover {
  background: #f6f6f4;
  color: var(--ink);
}
.modal-close svg {
  width: 18px;
  height: 18px;
}
.section-modal,
.plugin-install-modal {
  width: min(980px, calc(100% - 32px));
}

.admin-modal.wide-modal {
  width: min(1280px, calc(100vw - 32px));
}

.blog-post-form .code-workspace {
  min-height: 420px;
}

.blog-post-form .code-pane textarea {
  min-height: 320px;
}
.modal-upload {
  margin-top: 16px;
  min-width: 0;
}
.single-file-upload {
  grid-template-columns: 1fr auto;
}
.homepage-hero-form {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.hero-settings-form {
  display: grid;
  gap: 16px;
}
.hero-settings-layout {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(240px, .75fr);
  gap: 14px;
  align-items: stretch;
}
.hero-settings-card {
  display: grid;
  gap: 12px;
  align-content: start;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 16px;
  background: #fbfbfa;
}
.hero-settings-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 500;
}
.hero-settings-card p {
  margin: 0;
}
.hero-settings-card label {
  margin: 0;
}
.hero-mode-panel[hidden] {
  display: none !important;
}
.hero-settings-card-wide {
  grid-column: 1 / -1;
}
.hero-settings-card-wide > label:not(.check) {
  margin-top: 2px;
}
.hero-settings-title-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.settings-kicker {
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.hero-note-toggle {
  justify-content: flex-start;
  min-height: auto;
  padding: 10px 0 0;
  border-top: 1px solid var(--line-soft);
  color: var(--ink);
}
.hero-admin-preview,
.hero-settings-card .admin-thumb {
  width: 100%;
  max-width: none;
  height: 130px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: #fff;
}
.animated-hero-studio {
  gap: 18px;
}
.animated-hero-studio .hero-settings-title-row {
  align-items: center;
}
.animated-hero-panel-toggle {
  width: auto;
  padding: 0;
  border-top: 0;
  justify-self: end;
}
.animated-hero-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1.1fr) repeat(2, minmax(260px, .95fr));
  gap: 14px;
  align-items: stretch;
}
.animated-hero-block {
  display: grid;
  align-content: start;
  gap: 13px;
  min-width: 0;
  padding: 14px;
  border-radius: 12px;
  background: var(--panel-soft, rgba(255,255,255,.04));
  border: 1px solid var(--line-soft);
}
.animated-hero-block.is-content {
  grid-column: span 1;
}
.animated-hero-block-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.animated-hero-block-head > i {
  width: 18px;
  height: 18px;
  color: var(--brand);
  flex: 0 0 auto;
  margin-top: 2px;
}
.animated-hero-block h4 {
  margin: 0 0 3px;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 500;
  color: var(--ink);
}
.animated-hero-block-head p {
  margin: 0;
}
.animated-hero-ranges {
  display: grid;
  gap: 12px;
}
.animated-hero-ranges label {
  display: grid;
  gap: 7px;
}
.animated-hero-ranges output {
  float: right;
}
.animated-hero-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.animated-hero-checks .check {
  flex: 1 1 180px;
  min-height: 38px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
}
.hero-settings-form > button[type=submit] {
  justify-self: end;
}
.layout-editor,
.section-editor {
  display: grid;
  gap: 12px;
}
.layout-editor-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 140px 130px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 12px;
  background: #fbfbfa;
}
.layout-editor-row span {
  display: grid;
  gap: 2px;
}
.layout-editor-row strong {
  font-weight: 500;
}
.layout-editor-row small {
  color: var(--muted);
}
.layout-editor-row label,
.section-editor-row label {
  margin: 0;
}
.section-editor-row {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 14px;
  background: #fbfbfa;
}
.section-editor-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}
.section-editor textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
}
.managed-page-panel .panel-head {
  align-items: center;
}
.managed-page-panel a.button-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 400;
}
.managed-page-panel a.button-link:hover {
  border-color: #cfd4d1;
  background: #f0f0ee;
}
.managed-info-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(270px, 1fr));
  gap: 14px;
}
.settings-surface {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 17px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fbfbfa;
}
.settings-surface label,
.managed-section-fields label {
  margin: 0;
}
.managed-help {
  margin: 0;
  font-size: 12px;
}
.managed-data-rule {
  display: flex;
  gap: 10px;
  align-items: start;
  margin: 0 0 16px;
  padding: 12px 13px;
  border: 1px solid #d9ece6;
  border-radius: 10px;
  background: var(--brand-soft);
  color: #3f514b;
  font-size: 13px;
}
.managed-data-rule svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--brand);
}
.managed-data-rule code {
  padding: 1px 5px;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
}
.managed-info-form .sticky-actions {
  grid-column: 1 / -1;
}
.managed-button-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 12px;
}
.layout-sortable {
  display: grid;
  gap: 9px;
}
.layout-sortable-row {
  display: grid;
  grid-template-columns: 40px minmax(220px, 1fr) 120px;
  gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 10px 13px 10px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fbfbfa;
}
.layout-sortable-row.dragging {
  opacity: .45;
  background: var(--brand-soft);
}
.layout-sortable-row .drag-handle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: grab;
}
.layout-sortable-row .drag-handle:active {
  cursor: grabbing;
}
.layout-sortable-row .drag-handle svg {
  width: 18px;
  height: 18px;
}
.layout-sortable-row > div {
  display: grid;
  gap: 2px;
}
.layout-sortable-row strong {
  font-weight: 500;
}
.layout-sortable-row small {
  color: var(--muted);
}
.layout-sortable-row label {
  margin: 0;
}
.managed-section-library {
  display: grid;
  gap: 10px;
}
.managed-section-editor {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fbfbfa;
}
.managed-section-editor[open] {
  background: #fff;
  border-color: var(--line);
}
.managed-section-editor.is-pending-delete {
  border-color: #f1b8b1;
  background: #fff8f7;
}
.managed-section-editor.is-pending-delete summary span {
  background: #ffe9e5;
  color: var(--danger);
}
.managed-section-editor summary {
  display: grid;
  grid-template-columns: 38px minmax(200px, 1fr) minmax(160px, .8fr);
  gap: 12px;
  align-items: center;
  padding: 13px;
  cursor: pointer;
  list-style: none;
}
.managed-section-editor summary::-webkit-details-marker {
  display: none;
}
.managed-section-editor summary span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand);
}
.managed-section-editor summary svg {
  width: 18px;
  height: 18px;
}
.managed-section-editor summary strong {
  font-weight: 500;
}
.managed-section-editor summary small {
  color: var(--muted);
  text-align: right;
}
.managed-section-fields {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto minmax(260px, 1.2fr);
  gap: 13px;
  align-items: end;
  padding: 0 14px 15px;
}
.managed-assignments {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
}
.managed-assignments legend {
  padding: 0 5px;
  color: var(--muted);
  font-size: 12px;
}
.managed-section-code {
  grid-column: 1 / -1;
}
.managed-section-code textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
}
.managed-section-editor .section-editor-row {
  border: 0;
  border-radius: 0;
  padding: 0 14px 15px;
  background: transparent;
}
.global-sections-intro {
  display: flex;
  gap: 16px;
  align-items: start;
  background: var(--brand-soft);
  border-color: #c9eadf;
}
.global-sections-intro > svg {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 10px;
  border-radius: 10px;
  background: #fff;
  color: var(--brand);
}
.global-sections-intro h2 {
  margin-bottom: 5px;
}
.global-section-fields {
  align-items: start;
}
.section-render-options {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fbfbfa;
}
.section-render-options .check {
  min-height: 30px;
  margin: 0;
}
.section-modal .global-section-fields {
  padding: 0;
}
.section-modal-help {
  margin: 0 0 16px;
  padding: 14px;
}
.section-component-preview .editorial-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.section-component-preview .editorial-info-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fbfbfa;
}
.section-component-preview .editorial-info-card span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
}
.section-component-preview .editorial-info-card strong {
  font-weight: 500;
}
.section-component-preview .editorial-info-card em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}
.section-editor-toolbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fbfbfa;
}
.section-state {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f0f0ee;
  color: #686868;
  font-size: 12px;
  font-weight: 500;
}
.section-state.is-active {
  background: var(--brand-soft);
  color: var(--brand);
}
.danger-check {
  min-height: auto;
  margin: 0;
  color: var(--danger);
  font-weight: 500;
}
.global-section-media {
  display: grid;
  gap: 13px;
  align-content: start;
}
.section-focus-controls {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: #fbfbfa;
}
.section-focus-controls > p {
  margin: 0 0 3px;
  font-weight: 500;
}
.section-focus-controls label {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(90px, 1fr) 42px;
  gap: 8px;
  align-items: center;
  margin: 0;
  font-size: 12px;
}
.section-focus-controls input[type=range] {
  padding: 0;
}
.section-focus-controls output {
  color: var(--muted);
  text-align: right;
}
.portal-settings-panel form {
  display: grid;
  gap: 16px;
}
.portal-active {
  margin: 0;
}
.portal-settings-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  gap: 12px;
}
.portal-settings-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: #fbfbfa;
}
.portal-settings-card label {
  margin: 0;
  font-size: 12px;
}
.portal-settings-card textarea {
  min-height: 68px;
  resize: vertical;
}
.portal-settings-preview {
  display: grid;
  place-items: center;
  height: 92px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
}
.portal-settings-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portal-settings-preview svg {
  width: 28px;
  height: 28px;
}
.plugin-intro {
  display: flex;
  gap: 16px;
  align-items: start;
  background: var(--brand-soft);
  border-color: #c9eadf;
}
.plugin-intro > svg {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  padding: 11px;
  border-radius: 10px;
  background: #fff;
  color: var(--brand);
}
.plugin-intro h2,
.plugin-intro p {
  margin: 0 0 6px;
}
.plugin-install-form {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(380px, 1fr);
  gap: 16px;
  align-items: stretch;
}
.plugin-upload-drop {
  position: relative;
  display: grid;
  place-content: center;
  gap: 7px;
  min-height: 224px;
  margin: 0;
  padding: 22px;
  border: 1px dashed #c9cfcc;
  border-radius: 12px;
  background: #fbfbfa;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
}
.plugin-upload-drop:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.plugin-upload-drop.has-file {
  border-color: #94d8c4;
  background: var(--brand-soft);
  color: var(--ink);
}
.plugin-upload-drop.has-file strong::after {
  content: " geladen";
  color: var(--brand);
  font-weight: 500;
}
.plugin-upload-drop svg {
  width: 28px;
  height: 28px;
  margin: 0 auto 5px;
  color: var(--brand);
}
.plugin-upload-drop strong {
  color: var(--ink);
  font-weight: 500;
}
.plugin-upload-drop span {
  font-size: 12px;
}
.plugin-upload-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.plugin-install-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(190px, 1fr));
  gap: 12px;
  align-content: start;
}
.plugin-install-fields label,
.plugin-fields label {
  margin: 0;
}
.plugin-install-fields .full,
.plugin-fields .full {
  grid-column: 1 / -1;
}
.plugin-install-fields button {
  grid-column: 1 / -1;
  justify-self: start;
}
.plugin-library {
  display: grid;
  gap: 10px;
}
.plugin-entry {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fbfbfa;
}
.plugin-entry[open] {
  border-color: var(--line);
  background: #fff;
}
.plugin-entry.is-pending-delete {
  border-color: #f1b8b1;
  background: #fff8f7;
}
.plugin-entry.is-pending-delete .plugin-icon {
  background: #ffe9e5;
  color: var(--danger);
}
.plugin-entry summary {
  display: grid;
  grid-template-columns: 40px minmax(190px, 1fr) minmax(150px, .7fr) 98px;
  gap: 12px;
  align-items: center;
  padding: 13px;
  cursor: pointer;
  list-style: none;
}
.plugin-entry summary::-webkit-details-marker {
  display: none;
}
.plugin-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
}
.plugin-icon svg {
  width: 19px;
  height: 19px;
}
.plugin-entry summary strong {
  font-weight: 500;
}
.plugin-entry summary small {
  color: var(--muted);
}
.plugin-entry summary em {
  justify-self: end;
  border-radius: 999px;
  padding: 5px 9px;
  background: #f0f0ee;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}
.plugin-entry summary em.active {
  background: var(--brand-soft);
  color: var(--brand);
}
.plugin-fields {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(190px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 0 14px 15px;
}
.plugin-state {
  align-self: center;
}
.plugin-source {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.plugin-delete-choice {
  grid-column: 1 / -1;
  width: fit-content;
  padding: 9px 11px;
  border: 1px solid #f1c5c0;
  border-radius: 9px;
  background: #fff7f5;
}
@media (max-width: 1260px) {
  .portal-settings-grid {
    grid-template-columns: repeat(3, minmax(190px, 1fr));
  }
}
.tree { list-style: none; padding-left: 18px; }
.tree:first-child { padding-left: 0; }
.tree li { border-left: 1px solid var(--line); margin: 6px 0; padding: 6px 0 6px 12px; }
.tree span { display: block; color: var(--muted); font-size: 13px; }
.menu-create-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, .8fr) auto;
  gap: 12px;
  align-items: end;
}
.menu-create-form label { margin: 0; }
.menu-tree-panel .panel-head {
  align-items: flex-start;
}
.menu-drop-root {
  display: grid;
  place-items: center;
  min-height: 42px;
  margin-bottom: 12px;
  border: 1px dashed #c9cfcc;
  border-radius: 10px;
  background: #fbfbfa;
  color: var(--muted);
  font-size: 13px;
}
.menu-drop-root.is-drag-over,
.menu-builder.is-drag-over,
.menu-children.is-drag-over {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.menu-builder,
.menu-children {
  display: grid;
  gap: 10px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid transparent;
  border-radius: 10px;
}
.menu-children {
  margin: 10px 0 0 42px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
  border-radius: 0;
}
.menu-children:empty::before {
  content: "Unterpunkt hier ablegen";
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px dashed var(--line);
  border-radius: 9px;
  color: var(--muted);
  font-size: 12px;
}
.menu-children.is-drag-over:empty::before {
  border-color: var(--brand);
  color: var(--brand);
}
.menu-node-item {
  display: block;
}
.menu-node-item.is-dragging {
  opacity: .45;
}
.menu-node-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  box-shadow: var(--shadow);
}
.menu-node-row:hover {
  border-color: #cfd4d1;
  background: #fbfbfa;
}
.drag-handle {
  width: 34px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--muted);
  background: #f6f6f4;
  cursor: grab;
}
.drag-handle:active {
  cursor: grabbing;
}
.drag-handle svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}
.menu-node-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, .9fr) auto auto;
  gap: 10px;
  align-items: center;
  margin: 0;
}
.menu-node-form label {
  margin: 0;
}
.menu-node-form input[name=label] {
  font-weight: 500;
}
.menu-node-path {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-visible {
  min-height: auto;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
}
.secondary-button {
  background: #fff;
  color: var(--ink);
}
.secondary-button:hover {
  background: #f6f6f4;
  color: var(--ink);
}
.menu-delete-form {
  margin: 0;
}
table { width: 100%; border-collapse: collapse; background: #fff; }
.muted { color: var(--muted); }
th, td { border-bottom: 1px solid var(--line); padding: 12px 10px; text-align: left; vertical-align: top; }
th { color: #6f6f6f; font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 500; }
td { font-weight: 400; }
tr:hover td { background: #fafafa; }
.table-actions {
  width: 1%;
  white-space: nowrap;
}
.row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}
.table-actions form {
  display: inline-flex;
  margin: 0;
}
.item-title-preview {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 400;
}
.item-title-preview:hover {
  color: var(--brand);
}
.item-title-preview img {
  display: block;
  width: 48px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  object-fit: cover;
  object-position: 70% center;
}
.editable-table input,
.editable-table select,
.editable-table textarea {
  border-color: transparent;
  background: transparent;
  padding-left: 0;
}
.editable-row:hover input,
.editable-row:hover select,
.editable-row:hover textarea,
.editable-table input:focus,
.editable-table select:focus,
.editable-table textarea:focus {
  border-color: var(--line);
  background: #fff;
  padding-left: 11px;
}
.edit-icon {
  float: right;
  opacity: 0;
  color: var(--brand);
  font-size: 11px;
  font-weight: 500;
}
.editable-row:hover .edit-icon { opacity: 1; }
.admin-thumb {
  display: block;
  width: 220px;
  max-width: 100%;
  height: 120px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 10px;
}
.admin-thumb.small { width: 92px; height: 72px; }
.admin-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.admin-gallery img {
  width: 96px;
  height: 68px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.hero-upload-cell {
  min-width: 118px;
}
.hero-list-upload {
  display: grid;
  grid-template-columns: 86px auto;
  gap: 8px;
  align-items: center;
  margin: 0;
}
.hero-image-picker {
  display: block;
  margin: 0;
  cursor: pointer;
}
.hero-image-picker input {
  display: none;
}
.hero-list-thumb,
.hero-list-empty {
  width: 86px;
  height: 54px;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.hero-list-thumb {
  display: block;
  object-fit: cover;
}
.hero-list-empty {
  display: grid;
  place-items: center;
  background: #f6f6f4;
  color: var(--muted);
  font-size: 12px;
}
.hero-list-empty svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}
.upload-status {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.status-form { margin: 0; }
.status-form select {
  min-width: 126px;
  padding: 8px 10px;
}
.icon-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.icon-actions form { margin: 0; }
.icon-button,
button.icon-button,
button.icon-button[type=submit] {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}
.icon-button:hover,
button.icon-button:hover {
  color: var(--ink);
  background: #f6f6f4;
}
.icon-button.danger:hover,
button.icon-button.danger:hover {
  color: var(--danger);
  border-color: #ffd6d1;
  background: #fff8f7;
}
.icon-button svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.8;
}
.sticky-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  padding: 14px 0 0;
  background: transparent;
}
.items-library .panel-head {
  margin-bottom: 16px;
}
.item-filter-bar {
  display: grid;
  grid-template-columns: minmax(210px, 1.45fr) repeat(3, minmax(140px, .82fr)) auto;
  gap: 10px;
  align-items: end;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fbfbfa;
}
.item-filter-bar label {
  margin: 0;
  gap: 5px;
}
.item-filter-bar label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.item-filter-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}
.item-filter-actions button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  white-space: nowrap;
}
.item-filter-actions svg {
  width: 16px;
  height: 16px;
}
.item-alpha-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -4px 0 18px;
}
.item-alpha-filter a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1;
  transition: background .16s ease, color .16s ease, opacity .16s ease;
}
.item-alpha-filter a:hover {
  background: rgba(255, 255, 255, .07);
  color: var(--ink);
}
.item-alpha-filter a.active {
  background: var(--brand);
  color: #fff;
}
.item-alpha-filter a.is-disabled {
  opacity: .28;
  pointer-events: none;
}
.table-empty {
  padding: 32px 12px;
  color: var(--muted);
  text-align: center;
}
.item-detail-modal {
  width: min(980px, calc(100% - 32px));
  max-height: min(92vh, 940px);
}
.item-detail-form {
  display: grid;
  min-height: 0;
}
.item-detail-scroll {
  max-height: calc(86vh - 125px);
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}
.item-detail-scroll .editable-table {
  margin: 0;
}
.item-detail-scroll .editable-table th {
  width: 235px;
}
.item-detail-modal .sticky-actions {
  padding-top: 12px;
}
pre { overflow: auto; background: #0b1020; color: #d8e2ff; padding: 16px; border-radius: 8px; }
.error { color: var(--danger); }
.ok { color: var(--ok); }
.alert { padding: 11px 13px; border-radius: 8px; background: #fff8f7; border: 1px solid #ffd6d1; }
.alert.ok { background: var(--brand-soft); border-color: #c9eadf; }
.schema-import-note {
  margin: 0 0 16px;
  padding: 11px 13px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fbfbfa;
  color: #444;
}
.schema-import-note code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #f0f0ee;
  font-size: 13px;
}
.design-code-editor {
  grid-column: 1 / -1;
  margin-top: 6px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fbfbfa;
  overflow: hidden;
}
.design-code-editor summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}
.design-code-editor summary::-webkit-details-marker {
  display: none;
}
.design-code-editor summary svg {
  width: 16px;
  height: 16px;
  color: var(--brand);
}
.design-code-editor > p,
.design-code-editor > label {
  margin: 0 12px 12px;
}
.design-code-editor textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.5;
}
.ai-admin-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-weight: 500;
}
.ai-admin-status.aktiv {
  border-color: #c9eadf;
  background: var(--brand-soft);
  color: var(--ok);
}
.ai-admin-status svg {
  width: 16px;
  height: 16px;
}
.ai-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.ai-kpi {
  display: grid;
  gap: 7px;
  align-content: start;
}
.ai-kpi svg {
  width: 20px;
  height: 20px;
  color: var(--brand);
}
.ai-kpi strong {
  font-size: 20px;
  font-weight: 500;
}
.ai-kpi span {
  color: var(--muted);
  font-size: 13px;
}
.ai-preview-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fbfbfa;
}
.ai-preview-row.compact {
  padding: 8px;
}
.ai-badge {
  --ai-badge-bg: rgba(255,255,255,.82);
  --ai-badge-border: rgba(127, 148, 178, .35);
  --ai-badge-color: #202123;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 32px;
  min-height: 30px;
  max-width: 190px;
  padding: 5px 8px;
  border: 1px solid var(--ai-badge-border);
  border-radius: 999px;
  background: var(--ai-badge-bg);
  color: var(--ai-badge-color);
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 11px;
  line-height: 1;
  font-weight: 500;
  white-space: nowrap;
  transition: max-width .2s ease, border-color .16s ease, background .16s ease;
}
.ai-badge-symbol {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.ai-badge-symbol svg,
.ai-admin-badge-custom svg {
  width: 15px;
  height: 15px;
}
.ai-badge-text {
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  transition: max-width .2s ease, opacity .16s ease;
}
.ai-badge-display-hover:hover .ai-badge-text,
.ai-badge-display-hover:focus-visible .ai-badge-text,
.ai-badge-display-full .ai-badge-text {
  max-width: 140px;
  opacity: 1;
}
.ai-badge-display-full {
  max-width: 190px;
}
.ai-badge-dark {
  --ai-badge-bg: rgba(32,33,35,.86);
  --ai-badge-border: rgba(255,255,255,.22);
  --ai-badge-color: #fff;
}
.ai-badge-minimal {
  --ai-badge-bg: transparent;
  box-shadow: none;
}
.ai-page-state-list,
.ai-page-edit-list {
  display: grid;
  gap: 10px;
}
.ai-page-state-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fbfbfa;
  color: var(--ink);
}
.ai-page-state-list small,
.ai-config-card small,
.ai-image-row small,
.ai-page-editor small {
  color: var(--muted);
}
.ai-page-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.ai-disclosure-table td:first-child,
.ai-content-table td:first-child {
  min-width: 220px;
}
.ai-disclosure-table td > strong,
.ai-content-table td > strong,
.ai-disclosure-table td > small,
.ai-content-table td > small {
  display: block;
}
.ai-disclosure-table input,
.ai-disclosure-table select {
  min-width: 150px;
}
.ai-disclosure-table .check.compact {
  margin: 0;
  white-space: nowrap;
}
.ai-content-table code {
  color: var(--muted);
  font-size: 12px;
}
.ai-page-modal {
  width: min(1040px, calc(100% - 32px));
}
.ai-page-modal-form {
  display: grid;
  gap: 13px;
}
.ai-page-modal-form .sticky-actions {
  margin-top: 2px;
}
.status-pill.status-draft {
  background: #f7f1e7;
  color: #8a5a16;
}
.ai-config-card,
.ai-page-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fbfbfa;
}
.compact-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ai-image-list {
  display: grid;
  gap: 10px;
}
.ai-image-row {
  display: grid;
  grid-template-columns: 70px minmax(150px, 1fr) repeat(4, minmax(120px, .75fr));
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fbfbfa;
}
.ai-image-row img {
  width: 70px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}
.ai-page-editor header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ai-icon-test-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.ai-icon-test-grid > div {
  display: grid;
  gap: 10px;
  align-content: center;
  min-height: 94px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
}
.ai-icon-test-grid > div.is-dark {
  background: #111827;
  color: #fff;
}
.ai-icon-test-grid small {
  color: var(--muted);
}
.ai-icon-test-grid .is-dark small {
  color: rgba(255,255,255,.68);
}
.ai-cookie-preview {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fbfbfa;
}
.consent-ai-note {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #dbe7f8;
  border-radius: 12px;
  background: #fff;
}
.consent-ai-note span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
}
.consent-ai-note p {
  margin: 0;
  color: #444;
  font-size: 12px;
}
.consent-ai-note a {
  font-size: 12px;
  font-weight: 500;
}
@media (max-width: 1100px) {
  .dashboard-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .ai-overview-grid,
  .ai-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ai-image-row {
    grid-template-columns: 70px minmax(0, 1fr);
  }
  .ai-image-row select,
  .ai-image-row input {
    grid-column: 2;
  }
}
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .sidebar-logout { margin-top: 12px; }
  .admin-frontend-shortcut {
    top: auto;
    right: 16px;
    bottom: 16px;
  }
  .main { padding: 18px; }
  .dashboard-stats,
  .coverage-grid {
    grid-template-columns: 1fr;
  }
  .database-backups .panel-head {
    align-items: stretch;
    flex-direction: column;
  }
  .backup-list article {
    grid-template-columns: 1fr;
  }
  .admin-subnav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .managed-page-switch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .automation-flow { grid-template-columns: 1fr; }
  .automation-dashboard-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .automation-calendar-panel .automation-mini-calendar { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .automation-manual-test-main { grid-template-columns: 1fr; align-items: stretch; }
  .automation-manual-test-settings { padding-bottom: 0; }
  .automation-manual-test-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .automation-workflow-shell { grid-template-columns: 1fr; min-height: 0; }
  .automation-workflow-library { order: 2; }
  .automation-workflow-stage { min-width: 0; }
  .automation-workflow-toolbar { align-items: stretch; flex-direction: column; }
  .automation-workflow-actions { justify-content: flex-start; }
  .automation-workflow-canvas { padding: 22px; }
  .automation-flow-row { grid-template-columns: 1fr; min-width: 0; gap: 18px; }
  .automation-node { min-height: 0; }
  .automation-node-ai-note { grid-template-columns: 1fr; }
  .automation-node::after {
    top: calc(100% + 4px);
    left: 32px;
    width: 2px;
    height: 10px;
  }
  .automation-workflow-modal-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .automation-output-grid {
    grid-template-columns: 1fr;
  }
  .automation-workflow-inspector { grid-template-columns: 1fr; }
  .automation-workflow-inspector article { border-left: 0; border-top: 1px solid var(--line); }
  .automation-workflow-inspector article:first-child { border-top: 0; }
  .automation-grid { grid-template-columns: 1fr; }
  .automation-import-grid { grid-template-columns: 1fr; }
  .automation-state-panel { align-items: flex-start; flex-direction: column; }
  .automation-state-summary { grid-template-columns: 1fr; width: 100%; }
  .automation-overview-tools { align-items: stretch; flex-direction: column; width: 100%; }
  .automation-overview-tools .automation-run-actions { justify-content: flex-start; width: 100%; }
  .automation-state-checks { justify-content: flex-start; min-width: 0; }
  .automation-overview-grid { grid-template-columns: 1fr; }
  .automation-run-facts div { grid-template-columns: 1fr; gap: 3px; }
  .automation-run-actions { align-items: stretch; }
  .automation-run-actions form,
  .automation-run-actions button { width: 100%; }
  .automation-result-summary { grid-template-columns: 1fr; }
  .page-title-row,
  .actions, .inline-upload { align-items: stretch; flex-direction: column; }
  .title-actions { align-items: stretch; flex-direction: column; }
  .panel-actions { align-items: stretch; flex-direction: column; }
  .panel-actions .button,
  .panel-actions .undo-import-button { justify-content: center; width: 100%; }
  .inline-upload input { max-width: none; }
  .create-item-upload,
  .single-file-upload { grid-template-columns: 1fr; min-width: 0; }
  .roundtrip-grid { grid-template-columns: 1fr; }
  .roundtrip-card { min-height: 0; }
  .roundtrip-export-form > button,
  .roundtrip-upload button,
  .roundtrip-card > a.button { justify-self: stretch; justify-content: center; }
  .menu-create-form,
  .menu-node-row,
  .menu-node-form,
  .layout-editor-row,
  .section-editor-meta,
  .hero-settings-layout,
  .animated-hero-grid { grid-template-columns: 1fr; }
  .managed-info-form,
  .managed-button-fields,
  .managed-section-fields { grid-template-columns: 1fr; }
  .portal-settings-grid { grid-template-columns: 1fr; }
  .plugin-install-form,
  .plugin-install-fields,
  .plugin-fields { grid-template-columns: 1fr; }
  .plugin-entry summary { grid-template-columns: 40px minmax(0, 1fr); }
  .plugin-entry summary small,
  .plugin-entry summary em {
    grid-column: 2;
    justify-self: start;
  }
  .layout-sortable-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }
  .layout-sortable-row label {
    grid-column: 2;
  }
  .managed-section-editor summary {
    grid-template-columns: 38px minmax(0, 1fr);
  }
  .managed-section-editor summary small {
    grid-column: 2;
    text-align: left;
  }
  .hero-settings-title-row { flex-direction: column; }
  .animated-hero-panel-toggle {
    justify-self: stretch;
    width: 100%;
  }
  .hero-settings-form > button[type=submit] { justify-self: stretch; }
  .menu-children { margin-left: 14px; }
  .drag-handle { width: 100%; height: 36px; }
  .modal-head { align-items: flex-start; }
  .theme-settings-grid,
  .theme-font-grid,
  .theme-size-grid,
  .placement-grid,
  .placement-fields,
  .guide-grid { grid-template-columns: 1fr; }
  .item-filter-bar {
    grid-template-columns: 1fr;
  }
  .item-filter-actions {
    flex-wrap: wrap;
  }
  .item-detail-modal {
    padding: 16px;
  }
  .item-detail-scroll .editable-table th {
    width: auto;
  }
  .ai-overview-grid,
  .ai-page-grid,
  .compact-fields {
    grid-template-columns: 1fr;
  }
  .consent-ai-note {
    grid-template-columns: 28px minmax(0, 1fr);
  }
  .consent-ai-note a {
    grid-column: 2;
  }
}

/* Media library and configurable item placeholders */
.settings-placeholder-head {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

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

.item-hero-placeholder-preview {
  aspect-ratio: 16 / 7;
}

.item-icon-placeholder-preview {
  aspect-ratio: 1 / 1;
}

.item-hero-placeholder-preview img,
.item-icon-placeholder-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.media-stats {
  margin-bottom: 18px;
}

.media-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(170px, 220px) auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}

.media-search {
  position: relative;
  margin: 0;
}

.media-search svg {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 17px;
  height: 17px;
  color: var(--text-muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.media-search input {
  width: 100%;
  padding-left: 40px;
}

.media-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.media-library-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
}

.media-library-preview {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-input);
}

.media-library-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .24s ease;
}

.media-library-preview:hover img {
  transform: scale(1.025);
}

.media-library-preview > span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 7px;
  border-radius: 5px;
  background: rgba(4, 14, 25, .78);
  color: #fff;
  font-size: 10px;
  letter-spacing: .04em;
}

.media-library-info {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px 13px 11px;
}

.media-library-info > strong {
  overflow: hidden;
  color: var(--text-heading);
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-library-info > small {
  font-size: 11px;
}

.media-library-info > div {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--text-muted);
  font-size: 10px;
}

.media-library-info > div span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.media-library-info > div svg {
  width: 12px;
  height: 12px;
}

.media-library-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px 12px;
  margin-top: auto;
}

.media-library-actions form {
  margin: 0;
}

.media-library-actions .icon-button {
  width: 32px;
  height: 32px;
}

.media-library-actions .icon-button.danger {
  color: #ef4444;
}

.media-library-actions .icon-button.copied {
  color: var(--ok);
}

.media-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 56px 20px;
  text-align: center;
}

.media-empty > svg {
  width: 34px;
  height: 34px;
  color: var(--brand-2);
}

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

.media-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 12px;
}

.media-pagination > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.media-pagination strong {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

.media-upload-modal {
  width: min(620px, calc(100vw - 28px));
}

.media-edit-modal {
  width: min(920px, calc(100vw - 28px));
}

.media-edit-layout {
  display: grid;
  grid-template-columns: minmax(260px, .85fr) minmax(320px, 1.15fr);
  gap: 20px;
  margin-bottom: 18px;
}

.media-edit-preview {
  min-height: 320px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-input);
}

.media-edit-preview img {
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: contain;
}

.media-edit-form {
  display: grid;
  align-content: start;
  gap: 12px;
}

.media-file-facts {
  display: grid;
  gap: 7px;
  margin: 4px 0 0;
}

.media-file-facts > div {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 10px;
}

.media-file-facts dt {
  color: var(--text-muted);
  font-size: 11px;
}

.media-file-facts dd {
  min-width: 0;
  margin: 0;
  color: var(--text-primary);
  font-size: 11px;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .media-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .media-toolbar select {
    grid-column: 1 / -1;
  }

  .media-edit-layout {
    grid-template-columns: 1fr;
  }

  .media-edit-preview {
    min-height: 220px;
  }
}

@media (max-width: 640px) {
  .settings-placeholder-grid {
    grid-template-columns: 1fr;
  }

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

  .media-library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .media-library-info {
    padding: 10px;
  }

  .media-library-info > div {
    display: none;
  }

  .media-library-info > strong {
    font-size: 12px;
  }
}

/* Admin v2 hardening: catch remaining legacy light surfaces and compact sidebar */
@media (min-width: 761px) {
  .layout {
    grid-template-columns: 224px minmax(0, 1fr);
  }

  .sidebar {
    overflow-y: auto;
    padding: 11px 10px 10px;
    scrollbar-width: none;
  }

  .sidebar::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .admin-brand {
    min-height: 40px;
    gap: 9px;
    margin: 0 3px 8px;
  }

  .admin-brand img,
  .admin-brand > span {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .admin-brand svg {
    width: 19px;
    height: 19px;
  }

  .admin-brand strong {
    font-size: 13px;
  }

  .admin-brand small {
    margin-top: 1px;
    font-size: 10px;
  }

  .sidebar-group {
    gap: 2px;
    margin-bottom: 7px;
  }

  .sidebar-label {
    margin: 7px 8px 4px;
    font-size: 10px;
  }

  .sidebar a,
  .sidebar-logout button {
    min-height: 32px;
    gap: 9px;
    padding: 7px 9px;
    border-radius: 7px;
    font-size: 13px;
  }

  .sidebar a svg,
  .sidebar-logout button svg {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
  }

  .admin-user-card {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
    margin-bottom: 6px;
    padding: 7px;
    border-radius: 7px;
  }

  .admin-user-card > span {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }

  .admin-user-card strong {
    font-size: 12px;
  }

  .admin-user-card small {
    margin-top: 1px;
    font-size: 11px;
  }

  .sidebar-logout {
    padding-top: 8px;
  }
}

.main :where(
  .settings-media-card,
  .settings-preview,
  .theme-color-card,
  .theme-preview,
  .theme-font-grid,
  .theme-size-grid,
  .placement-grid,
  .placement-fields,
  .placement-card,
  .placement-preview,
  .ad-preview-box,
  .managed-page-panel,
  .managed-info-form,
  .managed-button-fields,
  .managed-section-fields,
  .managed-section-editor,
  .managed-section-editor summary,
  .managed-section-editor section,
  .managed-section-code,
  .managed-page-switch a,
  .layout-sortable,
  .layout-sortable-row,
  .section-editor,
  .section-editor-meta,
  .section-focus-controls,
  .section-help,
  .portal-settings-card,
  .portal-settings-grid,
  .plugin-install-form,
  .plugin-install-fields,
  .plugin-entry,
  .plugin-entry summary,
  .plugin-fields,
  .plugin-upload-drop,
  .plugin-preview,
  .menu-tree-panel,
  .menu-node-row,
  .menu-node-form,
  .menu-create-form,
  .menu-children,
  .item-create-cards,
  .item-create-card,
  .item-definition-create-card,
  .item-roundtrip-panel,
  .roundtrip-card,
  .roundtrip-field-selector,
  .roundtrip-upload,
  .roundtrip-export-form,
  .item-detail-scroll,
  .ai-overview-grid article,
  .ai-config-card,
  .ai-page-editor,
  .ai-page-grid article,
  .ai-image-row,
  .ai-icon-test-grid > div,
  .ai-cookie-preview,
  .consent-ai-note,
  .template-preview-card,
  .template-preview,
  .upload-drop,
  .single-file-upload,
  .create-item-upload,
  .inline-upload,
  .backup-list article,
  .coverage-grid article,
  .dashboard-item-list a,
  .database-status-list article,
  .guide-card,
  .faq-item,
  .design-code-editor,
  .image-preview,
  .upload-preview,
  .result-box,
  .schema-import-note
) {
  background: var(--panel) !important;
  border-color: var(--line) !important;
  color: var(--ink);
  box-shadow: none !important;
}

.main :where(
  .settings-preview,
  .theme-preview,
  .placement-preview,
  .ad-preview-box,
  .roundtrip-field-selector,
  .upload-drop,
  .plugin-upload-drop,
  .single-file-upload,
  .create-item-upload,
  .inline-upload,
  .ai-cookie-preview,
  .consent-ai-note,
  .template-preview,
  .image-preview,
  .upload-preview
) {
  background: rgba(4, 14, 25, .58) !important;
}

.main :where(.theme-preview button, .managed-page-panel a.button-link, .text-action) {
  background: rgba(255, 255, 255, .045) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}

.main :where(.theme-preview button, .managed-page-panel a.button-link, .text-action):hover {
  background: rgba(255, 255, 255, .08) !important;
  color: #fff !important;
}

.main :where(input, select, textarea) {
  background: rgba(4, 14, 25, .72) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}

.main :where(table, thead, tbody, tr, th, td) {
  background-color: transparent;
  box-shadow: none !important;
}

.main table {
  background: var(--panel) !important;
}

.main thead,
.main th {
  background: rgba(7, 19, 33, .82) !important;
}

.main tbody tr:hover td {
  background: rgba(255, 255, 255, .03) !important;
}

.main :where(.alert, .notice, .success, .import-success) {
  box-shadow: none !important;
}

/* Admin v2 */
:root {
  color-scheme: dark;
  --bg: #06111d;
  --panel: rgba(12, 25, 39, .92);
  --panel-solid: #0c1927;
  --panel-soft: rgba(16, 33, 50, .86);
  --panel-muted: rgba(8, 18, 30, .7);
  --surface-page: #06111d;
  --surface-panel: rgba(12, 25, 39, .92);
  --surface-raised: #102235;
  --surface-subtle: rgba(255, 255, 255, .035);
  --surface-input: rgba(4, 14, 25, .76);
  --surface-hover: rgba(255, 255, 255, .065);
  --line: rgba(118, 150, 184, .22);
  --line-soft: rgba(118, 150, 184, .12);
  --ink: #f5f8fc;
  --text-heading: #f7f9fc;
  --text-primary: #e6edf5;
  --text-label: #d7e0ea;
  --text-secondary: #aebccd;
  --text-muted: #8d9db0;
  --text-disabled: #64758a;
  --muted: var(--text-secondary);
  --muted-2: var(--text-muted);
  --brand: #2474ff;
  --brand-2: #4fa3ff;
  --brand-soft: rgba(36, 116, 255, .15);
  --brand-panel: rgba(36, 116, 255, .22);
  --focus-ring: rgba(79, 163, 255, .24);
  --focus-border: rgba(91, 164, 255, .82);
  --danger: #ff5252;
  --danger-soft: rgba(255, 82, 82, .14);
  --ok: #4ade80;
  --ok-soft: rgba(74, 222, 128, .14);
  --warning: #f5a524;
  --warning-soft: rgba(245, 165, 36, .15);
  --shadow: none;
}

html {
  background: var(--bg);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% -12%, rgba(36, 116, 255, .2), transparent 34%),
    radial-gradient(circle at 0 18%, rgba(61, 161, 255, .1), transparent 28%),
    linear-gradient(180deg, #071421 0%, #06111d 42%, #050d17 100%);
  color: var(--ink);
  font-size: 14px;
}

a {
  color: #6da9ff;
}

.layout {
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  gap: 0;
  padding: 20px 14px 16px;
  background: linear-gradient(180deg, rgba(5, 13, 23, .96), rgba(6, 16, 28, .94));
  border-right: 1px solid var(--line);
  color: var(--ink);
  scrollbar-width: thin;
}

.sidebar h2 {
  display: none;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  margin: 0 4px 18px;
}

.admin-brand img,
.admin-brand > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid rgba(245, 248, 252, .72);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  color: #fff;
}

.admin-brand img {
  object-fit: contain;
  padding: 5px;
}

.admin-brand svg {
  width: 24px;
  height: 24px;
}

.admin-brand strong {
  display: block;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: .01em;
}

.admin-brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.sidebar-group {
  gap: 5px;
  margin: 0 0 17px;
}

.sidebar-label {
  margin: 14px 8px 7px;
  color: #8494a8;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .055em;
}

.sidebar a,
.sidebar-logout button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 10px 11px;
  color: #c8d3df;
  border-radius: 8px;
  font-weight: 500;
  line-height: 1;
  background: transparent;
  border: 1px solid transparent;
}

.sidebar a svg,
.sidebar-logout button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: #aab7c8;
  stroke-width: 1.85;
}

.sidebar a:hover,
.sidebar-logout button:hover {
  background: rgba(255, 255, 255, .045);
  border-color: transparent;
  color: #fff;
}

.sidebar a:hover svg,
.sidebar-logout button:hover svg {
  color: #fff;
}

.sidebar a.active {
  background: linear-gradient(135deg, rgba(36, 116, 255, .9), rgba(19, 82, 181, .82));
  color: #fff;
}

.sidebar a.active svg {
  color: #fff;
}

.admin-user-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: auto 0 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
}

.admin-user-card > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.admin-user-card strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.sidebar-logout {
  margin: 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
}

.sidebar-logout button[type=submit],
.sidebar-logout button[type=submit]:hover {
  background: transparent;
  color: #c8d3df;
  filter: none;
}

.main {
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 18px 32px 34px;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-height: 58px;
  margin: -18px -32px 22px;
  padding: 14px 32px 12px;
  background: linear-gradient(180deg, rgba(6, 17, 29, .96), rgba(6, 17, 29, .74));
  backdrop-filter: blur(14px);
}

.admin-global-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(380px, 42vw);
  margin: 0;
}

.admin-global-search svg {
  position: absolute;
  left: 13px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
}

.admin-global-search input {
  min-height: 42px;
  padding: 10px 52px 10px 40px;
  border-color: var(--line);
  border-radius: 8px;
  background: rgba(4, 14, 25, .82);
  color: var(--ink);
}

.admin-global-search kbd {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .07);
  color: var(--muted);
  font: 600 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

.admin-quick-actions a,
.admin-quick-actions button {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .055);
  color: #dce7f3;
}

.admin-quick-actions a:hover,
.admin-quick-actions button:hover {
  background: rgba(255, 255, 255, .095);
  color: #fff;
}

.admin-quick-actions svg {
  width: 18px;
  height: 18px;
}

.admin-quick-actions span {
  position: absolute;
  top: -5px;
  right: -2px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.admin-frontend-shortcut {
  display: none;
}

.page-title-row,
.dashboard-heading {
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.page-title-row h1,
h1 {
  color: #fff;
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 600;
  letter-spacing: 0;
}

h2 {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

h3,
.panel h3,
.card h3 {
  color: #fff;
  font-weight: 500;
}

.muted,
.panel-head p,
.card span,
small {
  color: var(--muted);
}

.panel,
.card,
.dashboard-stat,
.backup-list article,
.coverage-grid article,
.database-status-list article,
.managed-page-switch a,
.layout-sortable-row,
.managed-section-editor,
.plugin-entry,
.ai-config-card,
.ai-page-editor,
.ai-image-row,
.placement-card,
.theme-color-card,
.theme-preview,
.roundtrip-card,
.template-preview-card,
.upload-drop,
.plugin-upload-drop,
.menu-node-row,
.menu-create-form,
.item-create-card,
.item-definition-create-card,
.guide-card,
.faq-item,
.design-code-editor,
.item-filter-bar,
.consent-ai-note {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: none;
}

.panel,
.card {
  border-radius: 10px;
  padding: 22px;
}

.panel-head {
  align-items: flex-start;
  gap: 12px;
}

.panel-head h2,
.panel-head p {
  margin: 0;
}

.panel-head p {
  margin-top: 5px;
}

.dashboard-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-stat {
  min-height: 112px;
  border-radius: 10px;
}

.dashboard-stat strong,
.card strong {
  color: #fff;
  font-weight: 600;
}

.dashboard-stat svg {
  color: var(--brand-2);
  background: rgba(36, 116, 255, .18);
}

.dashboard-grid {
  gap: 16px;
}

.database-backups button,
.backup-list button,
button.restore-button[type=submit],
button.thumbnail-refresh-button[type=submit],
button.undo-import-button,
button.undo-import-button[type=submit],
.secondary-button,
a.button.secondary {
  background: rgba(255, 255, 255, .045);
  border-color: var(--line);
  color: var(--ink);
}

.database-backups button:hover,
.backup-list button:hover,
button.restore-button[type=submit]:hover,
button.thumbnail-refresh-button[type=submit]:hover,
button.undo-import-button:hover,
button.undo-import-button[type=submit]:hover,
.secondary-button:hover,
a.button.secondary:hover {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(118, 150, 184, .34);
  color: #fff;
}

input,
select,
textarea {
  min-height: 40px;
  border-color: var(--line);
  background: rgba(4, 14, 25, .72);
  color: var(--ink);
}

textarea {
  line-height: 1.55;
}

input::placeholder,
textarea::placeholder {
  color: #6d7f93;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(36, 116, 255, .22);
  border-color: rgba(80, 151, 255, .72);
}

select {
  color-scheme: dark;
}

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

.check input,
input[type=checkbox],
input[type=radio] {
  min-height: auto;
  accent-color: var(--brand);
}

button,
a.button,
button.button {
  border-color: var(--line);
  border-radius: 8px;
  font-weight: 500;
  transition: background .16s ease, border-color .16s ease, color .16s ease, opacity .16s ease;
}

a.button,
button.primary,
button[type=submit] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

button:hover {
  background: rgba(255, 255, 255, .075);
  color: #fff;
  filter: none;
}

a.button:hover,
button.primary:hover,
button[type=submit]:hover {
  background: #2f7dff;
  border-color: #2f7dff;
  color: #fff;
  filter: none;
}

button.danger,
.icon-button.danger,
button.icon-button.danger,
button.delete-button {
  color: var(--danger);
}

button.danger:hover,
.icon-button.danger:hover,
button.icon-button.danger:hover,
button.delete-button:hover {
  background: var(--danger-soft);
  color: #ff7777;
}

.admin-subnav {
  gap: 6px;
  padding: 5px;
  border-color: var(--line);
  border-radius: 10px;
  background: rgba(5, 14, 25, .78);
  box-shadow: none;
}

.admin-subnav a {
  color: #b9c7d8;
  font-weight: 500;
}

.admin-subnav a:hover {
  background: rgba(255, 255, 255, .06);
  color: #fff;
}

.admin-subnav a.active {
  background: var(--brand-panel);
  color: #fff;
}

.managed-page-switch a {
  border-radius: 10px;
}

.managed-page-switch a:hover,
.managed-page-switch a.active {
  background: var(--brand-soft);
  border-color: rgba(80, 151, 255, .42);
  color: #fff;
}

.managed-page-switch strong,
.managed-page-switch span {
  color: inherit;
}

table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
}

thead,
th {
  background: rgba(7, 19, 33, .8);
}

th {
  color: #aab7c8;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .035em;
  text-transform: uppercase;
}

td {
  border-top-color: var(--line-soft);
  color: #dce5ef;
}

tr:hover td,
tbody tr:hover {
  background: rgba(255, 255, 255, .025);
}

code,
.ai-content-table code,
.chip,
.status-badge,
.type-badge,
.menu-path-badge,
.slug-pill {
  border-color: var(--line);
  background: rgba(255, 255, 255, .06);
  color: #dfeaff;
}

.status-badge.published,
.status-badge.active,
.badge-ok,
.status-ok {
  background: var(--ok-soft);
  color: #7df0a1;
}

.status-badge.draft,
.status-badge.warning,
.badge-warning,
.status-warning {
  background: var(--warning-soft);
  color: #ffd38a;
}

.status-badge.error,
.badge-danger,
.status-danger {
  background: var(--danger-soft);
  color: #ff8c8c;
}

.table-actions,
.item-filter-actions,
.panel-actions,
.title-actions {
  gap: 8px;
}

.icon-button,
button.icon-button,
button.icon-button[type=submit] {
  border-color: var(--line);
  background: rgba(255, 255, 255, .045);
  color: #dce7f3;
}

.icon-button:hover,
button.icon-button:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.item-thumb,
.hero-thumb-preview,
.image-preview,
.upload-preview,
.settings-media-preview img,
.plugin-entry img {
  border-color: var(--line);
  background: rgba(255, 255, 255, .035);
}

.alert {
  border-color: rgba(255, 82, 82, .32);
  background: var(--danger-soft);
  color: #ffd6d6;
}

.alert.ok,
.notice,
.success,
.import-success {
  border-color: rgba(74, 222, 128, .28);
  background: var(--ok-soft);
  color: #d8ffe4;
}

.alert.error {
  border-color: rgba(255, 82, 82, .32);
  background: var(--danger-soft);
  color: #ffd6d6;
}

.upload-drop,
.plugin-upload-drop,
.create-item-upload,
.single-file-upload,
.roundtrip-upload,
.inline-upload,
.design-code-editor {
  border-color: var(--line);
  background: rgba(4, 14, 25, .48);
}

.upload-drop:hover,
.plugin-upload-drop:hover,
.upload-drop.has-file,
.plugin-upload-drop.has-file {
  border-color: rgba(80, 151, 255, .54);
  background: rgba(36, 116, 255, .1);
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 12;
  margin: 16px -2px -2px;
  padding: 12px 0 0;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(6, 17, 29, .0), rgba(6, 17, 29, .95) 36%);
}

.managed-info-form .sticky-actions,
.item-detail-modal .sticky-actions,
.ai-page-modal-form .sticky-actions {
  background: linear-gradient(180deg, rgba(12, 25, 39, .0), rgba(12, 25, 39, .96) 38%);
}

dialog.admin-modal,
.admin-modal {
  border-color: var(--line);
  background: var(--panel-solid);
  color: var(--ink);
  box-shadow: none;
}

.admin-modal::backdrop {
  background: rgba(0, 0, 0, .62);
  backdrop-filter: blur(10px);
}

.modal-head {
  border-bottom-color: var(--line);
}

.modal-head h2 {
  color: #fff;
}

.editable-table input,
.editable-table select,
.editable-table textarea,
.editable-row:hover input,
.editable-row:hover select,
.editable-row:hover textarea,
.editable-table input:focus,
.editable-table select:focus,
.editable-table textarea:focus {
  background: rgba(4, 14, 25, .72);
  color: var(--ink);
}

.editable-row:hover .edit-icon {
  opacity: 1;
}

.menu-node-row,
.layout-sortable-row {
  border-radius: 10px;
}

.drag-handle {
  background: rgba(255, 255, 255, .045);
  border-color: var(--line);
  color: var(--muted);
}

.drag-handle:hover,
.drag-handle:active {
  background: rgba(36, 116, 255, .12);
  border-color: rgba(80, 151, 255, .42);
  color: #fff;
}

.section-editor textarea,
.design-code-editor textarea,
.managed-section-code textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(3, 10, 18, .78);
}

.theme-preview,
.ai-badge-preview,
.consent-ai-note {
  border-color: var(--line);
}

.ai-badge-preview .ai-badge,
.ai-badge {
  box-shadow: none;
}

.ai-disclosure-table input,
.ai-disclosure-table select {
  min-width: 150px;
}

.placement-preview,
.ad-preview-box {
  max-width: 100%;
  border-color: rgba(80, 151, 255, .34);
  background: rgba(36, 116, 255, .08);
}

.login-card {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  box-shadow: none;
}

.login-card h1 {
  color: #fff;
}

.panel.narrow,
form.panel.narrow {
  width: min(440px, calc(100vw - 32px));
  margin: 12vh auto;
}

pre,
.result-box,
.schema-import-note,
.ai-cookie-preview,
.ai-icon-test-grid > div,
.ai-image-row img,
.template-preview,
.json-template-preview,
.import-preview,
.code-preview {
  border-color: var(--line);
  background: rgba(4, 14, 25, .74);
  color: #dce7f3;
  box-shadow: none;
}

pre {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}

.ai-icon-test-grid > div.is-dark {
  background: #071421;
}

.ai-cookie-preview {
  border-color: var(--line);
}

.consent-ai-note a {
  color: #8bb8ff;
}

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .main {
    padding: 18px 22px 30px;
  }

  .admin-topbar {
    margin-inline: -22px;
    padding-inline: 22px;
  }

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

@media (max-width: 760px) {
  .layout {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-brand {
    margin-bottom: 10px;
  }

  .sidebar-group {
    margin-bottom: 12px;
  }

  .admin-user-card {
    margin-top: 12px;
  }

  .main {
    padding: 14px 14px 28px;
  }

  .admin-topbar {
    justify-content: space-between;
    margin: -14px -14px 18px;
    padding: 10px 14px;
  }

  .admin-global-search {
    width: min(260px, 62vw);
  }

  .admin-global-search kbd {
    display: none;
  }

  .page-title-row,
  .dashboard-heading {
    gap: 12px;
    padding-bottom: 16px;
  }

  .panel,
  .card {
    padding: 16px;
  }

  table {
    min-width: 760px;
  }

  .panel:has(table),
  .card:has(table),
  .items-library,
  .ai-table-wrap {
    overflow-x: auto;
  }
}

/* Admin v2 final overrides: must stay at file end */
@media (min-width: 761px) {
  .layout {
    grid-template-columns: 224px minmax(0, 1fr) !important;
  }

  .sidebar {
    padding: 11px 10px 10px !important;
    overflow-y: auto;
    scrollbar-width: none;
  }

  .sidebar::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .admin-brand {
    min-height: 40px !important;
    gap: 9px !important;
    margin: 0 3px 8px !important;
  }

  .admin-brand img,
  .admin-brand > span {
    width: 34px !important;
    height: 34px !important;
    flex-basis: 34px !important;
  }

  .admin-brand svg {
    width: 19px !important;
    height: 19px !important;
  }

  .admin-brand strong {
    font-size: 13px !important;
  }

  .admin-brand small {
    margin-top: 1px !important;
    font-size: 10px !important;
  }

  .sidebar-group {
    gap: 2px !important;
    margin-bottom: 7px !important;
  }

  .sidebar-label {
    margin: 7px 8px 4px !important;
    font-size: 10px !important;
  }

  .sidebar a,
  .sidebar-logout button {
    min-height: 32px !important;
    gap: 9px !important;
    padding: 7px 9px !important;
    border-radius: 7px !important;
    font-size: 13px !important;
  }

  .sidebar a svg,
  .sidebar-logout button svg {
    width: 16px !important;
    height: 16px !important;
    flex-basis: 16px !important;
  }

  .admin-user-card {
    grid-template-columns: 30px minmax(0, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 6px !important;
    padding: 7px !important;
    border-radius: 7px !important;
  }

  .admin-user-card > span {
    width: 30px !important;
    height: 30px !important;
    font-size: 11px !important;
  }

  .admin-user-card strong {
    font-size: 12px !important;
  }

  .admin-user-card small {
    margin-top: 1px !important;
    font-size: 11px !important;
  }

  .sidebar-logout {
    padding-top: 8px !important;
  }
}

.main :where(
  .panel,
  .card,
  .admin-subnav,
  .managed-page-switch a,
  .automation-status,
  .automation-kpi,
  .automation-result,
  .automation-result-summary span,
  .automation-debug,
  .automation-explain,
  .automation-flow article,
  .automation-placeholder,
  .automation-empty,
  .ads-txt-preview,
  .placement-card,
  .placement-preview,
  .adops-steps article,
  .homepage-hero-form,
  .hero-settings-form,
  .hero-settings-layout,
  .hero-settings-card,
  .hero-settings-card-wide,
  .animated-hero-block,
  .animated-hero-checks .check,
  .hero-note-toggle,
  .hero-admin-preview,
  .hero-settings-card .admin-thumb,
  .layout-editor,
  .layout-editor-row,
  .section-editor,
  .section-editor-row,
  .section-editor-meta,
  .managed-page-panel,
  .managed-info-form,
  .settings-surface,
  .managed-help,
  .managed-data-rule,
  .managed-button-fields,
  .managed-section-fields,
  .layout-sortable,
  .layout-sortable-row,
  .managed-section-library,
  .managed-section-editor,
  .managed-section-editor summary,
  .managed-section-editor section,
  .managed-section-code,
  .global-sections-intro,
  .global-section-fields,
  .section-render-options,
  .section-modal-help,
  .section-component-preview,
  .section-component-preview .editorial-info-card,
  .section-editor-toolbar,
  .section-state,
  .global-section-media,
  .section-focus-controls,
  .portal-active,
  .portal-settings-panel,
  .portal-settings-grid,
  .portal-settings-card,
  .portal-settings-preview,
  .settings-media-card,
  .settings-preview,
  .theme-color-card,
  .theme-preview,
  .plugin-install-form,
  .plugin-install-fields,
  .plugin-entry,
  .plugin-entry summary,
  .plugin-fields,
  .plugin-upload-drop,
  .plugin-preview,
  .ai-admin-status,
  .ai-overview-grid article,
  .ai-kpi,
  .ai-preview-row,
  .ai-page-state-list,
  .ai-page-edit-list,
  .ai-page-state-list a,
  .ai-config-card,
  .ai-page-editor,
  .ai-page-grid article,
  .ai-image-row,
  .ai-icon-test-grid > div,
  .ai-cookie-preview,
  .consent-ai-note,
  .upload-drop,
  .create-item-upload,
  .single-file-upload,
  .inline-upload,
  .roundtrip-upload,
  .roundtrip-field-selector,
  .result-box,
  .schema-import-note,
  .template-preview,
  .template-preview-card,
  .design-code-editor,
  .image-preview,
  .upload-preview,
  .menu-tree-panel,
  .menu-node-row,
  .menu-node-form,
  .menu-create-form,
  .hero-list-empty,
  .item-filter-bar,
  .item-detail-scroll,
  .backup-list article,
  .coverage-grid article,
  .dashboard-item-list a,
  .database-status-list article
) {
  background: var(--panel) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
}

.main :where(
  .admin-subnav,
  .settings-preview,
  .theme-preview,
  .placement-preview,
  .hero-admin-preview,
  .hero-settings-card .admin-thumb,
  .layout-editor,
  .section-editor,
  .managed-section-code,
  .portal-settings-preview,
  .plugin-upload-drop,
  .ai-cookie-preview,
  .consent-ai-note,
  .upload-drop,
  .single-file-upload,
  .create-item-upload,
  .inline-upload,
  .roundtrip-upload,
  .roundtrip-field-selector,
  .template-preview,
  .design-code-editor,
  .image-preview,
  .upload-preview,
  .hero-list-empty
) {
  background: rgba(4, 14, 25, .62) !important;
}

.main :where(input, select, textarea) {
  background: rgba(4, 14, 25, .76) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}

.main :where(input[type="checkbox"], input[type="radio"], input[type="file"], input[type="color"], input[type="range"]) {
  background: transparent !important;
}

.main :where(button:not(.primary), .secondary-button, a.button.secondary, .button-link, .text-action, .theme-preview button) {
  background: rgba(255, 255, 255, .045) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
}

.main :where(button:not(.primary), .secondary-button, a.button.secondary, .button-link, .text-action, .theme-preview button):hover {
  background: rgba(255, 255, 255, .08) !important;
  color: #fff !important;
}

.main :where(button[type="submit"], button.primary, a.button:not(.secondary)) {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
}

.main :where(table) {
  background: var(--panel) !important;
  border-color: var(--line) !important;
  box-shadow: none !important;
}

.main :where(thead, th) {
  background: rgba(7, 19, 33, .86) !important;
}

.main :where(tr, td) {
  background: transparent !important;
}

.main tbody tr:hover td {
  background: rgba(255, 255, 255, .03) !important;
}

.main :where(pre, code) {
  border-color: var(--line);
}

.main :where(.alert.ok, .notice, .success, .import-success) {
  background: var(--ok-soft) !important;
  border-color: rgba(74, 222, 128, .28) !important;
  color: #d8ffe4 !important;
}

.main :where(.alert.error, .alert) {
  background: var(--danger-soft) !important;
  border-color: rgba(255, 82, 82, .32) !important;
  color: #ffd6d6 !important;
}

.main .automation-subnav-toggle {
  margin-left: auto !important;
}

.main .automation-toggle-button[type="submit"] {
  border: 0 !important;
  box-shadow: none !important;
}

.main .automation-toggle-button.is-active[type="submit"] {
  background: rgba(248, 113, 113, .14) !important;
  color: #fecaca !important;
}

.main .automation-toggle-button.is-inactive[type="submit"] {
  background: rgba(74, 222, 128, .17) !important;
  color: #bbf7d0 !important;
}

.main .automation-toggle-button[type="submit"]:hover {
  background: rgba(255, 255, 255, .09) !important;
  color: #fff !important;
}

@media (min-width: 761px) {
  .admin-user-card {
    display: none !important;
  }

  .sidebar-group {
    gap: 3px !important;
    margin-bottom: 12px !important;
  }

  .sidebar-label {
    margin: 12px 8px 6px !important;
    font-size: 10.5px !important;
  }

  .sidebar a,
  .sidebar-logout button {
    min-height: 35px !important;
    padding: 7px 9px !important;
    font-size: 13.5px !important;
  }

  .sidebar-logout {
    padding-top: 10px !important;
  }
}

.hero-settings-form output {
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

/* Responsive admin navigation and shared horizontal action rows */
.admin-menu-toggle,
.admin-sidebar-close,
.admin-sidebar-backdrop {
  display: none;
}

.generated-item-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
}

.generated-item-card.compact {
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 13px;
}

.generated-item-card.has-media {
  grid-template-columns: 40px minmax(118px, 170px) minmax(0, 1fr);
  align-items: start;
}

.generated-item-media {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.generated-item-media > img,
.generated-item-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 9px;
  object-fit: cover;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, .03) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, .03) 25%, transparent 25%),
    rgba(4, 14, 24, .34);
  background-size: 18px 18px;
  color: rgba(134, 239, 172, .76);
}

.generated-item-placeholder svg {
  width: 34px;
  height: 34px;
  opacity: .58;
}

.generated-item-thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.generated-item-thumbs span,
.generated-item-thumbs img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 7px;
  object-fit: cover;
}

.automation-review-card {
  position: relative;
  padding: 14px;
  border: 1px solid rgba(74, 222, 128, .22);
  border-radius: 14px;
  background:
    radial-gradient(circle at 86% 0%, rgba(74, 222, 128, .12), transparent 38%),
    rgba(8, 20, 30, .66);
  min-height: 100%;
}

.automation-candidate-grid .automation-review-card.generated-item-card,
.automation-candidate-grid .automation-review-card.generated-item-card.has-media {
  grid-template-columns: 1fr;
  gap: 12px;
}

.automation-candidate-grid .generated-item-mark,
.automation-candidate-grid .generated-item-card.compact .generated-item-mark {
  position: absolute;
  z-index: 2;
  top: 22px;
  left: 22px;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(5, 15, 26, .72);
  color: #86efac;
}

.automation-candidate-grid .generated-item-mark svg {
  width: 17px;
  height: 17px;
}

.automation-candidate-grid .generated-item-media {
  gap: 7px;
}

.automation-candidate-grid .generated-item-media > img,
.automation-candidate-grid .generated-item-placeholder {
  aspect-ratio: 16 / 10;
  border-radius: 10px;
}

.automation-candidate-grid .generated-item-main > p {
  display: -webkit-box;
  min-height: 0;
  margin: 9px 0 10px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.automation-candidate-grid .generated-item-heading {
  gap: 9px;
}

.automation-candidate-grid .generated-item-heading h3 {
  font-size: 16px;
}

.automation-candidate-grid .generated-item-actions {
  margin-top: 12px;
}

.automation-test-result-card {
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(84, 99, 116, .58);
  border-radius: 16px;
  background: rgba(12, 20, 29, .72);
  color: var(--text-primary, var(--ink));
  animation: automationResultCardIn .5s cubic-bezier(.2, .8, .2, 1) both;
  transition: border-color .22s ease, transform .22s ease, background .22s ease;
}

.automation-test-result-card:hover {
  border-color: rgba(76, 141, 246, .46);
  transform: translateY(-2px);
}

.automation-test-result-card.is-imported {
  border-color: rgba(34, 197, 94, .34);
}

.automation-test-result-card.is-discarded {
  opacity: .56;
}

.automation-test-result-media {
  position: relative;
  overflow: hidden;
  background: rgba(4, 14, 24, .64);
}

.automation-test-result-card .generated-item-media {
  display: block;
  gap: 0;
}

.automation-test-result-card .generated-item-media > img,
.automation-test-result-card .generated-item-placeholder {
  width: 100%;
  aspect-ratio: 2 / 1;
  border-radius: 0;
}

.automation-test-result-card .generated-item-media > img {
  animation: automationLiveImageIn .62s cubic-bezier(.2, .8, .2, 1) both;
}

.automation-test-result-card .generated-item-thumbs {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  gap: 6px;
}

.automation-test-result-card .generated-item-thumbs span,
.automation-test-result-card .generated-item-thumbs img {
  width: 44px;
  height: 32px;
  aspect-ratio: auto;
  border-radius: 6px;
}

.automation-test-result-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  background: rgba(12, 20, 29, .86);
  color: #5ad184;
  font-size: 11px;
  font-weight: 500;
  backdrop-filter: blur(10px);
}

.automation-test-result-badge svg {
  width: 13px;
  height: 13px;
}

.automation-test-result-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.automation-test-result-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.automation-test-result-title h3 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--text-heading, var(--ink));
  font-size: 16px;
  font-weight: 500;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.automation-test-result-scientific {
  margin: -6px 0 0;
  overflow: hidden;
  color: var(--text-muted, var(--muted));
  font-size: 12px;
  font-style: italic;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.automation-test-result-facts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  color: var(--text-muted, var(--muted));
  font-size: 11.5px;
  line-height: 1.35;
}

.automation-test-result-facts span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.automation-test-result-facts strong {
  flex: 0 0 auto;
  color: var(--text-secondary, #d7dde4);
  font-weight: 500;
}

.automation-quality {
  display: grid;
  gap: 5px;
  padding-top: 2px;
}

.automation-quality div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-muted, var(--muted));
  font-size: 11px;
}

.automation-quality strong {
  color: #5ad184;
  font-weight: 500;
}

.automation-quality i {
  display: block;
  height: 4px;
  border-radius: 999px;
  background: #16a34a;
}

.automation-test-result-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 5px;
  border-top: 1px solid rgba(84, 99, 116, .42);
}

.automation-test-result-actions form {
  margin: 0;
}

.automation-test-result-actions .automation-candidate-preview {
  flex: 1 1 100%;
}

.automation-test-result-actions .automation-candidate-preview summary {
  min-height: 34px;
}

.automation-test-result-actions button,
.automation-test-result-actions .button {
  min-height: 36px;
  font-size: 12px;
}

.automation-test-skeleton-card {
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(84, 99, 116, .52);
  border-radius: 16px;
  background: rgba(12, 20, 29, .44);
  opacity: .48;
  transition: opacity .25s ease, border-color .25s ease, background .25s ease, transform .25s ease;
}

.automation-test-skeleton-card.is-current {
  border-color: rgba(76, 141, 246, .36);
  background: rgba(12, 20, 29, .66);
  opacity: .9;
}

.automation-testflow-panel.is-live-running .automation-test-skeleton-card.is-current {
  transform: translateY(-2px);
}

.automation-test-skeleton-media {
  position: relative;
  overflow: hidden;
  background: rgba(4, 14, 24, .64);
}

.automation-test-skeleton-image {
  width: 100%;
  aspect-ratio: 2 / 1;
  border-radius: 0;
}

.automation-test-skeleton-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  background: rgba(12, 20, 29, .86);
  color: #78a8ff;
  font-size: 11px;
  font-weight: 500;
}

.automation-test-skeleton-card[data-skeleton-stage="6"] .automation-test-skeleton-badge {
  color: #5ad184;
}

.automation-testflow-panel.is-live-running .automation-test-skeleton-card.is-current .automation-test-skeleton-badge svg {
  animation: automationSpinner .9s linear infinite;
}

.automation-test-skeleton-badge svg {
  width: 13px;
  height: 13px;
}

.automation-test-skeleton-thumbs {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  gap: 6px;
}

.automation-test-skeleton-thumbs span {
  display: block;
  width: 44px;
  height: 32px;
  border-radius: 6px;
}

.automation-test-skeleton-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.automation-test-skeleton-title {
  width: 58%;
  height: 17px;
  border-radius: 5px;
}

.automation-test-skeleton-subtitle {
  width: 42%;
  height: 10px;
  margin-top: -4px;
  border-radius: 5px;
}

.automation-test-skeleton-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.automation-test-skeleton-row span {
  display: block;
  height: 10px;
  border-radius: 5px;
}

.automation-test-skeleton-row span:first-child {
  width: 42%;
}

.automation-test-skeleton-row span:last-child {
  width: 28%;
}

.automation-test-skeleton-quality {
  display: grid;
  gap: 5px;
  margin-top: 2px;
}

.automation-test-skeleton-quality div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-muted, var(--muted));
  font-size: 11px;
}

.automation-test-skeleton-quality strong {
  color: #5ad184;
  font-weight: 500;
}

.automation-test-skeleton-quality i {
  display: block;
  width: 0;
  height: 4px;
  border-radius: 999px;
  background: #16a34a;
  transition: width .35s ease;
}

.automation-test-skeleton-button {
  height: 36px;
  border-radius: 9px;
}

.skeleton-surface {
  position: relative;
  overflow: hidden;
  background: rgba(37, 45, 56, .72);
}

.skeleton-surface::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.045) 45%, rgba(255,255,255,.075) 50%, rgba(255,255,255,.045) 55%, transparent 80%);
  transform: translateX(-130%);
  animation: automationSkeletonShimmer 2.8s ease-in-out infinite;
}

.automation-test-skeleton-card:not(.is-current) .skeleton-surface::after {
  animation-duration: 4.2s;
  opacity: .55;
}

.live-content {
  animation: automationLiveContentIn .42s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes automationResultCardIn {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes automationLiveContentIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes automationLiveImageIn {
  from { opacity: .2; filter: saturate(.45); transform: scale(1.025); }
  to { opacity: 1; filter: saturate(1); transform: scale(1); }
}

@keyframes automationSkeletonShimmer {
  0%, 28% { transform: translateX(-130%); }
  72%, 100% { transform: translateX(130%); }
}

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

@media (max-width: 1320px) {
  .automation-candidate-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .automation-candidate-grid {
    grid-template-columns: 1fr;
  }
}

.automation-review-card.is-imported,
.automation-review-card.is-discarded {
  opacity: .62;
}

.generated-item-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: #79adff;
}

.generated-item-card.compact .generated-item-mark {
  width: 40px;
  height: 40px;
}

.generated-item-mark svg {
  width: 22px;
  height: 22px;
}

.generated-item-main {
  min-width: 0;
}

.generated-item-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.generated-item-heading > div {
  min-width: 0;
}

.generated-item-heading span:first-child {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.generated-item-heading h2,
.generated-item-heading h3 {
  margin: 0;
  color: var(--ink);
  line-height: 1.18;
  font-weight: 500;
}

.generated-item-heading h2 {
  font-size: 22px;
}

.generated-item-heading h3 {
  font-size: 17px;
}

.generated-item-heading em {
  display: block;
  margin-top: 3px;
  color: #aab8ca;
  font-size: 13px;
  font-weight: 400;
}

.generated-item-main > p {
  max-width: 820px;
  margin: 13px 0;
  color: #c1ccda;
  font-size: 13px;
  line-height: 1.65;
}

.generated-item-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 13px;
}

.generated-item-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(34, 99, 255, .12);
  color: #cfe0ff;
  font-size: 12px;
  font-weight: 500;
}

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

.generated-item-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
}

.generated-item-meta svg,
.generated-item-actions svg,
.shared-template-panel .button svg,
.shared-template-form button svg,
.shared-template-reset button svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.generated-item-actions {
  margin-top: 14px;
}

.generated-item-actions form {
  margin: 0;
}

.generated-item-actions .button,
.generated-item-actions button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
}

.shared-template-panel {
  min-width: 0;
}

.shared-template-panel .panel-head .button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.automation-menu-paths {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.automation-menu-paths > strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.automation-menu-path-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.automation-menu-path-list span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}

.automation-menu-path-list b {
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
}

.automation-menu-path-list code {
  color: #91baff;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.shared-template-form textarea {
  min-height: 480px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  tab-size: 2;
}

.shared-template-form label > small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
}

.shared-template-reset {
  margin-top: 10px;
}

@media (max-width: 760px) {
  body.admin-menu-open {
    overflow: hidden;
  }

  .layout {
    display: block !important;
  }

  .sidebar {
    position: fixed !important;
    z-index: 90;
    inset: 0 auto 0 0;
    width: min(86vw, 300px);
    height: 100dvh !important;
    padding: 12px 10px 14px !important;
    overflow-y: auto;
    border-right: 1px solid var(--line) !important;
    border-bottom: 0 !important;
    transform: translateX(-102%);
    transition: transform .22s ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .admin-sidebar-backdrop {
    position: fixed;
    z-index: 80;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(0, 0, 0, .58);
    backdrop-filter: blur(4px);
  }

  .admin-menu-open .admin-sidebar-backdrop {
    display: block;
  }

  .admin-brand {
    margin: 0 2px 10px !important;
  }

  .admin-sidebar-close {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, .055);
    color: var(--ink);
  }

  .admin-sidebar-close svg {
    width: 17px;
    height: 17px;
  }

  .main {
    width: 100%;
    min-width: 0;
    padding: 14px 14px 28px !important;
  }

  .admin-topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
    margin: -14px -14px 18px !important;
    padding: 9px 12px !important;
  }

  .admin-menu-toggle {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: rgba(255, 255, 255, .055);
    color: var(--ink);
  }

  .admin-menu-toggle svg {
    width: 19px;
    height: 19px;
  }

  .admin-global-search {
    flex: 1 1 auto;
    width: auto !important;
    min-width: 92px;
  }

  .admin-global-search input {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding-right: 12px;
  }

  .admin-quick-actions {
    flex: 0 0 auto;
    gap: 5px;
  }

  .admin-quick-actions a,
  .admin-quick-actions button {
    width: 38px;
    height: 38px;
  }

  .admin-subnav,
  .title-actions,
  .panel-actions,
  .automation-run-actions,
  .automation-actions,
  .item-filter-actions,
  .actions,
  .sticky-actions,
  .admin-scroll-row {
    display: flex !important;
    grid-template-columns: none !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 7px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 5px;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
  }

  .admin-subnav::-webkit-scrollbar,
  .title-actions::-webkit-scrollbar,
  .panel-actions::-webkit-scrollbar,
  .automation-run-actions::-webkit-scrollbar,
  .automation-actions::-webkit-scrollbar,
  .item-filter-actions::-webkit-scrollbar,
  .actions::-webkit-scrollbar,
  .sticky-actions::-webkit-scrollbar,
  .admin-scroll-row::-webkit-scrollbar {
    display: none;
  }

  .admin-subnav > *,
  .title-actions > *,
  .panel-actions > *,
  .automation-run-actions > *,
  .automation-actions > *,
  .item-filter-actions > *,
  .actions > *,
  .sticky-actions > *,
  .admin-scroll-row > * {
    flex: 0 0 auto !important;
    width: auto !important;
  }

  .main .automation-subnav-toggle {
    margin-left: 0 !important;
  }

  .main .admin-menu-toggle {
    border: 0 !important;
    background: rgba(255, 255, 255, .055) !important;
    color: var(--ink) !important;
    box-shadow: none !important;
  }

  .page-title-row,
  .dashboard-heading {
    align-items: flex-start;
  }

  .page-title-row:has(.title-actions) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .panel,
  .card,
  .panel-head,
  .form-grid,
  .automation-provider-choice,
  .automation-provider-layout,
  .automation-provider-card,
  .generated-item-main,
  .shared-template-form,
  pre,
  code {
    min-width: 0;
    max-width: 100%;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .automation-provider-choice,
  .automation-provider-layout,
  .automation-import-grid,
  .automation-cost-box,
  .automation-two-fields {
    grid-template-columns: 1fr;
  }

  .automation-provider-card-head em {
    max-width: 100%;
  }

  .panel-head > * {
    max-width: 100%;
  }

  .main img,
  .main video,
  .main canvas,
  .main svg {
    max-width: 100%;
  }

  .generated-item-card,
  .generated-item-card.compact {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 11px;
  }

  .generated-item-card.has-media {
    grid-template-columns: 38px minmax(92px, 34vw) minmax(0, 1fr);
  }

  .generated-item-mark,
  .generated-item-card.compact .generated-item-mark {
    width: 38px;
    height: 38px;
  }

  .generated-item-heading {
    display: grid;
    gap: 8px;
  }

  .generated-item-heading .status-badge {
    justify-self: start;
  }

  .generated-item-heading h2 {
    font-size: 19px;
  }

  .generated-item-main > p {
    font-size: 12.5px;
  }

  .generated-item-list {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .generated-item-meta,
  .generated-item-actions,
  .automation-menu-path-list {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .generated-item-meta::-webkit-scrollbar,
  .generated-item-actions::-webkit-scrollbar,
  .generated-item-list::-webkit-scrollbar,
  .automation-menu-path-list::-webkit-scrollbar {
    display: none;
  }

  .generated-item-meta span,
  .generated-item-list span,
  .generated-item-actions > *,
  .automation-menu-path-list span {
    flex: 0 0 auto;
  }

  .shared-template-form textarea {
    min-height: 380px;
  }

  dialog.admin-modal,
  .admin-modal {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    margin: 10px auto;
  }

  table {
    min-width: 680px;
  }
}

@media (max-width: 430px) {
  .admin-quick-actions a {
    width: 35px;
    height: 35px;
  }

  .admin-quick-actions a:nth-child(2) {
    display: none;
  }

  .admin-global-search input {
    font-size: 12px;
  }

  .admin-global-search input::placeholder {
    color: transparent;
  }
}

/* Shared admin UI system */
.admin-ui {
  color: var(--text-primary);
}

.admin-ui :where(h1, h2, h3, h4, h5, h6, .ui-heading) {
  color: var(--text-heading);
  text-wrap: balance;
}

.admin-ui :where(
  label:not(.check),
  legend,
  .ui-label,
  .field-label,
  .settings-label
) {
  color: var(--text-label);
  font-weight: 500;
}

.admin-ui :where(
  .muted,
  .ui-description,
  .field-description,
  .panel-head p,
  .modal-head p,
  .card > span,
  .adops-steps,
  .roundtrip-card p,
  .consent-ai-note p
) {
  color: var(--text-secondary);
}

.admin-ui :where(
  small,
  .ui-help,
  .field-help,
  .setting-hint,
  .managed-help,
  .section-help,
  .section-modal-help,
  .template-help,
  .upload-help
) {
  color: var(--text-muted);
}

.admin-ui :where(
  .ui-disabled,
  [aria-disabled="true"],
  input:disabled,
  select:disabled,
  textarea:disabled,
  button:disabled
) {
  color: var(--text-disabled);
}

.admin-ui :where(.check, .switch-inline) {
  color: var(--text-secondary);
  font-weight: 400;
}

.admin-ui :where(fieldset) {
  min-width: 0;
  border-color: var(--line);
}

.admin-ui :where(legend) {
  padding-inline: 5px;
}

.admin-ui :where(input, select, textarea) {
  border-color: var(--line);
  background: var(--surface-input) !important;
  color: var(--text-primary) !important;
}

.admin-ui :where(input, textarea)::placeholder {
  color: var(--text-disabled);
  opacity: 1;
}

.admin-ui :where(input, select, textarea):focus {
  border-color: var(--focus-border) !important;
  outline: 3px solid var(--focus-ring);
  outline-offset: 0;
}

.admin-ui :where(input, select, textarea):disabled {
  border-color: var(--line-soft) !important;
  background: rgba(4, 14, 25, .42) !important;
  cursor: not-allowed;
  opacity: .82;
}

.admin-ui :where(input[type="checkbox"], input[type="radio"]) {
  accent-color: var(--brand);
  background: transparent !important;
}

.admin-ui :where(input[type="range"]) {
  --range-progress: 50%;
  appearance: none;
  min-height: 24px;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  accent-color: var(--brand);
  cursor: pointer;
}

.admin-ui input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      var(--brand) 0 var(--range-progress),
      rgba(141, 157, 176, .3) var(--range-progress) 100%
    );
}

.admin-ui input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border: 2px solid var(--panel-solid);
  border-radius: 999px;
  background: var(--brand-2);
}

.admin-ui input[type="range"]::-moz-range-track {
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(141, 157, 176, .3);
}

.admin-ui input[type="range"]::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--brand);
}

.admin-ui input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid var(--panel-solid);
  border-radius: 999px;
  background: var(--brand-2);
}

.admin-ui :where(input[type="color"]) {
  min-height: 40px;
  padding: 4px;
  border: 1px solid var(--line) !important;
  border-radius: 8px;
  background: var(--surface-input) !important;
}

.admin-ui :where(input[type="file"]) {
  color: var(--text-secondary) !important;
}

.admin-ui input[type="file"]::file-selector-button {
  margin-right: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 11px;
  background: var(--surface-subtle);
  color: var(--text-primary);
  font: inherit;
  cursor: pointer;
}

.admin-ui input[type="file"]::file-selector-button:hover {
  background: var(--surface-hover);
}

.admin-ui .main :where(
  .panel,
  .card,
  .ui-surface
) {
  background: var(--surface-panel);
  color: var(--text-primary);
}

.admin-ui .main :where(
  .ui-surface-subtle,
  .settings-preview,
  .theme-preview,
  .placement-preview,
  .upload-drop,
  .plugin-upload-drop,
  .single-file-upload,
  .create-item-upload,
  .inline-upload,
  .roundtrip-upload,
  .roundtrip-field-selector,
  .design-code-editor,
  .template-preview,
  .image-preview,
  .upload-preview
) {
  background: var(--panel-muted) !important;
  color: var(--text-primary);
}

.admin-ui .main :where(.panel-head, .modal-head) {
  color: var(--text-primary);
}

.admin-ui .main :where(.panel-head h2, .modal-head h2) {
  color: var(--text-heading);
}

.admin-ui .main :where(.header-range-control output, output) {
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.admin-ui .main :where(summary) {
  color: var(--text-primary);
}

.admin-ui .main :where(summary small) {
  color: var(--text-muted);
}

.admin-ui .main .section-state {
  border: 1px solid var(--line-soft);
  background: var(--surface-subtle);
  color: var(--text-secondary);
}

.admin-ui .main .section-state.is-active {
  border-color: rgba(79, 163, 255, .28);
  background: var(--brand-soft);
  color: #9bc2ff;
}

.admin-ui .main :where(table) {
  color: var(--text-primary);
}

.admin-ui .main :where(th) {
  color: var(--text-secondary);
}

.admin-ui .main :where(td) {
  color: var(--text-primary);
}

.admin-ui .main :where(td small, .table-empty, .empty-state) {
  color: var(--text-muted);
}

.admin-ui .main :where(code, .slug-pill, .menu-path-badge) {
  color: #cfe0ff;
}

.admin-ui :where(button, a.button, .button-link):focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.admin-ui :where(button, a.button, .button-link):disabled {
  border-color: var(--line-soft) !important;
  background: var(--surface-subtle) !important;
  color: var(--text-disabled) !important;
  cursor: not-allowed;
  opacity: .8;
}

.admin-ui .ui-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.admin-ui .ui-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px 18px;
  align-items: end;
}

.admin-ui .ui-help {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.45;
}

.admin-ui .ui-divider {
  border-color: var(--line-soft);
}

@media (max-width: 760px) {
  .admin-ui .ui-field-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Compact, privacy-friendly analytics */
.analytics-periods {
  margin-bottom: 18px;
}

.analytics-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.analytics-ranking {
  min-width: 0;
}

.analytics-ranking ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: analytics-rank;
}

.analytics-ranking li {
  min-width: 0;
  counter-increment: analytics-rank;
}

.analytics-ranking a {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 8px 10px;
  border-radius: 7px;
  background: var(--surface-subtle);
  color: var(--text-primary);
}

.analytics-ranking a::before {
  content: counter(analytics-rank, decimal-leading-zero);
  color: var(--text-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.analytics-ranking a:hover {
  background: var(--surface-hover);
}

.analytics-ranking a span {
  min-width: 0;
}

.analytics-ranking a strong,
.analytics-ranking a small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-ranking a strong {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
}

.analytics-ranking a small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 11px;
}

.analytics-ranking a b {
  min-width: 36px;
  color: #9bc2ff;
  font-size: 13px;
  font-weight: 500;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1180px) {
  .analytics-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .analytics-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Compact operational dashboards */
.automation-success-panel {
  min-width: 0;
  margin-bottom: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.automation-success-panel .generated-item-card.success {
  padding: 14px;
  border: 1px solid rgba(74, 222, 128, .18);
  border-radius: 12px;
  background: rgba(8, 20, 30, .42) !important;
  color: inherit !important;
}

.automation-success-panel .generated-item-mark {
  background: rgba(74, 222, 128, .16);
  color: #65e590;
}

.automation-success-panel .generated-item-meta {
  margin-top: 13px;
}

.automation-success-panel .generated-item-meta span {
  border-color: rgba(74, 222, 128, .2);
  background: rgba(3, 19, 15, .18);
  color: #c4dfcf;
}

.automation-success-empty {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 78px;
  color: var(--text-secondary);
}

.automation-success-empty svg {
  width: 24px;
  height: 24px;
  color: #65e590;
}

.automation-success-empty p {
  margin: 0;
}

.dashboard-grid-modern {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  margin-bottom: 18px;
}

.dashboard-grid-modern > * {
  margin-bottom: 0;
}

.dashboard-stats.item-overview-stats {
  margin: 0 0 18px;
}

.dashboard-stats .dashboard-stat {
  min-height: 92px;
}

.dashboard-health-list {
  display: grid;
  gap: 2px;
}

.dashboard-health-list > div {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 36px;
  color: var(--text-secondary);
}

.dashboard-health-list svg,
.coverage-summary svg,
.dashboard-item-list.compact > a > svg {
  width: 16px;
  height: 16px;
  color: var(--brand-2);
}

.dashboard-health-list strong {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.coverage-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.coverage-summary span,
.dashboard-ad-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
}

.dashboard-item-list.compact a {
  min-height: 48px;
}

.analytics-trend-panel {
  margin-bottom: 18px;
}

.analytics-trend-panel .panel-head > strong {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
}

.analytics-chart {
  display: flex;
  align-items: end;
  gap: clamp(3px, .65vw, 9px);
  height: 190px;
  padding: 14px 4px 0;
  background:
    linear-gradient(to top, var(--line-soft) 1px, transparent 1px) 0 100% / 100% 25%;
}

.analytics-chart.compact {
  height: 128px;
  padding-top: 8px;
}

.analytics-chart > span {
  position: relative;
  flex: 1 1 0;
  height: 100%;
  min-width: 3px;
}

.analytics-chart > span > i {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: var(--chart-height);
  min-height: 3px;
  border-radius: 4px 4px 1px 1px;
  background: linear-gradient(180deg, #4f9cff, #246bfe);
  opacity: .86;
  transition: opacity .16s ease;
}

.analytics-chart > span:hover > i {
  opacity: 1;
}

.analytics-chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 11px;
}

@media (max-width: 1180px) {
  .dashboard-grid-modern {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .dashboard-stats,
  .dashboard-stats.item-overview-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-stat {
    min-height: 92px;
  }

  .automation-success-panel {
    padding: 0;
  }

  .analytics-chart {
    height: 150px;
  }
}

/* Static pages workspace */
.page-library-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin: 0 0 16px;
  color: var(--text-secondary);
  font-size: 13px;
}

.page-library-summary span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.page-library-summary strong {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 500;
}

.page-library-summary svg {
  width: 15px;
  height: 15px;
  color: var(--brand-2);
}

.compact-insight-panel {
  margin: 0 0 18px;
  padding: 18px;
}

.compact-insight-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.compact-insight-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  text-decoration: none;
}

.compact-insight-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-insight-list strong {
  color: var(--brand-2);
  font-weight: 500;
}

.page-library {
  padding: 0;
  overflow: hidden;
}

.page-library-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 14px 16px;
}

.page-library-search {
  position: relative;
  width: min(320px, 100%);
}

.page-library-search svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.page-library-search input {
  width: 100%;
  padding-left: 38px;
}

.page-library-table {
  width: 100%;
  min-width: 980px;
  margin: 0;
}

.page-library-table th,
.page-library-table td {
  vertical-align: middle;
}

.page-library-title {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 240px;
  color: var(--text-primary);
}

.page-library-title > span:first-child {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 8px;
  background: rgba(36, 116, 255, .13);
  color: var(--brand-2);
}

.page-library-title svg {
  width: 16px;
  height: 16px;
}

.page-library-title strong,
.page-library-title small {
  display: block;
}

.page-library-title strong {
  font-weight: 500;
}

.page-library-title small {
  max-width: 330px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-library-table code {
  color: #a8c9ff;
  font-size: 12px;
}

.page-library-table .table-actions {
  width: 142px;
  text-align: right;
  white-space: nowrap;
}

.page-library-table td.table-actions {
  display: table-cell;
}

.page-library-table td.table-actions > * {
  display: inline-flex;
  margin-left: 4px;
  vertical-align: middle;
}

.page-library-table td.table-actions form {
  margin: 0;
}

.page-library-table .icon-button.danger {
  color: #ff8e8e;
}

.inline-toggle-form {
  margin: 0;
}

.switch.tiny {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.switch.tiny input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch.tiny span {
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .28);
  position: relative;
  transition: background .18s ease;
}

.switch.tiny span::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #dbeafe;
  transition: transform .18s ease, background .18s ease;
}

.switch.tiny input:checked + span {
  background: rgba(34, 197, 94, .28);
}

.switch.tiny input:checked + span::after {
  transform: translateX(16px);
  background: #6ee7a0;
}

.page-library-empty {
  display: grid;
  justify-items: center;
  padding: 56px 24px;
  text-align: center;
}

.page-library-empty > svg {
  width: 30px;
  height: 30px;
  margin-bottom: 12px;
  color: var(--brand-2);
}

.page-library-empty strong {
  font-size: 16px;
  font-weight: 500;
}

.page-library-empty p {
  max-width: 480px;
  margin: 6px 0 18px;
  color: var(--text-muted);
}

.static-page-editor-modal {
  width: min(1540px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
}

.static-page-editor-form {
  min-width: 0;
}

.static-page-editor-meta {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(180px, .8fr) minmax(260px, 1.5fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.static-page-editor-meta label > span:first-child,
.seo-inline-fields label > span:first-child {
  display: block;
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

.page-path-input {
  display: flex;
  align-items: center;
  min-width: 0;
}

.page-path-input b {
  display: grid;
  align-self: stretch;
  min-width: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 7px 0 0 7px;
  background: rgba(255, 255, 255, .045);
  color: var(--text-muted);
  font-weight: 500;
}

.page-path-input input {
  min-width: 0;
  border-radius: 0 7px 7px 0;
}

.page-publish-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.page-publish-toggle span {
  font-size: 13px;
  font-weight: 500;
}

.code-workspace {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.code-pane {
  display: grid;
  grid-template-rows: auto minmax(360px, 50vh);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(3, 10, 18, .72);
}

.code-pane header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, .035);
}

.code-pane header span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
}

.code-pane header svg {
  width: 15px;
  height: 15px;
  color: var(--brand-2);
}

.code-pane header small {
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
}

.code-pane textarea {
  width: 100%;
  min-height: 360px;
  resize: vertical;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  color: #dbe8f6 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.58;
  tab-size: 2;
}

.code-pane textarea:focus {
  outline: 1px solid rgba(80, 151, 255, .55);
  outline-offset: -1px;
}

.static-page-editor-options {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 26px;
  margin-top: 20px;
}

.editor-option-heading {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 12px;
}

.editor-option-heading > svg {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  color: var(--brand-2);
}

.editor-option-heading strong,
.editor-option-heading small {
  display: block;
}

.editor-option-heading strong {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
}

.editor-option-heading small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
}

.editor-check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.seo-inline-fields {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(240px, 1.2fr);
  gap: 12px;
}

.seo-inline-fields textarea {
  min-height: 42px;
  resize: vertical;
}

.static-page-editor-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 18px;
  padding-top: 12px;
  background: linear-gradient(180deg, rgba(6, 17, 29, 0), rgba(6, 17, 29, .98) 38%);
}

.static-page-editor-modal .static-page-editor-actions {
  background: linear-gradient(180deg, rgba(12, 25, 39, 0), rgba(12, 25, 39, .98) 38%);
}

@media (max-width: 980px) {
  .static-page-editor-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .static-page-description-field {
    grid-column: 1 / -1;
  }

  .code-workspace {
    grid-template-columns: 1fr;
  }

  .code-pane {
    grid-template-rows: auto minmax(280px, 38vh);
  }
}

@media (max-width: 760px) {
  .static-page-editor-meta,
  .static-page-editor-options,
  .seo-inline-fields {
    grid-template-columns: 1fr;
  }

  .static-page-description-field {
    grid-column: auto;
  }

  .page-publish-toggle {
    padding-inline: 0;
  }

  .code-pane {
    grid-template-rows: auto minmax(260px, 42vh);
  }

  .code-pane header small {
    display: none;
  }

  .static-page-editor-actions {
    flex-direction: column-reverse;
  }

  .static-page-editor-actions > * {
    width: 100%;
  }
}

/* Section library and template editor */
.section-editor-modal {
  width: min(1580px, calc(100% - 28px));
}

.section-editor-form {
  min-width: 0;
}

.section-editor-meta {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) minmax(240px, 1fr) 120px auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 10px;
}

.section-editor-meta label > span:first-child,
.cta-settings-grid label > span:first-child,
.cta-action-settings label > span:first-child,
.cta-media-settings label > span:first-child {
  display: block;
  margin-bottom: 6px;
  color: var(--text-label);
  font-size: 12px;
  font-weight: 500;
}

.section-template-note {
  min-height: 28px;
  margin-bottom: 12px;
}

.section-template-note span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  font-size: 12px;
}

.section-template-note svg {
  width: 15px;
  height: 15px;
  color: var(--brand-2);
}

.section-code-workspace {
  margin-bottom: 22px;
}

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

.section-code-workspace .code-pane {
  grid-template-rows: auto minmax(310px, 43vh);
}

.section-template-panel {
  margin-top: 24px;
}

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

.section-settings-heading > div {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.section-settings-heading svg {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--brand-2);
}

.section-settings-heading strong,
.section-settings-heading small {
  display: block;
}

.section-settings-heading strong {
  color: var(--text-heading);
  font-size: 15px;
  font-weight: 500;
}

.section-settings-heading small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
}

.cta-editor-workbench {
  display: grid;
  grid-template-columns: minmax(520px, 1.08fr) minmax(420px, .92fr);
  gap: 22px;
  align-items: start;
}

.cta-preview-column {
  position: sticky;
  top: 82px;
  min-width: 0;
  max-height: calc(100vh - 98px);
  overflow: auto;
  scrollbar-width: thin;
}

.cta-editor-controls {
  min-width: 0;
}

.cta-live-preview {
  margin: 0;
}

.cta-settings-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  border-radius: 8px;
  background: var(--surface-subtle);
}

.cta-settings-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 38px;
  padding: 8px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.cta-settings-tabs button:hover {
  background: color-mix(in srgb, var(--surface-raised) 72%, transparent);
  color: var(--text-primary);
}

.cta-settings-tabs button.active {
  background: var(--surface-raised);
  color: var(--brand-2);
}

.cta-settings-tabs svg {
  width: 15px;
  height: 15px;
}

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

.cta-settings-panel > header {
  margin-bottom: 15px;
}

.cta-settings-panel > header strong,
.cta-settings-panel > header small {
  display: block;
}

.cta-settings-panel > header strong {
  color: var(--text-heading);
  font-size: 14px;
  font-weight: 500;
}

.cta-settings-panel > header small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
}

.cta-live-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.cta-live-preview-toolbar strong,
.cta-live-preview-toolbar small {
  display: block;
}

.cta-live-preview-toolbar strong {
  color: var(--text-heading);
  font-size: 14px;
  font-weight: 500;
}

.cta-live-preview-toolbar small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
}

.cta-preview-modes {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border-radius: 7px;
  background: var(--surface-subtle);
}

.cta-preview-modes button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

.cta-preview-modes button:hover,
.cta-preview-modes button.active {
  background: var(--surface-raised);
  color: var(--brand-2);
}

.cta-preview-modes svg {
  width: 15px;
  height: 15px;
}

.cta-live-preview-stage {
  display: grid;
  min-height: 500px;
  overflow: auto;
  padding: clamp(16px, 2.2vw, 26px);
  place-items: center;
  border-radius: 9px;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    #07111f;
  background-size: 24px 24px;
}

.cta-live-card {
  --preview-bg-scale: 1;
  --preview-foreground-scale: 1.65;
  --preview-foreground-x: -14%;
  --preview-foreground-y: 9%;
  --preview-foreground-shadow: .05;
  --preview-mobile-bg-scale: 1;
  --preview-mobile-foreground-scale: 1.1;
  --preview-mobile-foreground-x: -4%;
  --preview-mobile-foreground-y: 4%;
  --preview-mobile-foreground-shadow: .05;
  --preview-border-width: 2px;
  --preview-shadow-blur: 25px;
  --preview-shadow-opacity: .25;
  --preview-title-size: 56px;
  --preview-mobile-title-size: 40px;
  --preview-text-size: 18px;
  --preview-mobile-text-size: 15px;
  --preview-mobile-float-duration: 5s;
  --preview-mobile-float-distance: -8px;
  --preview-font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(250px, .9fr);
  align-items: center;
  gap: clamp(20px, 3vw, 38px);
  width: 100%;
  min-width: 0;
  padding: clamp(20px, 2.4vw, 30px);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px var(--preview-shadow-blur) -15px rgba(20, 60, 140, var(--preview-shadow-opacity));
  color: #1e293b;
  font-family: var(--preview-font-family);
}

.cta-live-copy,
.cta-live-badge,
.cta-live-copy h3,
.cta-live-copy > p,
.cta-live-primary {
  font-family: var(--preview-font-family);
}

.cta-live-card::before {
  position: absolute;
  inset: 0;
  padding: var(--preview-border-width);
  border-radius: inherit;
  background: linear-gradient(115deg, rgba(11,108,244,.8), rgba(255,255,255,.1) 35%, rgba(11,108,244,.4) 70%, rgba(255,255,255,.9));
  content: "";
  pointer-events: none;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.cta-live-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
}

.cta-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 18px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #f0f5ff;
  color: #0b6cf4;
}

.cta-live-badge svg {
  width: 14px;
  height: 14px;
}

.cta-live-badge b {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.cta-live-copy h3 {
  width: 100%;
  max-width: 100%;
  margin: 0 0 18px;
  color: #1e293b;
  font-size: clamp(30px, 3vw, var(--preview-title-size));
  font-weight: 800;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.cta-live-copy h3 span,
.cta-live-copy h3 strong {
  display: block;
  font: inherit;
}

.cta-live-copy h3 span {
  margin-bottom: 6px;
}

.cta-live-copy h3 strong {
  color: #0b6cf4;
}

.cta-live-copy > p {
  max-width: 480px;
  margin: 0 0 28px;
  color: #3d4a61;
  font-size: var(--preview-text-size);
  font-weight: 500;
  line-height: 1.6;
}

.cta-live-primary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 11px 20px;
  border-radius: 999px;
  background: #0b6cf4;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.cta-live-primary > span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.cta-live-primary svg {
  width: 18px;
  height: 18px;
}

.cta-live-visual {
  position: relative;
  justify-self: end;
  width: min(100%, 320px);
  aspect-ratio: 1;
}

.cta-live-square {
  position: absolute;
  inset: 22px;
  overflow: hidden;
  border-radius: 14px;
  background: #03112a;
}

.cta-live-square > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(var(--preview-bg-scale));
}

.cta-live-blue-overlay,
.cta-live-depth,
.cta-live-light {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cta-live-blue-overlay {
  z-index: 1;
  background: rgba(0,34,102,.3);
  mix-blend-mode: multiply;
}

.cta-live-depth {
  z-index: 2;
  box-shadow: inset 0 0 60px rgba(0,15,40,.6);
}

.cta-live-light {
  z-index: 2;
  bottom: auto;
  height: 96px;
  background: linear-gradient(180deg, rgba(219,234,254,.3), transparent);
}

.cta-live-foreground,
.cta-live-float {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.cta-live-foreground {
  will-change: transform;
}

.cta-live-foreground img {
  width: 200%;
  max-width: none;
  height: auto;
  filter: drop-shadow(0 30px 40px rgba(0,20,50,var(--preview-foreground-shadow)));
  transform: translate(var(--preview-foreground-x), var(--preview-foreground-y)) scale(var(--preview-foreground-scale));
}

@keyframes cta-live-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(var(--preview-float-distance, -12px)); }
}

.cta-live-float.is-floating {
  animation: cta-live-float var(--preview-float-duration, 4s) ease-in-out infinite;
}

.cta-live-info {
  position: absolute;
  right: -24px;
  bottom: -16px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 116px;
  height: 116px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(11,108,244,.3), rgba(11,108,244,.08));
  color: #fff;
  text-align: center;
  backdrop-filter: blur(12px);
}

.cta-live-info > svg {
  width: 26px;
  height: 26px;
}

.cta-live-info > span {
  width: 30px;
  height: 1px;
  margin: 6px 0;
  background: rgba(255,255,255,.45);
}

.cta-live-info b {
  max-width: 86px;
  font-size: 8px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cta-live-preview[data-preview-mode="mobile"] .cta-live-preview-stage {
  padding-block: 24px;
}

.cta-live-preview[data-preview-mode="mobile"] .cta-live-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: min(100%, 390px);
  padding: 18px;
}

.cta-live-preview[data-preview-mode="mobile"] .cta-live-visual {
  order: 1;
  flex-basis: auto;
  width: 100%;
  max-width: none;
}

.cta-live-preview[data-preview-mode="mobile"] .cta-live-copy {
  order: 2;
}

.cta-live-preview[data-preview-mode="mobile"] .cta-live-copy h3 {
  font-size: var(--preview-mobile-title-size);
}

.cta-live-preview[data-preview-mode="mobile"] .cta-live-copy > p {
  font-size: var(--preview-mobile-text-size);
}

.cta-live-preview[data-preview-mode="mobile"] .cta-live-square > img {
  transform: scale(var(--preview-mobile-bg-scale));
}

.cta-live-preview[data-preview-mode="mobile"] .cta-live-foreground img {
  filter: drop-shadow(0 24px 32px rgba(0,20,50,var(--preview-mobile-foreground-shadow)));
  transform: translate(var(--preview-mobile-foreground-x), var(--preview-mobile-foreground-y)) scale(var(--preview-mobile-foreground-scale));
}

.cta-live-preview[data-preview-mode="mobile"] .cta-live-float.is-floating {
  --preview-float-distance: var(--preview-mobile-float-distance, -8px);
  animation-duration: var(--preview-mobile-float-duration, 5s);
}

.cta-live-preview[data-preview-mode="mobile"] .cta-live-info {
  right: -4px;
  bottom: -8px;
  width: 96px;
  height: 96px;
  justify-content: flex-start;
  box-sizing: border-box;
  padding-top: 12px;
}

.cta-live-preview[data-preview-mode="mobile"] .cta-live-info > svg {
  margin-bottom: 1px;
}

.cta-live-preview[data-preview-mode="mobile"] .cta-live-info > span {
  margin-block: 3px;
}

.cta-typography-grid {
  display: grid;
  grid-template-columns: minmax(200px, 1.2fr) repeat(4, minmax(150px, 1fr));
  gap: 14px;
  padding: 6px 14px 15px;
}

.cta-typography-grid label > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--text-label);
  font-size: 12px;
  font-weight: 500;
}

.cta-typography-grid output {
  color: var(--brand-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.cta-effect-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 4px 14px 10px;
}

.cta-animation-devices {
  display: grid;
  gap: 14px;
}

.cta-animation-devices fieldset {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 0;
  border-radius: 8px;
  background: var(--surface-subtle);
}

.cta-animation-devices legend {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  padding: 0 0 11px;
}

.cta-animation-devices legend > svg {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: var(--brand-2);
}

.cta-animation-devices legend strong,
.cta-animation-devices legend small {
  display: block;
}

.cta-animation-devices legend strong {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
}

.cta-animation-devices legend small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
}

.cta-animation-devices .cta-effect-toggles {
  padding: 0 0 13px;
}

.cta-effect-stack {
  display: grid;
  gap: 14px;
}

.cta-effect-row {
  min-width: 0;
}

.cta-effect-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 11px;
  cursor: pointer;
}

.cta-effect-switch > span {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
}

.cta-effect-switch > span > svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--brand-2);
}

.cta-effect-switch strong,
.cta-effect-switch small {
  display: block;
}

.cta-effect-switch strong {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
}

.cta-effect-switch small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.4;
}

.cta-effect-switch > input {
  flex: 0 0 auto;
}

.cta-animation-devices .cta-range-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0;
  transition: opacity .18s ease;
}

.cta-animation-devices .cta-range-grid.compact.is-disabled {
  opacity: .38;
  pointer-events: none;
}

.cta-settings-grid {
  display: grid;
  grid-template-columns: minmax(150px, .45fr) minmax(220px, .75fr) repeat(2, minmax(240px, 1fr));
  gap: 12px;
}

.cta-settings-grid .cta-wide {
  grid-column: span 1;
}

.cta-settings-grid .cta-full {
  grid-column: 1 / -1;
}

.cta-action-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 18px;
}

.cta-action-settings fieldset {
  display: grid;
  grid-template-columns: minmax(140px, .55fr) minmax(180px, .75fr) minmax(220px, 1fr);
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.cta-action-settings legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
}

.cta-media-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.cta-media-settings article {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 10px 14px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-subtle);
}

.cta-media-settings article > .check {
  grid-column: 2;
}

.cta-media-preview {
  grid-row: 1 / span 3;
  display: grid;
  width: 128px;
  aspect-ratio: 1;
  overflow: hidden;
  place-items: center;
  border-radius: 7px;
  background: var(--surface-input);
  color: var(--text-muted);
}

.cta-media-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cta-media-preview-bg img {
  object-fit: cover;
}

.cta-media-preview svg {
  width: 28px;
  height: 28px;
}

.cta-fine-tuning {
  margin-top: 18px;
  border-radius: 8px;
  background: var(--surface-subtle);
}

.cta-fine-tuning summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 13px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.cta-fine-tuning summary svg {
  width: 16px;
  height: 16px;
  color: var(--brand-2);
}

.cta-range-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 18px;
  padding: 6px 14px 15px;
}

.cta-range-grid label {
  min-width: 0;
}

.cta-range-grid label > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--text-label);
  font-size: 12px;
  font-weight: 500;
}

.cta-range-grid output {
  color: var(--brand-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.cta-range-grid input[type="range"] {
  width: 100%;
}

.legacy-section-settings {
  display: grid;
  grid-template-columns: minmax(180px, .45fr) minmax(0, 1.55fr);
  gap: 20px;
  align-items: start;
}

.legacy-section-settings article {
  display: grid;
  gap: 10px;
}

.legacy-section-settings .cta-range-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0;
}

.section-editor-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  margin-top: 24px;
}

.section-template-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  font-size: 12px;
}

.section-template-badge svg {
  width: 15px;
  height: 15px;
  color: var(--brand-2);
}

@media (max-width: 1180px) {
  .cta-editor-workbench {
    grid-template-columns: minmax(460px, 1fr) minmax(390px, .9fr);
  }

  .section-editor-meta,
  .cta-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .cta-settings-grid .cta-full {
    grid-column: 1 / -1;
  }

  .cta-action-settings {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1080px) {
  .cta-editor-workbench {
    grid-template-columns: 1fr;
  }

  .cta-preview-column {
    position: relative;
    top: auto;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 900px) {
  .cta-range-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cta-media-settings,
  .section-editor-options {
    grid-template-columns: 1fr;
  }

  .cta-live-card {
    gap: 22px;
  }

  .cta-live-visual {
    flex-basis: 38%;
    width: 38%;
  }
}

@media (max-width: 680px) {
  .section-editor-meta,
  .cta-settings-grid,
  .cta-action-settings fieldset,
  .legacy-section-settings {
    grid-template-columns: 1fr;
  }

  .cta-settings-grid .cta-wide,
  .cta-settings-grid .cta-full {
    grid-column: auto;
  }

  .cta-media-settings article {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .cta-media-preview {
    width: 84px;
  }

  .cta-live-preview-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .cta-settings-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .cta-settings-tabs::-webkit-scrollbar {
    display: none;
  }

  .cta-settings-tabs button {
    flex: 0 0 auto;
    min-width: 112px;
  }

  .cta-animation-devices fieldset {
    padding: 11px;
  }

  .cta-animation-devices .cta-range-grid.compact {
    grid-template-columns: 1fr;
  }

  .cta-live-preview-stage {
    min-height: 0;
    padding: 14px;
  }

  .cta-live-preview[data-preview-mode="desktop"] .cta-live-card,
  .cta-live-card {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .cta-live-preview[data-preview-mode="desktop"] .cta-live-visual,
  .cta-live-visual {
    order: 1;
    flex-basis: auto;
    width: min(100%, 300px);
  }

  .cta-live-preview[data-preview-mode="desktop"] .cta-live-copy,
  .cta-live-copy {
    order: 2;
  }

  .cta-typography-grid {
    grid-template-columns: 1fr;
  }

  .cta-range-grid,
  .legacy-section-settings .cta-range-grid {
    grid-template-columns: 1fr;
  }
}

/* Focused responsive fixes for item management and data tables */
.admin-table-wrap,
.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.admin-table-wrap > table,
.table-wrap > table {
  margin: 0;
}

.item-filter-bar {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
}

.page-title-row .title-actions {
  min-width: 0;
  justify-content: flex-end;
}

.automation-success-panel .generated-item-card.compact.success {
  padding: 14px !important;
  border: 1px solid rgba(74, 222, 128, .18) !important;
  border-radius: 12px !important;
  background: rgba(8, 20, 30, .42) !important;
}

@media (max-width: 980px) {
  .page-title-row {
    flex-wrap: wrap;
  }

  .page-title-row .title-actions {
    flex: 1 1 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .page-title-row .title-actions::-webkit-scrollbar {
    display: none;
  }

  .page-title-row .title-actions > * {
    flex: 0 0 auto;
    width: auto;
  }
}

@media (max-width: 760px) {
  .item-alpha-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    margin-right: -12px;
    padding: 0 12px 4px 0;
    scrollbar-width: none;
  }

  .item-alpha-filter::-webkit-scrollbar {
    display: none;
  }

  .item-alpha-filter a {
    flex: 0 0 auto;
  }

  .admin-table-wrap > table,
  .table-wrap > table {
    min-width: 680px;
  }

  .item-detail-scroll {
    border: 0;
    border-radius: 0;
  }

  .item-detail-scroll .editable-table,
  .item-detail-scroll .editable-table tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .item-detail-scroll .editable-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    width: 100%;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
  }

  .item-detail-scroll .editable-table th,
  .item-detail-scroll .editable-table td {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
  }

  .item-detail-scroll .editable-table th {
    background: transparent;
    color: var(--text-secondary);
    font-size: 11px;
  }

  .item-detail-scroll .edit-icon {
    float: none;
    margin-left: 6px;
  }
}

.auto2-queue-panel {
  display: grid;
  gap: 16px;
}

.auto2-step-list {
  display: grid;
  gap: 10px;
}

.auto2-step-card {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(7, 17, 29, 0.42);
}

.auto2-step-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--admin-accent, #3b82f6);
  background: rgba(59, 130, 246, 0.12);
}

.auto2-step-icon svg {
  width: 18px;
  height: 18px;
}

.auto2-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auto2-step-head strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--admin-text, #f5f8ff);
}

.auto2-step-card p {
  margin: 4px 0 8px;
  color: var(--admin-muted, #9fb0c4);
}

.auto2-step-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--admin-muted, #9fb0c4);
  font-size: 0.84rem;
}

.auto2-step-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auto2-step-meta svg {
  width: 14px;
  height: 14px;
  color: var(--admin-accent, #3b82f6);
}

.auto2-manifest-panel {
  display: grid;
  gap: 16px;
}

.auto2-manifest-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.auto2-manifest-summary span {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(7, 17, 29, 0.42);
  color: var(--admin-text, #f5f8ff);
}

.auto2-manifest-summary strong {
  color: var(--admin-muted, #9fb0c4);
  font-size: 0.76rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auto2-manifest-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auto2-manifest-steps article {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(7, 17, 29, 0.34);
}

.auto2-manifest-steps article > i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: var(--admin-accent, #3b82f6);
  background: rgba(59, 130, 246, 0.12);
}

.auto2-manifest-steps article > svg,
.auto2-manifest-steps article > i svg {
  width: 18px;
  height: 18px;
}

.auto2-manifest-steps strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--admin-text, #f5f8ff);
}

.auto2-manifest-steps p {
  margin: 0;
  color: var(--admin-muted, #9fb0c4);
  line-height: 1.5;
}

.auto2-live-runner {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(10, 20, 33, 0.62);
}

.auto2-live-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.auto2-live-head strong,
.auto2-live-head span {
  display: block;
}

.auto2-live-head strong {
  color: var(--admin-text, #f5f8ff);
  font-size: 0.98rem;
  font-weight: 600;
}

.auto2-live-head [data-auto2-live-detail] {
  margin-top: 3px;
  color: var(--admin-muted, #9fb0c4);
  font-size: 0.84rem;
}

.auto2-live-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.auto2-live-steps article {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  opacity: 0.55;
}

.auto2-live-steps article.is-active {
  background: rgba(37, 99, 235, 0.18);
  opacity: 1;
}

.auto2-live-steps article.is-done {
  background: rgba(34, 197, 94, 0.11);
  opacity: 0.88;
}

.auto2-live-steps article.is-error {
  background: rgba(239, 68, 68, 0.14);
  opacity: 1;
}

.auto2-live-steps article > svg,
.auto2-live-steps article > i svg {
  width: 17px;
  height: 17px;
  color: var(--admin-accent, #3b82f6);
  flex: 0 0 auto;
}

.auto2-live-steps article.is-done > svg,
.auto2-live-steps article.is-done > i svg {
  color: #4ade80;
}

.auto2-live-steps article.is-error > svg,
.auto2-live-steps article.is-error > i svg {
  color: #f87171;
}

.auto2-live-steps strong {
  display: block;
  color: var(--admin-text, #f5f8ff);
  font-size: 0.84rem;
  font-weight: 600;
}

.auto2-live-steps p {
  margin: 2px 0 0;
  color: var(--admin-muted, #9fb0c4);
  font-size: 0.75rem;
  line-height: 1.4;
}

.auto2-live-log {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  color: var(--admin-muted, #9fb0c4);
  font-size: 0.78rem;
}

@media (max-width: 820px) {
  .auto2-step-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .auto2-manifest-summary,
  .auto2-manifest-steps {
    grid-template-columns: 1fr;
  }
}

/* Internal linking */
.internal-link-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.internal-link-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 14px;
  border-radius: 16px;
  background: var(--panel, rgba(12, 25, 39, .92));
  color: var(--admin-text, #f5f8ff);
  text-decoration: none;
}

.internal-link-stat.active {
  background: color-mix(in srgb, var(--brand-panel, rgba(36, 116, 255, .22)) 70%, var(--panel, #0c1927));
}

.internal-link-stat.passive {
  pointer-events: none;
}

.internal-link-stat > svg,
.internal-link-stat > i svg {
  width: 22px;
  height: 22px;
  color: var(--admin-accent, #3b82f6);
}

.internal-link-stat span,
.internal-link-stat strong,
.internal-link-stat small {
  display: block;
}

.internal-link-stat strong {
  color: var(--admin-text, #f5f8ff);
  font-size: 1rem;
  font-weight: 600;
}

.internal-link-stat small {
  color: var(--admin-muted, #9fb0c4);
  font-size: .82rem;
}

.internal-link-filter {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(150px, 190px)) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}

.internal-link-filter label {
  position: relative;
  display: block;
}

.internal-link-filter label svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 17px;
  height: 17px;
  color: var(--admin-accent, #3b82f6);
  transform: translateY(-50%);
}

.internal-link-filter input {
  padding-left: 38px;
}

.internal-link-list {
  display: grid;
  gap: 12px;
}

.internal-link-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: var(--panel, rgba(12, 25, 39, .92));
}

.internal-link-card.status-approved {
  background: color-mix(in srgb, var(--panel, #0c1927) 88%, #16a34a 12%);
}

.internal-link-card.status-dismissed {
  opacity: .72;
}

.internal-link-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.internal-link-route {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.internal-link-route span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--admin-muted, #9fb0c4);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.internal-link-route svg,
.internal-link-route i svg {
  width: 15px;
  height: 15px;
  color: var(--admin-accent, #3b82f6);
}

.internal-link-route strong {
  overflow: hidden;
  color: var(--admin-text, #f5f8ff);
  font-size: .96rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.internal-link-route small {
  overflow: hidden;
  color: var(--admin-muted, #9fb0c4);
  font-size: .78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.internal-link-arrow {
  display: grid;
  place-items: center;
  color: var(--admin-muted, #9fb0c4);
}

.internal-link-arrow svg {
  width: 18px;
  height: 18px;
}

.internal-link-context {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, .12);
}

.internal-link-context span {
  display: block;
  margin-bottom: 6px;
  color: var(--admin-muted, #9fb0c4);
  font-size: .76rem;
}

.internal-link-context code {
  display: inline-block;
  max-width: 100%;
  padding: 6px 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(59, 130, 246, .12);
  color: var(--admin-text, #f5f8ff);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.internal-link-context p {
  margin: 0;
  color: var(--admin-muted, #9fb0c4);
  font-size: .9rem;
  line-height: 1.55;
}

.internal-link-context mark {
  padding: 1px 4px;
  border-radius: 6px;
  background: rgba(59, 130, 246, .2);
  color: var(--admin-text, #f5f8ff);
}

.internal-link-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.internal-link-card-actions form {
  margin: 0;
}

.internal-link-empty {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 220px;
  text-align: center;
}

.internal-link-empty > svg,
.internal-link-empty > i svg {
  width: 36px;
  height: 36px;
  color: var(--admin-muted, #9fb0c4);
}

@media (max-width: 980px) {
  .internal-link-overview,
  .internal-link-filter,
  .internal-link-card-main,
  .internal-link-context {
    grid-template-columns: 1fr;
  }

  .internal-link-arrow {
    display: none;
  }

  .internal-link-card-actions {
    justify-content: flex-start;
  }
}

/* Automation cron slots */
.automation-calendar-kpi {
  grid-template-columns: 42px minmax(0, 1fr);
  align-content: start;
}

.automation-mini-calendar {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  width: min(100%, 420px);
}

.automation-mini-calendar span {
  display: grid;
  gap: 2px;
  min-height: 42px;
  padding: 6px 4px;
  border-radius: 10px;
  background: rgba(148, 163, 184, .08);
  color: var(--muted);
  text-align: center;
}

.automation-mini-calendar span.is-ok {
  background: rgba(34, 197, 94, .16);
  color: #bbf7d0;
}

.automation-mini-calendar span.is-empty {
  background: rgba(239, 68, 68, .11);
  color: #fecaca;
}

.automation-mini-calendar small {
  font-size: 10px;
  line-height: 1.1;
}

.automation-mini-calendar strong {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.1;
}

.automation-cron-panel {
  display: grid;
  gap: 18px;
}

.automation-cron-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.automation-cron-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 16px;
  background: rgba(255, 255, 255, .035);
}

.automation-cron-card.is-active {
  border-color: rgba(74, 222, 128, .24);
  background: linear-gradient(135deg, rgba(22, 163, 74, .14), rgba(255, 255, 255, .035));
}

.automation-cron-card.is-inactive {
  opacity: .76;
}

.automation-cron-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.automation-cron-index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(59, 130, 246, .15);
  color: #93c5fd;
  font-size: 14px;
  font-weight: 500;
}

.automation-cron-card .form-grid.compact {
  grid-template-columns: minmax(0, 1fr) minmax(160px, .65fr);
  gap: 12px;
}

.automation-cron-card label {
  min-width: 0;
}

.automation-cron-card input[readonly] {
  cursor: text;
}

.automation-cron-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.automation-cron-facts div {
  min-width: 0;
  padding: 9px 0 0;
  border-top: 1px solid rgba(148, 163, 184, .12);
}

.automation-cron-facts dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.automation-cron-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 12.5px;
}

.automation-cron-message {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.automation-cron-actions {
  display: flex;
  justify-content: flex-end;
}

.automation-cron-rules {
  grid-template-columns: repeat(2, minmax(0, 260px));
  justify-content: start;
  padding-top: 2px;
}

.automation-token-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.automation-token-actions form {
  margin: 0;
}

@media (max-width: 1100px) {
  .automation-cron-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .automation-dashboard-strip {
    grid-template-columns: 1fr;
  }

  .automation-mini-calendar {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .automation-cron-card .form-grid.compact,
  .automation-cron-facts,
  .automation-cron-rules {
    grid-template-columns: 1fr;
  }

  .automation-cron-actions,
  .automation-cron-actions button,
  .automation-token-actions,
  .automation-token-actions form,
  .automation-token-actions button {
    width: 100%;
  }

  .automation-cron-actions button,
  .automation-token-actions button {
    justify-content: center;
  }
}
/* Blog admin */
.blog-toolbar {
  margin: 18px 0;
}

.blog-admin-title {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.blog-admin-title strong,
.blog-admin-title small,
.blog-admin-title em {
  display: block;
}

.blog-admin-title small,
.blog-admin-title em {
  color: var(--muted);
  margin-top: 4px;
  font-style: normal;
}

.blog-admin-thumb {
  width: 58px;
  height: 42px;
  border-radius: 10px;
  background: rgba(37, 99, 235, .12);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--brand);
}

.blog-admin-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-table .table-actions {
  min-width: 132px;
}

.blog-current-image {
  max-width: 340px;
  border-radius: 14px;
  overflow: hidden;
}

.blog-current-image img {
  width: 100%;
  height: auto;
  display: block;
}

.current-hero-image-preview {
  display: grid;
  grid-template-columns: minmax(220px, 420px) minmax(180px, max-content);
  gap: 16px;
  align-items: center;
  margin: 16px 0;
}

.current-hero-image-preview img {
  width: 100%;
  aspect-ratio: 16 / 5;
  object-fit: cover;
  display: block;
  border-radius: 14px;
  background: rgba(37, 99, 235, .12);
}

@media (max-width: 720px) {
  .current-hero-image-preview {
    grid-template-columns: 1fr;
  }
}

.blog-categories-layout {
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
}

.inline-edit-grid input[type="text"] {
  min-width: 0;
}

.blog-automation-panel {
  max-width: 980px;
}

.status-pill.ok {
  background: color-mix(in srgb, var(--ok) 16%, transparent);
  color: color-mix(in srgb, var(--ok) 80%, #ffffff 20%);
}

.status-pill.info {
  background: color-mix(in srgb, #2563eb 16%, transparent);
  color: color-mix(in srgb, #60a5fa 82%, #ffffff 18%);
}

.status-pill.warning {
  background: color-mix(in srgb, #f59e0b 16%, transparent);
  color: color-mix(in srgb, #fbbf24 82%, #ffffff 18%);
}

.status-pill.muted {
  background: rgba(148, 163, 184, .12);
  color: var(--muted);
}

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

.check-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .045);
}

.check-card input {
  margin-top: 4px;
}

.check-card strong,
.check-card small {
  display: block;
}

.check-card small {
  color: var(--muted);
  margin-top: 3px;
}

.appearance-box-order {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.appearance-box-order h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}

.appearance-box-row {
  display: grid;
  grid-template-columns: minmax(110px, .55fr) minmax(220px, 1fr) minmax(120px, .45fr);
  gap: 12px;
  align-items: end;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .04);
}

.appearance-box-row label {
  margin: 0;
}

@media (max-width: 900px) {
  .blog-categories-layout {
    grid-template-columns: 1fr;
  }

  .blog-admin-title {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .blog-admin-thumb {
    width: 48px;
    height: 38px;
  }

  .appearance-box-row {
    grid-template-columns: 1fr;
  }
}

/* Global backend icon baseline: Lucide icons in controls stay compact and centered. */
.admin-ui {
  --admin-control-icon-size: 16px;
  --admin-sidebar-icon-size: 15px;
}

.admin-ui :where(
  button,
  a.button,
  .secondary-button,
  .button-link,
  .icon-button,
  .delete-button,
  .undo-import-button,
  .thumbnail-refresh-button,
  .restore-button,
  .admin-subnav a,
  .admin-quick-actions a,
  .admin-menu-toggle,
  .admin-sidebar-close,
  .sidebar a,
  .sidebar-logout button,
  .modal-close,
  .drag-handle
) {
  align-items: center;
}

.admin-ui :where(
  button.button,
  button.primary,
  button[type="submit"],
  button[data-modal-open],
  a.button,
  .secondary-button,
  .button-link,
  .delete-button,
  .undo-import-button,
  .thumbnail-refresh-button,
  .restore-button
):has(:where(svg, i[data-lucide])) {
  display: inline-flex;
  justify-content: center;
  gap: 8px;
  line-height: 1.15;
}

.admin-ui :where(
  button,
  a.button,
  .secondary-button,
  .button-link,
  .icon-button,
  .delete-button,
  .undo-import-button,
  .thumbnail-refresh-button,
  .restore-button,
  .admin-subnav a,
  .admin-quick-actions a,
  .admin-menu-toggle,
  .admin-sidebar-close,
  .sidebar a,
  .sidebar-logout button,
  .modal-close,
  .drag-handle
) :where(svg, i[data-lucide]) {
  display: block;
  width: var(--admin-control-icon-size) !important;
  height: var(--admin-control-icon-size) !important;
  min-width: var(--admin-control-icon-size);
  flex: 0 0 var(--admin-control-icon-size);
  stroke-width: 2;
}

.admin-ui :where(.icon-button, .admin-quick-actions a, .modal-close, .drag-handle) {
  display: inline-flex;
  justify-content: center;
  line-height: 1;
}

.admin-ui :where(.sidebar a, .sidebar-logout button) {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}

.admin-ui :where(.sidebar a, .sidebar-logout button) :where(svg, i[data-lucide]) {
  width: var(--admin-sidebar-icon-size) !important;
  height: var(--admin-sidebar-icon-size) !important;
  min-width: var(--admin-sidebar-icon-size);
  flex-basis: var(--admin-sidebar-icon-size);
}

.admin-ui-login {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 18%, rgba(36, 107, 254, .18), transparent 34%),
    radial-gradient(circle at 82% 12%, rgba(16, 163, 127, .13), transparent 30%),
    linear-gradient(135deg, #06111d 0%, #071827 48%, #03101b 100%);
  color: #eef6ff;
}

.admin-ui-login::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.72), transparent 78%);
}

.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.auth-card {
  width: min(460px, 100%);
  display: grid;
  gap: 22px;
  padding: 30px;
  border: 1px solid rgba(190, 213, 238, .14);
  border-radius: 22px;
  background: rgba(6, 18, 31, .78);
  backdrop-filter: blur(20px);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand > span {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(36, 107, 254, .16);
  color: #7fb0ff;
}

.auth-brand svg {
  width: 21px;
  height: 21px;
}

.auth-brand strong {
  display: block;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
}

.auth-brand small,
.auth-copy p,
.auth-footnote {
  color: rgba(238, 246, 255, .66);
}

.auth-copy {
  display: grid;
  gap: 8px;
}

.auth-kicker {
  margin: 0;
  color: #7fb0ff !important;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth-copy h1 {
  margin: 0;
  color: #fff;
  font-size: 34px;
  font-weight: 560;
  letter-spacing: -.02em;
}

.auth-copy p {
  margin: 0;
  font-size: 14px;
}

.auth-form {
  display: grid;
  gap: 15px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  margin: 0;
  color: rgba(238, 246, 255, .76);
  font-size: 13px;
  font-weight: 500;
}

.auth-form input,
.admin-ui-login .auth-form input {
  min-height: 48px;
  border: 1px solid rgba(190, 213, 238, .17) !important;
  border-radius: 13px;
  background: rgba(2, 12, 22, .62) !important;
  color: #fff !important;
  padding: 12px 13px;
}

.auth-form input::placeholder {
  color: rgba(238, 246, 255, .34);
}

.auth-form input:focus {
  border-color: rgba(127, 176, 255, .7) !important;
  outline: 3px solid rgba(36, 107, 254, .18) !important;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 48px !important;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(238, 246, 255, .62);
  cursor: pointer;
}

.password-toggle:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.password-toggle svg {
  width: 17px;
  height: 17px;
}

.auth-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
  font-size: 13px;
}

.auth-row a,
.auth-footnote a {
  color: #9ec3ff;
}

.auth-row a:hover,
.auth-footnote a:hover {
  color: #fff;
}

.auth-submit,
.admin-ui-login button.auth-submit[type=submit] {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #246bfe, #1f8cff) !important;
  color: #fff !important;
  font-weight: 560;
  cursor: pointer;
}

.auth-submit:hover,
.admin-ui-login button.auth-submit[type=submit]:hover {
  filter: brightness(1.05);
  color: #fff !important;
}

.auth-submit svg {
  width: 17px;
  height: 17px;
}

.auth-front-link {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 13px;
  color: rgba(238, 246, 255, .82);
  text-decoration: none;
  background: rgba(255, 255, 255, .06);
}

.auth-front-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, .1);
}

.auth-front-link svg {
  width: 16px;
  height: 16px;
}

.auth-footnote {
  margin: 0;
  font-size: 12.5px;
}

.auth-hp {
  position: absolute;
  left: -9999px;
  width: 1px !important;
  height: 1px !important;
  opacity: 0;
}

.admin-ui-login .alert {
  margin: 0;
  border-radius: 13px;
  padding: 11px 13px;
  font-size: 13px;
}

.admin-ui-login .alert.success,
.admin-ui-login .alert.ok {
  border: 1px solid rgba(94, 210, 142, .24);
  background: rgba(22, 130, 83, .17);
  color: #aaf0c5;
}

.admin-ui-login .alert.error {
  border: 1px solid rgba(255, 122, 105, .24);
  background: rgba(180, 35, 24, .16);
  color: #ffb5ac;
}

@media (max-width: 560px) {
  .auth-shell {
    align-items: stretch;
    place-items: stretch;
    padding: 14px;
  }

  .auth-card {
    align-self: center;
    padding: 22px;
    border-radius: 18px;
  }

  .auth-copy h1 {
    font-size: 30px;
  }
}
