.hidden { display: none !important; }

@keyframes blobFloatM { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(40px, -30px) scale(1.1); } }
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes checkPulse { 0%, 100% { box-shadow: 0 8px 24px oklch(0.6 0.22 300 / 0.4); } 50% { box-shadow: 0 8px 30px oklch(0.6 0.22 300 / 0.65); } }

.login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.login-view::before,
.login-view::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}
.login-view::before { top: -10%; left: 10%; background: oklch(0.55 0.22 300 / 0.3); animation: blobFloatM 20s ease-in-out infinite; }
.login-view::after { bottom: -10%; right: 10%; background: oklch(0.65 0.16 195 / 0.25); animation: blobFloatM 24s ease-in-out infinite; }
.login-card {
  position: relative;
  z-index: 1;
  width: min(360px, 92vw);
  background: oklch(0.16 0.02 275 / 0.85);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card-lg);
  padding: 32px;
  backdrop-filter: blur(20px);
  box-shadow: 0 30px 80px oklch(0 0 0 / 0.5);
}

/* Post-registration / post-verification success state (auth modal) */
.auth-success-box {
  position: relative;
  background: linear-gradient(160deg, oklch(0.32 0.1 300 / 0.35), oklch(0.26 0.08 195 / 0.25));
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 24px 22px;
  overflow: hidden;
  animation: popIn 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
.auth-success-box::before {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, oklch(0.68 0.22 300 / 0.4), oklch(0.7 0.16 195 / 0.3));
  filter: blur(20px);
}
.auth-success-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gradient-primary);
  margin: 0 auto 16px;
  animation: checkPulse 2.4s ease-in-out infinite;
}
.auth-success-title {
  position: relative;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  margin: 0 0 10px;
}
.auth-success-text {
  position: relative;
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
  text-align: center;
}
.auth-success-email { color: var(--violet-light); font-weight: 700; }
.auth-spam-note {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 11px;
  background: var(--glass-2);
  border: 1px solid var(--border-strong);
  font-size: 12.5px;
  color: var(--text-muted);
}
.auth-spam-note svg { flex-shrink: 0; }
.auth-spam-note b { color: var(--text-secondary); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 20px; margin-bottom: 6px; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--gradient-avatar); flex-shrink: 0; }
.login-card p.hint { color: var(--text-muted); font-size: 13.5px; margin: 0 0 20px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; }
.error-text { color: var(--danger); font-size: 13px; min-height: 1.2em; margin: 4px 0 0; }

.sidebar-client-switch { padding: 14px 16px; border-bottom: 1px solid var(--border); position: relative; z-index: 35; overflow: visible; }
.sidebar-client-actions { display: flex; gap: 6px; margin-top: 8px; }
.sidebar-client-actions button { flex: 1; font-size: 12px; padding: 7px 8px; border-radius: 8px; background: var(--glass-2); color: var(--text-secondary); border: 1px solid var(--border-strong); cursor: pointer; font-family: inherit; }
.sidebar-client-actions button:hover { background: var(--glass-3); }

.topbar-actions { display: flex; align-items: center; gap: 14px; position: relative; }
.search-box { display: flex; align-items: center; gap: 8px; padding: 8px 12px 8px 14px; border-radius: var(--radius-pill); background: var(--glass-2); border: 1px solid var(--border-strong); color: var(--text-faint); font-size: 13.5px; }
.bell-btn { position: relative; }
.bell-dot { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: oklch(0.7 0.19 25); }

.empty-note { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-note h3 { font-family: var(--font-display); color: var(--text-primary); margin: 0 0 8px; }

.section-title { font-weight: 700; font-size: 15px; margin-bottom: 18px; }

.chart-bars {
  display: block;
  width: 100%;
  height: 160px;
  max-width: 100%;
}
.chart-wrap {
  width: 100%;
  overflow: hidden;
}
.chart-weekdays { display: flex; justify-content: space-between; margin-top: 6px; color: var(--text-faint); font-size: 12px; }

.integrations-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-bottom: 28px; }
.integration-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.integration-icon { width: 42px; height: 42px; border-radius: var(--radius-icon); background: linear-gradient(135deg, oklch(0.68 0.22 300 / 0.25), oklch(0.7 0.16 195 / 0.25)); display: flex; align-items: center; justify-content: center; color: oklch(0.85 0.05 280); }
.integration-name { font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.integration-desc { color: var(--text-muted); font-size: 13.5px; line-height: 1.5; margin-bottom: 16px; min-height: 40px; }
.integration-status { font-size: 12.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.integration-status .dot { width: 8px; height: 8px; border-radius: 50%; }

.conv-layout { display: grid; grid-template-columns: 320px 1fr; gap: 20px; height: calc(100vh - 220px); min-height: 420px; }
.conv-list-panel { background: var(--glass-1); border: 1px solid var(--border); border-radius: var(--radius-card); display: flex; flex-direction: column; overflow: hidden; }
.conv-list { flex: 1; overflow-y: auto; }
.conv-item { display: flex; gap: 12px; padding: 14px 16px; cursor: pointer; border-bottom: 1px solid oklch(1 0 0 / 0.06); }
.conv-item:hover, .conv-item.selected { background: var(--glass-2); }
.conv-item .meta { flex: 1; min-width: 0; }
.conv-item .row1 { display: flex; justify-content: space-between; gap: 6px; }
.conv-item .name { font-weight: 600; font-size: 14px; }
.conv-item .time { font-size: 11.5px; color: var(--text-faint); white-space: nowrap; }
.conv-item .snippet { color: var(--text-muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-item .channel-tag { color: var(--cyan-light); font-size: 11px; margin-top: 2px; text-transform: capitalize; }

.conv-thread-panel { background: var(--glass-1); border: 1px solid var(--border); border-radius: var(--radius-card); display: flex; flex-direction: column; overflow: hidden; }
.conv-thread-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.conv-thread-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.conv-thread-foot { padding: 16px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; }
.thread-bubble { max-width: 70%; padding: 12px 16px; border-radius: 16px 16px 16px 4px; font-size: 14px; line-height: 1.5; align-self: flex-start; background: var(--glass-3); white-space: pre-wrap; }
.thread-bubble.assistant { align-self: flex-end; background: var(--gradient-primary); color: oklch(0.1 0.02 280); border-radius: 16px 16px 4px 16px; }
.reply-note { color: var(--text-faint); font-size: 13px; padding: 16px 20px; }

.calendar-bookings-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; }
.cal-weekday-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 8px; color: var(--text-faint); font-size: 12px; text-align: center; }
.cal-days-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-day { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 10px; font-size: 13px; background: var(--glass-1); color: var(--text-secondary); }
.cal-day.today { background: var(--gradient-active-nav); color: var(--text-primary); }
.cal-day.empty { background: transparent; }
.cal-day .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); margin-top: 2px; }
.upcoming-booking { display: flex; gap: 14px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid oklch(1 0 0 / 0.06); }
.upcoming-booking:last-child { border: none; margin: 0; padding: 0; }
.upcoming-booking .day-box { width: 46px; flex-shrink: 0; text-align: center; }
.upcoming-booking .day-num { font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.upcoming-booking .day-month { font-size: 11px; color: var(--text-faint); }

.analytics-cols { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.donut { width: 140px; height: 140px; border-radius: 50%; margin-bottom: 18px; }
.donut-legend { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.donut-legend-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.donut-legend-row .swatch { width: 9px; height: 9px; border-radius: 50%; }
.donut-legend-row .name { flex: 1; color: var(--text-secondary); text-transform: capitalize; }

.editor-item { background: var(--glass-1); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin-bottom: 12px; display: grid; gap: 10px; }
.editor-item .row { display: flex; justify-content: space-between; gap: 0.5rem; align-items: center; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: block; }
.hours-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; border: 1px solid var(--border); border-radius: 10px; padding: 14px; }

.modal, .modal-overlay { position: fixed; inset: 0; background: rgba(10,10,20,0.85); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-overlay.hidden { display: none; }
.modal-card { width: min(420px, 92vw); background: var(--bg-drawer); border: 1px solid var(--border-strong); border-radius: var(--radius-card-lg); padding: 28px; position: relative; }
.modal-card h3 { font-family: var(--font-display); margin: 0 0 6px; }
.modal-card p.hint { color: var(--text-muted); font-size: 13.5px; margin: 0 0 18px; }
.modal-card label { display: block; margin-bottom: 14px; font-size: 13.5px; color: var(--text-secondary); }
.modal-card label > span { display: block; margin-bottom: 6px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

.chat-log { height: min(460px, 55vh); overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.chat-toolbar { display: flex; justify-content: flex-end; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.chat-form { display: flex; gap: 10px; padding: 16px; border-top: 1px solid var(--border); }
.chat-form input { flex: 1; }

.dash-service-grid {
  display: flex;
  flex-direction: column;
}
.dash-service-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid oklch(1 0 0 / 0.06);
}
.dash-service-card:last-child {
  border-bottom: none;
}
.dash-service-card .dash-service-name {
  flex: 1;
  font-size: 14px;
}
.dash-service-card .dash-service-count {
  color: var(--text-muted);
  font-size: 14px;
}

.integration-status-grid {
  display: flex;
  flex-direction: column;
}

@media (max-width: 900px) {
  .conv-layout, .calendar-bookings-layout, .analytics-cols, .form-grid, .widget-layout { grid-template-columns: 1fr; }
  .widget-brand-row { flex-direction: column; }
  .integration-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .integration-status-item {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
    padding: 10px 12px !important;
    background: var(--glass-1);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13px !important;
  }
  .integration-status-item .integration-status-meta {
    font-size: 11px !important;
    color: var(--text-faint) !important;
  }
  .dash-service-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .dash-service-card {
    padding: 12px;
    background: var(--glass-1);
    border: 1px solid var(--border);
    border-radius: 10px;
  }
  .dash-service-card .dash-service-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
  }
  .dash-service-card .dash-service-count {
    font-size: 12px;
    color: var(--text-muted);
  }
}

/* Widget branding editor + live preview */
.widget-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(360px, 1.25fr);
  gap: 20px;
  align-items: start;
}
.widget-settings { padding: 18px 20px; }
.widget-settings-head { margin-bottom: 14px; }
.widget-brand-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.widget-picker-col { flex: 0 0 auto; }
.widget-controls-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.color-target-toggle {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.color-target-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border-strong);
  background: var(--glass-1);
  color: var(--text-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}
.color-target-btn.active {
  color: var(--text);
  border-color: var(--text);
  background: var(--glass-2);
}
.color-target-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px oklch(0 0 0 / 0.2);
  flex-shrink: 0;
}
.gradient-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.gradient-preset {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  box-shadow: inset 0 0 0 1px oklch(0 0 0 / 0.18);
}
.gradient-preset.active {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 1px var(--text-primary);
}
.gradient-preset.solid {
  background:
    linear-gradient(45deg, #ccc 25%, transparent 25%) -4px 0 / 8px 8px,
    linear-gradient(-45deg, #ccc 25%, transparent 25%) -4px 0 / 8px 8px,
    linear-gradient(45deg, transparent 75%, #ccc 75%) -4px 0 / 8px 8px,
    linear-gradient(-45deg, transparent 75%, #ccc 75%) -4px 0 / 8px 8px,
    #fff;
}

.cp-panel {
  width: 120px;
  box-sizing: border-box;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 8px;
  background: var(--glass-1);
}
.cp-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.cp-swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px oklch(0 0 0 / 0.15);
}
.cp-eye {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: var(--glass-2);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 0;
}
.cp-meta-values,
.cp-mini-swatch { display: none !important; }
.cp-sv {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  cursor: crosshair;
  touch-action: none;
  box-shadow: inset 0 0 0 1px oklch(0 0 0 / 0.08);
}
.cp-sv-cursor,
.cp-hue-cursor {
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px oklch(0 0 0 / 0.35), 0 1px 3px oklch(0 0 0 / 0.25);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.cp-hue {
  position: relative;
  width: 100px;
  height: 8px;
  margin-top: 6px;
  border-radius: 100px;
  cursor: pointer;
  touch-action: none;
  background: linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000);
  box-shadow: inset 0 0 0 1px oklch(0 0 0 / 0.08);
}
.cp-hue-cursor { top: 50%; width: 11px; height: 11px; }
.cp-input-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  width: 100px;
}
.cp-value-input {
  flex: 1;
  min-width: 0;
  height: 26px;
  padding: 0 6px;
  font-size: 10.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
}
.cp-icon-btn {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: var(--glass-2);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
  flex-shrink: 0;
  padding: 0;
}
.cp-format-toggle {
  display: flex;
  width: 100px;
  margin-top: 6px;
  gap: 2px;
  padding: 2px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: var(--glass-2);
  box-sizing: border-box;
}
.cp-format-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 9px;
  font-weight: 700;
  padding: 5px 0;
  border-radius: 5px;
  cursor: pointer;
  line-height: 1;
}
.cp-format-btn:hover { color: var(--text-secondary); }
.cp-format-btn.active {
  background: var(--glass-3);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.widget-embed-card { padding: 22px 24px; }
.embed-steps {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}
.embed-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.embed-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-2);
  border: 1px solid var(--border-strong);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.embed-code-wrap {
  display: flex;
  gap: 12px;
  align-items: stretch;
  flex-wrap: wrap;
}
.embed-code {
  flex: 1;
  min-width: 220px;
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--glass-1);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.45;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text-secondary);
}
.widget-preview-card { padding: 18px 20px; }
.widget-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.widget-preview-stage {
  position: relative;
  height: 520px;
  border-radius: 16px;
  background: #e8eef5;
  border: 1px solid var(--border);
  overflow: hidden;
}
.fake-site {
  position: absolute;
  inset: 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--demo-panel, #ffffff) 82%, #f7f9fc);
  box-shadow:
    0 1px 0 oklch(1 0 0 / 0.7) inset,
    0 18px 40px oklch(0.4 0.04 250 / 0.18);
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}
.widget-preview-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}
.widget-preview-overlay .widget-preview-panel,
.widget-preview-overlay .widget-preview-bubble {
  pointer-events: auto;
}
.fake-site-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  background: linear-gradient(180deg, #ffffff, #eef2f7);
  border-bottom: 1px solid #dde3ec;
}
.fake-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d0d7e2;
}
.fake-dot:nth-child(1) { background: #ff5f57; }
.fake-dot:nth-child(2) { background: #febc2e; }
.fake-dot:nth-child(3) { background: #28c840; }
.fake-url {
  margin-left: 10px;
  flex: 1;
  height: 18px;
  border-radius: 6px;
  background: #e7edf5;
  color: #7b8798;
  font-size: 10px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  letter-spacing: 0.02em;
}
.fake-site-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px 10px;
}
.fake-logo {
  width: 78px;
  height: 14px;
  border-radius: 999px;
  background: var(--demo-brand, #0f766e);
}
.fake-nav-links {
  display: flex;
  gap: 8px;
  flex: 1;
}
.fake-nav-links span {
  width: 36px;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--demo-brand, #0f766e) 18%, #d7dee8);
}
.fake-nav-cta {
  width: 54px;
  height: 18px;
  border-radius: 999px;
  background: var(--demo-brand, #0f766e);
  opacity: 0.95;
}
.fake-site-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 16px;
  padding: 8px 18px 16px;
}
.fake-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
}
.fake-line {
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--demo-brand, #0f766e) 12%, #d9e1ec);
}
.fake-line-lg {
  width: 92%;
  height: 16px;
  background: color-mix(in srgb, var(--demo-brand, #0f766e) 28%, #c8d3e2);
}
.fake-line-md { width: 78%; }
.fake-line-sm { width: 54%; opacity: 0.85; }
.fake-hero-btns {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.fake-hero-btns span {
  width: 68px;
  height: 22px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--demo-brand, #0f766e) 16%, #cfd8e5);
}
.fake-hero-btns span:first-child {
  background: var(--demo-brand, #0f766e);
}
.fake-hero-media {
  min-height: 118px;
  border-radius: 14px;
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--demo-brand, #0f766e) 55%, white),
      color-mix(in srgb, var(--demo-brand, #0f766e) 30%, #0f172a)
    ),
    repeating-linear-gradient(
      -25deg,
      transparent,
      transparent 10px,
      oklch(1 0 0 / 0.08) 10px,
      oklch(1 0 0 / 0.08) 12px
    );
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--demo-brand, #0f766e) 35%, transparent);
}
.fake-site-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 18px 18px;
}
.fake-card {
  background: color-mix(in srgb, var(--demo-panel, #ffffff) 70%, white);
  border: 1px solid color-mix(in srgb, var(--demo-brand, #0f766e) 12%, #e4ebf3);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  box-shadow: 0 6px 16px oklch(0.55 0.03 250 / 0.06);
}
.fake-card-img {
  height: 54px;
  border-radius: 8px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--demo-brand, #0f766e) 22%, #e8eef6),
    color-mix(in srgb, var(--demo-panel, #ffffff) 40%, #d5deea)
  );
}
.fake-card .fake-line { width: 80%; height: 7px; }
.fake-card .fake-line-sm { width: 55%; }

@media (max-width: 700px) {
  .fake-site-hero { grid-template-columns: 1fr; }
  .fake-hero-media { min-height: 80px; }
  .fake-site-grid { grid-template-columns: 1fr 1fr; }
  .fake-site-grid .fake-card:last-child { display: none; }
}

.widget-preview-panel {
  position: absolute;
  right: 16px;
  bottom: 72px;
  width: min(280px, calc(100% - 32px));
  height: 340px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: system-ui, sans-serif;
  z-index: 2;
}
.widget-preview-chat-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 10px 10px 12px;
  min-height: 42px;
  box-sizing: border-box;
  font-size: 13px;
  font-weight: 700;
}
.widget-preview-chat-title-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.widget-preview-chat-head #widget-preview-chat-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}
.widget-preview-chat-online {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  color: #22c55e;
}
.widget-preview-chat-close {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(0, 0, 0, 0.12);
  color: inherit;
}
.widget-preview-log {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  font-size: 13px;
  background: #fff;
  min-height: 0;
}
.widget-preview-msg {
  margin: 6px 0;
  padding: 8px 10px;
  border-radius: 10px;
  max-width: 85%;
  line-height: 1.35;
  word-break: break-word;
}
.widget-preview-msg.bot {
  background: #f1f1f1;
  color: #111;
  margin-right: auto;
}
.widget-preview-msg.user {
  color: #fff;
  margin-left: auto;
}
.widget-preview-input {
  display: flex;
  align-items: stretch;
  border-top: 1px solid #eee;
  min-height: 42px;
  background: #fff;
}
.widget-preview-input span {
  display: flex;
  align-items: center;
  padding: 0 12px;
}
.widget-preview-send {
  border: none;
  color: #fff;
  padding: 0 14px;
  cursor: default;
  font-size: 13px;
  opacity: 0.95;
}
.widget-preview-watermark {
  display: block;
  text-align: center;
  font-size: 11px;
  padding: 6px 8px 8px;
  text-decoration: none;
  letter-spacing: 0.02em;
  border-top: 1px solid #eee;
  color: #94a3b8;
}
.widget-preview-watermark:hover { opacity: 1; text-decoration: underline; }
.widget-preview-bubble {
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  display: flex;
  z-index: 3;
  align-items: center;
  justify-content: center;
}


.toast-host {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast-item {
  min-width: 180px;
  max-width: min(360px, 90vw);
  padding: 12px 16px;
  border-radius: 12px;
  background: oklch(0.22 0.03 280);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-float);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.toast-item.show {
  opacity: 1;
  transform: translateY(0);
}
.toast-item.error {
  border-color: oklch(0.65 0.15 30 / 0.5);
  color: oklch(0.85 0.08 30);
}

.nav-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 12px;
  opacity: 0.5;
}
.nav-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-faint);
  padding: 6px 16px 2px;
  font-weight: 700;
  user-select: none;
}
.bot-sub-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.bot-sub-tabs .option-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  background: var(--glass-2);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
}
.bot-sub-tabs .option-pill.active {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}
.bot-sub-tabs .option-pill:hover:not(.active) {
  background: var(--glass-3);
}

.app-nav button.locked {
  opacity: 0.4;
  cursor: pointer;
}
.app-nav button.locked:hover {
  opacity: 0.6;
  background: var(--glass-2);
}
.upgrade-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  padding: 40px;
}
.upgrade-card {
  text-align: center;
  background: var(--glass-1);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 48px 40px;
  max-width: 400px;
}

.plan-card {
  transition: border-color 0.2s, background 0.2s;
}
.plan-card:hover {
  border-color: var(--violet) !important;
}
.pill-toggle {
  display: inline-flex;
  background: var(--glass-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}
.pill-toggle button {
  padding: 8px 18px;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.pill-toggle button.active {
  background: var(--gradient-primary);
  color: #fff;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.kpi-card {
  background: var(--glass-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  text-align: center;
}
.kpi-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.kpi-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  color: var(--text-primary);
}
