:root {
  color-scheme: dark;
  --bg: #0c0f14;
  --panel: #171b22;
  --panel-soft: #202630;
  --line: #323946;
  --text: #f2f5f8;
  --muted: #9aa4b2;
  --accent: #2fbf71;
  --accent-blue: #4f8cff;
  --danger: #e5484d;
  --warn: #f1b84b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #0c0f14;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #04100b;
  cursor: pointer;
  font-weight: 800;
  padding: 11px 16px;
  transition: filter .14s ease, transform .14s ease, border-color .14s ease;
}

button:hover {
  filter: brightness(1.08);
}

button.danger {
  background: var(--danger);
  color: #fff;
}

button.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

input[type="color"] {
  cursor: pointer;
  min-height: 46px;
  padding: 4px;
}

input[type="range"] {
  accent-color: var(--accent);
  min-height: 46px;
}

.button-link {
  align-items: center;
  background: var(--accent);
  border-radius: 6px;
  color: #04100b;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  text-decoration: none;
}

.button-link:hover {
  filter: brightness(1.08);
}

.ghost-link {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.avatar-link {
  background: #e8eef5;
  color: #07111d;
}

.topbar {
  align-items: center;
  background: #11151b;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 18px 28px;
}

.top-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.topbar strong {
  display: block;
  font-size: 20px;
}

.topbar span,
.muted {
  color: var(--muted);
}

.layout {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 1240px;
  padding: 24px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .22);
  padding: 20px;
}

.docs-layout {
  max-width: 1120px;
}

.face-swap-layout {
  max-width: 1280px;
}

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

.notice-grid h2 {
  margin-bottom: 8px;
}

.notice-grid p {
  margin-bottom: 0;
}

.tool-panel {
  min-height: 760px;
  padding: 0;
}

.tool-frame {
  background: #0c0f14;
  border: 0;
  border-radius: 8px;
  display: block;
  height: 760px;
  width: 100%;
}

.docs-body {
  color: #dce6f2;
  line-height: 1.62;
  padding: 28px;
}

.docs-body h1 {
  color: #fff;
  font-size: 38px;
  line-height: 1.05;
  margin-bottom: 18px;
}

.docs-body h2 {
  border-top: 1px solid var(--line);
  color: #fff;
  font-size: 24px;
  margin-top: 30px;
  padding-top: 24px;
}

.docs-body h3 {
  color: #e8eef5;
  font-size: 16px;
  margin-top: 24px;
}

.docs-body p,
.docs-body li {
  max-width: 92ch;
}

.docs-body code {
  background: #10141b;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 5px;
  color: #dbeafe;
  padding: 1px 5px;
}

.docs-body pre {
  background: #080b10;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  padding: 16px;
}

.docs-body pre code {
  background: transparent;
  border: 0;
  padding: 0;
}

.docs-body ul {
  display: grid;
  gap: 7px;
  padding-left: 22px;
}

.hero {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 132px;
}

.status-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(96px, 1fr));
  margin-top: 18px;
  max-width: 720px;
}

.status-summary div {
  background: #10141b;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 64px;
  padding: 10px 12px;
}

.status-summary span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-summary strong {
  color: var(--text);
  display: block;
  font-size: 18px;
  margin-top: 4px;
}

.eyebrow {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: 44px;
  line-height: 1;
  margin-bottom: 8px;
}

h2 {
  font-size: 20px;
  margin-bottom: 0;
}

h3 {
  color: var(--text);
  font-size: 15px;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.control-board {
  align-items: stretch;
  gap: 12px;
}

.control-group {
  align-content: flex-start;
  align-items: center;
  background: #10151d;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 180px;
  padding: 12px;
}

.control-group > span {
  color: var(--muted);
  flex: 1 0 100%;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.control-group > strong {
  color: var(--text);
  flex: 1 0 100%;
  font-size: 18px;
}

.emergency-control {
  min-width: 168px;
}

.shutdown-round {
  align-items: center;
  aspect-ratio: 1;
  background: radial-gradient(circle at 35% 30%, #ff6b6b 0%, #dc2626 42%, #8f1010 100%);
  border: 5px solid rgba(255, 255, 255, .78);
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, .34), 0 18px 42px rgba(0, 0, 0, .42);
  color: #fff;
  display: inline-flex;
  flex-direction: column;
  height: 118px;
  justify-content: center;
  line-height: 1.05;
  padding: 0;
  text-transform: uppercase;
  width: 118px;
}

.shutdown-round span {
  font-size: 11px;
  letter-spacing: .04em;
}

.shutdown-round strong {
  font-size: 20px;
}

.shutdown-round:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.maintenance-off {
  display: none;
  white-space: nowrap;
}

body[data-maintenance="on"] .maintenance-off {
  display: inline-flex;
}

.production-resume {
  display: none;
}

body[data-workers-paused="on"] .production-pause {
  display: none;
}

body[data-workers-paused="on"] .production-resume {
  display: inline-flex;
}

.channel-stop {
  display: none;
}

body[data-channel-running="on"] .channel-start {
  display: none;
}

body[data-channel-running="on"] .channel-stop {
  display: inline-flex;
}

body[data-maintenance="on"] #statusTitle {
  color: #ff9da7;
}

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

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

.save-state {
  background: #102018;
  border: 1px solid rgba(47, 191, 113, .42);
  border-radius: 999px;
  color: #8df0b3;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  text-transform: uppercase;
  white-space: nowrap;
}

.save-state[data-state="alterado"],
.save-state[data-state="salvando..."] {
  background: #241d0d;
  border-color: rgba(241, 184, 75, .45);
  color: #ffd889;
}

.save-state[data-state="erro"] {
  background: #2a1215;
  border-color: rgba(229, 72, 77, .55);
  color: #ff9da7;
}

label {
  color: var(--muted);
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

input,
select {
  background: #11161d;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  min-height: 42px;
  padding: 9px 11px;
  width: 100%;
}

input:focus,
select:focus {
  border-color: var(--accent-blue);
  outline: 2px solid rgba(79, 140, 255, .18);
}

.check {
  align-items: center;
  display: flex;
  gap: 10px;
}

.check input {
  min-height: auto;
  width: auto;
}

.form-section {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}

.form-section.first {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.field-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

input:disabled {
  color: var(--muted);
  opacity: .8;
}

video {
  aspect-ratio: 16 / 9;
  background: #020617;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: block;
  width: 100%;
}

.list,
.logs {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
}

.list-item {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  display: block;
  padding: 12px;
  text-decoration: none;
}

.list-item strong {
  display: block;
  margin-bottom: 4px;
}

.list-item span,
.log span {
  color: var(--muted);
  font-size: 13px;
}

.log {
  border-left: 3px solid var(--line);
  padding: 0 0 0 12px;
}

.log.error {
  border-color: var(--danger);
}

.log.warn {
  border-color: var(--warn);
}

.log.info {
  border-color: var(--accent);
}

.log p {
  color: #dce6f2;
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.worker-spend-panel {
  display: grid;
  gap: 16px;
}

.worker-spend-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.worker-spend-item {
  background: #10141b;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-height: 148px;
  padding: 14px;
}

.worker-spend-head,
.worker-spend-meta {
  align-items: start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.worker-spend-head strong {
  display: block;
  font-size: 16px;
}

.worker-spend-head span,
.worker-spend-meta,
.worker-spend-item p {
  color: var(--muted);
  font-size: 13px;
}

.worker-spend-head em {
  background: rgba(47, 191, 113, .12);
  border: 1px solid rgba(47, 191, 113, .28);
  border-radius: 999px;
  color: #9ef2bf;
  flex: 0 0 auto;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  padding: 5px 8px;
}

.worker-spend-bar {
  background: #080b10;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 999px;
  height: 14px;
  overflow: hidden;
}

.worker-spend-bar i {
  background: linear-gradient(90deg, var(--accent-blue), var(--accent));
  display: block;
  height: 100%;
  min-width: 2px;
  transition: width .24s ease;
}

.worker-spend-meta {
  flex-wrap: wrap;
}

.worker-spend-item p {
  margin: 0;
}

.worker-spend-image .worker-spend-bar i {
  background: linear-gradient(90deg, #4f8cff, #2fbf71);
}

.worker-spend-editorial .worker-spend-bar i,
.worker-spend-summary .worker-spend-bar i {
  background: linear-gradient(90deg, #f1b84b, #4f8cff);
}

.worker-spend-guard .worker-spend-bar i {
  background: linear-gradient(90deg, #e5484d, #f1b84b);
}

.login {
  align-items: center;
  display: flex;
  justify-content: center;
  padding: 24px;
}

.login-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  max-width: 420px;
  padding: 28px;
  width: 100%;
}

.login-card strong {
  font-size: 24px;
}

.login-card span,
.error {
  color: var(--muted);
}

.error {
  color: #ff9da7;
}

body[data-status="running"] #statusTitle {
  color: var(--accent);
}

@media (max-width: 760px) {
  .topbar,
  .hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .grid,
  .field-row,
  .notice-grid,
  .template-gallery,
  .worker-spend-list,
  .status-summary {
    grid-template-columns: 1fr;
  }

  .tool-frame,
  .tool-panel {
    min-height: 820px;
  }

  .tool-frame {
    height: 820px;
  }
}

body[data-status="error"] #statusTitle {
  color: #ff9da7;
}

@media (max-width: 840px) {
  .hero,
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

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

  h1 {
    font-size: 34px;
  }
}

body {
  background: linear-gradient(180deg, #10151d 0%, #0c0f14 280px), #0c0f14;
}

.admin-shell {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 1440px;
  padding: 22px;
}

.admin-hero,
.metric-strip,
.admin-grid,
.lower-grid {
  display: grid;
  gap: 14px;
}

.admin-hero {
  align-items: stretch;
  grid-template-columns: minmax(0, 1fr) auto;
}

.status-card {
  background: linear-gradient(135deg, rgba(32, 38, 48, .94), rgba(17, 22, 29, .94));
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 8px;
  min-height: 132px;
  padding: 24px;
}

.status-card h1 {
  font-size: 42px;
  margin: 6px 0 10px;
}

.status-card p {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.quick-actions {
  align-content: start;
  background: rgba(17, 22, 29, .76);
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(132px, 1fr));
  min-width: 360px;
  padding: 14px;
}

.quick-actions button {
  min-height: 42px;
}

.metric-strip {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.metric-strip article {
  background: #141922;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 8px;
  min-height: 76px;
  padding: 13px 14px;
}

.metric-strip span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.metric-strip strong {
  display: block;
  font-size: 21px;
  margin-top: 7px;
}

.admin-grid {
  align-items: start;
  grid-template-columns: minmax(0, 1.42fr) minmax(340px, .58fr);
}

.lower-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
}

.clean-settings {
  overflow: hidden;
  padding: 0;
}

.sticky-title {
  align-items: center;
  background: rgba(20, 25, 34, .96);
  border-bottom: 1px solid rgba(148, 163, 184, .14);
  margin: 0;
  padding: 18px 20px;
}

.settings-tabs {
  background: #10151d;
  border-bottom: 1px solid rgba(148, 163, 184, .14);
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 12px;
}

.tab-button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  flex: 0 0 auto;
  min-height: 38px;
  padding: 9px 12px;
}

.tab-button.active {
  background: #e8eef5;
  border-color: #e8eef5;
  color: #07111d;
}

.tab-panel {
  display: none;
  padding: 22px;
}

.tab-panel.active {
  display: block;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h3 {
  font-size: 18px;
  letter-spacing: 0;
  margin-bottom: 6px;
  text-transform: none;
}

.section-heading p {
  color: var(--muted);
  margin: 0;
}

.settings-footer {
  align-items: center;
  border-top: 1px solid rgba(148, 163, 184, .14);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 20px;
}

.switch {
  align-items: center;
  color: var(--text);
  display: inline-flex;
  gap: 11px;
  margin: 8px 0 16px;
}

.switch input {
  appearance: none;
  height: 1px;
  margin: 0;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.switch span {
  background: #29313d;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 999px;
  display: inline-flex;
  height: 24px;
  position: relative;
  width: 44px;
}

.switch span::after {
  background: #dce6f2;
  border-radius: 999px;
  content: "";
  height: 18px;
  left: 2px;
  position: absolute;
  top: 2px;
  transition: transform .16s ease, background .16s ease;
  width: 18px;
}

.switch input:checked + span {
  background: rgba(47, 191, 113, .2);
  border-color: rgba(47, 191, 113, .5);
}

.switch input:checked + span::after {
  background: var(--accent);
  transform: translateX(20px);
}

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

.clean-preview video {
  border-radius: 8px;
}

.quick-links {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 12px;
}

.quick-links a {
  background: #10151d;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  min-height: 38px;
  padding: 10px 8px;
  text-align: center;
  text-decoration: none;
}

.compact-list {
  max-height: 360px;
}

.content-card .list-item {
  padding: 10px 11px;
}

.sub-heading {
  border-top: 1px solid rgba(148, 163, 184, .12);
  margin-top: 20px;
  padding-top: 18px;
}

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

.color-grid label {
  background: rgba(16, 21, 29, .76);
  border: 1px solid rgba(148, 163, 184, .12);
  border-radius: 8px;
  padding: 10px;
}

.field-badge {
  background: rgba(241, 184, 75, .14);
  border: 1px solid rgba(241, 184, 75, .28);
  border-radius: 999px;
  color: #f8d993;
  display: inline-flex;
  font-size: 10px;
  font-weight: 900;
  margin-left: 6px;
  padding: 2px 6px;
  text-transform: uppercase;
  vertical-align: middle;
}

.inline-switch {
  align-self: end;
  min-height: 46px;
}

.template-select,
.style-json-field {
  display: none;
}

.advanced-json-field {
  background: #0b1017;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 8px;
  color: var(--text);
  font: 12px/1.5 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  min-height: 132px;
  padding: 12px;
  resize: vertical;
  width: 100%;
}

.template-gallery {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 12px 0 18px;
}

.template-card {
  align-items: stretch;
  background: #10151d;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 9px;
  min-height: 0;
  padding: 10px;
  text-align: left;
}

.template-card.active {
  border-color: color-mix(in srgb, var(--accent) 72%, white 12%);
  box-shadow: 0 0 0 2px rgba(47, 191, 113, .18);
}

.template-card strong {
  font-size: 13px;
}

.template-card em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.25;
}

.template-preview {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #132033, #080d15);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.template-preview i {
  border-radius: 3px;
  display: block;
  position: absolute;
}

.template-preview .tpl-bg {
  inset: 0 0 16%;
  background:
    radial-gradient(circle at 72% 26%, rgba(79, 140, 255, .32), transparent 30%),
    linear-gradient(135deg, #24354d, #0b1017);
}

.template-preview .tpl-media {
  background: linear-gradient(135deg, #4f8cff, #2fbf71);
  opacity: .72;
}

.template-preview .tpl-label {
  background: #1d5f90;
  height: 9%;
  left: 5%;
  top: 18%;
  width: 22%;
}

.template-preview .tpl-title {
  background: rgba(248, 250, 252, .95);
  height: 16%;
  left: 5%;
  top: 33%;
  width: 62%;
}

.template-preview .tpl-summary {
  background: rgba(226, 232, 240, .78);
  height: 9%;
  left: 5%;
  top: 58%;
  width: 52%;
}

.template-preview .tpl-source {
  background: rgba(226, 232, 240, .48);
  bottom: 18%;
  height: 5%;
  right: 5%;
  width: 24%;
}

.template-content-classic .tpl-media { inset: 0 0 16%; opacity: .16; }
.template-content-split-anchor .tpl-media { left: 48%; top: 9%; width: 46%; height: 56%; }
.template-content-split-anchor .tpl-title { left: 7%; top: 30%; width: 36%; height: 20%; }
.template-content-split-anchor .tpl-summary { left: 7%; top: 60%; width: 38%; height: 11%; }
.template-content-magazine-cards .tpl-media { left: 50%; top: 10%; width: 42%; height: 42%; }
.template-content-magazine-cards .tpl-title { left: 7%; top: 25%; width: 38%; height: 24%; }
.template-content-magazine-cards .tpl-summary { left: 7%; top: 58%; width: 38%; height: 16%; }

.template-weather-forecast-grid .tpl-media,
.template-weather-current-card .tpl-media,
.template-weather-ticker .tpl-media,
.template-custom-history-newspaper .tpl-media,
.template-custom-timeline .tpl-media,
.template-custom-gallery .tpl-media {
  inset: 0 0 16%;
  opacity: .16;
}

.template-weather-forecast-grid .tpl-title,
.template-weather-current-card .tpl-title,
.template-custom-history-newspaper .tpl-title,
.template-custom-timeline .tpl-title,
.template-custom-gallery .tpl-title {
  left: 5%;
  top: 33%;
  width: 70%;
  height: 20%;
}

.template-weather-forecast-grid .tpl-summary,
.template-weather-current-card .tpl-summary,
.template-custom-history-newspaper .tpl-summary,
.template-custom-timeline .tpl-summary,
.template-custom-gallery .tpl-summary {
  left: 5%;
  top: 61%;
  width: 66%;
  height: 10%;
}

.template-weather-forecast-grid .tpl-source,
.template-weather-current-card .tpl-source {
  left: 70%;
  top: 18%;
  right: auto;
  bottom: auto;
  width: 22%;
  height: 26%;
}

.template-weather-current-card .tpl-title { width: 44%; height: 24%; }
.template-weather-current-card .tpl-summary { width: 60%; }
.template-weather-ticker .tpl-label { top: 65%; }
.template-weather-ticker .tpl-title { left: 31%; top: 65%; width: 18%; height: 8%; }
.template-weather-ticker .tpl-summary { left: 5%; top: 76%; width: 70%; height: 8%; }
.template-weather-ticker .tpl-source {
  left: 78%;
  top: 64%;
  right: auto;
  bottom: auto;
  width: 16%;
  height: 16%;
}

.template-custom-history-newspaper .tpl-label,
.template-custom-timeline .tpl-label,
.template-custom-gallery .tpl-label {
  top: 18%;
}
.template-custom-gallery .tpl-title { width: 58%; }
.template-custom-gallery .tpl-summary { width: 62%; }

.design-studio {
  background: #10151d;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 8px;
  margin-top: 18px;
  overflow: hidden;
}

.design-studio-head {
  align-items: center;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px;
}

.design-studio-head strong,
.commercial-card-head strong {
  display: block;
  font-size: 14px;
}

.design-studio-head span,
.commercial-card-head span,
.commercial-meta {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 3px;
}

.compact-button {
  min-height: 34px;
  padding: 7px 10px;
}

.design-canvas {
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(90deg, rgba(148, 163, 184, .06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(148, 163, 184, .06) 1px, transparent 1px),
    radial-gradient(circle at 18% 20%, rgba(47, 191, 113, .15), transparent 24%),
    linear-gradient(135deg, #151d28, #0b1018);
  background-size: 8.333% 8.333%, 8.333% 8.333%, auto, auto;
  min-height: 260px;
  position: relative;
}

.design-studio[data-editor="content"] .design-canvas {
  background:
    linear-gradient(180deg, rgba(2, 6, 23, .12), rgba(2, 6, 23, .48)),
    radial-gradient(circle at 72% 30%, rgba(79, 140, 255, .26), transparent 28%),
    linear-gradient(135deg, #26364d, #0b111d 78%);
}

.design-canvas::after {
  border: 1px solid rgba(232, 238, 245, .22);
  content: "";
  inset: 7% 5%;
  pointer-events: none;
  position: absolute;
}

.design-block {
  align-items: center;
  background: rgba(232, 238, 245, .92);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
  color: #07111d;
  cursor: grab;
  display: flex;
  font-size: 12px;
  font-weight: 900;
  justify-content: center;
  line-height: 1.15;
  min-height: 28px;
  overflow: hidden;
  padding: 8px;
  position: absolute;
  text-align: center;
  touch-action: none;
}

.design-studio[data-editor="content"] .design-block-image {
  background: rgba(79, 140, 255, .18);
  border-style: dashed;
  color: rgba(232, 238, 245, .74);
}

.design-studio[data-editor="content"] .design-block-label {
  background: #1d5f90;
  color: #fff;
}

.design-studio[data-editor="content"] .design-block-headline,
.design-studio[data-editor="content"] .design-block-summary {
  justify-content: flex-start;
  text-align: left;
}

.design-studio[data-editor="content"] .design-block-headline {
  font-size: 15px;
}

.design-studio[data-editor="content"] .design-block-source {
  background: rgba(2, 6, 23, .56);
  color: rgba(255, 255, 255, .72);
}

.design-block:active {
  cursor: grabbing;
}

.commercial-library {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.commercial-card {
  background: #10151d;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 8px;
  padding: 14px;
}

.commercial-card-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.commercial-card-head em {
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  padding: 5px 8px;
}

.badge-ready {
  background: rgba(47, 191, 113, .16);
  color: #9ff0c4;
}

.badge-missing {
  background: rgba(248, 113, 113, .14);
  color: #fecaca;
}

.commercial-card video,
.commercial-empty {
  aspect-ratio: 16 / 9;
  background: #070b11;
  border: 1px solid rgba(148, 163, 184, .12);
  border-radius: 8px;
  margin-top: 12px;
  width: 100%;
}

.commercial-empty {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-weight: 800;
  justify-content: center;
  padding: 16px;
  text-align: center;
}

.commercial-meta {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin: 9px 0 0;
}

.commercial-actions {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  margin-top: 12px;
}

.commercial-actions input {
  padding: 9px;
}

@media (max-width: 1120px) {
  .admin-hero,
  .admin-grid,
  .lower-grid {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    min-width: 0;
  }

  .metric-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .admin-shell {
    padding: 14px;
  }

  .metric-strip,
  .quick-actions,
  .field-row,
  .quick-links,
  .color-grid,
  .commercial-actions {
    grid-template-columns: 1fr;
  }

  .status-card h1 {
    font-size: 34px;
  }

  .design-canvas {
    min-height: 220px;
  }
}
