:root {
  --bg: #edf2f8;
  --bg-soft: #ffffff;
  --card: #ffffff;
  --text: #253247;
  --muted: #68809f;
  --accent: #27b9ef;
  --accent-strong: #2f86f6;
  --border: #dde6f2;
  --shadow-soft: 0 16px 40px rgba(21, 40, 68, 0.08);
  --gradient-primary: linear-gradient(135deg, #27b9ef 0%, #56d8c9 100%);
  --gradient-blue: linear-gradient(135deg, #3f97ff 0%, #66d2ff 100%);
  --gradient-cyan: linear-gradient(135deg, #2eb7e6 0%, #7ae0d0 100%);
  --gradient-green: linear-gradient(135deg, #72d7a5 0%, #9eeab6 100%);
  --gradient-teal: linear-gradient(135deg, #35c7d9 0%, #70dfca 100%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", "Helvetica Neue", sans-serif;
  background: #f4f6fa;
  color: var(--text);
  min-height: 100vh;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 104px;
  padding: 0 28px;
  background: #fff;
  border-bottom: 1px solid #e9eef5;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(20, 35, 90, 0.03);
}

.app-header-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  max-width: none;
  min-width: 0;
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.topbar-logo {
  display: block;
  height: 80px;
  width: auto;
  object-fit: contain;
}

.search-box {
  width: min(580px, 100%);
  height: 48px;
  background: #f4f6fa;
  border: 1px solid #edf1f6;
  border-radius: 14px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  margin-left: 12px;
}

.search-box svg {
  color: #98a2b3;
  flex-shrink: 0;
}

.header-search-input {
  width: 100%;
  height: auto;
  margin-top: 0;
  border: none;
  outline: none;
  border-radius: 0;
  background: transparent;
  color: #475467;
  padding: 0;
  font-size: 16px;
  font-weight: 500;
}

.header-search-input:focus {
  outline: none;
}

.header-search-input::placeholder {
  color: #98a2b3;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: 24px;
}

.notification-btn {
  width: 42px;
  min-width: 42px;
  height: 42px;
  margin-top: 0;
  border: none;
  background: transparent;
  border-radius: 999px;
  color: #98a2b3;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
}

.notification-btn:hover {
  background: #f4f6fa;
  color: #344054;
}

.profile-dropdown {
  position: relative;
}

.profile-btn {
  width: auto;
  height: 52px;
  margin-top: 0;
  padding: 0 18px 0 10px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(90deg, #26bdf0 0%, #57d6c9 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: 0.2s ease;
}

.profile-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(38, 189, 240, 0.18);
}

.avatar-initials {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #1f5f95;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
}

.avatar-initials-sm {
  width: 34px;
  height: 34px;
}

.app-shell {
  display: flex;
  min-height: calc(100vh - 104px);
  padding: 0;
  gap: 0;
}

.app-sidebar {
  width: 270px;
  background: #fff;
  border-right: 1px solid #e9eef5;
  border-radius: 0;
  box-shadow: 0 0 20px rgba(20, 35, 90, 0.04);
  padding: 0;
  position: sticky;
  top: 104px;
  align-self: stretch;
  min-height: calc(100vh - 104px);
  height: auto;
  max-height: calc(100vh - 104px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 500;
  overflow: hidden;
}

.sidebar-top {
  padding: 12px 0 0;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.logo-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--gradient-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
}

.logo-text {
  display: grid;
  line-height: 1.1;
}

.logo-text strong {
  font-size: 20px;
  color: #23b9ef;
  font-weight: 700;
}

.logo-text span {
  font-size: 11px;
  color: #98a4b5;
  margin-top: 3px;
}

.nav-menu {
  padding: 10px 0;
}

.app-menu {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-item {
  margin: 3px 0;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 14px 24px;
  font-size: 17px;
  font-weight: 500;
  color: #5d6b7d;
  border-left: 4px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-link:hover {
  background: #f7fbfd;
  color: #1d2939;
}

.nav-link-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #98a4b5;
  flex-shrink: 0;
}

.submenu-arrow {
  font-size: 18px;
  color: #98a4b5;
}

.nav-item.active .nav-link {
  background: linear-gradient(90deg, #1db8f0 0%, #67d6c6 100%);
  color: #fff;
  border-left-color: #1aa9df;
}

.nav-item.active .nav-icon,
.nav-item.active .submenu-arrow {
  color: #fff;
}

.sidebar-user {
  border-top: 1px solid #f0f3f8;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid #f2f5f9;
  font-size: 14px;
}

.user-info {
  display: grid;
  gap: 3px;
}

.user-info strong {
  display: block;
  font-size: 15px;
  color: #344054;
  font-weight: 700;
}

.user-info span {
  font-size: 13px;
  color: #98a2b3;
}

.app-content {
  flex: 1;
  background: #f4f6fa;
  border-radius: 0;
  box-shadow: none;
  padding: 32px;
  display: grid;
  gap: 20px;
  align-content: start;
}

#dashboard,
#leads,
#verwaltung {
  scroll-margin-top: 112px;
}

.card {
  background: var(--card);
  border: 1px solid #e8eff8;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 14px 34px rgba(20, 40, 66, 0.07);
}

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

h1, h2, h3 {
  color: #24344b;
}

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

.dashboard-intro-card {
  background: #fff;
}

.dashboard-intro-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.dashboard-intro-head h1 {
  margin: 0;
  font-size: clamp(2rem, 2.8vw, 2.8rem);
  line-height: 1.05;
}

.dashboard-chip {
  display: inline-flex;
  align-items: center;
  width: auto;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 800;
  color: #2f7fcb;
  background: #edf6ff;
  border: 1px solid #d8eaff;
}

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

.dashboard-stat-card {
  min-height: 132px;
  border-radius: 18px;
  padding: 20px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 16px 30px rgba(43, 169, 200, 0.2);
}

.dashboard-stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.28rem;
}

.dashboard-stat-number {
  display: block;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1;
  margin-bottom: 6px;
}

.dashboard-stat-label {
  font-size: 0.95rem;
  font-weight: 700;
}

.stat-blue {
  background: var(--gradient-blue);
}

.stat-cyan {
  background: var(--gradient-cyan);
}

.stat-green {
  background: var(--gradient-green);
}

.stat-teal {
  background: var(--gradient-teal);
}

.welcome-dashboard-card {
  overflow: hidden;
}

.welcome-dashboard-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 18px;
  align-items: center;
}

.welcome-dashboard-copy h2 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  line-height: 1.18;
}

.welcome-dashboard-copy p {
  margin: 0 0 22px;
  max-width: 58ch;
}

.welcome-dashboard-visual {
  position: relative;
  min-height: 180px;
  border-radius: 20px;
  background: linear-gradient(145deg, #f2f8ff 0%, #f9fcff 100%);
  border: 1px solid #e2edf9;
}

.welcome-dashboard-visual .visual-dot {
  position: absolute;
  top: 26px;
  left: 24px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gradient-primary);
}

.welcome-dashboard-visual .visual-card {
  position: absolute;
  top: 52px;
  left: 24px;
  right: 24px;
  height: 72px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e3edf8;
  box-shadow: 0 10px 20px rgba(37, 73, 118, 0.08);
}

.welcome-dashboard-visual .visual-line {
  position: absolute;
  bottom: 28px;
  left: 24px;
  width: 62%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #40b8ff 0%, #82dec4 100%);
}

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

.stat {
  background: #fbfdff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

.stat h3 {
  margin: 0;
  font-size: 28px;
}

label {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
}

input, textarea, select, button {
  width: 100%;
  margin-top: 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
}

button {
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  border: none;
  font-weight: 700;
}

button:hover {
  background: var(--accent-strong);
}

pre {
  background: #f6f9ff;
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 10px;
  overflow-x: auto;
  color: #264062;
}

.hosted-page {
  background: var(--d-page-bg, transparent);
  font-family: var(--d-body-font, Inter, system-ui, sans-serif);
  font-size: var(--d-body-size, 14px);
  color: var(--d-body-color, #1b2230);
  position: relative;
  min-height: 100vh;
}

.hosted-page .card {
  background: var(--d-card-bg, #fff);
  border-radius: var(--d-radius, 12px);
}

/* Headings — use heading typography */
.hosted-page h1,
.hosted-page h2,
.hosted-page h3,
.hosted-page #liveTitle {
  font-family: var(--d-heading-font, Inter, sans-serif);
  font-size: var(--d-heading-size, 22px);
  color: var(--d-heading-color, #1a2947);
  font-weight: 700;
}
.hosted-page h1 { font-size: calc(var(--d-heading-size, 22px) * 1.25); }
.hosted-page h2 { font-size: calc(var(--d-heading-size, 22px) * 1.1); }
.hosted-page h3 { font-size: var(--d-heading-size, 22px); }

/* Description (the <p id="liveDescription"> under the title, plus step description <p>) */
.hosted-page #liveDescription,
.hosted-page .live-step-body > p,
.hosted-page .cf-preview-field p {
  font-family: var(--d-description-font, Inter, sans-serif);
  font-size: var(--d-description-size, 14px);
  color: var(--d-description-color, #4f5c75);
}

/* Body text */
.hosted-page p,
.hosted-page label {
  font-family: var(--d-body-font, Inter, sans-serif);
  font-size: var(--d-body-size, 14px);
  color: var(--d-body-color, #4f5c75);
}

/* Option labels */
.hosted-page .preview-option span,
.hosted-page .live-option-card span {
  font-family: var(--d-option-font, Inter, sans-serif);
  font-size: var(--d-option-size, 14px);
  color: var(--d-option-color, #30486b);
}

/* Input fields */
.hosted-page input,
.hosted-page textarea,
.hosted-page select {
  background: var(--d-field-bg, #fff);
  color: var(--d-input-color, #1b2230);
  border: 1px solid var(--d-field-border, #c9d4e6);
  border-radius: var(--d-radius, 8px);
  font-family: var(--d-input-font, Inter, sans-serif);
  font-size: var(--d-input-size, 14px);
}

.hosted-page input:hover,
.hosted-page textarea:hover,
.hosted-page select:hover {
  background: var(--d-field-hover-bg, #f7fbff);
}

.hosted-page input:focus,
.hosted-page textarea:focus,
.hosted-page select:focus {
  outline: none;
  border-color: var(--d-accent, #2f6ef5);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.15);
}

/* Buttons (form submit, contact submit) */
.hosted-page button {
  background: var(--d-button-bg, #2f6ef5);
  color: var(--d-button-color, #fff);
  border: none;
  border-radius: var(--d-radius, 8px);
  font-family: var(--d-button-font, inherit);
  font-size: var(--d-button-size, 14px);
}

.hosted-page button:hover:not(:disabled):not(.live-nav-arrow):not(.secondary-button) {
  background: var(--d-accent-hover, #2e6af3);
}

/* Live-form scoped overrides */
.hosted-page .live-step-card {
  background: var(--d-card-bg, #fff);
  border-color: var(--d-border, #dbe4f2);
  border-radius: var(--d-radius, 14px);
}

.hosted-page .live-step-actions {
  background: var(--d-card-bg, #f8fbff);
  border-top-color: var(--d-border, #e1e9f6);
}

.hosted-page .preview-option,
.hosted-page .live-option-card {
  background: var(--d-field-bg, #fff);
  border-color: var(--d-field-border, #d6e1f2);
  border-radius: var(--d-radius, 10px);
}

.hosted-page .live-option-card:hover {
  background: var(--d-field-hover-bg, #f7fbff);
  border-color: var(--d-accent, #87b1ff);
}

.hosted-page .live-option-card.active,
.hosted-page .preview-option.active {
  border-color: var(--d-active, #5e97ff);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.16);
  background: var(--d-field-hover-bg, #f7fbff);
}

.hosted-page .preview-option-icon {
  color: var(--d-accent, #335b9f);
}

/* Navigation buttons */
.hosted-page .live-nav-arrow {
  background: var(--d-card-bg, #fff);
  color: var(--d-body-color, #4a6686);
  border-color: var(--d-border, #d6e1f2);
}

.hosted-page .live-nav-arrow:hover:not(:disabled) {
  background: var(--d-accent, #4f88f7);
  color: #fff;
  border-color: var(--d-accent, #4f88f7);
}

.hosted-page .live-progress-fill {
  background: linear-gradient(90deg, var(--d-accent, #4f8cff) 0%, var(--d-accent-hover, #2e6af3) 100%);
}

.hosted-page .live-contact-submit {
  background: var(--d-button-bg, #2f6ef5);
  color: var(--d-button-color, #fff);
  border-radius: var(--d-radius, 10px);
  font-family: var(--d-button-font, inherit);
  font-size: var(--d-button-size, 14px);
}

.hosted-page .live-contact-submit:hover {
  background: var(--d-accent-hover, #2e6af3);
}

.af2-builder-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.af2-builder-shell {
  padding: 16px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.af2-builder-sidebar {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  min-width: 0;
}

.af2-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}

.af2-section {
  margin-top: 18px;
}

.af2-overview-section {
  margin-top: 10px;
}

.af2-overview-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.af2-overview-item {
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: #fbfdff;
  color: #35527c;
}

.af2-overview-item strong {
  display: block;
  margin-bottom: 4px;
}

.af2-overview-item small {
  color: var(--muted);
}

.af2-overview-empty {
  margin: 0;
  padding: 10px;
  border: 1px dashed #cbd9ee;
  border-radius: 10px;
  color: #607694;
  background: #f8fbff;
}

.af2-workspace-overview {
  display: grid;
  place-content: center;
  min-height: 640px;
  text-align: center;
}

.af2-palette {
  display: grid;
  gap: 8px;
}

.af2-palette-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  cursor: grab;
  background: #fbfdff;
}

.af2-palette-item:active {
  cursor: grabbing;
}

.af2-palette-item strong {
  display: block;
  margin-bottom: 4px;
}

.af2-palette-item small {
  color: var(--muted);
}

.af2-builder-status {
  margin-top: 14px;
  color: #6d7f98;
}

.af2-current-funnel {
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fbff;
  color: #476388;
}

.af2-funnel-rename {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 10px;
}

.af2-funnel-rename input {
  min-width: 0;
}

.af2-section-link {
  display: inline-block;
  margin: 0 0 8px;
  color: #245dcf;
  font-size: 0.92rem;
  text-decoration: none;
}

.af2-section-link:hover {
  text-decoration: underline;
}

.af2-builder-workspace {
  min-height: calc(100vh - 188px);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

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

.af2-whiteboard-shell {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.af2-whiteboard-controls {
  position: absolute;
  top: 12px;
  left: 12px;
  right: auto;
  z-index: 40;
  padding: 8px;
  max-width: calc(100% - 24px);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #d7e3f5;
  box-shadow: 0 6px 16px rgba(20, 38, 61, 0.12);
}

.af2-zoom-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.af2-zoom-container button {
  min-width: 38px;
  width: auto;
  height: 34px;
  padding: 0 10px;
}

#af2ZoomOut,
#af2ZoomIn {
  width: 38px;
  padding: 0;
}

.af2-history-container {
  display: flex;
  align-items: center;
  gap: 4px;
}

.af2-history-container button {
  min-width: 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.af2-history-container button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.af2-builder-stage {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: auto;
  width: 100%;
  max-width: 100%;
  height: calc(100vh - 218px);
  min-height: 600px;
  background:
    linear-gradient(to right, rgba(53, 87, 138, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(53, 87, 138, 0.08) 1px, transparent 1px),
    #f8fbff;
  background-size: 28px 28px;
  cursor: grab;
}

.af2-builder-stage.is-panning {
  cursor: grabbing;
}

#af2WorkspaceBuilder {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.af2-builder-canvas {
  position: relative;
  width: 2200px;
  height: 1400px;
}

.af2-edge-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

.af2-edge-path {
  stroke: #5b92ff;
  stroke-width: 2.5;
  fill: none;
  pointer-events: stroke;
}

.af2-edge-path.temp {
  stroke-dasharray: 6 4;
  opacity: 0.75;
}

.af2-edge-path.temp.will-snap {
  stroke: #22c55e;
  stroke-width: 3;
  stroke-dasharray: none;
  opacity: 1;
}

.af2-edge-group:hover .af2-edge-path {
  stroke: #e04e4e;
}

.af2-edge-delete,
.af2-edge-delete-icon {
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: all;
}

.af2-edge-group:hover .af2-edge-delete,
.af2-edge-group:hover .af2-edge-delete-icon {
  opacity: 1;
}

.af2-edge-delete {
  fill: #fff;
  stroke: #e04e4e;
  stroke-width: 1;
  cursor: pointer;
}

.af2-edge-delete-icon {
  font-size: 11px;
  cursor: pointer;
}

.af2-node-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.af2-node {
  position: absolute;
  width: 240px;
  min-height: 92px;
  border: 1px solid #cad8ed;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(35, 59, 92, 0.1);
  user-select: none;
  pointer-events: auto;
}

.af2-node.is-connecting {
  box-shadow: 0 0 0 2px #6f9cff, 0 8px 20px rgba(35, 59, 92, 0.1);
}

.af2-node.is-selected {
  box-shadow: 0 0 0 3px #4f88f7, 0 8px 28px rgba(35, 59, 92, 0.22);
  border-color: #4f88f7;
}

.af2-node.is-drop-target {
  box-shadow: 0 0 0 3px #22c55e, 0 8px 28px rgba(34, 197, 94, 0.35);
  border-color: #22c55e;
  transition: box-shadow 0.12s ease, border-color 0.12s ease;
  cursor: crosshair;
}

.af2-node {
  cursor: pointer;
}

.af2-node .af2-node-out,
.af2-node .af2-node-in,
.af2-node .af2-node-delete {
  cursor: default;
}

.af2-node .af2-node-out {
  cursor: crosshair;
}

.af2-node .af2-node-delete {
  cursor: pointer;
}

/* ── Question Answer Options Builder (settings panel) ─────────────────────── */
.af2-opt-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.af2-opt-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.af2-opt-media-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: 1px solid #cad8ed;
  background: #f9fbff;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  color: #89a;
  font-size: 14px;
  transition: border-color 0.12s, background 0.12s;
}

.af2-opt-media-btn:hover {
  border-color: #6f9cff;
  background: #fff;
  color: #4f88f7;
}

.af2-opt-media-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.af2-opt-media-placeholder {
  font-size: 18px;
  color: #aab;
  font-weight: 300;
}

.af2-opt-input {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  border: 1px solid #cad8ed;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
}

.af2-opt-input:focus {
  outline: none;
  border-color: #6f9cff;
}

.af2-opt-remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 1px solid #e2eaf5;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: #888;
  padding: 0;
  transition: all 0.12s;
}

.af2-opt-remove:hover {
  background: #e04e4e;
  color: #fff;
  border-color: #e04e4e;
}

.af2-opt-add-btn {
  margin-top: 8px;
  width: 100%;
  padding: 6px;
  background: #f0f5fc;
  border: 1px dashed #a9c0e0;
  border-radius: 6px;
  color: #4f88f7;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.12s, border-color 0.12s;
}

.af2-opt-add-btn:hover {
  background: #e6efff;
  border-color: #4f88f7;
}

.af2-opt-empty {
  font-size: 12px;
  color: #889;
  font-style: italic;
  padding: 8px;
  margin: 0;
  text-align: center;
}

/* ── Design Modal (split layout: controls + live preview) ─────────────────── */
.modal-content.af2-design-modal {
  width: min(1400px, 98vw);
  max-width: none;
  height: 92vh;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.af2-design-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #e2eaf5;
}

.af2-design-header h2 { margin: 0; font-size: 17px; }

.af2-design-split {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden;
  min-height: 0;
}

.af2-design-controls {
  padding: 14px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-right: 1px solid #e2eaf5;
  background: #fbfcff;
}

.af2-design-section h4 {
  margin: 0 0 8px;
  font-size: 12px;
  color: #3f5c84;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Generic row: font / size / color inline */
.dsn-type-row {
  display: grid;
  grid-template-columns: 1fr 70px 40px;
  gap: 6px;
  align-items: center;
}

.dsn-type-row select,
.dsn-type-row input[type="number"] {
  padding: 5px 8px;
  border: 1px solid #cad8ed;
  border-radius: 6px;
  font-size: 12px;
  background: #fff;
  min-width: 0;
}

.dsn-type-row input[type="color"] {
  width: 40px;
  height: 30px;
  padding: 0;
  border: 1px solid #cad8ed;
  border-radius: 5px;
  cursor: pointer;
  background: transparent;
}

/* General grid (card-bg, border, etc.) */
.dsn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
}

.dsn-grid label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #556;
  padding: 5px 10px;
  border: 1px solid #e2eaf5;
  border-radius: 6px;
  background: #fff;
}

.dsn-grid label input[type="color"] {
  width: 32px;
  height: 26px;
  padding: 0;
  border: 1px solid #cad8ed;
  border-radius: 4px;
  cursor: pointer;
  background: transparent;
}

.dsn-num-small {
  width: 60px !important;
  padding: 4px 8px !important;
  border: 1px solid #cad8ed;
  border-radius: 5px;
  font-size: 12px;
}

/* ── WYSIWYG Preview pane ────────────────────────────────────────────────── */
.af2-design-preview-wrap {
  padding: 14px 18px;
  overflow-y: auto;
  background:
    linear-gradient(45deg, #f0f4fa 25%, transparent 25%),
    linear-gradient(-45deg, #f0f4fa 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f0f4fa 75%),
    linear-gradient(-45deg, transparent 75%, #f0f4fa 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-color: #f7fafe;
}

.af2-design-preview-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7e8fa8;
  margin-bottom: 8px;
}

.af2-design-preview-frame {
  --d-radius: 12px;
  --d-card-bg: #ffffff;
  --d-border: #d6e1f2;
  --d-field-bg: #ffffff;
  --d-field-border: #d6e1f2;
  --d-field-hover-bg: #f7fbff;
  --d-active: #4f88f7;
  --d-accent: #4f88f7;
  --d-accent-hover: #2e6af3;
  --d-button-bg: #4f88f7;
}

.af2-dpv-card {
  background: var(--d-card-bg);
  border: 1px solid var(--d-border);
  border-radius: var(--d-radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.af2-dpv-heading {
  margin: 0;
  font-family: var(--d-heading-font);
  font-size: var(--d-heading-size);
  color: var(--d-heading-color);
  font-weight: 700;
}

.af2-dpv-desc {
  margin: 0;
  font-family: var(--d-description-font);
  font-size: var(--d-description-size);
  color: var(--d-description-color);
}

.af2-dpv-body {
  font-family: var(--d-body-font);
  font-size: var(--d-body-size);
  color: var(--d-body-color);
}

.af2-dpv-body p { margin: 0; }

.af2-dpv-options {
  display: grid;
  gap: 8px;
}

.af2-dpv-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--d-field-bg);
  border: 1px solid var(--d-field-border);
  border-radius: var(--d-radius);
  cursor: pointer;
  transition: all 0.15s ease;
}

.af2-dpv-option:hover {
  background: var(--d-field-hover-bg);
}

.af2-dpv-option.active {
  border-color: var(--d-active);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.16);
  background: var(--d-field-hover-bg);
}

.af2-dpv-option i {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--d-accent);
  font-size: 14px;
}

.af2-dpv-option span {
  font-family: var(--d-option-font);
  font-size: var(--d-option-size);
  color: var(--d-option-color);
}

.af2-dpv-input {
  padding: 10px 12px;
  background: var(--d-field-bg);
  border: 1px solid var(--d-field-border);
  border-radius: var(--d-radius);
  font-family: var(--d-input-font);
  font-size: var(--d-input-size);
  color: var(--d-input-color);
}

.af2-dpv-input:focus {
  outline: none;
  border-color: var(--d-accent);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.15);
}

.af2-dpv-button {
  align-self: flex-start;
  padding: 10px 20px;
  background: var(--d-button-bg);
  color: var(--d-button-color);
  border: none;
  border-radius: var(--d-radius);
  font-family: var(--d-button-font);
  font-size: var(--d-button-size);
  cursor: pointer;
  transition: background 0.15s ease;
}

.af2-dpv-button:hover {
  background: var(--d-accent-hover);
}

.af2-dpv-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.af2-dpv-nav-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--d-card-bg);
  color: var(--d-body-color);
  border: 1px solid var(--d-border);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.af2-dpv-progress {
  flex: 1;
  height: 4px;
  background: #e6eefb;
  border-radius: 999px;
  overflow: hidden;
}

.af2-dpv-progress-fill {
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, var(--d-accent) 0%, var(--d-accent-hover) 100%);
  border-radius: 999px;
}

/* Footer */
.af2-design-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-top: 1px solid #e2eaf5;
  background: #f9fbff;
  gap: 8px;
}

.af2-design-footer .primary-button {
  background: #4f88f7;
  color: #fff;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
}

.af2-design-footer .primary-button:hover { background: #2e6af3; }

/* Responsive breakpoints */

/* Medium screens: still split but with slightly narrower preview */
@media (max-width: 1100px) {
  .af2-design-split {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
}

/* Tablet portrait & below: stack controls above preview */
@media (max-width: 820px) {
  .modal-content.af2-design-modal {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .af2-design-split {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .af2-design-controls {
    border-right: none;
    border-bottom: 1px solid #e2eaf5;
    max-height: 50vh;
  }

  .af2-design-preview-wrap {
    max-height: 50vh;
  }

  .af2-design-header h2 { font-size: 15px; }
}

/* Phone: compact controls, single-column grids */
@media (max-width: 520px) {
  .af2-design-header {
    padding: 10px 12px;
  }

  .af2-design-controls,
  .af2-design-preview-wrap {
    padding: 10px 12px;
  }

  .af2-design-footer {
    padding: 10px 12px;
    flex-direction: column-reverse;
    gap: 6px;
  }

  .af2-design-footer button {
    width: 100%;
  }

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

  /* Slightly tighter font/size/color row so it still fits */
  .dsn-type-row {
    grid-template-columns: 1fr 58px 36px;
    gap: 4px;
  }

  .dsn-type-row select {
    min-width: 0;
    font-size: 11px;
  }

  /* Smaller preview card on phones */
  .af2-dpv-card {
    padding: 14px;
    gap: 10px;
  }

  .af2-dpv-option {
    padding: 8px 10px;
  }
}

/* ── Icon / Image Picker Modal ────────────────────────────────────────────── */
.modal-content.af2-icon-picker-modal {
  width: min(640px, 95vw);
  max-width: none;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.af2-icon-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #e2eaf5;
}

.af2-icon-picker-header h3 {
  margin: 0;
  font-size: 16px;
}

.af2-close-btn {
  background: transparent;
  border: none;
  font-size: 22px;
  color: #888;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
}

.af2-close-btn:hover {
  color: #233b5c;
}

.af2-icon-picker-tabs {
  display: flex;
  gap: 2px;
  padding: 8px 14px 0;
  border-bottom: 1px solid #e2eaf5;
}

.af2-icon-picker-tab {
  background: transparent;
  border: none;
  padding: 8px 14px;
  font-size: 13px;
  color: #667;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.12s;
}

.af2-icon-picker-tab.is-active {
  color: #4f88f7;
  border-bottom-color: #4f88f7;
  font-weight: 600;
}

.af2-icon-picker-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
}

.af2-icon-picker-panel[data-panel="icons"] {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.af2-icon-search {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #cad8ed;
  border-radius: 6px;
  font-size: 13px;
}

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

.af2-icon-tile {
  aspect-ratio: 1;
  border: 1px solid #e2eaf5;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #445;
  transition: all 0.12s;
}

.af2-icon-tile:hover {
  background: #4f88f7;
  color: #fff;
  border-color: #4f88f7;
  transform: scale(1.05);
}

.af2-icon-upload-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border: 2px dashed #cad8ed;
  border-radius: 10px;
  background: #f9fbff;
  cursor: pointer;
  text-align: center;
}

.af2-icon-upload-label input[type="file"] {
  align-self: center;
}

.af2-icon-upload-preview img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  margin-top: 10px;
}

.af2-icon-picker-footer {
  display: flex;
  justify-content: flex-end;
  padding: 12px 18px;
  border-top: 1px solid #e2eaf5;
  background: #f9fbff;
}

/* ── Contact Form field builder (settings panel) ────────────────────────── */
.af2-cf-fields-section {
  border-top: 1px solid #e2eaf5;
  padding-top: 10px;
  margin-top: 6px;
}

.af2-cf-fields-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}

.af2-cf-fields-header h4 {
  margin: 0;
  font-size: 13px;
  color: #2c3e50;
}

.af2-cf-add-wrap {
  display: flex;
  gap: 4px;
  align-items: center;
}

.af2-cf-add-wrap select {
  font-size: 12px;
  padding: 4px 6px;
  border: 1px solid #cad8ed;
  border-radius: 6px;
  background: #fff;
}

.af2-cf-add-wrap button {
  padding: 4px 10px;
  font-size: 12px;
}

.af2-cf-field-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.af2-cf-field-card {
  border: 1px solid #dbe4f1;
  border-radius: 8px;
  background: #f9fbff;
  overflow: hidden;
}

.af2-cf-field-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: #eef3fa;
  border-bottom: 1px solid #dbe4f1;
}

.af2-cf-field-drag {
  color: #89a;
  cursor: grab;
  font-size: 12px;
  user-select: none;
}

.af2-cf-field-card-header strong {
  flex: 1;
  font-size: 12px;
  color: #2c3e50;
}

.af2-cf-field-card-actions {
  display: flex;
  gap: 2px;
}

.af2-cf-field-card-actions button {
  width: 22px;
  height: 22px;
  padding: 0;
  font-size: 12px;
  background: transparent;
  border: 1px solid #cad8ed;
  border-radius: 4px;
  cursor: pointer;
  color: #555;
}

.af2-cf-field-card-actions button:hover {
  background: #fff;
  color: #233b5c;
}

.af2-cf-field-card-actions .af2-cf-field-remove:hover {
  background: #e04e4e;
  color: #fff;
  border-color: #e04e4e;
}

.af2-cf-field-card-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.af2-cf-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
}

.af2-cf-row > span {
  color: #556;
  font-size: 11px;
}

.af2-cf-row input[type="text"],
.af2-cf-row textarea,
.af2-cf-row select {
  font-size: 12px;
  padding: 4px 6px;
  border: 1px solid #cad8ed;
  border-radius: 5px;
  background: #fff;
  width: 100%;
}

.af2-cf-row.af2-cf-inline {
  flex-direction: row;
  align-items: center;
  gap: 6px;
}

.af2-cf-empty {
  font-size: 12px;
  color: #889;
  padding: 10px;
  text-align: center;
  border: 1px dashed #cad8ed;
  border-radius: 6px;
  margin: 0;
}

/* ── Contact Form Email Config (in node settings panel) ──────────────────── */
.af2-cf-email-section {
  border-top: 1px solid #e2eaf5;
  padding-top: 10px;
  margin-top: 6px;
}

.af2-cf-email-section h4 {
  margin: 0 0 8px;
  font-size: 12px;
  color: #3f5c84;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.af2-cf-email-section > label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: #556;
  margin-bottom: 8px;
}

.af2-cf-email-section input[type="text"],
.af2-cf-email-section textarea,
.af2-cf-email-section select {
  padding: 6px 8px;
  border: 1px solid #cad8ed;
  border-radius: 6px;
  font-size: 12px;
  background: #fff;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.af2-cf-email-section input:focus,
.af2-cf-email-section textarea:focus,
.af2-cf-email-section select:focus {
  outline: none;
  border-color: #6f9cff;
  box-shadow: 0 0 0 2px rgba(111, 156, 255, 0.15);
}

.af2-cf-email-hint {
  font-size: 11px;
  color: #889;
  margin: -4px 0 6px;
}

.af2-cf-email-hint a {
  color: #4f88f7;
  text-decoration: none;
}

.af2-cf-email-hint a:hover {
  text-decoration: underline;
}

/* ── Contact Form preview on canvas node ────────────────────────────────── */
.af2-cf-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 0;
  margin-top: 4px;
  border-top: 1px dashed #dbe4f1;
}

.af2-cf-prev-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-sizing: border-box;
  padding: 0 2px;
}

.af2-cf-prev-label {
  font-size: 9px;
  color: #778;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.af2-cf-prev-box {
  height: 18px;
  background: #eef3fa;
  border: 1px solid #dbe4f1;
  border-radius: 4px;
  font-size: 10px;
  color: #557;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 4px;
}

.af2-cf-preview-empty {
  font-size: 10px;
  color: #889;
  font-style: italic;
  text-align: center;
  width: 100%;
  padding: 4px 0;
}

.af2-node-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid #e2eaf5;
}

.af2-node-type {
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #4a78c7;
}

.af2-node-delete {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: #f0f5ff;
  color: #35527c;
  cursor: pointer;
}

.af2-node-body {
  padding: 10px;
  display: grid;
  gap: 5px;
}

.af2-node-top-route {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid #e7edf8;
  background: #f4f8ff;
}

.af2-node-top-route-label {
  font-size: 11px;
  font-weight: 700;
  color: #4c6791;
}

.af2-node-body small {
  color: #6d7f98;
}

.af2-node-option-outputs {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.af2-node-output-group {
  border: 1px solid #e1e8f4;
  border-radius: 8px;
  padding: 6px;
  background: #f9fbff;
  display: grid;
  gap: 6px;
}

.af2-node-output-title {
  font-size: 11px;
  font-weight: 700;
  color: #4a6286;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.af2-node-option-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}

.af2-node-option-label {
  font-size: 12px;
  color: #4f6180;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.af2-node-option-empty {
  font-size: 12px;
  color: #6d7f98;
}

.af2-node-option-row-default .af2-node-option-label {
  font-weight: 600;
}

.af2-option-out {
  position: static;
  transform: none;
}

.af2-top-out {
  background: #2f6ef5;
  width: 17px;
  height: 17px;
}

.af2-start-out {
  background: #27b9ef;
  width: 18px;
  height: 18px;
  position: static;
  margin-top: 8px;
}

.af2-node[data-node-type="start"] {
  background: linear-gradient(135deg, #e3f8ff 0%, #eef9ff 100%);
  border: 2px solid #27b9ef;
}

.af2-node[data-node-type="start"] .af2-node-header {
  background: rgba(39, 185, 239, 0.08);
  border-bottom: 2px solid #27b9ef;
}

.af2-node[data-node-type="start"] .af2-node-type {
  color: #27b9ef;
  font-weight: 700;
}

.af2-node-option-row .af2-option-out,
.af2-node-top-route .af2-top-out {
  position: static;
  top: auto;
  right: auto;
  left: auto;
  transform: none;
}

.af2-node-in,
.af2-node-out {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #4f8cff;
  border: 2px solid #fff;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 10;
  pointer-events: all;
}

.af2-node-in {
  left: -8px;
}

.af2-node-out {
  right: -8px;
}

.questions-card {
  width: 100%;
  max-width: none;
}

.questions-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.create-question-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(51, 195, 214, 0.22);
}

.create-question-button:hover {
  background: linear-gradient(135deg, #26aee3 0%, #4fcbc0 100%);
}

.secondary-link {
  color: #3f5f8e;
  text-decoration: none;
  font-weight: 600;
}

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

.question-builder-grid {
  display: grid;
  grid-template-columns: 240px 1fr 320px;
  gap: 14px;
  align-items: start;
}

.question-type-panel,
.question-preview-panel,
.question-edit-panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.type-list {
  display: grid;
  gap: 8px;
}

.type-item {
  width: 100%;
  text-align: left;
  background: #f8fbff;
  color: #35527c;
  border: 1px solid #d7e3f5;
  font-weight: 600;
  cursor: grab;
}

.type-item.dragging {
  opacity: 0.5;
}

.type-item.active {
  background: rgba(79, 140, 255, 0.12);
  border-color: #b9d0fa;
  color: #2f5ea9;
}

.live-preview {
  border: 1px dashed #cad7ec;
  border-radius: 10px;
  padding: 12px;
  background: #fbfdff;
}

.preview-card h4 {
  margin: 0 0 6px;
}

.preview-card p {
  margin: 0 0 10px;
}

.preview-options {
  display: grid;
  gap: 8px;
}

.preview-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: #fff;
  color: #30486b;
  border: 1px solid #d6e1f2;
}

.preview-option.active {
  border-color: #87b1ff;
  box-shadow: 0 0 0 2px rgba(79, 140, 255, 0.15);
}

.preview-option-image {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.preview-option-icon {
  min-width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef4ff;
  color: #335b9f;
  font-size: 14px;
  line-height: 1;
  padding: 0 6px;
  flex-shrink: 0;
  box-sizing: border-box;
}

/* Font Awesome icon itself — make sure the glyph is centered exactly */
i.preview-option-icon::before {
  display: inline-block;
  line-height: 1;
}

.preview-input {
  border: 1px solid #d7e3f5;
  border-radius: 8px;
  padding: 10px;
  color: #4c607f;
  background: #fff;
}

.option-editor {
  display: grid;
  gap: 8px;
}

.edit-help {
  margin: 0;
}

/* icon picker palette for question creation */
.icon-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.icon-palette .icon-item {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f4ff;
  border: 1px solid #d7e3f5;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: #3b5381;
}

.icon-palette .icon-item:hover {
  background: #e4efff;
}

.icon-palette .icon-item.active {
  background: #d0e4ff;
  border-color: #87b1ff;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #3e516d;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.choice-layout-settings {
  display: grid;
  gap: 10px;
  border: 1px solid #d7e3f5;
  border-radius: 10px;
  background: #f8fbff;
  padding: 10px;
  margin-top: 6px;
}

.choice-layout-settings h3 {
  margin: 0;
  font-size: 14px;
  color: #3f5f8e;
}

.choice-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.choice-layout-grid label {
  font-size: 13px;
  color: #3e516d;
}

.choice-layout-grid select {
  margin-top: 5px;
}

.preview-options.layout-desktop-list {
  grid-template-columns: 1fr;
}

.preview-options.layout-desktop-list2 {
  grid-template-columns: 1fr 1fr;
}

.preview-options.layout-desktop-list .preview-option,
.preview-options.layout-desktop-list2 .preview-option {
  justify-content: flex-start;
}

.preview-options.layout-desktop-list .preview-option span,
.preview-options.layout-desktop-list2 .preview-option span {
  text-align: left;
}

.preview-options.layout-desktop-grid .preview-option.has-media,
.preview-options.layout-mobile-grid .preview-option.has-media,
.live-choice-desktop-grid .live-option-card.has-media,
.live-choice-mobile-grid .live-option-card.has-media {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  padding: 0;
  overflow: hidden;
  text-align: center;
}

/* Unified fixed-height media area for BOTH image and icon — prevents label shift */
.preview-options.layout-desktop-grid .preview-option.has-media .preview-option-image,
.preview-options.layout-mobile-grid .preview-option.has-media .preview-option-image,
.live-choice-desktop-grid .live-option-card.has-media .preview-option-image,
.live-choice-mobile-grid .live-option-card.has-media .preview-option-image,
.preview-options.layout-desktop-grid .preview-option.has-media .preview-option-icon,
.preview-options.layout-mobile-grid .preview-option.has-media .preview-option-icon,
.live-choice-desktop-grid .live-option-card.has-media .preview-option-icon,
.live-choice-mobile-grid .live-option-card.has-media .preview-option-icon {
  width: 100%;
  min-width: 100%;
  height: 110px;
  max-height: 110px;
  flex: 0 0 110px;
  border: none;
  border-radius: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Image-specific: cover-fit crops overflow */
.preview-options.layout-desktop-grid .preview-option.has-media .preview-option-image,
.preview-options.layout-mobile-grid .preview-option.has-media .preview-option-image,
.live-choice-desktop-grid .live-option-card.has-media .preview-option-image,
.live-choice-mobile-grid .live-option-card.has-media .preview-option-image {
  object-fit: cover;
  display: block;
}

/* Icon-specific: larger glyph, still centered in the fixed-height area */
.preview-options.layout-desktop-grid .preview-option.has-media .preview-option-icon,
.preview-options.layout-mobile-grid .preview-option.has-media .preview-option-icon,
.live-choice-desktop-grid .live-option-card.has-media .preview-option-icon,
.live-choice-mobile-grid .live-option-card.has-media .preview-option-icon {
  font-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Label fills remaining space — labels across cards align consistently */
.preview-options.layout-desktop-grid .preview-option.has-media > span:last-child,
.preview-options.layout-mobile-grid .preview-option.has-media > span:last-child,
.live-choice-desktop-grid .live-option-card.has-media > span:last-child,
.live-choice-mobile-grid .live-option-card.has-media > span:last-child {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  width: 100%;
  padding: 12px 14px;
  text-align: center;
  box-sizing: border-box;
}

.options-block {
  border: 1px solid var(--border);
  background: #fbfdff;
  border-radius: 10px;
  padding: 14px;
}

.options-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.options-header-row h3 {
  margin: 0;
}

.secondary-button {
  width: auto;
  background: #edf4ff;
  color: #35527c;
  border: 1px solid #d4e2f7;
}

.secondary-button:hover {
  background: #e4efff;
}

.danger-button {
  width: auto;
  background: #fff1f1;
  color: #9f2f2f;
  border: 1px solid #f0cccc;
}

.danger-button:hover {
  background: #ffe8e8;
}

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

.option-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}

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

.option-upload-row {
  margin-top: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 10px;
  align-items: end;
}

.option-preview {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
  display: none;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
}

.form-actions button {
  width: auto;
}

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

.questions-page {
  background: #f7f8fc;
  border: none;
  box-shadow: none;
  padding: 0;
}

.questions-content {
  padding: 30px;
  background: #f7f8fc;
}

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

.content-topbar h1 {
  margin: 0;
  font-size: 36px;
  font-weight: 700;
  color: #2f3b52;
}

.content-topbar p {
  margin: 8px 0 0;
  color: #6f7d91;
}

.create-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  padding: 14px 24px;
  border-radius: 12px;
  background: linear-gradient(90deg, #35c8f2, #5fd6d2);
  box-shadow: 0 6px 14px rgba(53, 200, 242, 0.2);
  text-decoration: none;
}

.questions-search-box {
  display: flex;
  align-items: center;
  height: 64px;
  margin-bottom: 24px;
  border-radius: 16px;
  padding: 0 18px;
  background: #f2f4f9;
  border: 1px solid #eef1f6;
}

.questions-search-icon {
  font-size: 18px;
  margin-right: 12px;
  opacity: 0.6;
}

.questions-search-box input {
  width: 100%;
  margin: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 18px;
  color: #556070;
  padding: 0;
}

.bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.bulk-btn {
  width: auto;
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
}

.bulk-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.duplicate-btn {
  background: linear-gradient(90deg, #35c8f2, #5fd6d2);
}

.delete-btn {
  background: linear-gradient(90deg, #f78a76, #f26c6c);
}

.table-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.questions-table {
  width: 100%;
  border-collapse: collapse;
}

.questions-table thead {
  background: #fbfcfe;
}

.questions-table th,
.questions-table td {
  padding: 20px 18px;
  text-align: left;
  font-size: 16px;
  color: #4a5568;
  border-bottom: 1px solid #edf1f5;
  vertical-align: middle;
}

.questions-table th {
  font-size: 15px;
  font-weight: 700;
  color: #697386;
}

.questions-table tbody tr:hover {
  background: #fafcff;
}

.checkbox-col {
  width: 44px;
}

.center {
  text-align: center;
}

/* Right-aligned action column in list tables. The selector includes
   `.questions-table` so it beats the table's default `text-align: left`.
   `width: 1%` + `white-space: nowrap` makes the column shrink to its
   content width while still keeping the buttons on one line. */
.questions-table th.actions-col,
.questions-table td.actions-col {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}
.questions-table td.actions-col .inline-actions {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  width: auto;
}
/* Inside the actions column, drop the global 120px min-width on every
   .action-btn — they only need to be as wide as their label so all four
   fit on one line. */
.questions-table td.actions-col .action-btn {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  padding: 8px 14px;
  white-space: nowrap;
}

.questions-table input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #43cbe4;
  cursor: pointer;
}

.check-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #eef2f7;
  color: transparent;
  font-weight: 700;
}

.check-badge.active {
  background: #4fd1c5;
  color: #fff;
}

.inline-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.action-btn {
  width: auto;
  margin-top: 0;
  background: #fff;
  border: 1px solid #e6edf5;
  color: #30b9df;
  font-size: 15px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  min-width: 120px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.action-btn:hover {
  background: #f7fcff;
}

.action-btn-danger {
  color: #dc3f52;
}

.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 18px;
  background: #fff;
}

.table-info {
  color: #697386;
  font-size: 16px;
}

.pagination {
  display: flex;
  gap: 10px;
  align-items: center;
}

.page-btn {
  width: 42px;
  height: 42px;
  margin-top: 0;
  border: 1px solid #e7edf4;
  background: #fff;
  color: #7a8699;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  padding: 0;
}

.page-btn.active {
  background: linear-gradient(180deg, #35c8f2, #4fcde0);
  color: #fff;
  border: none;
}

.page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.questions-empty-state {
  padding: 40px 24px;
  text-align: center;
}

.questions-empty-state h3 {
  margin: 0 0 8px;
}

.questions-empty-state p {
  margin: 0;
}

.questions-empty-state .create-btn {
  margin-top: 16px;
}

.question-list-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: #fbfdff;
}

.question-list-item p {
  margin: 6px 0 0;
}

.manage-toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  margin: 10px 0 14px;
}

.manage-toolbar input {
  margin-top: 0;
}

.manage-table {
  border: 1px solid #e4ecf7;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.manage-row {
  display: grid;
  grid-template-columns: 90px 1.4fr 1fr 100px 100px 280px;
  gap: 8px;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid #edf3fb;
}

.manage-row:first-child {
  border-top: 0;
}

.manage-head {
  background: #f5f9ff;
  color: #4f688a;
  font-size: 13px;
  font-weight: 700;
}

.manage-row label {
  margin: 0;
  font-size: 13px;
  color: #5a6f8f;
}

.manage-row label input {
  width: auto;
  margin-right: 6px;
  margin-top: 0;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inline-actions button {
  width: auto;
  margin-top: 0;
}

.af2-overview-toolbar {
  grid-template-columns: 1fr;
  margin-bottom: 12px;
}

.af2-overview-select-all {
  display: block;
  margin: 0 0 8px;
  color: #5f7494;
  font-size: 13px;
}

.af2-overview-select-all input {
  width: auto;
  margin-top: 0;
  margin-right: 6px;
}

.af2-overview-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.af2-overview-item-main {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
  margin: 0;
  cursor: pointer;
}

.af2-overview-item-main input {
  width: auto;
  margin-top: 2px;
}

.af2-overview-item-actions {
  justify-content: flex-end;
}

.contact-form-grid {
  grid-template-columns: 250px 1fr 320px;
}

.fields-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.contact-form-preview {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfdff;
  padding: 12px;
}

.contact-form-preview.drag-over {
  border-color: #95b8f8;
  background: #f5f9ff;
}

.cf-preview-form {
  display: grid;
  grid-template-columns: repeat(100, minmax(0, 1fr));
  align-items: flex-start;
}

.cf-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: flex-start;
  gap: 12px;
}

.cf-preview-field-wrap {
  position: relative;
  grid-column: span var(--cf-col-span, 2);
  min-width: 0;
}

/* Legacy contact-form entity editor uses percent values (25/50/75/100) — map to 2-col grid */
.cf-preview-field-wrap[style*="col-span:25;"],
.cf-preview-field-wrap[style*="col-span:50;"] {
  grid-column: span 1;
}
.cf-preview-field-wrap[style*="col-span:75;"],
.cf-preview-field-wrap[style*="col-span:100;"] {
  grid-column: span 2;
}

@media (max-width: 520px) {
  /* On very narrow viewports, force all fields to full width */
  .cf-preview-field-wrap {
    grid-column: span 2 !important;
  }
}

.cf-preview-field-wrap.drop-before::before,
.cf-preview-field-wrap.drop-after::after {
  content: '';
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 3px;
  border-radius: 999px;
  background: #4f8cff;
}

.cf-preview-field-wrap.drop-before::before {
  left: -5px;
}

.cf-preview-field-wrap.drop-after::after {
  right: -5px;
}

.cf-preview-field-wrap.dragging {
  opacity: 0.45;
}

.cf-preview-field {
  background: #fff;
  border: 1px solid #dbe4f1;
  border-radius: 10px;
  padding: 10px;
  text-align: left;
  display: grid;
  gap: 6px;
  color: #334b6d;
}

.cf-preview-field.active {
  border-color: #8bb2fb;
  box-shadow: 0 0 0 2px rgba(79, 140, 255, 0.12);
}

.cf-preview-label {
  font-weight: 600;
  color: #415b80;
}

.cf-input {
  width: 100%;
  border: 1px solid #cedaec;
  background: #fff;
  color: #263850;
  padding: 8px 10px;
}

.cf-size-sm {
  min-height: 32px;
}

.cf-size-md {
  min-height: 40px;
}

.cf-size-lg {
  min-height: 48px;
}

.cf-preview-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.cf-preview-html,
.cf-preview-captcha {
  border: 1px dashed #c7d7ee;
  border-radius: 8px;
  padding: 10px;
  background: #f8fbff;
  color: #4c6285;
}

.settings-grid {
  display: grid;
  gap: 12px;
}

.settings-grid textarea {
  min-height: 90px;
}

.token-palette {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.token-pill {
  width: auto;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #c9d8ef;
  background: #f4f8ff;
  color: #35527c;
  font-size: 12px;
}

/* Center the auth split (login + register) vertically in the viewport.
   `:has` keeps this scoped to auth pages — the same `.hosted-page` body class
   is also used by /forms/live, which must not flex-center. */
.hosted-page:has(.auth-split) {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  box-sizing: border-box;
}

.auth-split {
  width: min(1240px, calc(100% - 56px));
  min-height: min(720px, calc(100vh - 64px));
  margin: 0;
  border-radius: 30px;
  border: 1px solid rgba(224, 235, 245, 0.75);
  background-image: url('/assets/joblia-login-background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 24px 56px rgba(23, 46, 78, 0.16);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 460px);
  grid-template-areas:
    "logo logo"
    "left right";
  gap: 24px 64px;
  align-items: center;
  padding: 32px 54px 48px;
  animation: authEntrance 360ms ease;
}

.auth-split-left  { grid-area: left;  }
.auth-split-right { grid-area: right; }

@keyframes authEntrance {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-split-left {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 0;
  color: #33415b;
  justify-content: flex-start;
}

.auth-page-logo {
  grid-area: logo;
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 4px;
}

.auth-logo {
  display: block;
  width: auto;
  max-width: 320px;
  height: 96px;
  object-fit: contain;
}

.auth-split-left h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 5vw, 58px);
  line-height: 1.08;
  color: #2f3b52;
}

.auth-subtext {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.55;
  color: #4b5568;
}

.auth-subtext-second {
  margin-bottom: 28px;
}

.auth-highlights {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-highlights li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 18px;
  color: #4b5568;
}

.auth-feature-check {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #65d5d2, #58c3d3);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.auth-split-right {
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

.auth-panel {
  width: 100%;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(222, 233, 245, 0.9);
  box-shadow: 0 18px 40px rgba(31, 56, 88, 0.1);
  backdrop-filter: blur(3px);
  padding: 38px 34px 30px;
}

.auth-panel h2 {
  margin: 0 0 14px;
  font-size: 30px;
  color: #2f3b52;
}

.auth-panel p {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.6;
  color: #697386;
}

.auth-form-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form-grid label {
  display: grid;
  gap: 10px;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #3f4b5f;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 16px;
  color: #9aa7b8;
  font-size: 17px;
  pointer-events: none;
}

.auth-form-grid input {
  width: 100%;
  height: 54px;
  border: 1px solid #e4eaf1;
  border-radius: 12px;
  padding: 0 14px 0 48px;
  font-size: 16px;
  background: #fdfdff;
  color: #2f3b52;
  transition: 0.2s ease;
}

.auth-form-grid input::placeholder {
  color: #a7b1bf;
}

.auth-form-grid input:focus {
  border-color: #63ced6;
  box-shadow: 0 0 0 4px rgba(99, 206, 214, 0.12);
  outline: none;
}

.auth-submit-btn {
  margin-top: 8px;
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 12px;
  /* Same gradient as the feature checkboxes (.auth-feature-check) */
  background: linear-gradient(180deg, #65d5d2, #58c3d3);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(88, 195, 211, 0.22);
  transition: 0.2s ease;
}

.auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(88, 195, 211, 0.28);
  background: linear-gradient(180deg, #58c8c5, #4cb3c3);
}

.auth-panel .error-text {
  margin: 12px 0 0;
  min-height: 20px;
}

.auth-register-line {
  margin: 18px 0 0;
  text-align: center;
  font-size: 14px;
  color: #697386;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

/* Toggle button (Jetzt registrieren / Zum Login) — identical look to the
   primary submit button so both stand on the same visual level. */
.auth-register-link {
  appearance: none;
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, #65d5d2, #58c3d3);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  font-size: 18px;
  margin: 0;
  padding: 0 22px;
  box-shadow: 0 10px 20px rgba(88, 195, 211, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
}

.auth-register-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(88, 195, 211, 0.28);
  background: linear-gradient(180deg, #58c8c5, #4cb3c3);
}

.live-form-card {
  max-width: 760px;
  margin: 48px auto;
}

.live-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.live-progress-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #e6eefb;
}

.live-progress-fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f8cff 0%, #2e6af3 100%);
  transition: width 0.28s ease;
}

.live-progress-value {
  font-size: 12px;
  color: #476388;
  font-weight: 600;
}

.af2-funnel-settings {
  display: grid;
  gap: 8px;
  border: 1px solid #d7e3f5;
  border-radius: 10px;
  background: #f8fbff;
  padding: 10px;
  margin: 10px 0;
}

.af2-funnel-settings h3 {
  margin: 0;
  font-size: 14px;
  color: #3f5f8e;
}

.live-step-card {
  border: 1px solid #dbe4f2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(32, 56, 90, 0.08);
  overflow: hidden;
  animation: liveStepIn 0.24s ease;
}

@keyframes liveStepIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.live-step-body {
  padding: 18px;
}

.live-step-body h3 {
  margin: 0 0 6px;
}

.live-step-actions {
  display: block;
  padding: 12px 18px;
  border-top: 1px solid #e1e9f6;
  background: #f8fbff;
}

.live-step-actions button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.live-option-card {
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.live-step-body .preview-options {
  gap: 10px;
  margin-top: 10px;
}

/* Modal Styles */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-content {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 32px;
  max-width: 500px;
  width: 90%;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-content h2 {
  margin: 0 0 8px 0;
  color: #253247;
  font-size: 24px;
  font-weight: 700;
}

.modal-subtitle {
  margin: 0 0 24px 0;
  color: #68809f;
  font-size: 14px;
  font-weight: 500;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #253247;
  font-weight: 600;
  font-size: 13px;
}

.modal-form input,
.modal-form textarea {
  padding: 10px 14px;
  border: 1px solid #dde6f2;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  color: #253247;
  background: #f8fbff;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.modal-form input:focus,
.modal-form textarea:focus {
  outline: none;
  border-color: #27b9ef;
  background: #ffffff;
}

.modal-form textarea {
  resize: vertical;
  min-height: 80px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  justify-content: flex-end;
}

.modal-actions button {
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-actions .primary-button {
  background: #27b9ef;
  color: #ffffff;
}

.modal-actions .primary-button:hover {
  background: #2f86f6;
  box-shadow: 0 8px 20px rgba(47, 134, 246, 0.3);
}

.modal-actions .secondary-button {
  background: #e9ecf1;
  color: #253247;
}

.modal-actions .secondary-button:hover {
  background: #dde6f2;
}

.af2-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.af2-toolbar-actions .primary-button {
  background: #27b9ef;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.af2-toolbar-actions .primary-button:hover {
  background: #2f86f6;
}
.af2-builder-node-settings {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-left: 1px solid #dde6f2;
  border-radius: 0 14px 14px 0;
  box-shadow: -6px 0 24px rgba(35, 59, 92, 0.14);
  padding: 16px;
  z-index: 200;
}

.af2-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #dde6f2;
}

.af2-settings-header h3 {
  margin: 0;
  font-size: 16px;
  color: #253247;
}

.af2-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  padding: 0;
  background: #f0f5ff;
  color: #35527c;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
}

.af2-close-btn:hover {
  background: #e9ecf1;
}

.af2-settings-content {
  display: grid;
  gap: 16px;
}

.af2-settings-section {
  display: grid;
  gap: 6px;
}

.af2-settings-section label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #253247;
  font-weight: 600;
  font-size: 13px;
}

.af2-settings-section input,
.af2-settings-section select,
.af2-settings-section textarea {
  padding: 8px 12px;
  border: 1px solid #dde6f2;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  color: #253247;
  background: #f8fbff;
  transition: border-color 0.2s ease;
}

.af2-settings-section input:focus,
.af2-settings-section select:focus,
.af2-settings-section textarea:focus {
  outline: none;
  border-color: #27b9ef;
  background: #ffffff;
}

.af2-settings-section textarea {
  resize: vertical;
  min-height: 80px;
}

.af2-settings-actions {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #dde6f2;
}

.af2-settings-actions button {
  padding: 8px 12px;
  border-radius: 6px;
  border: none;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.af2-settings-actions .primary-button {
  background: #27b9ef;
  color: #ffffff;
}

.af2-settings-actions .primary-button:hover:not(:disabled) {
  background: #2f86f6;
}

.af2-settings-actions .primary-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.af2-settings-actions .danger-button {
  background: #f56565;
  color: #ffffff;
}

.af2-settings-actions .danger-button:hover {
  background: #e53e3e;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 400;
}

.af2-builder-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: calc(100vh - 200px);
}

.af2-builder-workspace {
  grid-column: 1;
  width: 100%;
}

.live-step-body .preview-option {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
}
  font-weight: 600;
  color: #2d4668;
}

.live-option-card:hover {
  border-color: #8bb2fb;
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(48, 99, 196, 0.12);
}

.live-option-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.live-choice-layout {
  display: grid;
  gap: 10px;
}

.live-nav-wrap {
  display: block;
}

.live-nav-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Invisible spacer keeps the progress bar centered when a button is missing */
.live-nav-spacer {
  display: inline-block;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.live-nav-arrow {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  border: 1px solid #d6e1f2;
  background: #fff;
  color: #4a6686;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(35, 59, 92, 0.06);
}

.live-nav-arrow:hover:not(:disabled) {
  background: #4f88f7;
  color: #fff;
  border-color: #4f88f7;
  box-shadow: 0 3px 10px rgba(79, 140, 255, 0.28);
  transform: translateY(-1px);
}

.live-nav-arrow:active:not(:disabled) {
  transform: translateY(0);
}

.live-nav-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

.live-nav-arrow i {
  font-size: 14px;
  line-height: 1;
}

/* Progress bar — slim, sits inline between the back / next buttons */
.live-step-actions .live-progress-track {
  height: 4px;
  border-radius: 999px;
  background: #e6eefb;
  overflow: hidden;
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0;
}

.live-step-actions .live-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f8cff 0%, #2e6af3 100%);
  transition: width 0.3s ease;
}

.live-contact-submit {
  width: 100%;
  margin-top: 12px;
}

.live-success-card {
  text-align: center;
  border: 1px solid #cfe9d6;
  border-radius: 14px;
  background: #f3fbf6;
  padding: 28px 20px;
}

.live-success-check {
  width: 66px;
  height: 66px;
  border-radius: 999px;
  background: #2ea562;
  color: #fff;
  font-size: 38px;
  font-weight: 800;
  margin: 0 auto 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(46, 165, 98, 0.28);
}

.live-choice-desktop-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
}

.live-choice-desktop-list {
  grid-template-columns: 1fr;
}

.live-choice-desktop-list2 {
  grid-template-columns: 1fr 1fr;
}

.live-choice-layout .live-option-card {
  min-height: 72px;
}

.live-choice-layout .live-option-card .preview-option-image {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.live-choice-layout .live-option-card .preview-option-icon {
  width: 44px;
  min-width: 44px;
  height: 44px;
  border-radius: 8px;
  font-size: 20px;
  padding: 0;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* In grid/tile layout the icon should take full card width — override list sizing */
.live-choice-desktop-grid .live-option-card.has-media .preview-option-icon,
.live-choice-mobile-grid .live-option-card.has-media .preview-option-icon {
  width: 100%;
  min-width: 100%;
}

.live-choice-layout .live-option-card span {
  flex: 1;
  text-align: left;
}

.live-step-card .cf-preview-field {
  border-radius: 12px;
  padding: 12px;
  background: #fbfdff;
}

.live-step-card .cf-preview-label {
  margin: 0;
  font-size: 13px;
  color: #3f5c84;
}

.live-step-card .cf-input {
  margin-top: 0;
}

.live-option-card.active {
  border-color: #5e97ff;
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.16), 0 8px 16px rgba(45, 90, 181, 0.14);
  background: #f7fbff;
}

.error-text {
  margin-top: 10px;
  color: #a33636;
}

.live-form-field {
  display: grid;
  gap: 6px;
}

.token-pill:hover {
  background: #e8f1ff;
}

/* --- Mobile foundation: hamburger menu + sidebar drawer --- */
.app-menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid #e0e7f3;
  color: #35527c;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-right: 6px;
}
.app-menu-toggle:hover { background: #f4f7fb; }

.app-shell-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 35, 90, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 700;
  display: none;
}

body.app-no-scroll { overflow: hidden; }

@media (max-width: 980px) {
  .app-header {
    min-height: 76px;
    padding: 0 14px;
    gap: 8px;
  }

  .app-menu-toggle {
    display: inline-flex;
  }

  .topbar-logo { height: 56px; }

  .app-header-left {
    gap: 8px;
    align-items: center;
  }

  /* Search hidden on small screens; can be reintroduced inside the drawer later */
  .search-box { display: none; }

  .topbar-right { margin-left: 0; }
  .profile-btn { padding: 0 14px 0 8px; height: 42px; gap: 8px; font-size: 14px; }
  .profile-btn-label { display: none; }
  .profile-btn .avatar-initials { width: 30px; height: 30px; }

  .app-shell {
    flex-direction: row;
    padding: 0;
    min-height: calc(100vh - 76px);
  }

  .app-content { border-radius: 0; padding: 18px; }

  /* Sidebar becomes off-canvas drawer */
  .app-sidebar {
    position: fixed;
    top: 76px;
    left: 0;
    bottom: 0;
    width: 282px;
    max-width: 84vw;
    height: auto;
    min-height: 0;
    max-height: calc(100vh - 76px);
    border-right: 1px solid #e9eef5;
    border-bottom: 0;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    z-index: 800;
    box-shadow: 8px 0 24px rgba(20, 35, 90, 0.14);
  }
  .app-sidebar.is-open { transform: translateX(0); }
  .app-shell-backdrop { display: block; }
  .app-shell-backdrop.is-visible { opacity: 1; pointer-events: auto; }

  .nav-link { padding: 12px 18px; }
  .sidebar-user { padding: 14px 18px; }

  /* Page topbar: stack on mobile */
  .content-topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .content-topbar .create-btn { width: 100%; justify-content: center; text-align: center; }
  .content-topbar h1 { font-size: 22px; }
  .content-topbar p { font-size: 13px; }

  /* Tables: horizontal scroll */
  .table-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .questions-table { min-width: 640px; }
  .questions-table th, .questions-table td { padding: 14px 12px; font-size: 14px; }
  .inline-actions { flex-wrap: wrap; gap: 6px; }
  .inline-actions .action-btn { padding: 6px 10px; font-size: 12px; }
  .table-footer { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px; text-align: center; }

  /* Bulk-actions stack vertically on mobile */
  .bulk-actions { flex-direction: column; gap: 8px; }
  .bulk-actions .bulk-btn { width: 100%; justify-content: center; }

  /* Search box full width */
  .questions-search-box input { width: 100%; }

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

  .welcome-dashboard-content {
    grid-template-columns: 1fr;
  }

  .af2-builder-sidebar {
    position: static;
    max-height: none;
  }

  .af2-whiteboard-controls {
    position: static;
    margin-bottom: 10px;
    max-width: 100%;
  }

  .af2-toolbar-actions {
    justify-content: space-between;
  }

  .option-grid,
  .option-upload-row {
    grid-template-columns: 1fr;
  }

  .question-builder-grid {
    grid-template-columns: 1fr;
  }

  .choice-layout-grid {
    grid-template-columns: 1fr;
  }

  .preview-options.layout-mobile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-options.layout-mobile-list {
    grid-template-columns: 1fr;
  }

  .live-choice-mobile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    align-items: stretch;
  }

  .live-choice-mobile-list {
    grid-template-columns: 1fr;
  }

  .contact-form-grid {
    grid-template-columns: 1fr;
  }

  .manage-toolbar {
    grid-template-columns: 1fr;
  }

  .manage-row {
    grid-template-columns: 1fr;
  }

  .manage-head {
    display: none;
  }

  .af2-overview-item-actions {
    justify-content: flex-start;
  }

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

  /* Auth pages stack to a single column on tablets and below */
  .hosted-page:has(.auth-split) {
    padding: 24px 18px;
  }

  .auth-split {
    grid-template-columns: 1fr;
    grid-template-areas:
      "logo"
      "left"
      "right";
    gap: 24px;
    min-height: auto;
    width: min(640px, 100%);
    margin: 0;
    padding: 24px 24px 28px;
    border-radius: 24px;
  }

  .auth-page-logo {
    margin-bottom: 0;
  }

  .auth-logo {
    height: 80px;
  }

  .auth-split-left,
  .auth-split-right {
    padding: 0;
  }

  .auth-split-left h1 {
    font-size: clamp(28px, 6vw, 40px);
    margin-bottom: 12px;
  }

  .auth-subtext {
    font-size: 16px;
    line-height: 1.55;
  }

  .auth-subtext-second {
    margin-bottom: 22px;
  }

  .auth-highlights {
    gap: 10px;
  }

  .auth-highlights li {
    font-size: 15px;
    align-items: flex-start;
  }

  .auth-panel {
    padding: 26px 22px 22px;
  }

  .auth-panel h2 {
    font-size: 24px;
  }

  .auth-form-grid input {
    height: 50px;
    font-size: 15px;
  }

  .auth-submit-btn {
    height: 52px;
    font-size: 17px;
  }
}

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

  .app-content {
    padding: 14px;
  }

  .card {
    padding: 16px;
    border-radius: 16px;
  }

  .dashboard-intro-head {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Dashboard mobile tweaks */
  .dash-hero { padding: 22px 18px; gap: 16px; }
  .dash-hero h1 { font-size: 22px; }
  .dash-hero p { font-size: 14px; }
  .dash-hero-actions { width: 100%; flex-direction: column; }
  .dash-hero-actions .lp-btn { width: 100%; height: 44px; }

  .dash-stat-tile { padding: 16px 18px; }
  .dash-stat-number { font-size: 28px; }

  .dash-card-head { padding: 14px 16px; }
  .dash-card-head h2 { font-size: 16px; }
  .dash-lead-row { padding: 12px 16px; gap: 10px; }
  .dash-lead-time { display: none; }
  .dash-lp-row { padding: 12px 16px; }
  .dash-lp-edit { width: 32px; height: 32px; }

  /* Lead detail modal: full width */
  .lead-detail-modal .modal-content {
    width: calc(100% - 16px) !important;
    max-width: none !important;
    max-height: 92vh;
    padding: 22px 18px;
  }

  /* Embed modal: full width */
  .embed-modal { padding: 22px 18px; }
  .embed-block textarea, .embed-block input[type="text"] { font-size: 11px; }
  .embed-block-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .embed-modal-foot { flex-direction: column-reverse; align-items: stretch; }
  .embed-modal-foot .lp-btn { width: 100%; }

  /* Leads toolbar already collapses, but tighten */
  .leads-toolbar { gap: 8px; }

  /* Tables: even tighter on small */
  .questions-table th, .questions-table td { padding: 10px 8px; font-size: 13px; }
  .inline-actions .action-btn { padding: 5px 8px; font-size: 11px; }

  /* App-shell hidden CTA labels for compact action buttons in lists */
  .pagination .page-btn { width: 32px; height: 32px; }

  /* Phone: tighten the auth box & logo so it never overflows */
  .hosted-page:has(.auth-split) {
    padding: 12px 10px;
  }

  .auth-split {
    width: 100%;
    border-radius: 20px;
    padding: 20px 16px 24px;
    gap: 20px;
    margin: 0;
  }

  .auth-logo {
    height: 64px;
  }

  .auth-subtext {
    font-size: 15px;
    line-height: 1.5;
  }

  .auth-subtext-second { margin-bottom: 18px; }

  .auth-split-left h1 {
    font-size: clamp(24px, 7vw, 32px);
    margin-bottom: 10px;
  }

  .auth-highlights {
    gap: 10px;
  }

  .auth-highlights li {
    font-size: 14px;
    align-items: flex-start;
  }

  .auth-feature-check {
    width: 24px;
    height: 24px;
    min-width: 24px;
  }

  .auth-panel {
    border-radius: 16px;
    padding: 22px 16px 18px;
  }

  .auth-panel h2 {
    font-size: 22px;
  }

  .auth-panel p { font-size: 14px; margin-bottom: 18px; }

  .auth-input-icon { left: 14px; font-size: 15px; }

  .auth-form-grid input {
    height: 48px;
    font-size: 15px;
    padding-left: 42px;
  }

  .auth-submit-btn {
    height: 50px;
    font-size: 16px;
  }

  .auth-register-line { font-size: 14px; }
  .auth-register-link { min-height: 44px; padding: 0 16px; font-size: 14px; }
}

/* Very small phones (≤380px): drop the marketing column completely so the
   form gets full width and stays comfortable to fill in. */
@media (max-width: 420px) {
  .auth-split-left { display: none; }
  .auth-split { padding: 18px 14px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   Settings — E-Mail Senders
   ══════════════════════════════════════════════════════════════════════════ */
.settings-card {
  padding: 22px;
}

.sender-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.sender-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid #e2eaf5;
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sender-card:hover {
  border-color: #b3c7e8;
  box-shadow: 0 4px 12px rgba(35, 59, 92, 0.06);
}

.sender-card-main {
  flex: 1;
  min-width: 0;
}

.sender-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #233b5c;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.sender-badge {
  background: #e7f1ff;
  color: #1d5cd1;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sender-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: #667;
}

.sender-card-meta i {
  color: #8aa0bf;
  margin-right: 4px;
}

.sender-pw-set { color: #27ae60; }
.sender-pw-missing { color: #e67e22; }

.sender-empty {
  margin: 24px 0;
  padding: 30px;
  text-align: center;
  border: 2px dashed #cad8ed;
  border-radius: 12px;
  color: #8aa0bf;
  font-size: 13px;
}

/* Sender Modal */
.modal-content.sender-modal {
  width: min(600px, 95vw);
  max-width: none;
  max-height: 92vh;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sender-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #e2eaf5;
}

.sender-modal-header h2 {
  margin: 0;
  font-size: 17px;
}

.sender-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sender-form-section h4 {
  margin: 0 0 10px;
  font-size: 12px;
  color: #3f5c84;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sender-form-section > label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #556;
  margin-bottom: 8px;
}

.sender-form-section input[type="text"],
.sender-form-section input[type="email"],
.sender-form-section input[type="number"],
.sender-form-section input[type="password"],
.sender-form-section select {
  padding: 8px 10px;
  border: 1px solid #cad8ed;
  border-radius: 7px;
  font-size: 13px;
  background: #fff;
  font-family: inherit;
}

.sender-form-section input:focus,
.sender-form-section select:focus {
  outline: none;
  border-color: #6f9cff;
  box-shadow: 0 0 0 3px rgba(111, 156, 255, 0.15);
}

.sender-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sender-grid-2 label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #556;
}

.sender-checkbox-row {
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
}

.sender-checkbox-row input {
  width: auto !important;
  padding: 0 !important;
}

.sender-test-section {
  background: #f9fbff;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid #e2eaf5;
}

.sender-test-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.sender-test-row input {
  flex: 1;
}

.sender-test-result {
  margin: 8px 0 0;
  font-size: 12px;
  min-height: 1em;
  color: #667;
}

.sender-test-result.is-success { color: #27ae60; font-weight: 500; }
.sender-test-result.is-error   { color: #c0392b; }

.sender-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-top: 1px solid #e2eaf5;
  background: #f9fbff;
  gap: 8px;
}

.sender-modal-actions {
  display: flex;
  gap: 8px;
}

.sender-modal-footer .primary-button {
  background: #4f88f7;
  color: #fff;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
}

.sender-modal-footer .primary-button:hover {
  background: #2e6af3;
}

@media (max-width: 600px) {
  .sender-card {
    flex-direction: column;
    align-items: stretch;
  }
  .sender-card-actions {
    display: flex;
    justify-content: flex-end;
  }
  .sender-grid-2 {
    grid-template-columns: 1fr;
  }
  .modal-content.sender-modal {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
}

/* ============================================================
   Landing Pages
   ============================================================ */

/* List-page status pills */
.lp-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.lp-status.status-draft { background: #f1f5fb; color: #5d6b7d; }
.lp-status.status-published { background: #e7f7ec; color: #1a9c45; }

/* --- Editor: integrated into app-shell --- */
.lp-editor-shell-body .app-content {
  padding: 0;
  background: #fff;
  gap: 0;
}
.lp-editor-card {
  margin: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 104px);
  height: calc(100vh - 104px);
  overflow: hidden;
  border: 0;
}

/* Toolbar: vertical alignment in a single row with uniform control heights */
.lp-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  background: #fff;
  border-bottom: 1px solid #e2e9f3;
  min-height: 56px;
  flex-shrink: 0;
}
.lp-tb-group { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.lp-tb-center { justify-content: center; }
.lp-tb-right { justify-content: flex-end; }

.lp-toolbar input[type="text"] {
  background: #f4f7fb;
  border: 1px solid #dbe4f0;
  color: #253247;
  padding: 0 12px;
  border-radius: 8px;
  height: 34px;
  min-width: 260px;
  max-width: 360px;
  font-size: 14px;
}
.lp-toolbar input[type="text"]:focus { outline: none; border-color: #35c8f2; background: #fff; }

.lp-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid #dbe4f0;
  background: #fff;
  color: #35527c;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lp-btn:hover { background: #f4f7fb; }
.lp-btn.ghost { background: transparent; border-color: transparent; color: #6d7f98; }
.lp-btn.ghost:hover { background: #f0f4f9; color: #35527c; }
.lp-btn.primary {
  background: linear-gradient(90deg, #35c8f2, #5fd6d2);
  border-color: transparent;
  color: #fff;
}
.lp-btn.primary:hover { filter: brightness(1.05); }
.lp-btn.lp-btn-plus {
  background: linear-gradient(90deg, #35c8f2, #5fd6d2);
  color: #fff;
  border-color: transparent;
  font-weight: 700;
}

.lp-icon-btn {
  background: #f4f7fb;
  color: #35527c;
  border: 1px solid #dbe4f0;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lp-icon-btn:hover { background: #e9eff7; }

.lp-status-dot {
  font-size: 12px;
  color: #7b8ca6;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5fb;
  white-space: nowrap;
}
.lp-status-dot.saved { color: #1a9c45; background: #e7f7ec; }
.lp-status-dot.error { color: #c0392b; background: #fdecea; }

.lp-device-select {
  height: 34px;
  background: #fff;
  border: 1px solid #dbe4f0;
  color: #253247;
  padding: 0 30px 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  min-width: 160px;
  line-height: 1;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path fill='none' stroke='%236d7f98' stroke-width='2' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 6px;
}
.lp-device-select:focus { outline: 1px solid #35c8f2; }

/* Workspace: drawers push canvas */
.lp-workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  background: #fff;
  overflow: hidden;
}
.lp-workspace #gjs {
  flex: 1;
  min-width: 0;
  min-height: 0;
  background: #fff;
  border-left: 1px solid #e2e9f3;
  border-right: 1px solid #e2e9f3;
}

/* Kill ALL default GrapesJS dark chrome inside our workspace */
.lp-workspace .gjs-editor,
.lp-workspace .gjs-editor-cont,
.lp-workspace .gjs-one-bg,
.lp-workspace .gjs-cv-canvas,
.lp-workspace .gjs-cv-canvas-bg,
.lp-workspace .gjs-cv-canvas__frames,
.lp-workspace .gjs-frames,
.lp-workspace .gjs-frame-wrapper,
.lp-workspace .gjs-frame-wrapper__top,
.lp-workspace .gjs-frame-wrapper__right,
.lp-workspace .gjs-frame-wrapper__left,
.lp-workspace .gjs-frame-wrapper__bottom,
.lp-workspace .gjs-pn-panels,
.lp-workspace .gjs-pn-views-container,
.lp-workspace .gjs-pn-views {
  background-color: #fff !important;
  color: #253247 !important;
}
.lp-workspace .gjs-frame {
  box-shadow: none !important;
  background: #fff !important;
  border: 0 !important;
}

/* Drawers: flex items with transitioned width */
.lp-drawer {
  width: 0;
  max-width: 90vw;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: width 0.22s ease, min-width 0.22s ease;
  overflow: hidden;
  flex-shrink: 0;
}
.lp-drawer.is-open { width: 400px; min-width: 400px; }
.lp-drawer.lp-drawer-right.is-open { width: 320px; min-width: 320px; }

.lp-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e9f3;
  background: #fff;
  flex-shrink: 0;
}
.lp-drawer-head strong { color: #253247; font-size: 14px; }
.lp-drawer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 12px 16px;
  background: #fff;
}
.lp-drawer-hint {
  display: block;
  color: #7b8ca6;
  font-size: 12px;
  margin-bottom: 10px;
}

/* Block list: 2-column grid inside a wide drawer (400px) */
.lp-blocks-host .gjs-block-category { background: transparent !important; border: 0; margin-bottom: 14px; }
.lp-blocks-host .gjs-block-category .gjs-title {
  color: #35527c;
  font-size: 11px;
  padding: 12px 6px 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: transparent !important;
}
.lp-blocks-host .gjs-blocks-c {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0;
  background: transparent !important;
}
.lp-blocks-host .gjs-block {
  background: #f8fafd !important;
  border: 1px solid #e0e7f3 !important;
  color: #35527c;
  border-radius: 12px;
  padding: 18px 10px;
  min-height: 96px;
  width: 100%;
  font-size: 12px;
  box-shadow: none;
  transition: all 0.15s;
  cursor: grab;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.lp-blocks-host .gjs-block:hover {
  background: #fff !important;
  border-color: #35c8f2 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(53, 200, 242, 0.14);
}
.lp-blocks-host .gjs-block i {
  font-size: 22px;
  color: #35527c;
}
.lp-blocks-host .gjs-block-label {
  color: #35527c;
  font-size: 12px;
  font-weight: 600;
  margin: 0;
  line-height: 1.25;
  text-align: center;
}

/* Right drawer tabs */
.lp-tabs-inline {
  display: inline-flex;
  gap: 4px;
  background: #eef2f7;
  border-radius: 8px;
  padding: 3px;
}
.lp-tab {
  background: transparent;
  border: 0;
  color: #6d7f98;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
}
.lp-tab:hover { color: #253247; }
.lp-tab.is-active { background: #fff; color: #253247; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06); }
.lp-tab-panel { padding: 6px 4px; color: #253247; background: #fff; }
.lp-selectors-host { margin-bottom: 8px; }

/* GrapesJS panels re-themed: force white everywhere in the right drawer */
.lp-drawer,
.lp-drawer .gjs-one-bg,
.lp-drawer .gjs-sm-sectors,
.lp-drawer .gjs-trt-traits,
.lp-drawer .gjs-clm-tags,
.lp-drawer .gjs-layers,
.lp-drawer .gjs-sel-all,
.lp-drawer .gjs-sm-sector,
.lp-drawer .gjs-sm-properties,
.lp-drawer .gjs-sm-property,
.lp-drawer .gjs-trt-trait,
.lp-drawer .gjs-trt-header {
  background-color: #fff !important;
  color: #253247 !important;
}
.lp-drawer .gjs-sm-sector { border-bottom: 1px solid #eef2f7; }
.lp-drawer .gjs-sm-title { color: #253247 !important; font-size: 12px; padding: 10px 6px; background: transparent !important; font-weight: 700; }
.lp-drawer .gjs-sm-properties { padding: 4px 4px 10px; }
.lp-drawer .gjs-sm-property { padding: 4px 2px; }
.lp-drawer .gjs-sm-label { color: #7b8ca6 !important; font-size: 11px; }
.lp-drawer .gjs-field,
.lp-drawer .gjs-input-holder input,
.lp-drawer .gjs-field select,
.lp-drawer .gjs-field input,
.lp-drawer .gjs-field textarea {
  background: #fff !important; color: #253247 !important; border: 1px solid #dbe4f0 !important;
}
.lp-drawer .gjs-clm-tag { background: #eef2f7 !important; color: #35527c !important; border-color: #dbe4f0 !important; }

/* Selected element toolbar in canvas: keep GrapesJS' default blue */
.lp-workspace .gjs-toolbar { background: #35c8f2 !important; }

/* ============================================================
   Dashboard (new)
   ============================================================ */

.dash-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 36px 40px;
  background-image:
    linear-gradient(120deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.55) 55%, rgba(255, 255, 255, 0.35) 100%),
    url('/assets/joblia-login-background.png');
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  color: #33415b;
  border: 1px solid rgba(224, 235, 245, 0.75);
  box-shadow: 0 16px 40px rgba(23, 46, 78, 0.08);
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.dash-hero-copy { flex: 1; min-width: 280px; }
.dash-hero-eyebrow {
  display: inline-block;
  padding: 5px 14px;
  background: #fff;
  color: #2b74f0;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
  border: 1px solid rgba(43, 116, 240, 0.18);
  box-shadow: 0 4px 14px rgba(23, 46, 78, 0.08);
}
.dash-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.15;
  font-weight: 800;
  background: linear-gradient(90deg, #2b74f0 0%, #35c8f2 45%, #5fd6d2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.01em;
}
.dash-hero p {
  color: #425271;
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  max-width: 56ch;
}
.dash-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.dash-hero-actions .lp-btn {
  background: #fff;
  color: #35527c;
  border-color: rgba(43, 116, 240, 0.18);
  height: 42px;
  padding: 0 20px;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(23, 46, 78, 0.08);
}
.dash-hero-actions .lp-btn:hover { background: #f4f9ff; border-color: #35c8f2; }
.dash-hero-actions .lp-btn.primary {
  background: linear-gradient(90deg, #2b74f0, #35c8f2, #5fd6d2);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(53, 200, 242, 0.32);
}
.dash-hero-actions .lp-btn.primary:hover { filter: brightness(1.05); background: linear-gradient(90deg, #2b74f0, #35c8f2, #5fd6d2); }

/* Stat tiles */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.dash-stat-tile {
  background: #fff;
  border: 1px solid #e8eff8;
  border-radius: 16px;
  padding: 22px 24px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s;
  position: relative;
}
.dash-stat-tile:hover {
  border-color: #35c8f2;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(53, 200, 242, 0.14);
}
.dash-stat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.dash-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: linear-gradient(135deg, #e8f6ff, #e8fbfb);
}
.dash-stat-tile[data-variant="leads"] .dash-stat-icon { background: linear-gradient(135deg, #e4f2ff, #daecff); }
.dash-stat-tile[data-variant="forms"] .dash-stat-icon { background: linear-gradient(135deg, #e9fbf2, #d7f3e4); }
.dash-stat-tile[data-variant="landing"] .dash-stat-icon { background: linear-gradient(135deg, #f3ecff, #e5dbff); }
.dash-stat-trend {
  padding: 4px 10px;
  border-radius: 999px;
  background: #e7f7ec;
  color: #1a9c45;
  font-size: 12px;
  font-weight: 700;
}
.dash-stat-number {
  display: block;
  font-size: 34px;
  font-weight: 700;
  color: #1f2a36;
  line-height: 1;
  margin: 4px 0 6px;
}
.dash-stat-label {
  font-size: 14px;
  font-weight: 600;
  color: #35527c;
}
.dash-stat-sub {
  font-size: 12px;
  color: #7b8ca6;
  margin-top: 2px;
}

/* 2-column grid for lead list + landing pages */
.dash-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}
.dash-card {
  padding: 0;
  overflow: hidden;
}
.dash-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid #edf1f7;
}
.dash-card-head h2 { margin: 0; font-size: 17px; color: #1f2a36; font-weight: 700; }
.dash-card-link {
  color: #2f7fcb;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.dash-card-link:hover { text-decoration: underline; }

/* Recent leads list */
.dash-leads-list { display: flex; flex-direction: column; }
.dash-lead-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 22px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f1f5fb;
  transition: background 0.15s;
}
.dash-lead-row:last-child { border-bottom: 0; }
.dash-lead-row:hover { background: #f8fafd; }
.dash-lead-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(135deg, #35c8f2, #5fd6d2);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}
.dash-lead-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dash-lead-info strong {
  color: #1f2a36;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-lead-info small {
  color: #7b8ca6;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-lead-time {
  color: #7b8ca6;
  font-size: 12px;
  white-space: nowrap;
}

/* Landing pages list */
.dash-lp-list { display: flex; flex-direction: column; }
.dash-lp-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px 22px;
  border-bottom: 1px solid #f1f5fb;
}
.dash-lp-row:last-child { border-bottom: 0; }
.dash-lp-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dash-lp-info strong { color: #1f2a36; font-size: 14px; }
.dash-lp-url {
  color: #7b8ca6;
  font-size: 12px;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-lp-url:hover { color: #2f7fcb; text-decoration: underline; }
.dash-lp-edit {
  text-decoration: none;
  color: #6d7f98;
  background: #f1f5fb;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.15s;
}
.dash-lp-edit:hover { background: #35c8f2; color: #fff; }

/* Empty state inside dashboard cards */
.dash-empty {
  padding: 32px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.dash-empty p {
  margin: 0;
  color: #6d7f98;
  max-width: 40ch;
}

/* Responsive */
@media (max-width: 1100px) {
  .dash-stats { grid-template-columns: 1fr 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .dash-stats { grid-template-columns: 1fr; }
  .dash-hero { padding: 24px; }
  .dash-hero-actions { width: 100%; }
  .dash-hero-actions .lp-btn { flex: 1; }
}

/* ============================================================
   Embed modal (builder list)
   ============================================================ */
.embed-modal {
  max-width: 640px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 28px 24px;
}
.embed-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}
.embed-modal-head h2 { margin: 0; font-size: 20px; }
.embed-modal .modal-subtitle { margin: 2px 0 20px; }
.embed-block {
  background: #f8fafd;
  border: 1px solid #e4ecf7;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.embed-block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.embed-block-head strong { color: #253247; font-size: 14px; }
.embed-block small { display: block; color: #6d7f98; font-size: 12px; margin-bottom: 10px; line-height: 1.5; }
.embed-block textarea,
.embed-block input[type="text"] {
  width: 100%;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px;
  background: #fff;
  color: #1f2a36;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  padding: 10px 12px;
  box-sizing: border-box;
  resize: vertical;
}
.embed-block textarea:focus,
.embed-block input[type="text"]:focus {
  outline: none;
  border-color: #35c8f2;
  background: #fdfeff;
}
.embed-copy-btn {
  background: #35527c;
  color: #fff;
  border: 0;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.embed-copy-btn:hover { background: #253247; }
.embed-copy-btn.is-copied { background: #1a9c45; }
.embed-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

/* ============================================================
   Mobile pass: settings / sender modal / editor hints
   ============================================================ */
@media (max-width: 760px) {
  /* Settings → sender list */
  .sender-grid-2 { grid-template-columns: 1fr !important; gap: 10px !important; }
  .sender-modal { width: calc(100% - 16px) !important; max-width: none !important; max-height: 92vh; }
  .sender-modal-header { padding: 14px 16px !important; }
  .sender-modal-body { padding: 14px !important; }
  .sender-modal-footer { flex-direction: column-reverse; gap: 10px; align-items: stretch !important; padding: 14px !important; }
  .sender-modal-actions { display: flex; flex-direction: column-reverse; gap: 8px; width: 100%; }
  .sender-modal-actions .primary-button,
  .sender-modal-actions .secondary-button { width: 100%; }
  .sender-test-row { flex-direction: column; gap: 8px; }
  .sender-test-row input,
  .sender-test-row button { width: 100%; }
}

/* --- Editor: at small widths show a friendly hint overlay --- */
.lp-editor-mobile-hint,
.af2-builder-mobile-hint {
  display: none;
  position: fixed;
  inset: auto 12px 12px 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #2b74f0, #35c8f2);
  color: #fff;
  font-size: 13px;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(43, 116, 240, 0.32);
  z-index: 1500;
  text-align: center;
  line-height: 1.4;
}
@media (max-width: 760px) {
  .lp-editor-mobile-hint,
  .af2-builder-mobile-hint { display: block; }
  /* Editor canvases: minimum usable size */
  .lp-editor-card { height: auto; min-height: calc(100vh - 64px); }
  .lp-toolbar { grid-template-columns: 1fr; gap: 8px; padding: 8px; }
  .lp-tb-group { width: 100%; flex-wrap: wrap; }
  .lp-tb-center { justify-content: stretch; }
  .lp-tb-center input[type="text"] { flex: 1; min-width: 0 !important; max-width: none !important; }
  .lp-drawer.is-open { width: 100% !important; min-width: 0 !important; }
}
