/* ── Typography foundation ──────────────────── */
html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
}
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
}
button, input, select { line-height: 1; }
textarea { line-height: 1.6; }
code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
/* ─────────────────────────────────────────────── */

/* ══════════════════════════════════════
   RESET & BASE
══════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #0a0a0f;
  color: #e2e2e8;
  height: 100vh;
  overflow: hidden;
}

/* ══════════════════════════════════════
   SHARED INPUTS
══════════════════════════════════════ */
.field-input {
  background: #12121e;
  border: 1px solid #22223a;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #e0e0f0;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}

.field-input:focus {
  border-color: #5a3e9a;
  box-shadow: 0 0 0 3px #5a3e9a22;
}

.field-input::placeholder { color: #2a2a45; }

.field-label {
  font-size: 11px;
  font-weight: 500;
  color: #44446a;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ══════════════════════════════════════
   LOGIN SCREEN
══════════════════════════════════════ */
#login-screen {
  position: fixed;
  inset: 0;
  background: #0a0a0f;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  transition: opacity .4s, transform .4s;
}

#login-screen.hide {
  opacity: 0;
  pointer-events: none;
  transform: scale(.97);
}

.login-card {
  width: 400px;
  background: #0f0f1a;
  border: 1px solid #1e1e35;
  border-radius: 16px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.login-logo-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wp-icon {
  width: 36px;
  height: 36px;
  background: #1a1435;
  border: 1px solid #2d1f55;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.login-title {
  font-size: 17px;
  font-weight: 500;
  color: #fff;
}

.login-subtitle {
  font-size: 12px;
  color: #444466;
  margin-top: 4px;
}

.login-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-btn {
  background: #5a3e9a;
  border: none;
  border-radius: 8px;
  padding: 11px;
  font-size: 13.5px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  transition: background .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-btn:hover { background: #6a4eaa; }
.login-btn:disabled { background: #2a2240; color: #444466; cursor: not-allowed; }

.login-error {
  font-size: 12px;
  color: #f87171;
  background: #1a0a0a;
  border: 1px solid #3a1515;
  border-radius: 6px;
  padding: 8px 12px;
  display: none;
}

.login-error.show { display: block; }

.login-hint {
  font-size: 11px;
  color: #2a2a45;
  text-align: center;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #ffffff44;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════
   SITE SETUP SCREEN
══════════════════════════════════════ */
#site-setup-screen {
  position: fixed;
  inset: 0;
  background: #0a0a0f;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 250;
}

#site-setup-screen.show { display: flex; }

.setup-card {
  width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background: #0f0f1a;
  border: 1px solid #1e1e35;
  border-radius: 16px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.setup-title {
  font-size: 16px;
  font-weight: 500;
  color: #fff;
}

.setup-subtitle {
  font-size: 12px;
  color: #555;
  line-height: 1.6;
}

.setup-discovery {
  background: #0c1a10;
  border: 1px solid #1a3022;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 12px;
  color: #6ee7a0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.setup-discovery.fail {
  background: #1a0c0c;
  border-color: #3a1515;
  color: #f87171;
}

.site-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-entry {
  background: #12121e;
  border: 1px solid #1e1e35;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-entry-icon {
  width: 32px;
  height: 32px;
  background: #1a1435;
  border: 1px solid #2d1f55;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.site-entry-info { flex: 1; min-width: 0; }

.site-entry-name {
  font-size: 13px;
  font-weight: 500;
  color: #c8c8e0;
}

.site-entry-url {
  font-size: 11px;
  color: #444466;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-entry-status {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 500;
  flex-shrink: 0;
}

.status-ok  { background: #0d2010; color: #4ade80; border: 1px solid #1a3a20; }
.status-fail{ background: #1a0a0a; color: #f87171; border: 1px solid #3a1515; }
.status-pending{ background: #1a1a10; color: #facc15; border: 1px solid #2a2a18; }

.site-entry-remove {
  background: none;
  border: none;
  color: #333355;
  cursor: pointer;
  font-size: 16px;
  padding: 2px 6px;
  transition: color .15s;
  flex-shrink: 0;
}

.site-entry-remove:hover { color: #f87171; }

.add-site-row {
  display: flex;
  gap: 8px;
}

.add-site-name { flex: 0 0 140px; }
.add-site-url  { flex: 1; }

.btn-add-site {
  background: #1a1435;
  border: 1px solid #2d1f55;
  border-radius: 7px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #a78bfa;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}

.btn-add-site:hover { background: #221a45; }

.setup-actions { display: flex; gap: 10px; }

.btn-setup-continue {
  flex: 1;
  background: #5a3e9a;
  border: none;
  border-radius: 8px;
  padding: 11px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  transition: background .15s;
}

.btn-setup-continue:hover    { background: #6a4eaa; }
.btn-setup-continue:disabled { background: #2a2240; color: #444466; cursor: not-allowed; }

/* ══════════════════════════════════════
   APP SHELL
══════════════════════════════════════ */
#app {
  display: none;
  grid-template-columns: 220px 1fr;
  grid-template-rows: 52px 1fr;
  height: 100vh;
}

#app.visible { display: grid; }

/* ── TOPBAR ── */
.topbar {
  grid-column: 1 / -1;
  background: #0f0f1a;
  border-bottom: 1px solid #1e1e30;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 10px;
}

.site-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e88;
  flex-shrink: 0;
}

.topbar-brand {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.site-switcher { position: relative; margin-left: 4px; }

.site-switcher-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #14142a;
  border: 1px solid #22223a;
  border-radius: 7px;
  padding: 5px 10px;
  cursor: pointer;
  transition: border-color .15s;
}

.site-switcher-btn:hover { border-color: #3a3a5a; }

.site-switcher-current {
  font-size: 12px;
  font-weight: 500;
  color: #c8c8e0;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-switcher-arrow {
  font-size: 10px;
  color: #555;
  transition: transform .2s;
}

.site-switcher-btn.open .site-switcher-arrow { transform: rotate(180deg); }

.site-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #0f0f1a;
  border: 1px solid #1e1e35;
  border-radius: 10px;
  min-width: 240px;
  z-index: 100;
  display: none;
  overflow: hidden;
  box-shadow: 0 8px 24px #00000066;
}

.site-dropdown.show { display: block; }

.site-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background .15s;
}

.site-dropdown-item:hover       { background: #141428; }
.site-dropdown-item.active-site { background: #1a1435; }

.site-dd-info { flex: 1; min-width: 0; }

.site-dd-name {
  font-size: 12px;
  font-weight: 500;
  color: #c8c8e0;
}

.site-dd-url {
  font-size: 10px;
  color: #444466;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-dd-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.site-dd-dot.ok   { background: #22c55e; }
.site-dd-dot.fail { background: #f87171; }

.site-dd-add {
  padding: 8px 14px;
  border-top: 1px solid #1a1a2a;
  font-size: 11px;
  color: #555;
  cursor: pointer;
  transition: color .15s;
}

.site-dd-add:hover { color: #a78bfa; }

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.model-badge {
  font-size: 11px;
  color: #8b6ef5;
  background: #1a1430;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #2d1f55;
}

.logout-btn {
  font-size: 11px;
  color: #44446a;
  background: none;
  border: 1px solid #1e1e35;
  border-radius: 5px;
  padding: 3px 9px;
  cursor: pointer;
  transition: color .15s;
}

.logout-btn:hover { color: #888; }

/* ── SIDEBAR ── */
.sidebar {
  background: #0c0c18;
  border-right: 1px solid #1a1a2a;
  padding: 16px 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 0;
}

/* Pinned top pill; the nav below it scrolls when the window is short. */
.site-context-pill { flex-shrink: 0; }

.sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.site-context-pill {
  margin: 0 12px 16px;
  background: #1a1435;
  border: 1px solid #2d1f55;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11px;
  color: #a78bfa;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-section { padding: 0 12px; margin-bottom: 20px; }

.nav-label {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 8px;
  margin-bottom: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  min-height: 32px;
  border-radius: 6px;
  font-size: 13px;
  color: #888;
  cursor: pointer;
  transition: all .15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover  { background: #14142a; color: #ccc; }
.nav-item.active { background: #1a1435; color: #a78bfa; }

.nav-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 400;
  background: #1a1435;
  color: #a78bfa;
  border-radius: 8px;
  padding: 1px 6px;
}

/* ── MAIN ── */
.main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0a0a0f;
}

/* ── TABS ── */
.tabs {
  display: flex;
  border-bottom: 1px solid #1a1a2a;
  background: #0c0c18;
  padding: 0 20px;
  flex-shrink: 0;
}

.tab {
  font-size: 12px;
  padding: 12px 16px;
  color: #555;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all .15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.tab:hover  { color: #888; }
.tab.active { color: #a78bfa; border-bottom-color: #a78bfa; }

/* ══════════════════════════════════════
   VIEWS
══════════════════════════════════════ */
.view {
  flex: 1;
  min-height: 0;            /* allow the flex child to shrink so overflow-y can scroll */
  overflow-y: auto;
  padding: 20px;
  display: none;
  flex-direction: column;
  gap: 14px;
}

.view.show { display: flex; }

/* ── LIST ── */
.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  gap: 10px;
  flex-wrap: wrap;
}

.list-title {
  font-size: 14px;
  font-weight: 500;
  color: #ccc;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-primary {
  background: #5a3e9a;
  border: none;
  border-radius: 7px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  transition: background .15s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-primary:hover    { background: #6a4eaa; }
.btn-primary:disabled { background: #2a2240; cursor: not-allowed; }

.btn-secondary {
  background: #12122a;
  border: 1px solid #2a2a45;
  border-radius: 7px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #8888cc;
  cursor: pointer;
  transition: all .15s;
}

.btn-secondary:hover { background: #1a1a3a; color: #aaaaee; }

/* ── POST ROWS ── */
.post-row {
  background: #0f0f1a;
  border: 1px solid #1a1a30;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 8px;          /* tiny space between rows */
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color .15s, background .15s;
}
.post-row-clickable { cursor: pointer; }
.post-row-clickable:hover { border-color: #2a2a45; background: #11111e; }

.post-row:hover { border-color: #2a2a45; }

.post-row-info { flex: 1; min-width: 0; }

.post-row-title {
  font-size: 13px;
  font-weight: 500;
  color: #c8c8e0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-row-meta {
  font-size: 11px;
  color: #444466;
  margin-top: 3px;
}

.post-row-actions { display: flex; gap: 6px; flex-shrink: 0; }

.badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
  flex-shrink: 0;
}

.badge-publish { background: #0d2010; color: #4ade80; border: 1px solid #1a3a20; }
.badge-draft   { background: #1a1a10; color: #facc15; border: 1px solid #2a2a18; }
.badge-trash   { background: #1a1010; color: #888;    border: 1px solid #2a2020; }

.row-btn {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 500;
  border: 1px solid;
  transition: all .15s;
}

.row-btn-view    { background: #0d1a20; border-color: #1a3340; color: #7ab8d0; }
.row-btn-view:hover { background: #122530; color: #a0d0e0; }
.row-btn-edit    { background: #12122a; border-color: #2a2a45; color: #8888cc; }
.row-btn-edit:hover { background: #1a1a3a; color: #aaaaee; }
.row-btn-publish { background: #0d2010; border-color: #1a3a20; color: #4ade80; }
.row-btn-publish:hover { background: #122818; }
.row-btn-trash   { background: #1a1a10; border-color: #2a2a18; color: #888; }
.row-btn-trash:hover { background: #222210; color: #aaa; }
.row-btn-delete  { background: #1a0a0a; border-color: #3a1515; color: #f87171; }
.row-btn-delete:hover { background: #220f0f; }

.empty-state {
  text-align: center;
  padding: 40px;
  color: #333355;
  font-size: 13px;
}

/* ══════════════════════════════════════
   EDITOR
══════════════════════════════════════ */
.editor-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.editor-back {
  background: none;
  border: 1px solid #1e1e35;
  border-radius: 6px;
  padding: 6px 10px;
  color: #666;
  font-size: 12px;
  cursor: pointer;
  transition: color .15s;
}

.editor-back:hover { color: #aaa; }

.editor-mode-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
}

.editor-mode-new  { background: #1a1435; color: #a78bfa; border: 1px solid #2d1f55; }
.editor-mode-edit { background: #101a25; color: #60a5fa; border: 1px solid #1a2e45; }

.editor-draft-notice {
  background: #12180d;
  border: 1px solid #1e3015;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  color: #6ee7a0;
}

.editor-grid {
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: 16px;
}

.editor-main  { display: flex; flex-direction: column; gap: 12px; }
.editor-seo   { display: flex; flex-direction: column; gap: 10px; }

.seo-panel {
  background: #0f0f1a;
  border: 1px solid #1a1a30;
  border-radius: 10px;
  padding: 14px;
}

.seo-panel-title {
  font-size: 11px;
  font-weight: 500;
  color: #44446a;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.seo-field        { margin-bottom: 10px; }
.seo-field:last-child { margin-bottom: 0; }

.seo-label {
  font-size: 10px;
  font-weight: 500;
  color: #44446a;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.seo-input {
  background: #12121e;
  border: 1px solid #22223a;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12px;
  color: #d0d0e8;
  outline: none;
  width: 100%;
  transition: border-color .15s;
}

.seo-input:focus { border-color: #5a3e9a; }
.seo-input::placeholder { color: #2a2a45; }

.seo-textarea {
  background: #12121e;
  border: 1px solid #22223a;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12px;
  color: #d0d0e8;
  outline: none;
  width: 100%;
  resize: vertical;
  min-height: 65px;
  transition: border-color .15s;
}

.seo-textarea:focus { border-color: #5a3e9a; }
.seo-textarea::placeholder { color: #2a2a45; }

.seo-counter {
  font-size: 10px;
  color: #333355;
  text-align: right;
  margin-top: 2px;
}

.seo-counter.warn { color: #facc15; }
.seo-counter.over { color: #f87171; }

.seo-score-bar {
  height: 4px;
  border-radius: 2px;
  background: #1a1a2a;
  margin-top: 6px;
  overflow: hidden;
}

.seo-score-fill {
  height: 100%;
  border-radius: 2px;
  transition: width .4s;
}

/* ── SEO Score Dashboard ─────────────────────────────── */
.seo-dash-score-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 12px;
}
.seo-dash-ring { width: 90px; height: 90px; transform: rotate(-90deg); }
.seo-dash-ring-bg {
  fill: none;
  stroke: #1a1a2a;
  stroke-width: 6;
}
.seo-dash-ring-fg {
  fill: none;
  stroke: #22c55e;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset .6s ease, stroke .3s;
}
.seo-dash-score-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.seo-dash-score-num {
  font-size: 24px;
  font-weight: 500;
  color: #a78bfa;
  line-height: 1;
}
.seo-dash-score-label {
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #444466;
  margin-top: 2px;
}

/* Dashboard sections */
.seo-dash-sections {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.seo-dash-section {
  border: 1px solid #1a1a30;
  border-radius: 6px;
  overflow: hidden;
}
.seo-dash-section-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: #0a0a14;
  border: none;
  padding: 8px 10px;
  cursor: pointer;
  transition: background .15s;
}
.seo-dash-section-hdr:hover { background: #12121e; }
.seo-dash-section-title {
  font-size: 10px;
  font-weight: 500;
  color: #7777aa;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.seo-dash-section-arrow {
  font-size: 10px;
  color: #555577;
  transition: transform .2s;
}
.seo-dash-section-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}
.seo-dash-section-body.seo-dash-section-open {
  max-height: 600px;
}

/* Dashboard checklist items */
.seo-dash-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 10px;
  border-top: 1px solid #0f0f1a;
}
.seo-dash-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 3px;
}
.seo-dash-dot-green { background: #22c55e; }
.seo-dash-dot-amber { background: #facc15; }
.seo-dash-dot-gray  { background: #444466; }
.seo-dash-dot-red   { background: #f87171; }

.seo-dash-item-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}
.seo-dash-item-label {
  font-size: 11px;
  color: #c0c0d8;
  font-weight: 500;
}
.seo-dash-item-hint {
  font-size: 10px;
  color: #666688;
  line-height: 1.4;
}

/* Quick-fix buttons */
.seo-dash-fix {
  display: inline;
  background: none;
  border: none;
  color: #a78bfa;
  font-size: 10px;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  text-decoration: none;
  transition: color .15s;
}
.seo-dash-fix:hover { color: #c4b5fd; text-decoration: underline; }

.schema-box {
  background: #0a0a18;
  border: 1px solid #1a1a35;
  border-radius: 6px;
  padding: 8px;
  font-size: 10px;
  color: #888;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ── Focus Keyword Checklist ─────────────────────────── */
.fkw-checklist { display: flex; flex-direction: column; gap: 4px; }

.fkw-check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid #12121e;
  font-size: 11px;
}
.fkw-check-row:last-child { border-bottom: none; }

.fkw-check-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 500;
}
.fkw-pass { background: rgba(34,197,94,.15); color: #22c55e; }
.fkw-warn { background: rgba(250,204,21,.15); color: #facc15; }

.fkw-check-label { color: #c0c0d8; flex: 1; }

.fkw-check-hint {
  font-size: 10px;
  color: #facc15;
  opacity: .8;
  max-width: 50%;
  text-align: right;
}

/* ── Keyphrase Density ───────────────────────────────── */
.fkw-density { margin-top: 6px; }

.fkw-density-stat {
  font-size: 11px;
  margin-bottom: 4px;
}

.fkw-density-bar-track {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: #1a1a2a;
  overflow: hidden;
}

.fkw-density-bar-optimal {
  position: absolute;
  left: 16.67%;         /* 0.5/3 * 100 */
  width: 66.67%;        /* (2.5-0.5)/3 * 100 */
  height: 100%;
  background: rgba(34,197,94,.15);
  border-radius: 3px;
}

.fkw-density-bar-fill {
  position: absolute;
  left: 0;
  height: 100%;
  border-radius: 3px;
  transition: width .4s, background .3s;
}

.fkw-density-hint {
  font-size: 10px;
  margin-top: 3px;
}

/* ── LSI / Related Keywords ──────────────────────────── */
.fkw-lsi { }

.lsi-kw-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 6px;
}

.lsi-kw-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: #12121e;
  border-radius: 5px;
  font-size: 11px;
}

.lsi-kw-status { font-size: 11px; font-weight: 500; flex-shrink: 0; }
.lsi-found  { color: #22c55e; }
.lsi-missing { color: #f87171; }

.lsi-kw-text { color: #c0c0d8; flex: 1; }

.lsi-kw-remove {
  background: none;
  border: none;
  color: #444466;
  cursor: pointer;
  font-size: 14px;
  padding: 0 2px;
  line-height: 1;
}
.lsi-kw-remove:hover { color: #f87171; }

.btn-lsi-add {
  background: #1a1a30;
  border: 1px solid #22223a;
  border-radius: 6px;
  color: #a78bfa;
  font-size: 11px;
  padding: 6px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.btn-lsi-add:hover { background: #22223a; }

.btn-lsi-suggest {
  background: linear-gradient(135deg, #2a1a4a, #1a1a30);
  border: 1px solid #33225a;
  border-radius: 6px;
  color: #a78bfa;
  font-size: 11px;
  padding: 6px 12px;
  cursor: pointer;
  width: 100%;
  transition: background .15s, border-color .15s;
}
.btn-lsi-suggest:hover { border-color: #5a3e9a; }
.btn-lsi-suggest:disabled { opacity: .5; cursor: wait; }

.lsi-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.lsi-pill {
  background: #1a1a30;
  border: 1px solid #22223a;
  border-radius: 12px;
  color: #c0c0d8;
  font-size: 10px;
  padding: 3px 10px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.lsi-pill:hover { border-color: #5a3e9a; background: #22223a; }
.lsi-pill:disabled { cursor: default; }

/* ── Readability Section ─────────────────────────────── */

/* Circular score ring */
.read-score-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 10px;
}
.read-score-ring { width: 80px; height: 80px; transform: rotate(-90deg); }
.read-score-bg {
  fill: none;
  stroke: #1a1a2a;
  stroke-width: 6;
}
.read-score-fg {
  fill: none;
  stroke: #22c55e;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset .6s ease, stroke .3s;
}
.read-score-num {
  position: absolute;
  font-size: 20px;
  font-weight: 500;
  color: #a78bfa;
}

/* Outdated banner */
.read-outdated {
  background: rgba(250,204,21,.08);
  border: 1px solid rgba(250,204,21,.2);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 10px;
  color: #facc15;
  line-height: 1.5;
  margin-bottom: 8px;
}
.read-outdated-btn {
  background: none;
  border: none;
  color: #facc15;
  font-size: 10px;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
}
.read-outdated-btn:hover { color: #fde68a; }

/* Analyze button */
.btn-read-analyze {
  background: linear-gradient(135deg, #1a2a4a, #1a1a30);
  border: 1px solid #223355;
  border-radius: 6px;
  color: #7ab8fa;
  font-size: 11px;
  padding: 7px 14px;
  cursor: pointer;
  width: 100%;
  transition: background .15s, border-color .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-read-analyze:hover { border-color: #4488cc; }
.btn-read-analyze:disabled { opacity: .5; cursor: wait; }

/* Spinner */
.read-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(122,184,250,.25);
  border-top-color: #7ab8fa;
  border-radius: 50%;
  animation: read-spin .6s linear infinite;
}
@keyframes read-spin { to { transform: rotate(360deg); } }

/* Results checklist */
.read-checklist {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
}
.read-check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #12121e;
}
.read-check-row:last-child { border-bottom: none; }

.read-check-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 500;
}
.read-good { background: rgba(34,197,94,.15); color: #22c55e; }
.read-ok   { background: rgba(250,204,21,.15); color: #facc15; }
.read-poor { background: rgba(248,113,113,.15); color: #f87171; }

.read-check-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.read-check-label {
  font-size: 11px;
  color: #c0c0d8;
}
.read-check-hint {
  font-size: 10px;
  color: #888;
  line-height: 1.4;
}

/* ── SERP & Social Preview ────────────────────────────── */

/* Counter colors */
.serp-ctr-green { color: #22c55e !important; }
.serp-ctr-amber { color: #facc15 !important; }
.serp-ctr-red   { color: #f87171 !important; }

.serp-counter-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}
.serp-trunc-warn {
  font-size: 10px;
  color: #facc15;
  white-space: nowrap;
}

/* Tabs */
.serp-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 10px;
  background: #0a0a14;
  border-radius: 6px;
  padding: 2px;
}
.serp-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  color: #555577;
  padding: 5px 0;
  cursor: pointer;
  transition: background .15s, color .15s;
  text-align: center;
}
.serp-tab:hover { color: #aaa; }
.serp-tab-active {
  background: #1a1a30;
  color: #c0c0e0;
}

/* Cards (hidden by default, .serp-card-active shows) */
.serp-card { display: none; }
.serp-card-active { display: block; }

/* Desktop card */
.serp-card-desktop {
  background: #fff;
  border-radius: 8px;
  padding: 14px 16px;
  max-width: 600px;
}
.serp-card-desktop .serp-url {
  font-size: 12px;
  color: #202124;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.serp-breadcrumb { color: #5f6368; }
.serp-card-desktop .serp-title {
  font-size: 20px;
  color: #1a0dab;
  line-height: 1.3;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.serp-card-desktop .serp-title:hover { text-decoration: underline; }
.serp-card-desktop .serp-desc {
  font-size: 14px;
  color: #4d5156;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.serp-card-desktop .serp-desc strong,
.serp-card-mobile .serp-desc strong,
.serp-card-desktop .serp-title strong,
.serp-card-mobile .serp-title strong {
  font-weight: 500;
}

/* Mobile card */
.serp-card-mobile {
  background: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  max-width: 360px;
}
.serp-card-mobile .serp-url {
  font-size: 11px;
  color: #202124;
  margin-bottom: 2px;
}
.serp-card-mobile .serp-title {
  font-size: 16px;
  color: #1a0dab;
  line-height: 1.3;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.serp-card-mobile .serp-desc {
  font-size: 12px;
  color: #4d5156;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Social / OG card */
.serp-card-social {
  background: #fff;
  border: 1px solid #dadde1;
  border-radius: 8px;
  overflow: hidden;
  max-width: 500px;
}
.serp-og-image {
  background: #e4e6eb;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #65676b;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.serp-og-body {
  padding: 10px 12px;
}
.serp-og-domain {
  font-size: 11px;
  color: #606770;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 2px;
}
.serp-og-title {
  font-size: 15px;
  font-weight: 500;
  color: #1d2129;
  line-height: 1.3;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.serp-og-desc {
  font-size: 13px;
  color: #606770;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Content Gap Analysis ────────────────────────────── */
.cgap-results { margin-top: 8px; }
.cgap-assessment {
  font-size: 11px;
  color: #999;
  line-height: 1.5;
  margin-bottom: 8px;
  padding: 8px;
  background: #0a0a14;
  border-radius: 6px;
}
.cgap-issues { display: flex; flex-direction: column; gap: 4px; }
.cgap-issue {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 8px;
  background: #0a0a14;
  border-radius: 6px;
  cursor: pointer;
}
.cgap-sev-badge {
  font-size: 9px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  flex-shrink: 0;
  margin-top: 1px;
}
.cgap-sev-high { background: rgba(248,113,113,.15); color: #f87171; }
.cgap-sev-med  { background: rgba(250,204,21,.15);  color: #facc15; }
.cgap-sev-low  { background: rgba(34,197,94,.15);   color: #22c55e; }
.cgap-issue-body { flex: 1; min-width: 0; }
.cgap-issue-desc { font-size: 11px; color: #c0c0d8; }
.cgap-issue-sugg { font-size: 10px; color: #888; margin-top: 4px; line-height: 1.4; }
.cgap-topics { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.cgap-strength { font-size: 11px; color: #aaa; display: flex; align-items: center; gap: 6px; padding: 2px 0; }

/* ── Internal Links ──────────────────────────────────── */
.ilinks-count {
  font-size: 11px;
  color: #666688;
  margin-bottom: 6px;
}
.ilinks-results { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.ilink-card {
  background: #0a0a14;
  border: 1px solid #1a1a30;
  border-radius: 6px;
  padding: 8px 10px;
}
.ilink-title { font-size: 12px; color: #c0c0d8; font-weight: 500; }
.ilink-url { font-size: 10px; color: #555577; margin: 2px 0 4px; word-break: break-all; }
.ilink-anchor-row { display: flex; align-items: center; gap: 6px; }
.ilink-reason { font-size: 10px; color: #666688; margin-top: 4px; font-style: italic; }

/* ── Technical SEO ───────────────────────────────────── */
.tech-seo-warn {
  font-size: 10px;
  color: #facc15;
  margin-top: 4px;
}
.tech-seo-noindex-warn {
  background: rgba(248,113,113,.1);
  border: 1px solid rgba(248,113,113,.3);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 10px;
  color: #f87171;
  margin-top: 6px;
  font-weight: 500;
}
.tech-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}
.tech-toggle-label { font-size: 11px; color: #c0c0d8; }
.tech-toggle {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
}
.tech-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.tech-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #333;
  border-radius: 18px;
  transition: background .2s;
}
.tech-toggle-slider::before {
  content: '';
  position: absolute;
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
}
.tech-toggle input:checked + .tech-toggle-slider { background: #22c55e; }
.tech-toggle input:checked + .tech-toggle-slider::before { transform: translateX(16px); }

/* ── Image Audit ─────────────────────────────────────── */
.img-audit-summary {
  font-size: 11px;
  color: #666688;
  margin-bottom: 6px;
}
.img-audit-results { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.img-audit-row {
  background: #0a0a14;
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.img-audit-src {
  font-size: 10px;
  color: #666688;
  word-break: break-all;
  flex: 1;
  min-width: 80px;
}
.img-badge {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 500;
  flex-shrink: 0;
}
.img-badge-ok   { background: rgba(34,197,94,.15); color: #22c55e; }
.img-badge-warn { background: rgba(250,204,21,.15); color: #facc15; }
.img-alt-input { flex-basis: 100%; margin-top: 4px; }
.img-alt-suggestion {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

.editor-field-label {
  font-size: 11px;
  font-weight: 500;
  color: #44446a;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.editor-title-input {
  background: #12121e;
  border: 1px solid #22223a;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 500;
  color: #e0e0f0;
  outline: none;
  width: 100%;
  transition: border-color .15s;
}

.editor-title-input:focus { border-color: #5a3e9a; }
.editor-title-input::placeholder { color: #2a2a45; }

.editor-body-input {
  background: #12121e;
  border: 1px solid #22223a;
  border-radius: 8px;
  padding: 14px;
  font-size: 13px;
  color: #d0d0e8;
  outline: none;
  width: 100%;
  min-height: 220px;
  resize: vertical;
  line-height: 1.7;
  transition: border-color .15s;
}

.editor-body-input:focus { border-color: #5a3e9a; }
.editor-body-input::placeholder { color: #2a2a45; }

.editor-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-save-draft {
  background: #1a1435;
  border: 1px solid #2d1f55;
  border-radius: 7px;
  padding: 9px 16px;
  font-size: 12px;
  font-weight: 500;
  color: #a78bfa;
  cursor: pointer;
  transition: background .15s;
}

.btn-save-draft:hover    { background: #221a45; }
.btn-save-draft:disabled { opacity: .4; cursor: not-allowed; }

.btn-publish-req {
  background: #0d2010;
  border: 1px solid #1a3a20;
  border-radius: 7px;
  padding: 9px 16px;
  font-size: 12px;
  font-weight: 500;
  color: #4ade80;
  cursor: pointer;
  transition: background .15s;
}

.btn-publish-req:hover { background: #122818; }

.btn-ai-fill {
  background: #12121e;
  border: 1px solid #2d1f55;
  border-radius: 7px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #8b6ef5;
  cursor: pointer;
  transition: background .15s;
}

.btn-ai-fill:hover { background: #1a1030; }

.editor-status {
  font-size: 11px;
  color: #444466;
  margin-left: auto;
}

/* ══════════════════════════════════════
   KEYWORDS
══════════════════════════════════════ */
.kw-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.kw-stat {
  background: #0f0f1a;
  border: 1px solid #1a1a30;
  border-radius: 8px;
  padding: 12px;
}

.kw-stat-val {
  font-size: 20px;
  font-weight: 500;
  color: #a78bfa;
}

.kw-stat-key {
  font-size: 11px;
  color: #444466;
  margin-top: 2px;
}

.kw-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.kw-status-cards { margin-top: 12px; }

.kw-filter-group { display: flex; gap: 5px; }

.kw-filter, .kw-status {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #2a2a45;
  background: #12122a;
  color: #8888aa;
  cursor: pointer;
  transition: all .15s;
}

.kw-filter:hover,  .kw-status:hover  { border-color: #5a3e9a; color: #a890ee; }
.kw-filter.active, .kw-status.active { background: #1a1435; border-color: #5a3e9a; color: #a78bfa; }

.kw-search {
  background: #12121e;
  border: 1px solid #22223a;
  border-radius: 7px;
  padding: 6px 12px;
  font-size: 12px;
  color: #e0e0f0;
  outline: none;
  width: 180px;
  transition: border-color .15s;
}

.kw-search:focus { border-color: #5a3e9a; }
.kw-search::placeholder { color: #2a2a45; }

.kw-table-wrap {
  background: #0f0f1a;
  border: 1px solid #1a1a30;
  border-radius: 10px;
  overflow: hidden;
}

.kw-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.kw-table th {
  background: #141428;
  padding: 9px 12px;
  text-align: left;
  font-size: 10px;
  font-weight: 500;
  color: #44446a;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-bottom: 1px solid #1a1a35;
}

.kw-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #12121e;
  vertical-align: middle;
}

.kw-table tr:last-child td { border-bottom: none; }
.kw-table tr:hover td      { background: #121225; }

.kw-keyword { font-weight: 500; color: #c8c8e0; }

.intent-badge, .priority-badge, .cluster-tag {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 500;
}

.intent-informational  { background: #0d1a25; color: #60a5fa; border: 1px solid #1a2e45; }
.intent-commercial     { background: #1a1010; color: #fb923c; border: 1px solid #2a1a10; }
.intent-navigational   { background: #0d1a10; color: #4ade80; border: 1px solid #1a2e20; }
.intent-transactional  { background: #1a0d1a; color: #e879f9; border: 1px solid #2a1535; }

.priority-high   { background: #1a1010; color: #f87171; border: 1px solid #2a1515; }
.priority-medium { background: #1a1a10; color: #facc15; border: 1px solid #2a2a18; }
.priority-low    { background: #0d1a10; color: #4ade80; border: 1px solid #1a2e20; }

.cluster-tag { background: #12122a; color: #8888cc; border: 1px solid #1e1e3a; }

.kw-btn {
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid;
  transition: all .15s;
  margin-right: 4px;
}

.kw-btn-write { background: #0d1a10; border-color: #1a2e20; color: #4ade80; }
.kw-btn-write:hover { background: #122818; }
.kw-btn-del   { background: #1a0a0a; border-color: #2a1515; color: #f87171; }
.kw-btn-del:hover { background: #220f0f; }

/* ── UPLOAD ── */
.upload-zone {
  border: 2px dashed #2a2a45;
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}

.upload-zone:hover,
.upload-zone.drag { border-color: #5a3e9a; background: #0f0f1e; }

.upload-zone-icon { font-size: 28px; margin-bottom: 8px; }
.upload-zone-text { font-size: 13px; color: #888; }
.upload-zone-sub  { font-size: 11px; color: #444466; margin-top: 4px; }

.manual-kw-area { display: flex; gap: 10px; align-items: flex-start; }

.manual-kw-input {
  flex: 1;
  background: #12121e;
  border: 1px solid #22223a;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #e0e0f0;
  outline: none;
  min-height: 100px;
  resize: vertical;
  transition: border-color .15s;
}

.manual-kw-input:focus { border-color: #5a3e9a; }
.manual-kw-input::placeholder { color: #2a2a45; }

/* ══════════════════════════════════════
   AI CHAT
══════════════════════════════════════ */
.chat-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  height: 100%;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
}

.msg { display: flex; flex-direction: column; gap: 4px; }

.msg-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.msg.user .msg-label  { color: #5a5a7a; text-align: right; }
.msg.user             { align-items: flex-end; }
.msg.assistant .msg-label { color: #7c5fe8; }
.msg.system .msg-label    { color: #22c55e; }

.msg-bubble {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  max-width: 85%;
}

.msg.user .msg-bubble      { background: #14142a; border: 1px solid #1e1e38; color: #c8c8e0; }
.msg.assistant .msg-bubble { background: #120f1e; border: 1px solid #2a1e4a; color: #d8d0f0; }
.msg.system .msg-bubble    {
  background: #0d1a10;
  border: 1px solid #1a3022;
  color: #6ee7a0;
  font-size: 11.5px;
}

.thinking {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 4px 0;
}

.thinking span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7c5fe8;
  animation: bounce .9s ease-in-out infinite;
}

.thinking span:nth-child(2) { animation-delay: .15s; }
.thinking span:nth-child(3) { animation-delay: .3s; }

@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30%            { transform: translateY(-4px); opacity: 1; }
}

.chat-input-area {
  padding: 12px 20px;
  background: #0c0c18;
  border-top: 1px solid #1a1a28;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  background: #12121e;
  border: 1px solid #22223a;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  color: #e0e0f0;
  outline: none;
  transition: border-color .15s;
}

.chat-input:focus { border-color: #4a3a8a; }
.chat-input::placeholder { color: #3a3a55; }

.send-btn {
  background: #5a3e9a;
  border: none;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  flex-shrink: 0;
}

.send-btn:hover    { background: #6a4eaa; }
.send-btn:disabled { background: #2a2a40; cursor: not-allowed; }
.send-btn svg      { width: 16px; height: 16px; }

/* ══════════════════════════════════════
   MODALS
══════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: #00000088;
  z-index: 400;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.show { display: flex; }

.modal {
  background: #0f0f1a;
  border: 1px solid #1e1e35;
  border-radius: 14px;
  padding: 26px;
  width: 420px;
  max-width: 95vw;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-icon  { font-size: 26px; text-align: center; }
.modal-title { font-size: 15px; font-weight: 500; color: #fff; text-align: center; }

.modal-body {
  font-size: 13px;
  color: #888;
  line-height: 1.6;
  text-align: center;
}

.modal-body strong { color: #ccc; }

.modal-input {
  background: #12121e;
  border: 1px solid #22223a;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #e0e0f0;
  outline: none;
  width: 100%;
  transition: border-color .15s;
}

.modal-input:focus { border-color: #5a3e9a; }
.modal-input::placeholder { color: #2a2a45; }

.modal-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: #888;
  cursor: pointer;
}

.modal-checkbox-row input {
  width: 16px;
  height: 16px;
  accent-color: #f87171;
  cursor: pointer;
}

.modal-actions { display: flex; gap: 10px; }

.modal-btn-cancel {
  flex: 1;
  background: #1a1a2a;
  border: 1px solid #2a2a40;
  border-radius: 7px;
  padding: 9px;
  font-size: 13px;
  color: #888;
  cursor: pointer;
  transition: background .15s;
}

.modal-btn-cancel:hover { background: #222235; }

.modal-btn-confirm {
  flex: 1;
  border: none;
  border-radius: 7px;
  padding: 9px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
}

.modal-btn-confirm.green  { background: #1a3a20; color: #4ade80; }
.modal-btn-confirm.green:hover { background: #1e4425; }
.modal-btn-confirm.red    { background: #3a1515; color: #f87171; }
.modal-btn-confirm.red:hover { background: #451a1a; }
.modal-btn-confirm.purple { background: #2a1a4a; color: #a78bfa; }
.modal-btn-confirm.purple:hover { background: #321d58; }
.modal-btn-confirm:disabled { opacity: .3; cursor: not-allowed; }

.modal-step-indicator { display: flex; gap: 6px; justify-content: center; }

.step-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2a2a45;
  transition: background .2s;
}

.step-dot.active { background: #f87171; }
.step-dot.done   { background: #4ade80; }

.modal-warning-box {
  background: #1a0a0a;
  border: 1px solid #3a1515;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  color: #f87171;
  text-align: center;
}

/* ══════════════════════════════════════
   GENERATE MODAL
══════════════════════════════════════ */
.gen-field  { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.gen-label  { font-size: 11px; font-weight: 500; color: #44446a; letter-spacing: .08em; text-transform: uppercase; }

.gen-select {
  background-color: #12121e;
  border: 1px solid #22223a;
  border-radius: 7px;
  padding: 8px 30px 8px 12px;
  font-size: 12px;
  color: #d0d0e8;
  outline: none;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='%239a9ac4' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 6px;
}

.gen-kw-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }

.gen-chip {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 20px;
  background: #1a1435;
  border: 1px solid #2d1f55;
  color: #a78bfa;
  cursor: pointer;
  transition: all .15s;
}

.gen-chip.selected { background: #2d1f55; border-color: #5a3e9a; }

.progress-bar {
  height: 4px;
  background: #1a1a2a;
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #5a3e9a, #a78bfa);
  animation: prog 2s ease-in-out infinite;
}

@keyframes prog {
  0%   { width: 0%;  margin-left: 0%; }
  50%  { width: 60%; margin-left: 20%; }
  100% { width: 0%;  margin-left: 100%; }
}

/* ══════════════════════════════════════
   TAXONOMY MANAGEMENT
══════════════════════════════════════ */

/* ── Add / inline-edit form ── */
.tax-add-form {
  display: none;
  padding: 14px;
  background: #12122a;
  border: 1px solid #2a2a45;
  border-radius: 8px;
  margin-bottom: 16px;
}

.tax-add-form.show { display: block; }

.tax-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}

.tax-form-field { display: flex; flex-direction: column; gap: 4px; }

.tax-form-field--full { grid-column: 1 / -1; }

.tax-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.tax-required { color: #f87171; margin-left: 2px; }

.tax-hint {
  font-size: 10px;
  color: #555577;
  font-weight: 400;
}

/* ── Management table ── */
.tax-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.tax-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 500;
  color: #6060a0;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid #1a1a30;
}

.tax-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #0f0f1a;
  color: #c8c8e0;
  vertical-align: middle;
}

.tax-term-row:hover td { background: #0d0d1e; }

.tax-name-cell { font-weight: 500; }

.tax-slug-cell,
.tax-parent-cell {
  font-size: 11px;
  color: #8888aa;
}

.tax-desc-cell {
  font-size: 11.5px;
  color: #8888aa;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tax-count-cell {
  font-size: 11px;
  color: #8888aa;
  text-align: center;
}

.tax-actions-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.tax-actions-cell .btn-inline-edit { margin-right: 0; }

.tax-term-name { color: #c8c8e0; }

.tax-tree-indicator {
  color: #333355;
  font-size: 11px;
  margin-right: 2px;
  user-select: none;
}

/* ── Inline action buttons ── */
.btn-inline-edit,
.btn-inline-delete {
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 11px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .12s, color .12s;
}

.btn-inline-edit {
  background: #1a1a35;
  border-color: #2a2a55;
  color: #a0a0d0;
  margin-right: 4px;
}

.btn-inline-edit:hover { background: #22224a; color: #c8c8f0; }

.btn-inline-delete {
  background: transparent;
  border-color: #2a1515;
  color: #8a4444;
}

.btn-inline-delete:hover { background: #1a0a0a; color: #f87171; border-color: #5a2020; }

/* ── Inline edit row ── */
.tax-edit-row td { padding: 12px 14px; background: #0d0d22; }
/* tax-edit-row is now a div (card list, not a table) */
.tax-edit-row {
  padding: 12px 14px;
  margin-bottom: 8px;
  background: #0d0d22;
  border: 1px solid #1a1a30;
  border-radius: 10px;
}

.tax-inline-edit-form { padding: 4px 0; }

.tax-edit-error {
  font-size: 11px;
  color: #f87171;
  margin-top: 6px;
}

/* ── Inline delete confirm ── */
.tax-del-confirm {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tax-del-msg {
  font-size: 11.5px;
  color: #aaaacc;
}

/* ── Danger button ── */
.btn-danger {
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 11px;
  cursor: pointer;
  background: #3a0a0a;
  border: 1px solid #6a2020;
  color: #f87171;
  transition: background .12s;
}

.btn-danger:hover { background: #550f0f; }

/* ── Tag pill input ── */
.tax-tag-wrap { position: relative; }

.tax-tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 22px;
  margin-bottom: 2px;
}

.tax-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  background: #1a1435;
  border: 1px solid #2d1f55;
  color: #a78bfa;
}

.tax-pill-remove {
  background: none;
  border: none;
  color: #5a3e9a;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 1px;
  display: flex;
  align-items: center;
  transition: color .12s;
}

.tax-pill-remove:hover { color: #f87171; }

.tax-tag-suggestions {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: #0f0f1a;
  border: 1px solid #2a2a45;
  border-radius: 7px;
  z-index: 50;
  display: none;
  overflow: hidden;
  box-shadow: 0 4px 16px #00000066;
}

.tax-sug-item {
  padding: 7px 12px;
  font-size: 12px;
  color: #c8c8e0;
  cursor: pointer;
  transition: background .1s;
}

.tax-sug-item:hover   { background: #14142a; }
.tax-sug-create       { color: #a78bfa; }

/* ── Category checklist ── */
.tax-checklist {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 140px;
  overflow-y: auto;
}

.tax-check-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #c8c8e0;
  cursor: pointer;
  padding: 3px 0;
}

.tax-check-row input[type="checkbox"] {
  accent-color: #a78bfa;
  width: 13px;
  height: 13px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── AI suggestions area ── */
.tax-ai-area { margin-top: 4px; }

.tax-ai-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tax-pill-suggestion {
  cursor: pointer;
  background: #12182a;
  border-color: #1e2e55;
  color: #60a5fa;
  transition: all .15s;
}

.tax-pill-suggestion:hover { background: #1a2045; border-color: #3a5e9a; }

.tax-pill-used {
  opacity: .45;
  pointer-events: none;
}

/* ══════════════════════════════════════
   CONTENT INBOX
══════════════════════════════════════ */

/* Two-panel layout */
.inbox-layout {
  display: flex;
  height: 100%;
  gap: 0;
  min-height: 0;
}

.inbox-left {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #1a1a2a;
  background: #0c0c18;
}

.inbox-right {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Filters ── */
.inbox-filters {
  display: flex;
  gap: 2px;
  padding: 10px 10px 0;
  flex-wrap: wrap;
}

.inbox-tab {
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 5px;
  background: none;
  border: none;
  color: #555;
  cursor: pointer;
  font-weight: 500;
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.inbox-tab:hover  { color: #888; background: #14142a; }
.inbox-tab.active { color: #a78bfa; background: #1a1435; }

.inbox-tab-count {
  font-size: 9px;
  background: #1a1a30;
  color: #888;
  border-radius: 8px;
  padding: 1px 5px;
}

.inbox-tab.active .inbox-tab-count {
  background: #2d1f55;
  color: #a78bfa;
}

/* ── Item list ── */
.inbox-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: all .15s;
  border-left: 3px solid transparent;
}

.inbox-item:hover    { background: #14142a; }
.inbox-item.selected { background: #1a1435; border-left-color: #5a3e9a; }

.inbox-item-body { flex: 1; min-width: 0; }

.inbox-item-title {
  font-size: 12px;
  font-weight: 500;
  color: #c8c8e0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.inbox-item-source {
  font-size: 10px;
  color: #444466;
}

/* Priority dots */
.inbox-priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.inbox-priority-high   { background: #f87171; }
.inbox-priority-medium { background: #facc15; }
.inbox-priority-low    { background: #4ade80; }

/* Status pills */
.inbox-status-pill {
  font-size: 9px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}

.inbox-status-new     { background: #101a25; color: #60a5fa; border: 1px solid #1a2e45; }
.inbox-status-review  { background: #1a1a10; color: #facc15; border: 1px solid #2a2a18; }
.inbox-status-used    { background: #0d2010; color: #4ade80; border: 1px solid #1a3a20; }
.inbox-status-archived { background: #1a1010; color: #888;   border: 1px solid #2a2020; }

/* Add button */
.inbox-add-btn {
  margin: 8px;
  padding: 9px;
  background: #1a1435;
  border: 1px solid #2d1f55;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  color: #a78bfa;
  cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}
.inbox-add-btn:hover { background: #221a45; }

/* ── List states ── */
.inbox-list-empty {
  text-align: center;
  padding: 30px 10px;
  color: #333355;
  font-size: 12px;
}

.inbox-list-error {
  text-align: center;
  padding: 20px 10px;
  color: #f87171;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.inbox-retry-btn {
  background: #1a1435;
  border: 1px solid #2d1f55;
  border-radius: 5px;
  color: #a78bfa;
  font-size: 11px;
  padding: 5px 12px;
  cursor: pointer;
}

/* Skeleton loader */
.inbox-skeleton {
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.inbox-skeleton-line {
  height: 10px;
  border-radius: 4px;
  background: #1a1a2a;
  animation: inbox-pulse 1.2s ease-in-out infinite;
}
.inbox-skeleton-line.long  { width: 80%; }
.inbox-skeleton-line.short { width: 50%; }
@keyframes inbox-pulse {
  0%, 100% { opacity: .3; }
  50%      { opacity: .6; }
}

/* ── Detail panel ── */
.inbox-empty-detail {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #333355;
  font-size: 13px;
}

.inbox-detail-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inbox-detail-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inbox-detail-title {
  font-size: 16px;
  font-weight: 500;
  color: #e0e0f0;
  cursor: pointer;
  border-bottom: 1px dashed transparent;
  transition: border-color .15s;
}
.inbox-detail-title:hover { border-bottom-color: #44446a; }

.inbox-detail-title-input {
  font-size: 16px;
  font-weight: 500;
  color: #e0e0f0;
  background: #12121e;
  border: 1px solid #5a3e9a;
  border-radius: 6px;
  padding: 4px 8px;
  outline: none;
  flex: 1;
}

.inbox-detail-meta {
  font-size: 11px;
  color: #444466;
}

.inbox-detail-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.inbox-action-btn {
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  border: 1px solid;
  transition: all .15s;
}

.inbox-btn-generate  { background: #1a1435; border-color: #2d1f55; color: #a78bfa; }
.inbox-btn-generate:hover { background: #221a45; }
.inbox-btn-summarise { background: #101a25; border-color: #1a2e45; color: #60a5fa; }
.inbox-btn-summarise:hover { background: #142235; }
.inbox-btn-archive   { background: #1a1a10; border-color: #2a2a18; color: #888; }
.inbox-btn-archive:hover { background: #222210; }
.inbox-btn-delete    { background: #12121e; border-color: #2a2a45; color: #888; }
.inbox-btn-delete:hover { background: #1a1a2a; }
.inbox-btn-delete-confirm { background: #2a1515; border-color: #3a1515; color: #f87171; }
.inbox-btn-delete-final   { background: #3a1515; border-color: #551a1a; color: #f87171; font-weight: 500; }

.inbox-action-btn:disabled { opacity: .4; cursor: wait; }

/* ── Sections ── */
.inbox-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inbox-section-label {
  font-size: 10px;
  font-weight: 500;
  color: #44446a;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.inbox-source-link {
  font-size: 12px;
  color: #60a5fa;
  text-decoration: none;
  word-break: break-all;
}
.inbox-source-link:hover { text-decoration: underline; }

/* Summary */
.inbox-summary-block {
  background: #12182a;
  border: 1px solid #1e2e45;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 12px;
  color: #c0c8e0;
  line-height: 1.6;
}

.inbox-summary-empty {
  font-size: 12px;
  color: #444466;
  font-style: italic;
}

.inbox-summary-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #60a5fa;
}

.inbox-inline-error {
  font-size: 11px;
  color: #f87171;
  margin-top: 4px;
}

/* Spinner */
.inbox-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(96,165,250,.25);
  border-top-color: #60a5fa;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* Content preview */
.inbox-content-preview {
  background: #0a0a14;
  border: 1px solid #1a1a30;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 11px;
  color: #888;
  max-height: 140px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}
.inbox-content-preview.expanded { max-height: none; }

.inbox-toggle-content {
  background: none;
  border: none;
  color: #a78bfa;
  font-size: 11px;
  cursor: pointer;
  padding: 0;
}
.inbox-toggle-content:hover { text-decoration: underline; }

/* Tags */
.inbox-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.inbox-tag {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 12px;
  background: #1a1435;
  border: 1px solid #2d1f55;
  color: #a78bfa;
  display: flex;
  align-items: center;
  gap: 4px;
}

.inbox-tag-remove {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  line-height: 1;
}
.inbox-tag-remove:hover { color: #f87171; }

.inbox-tag-input {
  background: none;
  border: none;
  outline: none;
  color: #c8c8e0;
  font-size: 11px;
  min-width: 80px;
}
.inbox-tag-input::placeholder { color: #333355; }

/* Todos */
.inbox-todos {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inbox-todo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 12px;
  color: #c8c8e0;
  cursor: pointer;
}
.inbox-todo.done span { text-decoration: line-through; color: #444466; }

.inbox-todo input[type="checkbox"] {
  accent-color: #a78bfa;
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.inbox-todo-add { margin-top: 4px; }

.inbox-todo-input {
  background: none;
  border: none;
  border-bottom: 1px solid #1a1a30;
  outline: none;
  color: #c8c8e0;
  font-size: 12px;
  padding: 5px 0;
  width: 100%;
}
.inbox-todo-input::placeholder { color: #333355; }
.inbox-todo-input:focus { border-bottom-color: #5a3e9a; }

/* Linked article */
.inbox-linked-post {
  font-size: 12px;
  color: #60a5fa;
  text-decoration: none;
}
.inbox-linked-post:hover { text-decoration: underline; }

.inbox-muted {
  font-size: 12px;
  color: #444466;
}

/* ── Error banner ── */
.inbox-error-banner {
  background: #1a0a0a;
  border: 1px solid #3a1515;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  color: #f87171;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inbox-error-dismiss {
  background: none;
  border: none;
  color: #f87171;
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
}

/* ── Toast ── */
.inbox-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a3a20;
  border: 1px solid #2a5a30;
  color: #4ade80;
  font-size: 12px;
  padding: 8px 18px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
  z-index: 500;
}
.inbox-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Add modal extras ── */
.inbox-modal-tabs {
  display: flex;
  gap: 2px;
  background: #0a0a14;
  border-radius: 6px;
  padding: 2px;
}

.inbox-modal-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  color: #555577;
  padding: 7px;
  cursor: pointer;
  transition: all .15s;
}
.inbox-modal-tab:hover  { color: #888; }
.inbox-modal-tab.active { background: #1a1435; color: #a78bfa; }

.inbox-modal-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inbox-modal-error {
  font-size: 12px;
  color: #f87171;
  background: #1a0a0a;
  border: 1px solid #3a1515;
  border-radius: 6px;
  padding: 8px 12px;
}

.inbox-url-error {
  font-size: 11px;
  color: #f87171;
  margin-top: 2px;
}

.inbox-url-content-preview {
  background: #0a0a14;
  border: 1px solid #1a1a30;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 11px;
  color: #888;
  max-height: 120px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}

.inbox-fetch-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #60a5fa;
}

/* ══════════════════════════════════════
   NEW NAV ICONS + STUB MODULE LAYOUT
   (added — do not edit existing rules above)
══════════════════════════════════════ */
.nav-item .nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.nav-svg-icon {
  width: 16px;
  height: 16px;
  display: block;
  color: currentColor;
}

#sidebar-resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  cursor: col-resize;
  z-index: 10;
  background: transparent;
  transition: background 0.15s;
}

#sidebar-resize-handle:hover {
  background: rgba(255, 255, 255, 0.08);
}

#sidebar-resize-handle.dragging {
  background: rgba(255, 255, 255, 0.15);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.section-title {
  font-size: 14px;
  font-weight: 500;
  color: #ccc;
  margin: 0;
}

.section-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.section-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-card {
  background: #0f0f1a;
  border: 1px solid #1a1a30;
  border-radius: 10px;
  padding: 14px 16px;
}

/* SEO modules show 4 metric boxes — keep them on a single line. */
.seo-stat-row {
  grid-template-columns: repeat(4, 1fr);
}
.seo-stat-row .stat-card { min-width: 0; }

.stat-card-label {
  font-size: 10px;
  color: #555577;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 6px;
}

.stat-card-value {
  font-size: 22px;
  font-weight: 500;
  color: #c8c8e0;
  line-height: 1.1;
}

.stub-empty-state {
  background: #0f0f1a;
  border: 1px dashed #1f1f35;
  border-radius: 10px;
  padding: 44px 24px;
  text-align: center;
}

.stub-empty-state-title {
  font-size: 13px;
  color: #6a6a8a;
  margin-bottom: 6px;
  font-weight: 500;
}

.stub-empty-state-desc {
  font-size: 12px;
  color: #44446a;
  max-width: 440px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ════════════════════════════════════════════════════════════
   BI MODULES — competitors / products / industry / partners
   Phase 2a scaffold. Refined as the BI suite matures.
   ════════════════════════════════════════════════════════════ */

.bi-stat-cards {
  grid-template-columns: repeat(5, 1fr);
}

.bi-stat-value-text {
  font-size: 14px;
  font-weight: 500;
  color: #aaaacc;
  line-height: 1.4;
  padding-top: 4px;
}

/* ── BI list + card ── */
.bi-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bi-card {
  background: #0f0f1a;
  border: 1px solid #1a1a30;
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .15s, background .15s;
}

.bi-card:hover {
  border-color: #2a2a45;
  background: #11111e;
}

.bi-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.bi-card-name {
  font-size: 15px;
  font-weight: 500;
  color: #d8d8e8;
  letter-spacing: 0.005em;
}

.bi-card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.bi-badge {
  font-size: 9.5px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border: 1px solid;
  line-height: 1.2;
}

.bi-badge-pending { color: #d4a857; background: #2a2210; border-color: #4a3a20; }
.bi-badge-look    { color: #7a9cd8; background: #14182a; border-color: #2a3050; }
.bi-badge-comp    { color: #7ac8a0; background: #142220; border-color: #2a4035; }
.bi-badge-alt     { color: #d88090; background: #2a1418; border-color: #4a2530; }

.bi-badge-source {
  color: #6a6a8a;
  background: #12121e;
  border-color: #22223a;
  text-transform: lowercase;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.bi-card-url {
  font-size: 12px;
  word-break: break-all;
}
.bi-card-url a {
  color: #7a8acc;
  text-decoration: none;
}
.bi-card-url a:hover {
  color: #9aa6dc;
  text-decoration: underline;
}

.bi-card-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: #a8a8c0;
  line-height: 1.5;
}

.bi-card-meta-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: baseline;
}

.bi-card-meta-label {
  color: #555577;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 10px;
}

/* relationship counts bar */
.bi-card-relbar {
  display: flex;
  gap: 16px;
  padding: 8px 10px;
  background: #0a0a14;
  border: 1px solid #15152a;
  border-radius: 8px;
  font-size: 11px;
  color: #8888aa;
  align-items: center;
  flex-wrap: wrap;
}

.bi-card-relbar-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bi-card-relbar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.bi-card-relbar-dot-look { background: #7a9cd8; }
.bi-card-relbar-dot-comp { background: #7ac8a0; }
.bi-card-relbar-dot-alt  { background: #d88090; }

.bi-card-relbar-count {
  color: #d8d8e8;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.bi-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px dashed #1a1a30;
}

.bi-card-footer-meta {
  font-size: 11px;
  color: #555577;
}

.bi-card-details-btn {
  background: none;
  border: none;
  color: #8888cc;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
  font-family: inherit;
  transition: color .12s;
}

.bi-card-details-btn:hover { color: #aaaaee; }

/* ── BI empty state (richer than stub-empty-state) ── */
.bi-empty-state {
  background: #0f0f1a;
  border: 1px dashed #1f1f35;
  border-radius: 12px;
  padding: 56px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bi-empty-icon {
  font-size: 36px;
  margin-bottom: 16px;
  opacity: 0.7;
}

.bi-empty-title {
  font-size: 15px;
  font-weight: 500;
  color: #aaaacc;
  margin-bottom: 10px;
}

.bi-empty-desc {
  font-size: 12.5px;
  color: #6a6a8a;
  max-width: 480px;
  line-height: 1.6;
  margin-bottom: 22px;
}

.bi-empty-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

.bi-empty-hint {
  font-size: 11px;
  color: #44446a;
  font-style: italic;
  max-width: 480px;
  line-height: 1.55;
}

/* ── Research · Competitor Analysis ── */
.research-intro {
  margin-bottom: 12px;
  font-size: 12.5px;
  color: #8888aa;
  line-height: 1.55;
}

.research-soon {
  margin-top: 10px;
  font-size: 11.5px;
  color: #b0a0e8;
  font-style: italic;
}

.research-summary {
  margin: 10px 0 6px;
  font-size: 13px;
  color: #c8c8e4;
  line-height: 1.6;
}

/* ── Research: clickable card + "last analysed" affordances ── */
.bi-card-clickable {
  cursor: pointer;
}
.bi-card-clickable:hover {
  border-color: #2a2a45;
  background: #11111e;
}

.research-when {
  color: #c8c8e4;
}
.research-when.research-never {
  color: #7a7a9a;
  font-style: italic;
}
.research-ago {
  color: #8a8aaa;
}

/* Footer that carries the "last analysed" date on the left, button on the
   right (base .bi-card-footer already space-betweens its children). */
.bi-card-footer-split .research-when {
  font-size: 12px;
  min-width: 0;
}
.research-cap-count {
  color: #8aa0e0;
}

/* ── Capture buttons on result rows ── */
.research-cap-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.research-cap-btn {
  font-size: 11px;
  line-height: 1.2;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid #2a2a48;
  background: #15152400;
  color: #9aa0c8;
  cursor: pointer;
  transition: border-color .12s, background .12s, color .12s;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.research-cap-btn:hover {
  border-color: #3a3a64;
  background: #1a1a30;
  color: #c8c8e8;
}
.research-cap-btn:disabled {
  opacity: .55;
  cursor: default;
}
.research-cap-btn.is-captured {
  border-color: #2a5a3a;
  background: #16301f;
  color: #7ad99a;
}

/* ── Topics Bank rows ── */
.tb-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 2px;
  font-size: 11px;
  color: #6f6f93;
}
.tb-src { color: #8aa0e0; }
.tb-src-manual { color: #6f6f93; font-style: italic; }
.tb-when { color: #6f6f93; }
.tb-del {
  background: none;
  border: none;
  color: #7a7a9a;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 4px;
  border-radius: 6px;
}
.tb-del:hover { background: #2a1a22; color: #f0a0b8; }

/* ── To-do hub ── */
.todo-filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 4px 0 14px;
}
.todo-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.todo-filter-label {
  font-size: 11px;
  color: #6f6f93;
  width: 64px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.todo-type, .todo-source {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #2a2a48;
  color: #9aa0c8;
}
.todo-source { color: #8aa0e0; border-color: #2a3358; }
.todo-act { cursor: pointer; }

.todo-add-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  margin-bottom: 14px;
  background: #0f0f1a;
  border: 1px solid #22223a;
  border-radius: 10px;
}
.todo-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.todo-add-row .field-input { width: auto; }

/* Inline status selects (Topics Bank / Keywords Planner) */
.tb-status, .kw-status-sel {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid #2a2a45;
  background: #14141f;
  color: #9090b4;
}
.todo-substatus { margin: 2px 0 12px; }
/* Status filter boxes kept on one line (Topics Bank / Keywords Planner) */
.tb-status-cards, .kw-status-cards {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin: 0 0 14px;
}
.tb-status-cards .stat-card, .kw-status-cards .stat-card {
  flex: 1 1 0;
  min-width: 0;
}
/* Content Planner has 8 pipeline statuses — wrap instead of one cramped line */
.cp-status-cards { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.cp-status-cards .stat-card { flex: 1 1 110px; min-width: 0; }

/* Content Planner — AI suggestions panel */
.cp-suggest-panel {
  background: #15102a;
  border: 1px solid #3a2a64;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 14px;
}
.cp-suggest-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: #b0a0e8; margin-bottom: 10px;
}
.cp-suggest-card { background: #0f0f1a; margin-bottom: 8px; }
.cp-suggest-card:last-child { margin-bottom: 0; }

.sidebar-version {
  display: block;
  padding: 6px 14px;
  font-size: 10.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #5a5a78;
  text-decoration: none;
  border-top: 1px solid #1a1a30;
}
.sidebar-version:hover { color: #8a8ab8; }

.kw-src-badge {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid #2a3358;
  color: #8aa0e0;
  vertical-align: middle;
}

/* Research bulk-select highlight */
.bi-card-selected {
  border-color: #3a3a64 !important;
  background: #16162a !important;
}
.bi-card-check { accent-color: #8a7af0; vertical-align: middle; }

.research-analyzed-banner {
  margin: 4px 0 12px;
  padding: 7px 12px;
  font-size: 12px;
  color: #aaaacc;
  background: #12121e;
  border: 1px solid #22223a;
  border-radius: 8px;
  display: inline-block;
}

.research-prose {
  margin: 0;
  font-size: 12.5px;
  color: #aaaacc;
  line-height: 1.6;
}

.research-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.research-row {
  padding: 10px 12px;
  background: #12121e;
  border: 1px solid #22223a;
  border-radius: 8px;
}

.research-row-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.research-row-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #ddddf0;
}

.research-row-desc {
  margin-top: 4px;
  font-size: 12px;
  color: #9090b4;
  line-height: 1.55;
}

.research-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.research-chip,
.research-tag {
  display: inline-block;
  padding: 2px 8px;
  background: #1a1a30;
  border: 1px solid #2a2a45;
  border-radius: 10px;
  font-size: 11px;
  color: #aaaaee;
}

.research-tag {
  margin-left: auto;
}

.research-prio {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.research-prio-high   { background: #3a1a24; border: 1px solid #5a2a3a; color: #f0a0b8; }
.research-prio-medium { background: #2a2440; border: 1px solid #3a3464; color: #c0b0e8; }
.research-prio-low    { background: #1a2a2a; border: 1px solid #2a4040; color: #90c0c0; }

.research-row-action {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.research-promote-btn {
  font-size: 11.5px;
  padding: 3px 10px;
}

.research-promoted {
  font-size: 11.5px;
  color: #80d0a0;
  font-weight: 600;
}

.research-promote-err {
  font-size: 11.5px;
  color: #f0a0b8;
}

/* ── BI · Status facet (e.g. Partners: Potential→Prospect→Active / Declined) ── */
.bi-status-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.bi-filter-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6a6a8a;
  margin-right: 2px;
}

.bi-status-chip {
  padding: 4px 11px;
  background: #12121e;
  border: 1px solid #2a2a45;
  border-radius: 13px;
  font-size: 11.5px;
  color: #9090b4;
  cursor: pointer;
}
.bi-status-chip:hover { border-color: #3a3a64; color: #c0c0e0; }
.bi-status-chip.active { background: #15102a; border-color: #5a3e9a; color: #c8b8f0; }

.bi-status-select {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid #2a2a45;
  background: #14141f;
  color: #c0c0e0;
  cursor: pointer;
}

.bi-status-pot { border-color: #3a3a64; color: #b0b0d8; }
.bi-status-pro { border-color: #3a3464; color: #c0b0e8; }
.bi-status-act { border-color: #2a5a3a; color: #80d0a0; }
.bi-status-dec { border-color: #5a2a3a; color: #f0a0b8; }
.bi-status-dir { border-color: #4a3a1a; color: #e0c080; }
.bi-status-ind { border-color: #2a3a4a; color: #90b0d0; }
.bi-status-alt { border-color: #4a2a3a; color: #e0a0c0; }
.bi-status-chip.bi-status-act.active { border-color: #2a5a3a; color: #80d0a0; }
.bi-status-chip.bi-status-dec.active { border-color: #5a2a3a; color: #f0a0b8; }

/* ── BI · Cross-fetch already-tracked rows ── */
.bi-exists-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #0f1410;
  border: 1px solid #2a3a2a;
  border-radius: 8px;
  opacity: 0.8;
}
.bi-exists-check {
  width: 20px; height: 20px; flex-shrink: 0;
  border-radius: 50%;
  background: #1a3a24; color: #80d0a0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.bi-already-tag {
  font-size: 10px;
  color: #80d0a0;
  border: 1px solid #2a5a3a;
  border-radius: 4px;
  padding: 0 5px;
  margin-left: 4px;
}

.bi-cat-tag {
  font-size: 10px;
  color: #b0a0e8;
  background: #15102a;
  border: 1px solid #3a2a64;
  border-radius: 4px;
  padding: 0 6px;
  margin-left: 4px;
}

/* ── BI · live web-search grounding badge (in results headers) ── */
.bi-web-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  border-radius: 5px;
  padding: 1px 7px;
  margin: 0 4px;
  vertical-align: middle;
}
.bi-web-on   { color: #7fe0c0; background: #0e2a22; border: 1px solid #1f6b54; }
.bi-web-off  { color: #9a9ab0; background: #1a1a26; border: 1px solid #3a3a4e; }
.bi-web-warn { color: #f0c674; background: #2a230e; border: 1px solid #6b561f; }

/* ── BI · opt-in "Search the live web" toggle (Suggest / Grow-from) ── */
.bi-web-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #c8c8e0;
  margin: 10px 0 4px;
  cursor: pointer;
  user-select: none;
}
.bi-web-toggle input { width: 15px; height: 15px; accent-color: #5a3e9a; cursor: pointer; }
.bi-web-toggle-hint { color: #7a7a96; font-size: 12px; }

/* ── BI · Grow-from-Business-Profile part picker ── */
.bi-bp-pick-group { margin: 10px 0; }
.bi-bp-pick-head {
  font-size: 12px;
  font-weight: 600;
  color: #b0a0e8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.bi-bp-pick-count {
  font-weight: 400;
  color: #7a7a96;
  margin-left: 4px;
}

/* ── BI · clickable stat cards (filter the list by validation status) ── */
.bi-stat-clickable { cursor: pointer; transition: border-color .12s ease, background .12s ease; }
.bi-stat-clickable:hover { border-color: #5a3e9a; }
.bi-stat-clickable.active { border-color: #7b5cc4; background: #1a1430; box-shadow: inset 0 0 0 1px #7b5cc4; }

/* ── BI · share to another site ── */
.bi-card-share-btn {
  background: none; border: 1px solid #3a2a64; color: #b0a0e8;
  border-radius: 6px; padding: 3px 10px; font-size: 12px; cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.bi-card-share-btn:hover { border-color: #5a3e9a; background: #15102a; }
.bi-share-sites { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.bi-share-all-row { margin-top: 10px; padding-bottom: 6px; border-bottom: 1px solid #222236; }
.inbox-btn-approve { background: #1f6b54 !important; color: #eafff5 !important; border-color: #1f6b54 !important; }
.inbox-btn-approve:hover { background: #258066 !important; }
.inbox-share-banner .inbox-share-note { color: #c8c8e0; font-size: 13px; line-height: 1.5; }

/* ── BI · Products as offerings (providers) ── */
.bi-prod-sub { display: flex; gap: 8px; align-items: center; margin: 2px 0 6px; flex-wrap: wrap; }
.bi-prod-market { font-size: 11px; color: #8a8aa6; }
.bi-prod-offered { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; cursor: pointer; padding: 6px 0; border-top: 1px solid #221c3a; border-bottom: 1px solid #221c3a; }
.bi-prod-offeredby { font-size: 12px; color: #8a8aa6; }
.bi-prov-pill { font-size: 11px; font-weight: 600; border-radius: 5px; padding: 1px 7px; border: 1px solid #3a3a4e; color: #c8c8e0; background: #15102a; }
.bi-prov-us   { color: #7fe0c0; border-color: #1f6b54; background: #0e2a22; }
.bi-prov-comp { color: #f0a0a0; border-color: #6b2f2f; background: #2a1414; }
.bi-prov-part { color: #b0a0e8; border-color: #3a2a64; background: #15102a; }
.bi-prov-mkt  { color: #f0c674; border-color: #6b561f; background: #2a230e; }
.bi-prov-toggle { margin-left: auto; color: #8a8aa6; font-size: 12px; }
.bi-prov-list { display: flex; flex-direction: column; gap: 5px; padding: 8px 0; }
.bi-prov-empty { color: #8a8aa6; font-size: 12px; font-style: italic; }
.bi-prov-row { display: flex; gap: 8px; align-items: center; font-size: 12px; }
.bi-prov-icon { width: 16px; text-align: center; }
.bi-prov-name { flex: 1; color: #d0d0e8; }
.bi-prov-name a { color: #b0a0e8; }
.bi-prov-tracked { font-size: 10px; color: #7fe0c0; }
.bi-prov-price { font-size: 11px; color: #f0c674; }
.bi-prov-src, .bi-prov-seen { font-size: 10px; color: #6a6a8a; }
.bi-of-item { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.bi-of-name { display: flex; flex-direction: column; }
.bi-of-summary { font-size: 11px; color: #8a8aa6; }
.bi-of-cat { max-width: 210px; }

/* ── BI · Products sub-product tree ── */
.bi-variant-tag { font-size: 11px; color: #7fe0c0; border: 1px solid #1f6b54; border-radius: 4px; padding: 0 6px; margin-left: 6px; }
.bi-variants-row { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 6px 0; font-size: 12px; color: #b0a0e8; border-top: 1px solid #221c3a; }
.bi-variants-toggle { color: #8a8aa6; }
.bi-variants-label { font-weight: 600; }
.bi-variants-roll { color: #8a8aa6; font-weight: 400; }
.bi-tree-node { /* indentation set inline by depth */ }
.bi-tree-node .bi-tree-node { border-left: 2px solid #221c3a; padding-left: 10px; }

/* ── BI · whole card clickable → details ── */
.bi-card[data-id] { cursor: pointer; transition: border-color .12s ease; }
.bi-card[data-id]:hover { border-color: #5a3e9a; }
/* detail "page": title/profile click → edit modal */
.bi-detail-title { cursor: pointer; }
.bi-detail-title:hover { text-decoration: underline dotted #5a3e9a; }
/* the open item reacts to the cursor like a list card → click opens edit */
.bi-detail-profile { cursor: pointer; border: 1px solid transparent; border-radius: 8px; transition: border-color .12s ease; }
.bi-detail-profile:hover { border-color: #5a3e9a; }
.bi-detail-section a[data-action], .bi-detail-breadcrumb a { cursor: pointer; color: #b0a0e8; }
.bi-detail-breadcrumb { font-size: 12px; color: #8a8aa6; margin-bottom: 8px; }

/* ── Settings & Users (reference scaffolds) ── */
.set-banner { background: #15102a; border: 1px solid #3a2a64; color: #c8c8e0; border-radius: 8px; padding: 10px 14px; font-size: 13px; line-height: 1.5; margin-bottom: 16px; }
.set-card { background: #0f0f1a; border: 1px solid #1a1a30; border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
.set-card-title { font-size: 14px; font-weight: 600; color: #c8c8e0; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.set-badge { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #8a8aa6; border: 1px solid #3a3a4e; border-radius: 5px; padding: 1px 7px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 0; border-top: 1px solid #15151f; }
.set-row:first-of-type { border-top: none; }
.set-row-label { font-size: 13px; color: #c8c8e0; display: flex; flex-direction: column; }
.set-row-hint { font-size: 11px; color: #6a6a8a; margin-top: 2px; }
.set-row-value { font-size: 13px; color: #aaaacc; text-align: right; }
.set-ro { color: #8a8aa6; }
.set-toggle { position: relative; display: inline-block; width: 36px; height: 20px; opacity: .55; }
.set-toggle input { display: none; }
.set-toggle-track { position: absolute; inset: 0; background: #2a2a3e; border-radius: 20px; transition: background .15s; }
.set-toggle-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #c8c8e0; border-radius: 50%; transition: left .15s; }
.set-toggle input:checked + .set-toggle-track { background: #5a3e9a; }
.set-toggle input:checked + .set-toggle-track::after { left: 18px; }

.usr-app-roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.usr-role-card { background: #15151f; border: 1px solid #222236; border-radius: 8px; padding: 10px 12px; }
.usr-role-name { font-size: 13px; font-weight: 600; color: #b0a0e8; margin-bottom: 4px; }
.usr-role-desc { font-size: 11px; color: #8a8aa6; line-height: 1.45; }
.usr-app-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.usr-wp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.usr-card { display: flex; gap: 12px; align-items: center; background: #15151f; border: 1px solid #222236; border-radius: 10px; padding: 12px 14px; }
.usr-avatar { width: 38px; height: 38px; flex: none; border-radius: 50%; background: #2a1f4a; color: #b0a0e8; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.usr-info { min-width: 0; }
.usr-name { font-size: 13px; font-weight: 600; color: #d0d0e8; }
.usr-email { font-size: 11px; color: #8a8aa6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usr-roles { margin-top: 4px; display: flex; gap: 4px; flex-wrap: wrap; }
.usr-role-chip { font-size: 10px; color: #9a9ab0; border: 1px solid #3a3a4e; border-radius: 4px; padding: 0 6px; }

/* ── BI · product detail provider controls ── */
.bi-prov-act { background: none; border: 1px solid #3a3a4e; color: #9a9ab0; border-radius: 4px; padding: 0 6px; font-size: 11px; cursor: pointer; }
.bi-prov-act:hover { border-color: #5a3e9a; color: #c8c8e0; }
.bi-reparent-row { display: flex; gap: 8px; align-items: center; }
.bi-dup-banner { border: 1px solid #6b561f; background: #2a230e; }

/* ── BI · bulk select + archived ── */
.bi-badge-archived { color: #9a9ab0; background: #1a1a26; border: 1px solid #3a3a4e; }
.bi-bulk-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: #15102a; border: 1px solid #3a2a64; border-radius: 8px;
  padding: 8px 12px; margin: 10px 0;
}
.bi-bulk-count { font-size: 13px; font-weight: 600; color: #b0a0e8; }
.bi-bulk-sep { flex: 1; }

/* Clean inline "Select all" label + status-set group for bulk bars */
.bulk-select-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #c8c8e4;
  cursor: pointer;
  white-space: nowrap;
}
.bulk-select-all input { accent-color: #8a7af0; width: 15px; height: 15px; cursor: pointer; }
.bulk-set-group { display: inline-flex; align-items: center; gap: 6px; }
.bi-bulk-bar .bi-form-select { font-size: 12px; padding: 4px 8px; }
.bi-bulk-btn {
  background: none; border: 1px solid #3a3a4e; color: #c8c8e0;
  border-radius: 6px; padding: 4px 10px; font-size: 12px; cursor: pointer;
}
.bi-bulk-btn:hover:not(:disabled) { border-color: #5a3e9a; background: #1a1430; }
.bi-bulk-btn:disabled { opacity: 0.4; cursor: default; }
.bi-bulk-danger { color: #f0a0a0; border-color: #6b2f2f; }
.bi-bulk-danger:hover:not(:disabled) { background: #2a1414; border-color: #8b3f3f; }
.bi-select-wrap { display: flex; align-items: flex-start; gap: 10px; }
.bi-select-wrap.selected .bi-select-card { outline: 2px solid #5a3e9a; border-radius: 12px; }
.bi-select-box { margin-top: 18px; width: 16px; height: 16px; accent-color: #5a3e9a; cursor: pointer; flex: none; }
.bi-select-card { flex: 1; min-width: 0; }

/* ── BI · Cross-module "Grow from…" source buttons ── */
.bi-cf-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.bi-cf-source {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  background: #12121e;
  border: 1px solid #2a2a45;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  min-width: 150px;
}
.bi-cf-source:hover:not(:disabled) { border-color: #5a3e9a; background: #15102a; }
.bi-cf-source:disabled { opacity: 0.5; cursor: default; }

.bi-cf-source-name { font-size: 12.5px; font-weight: 600; color: #ddddf0; }
.bi-cf-last { font-size: 10.5px; color: #6a6a8a; }

/* ── BI · "Mark as ours" toggle on entity cards ── */
.bi-card-footer-actions { display: flex; align-items: center; gap: 8px; }

.bi-move-select {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid #2a2a45;
  background: #14141f;
  color: #9090b4;
  cursor: pointer;
}
.bi-move-select:hover { border-color: #3a3a64; color: #c0c0e0; }

.bi-ours-toggle {
  border: 1px solid #2a2a45;
  background: #14141f;
  color: #8a8ab0;
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 11px;
  cursor: pointer;
}
.bi-ours-toggle:hover { border-color: #3a3a64; color: #b0b0d8; }
.bi-ours-toggle.is-ours {
  background: #15102a;
  border-color: #5a3e9a;
  color: #c8b8f0;
}

/* ── BI · Business Profile "ours" sections ── */
.bp-section {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #1a1a2a;
}

.bp-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #ddddf0;
  margin-bottom: 10px;
}

.bp-section-hint {
  margin-left: 8px;
  font-size: 11.5px;
  font-weight: 400;
  color: #6a6a8a;
}

.bp-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.bp-empty { font-size: 12px; color: #6a6a8a; font-style: italic; }

.bp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 11px;
  background: #15102a;
  border: 1px solid #3a2a64;
  border-radius: 14px;
  font-size: 12px;
  color: #c8b8f0;
}

.bp-chip-x {
  border: none;
  background: #2a2150;
  color: #b0a0e8;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  line-height: 14px;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}
.bp-chip-x:hover { background: #5a2a3a; color: #f0a0b8; }

.bp-add-row { display: flex; gap: 8px; max-width: 460px; }
.bp-add-row .field-input { flex: 1; }

.bp-fp-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.bp-fp-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 8px 10px;
  background: #12121e;
  border: 1px solid #22223a;
  border-radius: 8px;
  font-size: 12.5px;
  color: #ccccdd;
  cursor: pointer;
}
.bp-fp-summary { display: block; font-size: 11.5px; color: #8888aa; margin-top: 2px; }

/* ── BI · Market chip (active search constraint in module headers) ── */
.bi-market-chip {
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  padding: 3px 10px;
  background: #15102a;
  border: 1px solid #3a2a64;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 500;
  color: #b0a0e8;
  cursor: pointer;
  vertical-align: middle;
  max-width: 380px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bi-market-chip:hover { border-color: #5a3e9a; color: #c8b8f0; }

.bi-market-chip-unset {
  background: #2a1620;
  border-color: #5a2a3a;
  color: #f0a0b8;
}

/* ── BI · Fetch my site (owner) status ── */
.bi-owner-saved {
  padding: 10px 12px;
  background: #122418;
  border: 1px solid #2a5a3a;
  border-radius: 8px;
  font-size: 12.5px;
  color: #80d0a0;
  line-height: 1.5;
}

.bi-owner-err {
  padding: 10px 12px;
  background: #2a1620;
  border: 1px solid #5a2a3a;
  border-radius: 8px;
  font-size: 12.5px;
  color: #f0a0b8;
  line-height: 1.5;
}

/* ── Phase scaffold banner ── */
.bi-phase-banner {
  margin-top: 6px;
  padding: 10px 14px;
  background: #12121e;
  border: 1px solid #22223a;
  border-radius: 8px;
  font-size: 11.5px;
  color: #6a6a8a;
  line-height: 1.55;
}

.bi-phase-banner code {
  background: #1a1a30;
  border: 1px solid #2a2a45;
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 10.5px;
  color: #aaaaee;
}

.bi-phase-banner-tag {
  display: inline-block;
  background: #2a1a44;
  border: 1px solid #3a2a64;
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b0a0e8;
  margin-right: 8px;
  vertical-align: 1px;
}

/* ────────────────────────────────────────────────────────────
   BI · Add-Competitor modal (Phase B)
   ──────────────────────────────────────────────────────────── */

.bi-modal-add {
  width: 680px;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.bi-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 22px 24px 0;
}

.bi-modal-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bi-modal-close {
  background: none;
  border: none;
  color: #555577;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 10px;
  border-radius: 4px;
  font-family: inherit;
  transition: color .12s, background .12s;
}
.bi-modal-close:hover {
  color: #d8d8e8;
  background: #1a1a2e;
}

.bi-modal-tabs {
  display: flex;
  gap: 4px;
  padding: 14px 24px 0;
  border-bottom: 1px solid #1a1a30;
  flex-shrink: 0;
}

.bi-modal-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: #6a6a8a;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color .12s, border-color .12s;
  font-family: inherit;
}
.bi-modal-tab:hover { color: #aaaacc; }
.bi-modal-tab.active {
  color: #aaaaee;
  border-bottom-color: #5a3e9a;
}

.bi-modal-panel {
  padding: 20px 24px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bi-modal-panel[hidden] { display: none !important; }

/* Form grid */
.bi-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

.bi-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bi-form-field-wide {
  grid-column: 1 / -1;
}

.bi-form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='%239a9ac4' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-size: 10px 6px;
  background-repeat: no-repeat;
  padding-right: 30px;
}

.bi-form-hint {
  font-size: 11.5px;
  color: #6a6a8a;
  line-height: 1.55;
  margin-top: -4px;
  font-style: italic;
}

/* Fetch tab */
.bi-fetch-hint {
  font-size: 12.5px;
  color: #8a8aaa;
  line-height: 1.65;
  padding: 12px 14px;
  background: #0a0a14;
  border: 1px dashed #1f1f35;
  border-radius: 8px;
}

.bi-rel-token {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.bi-rel-token-look { color: #7a9cd8; background: #14182a; }
.bi-rel-token-comp { color: #7ac8a0; background: #142220; }
.bi-rel-token-alt  { color: #d88090; background: #2a1418; }

.bi-fetch-start-row {
  display: flex;
  justify-content: flex-end;
}

.bi-fetch-btn {
  padding: 9px 18px;
  font-size: 13px;
}

/* Fetch progress (multi-step) */
.bi-fetch-progress {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background: #0a0a14;
  border: 1px solid #1a1a30;
  border-radius: 8px;
}

.bi-fetch-progress-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: #44446a;
  transition: color .15s;
}

.bi-fetch-progress-step.active { color: #aaaacc; }
.bi-fetch-progress-step.done   { color: #7ac8a0; }

.bi-fetch-progress-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #2a2a45;
  background: #0a0a14;
  flex-shrink: 0;
  transition: all .15s;
}
.bi-fetch-progress-step.active .bi-fetch-progress-icon {
  border-color: #5a3e9a;
  border-top-color: transparent;
  animation: bi-spin .8s linear infinite;
}
.bi-fetch-progress-step.done .bi-fetch-progress-icon {
  background: #7ac8a0;
  border-color: #7ac8a0;
  animation: none;
}

@keyframes bi-spin {
  to { transform: rotate(360deg); }
}

/* Fetch results — extracted profile */
.bi-fetch-results-section + .bi-fetch-results-section {
  margin-top: 4px;
}

.bi-fetch-results-section-title {
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6a6a8a;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #1a1a30;
}

.bi-extracted-profile {
  background: #0a0a14;
  border: 1px solid #1a1a30;
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bi-extracted-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: center;
}

.bi-extracted-label {
  color: #555577;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 10px;
}

.bi-extracted-input {
  background: #0a0a14;
  border: 1px solid #1f1f35;
  color: #d8d8e8;
  padding: 7px 11px;
  border-radius: 6px;
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
  transition: border-color .12s, box-shadow .12s;
  width: 100%;
}
.bi-extracted-input:focus {
  border-color: #5a3e9a;
  box-shadow: 0 0 0 2px #5a3e9a22;
}

/* Neighbor proposals */
.bi-neighbor-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bi-neighbor-group + .bi-neighbor-group {
  margin-top: 12px;
}

.bi-neighbor-group-header {
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #8a8aaa;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.bi-neighbor-group-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.bi-neighbor-group-dot.look { background: #7a9cd8; }
.bi-neighbor-group-dot.comp { background: #7ac8a0; }
.bi-neighbor-group-dot.alt  { background: #d88090; }

.bi-neighbor-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 13px;
  background: #0a0a14;
  border: 1px solid #1a1a30;
  border-radius: 7px;
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color .12s, background .12s;
  user-select: none;
}
.bi-neighbor-card:hover {
  border-color: #2a2a45;
  background: #0d0d18;
}
.bi-neighbor-card.checked {
  border-color: #5a3e9a;
  background: #15102a;
}

.bi-neighbor-checkbox {
  width: 16px;
  height: 16px;
  border: 1.5px solid #2a2a45;
  border-radius: 3px;
  margin-top: 1px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  background: #0a0a14;
  transition: all .12s;
  line-height: 1;
}
.bi-neighbor-card.checked .bi-neighbor-checkbox {
  background: #5a3e9a;
  border-color: #5a3e9a;
}

.bi-neighbor-info { flex: 1; min-width: 0; }
.bi-neighbor-name { color: #d8d8e8; font-weight: 500; margin-bottom: 2px; }
.bi-neighbor-url  { color: #7a8acc; font-size: 11px; word-break: break-all; margin-bottom: 3px; }
.bi-neighbor-meta { color: #6a6a8a; font-size: 11px; }

/* ────────────────────────────────────────────────────────────
   BI · Competitor detail view (Phase C)
   ──────────────────────────────────────────────────────────── */

.bi-detail-header {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 6px 16px;
  margin-bottom: 6px;
}

.bi-detail-back {
  grid-row: 1;
  grid-column: 1;
  background: none;
  border: none;
  color: #8888cc;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
  font-family: inherit;
  transition: color .12s;
  text-align: left;
  align-self: start;
  justify-self: start;
}
.bi-detail-back:hover { color: #aaaaee; }

.bi-detail-title-row {
  grid-row: 2;
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bi-detail-title {
  font-size: 20px;
  font-weight: 500;
  color: #e0e0f0;
  margin: 0;
  letter-spacing: 0.005em;
}

.bi-detail-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.bi-detail-actions {
  grid-row: 2;
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-self: end;
}

.bi-detail-pending-pill {
  display: inline-block;
  background: #2a2210;
  border: 1px solid #4a3a20;
  color: #d4a857;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.bi-detail-section {
  margin-top: 18px;
}

.bi-detail-section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #1a1a30;
}

.bi-detail-section-title {
  font-size: 13px;
  font-weight: 500;
  color: #c8c8e0;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.01em;
}

.bi-detail-rel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.bi-detail-rel-dot-look { background: #7a9cd8; }
.bi-detail-rel-dot-comp { background: #7ac8a0; }
.bi-detail-rel-dot-alt  { background: #d88090; }

.bi-detail-rel-count {
  font-size: 11px;
  color: #6a6a8a;
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-left: 4px;
}

.bi-detail-add-rel {
  background: #12122a;
  border: 1px solid #2a2a45;
  border-radius: 6px;
  color: #8888cc;
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 10px;
  cursor: pointer;
  font-family: inherit;
  transition: all .12s;
}
.bi-detail-add-rel:hover {
  background: #1a1a3a;
  color: #aaaaee;
  border-color: #3a3a55;
}

/* Profile */
.bi-detail-profile {
  background: #0f0f1a;
  border: 1px solid #1a1a30;
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.bi-detail-profile-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  align-items: center;
}

.bi-detail-profile-label {
  color: #555577;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 10px;
}

.bi-detail-profile-value {
  color: #c8c8e0;
  font-size: 13px;
  word-break: break-word;
}

.bi-detail-profile-value a {
  color: #7a8acc;
  text-decoration: none;
}
.bi-detail-profile-value a:hover {
  color: #9aa6dc;
  text-decoration: underline;
}

/* Relationship sub-groups */
.bi-detail-rel-subgroup {
  margin-top: 12px;
}

.bi-detail-rel-subgroup-label {
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6a6a8a;
  margin-bottom: 8px;
}

.bi-detail-rel-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bi-detail-rel-empty {
  font-size: 12px;
  color: #555577;
  font-style: italic;
  padding: 14px 0;
}

/* Relationship cards (validated + pending) */
.bi-rel-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: #0f0f1a;
  border: 1px solid #1a1a30;
  border-radius: 8px;
  transition: border-color .12s, background .12s;
}

.bi-rel-card:hover {
  border-color: #2a2a45;
  background: #11111e;
}

.bi-rel-card-pending {
  border-color: #2a2210;
  background: #14110a;
  border-style: dashed;
}
.bi-rel-card-pending:hover {
  border-color: #4a3a20;
  background: #181410;
}

.bi-rel-card-info { flex: 1; min-width: 0; }

.bi-rel-card-name {
  color: #d8d8e8;
  font-weight: 500;
  font-size: 13px;
  margin-bottom: 3px;
}

.bi-rel-card-url {
  font-size: 11.5px;
  margin-bottom: 4px;
  word-break: break-all;
}
.bi-rel-card-url a {
  color: #7a8acc;
  text-decoration: none;
}
.bi-rel-card-url a:hover {
  color: #9aa6dc;
  text-decoration: underline;
}

.bi-rel-card-meta {
  font-size: 11.5px;
  color: #8888aa;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.bi-rel-card-confidence {
  display: inline-block;
  background: #2a2210;
  border: 1px solid #4a3a20;
  color: #d4a857;
  font-size: 10px;
  font-weight: 500;
  padding: 1px 7px;
  border-radius: 3px;
  letter-spacing: 0.04em;
}

.bi-rel-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  align-items: center;
}

.bi-rel-card-btn {
  background: #12122a;
  border: 1px solid #2a2a45;
  border-radius: 6px;
  color: #8888cc;
  font-size: 11.5px;
  font-weight: 500;
  padding: 6px 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all .12s;
  white-space: nowrap;
}
.bi-rel-card-btn:hover {
  background: #1a1a3a;
  color: #aaaaee;
}

.bi-rel-card-btn-accept {
  background: #142220;
  border-color: #2a4035;
  color: #7ac8a0;
}
.bi-rel-card-btn-accept:hover {
  background: #1c2e29;
  border-color: #3a5045;
  color: #9adabd;
}

.bi-rel-card-btn-reject {
  background: #2a1418;
  border-color: #4a2530;
  color: #d88090;
}
.bi-rel-card-btn-reject:hover {
  background: #341a20;
  border-color: #5a3040;
  color: #e2a0ad;
}

.bi-rel-card-btn-unlink {
  color: #6a6a8a;
}
.bi-rel-card-btn-unlink:hover {
  color: #d88090;
  border-color: #4a2530;
}

/* ────────────────────────────────────────────────────────────
   BI · Multi-relationship select (used in manual entry +
   fetch-extracted profile) and rel-pill toggles (used on each
   proposed-competitor card)
   ──────────────────────────────────────────────────────────── */

.bi-form-field-hint-inline {
  color: #6a6a8a;
  font-weight: 400;
  font-size: 10px;
  margin-left: 6px;
  text-transform: none;
  letter-spacing: 0;
}

.bi-rel-multi {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bi-rel-multi-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #0a0a14;
  border: 1px solid #1a1a30;
  border-radius: 8px;
  cursor: pointer;
  transition: all .12s;
  user-select: none;
  flex: 1;
  min-width: 0;
}

.bi-rel-multi-item input[type="checkbox"] {
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #5a3e9a;
}

.bi-rel-multi-item:hover {
  border-color: #2a2a45;
  background: #0d0d18;
}

.bi-rel-multi-item:has(input:checked) {
  border-color: #5a3e9a;
  background: #15102a;
}

.bi-rel-multi-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.bi-rel-multi-name {
  font-weight: 500;
  font-size: 12.5px;
  color: #d8d8e8;
}

.bi-rel-multi-hint {
  font-size: 10.5px;
  color: #6a6a8a;
  line-height: 1.3;
}

/* Compact variant in the extracted-profile relationship row */
.bi-extracted-row-multi {
  align-items: start;
}
.bi-extracted-row-multi .bi-rel-multi-item {
  padding: 7px 11px;
  gap: 8px;
}
.bi-extracted-row-multi .bi-rel-multi-name {
  font-size: 11.5px;
}
.bi-extracted-row-multi .bi-rel-multi-hint {
  display: none;
}

/* Rel-pill toggles (one per relationship on each proposed-competitor card) */
.bi-rel-pill {
  background: #0a0a14;
  border: 1px solid #1a1a30;
  border-radius: 999px;
  color: #555577;
  font-size: 10.5px;
  font-weight: 500;
  padding: 3px 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  transition: all .12s;
  line-height: 1.3;
}

.bi-rel-pill:hover {
  color: #aaaaee;
  border-color: #2a2a45;
}

.bi-rel-pill.active.bi-rel-pill-alt  { color: #d88090; background: #2a1418; border-color: #4a2530; }
.bi-rel-pill.active.bi-rel-pill-look { color: #7a9cd8; background: #14182a; border-color: #2a3050; }
.bi-rel-pill.active.bi-rel-pill-comp { color: #7ac8a0; background: #142220; border-color: #2a4035; }

/* ── Proposed-competitor card (in the fetch results, after extraction) ── */
.bi-proposed-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bi-proposed-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  background: #0a0a14;
  border: 1px solid #1a1a30;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .12s, background .12s;
  user-select: none;
}

.bi-proposed-card:hover {
  border-color: #2a2a45;
  background: #0d0d18;
}

.bi-proposed-card.checked {
  border-color: #5a3e9a;
  background: #15102a;
}

.bi-proposed-checkbox {
  width: 16px;
  height: 16px;
  border: 1.5px solid #2a2a45;
  border-radius: 3px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  background: #0a0a14;
  transition: all .12s;
  line-height: 1;
}

.bi-proposed-card.checked .bi-proposed-checkbox {
  background: #5a3e9a;
  border-color: #5a3e9a;
}

.bi-proposed-info { flex: 1; min-width: 0; }

.bi-proposed-name {
  color: #d8d8e8;
  font-weight: 500;
  font-size: 13px;
  margin-bottom: 2px;
}

.bi-proposed-url {
  color: #7a8acc;
  font-size: 11px;
  word-break: break-all;
  margin-bottom: 3px;
}

.bi-proposed-meta {
  color: #6a6a8a;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bi-proposed-rels {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  align-items: center;
}

/* Profile section multi-badges */
.bi-detail-profile-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

/* Suggest-from-my-site context textarea */
.bi-suggest-context-textarea {
  resize: vertical;
  font-family: inherit;
  min-height: 72px;
  line-height: 1.55;
}

/* Detail-view Delete button — colour-shifts to warning on hover */
.bi-detail-delete-btn:hover {
  color: #d88090;
  border-color: #4a2530;
  background: #1a1218;
}

/* Fetch-modal "this is my own site" toggle */
.bi-fetch-mode-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: #14102a;
  border: 1px solid #2a2150;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12.5px;
  color: #c8c8e0;
  user-select: none;
  line-height: 1.45;
}
.bi-fetch-mode-toggle:hover {
  background: #1a1432;
  border-color: #3a2a6a;
}
.bi-fetch-mode-toggle input[type="checkbox"] {
  accent-color: #5a3e9a;
  cursor: pointer;
  margin: 2px 0 0;
  flex-shrink: 0;
}
.bi-fetch-mode-toggle:has(input:checked) {
  background: #1f1640;
  border-color: #5a3e9a;
}
.bi-fetch-mode-hint {
  display: block;
  font-size: 11px;
  color: #6a6a8a;
  font-weight: 400;
  margin-top: 2px;
}

/* Bulk Meta Editor — highlight rows with unsaved edits */
.bm-table td { vertical-align: top; }
.bm-table .field-input { width: 100%; box-sizing: border-box; }
.bm-row-dirty { background: rgba(124, 124, 208, 0.10); }
.bm-row-dirty td:first-child { box-shadow: inset 3px 0 0 #7c7cd0; }

/* Editor — Search Console panel */
.gsc-perf-totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.gsc-perf-totals > div { background: #0f0f1a; border: 1px solid #1a1a30; border-radius: 8px; padding: 8px; text-align: center; }
.gsc-perf-totals span { display: block; font-size: 16px; font-weight: 500; color: #c8c8e0; }
.gsc-perf-totals label { font-size: 9px; text-transform: uppercase; letter-spacing: .06em; color: #555577; }
.gsc-perf-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.gsc-perf-table th { text-align: left; color: #667; font-weight: 500; padding: 3px 4px; border-bottom: 1px solid #1a1a30; }
.gsc-perf-table td { padding: 3px 4px; border-bottom: 1px solid #14141f; color: #aab; }
.gsc-perf-table td:first-child { color: #c8c8e0; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Pricing preview page (temporary) */
.pricing-tabs { margin: 8px 0 2px; }
.pricing-tagline { color: #9a9ac4; font-size: 14px; font-style: italic; margin: 2px 0 10px; }
.pricing-note {
  display: inline-block; margin: 0 0 16px;
  background: rgba(124,124,208,0.12); border: 1px solid #34345c;
  color: #b8b8da; font-size: 12px; padding: 6px 12px; border-radius: 8px;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 18px;
  align-items: stretch;
  padding: 14px 4px 8px;
}

.pricing-card {
  position: relative;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(124,124,208,0.06), transparent 60%),
    linear-gradient(180deg, #14141f 0%, #0e0e18 100%);
  border: 1px solid #232340;
  border-radius: 16px;
  padding: 26px 22px 22px;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.pricing-card:hover {
  transform: translateY(-4px);
  border-color: #34345c;
  box-shadow: 0 14px 34px -16px rgba(0,0,0,0.8);
}

/* Popular card — elevated, accent border + gradient top line */
.pricing-card.pricing-popular {
  border: 1px solid #33335c;
  background:
    radial-gradient(130% 90% at 50% 0%, rgba(124,124,208,0.16), transparent 62%),
    linear-gradient(180deg, #181830 0%, #0f0f1c 100%);
  box-shadow: 0 20px 44px -20px rgba(124,124,208,0.5);
}
.pricing-card.pricing-popular:hover { transform: translateY(-6px); }
/* Top accent line — drawn as a gradient TOP BORDER via the mask-composite ring
   trick. Because it's a border (not a bar), it hugs the rounded corners at
   constant 2px thickness and curves right into them. Doesn't clip the badge. */
.pricing-card.pricing-popular::before {
  content: ""; position: absolute; inset: -1px;
  border-radius: 16px;
  padding-top: 2px;
  background: linear-gradient(90deg, #7c7cd0, #a07cf0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.pricing-badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(90deg, #7c7cd0, #a07cf0);
  color: #fff; font-size: 10px; font-weight: 700; padding: 4px 12px;
  border-radius: 20px; text-transform: uppercase; letter-spacing: .06em;
  box-shadow: 0 4px 12px -2px rgba(124,124,208,0.6); white-space: nowrap;
}

.pricing-name {
  font-size: 13px; font-weight: 600; color: #b8b8da;
  text-transform: uppercase; letter-spacing: .08em;
}
.pricing-price {
  font-size: 34px; font-weight: 700; color: #fff;
  margin: 10px 0 2px; line-height: 1.05; letter-spacing: -0.02em;
}
.pricing-per { font-size: 13px; font-weight: 400; color: #6a6a8c; margin-left: 2px; }
.pricing-blurb { font-size: 12.5px; color: #8a8aac; min-height: 34px; line-height: 1.45; }

.pricing-features { list-style: none; padding: 0; margin: 16px 0 18px; flex: 1; }
.pricing-features li {
  font-size: 12.5px; color: #b4b4cc; padding: 7px 0 7px 24px;
  position: relative; border-top: 1px solid rgba(255,255,255,0.05);
}
.pricing-features li:first-child { border-top: 0; }
.pricing-features li:before {
  content: ""; position: absolute; left: 1px; top: 8px;
  width: 16px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%234ade80'/%3E%3Cpath d='M4.4 8.3l2.3 2.3 4.9-5' fill='none' stroke='%23121225' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

.pricing-cta {
  width: 100%; margin-top: auto; padding: 11px 14px;
  border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px solid #34345c; background: transparent; color: #c8c8e0;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.pricing-cta:hover { background: rgba(124,124,208,0.12); border-color: #7c7cd0; color: #fff; }
.pricing-cta.pricing-cta-fill {
  border-color: transparent; color: #fff;
  background: linear-gradient(90deg, #7c7cd0, #a07cf0);
  box-shadow: 0 8px 20px -8px rgba(124,124,208,0.7);
}
.pricing-cta.pricing-cta-fill:hover { filter: brightness(1.08); background: linear-gradient(90deg, #8a8ade, #aa86f5); }

/* ── Account auth (UM-1 login overlay) ── */
#account-auth-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 90% at 50% 0%, #15152a, #0a0a12);
}
.aa-card {
  width: 360px; max-width: calc(100vw - 32px);
  background: linear-gradient(180deg, #14141f, #0e0e18);
  border: 1px solid #232340; border-radius: 16px;
  padding: 28px 26px; box-shadow: 0 30px 70px -30px rgba(0,0,0,0.9);
}
.aa-brand { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #7c7cd0; font-weight: 600; }
.aa-title { font-size: 20px; font-weight: 600; color: #e8e8f4; margin: 6px 0 16px; }
.aa-label { display: block; font-size: 12px; color: #9a9ac4; margin-bottom: 12px; }
.aa-input {
  width: 100%; box-sizing: border-box; margin-top: 5px;
  background: #0f0f1a; border: 1px solid #2a2a45; border-radius: 9px;
  padding: 10px 12px; color: #e8e8f4; font-size: 14px;
}
.aa-input:focus { outline: none; border-color: #7c7cd0; }
.aa-btn { width: 100%; padding: 11px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; border: 0; margin-top: 4px; }
.aa-primary { background: linear-gradient(90deg, #7c7cd0, #a07cf0); color: #fff; }
.aa-primary:hover { filter: brightness(1.08); }
.aa-links { display: flex; justify-content: space-between; margin-top: 14px; }
.aa-links a { color: #7c7cd0; font-size: 12px; cursor: pointer; }
.aa-links a:hover { text-decoration: underline; }
.aa-msg { font-size: 12.5px; margin-bottom: 12px; min-height: 16px; }
.aa-msg.aa-err { color: #f87171; }
.aa-msg.aa-ok  { color: #4ade80; }
#aa-verify-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9000;
  background: rgba(124,124,208,0.15); border-bottom: 1px solid #34345c;
  color: #c8c8e0; font-size: 12px; text-align: center; padding: 6px 12px;
}
.aa-signout {
  display: block; width: 100%; box-sizing: border-box; margin: 4px 0;
  background: transparent; border: 1px solid #2a2a45; color: #9a9ac4;
  border-radius: 8px; padding: 6px 8px; font-size: 11px; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.aa-signout:hover { border-color: #7c7cd0; color: #e8e8f4; }

/* Users → My account (UM-2) */
.usr-acct-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 10px 0 16px; }
.usr-acct-label { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: #555577; }
.usr-acct-val { font-size: 14px; color: #c8c8e0; margin-top: 3px; }
.usr-field-row { display: flex; gap: 8px; align-items: flex-end; margin: 8px 0; flex-wrap: wrap; }
.usr-field-row .field-input { flex: 1; min-width: 160px; }
.set-subhead { font-size: 12px; font-weight: 600; color: #9a9ac4; margin: 16px 0 8px; border-top: 1px solid #1a1a30; padding-top: 14px; }
.usr-msg { font-size: 12px; min-height: 14px; }
.usr-msg.ok { color: #4ade80; }
.usr-msg.err { color: #f87171; }
.usr-session { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #14141f; }
.btn-link { background: none; border: 0; color: #7c7cd0; cursor: pointer; font-size: 12px; padding: 0; }
.btn-link:hover { text-decoration: underline; }

/* 2FA setup */
.tfa-secret { font-family: monospace; font-size: 16px; letter-spacing: 2px; color: #c8c8e0;
  background: #0f0f1a; border: 1px solid #2a2a45; border-radius: 8px; padding: 10px 12px; margin: 8px 0; word-break: break-all; }
.tfa-recovery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 10px 0; }
.tfa-recovery code { font-family: monospace; font-size: 13px; color: #e8e8f4; background: #0f0f1a;
  border: 1px solid #2a2a45; border-radius: 6px; padding: 6px 8px; text-align: center; }

/* ── Workspace console (post-login) ── */
#console-screen { display: none; }
#console-screen.show { display: block; }
.console-shell { display: flex; height: 100vh; background: #0a0a12; }
.console-sidebar { width: 230px; flex-shrink: 0; background: #0e0e18; border-right: 1px solid #1a1a30; display: flex; flex-direction: column; padding: 18px 12px; }
.console-brand { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #7c7cd0; padding: 6px 10px 16px; }
.console-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.console-navitem { display: flex; align-items: center; gap: 10px; background: none; border: 0; color: #9a9ac4; font-size: 14px; padding: 10px 12px; border-radius: 8px; cursor: pointer; text-align: left; }
.console-navitem:hover { background: rgba(255,255,255,0.04); color: #e8e8f4; }
.console-navitem.active { background: rgba(124,124,208,0.15); color: #fff; }
.console-navicon { width: 18px; text-align: center; }
.console-foot { border-top: 1px solid #1a1a30; padding-top: 12px; margin-top: 12px; }
.console-user { font-size: 12px; color: #c8c8e0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console-acct { font-size: 11px; color: #667; margin: 2px 0 8px; }
.console-signout { width: 100%; background: transparent; border: 1px solid #2a2a45; color: #9a9ac4; border-radius: 8px; padding: 7px; font-size: 12px; cursor: pointer; }
.console-signout:hover { border-color: #7c7cd0; color: #e8e8f4; }
.console-main { flex: 1; padding: 28px 32px; overflow-y: auto; height: 100vh; box-sizing: border-box; }
/* Add-site modal: custom dropdown arrow positioned a touch left of the edge */
/* field-input selects set their own background colour (shorthand), which wipes
   the global caret — restore it here with higher specificity. */
select.field-input {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='%239a9ac4' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 10px 6px; padding-right: 30px;
}
.console-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.console-head h1 { font-size: 22px; font-weight: 600; color: #e8e8f4; margin: 0; }
.console-empty { color: #8a8aac; font-size: 14px; padding: 24px; background: #0f0f1a; border: 1px solid #1a1a30; border-radius: 12px; }
.console-site { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: linear-gradient(180deg,#14141f,#0f0f1a); border: 1px solid #1f1f38; border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; cursor: pointer; transition: border-color .15s, transform .15s; }
.console-site:hover { border-color: #7c7cd0; transform: translateY(-2px); }
.csite-name { font-size: 15px; font-weight: 600; color: #e8e8f4; }
.csite-url { font-size: 12px; color: #8a8aac; margin: 2px 0 8px; }
.csite-badges { display: flex; gap: 6px; }
.csite-badge { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: #b8b8da; background: rgba(124,124,208,0.12); border: 1px solid #2a2a45; border-radius: 20px; padding: 2px 9px; }
.csite-role { color: #4ade80; }
.csite-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.csite-del { background: none; border: 0; cursor: pointer; font-size: 15px; opacity: .6; }
.csite-del:hover { opacity: 1; }
.console-modal-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(5,5,12,0.7); display: flex; align-items: center; justify-content: center; }
.console-modal { width: 380px; max-width: calc(100vw - 32px); background: linear-gradient(180deg,#14141f,#0e0e18); border: 1px solid #232340; border-radius: 14px; padding: 22px; }
.console-modal-title { font-size: 17px; font-weight: 600; color: #e8e8f4; margin-bottom: 14px; }
.console-modal .seo-label { display: block; margin-bottom: 12px; }
.console-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* Consistent dropdown caret across ALL native selects (status pickers etc.).
   Class-styled selects (.bi-form-select/.gen-select/.field-input) set their own
   matching caret; this covers the rest. */
select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='%239a9ac4' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 6px;
  padding-right: 30px;
}

/* Sidebar account (bottom) + topbar workspace button */
#sidebar-account { padding: 8px 4px 4px; }
.sidebar-acct-email { font-size: 11px; color: #667; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-workspace { background: rgba(124,124,208,0.14); border: 1px solid #34345c; color: #c8c8e0; border-radius: 8px; padding: 6px 12px; font-size: 12px; cursor: pointer; }
.topbar-workspace:hover { border-color: #7c7cd0; color: #fff; }

/* Team members (console Users) */
.mem-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #14141f; }
.mem-name { font-size: 13px; color: #e8e8f4; }
.mem-actions { display: flex; align-items: center; gap: 8px; }
.mem-role { width: auto; min-width: 100px; padding: 5px 8px; font-size: 12px; }

/* Restore the caret on small status selects (they set their own bg colour). */
.tb-status, .kw-status-sel, .bi-status-select, .bi-move-select, .cp-status {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='%239a9ac4' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 9px 6px; padding-right: 26px;
}

/* ── Agency dashboard (console, IMYBOSS only) ─────────────── */
.ag-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.ag-stat { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px 20px; min-width: 120px; flex: 1; }
.ag-stat-n { font-size: 26px; font-weight: 700; color: #111827; }
.ag-stat-l { font-size: 12px; color: #6b7280; margin-top: 2px; text-transform: uppercase; letter-spacing: .04em; }
.ag-table-wrap { overflow-x: auto; }
.ag-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ag-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; padding: 8px 10px; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
.ag-table td { padding: 10px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.ag-acct { font-weight: 600; color: #111827; }
.ag-sub { font-size: 12px; color: #9ca3af; }
.ag-tag { font-size: 10px; background: #eef2ff; color: #4338ca; border-radius: 6px; padding: 1px 6px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; vertical-align: middle; }
.ag-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.ag-dot.on { background: #16a34a; }
.ag-dot.off { background: #d1d5db; }
.ag-status { font-size: 12px; border-radius: 6px; padding: 2px 8px; text-transform: capitalize; font-weight: 600; }
.ag-active { background: #dcfce7; color: #166534; }
.ag-trialing { background: #dbeafe; color: #1e40af; }
.ag-past_due { background: #fef9c3; color: #854d0e; }
.ag-suspended, .ag-cancelled { background: #fee2e2; color: #991b1b; }
.ag-brandtag { font-size: 10px; background: #eef2ff; color: #4338ca; border-radius: 6px; padding: 1px 6px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; vertical-align: middle; margin-left: 4px; }
.console-enter-ws { width: 100%; margin-bottom: 10px; background: #4338ca; color: #fff; border: none; border-radius: 8px; padding: 8px 10px; font-size: 13px; cursor: pointer; }
.console-enter-ws:hover { background: #3730a3; }
.ag-toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.ag-search { flex: 1; min-width: 200px; }
.ag-status-sel { max-width: 180px; }
.ag-action { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: #f1f5f9; color: #334155; border-radius: 6px; padding: 2px 6px; }
.ag-row { cursor: pointer; }
.ag-row:hover { background: #f8fafc; }
.ag-back { cursor: pointer; color: #4338ca; text-decoration: none; }
.ag-back:hover { text-decoration: underline; }
.ag-detail-head { margin-bottom: 16px; }
.ag-detail-head .ag-sub { margin-top: 4px; }
.ag-eng-requested { background: #fef9c3; color: #854d0e; }
.ag-eng-proposed  { background: #dbeafe; color: #1e40af; }
.ag-eng-active    { background: #dcfce7; color: #166534; }
.ag-eng-declined, .ag-eng-revoked { background: #fee2e2; color: #991b1b; }
.ag-mgr-sel { max-width: 200px; }
#imp-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; background: #b45309; color: #fff; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 8px 14px; font-size: 13px; box-shadow: 0 -2px 8px rgba(0, 0, 0, .18); }
#imp-banner button { background: #fff; color: #b45309; border: none; border-radius: 6px; padding: 4px 12px; font-weight: 600; cursor: pointer; }
#toast-host { position: fixed; top: 16px; right: 16px; z-index: 10000; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.toast { background: #1f2937; color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 13px; line-height: 1.4; box-shadow: 0 6px 18px rgba(0, 0, 0, .22); opacity: 1; transition: opacity .3s ease; }
.toast-info { background: #1d4ed8; }
.toast-warn { background: #b45309; }
.toast-out { opacity: 0; }
.csite-badge.csite-usage-over { background: #fef3c7; color: #92400e; }
.rep-sec-title { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #9a9ac4; font-weight: 600; margin: 18px 0 8px; }
.docs-wrap { display: flex; gap: 18px; align-items: flex-start; }
.docs-nav { flex: 0 0 220px; display: flex; flex-direction: column; gap: 2px; }
.docs-cat { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #9a9ac4; font-weight: 600; margin: 12px 0 4px; }
.docs-cat:first-child { margin-top: 0; }
.docs-link { text-align: left; background: none; border: none; color: #c8c8e0; padding: 7px 10px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.docs-link:hover { background: rgba(255,255,255,0.05); }
.docs-link.active { background: #4338ca; color: #fff; }
.docs-content { flex: 1; min-width: 0; }
.docs-body { font-size: 14px; line-height: 1.6; color: #c8c8e0; }
.docs-body h1 { font-size: 22px; margin: 0 0 14px; color: #fff; }
.docs-body h2 { font-size: 17px; margin: 22px 0 8px; color: #eaeaf5; }
.docs-body h3 { font-size: 14px; margin: 16px 0 6px; color: #eaeaf5; }
.docs-body p { margin: 0 0 10px; }
.docs-body ul, .docs-body ol { margin: 0 0 12px; padding-left: 22px; }
.docs-body li { margin: 4px 0; }
.docs-body code { background: rgba(255,255,255,0.08); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.docs-body a { color: #818cf8; }
