/* â”€â”€ Design Tokens â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
:root {
  --bg:          #0d1117;
  --bg-surface:  #161b22;
  --bg-card:     #1c2128;
  --bg-hover:    #22272e;
  --border:      #30363d;
  --border-subtle: #21262d;

  --text:        #c9d1d9;
  --text-muted:  #8b949e;
  --text-dim:    #6e7681;

  --accent:      #58a6ff;
  --accent-dim:  #1f4c8c;

  --green:       #3fb950;
  --green-dim:   #1a3a24;
  --purple:      #bc8cff;
  --purple-dim:  #2d1f5e;
  --orange:      #ffa657;
  --orange-dim:  #472d0a;
  --teal:        #39d0d8;
  --teal-dim:    #0d3b3e;
  --red:         #ff7b72;
  --red-dim:     #4a1010;
  --yellow:      #e3b341;
  --yellow-dim:  #3d2f00;
  --gray:        #484f58;
  --gray-dim:    #21262d;

  --radius:      6px;
  --radius-lg:   10px;
  --shadow:      0 4px 16px rgba(0,0,0,.5);

  --panel-w:          420px;
  --col-w:            280px;
  --run-h:            220px;
  --progress-sidebar-w: 260px;
}

/* -- Light theme overrides ------------------------------------------------- */
html[data-theme="light"] {
  --bg:           #ffffff;
  --bg-surface:   #f6f8fa;
  --bg-card:      #eaeef2;
  --bg-hover:     #dde3ea;
  --border:       #d0d7de;
  --border-subtle:#eaeef2;

  --text:         #1f2328;
  --text-muted:   #57606a;
  --text-dim:     #6e7781;

  --accent:       #0969da;
  --accent-dim:   #ddf4ff;

  --green:        #1a7f37;
  --green-dim:    #dafbe1;
  --purple:       #8250df;
  --purple-dim:   #fbefff;
  --orange:       #bc4c00;
  --orange-dim:   #fff1e5;
  --teal:         #0969b3;
  --teal-dim:     #ddf4ff;
  --red:          #cf222e;
  --red-dim:      #ffebe9;
  --yellow:       #9a6700;
  --yellow-dim:   #fff8c5;
  --gray:         #6e7781;
  --gray-dim:     #eaeef2;

  --shadow:       0 4px 16px rgba(0,0,0,.12);
}

/* â”€â”€ Reset â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  height: 100%;
}

body {
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
}

/* SPA shell only — locks viewport so internal panels scroll, not the page */
body.app-shell {
  height: 100%;
  overflow: hidden;
}

/* â”€â”€ Utilities â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.hidden { display: none !important; }

/* â”€â”€ Header â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.app-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  height: 52px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  overflow: hidden;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  color: var(--accent);
  white-space: nowrap;
}

.header-icon { font-size: 18px; }

.header-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -.5px;
  flex-shrink: 0;
}

.header-nav { display: flex; gap: 4px; }

.nav-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: color .15s, background .15s;
}
.nav-tab:hover  { color: var(--text); background: var(--bg-hover); }
.nav-tab.active { color: var(--accent); background: var(--accent-dim); }

.header-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  overflow: visible;
  scrollbar-width: none;
  min-width: 0;
  flex-shrink: 1;
}
.header-actions::-webkit-scrollbar { display: none; }

/* â”€â”€ Buttons â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: opacity .15s, background .15s, border-color .15s;
  white-space: nowrap;
  line-height: 1.4;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { opacity: .88; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg-hover); }

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border-color: var(--red);
}
.btn-danger:hover { background: var(--red); color: #fff; }

.btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  padding: 4px 8px;
  cursor: pointer;
  line-height: 1;
}
.btn-icon:hover { color: var(--text); }

.btn-sm { font-size: 12px; padding: 4px 10px; }

/* â”€â”€ Main â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.app-main {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.view {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Non-board views scroll vertically.
   Children get flex-shrink:0 so they keep their natural height and
   overflow the container (triggering the scrollbar) instead of
   compressing to fit. Security view manages its own scroll via .sec-view. */
#backlog-view, #analytics-view, #overview-view {
  overflow-y: auto;
}

#backlog-view > *,
#analytics-view > *,
#overview-view > * {
  flex-shrink: 0;
}

/* Team page inner scroll wrapper ï¿½ same pattern */
.team-page-content > * {
  flex-shrink: 0;
}

/* â”€â”€ Board (Kanban) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.board {
  display: flex;
  gap: 12px;
  padding: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  flex: 1;
  min-height: 0;
  align-items: stretch;
  scroll-padding: 16px;
  scrollbar-gutter: stable;
}

.column {
  flex-shrink: 0;
  width: var(--col-w);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.column-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.column-title {
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
}

.column-count {
  background: var(--bg-hover);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
}

/* Column accent colours */
.column.status-idea              .column-title { color: var(--accent); }
.column.status-ready-for-expert  .column-title { color: var(--teal); }
.column.status-ready-for-arch    .column-title { color: var(--purple); }
.column.status-ready-for-build .column-title { color: var(--green); }
.column.status-ready-for-review .column-title { color: var(--teal); }
.column.status-ready-for-acceptance .column-title { color: var(--yellow); }
.column.status-in-test        .column-title { color: var(--orange); }
.column.status-blocked        .column-title { color: var(--red); }
.column.status-done           .column-title { color: var(--text-dim); }

.column-cards {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* â”€â”€ Cards â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.card:hover     { border-color: var(--accent-dim); box-shadow: var(--shadow); }
.card.selected  { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.card.blocked   { border-left: 3px solid var(--red); }
.card.done      { opacity: .55; }
.card.running   { border-color: var(--green); box-shadow: 0 0 0 1px var(--green-dim); }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 6px;
}

.card-slug {
  font-size: 11px;
  color: var(--text-dim);
  font-family: monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-title {
  font-weight: 500;
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 4px;
  word-break: break-word;
}

.card-running {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 11px;
  font-weight: 600;
  margin: 6px 0;
}

.card-running .run-dot { width: 7px; height: 7px; }

.card-date {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.card-actions .btn { font-size: 11px; padding: 3px 8px; }

.btn-run {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent-dim);
}
.btn-run:hover { background: #254d85; border-color: var(--accent); }
.card.needs-approval {
  border-color: var(--yellow-dim);
  box-shadow: 0 0 0 1px var(--yellow-dim);
}

.card-approval {
  border: 1px solid var(--yellow-dim);
  border-radius: var(--radius);
  background: rgba(245, 158, 11, .08);
  padding: 8px;
  margin: 8px 0;
  cursor: default;
}

.card-approval.approved {
  color: var(--green);
  border-color: var(--green-dim);
  background: rgba(34, 197, 94, .08);
  font-size: 11px;
  font-weight: 700;
}

.card-approval-title {
  color: var(--yellow);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.card-approval-copy {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.35;
  margin-top: 3px;
}

.card-approval-actions,
.approval-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.btn-approve {
  color: var(--green);
  border-color: var(--green-dim);
  background: rgba(34, 197, 94, .08);
}
.btn-approve:hover { background: rgba(34, 197, 94, .14); }

.btn-request-changes {
  color: var(--yellow);
  border-color: var(--yellow-dim);
  background: rgba(245, 158, 11, .08);
}
.btn-request-changes:hover { background: rgba(245, 158, 11, .14); }

.btn-detail {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-detail:hover { color: var(--text); background: var(--bg-hover); }

.btn-delete {
  background: transparent;
  color: var(--text-dim);
  border-color: transparent;
}
.btn-delete:hover { color: var(--red); border-color: var(--red-dim); }

/* â”€â”€ Status Badges â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.status-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge-idea                { background: var(--accent-dim);  color: var(--accent);  border-color: var(--accent-dim); }
.badge-ready-for-expert    { background: var(--teal-dim);    color: var(--teal);    border-color: var(--teal-dim); }
.badge-ready-for-arch      { background: var(--purple-dim);  color: var(--purple);  border-color: var(--purple-dim); }
.badge-ready-for-build  { background: var(--green-dim);   color: var(--green);   border-color: var(--green-dim); }
.badge-ready-for-review { background: var(--teal-dim); color: var(--teal); border-color: var(--teal-dim); }
.badge-in-test          { background: var(--orange-dim);  color: var(--orange);  border-color: var(--orange-dim); }
.badge-ready-for-acceptance { background: var(--yellow-dim);  color: var(--yellow);  border-color: var(--yellow-dim); }
.badge-blocked          { background: var(--red-dim);     color: var(--red);     border-color: var(--red-dim); }
.badge-done             { background: var(--gray-dim);    color: var(--gray);    border-color: var(--gray-dim); }

/* â”€â”€ Team View â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.team-header { padding: 20px 20px 0; }
.team-header h2 { font-size: 18px; margin-bottom: 4px; }
.team-sub { color: var(--text-muted); font-size: 13px; }

/* Team page scrollable wrapper */
.team-page-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Team page sections */
.team-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px 20px;
}

.team-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}

.team-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: .02em;
  text-transform: uppercase;
}

.team-section-empty {
  color: var(--text-muted);
  font-size: 13px;
  padding: 8px 0;
}

/* Running agents list in team view */
.team-active-runs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.team-run-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.team-run-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.team-run-slug {
  font-weight: 600;
  font-size: 13px;
  font-family: monospace;
}

.team-run-agent {
  color: var(--text-muted);
  font-size: 12px;
  font-family: monospace;
}

/* Running agent pulse dot */
.run-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.run-dot.pulsing {
  animation: run-pulse 1.4s ease-in-out infinite;
}
@keyframes run-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

.agent-card.running {
  border-color: var(--green-dim, #1a3a2a);
  box-shadow: 0 0 0 1px var(--green-dim, #1a3a2a);
}

.team-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding-top: 4px;
}


.agent-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.agent-state {
  margin-top: 3px;
  font-size: 11px;
  color: var(--text-dim);
  font-family: monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.agent-state.is-running { color: var(--green); }

.agent-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.agent-stat {
  padding: 8px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-card);
  min-width: 0;
}

.agent-stat span {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}

.agent-stat label {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.ticket-chip.running {
  border-color: var(--green-dim, #1a3a2a);
  color: var(--green);
}

.ticket-chip .run-dot,
.agent-name .run-dot {
  margin-right: 5px;
}
.agent-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.agent-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  font-family: monospace;
  margin-bottom: 6px;
}

.agent-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.agent-tickets { display: flex; flex-wrap: wrap; gap: 6px; }

.ticket-chip {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--accent);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 11px;
  font-family: monospace;
  cursor: pointer;
  transition: background .15s;
}
.ticket-chip:hover { background: var(--accent-dim); }

.no-tickets {
  font-size: 12px;
  color: var(--text-dim);
  font-style: italic;
}

/* â”€â”€ Detail Panel â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.panel {
  position: fixed;
  top: 52px;
  right: 0;
  bottom: 0;
  width: var(--panel-w);
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  padding: 16px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  flex-shrink: 0;
}

.panel-header > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.slug-chip {
  font-family: monospace;
  font-size: 12px;
  color: var(--text-dim);
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2px 8px;
}

.panel-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
}

.panel-desc {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.panel-meta {
  font-size: 12px;
  color: var(--text-dim);
}

/* â”€â”€ Command Box â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.command-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.command-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .4px;
}

.command-text {
  font-family: monospace;
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-all;
  line-height: 1.5;
}

.run-btn { width: 100%; justify-content: center; }

/* â”€â”€ Artifact Files â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.panel-section { flex: 1; display: flex; flex-direction: column; gap: 8px; }

.section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
}

.artifact-list { display: flex; flex-direction: column; gap: 12px; }

.artifact-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.artifact-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: var(--bg-hover);
  border-bottom: 1px solid var(--border);
}

.artifact-name {
  font-family: monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.artifact-content {
  padding: 12px;
  font-size: 12px;
  line-height: 1.7;
  overflow-x: auto;
  max-height: 360px;
  overflow-y: auto;
}

/* Markdown inside artifact panels */
.artifact-content h1,
.artifact-content h2,
.artifact-content h3,
.artifact-content h4 {
  margin: 10px 0 6px;
  color: var(--text);
  font-size: 13px;
}
.artifact-content h1 { font-size: 15px; border-bottom: 1px solid var(--border); padding-bottom: 4px; }
.artifact-content h2 { font-size: 14px; }
.artifact-content p  { margin-bottom: 8px; color: var(--text-muted); }
.artifact-content ul, .artifact-content ol { margin: 4px 0 8px 18px; color: var(--text-muted); }
.artifact-content li { margin-bottom: 2px; }
.artifact-content code {
  font-family: monospace;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 11px;
}
.artifact-content pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  overflow-x: auto;
  margin: 6px 0;
}
.artifact-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 11px;
}
.artifact-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 6px 0;
}
.artifact-content th, .artifact-content td {
  border: 1px solid var(--border);
  padding: 4px 8px;
  text-align: left;
}
.artifact-content th { background: var(--bg-hover); color: var(--text); }
.artifact-content blockquote {
  border-left: 3px solid var(--border);
  padding-left: 10px;
  color: var(--text-dim);
  margin: 6px 0;
}
.artifact-content a { color: var(--accent); }
.artifact-content hr { border-color: var(--border); margin: 8px 0; }
.artifact-content strong { color: var(--text); }

/* â”€â”€ Run Panel â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
/* â”€â”€ Runs Panel (multi-agent bottom drawer) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.runs-panel {
  margin-top: 12px;
  height: min(var(--run-h), 420px);
  min-height: 180px;
  max-height: 520px;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
}
.runs-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-card);
}

.runs-panel-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--text-muted);
}

.runs-container {
  flex: 1;
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 0;
}

/* â”€â”€ Individual Run Pane â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.run-pane {
  flex: 1;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  overflow: hidden;
}
.run-pane:last-child { border-right: none; }

.run-pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  gap: 8px;
  background: var(--bg-surface);
}

.run-pane-info {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
}

.run-pane-agent {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 2px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}

.run-pane-slug {
  font-family: monospace;
  font-size: 11px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-pane-spinner {
  flex-shrink: 0;
  font-size: 10px;
}
.run-pane-spinner.running {
  color: var(--accent);
  animation: blink 1.2s step-start infinite;
}
.run-pane-spinner.done { color: var(--green); }
.run-pane-spinner.stopped { color: var(--text-dim); }

@keyframes blink { 50% { opacity: 0; } }

.run-pane-actions { display: flex; gap: 4px; flex-shrink: 0; }

.run-pane-log {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
  font-family: monospace;
  font-size: 11px;
  line-height: 1.6;
  background: var(--bg);
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 0;
}

.log-stdout { color: var(--text); }
.log-stderr { color: var(--yellow); }
.log-done   { color: var(--green); font-weight: 600; }
.log-error  { color: var(--red); }
.log-info   { color: var(--accent); }
.log-file   { color: var(--purple); }
.log-dim    { color: var(--text-dim); font-style: italic; }

.run-pane-elapsed {
  font-size: 10px;
  color: var(--text-dim);
  font-family: monospace;
  flex-shrink: 0;
}

/* â”€â”€ Loading / Error States â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.loading, .no-files, .error {
  font-size: 12px;
  color: var(--text-dim);
  padding: 10px;
  text-align: center;
  font-style: italic;
}
.error { color: var(--red); }

/* â”€â”€ Modal â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 440px;
  max-width: 95vw;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.modal-header h2 { font-size: 16px; }

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  margin-top: 14px;
}
.field-label:first-of-type { margin-top: 0; }

.required { color: var(--red); }

.field-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
.field-input:focus { border-color: var(--accent); }

.field-textarea {
  resize: vertical;
  min-height: 80px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.save-toast {
  background: var(--success, #22c55e);
  color: #fff;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  text-align: center;
  transition: opacity .2s;
}
.save-toast.hidden { display: none; }

.field-hint {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--warning, #f59e0b);
  margin-top: 2px;
}

/* â”€â”€ Scrollbars â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray); }

/* â”€â”€ Progress Sidebar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.progress-sidebar {
  position: fixed;
  top: 52px;
  right: 0;
  bottom: 0;
  width: var(--progress-sidebar-w);
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  z-index: 15;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform .2s ease;
  box-shadow: var(--shadow);
}
.progress-sidebar.collapsed { transform: translateX(100%); }

/* Give the board breathing room when the sidebar is open */
.board.sidebar-open { padding-right: calc(var(--progress-sidebar-w) + 16px); }

@media (max-width: 1023px) {
  .progress-sidebar { display: none; }
  .board.sidebar-open { padding-right: 16px; }
}

.progress-sidebar-header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-card);
}

.progress-sidebar-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
}

.stale-label {
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 4px;
}

.stale-input {
  width: 44px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 2px 4px;
  font-size: 11px;
  text-align: center;
  outline: none;
}
.stale-input:focus { border-color: var(--accent); }

.progress-member-list {
  overflow-y: auto;
  flex: 1;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-member-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  display: flex;
  flex-direction: column;
  gap: 6px;
  outline: none;
}
.progress-member-row:hover  { border-color: var(--accent-dim); background: var(--bg-hover); }
.progress-member-row:focus  { border-color: var(--accent); }

.pmr-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pmr-icon  { font-size: 14px; flex-shrink: 0; }

.pmr-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  font-family: monospace;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pmr-stale-warning {
  color: var(--yellow);
  font-size: 13px;
  flex-shrink: 0;
  cursor: help;
}

.pmr-complete {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.pmr-bar-track {
  height: 8px;
  background: var(--bg-hover);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.pmr-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width .3s ease;
  min-width: 0;
}
.pmr-bar-fill.complete { background: var(--green); }

.pmr-label {
  font-size: 11px;
  color: var(--text-dim);
  text-align: right;
}

.pmr-blocked-count { font-size: 12px; color: var(--text-dim); }
.pmr-blocked-count.has-blocked { color: var(--red); font-weight: 600; }

/* â”€â”€ Member Detail Dialog â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.member-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .65);
}
.member-detail-backdrop.hidden { display: none; }

.member-detail-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  padding: 0;
  width: 560px;
  max-width: 95vw;
  max-height: 80vh;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mdl-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-card);
}

.mdl-heading { font-size: 15px; font-weight: 600; }

.mdl-content {
  overflow-y: auto;
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mdl-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  font-family: monospace;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mdl-sub {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.mdl-group { display: flex; flex-direction: column; gap: 6px; }

.mdl-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mdl-group-count {
  font-size: 11px;
  color: var(--text-dim);
  background: var(--bg-hover);
  border-radius: 999px;
  padding: 1px 7px;
}

.mdl-ticket-list { display: flex; flex-direction: column; gap: 4px; margin-left: 4px; }

.mdl-ticket-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  font-size: 12px;
}

.mdl-ticket-slug {
  font-family: monospace;
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
}

.mdl-ticket-title {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mdl-ticket-ts {
  font-size: 10px;
  color: var(--text-dim);
  white-space: nowrap;
}

/* â”€â”€ Price-per-ticket feature â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.column-hdr-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.column-cost {
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.3;
}

/* Board-level totals bar */
.board-totals {
  padding: 4px 16px;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

/* â”€â”€ Ticket type toggle (create modal) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ticket-type-toggle {
  display: flex;
  gap: 0;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.ticket-type-btn {
  flex: 1;
  padding: 7px 0;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.ticket-type-btn:hover { background: var(--bg-hover); color: var(--text); }
.ticket-type-btn.active[data-type="feature"] {
  background: var(--accent-dim);
  color: var(--accent);
}
.ticket-type-btn.active[data-type="bug"] {
  background: var(--red-dim);
  color: var(--red);
}
.ticket-type-btn + .ticket-type-btn { border-left: 1px solid var(--border); }

.ticket-type-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0 10px;
}
.ticket-type-hint.type-bug { color: var(--orange); }

/* Bug badge on cards */
.ticket-type-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.ticket-type-badge.type-bug {
  background: var(--red-dim);
  color: var(--red);
}

/* â”€â”€ Board modal: folder section â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.folder-section {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.folder-mode-row {
  display: flex;
  gap: 18px;
}

.folder-mode-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.folder-mode-option input[type="radio"] { accent-color: var(--accent); cursor: pointer; }
.folder-mode-option:has(input:checked) { color: var(--text); }

.folder-hint {
  font-size: 12px;
  color: var(--text-muted);
  padding: 6px 10px;
  background: var(--bg-hover);
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
}

.folder-auto-path {
  font-family: monospace;
  font-size: 11px;
  color: var(--accent);
}

.folder-status {
  font-size: 12px;
  margin-top: 4px;
  min-height: 16px;
}
.folder-status.ok      { color: var(--green); }
.folder-status.warn    { color: var(--orange); }
.folder-status.new     { color: var(--teal); }
.folder-status.checking { color: var(--text-dim); }

/* â”€â”€ Domain chip (header) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.domain-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s;
  white-space: nowrap;
  max-width: 240px;
}
.domain-chip:hover { border-color: var(--teal); }
.domain-chip-icon { font-size: 13px; }
.domain-chip-label {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}
.domain-chip-label.has-domain { color: var(--teal); font-weight: 500; }
.domain-chip-edit { color: var(--text-dim); font-size: 11px; }

/* â”€â”€ Domain edit modal â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#domain-modal .modal { max-width: 420px; }
.domain-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 12px;
  line-height: 1.5;
}

/* Cost badge on cards */
.card-cost {
  font-size: 10px;
  color: var(--green);
  margin-bottom: 4px;
}

.card-cost-none {
  color: var(--text-dim);
}

/* Cost breakdown section in detail panel */
.cost-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cost-label-note {
  font-weight: 400;
  font-size: 10px;
  color: var(--text-dim);
  text-transform: none;
  letter-spacing: 0;
}

.cost-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.cost-table th,
.cost-table td {
  border: 1px solid var(--border);
  padding: 4px 8px;
  text-align: left;
  white-space: nowrap;
}

.cost-table th {
  background: var(--bg-hover);
  color: var(--text-muted);
  font-weight: 600;
}

.cost-table td {
  color: var(--text-muted);
}

.cost-num {
  text-align: right !important;
  font-family: monospace;
}

.cost-row-empty td {
  color: var(--text-dim);
}

.cost-total-row td {
  background: var(--bg-hover);
  color: var(--text);
  border-top: 2px solid var(--border);
}

/* â”€â”€ Board Switcher â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.board-switcher {
  position: relative;
}

.board-switcher-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 180px;
}

.board-switcher-caret {
  font-size: 9px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.board-switcher-dropdown {
  position: fixed;
  top: var(--board-dropdown-top, 56px);
  left: var(--board-dropdown-left, 16px);
  min-width: 200px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  z-index: 1000;
  overflow: hidden;
}

.board-list {
  display: flex;
  flex-direction: column;
  max-height: 240px;
  overflow-y: auto;
}

.board-list-row {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  transition: background .12s;
}
.board-list-row:hover { background: var(--bg-hover); }
.board-list-row.active { background: var(--accent-dim); }

.board-list-name {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  padding: 6px 8px;
}
.board-list-row.active .board-list-name {
  color: var(--accent);
  font-weight: 600;
}
.board-list-row.active .board-list-name::before {
  content: '\2713\00a0';
  font-size: 11px;
}

.board-action-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity .12s, background .12s, color .12s;
}
.board-list-row:hover .board-action-btn { opacity: 1; }
.board-action-btn:hover { background: var(--bg-hover); color: var(--text); }
.board-action-delete:hover { color: var(--red); }

.board-switcher-divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}

.board-switcher-create {
  display: block;
  width: 100%;
  padding: 8px 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.board-switcher-create:hover { background: var(--bg-hover); color: var(--accent); }

/* â”€â”€ Field error (Create Board modal) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.field-error {
  font-size: 12px;
  color: var(--red);
  margin-top: 6px;
  padding: 6px 10px;
  background: var(--red-dim);
  border: 1px solid var(--red);
  border-radius: var(--radius);
}

/* â”€â”€ Security / Vulnerability Dashboard â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sec-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  overflow-y: auto;
  height: 100%;
}

.sec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.sec-header-left { display: flex; flex-direction: column; gap: 4px; }
.sec-title { font-size: 18px; font-weight: 600; }
.sec-last-scan { font-size: 12px; color: var(--text-muted); }
.sec-header-right { display: flex; gap: 8px; }

/* Summary cards */
.sec-summary-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.sec-card {
  flex: 1;
  min-width: 120px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sec-card-count {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.sec-card-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.sec-card-safety { border-color: #ff3b30; }
.sec-card-safety .sec-card-count { color: #ff3b30; }
.sec-card-critical { border-color: var(--red); }
.sec-card-critical .sec-card-count { color: var(--red); }
.sec-card-high { border-color: var(--orange); }
.sec-card-high .sec-card-count { color: var(--orange); }
.sec-card-medium { border-color: var(--yellow); }
.sec-card-medium .sec-card-count { color: var(--yellow); }
.sec-card-low { border-color: var(--green); }
.sec-card-low .sec-card-count { color: var(--green); }
.sec-card-info { border-color: var(--text-muted); }
.sec-card-info .sec-card-count { color: var(--text-muted); }

/* Filters */
.sec-filters {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: flex-end;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}

.sec-filter-group { display: flex; flex-direction: column; gap: 6px; }
.sec-filter-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }

.sec-filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }

.chip {
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

.chip-safety-critical { border-color: #ff3b30; color: #ff3b30; }
.chip-safety-critical.active { background: rgba(255,59,48,.15); }
.chip-critical { border-color: var(--red); color: var(--red); }
.chip-critical.active { background: var(--red-dim); }
.chip-high { border-color: var(--orange); color: var(--orange); }
.chip-high.active { background: var(--orange-dim); }
.chip-medium { border-color: var(--yellow); color: var(--yellow); }
.chip-medium.active { background: var(--yellow-dim); }
.chip-low { border-color: var(--green); color: var(--green); }
.chip-low.active { background: var(--green-dim); }
.chip-info { border-color: var(--text-muted); color: var(--text-muted); }
.chip-info.active { background: var(--gray-dim); }

.sec-filter-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 4px 8px;
  font-size: 13px;
}

/* Findings table */
.sec-findings-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  flex: 1;
}

.sec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.sec-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  white-space: nowrap;
}

.sec-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sec-table tr:last-child td { border-bottom: none; }
.sec-table tbody tr { cursor: pointer; transition: background .1s; }
.sec-table tbody tr:hover { background: var(--bg-hover); }

/* Severity badges */
.sev-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.sev-safety-critical { background: rgba(255,59,48,.2); color: #ff3b30; }
.sev-critical { background: var(--red-dim); color: var(--red); }
.sev-high { background: var(--orange-dim); color: var(--orange); }
.sev-medium { background: var(--yellow-dim); color: var(--yellow); }
.sev-low { background: var(--green-dim); color: var(--green); }
.sev-informational { background: var(--gray-dim); color: var(--text-muted); }

/* Status chip */
.status-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
}
.status-open { background: var(--accent-dim); color: var(--accent); }
.status-acknowledged { background: var(--yellow-dim); color: var(--yellow); }
.status-suppressed { background: var(--gray-dim); color: var(--text-muted); }
.status-compensated { background: var(--teal-dim); color: var(--teal); }

.sec-empty, .sec-loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
}

/* Pagination */
.sec-pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-muted);
}
.sec-pagination button {
  padding: 4px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
}
.sec-pagination button:disabled { opacity: .4; cursor: default; }
.sec-pagination button:not(:disabled):hover { border-color: var(--accent); color: var(--accent); }

/* Finding detail panel */
.sec-detail-panel {
  width: var(--panel-w);
  right: 0;
  top: 52px;
  bottom: 0;
  overflow-y: auto;
  position: fixed;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 20;
}

.sec-detail-meta {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 12px;
  color: var(--text-muted);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.sec-detail-meta strong { color: var(--text); }

.sec-detail-section { display: flex; flex-direction: column; gap: 8px; }

.sec-detail-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.sec-audit-entry {
  font-size: 12px;
  padding: 8px 10px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
}
.sec-audit-action { font-weight: 600; color: var(--accent); }
.sec-audit-meta { color: var(--text-muted); margin-top: 2px; }

.sec-ref-chip {
  display: inline-block;
  padding: 2px 8px;
  margin: 2px;
  background: var(--purple-dim);
  color: var(--purple);
  border-radius: 20px;
  font-size: 11px;
}

/* Scan running indicator */
.sec-scanning {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--accent);
}
.sec-scan-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}

/* -- AI Scrum delivery controls ------------------------------------------- */
.board-totals {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.board-totals span {
  color: var(--text-muted);
  font-size: 12px;
}
.board-totals strong { color: var(--text); }

.card-meta-line {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.4;
  margin: 4px 0 6px;
}
.card-signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}
.mini-pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 10px;
  padding: 2px 7px;
  white-space: nowrap;
}
.mini-pill.danger { color: var(--red); border-color: var(--red-dim); background: var(--red-dim); }
.card-warning {
  color: var(--red);
  background: var(--red-dim);
  border: 1px solid var(--red-dim);
  border-radius: var(--radius);
  font-size: 11px;
  line-height: 1.35;
  padding: 6px 8px;
  margin: 6px 0;
}
.ticket-type-badge.type-feature,
.ticket-type-badge.type-research,
.ticket-type-badge.type-refactor,
.ticket-type-badge.type-security,
.ticket-type-badge.type-experiment {
  background: var(--bg-hover);
  color: var(--text-muted);
  border-color: var(--border);
}

.detail-extra,
.detail-control-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-surface);
  padding: 10px;
  margin-top: 10px;
}
.detail-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.detail-kv {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.detail-kv span,
.detail-long-field span {
  color: var(--text-dim);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.detail-kv strong {
  color: var(--text);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.detail-long-field {
  border-top: 1px solid var(--border);
  margin-top: 10px;
  padding-top: 10px;
}
.detail-long-field p {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
  margin-top: 4px;
  white-space: pre-wrap;
}
.detail-long-field.danger p { color: var(--red); }

.blocker-age {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  padding: 2px 6px;
}
.blocker-age--watch    { color: var(--text-muted); background: transparent; }
.blocker-age--amber    { color: var(--yellow); background: var(--yellow-dim); }
.blocker-age--critical { color: var(--red);    background: var(--red-dim); }

.approval-box,
.validation-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  background: var(--bg-card);
}
.approval-box p,
.validation-box p,
.approval-note {
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 2px;
}
.approval-box.approved { border-color: var(--green-dim); }
.approval-guidance {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.approval-guidance p { margin: 0 0 6px; }

.approval-checklist {
  margin: 0;
  padding-left: 18px;
}

.approval-checklist li { margin: 3px 0; }
.request-note { color: var(--yellow); }
.validation-box.failed { border-color: var(--red-dim); }
.field-textarea.compact { min-height: 52px; margin-top: 8px; }

.quality-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.quality-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}
.quality-item input { margin-top: 2px; }
.validation-run-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.validation-run {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 8px;
  color: var(--text-muted);
  font-size: 11px;
}
.validation-run.passed strong { color: var(--green); }
.validation-run.failed strong { color: var(--red); }

/* -- Verification results ---------------------------------------------------- */
.verify-overall {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  margin-top: 8px;
}
.verify-overall--passed { background: var(--green-dim); color: var(--green); border: 1px solid var(--green); }
.verify-overall--failed { background: var(--red-dim);   color: var(--red);   border: 1px solid var(--red); }
.verify-ran-at    { font-size: 11px; font-weight: 400; color: inherit; opacity: .8; margin-left: auto; }
.verify-total-time { font-size: 11px; font-weight: 400; color: inherit; opacity: .8; }
.verify-placeholder { color: var(--text-muted); font-size: 12px; font-style: italic; padding: 8px 0; margin: 0; }
.verify-error { color: var(--red); font-size: 12px; padding: 8px 0; margin: 0; }

.cmd-row {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 6px;
  overflow: hidden;
}
.cmd-row--passed { border-color: var(--green-dim); }
.cmd-row--failed { border-color: var(--red-dim); }
.cmd-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  background: var(--bg-card);
}
.cmd-summary::-webkit-details-marker { display: none; }
.cmd-label { font-weight: 600; color: var(--col-text, #cdd6f4); min-width: 50px; }
.badge { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 3px; }
.badge--pass { background: var(--green-dim); color: var(--green); }
.badge--fail { background: var(--red-dim);   color: var(--red); }
.cmd-exit     { font-size: 11px; color: var(--text-muted); }
.cmd-duration { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.cmd-output {
  margin: 0;
  padding: 8px 12px;
  background: var(--bg, #0d1117);
  color: var(--col-text, #cdd6f4);
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 260px;
  overflow-y: auto;
  border-top: 1px solid var(--border);
}
#detail-verify-results { outline: none; }

.modal-wide { max-width: 780px; }
.field-grid {
  display: grid;
  gap: 10px;
}
.field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid > div { min-width: 0; }
.field-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 12px;
}
.code-input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.ticket-type-toggle.multi {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.ticket-type-toggle.multi .ticket-type-btn {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 720px) {
  .field-grid.two,
  .detail-field-grid,
  .ticket-type-toggle.multi { grid-template-columns: 1fr; }
}

#domain-modal .modal-wide { max-width: 780px; }

/* -- Inline text button ---------------------------------------------------- */
.btn-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  cursor: pointer;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.btn-link:hover { color: var(--accent); }

.settings-context-hint {
  font-size: 12px;
  color: var(--text-muted);
  padding: 10px 0 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

/* -- Context modal width override (base .modal forces 440px) --------------- */
.context-modal-layout.modal {
  width: min(900px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
}

/* -- Settings modal (wider, scrollable, tabbed) ---------------------------- */
.settings-modal {
  width: min(900px, 95vw) !important;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.settings-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  flex-shrink: 0;
}
.settings-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.settings-tab:hover  { color: var(--text); }
.settings-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.settings-tab-pane { flex: 1; overflow-y: auto; min-height: 0; }
#settings-tab-settings { padding-right: 4px; }
#settings-tab-context  { display: flex; flex-direction: column; gap: 12px; }

/* -- Context Modal --------------------------------------------------------- */
.context-editor-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 0;
  min-height: 460px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Sidebar */
.context-sidebar {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
}
.context-sidebar-heading {
  padding: 10px 14px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-subtle);
}
.context-file-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 6px;
  gap: 2px;
}
.context-loading { padding: 12px 14px; font-size: 12px; color: var(--text-muted); }
.context-sidebar-hint {
  padding: 10px 14px;
  font-size: 11px;
  color: var(--text-dim);
  border-top: 1px solid var(--border-subtle);
  line-height: 1.4;
}

/* File buttons */
.context-file-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  transition: background .12s, color .12s;
}
.context-file-btn:hover { background: var(--bg-hover); color: var(--text); }
.context-file-btn.active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 500;
}
.context-file-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.context-file-dot.filled { background: var(--green); }
.context-file-dot.empty  { background: var(--border); }
.context-file-label { flex: 1; }

/* Editor pane */
.context-editor-pane {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
}
.context-editor-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  padding: 40px;
  text-align: center;
}
.context-editor-empty-icon { font-size: 36px; opacity: .4; }
.context-editor-empty-sub  { font-size: 12px; color: var(--text-dim); }
#context-editor-active { display: flex; flex-direction: column; flex: 1; height: 100%; }
.context-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.context-editor-fn { font-size: 13px; font-weight: 600; color: var(--text); }
.context-editor-textarea {
  flex: 1;
  width: 100%;
  min-height: 400px;
  background: var(--bg);
  border: none;
  color: var(--text);
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px;
  line-height: 1.6;
  padding: 14px;
  resize: none;
}
.context-editor-textarea:focus { outline: none; }
.domain-hint { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }

/* -- Backlog View ---------------------------------------------------------- */
#backlog-view {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.backlog-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.backlog-heading { display: flex; flex-direction: column; gap: 4px; }
.backlog-header h2 { font-size: 18px; color: var(--text); }
.backlog-sort-control { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.backlog-sort-control select { min-width: 120px; }
.backlog-header-meta { font-size: 13px; color: var(--text-muted); }
.backlog-container { display: flex; flex-direction: column; gap: 16px; }
.backlog-sprint-group {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.backlog-sprint-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.backlog-sprint-name { font-weight: 600; color: var(--text); font-size: 14px; }
.backlog-sprint-meta { font-size: 12px; color: var(--text-muted); }
.backlog-ticket-row {
  display: grid;
  grid-template-columns: 140px 1fr 80px 50px 130px 70px;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
}
.backlog-ticket-row:last-child { border-bottom: none; }
.backlog-ticket-row:hover { background: var(--bg-hover); }
.backlog-slug { font-family: monospace; font-size: 12px; color: var(--text-muted); }
.backlog-title { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.backlog-pts { text-align: right; color: var(--text-muted); font-size: 12px; }
.backlog-priority { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.priority-critical { color: var(--red); }
.priority-high     { color: var(--orange); }
.priority-medium   { color: var(--yellow); }
.priority-low      { color: var(--text-muted); }

/* -- Git Section ----------------------------------------------------------- */
.git-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.git-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  gap: 8px;
}
.git-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.git-badge-open   { background: var(--green-dim);  color: var(--green); }
.git-badge-merged { background: var(--purple-dim); color: var(--purple); }
.git-badge-closed { background: var(--gray-dim);   color: var(--text-muted); }
.git-badge-review { background: var(--accent-dim); color: var(--accent); }
.git-pr-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 13px;
  text-decoration: none;
}
.git-pr-link:hover { text-decoration: underline; }
.git-pr-preview { padding: 4px 0; }

/* Automated git status section */
.git-auto-status {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--col-border, #2a2a3e);
  border-radius: 6px;
  background: var(--col-card, #1e1e2e);
}
.git-placeholder { color: var(--text-muted, #888); font-size: 13px; margin: 0 0 12px; }
.git-error-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 5px;
  background: var(--red-dim);
  color: var(--red);
  font-size: 13px;
  margin-bottom: 4px;
}
.git-warning-banner {
  padding: 8px 10px;
  border-radius: 5px;
  background: var(--yellow-dim);
  color: var(--yellow);
  font-size: 13px;
  margin-bottom: 4px;
}
.git-value { font-size: 13px; color: var(--col-text, #cdd6f4); }
.git-value code { font-family: monospace; font-size: 12px; background: var(--col-border, #2a2a3e); padding: 1px 4px; border-radius: 3px; }
.git-commit { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.git-muted { color: var(--text-muted, #888); font-size: 13px; }
.git-badge-draft { background: var(--accent-dim, #1a2a3a); color: var(--accent, #89b4fa); }
.git-retry-btn { font-size: 11px; padding: 2px 8px; }
.git-manual-details { margin-top: 8px; }
.git-manual-summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted, #888);
  list-style: none;
  padding: 4px 0;
  user-select: none;
}
.git-manual-summary:hover { color: var(--col-text, #cdd6f4); }
#create-modal .modal { max-width: 680px; }

/* -- Analytics View ------------------------------------------------------------------ */
.analytics-content { padding: 24px; max-width: 1100px; margin: 0 auto; }
.analytics-inner { display: flex; flex-direction: column; gap: 32px; }
.analytics-section { background: var(--col-card, #1e1e2e); border: 1px solid var(--col-border, #2a2a3e); border-radius: 10px; padding: 20px 24px; }
.analytics-section-title { font-size: 1rem; font-weight: 600; color: var(--col-text, #cdd6f4); margin: 0 0 16px; letter-spacing: .03em; text-transform: uppercase; }
.analytics-stat-row { display: flex; flex-wrap: wrap; gap: 16px; }
.analytics-stat-card { background: var(--col-bg, #181825); border: 1px solid var(--col-border, #2a2a3e); border-radius: 8px; padding: 16px 20px; min-width: 180px; display: flex; flex-direction: column; gap: 4px; }
.analytics-stat-label { font-size: .75rem; color: var(--col-subtext, #9399b2); text-transform: uppercase; letter-spacing: .05em; }
.analytics-stat-value { font-size: 1.75rem; font-weight: 700; color: var(--col-text, #cdd6f4); }
.analytics-stat-sub { font-size: .78rem; color: var(--col-subtext, #9399b2); }
.analytics-footnote { margin: 10px 0 0; font-size: .78rem; color: var(--col-subtext, #9399b2); font-style: italic; }
.analytics-empty { color: var(--col-subtext, #9399b2); font-style: italic; padding: 32px; text-align: center; }
.analytics-empty-row { text-align: center; color: var(--col-subtext, #9399b2); font-style: italic; padding: 12px; }

/* Affected Area badge on ticket cards */
.area-badge {
  display: inline-block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--border);
  vertical-align: middle;
  cursor: default;
}

/* Flow tier badges (QUICK / STANDARD / DEEP) */
.flow-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 999px;
  vertical-align: middle;
  text-transform: uppercase;
}
.flow-badge.flow-quick    { background: var(--green-dim);  color: var(--green);  border: 1px solid var(--border); }
.flow-badge.flow-standard { background: var(--yellow-dim); color: var(--yellow); border: 1px solid var(--border); }
.flow-badge.flow-deep     { background: var(--purple-dim); color: var(--purple); border: 1px solid var(--border); }

/* -- Control Room (Overview) ----------------------------------------------- */
#overview-view {
  padding: 24px;
  max-width: 1280px;
  margin: 0 auto;
}

.ov-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.ov-title {
  font-size: 24px;
  font-weight: 760;
  color: var(--text);
  margin: 0;
}

.ov-apikey-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 14px;
  margin-bottom: 18px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.ov-apikey-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 140px;
}

.ov-apikey-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ov-apikey-status {
  font-size: 13px;
  color: var(--text-dim);
}

.ov-apikey-status.ok { color: var(--green); }

.ov-apikey-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 220px;
}

.ov-apikey-controls .field-input {
  flex: 1;
  min-width: 180px;
}

.ov-apikey-error {
  flex-basis: 100%;
  font-size: 12px;
  color: var(--red);
}


.ov-flow-card {
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-surface);
}

.ov-flow-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ov-flow-title {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.ov-flow-sub {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.ov-flow-line {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
  align-items: center;
}

.ov-flow-step {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.ov-flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(100% + 5px);
  top: 50%;
  width: 10px;
  height: 10px;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  transform: translateY(-50%) rotate(45deg);
}

.ov-flow-step-owner {
  color: var(--yellow);
  border-color: var(--yellow-dim);
  background: var(--yellow-dim);
}

.ov-flow-support {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ov-flow-support span {
  padding: 5px 9px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.2;
}
.ov-summary-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.ov-stat {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 92px;
  padding: 14px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.ov-stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ov-stat-val {
  font-size: 24px;
  line-height: 1;
  font-weight: 780;
  color: var(--text);
}

.ov-stat-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.ov-tone-danger { border-color: var(--red); background: var(--red-dim); }
.ov-tone-ok { border-color: var(--green); }
.ov-tone-info { border-color: var(--accent); }
.ov-tone-danger .ov-stat-val { color: var(--red); }
.ov-tone-ok .ov-stat-val { color: var(--green); }
.ov-tone-info .ov-stat-val { color: var(--accent); }

.ov-dashboard {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ov-section {
  min-width: 0;
  padding: 16px;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
}

.ov-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ov-section-title {
  font-size: 13px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin: 0;
}

.ov-section-sub {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.ov-count {
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--bg-hover);
  color: var(--text);
  font-size: 12px;
  font-weight: 760;
}

.ov-count.danger {
  color: var(--red);
  background: var(--red-dim);
}

.ov-board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.ov-board-card {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
}

.ov-board-card.ov-health-blocked {
  border-color: var(--red);
  background: var(--red-dim);
}

.ov-board-card.ov-health-empty {
  opacity: 0.72;
}

.ov-board-card-top,
.ov-board-meta,
.ov-board-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ov-board-name {
  font-weight: 760;
  font-size: 14px;
  color: var(--text);
}

.ov-health-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-dim);
}

.ov-health-blocked .ov-health-pill {
  color: var(--red);
  background: var(--red-dim);
}

.ov-health-empty .ov-health-pill {
  color: var(--text-muted);
  background: var(--gray-dim);
}

.ov-board-meta,
.ov-board-foot {
  color: var(--text-muted);
  font-size: 12px;
}

.ov-progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-hover);
}

.ov-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--accent));
}

.ov-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ov-ticket-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ov-ticket-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  font-size: 13px;
}

.ov-ticket-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ov-badge {
  font-size: 10px;
  font-weight: 760;
  padding: 3px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.ov-badge-blocked { background: var(--red-dim); color: var(--red); }
.ov-badge-review { background: var(--yellow-dim); color: var(--yellow); }
.ov-badge-stale { background: var(--gray-dim); color: var(--text-muted); }
.ov-board-label { font-size: 11px; color: var(--text-muted); }
.ov-status-label { font-size: 11px; color: var(--text-muted); }
.ov-reason {
  grid-column: 2 / 4;
  color: var(--text-muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ov-empty {
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  background: var(--bg-card);
}

.ov-cost-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.ov-cost-table th {
  text-align: left;
  padding: 7px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.ov-cost-table td {
  padding: 8px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text);
}

.ov-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
}

.ov-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: ov-spin 0.8s linear infinite;
}

@keyframes ov-spin { to { transform: rotate(360deg); } }
.ov-error { color: var(--red); padding: 20px; }

@media (max-width: 1100px) {

.ov-summary-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ov-panel-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  #overview-view { padding: 16px; }
  .ov-header { flex-direction: column; }

.ov-summary-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-ticket-row { grid-template-columns: auto minmax(0, 1fr); }
  .ov-board-label { grid-column: 2; }
}
.btn-link { background: none; border: none; padding: 0; color: var(--accent); cursor: pointer; font-size: inherit; text-align: left; }
.btn-link:hover { text-decoration: underline; }

.team-section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

#team-view .runs-resize-handle {
  display: none;
}
.ticket-intake {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ticket-intake-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 18px;
  min-height: 118px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s, transform .15s;
}

.ticket-intake-card:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
  transform: translateY(-1px);
}

.ticket-intake-card.bug:hover {
  border-color: var(--red);
}

.ticket-intake-title {
  font-size: 16px;
  font-weight: 700;
}

.ticket-intake-copy {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
}

.create-form-mode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 8px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.create-form-mode-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

@media (max-width: 640px) {
  .ticket-intake { grid-template-columns: 1fr; }
}
/* -- Modal scroll contract -------------------------------------------------- */
.modal-backdrop:not(.hidden) {
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.modal-backdrop .modal {
  max-height: calc(100dvh - 48px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-backdrop .modal-header {
  flex: 0 0 auto;
}

.modal-backdrop .modal > form,
.modal-backdrop .modal > .settings-tabs,
.modal-backdrop .modal > .settings-tab-content,
.modal-backdrop .modal > .ticket-intake {
  min-height: 0;
}

.modal-backdrop .modal > form {
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.modal-backdrop .modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding-top: 12px;
  background: linear-gradient(to bottom, transparent, var(--bg-surface) 28%);
}

#create-modal .modal {
  width: min(680px, calc(100vw - 32px));
}

#create-modal #create-form:not(.hidden) {
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

#create-modal #create-intake {
  overflow-y: auto;
  overflow-x: hidden;
}

@media (max-width: 640px) {
  .modal-backdrop:not(.hidden) {
    padding: 12px 10px;
  }

  .modal-backdrop .modal {
    max-height: calc(100dvh - 24px);
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    padding: 16px;
  }
}



.saas-banner {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text);
  font-size: 13px;
}
.saas-banner strong { color: var(--accent); text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.saas-banner span { flex: 1; color: var(--text-muted); }
.nav-link-tab { text-decoration: none; display: inline-flex; align-items: center; }
.is-gated { opacity: .68; }

/* -- API Keys ---------------------------------------------------------------- */
.ov-apikey-row {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(320px, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--border-subtle);
}
.ov-apikey-row:first-child { border-top: 0; padding-top: 0; }
.ov-apikey-row:last-of-type { padding-bottom: 0; }
.ov-apikey-status.ok { color: var(--green); }

/* -- Funding Scout ----------------------------------------------------------- */
.funding-page-content {
  height: 100%;
  overflow: auto;
  padding: 24px;
}
.funding-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}
.funding-header h2 {
  font-size: 22px;
  font-weight: 650;
  margin-bottom: 4px;
}
.funding-header p {
  color: var(--text-muted);
  max-width: 760px;
}
.funding-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.funding-panel,
.funding-result {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.funding-panel {
  padding: 16px;
  position: sticky;
  top: 0;
}
.funding-textarea {
  min-height: 130px;
  resize: vertical;
}
.funding-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 14px 0;
}
.funding-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--text);
  font-size: 13px;
}
.funding-controls-row {
  display: grid;
  grid-template-columns: auto 90px 1fr;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}
.funding-controls-row .btn { justify-content: center; }
.funding-message {
  min-height: 20px;
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 13px;
}
.funding-results {
  display: grid;
  gap: 12px;
}
.funding-empty {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  padding: 24px;
  text-align: center;
}
.funding-result {
  padding: 16px;
}
.funding-result-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.funding-result h3 {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.35;
}
.funding-meta,
.funding-result-foot {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
}
.funding-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}
.funding-tags span {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  padding: 2px 8px;
  font-size: 12px;
}
.funding-result p {
  color: var(--text);
  line-height: 1.5;
}
.funding-result-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.funding-result-foot a { color: var(--accent); }

@media (max-width: 900px) {
  .ov-apikey-row,
  .funding-layout {
    grid-template-columns: 1fr;
  }
  .funding-panel { position: static; }
  .funding-result-head,
  .funding-result-foot,
  .funding-header {
    flex-direction: column;
    align-items: stretch;
  }
}
.funding-fit {
  font-weight: 650;
}
.funding-fit-strong {
  color: var(--green);
  border-color: var(--green);
  background: var(--green-dim);
}
.funding-fit-possible {
  color: var(--yellow);
  border-color: var(--yellow);
  background: var(--yellow-dim);
}
.funding-fit-low {
  color: var(--text-muted);
}
.funding-reasons {
  margin: 10px 0 0 18px;
  color: var(--text-muted);
  line-height: 1.45;
  font-size: 13px;
}
.funding-next-step {
  margin-top: 10px;
  padding: 8px 10px;
  border-left: 3px solid var(--accent);
  background: var(--bg-card);
  color: var(--text);
  font-size: 13px;
}
