/* Dashboard-specific layout. Reuses the shared brand palette + typography from
 * style.css; only overrides layout + component styles unique to this view. */

.dashboard-body {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* Dashboard header buttons (Refresh / Snapshot / Restore). Also used as a
   class on <a> links. Explicitly override the base button rule's accent fill +
   bold weight so the <button> variant doesn't paint itself bright cyan with
   nearly-invisible light text on top. */
.nav-link {
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  box-shadow: none;
  transition: border-color 120ms ease, color 120ms ease, background 120ms ease;
}
.nav-link:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
  box-shadow: none;
}

.dashboard-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 320px 1fr;
  overflow: hidden;
}

.dashboard-nav {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-right: 1px solid var(--border);
  overflow: hidden;
}

.dashboard-search {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}
.dashboard-search input {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
}
.dashboard-search input:focus {
  outline: 1px solid var(--accent);
  border-color: var(--accent);
}

.tenant-stats {
  padding: 8px 14px;
  font-size: 11px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.tenant-stats span strong { color: var(--text); font-weight: 600; }

.dashboard-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.tab-btn {
  flex: 1;
  background: transparent;
  color: var(--muted);
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab-count {
  color: var(--muted);
  font-weight: 400;
  font-size: 11px;
  margin-left: 3px;
}
.tab-btn.active .tab-count { color: var(--accent); }

.list-panel {
  flex: 1;
  overflow-y: auto;
}
.list-panel[hidden] { display: none; }

/* Sort toggle at the top of each list. Pill-style two-button group; the
   pressed button (aria-pressed=true) gets the accent colour. */
.sort-toggle {
  display: flex;
  gap: 0;
  margin: 6px 12px 4px;
  padding: 2px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  width: fit-content;
}
.sort-btn {
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  border-radius: 3px;
  transition: background 120ms ease, color 120ms ease;
}
.sort-btn:hover { color: var(--text); }
.sort-btn[aria-pressed="true"] {
  background: rgba(24, 255, 255, 0.12);
  color: var(--accent);
}

/* Tenant rollup on the welcome view + customer contract table + top-active list */
.tenant-rollup {
  margin-top: 24px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.tenant-rollup h3 { margin: 0 0 12px; font-size: 14px; }
.tenant-rollup h4 { margin: 18px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.tenant-rollup .meta-grid,
.detail-section .meta-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 16px;
  font-size: 13px;
  margin: 0;
}
.tenant-rollup dt,
.detail-section dt { color: var(--muted); }
.tenant-rollup dd,
.detail-section dd { margin: 0; }

.contract-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 0;
}
.contract-table th,
.contract-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.contract-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 500;
}
.contract-table tr:last-child td { border-bottom: none; }
.contract-status {
  text-transform: capitalize;
  font-weight: 600;
}
.contract-status.contract-active { color: #58e08c; }
.contract-status.contract-proposed { color: var(--accent); }
.contract-status.contract-lost { color: #ff9090; }
.contract-status.contract-expired { color: var(--muted); }

.top-active-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: item;
}
.top-active-list li {
  counter-increment: item;
  margin-bottom: 4px;
}
.top-active-list li::before {
  content: counter(item) ".";
  display: inline-block;
  width: 20px;
  color: var(--muted);
  font-size: 12px;
}
.top-active-link {
  display: inline-flex;
  gap: 12px;
  align-items: baseline;
  padding: 4px 6px;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  border-radius: 3px;
  text-align: left;
}
.top-active-link:hover { background: rgba(255, 255, 255, 0.05); }
.top-active-name { font-weight: 500; }
.top-active-meta { color: var(--muted); font-size: 11px; }

/* Customer Activity list — paginated variant of top-active-list. Uses the
   same counter shell + link styling but adds a nested notes list under each
   customer for the activity-log summaries, and a pager row at the bottom. */
.customer-activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
  /* Actual counter-reset comes via inline style="counter-reset: item N"
     from renderTenantRollup so numbering continues across pages. */
}
.customer-activity-list li {
  counter-increment: item;
  margin-bottom: 12px;
}
.customer-activity-list li::before {
  content: counter(item) ".";
  display: inline-block;
  width: 20px;
  color: var(--muted);
  font-size: 12px;
  vertical-align: top;
}
.customer-activity-notes {
  list-style: none;
  margin: 4px 0 0 26px;
  padding: 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
.customer-activity-notes li {
  counter-increment: none;
  margin: 0 0 3px 0;
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.customer-activity-notes li::before { content: none; }
.customer-activity-notes .activity-date {
  flex-shrink: 0;
  min-width: 44px;
  color: var(--accent);
  font-family: Consolas, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.customer-activity-notes .activity-summary { flex: 1; }
.customer-activity-pager {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 11px;
}
.customer-activity-pager .pager-status {
  flex: 1;
  color: var(--muted);
  text-align: center;
}
.customer-activity-pager .pager-btn {
  padding: 4px 10px;
  font-size: 11px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
}
.customer-activity-pager .pager-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.customer-activity-pager .pager-btn:disabled { opacity: 0.35; cursor: default; }

/* Dormancy chip — visible cue for how recently a customer folder had activity.
   Sits inline next to "last activity" dates. Coarse buckets: hot / warm / cool
   / cold / dormant. Colours are hue-shifted from accent → muted-red so a fast
   scan gives a temperature reading. */
.dormancy-chip {
  display: inline-block;
  padding: 1px 6px;
  margin-left: 4px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
  cursor: help;
}
.dormancy-hot     { background: rgba(88, 224, 140, 0.18); color: #58e08c; }
.dormancy-warm    { background: rgba(24, 255, 255, 0.14); color: var(--accent); }
.dormancy-cool    { background: rgba(238, 255, 65, 0.14); color: #e9f36a; }
.dormancy-cold    { background: rgba(255, 165, 100, 0.14); color: #ffa564; }
.dormancy-dormant { background: rgba(255, 90, 90, 0.14);  color: #ff9090; }

/* Customer summary block — sits above the Overview meta-grid. Describes what
   the company does + why they're engaging with Nextspace. Sourced from
   _AI/customer.json which is written during the customer-folder analyse step. */
.customer-summary {
  margin: 0 0 16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--accent);
  border-radius: 3px;
}
.customer-summary p { margin: 0 0 8px; line-height: 1.45; }
.customer-summary p:last-child { margin-bottom: 0; }
.summary-meta {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.summary-website a {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
}
.summary-website a:hover { text-decoration: underline; }
.summary-description { font-size: 13px; }
.summary-context {
  font-size: 13px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.summary-context strong { color: var(--accent); }
.folder-signals {
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  font-size: 12px;
}
.folder-signals dl.meta-grid { margin: 0; }

/* Recent sessions list on the customer detail page. Each row is a button so
   keyboard nav / hover / click all work naturally. Small tags flag template,
   Teams-bound, and closed-status inline. */
.customer-sessions { list-style: none; padding: 0; margin: 0; }
.customer-session-row {
  margin-bottom: 4px;
  display: flex;
  align-items: stretch;
  gap: 4px;
}
.customer-session-open {
  flex: 1;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: background 120ms ease, border-color 120ms ease;
}
.customer-session-open:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--accent);
}
.customer-session-open .session-name { display: block; font-size: 13px; font-weight: 500; margin-bottom: 2px; }
.customer-session-open .session-meta { display: block; font-size: 11px; color: var(--muted); }
/* Destructive delete button — subtle grey by default so it doesn't shout at
   the user from every row; reddens on hover so the "about to do something
   irreversible" affordance is unmistakable. Click triggers two confirms. */
.customer-session-delete {
  flex: 0 0 auto;
  width: 36px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
  box-shadow: none;
}
.customer-session-delete:hover:not(:disabled) {
  background: rgba(255, 90, 90, 0.12);
  border-color: #ff6a6a;
  color: #ff9090;
  box-shadow: none;
}
.customer-session-delete:disabled { opacity: 0.5; cursor: default; }
/* Transient 'deleting from SharePoint…' row state. Dims the whole row and
   strikes through the session name so the user has unmistakable feedback
   that this specific session is in flight — crucial because the Graph DELETE
   can take 2-5s on a cold network and the alternative (silent spinner on
   the small trash icon) wasn't visible enough. */
.customer-session-row.deleting .customer-session-open { opacity: 0.5; cursor: default; }
.customer-session-row.deleting .session-name { text-decoration: line-through; color: var(--muted); }
.customer-session-row.deleting .customer-session-open em { color: #ff9090; font-style: italic; }
.session-tag {
  display: inline-block;
  padding: 1px 6px;
  margin-left: 4px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(24, 255, 255, 0.10);
  color: var(--accent);
}
.session-tag.teams { background: rgba(114, 137, 218, 0.14); color: #a8b6f5; }
.session-tag.closed { background: rgba(255, 90, 90, 0.14); color: #ff9090; }

/* Share modal — picks a tenant topic folder for a workspace session. Reuses
   .modal-overlay / .modal-panel from style.css so it inherits centering + backdrop. */
.share-panel { min-width: 380px; max-width: 460px; }
.share-panel h2 { margin: 0 0 6px; font-size: 15px; }
.share-panel .subhead { margin: 0 0 14px; font-size: 12px; color: var(--muted); }
.share-topics { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; margin-bottom: 12px; }
.share-topic-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: border-color 120ms ease, background 120ms ease;
}
.share-topic-option:hover { background: rgba(255, 255, 255, 0.04); }
.share-topic-option input[type="radio"] { margin: 0; }
.share-topic-option:has(input:checked) { border-color: var(--accent); background: rgba(24, 255, 255, 0.06); }
.share-topic-name { flex: 1; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; }
.share-topic-option.share-new { flex-wrap: wrap; }
.share-new-input {
  flex: 1 1 100%;
  margin-top: 6px;
  padding: 6px 8px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 3px;
  font: inherit;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  text-transform: uppercase;
}
.share-status {
  padding: 6px 10px;
  border-radius: 3px;
  font-size: 12px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.04);
}
.share-status.ok { background: rgba(88, 224, 140, 0.14); color: #58e08c; }
.share-status.err { background: rgba(255, 90, 90, 0.14); color: #ff9090; }
.share-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* All workspace-row buttons share the same shape — padding, radius, font,
   weight — so the row scans as a tidy strip. Colour variants modify just
   the tint + border + text to encode semantics (safe/info/danger/neutral).
   Visually modelled on the 'Update' button which Michael asked us to
   standardise on. */
.workspace-row-btn {
  padding: 4px 10px;
  border-radius: 3px;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.workspace-row-btn:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.workspace-row-btn:disabled { opacity: 0.6; cursor: default; }
.workspace-row-btn:focus-visible { outline: 1px solid var(--accent); outline-offset: 1px; }

/* Push button — Share / Save to SharePoint / Update. Shape inherited
   from .workspace-row-btn; colour encodes the state:
     - fresh share (standalone)          → cyan accent
     - fresh customer-save               → blue tint
     - update (already synced)           → green (safe overwrite of your own copy) */
.workspace-push-btn.is-share {
  background: rgba(24, 255, 255, 0.08);
  color: var(--accent);
  border-color: rgba(24, 255, 255, 0.3);
}
.workspace-push-btn.is-share:hover { background: rgba(24, 255, 255, 0.14); border-color: var(--accent); color: var(--accent); }
.workspace-push-btn.is-customer {
  background: rgba(114, 137, 218, 0.10);
  color: #a8b6f5;
  border-color: rgba(114, 137, 218, 0.35);
}
.workspace-push-btn.is-customer:hover { background: rgba(114, 137, 218, 0.18); border-color: #a8b6f5; color: #a8b6f5; }
.workspace-push-btn.is-update {
  background: rgba(88, 224, 140, 0.10);
  color: #58e08c;
  border-color: rgba(88, 224, 140, 0.35);
}
.workspace-push-btn.is-update:hover { background: rgba(88, 224, 140, 0.18); border-color: #58e08c; color: #58e08c; }

/* Delete — destructive. Red tint, same shape. */
.workspace-row-btn.workspace-delete-btn {
  color: var(--alert);
  border-color: var(--alert);
}
.workspace-row-btn.workspace-delete-btn:hover {
  background: var(--alert-tint);
  color: var(--alert);
  border-color: var(--alert);
}

/* Open → — the primary row action. Same shape, accent-tinted. */
.workspace-row-btn.workspace-row-open-btn {
  background: rgba(24, 255, 255, 0.06);
  color: var(--accent);
  border-color: rgba(24, 255, 255, 0.3);
}
.workspace-row-btn.workspace-row-open-btn:hover {
  background: rgba(24, 255, 255, 0.14);
  color: var(--accent);
  border-color: var(--accent);
}
.share-topic-current {
  display: inline-block;
  margin-left: 6px;
  padding: 0 5px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(88, 224, 140, 0.18);
  color: #58e08c;
  border-radius: 2px;
  vertical-align: middle;
}

/* Save / Update on the embed toolbar — a primary action against SharePoint,
   so highlight it (accent tint) without going all the way to the solid accent
   fill that would overwhelm the slim toolbar. Shares every other dimension
   with its sibling secondary buttons so heights line up. */
.embed-controls button.primary-action {
  color: var(--accent);
  border-color: rgba(24, 255, 255, 0.4);
  background: rgba(24, 255, 255, 0.05);
}
.embed-controls button.primary-action:hover {
  background: rgba(24, 255, 255, 0.12);
  border-color: var(--accent);
}

.customer-list, .actor-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}
.customer-list li, .actor-list li {
  padding: 8px 14px;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background 120ms ease, border-color 120ms ease;
  font-size: 13px;
  position: relative;
}
/* × button for removing an entry from the People list. Only surfaces on hover so
   the list stays visually clean; positioned in the top-right of the row. */
.actor-list li .actor-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 3px;
  opacity: 0;
  transition: opacity 120ms ease, background 120ms ease, color 120ms ease;
}
.actor-list li:hover .actor-delete { opacity: 0.7; }
.actor-list li .actor-delete:hover {
  opacity: 1;
  background: rgba(255, 90, 90, 0.15);
  color: #ff9090;
}
.customer-list li:hover, .actor-list li:hover {
  background: var(--bg);
}
.customer-list li.selected, .actor-list li.selected {
  background: rgba(24, 255, 255, 0.06);
  border-left-color: var(--accent);
  color: var(--text);
}
/* Analysed customers (have _AI/) get a persistent left-edge cue + slightly brighter
 * name — differentiates them from raw folders in the list at a glance. */
.customer-list li.analysed {
  border-left-color: var(--observer);
}
.customer-list li.analysed .customer-name {
  color: var(--text);
  font-weight: 600;
}
.customer-list li:not(.analysed) .customer-name {
  color: var(--muted);
}
.customer-list li.analysed.selected {
  border-left-color: var(--accent);
}
.customer-list li .customer-name,
.actor-list li .actor-name {
  display: block;
  font-weight: 500;
}
.customer-list li .customer-meta,
.actor-list li .actor-meta {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.customer-list li .badge,
.actor-list li .badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 4px;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
}
.badge.partner { color: var(--accent); border-color: var(--accent); }
.badge.cross-ref { color: var(--phase); border-color: var(--phase); }
.badge.has-ai { color: var(--observer); border-color: var(--observer-border); }
.badge.nextspace { color: var(--user); border-color: var(--user); }
.badge.unlicensed { color: var(--muted); }
.badge.badge-archived {
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(148, 163, 184, 0.08);
}
.workspace-row.workspace-row-archived {
  background: rgba(148, 163, 184, 0.04);
  border-left: 2px solid rgba(148, 163, 184, 0.35);
}

.workspace-archive-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1;
  color: var(--muted);
  border: 1px solid var(--border);
  background: var(--bg);
}
.workspace-archive-status.status-busy {
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(148, 163, 184, 0.1);
  animation: workspace-archive-pulse 1.4s ease-in-out infinite;
}
.workspace-archive-status.status-ok {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(74, 222, 128, 0.08);
}
.workspace-archive-status.status-err {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
}
@keyframes workspace-archive-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

.dashboard-detail {
  overflow-y: auto;
  padding: 24px 32px;
}
/* When the right pane hosts the embedded session, drop the outer padding + scroll —
 * the iframe manages its own layout. */
.dashboard-detail:has(.embedded-session) {
  padding: 0;
  overflow: hidden;
}

.embedded-session {
  display: flex;
  flex-direction: column;
  height: 100%;
}
/* Expanded mode — iframe container jumps to fullscreen fixed positioning above the
 * dashboard shell. Toolbar stays visible so the user can collapse or close. */
.embedded-session.expanded {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: var(--bg);
  padding: 0;
}

.embed-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  flex-shrink: 0;
}
.embed-label {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}
.embed-controls {
  display: flex;
  gap: 6px;
  align-items: center;
}
/* Normalise every button in the embed toolbar to one height + weight so Share
   / Save / Expand / Close line up cleanly. Base button (public/style.css)
   defaults to the chunky bright-accent primary style, which looked out of
   place next to the secondary siblings — override padding, font-weight and
   border-radius here. */
.embed-controls button {
  padding: 5px 12px;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 500;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  transition: border-color 120ms ease, color 120ms ease, background 120ms ease;
  box-shadow: none;
}
.embed-controls button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: none;
}

.session-iframe {
  flex: 1;
  width: 100%;
  border: 0;
  background: var(--bg);
  min-height: 0;
}
.detail-content h2 {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  font-size: 24px;
  margin: 0 0 8px;
  color: var(--text);
}
.detail-content .subhead {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 24px;
}
.detail-content.welcome .hint {
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 24px;
}
.load-state {
  font-size: 12px;
  color: var(--muted);
  padding: 8px 0;
}
.load-state.err { color: var(--alert); }

.detail-section {
  margin-bottom: 32px;
}
.detail-section h3 {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.detail-section .meta-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 6px 16px;
  font-size: 13px;
}
.detail-section .meta-grid dt { color: var(--muted); font-weight: 500; }
.detail-section .meta-grid dd { color: var(--text); margin: 0; }
.detail-section .actors-here {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.detail-section .actor-chip {
  padding: 8px 12px;
  background: var(--panel);
  border-left: 2px solid var(--border);
  border-radius: 0 4px 4px 0;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.actor-chip.nextspace { border-left-color: var(--user); }
.actor-chip.unlicensed { border-left-color: var(--muted); }
.actor-chip .actor-chip-name { font-weight: 500; }
.actor-chip .actor-chip-meta { color: var(--muted); font-size: 11px; }
.actor-chip .actor-chip-role { color: var(--muted); font-style: italic; }
.actor-chip a { color: var(--accent); text-decoration: none; }
.actor-chip a:hover { text-decoration: underline; }

.empty-note {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}
.empty-note.err { color: var(--alert); font-style: normal; }

.workspace-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.workspace-row:hover {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-tint);
}
.workspace-row-name {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.workspace-row-meta {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.workspace-row-owner { color: var(--user); }
/* Note: .workspace-row-btn (defined earlier) is the single source of truth
   for workspace-row button sizing + shape. Per-button colour variants
   live alongside it (push-btn is-share/is-customer/is-update, delete-btn,
   row-open-btn). The old per-button overrides that used to live here
   have been removed to let the unified class take effect. */
.workspace-row .badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
  margin-left: 4px;
}

/* ── Mode chooser ──────────────────────────────────────────────
   Full-viewport overlay with blurred dashboard behind; two tiles for
   Nextspace staff to pick between the staff Sales Navigator dashboard
   and the Partner AI app on a fresh load. */
.mode-chooser {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6, 23, 39, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.mode-chooser[hidden] { display: none; }
.mode-chooser-inner {
  max-width: 720px;
  width: 100%;
  text-align: center;
}
.mode-chooser-inner h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text);
}
.mode-chooser-sub {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 24px;
}
.mode-chooser-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 600px) {
  .mode-chooser-tiles { grid-template-columns: 1fr; }
}
.mode-tile {
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  transition: border-color 120ms, background 120ms, transform 120ms;
}
.mode-tile:hover {
  border-color: var(--accent);
  background: var(--panel-2);
  transform: translateY(-2px);
}
.mode-tile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.mode-tile-icon {
  font-size: 32px;
  margin-bottom: 12px;
}
.mode-tile-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.mode-tile-body {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.mode-chooser-footer {
  font-size: 11px;
  margin: 0;
}

/* ── '+ New customer' button + dialog ─────────────────────────────── */
/* Button lives in the Customers list header, floated right of the
   Recent/A-Z sort toggle. Styled as an accent-outlined pill — same shape
   as the workspace-row buttons so the sidebar reads consistently. */
.list-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px 6px;
}
.new-customer-btn {
  font: inherit;
  font-size: 11px;
  padding: 3px 10px;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  cursor: pointer;
}
.new-customer-btn:hover { background: rgba(24, 255, 255, 0.08); }

.new-customer-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(2px);
}
.new-customer-card {
  width: min(560px, 100%);
  max-height: min(680px, 100%);
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.new-customer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.new-customer-header h2 { margin: 0; font-size: 16px; font-weight: 600; }
.new-customer-close {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
  padding: 2px 10px;
  line-height: 1;
}
.new-customer-close:hover { color: var(--text); }
.new-customer-body {
  padding: 18px 20px 20px;
  overflow-y: auto;
}
.new-customer-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.new-customer-field > span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}
.new-customer-field input {
  padding: 9px 12px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
}
.new-customer-field input:focus { outline: 1px solid var(--accent); border-color: var(--accent); }

.new-customer-results .muted { color: var(--muted); font-size: 13px; margin: 6px 0; }
.new-customer-results .err { color: var(--alert); font-size: 13px; margin: 6px 0; }
.new-customer-results code {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: Consolas, monospace;
  font-size: 11px;
}

.nc-match-block, .nc-create-block {
  margin: 14px 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.nc-match-block > h3, .nc-create-block > h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.nc-match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 4px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  text-align: left;
}
.nc-match-row:hover {
  background: rgba(24, 255, 255, 0.06);
  border-color: var(--accent);
}
.nc-match-name { font-weight: 500; }
.nc-match-reason {
  font-size: 11px;
  color: var(--muted);
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}
.nc-match-cta {
  color: var(--accent);
  font-weight: 600;
  font-size: 12px;
}
.nc-create-btn {
  display: block;
  width: 100%;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--bg);
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.nc-create-btn:hover { filter: brightness(0.95); }
.nc-create-btn:disabled { opacity: 0.6; cursor: default; }
.nc-fine-print { font-size: 11px; margin-top: 10px; line-height: 1.5; }
