: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;
}

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 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;
}

.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);
}

.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-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: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fbfbfd;
}

.saved-proof-preview {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  padding: 4px;
  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 {
  min-width: 0;
}

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

.saved-proof-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.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;
}

.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;
}

.email-settings-hero,
.email-settings-panel,
.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);
}

.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;
}

.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;
}

.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;
}

.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-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;
}

.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;
}

.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);
}

.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(920px, 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 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;
}

.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-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: linear-gradient(180deg, #fbfbfd, #eef2f7);
}

.public-card {
  width: min(100%, 980px);
  padding: clamp(18px, 4vw, 34px);
}

.public-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-soft);
}

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

.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;
  }
}

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

  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
  }

  .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;
  }

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

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

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

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

  .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;
  }

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

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

  .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-status-stack {
    justify-items: start;
  }

  .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;
  }

  .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 {
    min-height: 380px;
    padding: 12px;
  }

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

  .canvas-toolbar {
    padding: 0;
  }

  .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-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;
  }

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

@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;
  }
}

