/* Instantly Ai â Sync Spaces Clean Tech Palette */
:root {
  --canvas: #F8FAFC;
  --surface: #FFFFFF;
  --ink: #0F172A;
  --muted: #475569;
  --blue: #2563EB;
  --purple: #7C3AED;
  --navy: #0B132B;
  --gold: #FBBF24;
  --border: #E2E8F0;
  --border-soft: #F1F5F9;
  --green: #10B981;
  --red: #EF4444;
  --orange: #F59E0B;
  --sidebar-w: 260px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.04);
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Syne", "DM Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  width: 100%;
  scrollbar-width: thin;
  scrollbar-color: #720026 #F5E9DA;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 6px;
}
html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: #F5E9DA;
  border-radius: 999px;
}
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: #720026;
  border-radius: 999px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #720026 #F5E9DA;
}
*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
*::-webkit-scrollbar-track {
  background: #F5E9DA;
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb {
  background: #720026;
  border-radius: 999px;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }

#app { min-height: 100vh; width: 100%; overflow-x: hidden; }

/* âââ Utilities âââ */
.container { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 9999px;
  transition: transform .15s, box-shadow .15s, background .15s, opacity .15s;
  white-space: nowrap;
  text-decoration: none !important;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(0.98); box-shadow: none; }
.btn:disabled,
.btn.is-busy {
  opacity: 0.65;
  cursor: wait;
  pointer-events: none;
  transform: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--purple) 0%, var(--blue) 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.28);
}
.btn-primary:hover { box-shadow: 0 12px 28px rgba(124, 58, 237, 0.35); }
.btn-purple { background: var(--purple); color: #fff; border-radius: 10px; }
.btn-blue { background: var(--blue); color: #fff; border-radius: 10px; }
.btn-dark { background: var(--ink); color: #fff; border-radius: 10px; }
.btn-outline {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.btn-outline:hover { border-color: #CBD5E1; background: var(--canvas); }
.btn-ghost { color: var(--muted); padding: 8px; border-radius: 8px; }
.btn-ghost:hover { background: var(--border-soft); color: var(--ink); }
.btn-danger { color: var(--red); padding: 8px 10px; border-radius: 8px; }
.btn-danger:hover { background: #FEF2F2; }
.btn-danger-solid {
  background: #DC2626;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
}
.btn-danger-solid:hover { background: #B91C1C; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.badge-gray { background: #E5E7EB; color: #374151; }
.app-status-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 8px !important;
}
.app-url-muted {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}
.app-publish-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  align-items: center;
  margin-top: 12px;
}
.app-vis-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.app-vis-label select {
  min-width: 220px;
  font-weight: 500;
  color: var(--ink);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}
.app-domain-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.app-domain-label select {
  min-width: 200px;
  max-width: 280px;
  font-weight: 500;
  color: var(--ink);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}
.knowledge-privacy,
.knowledge-types {
  margin-top: 6px !important;
  font-size: 12px !important;
  line-height: 1.45;
}
.knowledge-privacy {
  color: var(--muted);
  font-style: italic;
}
.iga-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.iga-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.iga-switch-track {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #CBD5E1;
  position: relative;
  transition: background .2s ease;
  flex: 0 0 auto;
}
.iga-switch-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .2s ease;
}
.iga-switch input:checked + .iga-switch-track {
  background: var(--crimson, #5C061F);
}
.taxonomy-card .taxonomy-title {
  margin: 0 0 6px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--crimson, #5C061F);
  font-weight: 800;
}
.taxonomy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
  margin-top: 12px;
}
.taxonomy-grid .field { margin: 0; }
.taxonomy-grid select,
.taxonomy-grid input {
  border-color: #E8E0D5;
  background: #fff;
}
.taxonomy-grid select:focus,
.taxonomy-grid input:focus {
  border-color: var(--crimson, #5C061F) !important;
  box-shadow: 0 0 0 3px rgba(92, 6, 31, 0.12) !important;
}
.powered-card .powered-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
@media (max-width: 720px) {
  .taxonomy-grid { grid-template-columns: 1fr; }
  .powered-card .powered-row { flex-direction: column; align-items: flex-start; }
}
.iga-switch input:checked + .iga-switch-track::after {
  transform: translateX(20px);
}
.iga-switch input:disabled + .iga-switch-track {
  opacity: .55;
}
.badge-blue { background: #DBEAFE; color: #1D4ED8; }
.badge-purple { background: #EDE9FE; color: #6D28D9; }
.badge-orange { background: #FEF3C7; color: #B45309; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 8px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input[type="checkbox"],
.field input[type="radio"] {
  width: auto;
  min-width: 16px;
  height: 16px;
  padding: 0;
  margin: 0;
  border-radius: 4px;
  flex: 0 0 auto;
  accent-color: var(--crimson, var(--blue));
  box-shadow: none;
}
.field-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  cursor: pointer;
  width: fit-content;
  max-width: 100%;
}
.field-check span {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  line-height: 1.35;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.field input[type="checkbox"]:focus,
.field input[type="radio"]:focus {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}
.field textarea { min-height: 120px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .field-row { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 9999;
  animation: slideUp .25s ease;
  max-width: 360px;
}
.toast.error { background: var(--red); }
.toast.success { background: #059669; }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* âââ Confirm modal âââ */
.iga-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: grid;
  place-items: center;
  z-index: 10000;
  padding: 20px;
  animation: igaFadeIn .15s ease;
}
.iga-modal-overlay.closing { opacity: 0; transition: opacity .15s ease; }
.iga-modal-overlay[hidden],
.tool-lead-overlay[hidden] {
  display: none !important;
}
@keyframes igaFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.iga-modal {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
  padding: 28px 24px 22px;
  text-align: center;
}
.iga-modal-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  background: #EFF6FF;
  color: #2563EB;
}
.iga-modal-icon.danger {
  background: #FEF2F2;
  color: #DC2626;
}
.iga-modal h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--ink);
}
.iga-modal p {
  margin: 0 0 22px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}
.iga-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.iga-modal-actions .btn { min-width: 110px; justify-content: center; }
.iga-modal-form {
  width: min(480px, 100%);
  text-align: left;
  padding: 26px 24px 20px;
}
.iga-modal-form h3 {
  text-align: left;
  margin-bottom: 6px;
}
.iga-modal-form .iga-modal-msg {
  text-align: left;
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}
.iga-modal-form-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.iga-form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
}
.iga-form-field .input,
.iga-modal-form .input {
  width: 100%;
  box-sizing: border-box;
  min-height: 46px;
  border-radius: 12px !important;
  border: 1.5px solid var(--border) !important;
  background: #fff !important;
  padding: 11px 14px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: var(--ink) !important;
}
.iga-form-field .input:focus,
.iga-modal-form .input:focus {
  outline: none;
  border-color: var(--crimson, #5C061F) !important;
  box-shadow: 0 0 0 3px rgba(92, 6, 31, 0.12);
}
.iga-modal-form .iga-modal-actions {
  margin-top: 8px;
  justify-content: flex-end;
}
.iga-modal-form .btn-primary {
  background: var(--crimson, #5C061F) !important;
  color: #fff !important;
  border: none !important;
}

/* âââ Row / card action menus âââ */
.td-menu { width: 48px; text-align: right; }
.menu-wrap { position: relative; display: inline-flex; }
.menu-trigger {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
}
.menu-dropdown {
  display: none;
  position: fixed;
  min-width: 148px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  padding: 6px;
  z-index: 12000;
}
.menu-dropdown.open { display: block; }
.menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}
.menu-item:hover { background: #F8FAFC; }
.menu-item.menu-delete { color: #DC2626; }
.menu-item.menu-delete:hover { background: #FEF2F2; }

/* âââ Landing âââ */
.lp { background: var(--surface); overflow-x: hidden; }
.lp--editing .lp-editable {
  outline: none;
  border-radius: 4px;
  cursor: text;
  box-decoration-break: clone;
}
.lp--editing .lp-editable:hover {
  box-shadow: inset 0 0 0 1px rgba(139, 30, 63, 0.28);
}
.lp--editing .lp-editable:focus {
  box-shadow: inset 0 0 0 2px rgba(139, 30, 63, 0.45);
  background: rgba(255, 255, 255, 0.55);
}
.lp-edit-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 10px 18px;
  background: #8B1E3F;
  color: #fff;
  font-size: 13px;
}
.lp-edit-banner--hint {
  background: #1F2937;
}
.lp-edit-banner strong { font-weight: 800; }
.lp-edit-status { opacity: 0.9; margin-left: auto; }
.lp-edit-status.is-err { color: #FECACA; }
.iga-edit-toggle.is-on {
  color: #8B1E3F !important;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(139, 30, 63, 0.35);
}
body.iga-edit-mode .iga-ui-edit {
  outline: none;
  cursor: text;
  border-radius: 4px;
}
body.iga-edit-mode .iga-ui-edit:hover {
  box-shadow: inset 0 0 0 1px rgba(139, 30, 63, 0.28);
}
body.iga-edit-mode .iga-ui-edit:focus {
  box-shadow: inset 0 0 0 2px rgba(139, 30, 63, 0.45);
  background: rgba(255, 255, 255, 0.55);
}

/* Floating suggestion chips (Prompt Tools–style editor assist) */
.iga-suggest-bar {
  position: absolute;
  z-index: 10050;
  display: inline-flex;
  gap: 6px;
  padding: 6px 8px;
  background: #111827;
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.28);
  pointer-events: auto;
}
.iga-suggest-bar[hidden] { display: none !important; }
.iga-suggest-chip {
  border: 0;
  background: #1F2937;
  color: #F8FAFC;
  font: 600 12px/1.2 DM Sans, system-ui, sans-serif;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.iga-suggest-chip:hover { background: #8B1E3F; }

.lp-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: auto;
  min-height: 128px;
  padding: 12px 0;
  display: flex;
  align-items: center;
  overflow: visible;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}
.lp-nav .container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px 28px;
  width: min(1120px, calc(100% - 48px));
  overflow: visible;
}
.lp-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 28px;
  min-width: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  color: var(--ink);
  overflow: visible;
}
.brand-with-logo {
  gap: 0;
  flex-shrink: 0;
  overflow: visible;
  line-height: 0;
}
/* Full stacked logo: icon + name below (original artwork) â no clipping */
.brand-logo {
  display: block;
  width: 108px;
  height: auto;
  max-width: 108px;
  max-height: none;
  object-fit: contain;
  object-position: center center;
  background: transparent !important;
  border-radius: 0;
  box-shadow: none !important;
  overflow: visible;
}
.sidebar-brand {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border-soft);
  flex: 0 0 auto;
  overflow: visible;
}
.sidebar-brand .brand-logo {
  width: 96px;
  max-width: 96px;
}
.lp-nav .brand-logo {
  width: 112px;
  max-width: 112px;
}
.auth-visual .brand-logo {
  width: 132px;
  max-width: 132px;
  background: transparent !important;
}
.footer-brand .brand-logo {
  width: 108px;
  max-width: 108px;
  margin-bottom: 10px;
  background: transparent !important;
}
@media (max-width: 900px) {
  .lp-nav {
    min-height: 108px;
    padding: 10px 0;
  }
  .lp-nav .brand-logo {
    width: 92px;
    max-width: 92px;
  }
  .sidebar-brand .brand-logo {
    width: 84px;
    max-width: 84px;
  }
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}
.brand-text strong {
  display: block;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}
.lp-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
}
.lp-links a:hover { color: var(--ink); }
.lp-nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
}

.lp-hero {
  position: relative;
  padding: 72px 0 88px;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(124, 58, 237, 0.08), transparent),
    radial-gradient(ellipse 60% 50% at 10% 80%, rgba(37, 99, 235, 0.06), transparent),
    linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  overflow: hidden;
}
.lp-hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.lp-hero h1 {
  font-family: var(--display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 18px;
}
.lp-hero .lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 16px;
  line-height: 1.55;
}
.lp-hero .lead-kicker {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}
.hero-lead-block {
  margin-bottom: 28px;
}
.hero-lead-block .lead:last-child {
  margin-bottom: 0;
}
.lp-hero-visual {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-scene {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1.1;
  border-radius: 24px;
  background:
    linear-gradient(145deg, #EEF2FF 0%, #F5F3FF 40%, #EFF6FF 100%);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  animation: floatSoft 6s ease-in-out infinite;
}
@keyframes floatSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.hero-scene .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
}
.hero-scene .orb-1 { width: 160px; height: 160px; background: var(--purple); top: -20px; right: -20px; }
.hero-scene .orb-2 { width: 120px; height: 120px; background: var(--blue); bottom: 40px; left: -30px; }
.hero-scene .orb-3 { width: 80px; height: 80px; background: var(--gold); bottom: -10px; right: 60px; opacity: 0.4; }
.hero-float {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 600;
  animation: popIn .6s ease both;
}
.hero-float.f1 { top: 18%; left: 8%; animation-delay: .2s; }
.hero-float.f2 { top: 28%; right: 6%; animation-delay: .4s; }
.hero-float.f3 { bottom: 22%; left: 14%; animation-delay: .55s; }
.hero-float .dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; margin-right: 6px;
}
@keyframes popIn {
  from { opacity: 0; transform: scale(.9) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.hero-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2;
}
.hero-bot {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 20px 50px rgba(124, 58, 237, 0.35);
  animation: pulseGlow 3s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 20px 50px rgba(124, 58, 237, 0.35); }
  50% { box-shadow: 0 24px 60px rgba(37, 99, 235, 0.45); }
}

.lp-how {
  padding: 80px 0;
  background: linear-gradient(180deg, #fff 0%, #faf6f2 100%);
}
.lp-how-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.lp-how-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 22px 24px;
  box-shadow: 0 10px 28px rgba(127, 29, 29, 0.05);
  transition: transform .2s ease, box-shadow .2s ease;
}
.lp-how-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(127, 29, 29, 0.1);
}
.lp-how-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: #7f1d1d;
  color: #fef3c7;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.lp-how-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}
.lp-how-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.lp-faq {
  padding: 80px 0;
  background: var(--canvas);
}
.lp-faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}
.lp-faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.lp-faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-weight: 700;
  color: var(--text);
}
.lp-faq-item summary::-webkit-details-marker { display: none; }
.lp-faq-item summary::marker { content: ""; display: none; }
.lp-faq-q { flex: 1; }
.lp-faq-ico {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #f3e8e8;
  color: #7f1d1d;
  font-size: 18px;
  font-weight: 700;
  transition: transform .2s ease;
}
.lp-faq-item[open] .lp-faq-ico {
  transform: rotate(45deg);
  background: #7f1d1d;
  color: #fef3c7;
}
.lp-faq-a {
  padding: 0 20px 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.lp-faq-a p { margin: 0; }
@media (max-width: 980px) {
  .lp-how-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .lp-how-grid { grid-template-columns: 1fr; }
}
.lp-features {
  padding: 80px 0;
  background: var(--canvas);
}
.section-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 48px;
}
.section-head h2 {
  font-family: var(--display);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.section-head p { color: var(--muted); font-size: 16px; }
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.feat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: transform .2s, box-shadow .2s;
}
.feat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}
.feat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #EFF6FF;
  color: var(--blue);
  margin-bottom: 16px;
}
.feat-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.feat-card p { color: var(--muted); font-size: 14px; }

.lp-showcase {
  padding: 80px 0;
  background: var(--surface);
}
.showcase-frame {
  margin-top: 40px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, #0B132B 0%, #1E293B 100%);
  padding: 28px;
  box-shadow: 0 32px 64px rgba(11, 19, 43, 0.25);
}
.showcase-ui {
  background: var(--canvas);
  border-radius: 12px;
  overflow: hidden;
  min-height: 280px;
  display: grid;
  grid-template-columns: 180px 1fr;
}
.showcase-side {
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 16px;
}
.showcase-side .sk {
  height: 10px;
  background: #E2E8F0;
  border-radius: 4px;
  margin-bottom: 10px;
}
.showcase-main {
  padding: 24px;
  display: flex;
  align-items: center;
}
.showcase-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 0;
  width: 100%;
}
.showcase-stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 10px;
  text-align: center;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.showcase-stat-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #F4E8EA;
  color: var(--crimson, #8B1E3F);
}
.showcase-stat-ico .iga-icon {
  width: 18px;
  height: 18px;
}
.showcase-stat strong { display: none; }
.showcase-stat span {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.25;
}

.lp-pricing {
  padding: 80px 0;
  background: var(--canvas);
}
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
  margin-top: 48px;
}
.price-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: none;
  width: 100%;
  gap: 18px;
}
@media (max-width: 1200px) {
  .price-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .price-grid-4 { grid-template-columns: 1fr; }
}
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.price-card.popular {
  background: linear-gradient(160deg, #2563EB 0%, #3B82F6 50%, #60A5FA 100%);
  color: #fff;
  border: none;
  transform: scale(1.04);
  box-shadow: 0 24px 48px rgba(37, 99, 235, 0.3);
}
.price-card.popular .muted { color: rgba(255,255,255,.85); }
.price-card .plan-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.price-card .plan-price {
  font-family: var(--display);
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.price-card .plan-price span { font-size: 16px; font-weight: 500; opacity: .8; }
.price-card ul {
  list-style: none;
  margin: 24px 0 28px;
  flex: 1;
}
.price-card li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  margin-bottom: 12px;
}
.price-card .check { color: var(--green); flex-shrink: 0; }
.price-card .cross {
  color: #DC2626;
  flex-shrink: 0;
  display: inline-flex;
  width: 18px;
  height: 18px;
}
.price-card .cross svg { width: 18px; height: 18px; }
.price-card li.is-unavailable {
  color: var(--muted);
  opacity: 0.92;
}
.price-card.popular .check { color: #FBBF24; }
.price-card.popular .cross { color: #FCA5A5; }
.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--purple);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 5px 14px;
  border-radius: 9999px;
}
.price-card .btn { margin-top: auto; }
.price-card.popular .btn {
  background: #fff;
  color: var(--blue);
}
.price-card:not(.popular) .btn {
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--ink);
  border-radius: 9999px;
}

.lp-cta {
  background: var(--navy);
  padding: 88px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.lp-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.18), transparent 60%);
}
.lp-cta .devices {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 28px;
  position: relative;
  color: rgba(255,255,255,.7);
}
.lp-cta h2 {
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  position: relative;
  margin-bottom: 12px;
}
.lp-cta h2 .gold {
  background: linear-gradient(90deg, #FBBF24, #F59E0B);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lp-cta p {
  color: #94A3B8;
  margin-bottom: 28px;
  position: relative;
}
.lp-cta .btn-primary {
  position: relative;
  padding: 16px 40px;
  font-size: 16px;
}

.lp-footer {
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 48px 0 28px;
  color: #94A3B8;
}
.lp-footer .container {
  display: grid;
  gap: 32px;
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
  gap: 40px;
  align-items: center;
}
.footer-brand .brand-text strong { color: #fff; }
.footer-links {
  display: none;
}
.footer-col h4 {
  color: #fff;
  font-size: 13px;
  margin-bottom: 12px;
  letter-spacing: .04em;
}
.footer-col a {
  display: block;
  color: #94A3B8;
  font-size: 14px;
  margin-bottom: 8px;
  text-decoration: none !important;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 13px;
}
@media (max-width: 720px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-quote {
    text-align: left;
  }
}
.socials { display: flex; gap: 12px; }
.socials a {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  display: grid; place-items: center;
  color: #94A3B8;
  text-decoration: none !important;
}
.socials a:hover { color: #fff; border-color: rgba(255,255,255,.3); }

/* âââ Auth âââ */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--canvas);
}
.auth-visual {
  background: linear-gradient(160deg, var(--navy) 0%, #1E1B4B 50%, #1E3A8A 100%);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.auth-visual::after {
  content: "";
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.3);
  filter: blur(80px);
  top: -100px; right: -100px;
}
.auth-visual h2 {
  font-family: var(--display);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
  max-width: 360px;
  margin-top: 40px;
}
.auth-visual p { position: relative; z-index: 1; color: #94A3B8; max-width: 340px; margin-top: 12px; }
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.auth-box {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: var(--shadow);
}
.auth-box h1 {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
}
.auth-box .sub { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.auth-box .switch { text-align: center; margin-top: 20px; font-size: 14px; color: var(--muted); }
.auth-error {
  background: #FEF2F2;
  color: var(--red);
  border: 1px solid #FECACA;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 16px;
}
.auth-current {
  background: #FFFBFC;
  border: 1px solid var(--border, #E8E0D5);
  border-radius: 12px;
  padding: 14px 14px 12px;
  margin-bottom: 18px;
}
.auth-current p {
  margin: 0;
  font-size: 13px;
  color: var(--ink, #1A0A0E);
}
.invite-banner {
  background: #EEF2FF;
  color: #3730A3;
  border: 1px solid #C7D2FE;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 16px;
  font-weight: 600;
}
.invite-plan-card {
  background: linear-gradient(145deg, #fff8f1 0%, #f7ebe3 100%);
  border: 1px solid #e8d0c0;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
  text-align: center;
}
.invite-plan-kicker {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7c2d12;
  font-weight: 700;
  margin-bottom: 8px;
}
.invite-plan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #7f1d1d;
  color: #fef3c7;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.invite-plan-sub {
  margin: 10px 0 0;
  font-size: 14px;
  color: #44403c;
  font-weight: 600;
}
.invite-plan-via {
  margin: 8px 0 0;
  font-size: 12px;
  color: #7c2d12;
  font-weight: 600;
}
.auth-invite-note {
  margin: 0 0 14px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.price-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.price-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 820px;
}
.price-grid-1 {
  grid-template-columns: 1fr;
  max-width: 420px;
}
@media (max-width: 1100px) {
  .price-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .price-grid-3,
  .price-grid-2 { grid-template-columns: 1fr; }
}
.price-card.is-current {
  border-color: #7f1d1d;
  box-shadow: 0 0 0 1px rgba(127, 29, 29, 0.15);
}
.plan-soft-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3e8e8;
  color: #7f1d1d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.profile-api-card {
  border-color: #e8d0c0;
  background: linear-gradient(180deg, #fffdf9 0%, #fff 48%);
}
.profile-api-card.is-disabled {
  opacity: 0.78;
}
.profile-api-card.is-disabled .profile-api-badge {
  background: #78716c;
  color: #fff;
}
.usage-byok-link {
  color: var(--crimson, #5C061F) !important;
  font-weight: 700;
  text-decoration: underline !important;
  font-size: 13px;
}
.usage-byok-link:hover { opacity: 0.85; }
.usage-byok-note {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--muted, #7A6A63);
  line-height: 1.35;
}
.profile-api-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.profile-api-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: #7f1d1d;
  color: #fef3c7;
  font-size: 11px;
  font-weight: 800;
}
.profile-api-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.profile-api-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.profile-api-input-wrap input {
  flex: 1;
  min-width: 0;
}
.profile-api-toggle {
  flex-shrink: 0;
  min-width: 40px;
}

/* âââ App Shell (absolute sidebar, main scrolls alone) âââ */
html.iga-app,
html.iga-app body {
  height: 100%;
  overflow: hidden;
}
#app.iga-dashboard {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.app-shell {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--canvas);
}
.sidebar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 50;
}
.sidebar-brand {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border-soft);
  flex: 0 0 auto;
  overflow: visible;
}
.sidebar-nav {
  padding: 10px 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #720026 #F5E9DA;
}
.sidebar-nav::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.sidebar-nav::-webkit-scrollbar-track {
  background: #F5E9DA;
  border-radius: 999px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: #720026;
  border-radius: 999px;
}
.nav-item,
.upgrade-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none !important;
  position: relative;
  transition: background .15s, color .15s;
  flex: 0 0 auto;
  line-height: 1.2;
}
.nav-item:hover,
.upgrade-link:hover {
  background: var(--border-soft);
  color: var(--ink);
}
.nav-item.active,
.upgrade-link.active {
  background: #EFF6FF;
  color: var(--blue);
  font-weight: 600;
}
.nav-item.active::before,
.upgrade-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--blue);
}
.nav-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}
.nav-ico svg,
.iga-icon,
.sidebar svg,
.btn svg,
.btn-ghost svg,
.search-input svg,
.section-card h3 svg,
.topbar svg,
.page-actions svg,
.feat-icon svg,
.app-actions svg,
.launch-hub .btn svg {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
  min-height: 16px;
  max-width: 16px;
  max-height: 16px;
  flex-shrink: 0;
  display: block;
}
.brand-mark svg {
  width: 16px !important;
  height: 16px !important;
}
.sidebar-foot {
  flex: 0 0 auto;
  padding: 10px;
  border-top: 1px solid var(--border-soft);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.upgrade-link {
  border: 1px solid var(--border);
  background: var(--canvas);
  margin: 0;
}
.usage-block {
  background: var(--canvas);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0;
}
.usage-block .usage-top {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 8px;
}
.usage-bar {
  height: 4px;
  background: #E2E8F0;
  border-radius: 9999px;
  overflow: hidden;
}
.usage-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  border-radius: inherit;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 2px;
  flex-wrap: wrap;
}
.iga-edit-switch {
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: #F8F5F0;
  border: 1px solid #E8E0D5;
  max-width: 320px;
}
.wl-hero-right .iga-edit-switch {
  width: 100%;
  max-width: 340px;
}
.iga-edit-switch-text {
  font-size: 12px;
  font-weight: 800;
  color: var(--crimson, #8B1E3F);
  letter-spacing: 0.01em;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}
.iga-edit-switch .iga-switch-track {
  background: #CBD5E1;
}
.iga-edit-switch input:checked + .iga-switch-track {
  background: #8B1E3F !important;
}
body.iga-edit-mode .iga-ui-edit,
body.iga-edit-mode-on .iga-ui-edit {
  outline: none;
  cursor: text;
  border-radius: 4px;
}
body.iga-edit-mode .iga-ui-edit:hover,
body.iga-edit-mode-on .iga-ui-edit:hover {
  box-shadow: inset 0 0 0 1px rgba(139, 30, 63, 0.28);
}
body.iga-edit-mode .iga-ui-edit:focus,
body.iga-edit-mode-on .iga-ui-edit:focus {
  box-shadow: inset 0 0 0 2px rgba(139, 30, 63, 0.45);
  background: rgba(255, 255, 255, 0.65);
}
.user-chip img,
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: #E2E8F0;
}
.avatar-fallback {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
}
.user-chip .meta strong { display: block; font-size: 13px; }
.user-chip .meta span { font-size: 11px; color: var(--muted); }

.main {
  position: absolute;
  left: var(--sidebar-w);
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  overflow: hidden;
  z-index: 1;
  min-width: 0;
}
.sidebar-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 45;
  border: none;
  padding: 0;
  margin: 0;
}
.sidebar-overlay.show { display: block; }

.topbar {
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex: 0 0 56px;
  z-index: 20;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.topbar h1 { font-size: 16px; font-weight: 700; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }

.content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  width: 100%;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #720026 #F5E9DA;
}
.content::-webkit-scrollbar {
  width: 6px;
}
.content::-webkit-scrollbar-track {
  background: #F5E9DA;
  border-radius: 999px;
}
.content::-webkit-scrollbar-thumb {
  background: #720026;
  border-radius: 999px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-head h2 {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.page-head p { color: var(--muted); font-size: 14px; margin-top: 4px; max-width: 520px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.search-input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  min-width: 220px;
}
.search-input input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 14px;
}

/* Dashboard */
.stats-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  width: 100%;
}
.dash-section {
  margin-bottom: 8px;
}
.dash-section-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.stat-card .val {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
}
.stat-card .lbl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--muted);
  margin-top: 6px;
  text-transform: uppercase;
}

.charts-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
  width: 100%;
}
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  min-height: 200px;
  min-width: 0;
  overflow: hidden;
}
.chart-card h3 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--ink);
}
.donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.donut {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: conic-gradient(var(--blue) 0 var(--pct, 50%), #E2E8F0 0);
  display: grid;
  place-items: center;
  position: relative;
}
.donut::after {
  content: "";
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
}
.donut span {
  position: relative;
  z-index: 1;
  font-weight: 800;
  font-size: 18px;
}
.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
  height: 118px;
  padding-top: 4px;
  box-sizing: border-box;
}
.bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex: 1;
  max-width: 64px;
  height: 100%;
  min-width: 0;
}
.bar-col .bar {
  width: 100%;
  background: linear-gradient(180deg, var(--blue), #60A5FA);
  border-radius: 6px 6px 2px 2px;
  min-height: 4px;
  flex: 0 0 auto;
}
.bar-col label {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  line-height: 1.2;
  flex: 0 0 auto;
}
.bar-col .pct {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
}
.chart-card {
  overflow: hidden;
}
.chart-card h3 {
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.table-card .table-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.table-card .table-head h3 { font-size: 15px; font-weight: 700; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--canvas);
}
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.app-name-cell { display: flex; align-items: center; gap: 12px; }
.app-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #FFF7ED;
  display: grid;
  place-items: center;
  color: #EA580C;
  flex-shrink: 0;
  overflow: hidden;
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; }
.app-name-cell strong { display: block; font-size: 14px; }
.app-name-cell .uuid { font-size: 11px; color: var(--muted); font-family: ui-monospace, monospace; }

/* Build */
.build-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
  gap: 20px;
  align-items: start;
  width: 100%;
}
.build-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.build-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: static; /* scroll with Build App content — do not stick */
  top: auto;
  min-width: 0;
  align-self: start;
  margin-top: 0;
}
.section-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.section-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-card h3 .nav-ico,
.section-card h3 svg {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
}
.section-card .sec-desc { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.slug-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-top: -8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.slug-preview .ok { color: var(--green); font-weight: 600; }
.icon-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.icon-preview {
  width: 56px; height: 56px; border-radius: 12px;
  background: #FEE2E2; display: grid; place-items: center; font-size: 28px;
}
.starter-fields { display: flex; flex-direction: column; gap: 12px; }
.starter-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 10px 12px 10px 10px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  cursor: text;
}
.starter-pill:hover { border-color: #C7D2FE; }
.starter-pill:focus-within {
  border-color: #7C3AED;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
  transform: translateY(-1px);
}
.starter-num {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #7C3AED, #2563EB);
  box-shadow: 0 6px 14px rgba(124, 58, 237, 0.25);
}
.starter-pill input {
  flex: 1;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 8px 4px !important;
  font-size: 14px;
  color: var(--ink);
  min-width: 0;
}
.starter-pill input::placeholder { color: #94A3B8; }
.upload-zone {
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: var(--canvas);
}
.upload-zone img {
  display: block;
  max-height: 120px;
  max-width: 100%;
  margin: 0 auto 12px;
  border-radius: 10px;
}
.app-image-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.upload-zone svg {
  width: 28px !important;
  height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  margin: 0 auto 8px;
  opacity: 0.7;
}
.export-list { list-style: none; margin-bottom: 14px; }
.export-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 8px;
}
.launch-hub {
  background: linear-gradient(160deg, var(--blue), #1D4ED8);
  color: #fff;
  border-radius: var(--radius);
  padding: 20px;
}
.launch-hub h3 { font-size: 14px; letter-spacing: .08em; margin-bottom: 8px; }
.launch-hub p { font-size: 13px; opacity: .9; margin-bottom: 16px; }
.launch-hub .btn {
  width: 100%;
  margin-bottom: 8px;
  background: rgba(0,0,0,.25);
  color: #fff;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, opacity .15s ease, box-shadow .15s ease;
}
.launch-hub .btn:hover { background: rgba(0,0,0,.4); transform: translateY(-1px); }
.launch-hub .btn:active {
  background: rgba(0,0,0,.55);
  transform: translateY(1px) scale(0.985);
  box-shadow: inset 0 2px 8px rgba(0,0,0,.35);
}
.launch-hub .btn:disabled,
.launch-hub .btn.is-busy {
  opacity: 0.7;
  cursor: wait;
  pointer-events: none;
  transform: none;
}
.launch-hub .launch-btn-primary {
  background: #fff;
  color: var(--blue, #1D4ED8);
  font-weight: 800;
}
.launch-hub .launch-btn-primary:hover { background: #F8FAFC; color: var(--blue, #1D4ED8); }
.launch-hub .launch-btn-primary:active { background: #E2E8F0; }
.knowledge-btn {
  width: 100%;
  padding: 28px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-weight: 800;
  color: var(--blue);
  font-size: 15px;
  letter-spacing: .02em;
}
.knowledge-btn:hover { background: #EFF6FF; }
.actions-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.action-card {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--canvas);
  box-shadow: 0 10px 24px rgba(26, 10, 14, 0.04);
  overflow: hidden;
}
.action-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.action-name {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  padding: 9px 11px !important;
  background: var(--surface) !important;
  box-sizing: border-box;
}
.action-close {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
  flex: 0 0 auto;
}
.action-close:hover { background: rgba(0,0,0,.06); color: var(--ink); }
.action-label {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
  margin-bottom: 6px;
}
.action-desc {
  width: 100%;
  min-height: 72px;
  margin-bottom: 12px;
  resize: vertical;
  box-sizing: border-box;
  border-radius: 10px;
  line-height: 1.45;
}
.action-row {
  display: grid;
  grid-template-columns: minmax(74px, 86px) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  min-width: 0;
}
.action-method,
.action-url,
.action-kv input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 8px 10px;
  font-size: 13px;
}
.action-url {
  overflow: hidden;
  text-overflow: ellipsis;
}
.action-method {
  padding-right: 24px;
}
.action-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.linkish {
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(92, 6, 31, 0.06);
}
.linkish:hover { text-decoration: none; background: rgba(92, 6, 31, 0.1); }
.action-extra { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.action-kv {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 28px;
  gap: 6px;
  align-items: center;
  min-width: 0;
}
.kv-del {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--muted);
  flex: 0 0 auto;
}
.kv-del:hover { background: rgba(0,0,0,.06); color: var(--ink); }
.knowledge-list {
  list-style: none;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.knowledge-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  background: var(--canvas);
}
.knowledge-list li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.icon-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.iga-icon-picker {
  width: min(420px, calc(100vw - 32px));
  max-height: min(80vh, 560px);
  overflow: auto;
}
.icon-picker-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 16px 0 4px;
}
.icon-pick-btn {
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--canvas);
  font-size: 22px;
  display: grid;
  place-items: center;
  transition: border-color .15s, transform .15s, background .15s;
}
.icon-pick-btn:hover {
  border-color: var(--crimson, var(--blue));
  background: var(--surface);
  transform: translateY(-1px);
}
.chat-hero-title {
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 800;
  margin: 0;
  color: #3A0B18;
}
.chat-hero-emoji { font-size: 42px; line-height: 1; }
.chat-hero-icon img,
.chat-project-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}
.chat-project-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  font-size: 28px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

@media (max-width: 1100px) {
  .action-row {
    grid-template-columns: 1fr;
  }
  .action-method {
    max-width: 120px;
  }
}

/* My Apps */
.apps-meta { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.apps-select-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px 14px;
}
.apps-select-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.apps-select-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  margin: 0;
}
.apps-select-label input {
  width: 16px;
  height: 16px;
  accent-color: var(--crimson, #8B1E3F);
}
.apps-select-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.apps-select-actions #apps-selection-count {
  font-size: 12px;
  color: var(--muted);
}
.apps-select-actions .btn-danger-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.apps-select-actions .btn-danger-outline:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #fff;
}
.apps-bundle-help {
  margin: 10px 0 0 24px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 760px;
}
.apps-bundle-flow {
  margin: 6px 0 0 24px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink);
  font-weight: 500;
}
.apps-bundle-flow span {
  color: var(--crimson, #8B1E3F);
  font-weight: 700;
  margin-right: 4px;
}
@media (max-width: 720px) {
  .apps-select-actions {
    width: 100%;
    justify-content: space-between;
  }
  .apps-bundle-help,
  .apps-bundle-flow {
    margin-left: 0;
  }
}
.app-list-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.app-list-card .info { flex: 1; min-width: 200px; }
.app-list-card .app-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}
.app-list-card .info h3 { font-size: 15px; font-weight: 700; display: inline; margin-right: 8px; }
.app-list-card .info p { font-size: 13px; color: var(--muted); margin: 6px 0; }
.app-list-card .info a { font-size: 13px; word-break: break-all; }
.app-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.app-actions .btn-icon-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  padding: 8px 10px;
}
.app-actions .btn-icon-only .iga-icon { width: 18px; height: 18px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Pages */
.pages-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  min-height: 480px;
  width: 100%;
  align-items: stretch;
}
.pages-list-card,
.pages-detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 0;
}
.pages-list-card .hd,
.pages-detail-card .hd {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pages-list-card .hd h3 { font-size: 12px; letter-spacing: .06em; color: var(--muted); }
.page-item {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  border-right: none;
  cursor: pointer;
  transition: background .15s;
}
.page-item:hover,
.page-item.active { background: #EFF6FF; }
.page-item strong { display: block; font-size: 14px; }
.page-item span { font-size: 12px; color: var(--muted); }
.pages-detail-card .hd h3 { font-size: 16px; color: var(--ink); }
.preview-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  min-height: 560px;
}
.preview-split > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  height: 100%;
}
.pane-label {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--canvas);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.pane-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pane-label-row .btn {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  font-size: 12px;
  padding: 4px 8px;
}
.preview-pane.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 100000;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  border-radius: 0;
  background: #0b0b0f;
  box-shadow: none;
}
.preview-pane.is-fullscreen iframe {
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 0;
}
body.iga-preview-fs { overflow: hidden; }
.iga-loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 280px;
  padding: 48px 24px;
  color: var(--muted);
}
.iga-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border, #e2e8f0);
  border-top-color: var(--blue, #7f1d1d);
  border-radius: 50%;
  animation: iga-spin .7s linear infinite;
}
@keyframes iga-spin {
  to { transform: rotate(360deg); }
}
.preview-split > div:last-child .pane-label {
  border-left: 1px solid var(--border);
}
.code-pane {
  flex: 1 1 auto;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 560px;
  height: 560px;
  max-height: none;
  background: #0F172A;
  color: #E2E8F0;
  border: 0;
  border-radius: 0;
  padding: 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.55;
  overflow: auto;
  white-space: pre;
  resize: none;
  tab-size: 2;
  box-sizing: border-box;
}
.code-pane:focus {
  outline: 2px solid var(--crimson, var(--blue));
  outline-offset: -2px;
}
.html-editor-shell {
  flex: 1 1 auto;
  min-height: 560px;
  background: #0F172A;
}
.html-editor-textarea {
  display: block;
  width: 100%;
  min-height: 560px;
  height: 560px;
  border: 0;
  padding: 18px;
  resize: vertical;
  background: #0F172A;
  color: #E2E8F0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  outline: none;
  tab-size: 2;
  box-sizing: border-box;
}
.html-editor-textarea:focus {
  outline: 2px solid var(--crimson, var(--blue));
  outline-offset: -2px;
}
.sp-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #FFFBFC 0%, #FFF 100%);
}
.sp-editor-toolbar-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-right: 10px;
  border-right: 1px solid var(--border-soft);
}
.sp-editor-toolbar-group:last-of-type { border-right: 0; }
.sp-tool-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.sp-tool-btn:hover {
  background: #FFF5F7;
  border-color: #E8B4BC;
  color: var(--blue);
}
.sp-editor-hint {
  flex: 1 1 220px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.sp-editor-split { min-height: 580px; }
.preview-split.sp-preview-only {
  grid-template-columns: 1fr;
}
.sp-editor-code-col.is-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.preview-split.sp-preview-only .preview-pane {
  border-left: none;
}
.sp-editor-code-col,
.sp-editor-preview-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sp-visual-preview {
  flex: 1 1 auto;
  min-height: 560px;
  background: #0b0b0f;
}
.preview-pane {
  flex: 1 1 auto;
  background: #fff;
  overflow: hidden;
  width: 100%;
  min-height: 560px;
  height: 560px;
  border-left: 1px solid var(--border);
}
.preview-pane iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 560px;
  border: none;
  background: #fff;
}
.pages-toolbar {
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 12px;
}
.pages-toolbar .pages-host-domain {
  margin-right: 4px;
}
#apps-create-page:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.tool-pick .tool-mini + .tool-mini {
  margin-top: 10px;
}
.pages-footer-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 16px;
  border-top: 1px solid var(--border);
}
.pages-preview-only {
  display: flex;
  flex-direction: column;
  min-height: 520px;
}
.pages-preview-only .preview-pane {
  flex: 1;
  min-height: 480px;
}
.pages-preview-only iframe {
  width: 100%;
  min-height: 480px;
  border: none;
  background: #fff;
}

/* Sales builder */
.sales-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  width: 100%;
}
.tool-pick {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.tool-pick h4 { font-size: 11px; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.tool-mini {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--canvas);
}
.tool-mini strong { display: block; font-size: 13px; }
.tool-mini p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.tool-pick-list.is-single {
  display: flex;
  justify-content: center;
}
.tool-pick-list.is-single .tool-mini {
  width: 100%;
  max-width: 280px;
}

/* Content pages */
.announce-card, .changelog-card, .help-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
}
.announce-meta { display: flex; justify-content: space-between; margin-bottom: 10px; }
.announce-card h3 { font-size: 18px; margin-bottom: 10px; }
.announce-card ul { padding-left: 18px; color: var(--muted); font-size: 14px; }
.announce-card li { margin-bottom: 4px; }

.cl-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.cl-section { margin-bottom: 12px; }
.cl-section .tag-added { color: var(--green); font-weight: 700; font-size: 13px; }
.cl-section .tag-changed { color: var(--orange); font-weight: 700; font-size: 13px; }
.cl-section ul { padding-left: 18px; color: var(--muted); font-size: 14px; margin-top: 6px; }

.help-cat { margin-bottom: 28px; }
.help-cat h3 { font-size: 14px; margin-bottom: 12px; letter-spacing: .02em; }
.help-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 14px 18px;
}
.help-item.open { border-color: var(--blue); }
.help-answer {
  display: none;
  padding: 0 18px 14px;
  color: var(--muted);
  font-size: 14px;
}
.help-item.open + .help-answer,
.help-block.open .help-answer { display: block; }

.upgrade-usage {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  max-width: none;
  width: 100%;
}
.upgrade-page {
  width: 100%;
  max-width: none;
}
.upgrade-card-full {
  width: 100%;
  max-width: none !important;
  box-sizing: border-box;
}
.invite-claim-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 26px;
  margin-bottom: 28px;
  box-shadow: 0 1px 2px rgba(26, 10, 14, 0.04);
}
.invite-claim-head h3 {
  margin: 0 0 8px;
  font-size: 20px;
  color: var(--ink);
}
.invite-claim-head .agency-help {
  margin-bottom: 18px;
  max-width: 62ch;
}
.invite-claim-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}
.invite-claim-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.invite-claim-input {
  width: 100%;
  min-height: 48px;
  border-radius: 12px !important;
  border: 1.5px solid var(--border) !important;
  background: #fff !important;
  padding: 12px 14px !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  color: var(--ink) !important;
  box-sizing: border-box;
}
.invite-claim-input:focus {
  outline: none;
  border-color: var(--crimson, #5C061F) !important;
  box-shadow: 0 0 0 3px rgba(92, 6, 31, 0.12);
}
.invite-claim-btn {
  min-height: 48px;
  padding: 12px 22px !important;
  border-radius: 999px !important;
  background: var(--crimson, #5C061F) !important;
  color: #fff !important;
  border: none !important;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(92, 6, 31, 0.22);
}
.invite-claim-btn:hover {
  background: #4A0519 !important;
}
.invite-claim-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}
@media (max-width: 720px) {
  .invite-claim-row {
    grid-template-columns: 1fr;
  }
  .invite-claim-btn {
    width: 100%;
  }
}
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 640px;
  margin-bottom: 20px;
}
.profile-grid {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 24px;
  align-items: start;
}
.avatar-box {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  background: var(--canvas);
  border: 1px solid var(--border);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.avatar-box img { width: 100%; height: 100%; object-fit: cover; }
.avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.avatar-col .btn { width: 100%; justify-content: center; }

.password-row {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}
.password-row .btn-dark {
  flex: 0 0 auto;
  margin-bottom: 22px;
  background: #0F172A;
  color: #fff;
  border: none;
}
.password-row .btn-dark:hover { background: #1E293B; }

.sub-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.sub-metric {
  border: 1px solid #BFDBFE;
  background: #EFF6FF;
  border-radius: 12px;
  padding: 14px 16px;
}
.sub-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.sub-metric strong {
  font-size: 16px;
  color: var(--ink);
}
.sub-accent { color: #2563EB !important; }
.sub-note {
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 6px;
}

.still-help-card {
  max-width: 640px;
  margin: 8px auto 32px;
  padding: 28px 24px;
  text-align: center;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 16px;
}
.still-help-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  color: #1E3A8A;
}
.still-help-card p {
  margin: 0;
  font-size: 14px;
  color: #334155;
  line-height: 1.5;
}
.still-help-card a {
  color: #2563EB;
  font-weight: 600;
  text-decoration: underline;
}
.still-help-card a:hover { color: #1D4ED8; }

@media (max-width: 640px) {
  .sub-metrics { grid-template-columns: 1fr; }
  .password-row .btn-dark { margin-bottom: 0; width: 100%; }
}

.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
  background: var(--surface);
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}
.empty-state h3 { color: var(--ink); margin-bottom: 8px; }

/* Responsive */
@media (max-width: 1100px) {
  .stats-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .charts-row { grid-template-columns: repeat(2, 1fr); }
  .build-layout, .sales-layout, .pages-layout { grid-template-columns: 1fr; }
  .build-side { position: static; }
  .preview-split { grid-template-columns: 1fr; }
  .preview-pane {
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .preview-split > div:last-child .pane-label { border-left: none; }
}
@media (max-width: 900px) {
  .lp-hero .container, .feat-grid, .price-grid, .auth-page { grid-template-columns: 1fr; }
  .price-card.popular { transform: none; }
  .auth-visual { display: none; }
  .lp-links { display: none; }
  .nav-toggle { display: flex; }
  .lp-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: #fff;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
  }
  .app-shell {
    height: 100vh;
    height: 100dvh;
  }
  .sidebar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 80;
    width: min(280px, 85vw);
    transform: translateX(-105%);
    transition: transform .25s ease;
    box-shadow: 8px 0 32px rgba(0,0,0,.12);
  }
  .sidebar.open { transform: translateX(0); }
  .main {
    left: 0;
    right: 0;
  }
  .mobile-menu-btn { display: flex; }
  .sidebar-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,.4);
    z-index: 70;
  }
  .sidebar-overlay.show { display: block; }
  .showcase-ui { grid-template-columns: 1fr; }
  .showcase-side { display: none; }
  .showcase-stat-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .charts-row { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .profile-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
}

/* ---- Tool Builder wizard ---- */
.wizard-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 0 48px;
}
.wizard-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 28px 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}
.wizard-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
}
.wizard-step-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
.wizard-card .sec-desc {
  color: var(--muted);
  margin: 0 0 20px;
  line-height: 1.5;
}
.wizard-card .field label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  font-weight: 700;
}
.wizard-loader {
  text-align: center;
  padding: 72px 28px;
}
.wizard-loader h3 { margin-top: 20px; color: var(--ink); }
.wizard-loader p { color: var(--muted); margin-top: 8px; }
.spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto;
  border: 3px solid #E8E0D5;
  border-top-color: var(--crimson, #5C061F);
  border-radius: 50%;
  animation: iga-spin .8s linear infinite;
}
@keyframes iga-spin { to { transform: rotate(360deg); } }
.wizard-select,
.wizard-textarea,
.wizard-card .input {
  width: 100%;
  border: 1.5px solid var(--border, #E8E0D5) !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  font: inherit;
  background: #F8F5F0 !important;
  color: var(--ink);
  min-height: 48px;
  box-sizing: border-box;
}
.wizard-select:focus,
.wizard-textarea:focus,
.wizard-card .input:focus {
  outline: none;
  border-color: var(--crimson, #5C061F) !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(92, 6, 31, 0.12);
}
.wizard-textarea { min-height: 200px !important; resize: vertical; line-height: 1.5; }
.wizard-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 22px;
  flex-wrap: wrap;
}
.wizard-actions .btn-blue {
  flex: 1;
  justify-content: center;
  min-width: 180px;
  background: var(--crimson, #5C061F) !important;
  color: #fff !important;
  border-radius: 12px !important;
  padding: 12px 20px !important;
  font-weight: 700;
}
.wizard-actions .btn-outline {
  border-radius: 12px !important;
  padding: 12px 18px !important;
}
.blueprint-block { margin: 8px 0 18px; }
.blueprint-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
.blueprint-summary {
  background: #F3EEE5;
  color: var(--crimson, #5C061F);
  border: 1px solid #E8E0D5;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 10px;
  line-height: 1.45;
}
.blueprint-purpose {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  line-height: 1.5;
}
.field-help {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 0;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.badge-green {
  display: inline-flex;
  align-items: center;
  background: #DCFCE7;
  color: #15803D;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 2px 6px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
}

/* ---- Build App hub (AI vs Manual + blueprints) ---- */
.build-hub { width: 100%; max-width: none; }
.build-path-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 8px 0 28px;
}
.build-path-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 22px 18px;
  box-shadow: 0 8px 24px rgba(26, 10, 14, 0.04);
}
.build-path-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(92, 6, 31, 0.08);
  color: var(--crimson, #5C061F);
  margin-bottom: 12px;
}
.build-path-card h3 { margin: 0 0 8px; font-size: 18px; }
.build-path-card p { margin: 0 0 14px; color: var(--muted); line-height: 1.5; font-size: 14px; }
.build-path-card .linkish {
  font-weight: 700;
  color: var(--crimson, #5C061F);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}
.bp-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 16px;
  margin-bottom: 6px;
}
.bp-section-head h3 { margin: 0; font-size: 20px; }
.bp-tagline {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--crimson, #5C061F);
}
.bp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin: 14px 0 8px;
}
.bp-card {
  text-align: left;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px 16px 14px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  font: inherit;
  color: inherit;
}
.bp-card:hover { border-color: rgba(92, 6, 31, 0.35); }
.bp-card.is-selected {
  border-color: var(--crimson, #5C061F);
  box-shadow: 0 0 0 3px rgba(92, 6, 31, 0.12);
}
.bp-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.bp-card-top strong { font-size: 15px; line-height: 1.3; }
.bp-tag {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(92, 6, 31, 0.1);
  color: var(--crimson, #5C061F);
}
.bp-card p {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
.bp-card p span { font-weight: 700; color: var(--ink); }
.bp-for { margin-top: 8px !important; font-weight: 600; color: var(--ink) !important; }
.build-path-card .linkish,
.build-path-card .hub-ai-btn,
.build-path-card .btn-sm {
  font-weight: 700;
}
.build-path-card .btn-sm {
  display: inline-flex;
  align-items: center;
  width: auto;
}
.bp-section-top { margin-bottom: 8px; }
.bp-section-bottom { margin-top: 8px; }
.bp-actions {
  margin-top: 18px;
  justify-content: flex-start;
  gap: 10px;
}
.bp-actions .btn-blue,
.wizard-actions.bp-actions .btn-blue {
  flex: 0 0 auto !important;
  min-width: 0 !important;
  width: auto !important;
  padding: 8px 14px !important;
  font-size: 13px !important;
  border-radius: 10px !important;
  font-weight: 700;
}
.wizard-actions.bp-actions .btn-outline {
  padding: 8px 14px !important;
  font-size: 13px !important;
  border-radius: 10px !important;
}

/* Export / Generate App modals (crimson palette) */
.iga-export-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(26, 10, 14, 0.55);
  display: grid;
  place-items: center;
  padding: 20px;
}
.iga-export-modal {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 28px 26px 24px;
  box-shadow: 0 24px 60px rgba(26, 10, 14, 0.28);
  text-align: center;
  border: 1px solid #E8E0D5;
}
.iga-export-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(92, 6, 31, 0.1);
  color: var(--crimson, #5C061F);
  border: 2px solid rgba(92, 6, 31, 0.25);
}
.iga-export-modal h3 {
  margin: 0 0 6px;
  font-size: 22px;
  color: var(--ink);
}
.iga-export-kicker {
  margin: 0 0 18px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.iga-export-steps {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  text-align: left;
}
.iga-export-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.iga-export-steps li .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #E8E0D5;
  flex-shrink: 0;
}
.iga-export-steps li.is-done { color: #6B7280; }
.iga-export-steps li.is-done .dot {
  background: #15803D;
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.15);
}
.iga-export-steps li.is-active {
  color: var(--crimson, #5C061F);
  font-weight: 700;
}
.iga-export-steps li.is-active .dot {
  background: var(--crimson, #5C061F);
  box-shadow: 0 0 0 4px rgba(92, 6, 31, 0.15);
  animation: iga-pulse 1s ease infinite;
}
@keyframes iga-pulse {
  50% { box-shadow: 0 0 0 6px rgba(92, 6, 31, 0.08); }
}
.iga-export-bar {
  height: 8px;
  border-radius: 999px;
  background: #F3EEE5;
  overflow: hidden;
}
.iga-export-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--crimson, #5C061F), #8B1E3F);
  border-radius: inherit;
  transition: width .25s ease;
}
.iga-export-success-ico {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ECFDF5;
  color: #15803D;
  border: 2px solid #A7F3D0;
}
.iga-export-success p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 16px;
}
.iga-export-link-label {
  display: block;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.iga-export-link-row {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #F8F5F0;
  border: 1px solid #E8E0D5;
  border-radius: 12px;
  padding: 8px 8px 8px 12px;
  margin-bottom: 18px;
}
.iga-export-link-row input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  outline: none;
}
.iga-export-actions {
  display: flex;
  gap: 10px;
  justify-content: stretch;
}
.iga-export-actions .btn { flex: 1; justify-content: center; }
@media (max-width: 720px) {
  .build-path-grid { grid-template-columns: 1fr; }
  .bp-grid { grid-template-columns: 1fr; }
  .iga-export-actions { flex-direction: column; }
}

/* ---- Chat window (burgundy + cream Instantly chatbot) ---- */
.chat-standalone-page,
.iga-preview-chat-overlay {
  --chat-primary: #720026;
  --chat-heading: #3A0B18;
  --chat-hover: #8A1238;
  --chat-light: #F7E8EC;
  --chat-bg: #FBF7F1;
  --chat-hero-bg: #F5E9DA;
  --chat-surface: #FFFFFF;
  --chat-border: #E8D9CA;
  --chat-border-light: #F0E7DE;
  --chat-text: #24161A;
  --chat-muted: #75676A;
  --chat-placeholder: #9A8D90;
  --chat-gold: #D9A441;
  --chat-shadow-sm: 0 2px 10px rgba(58, 11, 24, 0.05);
  --chat-shadow-md: 0 8px 30px rgba(58, 11, 24, 0.08);
  --chat-shadow-lg: 0 20px 60px rgba(58, 11, 24, 0.12);
}
.chat-standalone-page {
  min-height: 100dvh;
  height: 100dvh;
  width: 100%;
  margin: 0;
  padding: 24px;
  display: flex;
  justify-content: center;
  align-items: stretch;
  box-sizing: border-box;
  background:
    radial-gradient(circle at 85% 15%, rgba(114, 0, 38, 0.06), transparent 30%),
    radial-gradient(ellipse 70% 45% at 8% 88%, rgba(245, 233, 218, 0.9), transparent 52%),
    var(--chat-bg);
  overflow: hidden;
  font-family: Inter, "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--chat-text);
}
.chat-standalone-card,
.chat-standalone-card.card {
  width: 100%;
  max-width: 1600px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 28px;
  border: 1px solid #eee2d8;
  background: #fff;
  box-shadow: 0 18px 55px rgba(58, 11, 24, 0.10);
  overflow: auto;
  position: relative;
}
.chat-standalone-card::before {
  content: "";
  position: absolute;
  inset: 88px 0 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 55% 40% at 88% 18%, rgba(245, 233, 218, 0.95), transparent 60%),
    radial-gradient(ellipse 50% 35% at 12% 78%, rgba(247, 232, 236, 0.45), transparent 55%);
}
.chat-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
  min-height: calc(100vh - 140px);
}
.chat-main {
  display: flex;
  flex-direction: column;
  min-height: 560px;
  padding: 20px;
}
.chat-app-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  height: 145px;
  margin: 0;
  padding: 32px 42px;
  border-bottom: 1px solid #f1e9e1;
  background: rgba(255, 255, 255, 0.96);
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}
.chat-app-logo,
.chat-project-icon.chat-app-logo {
  width: 78px;
  height: 78px;
  border-radius: 20px;
  background: linear-gradient(145deg, #fff8ef, #f4e1d4);
  box-shadow: 0 8px 22px rgba(114, 0, 38, 0.08);
  border: 1px solid #ead9ca;
  overflow: hidden;
}
.chat-app-logo img,
.chat-project-icon.chat-app-logo img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 12px;
}
.chat-app-meta { flex: 1; min-width: 0; padding-top: 4px; }
.chat-app-meta h3 {
  margin: 0;
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.7px;
  color: var(--chat-heading);
  line-height: 1.15;
}
.chat-app-meta p {
  margin-top: 7px;
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--chat-muted);
}
.chat-head-actions {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-shrink: 0;
  margin-left: auto;
}
.chat-save-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 8px;
  min-width: 96px;
}
.chat-save-btn {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: auto;
  height: auto;
  min-width: 0;
  border: 1px solid #DFC8B9;
  background: #fff;
  color: var(--chat-primary);
  border-radius: 14px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  box-shadow: none;
  transition: all 0.2s ease;
}
.chat-save-btn:hover {
  background: var(--chat-primary);
  color: #fff;
  border-color: var(--chat-primary);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(114, 0, 38, 0.15);
}
.chat-save-ico {
  display: inline-flex;
  color: inherit;
}
.chat-save-ico .iga-icon { width: 16px; height: 16px; }
.chat-save-label { line-height: 1; letter-spacing: .02em; }
.chat-save-note {
  margin: 0;
  max-width: 150px;
  text-align: right;
  font-size: 12px;
  line-height: 1.4;
  color: var(--chat-placeholder);
}
.chat-back-apps { white-space: nowrap; margin-top: 6px; }
.chat-hero {
  flex: 0 0 auto;
  min-height: 440px;
  padding: 50px 9% 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  text-align: left;
  color: var(--chat-muted);
  position: relative;
  overflow: hidden;
  z-index: 2;
  background:
    radial-gradient(circle at 74% 40%, rgba(114, 0, 38, 0.075), transparent 28%),
    linear-gradient(180deg, #fff 0%, #fffdf9 55%, #f8eee4 100%);
}
.chat-hero::after {
  content: "";
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: -48px;
  height: 140px;
  background: var(--chat-hero-bg, #F5E9DA);
  border-radius: 50% 50% 0 0 / 35% 35% 0 0;
}
.chat-hero[hidden] { display: none !important; }
.chat-hero-copy {
  position: relative;
  z-index: 3;
  max-width: 560px;
  min-width: 0;
}
.chat-hero-hi {
  display: inline-flex;
  align-items: center;
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  color: var(--chat-primary);
}
.chat-hero-title {
  margin: 0;
  font-size: clamp(44px, 5.3vw, 68px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -3px;
  color: var(--chat-heading);
}
.chat-hero-title span { color: var(--chat-primary); }
.chat-hero-lead {
  max-width: 520px;
  margin: 22px 0 0;
  font-size: 17px;
  line-height: 1.62;
  color: var(--chat-muted);
}
.robot-stage {
  width: 500px;
  height: 390px;
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.robot-glow {
  position: absolute;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(114, 0, 38, 0.14), rgba(217, 164, 65, 0.08), transparent 70%);
  filter: blur(4px);
}
.robot-image {
  width: 320px;
  height: 320px;
  position: relative;
  z-index: 4;
  object-fit: contain;
  filter: drop-shadow(0 25px 30px rgba(58, 11, 24, 0.17));
  animation: robotFloat 4s ease-in-out infinite;
}
.robot-platform {
  position: absolute;
  bottom: 18px;
  width: 285px;
  height: 43px;
  border-radius: 50%;
  background: linear-gradient(180deg, #8a1238, #720026);
  box-shadow: 0 15px 30px rgba(114, 0, 38, 0.24);
  z-index: 2;
}
.robot-platform::before,
.robot-platform::after {
  content: "";
  position: absolute;
  left: 25px;
  right: 25px;
  top: 6px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.34);
}
.robot-bubble {
  position: absolute;
  width: 59px;
  height: 59px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid #ead9ca;
  box-shadow: 0 12px 30px rgba(58, 11, 24, 0.11);
  font-size: 25px;
  z-index: 6;
}
.robot-bubble.chat { left: 35px; top: 50px; background: #720026; color: #fff; border-color: #720026; }
.robot-bubble.idea { right: 36px; top: 58px; color: #D9A441; }
.robot-bubble.star { left: 55px; bottom: 80px; background: #720026; color: #fff; border-color: #720026; }
.robot-bubble.q { right: 40px; bottom: 72px; background: #fff8ef; color: #8b6a50; }
@keyframes robotFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
.chat-hero-art {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}
.chat-hero-art img {
  width: min(100%, 420px);
  height: auto;
  max-height: min(360px, 42dvh);
  object-fit: contain;
}
.chat-hero-icon {
  width: 112px;
  height: 112px;
  border-radius: 22px;
  background: var(--chat-hero-bg);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  color: var(--chat-primary);
  overflow: hidden;
}
.chat-hero-icon svg { width: 36px !important; height: 36px !important; max-width: 36px !important; max-height: 36px !important; }
.chat-app-logo svg {
  width: 58px;
  height: 58px;
}
.chat-thread {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px 42px 20px;
  width: 100%;
  position: relative;
  z-index: 2;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}
.chat-thread:empty {
  flex: 0 0 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
.chat-bubble {
  max-width: min(720px, 92%);
  padding: 20px 22px;
  border-radius: 20px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}
.chat-bubble.user {
  align-self: flex-end;
  background: #f9edf0;
  color: var(--chat-text);
  border: 1px solid #e9cbd4;
  border-bottom-right-radius: 20px;
}
.chat-bubble.bot {
  align-self: flex-start;
  max-width: min(900px, 96%);
  background: #fff;
  border: 1px solid #eee1d7;
  color: var(--chat-text);
  box-shadow: 0 5px 18px rgba(58, 11, 24, 0.05);
}
.chat-bubble.thinking { color: var(--chat-muted); font-style: italic; }
.chat-starters {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 1030px;
  width: calc(100% - 48px);
  margin: 28px auto 12px;
  padding: 0 24px;
  flex-shrink: 0;
}
.chat-starters[hidden] { display: none !important; }
.chat-starter {
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  border: 1px solid var(--chat-border);
  background: #fff;
  border-radius: 18px;
  padding: 16px 19px;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  color: var(--chat-text);
  text-align: left;
  box-shadow: 0 5px 16px rgba(58, 11, 24, 0.045);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.chat-starter:hover {
  transform: translateY(-4px);
  border-color: #cda8b5;
  background: #fff;
  box-shadow: 0 15px 35px rgba(114, 0, 38, 0.11);
}
.chat-starter-ico {
  width: 49px;
  height: 49px;
  min-width: 49px;
  border-radius: 14px;
  background: var(--chat-primary);
  color: #fff;
  display: grid;
  place-items: center;
}
.chat-starter-ico .iga-icon { width: 21px; height: 21px; }
.chat-starter-label { flex: 1; min-width: 0; line-height: 1.4; }
.chat-starter-go {
  color: var(--chat-primary);
  font-size: 22px;
  font-weight: 500;
}
.chat-composer {
  display: flex;
  align-items: center;
  gap: 15px;
  width: calc(100% - 12%);
  min-height: 88px;
  margin: 34px 6% 0;
  border: 1.5px solid #e3cec0;
  border-radius: 22px;
  padding: 12px 14px 12px 20px;
  background: #fff;
  flex-shrink: 0;
  box-sizing: border-box;
  box-shadow: 0 8px 30px rgba(58, 11, 24, 0.06);
  position: relative;
  z-index: 2;
}
.chat-dock {
  margin-top: auto;
  flex-shrink: 0;
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  order: 40;
}
.chat-standalone-card > .chat-app-head { order: 0; }
.chat-standalone-card > .chat-hero { order: 10; }
.chat-standalone-card > .chat-starters { order: 20; }
.chat-standalone-card > .chat-thread { order: 30; }
.chat-standalone-card > .chat-composer { order: 40; }
.chat-standalone-card > .chat-powered { order: 50; }
.chat-dock .chat-composer { width: calc(100% - 12%); margin: 24px 6% 0; }
.chat-composer:focus-within {
  border-color: var(--chat-primary);
  box-shadow: 0 0 0 4px rgba(114, 0, 38, 0.07), 0 10px 35px rgba(58, 11, 24, 0.08);
}
.chat-composer-spark {
  width: 47px;
  height: 47px;
  min-width: 47px;
  border-radius: 14px;
  background: var(--chat-primary);
  color: #fff;
  display: grid;
  place-items: center;
}
.chat-composer-spark .iga-icon { width: 22px; height: 22px; }
.chat-composer input {
  flex: 1;
  min-width: 0;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 14px 0 !important;
  font: inherit;
  font-size: 16px !important;
  color: var(--chat-text) !important;
}
.chat-composer input::placeholder {
  color: #9a8d90;
}
.chat-send {
  width: 59px;
  height: 59px;
  min-width: 59px;
  min-height: 59px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, #8a1238, #720026);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 59px;
  box-shadow: 0 8px 20px rgba(114, 0, 38, 0.25);
  transition: transform .2s ease, box-shadow .2s ease;
}
.chat-send:hover {
  background: linear-gradient(135deg, #8a1238, #720026);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 28px rgba(114, 0, 38, 0.32);
}
.chat-powered {
  text-align: center;
  font-size: 13px;
  color: var(--chat-muted);
  margin: 10px 0 18px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  order: 50;
}
.chat-tool-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}
.chat-tool-body > .chat-dock {
  margin-top: auto;
  order: 40;
}
.chat-password-gate {
  margin: 24px auto 8px;
  max-width: 360px;
  text-align: center;
}
.chat-password-gate p {
  color: var(--muted);
  margin: 0 0 12px;
}
.chat-password-form {
  display: flex;
  gap: 8px;
  align-items: center;
}
.chat-password-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}
.chat-password-error {
  color: #b91c1c;
  font-size: 13px;
  margin-top: 8px !important;
}
.tool-lead-overlay {
  position: fixed;
  z-index: 10001;
}
.tool-lead-modal h3 {
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 8px;
}
.tool-lead-modal .iga-modal-msg {
  margin-bottom: 18px;
}
.tool-lead-modal .input-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}
.tool-lead-error {
  color: #b91c1c;
  font-size: 13px;
  margin: 4px 0 0;
}
.tool-lead-signin {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 0;
}
.tool-lead-signin a { color: var(--primary); font-weight: 600; }
.tool-chat-blocked {
  text-align: center;
  padding: 32px 20px;
  margin: 12px 0;
  background: #F9FAFB;
  border-radius: 12px;
  border: 1px dashed var(--border);
}
.tool-chat-blocked h4 { margin: 0 0 8px; }
.tool-chat-blocked p { color: var(--muted); margin: 0; }

/* Leads page */
.leads-page-head { align-items: flex-start; gap: 16px; }
.leads-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 20px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.leads-search { flex: 1 1 260px; min-width: 220px; }
.leads-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.leads-filter select {
  min-width: 200px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
.leads-count {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  padding: 6px 12px;
  background: #F8FAFC;
  border-radius: 999px;
}
.leads-table-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}
.leads-table-scroll { overflow-x: auto; }
.leads-data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}
.leads-data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  padding: 14px 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748B;
  background: #F8FAFC;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.leads-data-table tbody td {
  padding: 16px 18px;
  border-bottom: 1px solid #EEF2F7;
  vertical-align: middle;
  color: var(--ink);
}
.leads-data-table tbody tr:last-child td { border-bottom: 0; }
.leads-data-table tbody tr:hover td { background: #FFFBFC; }
.leads-cell-name strong { font-weight: 600; }
.leads-cell-email a { color: var(--blue); text-decoration: none; font-weight: 500; }
.leads-cell-email a:hover { text-decoration: underline; }
.leads-cell-app { max-width: 280px; font-weight: 500; }
.leads-cell-date { white-space: nowrap; color: #475569; font-size: 13px; }
.leads-cell-actions,
.leads-actions-col {
  width: 150px;
  text-align: right;
  white-space: nowrap;
}
.leads-cell-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.btn-xs {
  padding: 6px 12px;
  font-size: 12px;
  line-height: 1.2;
  border-radius: 8px;
}
.btn-danger-outline {
  color: #B91C1C;
  border: 1px solid #FECACA;
  background: #fff;
}
.btn-danger-outline:hover { background: #FEF2F2; }
.leads-empty {
  text-align: center;
  color: var(--muted);
  padding: 36px 18px !important;
}
.leads-page-actions { margin-left: auto; }

.iga-lead-view-modal-app,
.iga-lead-view-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 20px;
}
.iga-lead-view-modal-app[hidden],
.iga-lead-view-modal[hidden] { display: none !important; }
.iga-lead-view-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.iga-lead-view-dialog {
  position: relative;
  width: min(440px, 100%);
  padding: 24px;
  z-index: 1;
}
.iga-lead-view-dialog h2,
.iga-lead-view-dialog h3 {
  margin: 0 0 16px;
  font-size: 20px;
}
.iga-lead-view-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: #F1F5F9;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.iga-lead-view-list {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px 16px;
  margin: 0;
}
.iga-lead-view-list dt {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748B;
}
.iga-lead-view-list dd {
  margin: 0;
  font-size: 14px;
  color: var(--ink);
  word-break: break-word;
}

@media (max-width: 900px) {
  .leads-toolbar { padding: 14px; }
  .leads-count { margin-left: 0; width: 100%; text-align: center; }
  .leads-data-table thead th,
  .leads-data-table tbody td { padding: 12px 14px; }
  .leads-cell-app { max-width: 200px; }
}
@media (max-width: 640px) {
  .leads-cell-actions { flex-direction: column; align-items: stretch; }
  .leads-actions-col { width: 110px; }
}

/* Autoresponder */
.ar-card {
  padding: 24px 26px 28px;
  max-width: none;
  width: 100%;
}
.ar-connected-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #ECFDF5;
  color: #047857;
  border: 1px solid #6EE7B7;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.ar-connected-badge[hidden] {
  display: none;
}
.ar-connected-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
}
.ar-copy-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.ar-copy-row input {
  flex: 1;
  min-width: 0;
}
.ar-oauth-actions {
  margin: 4px 0 8px;
}
.ar-provider-panel {
  margin-bottom: 4px;
}
.ar-provider-panel[hidden],
.ar-credentials[hidden],
#ar-list-wrap[hidden],
.ar-coming-soon[hidden],
.ar-dd-menu[hidden] {
  display: none !important;
}
.ar-dd {
  position: relative;
}
.ar-dd-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.ar-dd-btn:focus {
  border-color: var(--crimson, #5C061F);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--crimson, #5C061F) 16%, transparent);
}
.ar-dd-btn-copy {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ar-dd-caret {
  color: var(--muted);
  font-size: 12px;
  flex-shrink: 0;
}
.ar-dd-menu {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(26, 10, 14, 0.12);
  max-height: 320px;
  overflow: auto;
}
.ar-dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
.ar-dd-item:hover,
.ar-dd-item.is-active {
  background: color-mix(in srgb, var(--crimson, #5C061F) 8%, #fff);
  color: var(--crimson, #5C061F);
}
.ar-dd-lock {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: color-mix(in srgb, var(--crimson, #5C061F) 12%, #fff);
  color: var(--crimson, #5C061F);
  flex-shrink: 0;
}
.ar-dd-lock .iga-icon {
  width: 13px;
  height: 13px;
}
.ar-dd-name {
  flex: 1 1 auto;
  min-width: 0;
}
.ar-soon-pill {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold, #C29958) 18%, #fff);
  color: #8A5A14;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ar-coming-soon {
  margin-top: 8px;
  padding: 36px 28px 32px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #FFFBFC;
  box-shadow: 0 10px 28px rgba(92, 6, 31, 0.06);
}
.ar-soon-ico {
  display: inline-flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--crimson, #5C061F);
  color: #fff;
  box-shadow: 0 10px 24px rgba(92, 6, 31, 0.28);
}
.ar-soon-ico .iga-icon {
  width: 24px;
  height: 24px;
}
.ar-coming-soon h3 {
  margin: 0 0 8px;
  font-family: var(--quote, "Cormorant Garamond", Georgia, serif);
  font-size: 32px;
  font-weight: 600;
  font-style: italic;
  color: var(--ink, #1A0A0E);
}
.ar-coming-soon p {
  margin: 0 0 22px;
  color: var(--muted, #7A6A63);
  font-size: 14px;
}
.ar-coming-soon .btn {
  min-width: 140px;
  border-radius: 999px;
  justify-content: center;
}
.ar-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}
.ar-card-head h3 {
  margin: 0 0 4px;
  font-size: 17px;
}
.ar-card-ico {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--crimson, #5C061F) 12%, #fff);
  color: var(--crimson, #5C061F);
  flex-shrink: 0;
}
.ar-enable-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #FFFBFC;
  font-size: 14px;
  font-weight: 700;
}
.ar-credentials {
  margin-top: 4px;
}
.ar-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin: 4px 0 18px;
}
.ar-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--crimson, #5C061F);
}
.ar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ar-status {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}
.ar-status.is-success {
  background: #ECFDF5;
  color: #047857;
  border: 1px solid #A7F3D0;
}
.ar-status.is-error {
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}
.ar-status.is-info {
  background: #F3EEE5;
  color: #5C061F;
  border: 1px solid #E8E0D5;
}

.chat-side { display: none; }
.btn-block { width: 100%; justify-content: center; }
body.iga-chat-standalone {
  background: #FBF7F1;
  margin: 0;
}
body.iga-chat-standalone #app {
  min-height: 100vh;
  width: 100%;
  max-width: none;
}
@media (max-width: 1050px) {
  .chat-hero { padding: 45px 45px 30px; }
  .robot-stage { width: 430px; transform: scale(0.9); }
  .chat-starters { width: calc(100% - 40px); }
}
@media (max-width: 850px) {
  .chat-standalone-page { padding: 12px; }
  .chat-app-head { height: auto; padding: 25px; flex-wrap: wrap; }
  .chat-hero {
    flex-direction: column;
    text-align: center;
    padding: 45px 25px 30px;
    min-height: 0;
  }
  .chat-hero-copy { max-width: 700px; }
  .chat-hero-lead { margin-left: auto; margin-right: auto; }
  .robot-stage { width: 100%; max-width: 500px; margin-top: 15px; }
  .chat-starters {
    grid-template-columns: 1fr;
    max-width: 650px;
    width: calc(100% - 32px);
    margin: 24px auto 12px;
  }
  .chat-composer { width: calc(100% - 40px); margin: 28px 20px 0; }
}
@media (max-width: 600px) {
  .chat-standalone-page { padding: 0; padding-bottom: max(0px, env(safe-area-inset-bottom)); }
  .chat-standalone-card { border-radius: 0; }
  .chat-app-head { padding: 20px; }
  .chat-app-logo,
  .chat-project-icon.chat-app-logo { width: 58px; height: 58px; }
  .chat-app-logo svg { width: 44px; height: 44px; }
  .chat-app-meta h3 { font-size: 20px; }
  .chat-app-meta p { font-size: 12px; }
  .chat-save-note { display: none; }
  .chat-hero { padding: 42px 20px 10px; }
  .chat-hero-title { font-size: 40px; letter-spacing: -1.8px; }
  .robot-stage { height: 320px; transform: scale(0.8); margin-top: -5px; }
  .chat-composer {
    width: calc(100% - 30px);
    min-height: 70px;
    margin: 28px 15px max(10px, env(safe-area-inset-bottom));
    padding-left: 12px;
  }
  .chat-composer-spark { width: 42px; height: 42px; min-width: 42px; }
  .chat-send { width: 49px; height: 49px; min-width: 49px; min-height: 49px; border-radius: 15px; flex-basis: 49px; }
}

/* ===== Agency Tier ===== */
.nav-section-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin: 18px 14px 8px;
}

/* Sidebar — Saved Pages per app (elegant accordion) */
.iga-saved-pages {
  margin: 4px 4px 8px;
  border: 1px solid var(--border-soft, #E8E0D5);
  border-radius: 12px;
  background: #FBF8F4;
  overflow: hidden;
}
.iga-saved-pages-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
  border: 0;
  width: 100%;
  background: transparent;
  text-align: left;
  font: inherit;
  color: var(--ink);
}
.iga-saved-pages-head:hover { background: rgba(139, 30, 63, 0.04); }
.iga-saved-pages-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.iga-saved-pages-head-left .nav-ico {
  flex: 0 0 auto;
  color: var(--crimson, #8B1E3F);
}
.iga-saved-pages-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.iga-saved-pages-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--border-soft, #E8E0D5);
  border-radius: 999px;
  padding: 2px 8px;
}
.iga-saved-pages-chevron {
  width: 16px;
  height: 16px;
  color: var(--muted);
  transition: transform 0.2s ease;
  flex: 0 0 auto;
}
.iga-saved-pages.is-open .iga-saved-pages-chevron { transform: rotate(180deg); }
.iga-saved-pages-body {
  display: none;
  padding: 0 8px 10px;
  max-height: 280px;
  overflow-y: auto;
}
.iga-saved-pages.is-open .iga-saved-pages-body { display: block; }
.iga-saved-app {
  margin-top: 6px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border-soft, #E8E0D5);
  overflow: hidden;
}
.iga-saved-app-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 9px 10px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: var(--ink);
}
.iga-saved-app-toggle:hover { background: rgba(139, 30, 63, 0.05); }
.iga-saved-app-name {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.iga-saved-app-meta {
  font-size: 10px;
  font-weight: 700;
  color: var(--crimson, #8B1E3F);
  flex: 0 0 auto;
}
.iga-saved-app-versions {
  display: none;
  padding: 0 6px 8px;
  flex-direction: column;
  gap: 4px;
}
.iga-saved-app.is-open .iga-saved-app-versions { display: flex; }
.iga-saved-ver {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}
.iga-saved-ver:hover {
  background: #FDF2F5;
  border-color: rgba(139, 30, 63, 0.15);
  color: var(--crimson, #8B1E3F);
}
.iga-saved-ver.active {
  background: rgba(139, 30, 63, 0.1);
  border-color: rgba(139, 30, 63, 0.22);
  color: var(--crimson, #8B1E3F);
}
.iga-saved-ver-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 2px 6px;
  border-radius: 6px;
  background: #F7F1EA;
  color: var(--crimson, #8B1E3F);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
}
.iga-saved-ver-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.iga-saved-pages-empty {
  padding: 10px 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.iga-saved-pages-empty a {
  color: var(--crimson, #8B1E3F);
  font-weight: 700;
  text-decoration: none;
}

/* Sales Pages list — group by app */
.pages-app-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.pages-app-filter label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pages-app-filter select {
  min-width: 220px;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
}
.apps-bulk-delete-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}
.apps-bulk-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  margin: 0;
}
.apps-bulk-label input {
  width: 16px;
  height: 16px;
  accent-color: var(--crimson, #8B1E3F);
}
.apps-bulk-delete-bar .btn-danger-outline:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.pages-empty-for-app {
  padding: 28px 20px;
  text-align: center;
}
.pages-empty-for-app h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.pages-empty-for-app p {
  margin: 0 auto;
  max-width: 420px;
  color: var(--muted);
  line-height: 1.5;
}
.pages-empty-hint {
  margin-top: 8px !important;
  font-size: 13px;
}
.page-group {
  margin-bottom: 12px;
  border: 1px solid var(--border-soft, #E8E0D5);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.page-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: #FBF8F4;
  border-bottom: 1px solid var(--border-soft, #E8E0D5);
}
.page-group-head strong {
  font-size: 13px;
  font-weight: 800;
}
.page-group-head span {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.page-item .page-ver {
  display: inline-flex;
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(139, 30, 63, 0.08);
  color: var(--crimson, #8B1E3F);
  font-size: 10px;
  font-weight: 800;
}
.page-item .page-app-name {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  margin-top: 2px;
}

.plan-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  align-items: center;
}
.plan-chip {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
.agency-pill-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--crimson, #5C061F);
  background: #F3EEE5;
  border: 1px solid #E8E0D5;
  padding: 4px 10px;
  border-radius: 999px;
  max-width: 100%;
  line-height: 1.2;
}
.agency-pill {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  color: #FAF7F2;
  background: var(--crimson, #5C061F);
  border: 1px solid var(--crimson, #5C061F);
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(92, 6, 31, 0.22);
}
.agency-page {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
.agency-kicker {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin: 0 0 6px;
}
.agency-title-row h2,
.agency-empty h2 {
  font-family: var(--display);
  font-size: clamp(26px, 4vw, 32px);
  margin: 0 0 8px;
}
.agency-lead {
  color: var(--muted);
  margin: 0 0 22px;
  max-width: 64ch;
}
.agency-plan-card {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 18px;
  width: 100%;
  box-sizing: border-box;
}
.agency-plan-card h3 {
  margin: 4px 0 8px;
  font-size: clamp(18px, 2.5vw, 22px);
}
.agency-mini {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin: 0;
}
.agency-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 10px;
  width: 100%;
}
.agency-stats article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  min-width: 0;
}
.agency-stats strong {
  display: block;
  margin-top: 6px;
  font-size: 16px;
}
.agency-stats strong.ok { color: #15803d; }
.agency-stat-ico {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--crimson, #5C061F) 12%, transparent);
  color: var(--crimson, #5C061F);
  margin-bottom: 8px;
}
.agency-stat-ico.ok { background: #dcfce7; color: #15803d; }
.agency-stat-ico.link { background: #F3EEE5; color: var(--crimson, #5C061F); }
.agency-progress {
  height: 4px;
  background: #E8E0D5;
  border-radius: 999px;
  overflow: hidden;
  margin: 0 0 22px;
  width: 100%;
}
.agency-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--crimson, #5C061F), var(--gold, #C29958));
}
.agency-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 18px;
  width: 100%;
  box-sizing: border-box;
}
.agency-card h3 { margin: 0 0 6px; font-size: 18px; }
.agency-help { color: var(--muted); margin: 0 0 16px; font-size: 14px; line-height: 1.45; }
.agency-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }
.agency-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 640px;
}
.agency-table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
}
.agency-table td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.agency-empty-row { color: var(--muted); text-align: center; padding: 28px 8px !important; }
.agency-avatar {
  display: inline-flex;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: #F3EEE5;
  color: var(--crimson, #5C061F);
  font-weight: 700;
  font-size: 12px;
  margin-right: 8px;
}
.agency-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #F3EEE5;
  color: var(--crimson, #5C061F);
  border: 1px solid #E8E0D5;
  font-size: 12px;
  font-weight: 700;
}
.agency-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
  background: #dcfce7;
  color: #166534;
}
.agency-status.revoked,
.agency-status.expired,
.agency-status.used {
  background: #fee2e2;
  color: #991b1b;
}
.agency-actions { white-space: nowrap; }
.agency-actions .btn { margin-right: 4px; margin-bottom: 4px; }
.btn-danger-text { color: #b91c1c !important; border-color: #fecaca !important; }
.agency-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
  width: 100%;
}
.agency-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--ink);
  min-width: 0;
  line-height: 1.35;
}
.agency-form-grid .input,
.agency-form-grid select.input,
.agency-card .input,
.agency-card select {
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  border-radius: 12px !important;
  border: 1.5px solid var(--border) !important;
  background: #fff !important;
  padding: 12px 14px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  color: var(--ink) !important;
  appearance: auto;
}
.agency-form-grid .input:focus,
.agency-form-grid select.input:focus,
.agency-card .input:focus,
.agency-card select:focus {
  outline: none;
  border-color: var(--crimson, #5C061F) !important;
  box-shadow: 0 0 0 3px rgba(92, 6, 31, 0.12);
}
.password-field {
  position: relative;
  display: block;
  width: 100%;
}
.password-field .input,
.password-field input {
  width: 100%;
  padding-right: 46px !important;
}
.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0;
}
.password-toggle:hover {
  color: var(--crimson, #5C061F);
  background: #F3EEE5;
}
.password-toggle:focus {
  outline: none;
  color: var(--crimson, #5C061F);
  box-shadow: 0 0 0 2px rgba(92, 6, 31, 0.15);
}
.password-toggle .iga-icon {
  width: 18px;
  height: 18px;
}
.hint-inline {
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  opacity: 0.8;
  margin-left: 6px;
}
.agency-btn {
  background: var(--crimson, #5C061F);
  border: none;
  color: #fff;
  border-radius: 999px;
  padding: 12px 22px;
  min-height: 46px;
  box-shadow: 0 8px 20px rgba(92, 6, 31, 0.22);
}
.agency-btn:hover { background: #4A0519; }
.agency-link-input {
  width: min(100%, 320px);
  margin-bottom: 6px;
  font-size: 12px;
}
.agency-empty-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  max-width: 640px;
  width: 100%;
  box-sizing: border-box;
}
.agency-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}
.agency-claim-box { margin-top: 12px; }
@media (max-width: 960px) {
  .agency-stats { grid-template-columns: 1fr; }
  .agency-plan-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .agency-pill {
    align-self: flex-start;
    white-space: normal;
    text-align: center;
  }
}
@media (max-width: 720px) {
  .agency-form-grid { grid-template-columns: 1fr; }
  .agency-card,
  .agency-plan-card { padding: 18px 16px; }
  .agency-btn { width: 100%; }
  .agency-actions { white-space: normal; }
  .agency-actions .btn {
    display: inline-flex;
    margin: 0 6px 6px 0;
  }
}

/* âââ Custom Domain (member SPA) âââ */
.domain-page {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
.domain-kicker {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin: 0 0 6px;
}
.domain-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.domain-head h2 {
  font-family: var(--display);
  font-size: clamp(26px, 4vw, 32px);
  margin: 0 0 8px;
}
.domain-lead {
  color: var(--muted);
  margin: 0;
  max-width: 64ch;
}
.domain-lead code,
.domain-help code,
.domain-panel code {
  background: rgba(92, 6, 31, 0.08);
  color: var(--crimson, #5C061F);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 12px;
  word-break: break-all;
}
.domain-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-2, #F8FAFC);
  color: var(--muted);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.domain-badge.is-live {
  background: #ECFDF5;
  color: #047857;
  border-color: #A7F3D0;
}
.domain-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 28px 26px;
  box-sizing: border-box;
  box-shadow: 0 8px 28px rgba(26, 10, 14, 0.05);
}
.domain-domains-card {
  margin-top: 18px;
}
.domain-domains-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.domain-domains-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
}
.iga-domains-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: min(100%, 280px);
  flex: 1 1 220px;
  max-width: 340px;
}
.iga-domains-search-ico {
  position: absolute;
  left: 12px;
  display: inline-flex;
  color: var(--muted);
  pointer-events: none;
}
.iga-domains-search input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
}
.iga-domains-search input:focus {
  outline: none;
  border-color: var(--crimson, #8B1E3F);
  box-shadow: 0 0 0 3px rgba(139, 30, 63, 0.14);
}
.iga-domains-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-soft, #E8E0D5);
  border-radius: 12px;
  background: #fff;
}
.iga-domains-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}
.iga-domains-table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft, #E8E0D5);
  background: #FBF8F4;
}
.iga-domains-table td {
  padding: 14px;
  border-bottom: 1px solid #F0E9E2;
  vertical-align: middle;
  font-size: 13px;
}
.iga-domains-table tr:last-child td { border-bottom: 0; }
.iga-domains-empty-row td {
  color: var(--muted);
  text-align: center;
  padding: 22px 14px;
}
.iga-domain-name { font-size: 14px; color: var(--ink); }
.iga-domain-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.iga-domain-status.is-connected {
  background: #FCE7F3;
  color: #9D174D;
}
.iga-domain-status.is-pending {
  background: #FEF3C7;
  color: #B45309;
}
.iga-domain-status.is-disconnected {
  background: #F1F5F9;
  color: #64748B;
}
.iga-domain-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.iga-icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.iga-icon-btn:hover {
  border-color: var(--crimson, #8B1E3F);
  color: var(--crimson, #8B1E3F);
  background: #FDF2F5;
}
.iga-icon-btn.is-danger:hover {
  border-color: #B91C1C;
  color: #B91C1C;
  background: #FEF2F2;
}
.iga-icon-btn .iga-icon { width: 16px; height: 16px; }
.domain-field {
  margin-top: 4px;
  max-width: 560px;
}
.domain-steps {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.domain-steps > li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--surface-2, #F8FAFC);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  user-select: none;
}
.domain-steps > li.is-clickable {
  cursor: pointer;
}
.domain-steps > li.is-clickable:hover {
  border-color: rgba(92, 6, 31, 0.35);
  color: var(--ink, #1A0A0E);
}
.domain-steps > li.is-locked {
  opacity: 0.72;
  cursor: pointer;
}
.domain-steps > li.is-active {
  background: #fff;
  border-color: var(--crimson, #5C061F);
  color: var(--text, #0F172A);
  box-shadow: 0 0 0 3px rgba(92, 6, 31, 0.1);
}
.domain-steps > li.is-done {
  background: rgba(92, 6, 31, 0.06);
  border-color: rgba(92, 6, 31, 0.25);
  color: var(--crimson, #5C061F);
}
.domain-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #E2E8F0;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}
.domain-steps > li.is-active .domain-step-num,
.domain-steps > li.is-done .domain-step-num {
  background: var(--crimson, #5C061F);
  color: #fff;
}
.domain-panel h3 {
  margin: 0 0 8px;
  font-size: 16px;
}
.domain-help {
  color: var(--muted);
  margin: 0 0 8px;
  line-height: 1.55;
}
.domain-help-tight { margin: 12px 0 0; }
.domain-field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 18px 0 10px;
  color: var(--ink, #1A0A0E);
}
.domain-input,
.domain-notes,
.domain-panel .input {
  display: block;
  width: 100%;
  max-width: 560px;
  box-sizing: border-box;
  min-height: 52px;
  margin: 0;
  padding: 14px 16px !important;
  border: 1.5px solid var(--border, #E8E0D5) !important;
  border-radius: 12px !important;
  background: #F8F5F0 !important;
  color: var(--ink, #1A0A0E) !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  outline: none !important;
  box-shadow: inset 0 1px 2px rgba(26, 10, 14, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
}
.domain-input::placeholder,
.domain-notes::placeholder,
.domain-panel .input::placeholder {
  color: #A89A92 !important;
  opacity: 1;
}
.domain-input:hover,
.domain-notes:hover,
.domain-panel .input:hover {
  border-color: #D4C8BA !important;
  background: #fff !important;
}
.domain-input:focus,
.domain-notes:focus,
.domain-panel .input:focus {
  border-color: var(--crimson, #5C061F) !important;
  background: #fff !important;
  box-shadow: 0 0 0 4px rgba(92, 6, 31, 0.12) !important;
}
.domain-input.is-invalid,
.domain-panel .input.is-invalid {
  border-color: #DC2626 !important;
  background: #FEF2F2 !important;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1) !important;
}
.domain-notes {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5 !important;
}
.domain-dns-box {
  background: #F8F5F0;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 14px 0 10px;
  max-width: 560px;
}
.domain-dns-box strong {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
}
.domain-dns-row {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 8px 0;
  font-size: 13px;
  color: var(--muted);
}
.domain-copy {
  appearance: none;
  border: 1px solid var(--border, #E8E0D5);
  background: #fff;
  color: var(--ink, #1A0A0E);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.domain-copy:hover { border-color: var(--crimson, #5C061F); }
.domain-copy.is-copied { background: #ecfdf5; border-color: #6ee7b7; color: #047857; }
.domain-checklist {
  margin: 12px 0 4px;
  padding: 14px 18px 14px 34px;
  background: var(--surface-2, #F8FAFC);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text, #334155);
  font-size: 14px;
  line-height: 1.55;
}
.domain-checklist li { margin: 6px 0; }
.domain-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  align-items: center;
}
.domain-btn.btn-primary,
.domain-actions .btn-primary {
  background: var(--crimson, #5C061F) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 13px 24px !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  box-shadow: 0 10px 24px rgba(92, 6, 31, 0.28) !important;
  min-width: 168px;
  cursor: pointer;
}
.domain-btn.btn-primary:hover,
.domain-actions .btn-primary:hover {
  background: #4A0519 !important;
  color: #fff !important;
  transform: translateY(-1px);
}
.domain-btn-secondary.btn-outline,
.domain-actions .btn-outline {
  border-radius: 12px !important;
  padding: 12px 18px !important;
  min-width: 110px;
  border: 1.5px solid var(--border) !important;
  background: #fff !important;
  color: var(--ink) !important;
  font-weight: 600 !important;
  cursor: pointer;
}
.domain-btn-secondary.btn-outline:hover,
.domain-actions .btn-outline:hover {
  border-color: var(--crimson, #5C061F) !important;
  color: var(--crimson, #5C061F) !important;
  background: rgba(92, 6, 31, 0.04) !important;
}
.domain-danger {
  color: #b91c1c !important;
  border-color: #fecaca !important;
}
.domain-flash {
  margin: 16px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(92, 6, 31, 0.06);
  color: var(--crimson, #5C061F);
  font-size: 13px;
  font-weight: 600;
}
.domain-flash.is-error {
  background: #FEF2F2;
  color: #B91C1C;
}
@media (max-width: 720px) {
  .domain-dns-row { grid-template-columns: 1fr; }
  .domain-actions .btn { width: 100%; min-width: 0; }
  .domain-input,
  .domain-notes { max-width: none; }
}



/* ——— Whitelabel studio ——— */
.wl-studio {
  width: 100%;
  max-width: none;
  padding-bottom: 40px;
  box-sizing: border-box;
}
.wl-lock-banner {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #F5E9DA;
  border: 1px solid #E8D5C4;
  color: #5C3A3A;
  font-size: 14px;
  line-height: 1.45;
}
.wl-studio.is-locked .wl-lock-target {
  position: relative;
  opacity: 0.62;
  pointer-events: none;
  user-select: none;
}
.wl-studio.is-locked .wl-lock-target::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: transparent;
}
.wl-studio > .wl-card--full:last-of-type {
  margin-bottom: 0;
}
.wl-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.wl-kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--crimson, #8B1E3F);
  font-weight: 800;
}
.wl-title {
  margin: 4px 0 8px;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--ink, #1A0A0E);
  font-family: Syne, DM Sans, sans-serif;
}
.wl-desc {
  margin: 0;
  color: var(--muted, #6B5B5E);
  line-height: 1.5;
  max-width: 640px;
  font-size: 14px;
}
.wl-hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.wl-status {
  font-size: 12px;
  font-weight: 700;
  color: var(--crimson, #8B1E3F);
  background: rgba(139, 30, 63, 0.08);
  padding: 6px 12px;
  border-radius: 999px;
}
.wl-status.is-err { color: #B91C1C; background: #FEF2F2; }
.wl-status[hidden] { display: none !important; }
.wl-info {
  background: #F8F5F0;
  border: 1px solid var(--border, #E8E0D5);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0 0 16px;
  color: var(--ink, #1A0A0E);
  width: 100%;
  box-sizing: border-box;
}
.wl-info p { margin: 6px 0 0; color: var(--muted, #6B5B5E); font-size: 13px; }
.wl-info a { color: var(--crimson, #8B1E3F); font-weight: 600; }
.wl-card,
.wl-card--full {
  background: #fff;
  border: 1px solid var(--border, #E8E0D5);
  border-radius: 18px;
  padding: 22px 24px 18px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(26, 10, 14, 0.03);
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
.wl-card-head { margin-bottom: 16px; }
.wl-card-head--row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.wl-card-head--row > div:first-child { flex: 1; min-width: 200px; }
.wl-card-head--row .wl-toggle-row {
  margin: 0;
  padding: 0;
  border: 0;
  flex: 0 1 280px;
  max-width: 320px;
}
.wl-card-head h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink, #1A0A0E);
}
.wl-card-head p { margin: 0; font-size: 13px; color: var(--muted, #6B5B5E); }
.wl-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
  margin-bottom: 8px;
  width: 100%;
}
.wl-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.wl-field--span { grid-column: 1 / -1; }
.wl-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #4A3A3E;
}
.wl-input,
.wl-studio .wl-input,
.wl-studio select.wl-input,
.wl-studio textarea.wl-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 46px;
  padding: 11px 14px !important;
  border: 1.5px solid var(--border, #E8E0D5) !important;
  border-radius: 12px !important;
  background: #FBF8F4 !important;
  color: var(--ink, #1A0A0E) !important;
  font: inherit;
  font-size: 14px !important;
  font-weight: 400 !important;
  box-shadow: none !important;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.wl-studio textarea.wl-input { min-height: 88px; resize: vertical; line-height: 1.45; }
.wl-input:focus,
.wl-studio .wl-input:focus {
  border-color: var(--crimson, #8B1E3F) !important;
  box-shadow: 0 0 0 3px rgba(139, 30, 63, 0.14) !important;
  outline: none;
  background: #fff !important;
}
.wl-color-row { display: flex; gap: 10px; align-items: center; }
.wl-color-swatch {
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1.5px solid var(--border, #E8E0D5);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.wl-upload { grid-column: span 1; }
.wl-upload-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.wl-preview {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid var(--border, #E8E0D5);
  background: #fff;
  flex-shrink: 0;
}
.wl-preview--fav { width: 48px; height: 48px; border-radius: 10px; }
.wl-preview--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 18px;
}
.wl-upload-actions { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.wl-file-btn { position: relative; overflow: hidden; cursor: pointer; width: fit-content; }
.wl-file-btn input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.wl-url-input { margin-top: 2px; }
.wl-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 4px;
  border-top: 1px solid #F0E9E2;
  margin-top: 12px;
}
.wl-toggle-row:first-of-type { border-top: 0; margin-top: 4px; }
.wl-toggle-row strong { display: block; font-size: 14px; color: var(--ink); }
.wl-muted { margin: 4px 0 0; font-size: 12px; color: var(--muted); line-height: 1.4; }
.wl-switch {
  position: relative;
  width: 52px;
  height: 28px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.2s;
}
.wl-switch span {
  position: absolute;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: left 0.2s;
}
.wl-switch.is-on { background: var(--crimson, #8B1E3F); }
.wl-switch.is-on span { left: 27px; }
.wl-switch.is-off { background: #94A3B8; }
.wl-switch.is-off span { left: 3px; }
.wl-domains { display: flex; flex-direction: column; gap: 8px; }
.wl-domain-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: #F8F5F0;
  border-radius: 12px;
  border: 1px solid var(--border, #E8E0D5);
}
.wl-chip {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(139, 30, 63, 0.1);
  color: var(--crimson, #8B1E3F);
}

/* Live landing inline editor */
.wl-live { width: 100%; }
.wl-live-hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted, #6B5B5E);
}
.wl-live-frame {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border, #E8E0D5);
  border-radius: 16px;
  background: linear-gradient(180deg, #FFFCF8 0%, #F7F1EA 100%);
  padding: 20px 22px 28px;
  overflow: hidden;
}
.wl-live-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px 20px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(139, 30, 63, 0.08);
}
.wl-grid--toggles { gap: 12px; }
.wl-grid--toggles .wl-toggle-row { margin-bottom: 0; }
.wl-live-logo { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; }
.wl-live-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.wl-live-cta-pill {
  background: var(--crimson, #8B1E3F);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.wl-live-cta-pill .wl-inline { color: #fff; }
.wl-live-quote {
  text-align: center;
  font-style: italic;
  color: var(--muted);
  margin: 8px 0 18px;
  font-size: 14px;
}
.wl-live-hero { margin-bottom: 28px; }
.wl-live-h1 {
  font-family: Syne, DM Sans, sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--ink);
}
.wl-inline--accent { color: var(--crimson, #8B1E3F); }
.wl-live-lead {
  font-size: 15px;
  line-height: 1.55;
  color: #5A4A4E;
  max-width: 640px;
  margin: 0 0 16px;
}
.wl-live-btn { display: inline-flex; margin-top: 4px; }
.wl-live-section { margin: 28px 0; }
.wl-live-section h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 800;
}
.wl-live-sub { margin: 0 0 14px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.wl-live-feats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.wl-live-feat {
  background: #fff;
  border: 1px solid var(--border, #E8E0D5);
  border-radius: 14px;
  padding: 14px;
}
.wl-live-feat strong { display: block; margin-bottom: 6px; font-size: 14px; }
.wl-live-feat p { margin: 0; font-size: 13px; color: #5A4A4E; line-height: 1.45; }
.wl-live-quote2 { font-style: italic; color: var(--muted); margin: 10px 0 14px; }
.wl-live-cta-block {
  text-align: center;
  padding: 28px 16px;
  background: rgba(139, 30, 63, 0.06);
  border-radius: 16px;
  margin: 24px 0;
}
.wl-live-cta-block h3 { margin: 0 0 8px; font-size: 1.35rem; }
.wl-live-footer {
  padding-top: 18px;
  border-top: 1px solid var(--border, #E8E0D5);
  font-size: 13px;
  color: #5A4A4E;
}
.wl-inline {
  display: inline;
  cursor: text;
  border-radius: 4px;
  outline: none;
  transition: background 0.15s, box-shadow 0.15s;
  min-width: 0.5ch;
}
.wl-inline:hover {
  background: rgba(139, 30, 63, 0.06);
  box-shadow: inset 0 0 0 1px rgba(139, 30, 63, 0.18);
}
.wl-inline.is-editing,
.wl-inline:focus {
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--crimson, #8B1E3F);
  caret-color: var(--crimson, #8B1E3F);
}
div.wl-inline, p.wl-inline, h3.wl-inline, strong.wl-inline {
  display: block;
}
.wl-studio-footer {
  position: relative;
  z-index: 1;
  margin-top: 24px;
  padding: 14px 16px 16px;
  background: #F7F1EA;
  border: 1px solid #E8E0D5;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(26, 10, 14, 0.06);
  box-sizing: border-box;
}
.wl-domains-hint {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted, #6B5B5E);
}
.wl-domains-hint a {
  color: var(--crimson, #8B1E3F);
  font-weight: 700;
  text-decoration: none;
}
.wl-domains-hint a:hover { text-decoration: underline; }
.wl-save-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0;
  position: static;
  background: transparent;
  box-shadow: none;
  z-index: auto;
}
.wl-history-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
}
.wl-history-btn {
  min-width: 96px;
  min-height: 42px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff !important;
}
.wl-history-ico {
  display: inline-flex;
  width: 16px;
  height: 16px;
  color: inherit;
  flex: 0 0 auto;
}
.wl-history-ico .iga-icon {
  width: 16px;
  height: 16px;
}
.wl-save-btn {
  min-width: 160px;
  min-height: 48px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.wl-save-btn.is-busy { opacity: 0.75; cursor: wait; }
.wl-history-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

@media (max-width: 900px) {
  .wl-live-feats { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .wl-grid { grid-template-columns: 1fr; }
  .wl-hero-right { align-items: stretch; width: 100%; }
  .wl-upload-row { flex-direction: column; }
  .wl-studio-footer { padding: 12px; }
  .wl-save-bar { justify-content: stretch; }
  .wl-history-btns { margin-right: 0; width: 100%; }
  .wl-history-btn { flex: 1; }
  .wl-save-btn { width: 100%; }
}

.iga-preview-chat-overlay {
  display: flex !important;
  align-items: stretch;
  justify-content: center;
  padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  z-index: 10060;
  box-sizing: border-box;
}
body.iga-preview-chat-open { overflow: hidden; }
.iga-preview-chat-modal {
  width: min(1200px, 100%);
  height: calc(100dvh - 16px);
  max-height: calc(100dvh - 16px);
  min-height: 0;
  background: #FFFFFF;
  border-radius: 24px;
  border: 1px solid #F0E7DE;
  box-shadow: 0 20px 60px rgba(58, 11, 24, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}
.iga-preview-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #EDE7DE;
  flex-shrink: 0;
}
.iga-preview-chat-brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.iga-preview-chat-meta { min-width: 0; }
.iga-preview-chat-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
}
.iga-preview-chat-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.iga-preview-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.iga-preview-close-x {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border: 1px solid #E8E0D5;
  background: #fff;
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #0F172A;
  padding: 0;
}
.iga-preview-close-x:hover {
  background: #F8FAFC;
  border-color: #D4CBBF;
}
.iga-preview-chat-thread {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 18px 16px;
  background: transparent;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}
.iga-preview-chat-thread:empty {
  flex: 0 0 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
.iga-preview-chat-thread::-webkit-scrollbar,
.chat-thread::-webkit-scrollbar {
  width: 6px;
}
.iga-preview-chat-thread::-webkit-scrollbar-track,
.chat-thread::-webkit-scrollbar-track {
  background: #F5E9DA;
  border-radius: 999px;
}
.iga-preview-chat-thread::-webkit-scrollbar-thumb,
.chat-thread::-webkit-scrollbar-thumb {
  background: #720026;
  border-radius: 999px;
}
.iga-preview-chat-thread,
.chat-thread {
  scrollbar-width: thin;
  scrollbar-color: #720026 #F5E9DA;
}
.iga-preview-starters {
  padding: 8px 18px 0;
  flex-shrink: 0;
  max-height: none;
  overflow: visible;
}
.iga-preview-chat-modal .chat-hero {
  padding: 8px 18px 4px;
}
.iga-preview-composer {
  width: calc(100% - 48px);
  margin: 10px 24px max(12px, env(safe-area-inset-bottom));
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .iga-preview-chat-overlay { padding: 0; }
  .iga-preview-chat-modal {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .iga-preview-chat-head { flex-wrap: wrap; padding: 12px; }
  .iga-preview-head-actions { width: 100%; justify-content: flex-end; }
  .iga-preview-chat-brand .chat-project-icon { width: 48px; height: 48px; }
  .iga-preview-composer {
    margin: 8px 10px max(10px, env(safe-area-inset-bottom));
  }
  .iga-preview-starters { padding: 8px 10px 0; }
}


