/* ─────────────────────────────────────────────────────────────────────────────
   132BUILD — Main Stylesheet
   Theme set on <html> element: class="dark" or class="warm"
───────────────────────────────────────────────────────────────────────────── */

/* ── Theme tokens ─────────────────────────────────────────────────────────── */
html.dark {
  --bg:             #080808;
  --surface:        #0f0f0f;
  --surface-2:      #141414;
  --border:         #1c1c1c;
  --border-2:       #2a2a2a;
  --text:           #e0e0e0;
  --text-2:         #aaaaaa;
  --muted:          #555555;
  --accent:         #22c55e;
  --accent-bg:      #0d1f0d;
  --accent-border:  #1a3d1a;
  --danger:         #ef4444;
  --danger-bg:      #1a0808;
  --danger-border:  #3a1212;
  --warning:        #f59e0b;
  --warning-bg:     #1a1500;
  --warning-border: #3a2d00;
  --info:           #3b82f6;
  --font-weight-ui: 300;
  --line-height:    1.6;
}

html.warm {
  --bg:             #FAF8F5;
  --surface:        #F3F0EB;
  --surface-2:      #EBE5DC;
  --border:         #E0D9D0;
  --border-2:       #CFC7BC;
  --text:           #2C2420;
  --text-2:         #5C514A;
  --muted:          #8A7F78;
  --accent:         #22c55e;
  --accent-bg:      #EDF7EE;
  --accent-border:  #A7D7B0;
  --danger:         #dc2626;
  --danger-bg:      #FEF2F2;
  --danger-border:  #FECACA;
  --warning:        #d97706;
  --warning-bg:     #FFFBEB;
  --warning-border: #FDE68A;
  --info:           #2563eb;
  --font-weight-ui: 400;
  --line-height:    1.68;
}

/* ── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: var(--font-weight-ui);
  background: var(--bg);
  color: var(--text);
  line-height: var(--line-height);
  min-height: 100vh;
  transition: background 0.2s, color 0.2s;
}

::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
button {
  cursor: pointer;
  font-family: 'IBM Plex Mono', monospace;
  border: none;
  outline: none;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  background: transparent;
}

.btn-primary {
  background: #e8e8e8;
  color: #080808;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 10px 20px;
  width: 100%;
  justify-content: center;
}
.btn-primary:hover { background: #ffffff; }

.btn-ghost {
  color: var(--muted);
  font-size: 11px;
  padding: 7px 14px;
  border: 1px solid var(--border-2);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-2); }

.btn-ghost-full {
  color: var(--muted);
  font-size: 11px;
  padding: 10px 20px;
  border: 1px solid var(--border-2);
  width: 100%;
  justify-content: center;
}
.btn-ghost-full:hover { color: var(--text); border-color: var(--text-2); }

.btn-green {
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  padding: 8px 16px;
  border: 1px solid var(--accent-border);
}
.btn-green:hover { filter: brightness(1.1); }

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 11px;
  padding: 8px 16px;
  border: 1px solid var(--danger-border);
}

/* ── Inputs ───────────────────────────────────────────────────────────────── */
.field-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
textarea,
select {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  outline: none;
  padding: 9px 12px;
  width: 100%;
  transition: border-color 0.15s;
  border-radius: 0;
  -webkit-appearance: none;
}
.field-input:focus,
input:focus,
textarea:focus,
select:focus { border-color: var(--border-2); }

.field-label {
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

.field-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); }
.card-hover { transition: border-color 0.12s, background 0.12s; cursor: pointer; }
.card-hover:hover { border-color: var(--border-2); background: var(--surface-2); }

/* ── Tags ─────────────────────────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
}

.tag-active   { background: var(--accent-bg);  color: var(--accent);  border-color: var(--accent-border); }
.tag-blocked  { background: var(--danger-bg);  color: var(--danger);  border-color: var(--danger-border); }
.tag-review   { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.tag-paused   { background: var(--surface-2);  color: var(--muted);   border-color: var(--border); }
.tag-done     { background: #0a1428;           color: #3b82f6;        border-color: #1a2f5a; }
.tag-p1       { background: var(--danger-bg);  color: var(--danger);  border-color: var(--danger-border); }
.tag-p2       { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.tag-p3       { background: var(--surface-2);  color: var(--muted);   border-color: var(--border); }

/* ── Flash messages ───────────────────────────────────────────────────────── */
.flash { padding: 10px 14px; font-size: 12px; margin-bottom: 16px; border: 1px solid; }
.flash-error   { background: var(--danger-bg);  color: var(--danger);  border-color: var(--danger-border); }
.flash-success { background: var(--accent-bg);  color: var(--accent);  border-color: var(--accent-border); }
.flash-info    { background: var(--surface-2);  color: var(--text-2);  border-color: var(--border); }

/* ── Login ────────────────────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 40px 36px;
}
.login-logo {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--text);
  margin-bottom: 4px;
}
.login-logo .accent { color: var(--accent); }
.login-sub {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .06em;
  margin-bottom: 32px;
}
.login-divider {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Section labels ───────────────────────────────────────────────────────── */
.section-label {
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

/* ── Row dividers ─────────────────────────────────────────────────────────── */
.row { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: none; }

/* ── Drop zone ────────────────────────────────────────────────────────────── */
.drop-zone {
  border: 1px dashed var(--border-2);
  padding: 20px 24px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  background: var(--bg);
}
.drop-zone:hover, .drop-zone.over {
  border-color: var(--accent);
  background: var(--accent-bg);
}

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
.pulsing { animation: pulse 1.5s ease infinite; }

@keyframes slideIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.slide-in { animation: slideIn .18s ease; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .login-card { padding: 28px 20px; }
}

/* ── Icons ────────────────────────────────────────────────────────────────── */
svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon-accent  { color: var(--accent); }
.icon-muted   { color: var(--muted); }
.icon-danger  { color: var(--danger); }
.icon-warning { color: var(--warning); }

/* ── App Shell ────────────────────────────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.sidebar {
  width: 196px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  padding: 0;
}

.sidebar-logo {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--text);
  text-decoration: none;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-logo .accent { color: var(--accent); }
.sidebar-logo:hover { color: var(--text); }

.sidebar-nav {
  flex: 1;
  padding: 8px 0;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.12s, background 0.12s;
  cursor: pointer;
  width: 100%;
  background: transparent;
  border: none;
  font-family: 'IBM Plex Mono', monospace;
  text-align: left;
  white-space: nowrap;
}
.nav-item:hover  { color: var(--text); background: var(--surface-2); }
.nav-item.active { color: var(--accent); background: var(--accent-bg); }
.nav-item.active svg { color: var(--accent); }
.nav-item svg { flex-shrink: 0; }

.nav-item-btn { border-radius: 0; }

.sidebar-section-label {
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 20px 4px;
  opacity: .6;
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

.sidebar-bottom {
  border-top: 1px solid var(--border);
  padding: 6px 0;
  flex-shrink: 0;
}
.sidebar-bottom form { margin: 0; }

/* ── Main content ─────────────────────────────────────────────────────────── */
.app-main {
  flex: 1;
  margin-left: 196px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Page header ──────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 16px;
}

.page-header-left {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.page-title {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--text);
}

.page-subtitle {
  font-size: 11px;
  color: var(--muted);
}

.page-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Page body ────────────────────────────────────────────────────────────── */
.page-body {
  flex: 1;
  padding: 28px 32px;
  overflow-y: auto;
}

/* ── Project grid ─────────────────────────────────────────────────────────── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2px;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
}

.project-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-tagline {
  font-size: 12px;
  color: var(--muted);
  font-family: 'IBM Plex Sans', sans-serif;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.project-phase {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .04em;
}

/* ── Empty state ──────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  gap: 8px;
  text-align: center;
}

.empty-icon { color: var(--border-2); margin-bottom: 8px; }
.empty-title { font-size: 13px; color: var(--text-2); font-weight: 500; }
.empty-sub { font-size: 12px; color: var(--muted); }

/* ── Stat bar ─────────────────────────────────────────────────────────────── */
.stat-bar {
  display: flex;
  gap: 2px;
  margin-bottom: 24px;
}

.stat-item {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 12px 16px;
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.stat-item:hover { border-color: var(--border-2); background: var(--surface-2); }
.stat-item.active-filter { border-color: var(--accent); background: var(--accent-bg); }

.stat-count {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Layout */
  .app-shell          { flex-direction: column; }
  .app-main           { margin-left: 0; padding-bottom: 64px; }
  .page-body          { padding: 16px; }
  .page-header        { padding: 12px 16px; gap: 8px; flex-wrap: wrap; }
  .page-header-right  { width: 100%; }

  /* Hide sidebar — replaced by bottom nav */
  .sidebar { display: none; }

  /* Bottom nav */
  .mobile-nav {
    display: flex !important;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 56px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    z-index: 200;
    align-items: stretch;
  }
  .mobile-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .06em;
    color: var(--muted);
    text-decoration: none;
    text-transform: uppercase;
    transition: color .12s;
  }
  .mobile-nav a.active,
  .mobile-nav a:hover { color: var(--accent); }

  /* Tab bar — scroll horizontally */
  .tab-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tab-bar::-webkit-scrollbar { display: none; }

  /* Project grid — single column */
  .project-grid { grid-template-columns: 1fr; }

  /* Two col forms → single col */
  .form-row-2,
  .upload-row { grid-template-columns: 1fr; }

  /* Board filters — stack */
  .board-filters { flex-direction: column; align-items: flex-start; }

  /* Marketing layout — single col */
  .marketing-layout { grid-template-columns: 1fr; }

  /* Decision field label width */
  .decision-field { grid-template-columns: 80px 1fr; }

  /* Chat — full height */
  .chat-messages { max-height: 60vh; }

  /* Page title size */
  .page-title { font-size: 13px; }
}

@media (min-width: 769px) {
  .mobile-nav { display: none !important; }
}

/* ── Forms ────────────────────────────────────────────────────────────────── */
.form-wrap {
  max-width: 640px;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 28px;
  margin-bottom: 2px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.danger-zone {
  background: var(--surface);
  border: 1px solid var(--danger-border);
  padding: 20px 28px;
}

/* ── Project detail ───────────────────────────────────────────────────────── */
.project-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.project-meta-left  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.project-meta-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ── Tabs ─────────────────────────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  gap: 0;
  overflow-x: auto;
}

.tab-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 11px;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color .12s;
}
.tab-item:hover  { color: var(--text); }
.tab-item.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 9px;
  font-weight: 600;
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.tab-body { padding: 4px 0; }

/* ── Two-col tab layout ───────────────────────────────────────────────────── */
.tab-two-col {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}

.tab-main {}
.tab-side {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 20px;
  position: sticky;
  top: 20px;
}

/* ── Stat stack (side panel) ──────────────────────────────────────────────── */
.stat-stack { display: flex; flex-direction: column; gap: 1px; }
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.stat-row:last-child { border-bottom: none; }
.stat-row-label { color: var(--muted); }
.stat-row-val   { color: var(--text); font-weight: 500; }

/* ── Feature rows ─────────────────────────────────────────────────────────── */
.feature-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}
.feature-row .field-input { flex: 1; }

/* ── Log list ─────────────────────────────────────────────────────────────── */
.log-list { display: flex; flex-direction: column; }
.log-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.log-row:last-child { border-bottom: none; }
.log-row-left  { display: flex; align-items: baseline; gap: 10px; flex: 1; min-width: 0; }
.log-row-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.log-phase {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}
.log-note  { font-size: 13px; color: var(--text); }
.log-date  { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ── File list ────────────────────────────────────────────────────────────── */
.file-add-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.file-list { display: flex; flex-direction: column; }
.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.file-row:last-child { border-bottom: none; }
.file-row-left  { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.file-row-right { flex-shrink: 0; }
.file-name  { font-size: 12px; color: var(--text); display: flex; align-items: center; gap: 6px; }
.file-notes { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.content-paste summary { display: flex; align-items: center; gap: 6px; }
.content-paste[open] { margin-bottom: 0; }

/* ── Icon button ──────────────────────────────────────────────────────────── */
.btn-icon {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  transition: color .12s;
}
.btn-icon:hover { color: var(--danger); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .tab-two-col { grid-template-columns: 1fr; }
  .tab-side    { position: static; }
}

/* ── File upload ──────────────────────────────────────────────────────────── */
.files-section { margin-bottom: 20px; }
.files-divider { height: 1px; background: var(--border); margin: 20px 0; }

.upload-form  { display: flex; flex-direction: column; gap: 8px; }
.upload-row   { display: flex; gap: 8px; align-items: center; }

.upload-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color .12s, color .12s;
}
.upload-label:hover { border-color: var(--border-2); color: var(--text); }

.upload-hint {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .04em;
}

.file-link {
  color: var(--accent) !important;
  text-decoration: none;
}
.file-link:hover { text-decoration: underline; }

/* ── Visuals tab ──────────────────────────────────────────────────────────── */
.visuals-add-section { margin-bottom: 16px; }

.visual-gallery {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.visual-card {
  background: var(--surface);
  border: 1px solid var(--border);
}

.visual-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.visual-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.visual-caption {
  font-size: 12px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visual-preview {
  width: 100%;
  background: #fff;
  position: relative;
}

/* iframe for HTML/JSX */
.visual-iframe {
  width: 100%;
  height: 520px;
  border: none;
  display: block;
  background: #fff;
}

/* image */
.visual-image {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  display: block;
  background: #fff;
}

/* URL placeholder */
.visual-url-preview {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
}

.visual-url-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.visual-url-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

/* ── Phase F — Tracker (Bugs + Todos) ───────────────────────────────────────── */

.tracker-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.tracker-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.tracker-row-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.tracker-row-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.tracker-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.tracker-title {
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
}

.tracker-notes {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
}

.tracker-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

/* Priority badges */
.priority-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 2px 7px;
  border-radius: 2px;
  flex-shrink: 0;
  margin-top: 2px;
}
.priority-p1 { background: #3a0d0d; color: #f87171; border: 1px solid #7f1d1d; }
.priority-p2 { background: #3a2500; color: #fbbf24; border: 1px solid #78350f; }
.priority-p3 { background: var(--surface-2, #1a1a1a); color: var(--muted); border: 1px solid var(--border); }

/* Warm theme priority overrides */
[data-theme="warm"] .priority-p1 { background: #fef2f2; color: #dc2626; border-color: #fca5a5; }
[data-theme="warm"] .priority-p2 { background: #fffbeb; color: #d97706; border-color: #fcd34d; }
[data-theme="warm"] .priority-p3 { background: var(--surface-2, #F3F0EB); color: var(--muted); border-color: var(--border); }

/* Inline status select */
.status-select {
  font-size: 11px !important;
  padding: 3px 8px !important;
  height: auto !important;
  cursor: pointer;
  width: auto !important;
}
.status-open        { color: var(--text); }
.status-in-progress { color: #fbbf24; }
.status-resolved    { color: var(--accent); }

.resolved-section summary::-webkit-details-marker { display: none; }

/* ── Phase G — Marketing ─────────────────────────────────────────────────────── */

.marketing-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 800px) {
  .marketing-layout { grid-template-columns: 1fr; }
}

.marketing-form-col,
.marketing-preview-col { min-width: 0; }

/* Preview card */
.marketing-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mp-headline {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.mp-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.mp-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mp-bullets li {
  font-size: 13px;
  color: var(--text);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}

.mp-bullets li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 11px;
  top: 1px;
}

.mp-cta {
  display: inline-block;
  background: var(--accent-bg, #0d1f0d);
  color: var(--accent);
  border: 1px solid var(--accent-border, #1a5c1a);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  align-self: flex-start;
}

/* ── Phase H — AI Chat (clean rewrite) ──────────────────────────────────────── */

.chat-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Model bar */
.chat-model-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
}
.chat-model-bar strong { color: var(--text); }

/* Context file pills */
.chat-context-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.context-file-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 3px 8px;
  cursor: pointer;
  user-select: none;
  transition: all .12s;
}
.context-file-tag:hover  { border-color: var(--text); color: var(--text); }
.context-file-tag.active { border-color: var(--accent); color: var(--accent); background: var(--accent-bg, #0d1f0d); }
.context-source-badge {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 1px 4px;
}
.context-file-tag.active .context-source-badge { border-color: var(--accent); color: var(--accent); }

/* Messages */
.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 200px;
  max-height: 500px;
  overflow-y: auto;
  padding: 8px 0;
}
.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  color: var(--muted);
  text-align: center;
}
.chat-row        { display: flex; flex-direction: column; gap: 4px; }
.chat-label      { font-size: 9px; font-weight: 700; letter-spacing: .1em; color: var(--muted); }
.chat-row-assistant .chat-label { color: var(--accent); }
.chat-bubble     { font-size: 13px; line-height: 1.65; white-space: pre-wrap; color: var(--text); }
.chat-row-user   { padding-left: 40px; align-items: flex-end; }
.chat-row-user .chat-bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 10px 14px;
}
.chat-actions    { display: flex; gap: 6px; margin-top: 4px; }

/* Input row */
.chat-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.chat-input {
  flex: 1;
  resize: none;
  min-height: 42px;
  max-height: 160px;
  font-size: 13px !important;
  line-height: 1.5 !important;
}

/* Toast */
.chat-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 12px;
  padding: 8px 16px;
  z-index: 9999;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}

/* Saved outputs */
.saved-outputs-panel { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 12px; }
.saved-outputs-panel > summary { cursor: pointer; list-style: none; }
.saved-outputs-panel > summary::-webkit-details-marker { display: none; }
.saved-output-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-top: 2px;
}
.saved-output-meta  { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.saved-output-title { font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saved-output-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── Phase I1 — Decisions ────────────────────────────────────────────────────── */

.decision-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.decision-row {
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}

.decision-row-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
}

.decision-index {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .04em;
  flex-shrink: 0;
  margin-top: 2px;
  min-width: 24px;
}

.decision-title-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.decision-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.decision-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.decision-body {
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface-2, #111);
}

[data-theme="warm"] .decision-body {
  background: var(--surface-2, #F3F0EB);
}

.decision-field {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px;
  align-items: baseline;
}

.decision-field-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
}

.decision-field-value {
  font-size: 12px;
  color: var(--text);
  line-height: 1.5;
}

/* ── Phase I2 — Links ────────────────────────────────────────────────────────── */

.link-list { display: flex; flex-direction: column; gap: 2px; }

.link-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.link-type-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 2px;
  flex-shrink: 0;
  border: 1px solid;
}
.link-type-repo    { color: #60a5fa; border-color: #1d4ed8; background: #0d1f3c; }
.link-type-deploy  { color: #34d399; border-color: #065f46; background: #0d2318; }
.link-type-docs    { color: #a78bfa; border-color: #5b21b6; background: #1a1030; }
.link-type-design  { color: #f472b6; border-color: #9d174d; background: #2d0f20; }
.link-type-staging { color: #fbbf24; border-color: #78350f; background: #2d1a06; }
.link-type-other   { color: var(--muted); border-color: var(--border); background: transparent; }

[data-theme="warm"] .link-type-repo    { background: #eff6ff; color: #1d4ed8; border-color: #93c5fd; }
[data-theme="warm"] .link-type-deploy  { background: #f0fdf4; color: #065f46; border-color: #86efac; }
[data-theme="warm"] .link-type-docs    { background: #faf5ff; color: #5b21b6; border-color: #c4b5fd; }
[data-theme="warm"] .link-type-design  { background: #fdf2f8; color: #9d174d; border-color: #f9a8d4; }
[data-theme="warm"] .link-type-staging { background: #fffbeb; color: #78350f; border-color: #fcd34d; }
[data-theme="warm"] .link-type-other   { background: transparent; }

.link-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.link-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.link-label:hover { color: var(--accent); }

.link-url-hint {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 300px;
}

/* ── Phase I2 — Stack ────────────────────────────────────────────────────────── */

.stack-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stack-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stack-group-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 0 6px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.stack-entries { display: flex; flex-direction: column; gap: 2px; }

.stack-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.stack-entry-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.stack-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.stack-version {
  display: inline-block;
  font-size: 10px;
  color: var(--muted);
  background: var(--surface-2, #111);
  border: 1px solid var(--border);
  padding: 1px 6px;
  margin-top: 2px;
  font-family: monospace;
}

[data-theme="warm"] .stack-version { background: var(--surface-2, #F3F0EB); }

/* ── Phase I3 — Board ────────────────────────────────────────────────────────── */

.board-wrap { display: flex; flex-direction: column; gap: 12px; }

.board-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.board-toggle {
  display: flex;
  border: 1px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
}
.board-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: all .12s;
  border-right: 1px solid var(--border);
}
.board-toggle-btn:last-child { border-right: none; }
.board-toggle-btn:hover  { color: var(--text); background: var(--surface); }
.board-toggle-btn.active { color: var(--accent); background: var(--accent-bg, #0d1f0d); }

.board-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

.board-filter-pills {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.board-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  transition: all .12s;
}
.board-pill:hover  { color: var(--text); border-color: var(--text); }
.board-pill.active { color: var(--accent); border-color: var(--accent); background: var(--accent-bg, #0d1f0d); }
.priority-pill-p1.active { color: #f87171; border-color: #7f1d1d; background: #3a0d0d; }
.priority-pill-p2.active { color: #fbbf24; border-color: #78350f; background: #3a2500; }

.board-select {
  font-size: 11px !important;
  padding: 4px 8px !important;
  height: auto !important;
  width: auto !important;
  cursor: pointer;
}

.board-count {
  font-size: 9px;
  font-weight: 700;
  background: var(--accent-bg, #0d1f0d);
  color: var(--accent);
  border: 1px solid var(--accent-border, #1a5c1a);
  padding: 0px 5px;
  border-radius: 2px;
}

.board-p1-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #3a0d0d;
  border: 1px solid #7f1d1d;
  color: #f87171;
  font-size: 12px;
}
[data-theme="warm"] .board-p1-banner {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

.board-list  { display: flex; flex-direction: column; gap: 1px; }

.board-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color .12s;
}
.board-row:hover { border-color: var(--border-2, #2a2a2a); }

.board-row-left  { display: flex; align-items: flex-start; gap: 10px; flex: 1; min-width: 0; }
.board-row-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.board-project-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 1px 7px;
  white-space: nowrap;
  transition: all .12s;
}
.board-project-link:hover { color: var(--accent); border-color: var(--accent); }

/* ── Phase I4 — Search ───────────────────────────────────────────────────────── */

.search-wrap  { display: flex; flex-direction: column; gap: 20px; max-width: 800px; }

.search-form  { display: flex; flex-direction: column; gap: 10px; }

.search-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.search-input {
  flex: 1;
  font-size: 15px !important;
  padding: 10px 14px !important;
}

.search-filter-pills {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.search-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.search-section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.search-result-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color .12s;
}
.search-result-row:hover { border-color: var(--accent); }

.search-result-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.search-result-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.search-result-meta {
  font-size: 10px;
  color: var(--muted);
}
.search-result-project {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 1px 6px;
}
.search-result-excerpt {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
.search-highlight {
  background: rgba(74, 222, 128, 0.2);
  color: var(--accent);
  border-radius: 1px;
  padding: 0 1px;
}
[data-theme="warm"] .search-highlight {
  background: rgba(22, 163, 74, 0.15);
  color: #15803d;
}

/* ── Phase H — AI Drop ───────────────────────────────────────────────────────── */

.ai-drop-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 700px;
}

.drop-zone {
  border: 2px dashed var(--border);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-bg, #0d1f0d);
}

.drop-zone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.drop-zone-inner button { pointer-events: all; }

.drop-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-top: 4px;
}

.drop-sub {
  font-size: 12px;
  color: var(--muted);
}

/* Commit grid */
.commit-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.commit-item {
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}

.commit-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid var(--border);
}
.commit-label input[type=checkbox] { accent-color: var(--accent); }

.commit-value {
  padding: 10px 14px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-wrap;
  max-height: 120px;
  overflow-y: auto;
}

/* ── Phase J — Pagination ────────────────────────────────────────────────────── */

.pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 4px;
  justify-content: center;
}

.page-btn {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 5px 12px;
  transition: all .12s;
}
.page-btn:hover { color: var(--accent); border-color: var(--accent); }
.page-btn.disabled { opacity: .35; pointer-events: none; }

.page-info {
  font-size: 11px;
  color: var(--muted);
}

/* ── Phase J — Markdown ──────────────────────────────────────────────────────── */

.md-content { font-size: 13px; line-height: 1.7; color: var(--text); }
.md-content p  { margin: 0 0 8px; }
.md-content p:last-child { margin-bottom: 0; }
.md-content h1,.md-content h2,.md-content h3 { font-weight: 700; margin: 12px 0 6px; color: var(--text); }
.md-content h1 { font-size: 15px; }
.md-content h2 { font-size: 13px; }
.md-content h3 { font-size: 12px; }
.md-content ul, .md-content ol { padding-left: 18px; margin: 4px 0 8px; }
.md-content li { margin: 2px 0; }
.md-content code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1px 5px;
}
.md-content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 12px;
  overflow-x: auto;
  margin: 8px 0;
}
.md-content pre code { background: none; border: none; padding: 0; font-size: 11px; }
.md-content strong { font-weight: 700; }
.md-content em { font-style: italic; color: var(--muted); }
.md-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  margin: 8px 0;
  color: var(--muted);
}
.md-content a { color: var(--accent); text-decoration: underline; }
.md-content hr { border: none; border-top: 1px solid var(--border); margin: 12px 0; }

/* ── Phase K — Settings ──────────────────────────────────────────────────────── */

.settings-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 680px;
}

.settings-section {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 20px 24px;
}

.settings-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 6px;
}

.settings-section-desc {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.settings-model-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-model-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  transition: border-color .12s;
}
.settings-model-row.active {
  border-color: var(--accent);
  background: var(--accent-bg, #0d1f0d);
}

.settings-model-info { flex: 1; min-width: 0; }

.settings-model-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-active-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 1px 6px;
}

.settings-model-id {
  font-size: 10px;
  color: var(--muted);
  font-family: 'IBM Plex Mono', monospace;
  margin-top: 2px;
}

.settings-model-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.settings-model-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.settings-info-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
}

.settings-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.settings-info-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.settings-info-value {
  font-size: 11px;
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace;
}

/* ── Visual preview modal ────────────────────────────────────────────────────── */

.visual-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
}

.visual-modal-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1100px;
  height: 88vh;
  overflow: hidden;
}

.visual-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.visual-modal-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: .04em;
}

.visual-modal-close {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 3px 10px;
  font-family: 'IBM Plex Mono', monospace;
  transition: all .12s;
}
.visual-modal-close:hover {
  color: var(--text);
  border-color: var(--text);
}

.visual-modal-body {
  flex: 1;
  overflow: hidden;
  background: #fff;
}

.visual-modal-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── Visual card thumb (replaces old iframe in card) ─────────────────────────── */

.visual-preview-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
  background: var(--surface-2, var(--bg));
  border-top: 1px solid var(--border);
}

.visual-preview-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-family: 'IBM Plex Mono', monospace;
  cursor: pointer;
  padding: 18px 28px;
  transition: all .12s;
}
.visual-preview-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-bg, #0d1f0d);
}

/* Mobile modal full screen */
@media (max-width: 768px) {
  .visual-modal { padding: 0; }
  .visual-modal-inner { height: 100vh; max-width: 100%; border: none; }
}
