:root {
  --text-primary: #1d1d1f;
  --text-secondary: #374151;
  --text-muted: #86868b;
  --border: #e8e8ed;
  --border-strong: #d1d5db;
  --bg: #f5f5f7;
  --bg-card: #fff;
  --green: #10b981;
  --green-dark: #059669;
  --red: #ef4444;
  --amber: #d97706;
  --blue: #2563eb;
  --bg-dark: #111;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg); color: var(--text-primary); font-size: 14px;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
::selection { background: rgba(16,185,129,0.15); }

/* === FOCUS === */
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.btn:focus-visible, .nav-item:focus-visible, .cl-card:focus-visible, .svc-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(16,185,129,0.3); outline: none;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  box-shadow: 0 0 0 3px rgba(16,185,129,0.3); outline: none;
}

/* === SHELL === */
.shell { display: flex; height: 100vh; overflow: hidden; }

/* === SIDEBAR === */
.sidebar {
  width: 220px; flex-shrink: 0; display: flex; flex-direction: column;
  background: #111; color: #fff; height: 100vh; overflow-y: auto;
}
.sidebar .brand {
  padding: 20px 20px 16px;
  display: flex; align-items: center; gap: 10px;
}
.sidebar .brand a {
  color: #fff; text-decoration: none; font-size: 18px; font-weight: 800;
  letter-spacing: -0.5px;
}
.sidebar .brand .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green), #06b6d4);
  display: inline-block; margin-left: 2px;
}

.sidebar .earnings-pill {
  margin: 0 16px 16px; padding: 12px 14px;
  background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(6,182,212,0.1));
  border: 1px solid rgba(16,185,129,0.2); border-radius: 10px;
}
.earnings-pill .amount { font-size: 22px; font-weight: 800; color: var(--green); letter-spacing: -0.5px; }
.earnings-pill .label { font-size: 11px; color: #a1a1aa; margin-top: 2px; }

.nav-section { padding: 4px 0; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px; color: #a1a1aa; text-decoration: none;
  font-size: 13px; font-weight: 500; transition: all 0.12s ease;
  border-left: 2px solid transparent;
}
.nav-item:hover { color: #ccc; background: rgba(255,255,255,0.04); }
.nav-item.active {
  color: #fff; background: rgba(16,185,129,0.1);
  border-left-color: var(--green);
}
.nav-icon { font-size: 15px; width: 20px; text-align: center; }

.sidebar-footer {
  padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: auto;
}
.sidebar-footer .name { font-size: 13px; color: #aaa; font-weight: 500; }
.sidebar-footer .tier { font-size: 11px; color: #a1a1aa; margin-top: 2px; }

/* === MAIN === */
.main {
  flex: 1; overflow-y: auto; padding: 32px 40px;
}
.main.main-full { padding: 20px; }
.main h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; color: var(--text-primary); margin-bottom: 6px; }
.page-tagline { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }

/* === CARDS === */
.card {
  background: var(--bg-card); border-radius: 12px; padding: 24px;
  margin-bottom: 16px; border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.card h2 {
  font-size: 11px; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.8px; font-weight: 600; margin-bottom: 10px;
}
.card .value {
  font-size: 28px; font-weight: 800; letter-spacing: -0.5px;
  color: var(--text-primary); font-variant-numeric: tabular-nums;
}
.card .sub { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.card-body { margin-top: 12px; font-size: 13px; line-height: 1.6; }

/* Stat cards grid */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stats .card { padding: 20px; }

/* Accent card */
.card-accent {
  border-left: 3px solid var(--green);
  background: linear-gradient(135deg, #fff, #f0fdf9);
}

/* Revenue card */
.card-money .value { color: var(--green); }

/* Page header */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.page-header h1 { margin-bottom: 0; }

/* === UTILITY CLASSES === */
.section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--text-muted); margin-bottom: 8px;
}
.action-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border: 1px solid var(--border);
  border-radius: 0 8px 8px 0; margin-bottom: 6px;
  text-decoration: none; color: inherit; background: var(--bg-card);
}
.action-card-red { border-left: 3px solid var(--red); }
.action-card-amber { border-left: 3px solid var(--amber); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Dashboard grid */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Onboarding steps — vertical checklist */
.onboarding-step {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; text-decoration: none; color: inherit;
  border-radius: 8px; transition: background 0.12s;
}
.onboarding-step:hover { background: #f9fafb; }
.onboarding-step.step-next { background: #f0fdf9; }
.onboarding-text { display: flex; flex-direction: column; gap: 1px; }
.onboarding-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.onboarding-desc { font-size: 12px; color: var(--text-muted); }
.onboarding-num {
  width: 26px; height: 26px; border-radius: 50%; background: #f3f4f6;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--text-muted); font-size: 12px; flex-shrink: 0;
}
.step-done .onboarding-num { background: #d1fae5; color: var(--green-dark); }
.step-next .onboarding-num { background: var(--green); color: #fff; }

/* === CALLOUTS === */
.callout { border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; font-size: 13px; line-height: 1.6; }
.callout-green { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.callout-blue { background: #eff6ff; border: 1px solid #dbeafe; color: #1e40af; }
.callout-amber { background: #fffbeb; border: 1px solid #fef3c7; color: #92400e; }

/* === BLOCKS === */
.block { background: #f9fafb; border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.block-label { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600; margin-bottom: 8px; }

/* === STEPS / CHECKLIST === */
.step {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid #f3f4f6; text-decoration: none; color: inherit;
  transition: background 0.1s ease;
}
.step:last-child { border-bottom: none; }
.step:hover { background: #fafafa; margin: 0 -8px; padding: 10px 8px; border-radius: 8px; }
.step-num {
  width: 24px; height: 24px; background: var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-muted); flex-shrink: 0; font-weight: 700;
}
.step-num.done { background: var(--green); color: #fff; }
.step-num.active { background: var(--green); color: #fff; }

/* === PROGRESS BAR === */
.progress { background: var(--border); border-radius: 6px; height: 6px; overflow: hidden; margin-top: 8px; }
.progress-fill { background: linear-gradient(90deg, var(--green), #06b6d4); height: 100%; border-radius: 6px; transition: width 0.4s ease; }

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 16px; background: var(--green); color: #fff; border: none;
  border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: all 0.15s ease; font-family: inherit;
}
.btn:hover { background: var(--green-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,185,129,0.25); }
.btn:active { transform: translateY(0); }
.btn-secondary { background: #fff; color: var(--text-secondary); border: 1px solid var(--border-strong); }
.btn-secondary:hover { background: #f9fafb; box-shadow: 0 2px 4px rgba(0,0,0,0.06); transform: translateY(-1px); }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #dc2626; box-shadow: 0 4px 12px rgba(239,68,68,0.25); }

/* === TABLES === */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 10px 16px; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600; border-bottom: 1px solid var(--border); background: #fafafa; }
td { padding: 12px 16px; border-bottom: 1px solid #f3f4f6; font-size: 13px; color: var(--text-secondary); }
tr { transition: background 0.1s ease; }
tr:hover td { background: #fafafa; }
tbody tr:last-child td { border-bottom: none; }

/* === BADGES === */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.2px; }
.badge-green { background: #ecfdf5; color: var(--green-dark); }
.badge-yellow { background: #fffbeb; color: #92400e; }
.badge-red { background: #fef2f2; color: #991b1b; }
.badge-gray { background: #f3f4f6; color: #6b7280; }
.badge-blue { background: #eff6ff; color: var(--blue); }

/* === TIER COLORS === */
.tier-starter { color: var(--text-muted); }
.tier-growing { color: var(--green); }
.tier-pro { color: #f59e0b; }

/* === FORMS === */
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(16,185,129,0.1); }
input, select { font-family: inherit; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* === BACK LINK === */
.back-link { font-size: 13px; color: var(--text-muted); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; margin-bottom: 12px; }
.back-link:hover { color: var(--text-secondary); }

/* === CLIENT RECORD: TWO-COLUMN === */
.cr-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 20px; }
.cr-left { display: flex; flex-direction: column; gap: 12px; }
.cr-right { display: flex; flex-direction: column; gap: 12px; }
.cr-field { margin-bottom: 8px; }
.cr-field label { display: block; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; margin-bottom: 3px; }
.cr-field input, .cr-field textarea, .cr-field select {
  width: 100%; padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; font-family: inherit; background: #fff;
}
.cr-field textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.cr-row { display: flex; gap: 8px; }
.cr-row .cr-field { flex: 1; }

/* Service cards */
.svc-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; text-decoration: none; color: inherit; transition: border-color 0.15s, box-shadow 0.15s;
}
.svc-card:hover { border-color: var(--green); box-shadow: 0 2px 8px rgba(16,185,129,0.1); }
.svc-card-left { display: flex; flex-direction: column; gap: 2px; }
.svc-card-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.svc-card-meta { font-size: 12px; color: var(--text-muted); }
.svc-card-right { display: flex; align-items: center; gap: 8px; }
.svc-card-arrow { font-size: 16px; color: var(--text-muted); }

/* === CLIENT LIST === */
.cl-search-wrap { margin-bottom: 16px; }
.cl-search {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; font-family: inherit; background: #fff;
}
.cl-seg-bar {
  display: flex; align-items: center; gap: 16px; margin-bottom: 20px;
  padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px;
}
.cl-seg-item { display: flex; align-items: baseline; gap: 6px; }
.cl-seg-count { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.cl-seg-count--paying { color: var(--green); }
.cl-seg-count--active { color: var(--blue); }
.cl-seg-count--inactive { color: var(--text-muted); }
.cl-seg-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.cl-seg-divider { width: 1px; height: 20px; background: var(--border); }
.cl-section { margin-bottom: 20px; }
.cl-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cl-section-title { display: flex; align-items: center; gap: 8px; }
.cl-table-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.cl-table { width: 100%; border-collapse: collapse; }
.cl-table th { text-align: left; padding: 8px 14px; font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600; border-bottom: 1px solid var(--border); background: #fafafa; }
.cl-table td { padding: 10px 14px; border-bottom: 1px solid #f3f4f6; font-size: 13px; }
.cl-table tbody tr:last-child td { border-bottom: none; }
.cl-table tbody tr:hover td { background: #fafafa; }
.cl-cell-name { min-width: 0; }
.cl-name-link { font-weight: 600; color: var(--text-primary); text-decoration: none; }
.cl-name-link:hover { color: var(--green); }
.cl-type { display: block; font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.cl-price-active { font-size: 12px; font-weight: 600; color: var(--green-dark); }
.cl-price-inactive { font-size: 12px; color: var(--text-muted); }
.cl-portal-link { font-size: 11px; color: var(--blue); text-decoration: none; font-weight: 500; }
.cl-portal-link:hover { text-decoration: underline; }
.cl-cell-site, .cl-cell-price, .cl-cell-tasks, .cl-cell-msg, .cl-cell-actions { white-space: nowrap; }

/* Legacy cl-card kept for focus-visible rule */
.cl-card {
  display: flex; align-items: center; justify-content: space-between;
  text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 20px; min-height: 56px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.cl-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); border-color: var(--border-strong); }

@media (max-width: 768px) {
  .cl-seg-bar { gap: 10px; padding: 10px 12px; }
  .cl-seg-count { font-size: 16px; }
  .cl-table th:nth-child(n+4), .cl-table td:nth-child(n+4) { display: none; }
  .cl-cell-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
}

/* === WEBSITE TOOL === */

/* Layout */
.wt-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 84px);
  gap: 0;
}
/* Breadcrumbs */
.breadcrumbs {
  font-size: 13px;
  color: #86868b;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.breadcrumbs a { color: #86868b; text-decoration: none; }
.breadcrumbs a:hover { color: #374151; }
.bc-sep { color: #d1d5db; font-size: 14px; }
.bc-current { color: #374151; font-weight: 500; }

.wt-split {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 16px;
}

/* Left pane */
.wt-left {
  flex: 0 0 60%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 0;
}
.wt-preview {
  flex: 1;
  border: 1px solid #e8e8ed;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  background: #fff;
  min-height: 0;
}
.wt-preview iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.wt-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #86868b;
  text-align: center;
  padding: 40px;
}
.wt-empty-icon { font-size: 40px; margin-bottom: 14px; }
.wt-empty-title { font-weight: 600; color: #1d1d1f; margin-bottom: 6px; font-size: 16px; }
.wt-empty-sub { font-size: 13px; }

/* Build progress overlay */
.wt-build-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px;
  text-align: center;
  gap: 28px;
}
.wt-stages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 280px;
  text-align: left;
}
.wt-stage {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #86868b;
  transition: color 0.3s;
}
.wt-stage.active { color: #1d1d1f; font-weight: 500; }
.wt-stage.done { color: #10b981; }
.wt-stage-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e8e8ed;
  flex-shrink: 0;
  transition: background 0.3s;
}
.wt-stage.active .wt-stage-dot { background: #0071e3; display: none; }
.wt-stage.done .wt-stage-dot { background: #10b981; }
.wt-stage-spinner {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #e8e8ed;
  border-top-color: #0071e3;
  animation: wt-spin 0.8s linear infinite;
  flex-shrink: 0;
  display: none;
}
.wt-stage.active .wt-stage-spinner { display: block; }
@keyframes wt-spin { to { transform: rotate(360deg); } }

/* Version bar */
.wt-version-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border: 1px solid #e8e8ed;
  border-top: none;
  border-radius: 0 0 10px 10px;
  background: #fafafa;
  flex-shrink: 0;
}
.wt-version-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #86868b;
}
.wt-version-actions { display: flex; gap: 6px; }

/* Version history table */
.wt-versions { margin-top: 20px; padding: 0 8px; }
.wt-versions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.wt-versions-table th {
  text-align: left;
  padding: 6px 8px;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.wt-versions-table td {
  padding: 5px 8px;
  border-bottom: 1px solid var(--border-light, rgba(255,255,255,0.04));
  white-space: nowrap;
}
.wt-versions-table td:nth-child(6) {
  white-space: normal;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right pane */
.wt-right {
  flex: 0 0 calc(40% - 16px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 12px;
  overflow-y: auto;
  min-width: 300px;
}

/* Zone card */
.wt-zone {
  border: 1px solid #e8e8ed;
  border-radius: 10px;
  background: #fff;
  flex-shrink: 0;
}
.wt-zone-header {
  padding: 12px 14px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #86868b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #f3f4f6;
}
.wt-zone-body { padding: 14px; }

/* Current Request */
.wt-current-request {
  font-size: 13px;
  color: #374151;
  line-height: 1.5;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #f9fafb;
  border-radius: 8px;
  border-left: 3px solid #0071e3;
}
.wt-leave-note {
  font-size: 12px;
  color: #86868b;
  display: flex;
  align-items: center;
  gap: 6px;
}
.wt-leave-note::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
}

/* Quick actions */
.wt-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.wt-quick-btn {
  padding: 5px 10px;
  font-size: 12px;
  border: 1px solid #e8e8ed;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.wt-quick-btn:hover:not(:disabled) {
  border-color: #10b981;
  color: #10b981;
  background: #f0fdf8;
}
.wt-quick-btn.selected {
  border-color: #10b981;
  background: #10b981;
  color: #fff;
}
.wt-quick-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.wt-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e8e8ed;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: #1d1d1f;
  resize: vertical;
  min-height: 88px;
  box-sizing: border-box;
  line-height: 1.5;
  transition: border-color 0.15s;
  background: #fff;
}
.wt-textarea:focus { outline: none; border-color: #10b981; }
.wt-textarea:disabled { background: #f9fafb; color: #86868b; cursor: not-allowed; }
.wt-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  gap: 10px;
}
.wt-category-label {
  font-size: 12px;
  color: #86868b;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wt-disabled-msg {
  font-size: 12px;
  color: #86868b;
  padding: 10px 12px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #f3f4f6;
  text-align: center;
  line-height: 1.5;
}

/* Build overlay text */
.wt-build-title { font-size: 15px; font-weight: 600; color: #1d1d1f; margin-bottom: 4px; }
.wt-build-sub { font-size: 13px; color: #86868b; }

/* View live link */
.wt-view-live { font-size: 12px; color: #0071e3; text-decoration: none; }

/* Client Requests zone */
.wt-add-request-form { display: flex; gap: 6px; margin-bottom: 10px; }
.wt-add-request-input { flex: 1; padding: 6px 10px; border: 1px solid #e8e8ed; border-radius: 6px; font-size: 12px; font-family: inherit; }
.wt-task-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid #f3f4f6; }
.wt-task-left { display: flex; align-items: center; gap: 8px; }
.wt-task-left input[type="checkbox"] { cursor: pointer; }
.wt-task-title { font-size: 12px; color: #1d1d1f; }
.wt-task-title.wt-task-done { text-decoration: line-through; color: #9ca3af; }
.wt-task-archive { border: none; background: none; color: #9ca3af; font-size: 12px; cursor: pointer; padding: 0 4px; }
.wt-task-empty { font-size: 12px; color: #9ca3af; }

/* Image library */
.wt-img-card { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); position: relative; }
.wt-img-card:last-child { border-bottom: none; }
.wt-img-card img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.wt-img-info { flex: 1; min-width: 0; }
.wt-img-desc { font-size: 12px; color: var(--text-primary); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wt-img-meta { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.wt-img-del { border: none; background: none; color: var(--text-muted); font-size: 16px; cursor: pointer; padding: 2px 6px; flex-shrink: 0; border-radius: 4px; }
.wt-img-del:hover { color: var(--red); background: rgba(255,59,48,0.08); }
.wt-img-dims { position: absolute; top: 8px; left: 2px; background: rgba(0,0,0,0.6); color: #fff; font-size: 9px; padding: 1px 4px; border-radius: 3px; line-height: 1.3; pointer-events: none; }
.wt-size-pills { display: flex; gap: 4px; }
.wt-size-pill { padding: 3px 10px; font-size: 11px; border: 1px solid var(--border); border-radius: 12px; background: none; color: var(--text-secondary); cursor: pointer; font-family: inherit; }
.wt-size-pill:hover { border-color: var(--text-muted); }
.wt-size-pill.active { background: var(--green); color: #fff; border-color: var(--green); }
.wt-zone-collapsed .wt-zone-body { display: none; }
.wt-zone-collapsed .wt-zone-toggle { transform: rotate(-90deg); }
.wt-zone-toggle { font-size: 10px; transition: transform 0.2s; }

/* Token complexity bar */
.wt-token-bar {
  width: 80px; height: 6px; background: var(--border); border-radius: 3px;
  overflow: hidden; cursor: help; flex-shrink: 0;
}
.wt-token-fill {
  height: 100%; background: var(--green); border-radius: 3px;
  transition: width 0.4s ease;
}
.wt-token-yellow .wt-token-fill { background: var(--amber); }
.wt-token-red .wt-token-fill { background: var(--red); }

/* Image placeholder spinner */
.wt-img-placeholder { opacity: 0.6; }
.wt-img-ph-spinner {
  width: 48px; height: 48px; border-radius: 6px; flex-shrink: 0;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.wt-img-ph-spinner::after {
  content: '';
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border-strong);
  border-top-color: var(--green);
  animation: wt-spin 0.8s linear infinite;
}

/* Browser chrome */
.wt-browser { display: flex; flex-direction: column; width: 100%; height: 100%; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: #fff; }
.wt-browser-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #f5f5f7; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.wt-browser-dots { display: flex; gap: 5px; }
.wt-browser-dots span { width: 10px; height: 10px; border-radius: 50%; }
.wt-browser-dots span:nth-child(1) { background: #ff5f57; }
.wt-browser-dots span:nth-child(2) { background: #febc2e; }
.wt-browser-dots span:nth-child(3) { background: #28c840; }
.wt-browser-url { flex: 1; background: #e8e8ed; border-radius: 4px; padding: 4px 10px; font-size: 11px; color: #86868b; text-align: center; font-family: inherit; }

/* Funnel — horizontal stacked bar */
.fnl-wrap { margin-top: 8px; }
.fnl-bar-row { display: flex; align-items: stretch; height: 56px; border-radius: 8px; overflow: hidden; }
.fnl-seg {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-decoration: none; color: #fff; min-width: 48px; position: relative;
  transition: filter 0.15s ease;
}
.fnl-seg:hover { filter: brightness(1.12); }
.fnl-seg-count { font-size: 18px; font-weight: 700; line-height: 1; }
.fnl-seg-label { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.7; margin-top: 2px; }
.fnl-seg--leads { background: #6366f1; }
.fnl-seg--clients { background: #8b5cf6; }
.fnl-seg--paying { background: var(--green); }
.fnl-rates {
  display: flex; align-items: center; gap: 0; margin-top: 6px; height: 20px;
}
.fnl-rate {
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: var(--text-muted);
}
.fnl-rate-arrow { margin: 0 4px; font-size: 10px; color: var(--border-strong); }
.fnl-sidebar {
  display: flex; gap: 24px; margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.fnl-stat { display: flex; flex-direction: column; gap: 1px; }
.fnl-stat-val { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.fnl-stat-lbl { font-size: 11px; color: var(--text-muted); font-weight: 500; }

/* Iframe loading */
.wt-iframe-wrap { position: relative; width: 100%; flex: 1; min-height: 0; }
.wt-iframe-wrap iframe { width: 100%; height: 100%; border: none; display: block; }
.wt-iframe-spinner {
  display: none; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 24px; height: 24px; border-radius: 50%;
  border: 3px solid #e8e8ed; border-top-color: var(--green);
  animation: wt-spin 0.8s linear infinite;
}
.wt-iframe-loading .wt-iframe-spinner { display: block; }
.wt-iframe-loading iframe { opacity: 0; }

/* === LEAD TABLE === */
.lead-row:hover td { background: #f9fafb; }
.lead-row.lead-selected td { background: #f0fdf4; }

/* === SNOOZE MENU === */
.snooze-menu { display: none; }
.snooze-open .snooze-menu { display: block; }

/* === PIPELINE === */
.pipeline-wrap { display: grid; grid-template-columns: 3fr 2fr; gap: 24px; }
.pipeline-left { display: flex; flex-direction: column; }
.pipeline-right { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); }
.pipeline-rapid-add { display: flex; gap: 8px; margin-bottom: 12px; }
.pipeline-tabs { display: flex; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.pipeline-tab {
  padding: 10px 16px; font-size: 12px; font-weight: 600; color: var(--text-muted);
  background: none; border: none; border-bottom: 2px solid transparent;
  cursor: pointer; font-family: inherit; transition: all 0.12s;
}
.pipeline-tab:hover { color: var(--text-secondary); }
.pipeline-tab.active { color: var(--green); border-bottom-color: var(--green); }
.pipeline-tab-content { flex: 1; padding: 16px; }
.pipeline-tab-pane { display: none; }
.pipeline-tab-pane.active { display: block; }

/* === KANBAN === */
.kanban { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.kanban-col { display: flex; flex-direction: column; min-height: 200px; }
.kanban-col-header {
  display: flex; align-items: center; gap: 8px; padding: 8px 0; margin-bottom: 8px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted);
}
.kanban-col-body { display: flex; flex-direction: column; gap: 8px; }
.kanban-card {
  background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04); transition: box-shadow 0.12s;
}
.kanban-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

/* === RESPONSIVE === */
@media (max-width: 1200px) {
  .cr-wrap { grid-template-columns: 1fr 300px; }
}
@media (max-width: 1024px) {
  .dash-grid { grid-template-columns: 1fr; }
  .cr-wrap { grid-template-columns: 1fr; }
  .wt-split { flex-direction: column; }
  .wt-left { flex: none; min-height: 400px; }
  .wt-right { flex: none; min-width: 0; }
}

@media (max-width: 768px) {
  .shell { flex-direction: column; height: auto; min-height: 100vh; }
  .sidebar {
    width: 100%; height: auto; flex-direction: row; align-items: center;
    overflow-x: auto; overflow-y: hidden; padding: 0;
  }
  .sidebar .brand { padding: 12px 16px; }
  .sidebar .earnings-pill { display: none; }
  .sidebar .nav-section { display: flex; padding: 0; }
  .nav-item { padding: 12px 14px; border-left: none; border-bottom: 2px solid transparent; }
  .nav-item.active { border-left-color: transparent; border-bottom-color: var(--green); }
  .sidebar-footer { display: none; }
  .main { padding: 16px; overflow-y: visible; }
  .cr-wrap { grid-template-columns: 1fr; }
  .pipeline-wrap { grid-template-columns: 1fr; }
  .wt-split { grid-template-columns: 1fr; height: auto; }
  .kanban { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
}

/* === TOAST === */
.toast-container {
  position: fixed; bottom: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column-reverse; gap: 8px; pointer-events: none;
}
.toast {
  padding: 10px 16px; border-radius: 8px; font-size: 13px; font-weight: 500;
  font-family: inherit; line-height: 1.4; max-width: 360px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15); pointer-events: auto;
  animation: toast-in 0.25s ease;
}
.toast-error { background: #991b1b; color: #fff; }
.toast-success { background: var(--green-dark); color: #fff; }
.toast-fade { opacity: 0; transition: opacity 0.3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* === MISC === */
a { transition: color 0.15s ease; }
.text-green { color: var(--green); }
.text-muted { color: var(--text-muted); }
.font-mono { font-variant-numeric: tabular-nums; }

/* ========================================
   Utility Classes
   ======================================== */

/* Form inputs */
.form-input {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; font-family: inherit; background: #fff; width: 100%; box-sizing: border-box;
}
.form-input-sm {
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 12px; font-family: inherit; background: #fff; width: 100%; box-sizing: border-box;
}

/* Form labels */
.form-label {
  display: block; font-size: 10px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px;
}

/* Flex utilities */
.flex-between {
  display: flex; justify-content: space-between; align-items: center;
}
.flex-center {
  display: flex; align-items: center;
}
.btn-group { display: flex; gap: 8px; }

/* Grid utilities */
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.grid-2-3 { display: grid; grid-template-columns: 2fr 3fr; gap: 16px; }
.grid-3-2 { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; }
.grid-auto-2 { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 13px; }

/* Spacing */
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.mb-lg { margin-bottom: 24px; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.gap-sm { gap: 8px; }
.gap-md { gap: 12px; }
.gap-lg { gap: 16px; }

/* Card modifiers */
.card-compact { padding: 16px; }
.card-flush { padding: 0; overflow: hidden; }

/* Section label (inline version of .section-label with count) */
.section-label-inline {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--text-muted); margin-bottom: 8px;
}

/* Status pill (leads page) */
.status-pill {
  font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-secondary);
}

/* Action card (dashboard) */
.action-card-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border: 1px solid var(--border);
  border-radius: 0 8px 8px 0; margin-bottom: 6px;
  text-decoration: none; color: inherit; background: var(--bg-card);
}

/* Chevron arrow */
.chevron { font-size: 18px; color: var(--text-muted); }
.chevron-sm { font-size: 16px; color: var(--text-muted); margin-left: auto; }

/* Chat message bubbles */
.msg-row { display: flex; margin-bottom: 8px; }
.msg-row-sent { justify-content: flex-end; }
.msg-row-received { justify-content: flex-start; }
.msg-bubble {
  max-width: 80%; padding: 8px 12px; border-radius: 10px;
  font-size: 12px; line-height: 1.5;
}
.msg-bubble-sent {
  background: var(--green); color: #fff; border-bottom-right-radius: 4px;
}
.msg-bubble-received {
  background: #f3f4f6; color: var(--text-primary); border-bottom-left-radius: 4px;
}
.msg-bubble-wide { max-width: 85%; }
.msg-time { font-size: 10px; margin-top: 3px; }
.msg-time-sent { color: rgba(255,255,255,0.7); }
.msg-time-received { color: var(--text-muted); }
.msg-attachment {
  display: block; margin-top: 4px; font-size: 11px; color: inherit;
  opacity: 0.8; text-decoration: underline;
}
.msg-empty { font-size: 12px; color: var(--text-muted); text-align: center; padding: 16px 0; }
.msg-form { display: flex; gap: 8px; align-items: center; }

/* Dropdown menu (snooze etc.) */
.dropdown-menu {
  position: absolute; left: 0; top: 100%; background: #fff;
  border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); z-index: 10; min-width: 100px; padding: 4px 0;
}
.dropdown-item {
  display: block; width: 100%; text-align: left; padding: 6px 12px;
  font-size: 12px; border: none; background: none; cursor: pointer; font-family: inherit;
}
.dropdown-item:hover { background: #f3f4f6; }

/* Unit suffix on values */
.value-suffix { font-size: 14px; color: var(--text-muted); }
.value-suffix-sm { font-size: 13px; color: var(--text-muted); }
.value-suffix-xs { font-size: 12px; color: var(--text-muted); }

/* Small value card */
.card .value-sm { font-size: 20px; }

/* Task row */
.task-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid #f3f4f6;
}
.task-left { display: flex; align-items: center; gap: 8px; }
.done-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid #f3f4f6;
}

/* Earnings tier grid */
.tier-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }

/* Badge size modifiers */
.badge-xs { font-size: 10px; padding: 2px 6px; }
.badge-cap { padding: 2px 8px; font-size: 11px; }

/* Flex column */
.flex-col { display: flex; flex-direction: column; }

/* Transparent border for buttons */
.btn-borderless { border: 1px solid transparent; }

/* Text sizes */
.text-xs { font-size: 11px; }
.text-sm { font-size: 12px; }
.text-md { font-size: 13px; }

/* No-site badge in clients table */
.text-muted-sm { color: var(--text-muted); font-size: 12px; }

/* === LANDING PAGE === */
.lp-body {
  background: #fff;
  min-height: 100vh;
}

/* Nav */
.lp-nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.lp-nav-inner {
  max-width: 960px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
}
.lp-logo {
  font-size: 20px; font-weight: 800; letter-spacing: -0.5px; color: var(--text-primary);
}
.lp-logo-sm { font-size: 16px; }
.lp-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green), #06b6d4);
  display: inline-block; margin-left: 1px; vertical-align: baseline;
}
.lp-nav-signin {
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  text-decoration: none; padding: 6px 14px; border: 1px solid var(--border-strong);
  border-radius: 8px; transition: all 0.15s;
}
.lp-nav-signin:hover { background: #f9fafb; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }

/* Hero */
.lp-hero {
  padding: 80px 24px 64px; text-align: center;
}
.lp-hero-inner { max-width: 640px; margin: 0 auto; }
.lp-badge {
  display: inline-block; font-size: 12px; font-weight: 600;
  color: var(--green-dark); background: #ecfdf5; border: 1px solid #bbf7d0;
  padding: 4px 14px; border-radius: 20px; margin-bottom: 20px;
  letter-spacing: 0.2px;
}
.lp-h1 {
  font-size: 48px; font-weight: 900; letter-spacing: -1.5px;
  line-height: 1.08; color: var(--text-primary); margin-bottom: 20px;
}
.lp-subtitle {
  font-size: 17px; line-height: 1.6; color: var(--text-muted);
  max-width: 480px; margin: 0 auto 32px;
}
.lp-cta-group {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.lp-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 28px; border-radius: 10px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  background: var(--bg-dark); color: #fff;
  transition: all 0.15s; cursor: pointer; border: none; font-family: inherit;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.lp-cta:hover { background: #222; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
.lp-cta-dev {
  background: #fff; color: var(--text-secondary); border: 1px solid var(--border-strong);
  box-shadow: none;
}
.lp-cta-dev:hover { background: #f9fafb; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.lp-trust-line {
  font-size: 12px; color: var(--text-muted); margin-top: 14px;
}

/* Sections */
.lp-section { padding: 64px 24px; }
.lp-section-alt { background: var(--bg); }
.lp-section-inner { max-width: 800px; margin: 0 auto; }
.lp-section-title {
  font-size: 24px; font-weight: 800; letter-spacing: -0.5px;
  color: var(--text-primary); margin-bottom: 36px; text-align: center;
}

/* Steps */
.lp-steps { display: flex; flex-direction: column; gap: 28px; max-width: 520px; margin: 0 auto; }
.lp-step { display: flex; gap: 16px; align-items: flex-start; }
.lp-step-num {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg-dark); color: #fff;
  font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.lp-step-content h3 {
  font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px;
}
.lp-step-content p {
  font-size: 14px; line-height: 1.6; color: var(--text-muted);
}

/* Features */
.lp-features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.lp-feature {
  padding: 24px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; transition: border-color 0.15s, box-shadow 0.15s;
}
.lp-feature:hover { border-color: var(--green); box-shadow: 0 4px 16px rgba(16,185,129,0.08); }
.lp-feature-icon {
  font-size: 22px; margin-bottom: 10px; color: var(--green);
}
.lp-feature h3 {
  font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px;
}
.lp-feature p {
  font-size: 13px; line-height: 1.55; color: var(--text-muted);
}

/* Section subtitle */
.lp-section-subtitle {
  font-size: 15px; color: var(--text-muted); text-align: center;
  max-width: 560px; margin: -8px auto 32px; line-height: 1.5;
}

/* Zero risk */
.lp-risk-points {
  max-width: 580px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 20px;
}
.lp-risk-point {
  font-size: 14px; line-height: 1.6; color: var(--text-secondary);
}
.lp-risk-point strong {
  color: var(--text-primary); font-weight: 700;
}

/* Proof */
.lp-proof-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.lp-proof-card {
  text-align: center; padding: 28px 20px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card);
}
.lp-proof-value {
  font-size: 28px; font-weight: 900; letter-spacing: -0.5px;
  color: var(--green); margin-bottom: 8px;
}
.lp-proof-label {
  font-size: 13px; line-height: 1.5; color: var(--text-muted);
}

/* Final CTA */
.lp-section-final { background: var(--bg-dark); }
.lp-final { text-align: center; }
.lp-final-h2 {
  font-size: 32px; font-weight: 900; letter-spacing: -1px;
  color: #fff; margin-bottom: 12px;
}
.lp-final-sub {
  font-size: 15px; color: #a1a1aa; margin-bottom: 28px;
}
.lp-section-final .lp-cta {
  background: var(--green); color: #fff;
}
.lp-section-final .lp-cta:hover {
  background: var(--green-dark); box-shadow: 0 6px 24px rgba(16,185,129,0.3);
}

/* Footer */
.lp-footer {
  border-top: 1px solid var(--border); padding: 24px;
}
.lp-footer-inner {
  max-width: 960px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.lp-footer-text { font-size: 12px; color: var(--text-muted); }

/* Landing responsive */
@media (max-width: 768px) {
  .lp-h1 { font-size: 32px; letter-spacing: -1px; }
  .lp-subtitle { font-size: 15px; }
  .lp-hero { padding: 48px 20px 40px; }
  .lp-section { padding: 48px 20px; }
  .lp-features { grid-template-columns: 1fr; }
  .lp-proof-cards { grid-template-columns: 1fr; }
  .lp-final-h2 { font-size: 24px; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .lp-features { grid-template-columns: repeat(2, 1fr); }
}

/* DB Explorer */
.db-table { width: 100%; border-collapse: collapse; font-size: 12px; font-family: monospace; }
.db-table th { text-align: left; padding: 6px 8px; border-bottom: 2px solid var(--border); font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
.db-table td { padding: 5px 8px; border-bottom: 1px solid var(--border); color: var(--text-secondary); white-space: nowrap; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.db-table tr:hover td { background: var(--bg-dark); }
