/* Files UI */
.mb-20 { margin-bottom: 20px; }
.mt-0 { margin-top: 0; }

.cf-dropzone {
  border: 2px dashed rgba(255,255,255,0.25);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: .2s ease;
  outline: none;
}
.cf-dropzone:focus-within,
.cf-dropzone:hover { border-color: rgba(255,255,255,0.5); }
.cf-dropzone.is-drag { background: rgba(255,255,255,0.06); }

.cf-dz-inner i { font-size: 36px; opacity: .85; display: block; margin-bottom: 8px; }
.cf-dz-title { margin: 8px 0 6px; }
.cf-dz-hint { opacity: .8; font-size: 12px; margin: 0; }

.cf-upload-queue { margin-top: 14px; display: grid; gap: 10px; }
.cf-upload-item {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 10px 12px;
  backdrop-filter: blur(6px);
}
.cf-ui-row { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.cf-ui-name { font-weight: 600; }
.cf-ui-size { opacity: .85; font-size: 12px; }
.cf-ui-bar { height: 6px; background: rgba(255,255,255,0.12); border-radius: 999px; overflow: hidden; }
.cf-ui-fill { height: 100%; width: 0%; background: #4ade80; transition: width .25s; }
.cf-ui-status { margin-top: 6px; font-size: 12px; opacity: .9; }
.cf-upload-item.error .cf-ui-fill { background: #ef4444; }
.cf-upload-item.done .cf-ui-fill { background: #22c55e; }

.cf-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.cf-files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(230px,1fr));
  gap: 14px;
}
.cf-file-card {
  position: relative;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 14px 12px;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  transition: .15s ease;
}
.cf-file-card:hover { transform: translateY(-1px); }
.cf-file-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.06);
}
.cf-file-icon i { font-size: 18px; }

.cf-file-meta { display: grid; gap: 4px; }
.cf-file-name { font-weight: 700; line-height: 1.25; }
.cf-file-sub { font-size: 12px; opacity: .85; }
.cf-file-actions {
  grid-column: 1 / -1;
  display: flex; gap: 8px; margin-top: 8px;
}
.cf-file-actions .btn-icon {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px; padding: 6px 10px;
  background: rgba(255,255,255,0.03);
  transition: .15s ease;
}
.cf-file-actions .btn-icon:hover { background: rgba(255,255,255,0.06); }
.cf-files-empty { text-align: center; opacity: .85; padding: 16px; }














/* ============ Layout Base ============ */
.main-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  position: relative;
  z-index: 60;
  transition: transform .25s ease, box-shadow .25s ease;
}

/* محتوا */
.main-content {
  padding: 20px;
}

/* Topbar (mobile/tablet) */
.topbar{
  position: sticky;
  top: 0;
  z-index: 30;
  display: none; /* در دسکتاپ پنهان */
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #ffffff22, #ffffff12);
  border-bottom: 1px solid #ffffff26;
  backdrop-filter: blur(10px);
}
.topbar-title{ font-weight: 800; }
.hamburger{
  display: inline-flex; flex-direction: column; gap: 4px;
  width: 42px; height: 36px; align-items: center; justify-content: center;
  border: 1px solid #ffffff2e; border-radius: 10px;
  background: #ffffff18; color: #fff;
}
.hamburger .ham-bar{ display:block; width:20px; height:2px; background:#fff; border-radius:4px }
.top-logout{ color:#fff; text-decoration:none; font-size:1.1rem }

/* دکمه بستن داخل هدر سایدبار - فقط موبایل دیده می‌شود */
.close-sidebar{
  display:none;
  width:38px; height:38px; border-radius:10px; border:1px solid #ffffff2e;
  background:#ffffff18; color:#fff; align-items:center; justify-content:center;
}

/* بک‌دراپ موبایل */
.sidebar-backdrop{
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 15; display: none;
}

/* ============ Desktop ============ */
@media (min-width: 1025px){
  .main-layout { grid-template-columns: 280px 1fr; }
  .sidebar { transform: none !important; }
}

/* ============ Tablet & Mobile ============ */
@media (max-width: 1024px){
  /* نمایش تاپ‌بار و مخفی‌سازی سایدبار به‌صورت کشویی */
  .topbar{ display:flex; }

  .main-layout {
    grid-template-columns: 1fr; /* سایدبار شناور */
  }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; /* راست‌چین: به‌صورت کشویی از راست وارد شود */
    width: 86%;
    max-width: 320px;
    height: 100%;
    transform: translateX(110%); /* خارج از دید */
    box-shadow: none;
  }
  body.sidebar-open .sidebar{
    transform: translateX(0);
    box-shadow: 0 20px 80px -20px rgba(0,0,0,.55);
  }

  .sidebar-backdrop{ display: none; }
  body.sidebar-open .sidebar-backdrop{ display: block; }

  /* محتوای اصلی تمام عرض */
  .main-content{ padding: 16px; }

  /* مخفی کردن برَند اصلی داخل سایدبار اگر لازم بود */
  .close-sidebar{ display: inline-flex; }
  .sidebar-header{
    display:flex; align-items:center; justify-content:space-between; gap:8px;
  }
  .sidebar-header h2{
    display:none;
  }
  .sidebar-footer{
    justify-content:center;
  }
  .sidebar-footer .logout-btn{
    display:none;
  }
}

@media (max-width: 640px){
  .main-content{
    padding: 14px;
  }
}

/* کمی ریزه‌کاری UX */
.sidebar-nav a{
  cursor: pointer;
}
.sidebar-nav li.active > a{
  background: #ffffff14;
  border-radius: 10px;
}







/* ===== Mobile Sidebar: fully off-canvas when closed ===== */
@media (max-width: 1024px){
  /* ظرف کلی */
  .main-layout{
    position: relative;
    overflow: hidden;
  }

  /* بک‌دراپ تاریک پشت منو */
  .sidebar-backdrop{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
  }
  body.sidebar-open .sidebar-backdrop{
    opacity: 1;
    visibility: visible;
  }

  /* خود سایدبار کاملاً از دید خارج بشه */
  #sidebar.sidebar{
    position: fixed;
    top: 0;
    right: 0;              /* چون RTL هست از راست میاد داخل */
    height: 100vh;
    width: 280px;          /* عرض منو (می‌تونی 260 هم بذاری) */
    max-width: 86vw;       /* روی گوشی‌های خیلی باریک */
    z-index: 999;
    transform: translateX(110%); /* نکته‌ی مهم: 110% تا سایه/گردی هم بیرون بره */
    transition: transform .28s cubic-bezier(.22,.61,.36,1);
    will-change: transform;
    box-sizing: border-box;
  }
  /* وقتی باز میشه */
  body.sidebar-open #sidebar.sidebar{
    transform: translateX(0);
  }

  /* نوار بالایی (همبرگری) همیشه قابل کلیک */
  .topbar{
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  /* اسکرول داخل سایدبار، نه کل صفحه */
  body.sidebar-open{
    overflow: hidden; /* جلوگیری از اسکرول پشت منو */
    touch-action: none;
  }

  /* فیکس لبه‌ها روی دستگاه‌های با ناچ/نوار پایین iOS */
  @supports (padding: max(0px)){
    #sidebar.sidebar{
      padding-bottom: max(20px, env(safe-area-inset-bottom));
      padding-top: max(20px, env(safe-area-inset-top));
    }
  }
}

/* --- Forms builder page --- */
.forms-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.forms-list-card .glass-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px;
}

.forms-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.forms-toolbar .toolbar-info h2 {
  margin-bottom: 4px;
}

.forms-toolbar .badge {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 6px 14px;
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.forms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.forms-card-item {
  position: relative;
  display: block;
  min-height: 190px;
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.forms-card-item:hover,
.forms-card-item:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.4);
}

.forms-card-item .glass-filter,
.forms-card-item .glass-overlay,
.forms-card-item .glass-specular {
  pointer-events: none;
}

.forms-card-item .glass-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
}

.form-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.form-card-header h3 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.4;
}

.status-pill {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.status-pill.status-active {
  background: rgba(46, 204, 113, 0.18);
  color: #2ecc71;
}

.status-pill.status-inactive {
  background: rgba(241, 196, 15, 0.18);
  color: #f1c40f;
}

.form-card-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.form-card-meta li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-card-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 4px;
  word-break: break-all;
}

.form-card-link:hover,
.form-card-link:focus-visible {
  text-decoration-color: currentColor;
}

.form-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.form-card-actions .card-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.btn-responses {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.85), rgba(147, 51, 234, 0.85));
  border: none;
  border-radius: 12px;
  color: #fff;
  padding: 10px 16px;
  box-shadow: 0 20px 40px -28px rgba(59, 130, 246, 0.9);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-responses i {
  color: inherit;
}

.btn-responses:hover,
.btn-responses:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 24px 48px -24px rgba(59, 130, 246, 0.95);
  filter: brightness(1.05);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn-glass {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: inherit;
  backdrop-filter: blur(12px);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-glass:hover,
.btn-glass:focus-visible {
  background: rgba(148, 163, 184, 0.22);
  border-color: rgba(255, 255, 255, 0.28);
}

.form-card-meta i {
  width: 18px;
  text-align: center;
}

.modal-content .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-content .stacked-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-content .form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.input-with-prefix {
  display: flex;
  align-items: stretch;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.input-with-prefix .input-prefix {
  padding: 0 12px;
  display: flex;
  align-items: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.12);
}

.input-with-prefix input {
  flex: 1;
  border: none;
  background: transparent;
  color: inherit;
  padding: 12px 14px;
}

.input-with-prefix input:focus {
  outline: none;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-state i {
  font-size: 2.6rem;
  opacity: 0.6;
}

@media (max-width: 768px) {
  .forms-list-card .glass-content {
    padding: 24px;
  }

  .forms-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

/* --- Form detail page --- */
.form-detail-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-detail-card .glass-content {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.detail-loading {
  align-self: center;
}

.detail-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.detail-header h2 {
  margin: 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.form-behavior-card {
  margin-top: 18px;
  padding: 20px;
}

.behavior-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.behavior-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.behavior-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.2);
}

.behavior-card h4 {
  margin: 0 0 8px;
}

.detail-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.detail-item a {
  color: var(--accent-color);
  word-break: break-all;
}

.detail-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
}

.detail-placeholder i {
  font-size: 2.4rem;
  opacity: 0.7;
}

.form-builder-shell {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-builder-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: flex-start;
}

.builder-panel,
.builder-main {
  position: relative;
  padding: 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.builder-panel .panel-header h3,
.builder-main .builder-toolbar h3 {
  margin: 0;
  font-size: 1.1rem;
}

.builder-panel .panel-header p,
.builder-main .builder-toolbar p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.field-library {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field-library-item {
  width: 100%;
  border: none;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: inherit;
  cursor: grab;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.field-library-item:active {
  cursor: grabbing;
}

.field-library-item:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 14px 32px -22px rgba(0, 0, 0, 0.65);
}

.field-library-item i {
  font-size: 1.2rem;
  opacity: 0.8;
}

.field-library-item span {
  font-weight: 600;
}

.field-library-item small {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.builder-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.builder-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.unsaved-indicator {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: rgba(255, 193, 7, 0.16);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.32);
}

.btn-text {
  border: none;
  background: transparent;
  color: var(--accent-color);
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-text:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.btn-text.danger {
  color: #ff6b6b;
}

.btn-text.danger:hover {
  background: rgba(255, 107, 107, 0.1);
}

.appearance-section {
  margin-top: 28px;
  padding: 28px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.appearance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.appearance-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.appearance-header .btn-text[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.appearance-active {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.32);
  color: #38bdf8;
  font-weight: 600;
  white-space: nowrap;
}

.appearance-active i {
  font-size: 0.9rem;
}

.appearance-active span {
  line-height: 1.4;
}

.appearance-header h3 {
  margin: 0;
}

.appearance-content {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 2fr);
  gap: 24px;
  align-items: stretch;
}

.appearance-presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.appearance-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.appearance-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 18px 36px -28px rgba(15, 23, 42, 0.9);
}

.appearance-card.is-active {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 20px 38px -26px rgba(56, 189, 248, 0.6);
}

.appearance-card-swatch {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.appearance-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
}

.appearance-card-meta strong {
  font-size: 1rem;
}

.appearance-card-meta small {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.appearance-preview-card {
  --appearance-background: #0f172a;
  --appearance-surface: rgba(15, 23, 42, 0.82);
  --appearance-text: #f8fafc;
  --appearance-muted: rgba(226, 232, 240, 0.72);
  --appearance-border: rgba(255, 255, 255, 0.16);
  --appearance-primary: #38bdf8;
  --appearance-accent: #f472b6;
  --appearance-primary-soft: rgba(56, 189, 248, 0.25);
  --appearance-accent-soft: rgba(244, 114, 182, 0.22);
  --appearance-button-text: #0f172a;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid var(--appearance-border);
  background: var(--appearance-background);
  color: var(--appearance-text);
  position: relative;
  overflow: hidden;
}

.appearance-preview-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, var(--appearance-primary-soft), transparent 55%),
    radial-gradient(circle at bottom left, var(--appearance-accent-soft), transparent 50%);
  pointer-events: none;
  opacity: 0.9;
}

.appearance-preview-card > * {
  position: relative;
  z-index: 1;
}

.appearance-preview-card[data-appearance-mode='light'] {
  color-scheme: light;
}

.appearance-preview-card[data-appearance-mode='dark'] {
  color-scheme: dark;
}

.appearance-preview-meta h4 {
  margin: 0;
}

.appearance-preview-meta .muted {
  margin: 4px 0 0;
  color: var(--appearance-muted);
}

.appearance-preview-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.appearance-preview-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--appearance-border);
  background: var(--appearance-surface);
}

.appearance-preview-field label {
  font-weight: 600;
}

.appearance-preview-input {
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.22);
}

.appearance-preview-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.appearance-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  background: var(--appearance-primary-soft);
  color: var(--appearance-text);
  border: 1px solid var(--appearance-border);
}

.appearance-preview-actions {
  display: flex;
  justify-content: flex-end;
}

.appearance-preview-actions .btn-primary {
  background: var(--appearance-primary);
  color: var(--appearance-button-text);
  border-color: transparent;
  box-shadow: 0 18px 32px -24px rgba(0, 0, 0, 0.8);
}

.appearance-custom {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
}

.appearance-custom.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.appearance-custom .form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.appearance-custom .form-group label {
  font-weight: 600;
}

.appearance-custom input[type='color'] {
  width: 100%;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(15, 23, 42, 0.4);
  cursor: pointer;
}

.appearance-custom.is-disabled input[type='color'] {
  cursor: not-allowed;
}

.appearance-custom-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.appearance-custom-note i {
  margin-top: 2px;
  color: var(--accent-color);
}

.appearance-save-hint {
  margin: 12px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn-secondary.active,
.btn-secondary:focus-visible,
.btn-primary:focus-visible,
.btn-text:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.24);
  outline-offset: 2px;
}

.builder-canvas {
  min-height: 320px;
  padding: 4px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.canvas-placeholder {
  flex: 1;
  padding: 48px 24px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
}

.canvas-placeholder i {
  font-size: 2.2rem;
  opacity: 0.65;
}

.builder-field {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.06);
  cursor: grab;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.builder-field.is-locked {
  cursor: default;
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(148, 163, 184, 0.1);
}

.builder-field:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.24);
}

.builder-field.is-locked:hover {
  transform: none;
}

.builder-field.is-selected {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.1);
}

.builder-field.is-dragging {
  opacity: 0.6;
}

.field-handle {
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: grab;
}

.field-handle.is-disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.field-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-main strong {
  font-size: 1rem;
  font-weight: 700;
}

.field-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.field-description {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.field-badges {
  display: flex;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.badge-info {
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.32);
  color: #60a5fa;
}

.badge-warning {
  background: rgba(255, 193, 7, 0.12);
  border: 1px solid rgba(255, 193, 7, 0.32);
  color: #ffc107;
}

.field-actions {
  display: flex;
  gap: 6px;
}

.icon-button.danger {
  color: #ff6b6b;
}

.icon-button.danger:hover {
  color: #ff7f7f;
}

.builder-inspector {
  min-height: 320px;
}

.inspector-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.inspector-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  color: var(--text-muted);
}

.inspector-empty i {
  font-size: 2rem;
  opacity: 0.7;
}

.inspector-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.inspector-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inspector-form label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.inspector-form input,
.inspector-form textarea,
.inspector-form select {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  padding: 10px 14px;
  font-size: 0.92rem;
  transition: border 0.2s ease, background 0.2s ease;
}

.inspector-form input:focus,
.inspector-form textarea:focus,
.inspector-form select:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.6);
  background: rgba(56, 189, 248, 0.08);
}

.dual-input-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.options-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.options-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.options-header h4 {
  margin: 0;
  font-size: 0.95rem;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.toggle-switch.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.toggle-switch input {
  display: none;
}

.toggle-indicator {
  position: relative;
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: background 0.2s ease;
}

.toggle-indicator::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
}

.toggle-switch input:checked + .toggle-indicator {
  background: rgba(56, 189, 248, 0.35);
  border-color: rgba(56, 189, 248, 0.45);
}

.toggle-switch input:checked + .toggle-indicator::after {
  transform: translate(-18px, -50%);
}

.toggle-label {
  font-size: 0.88rem;
}

/* Responses modal */
.modal-content.responses-modal {
  max-width: 720px;
  width: min(720px, 95%);
}

.responses-modal .glass-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
}

.responses-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.responses-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.responses-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 65vh;
  overflow-y: auto;
  padding-right: 4px;
}

.responses-body .empty-state {
  margin: 0;
}

.responses-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.responses-pagination {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.responses-pagination:not([hidden]) {
  display: flex;
}

.responses-pagination .page-btn,
.responses-pagination .page-number {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  padding: 8px 12px;
  min-width: 42px;
  min-height: 38px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.responses-pagination .page-btn[disabled],
.responses-pagination .page-number[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.responses-pagination .page-btn:hover:not([disabled]),
.responses-pagination .page-number:hover:not(.is-active) {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.32);
}

.responses-pagination .page-number.is-active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(244, 114, 182, 0.32));
  border-color: rgba(56, 189, 248, 0.48);
  box-shadow: 0 10px 24px -16px rgba(56, 189, 248, 0.7);
  font-weight: 600;
}

.responses-pagination .page-status {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.glass-sub-card {
  background: rgba(15, 23, 42, 0.55);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 40px -30px rgba(15, 23, 42, 0.8);
}

.response-entry {
  overflow: hidden;
}

.response-entry summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
}

.response-entry summary::-webkit-details-marker {
  display: none;
}

.form-responses-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.responses-page-card .glass-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px;
}

.responses-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.responses-heading h2 {
  margin: 0 0 8px;
}

.responses-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.responses-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.responses-meta a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 4px;
  word-break: break-all;
}

.responses-meta a:hover,
.responses-meta a:focus-visible {
  text-decoration-color: currentColor;
}

.responses-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-gradient {
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.95) 0%, rgba(0, 242, 254, 0.95) 100%);
  color: #0b1220;
  border: none;
  box-shadow: 0 8px 20px rgba(79, 172, 254, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-gradient:hover,
.btn-gradient:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(79, 172, 254, 0.45);
  color: #0b1220;
}

.responses-page-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.responses-page-body .spinner {
  align-self: center;
}

.form-responses-page .responses-list {
  max-height: none;
}

.response-summary-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.response-summary-main strong {
  font-size: 1rem;
}

.response-summary-main span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.response-summary-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.response-entry[open] {
  border-color: rgba(56, 189, 248, 0.38);
}

.response-body {
  padding: 0 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.response-answers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.response-answers li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.answer-label {
  font-weight: 600;
  color: var(--text-muted);
}

.answer-value {
  font-weight: 500;
}

.response-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.preview-header h3 {
  margin: 0;
}

.preview-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-content.preview-modal {
  max-width: 640px;
  width: min(640px, 95%);
}

.preview-modal .glass-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
  max-height: 80vh;
}

.preview-modal .preview-body {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 4px;
}

.preview-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.preview-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--appearance-border, rgba(255, 255, 255, 0.1));
  background: var(--appearance-surface, rgba(255, 255, 255, 0.05));
}

.preview-field label {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.preview-field input,
.preview-field textarea,
.preview-field select {
  border-radius: 12px;
  border: 1px solid var(--appearance-border, rgba(255, 255, 255, 0.16));
  background: var(--appearance-input-bg, rgba(255, 255, 255, 0.06));
  padding: 12px 14px;
  color: var(--appearance-text, inherit);
}

.preview-field textarea {
  min-height: 120px;
}

.preview-helper {
  font-size: 0.78rem;
  color: var(--appearance-muted, var(--text-muted));
}

.required-mark {
  color: #ff6b6b;
  font-size: 1.1rem;
  line-height: 1;
}

.preview-choice-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preview-choice-group.multi {
  gap: 8px;
}

.choice-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
}

.preview-rating {
  display: flex;
  gap: 8px;
}

.rating-star {
  border: none;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f6ad55;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.rating-star:hover {
  transform: translateY(-2px);
  background: rgba(246, 173, 85, 0.25);
}

.preview-paragraph {
  margin: 0;
  line-height: 1.8;
  color: var(--appearance-muted, var(--text-muted));
}

.preview-submit-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--appearance-muted, var(--text-muted));
}

.preview-submit-hint i {
  opacity: 0.7;
}

.preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
}

.preview-empty i {
  font-size: 2rem;
  opacity: 0.6;
}

.btn-primary.full-width {
  width: 100%;
  justify-content: center;
}

.spinner.inline {
  width: 18px;
  height: 18px;
  border-width: 3px;
  margin: 0 0 0 8px;
  display: inline-block;
  vertical-align: middle;
}

.segments-list {
  display: grid;
  gap: 12px;
}

.campaign-tool-settings .settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 18px;
  align-items: start;
}

.campaign-tool-settings .main-specs {
  grid-column: 1 / -1;
}

.campaign-tool-settings .main-specs .form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px 18px;
  align-items: end;
}

.campaign-tool-settings .main-specs .compact-row {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.campaign-tool-settings .settings-hero {
  position: relative;
  overflow: hidden;
}

.campaign-tool-settings .settings-hero-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
}

.campaign-tool-settings .settings-hero .hero-meta,
.campaign-tool-settings .settings-hero-content .hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.campaign-tool-settings .meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.campaign-tool-settings .meta-chip.subtle {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

.campaign-tool-settings .glass-card.wide {
  grid-column: 1 / -1;
}

.campaign-tool-settings .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.campaign-tool-settings .sticky-actions {
  position: sticky;
  bottom: 0;
  padding: 12px 0;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.campaign-tool-settings .segment-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.campaign-tool-settings .segment-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 14px;
  align-items: end;
  flex: 1;
}

.campaign-tool-settings .segment-row .toggle-switch {
  align-self: center;
}

.campaign-tool-settings .segment-row .icon-button {
  align-self: center;
}

.campaign-tool-settings input[type='color'] {
  width: 58px;
  height: 42px;
  border: none;
  border-radius: 12px;
  padding: 0;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--border-subtle);
}

.campaign-tool-settings .color-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
}

.campaign-tool-settings .color-value {
  font-family: 'SFMono-Regular', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.inline-list li strong {
  margin-left: 4px;
}

.campaign-tool-results .results-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 4px 0 14px;
  flex-wrap: wrap;
}

.campaign-tool-results .results-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.campaign-tool-results .filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-muted);
  font-weight: 600;
}

.campaign-tool-results .filter-group.stretch {
  min-width: 320px;
}

.campaign-tool-results .input-select,
.campaign-tool-results .input-text {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.campaign-tool-results .input-select select,
.campaign-tool-results .input-text input {
  width: 100%;
  border: none;
  background: transparent;
  color: #fff;
  outline: none;
  font-weight: 600;
}

.campaign-tool-results .input-select i,
.campaign-tool-results .input-text i {
  color: var(--text-muted);
}

[data-theme="light"] .campaign-tool-results .input-select,
[data-theme="light"] .campaign-tool-results .input-text {
  background: #f8fafc;
  border-color: #e5e7eb;
  color: #0f172a;
  box-shadow: inset 0 1px 0 #fff, 0 8px 20px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .campaign-tool-results .input-select select,
[data-theme="light"] .campaign-tool-results .input-text input {
  color: #0f172a;
}

[data-theme="light"] .campaign-tool-results .input-select i,
[data-theme="light"] .campaign-tool-results .input-text i {
  color: #6b7280;
}

.campaign-tool-results .input-select select option {
  color: #111827;
}

.campaign-tool-results .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: #e5e7eb;
  border: 1px solid rgba(59, 130, 246, 0.3);
  font-size: 0.9rem;
}

.campaign-tool-results .pill.soft {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

.campaign-tool-results .pill.muted {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.campaign-tool-results #results-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.campaign-tool-results #results-table td {
  vertical-align: top;
}

.campaign-tool-results #results-table th {
  white-space: nowrap;
  color: var(--text-muted);
  font-weight: 700;
}

.campaign-tool-results #results-table td.index-col {
  color: var(--text-muted);
  font-weight: 700;
}

.campaign-tool-results #results-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.answer-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.answer-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(14, 165, 233, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.35);
  min-width: 140px;
}

.answer-chip .chip-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.answer-chip .chip-value {
  font-weight: 600;
  color: #fff;
  word-break: break-word;
}

.campaign-tool-results .result-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.14), rgba(59, 130, 246, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.35);
}

.campaign-tool-results .result-badge i {
  color: #fde68a;
}

.campaign-tool-results .result-badge small {
  color: var(--text-muted);
  display: block;
}

.campaign-tool-results .message-chip {
  display: inline-flex;
  align-items: center;
  max-width: 240px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.28);
  color: #e5e7eb;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.campaign-tool-results .status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: -0.2px;
  text-transform: capitalize;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
}

.campaign-tool-results .status.success {
  background: rgba(74, 222, 128, 0.18);
  border-color: rgba(34, 197, 94, 0.4);
  color: #bbf7d0;
}

.campaign-tool-results .status.danger {
  background: rgba(248, 113, 113, 0.18);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fecdd3;
}

.campaign-tool-results .status.muted {
  color: var(--text-muted);
}

@media (max-width: 1180px) {
  .form-builder-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .builder-panel,
  .builder-main {
    order: initial;
  }

  .appearance-content {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .form-detail-card .glass-content {
    padding: 24px;
  }

  .builder-toolbar-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .builder-panel,
  .builder-main {
    padding: 18px;
  }
}
