/* ============================================================
   SelfHostedERP showcase — 1:1 with the real app.
   Tokens copied from apps/web/src/app/globals.css.
   ============================================================ */

:root{
  --bg:        #0a0a0a;
  --surface:   #111111;
  --surface-2: #161616;
  --surface-3: #1c1c1c;
  --surface-hover: #1a1a1a;

  --line:      rgba(255,255,255,.06);
  --line-2:    rgba(255,255,255,.10);

  --text:  #ededed;
  --muted: #a1a1a1;
  --faint: #717171;
  --dim:   #525252;

  --accent: #818cf8;
  --accent-strong: #6366f1;
  --accent-soft: rgba(129, 140, 248, 0.12);
  --accent-glow: rgba(129, 140, 248, 0.25);

  --cat-erp: #818cf8;
  --cat-seo: #34d399;
  --cat-marketing: #fbbf24;
  --cat-ads: #f472b6;
  --cat-analytics: #a78bfa;
  --cat-automation: #22d3ee;

  --ok:   #34d399;
  --warn: #fbbf24;
  --err:  #f87171;
}

/* accent swap */
.stage[data-accent="indigo"]  { --accent:#818cf8; --accent-strong:#6366f1; --accent-soft:rgba(129,140,248,.12); --accent-glow:rgba(129,140,248,.25); }
.stage[data-accent="emerald"] { --accent:#34d399; --accent-strong:#10b981; --accent-soft:rgba(52,211,153,.12);  --accent-glow:rgba(52,211,153,.25); }
.stage[data-accent="amber"]   { --accent:#fbbf24; --accent-strong:#f59e0b; --accent-soft:rgba(251,191,36,.14);  --accent-glow:rgba(251,191,36,.3); }
.stage[data-accent="red"]     { --accent:#ef4444; --accent-strong:#dc2626; --accent-soft:rgba(239,68,68,.14);   --accent-glow:rgba(239,68,68,.3); }
.stage[data-accent="red2"]    { --accent:#f87171; --accent-strong:#ef4444; --accent-soft:rgba(248,113,113,.14); --accent-glow:rgba(248,113,113,.3); }
.stage[data-accent="violet"]  { --accent:#a78bfa; --accent-strong:#8b5cf6; --accent-soft:rgba(167,139,250,.14); --accent-glow:rgba(167,139,250,.3); }
.stage[data-accent="cyan"]    { --accent:#22d3ee; --accent-strong:#06b6d4; --accent-soft:rgba(34,211,238,.14);  --accent-glow:rgba(34,211,238,.3); }
.stage[data-accent="rose"]    { --accent:#fb7185; --accent-strong:#f43f5e; --accent-soft:rgba(251,113,133,.14); --accent-glow:rgba(251,113,133,.3); }
.stage[data-accent="steel"]   { --accent:#94a3b8; --accent-strong:#64748b; --accent-soft:rgba(148,163,184,.14); --accent-glow:rgba(148,163,184,.28); }

*{ box-sizing: border-box; }
html, body{ margin: 0; padding: 0; }
body{
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-feature-settings: "cv11","ss01","ss02";
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  min-height: 100vh;
}
.mono{ font-family:'JetBrains Mono', ui-monospace, monospace; font-size:.92em; }
.muted{ color: var(--muted); }
.dim{ color: var(--faint); }
.small{ font-size: 12px; }
.center{ text-align:center; }
.inline{ display:inline; }

i[data-icon]{ display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; line-height:0; }
i[data-icon] svg{ display:block; }

.eyebrow{
  font-size: 11px; text-transform: uppercase; letter-spacing: .14em;
  color: var(--muted); font-weight: 600; margin: 0;
}
.eyebrow.inline{ display:inline; margin: 0; }

/* =========================================================
   Stage + ambient
   ========================================================= */
.stage{ position: relative; width: 100vw; height: 100vh; overflow: hidden; transition: background .8s ease; }
.aurora{
  position: absolute; inset: -20%;
  background:
    radial-gradient(40% 35% at 20% 20%, var(--accent-glow), transparent 60%),
    radial-gradient(35% 30% at 80% 30%, rgba(167,139,250,.18), transparent 65%),
    radial-gradient(45% 40% at 60% 90%, rgba(34,211,238,.10), transparent 70%);
  filter: blur(40px) saturate(120%);
  opacity: .55;
  animation: aurora-drift 22s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes aurora-drift{
  0%   { transform: translate(0,0) rotate(0deg); }
  100% { transform: translate(-4%, 3%) rotate(8deg); }
}

/* =========================================================
   Scenes
   ========================================================= */
.scene{
  position: absolute; inset: 0;
  display:flex; align-items:center; justify-content:center;
  opacity: 0; pointer-events: none;
  transition: opacity .55s ease, transform .55s ease;
  transform: scale(.985);
}
.scene.active{ opacity: 1; pointer-events: auto; transform: scale(1); }

/* =========================================================
   Brand
   ========================================================= */
.brand-mark{
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, #93c5fd, #3b82f6);
  display:inline-grid; place-items:center;
  color: #0a0a0a; font-weight: 800; font-size: 13px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset;
  flex-shrink: 0;
}
.brand-mark.large{ width: 56px; height: 56px; border-radius: 13px; font-size: 26px; margin-right: 14px; vertical-align: middle; }
.brand-name{ font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.brand-name.large{ font-size: 36px; font-weight: 800; vertical-align: middle; }

/* =========================================================
   Title scenes
   ========================================================= */
.title-wrap{ text-align:center; padding: 32px; max-width: 780px; }
.title-brand{ margin-bottom: 24px; display:inline-flex; align-items:center; }
.subtitle{ font-size: 18px; color: var(--muted); margin: 0 0 28px; font-weight: 400; max-width: 600px; margin-left:auto; margin-right:auto; }
.title-meta{ display:flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pill{
  padding: 6px 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line-2);
  font-size: 12px; color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px;
}
.pill.small{ padding: 3px 9px; font-size: 11px; }
.pill--ok{ background: rgba(52,211,153,.10); color: var(--ok); border-color: rgba(52,211,153,.25); }
.pill--accent{ background: var(--accent-soft); color: var(--accent); border-color: rgba(129,140,248,.3); }
.dot{ width: 6px; height: 6px; border-radius: 50%; background: var(--faint); display: inline-block; }
.dot--ok{ background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.dot--warn{ background: var(--warn); }
.dot--err{ background: var(--err); }

/* =========================================================
   Onboarding wizard
   ========================================================= */
.wizard{
  width: 540px; max-width: 92vw;
  display:flex; flex-direction: column; align-items: stretch;
  padding: 24px;
}
.wizard-brand{ display:flex; align-items:center; gap: 10px; justify-content:center; margin-bottom: 24px; }
.wizard-h1{ font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 28px; text-align:center; }
.wizard-progress{ display:flex; align-items:center; justify-content:center; gap: 20px; margin-bottom: 24px; }
.wprog{ display:inline-flex; align-items:center; gap: 8px; color: var(--faint); font-size: 13px; }
.wprog.active{ color: var(--text); }
.wprog.done{ color: var(--muted); }
.wprog__dot{
  width: 22px; height: 22px; border-radius: 50%;
  display:inline-grid; place-items:center;
  font-size: 11px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--line-2);
  color: var(--muted);
}
.wprog.active .wprog__dot{ background: var(--accent); color: #0a0a0a; border-color: var(--accent); }
.wprog.done .wprog__dot{ background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

.wcard{
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 24px 24px;
}
.wcard h2{ font-size: 18px; margin: 0 0 4px; letter-spacing:-.01em; }
.wcard > p.muted{ margin: 0 0 18px; font-size: 13px; }

.wfield{ display:flex; flex-direction: column; gap: 6px; }
.wfield > span{ font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 500; }
.wfield input{
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 8px;
  padding: 10px 12px; font-size: 14px; font-family: inherit;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.wfield input:focus{ border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.wmods{ list-style: none; padding: 0; margin: 4px 0 0; display:flex; flex-direction: column; gap: 8px; }
.wmods li{
  display:grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center;
  padding: 12px 14px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 10px;
}
.wmod-ic{
  width: 32px; height: 32px; border-radius: 8px;
  display:grid; place-items:center; flex-shrink: 0;
  color: var(--mc, var(--accent));
  background: color-mix(in srgb, var(--mc, var(--accent)) 14%, transparent);
}
.wmod-info{ display:flex; flex-direction: column; gap: 2px; min-width: 0; }
.wmod-name{ font-size: 14px; font-weight: 600; display:inline-flex; align-items:center; }
.wmod-blurb{ font-size: 12px; color: var(--muted); }
.chip.ok{ background: rgba(52,211,153,.14); color: var(--ok); padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 600; }

.wsummary{ list-style:none; padding: 0; margin: 4px 0 0; display:flex; flex-direction: column; gap: 0; }
.wsummary li{
  display:flex; justify-content: space-between; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.wsummary li:last-child{ border-bottom: 0; }
.wsum-label{ color: var(--muted); display: inline-flex; align-items:center; gap: 8px; }
.wsum-val{ font-weight: 500; }

.wnav{ display:flex; justify-content: space-between; margin-top: 18px; }

.btn-ghost, .btn-primary{
  font-family: inherit; cursor: pointer;
  padding: 9px 16px; font-size: 13px; font-weight: 500;
  border-radius: 8px; border: 1px solid transparent;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.btn-ghost{ background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover{ background: var(--surface-2); }
.btn-ghost.small{ padding: 6px 11px; font-size: 12px; }
.btn-primary{
  background: var(--accent); color: #0a0a0a; font-weight: 600;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-primary:hover{ transform: translateY(-1px); background: var(--accent-strong); color: #fff; }
.btn-primary.flash{ animation: flash .55s; }
@keyframes flash{
  0%{ transform: scale(1); }
  50%{ transform: scale(.95); box-shadow: 0 0 0 10px var(--accent-soft); }
  100%{ transform: scale(1); }
}

/* toggle */
.toggle{
  width: 32px; height: 18px; border-radius: 999px;
  background: var(--surface-3); border: 1px solid var(--line-2);
  position: relative; flex-shrink: 0; cursor: pointer;
  transition: background .2s, border-color .2s;
}
.toggle span{
  position: absolute; top: 1px; left: 1px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--muted);
  transition: transform .2s, background .2s;
}
.toggle.on{ background: var(--accent); border-color: var(--accent); }
.toggle.on span{ transform: translateX(14px); background: #0a0a0a; }
.toggle.locked{ opacity: .85; cursor: not-allowed; }

/* =========================================================
   App shell (lobby + ERP + settings)
   ========================================================= */
.app{
  width: min(98vw, 1440px); height: min(96vh, 900px);
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  display:flex; flex-direction: column;
}

/* topbar */
.topbar{
  height: 56px; flex-shrink: 0;
  display:grid; grid-template-columns: 1fr auto 1fr;
  align-items:center; gap: 16px;
  padding: 0 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.topbar__left{ display:flex; align-items:center; gap: 14px; min-width: 0; }
.topbar__center{ display:flex; justify-content:center; }
.topbar__right{ display:flex; justify-content:flex-end; align-items:center; gap: 10px; }

.topcrumb{ font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 500; }
.topcrumb.strong{ color: var(--text); font-weight: 600; }
.topcrumb__sep{ color: var(--dim); font-size: 13px; }

.search{
  width: 320px; max-width: 32vw;
  display:flex; align-items:center; gap: 8px;
  padding: 7px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 8px;
}
.search.inline{ width: 360px; max-width: 100%; }
.search__ic{ color: var(--faint); }
.search input{ background: transparent; border: 0; outline: 0; color: var(--text); font-family: inherit; font-size: 13px; flex: 1; min-width: 0; }
.search input::placeholder{ color: var(--faint); }
.kbd{
  font-size: 11px; padding: 1px 6px; border-radius: 4px;
  background: var(--surface-3); color: var(--muted);
  border: 1px solid var(--line-2);
  font-family: 'JetBrains Mono', monospace;
}

.icon-btn{
  width: 32px; height: 32px; border-radius: 8px;
  background: transparent; border: 0; color: var(--muted); cursor: pointer;
  display:grid; place-items:center;
}
.icon-btn:hover{ background: var(--surface-2); color: var(--text); }

.id-chip{
  display:flex; align-items:center; gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
}
.avatar{
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, #c084fc, #a855f7);
  display:grid; place-items:center;
  color: #fff; font-weight: 700; font-size: 11px;
}
.avatar.accent-bg{ background: linear-gradient(135deg, #c084fc, #a855f7); }
.id-meta{ line-height: 1; }
.id-name{ font-size: 12px; font-weight: 600; }
.role-chip{
  font-size: 10px; padding: 2px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 600;
  text-transform: capitalize;
}

/* app body — sidebar + main */
.app-body{ flex: 1; display: grid; grid-template-columns: 248px 1fr; min-height: 0; }

/* workspace sidebar */
.ws-sidebar{
  background: var(--bg);
  border-right: 1px solid var(--line);
  padding: 10px 10px 10px;
  display:flex; flex-direction: column;
  overflow-y: auto;
}
.ws-brand{
  display:flex; align-items:center; gap: 10px;
  padding: 8px 8px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  margin-bottom: 12px;
  position: relative;
}
.ws-brand__av{
  width: 28px; height: 28px; border-radius: 6px;
  background: linear-gradient(135deg, #93c5fd, #38bdf8);
  display:grid; place-items:center;
  color:#0a0a0a; font-weight:700; font-size: 11px;
  flex-shrink: 0;
}
.ws-brand__meta{ flex:1; line-height: 1.15; min-width:0; }
.ws-brand__name{ font-size: 13px; font-weight: 600; }
.ws-brand__slug{ font-size: 11px; color: var(--faint); font-family: 'JetBrains Mono', monospace; }
.ws-brand__collapse{ color: var(--faint); }

.ws-section{
  font-size: 10px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--faint); padding: 16px 12px 6px; font-weight: 500;
}
.ws-row{
  display:flex; align-items:center; gap: 12px;
  padding: 8px 12px; margin: 1px 0;
  font-size: 13px; color: var(--muted);
  border-radius: 8px; cursor: pointer; text-decoration: none;
  position: relative;
  transition: background .15s, color .15s;
}
.ws-row > span:not(.status-dot){ flex: 1; }
.ws-row:hover{ background: var(--surface-2); color: var(--text); }
.ws-row.active{ background: var(--accent-soft); color: var(--text); }
.ws-row.active::before{
  content:""; position: absolute; left: -10px; top: 6px; bottom: 6px;
  width: 3px; background: var(--accent); border-radius: 0 2px 2px 0;
}
.status-dot{
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--faint); flex-shrink: 0;
}
.status-dot.ok{ background: var(--ok); box-shadow: 0 0 6px var(--ok); }

.ws-user{
  display:flex; align-items:center; gap: 10px;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  margin-top: auto;
}
.ws-user__av{
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #c084fc, #a855f7);
  display:grid; place-items:center;
  color: #fff; font-weight: 700; font-size: 11px;
}
.ws-user__meta{ line-height: 1.15; }
.ws-user__name{ font-size: 13px; font-weight: 600; }
.ws-user__role{ font-size: 10px; color: var(--faint); letter-spacing: .12em; }

/* =========================================================
   Lobby (workspace home)
   ========================================================= */
.ws-main{
  overflow-y: auto;
  padding: 28px 32px 40px;
}
.ws-hero{ display:flex; justify-content:space-between; align-items: flex-start; margin-bottom: 28px; gap: 24px; }
.ws-hero h1{ font-size: 30px; font-weight: 700; letter-spacing:-.02em; margin: 0 0 4px; }
.ws-hero .muted{ font-size: 14px; }
.ws-hero__chips{ display:flex; gap: 8px; flex-shrink:0; }

.ws-stats{
  display:grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 12px;
  margin-bottom: 32px;
}
.ws-stat{
  padding: 14px 16px;
  background: var(--surface);
  border:1px solid var(--line);
  border-radius: 12px;
  display:flex; flex-direction: column; gap: 8px;
}
.ws-stat__head{ display:flex; align-items:center; gap: 6px; color: var(--muted); }
.ws-stat__head i{ color: var(--muted); }
.ws-stat__big{ font-size: 24px; font-weight: 700; letter-spacing: -.02em; display:flex; align-items:baseline; gap: 4px; }
.ws-stat__big span{ font-size: 14px; color: var(--faint); font-weight: 500; }
.ws-stat__big b{ font-weight: 700; }
.ws-bar{ height: 4px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.ws-bar__fill{ height: 100%; background: var(--accent); border-radius: 999px; }
.qa{ list-style:none; padding: 0; margin: 0; display:flex; flex-direction: column; gap: 8px; }
.qa li{ display:flex; align-items:center; gap: 8px; font-size: 13px; color: var(--text); }
.qa li i{ color: var(--accent); }

.rooms-head{ display:flex; align-items:baseline; justify-content:space-between; margin-bottom: 14px; }
.rooms-head h2{ font-size: 18px; font-weight: 700; margin: 0; }

.rooms{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 28px; }
.room-card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  cursor: pointer; text-decoration: none; color: var(--text);
  transition: transform .15s, border-color .15s, box-shadow .15s;
  display:flex; flex-direction: column; gap: 10px;
}
.room-card:hover{ transform: translateY(-2px); border-color: var(--rc); box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.room-card__top{ display:flex; justify-content:space-between; align-items:center; }
.room-card__ic{
  width: 36px; height: 36px; border-radius: 9px;
  background: color-mix(in srgb, var(--rc) 14%, transparent);
  color: var(--rc);
  display:grid; place-items:center;
}
.room-card__title{ font-size: 15px; font-weight: 700; }
.room-card__blurb{ font-size: 12px; }
.room-card__foot{ display:flex; justify-content:space-between; align-items:center; margin-top: 2px; }
.cat-tag{
  font-size: 10px; font-weight: 700; letter-spacing: .12em;
  color: var(--rc); text-transform: uppercase;
}

.lobby-bottom{ display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.panel{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
}
.panel-head{
  display:flex; justify-content:space-between; align-items:center;
  font-size: 13px; font-weight: 600; color: var(--muted);
  margin-bottom: 12px;
}
.panel-head b{ color: var(--text); }
.panel-empty{ text-align: center; padding: 24px 0; font-size: 13px; }
.team-row{ display:flex; align-items:center; gap: 10px; font-size: 13px; }
.team-row > div:nth-child(2){ flex:1; }
.setup-list{ list-style:none; padding: 0; margin: 0; display:flex; flex-direction: column; gap: 8px; font-size: 13px; }
.setup-list li{ display:flex; align-items:center; gap: 8px; color: var(--muted); }
.check{
  width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--surface-2);
  display:inline-grid; place-items:center; color: transparent;
  flex-shrink: 0;
}
.check.on{ background: var(--accent); border-color: var(--accent); color: #0a0a0a; }
.check.on i{ color: #0a0a0a; }

/* =========================================================
   ERP shell (dual sidebar)
   ========================================================= */
.erp-main{
  overflow-y: auto;
  padding: 18px 24px 32px;
  display:flex; flex-direction: column;
}
.back-link{
  background: transparent; border: 1px solid var(--line-2);
  color: var(--muted); cursor: pointer;
  padding: 6px 12px; border-radius: 8px;
  font-size: 12px; font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px;
  width: max-content;
  margin-bottom: 14px;
}
.back-link:hover{ color: var(--text); background: var(--surface-2); }

.erp-grid{ flex: 1; display: grid; grid-template-columns: 244px 1fr; gap: 18px; min-height: 0; }
.erp-rail{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 8px;
  overflow-y: auto;
}
.erp-rail__head{
  display:flex; align-items:center; gap: 10px;
  padding: 6px 10px 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.erp-rail__ic{
  width: 32px; height: 32px; border-radius: 7px;
  background: var(--accent-soft); color: var(--accent);
  display:grid; place-items:center;
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
}
.erp-rail__ic.settings-ic{ background: var(--surface-3); color: var(--muted); }
.erp-rail__name{ font-size: 13px; font-weight: 600; }

.erp-section{
  font-size: 10px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--faint); padding: 12px 12px 4px;
}
.erp-row{
  display:flex; align-items:center; gap: 10px;
  padding: 7px 10px;
  font-size: 13px; color: var(--muted);
  border-radius: 7px; cursor: pointer; text-decoration: none;
  margin: 1px 0;
  position: relative;
}
.erp-row > span:not(.count){ flex: 1; }
.erp-row > div:nth-child(2){ flex: 1; line-height: 1.25; }
.erp-row:hover{ background: var(--surface-2); color: var(--text); }
.erp-row.active{ background: var(--accent-soft); color: var(--accent); }
.erp-row.active i{ color: var(--accent); }
.erp-row.active::before{
  content:""; position: absolute; left: -8px; top: 6px; bottom: 6px;
  width: 3px; background: var(--accent); border-radius: 0 2px 2px 0;
}
.count{
  font-size: 10px; color: var(--faint);
  padding: 1px 6px; border-radius: 999px;
  background: var(--surface-3);
}

.settings-rail .erp-row{ align-items: flex-start; padding: 10px; }
.settings-rail .erp-row i{ margin-top: 2px; }

.erp-content{ overflow-y: auto; padding-right: 4px; }
.bcrumb{ display:flex; align-items:center; gap:6px; margin-bottom: 8px; }
.page-head{ display:flex; justify-content:space-between; align-items:flex-end; gap: 16px; margin-bottom: 24px; }
.page-head h1{ font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 4px; }
.page-head .muted{ font-size: 13px; }
.per-browser-tag{
  font-size: 10px; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-3); color: var(--muted);
  letter-spacing: .12em; font-weight: 600;
}

/* empty hero (ERP overview build-your-first-entity card) */
.empty-hero{
  display:grid; grid-template-columns: auto 1fr auto; align-items:center; gap: 20px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 18px;
}
.empty-hero__ic{
  width: 56px; height: 56px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
  display:grid; place-items:center;
}
.empty-hero__body h3{ font-size: 17px; margin: 0 0 4px; font-weight: 700; }
.empty-hero__body p{ font-size: 13px; color: var(--muted); margin: 0; max-width: 540px; line-height: 1.5; }

.stat-row{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.stat-card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
}
.stat-card__label{ font-size: 11px; color: var(--muted); letter-spacing: .12em; font-weight: 600; margin-bottom: 8px; }
.stat-card__val{ font-size: 32px; font-weight: 700; letter-spacing: -.02em; }

/* customers empty */
.list-toolbar{ display:flex; justify-content:space-between; align-items:center; margin-bottom: 24px; }
.list-toolbar__right{ display:flex; align-items:center; gap: 12px; }
.seg{
  display:inline-flex; gap: 0;
  background: var(--surface-2); border: 1px solid var(--line-2);
  border-radius: 7px; padding: 2px;
}
.seg a{
  padding: 5px 12px; font-size: 12px;
  color: var(--muted); border-radius: 5px; cursor: pointer;
}
.seg a.active{ background: var(--surface); color: var(--text); }
.seg.small a{ padding: 4px 10px; font-size: 11px; }

.empty-center{
  text-align: center;
  padding: 60px 0;
  display:flex; flex-direction: column; align-items:center; gap: 14px;
}
.empty-center__ic{
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--line-2);
  color: var(--muted);
  display:grid; place-items:center;
}
.empty-center h3{ font-size: 18px; font-weight: 600; margin: 0; }
.empty-center p{ font-size: 13px; color: var(--muted); margin: 0; line-height: 1.6; }

/* settings -> modules */
.tabs{ display:flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs a{
  padding: 10px 14px; font-size: 13px; color: var(--muted);
  cursor: pointer; border-bottom: 2px solid transparent;
}
.tabs a.active{ color: var(--text); border-bottom-color: var(--accent); }

.ent-panel .panel-head{ align-items: flex-start; margin-bottom: 12px; }
.ent-panel .panel-head > div:first-child b{ font-size: 14px; }
.ent-actions{ display:flex; align-items:center; gap: 14px; flex-shrink: 0; }
.link{ color: var(--accent); font-size: 13px; cursor:pointer; display:inline-flex; align-items:center; gap: 4px; }

.ent-list{ list-style:none; padding: 0; margin: 0; display:flex; flex-direction: column; gap: 0; }
.ent-list li{
  display:grid; grid-template-columns: 24px 1fr auto auto auto; gap: 14px; align-items: center;
  padding: 12px 4px;
  border-top: 1px solid var(--line);
}
.ent-list li i{ color: var(--muted); }
.ent-meta b{ font-size: 13px; font-weight: 600; }
.sys-tag{
  font-size: 10px; padding: 2px 8px; border-radius: 4px;
  background: var(--surface-3); color: var(--muted);
  letter-spacing: .1em; font-weight: 600;
}
.section-title{ font-size: 14px; font-weight: 600; margin: 24px 0 4px; }
.sub-row{
  display:grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  margin-top: 8px;
}
.sub-row > i{ color: var(--muted); }
.sub-row > div b{ font-size: 13px; }

/* appearance */
.ap-row{
  display:grid; grid-template-columns: 240px 1fr; gap: 32px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.ap-row:first-of-type{ border-top: 0; }
.ap-meta b{ font-size: 14px; font-weight: 600; }
.ap-meta .muted{ font-size: 12px; margin-top: 4px; }

.ap-accent{ display:flex; flex-direction: column; gap: 12px; }
.ap-swatches{ display:flex; gap: 10px; flex-wrap: wrap; }
.ap-swatches button{
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--sw); border: 2px solid transparent;
  cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s;
}
.ap-swatches button:hover{ transform: scale(1.12); }
.ap-swatches button.active{ border-color: #fff; box-shadow: 0 0 0 2px var(--sw); }

.ap-bgs{ display:grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.bg-card{
  height: 76px; border-radius: 10px;
  border: 1px solid var(--line-2); cursor: pointer;
  position: relative; padding: 0;
  display:flex; align-items:flex-end; justify-content:flex-start;
  color: var(--text);
  transition: transform .15s, border-color .15s;
}
.bg-card:hover{ transform: translateY(-2px); }
.bg-card.active{ border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.bg-card span{
  position: absolute; left: 10px; bottom: 8px;
  font-size: 11px; font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}

/* =========================================================
   Mocked rooms montage
   ========================================================= */
.montage{
  width: min(96vw, 1380px); height: min(92vh, 820px);
  display:grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 14px;
}
.mock{
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 16px 18px;
  display:flex; flex-direction: column; gap: 12px;
  overflow: hidden;
}
.mock--seo{ grid-row: 1 / span 2; grid-column: 1; }
.mock--marketing{ grid-row: 1; grid-column: 2; }
.mock--ads{ grid-row: 1; grid-column: 3; }
.mock--analytics{ grid-row: 2; grid-column: 2; }
.mock--automation{ grid-row: 2; grid-column: 3; }
.mock-head{
  display:flex; align-items:center; gap: 8px;
  font-size: 13px; font-weight: 600;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.mock--seo .mock-head__ic{ color: var(--cat-seo); }
.mock--marketing .mock-head__ic{ color: var(--cat-marketing); }
.mock--ads .mock-head__ic{ color: var(--cat-ads); }
.mock--analytics .mock-head__ic{ color: var(--cat-analytics); }
.mock--automation .mock-head__ic{ color: var(--cat-automation); }
.badge{
  margin-left: auto;
  font-size: 10px; padding: 2px 8px; border-radius: 999px;
  background: var(--surface-3); color: var(--muted); border:1px solid var(--line-2);
  text-transform: uppercase; letter-spacing: .06em;
}
.badge.live{ background: rgba(52,211,153,.14); color: var(--ok); border-color: rgba(52,211,153,.3); }
.mock-stats{ display:flex; gap: 18px; }
.mock-stats > div{ flex: 1; }
.mock-stats b{ font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.spark{ width:100%; height: auto; max-height: 140px; }
.kw-list{ display:flex; flex-direction: column; gap: 6px; font-size: 13px; }
.kw{ display:flex; justify-content:space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.kw:last-child{ border-bottom: 0; }
.kw b{ color: var(--ok); font-family: 'JetBrains Mono', monospace; font-size: 12px; }

.cal{ display:grid; grid-template-columns: repeat(7, 1fr); gap: 6px; flex:1; }
.cal-day{
  background: var(--surface-2); border-radius: 7px; padding: 8px;
  display:flex; flex-direction: column; gap: 4px; min-height: 0;
}
.cal-day b{ font-size: 10px; color: var(--faint); text-transform: uppercase; }
.ev{ font-size: 10px; padding: 3px 6px; border-radius: 4px; line-height:1.2; }
.ev.amber{ background: rgba(251,191,36,.14); color: var(--cat-marketing); }
.ev.pink{ background: rgba(244,114,182,.14); color: var(--cat-ads); }
.ev.cyan{ background: rgba(34,211,238,.14); color: var(--cat-automation); }

.creatives{ display:flex; flex-direction:column; gap: 8px; flex:1; }
.creative{ display:flex; gap: 10px; align-items:center; background: var(--surface-2); padding: 8px; border-radius: 7px; }
.creative-img{ width: 44px; height: 44px; border-radius: 6px; flex-shrink: 0; }
.creative-meta b{ font-size: 12px; }

.bars{ display:flex; align-items:flex-end; gap: 4px; flex:1; padding-top: 8px; }
.bars div{
  flex: 1; height: var(--h);
  background: linear-gradient(180deg, var(--cat-analytics), transparent);
  border-radius: 4px 4px 0 0; min-height: 4px;
}

.flow{ display:flex; align-items:center; flex-wrap: wrap; gap: 6px; padding: 14px 0; }
.node{
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  font-size: 12px; font-weight: 500;
}
.node.ok{ border-color: var(--ok); color: var(--ok); background: rgba(52,211,153,.08); }
.edge{ flex: 0 0 18px; height: 1px; background: var(--line-2); position: relative; }
.edge::after{ content:""; position: absolute; right: -2px; top: -3px; width: 0; height: 0; border-left: 5px solid var(--muted); border-top: 3px solid transparent; border-bottom: 3px solid transparent; }
.flow-meta{ margin-top: auto; }

/* =========================================================
   Cursor + controls
   ========================================================= */
.cursor{
  position: fixed; pointer-events: none; z-index: 50;
  left: 50%; top: 50%;
  width: 18px; height: 18px;
  opacity: 0;
  transition: opacity .3s, left .9s cubic-bezier(.4,.0,.2,1), top .9s cubic-bezier(.4,.0,.2,1), transform .15s;
}
.cursor::before{
  content: ""; display:block; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(255,255,255,.92);
  box-shadow: 0 0 0 2px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.4);
}
.cursor.visible{ opacity: 1; }
.cursor.click::after{
  content: ""; position: absolute; inset: -8px;
  border-radius: 50%; border: 2px solid var(--accent);
  animation: ripple .55s ease-out;
}
.cursor.click{ transform: scale(.88); }
@keyframes ripple{
  from{ transform: scale(.5); opacity: 1; }
  to  { transform: scale(2); opacity: 0; }
}

.controls{
  position: fixed; left: 50%; bottom: 18px;
  transform: translateX(-50%);
  display:flex; align-items:center; gap: 10px;
  padding: 8px 14px;
  background: rgba(20,20,20,.85);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  z-index: 100;
}
.ctrl{
  width: 34px; height: 34px; border-radius: 50%;
  background: transparent; border: 1px solid transparent;
  color: var(--text); cursor: pointer;
  display:grid; place-items:center;
}
.ctrl:hover{ background: var(--surface-3); border-color: var(--line-2); }
.ctrl.small{ width: 28px; height: 28px; }
.timeline{ width: 200px; height: 4px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin: 0 6px; }
#timeline-fill{ height: 100%; width: 0%; background: var(--accent); transition: width .25s linear; }
.scene-label{ font-size: 12px; color: var(--muted); min-width: 130px; }
