/* ══════════════════════════════════════════════════════
   Obra Admin — Watson Electrician
   Dark theme matching obra-client-console look & feel
   ══════════════════════════════════════════════════════ */

/* ── Design Tokens ─────────────────────────────────── */
:root {
  --obra-bg:           #0a0f1e;
  --obra-surface:      #111827;
  --obra-surface-2:    #1a2236;
  --obra-surface-3:    #1e2a40;
  --obra-border:       #1e2a44;
  --obra-border-2:     #2a3a58;
  --obra-accent:       #7c5cff;
  --obra-accent-hover: #9678ff;
  --obra-accent-dim:   rgba(124,92,255,.15);
  --obra-brand-gradient-start: #9a7cff;
  --obra-brand-gradient-end:   #6f4cff;
  --obra-text:         #eef3ff;
  --obra-text-muted:   #8fa0c4;
  --obra-text-dim:     #4a5c7a;
  --obra-success:      #4ade80;
  --obra-warning:      #fbbf24;
  --obra-error:        #f87171;
  --obra-brand:        #ffd200;

  /* Dimensions */
  --sidebar-w:    220px;
  --topbar-h:     56px;
  --radius-sm:    6px;
  --radius-md:    10px;
  --radius-lg:    14px;

  /* Short aliases so leads/prospect/website-setup CSS resolves correctly */
  --bg:           var(--obra-bg);
  --surface:      var(--obra-surface);
  --surface-2:    var(--obra-surface-2);
  --surface-3:    var(--obra-surface-3);
  --border:       var(--obra-border);
  --border-2:     var(--obra-border-2);
  --accent:       var(--obra-accent);
  --accent-hover: var(--obra-accent-hover);
  --accent-dim:   var(--obra-accent-dim);
  --text:         var(--obra-text);
  --text-muted:   var(--obra-text-muted);
  --text-dim:     var(--obra-text-dim);
}

/* ── Reset / Base ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--obra-bg);
  color: var(--obra-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--obra-accent); text-decoration: none; }
a:hover { color: var(--obra-accent-hover); }

button { font-family: inherit; cursor: pointer; }

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: var(--obra-text);
  background: var(--obra-surface-3);
  border: 1px solid var(--obra-border-2);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--obra-accent);
  box-shadow: 0 0 0 3px rgba(124,92,255,.18);
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238fa0c4' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}
textarea { resize: vertical; min-height: 72px; }
label { display: block; font-weight: 600; font-size: 12px; color: var(--obra-text-muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .04em; }

/* ── Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--obra-border-2); border-radius: 3px; }

/* ── App Shell ─────────────────────────────────────── */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
#app[hidden] { display: none !important; }

/* ── Topbar ────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--obra-surface);
  border-bottom: 1px solid var(--obra-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
  gap: 12px;
}
.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.topbar__icon--tile {
  width: 44px;
  height: 44px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.topbar__title {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .02em;
}
.topbar__sub {
  font-size: 11px;
  color: var(--obra-text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar__more-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: none; background: transparent;
  color: var(--obra-text-muted);
  font-size: 16px; letter-spacing: 1px;
  border-radius: var(--radius-sm);
  cursor: pointer; flex-shrink: 0;
}
.topbar__more-btn:hover { background: var(--obra-surface-2); }
.topbar__more-menu {
  position: absolute;
  top: var(--topbar-h); right: 8px;
  background: var(--obra-surface-2);
  border: 1px solid var(--obra-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  z-index: 200; min-width: 200px;
  padding: 8px 0;
}
.topbar__more-menu[hidden] { display: none; }
.topbar__more-mode {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 8px 14px 10px;
  border-bottom: 1px solid var(--obra-border);
  margin-bottom: 4px;
}
.topbar__more-item {
  display: block; width: 100%;
  padding: 9px 14px;
  background: none; border: none;
  color: var(--obra-text); font-size: 13px;
  text-align: left; cursor: pointer;
  text-decoration: none;
}
.topbar__more-item:hover { background: var(--obra-surface-3); }
.save-indicator {
  font-size: 12px;
  color: var(--obra-success);
  font-weight: 600;
}
.mode-indicator {
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 9px;
  border: 1px solid var(--obra-border-2);
}
.mode-indicator--published {
  color: var(--obra-text-muted);
  background: var(--obra-surface-2);
}
.mode-indicator--draft {
  color: #d8cdff;
  background: rgba(124,92,255,.15);
  border-color: rgba(124,92,255,.35);
}

/* ── Hamburger toggle (hidden on desktop) ──────────── */
.drawer-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--obra-text);
  font-size: 20px;
  padding: 4px 6px;
  line-height: 1;
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
}
.drawer-toggle:hover { background: var(--obra-surface-2); }

/* ── Drawer overlay (mobile) ───────────────────────── */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 199;
  opacity: 0;
  transition: opacity .25s ease;
}
.drawer-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Layout ────────────────────────────────────────── */
.layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ── Sidebar ───────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--obra-surface);
  border-right: 1px solid var(--obra-border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: visible;
  padding: 12px 8px;
  transition: width .22s cubic-bezier(.4, 0, .2, 1);
  position: relative;
}
.sidebar.is-collapsed { width: 60px; }
.sidebar.is-collapsed .sidebar__brand-text,
.sidebar.is-collapsed .sidebar__section-label,
.sidebar.is-collapsed .sidebar__item > span:not(.sidebar__icon),
.sidebar.is-collapsed .sidebar__badge,
.sidebar.is-collapsed .sidebar__nav-badge,
.sidebar.is-collapsed .sidebar__chevron,
.sidebar.is-collapsed .sidebar__group-children,
.sidebar.is-collapsed .sidebar__powered,
.sidebar.is-collapsed .sidebar__powered-brand span {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 0s, opacity 0s;
}
.sidebar:not(.is-collapsed) .sidebar__brand-text,
.sidebar:not(.is-collapsed) .sidebar__section-label,
.sidebar:not(.is-collapsed) .sidebar__item > span:not(.sidebar__icon),
.sidebar:not(.is-collapsed) .sidebar__badge,
.sidebar:not(.is-collapsed) .sidebar__nav-badge,
.sidebar:not(.is-collapsed) .sidebar__chevron,
.sidebar:not(.is-collapsed) .sidebar__powered,
.sidebar:not(.is-collapsed) .sidebar__powered-brand span {
  max-width: 200px;
  opacity: 1;
  transition: max-width 0s .22s, opacity .15s ease .2s;
}
.sidebar.is-collapsed .sidebar__brand { justify-content: center; padding: 10px 6px; flex-direction: column; gap: 6px; }
.sidebar.is-collapsed .sidebar__collapse-btn { margin-left: 0; }
.sidebar.is-collapsed .sidebar__item { justify-content: center; padding: 9px 6px; }
.sidebar.is-collapsed .sidebar__collapse-btn svg { transform: rotate(180deg); }
.sidebar__collapse-btn {
  margin-left: auto;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid var(--obra-border);
  background: var(--obra-surface-2);
  color: var(--obra-text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, color .15s, transform .15s;
}
.sidebar__collapse-btn:hover { background: var(--obra-surface-3); color: var(--obra-text); }
.sidebar__collapse-btn svg { width: 14px; height: 14px; transition: transform .22s ease; }
.sidebar.is-collapsed .sidebar__collapse-btn { margin-left: 0; }

.sidebar__expand-tab {
  display: none;
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 48px;
  background: var(--obra-surface);
  border: 1px solid var(--obra-border);
  border-left: none;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  color: var(--obra-text-muted);
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: background .15s, color .15s;
  padding: 0;
}
.sidebar__expand-tab svg { width: 10px; height: 10px; }
.sidebar__expand-tab:hover { background: var(--obra-surface-2); color: var(--obra-text); }
.sidebar.is-collapsed .sidebar__expand-tab { display: flex; }
.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--obra-border);
  background: var(--obra-surface-2);
  border-radius: var(--radius-md);
  padding: 10px;
  margin: 2px 2px 8px;
}
.sidebar__brand-tile {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(145deg, var(--obra-brand-gradient-start), var(--obra-brand-gradient-end));
}
.sidebar__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.sidebar__brand-text span {
  font-size: 13px;
  font-weight: 700;
}
.sidebar__brand-text small {
  font-size: 10px;
  color: var(--obra-text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.sidebar__section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--obra-text-dim);
  padding: 14px 10px 6px;
}
.sidebar__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--obra-text-muted);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  transition: background .15s, color .15s;
}
.sidebar__item:hover {
  background: var(--obra-surface-2);
  color: var(--obra-text);
}
.sidebar__item.is-active {
  background: var(--obra-accent-dim);
  color: var(--obra-text);
  font-weight: 600;
}
.sidebar__icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar__badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  color: var(--obra-text-dim);
  background: var(--obra-surface-3);
  padding: 1px 6px;
  border-radius: 999px;
}

/* New-lead notification bubble on sidebar nav */
.sidebar__nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

/* Refresh button spin while loading */
@keyframes obra-spin { to { transform: rotate(360deg); } }
.leads-refresh-btn--loading { pointer-events: none; opacity: .6; }
.leads-refresh-btn--loading .refresh-icon { display: inline-block; animation: obra-spin .7s linear infinite; }

/* ── Content Area ──────────────────────────────────── */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Toast ─────────────────────────────────────────── */
.toast-area {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* Above .obra-modal (1101) / .obra-modal-overlay (1100) — otherwise an error
     toast fired while a modal is open (e.g. a failed Save) renders invisibly
     behind it and looks like the action silently did nothing. */
  z-index: 1200;
  pointer-events: none;
}
.toast {
  background: var(--obra-surface-2);
  border: 1px solid var(--obra-border-2);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s;
  max-width: 320px;
}
.toast.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.toast--success { border-left: 3px solid var(--obra-success); }
.toast--error   { border-left: 3px solid var(--obra-error); }
.toast--info    { border-left: 3px solid var(--obra-accent); }

/* ── Tab Panel ─────────────────────────────────────── */
.tab-panel { display: flex; flex-direction: column; gap: 20px; }
.tab-panel[hidden] { display: none !important; }

/* ── Panel Section ─────────────────────────────────── */
.panel-section {
  background: var(--obra-surface);
  border: 1px solid var(--obra-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.section-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--obra-border);
}
.section-header h2 {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 700;
}
.section-header p {
  margin: 0;
  color: var(--obra-text-muted);
  font-size: 12px;
}
.section-toggle { display: inline-flex; }
.section-body { padding: 20px; }

/* ── Form Grid ─────────────────────────────────────── */
.form-grid {
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid--1 { grid-template-columns: 1fr; }
.form-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.form-grid--full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field-hint { font-size: 11px; color: var(--obra-text-dim); margin-top: 2px; }
.field-hint-inline { font-size: 10px; color: var(--obra-text-dim); font-weight: 400; text-transform: none; letter-spacing: 0; }

/* ── Gallery Controls ──────────────────────────────── */
.gallery-mode-toggle { display: flex; gap: 6px; }
.gallery-mode-btn { background: var(--obra-surface-2); border: 2px solid var(--obra-border); color: var(--obra-text-dim); font-size: 12px; font-weight: 600; padding: 7px 16px; border-radius: 6px; cursor: pointer; transition: all .15s; }
.gallery-mode-btn:hover { border-color: var(--obra-text-muted); color: var(--obra-text); }
.gallery-mode-btn.is-active { background: #1a2a1a; border-color: #4ade80; color: #4ade80; }
.form-bg-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.form-bg-thumb { position: relative; height: 64px; border-radius: var(--radius-sm); border: 2px solid var(--obra-border); background-size: cover; background-position: center; cursor: pointer; padding: 0; transition: border-color .15s; }
.form-bg-thumb:hover { border-color: var(--obra-text-muted); }
.form-bg-thumb.is-active { border-color: #4ade80; }
.form-bg-thumb.is-active::after { content: '✓'; position: absolute; top: 4px; right: 5px; font-size: 11px; font-weight: 900; color: #4ade80; background: rgba(0,0,0,.55); border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; }
.form-bg-thumb--remove { display: flex; align-items: center; justify-content: center; background-color: var(--obra-surface-2); color: var(--obra-text-muted); font-size: 12px; font-weight: 700; }
.form-bg-thumb--remove:hover { color: var(--obra-text); }

.panel-subsection { margin: 4px 0 18px; padding-top: 14px; border-top: 1px solid var(--obra-border); }
.panel-subsection__title { margin: 0 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--obra-text-muted); }
.color-field { display: flex; align-items: center; gap: 8px; }
.color-field input[type="color"] { width: 36px; height: 36px; padding: 0; border: 1px solid var(--obra-border); border-radius: var(--radius-sm); background: none; cursor: pointer; flex-shrink: 0; }
.color-field input[type="text"] { flex: 1; }
.range-field { display: flex; align-items: center; gap: 10px; }
.range-field input[type="range"] { flex: 1; accent-color: var(--obra-accent); }
.range-field input[type="number"] { width: 64px; flex-shrink: 0; }

.quick-settings-popover { position: fixed; z-index: 100000; width: 320px; max-width: calc(100vw - 20px); max-height: calc(100vh - 20px); overflow: hidden; display: flex; flex-direction: column; background: var(--obra-surface); border: 1px solid var(--obra-border); border-radius: var(--radius-lg); box-shadow: 0 20px 50px rgba(0,0,0,.5), 0 0 0 1px rgba(124,92,255,.12); animation: quick-settings-pop-in .14s ease-out; }
.quick-settings-popover::before { content: ''; display: block; height: 3px; background: linear-gradient(90deg, var(--obra-accent), var(--obra-accent-hover)); flex-shrink: 0; }
.quick-settings-popover__header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--obra-border); font-weight: 800; font-size: 13px; letter-spacing: .01em; color: var(--obra-text); background: var(--obra-surface-2); flex-shrink: 0; }
.quick-settings-popover__close { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; background: var(--obra-surface-3); border: 1px solid var(--obra-border); color: var(--obra-text-muted); font-size: 16px; line-height: 1; cursor: pointer; border-radius: 7px; transition: all .12s ease; }
.quick-settings-popover__close:hover { color: var(--obra-text); background: var(--obra-surface-2); border-color: var(--obra-border-2); transform: rotate(90deg); }
.quick-settings-popover__body { padding: 16px; display: flex; flex-direction: column; gap: 16px; overflow: auto; }
.quick-settings-popover__body .field > label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--obra-text-muted); margin-bottom: 8px; }
.quick-settings-popover--dock { transition: top .22s ease, left .22s ease; }
.quick-settings-popover__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-settings-popover__slide { display: flex; flex-direction: column; gap: 0; }
.qs-group { border-bottom: 1px solid var(--obra-border); }
.qs-group:last-child { border-bottom: none; }
.qs-group__header { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px 0; background: none; border: none; color: var(--obra-text); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; gap: 8px; }
.qs-group__header:hover { color: var(--obra-accent); }
.qs-group__chevron { width: 10px; height: 6px; flex-shrink: 0; transition: transform .15s ease; stroke: currentColor; }
.qs-group.is-open .qs-group__chevron { transform: rotate(180deg); }
.qs-group__body { display: none; padding-bottom: 12px; flex-direction: column; gap: 12px; }
.qs-group.is-open .qs-group__body { display: flex; }

@keyframes quick-settings-pop-in {
  from { opacity: 0; transform: translateY(6px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.gallery-anim-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.gallery-anim-card { display: flex; flex-direction: column; align-items: center; gap: 5px; background: var(--obra-surface-2); border: 2px solid var(--obra-border); border-radius: var(--radius-sm); padding: 7px 4px 6px; cursor: pointer; transition: all .15s; position: relative; }
.gallery-anim-card:hover { border-color: var(--obra-text-muted); }
.gallery-anim-card.is-active { border-color: #4ade80; background: #1a2a1a; }
.gallery-anim-card.is-active::after { content: '✓'; position: absolute; top: 3px; right: 4px; font-size: 9px; font-weight: 900; color: #4ade80; line-height: 1; }
.gallery-anim-card span { font-size: 9px; font-weight: 700; color: var(--obra-text-dim); white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; }
.gallery-anim-card.is-active span { color: #4ade80; }
.gallery-anim-thumb { width: 100%; height: 32px; border-radius: 3px; background: #1e2640; position: relative; overflow: hidden; }
.gallery-anim-thumb--kenburns::after { content: ''; position: absolute; inset: -4px; background: linear-gradient(135deg,#2a3354,#1e2640); animation: gThKB 2s ease-in-out infinite alternate; }
@keyframes gThKB { from { transform: scale(1); } to { transform: scale(1.12); } }
.gallery-anim-thumb--fade::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg,rgba(255,200,0,.25),rgba(255,120,0,.1)); animation: gThFade 1.4s ease-in-out infinite alternate; }
@keyframes gThFade { from { opacity: 0; } to { opacity: 1; } }
.gallery-anim-thumb--zoomout::after { content: ''; position: absolute; inset: -4px; background: linear-gradient(135deg,#2a3354,#1e2640); animation: gThZO 2s ease-in-out infinite alternate; }
@keyframes gThZO { from { transform: scale(1.12); } to { transform: scale(1); } }
.gallery-anim-thumb--drift::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg,transparent 0%,rgba(255,200,0,.2) 50%,transparent 100%); width: 200%; animation: gThDrift 1.8s linear infinite; }
@keyframes gThDrift { from { transform: translateX(-50%); } to { transform: translateX(0%); } }
.gallery-anim-thumb--slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg,rgba(100,160,255,.3),rgba(50,80,200,.1)); animation: gThSlide 1.6s ease-in-out infinite; }
@keyframes gThSlide { 0%,100% { transform: translateX(60%); opacity: 0; } 40%,60% { transform: translateX(0); opacity: 1; } }

/* ── Service Cards Grid ────────────────────────────── */
.service-cards { padding: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.service-card-fields {
  background: var(--obra-surface-2);
  border: 1px solid var(--obra-border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.service-card-fields__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--obra-text-muted);
  margin-bottom: 2px;
}

/* ── Content Tab — Split Panel Layout ──────────────── */
#website-editor-data[hidden] { display: none; }
#website-editor-data {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.data-editor-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: start;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
}
.data-nav-panel {
  padding: 16px 12px;
  border-right: 1px solid rgba(255,255,255,0.10);
  min-width: 0;
  transition: padding .2s;
}
.data-nav-header-row {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px;
}
.data-nav-collapse-btn {
  background: none; border: none; color: rgba(255,255,255,0.35);
  font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 4px;
  border-radius: 6px; transition: color .15s, transform .2s; flex-shrink: 0;
}
.data-nav-collapse-btn:hover { color: rgba(255,255,255,0.7); }
.data-editor-body.nav-is-collapsed { grid-template-columns: 48px 1fr; }
.data-nav-panel.is-collapsed { padding: 10px 4px; }
.data-nav-panel.is-collapsed .data-nav-heading,
.data-nav-panel.is-collapsed .data-nav-sub,
.data-nav-panel.is-collapsed .data-nav-footer-bar,
.data-nav-panel.is-collapsed .data-nav-group-hdr { display: none !important; }
.data-nav-panel.is-collapsed .data-nav-group-body { display: grid !important; padding: 0 0 6px; gap: 3px; }
.data-nav-panel.is-collapsed .data-nav-item { justify-content: center !important; padding: 9px 0 !important; border-color: transparent !important; background: transparent !important; border-radius: 8px !important; }
.data-nav-panel.is-collapsed .data-nav-item.is-active { background: rgba(124,92,255,0.15) !important; box-shadow: none !important; border-color: transparent !important; }
.data-nav-panel.is-collapsed .dni-text { display: none !important; }
.data-nav-panel.is-collapsed .dni-icon { font-size: 18px; line-height: 1; }
.data-nav-panel.is-collapsed .data-nav-collapse-btn { transform: rotate(180deg); }
.data-nav-heading {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}
.data-nav-sub {
  margin: 0 0 12px;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}
.data-nav-groups {
  display: grid;
  gap: 6px;
}
.data-nav-group {
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
}
.data-nav-group-hdr {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  padding: 9px 12px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  color: rgba(255,255,255,0.70) !important;
  background: rgba(255,255,255,0.04) !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  text-align: left !important;
}
.data-nav-group-hdr:hover { color: rgba(255,255,255,0.95) !important; background: rgba(255,255,255,0.07) !important; }
.dngi-emoji { font-size: 13px; margin-right: 4px; }
.dngi-arrow {
  font-size: 12px;
  opacity: 0.55;
  display: inline-block;
  transition: transform 0.18s ease;
}
.data-nav-group.is-open .dngi-arrow { transform: rotate(90deg); }
.data-nav-group-body { display: none; padding: 4px 6px 6px; }
.data-nav-group.is-open .data-nav-group-body { display: grid; gap: 3px; }
.data-nav-item {
  display: flex !important;
  align-items: flex-start !important;
  gap: 9px !important;
  width: 100% !important;
  text-align: left !important;
  padding: 9px 11px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  background: rgba(255,255,255,0.02) !important;
  box-shadow: none !important;
  color: rgba(255,255,255,0.85) !important;
  cursor: pointer !important;
  transition: border-color .12s, background .12s, box-shadow .12s !important;
}
.data-nav-item:hover {
  background: rgba(255,255,255,0.05) !important;
  border-color: rgba(255,255,255,0.12) !important;
}
.data-nav-item.is-active {
  border-color: rgba(124,92,255,0.45) !important;
  background: rgba(124,92,255,0.10) !important;
  box-shadow: inset 3px 0 0 rgba(124,92,255,0.70) !important;
}
.dni-icon { font-size: 15px; line-height: 20px; flex-shrink: 0; }
.dni-text { display: flex; flex-direction: column; gap: 2px; }
.dni-label { font-size: 13px; font-weight: 700; line-height: 1.2; }
.dni-hint { font-size: 11px; color: rgba(255,255,255,0.40); line-height: 1.3; }
.data-nav-footer-bar {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 11px;
  color: rgba(255,255,255,0.38);
}
.data-panels {
  padding: 16px;
  min-width: 0;
  overflow: hidden;
}
#tab-website .data-panels .panel-section { display: none !important; }
#tab-website .data-panels .panel-section.is-active { display: block !important; }
#tab-website .data-panels .panel-section .section-header { display: none !important; }
#tab-website .data-panels .panel-section.is-active .section-header { display: none !important; }
#tab-website .data-panels .panel-section > :not(.section-header) { display: block !important; max-height: none !important; opacity: 1 !important; overflow: visible !important; }
#tab-website .data-panels .section-header { cursor: default; pointer-events: none; }
#tab-website .data-panels .section-toggle { display: none !important; }
.website-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.data-action-bar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
}
.data-save-label {
  font-size: 12px;
  color: var(--obra-text-muted);
  white-space: nowrap;
}
}

/* ── Panel Footer ──────────────────────────────────── */
.panel-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--obra-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* ── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: none;
  transition: background .15s, opacity .15s, transform .1s;
  cursor: pointer;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--obra-accent);
  color: #fff;
}
.btn-primary:hover { background: var(--obra-accent-hover); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--obra-text-muted);
  border: 1px solid var(--obra-border-2);
}
.btn-ghost:hover { background: var(--obra-surface-2); color: var(--obra-text); }

.btn-danger {
  background: rgba(248,113,113,.15);
  color: var(--obra-error);
  border: 1px solid rgba(248,113,113,.3);
}
.btn-danger:hover { background: rgba(248,113,113,.25); }

.btn-sm { padding: 5px 10px; font-size: 11px; }
.btn-icon {
  width: 28px; height: 28px;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  font-size: 14px;
}

/* ── Image Slots Grid ──────────────────────────────── */
/* ── Images toolbar ──────────────────────────────────── */
.img-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 20px 0;
}
.img-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.img-filter-btn {
  background: var(--obra-surface-2);
  border: 1px solid var(--obra-border);
  border-radius: 20px;
  color: var(--obra-text-muted);
  font-size: 12px; font-weight: 600;
  padding: 5px 12px;
  cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  transition: background .15s, color .15s, border-color .15s;
}
.img-filter-btn:hover { color: var(--obra-text); border-color: var(--obra-border-2); }
.img-filter-btn.is-active {
  background: var(--obra-accent-dim);
  border-color: rgba(124,92,255,.4);
  color: var(--obra-accent-hover);
}
.img-filter-count {
  background: var(--obra-surface-3);
  border-radius: 10px;
  font-size: 10px;
  padding: 1px 6px;
  color: var(--obra-text-muted);
  min-width: 18px; text-align: center;
}
.img-filter-btn.is-active .img-filter-count { background: rgba(124,92,255,.25); color: var(--obra-accent-hover); }

.img-view-toggle { display: flex; gap: 4px; }
.img-view-btn {
  background: var(--obra-surface-2);
  border: 1px solid var(--obra-border);
  border-radius: var(--radius-sm);
  color: var(--obra-text-muted);
  cursor: pointer;
  padding: 6px 8px;
  display: flex; align-items: center;
  transition: background .15s, color .15s;
}
.img-view-btn:hover { color: var(--obra-text); }
.img-view-btn.is-active { background: var(--obra-accent-dim); border-color: rgba(124,92,255,.4); color: var(--obra-accent-hover); }

/* List view layout */
.image-grid--list {
  grid-template-columns: 1fr !important;
  padding: 12px 20px;
  gap: 6px;
}
.image-grid--list .image-slot {
  flex-direction: row;
  align-items: center;
  gap: 0;
  min-height: 56px;
}
.image-grid--list .image-slot__preview {
  width: 64px;
  min-width: 64px;
  height: 56px;
  aspect-ratio: unset;
  border-radius: 0;
  border-right: 1px solid var(--obra-border);
  flex-shrink: 0;
}
.image-grid--list .image-slot__body {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  flex: 1;
  min-width: 0;
}
.image-grid--list .image-slot__label {
  font-size: 13px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.image-grid--list .image-slot__hint { display: none; }
.image-grid--list .upload-drop { padding: 0; background: none; border: none; font-size: 12px; }
.image-grid--list .upload-drop:hover { background: none; }
.image-grid--list .upload-progress { display: none; }
.image-grid--list .image-slot__footer {
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
}
.image-grid--list .image-slot__status {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.image-slot__status { font-size: 12px; font-weight: 600; }
.image-slot__status--filled { color: var(--obra-success); }
.image-slot__status--empty  { color: var(--obra-text-dim); }

.image-grid {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.image-slot {
  background: var(--obra-surface);
  border: 1px solid var(--obra-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .15s, transform .1s, box-shadow .15s;
}
.image-slot:hover {
  border-color: var(--obra-border-2);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.image-slot__preview {
  aspect-ratio: 16/9;
  background: var(--obra-surface-2);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--obra-border);
}
.image-slot--logo .image-slot__preview { aspect-ratio: 1; }
.image-slot__preview img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.image-slot__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--obra-text-dim);
  font-size: 11px;
}
.image-slot__empty-icon { font-size: 32px; opacity: .5; }

.image-slot__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 0; }
.image-slot__label {
  font-size: 14px;
  font-weight: 700;
  color: var(--obra-text);
  margin-bottom: 3px;
  display: block;
}
.image-slot__hint {
  font-size: 11px;
  color: var(--obra-text-muted);
  margin-bottom: 12px;
  display: block;
  line-height: 1.4;
}

.image-slot__actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.image-slot__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--obra-border);
}
.image-slot__remove-btn {
  background: transparent;
  border: none;
  color: var(--obra-error);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s;
  opacity: .8;
}
.image-slot__remove-btn:hover { background: rgba(248,113,113,.12); opacity: 1; }

/* Upload Drop Target */
.upload-drop {
  border: 2px dashed var(--obra-border-2);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  font-size: 11px;
  color: var(--obra-text-muted);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  margin-top: 8px;
}
.upload-drop:hover,
.upload-drop.drag-over {
  border-color: var(--obra-accent);
  background: var(--obra-accent-dim);
  color: var(--obra-text);
}
.upload-drop input[type="file"] {
  display: none;
}

/* Progress bar */
.upload-progress {
  display: none;
  height: 3px;
  background: var(--obra-border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 6px;
}
.upload-progress.is-active { display: block; }
.upload-progress__bar {
  height: 100%;
  background: var(--obra-accent);
  width: 0%;
  transition: width .3s;
  animation: obra-progress-indeterminate 1.2s ease-in-out infinite;
}
@keyframes obra-progress-indeterminate {
  0%   { width: 0%; margin-left: 0%; }
  50%  { width: 50%; margin-left: 25%; }
  100% { width: 0%; margin-left: 100%; }
}

/* ── Leads Placeholder ─────────────────────────────── */
.placeholder-card {
  background: var(--obra-surface);
  border: 1px solid var(--obra-border);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.placeholder-icon { font-size: 48px; }
.placeholder-card h3 { margin: 0; font-size: 18px; }
.placeholder-card p { margin: 0; color: var(--obra-text-muted); max-width: 400px; }
.placeholder-card .btn { margin-top: 8px; }

.icon--line {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--bolt {
  width: 14px;
  height: 14px;
  display: block;
}

/* ── Section Divider ───────────────────────────────── */
.section-divider {
  border: none;
  border-top: 1px solid var(--obra-border);
  margin: 0;
}

/* ── Info Banner ───────────────────────────────────── */
.info-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(124,92,255,.1);
  border: 1px solid rgba(124,92,255,.25);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 12px;
  color: var(--obra-text-muted);
  margin: 0 20px 16px;
}
.info-banner__icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* Website accordion */
#tab-website .panel-section .section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
#tab-website .panel-section .section-header > div { flex: 1; min-width: 0; }
#tab-website .panel-section .section-toggle {
  align-items: center;
  justify-content: center;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--obra-text-muted);
  font-size: 16px;
  line-height: 1;
  padding: 2px;
  transition: transform .2s ease;
}
#tab-website .panel-section:not(.is-collapsed) .section-toggle {
  transform: rotate(180deg);
}
#tab-website .panel-section > :not(.section-header) {
  max-height: 2000px;
  opacity: 1;
  overflow: hidden;
  transition: max-height .25s ease, opacity .2s ease, padding .25s ease, margin .25s ease;
}
#tab-website .panel-section.is-collapsed .section-header { border-bottom: 0; }
#tab-website .panel-section.is-collapsed > :not(.section-header) {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0;
  border: 0;
  pointer-events: none;
}

/* ── Spinner ───────────────────────────────────────── */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: obra-spin .7s linear infinite;
  display: inline-block;
}
@keyframes obra-spin { to { transform: rotate(360deg); } }

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --sidebar-w: 56px; }
  .sidebar__brand { justify-content: center; padding: 8px; }
  .sidebar__brand-text { display: none; }
  .sidebar__item span:not(.sidebar__icon) { display: none; }
  .sidebar__badge { display: none; }
  .topbar__sub { display: none; }
  .form-grid, .form-grid--3 { grid-template-columns: 1fr; }
  .service-cards { grid-template-columns: 1fr; }
  .image-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  /* ── Show hamburger button ── */
  .drawer-toggle { display: inline-flex; }

  /* ── Show overlay element ── */
  .drawer-overlay { display: block; pointer-events: none; }

  /* ── Topbar: single row with overflow menu ── */
  .topbar {
    height: var(--topbar-h);
    padding: 0 10px 0 12px;
    flex-wrap: nowrap;
    gap: 8px;
    position: relative;
  }
  .topbar__brand { flex: 1; min-width: 0; }
  .topbar__icon--tile { display: none; }
  .topbar__sub { display: none; }
  /* Hide all action items except Publish on mobile */
  .topbar__actions .mode-indicator,
  .topbar__actions a.btn,
  #preview-draft-btn,
  #logout-btn,
  #save-indicator { display: none !important; }
  #publish-content-btn { font-size: 12px; padding: 6px 14px; flex-shrink: 0; }
  .topbar__more-btn { display: inline-flex; }

  /* ── Sidebar becomes a slide-in drawer ── */
  .sidebar {
    /* Take it out of the normal flow */
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform .25s ease;
    /* Reset icon-only styles from 768px breakpoint */
    padding: 16px 10px;
    border-right: 1px solid var(--obra-border);
    box-shadow: 4px 0 24px rgba(0,0,0,.5);
  }
  .sidebar.is-open {
    transform: translateX(0);
  }

  /* Show all labels & badges inside the drawer */
  .sidebar__item span:not(.sidebar__icon) { display: inline; }
  .sidebar__badge { display: inline; }
  .sidebar__item {
    font-size: 14px;
    padding: 11px 14px;
  }

  /* Content takes full width (no sidebar space reserved) */
  .content {
    padding: 12px;
  }

  /* Misc tightening */
  .image-grid { grid-template-columns: 1fr; }
  .section-body { padding: 14px; }
  .form-grid { padding: 14px; }
  .panel-footer { padding: 12px 14px; }

}

/* ── Auth tabs (Sign In / Create Account) ───────────── */
.auth-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 20px;
}
.auth-tab {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.auth-tab--active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.auth-tab:hover:not(.auth-tab--active) { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.78); }

/* ── Plan picker screen ──────────────────────────────── */
#plan-screen {
  position: fixed;
  inset: 0;
  background: #0a0f1e;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  z-index: 1000;
}
#plan-screen[hidden] { display: none; }
.plan-screen-inner {
  width: 100%;
  max-width: 880px;
}
.plan-screen-header { text-align: center; margin-bottom: 36px; }
.plan-screen-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
}
.plan-screen-title {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 700;
  margin: 0 0 8px;
}
.plan-screen-sub { color: rgba(255,255,255,0.58); margin: 0; font-size: 15px; }
.plan-screen-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 680px) { .plan-screen-cards { grid-template-columns: 1fr; } }
.plan-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}
.plan-card--featured {
  background: rgba(124,92,255,0.12);
  border-color: rgba(124,92,255,0.40);
}
.plan-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: #7c5cff;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  white-space: nowrap;
}
.plan-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 8px;
}
.plan-price { display: flex; align-items: baseline; gap: 6px; }
.plan-amount { font-size: 32px; font-weight: 700; line-height: 1; }
.plan-price-sub { font-size: 13px; color: rgba(255,255,255,0.5); }
.plan-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.plan-features li { font-size: 13px; color: rgba(255,255,255,0.72); }
.plan-check { color: #7c5cff; margin-right: 6px; font-weight: 700; }
.plan-btn {
  width: 100%;
  padding: 11px 16px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.plan-btn:hover:not(:disabled) { background: rgba(255,255,255,0.12); }
.plan-btn--primary { background: #7c5cff; border-color: transparent; }
.plan-btn--primary:hover:not(:disabled) { background: #6a4de0; }
.plan-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.plan-footnote {
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.38);
  margin: 0;
  padding-top: 8px;
}

/* ── Login Screen — Two-panel split layout ──────────── */
.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  background: #0a0f1e;
  overflow: hidden;
  z-index: 1000;
}
.login-screen[hidden] { display: none; }

/* ── Left panel: illustration ── */
.login-panel-left {
  flex: 0 0 55%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 32px 40px 40px;
  background: linear-gradient(160deg, #0d1528 0%, #121b36 50%, #0d1528 100%);
  border-right: 1px solid rgba(124,92,255,.15);
  position: relative;
  overflow: hidden;
}

/* Ambient glow blobs behind illustration */
.login-panel-left::before,
.login-panel-left::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.login-panel-left::before {
  width: 500px; height: 500px;
  left: -120px; top: -120px;
  background: radial-gradient(circle at center, rgba(124,92,255,.18), transparent 70%);
}
.login-panel-left::after {
  width: 400px; height: 400px;
  right: -100px; bottom: -80px;
  background: radial-gradient(circle at center, rgba(45,212,191,.14), transparent 70%);
}

.login-panel-brand {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1;
}
.login-panel-brand-name {
  font-size: 26px;
  font-weight: 800;
  color: rgba(255,255,255,.9);
  letter-spacing: .01em;
}

.login-panel-illus {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  z-index: 1;
  padding: 16px 0;
}

/* .obra-illus removed — replaced by .obra-mockup */

.login-panel-copy {
  width: 100%;
  max-width: 400px;
  z-index: 1;
}
.login-panel-headline {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: rgba(255,255,255,.92);
  letter-spacing: -.01em;
}
.login-panel-features {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.login-panel-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: rgba(255,255,255,.65);
  line-height: 1.4;
}
.login-panel-check {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(124,92,255,.25);
  color: #a78bfa;
  font-size: 10px;
  font-weight: 800;
  margin-top: 1px;
}
.login-panel-cta {
  display: inline-block;
  padding: 11px 22px;
  background: linear-gradient(135deg, #7c5cff, #2dd4bf);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(124,92,255,.35);
  transition: opacity .15s;
}
.login-panel-cta:hover { opacity: .88; }

/* ── Right panel: sign-in form ── */
.login-panel-right {
  flex: 0 0 45%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}

.login-card {
  width: min(400px, 100%);
  background: #111827;
  border-radius: 16px;
  padding: 36px 32px 28px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.login-logo { text-align: center; margin-bottom: 12px; }
.login-title {
  margin: 8px 0 4px;
  font-size: 22px;
  line-height: 1.25;
  color: #fff;
  text-align: center;
}
.login-subtitle {
  margin: 0 0 20px;
  color: var(--obra-text-muted);
  font-size: 13px;
  text-align: center;
}
.login-field { margin-bottom: 14px; }
.login-label {
  margin-bottom: 6px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  color: var(--obra-text-muted);
}
.login-input {
  width: 100%;
  background: var(--obra-surface-3);
  border: 1px solid var(--obra-border-2);
}
.login-password-wrap { position: relative; }
.login-password-wrap .login-input { padding-right: 42px; }
.login-eye-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--obra-text-muted);
  width: 30px;
  height: 30px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1;
}
.login-eye-btn:hover { background: var(--obra-surface-2); color: var(--obra-text); }
.login-eye-btn:focus-visible {
  outline: 1px solid var(--obra-accent);
  box-shadow: 0 0 0 3px rgba(124,92,255,.18);
}
.login-error {
  margin: 2px 0 12px;
  color: var(--obra-error);
  font-size: 13px;
}
.login-btn {
  width: 100%;
  border: 0;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 14px;
  background: linear-gradient(135deg, #7c5cff, #2dd4bf);
  box-shadow: 0 8px 24px rgba(124,92,255,.3);
}
.login-btn:disabled { opacity: .72; cursor: not-allowed; }
.login-footer {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
}
.login-link { color: #a78bfa; font-weight: 600; }
.login-link:hover { color: #c4b5fd; }
.login-powered {
  text-align: center;
  font-size: 12px;
  color: #4a4a6a;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.login-powered a { color: #7c5cff; text-decoration: none; }
.login-powered a:hover { color: #a78bfa; }

/* ── Obra Mockup — Glassmorphism cards ─────────────── */
.obra-mockup {
  width: 100%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mockup-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  animation: mockup-in .45s ease both;
}
.mockup-traffic-lights { display: flex; gap: 5px; }
.mockup-dot { width: 9px; height: 9px; border-radius: 50%; }
.mockup-dot--red    { background: #ff5f57; }
.mockup-dot--yellow { background: #febc2e; }
.mockup-dot--green  { background: #28c840; }
.mockup-topbar-label {
  flex: 1; text-align: center;
  font-size: 11px; font-weight: 600;
  color: rgba(255,255,255,.45); letter-spacing: .04em;
}
.mockup-topbar-greeting { font-size: 10px; color: rgba(255,255,255,.3); white-space: nowrap; }

.mockup-card {
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid rgba(124,92,255,.22);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.07);
}
.mockup-card--leads {
  border-color: rgba(124,92,255,.3);
  animation: mockup-in .5s ease .1s both, mockup-float-a 4.2s ease-in-out .6s infinite;
}
.mockup-card--today {
  margin-left: 18px;
  border-color: rgba(45,212,191,.25);
  animation: mockup-in .5s ease .22s both, mockup-float-b 4.8s ease-in-out .72s infinite;
}
.mockup-card--pulse {
  margin-right: 18px;
  border-color: rgba(255,210,0,.2);
  animation: mockup-in .5s ease .34s both, mockup-float-c 5.4s ease-in-out .84s infinite;
}
@keyframes mockup-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes mockup-float-a {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}
@keyframes mockup-float-b {
  0%, 100% { transform: translateX(18px) translateY(0); }
  50%       { transform: translateX(18px) translateY(-4px); }
}
@keyframes mockup-float-c {
  0%, 100% { transform: translateX(-18px) translateY(0); }
  50%       { transform: translateX(-18px) translateY(-6px); }
}

.mockup-card-header { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
.mockup-card-icon { font-size: 13px; }
.mockup-card-title {
  flex: 1; font-size: 10px; font-weight: 700;
  color: rgba(255,255,255,.65); letter-spacing: .06em; text-transform: uppercase;
}
.mockup-badge {
  font-size: 9px; font-weight: 700; color: #2dd4bf;
  background: rgba(45,212,191,.12); border: 1px solid rgba(45,212,191,.25);
  border-radius: 20px; padding: 2px 7px;
}
.mockup-pulse-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #4ade80;
  animation: mockup-pulse-ring 2s ease-in-out infinite;
}
@keyframes mockup-pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(74,222,128,.5); }
  70%  { box-shadow: 0 0 0 5px rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}
.mockup-stat-row { margin-bottom: 10px; }
.mockup-big-num { font-size: 30px; font-weight: 800; color: #fff; line-height: 1; margin-bottom: 2px; }
.mockup-big-num--gold { color: #ffd200; }
.mockup-big-sub { font-size: 10px; color: rgba(255,255,255,.4); line-height: 1.4; }
.mockup-lead-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 8px;
}
.mockup-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, #7c5cff, #2dd4bf);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.mockup-lead-info { flex: 1; min-width: 0; }
.mockup-lead-name { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.85); }
.mockup-lead-time { font-size: 9px; color: rgba(255,255,255,.38); margin-top: 1px; }
.mockup-action-btn {
  font-size: 9px; font-weight: 700; color: #a78bfa;
  padding: 3px 8px; border: 1px solid rgba(124,92,255,.3);
  border-radius: 6px; white-space: nowrap; background: rgba(124,92,255,.1);
}
.mockup-appt-list { display: flex; flex-direction: column; gap: 7px; }
.mockup-appt { display: flex; align-items: center; gap: 8px; }
.mockup-appt-time { font-size: 9px; font-weight: 700; color: #2dd4bf; width: 54px; flex-shrink: 0; }
.mockup-appt-name { font-size: 11px; color: rgba(255,255,255,.6); }
.mockup-pulse-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.mockup-sparkline { display: flex; align-items: flex-end; gap: 4px; height: 40px; }
.mockup-bar {
  width: 9px; height: var(--h);
  background: rgba(255,210,0,.28); border-radius: 3px 3px 0 0;
  animation: spark-grow .7s ease both;
}
.mockup-bar--lit { background: #ffd200; box-shadow: 0 0 8px rgba(255,210,0,.45); }
@keyframes spark-grow {
  from { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
  to   { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
}
.mockup-bar:nth-child(1) { animation-delay: .5s; }
.mockup-bar:nth-child(2) { animation-delay: .6s; }
.mockup-bar:nth-child(3) { animation-delay: .7s; }
.mockup-bar:nth-child(4) { animation-delay: .8s; }
.mockup-bar:nth-child(5) { animation-delay: .9s; }

/* ── Responsive: collapse to single column ── */
@media (max-width: 860px) {
  .login-screen { flex-direction: column; overflow-y: auto; }
  .login-panel-left {
    flex: 0 0 auto;
    border-right: none;
    border-bottom: 1px solid rgba(124,92,255,.15);
    padding: 28px 24px 28px;
  }
  .login-panel-brand img { display: none; }
  .login-panel-illus { padding: 12px 0; }
  .obra-illus { width: min(280px, 70vw); }
  .login-panel-copy { max-width: 480px; text-align: center; }
  .login-panel-features li { justify-content: flex-start; text-align: left; }
  .login-panel-right { flex: 0 0 auto; padding: 32px 20px 40px; }
}

@media (max-width: 480px) {
  .login-panel-left { padding: 20px 16px 20px; }
  .login-panel-headline { font-size: 17px; }
  .obra-illus { width: min(220px, 70vw); }
  .login-card { padding: 28px 20px 20px; }
  .login-title { font-size: 19px; }
}

/* ── Leads Stats Bar ─────────────────────────────────── */
.leads-stats-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.leads-stat {
  background: var(--obra-surface);
  border: 1px solid var(--obra-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.leads-stat--new    { border-top: 3px solid #7c5cff; }
.leads-stat--pending { border-top: 3px solid #f59e0b; }
.leads-stat--contacted { border-top: 3px solid #2dd4bf; }
.leads-stat--closed  { border-top: 3px solid #6b7280; }
.leads-stat--denied  { border-top: 3px solid #ef4444; }
.leads-stat__count {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}
.leads-stat--new .leads-stat__count    { color: #7c5cff; }
.leads-stat--pending .leads-stat__count { color: #f59e0b; }
.leads-stat--contacted .leads-stat__count { color: #2dd4bf; }
.leads-stat--closed .leads-stat__count  { color: #6b7280; }
.leads-stat--denied .leads-stat__count  { color: #ef4444; }
/* Booking status stat bar */
.bk-stat--pending    { border-top: 3px solid #f59e0b; }
.bk-stat--confirmed  { border-top: 3px solid #10b981; }
.bk-stat--completed  { border-top: 3px solid #6b7280; }
.bk-stat--declined   { border-top: 3px solid #ef4444; }
.bk-stat--rescheduled { border-top: 3px solid #3b82f6; }
.bk-stat--cancelled  { border-top: 3px solid #9ca3af; }
.bk-stat--pending .leads-stat__count    { color: #f59e0b; }
.bk-stat--confirmed .leads-stat__count  { color: #10b981; }
.bk-stat--completed .leads-stat__count  { color: #6b7280; }
.bk-stat--declined .leads-stat__count   { color: #ef4444; }
.bk-stat--rescheduled .leads-stat__count { color: #3b82f6; }
.bk-stat--cancelled .leads-stat__count  { color: #9ca3af; }
.leads-stat__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--obra-text-muted);
}

/* ── Booked Split Layout ─────────────────────────────── */
.bk-layout {
  display: flex;
  height: calc(100vh - 310px);
  min-height: 420px;
  border: 1px solid var(--obra-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.bk-left {
  flex: 0 0 370px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--obra-border);
  overflow: hidden;
}
.bk-toolbar {
  margin-bottom: 0 !important;
  padding: 10px 12px;
  border-bottom: 1px solid var(--obra-border);
  flex-wrap: wrap;
}
.bk-grid-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: block !important;
}
#bk-grid .lead-card.is-selected {
  border-color: var(--obra-accent, #ffd200);
  box-shadow: -3px 0 0 0 var(--obra-accent, #ffd200), 0 0 0 1px var(--obra-accent, #ffd200);
}
.bk-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ── Booking Detail Pane ─────────────────────────────── */
.bk-detail {
  padding: 16px 20px;
  border-bottom: 1px solid var(--obra-border);
  flex-shrink: 0;
  min-height: 96px;
}
.bk-detail__empty {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  color: var(--obra-text-dim);
  font-size: 13px;
}
.bk-detail__empty-icon { font-size: 22px; opacity: 0.25; flex-shrink: 0; }
.bk-detail__top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.bk-detail__name { font-size: 14px; font-weight: 700; }
.bk-detail__sub { font-size: 12px; color: var(--obra-text-muted); margin-top: 1px; }
.bk-detail__open-btn { margin-left: auto; flex-shrink: 0; }
.bk-detail__fields {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 14px;
  font-size: 12px;
}
.bk-detail__key { color: var(--obra-text-muted); }
.bk-detail__val { color: var(--obra-text); }

/* ── Collaborator Node Canvas ─────────────────────────── */
.bk-canvas {
  flex: 1;
  position: relative;
  overflow: hidden;
  background-color: var(--obra-bg);
  background-image: radial-gradient(circle, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 24px 24px;
}
.bk-canvas__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px 6px;
  position: relative;
  z-index: 2;
}
.bk-canvas__title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--obra-text-muted);
}
.bk-canvas__badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--obra-surface-2);
  color: var(--obra-text-dim);
  border: 1px solid var(--obra-border);
}
.bk-canvas__nodes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 10px 20px 20px;
  position: relative;
  z-index: 2;
}
.bk-canvas__svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ── Collaborator Nodes ───────────────────────────────── */
.bk-node {
  background: var(--obra-surface);
  border: 1.5px solid var(--obra-border);
  border-radius: 12px;
  padding: 14px 14px 12px;
  cursor: grab;
  position: relative;
  opacity: 0.38;
  filter: grayscale(0.55);
  user-select: none;
  transition: opacity 0.25s, filter 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.bk-node:hover { opacity: 0.65; }
.bk-node:active { cursor: grabbing; }
.bk-node.is-assigned {
  opacity: 1;
  filter: none;
}
.bk-node__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
  margin-bottom: 8px;
}
.bk-node__name { font-size: 13px; font-weight: 600; color: var(--obra-text); line-height: 1.2; }
.bk-node__role { font-size: 11px; color: var(--obra-text-muted); margin-top: 2px; }
.bk-node__status {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
  font-size: 10px;
  color: var(--obra-text-dim);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.bk-node__dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--obra-border-2);
  flex-shrink: 0;
}
.bk-node__booking {
  font-size: 10px;
  color: var(--obra-text-muted);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Drop target highlight — booking being dragged over a node */
.bk-node.bk-drop-target {
  opacity: 1 !important;
  filter: none !important;
  transform: scale(1.04);
  transition: transform 0.15s, opacity 0.15s, filter 0.15s !important;
}
/* Assigned node click-to-unassign cursor */
.bk-node.is-assigned { cursor: pointer; }

/* Booking card drag grip handle */
.bk-card-draggable { position: relative; }
.bk-card-grip {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px;
  cursor: grab;
  opacity: 0;
  transition: opacity 0.15s;
}
.bk-card-draggable:hover .bk-card-grip { opacity: 1; }
.bk-card-grip span {
  display: block;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--obra-text-dim);
}
.bk-card-grip:active { cursor: grabbing; }

/* ── Leads Toolbar ──────────────────────────────────── */
.leads-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.leads-search {
  flex: 1;
  min-width: 200px;
  max-width: 460px;
  width: auto;
}
.leads-filters {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.leads-filter-btn {
  background: var(--obra-surface-2);
  border: 1px solid var(--obra-border-2);
  color: var(--obra-text-muted);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.leads-filter-btn:hover { background: var(--obra-surface-3); color: var(--obra-text); }
.leads-filter-btn.is-active {
  background: var(--obra-accent-dim);
  border-color: var(--obra-accent);
  color: var(--obra-text);
}
.leads-filter-count {
  background: var(--obra-surface-3);
  border-radius: 999px;
  padding: 0 5px;
  font-size: 10px;
}
.leads-toolbar-actions { display: flex; gap: 6px; margin-left: auto; }

/* ── Calendar Tab ───────────────────────────────────── */
.cal-legend { display: flex; align-items: center; gap: 14px; }
.cal-legend__item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--obra-text-muted); }
.cal-legend__dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.cal-legend__dot--booking   { background: #3b82f6; }
.cal-legend__dot--follow_up { background: #f59e0b; }
.cal-legend__dot--manual    { background: #7c5cff; }

.cal-root {
  background: var(--obra-surface);
  border: 1px solid var(--obra-border);
  border-radius: 12px;
  padding: 16px;
  color: var(--obra-text);
  /* FullCalendar theme vars — match the Obra dark surface instead of its light default */
  --fc-border-color: var(--obra-border);
  --fc-page-bg-color: transparent;
  --fc-neutral-bg-color: var(--obra-surface-2);
  --fc-list-event-hover-bg-color: var(--obra-surface-3);
  --fc-today-bg-color: var(--obra-accent-dim);
  --fc-button-bg-color: var(--obra-surface-3);
  --fc-button-border-color: var(--obra-border-2);
  --fc-button-hover-bg-color: var(--obra-surface-2);
  --fc-button-hover-border-color: var(--obra-accent);
  --fc-button-active-bg-color: var(--obra-accent);
  --fc-button-active-border-color: var(--obra-accent);
}
.cal-root .fc-toolbar-title { color: var(--obra-text); font-size: 16px; }
.cal-root .fc-col-header-cell-cushion,
.cal-root .fc-daygrid-day-number { color: var(--obra-text-muted); text-decoration: none; }
.cal-root .fc-day-today .fc-daygrid-day-number { color: var(--obra-text); font-weight: 700; }
.cal-root .fc-event { border-radius: 5px; font-size: 12px; cursor: pointer; }
.cal-root .cal-evt--cancelled { opacity: 0.5; text-decoration: line-through; }

.cal-event-linked-notice {
  background: var(--obra-surface-2);
  border: 1px solid var(--obra-border-2);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--obra-text-muted);
  margin: 0;
}
.cal-event-footer { justify-content: space-between; }

/* ── Leads Grid ─────────────────────────────────────── */
.leads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.leads-loading, .leads-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--obra-text-muted);
  font-size: 14px;
}

/* ── Lead Card ──────────────────────────────────────── */
.lead-card {
  background: var(--obra-surface);
  border: 1px solid var(--obra-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  transition: border-color .15s, transform .1s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lead-card:hover { border-color: var(--obra-border-2); transform: translateY(-1px); }
.lead-card__top { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.lead-card--priority { border-color: rgba(251,191,36,.45); border-left-width: 3px; border-left-color: #f59e0b; box-shadow: -2px 0 10px rgba(251,191,36,.12); }
.lead-card__priority-star {
  font-size: 13px;
  color: #fbbf24;
  line-height: 1;
  flex-shrink: 0;
  margin-right: auto;
}
.lead-card__avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.lead-card__expand {
  background: transparent; border: 1px solid var(--obra-border-2);
  color: var(--obra-text-muted); border-radius: 6px;
  width: 26px; height: 26px; font-size: 11px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lead-card__expand:hover { background: var(--obra-surface-2); color: var(--obra-text); }
.lead-card__name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-card__sub { font-size: 11px; color: var(--obra-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-card__status-row { display: flex; align-items: center; justify-content: space-between; }
.lead-card__new-label { font-size: 10px; color: var(--obra-text-muted); }
.lead-card__dots { display: flex; gap: 4px; align-items: center; }
.lead-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--obra-border-2);
}
.lead-dot--active { background: currentColor; }
.lead-card__tags { display: flex; gap: 5px; flex-wrap: wrap; }
.lead-tag {
  font-size: 10px; font-weight: 600;
  background: var(--obra-surface-2);
  border: 1px solid var(--obra-border);
  border-radius: 4px; padding: 2px 7px;
  color: var(--obra-text-muted);
  white-space: nowrap; max-width: 90px;
  overflow: hidden; text-overflow: ellipsis;
}
.lead-tag--slug { color: var(--obra-text-dim); }
.lead-card__footer { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.lead-card__time { font-size: 11px; color: var(--obra-text-dim); }
.lead-card__badge {
  font-size: 10px; font-weight: 700;
  border-radius: 999px; padding: 2px 9px;
}

/* ── Lead Drawer ─────────────────────────────────────── */
.lead-drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 9100;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.lead-drawer-overlay.is-visible { opacity: 1; pointer-events: auto; }
.lead-drawer-overlay[hidden] { display: none; }

.lead-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 420px; max-width: 100vw;
  background: var(--obra-surface);
  border-left: 1px solid var(--obra-border);
  z-index: 9101;
  transform: translateX(100%);
  transition: transform .25s ease;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.lead-drawer.is-open { transform: translateX(0); }

.lead-drawer__header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--obra-border);
  flex-shrink: 0;
}
.lead-drawer__avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; flex-shrink: 0;
}
.lead-drawer__title { flex: 1; min-width: 0; }
.lead-drawer__name { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-drawer__meta { font-size: 11px; color: var(--obra-text-muted); }
.lead-drawer__status-badge {
  font-size: 11px; font-weight: 700;
  border-radius: 999px; padding: 3px 10px; flex-shrink: 0;
}
.lead-drawer__close {
  background: transparent; border: 1px solid var(--obra-border-2);
  color: var(--obra-text-muted); border-radius: 6px;
  width: 28px; height: 28px; cursor: pointer; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.lead-drawer__close:hover { background: var(--obra-surface-2); color: var(--obra-text); }

.lead-drawer__body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.lead-drawer__section-label {
  font-size: 10px; font-weight: 700; letter-spacing: .1em;
  color: var(--obra-text-dim); text-transform: uppercase; margin-bottom: -8px;
}

/* Pipeline */
.lead-pipeline { display: flex; align-items: center; gap: 0; }
.pipeline-step {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex: 1; font-size: 10px; color: var(--obra-text-dim); font-weight: 600;
}
.pipeline-dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--obra-surface-3); border: 2px solid var(--obra-border-2);
  transition: background .2s, border-color .2s, box-shadow .2s;
}
/* done/active dot colors are set inline by JS — one color per status */
.pipeline-step.is-active { color: var(--obra-text); }
.pipeline-connector { flex: 1; height: 2px; background: var(--obra-border-2); margin-bottom: 14px; transition: background .2s; }

/* Status buttons */
.lead-status-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lead-status-btn {
  background: var(--obra-surface-2); border: 1px solid var(--obra-border-2);
  color: var(--obra-text-muted); border-radius: var(--radius-sm);
  padding: 8px 12px; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.lead-status-btn:hover { background: var(--obra-surface-3); color: var(--obra-text); }
.lead-status-btn.is-active {
  /* colors set inline by JS — matches active status color */
}
/* Denied / Not Available button — red tint, spans full width */
.lead-status-btn--denied { grid-column: 1 / -1; color: #ef4444; border-color: rgba(239,68,68,.3); }
.lead-status-btn--denied:hover { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.5); color: #ef4444; }
.lead-status-btn--denied.is-active { background: rgba(239,68,68,.15); border-color: #ef4444; color: #ef4444; }

/* Lead Details */
.lead-details-grid { display: flex; flex-direction: column; gap: 10px; }
.lead-detail-row { display: grid; grid-template-columns: 20px 80px 1fr; align-items: start; gap: 8px; font-size: 13px; }
.lead-detail-icon { font-size: 13px; }
.lead-detail-key { color: var(--obra-text-muted); font-size: 12px; font-weight: 600; }
.lead-detail-val { color: var(--obra-text); word-break: break-word; }

/* Quick actions */
.lead-quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lead-action-btn {
  background: var(--obra-surface-2); border: 1px solid var(--obra-border-2);
  color: var(--obra-text-muted); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: background .15s, color .15s;
  text-align: left;
}
.lead-action-btn:hover { background: var(--obra-surface-3); color: var(--obra-text); }

/* Manage lead section — archive + delete */
.lead-actions-manage { display: flex; flex-direction: column; gap: 8px; }

/* Smart actions 2×2 grid */
.manage-smart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.manage-smart-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--obra-surface-2);
  border: 1px solid var(--obra-border);
  border-radius: var(--radius-md);
  color: var(--obra-text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 12px 8px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .4px;
  transition: background .15s, color .15s, border-color .15s;
}
.manage-smart-btn:hover { background: var(--obra-surface-3); color: var(--obra-text); border-color: var(--obra-border-2); }
.manage-smart-btn.is-active {
  background: rgba(251,191,36,.08);
  border-color: rgba(251,191,36,.35);
  color: #fbbf24;
}
.manage-smart-btn.is-active svg { fill: #fbbf24; stroke: #fbbf24; }

.manage-divider {
  height: 1px;
  background: var(--obra-border);
  margin: 2px 0;
}

.lead-action-btn--archive { color: var(--obra-text-muted); }
.lead-action-btn--delete  { color: #ef4444; border-color: rgba(239,68,68,.3); }
.lead-action-btn--delete:hover { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.5); color: #ef4444; }

/* Archived filter pill */
.leads-filter-btn--priority { color: #f59e0b; border-color: rgba(251,191,36,.3); }
.leads-filter-btn--priority.is-active { background: rgba(251,191,36,.12); border-color: #f59e0b; color: #f59e0b; }
.leads-filter-btn--archived { color: var(--obra-text-muted); border-style: dashed; }
.leads-filter-btn--archived.is-active { color: var(--obra-text); background: var(--obra-surface-3); }

/* Danger button */
.btn-danger {
  background: #ef4444; color: #fff; border: 1px solid #ef4444;
  border-radius: var(--radius-sm); cursor: pointer; font-weight: 600;
  transition: background .15s;
}
.btn-danger:hover { background: #dc2626; border-color: #dc2626; }
.btn-danger:disabled { opacity: .4; cursor: not-allowed; }

/* Delete modal */
.delete-lead-warning {
  font-size: 13px; color: var(--obra-text-muted); line-height: 1.5;
  background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.2);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.delete-lead-warning strong { color: #ef4444; }
.delete-confirm-input { font-family: monospace; letter-spacing: .05em; }
.obra-modal__footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--obra-border); }

.connector-badge {
  grid-column: 1 / -1;
  font-size: 11px; color: var(--obra-accent);
  background: var(--obra-accent-dim);
  border: 1px solid rgba(124,92,255,.25);
  border-radius: var(--radius-sm);
  padding: 5px 10px; text-align: center;
}
.connector-badge--full { display: block; grid-column: unset; }
.connector-badge--active { color: #4caf82; background: rgba(76,175,130,.1); border-color: rgba(76,175,130,.3); }
.connector-badge--with-toggle { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; }
.connector-badge-gmail-label { display: flex; align-items: center; gap: 6px; flex-shrink: 0; font-size: 11px; color: inherit; }

/* Schedule Call Modal */
.obra-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.65);
  z-index: 1100; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.obra-modal-overlay.is-open { opacity: 1; pointer-events: all; }
.obra-modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -54%);
  z-index: 1101; width: min(440px, calc(100vw - 32px));
  background: var(--obra-surface); border: 1px solid var(--obra-border-2);
  border-radius: var(--radius-lg); box-shadow: 0 24px 64px rgba(0,0,0,.55);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.obra-modal.is-open { opacity: 1; pointer-events: all; transform: translate(-50%, -50%); }
.obra-modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--obra-border);
}
.obra-modal__title { font-size: 14px; font-weight: 700; color: var(--obra-text); }
.obra-modal__close {
  background: none; border: none; color: var(--obra-text-muted);
  font-size: 16px; cursor: pointer; padding: 2px 4px; line-height: 1;
}
.obra-modal__close:hover { color: var(--obra-text); }
.obra-modal__body { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.obra-modal__field { display: flex; flex-direction: column; gap: 5px; }
.obra-modal__field label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; color: var(--obra-text-muted); margin: 0;
}
.obra-modal__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.obra-modal__textarea { min-height: 68px; resize: vertical; }
.obra-modal__footer {
  padding: 12px 20px 16px; border-top: 1px solid var(--obra-border);
  display: flex; flex-direction: column; gap: 10px;
}
.obra-modal__actions { display: flex; justify-content: flex-end; gap: 8px; }
.obra-modal__cancel {
  background: none; border: 1px solid var(--obra-border-2);
  color: var(--obra-text-muted); border-radius: var(--radius-sm);
  padding: 8px 16px; font-size: 13px; cursor: pointer; transition: border-color .15s, color .15s;
}
.obra-modal__cancel:hover { border-color: var(--obra-border); color: var(--obra-text); }
.obra-modal__confirm {
  background: var(--obra-accent); border: none; color: #fff;
  border-radius: var(--radius-sm); padding: 8px 18px;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s;
}
.obra-modal__confirm:hover { background: var(--obra-accent-hover); }

/* Notes */
.lead-notes-list { min-height: 40px; display: flex; flex-direction: column; gap: 8px; }
.lead-notes-empty { color: var(--obra-text-dim); font-size: 12px; margin: 0; }
.lead-notes-input { width: 100%; min-height: 72px; font-size: 12px; resize: vertical; }
.lead-note-item { background: var(--obra-surface-3); border: 1px solid var(--obra-border); border-radius: var(--radius-sm); padding: 8px 10px; }
.lead-note-meta { font-size: 10px; color: var(--obra-text-dim); margin-bottom: 4px; }
.lead-note-body { font-size: 12px; color: var(--obra-text); white-space: pre-wrap; word-break: break-word; }
.lead-note-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.lead-note-delete { background: none; border: none; color: var(--obra-text-dim); cursor: pointer; font-size: 11px; padding: 0 2px; opacity: 0; transition: opacity .15s; line-height: 1; }
.lead-note-item:hover .lead-note-delete { opacity: 1; }
.lead-note-delete:hover { color: #e53e3e; }
.lead-notes-hint { font-size: 10px; color: var(--obra-text-dim); margin: 4px 0 0; text-align: right; }

/* ── Translate bar ── */
.translate-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 0;
  flex-wrap: wrap;
}
.translate-bar--notes { margin: 6px 0 4px; }
.translate-bar__icon { font-size: 13px; line-height: 1; }
.translate-bar__label { font-size: 11px; color: var(--obra-text-dim); }
.translate-lang-select {
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 6px;
  border: 1px solid var(--obra-border);
  background: var(--obra-surface);
  color: var(--obra-text);
  cursor: pointer;
}
.translate-bar__btn {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid var(--obra-accent);
  background: transparent;
  color: var(--obra-accent);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.translate-bar__btn:hover { background: var(--obra-accent); color: #fff; }
.translate-bar__btn:disabled { opacity: 0.5; cursor: not-allowed; }
.translate-bar__restore {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--obra-border);
  background: transparent;
  color: var(--obra-text-dim);
  cursor: pointer;
}
.translate-bar__restore:hover { color: var(--obra-text); }

/* Responsive */
@media (max-width: 768px) {
  .leads-stats-bar { grid-template-columns: 1fr 1fr; }
  .lead-drawer { width: 100vw; }
}
@media (max-width: 480px) {
  .leads-stats-bar { grid-template-columns: 1fr 1fr; gap: 8px; }
  .leads-toolbar { flex-direction: column; align-items: stretch; }
  .leads-search { max-width: 100%; }
  .leads-toolbar-actions { margin-left: 0; }
}

.sidebar__client-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--obra-brand-gradient-start), var(--obra-brand-gradient-end));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: .02em;
}
.sidebar__obra-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Start Fresh Wizard ───────────────────────────── */
.sf-wizard-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.sf-wizard-modal {
  background: var(--obra-surface, #1a1d2e);
  border: 1px solid var(--obra-border, rgba(255,255,255,.08));
  border-radius: 16px;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
}
.sf-wizard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
}
.sf-step-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--obra-brand, #7c5cff);
  margin: 0 0 4px;
}
.sf-wizard-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--obra-text, #f0f4ff);
}
.sf-wizard-sub {
  font-size: 13px;
  color: var(--obra-text-muted, #8892aa);
  margin: 0;
}
.sf-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--obra-text-muted, #8892aa);
  font-size: 18px;
  padding: 4px;
  flex-shrink: 0;
  line-height: 1;
}
.sf-close:hover { color: var(--obra-text, #f0f4ff); }

/* Template picker */
.sf-template-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.sf-tpl-card {
  background: var(--obra-bg, #111320);
  border: 2px solid var(--obra-border, rgba(255,255,255,.08));
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s;
  position: relative;
}
.sf-tpl-card:hover { border-color: rgba(124,92,255,.4); }
.sf-tpl-card--selected { border-color: #7c5cff !important; }
.sf-tpl-preview {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
  height: 100px;
  background: #e8eaf0;
  display: flex;
  flex-direction: column;
}
.sf-tpl-preview--modern { background: #1a1a2e; }
.sf-tpl-bar { height: 12px; background: #fff; opacity: .9; }
.sf-tpl-bar--dark { background: #0f0f1a; opacity: 1; }
.sf-tpl-hero-block { height: 44px; background: linear-gradient(135deg,#7c5cff,#a78bfa); margin: 4px; border-radius: 4px; }
.sf-tpl-hero-block--dark { background: linear-gradient(135deg,#1e1b4b,#312e81); }
.sf-tpl-rows { padding: 4px 8px; display: flex; flex-direction: column; gap: 4px; }
.sf-tpl-row { height: 8px; background: rgba(0,0,0,.12); border-radius: 4px; }
.sf-tpl-row--short { width: 60%; }
.sf-tpl-row--wide { background: rgba(255,255,255,.12); }
.sf-tpl-card__label strong { display: block; font-size: 13px; color: var(--obra-text,#f0f4ff); }
.sf-tpl-card__label span { font-size: 11px; color: var(--obra-text-muted,#8892aa); }
.sf-tpl-badge {
  position: absolute;
  top: 8px; right: 8px;
  background: #7c5cff;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: .04em;
}

/* Step 2 — Fields */
.sf-field-grid { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.sf-field { display: flex; flex-direction: column; gap: 5px; }
.sf-label { font-size: 12px; font-weight: 600; color: var(--obra-text,#f0f4ff); }
.sf-hint { font-weight: 400; color: var(--obra-text-muted,#8892aa); }
.sf-required { color: #ef4444; }
.sf-input {
  background: var(--obra-bg,#111320);
  border: 1px solid var(--obra-border,rgba(255,255,255,.1));
  border-radius: 8px;
  color: var(--obra-text,#f0f4ff);
  font-size: 14px;
  padding: 9px 12px;
  outline: none;
  transition: border-color .15s;
  width: 100%;
  box-sizing: border-box;
}
.sf-input:focus { border-color: #7c5cff; }
.sf-select { appearance: none; cursor: pointer; }

/* Step 3 — Color */
.sf-color-section { margin-bottom: 24px; }
.sf-color-swatches {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.sf-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform .12s, border-color .12s;
}
.sf-swatch:hover { transform: scale(1.15); }
.sf-swatch--selected { border-color: #fff !important; box-shadow: 0 0 0 2px #7c5cff; }
.sf-color-custom { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.sf-color-input-row { display: flex; gap: 8px; align-items: center; }
.sf-color-input-row input[type=color] { width: 40px; height: 38px; border-radius: 8px; border: 1px solid var(--obra-border,rgba(255,255,255,.1)); cursor: pointer; padding: 2px; background: var(--obra-bg,#111320); }
.sf-input--color { width: 120px; }
.sf-color-preview {
  border-radius: 10px;
  overflow: hidden;
  background: var(--obra-bg,#111320);
  border: 1px solid var(--obra-border,rgba(255,255,255,.08));
}
.sf-preview-bar { height: 8px; }
.sf-preview-body { padding: 12px 14px; display: flex; align-items: center; gap: 12px; }
.sf-preview-btn { font-size: 12px; font-weight: 600; color: #fff; padding: 7px 14px; border-radius: 6px; white-space: nowrap; }
.sf-preview-text { font-size: 12px; color: var(--obra-text-muted,#8892aa); }

/* Footer nav */
.sf-wizard-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--obra-border,rgba(255,255,255,.06));
}
.sf-back-btn { background: none; border: 1px solid var(--obra-border,rgba(255,255,255,.1)); color: var(--obra-text-muted,#8892aa); }
.sf-back-btn:hover { color: var(--obra-text,#f0f4ff); border-color: rgba(255,255,255,.2); }
.sf-next-btn, .sf-launch-btn { min-width: 120px; }

/* Success screen */
.sf-step--success { text-align: center; padding: 20px 0; }
.sf-success-icon { font-size: 56px; margin-bottom: 12px; }
.sf-step--success .sf-wizard-title { margin-bottom: 10px; }
.sf-step--success .sf-wizard-sub { margin-bottom: 24px; }

@media (max-width: 500px) {
  .sf-wizard-modal { padding: 20px 16px; }
  .sf-template-grid { grid-template-columns: 1fr; }
}

.sidebar__footer {
  margin-top: auto;
  padding: 20px 10px 12px;
  border-top: 1px solid var(--obra-border);
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--obra-text-dim);
}
.sidebar__powered { letter-spacing: .04em; }
.sidebar__powered-brand {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
  color: var(--obra-text);
  font-size: 10px;
}

/* ── Dashboard ───────────────────────────────────────── */
.dash-welcome {
  background: var(--obra-surface);
  border: 1px solid var(--obra-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.dash-welcome__title { font-size: 18px; font-weight: 700; }
.dash-welcome__sub { font-size: 13px; color: var(--obra-text-muted); margin-top: 2px; }

.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.dash-stat {
  background: var(--obra-surface);
  border: 1px solid var(--obra-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.dash-stat--accent { border-top: 3px solid var(--obra-accent); }
.dash-stat__icon { font-size: 24px; flex-shrink: 0; }
.dash-stat__val { font-size: 24px; font-weight: 800; line-height: 1; }
.dash-stat__label { font-size: 11px; color: var(--obra-text-muted); margin-top: 2px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

.dash-lower {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.dash-card {
  background: var(--obra-surface);
  border: 1px solid var(--obra-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dash-card__title { font-size: 13px; font-weight: 700; color: var(--obra-text-muted); text-transform: uppercase; letter-spacing: .06em; }

.dash-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.dash-action {
  background: var(--obra-surface-2);
  border: 1px solid var(--obra-border);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  color: var(--obra-text);
  font-size: 13px;
  font-weight: 600;
  transition: background .15s, border-color .15s;
}
.dash-action:hover { background: var(--obra-surface-3); border-color: var(--obra-accent); color: var(--obra-text); }
.dash-action__icon { font-size: 20px; }

.dash-recent-leads { display: flex; flex-direction: column; gap: 8px; }
.dash-recent-empty { font-size: 12px; color: var(--obra-text-dim); }
.dash-recent-loader { display: flex; align-items: center; justify-content: center; padding: 36px 0; }
.dash-recent-loader__ring { width: 44px; height: 44px; border: 3px solid rgba(255,255,255,.07); border-top-color: rgba(255,255,255,.55); border-radius: 50%; animation: obra-spin .9s linear infinite; }
.dash-text-btn {
  background: none; border: none; color: var(--obra-accent);
  font-size: 12px; cursor: pointer; padding: 0; font-weight: 600;
}
.dash-text-btn:hover { color: var(--obra-accent-hover); }
.dash-recent-lead {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: var(--obra-surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--obra-border);
}
.dash-recent-lead__avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
}
.dash-recent-lead__info { flex: 1; min-width: 0; }
.dash-recent-lead__name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-recent-lead__meta { font-size: 10px; color: var(--obra-text-muted); }
.dash-recent-lead__badge { font-size: 10px; font-weight: 700; border-radius: 999px; padding: 2px 8px; flex-shrink: 0; }

@media (max-width: 768px) {
  .dash-stats { grid-template-columns: 1fr 1fr; }
  .dash-lower { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .dash-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .dash-quick-actions { grid-template-columns: 1fr 1fr; }
}

/* ── Progress bar ────────────────────────────────────────────────────────── */
@keyframes obra-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
.obra-progress-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--obra-brand) 40%, #ffe96b 60%, var(--obra-brand) 80%);
  background-size: 200% 100%;
  z-index: 9999;
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s ease, opacity .3s ease;
  opacity: 0;
}
.obra-progress-bar.is-loading {
  transform: scaleX(.85); opacity: 1;
  animation: obra-shimmer 1.2s linear infinite;
}
.obra-progress-bar.is-done    { transform: scaleX(1); opacity: 0; animation: none; }

/* ── Kanban view ─────────────────────────────────────────────────────────── */
.leads-kanban {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  overflow-x: auto;
  padding: 4px 2px 16px;
  min-height: 200px;
}
.leads-kanban-col {
  flex: 1;
  min-width: 260px;
  max-width: 340px;
  background: var(--obra-surface-2);
  border: 1px solid var(--obra-border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 220px);
  overflow: hidden;
}
.leads-kanban-col__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--obra-border);
  background: var(--obra-surface-2);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  flex-shrink: 0;
}
.lk-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.lk-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--obra-text); flex: 1; }
.lk-count { font-size: 11px; font-weight: 700; background: var(--obra-accent-dim); color: var(--obra-accent-hover); border: 1px solid rgba(124,92,255,.25); border-radius: 999px; padding: 1px 8px; }

/* ── Pagination ───────────────────────────────────────────────────────────── */
.leads-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 0 4px; }
.leads-page-btn { background: var(--obra-surface-2); border: 1px solid var(--obra-border-2); color: var(--obra-text-muted); border-radius: var(--radius-sm); padding: 5px 14px; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; }
.leads-page-btn:hover:not(:disabled) { background: var(--obra-accent-dim); color: var(--obra-text); }
.leads-page-btn:disabled { opacity: .35; cursor: default; }
.leads-page-info { font-size: 12px; color: var(--obra-text-muted); }
.leads-kanban-col__body {
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.leads-kanban-col__body .lead-card { width: 100%; }
.lk-empty { text-align: center; color: var(--obra-text-dim); font-size: 12px; padding: 28px 0; }

/* ── View toggle ─────────────────────────────────────────────────────────── */
.leads-view-toggle { display: flex; gap: 2px; background: var(--obra-surface-2); border-radius: var(--radius-sm); padding: 2px; }
.leads-view-btn {
  background: none; border: none; cursor: pointer;
  color: var(--obra-text-muted); border-radius: 4px;
  padding: 5px 7px; display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.leads-view-btn:hover  { background: var(--obra-surface-3); color: var(--obra-text); }
.leads-view-btn.is-active { background: var(--obra-surface-3); color: var(--obra-accent); }

/* ── List view ───────────────────────────────────────────────────────────── */
.leads-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.leads-table th {
  text-align: left; font-size: 10px; font-weight: 700; letter-spacing: .06em;
  color: var(--obra-text-muted); text-transform: uppercase;
  padding: 8px 12px; border-bottom: 1px solid var(--obra-border);
}
.leads-table td { padding: 10px 12px; border-bottom: 1px solid var(--obra-border-2); vertical-align: middle; }
.leads-table tr { cursor: pointer; transition: background .12s; }
.leads-table tr:hover td { background: var(--obra-surface-2); }
.leads-table .lt-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
}
.leads-table .lt-name { font-weight: 600; color: var(--obra-text); }
.leads-table .lt-muted { color: var(--obra-text-muted); }
.leads-table .lt-badge { font-size: 10px; font-weight: 700; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }

/* ── Compact view ────────────────────────────────────────────────────────── */
.leads-compact { display: flex; flex-direction: column; gap: 0; }
.leads-compact-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; cursor: pointer;
  border-bottom: 1px solid var(--obra-border-2);
  transition: background .12s;
}
.leads-compact-row:hover { background: var(--obra-surface-2); }
.leads-compact-row:first-child { border-top: 1px solid var(--obra-border-2); }
.lc-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.lc-body { flex: 1; min-width: 0; }
.lc-name { font-size: 13px; font-weight: 600; }
.lc-meta { font-size: 11px; color: var(--obra-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-message { font-size: 11px; color: var(--obra-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
.lc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.lc-badge { font-size: 10px; font-weight: 700; border-radius: 999px; padding: 2px 8px; }
.lc-time  { font-size: 10px; color: var(--obra-text-muted); }

/* Clickable recent lead rows */
.dash-recent-lead { cursor: pointer; transition: background .12s; border-radius: var(--radius-sm); }
.dash-recent-lead:hover { background: var(--obra-surface-2); }

/* ── The Desk (Dashboard) ───────────────────────────── */
.desk-greeting { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; }
.desk-greeting__text { font-size: 22px; font-weight: 800; color: var(--obra-text); line-height: 1.2; }
.desk-greeting__sub { font-size: 13px; color: var(--obra-text-muted); margin-top: 3px; }

.desk-zones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.desk-zone { background: var(--obra-surface-2); border: 1px solid var(--obra-border); border-radius: var(--radius-lg); padding: 20px 16px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.desk-zone__emoji { font-size: 26px; line-height: 1; }
.desk-zone__count { font-size: 32px; font-weight: 900; color: var(--obra-accent); line-height: 1; }
.desk-zone__label { font-size: 11px; color: var(--obra-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

.desk-priority { background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.3); border-left: 3px solid #f59e0b; border-radius: var(--radius-lg); padding: 10px 16px; font-size: 13px; font-weight: 600; color: #f59e0b; margin-bottom: 12px; }
.desk-pulse { background: var(--obra-surface-2); border: 1px solid var(--obra-border); border-radius: var(--radius-lg); padding: 12px 18px; font-size: 13px; font-weight: 600; color: var(--obra-text); margin-bottom: 16px; }

/* Recent win */
.desk-win { display: flex; align-items: center; gap: 10px; background: var(--obra-surface-2); border: 1px solid var(--obra-border); border-radius: var(--radius-lg); padding: 12px 18px; margin-bottom: 24px; }
.desk-win__icon { font-size: 18px; flex-shrink: 0; }
.desk-win__text { font-size: 13px; color: var(--obra-text-muted); }
.desk-win__text strong { color: var(--obra-text); font-weight: 600; }

.desk-queue-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.desk-section-title { font-size: 11px; font-weight: 700; color: var(--obra-text-muted); text-transform: uppercase; letter-spacing: .07em; }

.desk-queue { display: flex; flex-direction: column; gap: 8px; }
.desk-queue-item { display: flex; align-items: center; gap: 12px; background: var(--obra-surface-2); border: 1px solid var(--obra-border); border-radius: var(--radius-lg); padding: 12px 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.desk-queue-item:hover { background: var(--obra-surface-3); border-color: var(--obra-accent); }
.desk-queue-item--overdue { border-color: rgba(251,113,133,.45); }
.desk-queue-item--overdue:hover { border-color: rgba(251,113,133,.8); }
.desk-queue-item__avatar { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.desk-queue-item__info { flex: 1; min-width: 0; }
.desk-queue-item__name { font-size: 13px; font-weight: 600; color: var(--obra-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.desk-queue-item__age { font-size: 11px; color: var(--obra-text-muted); margin-top: 2px; }
.desk-queue-item__overdue-badge { font-size: 10px; font-weight: 700; color: #fb7185; background: rgba(251,113,133,.12); border: 1px solid rgba(251,113,133,.3); border-radius: 999px; padding: 2px 8px; flex-shrink: 0; white-space: nowrap; }
.desk-queue-item__btn { background: var(--obra-accent-dim); border: 1px solid var(--obra-accent); color: var(--obra-accent); border-radius: var(--radius-md); font-size: 11px; font-weight: 700; padding: 5px 12px; cursor: pointer; white-space: nowrap; flex-shrink: 0; transition: background .15s; }
.desk-queue-item__btn:hover { background: var(--obra-accent); color: #000; }
.desk-queue-empty { font-size: 13px; color: var(--obra-text-muted); padding: 24px 0; text-align: center; }

/* skeleton shimmer */
@keyframes desk-shimmer { 0%,100% { opacity: .45; } 50% { opacity: .15; } }
.desk-skeleton { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--obra-surface-2); border: 1px solid var(--obra-border); border-radius: var(--radius-lg); }
.desk-skeleton__avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--obra-surface-3); flex-shrink: 0; animation: desk-shimmer 1.4s ease-in-out infinite; }
.desk-skeleton__lines { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.desk-skeleton__line { height: 11px; background: var(--obra-surface-3); border-radius: 6px; animation: desk-shimmer 1.4s ease-in-out infinite; animation-delay: .15s; }
.desk-skeleton__line--short { width: 55%; animation-delay: .3s; }

@media (max-width: 600px) {
  .desk-zones { grid-template-columns: 1fr 1fr; }
  .desk-greeting__text { font-size: 18px; }
}

/* ── Analytics Tab ──────────────────────────────────── */
.analytics-page { padding: 24px; max-width: 960px; }
.analytics-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.analytics-title { font-size: 20px; font-weight: 800; color: var(--obra-text); margin: 0; }
.analytics-filter { display: flex; gap: 4px; }
.analytics-filter__btn { background: var(--obra-surface-2); border: 1px solid var(--obra-border); border-radius: var(--radius-sm); color: var(--obra-text-muted); font-size: 12px; font-weight: 600; padding: 5px 12px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.analytics-filter__btn:hover { background: var(--obra-surface-3); color: var(--obra-text); }
.analytics-filter__btn.is-active { background: var(--obra-accent-dim); border-color: var(--obra-accent); color: var(--obra-accent); }
.analytics-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 28px; }
.analytics-stat-card { background: var(--obra-surface-2); border: 1px solid var(--obra-border); border-radius: var(--radius-md); padding: 18px 16px; }
.analytics-stat-value { font-size: 30px; font-weight: 900; color: var(--obra-accent); line-height: 1; margin-bottom: 6px; }
.analytics-stat-label { font-size: 11px; color: var(--obra-text-muted); text-transform: uppercase; letter-spacing: .06em; }
.analytics-section { margin-bottom: 28px; }
.analytics-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--obra-text-muted); margin-bottom: 10px; }
.analytics-status-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--obra-surface-3); margin-bottom: 10px; }
.analytics-status-segment { height: 100%; }
.analytics-status-legend { display: flex; gap: 16px; flex-wrap: wrap; }
.analytics-legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--obra-text-muted); }
.analytics-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.analytics-chart { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-bottom: 22px; }
.analytics-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; cursor: default; }
.analytics-bar { width: 100%; background: var(--obra-accent); border-radius: 3px 3px 0 0; opacity: .75; transition: opacity .15s; }
.analytics-bar-wrap:hover .analytics-bar { opacity: 1; }
.analytics-bar-label { font-size: 9px; color: var(--obra-text-dim); margin-top: 4px; white-space: nowrap; }
@media (max-width: 640px) { .analytics-stats { grid-template-columns: repeat(2, 1fr); } }
.analytics-funnel { display: flex; flex-direction: column; gap: 8px; }
.analytics-funnel-row { display: grid; grid-template-columns: 90px 1fr 44px; align-items: center; gap: 10px; }
.analytics-funnel-label { font-size: 12px; color: var(--obra-text-muted); text-align: right; white-space: nowrap; }
.analytics-funnel-bar-wrap { height: 28px; background: var(--obra-surface-3); border-radius: var(--radius-sm); overflow: hidden; }
.analytics-funnel-bar { height: 100%; background: var(--obra-accent); border-radius: var(--radius-sm); display: flex; align-items: center; padding: 0 10px; opacity: .8; transition: width .4s, opacity .15s; }
.analytics-funnel-bar:hover { opacity: 1; }
.analytics-funnel-count { font-size: 12px; font-weight: 700; color: #fff; white-space: nowrap; }
.analytics-funnel-rate { font-size: 12px; font-weight: 700; color: var(--obra-text-muted); text-align: right; }

/* ── Analytics — A/B Test section ──────────────────── */
.analytics-section-title { display: flex; align-items: center; gap: 8px; }
.an-ab-live-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: #4ade80; color: #0a1628; border-radius: 4px; padding: 2px 7px; }
/* Variant rows */
.an-ab-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.an-ab-row { display: flex; flex-direction: column; gap: 7px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--obra-surface-2); border: 1.5px solid transparent; transition: border-color .15s; }
.an-ab-row--active { border-color: var(--obra-accent); }
.an-ab-row__meta { display: flex; align-items: flex-start; gap: 10px; }
.an-ab-row__dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.an-ab-row__name { font-size: 13px; font-weight: 700; color: var(--obra-text); display: flex; align-items: center; gap: 7px; }
.an-ab-row__tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; border-radius: 4px; padding: 1px 6px; }
.an-ab-row__tag--desktop { background: var(--obra-accent-dim); color: var(--obra-accent); }
.an-ab-row__tag--mobile  { background: rgba(74,222,128,.15); color: #4ade80; }
.an-ab-row__tag--test    { background: rgba(251,191,36,.15); color: #fbbf24; }
.an-ab-row__desc { font-size: 11px; color: var(--obra-text-muted); margin-top: 1px; }
.an-ab-row__chart { display: flex; align-items: center; gap: 10px; }
.an-ab-row__bar-wrap { flex: 1; height: 8px; background: var(--obra-surface-3); border-radius: 99px; overflow: hidden; }
.an-ab-row__bar { height: 100%; border-radius: 99px; transition: width .4s; }
.an-ab-row__count { font-size: 12px; font-weight: 700; color: var(--obra-text-muted); white-space: nowrap; min-width: 52px; text-align: right; }
/* Split panel */
.an-ab-split-panel { background: var(--obra-surface-2); border: 1.5px solid var(--obra-border); border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 12px; }
.an-ab-split-header { display: flex; align-items: center; gap: 12px; }
.an-ab-split-header-text { display: flex; flex-direction: column; gap: 2px; }
.an-ab-split-header-text strong { font-size: 13px; color: var(--obra-text); }
.an-ab-split-header-text span { font-size: 11px; color: var(--obra-text-muted); }
.an-ab-split-body { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.an-ab-split-rows { display: flex; flex-direction: column; gap: 8px; }
.an-ab-split-row { display: grid; grid-template-columns: 9px 1fr 1fr 48px 16px; align-items: center; gap: 10px; }
.an-ab-split-dot { width: 9px; height: 9px; border-radius: 50%; display: block; }
.an-ab-split-name { font-size: 12px; font-weight: 600; color: var(--obra-text); white-space: nowrap; }
.an-ab-slider { -webkit-appearance: none; appearance: none; height: 4px; background: var(--obra-surface-3); border-radius: 99px; cursor: pointer; outline: none; }
.an-ab-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; background: var(--obra-accent); border-radius: 50%; cursor: pointer; }
.an-ab-slider::-moz-range-thumb { width: 16px; height: 16px; background: var(--obra-accent); border-radius: 50%; cursor: pointer; border: none; }
.an-ab-weight-input { width: 48px; padding: 4px 6px; background: var(--obra-surface-3); border: 1px solid var(--obra-border); border-radius: var(--radius-sm); color: var(--obra-text); font-size: 12px; font-weight: 600; text-align: center; }
.an-ab-pct { font-size: 11px; color: var(--obra-text-muted); }
.an-ab-bar-preview { height: 10px; border-radius: 99px; overflow: hidden; display: flex; background: var(--obra-surface-3); }
.an-ab-bar-seg { height: 100%; transition: flex .3s; }
.an-ab-split-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.an-ab-mobile-row { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--obra-text-muted); cursor: pointer; }
.an-ab-mobile-row input { cursor: pointer; accent-color: var(--obra-accent); }
.an-ab-total-txt { font-size: 12px; color: var(--obra-text-muted); white-space: nowrap; }
.an-ab-note { font-size: 11px; color: var(--obra-text-dim); padding-top: 2px; }

/* ── Analytics — Header layout ──────────────────────── */
.analytics-header__left { display: flex; align-items: center; gap: 16px; }

/* ── Analytics — Device filter tabs ─────────────────── */
.an-device-filter { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.an-device-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--obra-surface-2); border: 1px solid var(--obra-border);
  border-radius: var(--radius-sm); color: var(--obra-text-muted);
  font-size: 12px; font-weight: 600; padding: 5px 11px;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.an-device-btn svg { flex-shrink: 0; }
.an-device-btn:hover:not(:disabled) { background: var(--obra-surface-3); color: var(--obra-text); }
.an-device-btn.is-active { background: var(--obra-accent-dim); border-color: var(--obra-accent); color: var(--obra-accent); }
.an-device-btn--soon { opacity: .5; cursor: not-allowed; }
.an-soon-badge {
  font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  background: var(--obra-surface-3); color: var(--obra-text-dim);
  border-radius: 3px; padding: 1px 5px;
}

/* ── Analytics — Insight line ────────────────────────── */
.an-insight {
  font-size: 12px; color: var(--obra-text-muted);
  margin-bottom: 20px; min-height: 16px;
  letter-spacing: .01em;
}

/* ── Analytics — Section dividers ────────────────────── */
.an-section-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 20px 0 14px;
}
.an-section-divider::before,
.an-section-divider::after {
  content: ''; flex: 1; height: 1px;
  background: var(--obra-border);
}
.an-section-divider span {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--obra-text-dim);
  white-space: nowrap;
}

/* ── Analytics — SEO section ─────────────────────────── */
.an-seo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr repeat(3, auto);
  gap: 10px;
  margin-bottom: 12px;
}
.an-seo-card {
  background: var(--obra-surface-2); border: 1px solid var(--obra-border);
  border-radius: var(--radius-md); padding: 12px 14px;
}
.an-seo-card--sm { min-width: 130px; }
.an-seo-card__label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--obra-text-dim); margin-bottom: 5px;
}
.an-seo-card__value { font-size: 13px; color: var(--obra-text); font-weight: 500; }
.an-seo-card__value--good { color: var(--obra-success); font-weight: 700; }
.an-seo-card__value--desc { font-size: 12px; color: var(--obra-text-muted); }
.an-seo-note { font-size: 11px; color: var(--obra-text-dim); margin-top: 4px; }
@media (max-width: 700px) {
  .an-seo-grid { grid-template-columns: 1fr 1fr; }
  .an-device-filter { gap: 3px; }
  .an-device-btn { font-size: 11px; padding: 4px 8px; }
}

/* ── Presence (Settings tab) ────────────────────────── */
#presence-links-display { display: flex; flex-wrap: wrap; gap: 8px; min-height: 32px; }
.presence-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--obra-surface-3); border: 1px solid var(--obra-border); border-radius: var(--radius-md); color: var(--obra-text); font-size: 12px; font-weight: 600; padding: 6px 14px; text-decoration: none; transition: border-color .15s, background .15s; white-space: nowrap; }
.presence-btn:hover { border-color: var(--obra-accent); background: var(--obra-accent-dim); color: var(--obra-accent); }
.presence-empty { font-size: 12px; color: var(--obra-text-muted); margin: 0; }
.presence-empty .dash-text-btn { font-size: 12px; }

/* ── Signal Tab ─────────────────────────────────────── */
.signal-page { padding: 32px 40px; max-width: 1100px; width: 100%; }
.signal-layout { display: grid; grid-template-columns: 340px 1fr; gap: 40px; align-items: start; }
.signal-col-left { position: sticky; top: 24px; }
.signal-col-right { min-width: 0; }
.signal-header { margin-bottom: 28px; }
.signal-title { font-size: 20px; font-weight: 800; color: var(--obra-text); margin-bottom: 4px; }
.signal-subtitle { font-size: 13px; color: var(--obra-text-muted); margin-bottom: 14px; }
.signal-benefits-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 0; padding: 12px 16px; background: var(--obra-surface-2); border: 1px solid var(--obra-border); border-radius: var(--radius-md); }
.signal-benefit { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--obra-text-muted); padding: 0 14px; }
.signal-benefit:first-child { padding-left: 0; }
.signal-benefit-icon { font-size: 13px; }
.signal-benefit-sep { width: 1px; height: 14px; background: var(--obra-border); flex-shrink: 0; }
.signal-section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--obra-text-muted); margin-bottom: 12px; }
/* Accordion */
.signal-accordion { display: flex; flex-direction: column; gap: 8px; margin-bottom: 32px; }
.signal-accordion-item { background: var(--obra-surface-2); border: 1px solid var(--obra-border); border-radius: var(--radius-lg); overflow: hidden; }
.signal-accordion-item[open] { border-color: var(--obra-accent); }
.signal-accordion-summary { display: flex; align-items: center; gap: 10px; padding: 14px 18px; cursor: pointer; list-style: none; user-select: none; }
.signal-accordion-summary::-webkit-details-marker { display: none; }
.signal-accordion-icon { font-size: 16px; flex-shrink: 0; color: var(--obra-text-muted); display: flex; }
.signal-accordion-label { font-size: 13.5px; font-weight: 700; color: var(--obra-text); flex-shrink: 0; }
.signal-accordion-note { font-size: 12px; color: var(--obra-text-muted); flex: 1; padding-left: 4px; }
.signal-accordion-badge { flex-shrink: 0; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--obra-text-muted); background: var(--obra-surface-3); border: 1px solid var(--obra-border); border-radius: 20px; padding: 3px 10px; }
.signal-accordion-chevron { flex-shrink: 0; color: var(--obra-text-muted); transition: transform .2s ease; }
.signal-accordion-item[open] .signal-accordion-chevron { transform: rotate(180deg); }
.signal-accordion-body { padding: 0 18px 18px; }
/* Shop section header */
.signal-shop-section-header { margin-bottom: 20px; }
.signal-shop-section-title { font-size: 16px; font-weight: 800; color: var(--obra-text); margin-bottom: 4px; }
.signal-shop-section-sub { font-size: 12.5px; color: var(--obra-text-muted); }
/* DBC teaser (inside accordion) */
.signal-dbc-teaser { background: var(--obra-surface-3); border-radius: var(--radius-md); padding: 16px 18px; }
.signal-dbc-teaser__title { font-size: 13.5px; font-weight: 700; color: var(--obra-text); margin-bottom: 6px; }
.signal-dbc-teaser__desc { font-size: 12.5px; color: var(--obra-text-muted); line-height: 1.55; margin-bottom: 10px; }
.signal-dbc-teaser__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 5px; }
.signal-dbc-teaser__list li { font-size: 12px; color: var(--obra-text-muted); padding-left: 16px; position: relative; }
.signal-dbc-teaser__list li::before { content: "✓"; position: absolute; left: 0; color: var(--obra-accent); font-weight: 700; font-size: 11px; }
.signal-qr-card { background: var(--obra-surface-2); border: 1px solid var(--obra-border); border-radius: var(--radius-lg); padding: 28px 24px 20px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.signal-qr-wrap { width: 220px; height: 220px; border-radius: var(--radius-md); overflow: hidden; background: #fff; display: flex; align-items: center; justify-content: center; }
.signal-qr-img { width: 100%; height: 100%; object-fit: contain; display: none; }
.signal-qr-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; text-align: center; }
.signal-qr-placeholder span { font-size: 12px; color: var(--obra-text-muted); }
.signal-qr-domain { font-size: 13px; font-weight: 600; color: var(--obra-text-muted); letter-spacing: .02em; }
.signal-qr-actions { display: flex; gap: 10px; }
.signal-btn { display: inline-flex; align-items: center; gap: 7px; background: var(--obra-surface-3); border: 1px solid var(--obra-border); border-radius: var(--radius-md); color: var(--obra-text); font-size: 12px; font-weight: 600; padding: 8px 16px; cursor: pointer; transition: border-color .15s, background .15s; }
.signal-btn:hover { border-color: var(--obra-accent); background: var(--obra-accent-dim); color: var(--obra-accent); }
.signal-coming-soon { background: var(--obra-surface-2); border: 1px dashed var(--obra-border); border-radius: var(--radius-lg); padding: 28px 24px; display: flex; align-items: center; gap: 14px; color: var(--obra-text-muted); font-size: 13px; }
.signal-coming-soon__icon { font-size: 22px; flex-shrink: 0; }

/* ── Sidebar badge accent variant ───────────────────── */
.sidebar__badge--accent { background: var(--obra-accent-dim); color: var(--obra-accent); border: 1px solid var(--obra-accent); }

/* ── Lab Tab ─────────────────────────────────────────── */
.lab-page { padding: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.lab-header { }
.lab-title  { font-size: 20px; font-weight: 800; color: var(--obra-text); margin-bottom: 4px; }
.lab-subtitle { font-size: 13px; color: var(--obra-text-muted); }

/* ── Phone frame ─────────────────────────────────────── */
.lab-frame-wrap { display: flex; justify-content: flex-start; }
.lab-frame-wrap[hidden] { display: none !important; }
.lab-phone {
  position: relative;
  width: 295px;
  height: 620px;
  background: linear-gradient(160deg, #1c1c1e 0%, #111113 100%);
  border-radius: 44px;
  border: 2.5px solid #3a3a3c;
  box-shadow:
    0 0 0 1px #0a0a0a,
    0 28px 60px rgba(0,0,0,.6),
    inset 0 1px 0 rgba(255,255,255,.08);
  overflow: hidden;
  flex-shrink: 0;
}

/* Punch-hole camera */
.lab-phone__camera {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  background: #0a0a0a;
  border-radius: 50%;
  z-index: 20;
  box-shadow: 0 0 0 1px #222;
}

/* Screen */
.lab-phone__screen {
  position: absolute;
  inset: 0;
  border-radius: 42px;
  background: #0d1117;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Status bar */
.lab-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 22px 0;
  height: 32px;
  flex-shrink: 0;
}
.lab-status-bar__time { font-size: 11px; font-weight: 700; color: #e2e8f0; letter-spacing: .02em; }
.lab-status-bar__icons { display: flex; align-items: center; gap: 5px; color: #94a3b8; }

/* App bar */
.lab-appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 18px 8px;
  flex-shrink: 0;
}
.lab-appbar__brand {
  font-size: 18px;
  font-weight: 900;
  color: var(--obra-accent);
  letter-spacing: -.03em;
}
.lab-appbar__bell {
  position: relative;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.lab-appbar__bell:hover { background: rgba(255,255,255,.08); }
.lab-bell-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  background: var(--obra-accent);
  border-radius: 50%;
  border: 1.5px solid #0d1117;
}

/* Scroll area */
.lab-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.lab-scroll::-webkit-scrollbar { display: none; }

/* Greeting */
.lab-greeting { margin-bottom: 14px; }
.lab-greeting__text { font-size: 15px; font-weight: 700; color: #e2e8f0; line-height: 1.3; }
.lab-greeting__date { font-size: 11px; color: #64748b; margin-top: 2px; }

/* Stats row */
.lab-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}
.lab-stat {
  background: #161b27;
  border-radius: 14px;
  padding: 10px 8px;
  text-align: center;
  border: 1px solid #1e2640;
}
.lab-stat__num { font-size: 20px; font-weight: 900; line-height: 1; margin-bottom: 3px; }
.lab-stat__lbl { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #64748b; }
.lab-stat--new  .lab-stat__num { color: var(--obra-accent); }
.lab-stat--open .lab-stat__num { color: #7c5cff; }
.lab-stat--closed .lab-stat__num { color: #4ade80; }

/* Section label */
.lab-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #475569;
  margin-bottom: 8px;
}

/* Lead card */
.lab-lead-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #161b27;
  border: 1px solid #1e2640;
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.lab-lead-card:hover { background: #1a2035; border-color: #2a3354; }
.lab-lead-card:active { background: #1e2640; }
.lab-lead-card__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  color: #fff;
}
.lab-lead-card__info { flex: 1; min-width: 0; }
.lab-lead-card__name { font-size: 12px; font-weight: 700; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lab-lead-card__meta { font-size: 10px; color: #64748b; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lab-lead-card__action {
  flex-shrink: 0;
  background: var(--obra-accent-dim);
  border: 1px solid var(--obra-accent);
  color: var(--obra-accent);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.lab-lead-card__action:hover { background: var(--obra-accent); color: #000; }

/* Skeleton shimmer for lab */
@keyframes lab-shimmer { 0%,100%{opacity:.35}50%{opacity:.12} }
.lab-lead-skeleton {
  height: 54px;
  background: #161b27;
  border-radius: 14px;
  margin-bottom: 8px;
  animation: lab-shimmer 1.4s ease-in-out infinite;
}
.lab-lead-skeleton + .lab-lead-skeleton { animation-delay: .2s; }

/* Bottom nav */
.lab-bottom-nav {
  display: flex;
  background: #0f1117;
  border-top: 1px solid #1e2640;
  padding: 6px 0 2px;
  flex-shrink: 0;
}
.lab-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  color: #475569;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  padding: 4px 0;
  border-radius: 8px;
  transition: color .15s;
}
.lab-nav-item.is-active { color: var(--obra-accent); }
.lab-nav-item:not(.is-active):hover { color: #94a3b8; }

/* Home indicator */
.lab-home-bar {
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lab-home-bar::after {
  content: '';
  width: 80px;
  height: 4px;
  background: rgba(255,255,255,.25);
  border-radius: 999px;
}

/* Empty state */
.lab-empty { font-size: 11px; color: #475569; padding: 8px 0 4px; text-align: center; }

/* ── Lab device toggle ───────────────────────────────── */
/* ── Device + zoom bar ───────────────────────────────────── */
.tpl-device-zoom-bar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; margin-bottom: 20px; width: 100%;
}
.tpl-zoom-row { display: flex; gap: 3px; }
.tpl-zoom-btn {
  background: none; border: 1px solid var(--obra-border);
  border-radius: var(--radius-sm); color: var(--obra-text-muted);
  font-size: 11px; font-weight: 700; padding: 4px 10px;
  cursor: pointer; transition: border-color .15s, color .15s; line-height: 1;
}
.tpl-zoom-btn.is-active { border-color: var(--obra-accent); color: var(--obra-accent); }
.tpl-zoom-btn:hover { border-color: var(--obra-text-muted); color: var(--obra-text); }

.lab-device-toggle {
  display: flex;
  gap: 4px;
  background: var(--obra-surface-2);
  border: 1px solid var(--obra-border);
  border-radius: var(--radius-md);
  padding: 3px;
  align-self: flex-start;
}
/* Remove margin when inside zoom bar (bar handles the gap) */
.tpl-device-zoom-bar .lab-device-toggle { margin-bottom: 0; }

/* ── Zoom level overrides ────────────────────────────────── */
/* 1× — smaller */
.tpl-mobile-preview[data-zoom="1"] .tpl-phone-scale {
  transform: scale(0.55);
  margin-bottom: calc((620px * (1 - 0.55)) * -1);
}
.tpl-mobile-preview[data-zoom="1"] .tpl-ipad-scale {
  transform: scale(0.5);
  margin-bottom: calc((430px * (1 - 0.5)) * -1 - 10px);
}
.tpl-mobile-preview[data-zoom="1"] .etpl-watch {
  transform: scale(0.75); transform-origin: top center;
}
/* 2× = default (baked into .tpl-phone-scale / .tpl-ipad-scale, no override) */
/* 3× — larger */
.tpl-mobile-preview[data-zoom="3"] .tpl-phone-scale {
  transform: scale(1.0);
  margin-bottom: 0;
}
.tpl-mobile-preview[data-zoom="3"] .tpl-ipad-scale {
  transform: scale(1.0);
  margin-bottom: calc((430px * (1 - 1.0)) * -1 - 10px);
}
.tpl-mobile-preview[data-zoom="3"] .etpl-watch {
  transform: scale(1.45); transform-origin: top center;
}
.lab-device-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--obra-text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.lab-device-btn.is-active { background: var(--obra-surface-3); color: var(--obra-text); }
.lab-device-btn:not(.is-active):hover { color: var(--obra-text); }

/* ── iOS frame variant ───────────────────────────────── */
.lab-phone--ios {
  border-radius: 50px;
  border-color: #3a3a3c;
  background: linear-gradient(160deg, #1c1c1e 0%, #111113 100%);
}
/* iOS flat side buttons */
.lab-phone--ios::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 100px;
  width: 3px;
  height: 32px;
  background: #3a3a3c;
  border-radius: 3px 0 0 3px;
  box-shadow: 0 44px 0 #3a3a3c;
}
.lab-phone--ios::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 140px;
  width: 3px;
  height: 60px;
  background: #3a3a3c;
  border-radius: 0 3px 3px 0;
}
/* iOS Dynamic Island instead of punch-hole */
.lab-phone--ios .lab-phone__camera {
  width: 80px;
  height: 28px;
  border-radius: 999px;
  top: 10px;
  background: #0a0a0a;
  box-shadow: 0 0 0 1px #1a1a1a;
}
/* iOS screen rounded */
.lab-phone--ios .lab-phone__screen { border-radius: 48px; }
/* iOS status bar — no AM/PM, just centered notch spacer */
.lab-phone--ios .lab-status-bar { padding-top: 14px; }
/* iOS home bar — thicker pill */
.lab-phone--ios .lab-home-bar::after { width: 100px; height: 5px; background: rgba(255,255,255,.3); }
/* iOS bottom nav — no labels, icon-only with indicator dot */
.lab-phone--ios .lab-bottom-nav { padding-bottom: 0; }
.lab-phone--ios .lab-nav-item span { display: none; }

/* ═══════════════════════════════════════════════════════
   Mobile App Overlay  (#mobile-app / mapp-*)
   ═══════════════════════════════════════════════════════ */

#mobile-app {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  flex-direction: column;
  background: #0d0d12;
  color: #eef3ff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
}

@media (max-width: 767px) {
  body.obra-app-mode #mobile-app { display: flex; }
  body.obra-app-mode .layout,
  body.obra-app-mode .topbar { display: none !important; }
}

/* ── Status bar ─── */
.mapp-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px 4px;
  font-size: 12px;
  font-weight: 600;
  color: #8fa0c4;
  flex-shrink: 0;
}
.mapp-status__icons { display: flex; align-items: center; gap: 6px; }

/* ── App bar ─── */
.mapp-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 20px 10px;
  flex-shrink: 0;
}
.mapp-bar__brand {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.5px;
  background: linear-gradient(90deg, #9a7cff, #7c5cff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.mapp-bar__bell {
  position: relative;
  background: none;
  border: none;
  color: #8fa0c4;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}
.mapp-bar__bell:hover { color: #eef3ff; }
.mapp-bell-dot {
  position: absolute;
  top: 2px; right: 2px;
  width: 8px; height: 8px;
  background: #f87171;
  border-radius: 50%;
  border: 2px solid #0d0d12;
}

/* ── Screens ─── */
.mapp-screens {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}
.mapp-screen { padding: 4px 20px 0; }
.mapp-screen-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ── Greeting ─── */
.mapp-greeting { margin-bottom: 20px; }
.mapp-greeting__text { font-size: 20px; font-weight: 700; line-height: 1.2; }
.mapp-greeting__date { font-size: 13px; color: #8fa0c4; margin-top: 3px; }

/* ── Stats row ─── */
.mapp-stats { display: flex; gap: 10px; margin-bottom: 24px; }
.mapp-stat {
  flex: 1;
  background: #1a1a2e;
  border: 1px solid #1e2a44;
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
}
.mapp-stat__num { font-size: 26px; font-weight: 700; line-height: 1; }
.mapp-stat__lbl { font-size: 11px; color: #8fa0c4; margin-top: 4px; text-transform: uppercase; letter-spacing: .5px; }
.mapp-stat--new    .mapp-stat__num { color: #7c5cff; }
.mapp-stat--open   .mapp-stat__num { color: #fbbf24; }
.mapp-stat--closed .mapp-stat__num { color: #4ade80; }

/* ── Section label ─── */
.mapp-section-label {
  font-size: 11px;
  font-weight: 700;
  color: #4a5c7a;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 10px;
}

/* ── Lead list ─── */
.mapp-lead-list { display: flex; flex-direction: column; gap: 10px; }
.mapp-lead-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #111827;
  border: 1px solid #1e2a44;
  border-radius: 14px;
  padding: 12px 14px;
}
.mapp-lead-card__avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.mapp-lead-card__info { flex: 1; min-width: 0; }
.mapp-lead-card__name {
  font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mapp-lead-card__meta {
  font-size: 12px; color: #8fa0c4; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mapp-lead-card__action {
  background: rgba(124,92,255,.15);
  color: #9678ff;
  border: 1px solid rgba(124,92,255,.3);
  border-radius: 8px;
  font-size: 12px; font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}
.mapp-lead-card__action:hover { background: rgba(124,92,255,.25); }
.mapp-lead-card__star {
  background: transparent;
  border: none;
  color: #4b5c7a;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
.mapp-lead-card__star.is-active { color: #fbbf24; }

.mapp-leads-toolbar { display: flex; gap: 8px; align-items: center; }
.mapp-leads-toolbar .mapp-search { flex: 1; margin-bottom: 12px; }
.mapp-csv-btn {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  color: #c7d2fe;
  font-size: 13px; font-weight: 600;
  padding: 10px 12px;
  margin-bottom: 12px;
  white-space: nowrap;
  cursor: pointer;
}
.mapp-csv-btn:hover { background: rgba(255,255,255,.1); }

/* ── Skeleton shimmer ─── */
.mapp-skeleton {
  height: 64px;
  background: linear-gradient(90deg, #1a1a2e 25%, #232345 50%, #1a1a2e 75%);
  background-size: 200% 100%;
  animation: mapp-shimmer 1.4s infinite;
  border-radius: 14px;
}
@keyframes mapp-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Filter row ─── */
.mapp-search {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  font-size: 14px;
  margin-bottom: 12px;
}
.mapp-search::placeholder { color: #8fa0c4; }
.mapp-search:focus { outline: none; border-color: #7c5cff; }

.mapp-filter-row { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 2px; }
.mapp-filter-btn {
  background: #1a1a2e;
  border: 1px solid #1e2a44;
  border-radius: 20px;
  color: #8fa0c4;
  font-size: 13px; font-weight: 600;
  padding: 6px 14px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.mapp-filter-btn.is-active {
  background: rgba(124,92,255,.15);
  border-color: rgba(124,92,255,.4);
  color: #9678ff;
}

/* ── Insight cards ─── */
.mapp-insight-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 4px; }
.mapp-insight-card {
  background: #111827;
  border: 1px solid #1e2a44;
  border-radius: 14px;
  padding: 16px;
}
.mapp-insight-card__num { font-size: 28px; font-weight: 700; color: #7c5cff; }
.mapp-insight-card__lbl { font-size: 12px; color: #8fa0c4; margin-top: 4px; }

/* ── Pipeline ─── */
.mapp-pipeline { display: flex; flex-direction: column; gap: 10px; }
.mapp-pipeline-row { display: flex; align-items: center; gap: 10px; }
.mapp-pipeline-label { font-size: 12px; color: #8fa0c4; width: 72px; flex-shrink: 0; }
.mapp-pipeline-bar-wrap { flex: 1; height: 6px; background: #1a2236; border-radius: 6px; overflow: hidden; }
.mapp-pipeline-bar { height: 100%; border-radius: 6px; min-width: 4px; transition: width .4s; }
.mapp-pipeline-count { font-size: 12px; font-weight: 600; width: 20px; text-align: right; flex-shrink: 0; }

/* ── You screen ─── */
.mapp-you-avatar {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, #7c5cff, #5b3ef5);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; color: #fff;
  margin: 20px auto 12px;
}
.mapp-you-name { text-align: center; font-size: 18px; font-weight: 700; }
.mapp-you-role { text-align: center; font-size: 12px; color: #4a5c7a; margin-bottom: 24px; }
.mapp-you-actions { display: flex; flex-direction: column; gap: 10px; }
.mapp-you-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #1a1a2e;
  border: 1px solid #1e2a44;
  border-radius: 12px;
  color: #eef3ff;
  font-size: 14px; font-weight: 600;
  padding: 14px 20px;
  cursor: pointer;
  width: 100%;
}
.mapp-you-btn:hover { background: #222240; }
.mapp-you-btn--ghost { background: transparent; border-color: rgba(124,92,255,.3); color: #9678ff; }
.mapp-you-btn--ghost:hover { background: rgba(124,92,255,.08); }

.mapp-profile-card {
  background: #111827;
  border: 1px solid #1e2a44;
  border-radius: 14px;
  padding: 4px 14px;
}
#mapp-crew-form { padding: 14px; }
.mapp-input {
  width: 100%;
  background: #0b1322;
  border: 1px solid #1e2a44;
  border-radius: 10px;
  color: #eef3ff;
  font-size: 14px;
  padding: 11px 12px;
  margin-bottom: 10px;
  box-sizing: border-box;
}
.mapp-input::placeholder { color: #5f7290; }
.mapp-textarea { min-height: 70px; resize: vertical; font-family: inherit; }
#mapp-crew-form .mapp-you-btn { margin-bottom: 4px; }
.mapp-empty-note {
  color: #8fa0c4;
  font-size: 13px;
  text-align: center;
  padding: 24px 0;
}
.mapp-profile-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #1e2a44;
  font-size: 13px;
}
.mapp-profile-row:last-child { border-bottom: none; }
.mapp-profile-key { color: #8fa0c4; }
.mapp-profile-val {
  color: #eef3ff; font-weight: 600;
  text-align: right;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%;
}

.mapp-link-btn {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  color: #4a5c7a;
  font-size: 13px;
  text-align: center;
  padding: 18px 0 4px;
  cursor: pointer;
}
.mapp-link-btn:hover { color: #8fa0c4; text-decoration: underline; }

/* ── Bottom nav ─── */
.mapp-bottom-nav {
  display: flex;
  align-items: stretch;
  border-top: 1px solid #1e2a44;
  background: #0d0d12;
  flex-shrink: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.mapp-nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  background: none; border: none;
  color: #4a5c7a;
  font-size: 10px; font-weight: 600;
  padding: 10px 4px;
  cursor: pointer;
  transition: color .15s;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.mapp-nav-item.is-active { color: #7c5cff; }
.mapp-nav-item:hover { color: #9678ff; }

/* ── Home bar ─── */
.mapp-home-bar {
  height: 28px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: #0d0d12;
}
.mapp-home-bar::after {
  content: '';
  width: 120px; height: 4px;
  background: rgba(255,255,255,.2);
  border-radius: 4px;
}

/* ── Empty state ─── */
.mapp-empty { text-align: center; color: #4a5c7a; font-size: 14px; padding: 24px 0; }
.lab-phone--ios .lab-nav-item { padding: 8px 0 6px; }

/* ═══════════════════════════════════════════════════════
   Templates → Mobile App tab
   ═══════════════════════════════════════════════════════ */

.tpl-mobile-note {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(124,92,255,.08);
  border: 1px solid rgba(124,92,255,.2);
  border-radius: var(--radius-md);
  color: var(--obra-text-muted);
  font-size: 12px;
  padding: 10px 14px;
  margin-bottom: 28px;
}

.tpl-mobile-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.tpl-mobile-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.tpl-phone-scale {
  transform: scale(0.82);
  transform-origin: top center;
  margin-bottom: calc((620px * (1 - 0.82)) * -1);
}

.tpl-mobile-config {
  flex: 1;
  min-width: 260px;
  padding-top: 4px;
}

/* Color swatches */
.tpl-color-swatches { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.tpl-color-swatch {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform .15s, border-color .15s;
  flex-shrink: 0;
}
.tpl-color-swatch:hover { transform: scale(1.15); }
.tpl-color-swatch.is-active {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--obra-accent);
  transform: scale(1.1);
}

.tpl-mobile-actions { justify-content: flex-end; gap: 10px; }
.tpl-mapp-reset-btn {
  background: none;
  border: 1px solid var(--obra-border-2);
  border-radius: var(--radius-md);
  color: var(--obra-text-muted);
  font-size: 13px; font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
}
.tpl-mapp-reset-btn:hover { border-color: var(--obra-text-muted); color: var(--obra-text); }

/* Stack on narrow screens */
@media (max-width: 900px) {
  .tpl-mobile-layout { flex-direction: column; align-items: center; }
  .tpl-mobile-config { min-width: 0; width: 100%; }
  .tpl-phone-scale { margin-bottom: calc((620px * (1 - 0.82)) * -1 - 20px); }
}

/* Accent color propagation inside Templates phone preview */
#tpl-phone-frame { --tpl-accent: #7c5cff; }
#tpl-phone-frame .lab-stat--new .lab-stat__num  { color: var(--tpl-accent); }
#tpl-phone-frame .lab-appbar__brand             { color: var(--tpl-accent); }
#tpl-phone-frame .lab-nav-item.is-active        { color: var(--tpl-accent); }

/* ── Mobile App — sub-nav (Admin App | Mobile Web) ──── */
.tpl-mobile-subnav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--obra-border);
  margin-bottom: 24px;
}
.tpl-mobile-subnav__btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--obra-text-muted);
  font-size: 13px; font-weight: 600;
  padding: 8px 18px 10px;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.tpl-mobile-subnav__btn:hover { color: var(--obra-text); }
.tpl-mobile-subnav__btn.is-active { color: var(--obra-text); border-bottom-color: var(--obra-accent); }

/* ACTIVE badge — must override flex container's display inheritance */
.site-tpl-active-badge[hidden] { display: none !important; }

/* ── Mobile Web template card ────────────────────────── */
.tpl-web-template-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.tpl-web-tpl-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--obra-surface-2);
  border: 2px solid var(--obra-border);
  border-radius: var(--radius-lg);
  padding: 12px;
  cursor: pointer;
  width: 140px;
  position: relative;
  transition: border-color .15s;
}
.tpl-web-tpl-card.is-active { border-color: var(--obra-accent); }
.tpl-web-tpl-card.is-disabled { opacity: 0.38; pointer-events: none; cursor: default; }

/* ── Email template type cards ────────────────────────────── */
.tpl-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.tpl-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--obra-surface);
  border: 1.5px solid var(--obra-border);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s;
  min-width: 0;
}
.tpl-card:hover { border-color: var(--obra-accent); }
.tpl-card.is-active { border-color: var(--obra-accent); background: var(--obra-accent-dim); }
.tpl-card__icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: var(--obra-surface-2);
  color: var(--obra-text-muted);
}
.tpl-card__icon svg { width: 16px; height: 16px; }
.tpl-card__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow: hidden; }
.tpl-card__info strong { font-size: 13px; color: var(--obra-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl-card__info span { font-size: 11px; color: var(--obra-text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 480px) {
  .tpl-card-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tpl-card { padding: 10px 8px; gap: 8px; }
  .tpl-card__info span { display: none; }
}

/* ── Admin App template cards ─────────────────────────────── */
.tpl-admin-tpl-grid { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-tpl-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: var(--obra-surface); border: 1.5px solid var(--obra-border);
  border-radius: 12px; padding: 10px 8px 8px; cursor: pointer;
  transition: border-color .15s; text-align: center; width: 100px;
}
.admin-tpl-card:hover { border-color: var(--obra-accent); }
.admin-tpl-card.is-active { border-color: var(--obra-accent); }
.admin-tpl-card.is-disabled { opacity: 0.38; pointer-events: none; cursor: default; }

/* Dashboard thumbnail */
.admin-tpl-thumb {
  width: 80px; height: 58px; border-radius: 7px; background: #131929;
  overflow: hidden; display: flex; flex-direction: column; padding: 5px;
}
.admin-tpl-thumb--dashboard .admin-tpl-thumb__bar {
  height: 6px; background: #7c5cff; border-radius: 3px; margin-bottom: 5px; width: 60%;
}
.admin-tpl-thumb--dashboard .admin-tpl-thumb__stats {
  display: flex; gap: 3px; margin-bottom: 5px;
}
.admin-tpl-thumb--dashboard .admin-tpl-thumb__stats div {
  flex: 1; height: 14px; background: #1e2a40; border-radius: 3px;
}
.admin-tpl-thumb--dashboard .admin-tpl-thumb__rows div {
  height: 7px; background: #1e2a40; border-radius: 3px; margin-bottom: 3px;
}

/* Icon Menu thumbnail */
.admin-tpl-thumb--icons { gap: 4px; padding: 5px; }
.admin-tpl-thumb--icons .admin-tpl-thumb__bar {
  height: 6px; background: #7c5cff; border-radius: 3px; margin-bottom: 4px; width: 55%;
}
.admin-tpl-thumb--icons .admin-tpl-thumb__icon-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; flex: 1;
}
.admin-tpl-thumb--icons .admin-tpl-thumb__icon-grid div {
  background: #1e2a40; border-radius: 4px; aspect-ratio: 1;
}
.admin-tpl-thumb--icons .admin-tpl-thumb__icon-grid div:first-child {
  background: #7c5cff;
}

/* Brand thumbnail */
.admin-tpl-thumb--brand { padding: 0; overflow: hidden; }
.admin-tpl-thumb__brand-bar {
  height: 14px; background: var(--obra-accent, #7c5cff); width: 100%;
}
.admin-tpl-thumb__brand-cards {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 5px;
}
.admin-tpl-thumb__brand-cards div {
  height: 16px; background: #1e2a40; border-radius: 3px;
}
.tpl-web-tpl-thumb {
  width: 112px; height: 80px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
.tpl-web-tpl-thumb--dark { background: #0a0f1e; }
.tpl-web-tpl-nav { height: 12px; background: rgba(255,255,255,.06); margin-bottom: 6px; }
.tpl-web-tpl-hero { height: 28px; background: linear-gradient(135deg, rgba(124,92,255,.3), rgba(124,92,255,.1)); border-radius: 4px; margin: 0 6px 6px; }
.tpl-web-tpl-bars { padding: 0 6px; display: flex; flex-direction: column; gap: 4px; }
.tpl-web-tpl-bars div { height: 6px; background: rgba(255,255,255,.1); border-radius: 3px; }
.tpl-web-tpl-bars div:first-child { width: 80%; }
.tpl-web-tpl-info { text-align: center; }
.tpl-web-tpl-info strong { display: block; font-size: 12px; color: var(--obra-text); }
.tpl-web-tpl-info span { font-size: 11px; color: var(--obra-text-muted); }

/* ── Mobile Web phone preview (CSS-drawn public site) ── */
.tpl-web-preview {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #0a0f1e;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 8px;
  overflow: hidden;
}
.tpl-web-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 6px;
  background: rgba(10,15,30,.9);
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.tpl-web-brand { font-size: 8px; font-weight: 700; color: #eef3ff; }
.tpl-web-call {
  background: var(--tpl-web-accent, #ffaa00);
  color: #000;
  font-size: 7px; font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
}
.tpl-web-hero {
  flex-shrink: 0;
  padding: 12px 10px 10px;
  background: var(--obra-surface-2);
}
.tpl-web-eyebrow { font-size: 7px; font-weight: 700; color: var(--tpl-web-accent, #ffaa00); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 3px; }
.tpl-web-title { font-size: 10px; font-weight: 800; color: #eef3ff; line-height: 1.2; margin-bottom: 3px; }
.tpl-web-sub { font-size: 7px; color: #8fa0c4; margin-bottom: 7px; }
.tpl-web-cta {
  display: inline-block;
  background: var(--tpl-web-accent, #ffaa00);
  color: #000;
  font-size: 7px; font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
}
.tpl-web-trust {
  display: flex;
  gap: 4px;
  padding: 5px 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
  overflow: hidden;
}
.tpl-web-pill {
  background: rgba(255,255,255,.06);
  border-radius: 99px;
  font-size: 6px;
  color: #8fa0c4;
  padding: 2px 5px;
  white-space: nowrap;
}
.tpl-web-svc-label { font-size: 7px; font-weight: 700; color: var(--tpl-web-accent, #ffaa00); text-transform: uppercase; padding: 6px 10px 3px; flex-shrink: 0; }
.tpl-web-svc-list { display: flex; flex-direction: column; gap: 4px; padding: 0 10px; flex-shrink: 0; }
.tpl-web-svc { font-size: 7px; color: #eef3ff; background: rgba(255,255,255,.05); border-radius: 6px; padding: 4px 8px; }

/* ── Image Mockup Buttons & Sticky Toolbar ────────────────────────────────── */

/* Allow sticky toolbar inside Images panel */
#tab-images .panel-section { overflow: visible; }

.img-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--obra-surface);
  border-bottom: 1px solid var(--obra-border);
  border-top: 1px solid var(--obra-border);
  margin-top: -1px;
}

.img-right-controls { display: flex; align-items: center; gap: 8px; }
.img-mockup-btns {
  display: flex; gap: 4px;
  padding-left: 8px;
  border-left: 1px solid var(--obra-border);
}
.img-mockup-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--obra-surface-2);
  border: 1px solid var(--obra-border);
  border-radius: 8px;
  color: var(--obra-text-muted);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.img-mockup-btn:hover { color: var(--obra-text); border-color: var(--obra-border-2); }
.img-mockup-btn.is-active {
  background: var(--obra-accent-dim);
  border-color: rgba(124,92,255,.4);
  color: var(--obra-accent-hover);
}

/* Floating cursor tooltip */
.img-mockup-tooltip {
  position: fixed;
  z-index: 9999;
  background: #1a2236;
  color: #eef3ff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.1);
  pointer-events: none;
  opacity: 0;
  transition: opacity .12s;
  white-space: nowrap;
}
.img-mockup-tooltip.is-visible { opacity: 1; }

/* ── Preview panel header ────────────────────────────────────────────────── */
.img-mockup-panel { padding-bottom: 32px; }
.img-mock-header {
  display: flex; align-items: center;
  flex-wrap: wrap; gap: 10px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--obra-border);
  background: var(--obra-surface);
  position: sticky;
  top: 53px;
  z-index: 9;
}
.img-mock-tabs { display: flex; gap: 6px; }
.img-mock-tab {
  background: var(--obra-surface-2);
  border: 1px solid var(--obra-border);
  border-radius: 20px;
  color: var(--obra-text-muted);
  font-size: 12px; font-weight: 600;
  padding: 5px 14px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.img-mock-tab:hover { color: var(--obra-text); }
.img-mock-tab.is-active {
  background: var(--obra-accent-dim);
  border-color: rgba(124,92,255,.4);
  color: var(--obra-accent-hover);
}
.img-mock-desc { font-size: 12px; color: var(--obra-text-muted); flex: 1; }
.img-pv-close {
  background: transparent;
  border: 1px solid var(--obra-border);
  border-radius: 20px;
  color: var(--obra-text-muted);
  font-size: 12px; font-weight: 600;
  padding: 5px 14px;
  cursor: pointer;
  margin-left: auto;
  transition: color .15s, border-color .15s;
}
.img-pv-close:hover { color: var(--obra-text); border-color: var(--obra-border-2); }

/* ── Shared iframe ───────────────────────────────────────────────────────── */
.img-pv-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── Mobile stage ─────────────────────────────────────────────────────────── */
.img-pv-stage--mobile {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px 40px;
  background: radial-gradient(ellipse at 50% 0%, rgba(124,92,255,.08) 0%, transparent 70%),
              var(--obra-surface-2);
}
.img-pv-phone {
  /* Inherits lab-phone sizing: 295×620 */
}
.img-pv-phone .lab-phone__screen iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── Desktop stage ────────────────────────────────────────────────────────── */
.img-pv-stage--desktop {
  padding: 32px 20px 32px;
  background: radial-gradient(ellipse at 50% 0%, rgba(124,92,255,.06) 0%, transparent 60%),
              var(--obra-surface-2);
}
.img-pv-browser {
  background: #111827;
  border: 1.5px solid #2a3a5a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
}
.img-pv-browser__chrome {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: #1a2236;
  border-bottom: 1px solid #2a3a5a;
}
.img-pv-dots { display: flex; gap: 6px; }
.img-pv-dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,.15);
}
.img-pv-dots span:nth-child(1) { background: #ff5f57; }
.img-pv-dots span:nth-child(2) { background: #febc2e; }
.img-pv-dots span:nth-child(3) { background: #28c840; }
.img-pv-url-bar {
  flex: 1; height: 26px;
  background: rgba(255,255,255,.05);
  border-radius: 6px;
  display: flex; align-items: center;
  padding: 0 12px;
  font-size: 12px;
  color: var(--obra-text-muted);
}
.img-pv-browser__viewport {
  height: 700px;
  position: relative;
  overflow: hidden;
}
.img-pv-iframe--desktop {
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Email stage ──────────────────────────────────────────────────────────── */
.img-pv-stage--email {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px 40px;
  background: radial-gradient(ellipse at 50% 0%, rgba(124,92,255,.06) 0%, transparent 60%),
              var(--obra-surface-2);
}
.img-pv-email-wrap {
  width: min(600px, 100%);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,.5);
}
.img-pv-email-chrome {
  background: #1a2236;
  border: 1px solid #2a3a5a;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  padding: 14px 18px;
}
.img-pv-email-subject {
  font-size: 14px; font-weight: 700;
  color: var(--obra-text);
  margin-bottom: 8px;
}
.img-pv-email-meta {
  display: flex; gap: 20px; flex-wrap: wrap;
  font-size: 12px; color: var(--obra-text-muted);
}
.img-pv-email-viewport {
  background: #f7f9fc;
  height: 700px;
  overflow: hidden;
}
.img-pv-iframe--email {
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Reviews Hub ─────────────────────────────────────────────────────────── */
.rvhub-badge {
  display: inline-block;
  font-size: 10px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--obra-accent-dim);
  color: var(--obra-accent-hover);
  border: 1px solid rgba(124,92,255,.3);
  border-radius: 4px;
  padding: 1px 6px;
  vertical-align: middle;
  margin-left: 6px;
}

/* Overview bar */
.rvhub-overview {
  display: flex; align-items: center; gap: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--obra-border);
  background: var(--obra-surface-2);
  flex-wrap: wrap; gap: 4px;
}
.rvhub-stat {
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 24px;
  border-right: 1px solid var(--obra-border);
}
.rvhub-stat:last-of-type { border-right: none; }
.rvhub-stat__value { font-size: 20px; font-weight: 800; color: var(--obra-text); }
.rvhub-stat__label { font-size: 11px; color: var(--obra-text-muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }
.rvhub-preview-link { margin-left: auto; }

/* Cards */
.rvhub-card {
  padding: 20px;
  border-bottom: 1px solid var(--obra-border);
}
.rvhub-card:last-child { border-bottom: none; }
.rvhub-card--toggle-row { padding: 14px 20px; }
.rvhub-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.rvhub-toggle-row .rvhub-card__title { margin-bottom: 2px; }

/* Obra toggle switch */
.obra-toggle { position: relative; display: inline-flex; cursor: pointer; }
.obra-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.obra-toggle__track { display: inline-block; width: 40px; height: 22px; background: var(--obra-border); border-radius: 999px; transition: background .2s; flex-shrink: 0; }
.obra-toggle__track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.obra-toggle input:checked + .obra-toggle__track { background: #6366f1; }
.obra-toggle input:checked + .obra-toggle__track::after { transform: translateX(18px); }
.rvhub-card__head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.rvhub-card__title { font-size: 13px; font-weight: 700; color: var(--obra-text); margin-bottom: 14px; }
.rvhub-card__head .rvhub-card__title { margin-bottom: 0; }
.rvhub-card__hint { font-size: 11px; color: var(--obra-text-muted); }

/* Background picker */
.rvhub-bg-types { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.rvhub-bg-btn {
  background: var(--obra-surface-2);
  border: 1px solid var(--obra-border);
  border-radius: 20px;
  color: var(--obra-text-muted);
  font-size: 12px; font-weight: 600;
  padding: 5px 14px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.rvhub-bg-btn:hover { color: var(--obra-text); }
.rvhub-bg-btn.is-active {
  background: var(--obra-accent-dim);
  border-color: rgba(124,92,255,.4);
  color: var(--obra-accent-hover);
}
.rvhub-bg-value-wrap { min-height: 44px; }
.rvhub-color-input {
  width: 44px; height: 44px;
  border-radius: 8px;
  border: 1px solid var(--obra-border);
  cursor: pointer;
  padding: 2px;
  background: transparent;
}
.rvhub-bg-row { display: flex; align-items: center; gap: 12px; }
.rvhub-bg-row--url { flex-direction: column; align-items: stretch; gap: 6px; }
.rvhub-bg-row--url input { background: var(--obra-surface-2); border: 1px solid var(--obra-border); border-radius: 8px; color: var(--obra-text); font-size: 13px; padding: 8px 12px; }
.rvhub-bg-label { font-size: 12px; color: var(--obra-text-muted); }
.rvhub-bg-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.rvhub-swatch {
  width: 48px; height: 32px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color .15s, transform .1s;
}
.rvhub-swatch:hover { transform: scale(1.08); }
.rvhub-swatch.is-active { border-color: var(--obra-accent-hover); }
.rvhub-swatch--pattern { width: 56px; height: 36px; }

/* Review cards grid */
.rvhub-reviews-grid { display: flex; flex-direction: column; gap: 8px; }
.rvhub-rv-card {
  background: var(--obra-surface-2);
  border: 1px solid var(--obra-border);
  border-radius: 10px;
  overflow: hidden;
}
.rvhub-rv-card__top {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
}
.rvhub-rv-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--obra-accent-dim), rgba(124,92,255,.3));
  color: var(--obra-accent-hover);
  font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.rvhub-rv-card__meta { flex: 1; min-width: 0; }
.rvhub-rv-name { font-size: 13px; font-weight: 700; color: var(--obra-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rvhub-rv-meta { font-size: 11px; color: var(--obra-text-muted); margin-top: 1px; }
.rvhub-rv-actions { display: flex; gap: 4px; flex-shrink: 0; }
.rvhub-action-btn {
  width: 28px; height: 28px;
  background: transparent;
  border: 1px solid var(--obra-border);
  border-radius: 6px;
  color: var(--obra-text-muted);
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.rvhub-action-btn:hover { background: var(--obra-surface); color: var(--obra-text); }
.rvhub-action-btn--edit.is-active { background: var(--obra-accent-dim); color: var(--obra-accent-hover); border-color: rgba(124,92,255,.3); }
.rvhub-rv-card__fields { padding: 0 14px 14px; border-top: 1px solid var(--obra-border); padding-top: 14px; }
.rvhub-rv-card__fields .field { margin-bottom: 10px; }
.rvhub-rv-card__fields label { font-size: 11px; font-weight: 600; color: var(--obra-text-muted); text-transform: uppercase; letter-spacing: .04em; display: block; margin-bottom: 4px; }
.rvhub-rv-card__fields input,
.rvhub-rv-card__fields textarea {
  background: var(--obra-surface);
  border: 1px solid var(--obra-border);
  border-radius: 7px;
  color: var(--obra-text);
  font-size: 13px;
  padding: 7px 10px;
  width: 100%;
}
.rvhub-rv-card__fields textarea { resize: vertical; min-height: 70px; }

/* Toolkit */
.rvhub-toolkit-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.rvhub-tk-tab {
  background: var(--obra-surface-2);
  border: 1px solid var(--obra-border);
  border-radius: 20px;
  color: var(--obra-text-muted);
  font-size: 12px; font-weight: 600;
  padding: 4px 14px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.rvhub-tk-tab.is-active { background: var(--obra-accent-dim); border-color: rgba(124,92,255,.3); color: var(--obra-accent-hover); }
.rvhub-toolkit-body { display: flex; flex-direction: column; gap: 8px; }
.rvhub-toolkit-text {
  background: var(--obra-surface-2);
  border: 1px solid var(--obra-border);
  border-radius: 8px;
  color: var(--obra-text);
  font-size: 13px;
  line-height: 1.6;
  padding: 12px;
  resize: none;
  width: 100%;
  font-family: inherit;
}

/* ── Email Templates (etpl) ─────────────────────────────────────── */
.etpl-design-row { margin-bottom: 20px; }
.etpl-design-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--obra-text-muted); margin-bottom: 10px;
}
.etpl-design-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.etpl-design-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--obra-surface-2); border: 1px solid var(--obra-border);
  border-radius: 10px; padding: 10px; cursor: pointer;
  font-size: 11px; color: var(--obra-text-muted); transition: border-color .15s; width: 82px;
}
.etpl-design-card:hover { border-color: var(--obra-accent); }
.etpl-design-card.is-active { border-color: var(--obra-accent); color: var(--obra-text); }

/* Thumbnail sketches */
.etpl-thumb {
  width: 58px; height: 72px; border-radius: 6px; overflow: hidden;
  display: flex; flex-direction: column;
  background: #0a0f1c; border: 1px solid #1e2a44;
}
.etpl-thumb__header { height: 16px; background: #1a2236; flex-shrink: 0; }
.etpl-thumb__header--line { background: #0a0f1c; border-bottom: 2px solid var(--obra-accent); }
.etpl-thumb__header--accent { background: var(--obra-accent); }
.etpl-thumb__body { flex: 1; padding: 4px 5px; display: flex; flex-direction: column; gap: 3px; }
.etpl-thumb__line { height: 4px; background: #2a3142; border-radius: 2px; }
.etpl-thumb__line--short { width: 65%; }
.etpl-thumb__btn { height: 7px; border-radius: 3px; background: var(--obra-accent); width: 60%; margin-top: 2px; }
.etpl-thumb__btn--ghost { background: transparent; border: 1px solid #2a3142; }
.etpl-thumb__footer { height: 10px; background: #141b2a; flex-shrink: 0; }
.etpl-thumb--seasonal .etpl-thumb__banner {
  height: 16px; background: linear-gradient(90deg,#f97316,#eab308); flex-shrink: 0;
}
.etpl-thumb--seasonal .etpl-thumb__deal {
  height: 10px; background: #1e2d1e; border-left: 2px solid #22c55e; border-radius: 2px; margin-top: 2px;
}
.etpl-thumb--minimal { background: #fff; border-color: #ddd; }
.etpl-thumb--minimal .etpl-thumb__header--line { background: #fff; border-bottom: 2px solid #111; }
.etpl-thumb--minimal .etpl-thumb__line { background: #e5e7eb; }
.etpl-thumb--minimal .etpl-thumb__btn--ghost { border-color: #e5e7eb; }

/* View toggle */
.etpl-view-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.etpl-view-tabs { display: flex; gap: 4px; }
.etpl-view-btn {
  display: flex; align-items: center; gap: 5px;
  background: transparent; border: 1px solid var(--obra-border); border-radius: 8px;
  color: var(--obra-text-muted); font-size: 12px; font-weight: 600; padding: 6px 12px;
  cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
.etpl-view-btn:hover { border-color: var(--obra-accent); color: var(--obra-text); }
.etpl-view-btn.is-active { border-color: var(--obra-accent); color: var(--obra-accent); background: var(--obra-accent-dim); }

/* Device row */
.etpl-device-row { display: flex; gap: 4px; }
.etpl-device-btn {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; background: transparent;
  border: 1px solid var(--obra-border); border-radius: 7px;
  color: var(--obra-text-muted); cursor: pointer; transition: border-color .15s, color .15s;
}
.etpl-device-btn:hover { border-color: var(--obra-accent); color: var(--obra-text); }
.etpl-device-btn.is-active { border-color: var(--obra-accent); color: var(--obra-accent); }

/* Preview panels */
.etpl-preview-panel { margin-bottom: 20px; }
.etpl-mobile-stage { display: flex; justify-content: center; padding: 20px 0; }
.etpl-mobile-stage[hidden] { display: none !important; }

/* iPad frame */
.etpl-ipad {
  width: 600px; height: 430px; background: #1a1a1c; border-radius: 20px;
  border: 2px solid #3a3a3c; box-shadow: 0 12px 40px rgba(0,0,0,.6);
  display: flex; flex-direction: row; align-items: center;
  padding: 10px 14px 10px 12px; gap: 8px;
}
.etpl-ipad__camera { width: 8px; height: 8px; border-radius: 50%; background: #3a3a3c; flex-shrink: 0; }
.etpl-ipad__screen { flex: 1; height: 100%; background: #0a0f1e; border-radius: 4px; overflow: hidden; }
.etpl-ipad__home { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #3a3a3c; flex-shrink: 0; }

/* Shared iframe for mobile web previews */
.tpl-web-iframe { width: 100%; height: 100%; border: none; display: block; background: #0a0f1e; border-radius: 42px; clip-path: inset(0 round 42px); }
.lab-phone__screen { clip-path: inset(0 round 42px); }
.lab-phone--ios .lab-phone__screen,
.lab-phone--ios .lab-phone__screen .tpl-web-iframe { clip-path: inset(0 round 48px); border-radius: 48px; }

/* Watch frame */
.etpl-watch { display: flex; flex-direction: column; align-items: center; }
.etpl-watch__strap { width: 56px; height: 68px; background: #1c1c1e; }
.etpl-watch__strap--top { border-radius: 4px 4px 0 0; }
.etpl-watch__strap--bot { border-radius: 0 0 4px 4px; }
.etpl-watch__body {
  position: relative; width: 116px; height: 136px; background: #1c1c1e;
  border-radius: 32px; border: 2px solid #3a3a3c;
  box-shadow: 0 8px 24px rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
}
.etpl-watch__crown {
  position: absolute; right: -7px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 28px; background: #3a3a3c; border-radius: 3px;
}
.etpl-watch__screen {
  width: 92px; height: 106px; background: #000; border-radius: 22px;
  overflow: hidden; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  padding: 8px 6px 6px;
}

/* ── Mobile App — device frames ─────────────────────────────────── */
/* Icon buttons now used for device toggle (same style as lab-device-btn) */

/* iPad wireframe in admin preview */
.tpl-ipad-admin-wrap { padding: 10px 0; }
.tpl-ipad-scale { transform: scale(0.75); transform-origin: top center; margin-bottom: calc((430px * (1 - 0.75)) * -1 - 10px); }
.tpl-ipad-admin {
  display: flex;
  height: 100%;
  background: #0a0f1c;
}
.tpl-ipad-sidebar {
  width: 120px;
  flex-shrink: 0;
  background: #111827;
  border-right: 1px solid #1e2a44;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tpl-ipad-sb-brand {
  font-size: 14px;
  font-weight: 800;
  color: var(--tpl-ipad-accent, #7c5cff);
  margin-bottom: 14px;
  padding: 0 6px;
}
.tpl-ipad-sb-item {
  font-size: 11px;
  color: #64748b;
  padding: 7px 8px;
  border-radius: 8px;
}
.tpl-ipad-sb-item--active {
  background: rgba(124,92,255,.15);
  color: var(--tpl-ipad-accent, #7c5cff);
  font-weight: 600;
}
.tpl-ipad-content {
  flex: 1;
  padding: 16px;
}
.tpl-ipad-greeting { font-size: 13px; font-weight: 700; color: #e2e8f0; margin-bottom: 12px; }
.tpl-ipad-stats { display: flex; gap: 10px; margin-bottom: 14px; }
.tpl-ipad-stat {
  background: #111827;
  border: 1px solid #1e2a44;
  border-radius: 10px;
  padding: 8px 12px;
  flex: 1;
}
.tpl-ipad-stat__num { font-size: 18px; font-weight: 900; color: var(--tpl-ipad-accent, #7c5cff); }
.tpl-ipad-stat__lbl { font-size: 9px; color: #64748b; text-transform: uppercase; letter-spacing: .06em; }
.tpl-ipad-lead-rows { display: flex; flex-direction: column; gap: 6px; }
.tpl-ipad-lead-row { height: 36px; background: #111827; border: 1px solid #1e2a44; border-radius: 8px; }

/* Icon grid skin for phone preview */
.tpl-icon-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 18px 10px;
}
.tpl-icon-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 60px;
  background: #1a2236;
  border-radius: 14px;
  padding: 12px 6px 8px;
  color: #94a3b8;
}
.tpl-icon-tile--accent {
  background: #7c5cff;
  color: #fff;
}
.tpl-icon-tile span { font-size: 9px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }

/* Admin skin picker */
.tpl-admin-skin-row { margin-bottom: 18px; }
.tpl-skin-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--obra-text-muted);
  margin-bottom: 8px;
}
.tpl-skin-cards { display: flex; gap: 8px; }
.tpl-skin-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: var(--obra-surface-2);
  border: 1px solid var(--obra-border);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 11px;
  color: var(--obra-text-muted);
  transition: border-color .15s;
  width: 76px;
}
.tpl-skin-card:hover { border-color: var(--obra-accent); }
.tpl-skin-card.is-active { border-color: var(--obra-accent); color: var(--obra-text); }
.tpl-skin-thumb {
  width: 54px;
  height: 66px;
  background: #0a0f1c;
  border-radius: 5px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #1e2a44;
}
.tpl-skin-thumb__bar { height: 12px; background: #111827; flex-shrink: 0; }
.tpl-skin-thumb__stats { display: flex; gap: 3px; padding: 4px 4px 0; flex-shrink: 0; }
.tpl-skin-thumb__stats div { flex: 1; height: 14px; background: #1a2236; border-radius: 3px; }
.tpl-skin-thumb__rows { display: flex; flex-direction: column; gap: 3px; padding: 4px; }
.tpl-skin-thumb__rows div { height: 8px; background: #1a2236; border-radius: 3px; }
.tpl-skin-thumb--icons .tpl-skin-thumb__icon-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 4px;
}
.tpl-skin-thumb--icons .tpl-skin-thumb__icon-grid div {
  width: 14px;
  height: 14px;
  background: #1a2236;
  border-radius: 3px;
}
.tpl-skin-thumb--icons .tpl-skin-thumb__icon-grid div:first-child { background: #7c5cff; }

/* Mobile web — Home Screen template thumbnail */
.tpl-web-tpl-thumb--icons {
  position: relative;
  overflow: hidden;
  background: #0a0f1e;
}
.tpl-web-tpl-wallpaper {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1e1040 0%, #0a0f1e 60%, #0f1e2e 100%);
  opacity: .9;
}
.tpl-web-tpl-icon-dock {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 8px 4px;
}
.tpl-web-tpl-icon-row { display: flex; gap: 5px; justify-content: center; }
.tpl-web-icon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: rgba(255,255,255,.15);
}
.tpl-web-icon:nth-child(1) { background: rgba(124,92,255,.7); }
.tpl-web-icon:nth-child(3) { background: rgba(59,130,246,.7); }
.tpl-web-tpl-dock-bar {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 5px;
  justify-content: center;
  padding: 0 8px;
  margin-top: 4px;
}
.tpl-web-tpl-dock-bar div {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: rgba(255,255,255,.2);
}

/* ── Mobile Web iPad preview ─────────────────────────────── */
.tpl-web-ipad-preview {
  width: 100%; height: 100%; background: #0a0f1e;
  display: flex; flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif; overflow: hidden;
}
.tpl-web-ipad-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 12px; flex-shrink: 0;
  background: rgba(255,255,255,.04); border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 9px; font-weight: 700; color: #eef3ff;
}
.tpl-web-ipad-topbar span:last-child {
  font-size: 8px; font-weight: 700; padding: 1px 7px;
  border-radius: 999px; color: #000;
}
.tpl-web-ipad-hero {
  padding: 8px 12px; flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.tpl-web-ipad-title { font-size: 10px; font-weight: 800; color: #eef3ff; margin-bottom: 2px; }
.tpl-web-ipad-sub { font-size: 7.5px; color: #8fa0c4; margin-bottom: 5px; }
.tpl-web-ipad-cta-btn {
  display: inline-block; font-size: 7.5px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px; color: #000;
}
.tpl-web-ipad-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 5px; padding: 8px 12px; flex: 1; align-content: start;
}
.tpl-web-ipad-svc-item {
  background: rgba(255,255,255,.06); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 7.5px; color: #8fa0c4; padding: 6px 3px;
  text-align: center; line-height: 1.3;
}

/* ── Admin App iPad — Icon Menu skin view ────────────────── */
.tpl-ipad-icons-view {
  width: 100%; height: 100%; background: #0a0f1c;
  display: flex; flex-direction: column;
}
.tpl-ipad-icons-view[hidden] { display: none !important; }
.tpl-ipad-icons-topbar {
  padding: 9px 14px; background: #111827;
  border-bottom: 1px solid #1e2a44; flex-shrink: 0;
}
.tpl-ipad-icons-grid {
  flex: 1; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; padding: 14px; align-content: center;
}
.tpl-ipad-icon-tile {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: rgba(255,255,255,.07); border-radius: 10px;
  padding: 12px 6px 9px; font-size: 8px; font-weight: 600; color: #8fa0c4;
  line-height: 1;
}
.tpl-ipad-icon-tile--accent {
  background: var(--tpl-ipad-accent, #7c5cff); color: #fff;
}

/* ── Mobile Web phone preview — Home Screen template variant ─ */
.tpl-web-icons-grid {
  display: none;
  grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 6px 8px; flex: 1;
}
.tpl-web-icon-tile {
  background: rgba(255,255,255,.07); border-radius: 7px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 3px 4px; font-size: 5.5px; font-weight: 600; color: #8fa0c4;
  text-align: center; line-height: 1.2;
}
.tpl-web-icon-tile--accent {
  background: var(--tpl-web-accent, #ffaa00); color: #000;
}
.tpl-web-icon-tile svg { flex-shrink: 0; }
/* Icons variant — hide list sections, show icon grid */
.tpl-web-preview[data-web-tpl="icons"] .tpl-web-trust { display: none; }
.tpl-web-preview[data-web-tpl="icons"] .tpl-web-svc-label { display: none; }
.tpl-web-preview[data-web-tpl="icons"] .tpl-web-svc-list { display: none; }
.tpl-web-preview[data-web-tpl="icons"] .tpl-web-icons-grid { display: grid; }
.tpl-web-preview[data-web-tpl="icons"] .tpl-web-hero {
  background: radial-gradient(ellipse at 20% 30%, rgba(124,92,255,.25) 0%, transparent 70%),
              linear-gradient(160deg, #0d1129, #0a0f1e) !important;
}

/* ── Mobile App — device frames ─────────────────────────────────── */
/* Icon buttons now used for device toggle (same style as lab-device-btn) */

/* iPad wireframe in admin preview */
.tpl-ipad-admin-wrap { padding: 10px 0; }
.tpl-ipad-scale { transform: scale(0.52); transform-origin: top center; margin-bottom: calc((600px * (1 - 0.52)) * -1 - 10px); }
.tpl-ipad-admin {
  display: flex;
  height: 100%;
  background: #0a0f1c;
}
.tpl-ipad-sidebar {
  width: 120px;
  flex-shrink: 0;
  background: #111827;
  border-right: 1px solid #1e2a44;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tpl-ipad-sb-brand {
  font-size: 14px;
  font-weight: 800;
  color: var(--tpl-ipad-accent, #7c5cff);
  margin-bottom: 14px;
  padding: 0 6px;
}
.tpl-ipad-sb-item {
  font-size: 11px;
  color: #64748b;
  padding: 7px 8px;
  border-radius: 8px;
}
.tpl-ipad-sb-item--active {
  background: rgba(124,92,255,.15);
  color: var(--tpl-ipad-accent, #7c5cff);
  font-weight: 600;
}
.tpl-ipad-content {
  flex: 1;
  padding: 16px;
}
.tpl-ipad-greeting { font-size: 13px; font-weight: 700; color: #e2e8f0; margin-bottom: 12px; }
.tpl-ipad-stats { display: flex; gap: 10px; margin-bottom: 14px; }
.tpl-ipad-stat {
  background: #111827;
  border: 1px solid #1e2a44;
  border-radius: 10px;
  padding: 8px 12px;
  flex: 1;
}
.tpl-ipad-stat__num { font-size: 18px; font-weight: 900; color: var(--tpl-ipad-accent, #7c5cff); }
.tpl-ipad-stat__lbl { font-size: 9px; color: #64748b; text-transform: uppercase; letter-spacing: .06em; }
.tpl-ipad-lead-rows { display: flex; flex-direction: column; gap: 6px; }
.tpl-ipad-lead-row { height: 36px; background: #111827; border: 1px solid #1e2a44; border-radius: 8px; }

/* Icon grid skin for phone preview */
.tpl-icon-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 18px 10px;
}
.tpl-icon-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 60px;
  background: #1a2236;
  border-radius: 14px;
  padding: 12px 6px 8px;
  color: #94a3b8;
}
.tpl-icon-tile--accent {
  background: #7c5cff;
  color: #fff;
}
.tpl-icon-tile span { font-size: 9px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }

/* Admin skin picker */
.tpl-admin-skin-row { margin-bottom: 18px; }
.tpl-skin-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--obra-text-muted);
  margin-bottom: 8px;
}
.tpl-skin-cards { display: flex; gap: 8px; }
.tpl-skin-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: var(--obra-surface-2);
  border: 1px solid var(--obra-border);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 11px;
  color: var(--obra-text-muted);
  transition: border-color .15s;
  width: 76px;
}
.tpl-skin-card:hover { border-color: var(--obra-accent); }
.tpl-skin-card.is-active { border-color: var(--obra-accent); color: var(--obra-text); }
.tpl-skin-thumb {
  width: 54px;
  height: 66px;
  background: #0a0f1c;
  border-radius: 5px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #1e2a44;
}
.tpl-skin-thumb__bar { height: 12px; background: #111827; flex-shrink: 0; }
.tpl-skin-thumb__stats { display: flex; gap: 3px; padding: 4px 4px 0; flex-shrink: 0; }
.tpl-skin-thumb__stats div { flex: 1; height: 14px; background: #1a2236; border-radius: 3px; }
.tpl-skin-thumb__rows { display: flex; flex-direction: column; gap: 3px; padding: 4px; }
.tpl-skin-thumb__rows div { height: 8px; background: #1a2236; border-radius: 3px; }
.tpl-skin-thumb--icons .tpl-skin-thumb__icon-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 4px;
}
.tpl-skin-thumb--icons .tpl-skin-thumb__icon-grid div {
  width: 14px;
  height: 14px;
  background: #1a2236;
  border-radius: 3px;
}
.tpl-skin-thumb--icons .tpl-skin-thumb__icon-grid div:first-child { background: #7c5cff; }

/* Mobile web — Home Screen template thumbnail */
.tpl-web-tpl-thumb--icons {
  position: relative;
  overflow: hidden;
  background: #0a0f1e;
}
.tpl-web-tpl-wallpaper {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1e1040 0%, #0a0f1e 60%, #0f1e2e 100%);
  opacity: .9;
}
.tpl-web-tpl-icon-dock {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 8px 4px;
}
.tpl-web-tpl-icon-row { display: flex; gap: 5px; justify-content: center; }
.tpl-web-icon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: rgba(255,255,255,.15);
}
.tpl-web-icon:nth-child(1) { background: rgba(124,92,255,.7); }
.tpl-web-icon:nth-child(3) { background: rgba(59,130,246,.7); }
.tpl-web-tpl-dock-bar {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 5px;
  justify-content: center;
  padding: 0 8px;
  margin-top: 4px;
}
.tpl-web-tpl-dock-bar div {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: rgba(255,255,255,.2);
}

/* ── Team Tab ────────────────────────────────────────── */
.team-page { max-width: 680px; padding: 24px 0; }
.team-page__header { margin-bottom: 20px; }
.team-page__title { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: var(--obra-text); }
.team-page__subtitle { margin: 0; font-size: 13px; color: var(--obra-text-muted); }

.team-card { background: var(--obra-surface); border: 1px solid var(--obra-border); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.team-card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.team-card__label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--obra-text-muted); }

.team-members-list { display: flex; flex-direction: column; gap: 8px; }
.team-member-row { display: flex; align-items: center; gap: 12px; background: var(--obra-surface-2); border-radius: 8px; padding: 10px 12px; }
.team-member-avatar { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--obra-accent-dim, rgba(99,102,241,.18)); color: var(--obra-accent, #818cf8); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; letter-spacing: .02em; }
.team-member-info { flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.team-member-email { font-size: 13px; color: var(--obra-text); word-break: break-all; }
.team-member-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.team-role-pill { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 20px; }
.team-role-pill--admin  { background: rgba(59,130,246,.18); color: #60a5fa; }

.team-you-pill { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 20px; background: rgba(255,255,255,.07); color: var(--obra-text-muted); }

.team-status-pill { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 20px; }
.team-status-pill--pending  { background: rgba(251,191,36,.15); color: #fbbf24; }
.team-status-pill--expired  { background: rgba(248,113,113,.15); color: #f87171; }
.team-status-pill--revoked  { background: rgba(156,163,175,.12); color: #9ca3af; }

.team-revoke-btn { flex-shrink: 0; font-size: 11px; color: var(--obra-text-muted); border-color: transparent; }
.team-revoke-btn:hover { color: #f87171; background: rgba(248,113,113,.1); border-color: transparent; }

.team-invite-hint { font-size: 12px; color: var(--obra-text-muted); margin: -6px 0 12px; }
.team-invite-row { display: flex; gap: 8px; flex-wrap: wrap; }
.team-invite-row .obra-input { flex: 1; min-width: 0; }
.team-invite-status { margin-top: 8px; font-size: 12px; color: var(--obra-error); }
.team-invite-hint { font-size: 12px; color: var(--obra-text-muted); margin: -6px 0 12px; }

.team-empty, .team-loading, .team-error { margin: 0; padding: 12px 4px; font-size: 13px; color: var(--obra-text-muted); }
.team-error { color: var(--obra-error); }
.team-empty code { font-size: 11px; background: var(--obra-surface-2); padding: 1px 5px; border-radius: 4px; color: var(--obra-text); }

.btn-ghost { background: transparent; border: 1px solid var(--obra-border); color: var(--obra-text-muted); }
.btn-ghost:hover { background: var(--obra-surface-2); color: var(--obra-text); }
.btn-xs { padding: 4px 8px; font-size: 11px; }
.obra-input { width: 100%; padding: 8px 10px; background: var(--obra-surface-2); border: 1px solid var(--obra-border); border-radius: 6px; color: var(--obra-text); font-size: 13px; outline: none; }
.obra-input:focus { border-color: var(--obra-accent); }

/* ── Sidebar user chip ───────────────────────────────── */
.sidebar__user-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  background: var(--obra-surface-2);
  border-radius: 8px;
  margin: 0 10px 8px;
  min-width: 0;
}
.sidebar__user-email {
  font-size: 11px;
  color: var(--obra-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.sidebar__user-role {
  font-size: 10px;
  font-weight: 700;
  text-transform: capitalize;
  color: var(--obra-text-dim);
  letter-spacing: .04em;
}

/* ── Team role pill — tenant variant ────────────────── */
.team-role-pill--tenant,
.team-role-pill--tenant_user { background: rgba(251,191,36,.14); color: #fbbf24; }

/* ── Email template panels — fix display:flex overriding [hidden] ── */
.tpl-form-area[hidden]      { display: none !important; }
.etpl-preview-panel[hidden] { display: none !important; }
.etpl-device-row[hidden]    { display: none !important; }

/* Save button aligned right in the view-row */
.etpl-view-row { justify-content: flex-start; }
.etpl-row-save-btn { margin-left: auto; }

/* ── Obra form field helpers ────────────────────────── */
.obra-field { display: flex; flex-direction: column; gap: 5px; }
.obra-label { font-size: 12px; font-weight: 600; color: var(--obra-text-dim); }
.obra-hint  { font-weight: 400; color: var(--obra-text-muted); }
.obra-textarea { resize: vertical; min-height: 72px; }
.btn-secondary { background: transparent; color: var(--obra-text-muted); border: 1px solid var(--obra-border-2); }
.btn-secondary:hover { background: var(--obra-surface-2); color: var(--obra-text); }

/* ── Team Roster (admin editor) ─────────────────────── */
.roster-form {
  background: var(--obra-bg-inset, rgba(255,255,255,.03));
  border: 1px solid var(--obra-border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}
.roster-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  margin-bottom: 18px;
}
@media (max-width: 540px) { .roster-form__grid { grid-template-columns: 1fr; } }
.roster-form__actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.roster-photo-preview {
  margin-top: 10px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--obra-border);
}
.roster-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.roster-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.roster-member-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--obra-bg-inset, rgba(255,255,255,.03));
  border: 1px solid var(--obra-border);
  border-radius: 10px;
  padding: 12px 16px;
}
.roster-member-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.roster-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
.roster-avatar--initials {
  background: var(--obra-accent-dim, rgba(99,102,241,.2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: var(--obra-accent);
  letter-spacing: -.01em;
}
.roster-member-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.roster-member-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--obra-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.roster-member-title {
  font-size: 12px;
  color: var(--obra-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.roster-member-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.roster-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.roster-badge--live    { background: rgba(34,197,94,.15);  color: #22c55e; }
.roster-badge--hidden  { background: rgba(156,163,175,.1); color: #9ca3af; }
.roster-profile-link {
  font-size: 11px;
  font-weight: 600;
  color: var(--obra-accent);
  text-decoration: none;
}
.roster-profile-link:hover { text-decoration: underline; }
.roster-edit-btn { font-size: 12px; }

/* ── Sidebar accordion ──────────────────────────────────────────── */
.sidebar__group-children {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding-left: 10px;
  margin-top: 2px;
}
.sidebar__group.is-open > .sidebar__group-children {
  display: flex;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-md);
  padding: 4px 0 4px 10px;
  margin-top: 2px;
}
.sidebar__item--child { padding-left: 10px; font-size: 12.5px; }
.sidebar__item--child .sidebar__icon { width: 16px; height: 16px; }
.sidebar__chevron {
  margin-left: auto;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  color: var(--obra-text-dim);
  flex-shrink: 0;
}
.sidebar__group.is-open > .sidebar__item > .sidebar__chevron { transform: rotate(90deg); }
.sidebar__group.has-active-child > .sidebar__item { color: var(--obra-text); }
.sidebar__divider { height: 1px; background: var(--obra-border); margin: 6px 4px; opacity: 0.5; }

/* ── Templates sidenav ──────────────────────────────────────────── */
.tpl-layout { display: flex; height: 100%; }
.tpl-sidenav {
  width: 170px;
  flex-shrink: 0;
  border-right: 1px solid var(--obra-border);
  padding: 20px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: width .18s ease;
}
.tpl-sidenav__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--obra-text-dim);
  padding: 0 10px 8px;
  background: none;
  border: none;
  cursor: pointer;
}
.tpl-sidenav__chevron {
  flex-shrink: 0;
  transition: transform .18s ease;
}
.tpl-sidenav__label[aria-expanded="false"] .tpl-sidenav__chevron {
  transform: rotate(-90deg);
}
.tpl-sidenav__group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.tpl-sidenav.is-collapsed {
  width: 48px;
}
.tpl-sidenav.is-collapsed .tpl-sidenav__label > span:not(.tpl-sidenav__chevron),
.tpl-sidenav.is-collapsed .tpl-sidenav__item > span {
  display: none;
}
.tpl-sidenav.is-collapsed .tpl-sidenav__label {
  justify-content: center;
  padding: 0 0 8px;
}
.tpl-sidenav.is-collapsed .tpl-sidenav__item {
  justify-content: center;
  padding: 8px;
}
.tpl-sidenav__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--obra-text-muted);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.tpl-sidenav__item svg { flex-shrink: 0; }
.tpl-sidenav__item:hover { background: var(--obra-surface-2); color: var(--obra-text); }
.tpl-sidenav__item.is-active { background: var(--obra-accent-dim); color: var(--obra-text); font-weight: 600; }
.tpl-sidenav__divider { height: 1px; background: var(--obra-border); margin: 8px 0; }
.tpl-content { flex: 1; overflow-y: auto; padding: 24px; }

/* ── Lab — App Store submission ─────────────────────────────────── */
.lab-store-section { width: 100%; max-width: 400px; }
.lab-store-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.lab-store-section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--obra-text-muted); }
.lab-store-chip { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(124,92,255,.15); color: #7c5cff; letter-spacing: .04em; text-transform: uppercase; }
.lab-store-card { background: var(--obra-surface-2); border: 1px solid var(--obra-border); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.lab-store-preview { display: flex; align-items: center; gap: 14px; }
.lab-store-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--obra-accent-dim); border: 1px solid var(--obra-border); display: flex; align-items: center; justify-content: center; color: var(--obra-accent); flex-shrink: 0; }
.lab-store-app-name { font-size: 14px; font-weight: 700; color: var(--obra-text); }
.lab-store-app-cat { font-size: 11px; color: var(--obra-text-muted); margin-top: 2px; }
.lab-store-stars { display: flex; gap: 2px; color: var(--obra-accent); margin-top: 5px; }
.lab-store-checklist { display: flex; flex-direction: column; gap: 7px; }
.lab-store-check { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.lab-store-check--done { color: #4ade80; }
.lab-store-check--pending { color: var(--obra-text-muted); }
.lab-store-badges { display: flex; gap: 8px; }
.lab-store-badge { display: flex; align-items: center; gap: 7px; background: var(--obra-surface-3); border: 1px solid var(--obra-border); border-radius: var(--radius-md); padding: 7px 14px; font-size: 12px; font-weight: 600; color: var(--obra-text-muted); opacity: .55; }
.lab-store-submit-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 10px; border-radius: var(--radius-md); background: var(--obra-accent-dim); border: 1px solid var(--obra-accent); color: var(--obra-accent); font-size: 13px; font-weight: 700; cursor: not-allowed; opacity: .45; }

/* ── Signal — QR destination editor ────────────────────────────── */
.signal-qr-destination { width: 100%; display: flex; flex-direction: column; gap: 7px; }
.signal-qr-dest-label { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--obra-text-muted); }
.signal-qr-dest-row { display: flex; align-items: center; background: var(--obra-surface-3); border: 1px solid var(--obra-border); border-radius: var(--radius-md); overflow: hidden; }
.signal-qr-dest-scheme { padding: 0 8px 0 12px; font-size: 12px; color: var(--obra-text-muted); white-space: nowrap; }
.signal-qr-dest-input { flex: 1; background: transparent; border: none; outline: none; color: var(--obra-text); font-size: 13px; font-weight: 600; padding: 9px 0; min-width: 0; }
.signal-btn--sm { padding: 6px 12px; font-size: 11px; margin: 4px; border-radius: 6px; }
.signal-qr-dest-note { display: flex; align-items: flex-start; gap: 6px; font-size: 11px; color: var(--obra-text-dim); line-height: 1.5; }

/* ── Website hub (landing for the Website tab) ───────────────────── */
.website-hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 8px; }

/* ── Website Setup Section ── */
.website-setup-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 8px; }
@media (max-width: 700px) { .website-setup-grid { grid-template-columns: 1fr; } }

.website-setup-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  background: var(--obra-surface-2); border: 1px solid var(--obra-border);
  border-radius: var(--radius-lg); padding: 20px; cursor: pointer;
  text-align: left; transition: border-color .15s, transform .15s, box-shadow .15s;
  position: relative;
}
.website-setup-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.website-setup-card__icon { font-size: 1.75rem; }
.website-setup-card__body { display: flex; flex-direction: column; gap: 4px; }
.website-setup-card__body strong { font-size: 0.95rem; font-weight: 700; color: #fff; }
.website-setup-card__body span { font-size: 0.8rem; color: #b0b8c8; line-height: 1.4; }
.website-setup-card__badge {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 99px;
  background: rgba(124,58,237,.2); color: #a78bfa; text-transform: uppercase; letter-spacing: .06em;
}
.website-setup-card__badge--new { background: rgba(16,185,129,.15); color: #34d399; }

/* Setup panels */
.website-setup-panel {
  margin-top: 16px; background: var(--obra-surface-2); border: 1px solid var(--obra-border);
  border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.wsp-header { display: flex; align-items: center; justify-content: space-between; }
.wsp-header strong { font-size: 0.95rem; font-weight: 700; color: #fff; }
.wsp-close { background: none; border: none; color: var(--text-muted); font-size: 1rem; cursor: pointer; padding: 2px 6px; border-radius: 4px; }
.wsp-close:hover { color: #fff; }
.wsp-hint { font-size: 0.82rem; color: #b0b8c8; line-height: 1.5; margin: 0; }
.wsp-hint code { background: rgba(255,255,255,.07); padding: 1px 5px; border-radius: 4px; font-size: 0.8rem; }
.wsp-dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  border: 2px dashed var(--obra-border); border-radius: 10px; padding: 28px 20px;
  cursor: pointer; transition: border-color .15s; text-align: center;
}
.wsp-dropzone:hover, .wsp-dropzone.is-over { border-color: var(--accent); }
.wsp-dropzone__icon { font-size: 2rem; }
.wsp-dropzone__label { font-size: 0.875rem; color: #b0b8c8; }
.wsp-dropzone__sub { font-size: 0.78rem; color: var(--accent); font-weight: 600; min-height: 1em; }
.wsp-url-row { display: flex; gap: 10px; }
.wsp-input {
  flex: 1; background: var(--obra-surface-3,#0f0f1e); border: 1px solid var(--obra-border);
  border-radius: 8px; padding: 0.6rem 0.9rem; color: #fff; font-size: 0.9rem;
}
.wsp-input:focus { outline: none; border-color: var(--accent); }
.wsp-status { font-size: 0.85rem; padding: 10px 14px; border-radius: 8px; }
.wsp-status.is-success { background: rgba(16,185,129,.12); color: #34d399; }
.wsp-status.is-error   { background: rgba(248,113,113,.1);  color: #f87171; }
.wsp-status.is-loading { background: rgba(255,255,255,.05); color: #b0b8c8; }
.website-hub-card {
  display: flex; align-items: center; gap: 14px; text-align: left;
  background: var(--obra-surface-2); border: 1px solid var(--obra-border); border-radius: var(--radius-lg);
  padding: 18px; cursor: pointer; transition: border-color .15s ease, transform .15s ease;
  font: inherit; color: inherit;
}
.website-hub-card:hover:not([disabled]) { border-color: var(--obra-accent); transform: translateY(-1px); }
.website-hub-card[disabled] { opacity: .55; cursor: default; }
.website-hub-card__icon { font-size: 28px; line-height: 1; flex-shrink: 0; }
.website-hub-card__body { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.website-hub-card__body strong { font-size: 15px; }
.website-hub-card__body span { font-size: 12.5px; color: var(--obra-text-muted); line-height: 1.4; }
.website-hub-card__badge {
  flex-shrink: 0; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 4px 9px; border-radius: 999px; background: var(--obra-surface-3); color: var(--obra-text-muted);
}
.website-hub-card__badge.is-live { background: rgba(34, 197, 94, .16); color: #22c55e; }
.website-editor__back {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  background: none; border: none; color: var(--obra-text-muted); cursor: pointer; margin-bottom: 16px; padding: 4px 0;
}
.website-editor__back:hover { color: var(--obra-text); }

.website-editor-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.website-editor-toolbar .website-editor-modes { margin-bottom: 0; }
@media (max-width: 480px) { .data-save-label { display: none; } }
.website-editor-modes { display: inline-flex; gap: 4px; background: var(--obra-surface-2); border: 1px solid var(--obra-border); border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.website-mode-pill { font-size: 13px; font-weight: 600; padding: 7px 18px; border-radius: 999px; border: none; background: transparent; color: var(--obra-text-muted); cursor: pointer; transition: background .15s ease, color .15s ease; }
.website-mode-pill:hover:not([disabled]):not(.is-active) { color: var(--obra-text); }
.website-mode-pill.is-active { background: var(--obra-accent); color: #111; }
.website-mode-pill[disabled] { opacity: .4; cursor: default; }
.mode-pill-badge {
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 6px; border-radius: 999px; margin-left: 4px; background: var(--obra-surface-3); color: var(--obra-text-muted);
}
.website-mode-pill.is-active .mode-pill-badge { background: rgba(0,0,0,.15); color: inherit; }
.website-editor-mode-status {
  font-size: 11px; font-weight: 600; color: var(--obra-text-muted);
  background: var(--obra-surface-3); border-radius: 999px; padding: 5px 12px; margin-left: 4px;
}
.website-editor-mode-status.is-developer { color: var(--obra-accent); }

#website-editor-design { position: relative; }
.obra-gjs-loading {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 15, 30, .55); color: var(--obra-text-muted);
  font-size: 13px; font-weight: 600;
}
.obra-gjs-loading[hidden] { display: none; }

.website-design-view[hidden] { display: none; }
.website-design-view { display: flex; flex-direction: column; gap: 12px; }
.website-design-hint {
  margin: 0; font-size: 12.5px; color: var(--obra-text-muted);
}
.website-design-preview {
  position: relative; border: 1px solid var(--obra-border); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--obra-surface-2); height: 80vh;
}
.website-design-iframe { width: 100%; height: 100%; border: none; display: block; background: #0d1117; }

.website-design-overlay-host { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
@keyframes obra-marker-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124, 92, 255, 0); }
  50% { box-shadow: 0 0 0 6px rgba(124, 92, 255, .35); }
}
.image-slot.is-marker-highlight,
.is-marker-highlight {
  border-color: var(--obra-accent);
  animation: obra-marker-pulse 0.8s ease-in-out 2;
}

.website-design-save {
  flex-shrink: 0;
  background: var(--obra-accent); color: #1a1300; border: none; border-radius: 999px;
  font-size: 13px; font-weight: 700; padding: 10px 20px; cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,.25); transition: transform .12s ease, opacity .12s ease;
}
.website-design-save:hover { transform: translateY(-1px); }
.website-design-save[hidden] { display: none; }

.website-design-fullscreen-btn {
  position: absolute; top: 10px; right: 10px; z-index: 4;
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: rgba(13,17,23,.75); border: 1px solid var(--obra-border);
  border-radius: var(--radius-sm); color: var(--obra-text-muted);
  font-size: 15px; cursor: pointer; opacity: 0; transition: opacity .15s ease;
}
.website-design-preview:hover .website-design-fullscreen-btn,
.website-design-preview.is-fullscreen .website-design-fullscreen-btn { opacity: 1; }
.website-design-fullscreen-btn:hover { color: var(--obra-text); background: rgba(13,17,23,.95); }
.website-design-preview:fullscreen,
.website-design-preview:-webkit-full-screen { border-radius: 0; height: 100vh; border: none; }
.website-design-preview:fullscreen .website-design-overlay-host,
.website-design-preview:-webkit-full-screen .website-design-overlay-host { z-index: 3; }

#website-landing { display: flex; flex-direction: column; gap: 20px; }
#website-landing[hidden] { display: none; }
#website-landing .panel-section { overflow: visible; }
#website-landing .website-hub-grid,
#website-landing .website-control-grid { padding: 6px 20px 20px; }
.website-control-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 16px; }
.website-control-card { background: var(--obra-surface-2); border: 1px solid var(--obra-border); border-radius: var(--radius-lg); padding: 22px 20px; display: flex; flex-direction: column; gap: 14px; }
.website-control-card h3 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--obra-text-muted); text-transform: uppercase; }
.website-control-card__hint { margin: 0; font-size: 12.5px; color: var(--obra-text-muted); line-height: 1.5; }
.website-status-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--obra-surface-3); color: var(--obra-text-muted); }
.status-pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--obra-text-muted); flex-shrink: 0; }
.status-pill.is-checking .status-pill__dot { background: #f59e0b; }
.status-pill.is-live { background: rgba(34, 197, 94, .16); color: #22c55e; }
.status-pill.is-live .status-pill__dot { background: #22c55e; }
.status-pill.is-down { background: rgba(239, 68, 68, .16); color: #ef4444; }
.status-pill.is-down .status-pill__dot { background: #ef4444; }
.website-visit-stats { display: flex; gap: 28px; }
.website-visit-stat { display: flex; flex-direction: column; gap: 4px; }
.website-visit-stat strong { font-size: 28px; font-weight: 700; line-height: 1; }

.website-visit-stat span { font-size: 11px; color: var(--obra-text-muted); text-transform: uppercase; letter-spacing: .06em; }

/* ── Leads Hub ───────────────────────────────────────── */
.leads-hub { padding: 28px 0 40px; max-width: 900px; }
.leads-hub__header { margin-bottom: 24px; }
.leads-hub__title { margin: 0 0 4px; font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: -.01em; }
.leads-hub__subtitle { margin: 0; font-size: 13px; color: var(--text-muted); }

.leads-hub__quickstats {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface-3) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  margin-bottom: 32px;
  overflow: hidden;
}
.leads-hub__qs-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  padding: 24px 20px;
  position: relative;
}
.leads-hub__qs-item:first-child { border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.leads-hub__qs-divider { width: 1px; background: var(--border); flex: 0 0 auto; align-self: stretch; }
.leads-hub__qs-count { font-size: 36px; font-weight: 900; color: var(--text); line-height: 1; letter-spacing: -.02em; }
.leads-hub__qs-count--new { color: #4ade80; text-shadow: 0 0 24px rgba(74,222,128,.35); }
.leads-hub__qs-label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); font-weight: 600; }

.leads-hub__section-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.leads-hub__section-link {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  letter-spacing: 0;
  text-transform: none;
}
.leads-hub__section-link:hover { text-decoration: underline; }

/* Leads activation banner — shown for new tenants with no real leads */
.leads-activation-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #1e1040 0%, #0f0f1e 100%);
  border: 1px solid #7c3aed44;
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 24px;
}
.leads-activation-banner__icon { font-size: 1.75rem; flex-shrink: 0; }
.leads-activation-banner__body { flex: 1; }
.leads-activation-banner__title { font-weight: 700; color: #fff; font-size: 0.95rem; margin-bottom: 4px; }
.leads-activation-banner__desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.4; }
.leads-activation-banner__btn {
  flex-shrink: 0;
  background: #7c3aed;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.leads-activation-banner__btn:hover { background: #6d28d9; }
@media (max-width: 600px) {
  .leads-activation-banner { flex-wrap: wrap; }
  .leads-activation-banner__btn { width: 100%; text-align: center; }
}

.leads-hub__sources {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}
.leads-source-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: default;
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
  text-align: left;
  width: 100%;
  min-height: 110px;
}
.leads-source-card--active {
  cursor: pointer;
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--surface-2) 0%, rgba(255,170,0,.04) 100%);
  box-shadow: 0 0 0 1px rgba(255,170,0,.12), 0 4px 16px rgba(0,0,0,.2);
}
.leads-source-card--active:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(255,170,0,.25), 0 8px 24px rgba(0,0,0,.3);
}
.leads-source-card--soon { opacity: .5; }
.leads-source-card--add  { opacity: .4; border-style: dashed; }
.leads-source-card__icon { font-size: 24px; line-height: 1; }
.leads-source-card__body { flex: 1 1 auto; min-width: 0; }
.leads-source-card__name { font-size: 14px; font-weight: 700; color: #fff; }
.leads-source-card__meta { font-size: 12px; color: #b0b8c8; margin-top: 3px; }
.leads-source-card__footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.leads-source-card__badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  background: rgba(74,222,128,.15);
  color: #4ade80;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.leads-source-card__badge--soon {
  background: var(--surface-3);
  color: var(--text-muted);
}
.leads-source-card__arrow { color: var(--accent); font-size: 16px; font-weight: 700; }
.leads-source-card--prospect { cursor: pointer; }
.leads-source-card__badge--prospect { background: rgba(99,179,237,.15); color: #63b3ed; }

/* ── Prospect Finder Panel ── */
.prospect-panel { background: #1a2236; border: 1px solid #2a3a58; border-radius: 14px; padding: 20px 24px; margin-bottom: 24px; }
.prospect-panel__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.prospect-panel__title { font-size: 15px; font-weight: 700; color: #eef3ff; }
.prospect-panel__close { background: none; border: none; color: #8fa0c4; cursor: pointer; font-size: 18px; padding: 2px 6px; border-radius: 4px; transition: color .12s; line-height: 1; }
.prospect-panel__close:hover { color: #eef3ff; }
.prospect-panel__form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 20px; }
.prospect-panel__field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 200px; }
.prospect-panel__label { font-size: 11px; font-weight: 700; color: #8fa0c4; text-transform: uppercase; letter-spacing: .07em; }
.prospect-panel__input {
  background: #0f172a;
  border: 1.5px solid #2a3a58;
  border-radius: 8px;
  color: #eef3ff;
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  min-width: 0;
  width: 100%;
}
.prospect-panel__input:focus { border-color: #7c5cff; box-shadow: 0 0 0 3px rgba(124,92,255,.15); }
.prospect-panel__input::placeholder { color: #4a5c7a; }
.prospect-panel__results-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.prospect-panel__results-count { font-size: 13px; color: var(--text-muted); }
.prospect-panel__table-wrap { overflow-x: auto; }
.prospect-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.prospect-table th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); padding: 6px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.prospect-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); color: #d4d9e4; vertical-align: middle; }
.prospect-table tbody tr:hover td { background: var(--surface-3); }
.prospect-table td:last-child { white-space: nowrap; }
.prospect-table__name { font-weight: 600; color: #fff; }
.prospect-table__address { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.prospect-table__add-btn { font-size: 12px; padding: 4px 12px; border-radius: 99px; background: rgba(255,170,0,.12); color: var(--accent); border: 1px solid rgba(255,170,0,.3); cursor: pointer; font-weight: 600; transition: background .12s, border-color .12s; white-space: nowrap; }
.prospect-table__add-btn:hover { background: rgba(255,170,0,.22); border-color: rgba(255,170,0,.6); }
.prospect-table__add-btn[disabled] { opacity: .45; cursor: default; }
.prospect-panel__empty, .prospect-panel__loading, .prospect-panel__error { text-align: center; padding: 24px 0; font-size: 14px; color: var(--text-muted); }
.prospect-panel__error { color: #f87171; }

.leads-hub__agents {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
}
.leads-agent-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.leads-agent-row:last-child { border-bottom: none; }
.leads-agent-row:hover { background: var(--surface-3); }
.leads-agent-row__icon { font-size: 20px; flex: 0 0 auto; }
.leads-agent-row__name { font-size: 14px; font-weight: 700; color: var(--text); flex: 0 0 auto; }
.leads-agent-row__status { font-size: 12.5px; color: var(--text-muted); }
.leads-agent-row__drafts { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--accent); }

.leads-kanban-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-muted);
}
.leads-back-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.leads-back-btn:hover { text-decoration: underline; }
.leads-kanban-breadcrumb__source { color: var(--text); font-weight: 500; }

@media (max-width: 640px) {
  .leads-hub__sources { grid-template-columns: 1fr; }
  .leads-hub__quickstats { padding: 12px 16px; }
  .leads-hub__qs-count { font-size: 22px; }
}

/* ── Desk Apps quick-launch ──────────────────────────── */
.desk-apps { display: flex; flex-direction: column; gap: 8px; }
.desk-apps__label { font-size: 11px; font-weight: 700; color: var(--obra-text-muted); text-transform: uppercase; letter-spacing: .07em; }
.desk-apps__row { display: flex; flex-wrap: wrap; gap: 8px; }
.desk-app-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 14px; border-radius: 10px; border: 1.5px solid var(--obra-border); background: var(--obra-surface); cursor: pointer; min-width: 64px; transition: border-color .15s, background .15s; }
.desk-app-tile:hover { border-color: var(--obra-accent); background: var(--obra-surface-2); }
.desk-app-tile__icon { font-size: 22px; line-height: 1; }
.desk-app-tile__label { font-size: 10px; font-weight: 600; color: var(--obra-text-muted); white-space: nowrap; }

/* ── Apps Marketplace tab ────────────────────────────────────────────────── */
.apps-page { padding: 24px; max-width: 720px; }
.apps-header { margin-bottom: 20px; }
.apps-title { font-size: 20px; font-weight: 700; color: var(--obra-text, var(--text)); margin-bottom: 4px; }
.apps-subtitle { font-size: 13px; color: var(--obra-muted, var(--muted)); }
.apps-loading, .apps-error, .apps-empty { font-size: 13px; color: var(--obra-muted, var(--muted)); margin: 0 0 16px; }
.apps-error { color: #f87171; }
.apps-grid { display: grid; gap: 10px; }
.apps-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; background: var(--obra-surface-2, var(--surface)); border: 1px solid var(--obra-border, var(--border)); transition: border-color .15s; }
.apps-card:hover { border-color: rgba(124,92,255,.4); }
.apps-card__icon { font-size: 26px; line-height: 1; flex-shrink: 0; width: 38px; text-align: center; }
.apps-card__body { flex: 1; min-width: 0; }
.apps-card__name { font-size: 14px; font-weight: 600; color: var(--obra-text, var(--text)); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.apps-card__tagline { font-size: 12px; color: var(--obra-muted, var(--muted)); margin-top: 2px; }
.apps-plan-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 8px; background: rgba(255,255,255,.07); color: var(--obra-muted, var(--muted)); border: 1px solid var(--obra-border, var(--border)); }
.apps-plan-badge--pro { background: rgba(124,92,255,.12); color: #a78bfa; border-color: rgba(124,92,255,.3); }
.apps-plan-badge--enterprise { background: rgba(251,191,36,.1); color: #fbbf24; border-color: rgba(251,191,36,.3); }
.apps-badge--new { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 8px; background: rgba(74,222,128,.15); color: #4ade80; border: 1px solid rgba(74,222,128,.35); }
.apps-card--flash { animation: apps-card-flash 1.6s ease-out; }
@keyframes apps-card-flash {
  0%, 100% { box-shadow: none; border-color: var(--obra-border, var(--border)); }
  20% { box-shadow: 0 0 0 3px rgba(124,92,255,.35); border-color: rgba(124,92,255,.6); }
}
.apps-card__btn { flex-shrink: 0; padding: 8px 18px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: background .15s, color .15s, opacity .15s; white-space: nowrap; }
.apps-card__btn--install { background: var(--obra-accent, #7c5cff); color: #fff; border-color: var(--obra-accent, #7c5cff); }
.apps-card__btn--install:hover { opacity: .85; }
.apps-card__btn--installed { background: rgba(32,227,178,.1); color: #20e3b2; border-color: rgba(32,227,178,.3); }
.apps-card__btn--installed:hover { background: rgba(255,80,80,.1); color: #f87171; border-color: rgba(255,80,80,.3); }
.apps-card__btn:disabled { opacity: .5; cursor: default; }
@media (max-width: 540px) {
  .apps-page { padding: 16px; }
  .apps-card { flex-wrap: wrap; }
  .apps-card__btn { width: 100%; text-align: center; margin-top: 6px; }
}

/* ── Apps card installed state ───────────────────────────────────────────── */
.apps-card--installed { border-color: rgba(32,227,178,.2); }
.apps-card__actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.apps-card__active-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #20e3b2; margin-left: 4px; vertical-align: middle; }
.apps-card__btn--open { background: var(--obra-accent, #7c5cff); color: #fff; border-color: var(--obra-accent, #7c5cff); padding: 7px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid transparent; white-space: nowrap; transition: opacity .15s; }
.apps-card__btn--open:hover { opacity: .85; }
.apps-card__btn--uninstall { background: none; border: none; color: rgba(248,113,113,.6); font-size: 11px; font-weight: 500; cursor: pointer; padding: 4px 6px; border-radius: 6px; white-space: nowrap; transition: color .15s; }
.apps-card__btn--uninstall:hover { color: #f87171; }
@media (max-width: 540px) {
  .apps-card__actions { flex-direction: column; align-items: stretch; width: 100%; margin-top: 6px; }
  .apps-card__btn--open { text-align: center; }
}

/* ── AI Reply ──────────────────────────────────────────────── */
.ar-wrap { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.ar-tones-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.ar-tones { display: flex; flex-wrap: wrap; gap: 8px; }
.ar-tone-btn { padding: 6px 14px; border-radius: 20px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font-size: 13px; cursor: pointer; transition: border-color .15s, background .15s; }
.ar-tone-btn:hover { border-color: var(--obra-accent, #7c5cff); }
.ar-tone-btn.is-active { border-color: var(--obra-accent, #7c5cff); background: var(--obra-accent, #7c5cff); color: #fff; }
.ar-label { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: -6px; }
.ar-input, .ar-output { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font-size: 14px; resize: vertical; font-family: inherit; line-height: 1.5; }
.ar-input:focus, .ar-output:focus { outline: none; border-color: var(--obra-accent, #7c5cff); }
.ar-output { background: var(--bg); }
.ar-actions { display: flex; gap: 8px; align-items: center; }
.ar-output-wrap { display: flex; flex-direction: column; gap: 10px; }
.ar-output-actions { display: flex; gap: 8px; }
.ar-spinner { display: flex; gap: 6px; align-items: center; justify-content: center; padding: 12px 0; }
.ar-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--obra-accent, #7c5cff); animation: arPulse 1.2s ease-in-out infinite; }
.ar-dot:nth-child(2) { animation-delay: .2s; }
.ar-dot:nth-child(3) { animation-delay: .4s; }
@keyframes arPulse {
  0%, 80%, 100% { opacity: .2; transform: scale(.8); }
  40% { opacity: 1; transform: scale(1); }
}
.website-visit-stat span { font-size: 11px; color: var(--obra-text-muted); text-transform: uppercase; letter-spacing: .06em; }

/* ── Content Tab — fix hidden attribute override ──────────── */
#website-editor-data[hidden] { display: none; }

/* ── Leads Hub ───────────────────────────────────────────── */
.leads-hub { padding: 28px 0 40px; max-width: 900px; }
.leads-hub__header { margin-bottom: 24px; }
.leads-hub__title { margin: 0 0 4px; font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: -.01em; }
.leads-hub__subtitle { margin: 0; font-size: 13px; color: var(--text-muted); }
.leads-hub__quickstats { display: flex; align-items: stretch; gap: 0; background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface-3) 100%); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0; margin-bottom: 32px; overflow: hidden; }
.leads-hub__qs-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; flex: 1; padding: 24px 20px; position: relative; }
.leads-hub__qs-item:first-child { border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.leads-hub__qs-divider { width: 1px; background: var(--border); flex: 0 0 auto; align-self: stretch; }
.leads-hub__qs-count { font-size: 36px; font-weight: 900; color: var(--text); line-height: 1; letter-spacing: -.02em; }
.leads-hub__qs-count--new { color: #4ade80; text-shadow: 0 0 24px rgba(74,222,128,.35); }
.leads-hub__qs-label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); font-weight: 600; }
.leads-hub__section-label { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; display: flex; align-items: center; gap: 12px; }
.leads-hub__section-link { font-size: 11px; font-weight: 600; color: var(--accent); text-decoration: none; cursor: pointer; letter-spacing: 0; text-transform: none; }
.leads-hub__section-link:hover { text-decoration: underline; }
.leads-hub__sources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 32px; }
.leads-source-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 12px; cursor: default; transition: border-color .15s, background .15s, transform .15s, box-shadow .15s; text-align: left; width: 100%; min-height: 110px; }
.leads-source-card--active { cursor: pointer; border-color: var(--accent); background: linear-gradient(135deg, var(--surface-2) 0%, rgba(255,170,0,.04) 100%); box-shadow: 0 0 0 1px rgba(255,170,0,.12), 0 4px 16px rgba(0,0,0,.2); }
.leads-source-card--active:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(255,170,0,.25), 0 8px 24px rgba(0,0,0,.3); }
.leads-source-card--soon { opacity: .5; }
.leads-source-card--add  { opacity: .4; border-style: dashed; }
.leads-source-card__icon { font-size: 24px; line-height: 1; }
.leads-source-card__body { flex: 1 1 auto; min-width: 0; }
.leads-source-card__name { font-size: 14px; font-weight: 700; color: #fff; }
.leads-source-card__meta { font-size: 12px; color: #b0b8c8; margin-top: 3px; }
.leads-source-card__footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.leads-source-card__badge { font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: rgba(74,222,128,.15); color: #4ade80; text-transform: uppercase; letter-spacing: .06em; }
.leads-source-card__badge--soon { background: var(--surface-3); color: var(--text-muted); }
.leads-source-card__arrow { color: var(--accent); font-size: 16px; font-weight: 700; }
.leads-hub__agents { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 32px; }
.leads-agent-row { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--border); transition: background .12s; }
.leads-agent-row:last-child { border-bottom: none; }
.leads-agent-row:hover { background: var(--surface-3); }
.leads-agent-row__icon { font-size: 20px; flex: 0 0 auto; }
.leads-agent-row__name { font-size: 14px; font-weight: 700; color: var(--text); flex: 0 0 auto; }
.leads-agent-row__status { font-size: 12.5px; color: var(--text-muted); }
.leads-agent-row__drafts { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--accent); }
.leads-kanban-breadcrumb { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-size: 13px; color: var(--text-muted); }
.leads-back-btn { background: none; border: none; color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; }
.leads-back-btn:hover { text-decoration: underline; }
.leads-kanban-breadcrumb__source { color: var(--text); font-weight: 500; }
@media (max-width: 640px) {
  .leads-hub__sources { grid-template-columns: 1fr; }
  .leads-hub__quickstats { padding: 12px 16px; }
  .leads-hub__qs-count { font-size: 22px; }
}

/* ── Desk priority / pulse / apps ───────────────────────── */
.desk-priority { background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.3); border-left: 3px solid #f59e0b; border-radius: var(--radius-lg); padding: 10px 16px; font-size: 13px; font-weight: 600; color: #f59e0b; margin-bottom: 12px; }
.desk-apps { display: flex; flex-direction: column; gap: 8px; }
.desk-apps__label { font-size: 11px; font-weight: 700; color: var(--obra-text-muted); text-transform: uppercase; letter-spacing: .07em; }
.desk-apps__row { display: flex; flex-wrap: wrap; gap: 8px; }
.desk-app-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 14px; border-radius: 10px; border: 1.5px solid var(--obra-border); background: var(--obra-surface); cursor: pointer; min-width: 64px; transition: border-color .15s, background .15s; }
.desk-app-tile:hover { border-color: var(--obra-accent); background: var(--obra-surface-2); }
.desk-app-tile__icon { font-size: 22px; line-height: 1; }
.desk-app-tile__label { font-size: 10px; font-weight: 600; color: var(--obra-text-muted); white-space: nowrap; }

.desk-voice-promo { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: linear-gradient(135deg, rgba(124,92,255,.14) 0%, rgba(124,92,255,.05) 100%); border: 1px solid rgba(124,92,255,.35); text-decoration: none; cursor: pointer; transition: border-color .15s, transform .15s; }
.desk-voice-promo:hover { border-color: rgba(124,92,255,.6); transform: translateY(-1px); }
.desk-voice-promo__icon { font-size: 24px; line-height: 1; flex-shrink: 0; }
.desk-voice-promo__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.desk-voice-promo__body strong { font-size: 13px; color: var(--obra-text, var(--text)); }
.desk-voice-promo__body span { font-size: 12px; color: var(--obra-muted, var(--muted)); }
.desk-voice-promo__cta { font-size: 12px; font-weight: 700; color: #a78bfa; flex-shrink: 0; white-space: nowrap; }

/* ── Apps marketplace ────────────────────────────────────── */
.apps-page { padding: 24px; max-width: 720px; }
.apps-header { margin-bottom: 20px; }
.apps-title { font-size: 20px; font-weight: 700; color: var(--obra-text, var(--text)); margin-bottom: 4px; }
.apps-subtitle { font-size: 13px; color: var(--obra-muted, var(--muted)); }
.apps-loading, .apps-error, .apps-empty { font-size: 13px; color: var(--obra-muted, var(--muted)); margin: 0 0 16px; }
.apps-error { color: #f87171; }
.apps-grid { display: grid; gap: 10px; }
.apps-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; background: var(--obra-surface-2, var(--surface)); border: 1px solid var(--obra-border, var(--border)); transition: border-color .15s; }
.apps-card:hover { border-color: rgba(124,92,255,.4); }
.apps-card__icon { font-size: 26px; line-height: 1; flex-shrink: 0; width: 38px; text-align: center; }
.apps-card__body { flex: 1; min-width: 0; }
.apps-card__name { font-size: 14px; font-weight: 600; color: var(--obra-text, var(--text)); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.apps-card__tagline { font-size: 12px; color: var(--obra-muted, var(--muted)); margin-top: 2px; }
.apps-plan-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 8px; background: rgba(255,255,255,.07); color: var(--obra-muted, var(--muted)); border: 1px solid var(--obra-border, var(--border)); }
.apps-plan-badge--pro { background: rgba(124,92,255,.12); color: #a78bfa; border-color: rgba(124,92,255,.3); }
.apps-plan-badge--enterprise { background: rgba(251,191,36,.1); color: #fbbf24; border-color: rgba(251,191,36,.3); }
.apps-badge--new { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 8px; background: rgba(74,222,128,.15); color: #4ade80; border: 1px solid rgba(74,222,128,.35); }
.apps-card--flash { animation: apps-card-flash 1.6s ease-out; }
@keyframes apps-card-flash {
  0%, 100% { box-shadow: none; border-color: var(--obra-border, var(--border)); }
  20% { box-shadow: 0 0 0 3px rgba(124,92,255,.35); border-color: rgba(124,92,255,.6); }
}
.apps-card__btn { flex-shrink: 0; padding: 8px 18px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: background .15s, color .15s, opacity .15s; white-space: nowrap; }
.apps-card__btn--install { background: var(--obra-accent, #7c5cff); color: #fff; border-color: var(--obra-accent, #7c5cff); }
.apps-card__btn--install:hover { opacity: .85; }
.apps-card__btn--installed { background: rgba(32,227,178,.1); color: #20e3b2; border-color: rgba(32,227,178,.3); }
.apps-card__btn--installed:hover { background: rgba(255,80,80,.1); color: #f87171; border-color: rgba(255,80,80,.3); }
.apps-card__btn:disabled { opacity: .5; cursor: default; }
.apps-card--installed { border-color: rgba(32,227,178,.2); }
.apps-card__actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.apps-card__active-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #20e3b2; margin-left: 4px; vertical-align: middle; }
.apps-card__btn--open { background: var(--obra-accent, #7c5cff); color: #fff; border-color: var(--obra-accent, #7c5cff); padding: 7px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid transparent; white-space: nowrap; transition: opacity .15s; }
.apps-card__btn--open:hover { opacity: .85; }
.apps-card__btn--uninstall { background: none; border: none; color: rgba(248,113,113,.6); font-size: 11px; font-weight: 500; cursor: pointer; padding: 4px 6px; border-radius: 6px; white-space: nowrap; transition: color .15s; }
.apps-card__btn--uninstall:hover { color: #f87171; }
@media (max-width: 540px) {
  .apps-page { padding: 16px; }
  .apps-card { flex-wrap: wrap; }
  .apps-card__btn { width: 100%; text-align: center; margin-top: 6px; }
  .apps-card__actions { flex-direction: column; align-items: stretch; width: 100%; margin-top: 6px; }
  .apps-card__btn--open { text-align: center; }
}

/* ── Portfolio tab ────────────────────────────────────────── */
.portfolio-page { padding: 24px; max-width: 900px; }
.portfolio-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.portfolio-title { font-size: 20px; font-weight: 700; color: var(--obra-text, var(--text)); margin-bottom: 4px; }
.portfolio-subtitle { font-size: 13px; color: var(--obra-muted, var(--muted)); }
.portfolio-loading, .portfolio-error { font-size: 13px; color: var(--obra-muted, var(--muted)); margin: 0 0 16px; }
.portfolio-error { color: #f87171; }
.portfolio-empty { font-size: 13px; color: var(--obra-muted, var(--muted)); margin: 0; }
.portfolio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 640px) { .portfolio-grid { grid-template-columns: 1fr; } }
.portfolio-card { border-radius: 12px; background: var(--obra-surface-2, var(--surface)); border: 1px solid var(--obra-border, var(--border)); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s; }
.portfolio-card:hover { border-color: rgba(124,92,255,.4); }
.portfolio-card__img { width: 100%; height: 160px; object-fit: cover; display: block; background: rgba(255,255,255,.04); }
.portfolio-card__img--placeholder { display: flex; align-items: center; justify-content: center; height: 160px; background: rgba(255,255,255,.04); color: var(--obra-muted, var(--muted)); }
.portfolio-card__body { padding: 12px 14px 8px; flex: 1; }
.portfolio-card__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.portfolio-card__type { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 8px; background: rgba(124,92,255,.12); color: #a78bfa; border: 1px solid rgba(124,92,255,.3); }
.portfolio-card__status { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 8px; }
.portfolio-card__status--published { background: rgba(32,227,178,.1); color: #20e3b2; border: 1px solid rgba(32,227,178,.3); }
.portfolio-card__status--draft { background: rgba(255,255,255,.06); color: var(--obra-muted, var(--muted)); border: 1px solid var(--obra-border, var(--border)); }
.portfolio-card__title { font-size: 14px; font-weight: 600; color: var(--obra-text, var(--text)); margin-bottom: 4px; }
.portfolio-card__desc { font-size: 12px; color: var(--obra-muted, var(--muted)); line-height: 1.4; }
.portfolio-card__actions { display: flex; gap: 8px; padding: 8px 14px 12px; border-top: 1px solid var(--obra-border, var(--border)); }
.portfolio-card__btn { font-size: 12px; font-weight: 600; padding: 5px 14px; border-radius: 7px; cursor: pointer; border: 1px solid transparent; transition: background .15s, color .15s; }
.portfolio-card__btn--edit { background: rgba(124,92,255,.12); color: #a78bfa; border-color: rgba(124,92,255,.3); }
.portfolio-card__btn--edit:hover { background: rgba(124,92,255,.22); }
.portfolio-card__btn--delete { background: rgba(255,80,80,.08); color: #f87171; border-color: rgba(255,80,80,.25); }
.portfolio-card__btn--delete:hover { background: rgba(255,80,80,.18); }
.portfolio-card__btn:disabled { opacity: .5; cursor: default; }
.portfolio-drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 299; }
.portfolio-drawer { position: fixed; top: 0; right: 0; height: 100vh; width: 420px; max-width: 100vw; background: var(--obra-surface, #1a1a2e); border-left: 1px solid var(--obra-border, var(--border)); z-index: 300; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .22s cubic-bezier(.4,0,.2,1); overflow: hidden; }
.portfolio-drawer.is-open { transform: translateX(0); }
.portfolio-drawer__header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 14px; border-bottom: 1px solid var(--obra-border, var(--border)); flex-shrink: 0; }
.portfolio-drawer__title { font-size: 16px; font-weight: 700; color: var(--obra-text, var(--text)); }
.portfolio-drawer__close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--obra-muted, var(--muted)); line-height: 1; padding: 4px 6px; border-radius: 6px; }
.portfolio-drawer__close:hover { background: rgba(255,255,255,.07); color: var(--obra-text, var(--text)); }
.portfolio-drawer__body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.portfolio-drawer__footer { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-top: 1px solid var(--obra-border, var(--border)); flex-shrink: 0; }
.portfolio-drawer__footer-right { display: flex; gap: 8px; }
.pf-field { display: flex; flex-direction: column; gap: 5px; }
.pf-field--sm { max-width: 120px; }
.pf-field--toggle { justify-content: flex-end; padding-bottom: 2px; }
.pf-label { font-size: 12px; font-weight: 600; color: var(--obra-text, var(--text)); }
.pf-required { color: #f87171; }
.pf-input { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--obra-border, var(--border)); background: rgba(255,255,255,.05); color: var(--obra-text, var(--text)); font-size: 13px; line-height: 1.4; outline: none; transition: border-color .15s; box-sizing: border-box; }
.pf-input:focus { border-color: var(--obra-accent, #7c5cff); }
.pf-select { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.pf-textarea { resize: vertical; min-height: 64px; }
.pf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pf-row--bottom { align-items: end; }
.pf-toggle-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--obra-text, var(--text)); cursor: pointer; white-space: nowrap; }
.pf-checkbox { accent-color: var(--obra-accent, #7c5cff); width: 16px; height: 16px; cursor: pointer; }
.btn-danger { background: rgba(255,80,80,.12); color: #f87171; border: 1px solid rgba(255,80,80,.3); }
.btn-danger:hover { background: rgba(255,80,80,.22); }
@media (max-width: 540px) {
  .portfolio-page { padding: 16px; }
  .portfolio-drawer { width: 100vw; }
  .pf-row { grid-template-columns: 1fr; }
}

/* ── QR Code App ─────────────────────────────────────────── */
.qr-page { padding: 24px 28px; max-width: 860px; }
.qr-header { margin-bottom: 24px; }
.qr-title { font-size: 20px; font-weight: 700; color: var(--text); }
.qr-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.qr-layout { display: flex; gap: 32px; align-items: flex-start; }
.qr-controls { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.qr-presets-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); display: block; margin-bottom: 8px; }
.qr-presets-row { display: flex; flex-wrap: wrap; gap: 8px; }
.qr-preset-btn { padding: 7px 13px; border-radius: 20px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font-size: 12px; font-weight: 500; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.qr-preset-btn:hover { border-color: var(--obra-accent, #7c5cff); color: var(--obra-accent, #7c5cff); }
.qr-preset-btn.is-active { background: var(--obra-accent, #7c5cff); border-color: var(--obra-accent, #7c5cff); color: #fff; }
.qr-field { display: flex; flex-direction: column; gap: 6px; }
.qr-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.qr-input { padding: 9px 12px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font-size: 13px; width: 100%; box-sizing: border-box; transition: border-color .15s; }
.qr-input:focus { outline: none; border-color: var(--obra-accent, #7c5cff); }
.qr-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; cursor: pointer; }
.qr-field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.qr-field--half { flex: 1; min-width: 100px; }
.qr-color-row { display: flex; align-items: center; gap: 8px; }
.qr-color-input { width: 36px; height: 36px; padding: 2px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; flex-shrink: 0; }
.qr-color-hint { font-size: 11px; color: var(--text-muted); }
.qr-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.qr-preview-panel { width: 240px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.qr-preview-box { width: 220px; height: 220px; border-radius: 16px; border: 2px dashed var(--border); background: var(--surface); display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.qr-preview-img { width: 100%; height: 100%; object-fit: contain; }
.qr-preview-placeholder { text-align: center; font-size: 12px; color: var(--text-muted); line-height: 1.5; padding: 16px; }
.qr-preview-hint { font-size: 11px; color: var(--text-muted); text-align: center; line-height: 1.5; }
.qr-spinner { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--surface); }
.qr-spinner-ring { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--obra-accent, #7c5cff); border-radius: 50%; animation: qr-spin .7s linear infinite; }
@keyframes qr-spin { to { transform: rotate(360deg); } }
@media (max-width: 640px) {
  .qr-page { padding: 16px; }
  .qr-layout { flex-direction: column-reverse; }
  .qr-preview-panel { width: 100%; flex-direction: row; align-items: flex-start; gap: 16px; }
  .qr-preview-box { width: 140px; height: 140px; flex-shrink: 0; }
  .qr-preview-hint { text-align: left; }
}

/* ── Deck tab ────────────────────────────────────────────── */
.deck-page { padding: 24px; }
.deck-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.deck-title { font-size: 20px; font-weight: 700; color: var(--obra-text, var(--text)); margin-bottom: 4px; }
.deck-subtitle { font-size: 13px; color: var(--obra-muted, var(--muted)); }
.deck-loading, .deck-error { font-size: 14px; color: var(--obra-muted, var(--muted)); padding: 8px 0; }
.deck-error { color: var(--obra-danger, #e74c3c); }
.deck-empty { font-size: 14px; color: var(--obra-muted, var(--muted)); padding: 32px 0; text-align: center; }
.deck-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 640px) { .deck-grid { grid-template-columns: 1fr; } }
.deck-card { background: var(--obra-surface-2, var(--surface)); border: 1px solid var(--obra-border, var(--border)); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; transition: box-shadow .15s; }
.deck-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.deck-card__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.deck-card__mode { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 20px; }
.deck-card__mode--proposal { background: rgba(99,102,241,.12); color: #6366f1; }
.deck-card__mode--delivery { background: rgba(139,92,246,.12); color: #8b5cf6; }
.deck-card__status { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 20px; margin-left: auto; }
.deck-card__status--draft  { background: var(--obra-surface-3, rgba(0,0,0,.06)); color: var(--obra-muted, var(--muted)); }
.deck-card__status--sent   { background: rgba(59,130,246,.12); color: #3b82f6; }
.deck-card__status--viewed { background: rgba(16,185,129,.12); color: #10b981; }
.deck-card__title { font-size: 15px; font-weight: 600; color: var(--obra-text, var(--text)); line-height: 1.3; }
.deck-card__recipient { font-size: 12px; color: var(--obra-muted, var(--muted)); }
.deck-card__date { font-size: 11px; color: var(--obra-muted, var(--muted)); opacity: .7; }
.deck-card__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.deck-card__btn { font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 7px; border: 1px solid var(--obra-border, var(--border)); background: var(--obra-surface, var(--bg)); color: var(--obra-text, var(--text)); cursor: pointer; transition: background .12s, color .12s; }
.deck-card__btn:hover { background: var(--obra-surface-2, var(--surface)); }
.deck-card__btn--send { border-color: #6366f1; color: #6366f1; }
.deck-card__btn--send:hover { background: rgba(99,102,241,.08); }
.deck-card__btn--copy { border-color: #10b981; color: #10b981; }
.deck-card__btn--copy:hover { background: rgba(16,185,129,.08); }
.deck-card__btn--delete { border-color: transparent; color: var(--obra-danger, #e74c3c); }
.deck-card__btn--delete:hover { background: rgba(231,76,60,.08); }
.deck-drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1100; }
.deck-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 480px; max-width: 100vw; background: var(--obra-surface, var(--bg)); border-left: 1px solid var(--obra-border, var(--border)); z-index: 1101; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .25s cubic-bezier(.32,1,.6,1); overflow: hidden; }
.deck-drawer.is-open { transform: translateX(0); }
.deck-drawer__header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--obra-border, var(--border)); flex-shrink: 0; }
.deck-drawer__title { font-size: 16px; font-weight: 700; color: var(--obra-text, var(--text)); }
.deck-drawer__close { background: none; border: none; font-size: 18px; color: var(--obra-muted, var(--muted)); cursor: pointer; padding: 4px 8px; border-radius: 6px; line-height: 1; }
.deck-drawer__close:hover { color: var(--obra-text, var(--text)); }
.deck-drawer__body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.deck-drawer__footer { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-top: 1px solid var(--obra-border, var(--border)); flex-shrink: 0; gap: 10px; }
.deck-drawer__footer-right { display: flex; gap: 8px; margin-left: auto; }
.deck-sections-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.deck-section-item { background: var(--obra-surface-2, var(--surface)); border: 1px solid var(--obra-border, var(--border)); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.deck-section-item__row { display: flex; gap: 8px; align-items: center; }
.deck-section-item__row .pf-input { flex: 1; }
.deck-section-delete { flex-shrink: 0; color: var(--obra-muted, var(--muted)); font-size: 13px; }
.dk-add-section { align-self: flex-start; }
@media (max-width: 600px) { .deck-drawer { width: 100vw; } }

/* ── Reviews Request App ─────────────────────────────────── */
.rr-page { padding: 24px 28px; max-width: 640px; display: flex; flex-direction: column; gap: 24px; }
.rr-title { font-size: 20px; font-weight: 700; color: var(--text); }
.rr-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.rr-stats-bar { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; flex-wrap: wrap; }
.rr-stars { color: #f59e0b; font-size: 16px; letter-spacing: 1px; }
.rr-count { font-size: 13px; font-weight: 600; color: var(--text); }
.rr-settings-nudge { font-size: 12px; color: var(--obra-accent, #7c5cff); text-decoration: none; margin-left: auto; white-space: nowrap; }
.rr-settings-nudge:hover { text-decoration: underline; }
.rr-link-row { display: flex; flex-direction: column; gap: 8px; }
.rr-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.rr-link-input-row { display: flex; gap: 8px; align-items: center; }
.rr-link-input { flex: 1; padding: 9px 12px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text-muted); font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: default; }
.rr-no-link { font-size: 12px; color: var(--text-muted); margin: 0; }
.rr-templates { display: flex; flex-direction: column; gap: 12px; }
.rr-tabs-row { display: flex; gap: 8px; }
.rr-tab-btn { padding: 7px 16px; border-radius: 20px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font-size: 13px; font-weight: 500; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.rr-tab-btn:hover { border-color: var(--obra-accent, #7c5cff); color: var(--obra-accent, #7c5cff); }
.rr-tab-btn.is-active { background: var(--obra-accent, #7c5cff); border-color: var(--obra-accent, #7c5cff); color: #fff; }
.rr-message-text { width: 100%; box-sizing: border-box; padding: 14px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font-size: 13px; line-height: 1.6; resize: vertical; font-family: inherit; }
.rr-message-text:focus { outline: none; border-color: var(--obra-accent, #7c5cff); }
.rr-copy-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rr-copy-hint { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
@media (max-width: 540px) {
  .rr-page { padding: 16px; }
  .rr-settings-nudge { margin-left: 0; width: 100%; }
  .rr-copy-row { flex-direction: column; align-items: flex-start; }
  .rr-copy-row .btn { width: 100%; text-align: center; }
}

/* ── Link Page App ───────────────────────────────────────── */
.lp-page { padding: 24px 28px; max-width: 660px; display: flex; flex-direction: column; gap: 20px; }
.lp-page__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lp-page__title { font-size: 20px; font-weight: 700; color: var(--text); }
.lp-page__subtitle { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.lp-page__actions { display: flex; gap: 8px; flex-shrink: 0; }
.lp-url-row { display: flex; flex-direction: column; gap: 6px; }
.lp-url-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.lp-url-input-row { display: flex; gap: 8px; align-items: center; }
.lp-url-input { flex: 1; padding: 9px 12px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text-muted); font-size: 12px; min-width: 0; cursor: default; }
.lp-field-row { display: flex; flex-direction: column; gap: 6px; }
.lp-field-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.lp-field-hint { font-weight: 400; opacity: .7; }
.lp-field-input { padding: 9px 12px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font-size: 13px; }
.lp-field-input:focus { outline: none; border-color: var(--obra-accent, #7c5cff); }
.lp-preview-strip { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.lp-brand-preview { display: flex; align-items: center; gap: 10px; }
.lp-preview__logo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.lp-preview__brand-text { font-size: 15px; font-weight: 700; color: var(--text); }
.lp-preview-label { font-size: 12px; color: var(--text-muted); }
.lp-list-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lp-list-title { font-size: 13px; font-weight: 600; color: var(--text); }
.lp-list { display: flex; flex-direction: column; gap: 8px; }
.lp-empty { font-size: 13px; color: var(--text-muted); padding: 12px 0; }
.lp-item { display: flex; align-items: flex-start; gap: 8px; padding: 12px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 10px; }
.lp-item--hidden { opacity: .5; }
.lp-item__drag { font-size: 18px; color: var(--text-muted); cursor: grab; padding-top: 2px; flex-shrink: 0; user-select: none; }
.lp-item__body { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lp-item__row { display: flex; gap: 6px; align-items: center; }
.lp-item__title { flex: 1; padding: 7px 10px; border-radius: 7px; border: 1.5px solid var(--border); background: var(--bg); color: var(--text); font-size: 13px; font-weight: 600; min-width: 0; }
.lp-item__title:focus { outline: none; border-color: var(--obra-accent, #7c5cff); }
.lp-item__url { width: 100%; padding: 7px 10px; border-radius: 7px; border: 1.5px solid var(--border); background: var(--bg); color: var(--text-muted); font-size: 12px; }
.lp-item__url:focus { outline: none; border-color: var(--obra-accent, #7c5cff); }
.lp-item__vis { background: none; border: none; font-size: 16px; cursor: pointer; padding: 2px 4px; border-radius: 4px; flex-shrink: 0; }
.lp-item__vis:hover { background: var(--bg); }
.lp-item__del { background: none; border: none; color: var(--text-muted); font-size: 13px; cursor: pointer; padding: 2px 6px; border-radius: 4px; flex-shrink: 0; }
.lp-item__del:hover { color: var(--danger, #e55); background: var(--bg); }
@media (max-width: 540px) {
  .lp-page { padding: 16px; }
  .lp-page__header { flex-direction: column; }
  .lp-page__actions { width: 100%; }
  .lp-page__actions .btn { flex: 1; text-align: center; }
}

/* ── AI Reply ────────────────────────────────────────────── */
.ar-wrap { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.ar-tones-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.ar-tones { display: flex; flex-wrap: wrap; gap: 8px; }
.ar-tone-btn { padding: 6px 14px; border-radius: 20px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font-size: 13px; cursor: pointer; transition: border-color .15s, background .15s; }
.ar-tone-btn:hover { border-color: var(--obra-accent, #7c5cff); }
.ar-tone-btn.is-active { border-color: var(--obra-accent, #7c5cff); background: var(--obra-accent, #7c5cff); color: #fff; }
.ar-label { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: -6px; }
.ar-input, .ar-output { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font-size: 14px; resize: vertical; font-family: inherit; line-height: 1.5; }
.ar-input:focus, .ar-output:focus { outline: none; border-color: var(--obra-accent, #7c5cff); }
.ar-output { background: var(--bg); }
.ar-actions { display: flex; gap: 8px; align-items: center; }
.ar-output-wrap { display: flex; flex-direction: column; gap: 10px; }
.ar-output-actions { display: flex; gap: 8px; }
.ar-spinner { display: flex; gap: 6px; align-items: center; justify-content: center; padding: 12px 0; }
.ar-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--obra-accent, #7c5cff); animation: arPulse 1.2s ease-in-out infinite; }
.ar-dot:nth-child(2) { animation-delay: .2s; }
.ar-dot:nth-child(3) { animation-delay: .4s; }
@keyframes arPulse {
  0%, 80%, 100% { opacity: .2; transform: scale(.8); }
  40% { opacity: 1; transform: scale(1); }
}

/* ── Seed / example leads banner ── */
.leads-seed-banner { display: flex; align-items: center; gap: 8px; padding: 10px 16px; margin-bottom: 12px; background: linear-gradient(135deg, rgba(124,92,255,.12), rgba(45,212,191,.08)); border: 1px solid rgba(124,92,255,.25); border-radius: var(--radius-md); font-size: 13px; color: var(--obra-text-muted); }
.leads-seed-banner strong { color: var(--obra-text); }
.leads-seed-banner a { color: var(--obra-accent); margin-left: auto; text-decoration: none; white-space: nowrap; }
.leads-seed-banner a:hover { text-decoration: underline; }

/* ── Mobile topbar — hide all actions except Publish + ••• ── */
@media screen and (max-width: 768px) {
  header.topbar { flex-wrap: nowrap !important; height: var(--topbar-h) !important; position: relative; }
  header.topbar .topbar__brand { flex: 1; min-width: 0; }
  header.topbar .topbar__actions .mode-indicator { display: none !important; }
  header.topbar .topbar__actions a.btn { display: none !important; }
  header.topbar #preview-draft-btn { display: none !important; }
  header.topbar #logout-btn { display: none !important; }
  header.topbar #save-indicator { display: none !important; }
  header.topbar #publish-content-btn { font-size: 12px; padding: 6px 14px; flex-shrink: 0; }
  header.topbar .topbar__more-btn { display: inline-flex !important; }
}

/* ── Prospects View ── */
.prospects-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.prospects-toolbar .leads-search { flex: 1; }
.prospects-list { display: flex; flex-direction: column; gap: 8px; }
.prospect-row { display: grid; grid-template-columns: 40px 1fr 140px 120px 90px 110px auto; align-items: center; gap: 12px; padding: 14px 16px; background: var(--obra-surface); border: 1px solid var(--obra-border); border-radius: 10px; transition: border-color .15s; }
.prospect-row:hover { border-color: var(--obra-accent); }
.prospect-row__avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--obra-surface-2); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--obra-text-muted); flex-shrink: 0; }
.prospect-row__info { min-width: 0; }
.prospect-row__name { font-size: 14px; font-weight: 600; color: var(--obra-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prospect-row__addr { font-size: 12px; color: var(--obra-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.prospect-row__phone { font-size: 13px; color: var(--obra-text-muted); }
.prospect-row__phone a { color: var(--obra-text); text-decoration: none; }
.prospect-row__phone a:hover { color: var(--obra-accent); }
.prospect-row__site { font-size: 13px; }
.prospect-row__site a { color: var(--obra-accent); text-decoration: none; }
.prospect-row__site a:hover { text-decoration: underline; }
.prospect-row__badge { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 20px; text-transform: capitalize; }
.prospect-row__open-btn { font-size: 12px; padding: 6px 14px; white-space: nowrap; }
.warmth-badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px; white-space: nowrap; }
.warmth--hot  { background: rgba(239,68,68,.15);  color: #f87171; }
.warmth--warm { background: rgba(245,158,11,.15); color: #fbbf24; }
.warmth--cool { background: rgba(99,102,241,.12); color: #818cf8; }
@media (max-width: 768px) {
  .prospect-row { grid-template-columns: 36px 1fr auto; }
  .prospect-row__phone, .prospect-row__site, .prospect-row__warmth, .prospect-row__status { display: none; }
}

/* ── Prospect inline status select ── */
.prospect-status-select { appearance: none; -webkit-appearance: none; background: color-mix(in srgb, var(--st-color, #7c5cff) 15%, transparent); color: var(--st-color, #7c5cff); border: 1px solid color-mix(in srgb, var(--st-color, #7c5cff) 40%, transparent); border-radius: 20px; font-size: 11px; font-weight: 600; padding: 4px 10px; cursor: pointer; outline: none; text-transform: capitalize; transition: background .15s, border-color .15s; }
.prospect-status-select:hover { background: color-mix(in srgb, var(--st-color, #7c5cff) 25%, transparent); }

/* ── Mobile login reveal ── */
.login-panel-cta--mobile { display: none; }
@media (max-width: 768px) {
  .login-panel-cta--desktop { display: none !important; }
  .login-panel-cta--mobile  { display: inline-flex; align-items: center; justify-content: center; width: 100%; }
  .login-panel-right { display: none; }
  .login-panel-right.is-visible { display: block; animation: fadeSlideUp .3s ease; }
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Forms Tab ── */
.ftab-wrap { max-width: 680px; margin: 0 auto; padding: 28px 20px 64px; }
.ftab-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; gap: 12px; }
.ftab-heading { font-size: 20px; font-weight: 700; }
.ftab-header-actions { display: flex; gap: 8px; align-items: center; }
.ftab-subhead { font-size: 13px; color: var(--obra-text-dim); margin-bottom: 24px; line-height: 1.5; }

/* Form cards */
.ftab-card { background: var(--obra-card); border: 1px solid var(--obra-border); border-radius: 10px; padding: 18px 20px; margin-bottom: 12px; }
.ftab-card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.ftab-card__title { font-weight: 600; font-size: 15px; flex: 1; }
.ftab-card__desc { font-size: 13px; color: var(--obra-text-dim); margin-bottom: 4px; }
.ftab-card__meta { font-size: 12px; color: var(--obra-text-dim); margin-bottom: 10px; }
.ftab-card__url { font-size: 11px; color: var(--obra-text-dim); word-break: break-all; margin-bottom: 10px; font-family: monospace; }
.ftab-card__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Status badges */
.ftab-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.ftab-badge--live  { background: #d4edda; color: #155724; }
.ftab-badge--draft { background: var(--obra-surface); color: var(--obra-text-dim); }
.ftab-badge--arch  { background: #fff3cd; color: #856404; }

/* Empty state */
.ftab-empty { text-align: center; padding: 48px 20px; color: var(--obra-text-dim); }
.ftab-empty__icon { font-size: 36px; margin-bottom: 12px; }
.ftab-empty p { font-size: 14px; line-height: 1.6; }

/* Editor */
.ftab-editor-body { display: flex; flex-direction: column; gap: 20px; margin-top: 24px; }
.ftab-field { display: flex; flex-direction: column; gap: 6px; }
.ftab-label { font-size: 13px; font-weight: 600; color: var(--obra-text-dim); }
.ftab-optional { font-weight: 400; }
.ftab-input { width: 100%; padding: 10px 12px; border: 1.5px solid var(--obra-border); border-radius: 8px; font-size: 14px; background: var(--obra-bg); color: var(--obra-text); outline: none; font-family: inherit; transition: border-color .15s; }
.ftab-input:focus { border-color: var(--obra-accent); }
.ftab-color-row { display: flex; align-items: center; gap: 12px; }
.ftab-color-input { width: 40px; height: 36px; border: 1.5px solid var(--obra-border); border-radius: 6px; padding: 2px; cursor: pointer; background: none; }
.ftab-color-hint { font-size: 12px; color: var(--obra-text-dim); }

/* Published URL row */
.ftab-url-row { background: var(--obra-surface); border: 1.5px solid var(--obra-accent); border-radius: 10px; padding: 16px; }
.ftab-url-label { font-size: 12px; font-weight: 600; color: var(--obra-text-dim); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .04em; }
.ftab-url-box { display: flex; align-items: center; gap: 8px; background: var(--obra-bg); border: 1px solid var(--obra-border); border-radius: 8px; padding: 8px 12px; }
.ftab-url-text { flex: 1; font-size: 12px; font-family: monospace; word-break: break-all; color: var(--obra-text); }
.ftab-url-hint { font-size: 12px; color: var(--obra-text-dim); margin-top: 8px; line-height: 1.4; }

/* Fields note */
.ftab-fields-note { font-size: 12px; color: var(--obra-text-dim); background: var(--obra-surface); border-radius: 8px; padding: 12px 14px; line-height: 1.5; }

/* ── Forms embed modal ── */
.ftab-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.ftab-modal { background: var(--obra-card, #1e1e1e); border: 1px solid var(--obra-border); border-radius: 14px; width: 100%; max-width: 560px; padding: 28px; box-shadow: 0 8px 40px rgba(0,0,0,.4); isolation: isolate; }
.ftab-modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ftab-modal__title { font-size: 16px; font-weight: 700; }
.ftab-modal__close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--obra-text-dim); line-height: 1; padding: 4px; }
.ftab-modal__desc { font-size: 13px; color: var(--obra-text); margin-bottom: 16px; line-height: 1.5; opacity: .75; }
.ftab-modal__hint { font-size: 12px; color: var(--obra-text-dim); margin-top: 12px; }
.ftab-embed-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.ftab-embed-tab { background: var(--obra-surface); border: 1px solid var(--obra-border); border-radius: 6px; padding: 5px 14px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--obra-text-dim); }
.ftab-embed-tab.is-active { background: var(--obra-accent); color: #000; border-color: var(--obra-accent); }
.ftab-embed-code-wrap { position: relative; }
.ftab-embed-code { background: var(--obra-surface); border: 1px solid var(--obra-border); border-radius: 8px; padding: 14px; font-size: 12px; font-family: monospace; white-space: pre-wrap; word-break: break-all; color: var(--obra-text); margin-bottom: 10px; line-height: 1.5; }
.ftab-embed-copy { width: 100%; }

/* ── Billing tab ── */
.billing-page { max-width: 680px; padding: 28px 0; }
.billing-header { margin-bottom: 24px; }
.billing-title { font-size: 22px; font-weight: 700; color: var(--obra-text); }
.billing-subtitle { font-size: 14px; color: var(--obra-text-dim); margin-top: 4px; }
.billing-status-card { background: var(--obra-card, var(--obra-surface)); border: 1px solid var(--obra-border); border-radius: 12px; padding: 20px 22px; margin-bottom: 28px; }
.billing-plan-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--obra-border); }
.billing-plan-row:last-of-type { border-bottom: none; }
.billing-plan-label { font-size: 13px; color: var(--obra-text-dim); }
.billing-plan-badge { font-size: 13px; font-weight: 600; color: var(--obra-text); }
.billing-status-badge { font-size: 13px; font-weight: 600; color: var(--obra-text-dim); }
.billing-status-badge--active { color: #22c55e; }
.billing-plans-title { font-size: 16px; font-weight: 700; color: var(--obra-text); margin-bottom: 16px; }
.billing-plans-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .billing-plans-grid { grid-template-columns: 1fr; } }
.billing-plan-card { background: var(--obra-surface); border: 1px solid var(--obra-border); border-radius: 12px; padding: 22px; position: relative; }
.billing-plan-card--featured { border-color: var(--obra-accent, #ffd200); }
.billing-plan-card__badge { position: absolute; top: -10px; left: 16px; background: var(--obra-accent, #ffd200); color: #000; font-size: 11px; font-weight: 700; border-radius: 20px; padding: 2px 10px; }
.billing-plan-card__name { font-size: 15px; font-weight: 700; color: var(--obra-text); margin-bottom: 6px; }
.billing-plan-card__price { font-size: 32px; font-weight: 800; color: var(--obra-text); margin-bottom: 6px; }
.billing-plan-card__price span { font-size: 14px; font-weight: 400; color: var(--obra-text-dim); }
.billing-plan-card__desc { font-size: 12px; color: var(--obra-text-dim); margin-bottom: 10px; line-height: 1.4; }
.billing-plan-card__feature { font-size: 12px; color: var(--obra-accent); font-weight: 600; margin-bottom: 16px; }
.billing-plan-card .btn { width: 100%; }

/* AI Credits card */
.billing-ai-card { background: var(--obra-surface); border: 1px solid var(--obra-border); border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.billing-ai-card__header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.billing-ai-card__icon { font-size: 22px; line-height: 1; }
.billing-ai-card__title { font-size: 15px; font-weight: 700; color: var(--obra-text); }
.billing-ai-card__subtitle { font-size: 12px; color: var(--obra-text-dim); margin-top: 2px; }
.billing-ai-bar-wrap { margin-bottom: 10px; }
.billing-ai-bar { height: 8px; background: var(--obra-border); border-radius: 99px; overflow: hidden; margin-bottom: 6px; }
.billing-ai-bar__fill { height: 100%; background: var(--obra-accent); border-radius: 99px; transition: width 0.4s ease; }
.billing-ai-bar__fill--warn { background: #f59e0b; }
.billing-ai-bar__labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--obra-text-dim); }
.billing-ai-card__reset { font-size: 11px; color: var(--obra-text-dim); }
.billing-ai-card__purchased { font-size: 11px; color: var(--obra-accent); margin-top: 4px; }
#billing-buy-tokens-btn { margin-top: 14px; }


/* ── Delete account reason labels ── */
.delete-reason-label { display: flex !important; align-items: center !important; }
.delete-reason-label input[type="radio"] { flex-shrink: 0; }
.delete-reason-label span { flex: 1; min-width: 0; }

/* ── Multi-step Signup Flow ── */
@keyframes sfSlideInRight { from { opacity:0; transform:translateX(52px); } to { opacity:1; transform:translateX(0); } }
@keyframes sfSlideInLeft  { from { opacity:0; transform:translateX(-52px); } to { opacity:1; transform:translateX(0); } }
@keyframes sfFadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes sfPopIn  { from { opacity:0; transform:scale(0.7); } to { opacity:1; transform:scale(1); } }
.sfCard { width:100%; max-width:480px; background:#13131a; border:1px solid rgba(255,255,255,0.08); border-radius:20px; padding:40px 40px 32px; box-shadow:0 24px 80px rgba(0,0,0,0.5); margin:auto; }
.sfBrand { display:flex; align-items:center; gap:8px; margin-bottom:36px; }
.sfBrandLogo { width:44px; height:44px; object-fit:contain; }
.sfBrandName { font-size:1.3rem; font-weight:800; color:#fff; letter-spacing:-0.02em; }
.sfTimeline { position:relative; display:flex; justify-content:space-between; margin-bottom:40px; }
.sfTimelineLine { position:absolute; top:14px; left:14px; right:14px; height:1px; background:rgba(255,255,255,0.1); z-index:0; }
.sfTimelineStep { display:flex; flex-direction:column; align-items:center; gap:8px; z-index:1; }
.sfTimelineDot { width:28px; height:28px; border-radius:50%; border:1.5px solid rgba(255,255,255,0.15); background:#13131a; color:rgba(255,255,255,0.3); font-size:0.7rem; font-weight:600; display:flex; align-items:center; justify-content:center; transition:all 0.25s ease; }
.sfTimelineDot.done { background:#7c5cff; border-color:#7c5cff; color:#fff; }
.sfTimelineDot.current { border-color:#7c5cff; color:#7c5cff; box-shadow:0 0 0 4px rgba(124,92,255,0.18); }
.sfTimelineLabel { font-size:0.65rem; font-weight:500; color:rgba(255,255,255,0.25); letter-spacing:0.03em; text-transform:uppercase; white-space:nowrap; transition:color 0.2s; }
.sfTimelineLabel.current { color:#7c5cff; }
.sfTimelineLabel.done { color:rgba(255,255,255,0.5); }
.sfStepWrap { min-height:220px; position:relative; overflow:hidden; }
.sfStep { animation-duration:0.32s; animation-timing-function:cubic-bezier(0.22,1,0.36,1); animation-fill-mode:both; }
.sfStep--forward { animation-name:sfSlideInRight; }
.sfStep--back    { animation-name:sfSlideInLeft; }
.sfStepBody { display:flex; flex-direction:column; gap:0; }
.sfQuestion { font-size:1.45rem; font-weight:700; color:#fff; letter-spacing:-0.02em; margin:0 0 20px; line-height:1.25; }
.sfInput { width:100%; box-sizing:border-box; background:rgba(255,255,255,0.06); border:1.5px solid rgba(255,255,255,0.1); border-radius:10px; padding:13px 16px; color:#fff; font-size:1rem; outline:none; transition:border-color 0.18s; }
.sfInput::placeholder { color:rgba(255,255,255,0.25); }
.sfInput:focus { border-color:#7c5cff; background:rgba(124,92,255,0.08); }
.sfSlugRow { display:flex; align-items:center; gap:8px; margin-top:12px; background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.07); border-radius:8px; padding:6px 12px; }
.sfSlugLabel { font-size:0.75rem; color:rgba(255,255,255,0.4); white-space:nowrap; }
.sfSlugInput { flex:1; background:transparent; border:none; color:#a78bfa; font-size:0.85rem; font-family:monospace; outline:none; padding:2px 0; }
.sfHint { font-size:0.75rem; color:rgba(255,255,255,0.3); margin:8px 0 0; }
.sfNicheGrid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.sfNicheBtn { background:rgba(255,255,255,0.05); border:1.5px solid rgba(255,255,255,0.08); border-radius:10px; padding:12px 8px; cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:5px; transition:all 0.16s ease; color:rgba(255,255,255,0.6); }
.sfNicheBtn:hover { border-color:rgba(124,92,255,0.4); background:rgba(124,92,255,0.08); color:#fff; }
.sfNicheBtn.selected { border-color:#7c5cff; background:rgba(124,92,255,0.18); color:#fff; }
.sfNicheEmoji { font-size:1.25rem; }
.sfNicheLabel { font-size:0.68rem; font-weight:600; text-align:center; letter-spacing:0.01em; }
.sfPwWrap { position:relative; }
.sfEyeBtn { position:absolute; right:12px; top:50%; transform:translateY(-50%); background:none; border:none; color:rgba(255,255,255,0.4); cursor:pointer; padding:4px; display:flex; }
.sfEyeBtn:hover { color:#fff; }
.sfPwWrap .sfInput { padding-right:40px; }
.sfGenerateBtn { margin-top:10px; display:inline-flex; align-items:center; gap:6px; background:none; border:1px solid rgba(255,255,255,0.1); border-radius:7px; color:rgba(255,255,255,0.5); font-size:0.78rem; padding:6px 12px; cursor:pointer; transition:all 0.16s; }
.sfGenerateBtn:hover { border-color:#7c5cff; color:#7c5cff; }
.sfError { font-size:0.8rem; color:#f87171; padding:8px 12px; background:rgba(248,113,113,0.08); border-radius:7px; border:1px solid rgba(248,113,113,0.2); }
.sfNextBtn { width:100%; margin-top:20px; padding:13px; background:#7c5cff; color:#fff; border:none; border-radius:10px; font-size:0.95rem; font-weight:600; cursor:pointer; letter-spacing:0.01em; transition:background 0.18s,transform 0.1s; }
.sfNextBtn:hover:not(:disabled) { background:#6d4ef0; }
.sfNextBtn:active:not(:disabled) { transform:scale(0.98); }
.sfNextBtn:disabled { opacity:0.5; cursor:not-allowed; }
.sfFooter { display:flex; align-items:center; justify-content:space-between; margin-top:20px; min-height:28px; }
.sfBackBtn { display:inline-flex; align-items:center; gap:5px; background:none; border:none; color:rgba(255,255,255,0.35); font-size:0.8rem; cursor:pointer; padding:4px 0; transition:color 0.15s; }
.sfBackBtn:hover { color:#fff; }
.sfSignInLink { font-size:0.78rem; color:rgba(255,255,255,0.3); background:none; border:none; cursor:pointer; padding:0; transition:color 0.15s; }
.sfSignInLink:hover { color:#7c5cff; }
.sfSuccessOverlay { position:fixed; inset:0; z-index:9998; display:flex; align-items:center; justify-content:center; background:rgba(7,7,14,0.75); backdrop-filter:blur(6px); animation:sfFadeIn 0.3s ease; }
.sfSuccessCard { text-align:center; animation:sfPopIn 0.45s cubic-bezier(0.34,1.56,0.64,1); }
.sfSuccessIcon { font-size:5rem; margin-bottom:16px; display:block; }
.sfSuccessTitle { font-size:2.5rem; font-weight:800; color:#fff; margin:0 0 8px; letter-spacing:-0.03em; }
.sfSuccessSub { font-size:1rem; color:rgba(255,255,255,0.5); margin:0; }
@media (max-width:520px) { .sfCard { padding:28px 20px 24px; } .sfQuestion { font-size:1.2rem; } .sfNicheGrid { grid-template-columns:repeat(2,1fr); } }

/* ── SessionWatchdog overlay ─────────────────────────────────────────── */
.sw-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: swFadeIn 0.25s ease;
}
@keyframes swFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.sw-card {
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 40px 36px 32px;
  max-width: 380px;
  width: calc(100% - 40px);
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  animation: swSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes swSlideUp {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.sw-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
  display: block;
}
.sw-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}
.sw-body {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
  margin: 0 0 24px;
}
.sw-body strong {
  color: rgba(255, 255, 255, 0.85);
  font-variant-numeric: tabular-nums;
}
.sw-btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--obra-accent, #7c6fff);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.sw-btn:hover { opacity: 0.88; }


/* ── Signal Shop ── */
.signal-shop-intro { display: flex; align-items: flex-start; gap: 14px; background: var(--obra-surface-2); border: 1px solid var(--obra-border); border-radius: var(--radius-lg); padding: 18px 20px; margin-bottom: 24px; }
.signal-shop-intro__icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.signal-shop-intro__title { font-size: 13.5px; font-weight: 700; color: var(--obra-text); margin-bottom: 4px; }
.signal-shop-intro__sub { font-size: 12px; color: var(--obra-text-muted); line-height: 1.55; }
/* How it works strip */
.signal-hiw { display: flex; align-items: flex-start; gap: 0; background: var(--obra-surface-2); border: 1px solid var(--obra-border); border-radius: var(--radius-lg); padding: 20px 24px; margin-bottom: 24px; }
.signal-hiw-step { display: flex; align-items: flex-start; gap: 12px; flex: 1; }
.signal-hiw-icon { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.signal-hiw-title { font-size: 13px; font-weight: 700; color: var(--obra-text); margin-bottom: 3px; }
.signal-hiw-desc { font-size: 11.5px; color: var(--obra-text-muted); line-height: 1.5; }
.signal-hiw-arrow { font-size: 16px; color: var(--obra-border); padding: 0 16px; margin-top: 10px; flex-shrink: 0; }

.signal-shop-category { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--obra-text-muted); margin-bottom: 14px; }
.signal-shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.signal-product-card { background: var(--obra-surface-2); border: 1px solid var(--obra-border); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 10px; position: relative; transition: border-color .15s; }
.signal-product-card:hover { border-color: var(--obra-accent); }
.signal-product-card--ai { border-color: rgba(124,92,255,.25); background: rgba(124,92,255,.04); }
.signal-product-card--ai:hover { border-color: #7c5cff; }
.signal-product-card--branded { border-color: rgba(251,191,36,.25); background: rgba(251,191,36,.04); }
.signal-product-card--branded:hover { border-color: #fbbf24; }
.signal-product-badge { display: inline-flex; align-items: center; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 20px; background: var(--obra-surface-3); color: var(--obra-text-muted); border: 1px solid var(--obra-border); align-self: flex-start; }
.signal-product-badge--ai { background: rgba(124,92,255,.15); color: #a78bfa; border-color: rgba(124,92,255,.3); }
.signal-product-badge--branded { background: rgba(251,191,36,.15); color: #fbbf24; border-color: rgba(251,191,36,.3); }
.signal-product-icon { font-size: 28px; line-height: 1; }
.signal-product-img { width: 100%; height: 160px; border-radius: 8px; overflow: hidden; margin-bottom: 12px; background: var(--obra-surface-3); }
.signal-product-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.signal-product-name { font-size: 14px; font-weight: 800; color: var(--obra-text); letter-spacing: -.01em; }
.signal-product-desc { font-size: 12px; color: var(--obra-text-muted); line-height: 1.55; }
.signal-product-features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.signal-product-features li { font-size: 11.5px; color: var(--obra-text-muted); padding-left: 14px; position: relative; line-height: 1.4; }
.signal-product-features li::before { content: '✓'; position: absolute; left: 0; color: var(--obra-accent); font-weight: 700; font-size: 10px; top: 1px; }
.signal-product-price { font-size: 22px; font-weight: 800; color: var(--obra-text); letter-spacing: -.03em; }
.signal-order-btn { width: 100%; background: var(--obra-accent); color: #000; border: none; border-radius: var(--radius-md); padding: 10px 0; font-size: 13px; font-weight: 700; cursor: pointer; transition: opacity .15s; margin-top: 4px; }
.signal-order-btn:hover { opacity: .85; }
.signal-order-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Signal tab — responsive layout */
@media (max-width: 900px) {
  .signal-layout { grid-template-columns: 1fr; gap: 24px; }
  .signal-col-left { position: static; }
  .signal-page { padding: 24px 20px; }
  .signal-hiw { flex-direction: column; gap: 12px; }
  .signal-hiw-arrow { display: none; }
}
@media (max-width: 600px) {
  .signal-page { padding: 16px; }
  .signal-shop-grid { grid-template-columns: 1fr; }
}

/* App config modal (WhatsApp + future config apps) */
.app-config-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.app-config-modal { background: var(--obra-surface-1); border: 1px solid var(--obra-border); border-radius: var(--radius-lg); padding: 28px 28px 24px; max-width: 400px; width: 100%; display: flex; flex-direction: column; gap: 20px; }
.app-config-modal__header { display: flex; align-items: flex-start; gap: 14px; }
.app-config-modal__icon { font-size: 28px; flex-shrink: 0; }
.app-config-modal__title { font-size: 15px; font-weight: 800; color: var(--obra-text); margin-bottom: 3px; }
.app-config-modal__sub { font-size: 12.5px; color: var(--obra-text-muted); }
.app-config-modal__field { display: flex; flex-direction: column; gap: 6px; }
.app-config-modal__label { font-size: 12px; font-weight: 600; color: var(--obra-text); }
.app-config-modal__input { width: 100%; background: var(--obra-surface-2); border: 1px solid var(--obra-border); border-radius: var(--radius-md); color: var(--obra-text); font-size: 14px; padding: 10px 12px; outline: none; transition: border-color .15s; box-sizing: border-box; }
.app-config-modal__input:focus { border-color: var(--obra-accent); }
.app-config-modal__hint { font-size: 11px; color: var(--obra-text-muted); }
.app-config-modal__actions { display: flex; gap: 10px; justify-content: flex-end; }
.app-config-modal__btn { padding: 9px 20px; border-radius: var(--radius-md); font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid var(--obra-border); transition: opacity .15s; }
.app-config-modal__btn--cancel { background: var(--obra-surface-2); color: var(--obra-text-muted); }
.app-config-modal__btn--cancel:hover { opacity: .7; }
.app-config-modal__btn--install { background: var(--obra-accent); color: #fff; border-color: var(--obra-accent); }
.app-config-modal__btn--install:hover { opacity: .85; }
