:root {
  --postly-blue: #061f86;
  --postly-blue-dark: #041255;
  --postly-ink: #08364b;
  --postly-line: #dfe6f1;
  --postly-bg: #f7f9fc;
  --postly-error: #b42318;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--postly-ink);
  background: linear-gradient(135deg, var(--white) 0%, var(--postly-bg) 58%, #eef4f8 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.login-panel {
  width: min(100%, 416px);
  min-height: 548px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px;
  border: 1px solid rgba(6, 31, 134, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 60px rgba(8, 54, 75, 0.12);
}

.login-panel.compact {
  min-height: 420px;
  align-items: center;
  text-align: center;
}

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

.brand-row span {
  flex: 0 0 auto;
  color: var(--postly-blue);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.wordmark {
  display: block;
  width: 158px;
  max-width: 62%;
  height: auto;
}

.signal-icon {
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin: 0 0 22px;
}

.compact .signal-icon {
  margin-top: 28px;
}

.signal-icon.small {
  width: 72px;
  height: 72px;
  margin: 0;
}

h1 {
  margin: 0 0 28px;
  color: var(--postly-blue-dark);
  font-size: 2rem;
  line-height: 1.08;
  font-weight: 800;
}

form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

label {
  color: var(--postly-ink);
  font-size: 0.92rem;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--postly-line);
  border-radius: 8px;
  color: var(--postly-blue-dark);
  background: var(--white);
  font: inherit;
  outline: none;
}

input {
  height: 50px;
  padding: 0 14px;
}

select {
  height: 50px;
  padding: 0 38px 0 14px;
}

textarea {
  min-height: 96px;
  resize: vertical;
  padding: 13px 14px;
  line-height: 1.4;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--postly-blue);
  box-shadow: 0 0 0 4px rgba(6, 31, 134, 0.12);
}

.error {
  min-height: 20px;
  margin: -2px 0 0;
  color: var(--postly-error);
  font-size: 0.9rem;
  font-weight: 700;
}

.error[hidden] {
  display: block;
  visibility: hidden;
}

button {
  height: 52px;
  border: 0;
  border-radius: 8px;
  color: var(--white);
  background: var(--postly-blue);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--postly-blue-dark);
}

button:focus-visible {
  outline: 4px solid rgba(6, 31, 134, 0.22);
  outline-offset: 3px;
}

.workspace-body {
  overflow: hidden;
  min-height: 100vh;
  background: #f5f7fb;
}

.workspace-shell {
  height: 100vh;
  min-height: 0;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  overflow: hidden;
  color: #14394d;
  background: #f5f7fb;
}

.sidebar-backdrop,
.mobile-menu-button {
  display: none;
}

.campaign-sidebar {
  min-width: 0;
  height: 100vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px 12px;
  border-right: 1px solid #dce5ee;
  background: #f7f8fa;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 44px;
  padding: 0 8px;
}

.sidebar-wordmark {
  width: 124px;
  height: auto;
}

.sidebar-brand span,
.status-pill {
  color: #08746d;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ghost-button,
.tab-button {
  height: auto;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}

.campaign-import {
  padding: 12px;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  background: #ffffff;
}

.campaign-import h2 {
  margin: 0 0 10px;
  color: #102f45;
  font-size: 0.94rem;
  font-weight: 850;
}

.campaign-import-form {
  display: grid;
  gap: 10px;
}

.campaign-import-form label {
  display: grid;
  gap: 6px;
  color: #31495a;
  font-size: 0.82rem;
  font-weight: 800;
}

.campaign-import-form input {
  height: 40px;
  padding: 0 11px;
  border-color: #d8e1ea;
  color: #102f45;
  background: #f8fafc;
}

.campaign-import-actions {
  display: block;
}

.campaign-import-actions button {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d8e1ea;
  border-radius: 8px;
  color: #ffffff;
  background: var(--postly-blue);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}

.campaign-import-actions button:hover {
  background: var(--postly-blue-dark);
}

.campaign-import-status {
  margin: 0;
  color: #08746d;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.campaign-import-status[data-tone="error"] {
  color: var(--postly-error);
}

.campaign-import-status[hidden] {
  display: none;
}

.campaign-import-result {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 10px;
  margin: 2px 0 0;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.campaign-import-result[hidden] {
  display: none;
}

.campaign-import-result dt,
.campaign-import-result dd {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.campaign-import-result dt {
  color: #6a7b88;
  font-weight: 800;
}

.campaign-import-result dd {
  min-width: 0;
  color: #102f45;
  font-weight: 700;
}

.sidebar-search {
  position: relative;
  display: block;
  min-width: 0;
}

.sidebar-search[hidden] {
  display: none;
}

.sidebar-search span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.sidebar-search input {
  height: 42px;
  padding: 0 12px;
  border-color: #d8e1ea;
  background: #ffffff;
}

.sidebar-nav {
  display: grid;
  gap: 3px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.sidebar-nav a {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 8px;
  color: #263f52;
  font-size: 0.94rem;
  font-weight: 760;
  text-decoration: none;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--postly-blue);
  background: #eef3fb;
}

.sidebar-section {
  min-height: auto;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 8px;
}

.sidebar-section h2 {
  margin: 4px 8px 0;
  color: #6a7b88;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.campaign-list {
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 6px;
  align-content: start;
  overflow: visible;
}

.campaign-item {
  position: relative;
  display: grid;
  gap: 4px;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #14394d;
  text-decoration: none;
}

.campaign-item[hidden] {
  display: none;
}

.campaign-item:hover,
.campaign-item.active {
  border-color: #d9e4ef;
  background: #f1f5fb;
}

.campaign-item.active {
  gap: 6px;
  min-height: 104px;
  padding-left: 17px;
  padding-right: 74px;
  border-color: rgba(6, 31, 134, 0.24);
  background: linear-gradient(135deg, #f7fbff 0%, #eef5ff 100%);
  box-shadow: 0 8px 18px rgba(20, 57, 77, 0.08);
}

.campaign-item.active::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: #08746d;
}

.campaign-item.active::after {
  content: "Selected";
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border: 1px solid rgba(6, 31, 134, 0.16);
  border-radius: 999px;
  color: #061f86;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.campaign-item.active .campaign-title {
  color: #061f86;
}

.campaign-item.active .campaign-meta {
  color: #50677a;
}

.campaign-item.imported {
  border-color: #c8dde7;
  background: #f4fbf8;
}

.campaign-item.imported.active {
  border-color: rgba(6, 31, 134, 0.24);
  background: linear-gradient(135deg, #f7fbff 0%, #eef5ff 100%);
}

.campaign-item.attention {
  border-color: #08746d;
  box-shadow: 0 0 0 4px rgba(8, 116, 109, 0.14);
}

.campaign-title {
  color: #061f86;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
}

.campaign-meta {
  color: #617384;
  font-size: 0.84rem;
  line-height: 1.25;
}

.campaign-empty {
  margin: -8px 8px 0;
  color: #617384;
  font-size: 0.9rem;
  font-weight: 700;
}

.campaign-empty[hidden] {
  display: none;
}

.workspace-main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}

.logout-form {
  display: block;
}

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

.sidebar-logout .ghost-button {
  width: 100%;
  min-height: 40px;
}

.ghost-button {
  padding: 10px 12px;
  color: #375266;
  background: transparent;
  border-color: #d8e1ea;
  font-weight: 800;
}

.ghost-button:hover {
  color: var(--postly-blue);
  background: #f8fafc;
}

.campaign-workspace {
  min-width: 0;
  min-height: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
  padding: 22px 24px 24px;
}

.settings-workspace {
  min-width: 0;
  min-height: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  overflow: hidden;
  padding: 22px 24px 24px;
}

.settings-heading {
  padding-bottom: 2px;
}

.settings-back-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 1px solid #d8e1ea;
  border-radius: 8px;
  color: #375266;
  background: #ffffff;
  font-size: 0.86rem;
  font-weight: 850;
  text-decoration: none;
}

.settings-back-link:hover {
  color: var(--postly-blue);
  background: #eef3fb;
}

.settings-grid {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: min-content;
  gap: 14px;
  overflow-y: auto;
  padding-right: 4px;
}

.settings-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 20px;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(20, 57, 77, 0.08);
}

.settings-card-heading {
  min-width: 0;
}

.settings-card-heading p {
  margin: 0 0 6px;
  color: #08746d;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.settings-card-heading h2 {
  margin: 0;
  color: var(--postly-blue-dark);
  font-size: 1.25rem;
  line-height: 1.1;
}

.settings-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.settings-list.compact {
  margin-top: -2px;
}

.settings-list div {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid #edf2f7;
}

.settings-list div:first-child {
  border-top: 0;
  padding-top: 0;
}

.settings-list dt,
.settings-toggle small {
  color: #617384;
  font-size: 0.86rem;
  font-weight: 760;
}

.settings-list dd {
  min-width: 0;
  margin: 0;
  color: #102f45;
  font-size: 0.9rem;
  font-weight: 850;
}

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

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

.settings-field-wide {
  grid-column: 1 / -1;
}

.settings-field span {
  color: #617384;
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.settings-field input,
.settings-field select {
  width: 100%;
  min-width: 0;
  height: 40px;
  border: 1px solid #d8e1ea;
  border-radius: 8px;
  color: #102f45;
  background: #ffffff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
}

.settings-field input:not([type="color"]),
.settings-field select {
  padding: 0 11px;
}

.settings-field input[type="color"] {
  padding: 3px;
  cursor: pointer;
}

.settings-field input:focus,
.settings-field select:focus {
  outline: 3px solid rgba(6, 31, 134, 0.12);
  border-color: rgba(6, 31, 134, 0.58);
}

.settings-toggle {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  background: #f8fafc;
}

.settings-toggle input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: #08746d;
}

.settings-toggle span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.settings-toggle strong {
  color: #102f45;
  font-size: 0.95rem;
  font-weight: 850;
}

.settings-toggle small {
  line-height: 1.35;
}

.settings-save-state {
  margin: -4px 0 0;
  color: #08746d;
  font-size: 0.82rem;
  font-weight: 850;
}

.settings-save-state[hidden] {
  display: none;
}

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

.settings-secondary-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #d8e1ea;
  border-radius: 8px;
  color: #375266;
  background: #ffffff;
  font-size: 0.86rem;
  font-weight: 850;
}

.settings-secondary-button:hover {
  color: var(--postly-blue);
  background: #eef3fb;
}

.settings-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #d8e1ea;
  border-radius: 999px;
  color: #375266;
  background: #f8fafc;
  font-size: 0.8rem;
  font-weight: 850;
}

.settings-pill.ready {
  color: #08746d;
  border-color: #bfe3db;
  background: #effbf8;
}

.campaign-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.campaign-heading > div:first-child,
.listing-map-header > div,
.listing-overview-header > div:first-child,
.postgrid-header > div,
.audience-panel-header > div,
.postgrid-card-heading > div {
  min-width: 0;
}

.campaign-heading-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.campaign-heading p {
  margin: 0 0 6px;
  color: #08746d;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.campaign-heading h1 {
  margin: 0;
  color: var(--postly-blue-dark);
  font-size: 1.82rem;
  line-height: 1.08;
}

.status-pill {
  padding-top: 9px;
}

.workspace-tabs {
  width: min(100%, 690px);
  display: grid;
  grid-template-columns: repeat(5, minmax(104px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  background: #ffffff;
}

.tab-button {
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  display: grid;
  place-items: center;
  color: #4b6273;
  background: transparent;
  font-weight: 800;
  text-decoration: none;
}

.tab-button:hover,
.tab-button.active {
  color: #ffffff;
  background: var(--postly-blue);
}

.tab-stack {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.tab-surface {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  place-items: center;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(20, 57, 77, 0.08);
}

.tab-surface[hidden] {
  display: none;
}

.overview-tab-surface {
  min-height: 0;
  display: block;
  place-items: unset;
  overflow: hidden;
}

.listing-overview {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
}

.listing-overview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #e2e8f0;
}

.listing-overview-header p {
  margin: 0 0 5px;
  color: #08746d;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.listing-overview-header h2 {
  margin: 0;
  color: var(--postly-blue-dark);
  font-size: 1.5rem;
  line-height: 1.12;
}

.overview-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.overview-form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.listing-overview-header span,
.overview-form-actions span {
  flex: 0 0 auto;
  margin-top: 2px;
  padding: 8px 10px;
  border: 1px solid #d8e1ea;
  border-radius: 999px;
  color: #375266;
  background: #f8fafc;
  font-size: 0.78rem;
  font-weight: 850;
}

.overview-save-button {
  width: auto;
  min-width: 78px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--postly-blue);
  border-radius: 8px;
  color: #ffffff;
  background: var(--postly-blue);
  font-size: 0.84rem;
  font-weight: 850;
}

.overview-save-button:disabled {
  color: #7a8a98;
  background: #eef3f7;
  border-color: #d8e1ea;
  cursor: not-allowed;
}

.overview-empty {
  min-height: 420px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 18px;
  padding: 48px 24px;
  text-align: center;
}

.overview-empty[hidden],
.overview-fields[hidden] {
  display: none;
}

.overview-empty h3 {
  margin: 0;
  color: var(--postly-blue-dark);
  font-size: 1.65rem;
  line-height: 1.15;
}

.overview-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  align-content: start;
  overflow: auto;
  padding: 20px 24px 24px;
}

.home-drop-info {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(8, 116, 109, 0.22);
  border-radius: 8px;
  background: #f6fbfa;
}

.home-drop-info[hidden] {
  display: none;
}

.home-drop-info-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(8, 116, 109, 0.16);
}

.home-drop-info-heading span,
.home-drop-info-grid span {
  color: #08746d;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-drop-info-heading strong {
  color: var(--postly-blue-dark);
  font-size: 1rem;
  line-height: 1.2;
  text-align: right;
}

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

.home-drop-info-grid div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(8, 116, 109, 0.14);
  border-radius: 8px;
  background: #ffffff;
}

.home-drop-info-grid strong {
  color: #102f45;
  font-size: 0.86rem;
  line-height: 1.25;
}

.home-drop-info p {
  margin: 0;
  color: #375266;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.overview-field {
  display: grid;
  gap: 8px;
}

.overview-field-wide {
  grid-column: 1 / -1;
}

.overview-field span {
  color: #617384;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.overview-field input,
.overview-field select,
.overview-field textarea {
  border-color: #d8e1ea;
  color: #102f45;
  background: #f8fafc;
  font-weight: 750;
}

.overview-field input[readonly],
.overview-field textarea[readonly],
.overview-field select:disabled {
  color: #375266;
  background: #eef3f7;
  opacity: 1;
}

.overview-message-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #d8e1ea;
  border-radius: 8px;
  background: #f8fafc;
}

.overview-message-panel[hidden] {
  display: none;
}

.overview-message-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.overview-message-header div {
  display: grid;
  gap: 5px;
}

.overview-message-header span {
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.overview-message-header strong {
  color: #617384;
  font-size: 0.82rem;
  font-weight: 850;
}

.overview-message-reset {
  min-height: 36px;
  border: 1px solid #d8e1ea;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--postly-blue);
  background: #f8fafc;
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
}

.overview-message-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid #d8e1ea;
  border-radius: 8px;
  background: #ffffff;
}

.overview-message-toolgroup {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 8px;
  border-right: 1px solid #d8e1ea;
}

.overview-message-toolgroup:last-child {
  border-right: 0;
  padding-right: 0;
}

.overview-message-toolbar button {
  min-width: 38px;
  min-height: 34px;
  border: 1px solid #d8e1ea;
  border-radius: 7px;
  padding: 0 10px;
  color: #102f45;
  background: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.overview-message-toolbar button.active,
.overview-message-toolbar button:hover {
  color: #ffffff;
  border-color: #0f766e;
  background: #0f766e;
}

.overview-message-select {
  display: flex;
  align-items: center;
  gap: 6px;
}

.overview-message-select span {
  color: #617384;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.overview-message-select select {
  min-height: 34px;
  min-width: 112px;
  border-color: #d8e1ea;
  background: #ffffff;
  color: #102f45;
  font-size: 0.78rem;
  font-weight: 850;
}

.overview-message-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 58%) minmax(170px, 42%);
  min-height: 196px;
  max-width: 860px;
  overflow: hidden;
  border: 1px solid #d8e1ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(16, 47, 69, 0.08);
}

.overview-message-card::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 58%;
  width: 1px;
  background: #d9e3ec;
}

.overview-message-editor {
  min-height: 176px;
  padding: 34px 24px 18px;
  border: 0;
  border-radius: 0;
  color: #102f45;
  background: transparent;
  box-shadow: none;
  font-size: 0.94rem;
  font-weight: 650;
  line-height: 1.36;
  outline: none;
}

.overview-message-editor [data-size="small"] {
  font-size: 0.82rem;
}

.overview-message-editor [data-size="normal"] {
  font-size: 0.94rem;
}

.overview-message-editor [data-size="large"] {
  font-size: 1.08rem;
}

.overview-message-editor div {
  min-height: 1.2em;
  margin: 0 0 4px;
}

.overview-message-editor:focus {
  box-shadow: inset 0 0 0 3px rgba(120, 216, 207, 0.32);
}

.overview-message-mail-zone {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 6px;
  padding: 0 28px;
  color: #102f45;
  text-transform: uppercase;
}

.overview-message-mail-zone strong {
  font-size: 0.84rem;
  font-weight: 900;
}

.overview-message-mail-zone span {
  color: #617384;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.overview-media-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #d8e1ea;
  border-radius: 8px;
  background: #f8fafc;
}

.overview-media-panel[hidden] {
  display: none;
}

.overview-media-header,
.overview-media-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.overview-media-header div,
.overview-media-controls label {
  display: grid;
  gap: 5px;
  min-width: min(260px, 100%);
}

.overview-media-header span,
.overview-media-controls span {
  color: #617384;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.overview-media-header strong {
  color: #102f45;
  font-size: 0.96rem;
  line-height: 1.2;
}

.overview-media-upload-button,
.overview-media-controls button,
.overview-media-tile button {
  min-height: 36px;
  border: 1px solid var(--postly-blue);
  border-radius: 8px;
  padding: 0 12px;
  color: #ffffff;
  background: var(--postly-blue);
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
}

.overview-media-tile button:disabled {
  color: #7a8a98;
  border-color: #d8e1ea;
  background: #eef3f7;
  cursor: not-allowed;
}

.overview-media-controls select {
  min-width: min(360px, 100%);
}

.overview-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.overview-media-tile {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid #d8e1ea;
  border-radius: 8px;
  background: #ffffff;
}

.overview-media-tile.selected {
  border-color: #0f766e;
  box-shadow: 0 0 0 2px rgba(120, 216, 207, 0.42);
}

.overview-media-thumb {
  position: relative;
  min-width: 0;
  background: #eef3f7;
}

.overview-media-thumb img {
  width: 100%;
  aspect-ratio: 6 / 4;
  display: block;
  object-fit: cover;
}

.overview-media-main-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  max-width: calc(100% - 16px);
  padding: 5px 7px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 999px;
  color: #0f766e;
  background: rgba(240, 253, 250, 0.94);
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.overview-media-tile-body {
  min-width: 0;
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 10px;
}

.overview-media-tile strong {
  min-width: 0;
  overflow: hidden;
  color: #102f45;
  font-size: 0.82rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-media-tile-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.overview-media-tile button {
  min-width: 0;
  min-height: 34px;
  padding: 0 9px;
  border-color: #d8e1ea;
  color: var(--postly-blue);
  background: #ffffff;
  line-height: 1.05;
  white-space: nowrap;
}

.overview-media-tile-actions [data-media-main-url] {
  grid-column: 1 / -1;
}

.overview-media-tile button:first-child {
  color: #ffffff;
  border-color: #0f766e;
  background: #0f766e;
}

.overview-media-tile button:first-child:disabled {
  color: #0f766e;
  border-color: rgba(15, 118, 110, 0.25);
  background: rgba(120, 216, 207, 0.16);
}

.overview-media-remove-button {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 28px;
  height: 28px;
  min-height: 0 !important;
  display: grid;
  place-items: center;
  padding: 0 !important;
  border: 2px solid #ffffff !important;
  border-radius: 50% !important;
  color: #ffffff !important;
  background: #b42318 !important;
  box-shadow: 0 8px 18px rgba(16, 47, 69, 0.26);
  font-size: 0.72rem;
  font-weight: 950;
}

.overview-media-tile [data-media-main-url="__none__"] {
  color: #b42318;
  border-color: #f2c7c2;
  background: #fff7f6;
}

.overview-media-status {
  margin: 0;
  color: #375266;
  font-size: 0.84rem;
  font-weight: 800;
}

.overview-media-status[data-tone="success"] {
  color: #0f766e;
}

.overview-media-status[data-tone="error"] {
  color: #b42318;
}

.map-tab-surface {
  min-height: 0;
  display: block;
  place-items: unset;
  overflow: hidden;
}

.map-workbench {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  background: #ffffff;
}

.listing-map-panel {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-width: 0;
  background: #ffffff;
}

.listing-map-frame {
  position: relative;
  min-width: 0;
  min-height: 0;
}

.listing-map-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.listing-map-header.compact-header {
  justify-content: flex-end;
  padding: 12px 18px;
}

.listing-map-header p {
  margin: 0 0 5px;
  color: #08746d;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.listing-map-header h2 {
  margin: 0;
  color: var(--postly-blue-dark);
  font-size: 1.38rem;
  line-height: 1.12;
}

.listing-map-header span {
  flex: 0 0 auto;
  margin-top: 2px;
  padding: 8px 10px;
  border: 1px solid #d8e1ea;
  border-radius: 999px;
  color: #375266;
  background: #f8fafc;
  font-size: 0.78rem;
  font-weight: 850;
}

.listing-map {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 0;
  background: #f5f6f2;
}

.map-radius-control {
  position: absolute;
  left: 22px;
  top: 22px;
  z-index: 2;
  width: min(360px, calc(100% - 92px));
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(32, 56, 71, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 34px rgba(32, 56, 71, 0.14);
}

.map-radius-control-header,
.map-radius-control-range {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.map-radius-control span {
  color: #08746d;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.map-radius-control strong {
  color: #102f45;
  font-size: 0.88rem;
  font-weight: 900;
}

.map-radius-control input[type="range"] {
  width: 100%;
  height: 22px;
  margin: 0;
  padding: 0;
  accent-color: #08746d;
}

.map-radius-control.batch-mode input[type="range"],
.map-radius-control.batch-mode .map-radius-control-range {
  display: none;
}

.map-radius-control.batch-mode {
  border-color: rgba(8, 116, 109, 0.24);
  background: rgba(246, 251, 250, 0.96);
}

.map-radius-control-range span {
  color: #617384;
  font-size: 0.7rem;
  text-transform: none;
}

.map-radius-control .map-radius-status {
  margin: 0;
  color: #102f45;
  font-size: 0.8rem;
  font-weight: 850;
  line-height: 1.25;
}

.map-extra-address {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(32, 56, 71, 0.12);
}

.map-add-address-button {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #102f45;
  font: inherit;
  cursor: pointer;
}

.map-add-address-button:hover,
.map-add-address-button:active,
.map-add-address-button[aria-expanded="true"] {
  background: transparent;
  color: #102f45;
}

.map-add-address-button:focus-visible {
  border-radius: 6px;
  outline: 3px solid rgba(8, 116, 109, 0.22);
  outline-offset: 3px;
}

.map-add-address-button span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: #08746d;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  text-transform: none;
}

.map-add-address-button strong {
  color: #102f45;
  font-size: 0.8rem;
}

.map-add-address-form {
  display: grid;
  gap: 7px;
}

.map-add-address-form[hidden] {
  display: none;
}

.map-add-address-form label {
  color: #08746d;
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.map-add-address-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.map-add-address-search input {
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(32, 56, 71, 0.18);
  border-radius: 6px;
  color: #102f45;
  background: #ffffff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 750;
}

.map-add-address-search button,
.map-add-address-result button,
.map-added-address-item button {
  min-height: 34px;
  border: 1px solid rgba(32, 56, 71, 0.16);
  border-radius: 6px;
  background: #ffffff;
  color: var(--postly-blue);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
}

.map-add-address-search button {
  padding: 0 11px;
}

.map-add-address-results,
.map-added-address-list {
  display: grid;
  gap: 6px;
}

.map-add-address-results[hidden],
.map-added-address-list[hidden] {
  display: none;
}

.map-add-address-result,
.map-added-address-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px;
  border: 1px solid rgba(32, 56, 71, 0.12);
  border-radius: 6px;
  background: #f8fafc;
}

.map-add-address-result span,
.map-added-address-item span {
  min-width: 0;
  display: grid;
  gap: 2px;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-transform: none;
}

.map-add-address-result strong,
.map-added-address-item strong {
  overflow: hidden;
  color: #102f45;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.map-add-address-result small,
.map-added-address-item small {
  overflow: hidden;
  color: #617384;
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.map-add-address-result button,
.map-added-address-item button {
  padding: 0 10px;
}

.map-add-address-result button:disabled {
  color: #617384;
  cursor: default;
}

.map-added-address-item button {
  width: 34px;
  padding: 0;
  color: #d97706;
}

.map-add-address-status {
  margin: 0;
  color: #617384;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.25;
}

.map-add-address-status[data-tone="error"] {
  color: #b42318;
}

.map-add-address-status[data-tone="success"] {
  color: #08746d;
}

.listing-map.can-drag-pan .maplibregl-canvas {
  cursor: grab;
}

.listing-map.can-drag-pan .maplibregl-canvas:active {
  cursor: grabbing;
}

.listing-map .maplibregl-ctrl-attrib {
  display: none;
}

.listing-map .maplibregl-ctrl-top-right {
  top: 12px;
  right: 12px;
}

.listing-map .maplibregl-ctrl-group {
  overflow: hidden;
  border: 1px solid rgba(32, 56, 71, 0.18);
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(32, 56, 71, 0.12);
}

.listing-map .maplibregl-ctrl-group button,
.listing-map .maplibregl-ctrl-group button:hover {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 0;
  background-color: #ffffff;
  color: #203847;
}

.listing-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  color: #617384;
  font-size: 0.86rem;
  font-weight: 850;
}

.listing-map-legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border-radius: 999px;
  vertical-align: -1px;
}

.listing-map-legend .target-dot {
  position: relative;
  width: 16px;
  height: 16px;
  border: 2px solid var(--postly-blue);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 3px rgba(6, 31, 134, 0.18);
}

.listing-map-legend .target-dot::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 4px;
  width: 8px;
  height: 7px;
  border-radius: 1px;
  background: var(--postly-blue);
  clip-path: polygon(50% 0, 100% 42%, 100% 100%, 0 100%, 0 42%);
}

.listing-map-legend .radius-dot {
  background: rgba(32, 56, 71, 0.08);
  box-shadow: inset 0 0 0 2px rgba(6, 31, 134, 0.58);
}

.listing-map-legend .excluded-dot {
  background: #aebbc4;
}

.listing-map-legend .owner-heavy-dot,
.audience-map-key .owner-heavy-dot {
  background: #0067ff;
}

.listing-map-legend .renter-heavy-dot,
.audience-map-key .renter-heavy-dot {
  background: #ff1f1f;
}

.listing-map-legend .mixed-dot,
.audience-map-key .mixed-dot {
  background: #bea25a;
}

.audience-map-key .value-dot {
  background: #08746d;
}

.audience-map-key .limit-dot {
  background: #375266;
}

.maplibregl-popup-content {
  border-radius: 8px;
  padding: 10px 12px;
  color: #102f45;
  box-shadow: 0 14px 36px rgba(20, 57, 77, 0.2);
}

.listing-map-popup {
  display: grid;
  gap: 3px;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.25;
}

.listing-map-popup span:first-child {
  color: var(--postly-blue-dark);
  font-weight: 850;
}

.audience-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  overflow: hidden;
  background: #ffffff;
}

.audience-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid #e2e8f0;
}

.audience-panel-header p,
.audience-controls span {
  margin: 0 0 5px;
  color: #08746d;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.audience-panel-header h2 {
  margin: 0;
  color: var(--postly-blue-dark);
  font-size: 1.18rem;
  line-height: 1.12;
}

.audience-panel-header > span {
  flex: 0 0 auto;
  margin-top: 1px;
  padding: 7px 9px;
  border: 1px solid #d8e1ea;
  border-radius: 999px;
  color: #375266;
  background: #f8fafc;
  font-size: 0.74rem;
  font-weight: 850;
}

.audience-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid #e7edf3;
  background: #fbfcfd;
}

.audience-stats div {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  background: #ffffff;
}

.audience-stats span {
  color: #617384;
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.audience-stats strong {
  min-width: 0;
  color: #102f45;
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.audience-controls {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-bottom: 1px solid #e7edf3;
}

.audience-value-filter {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  background: #fbfcfd;
}

.audience-value-filter.is-disabled {
  opacity: 0.68;
}

.audience-value-filter-header,
.audience-value-range {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.audience-value-filter-header span {
  margin: 0;
}

.audience-value-filter-header strong {
  color: #102f45;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.15;
  text-align: right;
}

.audience-value-filter input[type="range"] {
  width: 100%;
  height: 22px;
  margin: 0;
  accent-color: #08746d;
}

.audience-value-range span {
  margin: 0;
  color: #617384;
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: none;
}

.audience-controls label,
.property-checklist,
.occupancy-checklist {
  display: grid;
  gap: 8px;
}

.property-checklist,
.occupancy-checklist {
  margin: 0;
  padding: 0;
  border: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.property-checklist legend,
.occupancy-checklist legend {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  color: #08746d;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.property-checklist label,
.occupancy-checklist label {
  min-height: 34px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  color: #102f45;
  background: #ffffff;
  font-size: 0.82rem;
  font-weight: 850;
}

.property-checklist input,
.occupancy-checklist input {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  accent-color: #08746d;
}

.audience-control-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.audience-control-buttons button {
  height: 38px;
  border: 1px solid #d8e1ea;
  border-radius: 8px;
  color: #375266;
  background: #ffffff;
  font-size: 0.82rem;
  font-weight: 850;
}

.audience-control-buttons button:hover {
  color: var(--postly-blue);
  background: #eef3fb;
}

.audience-control-buttons button:disabled,
.audience-control-buttons button:disabled:hover {
  color: #7a8a98;
  background: #eef3f7;
  cursor: not-allowed;
}

.audience-privacy-note {
  margin: 0;
  padding: 10px 11px;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  color: #375266;
  background: #f8fafc;
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.35;
}

.audience-map-key {
  display: grid;
  gap: 8px;
  padding: 12px 14px 14px;
  color: #617384;
  font-size: 0.78rem;
  font-weight: 850;
}

.audience-map-key span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.audience-map-key i {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 999px;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 3px rgba(32, 56, 71, 0.12);
}

.postgrid-tab-surface {
  min-height: 0;
  display: block;
  place-items: unset;
  overflow: hidden;
}

.postgrid-panel {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  background: #ffffff;
}

.postgrid-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.postgrid-header p,
.postgrid-card-heading p {
  margin: 0 0 5px;
  color: #08746d;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.postgrid-header h2 {
  margin: 0;
  color: var(--postly-blue-dark);
  font-size: 1.38rem;
  line-height: 1.12;
}

.postgrid-header > span,
.postgrid-card-heading > span {
  flex: 0 0 auto;
  margin-top: 2px;
  padding: 8px 10px;
  border: 1px solid #d8e1ea;
  border-radius: 999px;
  color: #375266;
  background: #f8fafc;
  font-size: 0.78rem;
  font-weight: 850;
}

.postgrid-body {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
}

.postgrid-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 18px;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  background: #ffffff;
}

.postgrid-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 14px;
}

.postgrid-card-heading h3 {
  margin: 0;
  color: #102f45;
  font-size: 1.05rem;
  line-height: 1.16;
}

.postcard-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding-bottom: 2px;
}

.postcard-editor-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.postcard-editor-toolbar-actions button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #d8e1ea;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.postcard-layout-edit-button {
  color: #ffffff;
  border-color: var(--postly-blue);
  background: var(--postly-blue);
  box-shadow: 0 8px 18px rgba(6, 31, 134, 0.18);
}

.postcard-layout-edit-button::before {
  content: "";
  width: 13px;
  height: 13px;
  background:
    radial-gradient(circle, currentColor 1.6px, transparent 2.2px) 0 0 / 6.5px 6.5px,
    radial-gradient(circle, currentColor 1.6px, transparent 2.2px) 3.25px 3.25px / 6.5px 6.5px;
}

.postcard-layout-edit-button[aria-pressed="true"] {
  border-color: #0f766e;
  background: #0f766e;
}

.postcard-layout-reset-button {
  color: var(--postly-blue);
  background: #ffffff;
}

.postcard-editor-toolbar-actions button[hidden] {
  display: none;
}

.postcard-artwork-toolbar {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(190px, 1fr) 104px auto;
  gap: 8px;
  align-items: end;
  padding: 12px;
  border: 1px solid #d8e1ea;
  border-radius: 8px;
  background: #f8fafc;
}

.postcard-artwork-toolbar[hidden] {
  display: none;
}

.postcard-artwork-toolbar label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.postcard-artwork-toolbar span {
  color: #617384;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.postcard-artwork-toolbar select {
  min-width: 0;
  height: 38px;
  border: 1px solid #d8e1ea;
  border-radius: 8px;
  background: #ffffff;
  color: #102f45;
  font-size: 0.82rem;
  font-weight: 850;
}

.postcard-artwork-toolbar button {
  min-height: 38px;
  border: 1px solid #d8e1ea;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--postly-blue);
  background: #ffffff;
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
}

.postcard-artwork-toolbar button:first-of-type {
  color: #ffffff;
  border-color: var(--postly-blue);
  background: var(--postly-blue);
}

.postcard-artwork-toolbar button:disabled {
  color: #7a8a98;
  background: #eef3f7;
  cursor: not-allowed;
}

.postcard-proof-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.postcard-proof-actions span,
.postcard-proof-actions a,
.postcard-proof-actions button {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid #d8e1ea;
  color: #375266;
  background: #f8fafc;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
}

.postcard-proof-actions button {
  cursor: pointer;
}

.postcard-proof-actions a {
  color: #ffffff;
  border-color: var(--postly-blue);
  background: var(--postly-blue);
}

.postcard-proof-actions a[aria-disabled="true"] {
  color: #7a8a98;
  border-color: #d8e1ea;
  background: #eef3f7;
  cursor: not-allowed;
}

.postcard-proof-actions button[hidden] {
  display: none;
}

.postcard-preview-card {
  grid-column: 1 / -1;
  align-self: start;
  height: auto;
  min-height: 0;
  grid-template-rows: auto;
}

.postcard-preview-grid {
  min-height: 0;
  height: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.postcard-preview-side {
  min-width: 0;
  display: grid;
  gap: 8px;
  align-content: start;
}

.postcard-side-label {
  color: #617384;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.postcard-proof-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 6 / 4;
  min-width: 0;
}

.postcard-preview-card.layout-editing .postcard-proof-stage {
  box-shadow: 0 0 0 3px rgba(120, 216, 207, 0.34), 0 18px 36px rgba(16, 47, 69, 0.16);
}

.postcard-proof-image,
.postcard-proof-placeholder {
  width: 100%;
  aspect-ratio: 6 / 4;
  display: block;
  border: 1px solid #cfdbe6;
  border-radius: 0;
  background: #ffffff;
  box-shadow: 0 26px 58px rgba(20, 57, 77, 0.22), 0 6px 18px rgba(20, 57, 77, 0.14);
}

.postcard-proof-image {
  object-fit: contain;
}

.postcard-proof-stage .postcard-proof-image,
.postcard-proof-stage .postcard-proof-placeholder {
  height: 100%;
}

.postcard-proof-placeholder {
  display: grid;
  place-items: center;
  padding: 18px;
  color: #617384;
  font-size: 0.88rem;
  font-weight: 850;
  text-align: center;
}

.postcard-proof-image[hidden],
.postcard-proof-placeholder[hidden] {
  display: none;
}

.postcard-smart-guides {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.postcard-smart-guide {
  position: absolute;
  display: block;
  color: #0f766e;
  filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.92));
}

.postcard-smart-guide[hidden] {
  display: none;
}

.postcard-smart-guide-vertical {
  top: 0;
  bottom: 0;
  left: var(--guide-left, 50%);
  width: 0;
  border-left: 2px solid #0f766e;
}

.postcard-smart-guide-horizontal {
  left: 0;
  right: 0;
  top: var(--guide-top, 50%);
  height: 0;
  border-top: 2px solid #0f766e;
}

.postcard-smart-guide::after {
  position: absolute;
  content: attr(data-guide-label);
  padding: 3px 6px;
  border: 1px solid rgba(15, 118, 110, 0.25);
  border-radius: 6px;
  color: #0f766e;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 14px rgba(16, 47, 69, 0.14);
  font-size: 0.66rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.postcard-smart-guide-vertical::after {
  top: 8px;
  left: 7px;
}

.postcard-smart-guide-horizontal::after {
  top: 7px;
  right: 8px;
}

.postcard-editor-handle {
  position: absolute;
  left: var(--editor-left, 0);
  top: var(--editor-top, 0);
  z-index: 3;
  width: var(--editor-width, 0);
  height: var(--editor-height, 0);
  padding: 0;
  border: 3px solid #061f86;
  border-radius: 3px;
  outline: 2px dashed rgba(255, 255, 255, 0.98);
  outline-offset: -7px;
  background: rgba(6, 31, 134, 0.1);
  box-shadow: 0 0 0 2px rgba(120, 216, 207, 0.94), 0 16px 34px rgba(16, 47, 69, 0.32);
  cursor: grab;
  touch-action: none;
}

.postcard-editor-handle::before,
.postcard-editor-handle::after {
  position: absolute;
  content: "";
}

.postcard-editor-handle::before {
  top: -18px;
  right: -18px;
  width: 34px;
  height: 34px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #061f86;
  box-shadow: 0 9px 22px rgba(16, 47, 69, 0.35);
}

.postcard-editor-handle::after {
  top: -10px;
  right: -10px;
  width: 18px;
  height: 18px;
  background:
    radial-gradient(circle, #ffffff 2px, transparent 2.6px) 0 0 / 9px 9px,
    radial-gradient(circle, #ffffff 2px, transparent 2.6px) 4.5px 4.5px / 9px 9px;
}

.postcard-editor-handle:active,
.postcard-editor-handle.dragging,
.postcard-editor-handle:focus-visible {
  cursor: grabbing;
  border-color: #0f766e;
  background: rgba(120, 216, 207, 0.24);
  outline-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.45), 0 18px 38px rgba(16, 47, 69, 0.34);
}

.postcard-editor-handle:hover {
  background: rgba(6, 31, 134, 0.16);
}

.postcard-photo-handle {
  border-color: #0f766e;
  background: rgba(15, 118, 110, 0.12);
}

.postcard-photo-handle::before,
.postcard-photo-handle::after {
  display: none;
}

.postcard-photo-handle.selected {
  border-color: #061f86;
  box-shadow: 0 0 0 3px rgba(120, 216, 207, 0.78), 0 18px 38px rgba(16, 47, 69, 0.34);
}

.postcard-photo-remove-control {
  position: absolute;
  left: calc(var(--editor-left, 0%) - 11px);
  top: calc(var(--editor-top, 0%) - 11px);
  z-index: 5;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid #ffffff;
  border-radius: 50%;
  color: #ffffff;
  background: #b42318;
  box-shadow: 0 8px 20px rgba(16, 47, 69, 0.32);
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.postcard-photo-remove-control:hover,
.postcard-photo-remove-control:focus-visible {
  background: #8f1d14;
  outline: 2px solid rgba(120, 216, 207, 0.95);
  outline-offset: 2px;
}

.postcard-photo-resize-control {
  position: absolute;
  left: calc(var(--editor-left, 0%) + var(--editor-width, 0%) - 14px);
  top: calc(var(--editor-top, 0%) + var(--editor-height, 0%) - 14px);
  z-index: 5;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid #ffffff;
  border-radius: 50%;
  color: #ffffff;
  background: #061f86;
  box-shadow: 0 9px 22px rgba(16, 47, 69, 0.35);
  cursor: nwse-resize;
  touch-action: none;
}

.postcard-photo-resize-control::before {
  content: "";
  width: 16px;
  height: 16px;
  background:
    radial-gradient(circle, #ffffff 2px, transparent 2.8px) 0 0 / 8px 8px,
    radial-gradient(circle, #ffffff 2px, transparent 2.8px) 4px 4px / 8px 8px;
}

.postcard-photo-resize-control:hover,
.postcard-photo-resize-control:focus-visible,
.postcard-photo-resize-control.dragging {
  background: #0f766e;
  outline: 2px solid rgba(120, 216, 207, 0.95);
  outline-offset: 2px;
}

.postcard-editor-handle[hidden] {
  display: none;
}

.postcard-photo-remove-control[hidden],
.postcard-photo-resize-control[hidden] {
  display: none;
}

.postcard-face {
  --postcard-bleed-x: 2%;
  --postcard-bleed-y: 2.941176%;
  --postcard-safe-x: 4%;
  --postcard-safe-y: 5.882353%;
  --postgrid-return-x: 2%;
  --postgrid-return-y: 2.941176%;
  --postgrid-return-w: 33.008%;
  --postgrid-return-h: 37.058824%;
  --postgrid-receiver-x: 59.6%;
  --postgrid-receiver-y: 2.941176%;
  --postgrid-receiver-w: 38.4%;
  --postgrid-receiver-h: 94.117647%;
  position: relative;
  aspect-ratio: 6 / 4;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #cfdbe6;
  border-radius: 0;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(20, 57, 77, 0.12);
}

.postcard-front {
  background:
    linear-gradient(135deg, rgba(6, 31, 134, 0.96), rgba(4, 18, 85, 0.92)),
    radial-gradient(circle at 74% 24%, rgba(255, 255, 255, 0.16), transparent 32%);
  color: #ffffff;
}

.postcard-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.postcard-front-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.22);
}

.postcard-front-inner {
  position: absolute;
  inset: calc(var(--postcard-safe-y) + 10px) calc(var(--postcard-safe-x) + 10px);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 16px;
}

.postcard-brand {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.postcard-brand img,
.postcard-back-message img {
  display: block;
  width: 96px;
  height: auto;
}

.postcard-back-message img {
  width: 74px;
}

.postcard-brand strong {
  color: #ffffff;
  font-size: 1.22rem;
  line-height: 1;
  font-weight: 900;
}

.postcard-brand span {
  display: none;
}

.postcard-front-copy {
  display: grid;
  width: min(78%, 420px);
  gap: 11px;
  justify-items: center;
  min-width: 0;
  text-align: center;
}

.postcard-front-copy p {
  margin: 0;
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  color: #78d8cf;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.postcard-front-copy p::before,
.postcard-front-copy p::after {
  content: "";
  height: 1px;
  background: rgba(255, 255, 255, 0.82);
}

.postcard-front-copy h4 {
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 13px 18px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  background: rgba(0, 0, 0, 0.68);
  color: #ffffff;
  display: -webkit-box;
  overflow: hidden;
  font-size: clamp(1.15rem, 1.48vw, 1.62rem);
  line-height: 1.04;
  font-weight: 900;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.34);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.postcard-front-copy > span {
  display: none;
}

.postcard-front-copy dl {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.postcard-front-copy dl div {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(3, 16, 62, 0.52);
  backdrop-filter: blur(3px);
}

.postcard-front-copy dt,
.postcard-back-message dt {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.64rem;
  font-weight: 850;
  text-transform: uppercase;
}

.postcard-front-copy dd,
.postcard-back-message dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 0.85rem;
  font-weight: 850;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.postcard-back {
  display: block;
  padding: 0;
  color: #102f45;
}

.postcard-back::before {
  content: "";
  position: absolute;
  top: 8%;
  bottom: 8%;
  left: 58%;
  width: 1px;
  background: #d9e3ec;
}

.postcard-back-message {
  position: absolute;
  left: calc(var(--postcard-safe-x) + 10px);
  top: 42%;
  bottom: calc(var(--postcard-safe-y) + 10px);
  z-index: 3;
  width: 47%;
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.postcard-back-message p {
  margin: 0;
  color: #263f52;
  font-size: 0.68rem;
  font-weight: 760;
  line-height: 1.22;
  white-space: pre-wrap;
}

.postcard-back-message dl {
  display: grid;
  gap: 3px;
  margin: 0;
}

.postcard-back-message dl div {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 4px;
  align-items: baseline;
}

.postcard-back-message dt {
  color: #617384;
}

.postcard-back-message dd {
  overflow: visible;
  font-size: 0.56rem;
  line-height: 1.12;
  text-overflow: clip;
  white-space: normal;
}

.postcard-return-zone,
.postcard-receiver-zone {
  position: absolute;
  z-index: 2;
  border: 0;
  background: transparent;
}

.postcard-return-zone {
  display: none;
  left: var(--postgrid-return-x);
  top: var(--postgrid-return-y);
  width: var(--postgrid-return-w);
  height: var(--postgrid-return-h);
}

.postcard-return-zone span,
.postcard-return-zone small,
.postcard-receiver-zone span,
.postcard-receiver-zone small {
  color: #617384;
  font-size: 0.54rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.postcard-return-zone strong {
  color: #102f45;
  font-size: 0.62rem;
  font-weight: 900;
}

.postcard-receiver-zone {
  left: var(--postgrid-receiver-x);
  top: var(--postgrid-receiver-y);
  width: var(--postgrid-receiver-w);
  height: var(--postgrid-receiver-h);
}

.postcard-address-zone {
  position: absolute;
  z-index: 1;
  left: 9%;
  right: 9%;
  top: 43%;
  display: grid;
  gap: 5px;
  min-height: 68px;
  padding: 0;
  border: 0;
  background: transparent;
}

.postcard-receiver-zone .postcard-address-zone {
  left: 9%;
  right: 9%;
  top: 43%;
}

.postcard-address-zone span,
.postcard-address-zone em,
.postcard-address-zone small {
  color: #617384;
  font-size: 0.56rem;
  font-weight: 850;
  text-transform: uppercase;
}

.postcard-address-zone em {
  max-width: 132px;
  color: #7b3f42;
  font-style: normal;
  line-height: 1.1;
}

.postcard-address-zone strong {
  color: #102f45;
  font-size: 0.74rem;
  line-height: 1.1;
  text-transform: uppercase;
}

.postcard-indicia {
  position: absolute;
  top: 8%;
  left: 11.25%;
  right: auto;
  width: 77.5%;
  height: 20.5%;
  display: grid;
  place-items: center;
  border: 1px solid #dce5ee;
  border-radius: 3px;
  color: #617384;
  background: #f8fafc;
  font-size: 0.52rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}

.postcard-receiver-zone .postcard-indicia {
  top: 8%;
  left: 11.25%;
  right: auto;
  width: 77.5%;
  height: 20.5%;
  padding: 0;
}

.workflow-tab-surface {
  display: grid;
  min-height: 0;
  align-items: start;
  justify-items: center;
  align-content: start;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
}

.workflow-card {
  width: min(860px, 100%);
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(20, 57, 77, 0.08);
}

.payment-stack {
  width: min(960px, 100%);
  display: grid;
  gap: 18px;
  padding-bottom: 24px;
}

.payment-stack .workflow-card {
  width: 100%;
}

.payment-card-heading {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.payment-mode-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #bde5df;
  border-radius: 999px;
  color: #08746d;
  background: #e9f8f5;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.payment-mode-pill[data-mode="live"] {
  border-color: #f4c7c7;
  color: #9f1239;
  background: #fff1f2;
}

.payment-mode-pill[data-mode="missing"] {
  border-color: #d8e1ea;
  color: #617384;
  background: #eef3f7;
}

.workflow-card-heading {
  display: grid;
  gap: 4px;
}

.workflow-card-heading p {
  margin: 0;
  color: #08746d;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.workflow-card-heading h2 {
  margin: 0;
  color: var(--postly-blue-dark);
  font-size: 1.8rem;
  line-height: 1.08;
}

.live-order-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.live-order-summary div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  background: #f8fafc;
}

.live-order-summary span,
.postgrid-order-item span {
  color: #617384;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.live-order-summary strong,
.postgrid-order-item strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #102f45;
  font-size: 0.96rem;
  font-weight: 850;
  line-height: 1.25;
}

.stripe-test-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  background: #f8fafc;
}

.stripe-test-card span {
  color: #617384;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.stripe-test-card strong {
  min-width: 0;
  color: #102f45;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.stripe-test-card small {
  color: #617384;
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1.35;
}

.live-order-note,
.live-order-status {
  margin: 0;
  color: #375266;
  font-size: 0.9rem;
  font-weight: 760;
  line-height: 1.4;
}

.live-order-status[data-tone="success"] {
  color: #08746d;
}

.live-order-status[data-tone="error"] {
  color: var(--postly-error);
}

.live-order-confirm {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  background: #f8fafc;
  color: #102f45;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
}

.live-order-confirm input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: #08746d;
  flex: 0 0 auto;
}

.live-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.live-order-actions button,
.live-order-actions a,
.postgrid-order-item button {
  min-height: 42px;
  border: 1px solid var(--postly-blue);
  border-radius: 8px;
  padding: 0 16px;
  color: #ffffff;
  background: var(--postly-blue);
  font-size: 0.88rem;
  font-weight: 850;
  text-decoration: none;
}

.live-order-actions a {
  display: inline-flex;
  align-items: center;
  color: var(--postly-blue);
  background: #ffffff;
}

.live-order-actions button.secondary-action {
  color: var(--postly-blue);
  background: #ffffff;
}

.live-order-actions button:disabled,
.live-order-actions a[aria-disabled="true"],
.postgrid-order-item button:disabled {
  color: #7a8a98;
  background: #eef3f7;
  border-color: #d8e1ea;
  cursor: not-allowed;
}

.postgrid-order-list {
  display: grid;
  gap: 10px;
}

.postgrid-order-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  background: #f8fafc;
}

.postgrid-order-item div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.postgrid-order-item div:last-child {
  justify-items: end;
}

.postgrid-order-item small,
.postgrid-order-item em {
  color: #617384;
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 780;
  line-height: 1.35;
}

.postgrid-specs {
  display: grid;
  gap: 10px;
  margin: 0;
}

.postgrid-specs div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}

.postgrid-specs dt,
.postgrid-select span,
.postgrid-lookup-form span {
  color: #617384;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.postgrid-specs dd {
  min-width: 0;
  margin: 0;
  color: #102f45;
  font-size: 0.92rem;
  font-weight: 760;
  line-height: 1.3;
}

.postgrid-select {
  display: grid;
  gap: 8px;
}

.postgrid-select select,
.postgrid-lookup-form input {
  height: 42px;
  border-color: #d8e1ea;
  color: #102f45;
  background-color: #ffffff;
  font-size: 0.9rem;
  font-weight: 750;
}

.postgrid-note,
.postgrid-status {
  margin: 0;
  color: #375266;
  font-size: 0.86rem;
  font-weight: 760;
  line-height: 1.42;
}

.postgrid-status[data-tone="success"] {
  color: #08746d;
}

.postgrid-status[data-tone="error"] {
  color: var(--postly-error);
}

.postgrid-lookup-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
}

.postgrid-lookup-form label {
  display: grid;
  gap: 8px;
}

.postgrid-lookup-form button {
  align-self: end;
  min-height: 42px;
  height: 42px;
  border: 1px solid var(--postly-blue);
  border-radius: 8px;
  color: #ffffff;
  background: var(--postly-blue);
  font-size: 0.88rem;
  font-weight: 850;
}

.postgrid-payload,
.postgrid-result {
  min-height: 180px;
  max-height: 280px;
  margin: 0;
  overflow: auto;
  padding: 14px;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  color: #102f45;
  background: #f8fafc;
  font: 700 0.82rem/1.5 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
}

.postgrid-result {
  min-height: 122px;
  max-height: 220px;
}

.stripe-result {
  max-height: 220px;
  margin: 0;
  overflow: auto;
  padding: 14px;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  color: #102f45;
  background: #f8fafc;
  display: grid;
  gap: 8px;
}

.stripe-embedded-checkout {
  min-height: 520px;
  overflow: hidden;
  position: relative;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  background: #ffffff;
}

.stripe-embedded-checkout[hidden] {
  display: none;
}

.stripe-embedded-checkout[data-loading="true"]::before {
  position: absolute;
  inset: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(6, 31, 134, 0.22);
  border-radius: 8px;
  color: #375266;
  background: rgba(248, 250, 252, 0.94);
  font-size: 0.9rem;
  font-weight: 850;
  content: "Loading Stripe checkout...";
  pointer-events: none;
}

.stripe-result div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}

.stripe-result span {
  color: #617384;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.stripe-result strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #102f45;
  font-size: 0.9rem;
  font-weight: 820;
  line-height: 1.35;
}

.postgrid-result[hidden],
.stripe-result[hidden] {
  display: none;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.empty-state h2 {
  margin: 0;
  color: var(--postly-blue-dark);
  font-size: 2.6rem;
  line-height: 1;
}

.desktop-only-message {
  display: none;
}

.duplicate-dialog {
  width: min(420px, calc(100vw - 40px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}

.duplicate-dialog::backdrop {
  background: rgba(4, 18, 85, 0.28);
}

.duplicate-dialog-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(20, 57, 77, 0.24);
}

.duplicate-kicker {
  margin: 0 0 6px;
  color: #08746d;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.duplicate-dialog h2 {
  margin: 0;
  color: var(--postly-blue-dark);
  font-size: 1.45rem;
  line-height: 1.12;
}

.duplicate-copy,
.duplicate-meta,
.duplicate-rule {
  margin: 0;
  color: #375266;
  font-size: 0.95rem;
  line-height: 1.45;
}

.duplicate-rule {
  padding: 10px 12px;
  border: 1px solid #d8e1ea;
  border-radius: 8px;
  color: #31495a;
  background: #f8fafc;
  font-size: 0.86rem;
  font-weight: 800;
}

.duplicate-copy strong {
  color: #102f45;
}

.duplicate-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.duplicate-actions button {
  min-height: 42px;
  border: 1px solid #d8e1ea;
  border-radius: 8px;
  background: #ffffff;
  color: #375266;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.duplicate-actions button:last-child {
  color: #ffffff;
  background: var(--postly-blue);
  border-color: var(--postly-blue);
}

.duplicate-actions button:disabled,
.duplicate-actions button:disabled:hover {
  color: #7a8a98;
  background: #eef3f7;
  border-color: #d8e1ea;
  cursor: not-allowed;
}

.duplicate-actions button:hover {
  color: var(--postly-blue);
  background: #eef3fb;
}

.duplicate-actions button:last-child:hover {
  color: #ffffff;
  background: var(--postly-blue-dark);
}

@media (max-width: 520px) {
  .shell {
    align-items: stretch;
    padding: 0;
  }

  .login-panel {
    width: 100%;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    padding: 34px 24px;
    box-shadow: none;
  }

  .brand-row {
    margin-bottom: 28px;
  }

  .wordmark {
    width: 144px;
  }
}

@media (max-width: 880px) {
  html,
  body {
    min-height: 100%;
  }

  .workspace-body {
    overflow: auto;
    background: #f5f7fb;
  }

  .desktop-only-message {
    display: none;
  }

  .workspace-shell {
    max-width: 100vw;
    min-height: 100svh;
    height: auto;
    display: block;
    overflow-x: hidden;
    overflow-y: visible;
    background: #f5f7fb;
  }

  .workspace-body.sidebar-open {
    overflow: hidden;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: rgba(4, 18, 85, 0.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
  }

  .workspace-shell.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .campaign-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: min(86vw, 340px);
    height: 100dvh;
    max-height: 100dvh;
    padding: 16px 12px;
    border-right: 1px solid #dce5ee;
    box-shadow: 18px 0 46px rgba(20, 57, 77, 0.18);
    transform: translateX(-104%);
    transition: transform 180ms ease;
  }

  .workspace-shell.sidebar-open .campaign-sidebar {
    transform: translateX(0);
  }

  .workspace-main {
    max-width: 100vw;
    min-height: 100svh;
    display: block;
    overflow-x: hidden;
    overflow-y: visible;
  }

  .campaign-workspace {
    max-width: 100vw;
    min-height: 100svh;
    height: auto;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 12px;
    overflow-x: hidden;
    overflow-y: visible;
    padding: 14px 12px 18px;
  }

  .settings-workspace {
    max-width: 100vw;
    min-height: 100svh;
    height: auto;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
    overflow-x: hidden;
    overflow-y: visible;
    padding: 14px 12px 18px;
  }

  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
    padding-right: 0;
  }

  .settings-list div {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

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

  .settings-back-link {
    display: none;
  }

  .campaign-heading {
    position: sticky;
    top: 0;
    z-index: 20;
    align-items: center;
    margin: -14px -12px 0;
    padding: 12px;
    border-bottom: 1px solid #dce5ee;
    background: rgba(245, 247, 251, 0.94);
    backdrop-filter: blur(12px);
  }

  .campaign-heading p {
    margin-bottom: 3px;
    font-size: 0.68rem;
  }

  .campaign-heading h1 {
    max-width: calc(100vw - 116px);
    overflow: hidden;
    font-size: 1.22rem;
    line-height: 1.12;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .campaign-heading-actions {
    gap: 8px;
  }

  .status-pill {
    display: none;
  }

  .mobile-menu-button {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: auto;
    min-width: 68px;
    height: 38px;
    padding: 0 13px;
    border: 1px solid #d8e1ea;
    border-radius: 8px;
    color: #102f45;
    background: #ffffff;
    font-size: 0.84rem;
    font-weight: 850;
    box-shadow: 0 8px 18px rgba(20, 57, 77, 0.08);
  }

  .mobile-menu-button:hover {
    color: #ffffff;
    background: var(--postly-blue);
  }

  .workspace-tabs {
    width: auto;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 5px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .workspace-tabs::-webkit-scrollbar {
    display: none;
  }

  .tab-button {
    flex: 0 0 auto;
    min-width: 92px;
    min-height: 40px;
    padding: 0 14px;
    scroll-snap-align: start;
    font-size: 0.86rem;
  }

  .tab-stack {
    overflow: visible;
  }

  .tab-surface {
    max-width: 100%;
    min-height: calc(100svh - 124px);
    height: auto;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(20, 57, 77, 0.08);
  }

  .overview-tab-surface,
  .map-tab-surface,
  .postgrid-tab-surface {
    overflow: hidden;
  }

  .listing-overview {
    height: auto;
  }

  .listing-overview-header,
  .listing-map-header,
  .postgrid-header {
    align-items: center;
    padding: 16px;
  }

  .listing-map-header,
  .audience-panel-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .listing-overview-header h2,
  .listing-map-header h2,
  .postgrid-header h2 {
    font-size: 1.14rem;
  }

  .listing-overview-header span,
  .listing-map-header span,
  .postgrid-header > span {
    flex: 0 1 auto;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .audience-panel-header > span {
    flex: 0 1 auto;
    justify-self: start;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .listing-map-header span {
    justify-self: start;
    max-width: 100%;
  }

  .overview-header-actions,
  .overview-form-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .overview-save-button {
    min-width: 72px;
    height: 34px;
  }

  .overview-empty {
    min-height: 320px;
    padding: 34px 18px;
  }

  .overview-empty h3 {
    font-size: 1.28rem;
  }

  .overview-fields {
    max-height: none;
    grid-template-columns: 1fr;
    overflow: visible;
    padding: 16px;
  }

  .home-drop-info-heading {
    display: grid;
  }

  .home-drop-info-heading strong {
    text-align: left;
  }

  .home-drop-info-grid {
    grid-template-columns: 1fr;
  }

  .overview-field-wide {
    grid-column: auto;
  }

  .overview-media-header,
  .overview-media-controls {
    align-items: stretch;
    flex-direction: column;
  }

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

  .overview-media-controls label,
  .overview-media-controls select,
  .overview-media-upload-button,
  .overview-media-controls button {
    width: 100%;
  }

  .map-workbench {
    height: auto;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    overflow: visible;
  }

  .listing-map-panel {
    height: auto;
    border-right: 0;
    border-bottom: 0;
  }

  .listing-map {
    height: min(54svh, 420px);
    min-height: 300px;
  }

  .map-radius-control {
    left: 14px;
    top: 14px;
    width: min(320px, calc(100% - 74px));
    padding: 10px;
  }

  .map-add-address-search {
    grid-template-columns: minmax(0, 1fr);
  }

  .listing-map-legend {
    gap: 9px 13px;
    font-size: 0.78rem;
  }

  .audience-panel {
    height: auto;
    max-height: none;
    display: grid;
    grid-template-rows: auto auto auto auto;
  }

  .audience-panel-header {
    padding: 16px;
  }

  .audience-stats {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
  }

  .audience-stats div {
    padding: 9px;
  }

  .audience-controls {
    padding: 12px;
  }

  .workflow-tab-surface {
    padding: 12px;
  }

  .workflow-card {
    padding: 16px;
  }

  .live-order-summary,
  .postgrid-order-item,
  .stripe-test-card,
  .stripe-result div {
    grid-template-columns: minmax(0, 1fr);
  }

  .postgrid-order-item div:last-child {
    justify-items: stretch;
  }

  .postgrid-panel {
    height: auto;
  }

  .postgrid-body {
    height: auto;
    padding: 12px;
  }

  .postgrid-card {
    padding: 14px;
  }

  .postcard-preview-card {
    height: auto;
  }

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

  .postcard-editor-toolbar-actions {
    justify-content: stretch;
  }

  .postcard-editor-toolbar-actions button {
    flex: 1 1 0;
  }

  .postcard-artwork-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .postcard-artwork-toolbar button {
    width: 100%;
  }

  .postcard-preview-grid {
    height: auto;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .postcard-face {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
  }

  .postcard-front-inner {
    inset: calc(var(--postcard-safe-y) + 8px) calc(var(--postcard-safe-x) + 8px);
    gap: 10px;
    padding: 0;
  }

  .postcard-front-copy h4 {
    max-width: 100%;
    font-size: 1.45rem;
  }

  .postcard-front-copy dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .postcard-back {
    padding: 0;
  }

  .postcard-back-message {
    gap: 6px;
  }

  .postcard-back-message p {
    font-size: 0.66rem;
    line-height: 1.18;
  }

  .postcard-back-message dl {
    gap: 5px;
  }

  .postcard-back-message dl div {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 6px;
  }

  .postcard-address-zone {
    min-height: 64px;
    padding: 8px;
  }

  .workflow-tab-surface {
    min-height: 360px;
    padding: 16px;
  }

  .workflow-card {
    padding: 22px;
  }
}

@media (min-width: 881px) and (max-width: 1120px) {
  .map-workbench {
    grid-template-columns: minmax(0, 1fr);
  }

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

@media (max-width: 560px) {
  input,
  textarea,
  select {
    font-size: 16px;
  }

  .campaign-workspace {
    padding-inline: 10px;
  }

  .campaign-heading {
    margin-inline: -10px;
    padding: 12px 10px;
  }

  .campaign-heading h1 {
    max-width: calc(100vw - 110px);
    font-size: 1.08rem;
  }

  .mobile-menu-button {
    min-width: 62px;
    height: 36px;
    padding-inline: 10px;
  }

  .workspace-tabs {
    margin-inline: -2px;
  }

  .tab-button {
    min-width: 86px;
    font-size: 0.82rem;
  }

  .listing-map {
    height: 330px;
    min-height: 280px;
  }

  .audience-stats strong {
    font-size: 0.84rem;
  }

  .property-checklist {
    grid-template-columns: minmax(0, 1fr);
  }

  .postcard-front-inner {
    inset: calc(var(--postcard-safe-y) + 6px) calc(var(--postcard-safe-x) + 6px);
    padding: 0;
  }

  .postcard-brand strong {
    font-size: 1.05rem;
  }

  .postcard-brand span {
    font-size: 0.58rem;
  }

  .postcard-front-copy {
    gap: 8px;
  }

  .postcard-front-copy p {
    font-size: 0.64rem;
  }

  .postcard-front-copy h4 {
    font-size: 1.1rem;
  }

  .postcard-front-copy dd,
  .postcard-back-message dd {
    font-size: 0.72rem;
  }

  .postcard-back {
    padding: 0;
  }

  .postcard-back-message img {
    width: 74px;
  }

  .postcard-back-message p {
    font-size: 0.58rem;
  }

  .postcard-back-message dl {
    display: none;
  }

  .postcard-address-zone {
    min-height: 56px;
    padding: 7px;
  }

  .postcard-address-zone strong {
    font-size: 0.74rem;
  }

  .postcard-indicia {
    top: 8%;
    left: 11.25%;
    right: auto;
    width: 77.5%;
    height: 20.5%;
    padding: 0;
    font-size: 0.48rem;
  }

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