:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --ink: #101828;
  --muted: #667085;
  --line: #d9dee8;
  --line-soft: #edf0f5;
  --accent: #0a84ff;
  --accent-strong: #005bd3;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --shadow: 0 18px 44px rgba(16, 24, 40, 0.10);
  --radius: 18px;
  --small-radius: 10px;
  --sidebar: 260px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(10, 132, 255, 0.10), transparent 30%),
    linear-gradient(180deg, #fbfbfd 0%, var(--bg) 100%);
  color: var(--ink);
}

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

button {
  cursor: pointer;
}

.proofello-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px 18px;
  background: rgba(251, 251, 253, 0.80);
  border-right: 1px solid var(--line-soft);
  backdrop-filter: blur(22px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(145deg, var(--brand-primary, #111827), var(--accent));
  box-shadow: 0 10px 26px rgba(10, 132, 255, 0.24);
}

.brand-mark.proofello-brand-mark {
  overflow: hidden;
  background: transparent;
  box-shadow: 0 10px 26px rgba(10, 132, 255, 0.24);
}

.brand-mark.proofello-brand-mark img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  background: transparent;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.eyebrow,
.sidebar-card small,
.muted {
  color: var(--muted);
}

.eyebrow {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-list {
  display: grid;
  gap: 7px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #344054;
  text-align: left;
  font-weight: 700;
}

.nav-item strong {
  min-width: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: #175cd3;
  font-size: 12px;
  text-align: center;
}

.nav-item.is-active,
.nav-item:hover {
  background: #ffffff;
  color: #101828;
  box-shadow: 0 10px 25px rgba(16, 24, 40, 0.08);
}

.sidebar-card {
  margin-top: auto;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.07);
}

.sidebar-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.plan-select {
  width: 100%;
  margin-bottom: 12px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfbfd;
  color: var(--ink);
  font-weight: 800;
}

.usage-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.usage-meter span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 220ms ease;
}

.main {
  min-width: 0;
  padding: 22px clamp(18px, 3vw, 38px) 44px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 22px;
}

p {
  color: #475467;
  line-height: 1.55;
}

.topbar-actions,
.composer-actions,
.button-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.watermark-live-controls {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 8px;
}

.watermark-slider-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 13px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff 0%, #f8fbff 100%);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .045);
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.watermark-slider-row:hover {
  border-color: #bfdbfe;
  box-shadow: 0 10px 26px rgba(10, 132, 255, .08);
  transform: translateY(-1px);
}

.watermark-slider-copy,
.watermark-slider-control {
  min-width: 0;
}

.watermark-slider-copy strong,
.watermark-slider-copy small {
  display: block;
}

.watermark-slider-copy strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.watermark-slider-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.watermark-slider-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 100%;
}

.watermark-slider-control input[type="range"] {
  width: 100%;
  height: 6px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(to right, var(--accent) 0 var(--slider-progress, 50%), #dbe4ef var(--slider-progress, 50%) 100%);
  cursor: pointer;
}

.watermark-slider-control input[type="range"]::-webkit-slider-thumb {
  width: 19px;
  height: 19px;
  border: 3px solid #fff;
  border-radius: 50%;
  -webkit-appearance: none;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(10, 132, 255, .35), 0 0 0 1px rgba(10, 132, 255, .22);
}

.watermark-slider-control input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(10, 132, 255, .35), 0 0 0 1px rgba(10, 132, 255, .22);
}

.watermark-slider-control input[type="range"]:focus-visible {
  outline: 3px solid rgba(10, 132, 255, .2);
  outline-offset: 5px;
}

.watermark-slider-control input[type="range"]:disabled {
  filter: grayscale(1);
  opacity: .55;
  cursor: not-allowed;
}

.watermark-slider-control output {
  padding: 7px 8px;
  border: 1px solid #dbe7f5;
  border-radius: 9px;
  background: #fff;
  color: var(--accent-strong);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.watermark-slider-note {
  display: block;
  margin-top: 8px;
  padding-inline: 2px;
}

.watermark-image-color-toggle {
  padding: 10px 12px;
  border: 1px solid #dbe7f5;
  border-radius: 12px;
  background: rgba(255, 255, 255, .84);
}

.watermark-image-color-toggle span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.watermark-image-color-toggle:has(input:checked) {
  border-color: rgba(10, 132, 255, .38);
  background: #eef7ff;
}

.watermark-image-color-help {
  margin-top: -6px;
  padding-inline: 2px;
}

.customer-preview-button { margin-top: 10px; }

.primary-button,
.secondary-button,
.ghost-button,
.tool-button,
.chip-button {
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.primary-button {
  padding: 11px 18px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 26px rgba(10, 132, 255, 0.24);
}

.secondary-button,
.ghost-button,
.tool-button,
.chip-button {
  padding: 10px 15px;
  background: #fff;
  color: #1d2939;
  border-color: var(--line);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.55);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.tool-button:hover,
.chip-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.full {
  width: 100%;
  justify-content: center;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.hero-panel,
.panel,
.composer-panel,
.canvas-stage,
.settings-content,
.settings-menu,
.public-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.public-proofello-brand {
  display: grid;
  justify-items: center;
  gap: 7px;
  margin: 28px -4px -4px;
  padding: 22px 18px 4px;
  border-top: 1px solid var(--line-soft);
  color: #667085;
  text-align: center;
}

.public-proofello-brand[hidden] {
  display: none;
}

.public-proofello-brand a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #344054;
  font-size: 14px;
  text-decoration: none;
}

.public-proofello-brand a:hover {
  color: var(--accent-strong);
}

.public-proofello-brand img {
  width: 28px;
  height: 28px;
  border-radius: 9px;
}

.public-proofello-brand small {
  color: #98a2b3;
  font-size: 11px;
}

.hero-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 28px;
  margin-bottom: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.70)),
    radial-gradient(circle at right, rgba(10, 132, 255, 0.13), transparent 35%);
}

.hero-panel p {
  max-width: 820px;
  margin-bottom: 0;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card {
  min-height: 126px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: #fff;
}

.metric-card strong {
  display: block;
  margin: 10px 0 4px;
  font-size: 30px;
}

.panel {
  padding: 18px;
}

.panel-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.search-input,
.field {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}

.search-input {
  max-width: 360px;
}

.proof-queue-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: min(100%, 560px);
}

.proof-queue-actions .search-input {
  max-width: 360px;
}

.proof-queue-actions .secondary-button {
  min-height: 44px;
  white-space: nowrap;
}

.search-input:focus,
.field:focus {
  border-color: rgba(10, 132, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.10);
}

.status-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.compact-tabs {
  max-width: 640px;
  justify-content: flex-end;
}

.chip-button.is-active {
  background: #eaf4ff;
  border-color: rgba(10, 132, 255, 0.30);
  color: var(--accent-strong);
}

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

.proof-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 0 2px;
}

.proof-pagination-summary,
.proof-pagination-page {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.proof-pagination-actions {
  align-items: center;
}

.proof-pagination-actions button {
  min-width: 96px;
}

.proof-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.proof-table th,
.proof-table td {
  padding: 14px 12px;
  border-top: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
}

.proof-table.is-compact th,
.proof-table.is-compact td {
  padding: 9px 10px;
}

.proof-table.is-compact .button-row {
  gap: 6px;
}

.proof-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: #175cd3;
  font-weight: 800;
  font-size: 12px;
}

.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.approved {
  background: #ecfdf3;
  color: var(--green);
}

.status-pill.changes_requested {
  background: #fff7ed;
  color: var(--amber);
}

.status-pill.sent,
.status-pill.viewed {
  background: #eff6ff;
  color: #2563eb;
}

.status-pill.archived,
.status-pill.expired {
  background: #f2f4f7;
  color: #667085;
}

.composer-grid {
  display: grid;
  grid-template-columns: 300px minmax(420px, 1fr) 320px;
  gap: 16px;
  align-items: stretch;
  min-height: calc(100vh - 120px);
  min-width: 0;
}

.composer-panel {
  padding: 18px;
  min-width: 0;
}

.composer-panel h2 {
  margin-bottom: 16px;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.detail-row {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
}

.detail-row span,
.field-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.timestamp-line {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.order-context-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0 4px;
  padding: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #f8fafc;
}

.order-context-tab {
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.order-context-tab.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08);
}

.ordered-item-list {
  display: grid;
  gap: 10px;
}

.ordered-item-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fff;
}

.ordered-item-card.is-proof-required {
  border-color: rgba(10, 132, 255, 0.34);
  background: linear-gradient(135deg, #fff, #f7fbff);
}

.ordered-item-main {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.ordered-item-image {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  overflow: hidden;
  background: #eef4ff;
}

.ordered-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ordered-item-image strong {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e4e7ec;
  color: #344054;
  font-size: 12px;
  text-align: center;
}

.ordered-item-card small,
.order-notes-card p {
  color: var(--muted);
}

.proof-required-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

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

.ordered-item-card.is-proof-required .proof-required-toggle {
  border-color: rgba(10, 132, 255, 0.32);
  background: #eef6ff;
  color: var(--ink);
}

.proof-item-selection-note {
  display: block;
  margin-top: 8px;
  line-height: 1.35;
}

.order-notes-card p {
  margin: 0 0 10px;
  line-height: 1.45;
}

.canvas-stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.62);
}

.canvas-toolbar {
  grid-area: toolbar;
  display: flex;
  gap: 8px;
  justify-self: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  margin-inline: auto;
  padding: 0 0 2px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.item-page-strip {
  border-bottom: 1px solid var(--line-soft);
  background: rgba(248, 250, 252, 0.78);
}

.item-page-strip-scroll {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  overflow-x: auto;
}

.item-page-pill {
  display: grid;
  grid-template-columns: auto minmax(90px, 1fr);
  min-width: 170px;
  gap: 2px 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.item-page-pill small {
  grid-column: 2;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-page-pill.is-active {
  border-color: rgba(10, 132, 255, 0.38);
  box-shadow: 0 10px 24px rgba(10, 132, 255, 0.12);
}

.multi-lock-copy {
  display: block;
  padding: 0 14px 10px;
}

.proof-status-tracker {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.status-track-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.status-track-row small {
  display: block;
  color: var(--muted);
}

.status-track-row.is-active {
  border-color: rgba(10, 132, 255, 0.36);
  background: #f7fbff;
}

.status-icon,
.item-status-dot {
  display: inline-block;
  border-radius: 999px;
  background: #98a2b3;
}

.status-icon {
  width: 16px;
  height: 16px;
  box-shadow: inset 0 0 0 3px #fff, 0 0 0 1px rgba(16, 24, 40, 0.18);
}

.item-status-dot {
  width: 10px;
  height: 10px;
}

.status-icon.approved,
.item-status-dot.approved {
  background: var(--green);
}

.status-icon.changes_requested,
.item-status-dot.changes_requested {
  background: var(--red);
}

.status-icon.viewed,
.item-status-dot.viewed {
  background: var(--accent);
}

.tool-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 12px;
}

.tool-button.is-active {
  color: #fff;
  background: #111827;
}

.tool-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
}

.eyedropper-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.canvas-workspace {
  display: grid;
  grid-template-columns: minmax(210px, 250px) minmax(0, 1fr) minmax(230px, 280px);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas:
    ". toolbar ."
    "refs frame colors";
  gap: 12px 14px;
  min-height: 0;
  padding: 10px 14px 14px;
  overflow: hidden;
}

.revision-reference-panel {
  grid-area: refs;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  min-height: 0;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.revision-reference-heading {
  align-items: flex-start;
}

.revision-reference-toggle {
  display: none;
}

.revision-reference-list {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.revision-reference-card,
.empty-reference-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.06);
}

.revision-reference-card.changes-requested {
  border-color: rgba(249, 115, 22, 0.28);
}

.revision-reference-card.approved {
  border-color: rgba(22, 163, 74, 0.24);
}

.revision-preview-button {
  display: grid;
  place-items: center;
  width: 100%;
  height: 160px;
  padding: 8px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 850;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.revision-preview-button img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  background: #fff;
  border-radius: 10px;
}

.revision-preview-button:disabled {
  cursor: default;
  opacity: 0.72;
}

.revision-reference-meta strong,
.revision-reference-meta small,
.empty-reference-card strong,
.empty-reference-card small {
  display: block;
}

.revision-reference-meta small,
.empty-reference-card small {
  color: var(--muted);
}

.revision-reference-card p {
  margin: 0;
  padding: 10px 11px;
  max-height: 116px;
  overflow: auto;
  overflow-wrap: anywhere;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 12px;
  background: #fbfcff;
  color: #344054;
  font-size: 13px;
  line-height: 1.45;
}

.revision-reference-card p::before {
  content: "Customer comment";
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.revision-attachment-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  padding-top: 2px;
}

.revision-attachment-grid::before {
  content: "Customer reference upload";
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.revision-attachment-thumb {
  display: grid;
  place-items: center;
  height: 112px;
  padding: 7px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fbfbfd;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.82);
}

.revision-attachment-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  border-radius: 9px;
}

.saved-proof-drafts {
  display: grid;
  gap: 9px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}

.saved-proof-heading strong,
.saved-proof-heading small {
  display: block;
}

.saved-proof-heading strong {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.saved-proof-heading small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.saved-proof-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fbfbfd;
}

.saved-proof-preview {
  order: 2;
  display: grid;
  place-items: center;
  width: 100%;
  height: 118px;
  padding: 6px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.saved-proof-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.saved-proof-meta {
  order: 1;
  width: 100%;
  min-width: 0;
}

.saved-proof-meta strong,
.saved-proof-meta small {
  display: block;
  overflow-wrap: anywhere;
}

.saved-proof-card > .secondary-button {
  order: 3;
  width: 100%;
  min-height: 34px;
}

.saved-proof-meta strong {
  white-space: normal;
}

.saved-proof-meta small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.canvas-frame {
  grid-area: frame;
  position: relative;
  display: grid;
  place-items: center;
  align-content: start;
  gap: 12px;
  min-width: 0;
  min-height: 520px;
  padding: 16px 24px 24px;
  background:
    linear-gradient(45deg, #eef1f6 25%, transparent 25%),
    linear-gradient(-45deg, #eef1f6 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef1f6 75%),
    linear-gradient(-45deg, transparent 75%, #eef1f6 75%);
  background-size: 28px 28px;
  background-position: 0 0, 0 14px, 14px -14px, -14px 0;
}

.canvas-color-panel {
  grid-area: colors;
}

canvas {
  width: min(100%, 720px);
  max-height: calc(100vh - 220px);
  aspect-ratio: 900 / 1120;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(16, 24, 40, 0.20);
  touch-action: none;
}

.canvas-frame.is-picking canvas {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%23101828' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 4.6 19.4 9.3'/%3E%3Cpath d='M12.9 6.4l4.7 4.7'/%3E%3Cpath d='M5.2 18.8l3.1-.7 8.9-8.9a2.1 2.1 0 0 0-3-3l-8.9 8.9-.7 3.1a.6.6 0 0 0 .6.6Z'/%3E%3Cpath d='M8.3 18.1 4 20'/%3E%3C/svg%3E") 4 24, crosshair;
}

.canvas-frame.is-horizontal canvas {
  width: min(100%, 820px);
  aspect-ratio: 1120 / 900;
}

.text-options-panel {
  display: grid;
  gap: 8px;
  width: min(100%, 680px);
  padding: 9px;
  border: 1px solid rgba(16, 24, 40, 0.10);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.10);
  backdrop-filter: blur(12px);
}

.text-options-panel[hidden] {
  display: none;
}

.text-options-row {
  display: grid;
  align-items: center;
  gap: 8px;
}

.text-options-primary {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.text-options-secondary {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.text-options-title {
  display: flex;
  align-items: center;
}

.text-options-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.text-copy-control {
  min-width: 0;
}

.text-options-panel label span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.text-options-panel .compact-area {
  min-height: 40px;
  max-height: 48px;
  resize: none;
}

.text-options-panel .field {
  min-height: 40px;
}

.compact-grid.text-options-grid {
  grid-template-columns: minmax(88px, 0.75fr) 70px 54px 92px;
  gap: 8px;
}

.text-style-control {
  display: grid;
  gap: 4px;
  align-self: stretch;
}

.text-style-control > span {
  display: block;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.text-style-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.text-bold-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  user-select: none;
}

.text-bold-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.text-bold-toggle span {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: none;
}

.text-bold-toggle:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.text-bold-toggle:has(input:checked) span {
  color: var(--accent);
}

.mini-icon-button,
.mini-danger-button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.mini-danger-button {
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.22);
}

.color-picker-lens {
  position: absolute;
  z-index: 3;
  display: none;
  grid-template-columns: 72px;
  justify-items: center;
  gap: 6px;
  min-width: 92px;
  padding: 8px;
  border: 1px solid rgba(16, 24, 40, 0.16);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(16, 24, 40, 0.22);
  pointer-events: none;
  transform: translate(18px, -92px);
  backdrop-filter: blur(10px);
}

.canvas-frame.is-picking .color-picker-lens.is-visible {
  display: grid;
}

.color-picker-lens canvas {
  width: 72px;
  height: 72px;
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(16, 24, 40, 0.20);
}

.color-picker-lens span {
  width: 22px;
  height: 22px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(16, 24, 40, 0.18);
}

.color-picker-lens strong {
  padding: 5px 8px;
  border-radius: 999px;
  background: #101828;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.03em;
}

.canvas-color-panel {
  align-self: stretch;
  margin: 0;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}

.hidden-file {
  display: none;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  font-weight: 700;
}

.text-area {
  min-height: 110px;
  resize: vertical;
}

.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 16px;
}

.swatch {
  width: 32px;
  height: 32px;
  border: 2px solid #fff;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(16, 24, 40, 0.18);
}

.proof-version-card {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(10, 132, 255, 0.18);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(10, 132, 255, 0.10), rgba(255, 255, 255, 0.92));
}

.proof-version-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.proof-version-card strong {
  color: #101828;
  font-size: 26px;
}

.proof-version-card small,
.muted {
  color: var(--muted);
}

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

.layout-option {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.layout-option small {
  color: var(--muted);
}

.layout-option.is-active {
  border-color: rgba(10, 132, 255, 0.46);
  background: #eef7ff;
  box-shadow: 0 10px 24px rgba(10, 132, 255, 0.12);
}

.layout-option:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.file-control {
  display: grid;
  gap: 6px;
  margin: 8px 0 16px;
}

.file-control .secondary-button {
  width: 100%;
}

.pro-feature {
  padding: 10px 12px;
  border: 1px solid rgba(10, 132, 255, 0.18);
  border-radius: 14px;
  background: rgba(10, 132, 255, 0.06);
}

.proof-unlock-note,
.proof-unlock-panel {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fbfbfd;
}

.proof-unlock-note p {
  margin: 0;
  color: #475467;
}

.proof-unlock-panel summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--red);
}

.internal-notes-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 13px;
  border: 1px solid rgba(10, 132, 255, 0.14);
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff, #f7fbff);
}

.canvas-internal-notes-slot {
  width: min(100%, 900px);
}

.internal-notes-panel.is-locked {
  border-color: var(--line-soft);
  background: #fbfbfd;
}

.compact-heading-row {
  gap: 10px;
  align-items: start;
}

.internal-note-list {
  display: grid;
  gap: 8px;
  max-height: 210px;
  overflow: auto;
}

.internal-note-card {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
}

.internal-note-card div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.internal-note-card p {
  margin: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.45;
}

.internal-note-form {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.internal-note-form .text-area {
  min-height: 68px;
}

.danger-button {
  border-color: rgba(220, 38, 38, 0.28);
  color: var(--red);
}

.switch-row.is-locked {
  opacity: 0.62;
}

.color-picker-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  align-content: start;
  gap: 10px;
  margin: 10px 0 16px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: #fff;
  height: 100%;
}

.layer-panel {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: #fff;
}

.layer-list {
  display: grid;
  gap: 7px;
}

.layer-stack {
  display: grid;
  gap: 8px;
}

.layer-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: #fbfbfd;
  color: var(--ink);
  text-align: left;
}

.layer-row small,
.layer-row strong {
  display: block;
}

.layer-row small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layer-row.is-active {
  border-color: rgba(10, 132, 255, 0.42);
  background: #eef7ff;
}

.layer-inline-controls {
  display: grid;
  gap: 10px;
  margin-left: 24px;
  padding: 12px;
  min-width: 0;
  border: 1px solid rgba(10, 132, 255, 0.16);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(10, 132, 255, 0.07), rgba(255, 255, 255, 0.95));
}

.layer-inline-controls small {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

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

.layer-color-control input[type="color"] {
  width: 54px;
  height: 42px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

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

.rgb-control-grid label span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.compact-switch {
  margin: 0;
}

.compact-button {
  width: 100%;
  justify-content: center;
}

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

.danger-text-button {
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.22);
}

.danger-text-button:disabled {
  color: #98a2b3;
  cursor: not-allowed;
  border-color: var(--line-soft);
  background: #f8fafc;
}

.compact-layer-controls {
  gap: 8px;
}

.compact-layer-controls .tiny-button {
  justify-self: start;
}

.layer-grip {
  width: 8px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(#d0d5dd 25%, transparent 25% 50%, #d0d5dd 50% 75%, transparent 75%);
}

.section-heading-row,
.color-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.color-readout {
  align-items: stretch;
  flex-direction: column;
}

.color-panel-heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.color-panel-copy {
  display: block;
  min-width: 0;
}

.color-panel-copy .field-label {
  display: block;
  white-space: normal;
}

.color-panel-copy .muted {
  display: block;
  min-width: 0;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
}

.color-panel-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: space-between;
}

.color-panel-actions .tiny-button {
  flex: 1;
  justify-content: center;
}

.color-panel-heading .tiny-button {
  align-self: auto;
}

.color-panel-pick-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.color-panel-pick-button .tool-icon {
  width: 14px;
  height: 14px;
}

.color-panel-pick-button.is-active {
  border-color: #0a84ff;
  background: #0b1220;
  color: #fff;
}

.color-readout .field {
  min-width: 0;
}

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

.color-readout .field {
  grid-column: 1 / -1;
}

.color-readout .secondary-button {
  width: 100%;
}

.color-palette-controls {
  display: grid;
  align-self: start;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fff;
}

.color-palette-controls.is-locked {
  background: #f8fafc;
}

.palette-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.palette-action-row select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.palette-action-row .secondary-button,
.palette-action-row .ghost-button {
  width: 100%;
  min-height: 42px;
  height: 42px;
  justify-content: center;
  white-space: nowrap;
}

.palette-button-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
}

.palette-button-row .tiny-button {
  min-width: 0;
  padding-inline: 10px;
}

.palette-delete-button {
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.22);
}

.palette-delete-button:hover {
  background: #fff5f5;
}

.subtle-button {
  border-color: rgba(10, 132, 255, 0.18);
  background: #f7fbff;
  color: #175cd3;
}

.tiny-button {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.picked-color-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}

.picked-color-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fbfbfd;
}

.picked-color-card strong,
.picked-color-card small {
  display: block;
}

.picked-color-details {
  min-width: 0;
}

.picked-color-name-input {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.plan-price,
.plan-rules,
.autosave-status {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.plan-price {
  margin: -4px 0 10px;
  color: #175cd3;
}

.plan-rules {
  margin-top: 8px;
}

.autosave-status {
  margin-top: 6px;
  color: #175cd3;
}

.picked-color-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.picked-color-swatch {
  width: 32px;
  height: 32px;
  border: 2px solid #fff;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(16, 24, 40, 0.18);
}

.compact-copy {
  margin-bottom: 0;
  font-size: 13px;
}

.tier-callout {
  margin-top: 16px;
  padding: 13px;
  border-radius: 14px;
  background: #f8fafc;
  color: #475467;
  font-size: 13px;
}

.approved-export-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(22, 163, 74, 0.24);
  border-radius: 16px;
  background: linear-gradient(135deg, #f0fdf4, #ffffff);
}

.approved-export-panel[hidden] {
  display: none;
}

.approved-export-panel > div,
.approved-export-panel label:not(.switch-row) {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.approved-export-panel strong {
  color: #166534;
  font-size: 16px;
}

.approved-export-panel small {
  color: #475467;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.approved-export-panel label:not(.switch-row) > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.approved-export-notes-toggle {
  margin: 0;
}

.approved-export-notes-toggle > span {
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

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

.settings-menu,
.settings-content {
  padding: 16px;
}

.settings-option {
  width: 100%;
  padding: 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  text-align: left;
  color: var(--ink);
}

.settings-option.is-active,
.settings-option:hover {
  background: #fff;
  border-color: var(--line-soft);
}

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

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

.setting-card {
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: #fff;
}

.setting-card h3 {
  margin: 0 0 12px;
}

.storage-usage-card {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.storage-usage-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.storage-usage-heading h3,
.storage-usage-card p {
  margin: 4px 0 0;
}

.storage-usage-card .usage-meter {
  width: 100%;
}

.email-settings-hero,
.email-settings-panel,
.email-delivery-card,
.email-automation-card,
.email-proof-preview-card,
.email-test-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: linear-gradient(135deg, #fff, #f8fbff);
  box-shadow: 0 18px 44px rgba(16, 24, 40, 0.06);
}

#emailSettingsForm,
#emailSettingsForm > *,
#emailSettingsForm label,
#emailSettingsForm .field,
#emailSettingsForm .email-section-heading > *,
#emailSettingsForm .email-branding-control > *,
#emailSettingsForm .email-template-group,
#emailSettingsForm .email-template-summary-card > *,
#emailSettingsForm .email-test-controls > * {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

#emailSettingsForm h2,
#emailSettingsForm h3,
#emailSettingsForm h4,
#emailSettingsForm p,
#emailSettingsForm small,
#emailSettingsForm span {
  overflow-wrap: anywhere;
}

.email-delivery-card,
.email-automation-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(16, 24, 40, .06);
}

.email-section-heading,
.email-branding-control,
.email-journey-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.email-section-heading h3,
.email-journey-heading h4 {
  margin: 0 0 6px;
}

.email-section-heading p,
.email-journey-heading p,
.email-branding-control p {
  margin: 0;
  color: #667085;
  line-height: 1.5;
}

.email-required-pill,
.email-always-on {
  display: inline-flex;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: #1269ff;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

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

.email-delivery-grid label {
  display: grid;
  gap: 7px;
}

.email-delivery-grid label > span {
  color: #475467;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.email-branding-control {
  align-items: center;
  padding: 16px;
  border: 1px solid #d9e5f4;
  border-radius: 18px;
  background: linear-gradient(135deg, #f7fbff, #fff);
}

.email-branding-control.is-locked {
  border-color: #e8dfc1;
  background: #fffaf0;
}

.email-branding-control strong {
  display: block;
  margin-bottom: 5px;
}

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

.email-journey-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-top: 5px solid #3b82f6;
  border-radius: 18px;
  background: linear-gradient(145deg, #fff, #f8fbff);
}

.email-journey-card[data-tone="changes"] { border-top-color: #d97706; }
.email-journey-card[data-tone="payment"] { border-top-color: #16a34a; }

.email-journey-heading {
  justify-content: flex-start;
}

.email-journey-heading > span {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #101828;
  color: #fff;
  font-weight: 950;
}

.email-journey-card ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.email-journey-card li {
  position: relative;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0 10px 18px;
  border-left: 2px solid #dbe7f5;
}

.email-journey-card li::before {
  position: absolute;
  top: 15px;
  left: -6px;
  width: 10px;
  height: 10px;
  content: "";
  border-radius: 50%;
  background: var(--accent);
}

.email-journey-card li strong {
  color: #344054;
  font-size: 12px;
}

.email-journey-card li span {
  color: #667085;
  font-size: 12px;
  line-height: 1.4;
}

.email-journey-toggle {
  margin: 0;
  background: #f8fafc;
}

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

.email-settings-hero h2,
.email-settings-panel h3,
.email-proof-preview-card h3,
.email-test-card h3 {
  margin: 0 0 8px;
}

.email-settings-hero p,
.email-settings-panel p,
.email-proof-preview-card p,
.email-test-card p {
  margin: 0;
  color: #475467;
  line-height: 1.55;
}

.email-settings-status-stack {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.email-settings-panel {
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  align-items: start;
}

.email-settings-panel-copy {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 4px;
}

.email-settings-fields {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.email-template-library {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: linear-gradient(135deg, #fff, #f8fbff);
  box-shadow: 0 18px 44px rgba(16, 24, 40, 0.06);
}

.email-template-library .section-heading-row {
  align-items: flex-start;
}

.email-template-library h3 {
  margin-bottom: 6px;
}

.email-template-library p {
  margin-bottom: 0;
}

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

.email-template-group {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(208, 213, 221, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.email-template-group-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.email-template-group-header h4 {
  margin: 0 0 4px;
  font-size: 16px;
}

.email-template-group-header p {
  color: #667085;
  font-size: 13px;
  line-height: 1.45;
}

.email-template-summary-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  gap: 12px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.05);
}

.email-template-summary-card > button {
  align-self: center;
  justify-content: center;
}

.email-template-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 22px;
}

.email-template-summary-card h4 {
  margin: 0 0 6px;
  font-size: 16px;
}

.email-template-summary-card p {
  margin: 0 0 8px;
  color: #475467;
  font-size: 13px;
  line-height: 1.45;
}

.email-template-summary-card small {
  display: block;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-template-snippet {
  display: block;
  margin-top: 8px;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-token-pill,
.template-link-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  white-space: nowrap;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.template-token-pill {
  padding: 5px 9px;
  border: 1px solid rgba(10, 132, 255, 0.18);
  background: #eef6ff;
  color: #075ca8;
}

.template-link-status {
  padding: 4px 7px;
}

.template-link-status.ok {
  background: #ecfdf3;
  color: #027a48;
}

.template-link-status.missing {
  background: #fff1f3;
  color: #b42318;
}

.mini-feature-pill {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  padding: 4px 8px;
  border: 1px solid rgba(10, 132, 255, 0.18);
  border-radius: 999px;
  background: #eef6ff;
  color: #075ca8;
  font-size: 11px;
  font-weight: 900;
}

.settings-note-card {
  display: grid;
  gap: 4px;
}

.email-proof-preview-card {
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: center;
}

.email-test-card {
  grid-template-columns: minmax(240px, 0.45fr) minmax(0, 1fr);
  align-items: start;
}

.email-test-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.65fr);
  gap: 12px;
}

.email-test-action-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.email-proof-preview-shell {
  display: grid;
  gap: 9px;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(16, 24, 40, 0.08);
}

.email-proof-preview-shell strong {
  color: #101828;
}

.email-proof-preview-shell span {
  color: #475467;
  font-size: 13px;
}

.email-proof-preview-shell button {
  justify-self: start;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  background: #101828;
  color: #fff;
  font-weight: 900;
}

.email-proof-preview-shell small {
  color: #98a2b3;
  font-weight: 800;
}

.settings-form,
.template-edit-form {
  display: grid;
  gap: 14px;
}

.settings-form label,
.template-edit-form label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-weight: 800;
}

.settings-form label span,
.template-edit-form label span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.quality-slider-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  align-items: center;
  gap: 12px;
}

.jpeg-quality-control[hidden] {
  display: none !important;
}

.quality-slider-row input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.quality-slider-row output {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  text-align: center;
}

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

.compact-form-grid {
  grid-template-columns: minmax(0, 1fr) 120px;
}

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

.settings-toggle-grid .switch-row {
  margin: 0;
}

.settings-field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.settings-asset-control {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(248, 250, 252, .82);
}

.settings-asset-control.is-locked {
  opacity: .68;
}

.settings-asset-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.settings-asset-copy small,
.settings-asset-actions .muted {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.settings-asset-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.settings-asset-preview {
  display: grid;
  place-items: center;
  width: 112px;
  height: 84px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d9e5f4;
  border-radius: 14px;
  background:
    linear-gradient(45deg, #eef3f8 25%, transparent 25%),
    linear-gradient(-45deg, #eef3f8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef3f8 75%),
    linear-gradient(-45deg, transparent 75%, #eef3f8 75%),
    #fff;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  color: #98a2b3;
  font-size: 10px;
  font-weight: 850;
  text-align: center;
}

.settings-asset-preview img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.settings-asset-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  min-width: 0;
}

.settings-asset-actions input[type="file"] {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.settings-asset-actions .muted {
  min-width: 0;
  font-size: 11px;
}

.brand-kit-settings-layout {
  grid-template-columns: minmax(0, 58fr) minmax(360px, 42fr);
  align-items: start;
  gap: 22px;
}

.brand-kit-settings-controls,
.brand-kit-control-card {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.brand-kit-control-card {
  background: linear-gradient(135deg, #fff, #f8fbff);
  box-shadow: 0 18px 44px rgba(16, 24, 40, 0.05);
}

.brand-kit-control-card h3,
.brand-kit-control-card p {
  margin: 0;
}

.brand-kit-control-card p {
  color: #667085;
  line-height: 1.5;
}

.brand-color-grid {
  display: grid;
  gap: 12px;
}

.brand-color-field {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.brand-color-control {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
}

.brand-color-picker {
  width: 48px;
  height: 42px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}

.brand-color-hex {
  min-width: 0;
  font-family: inherit;
  font-weight: 900;
  text-transform: uppercase;
}

.brand-color-swatch {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(16, 24, 40, 0.14);
  border-radius: 14px;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.72);
}

.brand-color-field small {
  color: #667085;
  line-height: 1.45;
}

.brand-kit-preview-wrap {
  position: sticky;
  top: 16px;
  min-width: 0;
}

.brand-kit-preview-card {
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 30px;
  background: var(--preview-page, #f5f5f7);
  box-shadow: 0 28px 80px rgba(16, 24, 40, 0.13);
}

.brand-kit-preview-page {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--preview-accent, #0a84ff) 12%, transparent), transparent 34%),
    rgba(255, 255, 255, 0.9);
}

.brand-kit-preview-header,
.brand-kit-preview-actions,
.brand-kit-preview-details {
  display: flex;
}

.brand-kit-preview-header {
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px;
  border-radius: 14px;
  background-position: center;
  background-size: cover;
  transition: min-height 160ms ease, background-color 160ms ease;
}

.brand-kit-preview-header[data-header-style="banner"] {
  min-height: 92px;
}

.brand-kit-preview-header[data-header-style="hero"] {
  min-height: 150px;
  align-items: flex-end;
}

.brand-kit-preview-header[data-background-mode="custom"] strong,
.brand-kit-preview-header[data-background-mode="image"] strong {
  color: #fff;
}

.brand-kit-preview-header[data-background-mode="custom"] span,
.brand-kit-preview-header[data-background-mode="image"] span {
  color: rgba(255, 255, 255, 0.82);
}

.advanced-header-color-grid {
  margin-bottom: 14px;
}

.settings-context-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
}

.brand-kit-preview-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--preview-primary, #111827);
  color: #fff;
  font-size: 20px;
  font-weight: 950;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.18);
}

.brand-kit-preview-mark.has-image {
  overflow: hidden;
  padding: 0;
  background: #fff;
}

.brand-kit-preview-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-kit-preview-header strong,
.brand-kit-preview-header span,
.brand-kit-preview-subtitle,
.brand-kit-preview-details span {
  display: block;
}

.brand-kit-preview-header strong {
  color: var(--preview-primary, #111827);
  font-size: 17px;
  line-height: 1.05;
}

.brand-kit-preview-header span {
  color: #667085;
  font-size: 12px;
  font-weight: 850;
}

.brand-kit-preview-subtitle {
  color: #667085;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-kit-preview-status {
  justify-self: start;
  padding: 8px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--preview-accent, #0a84ff) 14%, #fff);
  color: var(--preview-accent, #0a84ff);
  font-size: 12px;
  font-weight: 950;
}

.brand-kit-preview-proof-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--preview-accent, #0a84ff) 20%, var(--line-soft));
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(16, 24, 40, 0.08);
}

.brand-kit-preview-artwork {
  min-height: 142px;
  display: grid;
  place-items: center;
  border: 2px dashed color-mix(in srgb, var(--preview-accent, #0a84ff) 28%, #d9e5f4);
  border-radius: 18px;
  background:
    linear-gradient(45deg, #f2f6fb 25%, transparent 25%),
    linear-gradient(-45deg, #f2f6fb 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f2f6fb 75%),
    linear-gradient(-45deg, transparent 75%, #f2f6fb 75%),
    #fff;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  color: #667085;
  font-weight: 950;
}

.brand-kit-preview-proof-card h3,
.brand-kit-preview-proof-card p {
  margin: 0;
}

.brand-kit-preview-proof-card h3 {
  color: var(--preview-primary, #111827);
  font-size: 24px;
  line-height: 1.08;
}

.brand-kit-preview-proof-card p {
  color: #475467;
  line-height: 1.52;
}

.brand-kit-preview-details {
  flex-wrap: wrap;
  gap: 8px;
}

.brand-kit-preview-details div {
  flex: 1 1 140px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #f8fafc;
}

.brand-kit-preview-details span {
  margin-bottom: 4px;
  color: #667085;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-kit-preview-details strong {
  color: var(--preview-primary, #111827);
  font-size: 13px;
}

.brand-kit-preview-actions {
  flex-wrap: wrap;
  gap: 10px;
}

.brand-kit-preview-actions button {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 999px;
  font-weight: 950;
}

.brand-kit-preview-approve {
  border: 0;
  background: var(--preview-accent, #0a84ff);
  color: #fff;
}

.brand-kit-preview-changes {
  border: 1px solid var(--line-soft);
  background: #fff;
  color: var(--preview-primary, #111827);
}

.customer-proof-settings-layout {
  grid-template-columns: minmax(0, 58fr) minmax(360px, 42fr);
  align-items: start;
  gap: 22px;
}

.customer-proof-settings-controls,
.customer-proof-control-card {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.customer-proof-control-card {
  background: linear-gradient(135deg, #fff, #f8fbff);
  box-shadow: 0 18px 44px rgba(16, 24, 40, 0.05);
}

.customer-proof-control-card h3,
.customer-proof-control-card p {
  margin: 0;
}

.customer-proof-control-card p {
  color: #667085;
  line-height: 1.5;
}

.customer-proof-attachment-toggle {
  justify-self: start;
}

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

.customer-proof-template-card {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.customer-proof-template-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.customer-proof-template-card:hover {
  transform: translateY(-1px);
  border-color: #b8d7ff;
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.08);
}

.customer-proof-template-card.is-selected {
  border-color: #0a84ff;
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.12), 0 20px 46px rgba(16, 24, 40, 0.1);
}

.customer-proof-template-card.is-locked {
  cursor: not-allowed;
  opacity: 0.68;
}

.customer-proof-template-mini {
  min-height: 74px;
  display: grid;
  grid-template-rows: 18px 1fr 12px;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: #f8fafc;
}

.customer-proof-template-mini span {
  display: block;
  border-radius: 999px;
  background: #d0d5dd;
}

.customer-proof-template-mini span:nth-child(2) {
  border-radius: 12px;
  background: #fff;
}

.customer-proof-template-mini[data-template="modern"] {
  background: linear-gradient(145deg, #eef6ff, #fff);
}

.customer-proof-template-mini[data-template="modern"] span:first-child,
.customer-proof-template-mini[data-template="modern"] span:last-child {
  background: #0a84ff;
}

.customer-proof-template-mini[data-template="corporate"] {
  background: #f3f6fb;
}

.customer-proof-template-mini[data-template="corporate"] span:first-child {
  background: #1d2939;
}

.customer-proof-template-mini[data-template="dark"] {
  background: #101828;
}

.customer-proof-template-mini[data-template="dark"] span {
  background: #f6e7aa;
}

.customer-proof-template-mini[data-template="dark"] span:nth-child(2) {
  background: #1d2939;
}

.customer-proof-template-mini[data-template="military"] {
  background: #e8eadb;
}

.customer-proof-template-mini[data-template="military"] span:first-child {
  background: #5f6f3a;
}

.customer-proof-template-mini[data-template="elegant"] {
  background: linear-gradient(145deg, #fff8ed, #fff);
}

.customer-proof-template-mini[data-template="elegant"] span:first-child,
.customer-proof-template-mini[data-template="elegant"] span:last-child {
  background: #9f6b40;
}

.customer-proof-template-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.customer-proof-template-copy strong {
  color: #101828;
  font-size: 14px;
}

.customer-proof-template-copy small {
  color: #667085;
  line-height: 1.35;
}

.customer-proof-template-selected,
.customer-proof-template-lock {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
}

.customer-proof-template-selected {
  background: #e7f0ff;
  color: #1269ff;
}

.customer-proof-template-lock {
  background: #fff6d7;
  color: #7a4d00;
  text-transform: uppercase;
}

.customer-proof-preview-wrap {
  position: sticky;
  top: 16px;
  min-width: 0;
}

.customer-proof-preview-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(18, 105, 255, 0.08), transparent 28%),
    linear-gradient(145deg, #ffffff, #f7fbff);
  box-shadow: 0 24px 70px rgba(16, 24, 40, 0.12);
}

.customer-proof-preview-card[data-template="modern"] {
  border-radius: 34px;
  background:
    radial-gradient(circle at top right, rgba(10, 132, 255, 0.14), transparent 30%),
    linear-gradient(145deg, #f7fbff, #fff);
}

.customer-proof-preview-card[data-template="corporate"] {
  border-radius: 18px;
  background: #f3f6fb;
  box-shadow: 0 18px 44px rgba(16, 24, 40, 0.1);
}

.customer-proof-preview-card[data-template="corporate"] .customer-proof-preview-logo,
.customer-proof-preview-card[data-template="corporate"] .customer-proof-preview-approve {
  border-radius: 10px;
}

.customer-proof-preview-card[data-template="dark"] {
  border-color: #2f3b4f;
  background:
    radial-gradient(circle at top right, rgba(212, 175, 55, 0.18), transparent 30%),
    #101828;
}

.customer-proof-preview-card[data-template="dark"] .customer-proof-preview-brand strong,
.customer-proof-preview-card[data-template="dark"] .customer-proof-preview-copy h3,
.customer-proof-preview-card[data-template="dark"] .customer-proof-preview-details strong {
  color: #fff;
}

.customer-proof-preview-card[data-template="dark"] .customer-proof-preview-brand span,
.customer-proof-preview-card[data-template="dark"] .customer-proof-preview-copy p,
.customer-proof-preview-card[data-template="dark"] .customer-proof-preview-details span {
  color: #cbd5e1;
}

.customer-proof-preview-card[data-template="dark"] .customer-proof-preview-details div,
.customer-proof-preview-card[data-template="dark"] .customer-proof-preview-comment,
.customer-proof-preview-card[data-template="dark"] .customer-proof-preview-attachment {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.customer-proof-preview-card[data-template="military"] {
  border-color: #c9cead;
  background:
    linear-gradient(145deg, rgba(95, 111, 58, 0.1), transparent),
    #f2f3e9;
}

.customer-proof-preview-card[data-template="military"] .customer-proof-preview-logo,
.customer-proof-preview-card[data-template="military"] .customer-proof-preview-approve {
  background: #4f5f2f;
}

.customer-proof-preview-card[data-template="elegant"] {
  border-color: #ead7c6;
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(159, 107, 64, 0.13), transparent 26%),
    #fffaf5;
}

.customer-proof-preview-card[data-template="elegant"] .customer-proof-preview-logo,
.customer-proof-preview-card[data-template="elegant"] .customer-proof-preview-approve {
  background: #9f6b40;
}

.customer-proof-preview-top,
.customer-proof-preview-brand,
.customer-proof-preview-actions {
  display: flex;
  align-items: center;
}

.proofello-attribution-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.proofello-attribution-control .settings-upgrade-note {
  grid-column: 1 / -1;
}

.customer-proof-preview-proofello {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 18px 0 2px;
  padding-top: 14px;
  border-top: 1px solid rgba(152, 162, 179, .22);
  color: #667085;
  font-size: 10px;
}

.customer-proof-preview-proofello[hidden] {
  display: none;
}

.customer-proof-preview-proofello img {
  width: 20px;
  height: 20px;
  border-radius: 6px;
}

.customer-proof-preview-top {
  justify-content: space-between;
  gap: 12px;
}

.customer-proof-preview-brand {
  gap: 10px;
}

.customer-proof-preview-brand strong,
.customer-proof-preview-brand span,
.customer-proof-preview-status,
.customer-proof-preview-details span,
.customer-proof-preview-comment span,
.customer-proof-preview-attachment span {
  display: block;
}

.customer-proof-preview-logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #101828;
  color: #fff;
  font-weight: 950;
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.18);
}

.customer-proof-preview-brand strong {
  color: #101828;
  font-size: 16px;
}

.customer-proof-preview-brand span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.customer-proof-preview-status {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 999px;
  background: #e7f0ff;
  color: #1269ff;
  font-size: 12px;
  font-weight: 950;
}

.customer-proof-preview-art {
  overflow: hidden;
  border: 1px solid #d9e5f4;
  border-radius: 22px;
  background:
    linear-gradient(45deg, #edf3fb 25%, transparent 25%),
    linear-gradient(-45deg, #edf3fb 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #edf3fb 75%),
    linear-gradient(-45deg, transparent 75%, #edf3fb 75%),
    #fff;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.customer-proof-preview-art-inner {
  min-height: 190px;
  display: grid;
  place-items: center;
  margin: 16px;
  border: 2px dashed #b8d7ff;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  color: #667085;
  font-weight: 950;
}

.customer-proof-preview-copy {
  display: grid;
  gap: 8px;
}

.customer-proof-preview-copy h3 {
  margin: 0;
  color: #101828;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.05;
}

.customer-proof-preview-copy p {
  margin: 0;
  color: #475467;
  line-height: 1.55;
  white-space: pre-line;
}

.customer-proof-preview-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.customer-proof-preview-details div,
.customer-proof-preview-comment,
.customer-proof-preview-attachment {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
}

.customer-proof-preview-details span,
.customer-proof-preview-comment span,
.customer-proof-preview-attachment span {
  margin-bottom: 4px;
  color: #667085;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.customer-proof-preview-details strong {
  color: #101828;
  font-size: 13px;
  line-height: 1.35;
}

.customer-proof-preview-comment div,
.customer-proof-preview-attachment div {
  min-height: 52px;
  display: grid;
  align-items: center;
  color: #98a2b3;
  font-weight: 800;
}

.customer-proof-preview-attachment[hidden] {
  display: none;
}

.customer-proof-preview-actions {
  flex-wrap: wrap;
  gap: 10px;
}

.customer-proof-preview-actions button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 950;
}

.customer-proof-preview-approve {
  border: 0;
  background: #101828;
  color: #fff;
}

.customer-proof-preview-changes {
  border: 1px solid var(--line-soft);
  background: #fff;
  color: #101828;
}

/* Customer page preview: these variants intentionally mirror the public proof templates. */
.customer-proof-preview-logo.has-image {
  overflow: hidden;
  padding: 0;
  background: #fff;
}

.customer-proof-preview-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.customer-proof-preview-card .customer-proof-preview-approve {
  background: var(--customer-preview-accent, #0a84ff);
}

.customer-proof-preview-card[data-header-background="custom"] .customer-proof-preview-top,
.customer-proof-preview-card[data-header-background="image"] .customer-proof-preview-top {
  margin: -18px -18px 0;
  padding: 18px;
  color: #fff;
  background-color: var(--customer-preview-header-bg, #111827);
}

.customer-proof-preview-card[data-header-background="image"] .customer-proof-preview-top {
  background-image:
    linear-gradient(90deg, rgba(17, 24, 39, .82), rgba(17, 24, 39, .25)),
    var(--customer-preview-header-image);
  background-position: center;
  background-size: cover;
}

.customer-proof-preview-card[data-header-background="custom"] .customer-proof-preview-brand strong,
.customer-proof-preview-card[data-header-background="image"] .customer-proof-preview-brand strong,
.customer-proof-preview-card[data-header-background="custom"] .customer-proof-preview-brand span,
.customer-proof-preview-card[data-header-background="image"] .customer-proof-preview-brand span {
  color: #fff;
}

.customer-proof-preview-card[data-header-style="banner"] .customer-proof-preview-top {
  min-height: 82px;
}

.customer-proof-preview-card[data-header-style="hero"] .customer-proof-preview-top {
  min-height: 132px;
  align-items: flex-end;
}

.customer-proof-preview-card[data-template="classic"] {
  border: 1px solid #d9e5f4;
  border-radius: 24px;
  background: linear-gradient(145deg, #fff, #f7fbff);
}

.customer-proof-preview-card[data-template="classic"] .customer-proof-preview-top {
  border-bottom: 1px solid #e6edf6;
  padding-bottom: 14px;
}

.customer-proof-preview-card[data-template="modern"] {
  grid-template-columns: minmax(0, 1.18fr) minmax(220px, .82fr);
  grid-template-areas:
    "top top"
    "art copy"
    "art details"
    "comment comment"
    "attachment attachment"
    "actions actions";
  gap: 20px;
  padding: 22px;
  border: 0;
  border-radius: 38px;
  background:
    radial-gradient(circle at 92% 4%, color-mix(in srgb, var(--customer-preview-accent) 22%, transparent), transparent 28%),
    #f4f8ff;
}

.customer-proof-preview-card[data-template="modern"] .customer-proof-preview-top { grid-area: top; }
.customer-proof-preview-card[data-template="modern"] .customer-proof-preview-art { grid-area: art; min-height: 100%; border: 0; border-radius: 30px; box-shadow: 0 20px 44px rgba(10, 55, 100, .12); }
.customer-proof-preview-card[data-template="modern"] .customer-proof-preview-art-inner { min-height: 360px; border: 0; }
.customer-proof-preview-card[data-template="modern"] .customer-proof-preview-copy { grid-area: copy; align-content: end; }
.customer-proof-preview-card[data-template="modern"] .customer-proof-preview-copy h3 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -.04em; }
.customer-proof-preview-card[data-template="modern"] .customer-proof-preview-details { grid-area: details; grid-template-columns: 1fr; }
.customer-proof-preview-card[data-template="modern"] .customer-proof-preview-details div { border: 0; border-radius: 18px; box-shadow: 0 8px 24px rgba(16, 24, 40, .06); }
.customer-proof-preview-card[data-template="modern"] .customer-proof-preview-comment { grid-area: comment; }
.customer-proof-preview-card[data-template="modern"] .customer-proof-preview-attachment { grid-area: attachment; }
.customer-proof-preview-card[data-template="modern"] .customer-proof-preview-actions { grid-area: actions; justify-content: flex-end; }
.customer-proof-preview-card[data-template="modern"] .customer-proof-preview-actions button { min-height: 50px; padding-inline: 22px; }

.customer-proof-preview-card[data-template="corporate"] {
  grid-template-columns: minmax(230px, .72fr) minmax(0, 1.28fr);
  grid-template-areas:
    "top top"
    "copy art"
    "details art"
    "comment art"
    "attachment attachment"
    "actions actions";
  padding: 0 22px 22px;
  border: 1px solid #cbd5e1;
  border-top: 6px solid #14213d;
  border-radius: 2px;
  background: #edf2f7;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .14);
}

.customer-proof-preview-card[data-template="corporate"] .customer-proof-preview-top { grid-area: top; margin-inline: -22px; padding: 18px 22px; background: #14213d; }
.customer-proof-preview-card[data-template="corporate"] .customer-proof-preview-brand strong,
.customer-proof-preview-card[data-template="corporate"] .customer-proof-preview-brand span { color: #fff; }
.customer-proof-preview-card[data-template="corporate"] .customer-proof-preview-copy { grid-area: copy; padding-top: 8px; }
.customer-proof-preview-card[data-template="corporate"] .customer-proof-preview-copy h3 { font-family: Georgia, serif; font-size: 28px; }
.customer-proof-preview-card[data-template="corporate"] .customer-proof-preview-art { grid-area: art; border-radius: 0; background-color: #fff; }
.customer-proof-preview-card[data-template="corporate"] .customer-proof-preview-art-inner { min-height: 420px; border-radius: 0; }
.customer-proof-preview-card[data-template="corporate"] .customer-proof-preview-details { grid-area: details; grid-template-columns: 1fr; }
.customer-proof-preview-card[data-template="corporate"] .customer-proof-preview-details div,
.customer-proof-preview-card[data-template="corporate"] .customer-proof-preview-comment,
.customer-proof-preview-card[data-template="corporate"] .customer-proof-preview-attachment { border-radius: 2px; }
.customer-proof-preview-card[data-template="corporate"] .customer-proof-preview-comment { grid-area: comment; }
.customer-proof-preview-card[data-template="corporate"] .customer-proof-preview-attachment { grid-area: attachment; }
.customer-proof-preview-card[data-template="corporate"] .customer-proof-preview-actions { grid-area: actions; }
.customer-proof-preview-card[data-template="corporate"] .customer-proof-preview-actions button { border-radius: 3px; }

.customer-proof-preview-card[data-template="dark"] {
  padding: 24px;
  border: 1px solid #354052;
  border-radius: 20px;
  background:
    radial-gradient(circle at 85% 0%, color-mix(in srgb, var(--customer-preview-accent) 25%, transparent), transparent 30%),
    #0b1220;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .35);
}

.customer-proof-preview-card[data-template="dark"] .customer-proof-preview-top { padding-bottom: 16px; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.customer-proof-preview-card[data-template="dark"] .customer-proof-preview-art { border-color: #475569; border-radius: 12px; background-color: #111827; }
.customer-proof-preview-card[data-template="dark"] .customer-proof-preview-art-inner { min-height: 280px; border-color: #64748b; background: rgba(2, 6, 23, .72); color: #cbd5e1; }
.customer-proof-preview-card[data-template="dark"] .customer-proof-preview-status { background: #f8df91; color: #3b2b00; }
.customer-proof-preview-card[data-template="dark"] .customer-proof-preview-changes { border-color: #64748b; background: transparent; color: #fff; }

.customer-proof-preview-card[data-template="military"] {
  padding: 20px;
  border: 3px solid #4f5f2f;
  border-radius: 3px;
  background:
    repeating-linear-gradient(135deg, rgba(79, 95, 47, .045) 0 10px, transparent 10px 20px),
    #ecebdc;
  box-shadow: 12px 12px 0 rgba(79, 95, 47, .16);
}

.customer-proof-preview-card[data-template="military"] .customer-proof-preview-top {
  margin: -20px -20px 0;
  padding: 18px 20px;
  border-bottom: 4px solid #b4a46a;
  background: #4f5f2f;
}
.customer-proof-preview-card[data-template="military"] .customer-proof-preview-brand strong,
.customer-proof-preview-card[data-template="military"] .customer-proof-preview-brand span { color: #fff; text-transform: uppercase; letter-spacing: .08em; }
.customer-proof-preview-card[data-template="military"] .customer-proof-preview-status { border-radius: 2px; background: #d8d4ae; color: #283018; text-transform: uppercase; }
.customer-proof-preview-card[data-template="military"] .customer-proof-preview-art { border: 2px solid #657345; border-radius: 0; background-color: #d9dbc3; }
.customer-proof-preview-card[data-template="military"] .customer-proof-preview-art-inner { min-height: 260px; border: 2px dashed #657345; border-radius: 0; background: rgba(244, 242, 224, .72); color: #394525; text-transform: uppercase; letter-spacing: .12em; }
.customer-proof-preview-card[data-template="military"] .customer-proof-preview-copy h3 { font-size: 30px; text-transform: uppercase; letter-spacing: .02em; }
.customer-proof-preview-card[data-template="military"] .customer-proof-preview-details div,
.customer-proof-preview-card[data-template="military"] .customer-proof-preview-comment,
.customer-proof-preview-card[data-template="military"] .customer-proof-preview-attachment { border: 1px solid #a1a77d; border-left: 5px solid #4f5f2f; border-radius: 0; background: rgba(250, 249, 235, .82); }
.customer-proof-preview-card[data-template="military"] .customer-proof-preview-actions button { border-radius: 2px; text-transform: uppercase; letter-spacing: .05em; }
.customer-proof-preview-card[data-template="military"] .customer-proof-preview-approve { background: #4f5f2f; }

.customer-proof-preview-card[data-template="elegant"] {
  grid-template-columns: minmax(0, .9fr) minmax(250px, 1.1fr);
  grid-template-areas:
    "top top"
    "art copy"
    "art details"
    "art comment"
    "attachment attachment"
    "actions actions";
  padding: 28px;
  border: 1px solid #b68a62;
  border-radius: 0;
  outline: 1px solid #d9bd9f;
  outline-offset: -9px;
  background: #fffaf3;
  box-shadow: 0 28px 70px rgba(88, 52, 25, .16);
}
.customer-proof-preview-card[data-template="elegant"] .customer-proof-preview-top { grid-area: top; border-bottom: 1px solid #d9bd9f; padding-bottom: 18px; }
.customer-proof-preview-card[data-template="elegant"] .customer-proof-preview-copy { grid-area: copy; padding-top: 18px; text-align: center; }
.customer-proof-preview-card[data-template="elegant"] .customer-proof-preview-copy h3 { font-family: Georgia, serif; font-size: 38px; font-weight: 500; color: #4a2d19; }
.customer-proof-preview-card[data-template="elegant"] .customer-proof-preview-art { grid-area: art; border: 8px solid #fff; border-radius: 50% 50% 18px 18px; box-shadow: 0 0 0 1px #c9a27f; }
.customer-proof-preview-card[data-template="elegant"] .customer-proof-preview-art-inner { min-height: 430px; border: 0; border-radius: inherit; }
.customer-proof-preview-card[data-template="elegant"] .customer-proof-preview-details { grid-area: details; }
.customer-proof-preview-card[data-template="elegant"] .customer-proof-preview-details div,
.customer-proof-preview-card[data-template="elegant"] .customer-proof-preview-comment,
.customer-proof-preview-card[data-template="elegant"] .customer-proof-preview-attachment { border: 0; border-bottom: 1px solid #e3cdb8; border-radius: 0; background: transparent; }
.customer-proof-preview-card[data-template="elegant"] .customer-proof-preview-comment { grid-area: comment; }
.customer-proof-preview-card[data-template="elegant"] .customer-proof-preview-attachment { grid-area: attachment; }
.customer-proof-preview-card[data-template="elegant"] .customer-proof-preview-actions { grid-area: actions; justify-content: center; }
.customer-proof-preview-card[data-template="elegant"] .customer-proof-preview-actions button { border-radius: 0; font-family: Georgia, serif; }
.customer-proof-preview-card[data-template="elegant"] .customer-proof-preview-approve { background: #9f6b40; }

@media (max-width: 760px) {
  .customer-proof-preview-card[data-template="modern"],
  .customer-proof-preview-card[data-template="corporate"],
  .customer-proof-preview-card[data-template="elegant"] {
    grid-template-columns: 1fr;
    grid-template-areas: "top" "art" "copy" "details" "comment" "attachment" "actions";
  }
}

.compact-area {
  min-height: 90px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(16, 24, 40, 0.36);
  backdrop-filter: blur(12px);
}

.modal-backdrop[hidden] {
  display: none;
}

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

.preview-lightbox {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 44px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.usage-upgrade-modal {
  max-width: 560px;
}

.usage-upgrade-modal p {
  color: var(--muted);
  line-height: 1.65;
}

.usage-upgrade-actions {
  justify-content: flex-end;
  margin-top: 24px;
}

.preview-lightbox-body {
  display: grid;
  place-items: center;
  min-height: 260px;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: #f8fafc;
}

.preview-lightbox-body img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 190px);
  object-fit: contain;
}

.email-template-modal {
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 44px);
  display: grid;
  gap: 16px;
  padding: 24px;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.email-template-modal-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, .92fr);
  gap: 20px;
  align-items: start;
}

.email-template-editor-pane {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.email-template-live-preview {
  position: sticky;
  top: 0;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: #eef3fa;
}

.email-preview-shell {
  overflow: hidden;
  border: 1px solid #d9dee8;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(16, 24, 40, .12);
}

.email-preview-brand {
  padding: 24px;
  background: #0f172a;
  color: #fff;
  font-size: 20px;
  font-weight: 950;
  text-align: center;
}

.email-preview-content {
  padding: 24px;
}

.email-preview-content small {
  color: #667085;
  font-weight: 800;
  text-transform: uppercase;
}

.email-preview-content h3 {
  margin: 9px 0 16px;
  color: #101828;
  font-size: 23px;
  line-height: 1.2;
}

#emailTemplatePreviewBody {
  max-height: 260px;
  overflow: auto;
  color: #475467;
  font-size: 14px;
  line-height: 1.6;
}

.email-preview-content a {
  display: inline-flex;
  margin-top: 20px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-weight: 900;
}

.email-preview-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid #eaecf0;
  color: #667085;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.email-preview-footer img {
  width: 25px;
  height: 25px;
  border-radius: 8px;
}

.email-preview-footer[hidden] { display: none; }

.watermark-color-control {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: #475467;
  font-size: 12px;
  font-weight: 850;
}

.watermark-color-control input[type="color"],
.watermark-settings-color {
  width: 44px;
  height: 34px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}

.watermark-color-control input[type="color"]:disabled,
.watermark-settings-color:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.watermark-color-control small {
  color: #98a2b3;
  font-weight: 800;
}

.email-template-modal label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-weight: 850;
}

.email-template-modal label span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.email-template-body {
  min-height: min(42vh, 420px);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.5;
}

.email-template-format-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: #fbfbfd;
}

.email-template-format-card p {
  margin: 0;
  color: #475467;
  font-size: 13px;
  line-height: 1.45;
}

.html-template-body {
  min-height: min(36vh, 360px);
  white-space: pre;
}

.email-template-help {
  padding: 13px 14px;
  border: 1px solid rgba(10, 132, 255, 0.16);
  border-radius: 16px;
  background: #f7fbff;
}

.email-template-help strong {
  display: block;
  margin-bottom: 5px;
}

.email-template-help p {
  margin: 0;
  color: #475467;
  font-size: 13px;
  overflow-wrap: anywhere;
}

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

.plans-settings-hero,
.plan-card-heading,
.plan-price {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.plans-settings-hero {
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: linear-gradient(135deg, #fff, #f5f9ff);
  box-shadow: 0 18px 44px rgba(16, 24, 40, .06);
}

.plans-settings-hero h2,
.plan-card-heading h3 {
  margin: 0 0 7px;
}

.plans-settings-hero p {
  margin: 0;
  color: #475467;
}

.plans-current-card {
  margin: 16px 0;
}

.plans-comparison-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.plan-comparison-card {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: #fff;
}

.plan-comparison-card.is-recommended {
  border: 2px solid rgba(10, 132, 255, .5);
  background: linear-gradient(145deg, #fff, #f3f8ff);
  box-shadow: 0 22px 58px rgba(10, 90, 190, .14);
}

.plan-comparison-card.is-active {
  outline: 3px solid rgba(22, 163, 74, .12);
}

.plan-card-heading .status-pill {
  flex: 0 0 auto;
}

.plan-price {
  align-items: baseline;
  justify-content: flex-start;
  gap: 6px;
}

.plan-price strong {
  color: #101828;
  font-size: 34px;
  letter-spacing: -.04em;
}

.plan-price span,
.plan-volume {
  color: #667085;
}

.plan-volume {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.plan-comparison-card ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan-comparison-card li {
  position: relative;
  padding-left: 22px;
  color: #475467;
  font-size: 13px;
  line-height: 1.4;
}

.plan-comparison-card li::before {
  position: absolute;
  top: 1px;
  left: 0;
  content: "✓";
  color: #16a34a;
  font-weight: 950;
}

.plans-email-rule {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 16px;
  padding: 18px 20px;
  border: 1px solid #d9e5f4;
  border-radius: 18px;
  background: #f7fbff;
}

.plans-email-rule p { margin: 0; color: #475467; line-height: 1.5; }

.template-card,
.plan-card,
.billing-status-card,
.activity-card {
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.06);
}

.template-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
}

.template-card.is-active,
.plan-card.is-active {
  border-color: rgba(10, 132, 255, 0.38);
  box-shadow: 0 16px 34px rgba(10, 132, 255, 0.12);
}

.template-preview {
  display: block;
  width: 74px;
  height: 104px;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.55);
}

.template-preview.horizontal {
  height: 74px;
  margin-top: 16px;
}

.template-card-heading,
.billing-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plan-card {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.plan-card strong {
  font-size: 28px;
}

.plan-card ul {
  display: grid;
  gap: 6px;
  margin: 0 0 8px;
  padding-left: 18px;
  color: #475467;
}

.billing-status-card {
  margin-bottom: 16px;
  padding: 16px;
}

.billing-status-card strong,
.billing-status-card small {
  display: block;
}

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

.activity-order-table {
  min-width: 900px;
}

#activityFilters {
  flex-wrap: wrap;
  justify-content: flex-end;
  overflow: visible;
  padding-bottom: 0;
}

.activity-order-row {
  cursor: pointer;
  transition: background 150ms ease;
}

.activity-order-row:hover {
  background: #f8fbff;
}

.activity-order-row:focus-within {
  background: #f2f8ff;
}

.activity-order-link,
.activity-back-button {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.activity-order-link:hover,
.activity-back-button:hover {
  text-decoration: underline;
}

.activity-order-proof-numbers,
.activity-order-summary {
  display: block;
  margin-top: 4px;
}

.activity-order-summary {
  max-width: 380px;
  overflow: hidden;
  color: #475467;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-order-detail {
  min-height: 620px;
}

.activity-detail-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.activity-detail-header .activity-back-button {
  display: block;
  margin-bottom: 18px;
}

.activity-detail-header h2 {
  margin-bottom: 4px;
}

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

.activity-order-overview article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #f8fafc;
}

.activity-order-overview strong,
.activity-order-overview small {
  overflow-wrap: anywhere;
}

.activity-timeline {
  display: grid;
  gap: 12px;
}

.activity-timeline-card {
  grid-template-columns: 42px minmax(0, 1fr);
}

.activity-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.activity-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #eef4ff;
  color: var(--accent-strong);
  font-weight: 900;
}

.activity-icon.proof-approved {
  background: #ecfdf3;
  color: var(--green);
}

.activity-icon.proof-changes_requested {
  background: #fff7ed;
  color: var(--amber);
}

.activity-icon.proof-unlocked {
  background: #fef2f2;
  color: var(--red);
}

.activity-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.activity-card-title strong {
  margin-right: auto;
}

.activity-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border: 1px solid rgba(22, 119, 255, 0.16);
  border-radius: 999px;
  background: #eef4ff;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.activity-card p {
  margin: 4px 0;
}

.activity-card small,
.billing-status-card small {
  color: var(--muted);
}

.attachment-pill-row,
.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.attachment-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfbfd;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.attachment-pill span {
  color: var(--muted);
  font-weight: 700;
}

.attachment-pill button {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: #e4e7ec;
  color: #344054;
  font-weight: 900;
}

.public-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: var(--proof-page-background, linear-gradient(180deg, #fbfbfd, #eef2f7));
}

.public-card {
  width: min(100%, 980px);
  padding: clamp(18px, 4vw, 34px);
  border: 1px solid var(--line-soft);
  border-radius: 26px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 24px 70px rgba(16, 24, 40, .12);
}

.public-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 18px 18px 0 0;
  background-position: center;
  background-size: cover;
  transition: background-color 160ms ease;
}

.public-header[data-background-mode="custom"],
.public-header[data-background-mode="image"] {
  margin: calc(clamp(18px, 4vw, 34px) * -1) calc(clamp(18px, 4vw, 34px) * -1) 0;
  padding: 24px clamp(18px, 4vw, 34px);
  color: #fff;
  border-bottom: 0;
}

.public-header[data-background-mode="image"] {
  position: relative;
  isolation: isolate;
  min-height: 110px;
}

.public-header[data-background-mode="image"]::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(17, 24, 39, .78), rgba(17, 24, 39, .28));
}

.public-header[data-background-mode="custom"] .brand small,
.public-header[data-background-mode="image"] .brand small {
  color: rgba(255, 255, 255, .78);
}

.public-card[data-header-style="banner"] .public-header {
  min-height: 92px;
}

.public-card[data-header-style="hero"] .public-header {
  min-height: 150px;
  align-items: flex-end;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: contain;
  background: #fff;
}

.public-card[data-template="classic"] .public-header[data-background-mode="template"] {
  background: #fff;
}

.public-card[data-template="classic"] .proof-preview {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent),
    #fff;
}

.public-page[data-proof-template="modern"] {
  background:
    radial-gradient(circle at 86% 8%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 30%),
    linear-gradient(150deg, var(--proof-page-background), #eaf2ff);
}

.public-card[data-template="modern"] {
  width: min(100%, 1180px);
  padding: clamp(20px, 4vw, 44px);
  border: 0;
  border-radius: 42px;
  background: rgba(248, 251, 255, .9);
  box-shadow: 0 35px 100px rgba(28, 64, 120, .16);
  backdrop-filter: blur(18px);
}

.public-card[data-template="modern"] .public-header[data-background-mode="template"] {
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 12px 38px rgba(16, 24, 40, .08);
}

.public-card[data-template="modern"] .public-proof-grid {
  grid-template-columns: 1fr;
  gap: 28px;
  margin-top: 28px;
}

.public-card[data-template="modern"] .proof-preview {
  min-height: 620px;
  border: 0;
  border-radius: 34px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(16, 55, 108, .13);
}

.public-card[data-template="modern"] aside {
  display: grid;
  grid-template-columns: minmax(240px, .75fr) minmax(300px, 1.25fr);
  column-gap: 30px;
  align-items: start;
}

.public-card[data-template="modern"] aside > .eyebrow,
.public-card[data-template="modern"] aside > h1,
.public-card[data-template="modern"] aside > p {
  grid-column: 1;
}

.public-card[data-template="modern"] aside > h1 {
  margin-top: 2px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: .98;
  letter-spacing: -.045em;
}

.public-card[data-template="modern"] .proof-status-tracker,
.public-card[data-template="modern"] .detail-list,
.public-card[data-template="modern"] .decision-panel,
.public-card[data-template="modern"] .decision-closed-panel,
.public-card[data-template="modern"] #publicMessage {
  grid-column: 2;
}

.public-card[data-template="modern"] .detail-row,
.public-card[data-template="modern"] .status-track-row,
.public-card[data-template="modern"] .comment-box,
.public-card[data-template="modern"] .attachment-upload-box {
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 9px 28px rgba(16, 24, 40, .07);
}

.public-page[data-proof-template="corporate"] {
  place-items: start center;
  background: #e8edf4;
}

.public-card[data-template="corporate"] {
  width: min(100%, 1160px);
  padding: 0 34px 34px;
  border: 1px solid #b8c3d1;
  border-top: 7px solid #14213d;
  border-radius: 2px;
  background: #f4f7fa;
  box-shadow: 0 22px 58px rgba(15, 23, 42, .16);
}

.public-card[data-template="corporate"] .public-header[data-background-mode="template"] {
  margin: 0 -34px;
  padding: 22px 34px;
  border: 0;
  border-radius: 0;
  background: #14213d;
  color: #fff;
}

.public-card[data-template="corporate"] .public-header[data-background-mode="template"] .brand small {
  color: #cbd5e1;
}

.public-card[data-template="corporate"] .public-proof-grid {
  grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr);
  gap: 28px;
  margin-top: 34px;
}

.public-card[data-template="corporate"] .public-proof-grid > div:first-child { order: 2; }
.public-card[data-template="corporate"] .public-proof-grid > aside { order: 1; }
.public-card[data-template="corporate"] .proof-preview { min-height: 650px; border-radius: 0; background: #fff; }
.public-card[data-template="corporate"] aside h1 { font-family: Georgia, "Times New Roman", serif; font-size: 38px; color: #14213d; }
.public-card[data-template="corporate"] .detail-row,
.public-card[data-template="corporate"] .status-track-row,
.public-card[data-template="corporate"] .comment-box,
.public-card[data-template="corporate"] .attachment-upload-box,
.public-card[data-template="corporate"] .primary-button,
.public-card[data-template="corporate"] .secondary-button { border-radius: 2px; }

.public-page[data-proof-template="dark"] {
  background:
    radial-gradient(circle at 85% 4%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 32%),
    #030712;
}

.public-card[data-template="dark"] {
  --surface: #0b1220;
  --line: #475569;
  --line-soft: #263246;
  --muted: #aebbd0;
  width: min(100%, 1100px);
  color: #f8fafc;
  border: 1px solid #334155;
  border-radius: 22px;
  background: #0b1220;
  box-shadow: 0 34px 100px rgba(0, 0, 0, .48);
}

.public-card[data-template="dark"] .public-header[data-background-mode="template"] {
  border-color: #334155;
  background: linear-gradient(90deg, #0f172a, #111827);
}

.public-card[data-template="dark"] .brand small,
.public-card[data-template="dark"] .eyebrow,
.public-card[data-template="dark"] .field-label,
.public-card[data-template="dark"] .detail-row span,
.public-card[data-template="dark"] .status-track-row small,
.public-card[data-template="dark"] .muted { color: #aebbd0; }
.public-card[data-template="dark"] aside h1,
.public-card[data-template="dark"] .detail-row,
.public-card[data-template="dark"] .status-track-row { color: #f8fafc; }
.public-card[data-template="dark"] .proof-preview { border-color: #334155; border-radius: 12px; background: #020617; }
.public-card[data-template="dark"] .detail-row,
.public-card[data-template="dark"] .status-track-row,
.public-card[data-template="dark"] .comment-box,
.public-card[data-template="dark"] .attachment-upload-box,
.public-card[data-template="dark"] .public-color-card { border-color: #334155; background: #111827; color: #f8fafc; }
.public-card[data-template="dark"] .secondary-button { border-color: #64748b; background: transparent; color: #fff; }
.public-card[data-template="dark"] .status-pill { background: #f8df91; color: #392b00; }

.public-page[data-proof-template="military"] {
  background:
    repeating-linear-gradient(135deg, rgba(51, 65, 29, .05) 0 14px, transparent 14px 28px),
    #d9dac4;
}

.public-card[data-template="military"] {
  --line: #858c64;
  --line-soft: #b9bda0;
  --muted: #59613f;
  width: min(100%, 1100px);
  padding: 26px;
  border: 3px solid #4f5f2f;
  border-radius: 3px;
  background:
    repeating-linear-gradient(135deg, rgba(79, 95, 47, .04) 0 11px, transparent 11px 22px),
    #eeecdc;
  box-shadow: 14px 14px 0 rgba(65, 76, 39, .24);
}

.public-card[data-template="military"] .public-header[data-background-mode="template"] {
  margin: -26px -26px 0;
  padding: 22px 26px;
  border: 0;
  border-bottom: 5px solid #b7a968;
  border-radius: 0;
  background: #4f5f2f;
  color: #fff;
}

.public-card[data-template="military"] .public-header[data-background-mode="template"] .brand small { color: #e5e7d5; }
.public-card[data-template="military"] .brand strong,
.public-card[data-template="military"] .brand small,
.public-card[data-template="military"] aside h1,
.public-card[data-template="military"] .eyebrow,
.public-card[data-template="military"] .field-label { text-transform: uppercase; letter-spacing: .08em; }
.public-card[data-template="military"] .public-proof-grid { grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); gap: 24px; }
.public-card[data-template="military"] .proof-preview { min-height: 560px; border: 2px solid #657345; border-radius: 0; background: #d6d8bf; }
.public-card[data-template="military"] .detail-row,
.public-card[data-template="military"] .status-track-row,
.public-card[data-template="military"] .comment-box,
.public-card[data-template="military"] .attachment-upload-box,
.public-card[data-template="military"] .public-color-card { border: 1px solid #9da479; border-left: 5px solid #4f5f2f; border-radius: 0; background: rgba(250, 249, 235, .88); }
.public-card[data-template="military"] .primary-button,
.public-card[data-template="military"] .secondary-button,
.public-card[data-template="military"] .status-pill,
.public-card[data-template="military"] .public-revision-badge { border-radius: 2px; text-transform: uppercase; letter-spacing: .05em; }
.public-card[data-template="military"] .primary-button { background: #4f5f2f; }

.public-page[data-proof-template="elegant"] {
  background: linear-gradient(145deg, #f2e7da, var(--proof-page-background));
}

.public-card[data-template="elegant"] {
  width: min(100%, 1120px);
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid #b68a62;
  border-radius: 0;
  outline: 1px solid #d7b99a;
  outline-offset: -11px;
  background: #fffaf3;
  box-shadow: 0 30px 90px rgba(74, 45, 25, .18);
}

.public-card[data-template="elegant"] .public-header[data-background-mode="template"] {
  padding-bottom: 24px;
  border-color: #d7b99a;
  border-radius: 0;
  background: transparent;
}

.public-card[data-template="elegant"] .brand strong,
.public-card[data-template="elegant"] aside h1 {
  font-family: Georgia, "Times New Roman", serif;
  color: #4a2d19;
}

.public-card[data-template="elegant"] aside h1 { font-size: clamp(38px, 5vw, 58px); font-weight: 500; line-height: 1.04; text-align: center; }
.public-card[data-template="elegant"] aside > .eyebrow,
.public-card[data-template="elegant"] aside > p { text-align: center; }
.public-card[data-template="elegant"] .public-proof-grid { grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr); gap: 44px; }
.public-card[data-template="elegant"] .proof-preview { min-height: 620px; border: 8px solid #fff; border-radius: 48% 48% 4px 4px; outline: 1px solid #c59d79; background: #f8ecde; box-shadow: 0 18px 48px rgba(88, 52, 25, .13); }
.public-card[data-template="elegant"] .detail-row,
.public-card[data-template="elegant"] .status-track-row,
.public-card[data-template="elegant"] .comment-box,
.public-card[data-template="elegant"] .attachment-upload-box,
.public-card[data-template="elegant"] .public-color-card { border: 0; border-bottom: 1px solid #dfc5aa; border-radius: 0; background: transparent; }
.public-card[data-template="elegant"] .primary-button,
.public-card[data-template="elegant"] .secondary-button { border-radius: 0; font-family: Georgia, "Times New Roman", serif; }
.public-card[data-template="elegant"] .primary-button { background: #9f6b40; }

/* User-selected header color/image always wins over the template header treatment. */
.public-card[data-template] .public-header[data-background-mode="custom"] {
  background-color: var(--proof-header-background);
  background-image: none;
}

.public-card[data-template] .public-header[data-background-mode="image"] {
  background-color: var(--proof-header-background);
  background-image: var(--proof-header-image);
}

.public-proof-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 18px;
  margin-top: 22px;
}

.proof-expiry-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
  padding: 14px 18px;
  border: 1px solid #b8d7ff;
  border-radius: 16px;
  background: #eef6ff;
  color: #123a63;
}
.proof-expiry-banner[hidden] { display: none; }
.proof-expiry-banner > div { display: grid; gap: 3px; }
.proof-expiry-banner span { font-size: .82rem; }
.proof-expiry-banner b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.proof-expiry-banner.is-urgent { border-color: #f1c27d; background: #fff7e8; color: #7a4100; }
.proof-expiry-banner.is-expired { border-color: #f3b4ae; background: #fff0ee; color: #8f1d14; }

.public-order-pricing {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(255, 255, 255, .72);
}
.public-pricing-heading,
.public-pricing-line,
.public-pricing-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.public-pricing-heading > div,
.public-pricing-line > div { display: grid; gap: 2px; }
.public-pricing-heading small,
.public-pricing-line small { color: var(--muted); }
.public-pricing-lines { display: grid; gap: 10px; margin-top: 14px; }
.public-pricing-line { display: grid; grid-template-columns: minmax(130px, 1fr) auto auto auto; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); font-size: .86rem; }
.public-pricing-totals { display: grid; gap: 7px; margin-top: 12px; }
.public-pricing-total.is-total { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 1rem; }

.proof-expiration-card {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #b8d7ff;
  border-radius: 14px;
  background: #eef6ff;
  color: #123a63;
}
.proof-expiration-card b { font-variant-numeric: tabular-nums; }
.proof-expiration-card.is-expired { border-color: #f3b4ae; background: #fff0ee; color: #8f1d14; }
.queue-proof-expiration { display: grid; gap: 2px; margin-top: 7px; color: #1269ff; }
.queue-proof-expiration small { color: var(--muted); }
.queue-proof-expiration.is-expired { color: #b42318; }

.customers-archive-panel { min-height: 680px; }
.customers-archive-grid { display: grid; grid-template-columns: minmax(230px, 300px) minmax(0, 1fr); gap: 22px; }
.customer-archive-list { display: grid; align-content: start; gap: 9px; }
.customer-archive-person {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 15px;
  background: #fff;
  color: var(--text);
  text-align: left;
}
.customer-archive-person > span { display: grid; gap: 2px; }
.customer-archive-person small { color: var(--muted); }
.customer-archive-person.is-active { border-color: #8bc0ff; background: #eef6ff; box-shadow: 0 0 0 2px rgba(10, 132, 255, .08); }
.customer-archive-detail { min-width: 0; }
.customer-archive-header,
.customer-order-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.customer-archive-header h2,
.customer-order-card-heading h3 { margin: 3px 0; }
.customer-order-tabs { display: flex; gap: 8px; margin: 18px 0; overflow-x: auto; }
.customer-order-tabs button { display: grid; gap: 2px; flex: 0 0 auto; padding: 10px 13px; border: 1px solid var(--line-soft); border-radius: 12px; background: #fff; text-align: left; }
.customer-order-tabs button.is-active { border-color: var(--accent); background: #eef6ff; }
.customer-order-tabs small { color: var(--muted); }
.customer-order-card { padding: 20px; border: 1px solid var(--line-soft); border-radius: 20px; background: #fff; }
.archive-financials { margin-top: 20px; padding: 16px; border: 1px solid var(--line-soft); border-radius: 16px; background: #fbfcfe; }
.archive-financial-caption { display: grid; gap: 3px; margin-bottom: 13px; }
.archive-financial-caption small { color: var(--muted); }
.archive-financial-table { display: grid; gap: 0; overflow-x: auto; }
.archive-financial-row { display: grid; grid-template-columns: minmax(190px, 1fr) 150px 110px 120px; gap: 12px; min-width: 620px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); align-items: center; }
.archive-financial-row > span:first-child { display: grid; gap: 2px; }
.archive-financial-row small { color: var(--muted); }
.archive-financial-row.is-header { color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.archive-totals { display: grid; gap: 7px; width: min(330px, 100%); margin: 14px 0 0 auto; }
.archive-totals > div { display: flex; justify-content: space-between; gap: 14px; }
.archive-totals .is-total { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 1.05rem; }
.approval-record-list { margin-top: 24px; }
.approval-record-card { margin-top: 12px; border: 1px solid var(--line-soft); border-radius: 16px; overflow: hidden; }
.approval-record-card summary { display: flex; justify-content: space-between; gap: 18px; padding: 14px 16px; background: #f8fafc; cursor: pointer; }
.approval-record-card summary > span { display: grid; gap: 3px; }
.approval-record-card summary small { color: var(--muted); }
.approval-record-items { display: grid; gap: 14px; padding: 16px; }
.approval-record-items article { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; }
.approval-record-preview { display: grid; place-items: center; min-height: 140px; border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; background: #f5f7fa; color: var(--muted); }
.approval-record-preview img { width: 100%; height: 100%; max-height: 190px; object-fit: contain; }
.approval-record-items p { margin: 7px 0; }

@media (max-width: 900px) {
  .customers-archive-grid { grid-template-columns: 1fr; }
  .customer-archive-list { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
  .public-pricing-line { grid-template-columns: minmax(120px, 1fr) auto; }
  .public-pricing-line > span:nth-of-type(2) { display: none; }
}

@media (max-width: 620px) {
  .proof-expiry-banner,
  .customer-archive-header,
  .customer-order-card-heading,
  .approval-record-card summary { align-items: stretch; flex-direction: column; }
  .approval-record-items article { grid-template-columns: 1fr; }
}

.proof-preview {
  position: relative;
  display: grid;
  min-height: 460px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(10, 132, 255, 0.08), transparent),
    #fff;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.proof-preview strong {
  color: #98a2b3;
  font-size: clamp(34px, 7vw, 76px);
  letter-spacing: 0;
}

.proof-preview-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.proof-preview-canvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(74vh, 760px);
  border-radius: 18px;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.proof-preview.is-protected-proof {
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(10, 132, 255, 0.05), transparent),
    #fff;
}

.protected-proof-notice {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 7px 10px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #667085;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
  backdrop-filter: blur(10px);
}

.proof-preview.has-proof-image {
  cursor: zoom-in;
}

.proof-preview.proof-magnifier-disabled {
  cursor: default;
  touch-action: pan-y pinch-zoom;
}

.proof-magnifier {
  position: absolute;
  z-index: 4;
  width: 176px;
  height: 176px;
  pointer-events: none;
  opacity: 0;
  border: 3px solid rgba(255, 255, 255, 0.94);
  border-radius: 28px;
  background-color: #fff;
  background-repeat: no-repeat;
  box-shadow:
    0 20px 50px rgba(16, 24, 40, 0.28),
    0 0 0 1px rgba(16, 24, 40, 0.10);
  transform: scale(0.94);
  transition: opacity 140ms ease, transform 140ms ease;
}

.proof-magnifier.is-visible {
  opacity: 1;
  transform: scale(1);
}

.proof-magnifier::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  border-top: 1px solid rgba(16, 24, 40, 0.28);
  border-left: 1px solid rgba(16, 24, 40, 0.28);
  transform: translate(-50%, -50%);
}

@media (hover: none), (pointer: coarse), (max-width: 760px) {
  .proof-preview.has-proof-image {
    cursor: default;
    touch-action: pan-y pinch-zoom;
  }

  .proof-magnifier {
    display: none !important;
  }
}

.public-revision-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 10px 14px;
  border: 1px solid rgba(16, 24, 40, 0.10);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #101828;
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.14);
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 0;
  backdrop-filter: blur(10px);
}

.public-item-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.public-picked-colors {
  margin-top: 16px;
}

.public-picked-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.public-picked-header .eyebrow {
  margin-bottom: 0;
}

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

.public-color-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
}

.public-color-card strong,
.public-color-card small {
  display: block;
}

.public-color-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.comment-box {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  resize: vertical;
}

.attachment-upload-box {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #fbfbfd;
}

.attachment-upload-box input {
  width: 100%;
}

.decision-panel[hidden],
.decision-closed-panel[hidden] {
  display: none;
}

.decision-panel {
  display: block;
}

.decision-closed-panel {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(22, 163, 74, 0.16);
  border-radius: 16px;
  background: rgba(240, 253, 244, 0.88);
  color: #14532d;
}

.decision-closed-panel strong {
  color: #101828;
  font-size: 15px;
}

.decision-closed-panel span {
  color: #344054;
  font-size: 13px;
  line-height: 1.45;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(420px, calc(100vw - 36px));
  padding: 14px 16px;
  border-radius: 16px;
  color: #fff;
  background: #111827;
  box-shadow: var(--shadow);
  transform: translateY(130%);
  transition: transform 180ms ease;
}

.toast.is-visible {
  transform: translateY(0);
}

@media (max-width: 1700px) and (min-width: 1101px) {
  .proofello-shell {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .main {
    padding: 18px;
  }

  .composer-grid {
    grid-template-columns: minmax(235px, 285px) minmax(0, 1fr);
    align-items: start;
  }

  .composer-panel {
    padding: 16px;
  }

  .tools-panel {
    grid-column: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-self: start;
    max-height: none;
    overflow: visible;
  }

  .tools-panel > * {
    min-width: 0;
  }

  .canvas-stage {
    min-width: 0;
  }

  .canvas-workspace {
    grid-template-columns: minmax(150px, 195px) minmax(420px, 1fr);
    grid-template-areas:
      ". toolbar"
      "refs frame"
      "colors colors";
    align-items: start;
    overflow-x: auto;
  }

  .canvas-frame {
    min-width: 420px;
    padding-inline: 14px;
  }

  .canvas-color-panel {
    max-height: none;
  }

  .color-readout {
    grid-template-columns: minmax(130px, 1fr) auto auto;
  }

  .tool-button {
    padding-inline: 12px;
  }

  .revision-reference-panel {
    padding: 12px;
  }

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

@media (max-width: 1100px) {
  .proofello-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }

  .nav-list {
    display: flex;
    min-width: max-content;
  }

  .sidebar-card {
    display: none;
  }

  .composer-grid,
  .settings-grid,
  .brand-kit-settings-layout,
  .customer-proof-settings-layout,
  .public-proof-grid,
  .email-settings-panel,
  .email-proof-preview-card,
  .email-test-card {
    grid-template-columns: 1fr;
  }

  .composer-grid {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .composer-grid > .composer-panel,
  .composer-grid > .canvas-stage {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    justify-self: stretch;
  }

  .composer-panel > *,
  .canvas-stage > *,
  .canvas-workspace > *,
  .layer-stack,
  .layer-inline-controls,
  .ordered-item-card,
  .picked-color-card,
  .proof-version-card {
    max-width: 100%;
    min-width: 0;
  }

  .composer-panel .field,
  .composer-panel input,
  .composer-panel select,
  .composer-panel textarea,
  .canvas-stage input,
  .canvas-stage select,
  .canvas-stage textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .customer-proof-preview-wrap {
    position: static;
  }

  .brand-kit-preview-wrap {
    position: static;
  }

  .public-card[data-template] .public-proof-grid,
  .public-card[data-template="modern"] aside {
    grid-template-columns: 1fr;
  }

  .public-card[data-template="modern"] aside > *,
  .public-card[data-template="modern"] .proof-status-tracker,
  .public-card[data-template="modern"] .detail-list,
  .public-card[data-template="modern"] .decision-panel,
  .public-card[data-template="modern"] .decision-closed-panel,
  .public-card[data-template="modern"] #publicMessage {
    grid-column: 1;
  }

  .public-card[data-template="corporate"] .public-proof-grid > div:first-child,
  .public-card[data-template="corporate"] .public-proof-grid > aside {
    order: initial;
  }

  .email-settings-panel-copy {
    position: static;
  }

  .email-delivery-grid,
  .email-journey-grid,
  .email-template-modal-workspace,
  .plans-comparison-grid {
    grid-template-columns: 1fr;
  }

  .email-template-live-preview {
    position: static;
  }

  .canvas-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    grid-template-areas:
      "toolbar"
      "refs"
      "frame"
      "colors";
    overflow: visible;
  }

  .canvas-stage,
  .canvas-workspace,
  .canvas-frame,
  .composer-panel,
  .settings-content,
  .settings-menu {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .settings-menu {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }

  .settings-option {
    flex: 0 0 min(230px, 72vw);
  }

  .revision-reference-panel {
    max-height: 420px;
  }

  .compact-grid.text-options-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .canvas-color-panel {
    align-self: auto;
  }
}

@media (max-width: 720px) {
  .main {
    padding: 16px;
  }

  .sidebar {
    gap: 12px;
    padding: 12px;
  }

  .sidebar .brand {
    flex: 0 0 auto;
  }

  .nav-item {
    min-height: 44px;
    white-space: nowrap;
  }

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

  .topbar,
  .hero-panel,
  .panel-header,
  .proof-queue-actions,
  .public-header {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions,
  .composer-actions,
  .button-row,
  .customer-proof-preview-actions,
  .usage-upgrade-actions {
    width: 100%;
  }

  .topbar-actions > *,
  .composer-actions > *,
  .customer-proof-preview-actions > *,
  .usage-upgrade-actions > * {
    flex: 1 1 160px;
    justify-content: center;
  }

  .metrics-grid,
  .settings-section-grid,
  .email-template-grid,
  .settings-toggle-grid,
  .form-grid,
  .template-grid,
  .plan-grid {
    grid-template-columns: 1fr;
  }

  .email-settings-hero,
  .email-template-summary-card {
    grid-template-columns: 1fr;
  }

  .email-settings-hero,
  .email-delivery-card,
  .email-automation-card,
  .email-template-library,
  .email-test-card {
    gap: 14px;
    padding: 14px;
    border-radius: 18px;
  }

  .email-section-heading,
  .email-branding-control,
  .plans-settings-hero,
  .plans-email-rule,
  .storage-usage-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .plans-email-rule { display: flex; }

  .email-settings-status-stack {
    width: 100%;
    justify-items: start;
  }

  .email-required-pill,
  .email-always-on,
  .email-settings-status-stack .status-pill,
  .email-template-group-header .status-pill,
  .email-template-card-topline .template-token-pill {
    width: fit-content;
    max-width: 100%;
    white-space: normal;
  }

  .email-template-group-header,
  .email-template-card-topline,
  .email-test-action-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .email-test-controls {
    grid-template-columns: 1fr;
  }

  .email-template-summary-card > button,
  .email-test-action-row > button,
  #emailSettingsForm > .button-row > button {
    width: 100%;
    justify-content: center;
  }

  .search-input {
    max-width: none;
  }

  .proof-queue-actions {
    min-width: 0;
  }

  .proof-queue-actions .search-input,
  .proof-queue-actions .secondary-button {
    width: 100%;
    max-width: none;
  }

  .canvas-frame {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 380px;
    padding: 12px;
    overflow: hidden;
  }

  .canvas-workspace {
    grid-template-areas:
      "refs"
      "toolbar"
      "frame"
      "colors";
    gap: 10px;
    padding: 10px;
  }

  .canvas-toolbar {
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    padding: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }

  #proofCanvas {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
  }

  .color-panel-heading {
    grid-template-columns: 1fr;
  }

  .color-panel-actions {
    justify-content: flex-start;
  }

  .revision-reference-panel {
    max-height: none;
    padding: 12px;
  }

  .revision-reference-toggle {
    display: inline-flex;
    justify-content: center;
  }

  .revision-reference-panel.is-collapsed {
    grid-template-rows: auto;
  }

  .revision-reference-panel.is-collapsed .revision-reference-list {
    display: none;
  }

  .public-revision-badge {
    top: 12px;
    right: 12px;
    min-width: 64px;
    padding: 8px 11px;
    font-size: 15px;
  }

  .text-options-panel {
    padding: 9px;
  }

  .text-options-primary,
  .text-options-secondary {
    grid-template-columns: 1fr;
  }

  .text-options-title {
    justify-content: flex-start;
  }

  .mini-icon-button,
  .mini-danger-button {
    width: 100%;
  }

  .section-heading-row,
  .color-readout {
    align-items: stretch;
    flex-direction: column;
  }

  .ordered-item-main {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .picked-color-card {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .picked-color-card .tiny-button {
    grid-column: 1 / -1;
  }

  .activity-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .activity-detail-header {
    align-items: stretch;
    flex-direction: column;
  }

  .activity-order-overview {
    grid-template-columns: 1fr;
  }

  .activity-card .secondary-button {
    grid-column: 1 / -1;
  }

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

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

  .internal-note-form {
    grid-template-columns: 1fr;
  }

  .email-template-modal {
    padding: 16px;
  }

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

  .settings-asset-preview {
    width: min(160px, 100%);
    height: 104px;
  }

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

  .settings-asset-actions input[type="file"],
  .settings-asset-actions .secondary-button {
    grid-column: 1;
  }

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

  .public-page {
    padding: 10px;
  }

  .public-card,
  .public-proof-grid,
  .public-proof-grid > *,
  .public-proof-grid aside {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .public-header .brand {
    min-width: 0;
  }

  .public-header .brand > span:last-child,
  .public-header .brand strong,
  .public-header .brand small,
  .detail-row,
  .status-track-row,
  .attachment-list {
    overflow-wrap: anywhere;
  }

  .public-item-nav,
  .status-tabs,
  .table-wrap {
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .public-item-nav {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .decision-panel .button-row > * {
    flex: 1 1 100%;
    justify-content: center;
  }

  .comment-box,
  .attachment-upload-box,
  .attachment-upload-box input,
  input,
  select,
  textarea {
    min-width: 0;
    max-width: 100%;
  }

  .public-card[data-template] {
    padding: 18px;
  }

  .public-card[data-template="corporate"] .public-header[data-background-mode="template"],
  .public-card[data-template="military"] .public-header[data-background-mode="template"] {
    margin: -18px -18px 0;
    padding: 18px;
  }

  .public-card[data-template="modern"] .proof-preview,
  .public-card[data-template="corporate"] .proof-preview,
  .public-card[data-template="military"] .proof-preview,
  .public-card[data-template="elegant"] .proof-preview {
    min-height: clamp(300px, 92vw, 420px);
  }
}

@media (max-width: 440px) {
  #emailSettingsForm .email-journey-card {
    padding: 14px;
  }

  #emailSettingsForm .email-journey-card li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  #emailSettingsForm .email-template-group {
    padding: 10px;
  }

  #emailSettingsForm .email-template-summary-card {
    padding: 12px;
  }
}

@media print {
  .proof-preview {
    min-height: 260px;
    border: 1px solid #d0d5dd;
    background: #f8fafc !important;
  }

  .proof-preview-canvas,
  .proof-preview-image,
  .proof-magnifier,
  .protected-proof-notice {
    display: none !important;
  }

  .proof-preview::after {
    content: "Protected proof preview - open the secure proof link to review.";
    display: block;
    max-width: 320px;
    color: #667085;
    font-weight: 800;
    line-height: 1.45;
    text-align: center;
  }
}
