@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --primary: hsl(238, 83%, 66%);
  --primary-glow: hsla(238, 83%, 66%, 0.3);
  --primary-hover: hsl(238, 83%, 56%);
  --bg: hsl(222, 47%, 11%);
  --card-bg: hsla(222, 47%, 15%, 0.7);
  --text: hsl(210, 40%, 98%);
  --text-muted: hsl(215, 25%, 65%);
  --border: hsla(210, 40%, 98%, 0.1);
  --accent: hsl(158, 82%, 47%);
  --error: hsl(0, 84%, 60%);
  --radius: 1.25rem;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[x-cloak] { display: none !important; }

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  background-image: 
    radial-gradient(circle at 10% 20%, hsla(238, 83%, 66%, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, hsla(158, 82%, 47%, 0.03) 0%, transparent 40%);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* Premium Typography */
h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glassmorphism Evolution */
.glass {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.glass:hover {
  border-color: hsla(210, 40%, 98%, 0.2);
  box-shadow: 0 12px 40px -10px rgba(0, 0, 0, 0.5);
}

/* Button Refinement */
.btn {
  padding: 0.875rem 1.75rem;
  border-radius: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px 0 var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 var(--primary-glow);
}

.btn-outline {
  background: hsla(210, 40%, 98%, 0.03);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  background: hsla(210, 40%, 98%, 0.08);
  border-color: hsla(210, 40%, 98%, 0.3);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--error);
  color: white;
  box-shadow: 0 4px 14px 0 hsla(0, 84%, 60%, 0.2);
}

.btn-danger:hover {
  background: hsl(0, 84%, 50%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 hsla(0, 84%, 60%, 0.4);
}

/* Input Fields */
input, select, textarea {
  background: hsla(0, 0%, 0%, 0.2);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.8rem 1rem;
  color: white;
  transition: var(--transition);
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

/* Animation Utilities */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade {
  animation: fadeIn 0.6s ease-out forwards;
}

/* Respomsive Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

@media (max-width: 768px) {
  .container { padding: 1.5rem 1rem; }
  h1 { font-size: 2.5rem !important; }
}

.badge-live { 
  background: hsla(158, 82%, 47%, 0.1); 
  color: var(--accent); 
  padding: 0.25rem 0.75rem; 
  border-radius: 20px; 
  font-size: 0.7rem; 
  font-weight: 800; 
  text-transform: uppercase; 
  border: 1px solid hsla(158, 82%, 47%, 0.3); 
}

.badge-draft { 
  background: hsla(215, 25%, 65%, 0.1); 
  color: var(--text-muted); 
  padding: 0.25rem 0.75rem; 
  border-radius: 20px; 
  font-size: 0.7rem; 
  font-weight: 800; 
  text-transform: uppercase; 
  border: 1px solid var(--border); 
}

/* Modal and Overlay System */
.modal-overlay { 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100vw; 
  height: 100vh; 
  background: hsla(222, 47%, 5%, 0.82); 
  backdrop-filter: blur(12px); 
  -webkit-backdrop-filter: blur(12px);
  z-index: 5000; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
}

.modal { 
  background: var(--bg); 
  border: 1px solid var(--primary-glow); 
  padding: 3rem; 
  border-radius: 2.5rem; 
  width: 100%; 
  max-width: 480px; 
  box-shadow: 0 40px 100px -20px rgba(0,0,0,0.6); 
  position: relative;
  animation: modalScale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.confirm-modal { text-align: center; }

.confirm-modal-icon {
  width: 72px;
  height: 72px;
  border-radius: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
}

.confirm-modal-icon--danger { background: hsla(0, 84%, 60%, 0.1); }
.confirm-modal-icon--primary { background: var(--primary-glow); }

.icon-danger  { color: var(--error); }
.icon-primary { color: var(--primary); }
.icon-accent  { color: var(--accent); }

/* Toast Notification System */
.toast-container { 
  position: fixed; 
  bottom: 2.5rem; 
  right: 2.5rem; 
  z-index: 9000; 
  display: flex; 
  flex-direction: column; 
  gap: 1rem; 
  pointer-events: none; 
}

.toast {
  pointer-events: auto;
  background: var(--card-bg);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  padding: 1.25rem 2rem;
  border-radius: 1.25rem;
  box-shadow: 0 15px 45px -10px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-width: 320px;
  will-change: transform, opacity;
  animation: toastSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-success { border-color: var(--accent); }
.toast-error { border-color: var(--error); }

@keyframes toastSlide {
  from { opacity: 0; transform: translateX(50px); }
  to   { opacity: 1; transform: translateX(0); }
}

.action-icon {
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.6rem;
  border-radius: 0.75rem;
  transition: var(--transition);
  display: inline-flex;
}

.action-icon:hover { background: hsla(210, 40%, 98%, 0.1); color: white; }
.action-delete:hover { background: hsla(0, 84%, 60%, 0.1); color: var(--error); }

/* ── Builder nav ─────────────────────────────────────── */
.builder-nav { margin: 1rem; border-radius: 1.5rem; padding: 1rem 2.5rem; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 1rem; z-index: 1000; box-shadow: 0 10px 50px -10px rgba(0,0,0,0.5); }
.builder-nav-left { display: flex; gap: 1.5rem; align-items: center; }
.builder-nav-right { display: flex; gap: 1rem; }
.nav-sep { width: 1px; height: 24px; background: var(--border); }
.btn-icon { padding: 0.5rem; border-radius: 0.75rem; }

/* ── Survey Builder ──────────────────────────────────── */
.builder-layout { display: flex; gap: 3rem; align-items: flex-start; }
.builder-sidebar { width: 300px; height: calc(100vh - 8rem); position: sticky; top: 7rem; border-left: 1px solid var(--border); padding: 1.5rem; overflow-y: auto; order: 2; }
.builder-main { flex: 1; display: flex; flex-direction: column; gap: 2rem; order: 1; }

/* Sidebar internals */
.sb-group-label { font-size: 0.68rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 0.75rem; }
.sb-btn-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.5rem; }
.sb-divider { padding-top: 1rem; border-top: 1px solid var(--border); margin-bottom: 0.75rem; }
.sb-add-btn { justify-content: flex-start; font-size: 0.88rem; padding: 0.65rem 1rem; }
.sb-stat { font-size: 1.75rem; font-weight: 800; color: var(--primary); }
.sb-stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.1rem; }

/* Question card */
.question-card { padding: 2.5rem; border-radius: 1.5rem; }
.q-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 2rem; }
.q-card-header-left { display: flex; gap: 1.5rem; align-items: center; }
.q-card-header-right { display: flex; gap: 0.5rem; }
.q-type-icon { width: 36px; height: 36px; border-radius: 0.75rem; background: var(--primary-glow); display: flex; align-items: center; justify-content: center; color: var(--primary); }
.q-type-label { font-size: 0.75rem; color: var(--primary); text-transform: uppercase; font-weight: 800; letter-spacing: 0.1em; }
.q-position-label { font-size: 0.8rem; color: var(--text-muted); }
.q-card-body { display: flex; flex-direction: column; gap: 1.5rem; }
.q-label-group { display: flex; flex-direction: column; gap: 0.5rem; }
.q-label-heading { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.q-label-input { font-size: 1.25rem; width: 100%; }
.q-options-panel { padding: 1.5rem; background: hsla(0,0%,100%,0.02); border-radius: 1rem; border: 1px solid var(--border); }

/* Option rows */
.q-option-row { display: flex; gap: 1rem; align-items: center; }
.q-radio-dot { width: 24px; height: 24px; border: 2px solid var(--border); border-radius: 50%; flex-shrink: 0; }
.q-option-input { flex: 1; background: transparent; }
.q-remove-icon { color: var(--text-muted); cursor: pointer; width: 16px; flex-shrink: 0; }
.q-add-btn { border-style: dashed; margin-top: 0.5rem; }

/* Star rating preview */
.q-star-preview { display: flex; gap: 1rem; color: #fbbf24; justify-content: center; font-size: 2rem; }

/* Scale preview */
.q-scale-row { display: flex; justify-content: space-between; overflow-x: auto; gap: 0.5rem; padding: 1rem 0; }
.q-scale-cell { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.q-scale-labels { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.q-scale-label { font-size: 0.75rem; color: var(--text-muted); display: block; margin-bottom: 0.25rem; }
.q-scale-col { display: flex; flex-direction: column; gap: 2rem; }

/* Empty state */
.q-empty-state { text-align: center; padding: 4rem; border: 2px dashed var(--border); border-radius: 2rem; color: var(--text-muted); }
.q-empty-icon { width: 48px; height: 48px; margin-bottom: 1.5rem; color: var(--border); }

/* Drag handle */
.drag-handle { cursor: grab; color: var(--text-muted); opacity: 0.5; transition: 0.2s; padding: 0.5rem; }
.drag-handle:hover { opacity: 1; }

/* Likert */
.q-likert-presets { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.q-likert-preset-btn { font-size: 0.78rem; padding: 0.35rem 0.8rem; }
.q-likert-row { display: flex; gap: 1rem; align-items: center; }
.q-likert-num { width: 24px; height: 24px; border: 2px solid var(--border); border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; color: var(--text-muted); flex-shrink: 0; }

/* NPS */
.q-nps-row { display: flex; justify-content: space-between; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.q-nps-cell { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.95rem; flex-shrink: 0; }
.q-nps-cell--detractor { border-color: hsla(0,84%,60%,0.4); color: hsl(0,84%,65%); }
.q-nps-cell--passive   { border-color: hsla(38,95%,55%,0.4); color: hsl(38,95%,60%); }
.q-nps-cell--promoter  { border-color: hsla(158,82%,47%,0.4); color: hsl(158,82%,50%); }
.q-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.q-sub-label { font-size: 0.75rem; color: var(--text-muted); display: block; margin-bottom: 0.25rem; }

/* Dichotomous */
.q-dicho-presets { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.q-dicho-row { display: flex; gap: 1rem; align-items: center; }
.q-dicho-badge { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 800; flex-shrink: 0; }
.q-dicho-input { flex: 1; background: transparent; font-size: 1.1rem; font-weight: 600; }

/* Rank Order */
.q-rank-hint { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.q-rank-item { display: flex; gap: 1rem; align-items: center; background: hsla(210,40%,98%,0.02); padding: 0.75rem 1rem; border-radius: 0.75rem; border: 1px solid var(--border); }
.q-rank-badge { width: 24px; height: 24px; border-radius: 50%; background: var(--primary-glow); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 800; color: var(--primary); flex-shrink: 0; }

/* Matrix */
.q-matrix-section-label { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; display: block; margin-bottom: 0.75rem; }
.q-matrix-row-item { display: flex; gap: 1rem; align-items: center; margin-bottom: 0.5rem; }
.q-matrix-row-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.q-matrix-cols { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.q-matrix-col-chip { display: flex; align-items: center; gap: 0.5rem; background: var(--card-bg); border: 1px solid var(--border); border-radius: 0.75rem; padding: 0.4rem 0.75rem; }
.q-matrix-col-input { width: 90px; background: transparent; font-size: 0.85rem; }
.q-matrix-preview { overflow-x: auto; margin-top: 1.5rem; border-top: 1px solid var(--border); padding-top: 1.25rem; }
.q-matrix-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.q-matrix-th { padding: 0.5rem; text-align: center; color: var(--text-muted); border-bottom: 1px solid var(--border); font-weight: 600; }
.q-matrix-th--left { text-align: left; }
.q-matrix-td { padding: 0.5rem; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.q-matrix-td--center { text-align: center; }
.q-matrix-radio { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); margin: 0 auto; }

/* Demographic */
.q-demo-hint { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 1rem; }
.q-demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.q-demo-field { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; background: hsla(210,40%,98%,0.02); border-radius: 0.75rem; border: 1px solid var(--border); cursor: pointer; }
.q-demo-field-label { font-size: 0.85rem; font-weight: 500; text-transform: capitalize; }

/* Image Choice */
.q-img-item { display: flex; flex-direction: column; gap: 0.5rem; background: hsla(210,40%,98%,0.02); padding: 1rem; border-radius: 0.75rem; border: 1px solid var(--border); margin-bottom: 0.75rem; }
.q-img-item-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.25rem; }
.q-img-item-label { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); }
.q-img-preview { width: 100%; height: 100px; object-fit: cover; border-radius: 0.5rem; margin-top: 0.5rem; }

@media (max-width: 1024px) {
  .builder-layout { flex-direction: column; }
  .builder-sidebar { width: 100%; height: auto; position: relative; top: 0; border: 1px solid var(--border); }
  .q-demo-grid { grid-template-columns: 1fr; }
}

/* ── Limit Modal ─────────────────────────────────────── */
.limit-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  gap: 1rem;
}

.limit-modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.limit-modal-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.limit-modal-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-glow);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.limit-modal-heading {
  font-size: 1.5rem;
  font-weight: 800;
}

.limit-modal-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.modal-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.modal-close-btn:hover {
  color: var(--text);
  background: hsla(210, 40%, 98%, 0.08);
}

.limit-tenant-info {
  background: hsla(210, 40%, 98%, 0.03);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.limit-tenant-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.limit-tenant-name {
  font-weight: 700;
  font-size: 1rem;
}

.limit-tenant-email {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.limit-field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.limit-stepper {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.limit-stepper-btn {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: hsla(210, 40%, 98%, 0.04);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.limit-stepper-btn:hover:not(:disabled) {
  background: hsla(210, 40%, 98%, 0.1);
  border-color: hsla(210, 40%, 98%, 0.3);
}

.limit-stepper-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.limit-stepper-input {
  flex: 1;
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: hsla(210, 40%, 98%, 0.04);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.5rem;
}

.limit-modal-actions {
  display: flex;
  gap: 1rem;
}

.limit-modal-actions .btn,
.confirm-modal-actions .btn {
  flex: 1;
}

/* Modal size variants */
.modal--sm  { max-width: 420px; }

/* Modal z-index override (above standard overlays) */
.modal-overlay-raised { z-index: 9999; }

/* Lucide icon size utilities */
.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 18px; height: 18px; }
.icon-lg { width: 20px; height: 20px; }

/* Confirm modal typography */
.confirm-modal-title {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.confirm-modal-body {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
  line-height: 1.5;
}

.confirm-modal-actions {
  display: flex;
  gap: 1.25rem;
}

/* ── Responsive Nav ───────────────────────────────────── */
.site-nav {
  margin: 1rem;
  border-radius: 1.5rem;
  padding: 1.1rem 2.5rem;
  position: sticky;
  top: 1rem;
  z-index: 1000;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  background: hsla(210, 40%, 98%, 0.05);
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
}

.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  flex-wrap: nowrap;
}

.nav-desktop-guest {
  display: flex;
  align-items: center;
  gap: 3.5rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
  padding: 0.5rem 0;
}

.nav-link:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.nav-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-desktop-auth {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

/* Hamburger button — hidden on desktop */
.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: hsla(210, 40%, 98%, 0.04);
  cursor: pointer;
  color: var(--text);
  transition: var(--transition);
  flex-shrink: 0;
}
.nav-hamburger:hover {
  background: hsla(210, 40%, 98%, 0.1);
  border-color: hsla(210, 40%, 98%, 0.25);
}

/* Mobile drop-down menu */
.nav-mobile-menu {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.nav-mobile-links {
  display: flex;
  flex-direction: column;
}
.nav-mobile-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.75rem 0.75rem;
  border-radius: 0.75rem;
  transition: color 0.2s, background 0.2s;
  text-align: left;
  display: block;
}
.nav-mobile-link:hover {
  color: var(--text);
  background: hsla(210, 40%, 98%, 0.05);
}
.nav-mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.5rem;
}

/* Hides long text labels on very small screens for auth nav */
.nav-btn-text { display: inline; }

/* ── 768 px — tablet / large phone ───────────────────── */
@media (max-width: 768px) {
  /* Nav */
  .site-nav { margin: 0.5rem !important; padding: 0.9rem 1.25rem !important; }
  .nav-hamburger { display: flex; }
  .nav-desktop-guest { display: none; }
  .nav-desktop-auth { display: none; }

  /* Modal */
  .modal {
    margin: 1rem;
    padding: 2rem 1.5rem;
    border-radius: 1.5rem;
    max-width: calc(100vw - 2rem);
  }

  /* Toast */
  .toast-container { bottom: 1.25rem; right: 1rem; left: 1rem; }
  .toast { min-width: unset; width: 100%; }

  /* Builder nav */
  .builder-nav {
    margin: 0.5rem !important;
    padding: 0.8rem 1rem !important;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .builder-nav-left { flex: 1; min-width: 0; }
  .builder-nav-right { width: 100%; }
  .builder-nav-right .btn { flex: 1; justify-content: center; }

  /* Admin nav */
  .admin-nav { margin: 0.5rem !important; padding: 1rem 1.25rem !important; }

  /* Table cells */
  th { padding: 1rem 0.75rem; font-size: 0.7rem; }
  td { padding: 1rem 0.75rem; }

  /* Dashboard header */
  .dashboard-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1.25rem;
  }

  /* Stat grid */
  .stat-grid { grid-template-columns: 1fr !important; gap: 1.25rem !important; }

  /* Auth nav compact */
  .nav-user-label { display: none; }
  .nav-btn-text { display: none; }
}

/* ── 480 px — phone ───────────────────────────────────── */
@media (max-width: 480px) {
  .container { padding: 1rem 0.75rem; }

  /* Builder title input */
  .nav-title-input { width: 140px !important; font-size: 0.95rem !important; }

  /* Demo two-col → one col on view page */
  .demo-grid { grid-template-columns: 1fr !important; }

  /* NPS buttons tighter */
  .nps-grid { gap: 0.15rem; }
  .nps-btn { width: 28px !important; height: 36px !important; font-size: 0.8rem !important; border-radius: 6px !important; }

  /* Image grid center */
  .image-grid { justify-content: center; }
  .img-thumb, .img-placeholder { width: 100% !important; max-width: 300px; }

  /* Admin header */
  .admin-header h1 { font-size: 2.5rem !important; }

  /* Step connector hide */
  .steps-grid::before { display: none; }
  .features-grid,
  .steps-grid,
  .testimonials-grid { grid-template-columns: 1fr !important; }
}
