:root {
  color-scheme: light;
  --pg-blue-700: #1463f3;
  --pg-blue-600: #2575ff;
  --pg-green-600: #42b83e;
  --pg-green-500: #65c84d;
  --pg-blue-50: #f4f9ff;
  --pg-green-50: #f6fcf5;
  --bg: #fbfdff;
  --surface: #ffffff;
  --surface-soft: #f6faff;
  --surface-warm: #f7fcf8;
  --ink: #0b1f3f;
  --text: #102b55;
  --muted: #536885;
  --soft: #7890ad;
  --line: #d9e6f5;
  --line-strong: #bfd4ec;
  --accent: var(--pg-blue-700);
  --accent-ink: #ffffff;
  --success: var(--pg-green-600);
  --panel-bg: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  --panel-bg-soft: linear-gradient(180deg, #ffffff 0%, #f7fcf8 100%);
  --shadow: 0 10px 30px rgba(11, 31, 63, 0.06);
  --shadow-strong: 0 20px 55px rgba(11, 31, 63, 0.12);
  --radius: 8px;
  --font: "Manrope", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-family: var(--font);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  background:
    linear-gradient(180deg, #ffffff 0%, #f7fbff 24%, #fbfdff 62%, #ffffff 100%),
    var(--bg);
  color: var(--text);
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

h1,
h2,
h3,
strong {
  color: var(--ink);
}

.admin-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(217, 230, 245, 0.86);
  box-shadow: 0 8px 24px rgba(11, 31, 63, 0.045);
  display: grid;
  gap: 18px;
  grid-column: 1 / -1;
  grid-template-columns: minmax(260px, 390px) minmax(240px, 1fr) auto;
  min-height: 76px;
  padding: 12px 18px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand-block {
  align-items: center;
  display: flex;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  height: 34px;
  object-fit: contain;
  width: 136px;
}

.eyebrow,
.card-kicker,
.detail-grid dt {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  margin: 0;
  text-transform: uppercase;
}

.topbar h1,
.section-heading h2,
.dialog-heading h2 {
  font-size: 21px;
  letter-spacing: 0;
  line-height: 1.08;
  margin: 3px 0 0;
}

.global-search {
  color: var(--muted);
  display: grid;
  font-size: 11px;
  font-weight: 800;
  gap: 5px;
  min-width: 0;
}

input,
select,
textarea {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  min-width: 0;
  padding: 10px 11px;
  width: 100%;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(20, 99, 243, 0.18);
  outline-offset: 2px;
}

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

.primary-action,
.ghost-action,
.danger-action,
.button-link,
.action-link,
.icon-button {
  align-items: center;
  border-radius: var(--radius);
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 38px;
  padding: 9px 13px;
  text-decoration: none;
}

.primary-action,
.button-link,
.action-link {
  background: linear-gradient(180deg, var(--pg-blue-600) 0%, var(--pg-blue-700) 100%);
  border: 1px solid var(--pg-blue-700);
  box-shadow: 0 12px 26px rgba(20, 99, 243, 0.18);
  color: var(--accent-ink);
}

.ghost-action,
.icon-button {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line-strong);
  color: var(--accent);
}

.danger-action {
  background: #fff7f5;
  border: 1px solid rgba(207, 70, 44, 0.34);
  color: #a33d28;
  width: 100%;
}

.side-nav {
  background: rgba(255, 255, 255, 0.9);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  grid-row: 2;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
}

.nav-item {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 42px;
  padding: 10px 12px;
  text-align: left;
  width: 100%;
}

.nav-item span {
  font-weight: 800;
  white-space: nowrap;
}

.nav-item strong {
  background: var(--pg-blue-50);
  border-radius: 999px;
  color: var(--accent);
  flex: 0 0 auto;
  font-size: 11px;
  min-width: 28px;
  padding: 4px 7px;
  text-align: center;
}

.nav-item.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.nav-item.is-active strong {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.status-stack {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}

.status-stack div {
  background: var(--panel-bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 5px;
  padding: 11px;
}

.status-stack span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.status-stack strong {
  font-size: 20px;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr) minmax(260px, 312px);
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.asset-browser,
.inspector {
  background: rgba(255, 255, 255, 0.86);
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
}

.asset-browser {
  border-right: 1px solid var(--line);
}

.inspector {
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-heading {
  display: grid;
  gap: 2px;
}

.filter-row,
.segmented,
.swatch-row,
.tag-list,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-row {
  margin: 16px 0;
}

.filter-row button,
.segmented button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  min-height: 34px;
  padding: 7px 12px;
}

.filter-row button.is-active,
.segmented button.is-active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 10px 22px rgba(20, 99, 243, 0.14);
  color: #ffffff;
}

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

.asset-card {
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: inherit;
  display: grid;
  gap: 9px;
  min-height: 124px;
  padding: 12px;
  text-align: left;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
  width: 100%;
}

.asset-card:hover {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line) 68%);
  box-shadow: var(--shadow-strong);
  transform: translateY(-1px);
}

.asset-card.is-active {
  border-color: var(--accent);
  box-shadow:
    inset 4px 0 0 var(--accent),
    var(--shadow);
}

.asset-card strong {
  font-size: 16px;
  line-height: 1.18;
}

.asset-card > span:not(.card-kicker):not(.choice-swatch):not(.asset-thumb) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.site-list-card {
  align-content: start;
  min-height: 280px;
}

.asset-thumb,
.portfolio-media {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface-soft) 80%, var(--accent) 20%), #ffffff);
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: var(--radius);
  display: grid;
  overflow: hidden;
  position: relative;
}

.asset-thumb {
  aspect-ratio: 16 / 10;
}

.asset-thumb img,
.portfolio-media img {
  height: 100%;
  object-fit: cover;
  object-position: top center;
  width: 100%;
}

.asset-thumb__placeholder,
.portfolio-media__placeholder {
  align-items: center;
  color: var(--accent);
  display: grid;
  font-weight: 800;
  inset: 0;
  justify-items: center;
  position: absolute;
}

.asset-thumb__placeholder span,
.portfolio-media__placeholder span {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.pill {
  background: color-mix(in srgb, var(--pg-blue-50) 80%, var(--pg-green-50) 20%);
  border: 1px solid color-mix(in srgb, var(--line) 82%, var(--accent) 18%);
  border-radius: 999px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
}

.choice-swatch {
  border-radius: var(--radius);
  display: block;
  height: 40px;
  width: 100%;
}

.preview-workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
}

.preview-toolbar {
  align-items: center;
  background: rgba(246, 250, 255, 0.84);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px 16px;
}

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

.toolbar-group > span,
.toolbar-sliders span,
.toggle {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.toolbar-sliders {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  max-width: 540px;
  min-width: min(100%, 420px);
}

.toolbar-sliders label {
  display: grid;
  gap: 5px;
}

.swatch {
  border: 1px solid rgba(11, 31, 63, 0.18);
  border-radius: 999px;
  display: grid;
  height: 30px;
  overflow: hidden;
  padding: 0;
  width: 30px;
}

.swatch.is-active {
  box-shadow: 0 0 0 3px rgba(20, 99, 243, 0.2);
}

.swatch span {
  display: block;
  height: 100%;
  width: 100%;
}

.toggle {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.toggle input {
  accent-color: var(--accent);
  height: 18px;
  width: 18px;
}

.preview-stage {
  align-items: start;
  display: grid;
  min-height: 0;
  overflow: auto;
  padding: 24px;
  place-items: start center;
}

.portfolio-preview {
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-strong);
  display: grid;
  max-width: 1060px;
  overflow: hidden;
  width: min(100%, 1060px);
}

.portfolio-media {
  aspect-ratio: 16 / 10;
  border: 0;
  border-radius: 0;
  min-height: 100%;
}

.portfolio-preview__body {
  align-content: center;
  display: grid;
  gap: 14px;
  padding: clamp(22px, 4vw, 36px);
}

.portfolio-preview__body h2 {
  font-size: clamp(30px, 4.8vw, 56px);
  letter-spacing: 0;
  line-height: 1.04;
  margin: 0;
}

.portfolio-preview__body p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.portfolio-preview__meta {
  color: var(--muted);
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.site-frame-shell {
  background: #07162f;
  border: 1px solid rgba(11, 31, 63, 0.16);
  border-radius: var(--radius);
  box-shadow: var(--shadow-strong);
  display: grid;
  grid-template-rows: 42px minmax(0, 1fr);
  height: min(78vh, 820px);
  overflow: hidden;
  transition: width 160ms ease;
  width: min(100%, 1120px);
}

.site-frame-shell[data-viewport="tablet"] {
  width: min(100%, 780px);
}

.site-frame-shell[data-viewport="mobile"] {
  width: min(100%, 390px);
}

.site-frame-chrome {
  align-items: center;
  color: rgba(255, 255, 255, 0.72);
  display: flex;
  gap: 8px;
  padding: 0 14px;
}

.site-frame-chrome span {
  background: rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  height: 10px;
  width: 10px;
}

.site-frame-chrome strong {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  margin-left: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-frame {
  background: #ffffff;
  border: 0;
  height: 100%;
  width: 100%;
}

.visual-frame,
.style-lab-frame {
  background: var(--visual-bg);
  border: 1px solid rgba(11, 31, 63, 0.14);
  border-radius: var(--lab-radius);
  box-shadow: var(--shadow-strong);
  color: var(--visual-ink);
  overflow: hidden;
}

.visual-frame {
  aspect-ratio: 16 / 10;
  container-type: inline-size;
  display: grid;
  max-height: min(74vh, 760px);
  max-width: 980px;
  position: relative;
  width: min(100%, 980px);
}

.visual-frame[data-format="square"] {
  aspect-ratio: 1 / 1;
  max-width: 760px;
}

.visual-frame[data-format="story"] {
  aspect-ratio: 9 / 16;
  max-height: 78vh;
  max-width: 430px;
}

.visual-frame[data-format="square"] .campaign-layout,
.visual-frame[data-format="story"] .campaign-layout,
.visual-frame[data-format="story"] .report-layout,
.visual-frame[data-format="story"] .agenda-layout,
.visual-frame[data-format="story"] .pricing-row {
  grid-template-columns: 1fr;
}

.visual-frame.has-grid::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 32px 32px;
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

.visual-content {
  display: grid;
  gap: 18px;
  padding: var(--lab-density);
  position: relative;
  z-index: 1;
}

.visual-content h2 {
  font-size: calc(clamp(28px, 7cqw, 58px) * var(--lab-scale));
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
  max-width: 760px;
}

.visual-content p {
  font-size: calc(clamp(13px, 2.4cqw, 16px) * var(--lab-scale));
  line-height: 1.46;
  margin: 0;
  max-width: 620px;
}

.visual-label {
  color: var(--visual-accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.visual-button,
.style-specimen button {
  align-self: start;
  background: var(--visual-accent);
  border: 1px solid var(--visual-accent);
  border-radius: 999px;
  color: var(--visual-button-ink);
  font-size: 13px;
  font-weight: 900;
  padding: 11px 16px;
}

.campaign-layout,
.report-layout,
.agenda-layout {
  grid-template-columns: 1.05fr 0.95fr;
}

.campaign-layout > div:first-child,
.report-layout > div:first-child,
.agenda-layout > div:first-child {
  align-content: start;
  display: grid;
  gap: 16px;
}

.campaign-art {
  align-self: stretch;
  background:
    linear-gradient(145deg, var(--visual-accent), transparent 58%),
    linear-gradient(35deg, var(--visual-second), transparent 44%),
    var(--visual-panel);
  border-radius: max(0px, calc(var(--lab-radius) - 2px));
  min-height: 100%;
}

.dashboard-layout {
  grid-template-rows: auto 1fr auto;
}

.kpi-row,
.mini-table,
.pricing-row {
  display: grid;
  gap: 12px;
}

.kpi-row {
  grid-template-columns: repeat(3, 1fr);
}

.kpi,
.chart-panel,
.report-panel,
.agenda-item,
.price-column,
.specimen-panel,
.specimen-stack div {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(11, 31, 63, 0.14);
  border-radius: var(--lab-radius);
  padding: 14px;
}

.kpi strong,
.price-column strong {
  display: block;
  font-size: calc(30px * var(--lab-scale));
  line-height: 1;
}

.kpi span,
.table-row span,
.price-column span,
.specimen-stack span,
.specimen-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chart-panel {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(8, 1fr);
  min-height: 190px;
}

.bar {
  background: var(--visual-accent);
  border-radius: 999px 999px 0 0;
  min-height: 34px;
}

.bar:nth-child(2n) {
  background: var(--visual-second);
}

.bar:nth-child(3n) {
  background: var(--visual-third);
}

.table-row {
  align-items: center;
  border-top: 1px solid rgba(11, 31, 63, 0.14);
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
}

.report-panel {
  align-content: start;
  display: grid;
  gap: 14px;
}

.report-line {
  background: rgba(11, 31, 63, 0.13);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.report-line span {
  background: var(--visual-accent);
  display: block;
  height: 100%;
}

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

.agenda-item {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 48px 1fr;
}

.agenda-time {
  color: var(--visual-accent);
  font-weight: 900;
}

.pricing-layout {
  align-content: center;
}

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

.price-column {
  display: grid;
  gap: 14px;
  min-height: 220px;
}

.price-column:nth-child(2) {
  background: var(--visual-accent);
  color: var(--visual-button-ink);
}

.price-column:nth-child(2) span,
.price-column:nth-child(2) strong {
  color: inherit;
}

.style-lab-frame {
  display: grid;
  gap: 22px;
  max-width: 980px;
  padding: var(--lab-density);
  width: min(100%, 980px);
}

.style-hero {
  display: grid;
  gap: 14px;
}

.style-hero h2 {
  font-size: calc(clamp(34px, 5vw, 72px) * var(--lab-scale));
  letter-spacing: 0;
  line-height: 0.98;
  margin: 0;
  max-width: 780px;
}

.style-hero p {
  font-size: calc(17px * var(--lab-scale));
  line-height: 1.48;
  margin: 0;
  max-width: 720px;
}

.style-specimen {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 0.8fr;
}

.specimen-panel {
  align-content: start;
  display: grid;
  gap: 14px;
}

.specimen-panel strong {
  font-size: calc(30px * var(--lab-scale));
}

.specimen-panel p {
  line-height: 1.45;
  margin: 0;
}

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

.specimen-stack div {
  display: grid;
  gap: 6px;
}

.detail-grid {
  display: grid;
  gap: 11px;
  margin: 0;
}

.detail-grid div {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 10px;
}

.detail-grid dd {
  font-weight: 800;
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.inspector-section {
  display: grid;
  gap: 9px;
}

.inspector-section h3 {
  font-size: 13px;
  margin: 0;
}

.notes,
.muted {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
}

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

.control-stack label,
.template-dialog label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 7px;
}

input[type="range"] {
  accent-color: var(--accent);
  padding: 0;
}

.empty-state {
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  margin: 0;
  padding: 18px;
}

.template-dialog {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-strong);
  color: var(--ink);
  max-width: 720px;
  padding: 0;
  width: calc(100vw - 32px);
}

.template-dialog::backdrop {
  background: rgba(7, 22, 47, 0.5);
}

.template-dialog form {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.dialog-heading {
  align-items: start;
  display: flex;
  justify-content: space-between;
}

.icon-button {
  height: 36px;
  padding: 0;
  width: 36px;
}

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

@media (max-width: 1420px) {
  .admin-shell {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .workbench {
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  }

  .inspector {
    display: none;
  }
}

@media (max-width: 980px) {
  .admin-shell {
    display: block;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .topbar {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .top-actions {
    justify-content: stretch;
  }

  .top-actions > * {
    flex: 1;
  }

  .side-nav {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .nav-item span {
    white-space: normal;
  }

  .status-stack {
    display: none;
  }

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

  .asset-browser {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    max-height: 52vh;
  }

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

  .portfolio-preview,
  .style-specimen,
  .campaign-layout,
  .report-layout,
  .agenda-layout,
  .pricing-row {
    grid-template-columns: 1fr;
  }

  .preview-stage {
    padding: 16px;
  }
}

@media (max-width: 680px) {
  .brand-block {
    align-items: start;
    flex-direction: column;
  }

  .side-nav,
  .asset-list,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .preview-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-group {
    align-items: start;
    flex-direction: column;
  }

  .toolbar-sliders {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .visual-content h2,
  .style-hero h2,
  .portfolio-preview__body h2 {
    font-size: calc(32px * var(--lab-scale, 1));
  }
}

/* Showroom admin presentation layout */
body {
  background: #fbfdff;
}

.admin-shell {
  grid-template-columns: 76px minmax(0, 1fr);
  grid-template-rows: 86px minmax(0, 1fr);
}

.topbar {
  background: rgba(255, 255, 255, 0.96);
  grid-template-columns: minmax(280px, 370px) minmax(260px, 1fr) auto;
  min-height: 86px;
  padding: 13px 20px;
}

.brand-logo {
  height: 32px;
  width: 128px;
}

.topbar h1 {
  font-size: 20px;
  max-width: 250px;
}

.global-search input {
  min-height: 38px;
}

.top-actions {
  min-width: 92px;
}

.side-nav {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border-right: 1px solid #e2edf8;
  display: flex;
  gap: 18px;
  grid-column: 1;
  grid-row: 2;
  overflow: visible;
  padding: 18px 13px;
}

.nav-item {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #657792;
  display: inline-flex;
  flex: 0 0 auto;
  height: 50px;
  justify-content: center;
  min-height: 50px;
  padding: 0;
  position: relative;
  width: 50px;
}

.nav-item svg {
  fill: none;
  height: 22px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
  width: 22px;
}

.nav-item.is-active {
  background: #eaf3ff;
  border-color: #d9eaff;
  box-shadow: none;
  color: var(--pg-blue-700);
}

.nav-item:hover {
  background: #f3f8ff;
  color: var(--pg-blue-700);
}

.nav-label {
  background: #0b1f3f;
  border-radius: 6px;
  box-shadow: 0 12px 26px rgba(11, 31, 63, 0.18);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  left: calc(100% + 10px);
  line-height: 1;
  opacity: 0;
  padding: 8px 9px;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translate(-3px, -50%);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
  white-space: nowrap;
  z-index: 30;
}

.nav-item:hover .nav-label,
.nav-item:focus-visible .nav-label {
  opacity: 1;
  transform: translate(0, -50%);
}

.nav-item strong {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.workbench {
  background: #fbfdff;
  grid-column: 2;
  grid-row: 2;
  grid-template-columns: minmax(280px, 330px) minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.asset-browser {
  background: rgba(255, 255, 255, 0.88);
  border-right: 1px solid #e2edf8;
  padding: 22px 20px;
}

.asset-browser .section-heading {
  padding: 0 0 4px;
}

.asset-browser .section-heading h2 {
  font-size: 18px;
}

.filter-row:empty {
  display: none;
}

.asset-list {
  gap: 12px;
  padding-top: 14px;
}

.asset-card {
  background: #ffffff;
  border: 1px solid #e2edf8;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(11, 31, 63, 0.04);
  min-height: 0;
  padding: 10px;
}

.asset-card:hover {
  border-color: #c7dcf5;
  box-shadow: 0 14px 32px rgba(11, 31, 63, 0.08);
}

.asset-card.is-active {
  border-color: var(--pg-blue-700);
  box-shadow:
    0 0 0 1px rgba(20, 99, 243, 0.18),
    0 14px 32px rgba(20, 99, 243, 0.1);
}

.site-list-card {
  align-items: center;
  display: grid;
  gap: 11px;
  grid-template-columns: 132px minmax(0, 1fr) 18px;
  min-height: 112px;
  position: relative;
}

.site-list-card .asset-thumb {
  aspect-ratio: 16 / 10;
  border-color: #e5eef8;
  border-radius: 6px;
  width: 132px;
}

.site-card-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.site-card-copy strong {
  font-size: 14px;
  line-height: 1.18;
}

.site-card-status {
  align-items: center;
  color: #536885;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 7px;
  line-height: 1.25;
}

.status-dot {
  background: #b8c7d8;
  border-radius: 999px;
  display: inline-block;
  flex: 0 0 auto;
  height: 7px;
  width: 7px;
}

.status-dot.is-live {
  background: var(--pg-green-600);
  box-shadow: 0 0 0 3px rgba(66, 184, 62, 0.12);
}

.asset-card-check {
  align-items: center;
  background: var(--pg-blue-700);
  border-radius: 999px;
  color: #ffffff;
  display: none;
  font-size: 11px;
  font-weight: 900;
  height: 20px;
  justify-content: center;
  position: absolute;
  right: 9px;
  top: 9px;
  width: 20px;
  z-index: 2;
}

.asset-card.is-active .asset-card-check {
  display: inline-flex;
}

.card-open-icon {
  color: #657792;
  font-size: 15px;
  justify-self: end;
}

.preview-workspace {
  background: #fbfdff;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
}

.preview-toolbar {
  background: transparent;
  border-bottom: 0;
  gap: 16px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1120px;
  min-height: 0;
  padding: 28px 32px 0;
  width: 100%;
}

.toolbar-group--actions {
  margin-left: auto;
}

.segmented {
  background: #ffffff;
  border: 1px solid #e0eaf6;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(11, 31, 63, 0.035);
  display: inline-flex;
  gap: 0;
  overflow: hidden;
}

.segmented button {
  align-items: center;
  background: #ffffff;
  border: 0;
  border-radius: 0;
  color: #3f516b;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 8px;
  min-height: 38px;
  padding: 9px 16px;
}

.segmented button + button {
  border-left: 1px solid #e5eef8;
}

.segmented button.is-active {
  background: #eef6ff;
  box-shadow: none;
  color: var(--pg-blue-700);
}

.device-icon,
.toolbar-action-icon {
  display: inline-block;
  flex: 0 0 auto;
  position: relative;
}

.device-icon--desktop {
  border: 2px solid currentColor;
  border-radius: 3px;
  height: 12px;
  width: 16px;
}

.device-icon--desktop::after {
  background: currentColor;
  bottom: -6px;
  content: "";
  height: 2px;
  left: 4px;
  position: absolute;
  width: 6px;
}

.device-icon--tablet {
  border: 2px solid currentColor;
  border-radius: 3px;
  height: 14px;
  width: 12px;
}

.device-icon--mobile {
  border: 2px solid currentColor;
  border-radius: 4px;
  height: 16px;
  width: 10px;
}

.toolbar-action {
  box-shadow: 0 8px 22px rgba(11, 31, 63, 0.035);
  color: #3f516b;
  gap: 8px;
  min-height: 38px;
}

.toolbar-action:hover {
  border-color: #c7dcf5;
  color: var(--pg-blue-700);
}

.toolbar-action-icon--preview {
  border: 1.8px solid currentColor;
  border-radius: 999px / 70%;
  height: 11px;
  width: 17px;
}

.toolbar-action-icon--preview::after {
  background: currentColor;
  border-radius: 999px;
  content: "";
  height: 4px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
}

.toolbar-action-icon--info {
  border: 1.8px solid currentColor;
  border-radius: 999px;
  height: 16px;
  width: 16px;
}

.toolbar-action-icon--info::before {
  background: currentColor;
  border-radius: 999px;
  content: "";
  height: 2px;
  left: 6px;
  position: absolute;
  top: 4px;
  width: 2px;
}

.toolbar-action-icon--info::after {
  background: currentColor;
  content: "";
  height: 6px;
  left: 7px;
  position: absolute;
  top: 7px;
  width: 2px;
}

.preview-stage {
  align-items: start;
  display: grid;
  min-height: 0;
  overflow: auto;
  padding: 22px 32px 18px;
  place-items: start center;
}

.site-frame-shell {
  background: #ffffff;
  border: 1px solid #dfeaf6;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(11, 31, 63, 0.12);
  grid-template-rows: 34px minmax(0, 1fr);
  height: clamp(440px, 62vh, 760px);
  max-width: 1120px;
  overflow: hidden;
  transition:
    width 180ms ease,
    height 180ms ease;
  width: min(100%, 1120px);
}

.site-frame-shell[data-viewport="tablet"] {
  width: min(100%, 760px);
}

.site-frame-shell[data-viewport="mobile"] {
  height: clamp(560px, 68vh, 780px);
  width: min(100%, 390px);
}

.site-frame-chrome {
  background: #f7fbff;
  border-bottom: 1px solid #e2edf8;
  color: #657792;
  gap: 7px;
  padding: 0 14px;
}

.site-frame-chrome span {
  background: #b4c0cd;
  height: 9px;
  width: 9px;
}

.site-frame-chrome strong {
  color: #3f516b;
  font-size: 11px;
  font-weight: 800;
}

.site-frame {
  background: #ffffff;
}

.site-screenshot-preview {
  background: #ffffff;
  display: block;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  text-decoration: none;
}

.site-screenshot-preview .portfolio-media {
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  height: 100%;
}

.site-screenshot-preview .portfolio-media img {
  height: 100%;
  object-fit: cover;
  object-position: top center;
  width: 100%;
}

.selected-summary {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e2edf8;
  border-radius: 10px;
  box-shadow: 0 12px 34px rgba(11, 31, 63, 0.055);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(220px, 1.05fr) minmax(340px, 1.75fr) auto;
  margin: 0 auto 24px;
  max-width: 1120px;
  padding: 18px 20px;
  width: calc(100% - 64px);
}

.selected-summary:empty {
  display: none;
}

.summary-main {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.summary-main h2 {
  font-size: 18px;
  line-height: 1.15;
  margin: 3px 0 0;
}

.summary-details {
  border-left: 1px solid #edf3fa;
  border-right: 1px solid #edf3fa;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0 18px;
}

.summary-metric {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.summary-metric span {
  color: #657792;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.summary-metric strong {
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-metric--route {
  grid-column: span 2;
}

.summary-tags {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  grid-column: 1 / -1;
}

.summary-action {
  gap: 12px;
  min-width: 178px;
  white-space: nowrap;
}

.info-dialog {
  background: transparent;
  border: 0;
  color: var(--text);
  max-width: 720px;
  padding: 0;
  width: calc(100vw - 32px);
}

.info-dialog::backdrop,
.template-dialog::backdrop {
  background: rgba(7, 22, 47, 0.48);
}

.dialog-panel {
  background: #ffffff;
  border: 1px solid #dfeaf6;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(11, 31, 63, 0.2);
  display: grid;
  gap: 18px;
  padding: 22px;
}

.detail-grid {
  gap: 0;
}

.detail-grid div {
  border-bottom: 1px solid #edf3fa;
  gap: 16px;
  padding: 11px 0;
}

.detail-grid dt {
  color: #657792;
}

.detail-grid dd {
  color: var(--ink);
  font-size: 13px;
}

.template-dialog {
  border-radius: 12px;
}

@media (max-width: 1180px) {
  .selected-summary {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .summary-details {
    border-left: 0;
    border-right: 0;
    border-top: 1px solid #edf3fa;
    padding: 16px 0 0;
  }

  .summary-action {
    justify-self: start;
  }
}

@media (max-width: 980px) {
  .admin-shell {
    display: block;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .topbar {
    position: static;
  }

  .side-nav {
    border-bottom: 1px solid #e2edf8;
    border-right: 0;
    flex-direction: row;
    justify-content: center;
    padding: 10px 14px;
  }

  .nav-label {
    display: none;
  }

  .workbench {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .asset-browser {
    border-bottom: 1px solid #e2edf8;
    border-right: 0;
    max-height: none;
  }

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

  .site-list-card {
    grid-template-columns: 120px minmax(0, 1fr) 18px;
  }

  .site-list-card .asset-thumb {
    width: 120px;
  }

  .preview-workspace {
    min-height: 72vh;
  }

  .preview-toolbar,
  .preview-stage {
    padding-left: 18px;
    padding-right: 18px;
  }

  .selected-summary {
    width: calc(100% - 36px);
  }
}

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

  .brand-block {
    align-items: center;
    flex-direction: row;
  }

  .top-actions {
    justify-content: stretch;
  }

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

  .preview-toolbar {
    align-items: stretch;
  }

  .toolbar-group--actions,
  .device-segmented {
    width: 100%;
  }

  .toolbar-group--actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .device-segmented button {
    flex: 1;
    justify-content: center;
    padding-left: 10px;
    padding-right: 10px;
  }

  .site-frame-shell {
    height: clamp(420px, 62vh, 640px);
  }

  .site-frame-shell[data-viewport="mobile"] {
    height: clamp(520px, 72vh, 720px);
  }

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

  .summary-metric--route {
    grid-column: 1 / -1;
  }

  .summary-action {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .brand-logo {
    width: 112px;
  }

  .topbar h1 {
    font-size: 18px;
  }

  .side-nav {
    gap: 10px;
  }

  .nav-item {
    height: 44px;
    min-height: 44px;
    width: 44px;
  }

  .site-list-card {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .site-list-card .asset-thumb {
    width: 108px;
  }

  .card-open-icon {
    display: none;
  }

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