:root {
  --bg: #f4f8ff;
  --panel: #ffffff;
  --ink: #10213f;
  --muted: #64748b;
  --line: #d9e6f8;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #0ea5e9;
  --danger: #c94444;
  --warning: #b97812;
  --success: #0d8f5f;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 64px;
  padding: 8px 22px;
  color: #fff;
  background: linear-gradient(135deg, #0f4ecf, #0ea5e9);
}

.app-header h1,
.popup-card h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.app-header p,
.popup-card p {
  margin: 2px 0 0;
  opacity: 0.9;
}

.tabs,
.report-tabs {
  display: flex;
  gap: 6px;
  min-height: 44px;
  padding: 6px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  overflow-x: auto;
}

.tab,
.mini-tab {
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  padding: 7px 10px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.tab.active,
.mini-tab.active {
  color: var(--primary-dark);
  background: #eaf2ff;
  font-weight: 700;
}

.dashboard {
  padding: 22px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.campaign-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 8px 18px rgba(15, 45, 50, 0.04);
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.segmented label,
.options-panel label,
.settings-panel label {
  display: flex;
  gap: 8px;
  align-items: center;
}

.segmented label {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 12px;
  background: #fbfdfd;
}

.input,
.textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 11px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.input.small {
  width: 100px;
}

.input.compact {
  max-width: 280px;
}

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

.textarea.tall {
  min-height: 155px;
}

.textarea.message {
  min-height: 150px;
}

.compact-height {
  min-height: 72px;
}

.form-row,
.action-row,
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
}

.form-row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

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

.btn {
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 10px 13px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  color: #fff;
  background: var(--secondary);
}

.btn-warning {
  color: #fff;
  background: var(--warning);
}

.btn-danger {
  color: #fff;
  background: var(--danger);
}

.btn-muted {
  color: var(--ink);
  border-color: var(--line);
  background: #f8fbfb;
}

.btn-link {
  color: var(--primary-dark);
  background: transparent;
  padding-inline: 4px;
}

.full {
  width: 100%;
}

.end {
  justify-content: flex-end;
}

.summary-grid,
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.summary-card,
.metric-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fbfdfd;
}

.summary-card strong,
.metric-card strong {
  display: block;
  font-size: 24px;
  color: var(--primary-dark);
}

.preview,
.notice,
.warning,
.attachment-box,
.picker {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfd;
  padding: 12px;
  margin: 12px 0;
}

.warning {
  border-color: #f0d8ad;
  background: #fff8ec;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: #f8fbfb;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  background: #edf1f2;
  color: var(--muted);
}

.status-badge.sent,
.status-badge.completed,
.status-badge.active {
  color: #0b6947;
  background: #dff5eb;
}

.status-badge.failed,
.status-badge.stopped,
.status-badge.archived {
  color: #9b2525;
  background: #f8e1e1;
}

.status-badge.pending,
.status-badge.paused {
  color: #8a5b10;
  background: #fff0cf;
}

.modal {
  width: min(520px, calc(100vw - 28px));
  border: 0;
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

.wide-modal {
  width: min(980px, calc(100vw - 28px));
}

.modal::backdrop {
  background: rgba(15, 35, 38, 0.45);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 420px;
  border-radius: var(--radius);
  padding: 12px 14px;
  color: #fff;
  background: #172325;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
}

.emoji-picker {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin: 10px 0;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 45, 50, 0.08);
}

.floating-emoji {
  position: fixed;
  right: 18px;
  bottom: 76px;
  width: min(460px, calc(100vw - 36px));
  max-height: 60vh;
  overflow: auto;
  z-index: 10;
}

.emoji-category {
  margin-bottom: 10px;
}

.emoji-category strong {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  gap: 6px;
}

.emoji-grid button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfd;
  min-height: 36px;
  cursor: pointer;
  font-size: 20px;
}

.picker label {
  display: block;
  margin: 6px 0;
}

.popup-body {
  min-width: 310px;
  background: #eef6f4;
}

.popup-card {
  padding: 20px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  color: #fff;
  background: var(--primary);
  font-weight: 900;
  margin-bottom: 12px;
}

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

  .section-title {
    display: block;
  }
}


/* Compact blue navigation refresh */
.app-header { max-height: 64px; overflow: hidden; }
.app-header h1 { line-height: 1.05; }
.app-header p { font-size: 12px; }
.tabs { align-items: center; }
.btn-primary { box-shadow: 0 8px 16px rgba(37, 99, 235, 0.18); }
.panel { box-shadow: 0 10px 24px rgba(37, 99, 235, 0.06); }
.status-badge.active, .status-badge.sent { background: #dbeafe; color: #1d4ed8; }

/* Max Sender v9 commercial UI refinements */
.app-header {
  min-height: 64px;
  height: 64px;
  padding: 7px 22px;
  background: linear-gradient(135deg, #0b3cae 0%, #2563eb 52%, #38bdf8 100%);
}
.tabs {
  min-height: 42px;
  padding: 5px 14px;
  background: #f8fbff;
}
.tab,
.mini-tab {
  padding: 7px 11px;
  border-radius: 10px;
}
.tab.active,
.mini-tab.active {
  background: #dbeafe;
  color: #0b3cae;
}
.compact-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.footer-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbff;
  padding: 12px;
  margin: 12px 0;
}
.attachment-list,
.wa-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.attachment-chip,
.wa-attachments span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e40af;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 700;
}
.attachment-chip button {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #ef4444;
  cursor: pointer;
  font-weight: 900;
}
.wa-preview,
.preview {
  border: 1px solid #bfdbfe;
  background: linear-gradient(180deg, #eef6ff, #ffffff);
}
.wa-bubble {
  display: inline-block;
  max-width: 620px;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px 12px 3px 12px;
  background: #dcf8c6;
  color: #10213f;
  white-space: normal;
  line-height: 1.45;
  box-shadow: 0 3px 10px rgba(15, 45, 80, 0.08);
}
.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbff;
  margin: 12px 0;
}
.options-panel label,
.settings-panel label,
.permission-grid label {
  margin: 6px 0;
}
#waStatus {
  max-width: 520px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* Max Sender v12 compact campaign options + richer preview */
.compact-options-panel {
  padding: 14px;
}
.options-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.options-title-row h2 {
  margin: 0;
  font-size: 18px;
}
.options-tile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.option-tile {
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #f8fbff;
  padding: 10px;
}
.option-tile h3 {
  margin: 0 0 8px;
  color: #1d4ed8;
  font-size: 13px;
  letter-spacing: .01em;
}
.option-tile label {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0;
  font-size: 12px;
}
.option-tile .input {
  min-height: 34px;
  padding: 7px 8px;
  border-radius: 9px;
  font-size: 13px;
}
.option-tile .input.small {
  width: 64px;
}
.mini-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.options-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.options-actions-grid .btn:first-child {
  grid-column: 1 / -1;
}
.wa-attachment-preview-grid {
  align-items: stretch;
  gap: 10px;
}
.wa-media-card,
.wa-file-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 220px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e3a8a;
  padding: 7px;
  font-size: 12px;
  font-weight: 700;
}
.wa-media-card img {
  width: 78px;
  height: 58px;
  object-fit: cover;
  border-radius: 9px;
  border: 1px solid #dbeafe;
  background: #fff;
}
.wa-media-card span,
.wa-file-card span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-media-card small,
.wa-file-card small {
  display: block;
  color: #64748b;
  font-weight: 600;
}
@media (max-width: 1180px) {
  .campaign-grid {
    grid-template-columns: 1fr;
  }
  .options-tile-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}
@media (max-width: 640px) {
  .options-tile-grid,
  .options-actions-grid,
  .mini-field-grid {
    grid-template-columns: 1fr;
  }
}

/* Max Sender v13: cleaner sidebar preview + vertical campaign options */
.campaign-grid {
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: start;
}
.compact-options-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  position: sticky;
  top: 12px;
}
.side-preview {
  margin: 0;
  padding: 12px;
  border-radius: 14px;
}
.wa-phone-frame {
  margin-top: 8px;
  border: 1px solid #bfdbfe;
  border-radius: 18px;
  background: #e5f0ff;
  padding: 10px;
}
.wa-chat-bg {
  min-height: 220px;
  max-height: 420px;
  overflow: auto;
  border-radius: 14px;
  padding: 14px;
  background:
    radial-gradient(circle at 12px 12px, rgba(37, 99, 235, .06) 2px, transparent 3px) 0 0 / 26px 26px,
    #f7fbff;
}
.wa-bubble {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  border-radius: 14px 14px 4px 14px;
}
.wa-text-preview {
  margin-top: 8px;
}
.wa-muted {
  color: #64748b;
  font-style: italic;
}
.options-tile-grid {
  grid-template-columns: 1fr !important;
  gap: 8px;
}
.option-tile {
  padding: 10px 12px;
}
.option-tile label {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  justify-content: stretch;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  font-size: 13px;
}
.option-tile label:has(input[type="checkbox"]) {
  grid-template-columns: 22px 1fr;
}
.option-tile input[type="checkbox"] {
  width: 15px;
  height: 15px;
}
.mini-field-grid {
  grid-template-columns: 1fr 1fr;
}
.option-tile .input.small,
.option-tile .input {
  width: 100%;
  min-height: 36px;
}
.options-actions-grid {
  grid-template-columns: 1fr 1fr;
}
.options-actions-grid .btn:first-child {
  grid-column: 1 / -1;
}
.wa-attachments {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.wa-media-card,
.wa-file-card {
  max-width: 100%;
  width: 100%;
}
.wa-media-card img {
  width: 100%;
  height: 150px;
  max-width: 240px;
  object-fit: cover;
}
#loadedGroupPicker label {
  display: block;
  padding: 3px 0;
}
@media (max-width: 1180px) {
  .campaign-grid {
    grid-template-columns: 1fr;
  }
  .compact-options-panel {
    position: static;
  }
}

/* Max Sender v14: 50 / 25 / 25 campaign layout + cleaner WhatsApp preview */
.campaign-grid {
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr) minmax(270px, 1fr) !important;
  align-items: start;
  gap: 14px;
}
.preview-panel,
.compact-options-panel {
  position: sticky;
  top: 10px;
  align-self: start;
}
.preview-panel {
  padding: 12px;
}
.compact-options-panel {
  display: block;
  padding: 12px;
}
.options-title-row {
  margin-bottom: 8px;
}
.options-title-row h2 {
  font-size: 17px;
}
.options-vertical-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.option-line {
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #f8fbff;
  padding: 9px 10px;
}
.option-line > span {
  display: block;
  margin-bottom: 6px;
  color: #1d4ed8;
  font-weight: 800;
  font-size: 12px;
}
.option-line label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 5px 0;
  font-size: 12px;
}
.option-line input[type="checkbox"] {
  width: 14px;
  height: 14px;
}
.option-line .input,
.option-line .input.small {
  min-height: 32px;
  height: 32px;
  padding: 6px 8px;
  border-radius: 9px;
  font-size: 12px;
  width: 88px;
}
.two-fields label {
  display: grid;
  grid-template-columns: 54px 1fr;
}
.check-line {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
}
.check-line label {
  justify-content: flex-start;
}
.schedule-line .input {
  width: 100%;
  margin-top: 6px;
}
.options-actions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: 10px;
}
.options-actions-grid .btn:first-child {
  grid-column: auto;
}
.wa-phone-frame {
  padding: 8px;
}
.wa-chat-bg {
  min-height: 360px;
  max-height: 620px;
  padding: 12px;
}
.wa-bubble {
  max-width: 100%;
  width: auto;
  padding: 8px;
  background: #dcf8c6;
}
.wa-attachments {
  margin-bottom: 7px;
}
.wa-image-preview {
  width: 100%;
  overflow: hidden;
  border-radius: 9px;
  background: #dbeafe;
}
.wa-image-preview img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 9px;
}
.wa-media-card span {
  display: none !important;
}
.wa-text-preview {
  font-size: 13px;
  line-height: 1.38;
}
@media (max-width: 1280px) {
  .campaign-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, .8fr) minmax(270px, .8fr) !important;
  }
}
@media (max-width: 980px) {
  .campaign-grid {
    grid-template-columns: 1fr !important;
  }
  .preview-panel,
  .compact-options-panel {
    position: static;
  }
}

/* Max Sender v16: simplified WhatsApp preview + single-box campaign options */
.preview-panel,
.compact-options-panel {
  position: sticky;
  top: 10px;
  align-self: start;
}
.single-wa-preview,
.side-preview.single-wa-preview {
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
}
.single-wa-preview > strong {
  display: block;
  margin-bottom: 10px;
  color: #0f2a4f;
  font-size: 15px;
}
.wa-single-preview-box {
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  background: #f7fbff;
  padding: 12px;
  min-height: 420px;
  max-height: 680px;
  overflow: auto;
}
.wa-single-preview-box .wa-bubble,
#messagePreview .wa-bubble {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 10px;
  border: 1px solid #dbeafe;
  border-radius: 13px 13px 4px 13px;
  background: #ffffff !important;
  color: #0f172a;
  box-shadow: 0 6px 16px rgba(15, 42, 79, 0.08);
}
.wa-single-preview-box .wa-image-preview,
#messagePreview .wa-image-preview {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  margin-bottom: 8px;
}
.wa-single-preview-box .wa-image-preview img,
#messagePreview .wa-image-preview img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 10px;
}
.wa-single-preview-box .wa-file-card,
#messagePreview .wa-file-card {
  width: 100%;
  max-width: 100%;
  border-radius: 10px;
  background: #f1f5f9;
  border-color: #dbeafe;
}
.wa-single-preview-box .wa-text-preview,
#messagePreview .wa-text-preview {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.45;
}

.compact-options-panel {
  padding: 14px !important;
}
.options-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px !important;
}
.options-title-row h2 {
  margin: 0 !important;
  font-size: 19px !important;
}
.campaign-options-single-card {
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  background: #ffffff;
  padding: 12px;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.02);
}
.option-section {
  margin: 0 0 12px;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 1px solid #e5efff;
  background: transparent;
}
.option-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.option-section h3 {
  margin: 0 0 8px;
  color: #1d4ed8;
  font-size: 13px;
  line-height: 1.2;
}
.option-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.option-field-row label {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 5px !important;
  margin: 0 !important;
  color: #0f2a4f;
  font-size: 12px;
  font-weight: 600;
}
.option-field-row .input,
.option-field-row .input.small,
.campaign-options-single-card .input,
.campaign-options-single-card .input.small {
  width: 100% !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 6px 9px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
}
.schedule-option-section {
  display: grid;
  gap: 8px;
}
.option-check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
}
.option-check,
.option-check.full {
  display: flex !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: 8px !important;
  margin: 0 !important;
  color: #0f2a4f;
  font-size: 13px;
  font-weight: 700;
}
.option-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
}
.options-actions-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  margin-top: 10px !important;
}
.options-actions-grid .btn:first-child {
  grid-column: 1 / -1 !important;
}
.options-actions-grid .btn {
  min-height: 38px;
}
@media (max-width: 1280px) {
  .campaign-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(250px, .85fr) minmax(260px, .85fr) !important;
  }
}
@media (max-width: 980px) {
  .campaign-grid {
    grid-template-columns: 1fr !important;
  }
  .preview-panel,
  .compact-options-panel {
    position: static !important;
  }
}
/* Keep WhatsApp preview visually as one clean outer box */
.preview-panel {
  background: #f7fbff !important;
  border: 1px solid #bfdbfe !important;
  border-radius: 16px !important;
}
.wa-single-preview-box {
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  min-height: 420px;
}


/* Max Sender v18: clearer loaded-target tables and template preview layout */
.loaded-table {
  display: grid;
  gap: 0;
  margin-top: 10px;
  border: 1px solid #d9e6f8;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.loaded-table-row {
  display: grid !important;
  align-items: center;
  gap: 10px;
  margin: 0 !important;
  padding: 8px 10px !important;
  border-bottom: 1px solid #eef4ff;
  cursor: pointer;
}
.loaded-table-row:last-child { border-bottom: 0; }
.loaded-table-head {
  background: #eaf2ff;
  color: #0f3ea3;
  font-size: 12px;
  font-weight: 800;
  cursor: default;
}
.loaded-groups-table .loaded-table-row { grid-template-columns: 28px minmax(180px, 1.4fr) minmax(190px, 1fr) 80px; }
.loaded-individuals-table .loaded-table-row { grid-template-columns: 28px minmax(180px, 1.2fr) minmax(190px, 1fr) 135px; }
.loaded-table-row code {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #1d4ed8;
  background: #f4f8ff;
  border-radius: 6px;
  padding: 3px 5px;
  font-size: 11px;
}
.loaded-table-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
}
.template-layout-75-25 {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
  gap: 16px;
  align-items: start;
}
.template-preview-panel {
  position: sticky;
  top: 12px;
}
.template-preview-box {
  margin-top: 10px;
  min-height: 260px;
}
.wa-white-bubble {
  background: #fff !important;
  border: 1px solid #d9e6f8;
  margin-left: 0;
}
@media (max-width: 1180px) {
  .template-layout-75-25 { grid-template-columns: 1fr; }
  .loaded-groups-table .loaded-table-row,
  .loaded-individuals-table .loaded-table-row { grid-template-columns: 24px 1fr; }
  .loaded-table-head { display: none !important; }
  .loaded-table-row code,
  .loaded-table-row span:last-child { grid-column: 2; }
}


/* Max Sender v19: OntaTrip premium polish + template preview + merged individual directory */
:root {
  --onta-navy: #111f3d;
  --onta-blue: #1e63ff;
  --onta-sky: #eaf4ff;
  --onta-orange: #f7a51b;
}
.ontatrip-header {
  background: linear-gradient(135deg, var(--onta-navy), #173b74 58%, var(--onta-blue));
  color: #fff;
  border-bottom: 3px solid var(--onta-orange);
  box-shadow: 0 14px 38px rgba(17, 31, 61, .22);
}
.brand-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ontatrip-logo {
  width: 112px;
  height: 42px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
}
.ontatrip-header h1,
.ontatrip-header p { color: #fff !important; }
.tabs {
  background: #ffffff;
  border-bottom: 1px solid #dbeafe;
  box-shadow: 0 8px 24px rgba(30, 99, 255, .07);
}
.tabs .tab.active {
  background: linear-gradient(135deg, #eaf4ff, #dcecff);
  color: var(--onta-blue);
  box-shadow: inset 0 -2px 0 var(--onta-orange);
}
.panel {
  border-color: #cfe2ff !important;
  box-shadow: 0 16px 40px rgba(17, 31, 61, .08);
}
.btn-primary {
  background: linear-gradient(135deg, var(--onta-blue), #184bd6) !important;
  box-shadow: 0 10px 22px rgba(30, 99, 255, .22);
}
.btn-secondary {
  background: linear-gradient(135deg, var(--onta-orange), #e18b00) !important;
  color: #10203d !important;
}
.attachment-help {
  display: block;
  margin-top: 8px;
  color: #56708f;
  font-size: 11px;
  line-height: 1.35;
}
.template-preview-panel .wa-single-preview-box,
.template-preview-box {
  background: linear-gradient(180deg, #f8fbff, #ffffff) !important;
  border: 1px solid #cfe2ff !important;
  min-height: 420px;
}
#templatePreview .wa-bubble {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 10px;
  border: 1px solid #dbeafe;
  border-radius: 13px 13px 4px 13px;
  background: #ffffff !important;
  color: #0f172a;
  box-shadow: 0 6px 16px rgba(15, 42, 79, 0.08);
}
#templatePreview .wa-image-preview {
  margin: 0 0 10px 0;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}
#templatePreview .wa-image-preview img {
  display: block;
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: 10px;
}
#templatePreview .wa-text-preview {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.45;
}
.loaded-table {
  border: 1px solid #dbeafe;
  border-radius: 14px;
  overflow: auto;
  background: #fff;
}
.loaded-table-row {
  display: grid !important;
  align-items: center;
  gap: 10px;
  padding: 10px 12px !important;
  margin: 0 !important;
  border-bottom: 1px solid #edf4ff;
}
.loaded-table-row:last-child { border-bottom: 0; }
.loaded-table-head {
  background: linear-gradient(135deg, #f0f7ff, #fff7e8);
  color: #0f2a4f;
  font-size: 12px;
  position: sticky;
  top: 0;
  z-index: 1;
}
.loaded-groups-table .loaded-table-row {
  grid-template-columns: 28px minmax(220px, 1.2fr) minmax(240px, 1fr) 90px;
}
.loaded-individuals-table .loaded-table-row {
  grid-template-columns: 28px minmax(240px, 1.1fr) minmax(220px, .9fr) minmax(140px, .6fr) minmax(220px, .9fr) minmax(140px, .6fr);
}
.loaded-table code {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 8px;
  background: #f1f6ff;
  color: #1648c7;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loaded-table input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--onta-blue);
}
@media (max-width: 1100px) {
  .loaded-individuals-table .loaded-table-row,
  .loaded-groups-table .loaded-table-row {
    grid-template-columns: 28px minmax(180px, 1fr) minmax(180px, 1fr);
  }
  .loaded-individuals-table .loaded-table-row > :nth-child(n+5),
  .loaded-groups-table .loaded-table-row > :nth-child(n+5) { display: none; }
}

/* Max Sender v20: fresh OntaTrip logo fit */
.ontatrip-logo {
  width: 154px !important;
  height: 58px !important;
  object-fit: contain !important;
  padding: 5px 8px !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .16) !important;
}
.ontatrip-header {
  min-height: 72px !important;
}

/* Max Sender v21: reverse logo + simpler tab hover */
.ontatrip-header {
  background: #10213f !important;
  border-bottom: 0 !important;
  box-shadow: 0 10px 28px rgba(16, 33, 63, 0.18) !important;
}
.ontatrip-logo {
  width: 168px !important;
  height: 64px !important;
  object-fit: contain !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.tabs {
  gap: 8px !important;
  padding: 8px 14px !important;
  background: #ffffff !important;
  border-bottom: 1px solid #dbe5f3 !important;
  box-shadow: none !important;
}
.tab,
.mini-tab {
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  padding: 9px 12px !important;
  color: #46566f !important;
  background: transparent !important;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease !important;
}
.tab:hover,
.mini-tab:hover {
  background: #f3f7ff !important;
  color: #1d4ed8 !important;
  border-color: #dbe5f3 !important;
}
.tabs .tab.active,
.report-tabs .mini-tab.active,
.tab.active,
.mini-tab.active {
  background: #eaf2ff !important;
  color: #1d4ed8 !important;
  border-color: #cfe0ff !important;
  box-shadow: none !important;
}

/* Max Sender v22: compact navigator, simple ready text, name search polish */
.app-header.ontatrip-header,
.ontatrip-header {
  min-height: 60px !important;
  max-height: 60px !important;
  height: 60px !important;
  padding: 6px 18px !important;
  overflow: hidden !important;
}
.ontatrip-logo {
  width: 132px !important;
  height: 48px !important;
  object-fit: contain !important;
}
.ontatrip-header h1 {
  font-size: 18px !important;
  line-height: 1.1 !important;
}
.ontatrip-header p {
  font-size: 12px !important;
  line-height: 1.1 !important;
}
.tabs {
  min-height: 48px !important;
  max-height: 60px !important;
  padding: 6px 14px !important;
  align-items: center !important;
}
.tab,
.mini-tab {
  box-shadow: none !important;
}
#waStatus {
  min-width: 82px !important;
  text-align: center !important;
}
#loadedSearch::placeholder {
  color: #8392a8;
}

/* Max Sender v23: Admin directory filter buttons */
.directory-filter-actions {
  margin: 14px 0 12px;
  padding: 10px;
  border: 1px solid #dbe5f3;
  border-radius: 12px;
  background: #f8fbff;
}
.directory-filter-actions .btn {
  min-width: 110px;
}
.directory-filter-actions .btn.active {
  color: #ffffff !important;
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
}

.directory-user-filter-label { display:flex; align-items:center; gap:8px; margin-left:auto; color:#46566f; font-weight:600; }
.directory-user-filter-label .input.compact { min-width: 210px; max-width: 260px; }

/* v25 enterprise campaign queue, live progress, organization login */
.session-identity {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
}
.btn-compact { padding: 7px 10px !important; }
.live-campaign-panel {
  margin: 12px 0 16px;
  padding: 12px;
  border: 1px solid #cfe0ff;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
}
.live-campaign-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.live-progress-grid { margin: 0 !important; }
.live-progress-grid .summary-card { min-height: 72px; }
.live-progress-bar-wrap {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 2px 4px 0;
}
.live-progress-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7eef9;
}
.live-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1d4ed8, #3b82f6);
  transition: width .25s ease;
}
.campaign-schedule-panel { margin-top: 18px; }
.campaign-schedule-panel table td:last-child { min-width: 250px; }
.association-cards { margin: 12px 0 16px; }
.loaded-search-row { align-items: center; }
.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 290px;
  color: #46566f;
  font-size: 13px;
}
.organization-admin-block {
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid #dbe5f3;
  border-radius: 14px;
  background: #f8fbff;
}
.compact-section-title { margin-bottom: 8px !important; }
.compact-section-title h3 { margin: 0 0 4px; }
.compact-section-title p { margin: 0; color: #64748b; }
.organization-create-row { display: grid; grid-template-columns: 1fr 220px auto; }
.admin-subheading { margin: 18px 0 10px; }
.login-modal {
  width: min(430px, calc(100vw - 28px));
  border: 0;
  border-radius: 18px;
  padding: 24px;
  background: #ffffff;
  box-shadow: 0 28px 90px rgba(15, 34, 67, .32);
}
.login-modal::backdrop { background: rgba(8, 21, 44, .72); }
.login-modal label { display: grid; gap: 6px; margin: 12px 0; font-weight: 700; color: #172b4d; }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.login-brand img { width: 116px; height: 54px; object-fit: contain; border-radius: 8px; background: #10213f; }
.login-brand h2 { margin: 0; }
.login-brand p { margin: 4px 0 0; color: #64748b; }
.login-error { min-height: 20px; color: #b42318; font-weight: 700; }
.login-note { margin: 12px 0 0; font-size: 11px; color: #64748b; line-height: 1.4; }
@media (max-width: 900px) {
  .organization-create-row { grid-template-columns: 1fr; }
  .session-identity { display: none; }
  .loaded-search-row { align-items: stretch; }
  .inline-check { min-width: 0; width: 100%; }
}


/* Max Sender v26: actionable unassigned lists, working search controls, launch choice */
.ontatrip-header .brand-wrap { gap: 0; }
.search-action-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 8px; }
.loaded-search-row.search-action-row { grid-template-columns: minmax(0,1fr) auto auto auto auto; }
.association-actions { margin-top: 10px; }
.association-card-button { text-align: left; cursor: pointer; width: 100%; border: 1px solid var(--line); color: inherit; }
.association-card-button:hover { border-color: #93b4ef; background: #f1f7ff; }
.association-card-button small { display: block; margin-top: 4px; color: #2563eb; font-weight: 700; }
.unassigned-items-panel { margin: 14px 0; padding: 14px; border: 1px solid #bfd6fb; border-radius: 14px; background: #f8fbff; }
.unassigned-toolbar { display: grid; grid-template-columns: minmax(0,1fr) minmax(220px,300px) auto; }
.unassigned-item-row { display: flex !important; gap: 10px; align-items: flex-start; padding: 9px 10px; border-bottom: 1px solid #e4edf9; background: #fff; }
.unassigned-item-row:last-child { border-bottom: 0; }
.unassigned-item-row span { display: grid; gap: 3px; }
.unassigned-item-row small { color: #64748b; }
.empty-state { padding: 18px; text-align: center; color: #64748b; background: #fff; border-radius: 10px; }
.campaign-launch-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.launch-option { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid #d7e3f4; border-radius: 12px; background: #f8fbff; cursor: pointer; }
.launch-option.active { border-color: #2563eb; background: #edf5ff; box-shadow: inset 0 0 0 1px #2563eb; }
.launch-option span { display: grid; gap: 4px; }
.launch-option small { color: #64748b; line-height: 1.35; }
.confirm-schedule-row { display: grid; gap: 7px; margin: 10px 0; font-weight: 700; }
.launch-lock-note { color: #64748b; font-size: 12px; }
@media (max-width: 900px) {
  .search-action-row, .loaded-search-row.search-action-row, .unassigned-toolbar, .campaign-launch-choice { grid-template-columns: 1fr; }
}

/* Max Sender v27: explicit campaign launch, current-list help and directory export */
.campaign-launch-inline { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:10px; }
.campaign-launch-inline .option-check { border:1px solid #d8e5f8; border-radius:10px; padding:9px; background:#f8fbff; }
.scheduled-at-inline-row { display:grid; gap:6px; color:#334155; font-size:12px; font-weight:700; }
.saved-list-help { margin:12px 0 8px; padding:10px 12px; border:1px solid #dbe5f3; border-radius:10px; background:#f8fbff; }
.saved-list-help strong, .saved-list-help small { display:block; }
.saved-list-help small { margin-top:4px; color:#64748b; line-height:1.4; }
.directory-export-row { justify-content:space-between; margin:12px 0 0; }
.muted-text { color:#64748b; font-size:12px; }

/* v28 instant/schedule date-time behavior */
.confirm-schedule-row input:disabled,
.scheduled-at-inline-row input:disabled {
  color: #0f2a4f !important;
  background: #f4f8ff !important;
  opacity: 1 !important;
  cursor: default;
}

/* Max Sender v29: list placement, countdown, completed rerun actions */
.current-list-members-after-loaded {
  margin-top: 16px !important;
}
.schedule-countdown {
  display: inline-flex;
  min-width: 94px;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #1d4ed8;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.schedule-countdown.due {
  background: #fff0cf;
  color: #8a5b10;
}

/* Max Sender v30: premium login, organization-code access and scheduling editor */
body.auth-pending > .app-header,
body.auth-pending > .tabs,
body.auth-pending > .dashboard,
body.auth-pending > .toast,
body.auth-pending > .emoji-picker {
  visibility: hidden !important;
  pointer-events: none !important;
}
.login-page-dialog {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #f4f7fb;
  overflow: auto;
}
.login-page-dialog::backdrop { background: #f4f7fb; }
.login-page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr);
  background: #f4f7fb;
}
.login-marketing-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(32px, 5vw, 72px);
  color: #fff;
  background:
    radial-gradient(circle at 80% 18%, rgba(247,165,27,.25), transparent 30%),
    radial-gradient(circle at 16% 82%, rgba(30,99,255,.28), transparent 34%),
    linear-gradient(145deg, #0c1930 0%, #10284f 54%, #144a91 100%);
  overflow: hidden;
}
.login-marketing-panel::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -140px;
  width: 440px;
  height: 440px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  box-shadow: 0 0 0 55px rgba(255,255,255,.03), 0 0 0 110px rgba(255,255,255,.025);
}
.login-marketing-brand,
.login-marketing-copy,
.login-marketing-footer { position: relative; z-index: 1; }
.login-marketing-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  font-weight: 900;
  font-size: 22px;
}
.login-marketing-brand img {
  width: 150px;
  height: 62px;
  object-fit: contain;
}
.login-marketing-copy { max-width: 760px; margin: auto 0; }
.login-eyebrow {
  display: inline-flex;
  padding: 7px 12px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.login-marketing-copy h1 {
  max-width: 760px;
  margin: 22px 0 16px;
  color: #fff;
  font-size: clamp(34px, 4.3vw, 64px);
  line-height: 1.04;
  letter-spacing: -.035em;
}
.login-marketing-copy > p {
  max-width: 680px;
  color: #d9e7ff;
  font-size: 17px;
  line-height: 1.7;
}
.login-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
  margin-top: 34px;
}
.login-feature-grid article {
  padding: 17px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(10px);
}
.login-feature-grid strong,
.login-feature-grid span { display: block; }
.login-feature-grid strong { margin-bottom: 7px; color: #fff; font-size: 14px; }
.login-feature-grid span { color: #c9daf8; font-size: 12px; line-height: 1.5; }
.login-marketing-footer { color: #b9cae8; font-size: 12px; }
.login-form-panel {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: clamp(28px, 5vw, 72px);
  background: linear-gradient(180deg, #f9fbff, #eef4fb);
}
.login-form-card {
  width: min(100%, 470px);
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid #d8e4f5;
  border-radius: 24px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 28px 70px rgba(16,33,63,.15);
}
.login-form-badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eaf2ff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.login-form-card h2 { margin: 18px 0 7px; font-size: 32px; color: #10213f; }
.login-form-card > p { color: #687a95; }
.login-form-card label {
  display: grid;
  gap: 7px;
  margin: 17px 0;
  color: #223553;
  font-size: 13px;
  font-weight: 800;
}
.login-form-card .input { min-height: 48px; border-radius: 12px; }
.login-form-card .btn { min-height: 48px; margin-top: 6px; border-radius: 12px; }
.login-form-card .login-note { margin-top: 17px; font-size: 11px; line-height: 1.5; }
.reschedule-modal { width: min(520px, calc(100vw - 30px)); }
.reschedule-picker-label { display: grid; gap: 8px; margin: 18px 0; font-weight: 800; }
.reschedule-picker-label .input { min-height: 48px; }
@media (max-width: 980px) {
  .login-page-shell { grid-template-columns: 1fr; }
  .login-marketing-panel { min-height: auto; padding: 30px 24px; }
  .login-marketing-copy { margin: 46px 0 20px; }
  .login-marketing-copy h1 { font-size: 36px; }
  .login-feature-grid { grid-template-columns: 1fr; }
  .login-form-panel { min-height: auto; padding: 34px 20px 60px; }
}

.loaded-pagination{display:flex;gap:6px;flex-wrap:wrap;justify-content:center;margin-top:12px}.loaded-page-btn{min-width:38px}.loaded-page-btn.active{background:#1d4ed8!important;color:#fff!important}.editing-campaign-banner{margin-bottom:12px;padding:12px 14px;border:1px solid #f7a51b;border-radius:12px;background:#fff8e8;color:#714600;font-weight:700}.sequence-builder{display:grid;grid-template-columns:minmax(240px,1fr) auto;gap:10px;align-items:center;margin:14px 0;padding:12px;border:1px solid #dbeafe;border-radius:12px;background:#f8fbff}.sequence-builder small{grid-column:1/-1;color:#64748b}.sequence-check{width:17px;height:17px}.sequence-status-running{color:#0d8f5f;font-weight:800}

.pagination-ellipsis{display:inline-flex;align-items:center;justify-content:center;min-width:24px;color:#64748b;font-weight:700}

.sequence-countdown { color:#1d4ed8; font-weight:800; font-size:12px; }


/* Max Sender v33: list form, direct login launch, separate sequence schedule */
.group-list-form-dialog { width: min(680px, calc(100vw - 28px)); }
.group-list-form-grid { grid-template-columns: 1.5fr 1fr; margin-bottom: 12px; }
.group-list-form-dialog label { display: grid; gap: 6px; color: #0f2a4f; font-weight: 700; }
.campaign-sequence-panel { margin-top: 18px; border-color: #bfd8ff !important; }
.campaign-sequence-panel .sequence-builder { margin: 12px 0 16px; }
.sequence-countdown { display: inline-flex; margin-top: 5px; padding: 4px 8px; border-radius: 999px; background: #eaf2ff; color: #1d4ed8; font-weight: 800; font-variant-numeric: tabular-nums; }
.sequence-countdown.due { background: #fff0cf; color: #8a5b10; }
@media (max-width: 700px) { .group-list-form-grid { grid-template-columns: 1fr; } }

/* Max Sender v34: sequence schedule table mirrors campaign schedule format */
.sequence-schedule-table-wrap {
  margin: 14px 0 16px;
  border: 1px solid #d8e6fb;
  border-radius: 14px;
  background: #fff;
}
#campaignSequenceTable td:nth-child(7),
#campaignSequenceTable td:nth-child(8) {
  white-space: nowrap;
  font-weight: 700;
  color: #173b74;
}
#campaignSequenceTable .sequence-countdown {
  display: inline-flex;
  min-width: 92px;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef5ff;
  color: #1d4ed8;
  font-weight: 800;
}

/* Max Sender v36: fixed one-line live progress and sequence manager */
.live-progress-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(120px, 1fr)) !important;
  gap: 10px !important;
  overflow-x: auto;
}
.live-progress-grid .summary-card { min-width: 120px; }
#sequenceItemsTable th:nth-child(2), #sequenceItemsTable td:nth-child(2),
#sequenceItemsTable th:nth-child(3), #sequenceItemsTable td:nth-child(3) { min-width: 180px; }
#sequenceItemsTable th:last-child, #sequenceItemsTable td:last-child { min-width: 330px; }

/* Max Sender v38: standard restrained action buttons */
.btn {
  border-radius: 10px !important;
  box-shadow: none !important;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease !important;
}
.btn-primary {
  color: #ffffff !important;
  background: #2563eb !important;
  border-color: #2563eb !important;
  box-shadow: none !important;
}
.btn-primary:hover {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
}
.btn-secondary,
.btn-warning {
  color: #24344d !important;
  background: #ffffff !important;
  border-color: #cbd8e8 !important;
  box-shadow: none !important;
}
.btn-secondary:hover,
.btn-warning:hover,
.btn-muted:hover {
  color: #1d4ed8 !important;
  background: #f4f7fb !important;
  border-color: #aebfd6 !important;
}
.btn-muted {
  color: #24344d !important;
  background: #f8fafc !important;
  border-color: #d6e0ec !important;
}
.btn-danger {
  color: #b42318 !important;
  background: #ffffff !important;
  border-color: #efb7b2 !important;
  box-shadow: none !important;
}
.btn-danger:hover {
  color: #ffffff !important;
  background: #c93d36 !important;
  border-color: #c93d36 !important;
}
.btn:disabled {
  opacity: .55 !important;
  cursor: not-allowed !important;
}
.account-gate{margin:10px auto 0;max-width:1480px;padding:10px 16px;border-radius:10px;font-size:13px;font-weight:600}.account-gate.ready{background:#eaf8f1;border:1px solid #a9dfc2;color:#126c45}.account-gate.warning{background:#fff7e6;border:1px solid #f0cd7d;color:#7f5500}.server-config-box,.bridge-devices-box{margin-top:20px;padding-top:18px;border-top:1px solid #dce5ef}.paired-block{background:#fff;border:1px solid #dbe5f2;border-radius:10px;padding:12px}.paired-block strong,.paired-block small{display:block}.paired-block small{margin-top:3px;color:#6a7890}.full{width:100%;margin-top:12px}

/* v1.0.38.7 focused contact actions and list pagination */
.contact-actions{flex-wrap:nowrap;gap:6px}.contact-actions .btn{padding:6px 10px}.list-pagination{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:10px;min-height:34px}.list-pagination[hidden]{display:none}.list-pagination span{color:var(--muted,#64748b);font-size:13px}.list-pagination .btn:disabled{opacity:.45;cursor:not-allowed}#contactFormError:empty{display:none}@media(max-width:720px){.list-pagination{justify-content:center;flex-wrap:wrap}.contact-actions{flex-wrap:wrap}}
