:root {
  color-scheme: light;
  --bg: #edf6ff;
  --ink: #121622;
  --muted: #657086;
  --line: rgba(255, 255, 255, 0.68);
  --line-strong: rgba(255, 255, 255, 0.86);
  --glass: rgba(255, 255, 255, 0.48);
  --glass-card: rgba(255, 255, 255, 0.4);
  --glass-input: rgba(255, 255, 255, 0.72);
  --green: #00a9a6;
  --green-strong: #0b807d;
  --green-soft: rgba(210, 248, 241, 0.76);
  --blue: #7257ff;
  --blue-soft: rgba(226, 219, 255, 0.8);
  --rose: #ff3d9a;
  --rose-soft: rgba(255, 222, 238, 0.8);
  --amber: #f8a30d;
  --amber-soft: rgba(255, 237, 203, 0.82);
  --lime: #82d616;
  --danger: #a33a32;
  --shadow: 0 28px 80px rgba(36, 50, 92, 0.16);
  --shadow-soft: 0 14px 34px rgba(44, 57, 93, 0.1);
  --inset-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  color: var(--ink);
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  background:
    linear-gradient(130deg, rgba(237, 246, 255, 0.9) 0%, rgba(229, 253, 249, 0.68) 32%, rgba(255, 236, 248, 0.56) 100%),
    linear-gradient(160deg, rgba(45, 224, 207, 0.1), rgba(114, 87, 255, 0.1) 58%, rgba(255, 61, 154, 0.09)),
    url("/static/city-background.png") center / cover fixed no-repeat,
    var(--bg);
}

a {
  color: var(--green-strong);
}

.app-frame {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 180ms ease;
}

.app-frame.nav-collapsed {
  grid-template-columns: 88px minmax(0, 1fr);
}

.side-nav {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.76), rgba(255,255,255,0.42)),
    linear-gradient(90deg, rgba(45,224,207,0.14), rgba(255,61,154,0.09));
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  border-right: 1px solid var(--line);
  box-shadow: var(--shadow), var(--inset-highlight);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-self: start;
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
  padding: 22px 18px;
  position: sticky;
  top: 0;
  transition: padding 180ms ease;
  overflow-x: hidden;
  overflow-y: auto;
}

.nav-collapse-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #32404f;
  cursor: pointer;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 0;
  top: 0;
  width: 34px;
  z-index: 5;
}

.nav-collapse-button:hover {
  color: var(--green-strong);
}

.collapse-open-icon,
.collapse-closed-icon {
  align-items: center;
  display: inline-flex;
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
}

.collapse-closed-icon {
  display: none;
}

.side-brand {
  align-items: center;
  display: flex;
  gap: 13px;
  padding-right: 36px;
  min-width: 0;
}

.side-brand strong {
  color: #1c2435;
  display: block;
  font-size: 21px;
  line-height: 1.1;
}

.side-brand span:not(.brand-mark):not(.brand-pin):not(.brand-signal) {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-top: 3px;
}

.nav-menu {
  display: grid;
  gap: 10px;
}

.nav-branch {
  display: grid;
  gap: 8px;
  position: relative;
}

.nav-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
  color: #334154;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 15px;
  font-weight: 850;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  text-align: left;
  transition: color 160ms ease, justify-content 180ms ease, width 180ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.nav-button-child {
  background: transparent;
  box-shadow: none;
  font-size: 14px;
  height: 40px;
  margin-left: 28px;
  padding-left: 11px;
  position: relative;
  width: calc(100% - 28px);
}

.nav-button-child::before {
  border-left: 1px solid rgba(130, 149, 176, 0.34);
  border-bottom: 1px solid rgba(130, 149, 176, 0.34);
  border-bottom-left-radius: 6px;
  content: "";
  height: 24px;
  left: -16px;
  position: absolute;
  top: -9px;
  width: 12px;
}

.nav-branch:has(.nav-button-child.active) > .nav-button:not(.active) {
  background: transparent;
  color: #334154;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.38);
  box-shadow: var(--shadow-soft), var(--inset-highlight);
  color: #172036;
  transform: translateY(-1px);
}

.nav-button:focus-visible {
  background: rgba(255, 255, 255, 0.42);
  color: #172036;
  outline: none;
}

.nav-button.active {
  background: linear-gradient(135deg, #27dfcf 0%, #08a7a4 48%, #7257ff 100%);
  box-shadow: 0 18px 34px rgba(80, 113, 229, 0.22);
  color: #ffffff;
}

.nav-icon {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: currentColor;
  display: inline-flex;
  font-size: 0;
  font-weight: 950;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.nav-icon::before {
  content: none;
}

.nav-icon svg {
  color: currentColor;
  height: 17px;
  stroke-width: 2.6;
  width: 17px;
}

.nav-button.active .nav-icon {
  background: transparent;
  color: currentColor;
}

.side-foot {
  border-top: 1px solid rgba(135, 158, 183, 0.24);
  display: grid;
  gap: 5px;
  margin-top: auto;
  padding-top: 18px;
}

.side-foot span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.side-foot strong {
  color: #1d2433;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.side-user {
  border-top: 1px solid rgba(135, 158, 183, 0.18);
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding-top: 12px;
}

.side-user small {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.side-logout {
  align-items: center;
  align-self: start;
  border: 1px solid rgba(101, 118, 255, 0.18);
  border-radius: 12px;
  display: inline-flex;
  justify-content: center;
  color: #4e67ff;
  font-size: 12px;
  font-weight: 800;
  margin-top: 10px;
  min-height: 38px;
  padding: 0 14px;
  text-decoration: none;
}

.side-logout:hover {
  background: rgba(93, 114, 255, 0.08);
  text-decoration: underline;
}

.app-frame.nav-collapsed .side-nav {
  align-items: center;
  padding: 26px 14px;
}

.app-frame.nav-collapsed .nav-collapse-button {
  right: 0;
}

.app-frame.nav-collapsed .collapse-open-icon {
  display: none;
}

.app-frame.nav-collapsed .collapse-closed-icon {
  display: inline-flex;
}

.app-frame.nav-collapsed .side-brand {
  justify-content: center;
  padding-right: 0;
  width: 100%;
}

.app-frame.nav-collapsed .side-brand > div,
.app-frame.nav-collapsed .nav-label,
.app-frame.nav-collapsed .side-foot {
  display: none;
}

.app-frame.nav-collapsed .brand-mark {
  flex-basis: 48px;
  height: 48px;
  width: 48px;
}

.app-frame.nav-collapsed .nav-menu,
.app-frame.nav-collapsed .nav-branch {
  justify-items: center;
  width: 100%;
}

.app-frame.nav-collapsed .nav-button {
  gap: 0;
  justify-content: center;
  padding: 0;
  width: 50px;
}

.app-frame.nav-collapsed .nav-button-child {
  height: 46px;
  margin-left: 0;
  width: 50px;
}

.app-frame.nav-collapsed .nav-button-child::before {
  display: none;
}

.app-shell {
  min-height: 100vh;
  min-width: 0;
  padding: 20px 20px 24px;
}

.topbar,
.metric-strip,
.home-grid,
.control-band,
.job-band,
.workspace-band,
.campaign-band,
.table-tools,
.table-wrap {
  margin: 0 0 14px;
  max-width: none;
}

.metric-tile,
.home-card,
.control-band,
.job-band,
.workspace-band,
.campaign-band,
.table-tools,
.table-wrap {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.76), rgba(255,255,255,0.42)),
    linear-gradient(90deg, rgba(45,224,207,0.12), rgba(255,61,154,0.08));
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow), var(--inset-highlight);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
}

.topbar {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  overflow: hidden;
  padding: 28px 30px;
  position: relative;
}

.topbar::after {
  content: none;
}

body[data-current-page="campaign"] .topbar,
body[data-current-page="setup"] .topbar {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 2px 0 18px;
}

.topbar-actions,
.job-stats {
  align-items: center;
  display: flex;
  gap: 10px;
}

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

h1 {
  color: #172036;
  font-size: 42px;
  letter-spacing: 0;
  line-height: 1.05;
}

h2 {
  color: #14201e;
  font-size: 16px;
  line-height: 1.2;
}

p {
  color: var(--muted);
}

.topbar p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 8px;
}

.section-head {
  align-items: center;
  border-bottom: 1px solid rgba(35, 54, 50, 0.14);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: -2px 0 14px;
  padding-bottom: 12px;
}

.section-head.compact {
  border-bottom: 0;
  grid-column: 1 / -1;
  margin: 0 0 12px;
  padding: 0;
}

.section-head p {
  font-size: 13px;
}

.brand-mark {
  align-items: center;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.42)),
    linear-gradient(135deg, rgba(11, 107, 88, 0.2), rgba(40, 94, 142, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 18px;
  box-shadow: 0 15px 32px rgba(10, 24, 22, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  display: inline-flex;
  flex: 0 0 56px;
  height: 56px;
  justify-content: center;
  position: relative;
  width: 56px;
}

.brand-mark::before {
  background: linear-gradient(140deg, var(--green), var(--blue));
  border-radius: 6px;
  content: "";
  height: 34px;
  position: absolute;
  transform: rotate(45deg);
  width: 34px;
}

.brand-pin {
  background: rgba(255, 255, 255, 0.94);
  border: 4px solid var(--green-strong);
  border-radius: 50% 50% 50% 6px;
  height: 22px;
  position: relative;
  transform: rotate(-45deg);
  width: 22px;
  z-index: 1;
}

.brand-pin::after {
  background: var(--rose);
  border-radius: 50%;
  content: "";
  height: 6px;
  left: 4px;
  position: absolute;
  top: 4px;
  width: 6px;
}

.brand-signal {
  background: #ffffff;
  border-radius: 2px;
  bottom: 13px;
  height: 3px;
  position: absolute;
  right: 12px;
  width: 15px;
  z-index: 2;
}

.brand-signal::before,
.brand-signal::after {
  background: #ffffff;
  border-radius: 2px;
  content: "";
  height: 3px;
  position: absolute;
  right: 0;
}

.brand-signal::before {
  top: -7px;
  width: 10px;
}

.brand-signal::after {
  top: -14px;
  width: 5px;
}

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

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

.metric-tile {
  display: grid;
  gap: 8px;
  min-height: 138px;
  overflow: hidden;
  padding: 22px 22px 20px;
  position: relative;
}

.metric-tile::before {
  background: var(--blue);
  border-radius: 999px;
  content: "";
  height: 10px;
  left: 22px;
  position: absolute;
  top: 18px;
  width: 50px;
}

.metric-tile:nth-child(2)::before {
  background: var(--rose);
}

.metric-tile:nth-child(3)::before,
.metric-tile.accent::before {
  background: var(--green);
}

.metric-tile.api::before {
  background: var(--amber);
}

.metric-tile::after {
  background: linear-gradient(128deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0));
  content: "";
  height: 100%;
  pointer-events: none;
  position: absolute;
  right: -26%;
  top: 0;
  transform: skewX(-10deg);
  width: 70%;
}

.metric-tile span,
.field span,
.toggle span,
.mini-stat span {
  color: #5d6981;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.metric-tile span {
  margin-top: 18px;
  position: relative;
  z-index: 1;
}

.metric-tile strong {
  color: #182033;
  font-size: 36px;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.metric-tile em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
  position: relative;
  z-index: 1;
}

.home-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
}

.home-card,
.control-band,
.job-band,
.campaign-band,
.table-tools {
  padding: 16px;
}

.job-band {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 4px 0 14px;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

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

.health-toolbar {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.health-list > div,
.mini-stat,
.variant-card,
.recipient-panel {
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 18px;
  box-shadow: var(--shadow-soft), var(--inset-highlight);
}

.health-list > div {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 50px;
  padding: 10px 12px;
}

.health-row {
  display: grid !important;
  gap: 12px;
  grid-template-columns: minmax(0, 1.45fr) minmax(220px, 1fr) auto;
}

.health-copy {
  display: grid;
  gap: 4px;
}

.health-copy p {
  color: #304640;
  font-size: 13px;
  line-height: 1.35;
  margin: 0;
}

.health-list span {
  color: #2f4641;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.health-list strong {
  font-size: 13px;
  text-align: left;
}

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

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

.mini-stat {
  display: grid;
  gap: 6px;
  min-height: 78px;
  padding: 13px;
}

.mini-stat strong {
  font-size: 20px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

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

.project-card,
.workspace-user-card {
  background: var(--glass-card);
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 14px;
  min-height: 170px;
  padding: 15px;
}

.project-card h3 {
  font-size: 16px;
  line-height: 1.2;
  margin: 7px 0 8px;
}

.project-card p {
  color: #344a45;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.project-kind,
.checklist-title {
  color: #2f4641;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.project-card-foot {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.project-card-foot .button {
  height: 34px;
  margin-left: auto;
  min-width: 112px;
  padding: 0 12px;
}

.admin-panel {
  margin-top: 14px;
}

.workspace-user-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  margin-bottom: 16px;
}

.project-checklist {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 12px;
}

.project-check {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.project-check input {
  flex: 0 0 auto;
  height: 16px;
  width: 16px;
}

.project-check span {
  color: #20342f;
  font-size: 13px;
  font-weight: 750;
}

.checklist-title,
.workspace-form-actions {
  grid-column: 1 / -1;
}

.workspace-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.workspace-users {
  display: grid;
  gap: 10px;
}

.workspace-user-card {
  align-items: start;
  grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1.4fr) auto;
  min-height: 0;
}

.workspace-user-card strong,
.workspace-user-card span {
  display: block;
}

.workspace-user-card > div:first-child > span {
  color: #344a45;
  font-size: 13px;
  margin-top: 3px;
}

.user-chip-row,
.project-chip-row,
.workspace-user-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.user-chip-row {
  margin-top: 9px;
}

.mini-chip {
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(35, 54, 50, 0.14);
  border-radius: 8px;
  color: #263b36;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 7px;
}

.workspace-user-actions .button {
  height: 32px;
  min-width: 70px;
  padding: 0 10px;
}

.status-pill {
  align-items: center;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  color: #263b36;
  display: inline-flex;
  font-size: 12px;
  font-weight: 750;
  justify-content: center;
  line-height: 1.35;
  min-height: 36px;
  overflow-wrap: anywhere;
  padding: 0 12px;
  text-align: center;
}

.status-pill.ready {
  background: rgba(210, 239, 230, 0.68);
  border-color: rgba(70, 157, 136, 0.35);
  color: var(--green-strong);
}

.status-pill.missing {
  background: var(--amber-soft);
  border-color: rgba(177, 137, 12, 0.42);
  color: var(--amber);
}

.status-pill.error {
  background: rgba(255, 211, 211, 0.74);
  border-color: rgba(176, 61, 61, 0.36);
  color: #8d2323;
}

.research-grid,
.assign-grid,
.table-tools,
.suppress-form,
.mini-form {
  align-items: end;
  display: grid;
  gap: 12px;
}

.research-grid {
  grid-template-columns: minmax(150px, 0.9fr) minmax(120px, 0.65fr) minmax(220px, 1.35fr) minmax(70px, 82px) minmax(150px, auto) minmax(140px, auto) minmax(126px, 150px);
}

.assign-grid {
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 1.2fr) repeat(5, minmax(70px, 86px)) auto;
  margin-bottom: 14px;
}

.assignment-head {
  align-items: center;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 11px 12px;
}

.assignment-head strong {
  display: block;
  font-size: 14px;
}

.assignment-head span {
  color: #344a45;
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.table-tools {
  grid-template-columns: minmax(180px, 240px) minmax(220px, 1fr) auto;
}

.suppress-form {
  grid-template-columns: minmax(180px, 260px) minmax(120px, 180px) auto;
}

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

input,
select,
textarea {
  background: var(--glass-input);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: var(--inset-highlight);
  color: var(--ink);
  font: inherit;
  min-width: 0;
  width: 100%;
}

input {
  height: 46px;
  padding: 0 16px;
}

select {
  height: 46px;
  padding: 0 16px;
}

textarea {
  min-height: 178px;
  padding: 14px 16px;
  resize: vertical;
}

input::placeholder {
  color: rgba(86, 105, 101, 0.74);
}

input:focus,
select:focus,
textarea:focus {
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(0, 169, 166, 0.45);
  box-shadow: 0 0 0 4px rgba(45, 224, 207, 0.13), var(--inset-highlight);
  outline: none;
}

.count-field input {
  text-align: center;
}

.toggle {
  align-items: center;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 14px;
  box-shadow: var(--inset-highlight);
  display: flex;
  gap: 8px;
  height: 46px;
  padding: 0 14px;
  white-space: nowrap;
}

.research-grid .button,
.research-grid .toggle {
  min-width: 0;
  width: 100%;
}

#runButton {
  min-width: 126px;
}

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

.toggle:has(input:checked) {
  background: rgba(223, 251, 246, 0.86);
  border-color: rgba(0, 169, 166, 0.32);
}

.button {
  align-items: center;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 14px;
  box-shadow: var(--shadow-soft), var(--inset-highlight);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 850;
  height: 46px;
  justify-content: center;
  min-width: 104px;
  padding: 0 18px;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease, background 160ms ease;
  white-space: nowrap;
}

.button.primary {
  background: linear-gradient(135deg, #27dfcf 0%, #08a7a4 48%, #7257ff 100%);
  border-color: transparent;
  box-shadow: 0 18px 34px rgba(88, 112, 229, 0.24);
  color: #ffffff;
}

.button.primary:hover {
  filter: brightness(1.02);
  transform: translateY(-1px);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.54);
  border-color: rgba(255, 255, 255, 0.84);
  color: var(--ink);
}

.button.secondary:hover {
  background: rgba(255, 255, 255, 0.74);
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.job-band {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1fr) auto;
}

.job-copy {
  display: grid;
  gap: 4px;
}

.job-copy strong {
  color: #172036;
  font-size: 15px;
}

.job-copy span,
.job-stats span {
  color: #172036;
  font-size: 13px;
}

.job-stats {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.job-stats span {
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  gap: 4px;
  height: 30px;
  padding: 5px 10px;
}

.job-stats b {
  color: #ffffff;
}

.progress-track {
  background: rgba(231, 236, 233, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 8px;
  grid-column: 1 / -1;
  height: 9px;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--green), var(--blue), var(--rose));
  height: 100%;
  transform-origin: left;
  transition: width 180ms ease;
  width: 0;
}

.campaign-actions {
  align-items: end;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.campaign-action-buttons {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#setupPresentationButton {
  background: linear-gradient(135deg, var(--green), #0f7c67);
  box-shadow: 0 12px 22px rgba(11, 107, 88, 0.24);
  color: #ffffff;
}

.outreach-legend {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  grid-column: 1 / -1;
}

.outreach-legend span {
  align-items: center;
  color: #2b403b;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}

.legend-dot {
  border: 1px solid rgba(35, 54, 50, 0.18);
  border-radius: 999px;
  display: inline-flex;
  height: 12px;
  width: 12px;
}

.legend-dot.sent-once {
  background: rgba(255, 248, 199, 0.86);
}

.legend-dot.sent-multiple {
  background: rgba(255, 226, 188, 0.9);
}

.legend-dot.erased {
  background: rgba(255, 218, 218, 0.9);
}

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

.massive-actions span {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.massive-actions .button {
  height: 34px;
  padding: 0 12px;
}

.delivery-panel {
  background: var(--glass-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
}

.delivery-status {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.delivery-status strong {
  display: block;
  font-size: 14px;
  margin-bottom: 3px;
}

.delivery-status p {
  color: #324843;
  font-size: 13px;
}

.delivery-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(360px, 1.3fr) minmax(220px, 0.7fr);
}

.mini-form {
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-template-columns: minmax(170px, 1fr) minmax(110px, 140px) auto;
  padding: 10px;
}

.mini-form:has(#batchSendLimit) {
  grid-template-columns: minmax(140px, 180px) auto;
}

.variant-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin-bottom: 16px;
}

.variant-card {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(10, 24, 22, 0.11);
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 16px;
}

.variant-editor-head {
  align-items: end;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.8fr);
}

.variant-title-block {
  display: grid;
  gap: 10px;
}

.variant-kicker {
  color: #1f332e;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.variant-label-field input {
  font-weight: 850;
}

.variant-metrics-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, minmax(88px, 1fr));
}

.variant-metric {
  background: rgba(255, 255, 255, 0.23);
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 8px;
  display: grid;
  gap: 2px;
  min-height: 68px;
  padding: 9px 10px;
}

.variant-metric span {
  color: #415852;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.variant-metric strong {
  color: #11201d;
  font-size: 18px;
  line-height: 1.1;
}

.variant-metric em {
  color: #415852;
  font-size: 11px;
  font-style: normal;
}

.variant-copy-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.variant-body-field textarea {
  font-family: "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  line-height: 1.5;
  min-height: 330px;
}

.variant-preview {
  background:
    linear-gradient(145deg, rgba(225, 246, 239, 0.54), rgba(217, 233, 248, 0.42)),
    rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(68, 141, 126, 0.34);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  overflow: hidden;
}

.variant-preview-head {
  background: rgba(47, 118, 101, 0.14);
  border-bottom: 1px solid rgba(47, 118, 101, 0.2);
  display: grid;
  gap: 4px;
  padding: 12px 14px;
}

.variant-preview-head span {
  color: #415852;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.variant-preview-head strong {
  color: #11201d;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.variant-preview-body {
  background: rgba(250, 255, 252, 0.5);
  color: #172622;
  line-height: 1.55;
  min-height: 150px;
  overflow-wrap: anywhere;
  padding: 16px;
}

.variant-preview-body p {
  color: #172622;
  margin: 0 0 12px;
}

.variant-preview-body p:last-child {
  margin-bottom: 0;
}

.variant-preview-body a {
  color: var(--green-strong);
  font-weight: 850;
}

.presentation-setup-card {
  scroll-margin-top: 18px;
}

.presentation-form {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
}

.presentation-body-field {
  grid-row: span 3;
}

.presentation-body-field textarea {
  min-height: 260px;
}

.presentation-file-note {
  align-self: center;
  color: #344a45;
  font-size: 12px;
  font-weight: 750;
}

.presentation-form .button {
  align-self: end;
}

.presentation-preview-card,
.modal-preview-card {
  margin-top: 16px;
}

.recipient-panel {
  padding: 12px;
}

.replied-panel {
  border-color: rgba(11, 107, 88, 0.24);
  margin-bottom: 16px;
}

.recipient-table-wrap,
.history-table-wrap,
.table-wrap {
  max-width: 100%;
  overflow: auto;
}

.table-wrap {
  max-height: calc(100vh - 250px);
}

table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 2250px;
  width: 100%;
}

.recipient-table {
  min-width: 1320px;
}

.replied-table {
  min-width: 1120px;
}

.history-table {
  min-width: 1480px;
}

.erased-table {
  min-width: 1080px;
}

.recipient-table .button,
.replied-table .button {
  height: 30px;
  min-width: 62px;
  padding: 0 8px;
}

.recipient-table .presentation-action-button,
.replied-table .presentation-action-button {
  min-width: 128px;
}

.recipient-table .reply-action-button,
.erased-table .restore-action-button {
  min-width: 92px;
}

.status-chip small {
  display: block;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
  margin-top: 2px;
  white-space: nowrap;
}

.modal-backdrop {
  align-items: center;
  background: rgba(4, 12, 11, 0.46);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 1000;
}

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

.modal-card {
  background: rgba(242, 248, 245, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(4, 12, 11, 0.36);
  max-height: calc(100vh - 48px);
  max-width: 860px;
  overflow: auto;
  padding: 18px;
  width: min(860px, 100%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
}

.icon-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 24px;
  font-weight: 850;
  height: 36px;
  justify-content: center;
  line-height: 1;
  width: 36px;
}

.personal-message-form {
  display: grid;
  gap: 12px;
}

.personal-message-form textarea {
  min-height: 330px;
}

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

.modal-attachment-row {
  align-items: center;
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: #22342f;
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 800;
  gap: 10px;
  justify-content: space-between;
  padding: 10px;
}

.conversation-modal-card {
  max-width: 980px;
  width: min(980px, 100%);
}

.conversation-thread {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.conversation-item {
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(35, 54, 50, 0.14);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  padding: 14px;
}

.conversation-item.inbound {
  background: rgba(228, 241, 255, 0.62);
  border-color: rgba(40, 94, 142, 0.18);
}

.conversation-item.outbound {
  background: rgba(227, 243, 237, 0.62);
  border-color: rgba(11, 107, 88, 0.2);
}

.conversation-item.is-latest {
  box-shadow: 0 18px 34px rgba(44, 57, 93, 0.12);
}

.conversation-item.is-latest-reply {
  background: linear-gradient(135deg, rgba(220, 252, 246, 0.92), rgba(236, 248, 255, 0.82));
  border-color: rgba(0, 169, 166, 0.34);
}

.conversation-item-head {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
}

.conversation-item-head strong {
  color: #14201e;
  font-size: 15px;
  line-height: 1.25;
}

.conversation-item-head span {
  color: #39504b;
  font-size: 12px;
  font-weight: 750;
}

.conversation-item-body {
  color: #21332f;
  font-size: 14px;
  line-height: 1.55;
}

.conversation-item-body p:first-child {
  margin-top: 0;
}

.conversation-item-body p:last-child {
  margin-bottom: 0;
}

.conversation-item-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.inline-reply-composer {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(35, 54, 50, 0.12);
}

.inline-reply-head {
  display: grid;
  gap: 3px;
}

.inline-reply-head strong {
  color: #14201e;
  font-size: 14px;
}

.inline-reply-head span {
  color: #4b625c;
  font-size: 12px;
  font-weight: 700;
}

.inline-reply-composer textarea {
  min-height: 190px;
}

.inline-reply-preview {
  margin-top: 2px;
}

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

.conversation-open-button {
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 850;
  padding: 0;
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.conversation-open-button:hover,
.conversation-open-button:focus-visible {
  color: var(--green-strong);
  outline: none;
}

.conversation-open-button.has-unread-reply {
  color: var(--green-strong);
}

.conversation-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.reply-notification-toggle {
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.reply-notification-toggle::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  min-width: 10px;
  border-radius: 999px;
  background: #a8afb2;
  box-shadow: 0 0 0 4px rgba(168, 175, 178, 0.14);
}

.reply-notification-toggle.is-green::before {
  background: #1dcf75;
  box-shadow: 0 0 0 4px rgba(29, 207, 117, 0.14);
}

.reply-notification-toggle.is-blue::before {
  background: #3786ff;
  box-shadow: 0 0 0 4px rgba(55, 134, 255, 0.14);
}

.reply-notification-toggle.is-grey::before {
  background: #9aa3a7;
  box-shadow: 0 0 0 4px rgba(154, 163, 167, 0.12);
}

.reply-notification-toggle:focus-visible {
  outline: 2px solid rgba(55, 134, 255, 0.42);
  outline-offset: 4px;
}

.presentation-current-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
}

.presentation-current-file__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.presentation-current-file__meta strong {
  font-size: 1.05rem;
}

.presentation-current-file__meta span {
  color: var(--ink-muted);
  font-weight: 700;
}

.button.is-disabled,
.button[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.55;
}

.reply-attach-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--ink);
}

.conversation-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 16px;
}

.action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sent-count {
  background: rgba(47, 118, 101, 0.12);
  border: 1px solid rgba(47, 118, 101, 0.22);
  border-radius: 999px;
  color: #16342e;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-width: 32px;
  padding: 3px 8px;
}

.button.danger {
  background: rgba(246, 222, 226, 0.66);
  border-color: rgba(154, 79, 93, 0.28);
  color: #7d2e3c;
}

.button.danger:hover {
  background: rgba(246, 222, 226, 0.88);
}

th,
td {
  border-bottom: 1px solid rgba(35, 54, 50, 0.12);
  font-size: 13px;
  line-height: 1.35;
  max-width: 260px;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: rgba(236, 243, 239, 0.76);
  color: #2d3c38;
  font-size: 11px;
  font-weight: 900;
  position: sticky;
  text-transform: uppercase;
  top: 0;
  z-index: 1;
}

td {
  background: rgba(255, 255, 255, 0.46);
}

.restaurant-table th:nth-child(1),
.restaurant-table td:nth-child(1) {
  left: 0;
  min-width: 136px;
  position: sticky;
  width: 136px;
  z-index: 3;
}

.restaurant-table th:nth-child(2),
.restaurant-table td:nth-child(2) {
  left: 136px;
  min-width: 245px;
  position: sticky;
  width: 245px;
  z-index: 3;
}

.restaurant-table th:nth-child(1),
.restaurant-table th:nth-child(2) {
  background: rgba(223, 236, 230, 0.96);
  z-index: 6;
}

.restaurant-table td:nth-child(1),
.restaurant-table td:nth-child(2) {
  background: rgba(251, 254, 252, 0.94);
  box-shadow: 8px 0 14px rgba(10, 24, 22, 0.08);
}

tbody tr:hover td {
  background: rgba(247, 252, 249, 0.72);
}

.restaurant-table tbody tr:hover td:nth-child(1),
.restaurant-table tbody tr:hover td:nth-child(2) {
  background: rgba(247, 252, 249, 0.96);
}

.restaurant-table tbody tr.outreach-once td,
.restaurant-table tbody tr.outreach-once td:nth-child(1),
.restaurant-table tbody tr.outreach-once td:nth-child(2) {
  background: rgba(255, 248, 199, 0.86);
}

.restaurant-table tbody tr.outreach-multiple td,
.restaurant-table tbody tr.outreach-multiple td:nth-child(1),
.restaurant-table tbody tr.outreach-multiple td:nth-child(2) {
  background: rgba(255, 226, 188, 0.9);
}

.restaurant-table tbody tr.outreach-erased td,
.restaurant-table tbody tr.outreach-erased td:nth-child(1),
.restaurant-table tbody tr.outreach-erased td:nth-child(2) {
  background: rgba(255, 218, 218, 0.9);
}

.empty-cell {
  color: #344a45;
  height: 96px;
  text-align: center;
  vertical-align: middle;
}

.link-list {
  display: grid;
  gap: 4px;
}

.rating-pill,
.status-chip {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  padding: 3px 8px;
}

.rating-pill.google {
  background: var(--blue-soft);
  color: var(--blue);
}

.rating-pill.tripadvisor,
.status-chip.replied,
.status-chip.booked,
.status-chip.wip,
.status-chip.active,
.status-chip.super_admin {
  background: var(--green-soft);
  color: var(--green-strong);
}

.status-chip {
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid var(--line-strong);
}

.status-chip.bounced,
.status-chip.send_failed,
.status-chip.unsubscribed,
.status-chip.suppressed,
.status-chip.disabled {
  background: var(--rose-soft);
  color: var(--rose);
}

.status-chip.queue,
.status-chip.admin {
  background: var(--amber-soft);
  color: var(--amber);
}

.muted {
  color: var(--muted);
}

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

@media (max-width: 1320px) {
  .app-frame {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .app-frame.nav-collapsed {
    grid-template-columns: 88px minmax(0, 1fr);
  }

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

  .project-grid {
    grid-template-columns: repeat(3, minmax(210px, 1fr));
  }

  .research-grid,
  .assign-grid,
  .workspace-user-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .variant-editor-head {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 980px) {
  .app-frame {
    grid-template-columns: 1fr;
  }

  .app-frame.nav-collapsed {
    grid-template-columns: 1fr;
  }

  .side-nav {
    min-height: auto;
    position: static;
  }

  .nav-collapse-button {
    display: none;
  }

  .app-frame.nav-collapsed .side-nav {
    align-items: stretch;
    padding: 26px 20px;
  }

  .app-frame.nav-collapsed .side-brand > div,
  .app-frame.nav-collapsed .nav-label {
    display: block;
  }

  .app-frame.nav-collapsed .nav-button,
  .app-frame.nav-collapsed .nav-button-child {
    justify-content: flex-start;
    padding: 0 14px;
    width: auto;
  }

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

  .side-foot {
    display: none;
  }

  .metric-strip,
  .campaign-summary,
  .home-grid,
  .project-grid,
  .research-grid,
  .assign-grid,
  .presentation-form,
  .workspace-user-form,
  .suppress-form,
  .mini-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-user-card {
    grid-template-columns: 1fr;
  }

  .campaign-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .job-band,
  .table-tools {
    grid-template-columns: 1fr;
  }

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

  .delivery-status {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  body {
    background-attachment: scroll;
  }

  .app-shell {
    padding: 18px 14px;
  }

  .side-nav {
    padding: 18px 14px;
  }

  .nav-menu,
  .metric-strip,
  .campaign-summary,
  .home-summary,
  .home-grid,
  .project-grid,
  .research-grid,
  .assign-grid,
  .presentation-form,
  .workspace-user-form,
  .project-checklist,
  .suppress-form,
  .delivery-grid,
  .mini-form,
  .variant-grid {
    grid-template-columns: 1fr;
  }

  .nav-button-child {
    margin-left: 18px;
    width: calc(100% - 18px);
  }

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

  .variant-body-field textarea {
    min-height: 280px;
  }

  .topbar,
  .topbar-actions,
  .job-stats {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .status-pill {
    width: 100%;
  }

  h1 {
    font-size: 28px;
  }

  th {
    position: static;
  }
}
