/* PI Planning Tool — piplanning.io design system */

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Core palette (warm dark brown base) */
  --color-main: #2d2124;
  --color-main-inverse: #f5f5f5;
  --color-bg: #f4f4f5;
  --color-surface: #ffffff;
  --color-surface-hover: rgba(45,33,36,.05);
  --color-surface-active: rgba(45,33,36,.1);

  /* Text */
  --color-text: #2d2124;
  --color-text-subtle: #6c6466;
  --color-text-placeholder: #c0bcbd;
  --color-text-inverse: #f5f5f5;
  --color-text-disabled: #d5d3d3;

  /* Borders */
  --color-border: #c0bcbd;
  --color-border-subtle: #d5d3d3;
  --color-board-border: #dee0e3;

  /* Alpha scale */
  --alpha-5: rgba(45,33,36,.05);
  --alpha-10: rgba(45,33,36,.1);
  --alpha-20: rgba(45,33,36,.2);
  --alpha-30: rgba(45,33,36,.3);
  --alpha-50: rgba(45,33,36,.5);

  /* Semantic colors */
  --color-destructive: #ff0044;
  --color-success: #3bb200;
  --color-warning: #fd9f28;

  /* Alternative / accent */
  --color-alt-blue: #4449d9;
  --color-alt-red: #db4751;
  --color-alt-green: #3ea009;
  --color-alt-brown: #e48f3f;
  --color-alt-yellow: #facc15;
  --color-alt-purple: #aa00cc;

  /* Card type colors (from piplanning.io) */
  --card-feature: #c1e4fa;
  --card-dependency: #f7b1f4;
  --card-milestone: #f6d092;
  --card-enabler: #ebcab1;
  --card-story: #adbc37;
  --card-risk: #ed7e6a;
  --card-measure: #bbdfa2;
  --card-epic: #c8b8e8;

  /* ROAM column colors */
  --roam-resolved: #3ea009;
  --roam-owned: #db4751;
  --roam-accepted: #4449d9;
  --roam-mitigated: #e48f3f;

  /* Commitment */
  --committed: #3ea009;
  --uncommitted: #e48f3f;

  /* Status backgrounds */
  --bg-ok: #f6f6fd;
  --bg-warn: #fef9f5;
  --bg-error: #fdf6f6;

  /* Sizing */
  --header-h: 44px;
  --sidebar-w: 44px;
  --bottom-h: 44px;
  --radius: 6px;
  --radius-sm: 4px;
  --radius-lg: 8px;

  /* Shadows */
  --shadow-card: 0 0 8px rgba(45,33,36,.13);
  --shadow-menu: 0 2px 12px rgba(45,33,36,.1);
  --shadow-modal: 0 10px 30px rgba(45,33,36,.2);

  /* Font */
  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html, body {
  height: 100%;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -.01em;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

#app { height: 100%; }

/* === Loading === */
.loading {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100vh; gap: 16px;
  color: var(--color-text-subtle);
}
.loading-spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--color-border-subtle);
  border-top-color: var(--color-main);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =================================================================
   APP SHELL — sidebar + header + bottom toolbar + content
   ================================================================= */

.app-shell {
  height: 100%; display: flex; flex-direction: column;
}

/* --- Top Header (44px, dark) --- */
.top-header {
  height: var(--header-h);
  background: var(--color-main);
  color: var(--color-text-inverse);
  display: flex; align-items: center;
  padding: 0 12px;
  flex-shrink: 0;
  z-index: 250;
  border-bottom: 1px solid rgba(255,255,255,.15);
  font-weight: 500; font-size: 14px;
}
.top-header .logo {
  font-weight: 700; font-size: 15px; white-space: nowrap;
  margin-right: 16px; letter-spacing: -.02em;
}
.top-header .session-selector {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto; margin-right: auto;
}
.top-header .session-selector select {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: white; padding: 4px 10px;
  border-radius: var(--radius); font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
}
.top-header .session-selector select:hover {
  background: rgba(255,255,255,.2);
}
.top-header .header-right {
  display: flex; align-items: center; gap: 10px;
  margin-left: auto;
}
.top-header .timer {
  font-variant-numeric: tabular-nums;
  font-size: 13px; opacity: .85;
  background: rgba(255,255,255,.1);
  padding: 2px 10px; border-radius: var(--radius);
}
/* Sync status indicator */
.sync-indicator { display: flex; align-items: center; cursor: default; }
.sync-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-text-subtle);
}
.sync-dot.connected { background: #22c55e; }
.sync-dot.connecting { background: #eab308; animation: sync-pulse 1s infinite; }
.sync-dot.disconnected { background: #6b7280; }
.sync-dot.error { background: #ef4444; }
@keyframes sync-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.top-header .avatar {
  width: 28px; height: 28px;
  border-radius: 50%; display: flex;
  align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  background: #2265c3; color: white;
  text-transform: uppercase;
}

/* --- Body (sidebar + main) --- */
.app-body {
  flex: 1; display: flex; overflow: hidden;
  position: relative;
}

/* --- Left Sidebar (44px, dark) --- */
.side-nav {
  width: var(--sidebar-w);
  background: var(--color-main);
  display: flex; flex-direction: column;
  align-items: center;
  padding: 8px 0;
  gap: 2px;
  flex-shrink: 0;
  z-index: 200;
  border-right: 1px solid rgba(255,255,255,.1);
}
.side-nav .nav-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  cursor: pointer; border: none;
  background: transparent; color: rgba(255,255,255,.55);
  transition: background .15s, color .15s;
  padding: 0;
}
.side-nav .nav-btn:hover {
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.85);
}
.side-nav .nav-btn.active {
  background: rgba(255,255,255,.15);
  color: white;
}
.side-nav .nav-btn svg {
  width: 20px; height: 20px; fill: currentColor;
}
.side-nav .nav-sep {
  width: 24px; height: 1px;
  background: rgba(255,255,255,.15);
  margin: 4px 0;
}

/* --- Main Content Area --- */
.main-area {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden;
}
.view-content {
  flex: 1; overflow: auto;
  padding: 16px 20px;
  padding-bottom: calc(var(--bottom-h) + 26px);
}

/* --- Bottom Toolbar --- */
.bottom-bar {
  position: fixed; bottom: 10px; right: 10px;
  display: flex; gap: 6px; z-index: 250;
}
.bottom-group {
  display: flex; align-items: center;
  height: 40px; padding: 2px;
  background: var(--color-main);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-menu);
  border: 2px solid rgba(255,255,255,.15);
  gap: 2px;
}
.bottom-group .tb-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius); border: none;
  background: transparent; color: rgba(255,255,255,.7);
  cursor: pointer; padding: 0;
  transition: background .15s, color .15s;
}
.bottom-group .tb-btn:hover {
  background: rgba(255,255,255,.12);
  color: white;
}
.bottom-group .tb-btn.active {
  background: rgba(255,255,255,.2);
  color: white;
}
.bottom-group .tb-btn svg {
  width: 20px; height: 20px; fill: currentColor;
}
.bottom-group .tb-label {
  color: rgba(255,255,255,.7);
  font-size: 12px; font-weight: 500;
  padding: 0 8px;
}

/* Add-item popout */
.add-item-popout {
  display: flex; gap: 4px; align-items: center;
  max-width: 0; overflow: hidden; opacity: 0;
  transition: max-width .3s, opacity .3s;
}
.add-item-popout.open {
  max-width: 400px; opacity: 1;
}
.add-type-btn {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm); border: none;
  cursor: pointer; transition: transform .1s;
}
.add-type-btn:hover { transform: scale(1.08); }

/* =================================================================
   PLANNING BOARD — grid table
   ================================================================= */

.planning-board {
  display: grid;
  gap: 1px;
  background: var(--color-board-border);
  border: 1px solid var(--color-board-border);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: max-content;
}

.planning-header-cell {
  background: var(--color-bg);
  padding: 12px 14px;
  font-size: 13px; font-weight: 700;
  text-align: center;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
}
.planning-header-cell .iter-name {
  font-size: 14px; font-weight: 800;
  color: var(--color-text);
}
.planning-header-cell .iter-date {
  font-size: 11px; font-weight: 500;
  color: var(--color-text-subtle);
}
.planning-header-cell.corner {
  background: var(--color-main);
  color: var(--color-text-inverse);
  font-weight: 600;
}

.planning-team-header {
  background: var(--color-surface);
  padding: 10px 14px;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center;
  min-width: 170px;
  border-right: 1px solid var(--color-board-border);
  color: var(--color-text);
}
.planning-team-header.current {
  font-weight: 800;
}

.planning-cell {
  background: var(--color-surface);
  padding: 6px;
  min-height: 130px;
  min-width: 190px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  transition: background .15s;
}
.planning-cell .sticky-note {
  width: 100%;
}
.planning-cell.drag-over {
  background: var(--bg-ok);
  outline: 2px dashed var(--color-alt-blue);
  outline-offset: -2px;
}

/* Board toolbar row */
.board-toolbar {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.board-toolbar h2 {
  font-size: 16px; font-weight: 700;
  color: var(--color-text);
}
.board-toolbar-actions {
  display: flex; gap: 8px; align-items: center;
}

/* =================================================================
   STICKY NOTE — piplanning.io style
   ================================================================= */

.sticky-note {
  width: 170px; min-height: 90px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  color: var(--color-text);
  cursor: grab;
  transition: box-shadow .15s;
  font-size: 12px;
  position: relative;
}
.sticky-note:hover {
  box-shadow: 0 0 12px rgba(45,33,36,.2);
}
.sticky-note:active { cursor: grabbing; }

/* Card type backgrounds */
.sticky-note.type-feature    { background: var(--card-feature); }
.sticky-note.type-dependency { background: var(--card-dependency); }
.sticky-note.type-milestone  { background: var(--card-milestone); }
.sticky-note.type-enabler    { background: var(--card-enabler); }
.sticky-note.type-story      { background: var(--card-story); }
.sticky-note.type-epic       { background: var(--card-epic); }

.sticky-note-header {
  padding: 5px 8px 0;
  display: flex; align-items: center;
  justify-content: space-between;
  height: 22px;
}
.sticky-note-type {
  font-size: 10px; font-weight: 600;
  opacity: .7; text-transform: uppercase;
  letter-spacing: .02em;
}
.sticky-note-flag {
  width: 14px; height: 14px;
  border: 1px dashed currentColor;
  border-radius: 50%; opacity: .4;
}

.sticky-note-body {
  padding: 2px 8px;
  display: flex; align-items: flex-start;
  overflow: hidden;
}
.sticky-note-text {
  font-weight: 500;
  font-size: 12px;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.sticky-note-footer {
  padding: 0 8px 5px;
  display: flex; align-items: center;
  gap: 4px; min-height: 22px;
}

/* Attribute chips on cards */
.attr-chip {
  display: inline-flex; align-items: center;
  padding: 1px 5px; height: 16px;
  border-radius: var(--radius-sm);
  font-size: 10px; font-weight: 600;
  background: rgba(45,33,36,.08);
  gap: 3px; max-width: 100%;
  overflow: hidden; white-space: nowrap;
  text-overflow: ellipsis;
}
.attr-chip svg { width: 10px; height: 10px; fill: currentColor; opacity: .6; }

/* Link mode */
.sticky-note.link-mode { cursor: crosshair; }
.sticky-note.link-mode:hover {
  outline: 2px solid var(--color-alt-blue);
  outline-offset: 1px;
}
.sticky-note.link-source {
  outline: 2px solid var(--color-alt-red);
  outline-offset: 1px;
  box-shadow: 0 0 16px rgba(219,71,81,.3);
}

/* =================================================================
   ROAM RISK BOARD — 2x2 grid + submissions
   ================================================================= */

.roam-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr auto;
  gap: 1px;
  background: var(--color-board-border);
  border: 1px solid var(--color-board-border);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 500px;
}
.roam-quadrant {
  background: var(--color-surface);
  padding: 16px;
  min-height: 200px;
  position: relative;
  transition: background .15s;
}
.roam-quadrant.drag-over {
  background: var(--bg-ok);
}
.roam-quadrant-label {
  font-size: 18px; font-weight: 800;
  opacity: .12;
  position: absolute;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.roam-quadrant.q-resolved .roam-quadrant-label { top: 14px; left: 16px; color: var(--roam-resolved); }
.roam-quadrant.q-owned .roam-quadrant-label    { top: 14px; right: 16px; color: var(--roam-owned); }
.roam-quadrant.q-accepted .roam-quadrant-label { top: 14px; left: 16px; color: var(--roam-accepted); }
.roam-quadrant.q-mitigated .roam-quadrant-label { top: 14px; right: 16px; color: var(--roam-mitigated); }

.roam-quadrant .cards-area {
  display: flex; flex-wrap: wrap;
  gap: 8px; padding-top: 36px;
  align-content: flex-start;
}
.roam-submissions {
  grid-column: 1 / span 2;
  background: var(--color-surface);
  padding: 12px 16px;
  min-height: 80px;
}
.roam-submissions-label {
  font-size: 13px; font-weight: 700;
  color: var(--color-text-subtle);
  margin-bottom: 8px;
}
.roam-submissions .cards-area {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.roam-submissions.drag-over {
  background: var(--bg-warn);
}

/* ROAM reference legend */
.roam-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-board-border);
  border-radius: var(--radius);
}
.roam-legend-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: background .1s;
}
.roam-legend-item:hover { background: var(--alpha-5); }
.roam-legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.roam-legend-label {
  font-size: 13px; font-weight: 700;
  white-space: nowrap;
  min-width: 100px;
}
.roam-legend-desc {
  font-size: 11px;
  color: var(--color-text-subtle);
}

/* Risk card */
.risk-card {
  width: 140px; height: 100px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  cursor: grab;
  overflow: hidden;
  font-size: 12px;
  color: var(--color-text);
}
.risk-card.type-risk    { background: var(--card-risk); }
.risk-card.type-measure { background: var(--card-measure); }

.risk-card-header {
  padding: 5px 8px 0;
  font-size: 10px; font-weight: 600;
  opacity: .65; text-transform: uppercase;
}
.risk-card-body {
  padding: 2px 8px;
  font-weight: 500; font-size: 12px; line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.risk-card-footer {
  padding: 0 8px 5px;
  display: flex; align-items: center;
  gap: 4px;
}
.risk-card:hover {
  box-shadow: 0 0 12px rgba(45,33,36,.2);
  transform: translateY(-1px);
}

/* =================================================================
   OBJECTIVES — two-column layout
   ================================================================= */

.objectives-board {
  display: flex; gap: 1px;
  background: var(--color-board-border);
  border: 1px solid var(--color-board-border);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 400px;
}
.obj-column {
  flex: 1; background: var(--color-surface);
  display: flex; flex-direction: column;
}
.obj-column + .obj-column {
  border-left: 1px solid var(--color-board-border);
}
.obj-column-header {
  padding: 12px 16px;
  display: flex; align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-board-border);
}
.obj-column-header h3 {
  font-size: 14px; font-weight: 700;
}
.obj-column-header .obj-count {
  font-size: 12px; color: var(--color-text-subtle);
  font-weight: 500;
}
.obj-column-body {
  flex: 1; overflow-y: auto;
  padding: 0;
}

/* Committed / Uncommitted group */
.obj-group-header {
  position: sticky; top: 0;
  background: var(--color-surface);
  z-index: 1;
  padding: 10px 16px;
  display: flex; align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}
.obj-group-header:hover { background: var(--alpha-5); }
.obj-group-title {
  font-size: 13px; font-weight: 800;
}
.obj-group-count {
  font-size: 12px; color: var(--color-text-subtle);
}
.obj-group-header .chevron {
  width: 16px; height: 16px; fill: var(--color-text-subtle);
  transition: transform .2s;
}
.obj-group-header.collapsed .chevron {
  transform: rotate(-90deg);
}

/* Objective card */
.objective-card {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(45,33,36,.06);
  display: flex; align-items: flex-start;
  gap: 12px;
  transition: background .1s;
}
.objective-card:hover { background: var(--alpha-5); }
.obj-index {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}
.obj-text-area {
  flex: 1; min-width: 0;
}
.obj-text-area textarea {
  width: 100%; border: none; background: transparent;
  font-family: var(--font);
  font-size: 13px; line-height: 1.4;
  resize: none; outline: none;
  padding: 0;
}
.obj-text-area textarea:focus {
  background: var(--alpha-5);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin: -4px;
}
.obj-details {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}

/* Business value selector */
.bv-box {
  width: 28px; height: 28px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  position: relative;
}
.bv-box:hover { background: var(--alpha-5); }

.bv-popover {
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  margin-top: 4px;
  display: flex; flex-wrap: wrap;
  width: 112px; padding: 4px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius);
  box-shadow: var(--shadow-menu);
  z-index: 10;
}
.bv-popover button {
  width: 24px; height: 24px;
  border-radius: var(--radius-sm);
  border: none; cursor: pointer;
  font-size: 12px; font-weight: 500;
  background: var(--alpha-5);
  margin: 2px;
}
.bv-popover button:hover { background: var(--alpha-20); }
.bv-popover button.current {
  background: var(--color-main);
  color: var(--color-text-inverse);
}

/* Links chip on objectives */
.obj-links-chip {
  display: flex; align-items: center; gap: 3px;
  padding: 2px 6px; border-radius: var(--radius-sm);
  background: var(--alpha-5);
  font-size: 11px; cursor: pointer;
}
.obj-links-chip:hover { background: var(--alpha-10); }
.obj-links-chip svg { width: 12px; height: 12px; fill: currentColor; opacity: .6; }

/* Empty state */
.obj-empty {
  padding: 24px 16px; text-align: center;
  color: var(--color-text-placeholder);
  font-size: 13px;
  border: 1px dashed var(--color-border-subtle);
  border-radius: var(--radius);
  margin: 12px 16px;
}

/* =================================================================
   BACKLOG — card-based with filter chips
   ================================================================= */

.backlog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.backlog-grid .sticky-note { width: 100%; }

.backlog-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-board-border);
}
.backlog-table th {
  background: var(--color-bg);
  padding: 10px 14px;
  font-size: 12px; font-weight: 700;
  text-align: left; text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--color-text-subtle);
  border-bottom: 1px solid var(--color-board-border);
}
.backlog-table td {
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid rgba(45,33,36,.06);
}
.backlog-table tr:hover td { background: var(--alpha-5); }

/* Type dot */
.type-dot {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 2px; margin-right: 6px;
  vertical-align: middle;
}
.type-dot.large { width: 34px; height: 34px; border-radius: var(--radius-sm); }

/* =================================================================
   TEAM BOARD — piplanning.io layout
   Top: iteration columns | Bottom: Objectives | Risks | IP Sprint
   ================================================================= */

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

/* Top zone: iteration grid */
.team-board-grid {
  display: grid; gap: 1px;
  background: var(--color-board-border);
  border: 1px solid var(--color-board-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.team-iter-col {
  background: var(--color-surface);
  display: flex; flex-direction: column;
}
.team-iter-header {
  padding: 10px 12px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-board-border);
  display: flex; flex-direction: column; gap: 2px;
}
.team-iter-header .iter-title {
  font-size: 14px; font-weight: 700;
}
.team-iter-header .iter-date {
  font-size: 11px; color: var(--color-text-subtle);
}
.team-iter-metrics {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 12px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-board-border);
  font-size: 12px;
}
.metric-label {
  color: var(--color-text-subtle); font-weight: 500;
}
.iter-flag {
  width: 14px; height: 14px;
  border-radius: 2px;
}
.iter-flag.default { background: var(--color-border-subtle); }
.iter-flag.ok      { background: var(--roam-resolved); }
.iter-flag.warn    { background: var(--color-warning); }
.iter-flag.error   { background: var(--color-alt-red); }

.team-iter-body {
  flex: 1; padding: 8px;
  min-height: 120px;
  display: flex; flex-direction: column;
  align-items: stretch;
  gap: 6px;
  transition: background .15s;
}
.team-iter-body.drag-over {
  background: var(--bg-ok);
  outline: 2px dashed var(--color-alt-blue);
  outline-offset: -2px;
}
.team-iter-body .sticky-note { width: 100%; }
.iter-empty-hint {
  padding: 16px 8px;
  text-align: center;
  color: var(--color-text-placeholder);
  font-size: 11px;
  font-style: italic;
  border: 1px dashed var(--color-border-subtle);
  border-radius: var(--radius-sm);
  margin: 4px;
}

/* Capacity bar */
.capacity-bar-wrap {
  padding: 0 12px 8px;
}
.capacity-bar {
  height: 4px; background: var(--alpha-10);
  border-radius: 2px; overflow: hidden;
}
.capacity-bar-fill {
  height: 100%; border-radius: 2px;
  transition: width .3s;
}
.capacity-bar-fill.ok   { background: var(--roam-resolved); }
.capacity-bar-fill.warn { background: var(--color-warning); }
.capacity-bar-fill.over { background: var(--color-alt-red); }

/* Team selector */
.team-selector {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 4px;
}
.team-selector select {
  padding: 6px 12px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
  font-family: var(--font);
  background: var(--color-surface);
  cursor: pointer;
}

/* --- Bottom zone: 3-panel layout --- */
.team-board-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--color-board-border);
  border: 1px solid var(--color-board-border);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 220px;
}

/* Generic panel */
.tb-panel {
  background: var(--color-surface);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.tb-panel-header {
  padding: 10px 14px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-board-border);
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700;
}
.tb-panel-body {
  flex: 1; overflow-y: auto;
  padding: 8px;
}
.tb-panel-empty {
  padding: 20px;
  text-align: center;
  color: var(--color-text-placeholder);
  font-size: 12px;
}

/* Objectives panel */
.tb-obj-group { margin-bottom: 8px; }
.tb-obj-group-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  background: var(--alpha-5);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}
.tb-obj-group-title {
  font-size: 12px; font-weight: 700;
}
.tb-obj-group-count {
  font-size: 11px; font-weight: 600;
  background: var(--alpha-10);
  padding: 1px 8px;
  border-radius: 10px;
  color: var(--color-text-subtle);
}
.tb-obj-list { display: flex; flex-direction: column; gap: 4px; }
.tb-obj-item {
  padding: 8px 10px;
  border: 1px solid var(--color-board-border);
  border-radius: var(--radius-sm);
  transition: background .1s;
}
.tb-obj-item:hover { background: var(--alpha-5); }
.tb-obj-text {
  font-size: 12px; font-weight: 500;
  line-height: 1.3; margin-bottom: 4px;
}
.tb-obj-meta {
  display: flex; gap: 4px;
}
.tb-obj-empty {
  padding: 12px 8px;
  text-align: center;
  color: var(--color-text-placeholder);
  font-size: 11px;
  font-style: italic;
}

/* Risks panel — ROAM mini-board */
.tb-roam-reference {
  display: flex; gap: 6px; align-items: center;
  margin-left: 8px;
}
.tb-roam-ref-item {
  display: flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 700;
  color: var(--color-text-subtle);
  cursor: default;
}
.tb-roam-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ROAM drop zone */
.tb-roam-zone {
  border-left: 3px solid var(--color-border-subtle);
  padding: 4px 8px;
  margin-bottom: 4px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: background .15s;
  min-height: 28px;
}
.tb-roam-zone.drag-over {
  background: var(--bg-ok);
}
.tb-roam-zone.roam-zone-resolved  { border-left-color: var(--roam-resolved); }
.tb-roam-zone.roam-zone-owned     { border-left-color: var(--roam-owned); }
.tb-roam-zone.roam-zone-accepted  { border-left-color: var(--roam-accepted); }
.tb-roam-zone.roam-zone-mitigated { border-left-color: var(--roam-mitigated); }

.tb-roam-zone-header {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600;
  color: var(--color-text-subtle);
  padding: 2px 0;
}
.tb-roam-count {
  font-size: 10px; font-weight: 600;
  background: var(--alpha-10);
  padding: 0 6px;
  border-radius: 8px;
  color: var(--color-text-subtle);
}
.tb-roam-cards {
  display: flex; flex-direction: column; gap: 3px;
  padding: 4px 0;
}

/* Draggable risk card */
.tb-risk-card {
  padding: 6px 8px;
  background: var(--card-risk);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  cursor: grab;
  font-size: 11px;
  transition: box-shadow .15s;
}
.tb-risk-card:hover { box-shadow: 0 0 8px rgba(45,33,36,.2); }
.tb-risk-card:active { cursor: grabbing; }
.tb-risk-text {
  font-size: 11px; font-weight: 500;
  line-height: 1.3; margin-bottom: 3px;
}
.tb-risk-meta { display: flex; gap: 3px; flex-wrap: wrap; }
.tb-risk-meta .attr-chip { font-size: 9px; }

/* Submissions zone */
.tb-submissions-zone {
  margin-top: 6px;
  padding: 6px 8px;
  border: 1px dashed var(--color-border-subtle);
  border-radius: var(--radius-sm);
  min-height: 40px;
  transition: background .15s, border-color .15s;
}
.tb-submissions-zone.drag-over {
  background: var(--bg-warn);
  border-color: var(--color-warning);
}
.tb-submissions-header {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700;
  color: var(--color-text-subtle);
  margin-bottom: 4px;
}
.tb-submissions-hint {
  font-size: 10px; font-style: italic;
  color: var(--color-text-placeholder);
  text-align: center;
  padding: 4px;
}

/* Info text in forms */
.form-info {
  padding: 8px 10px;
  background: var(--bg-ok);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(68,73,217,.15);
  color: var(--color-text-subtle);
  font-size: 12px;
  margin-bottom: 12px;
}

/* IP Sprint panel reuses iter-column inside */
.tb-ip-sprint { padding: 0; }
.tb-ip-sprint .team-iter-col { height: 100%; }
.tb-ip-sprint .team-iter-body { min-height: 80px; }
.team-nav-btn {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius); border: 1px solid var(--color-border-subtle);
  background: var(--color-surface); cursor: pointer;
}
.team-nav-btn:hover { background: var(--alpha-5); }
.team-nav-btn svg { width: 14px; height: 14px; fill: var(--color-text-subtle); }

/* Team summary */
.team-summary {
  margin-top: 16px; padding: 12px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-board-border);
  border-radius: var(--radius);
  font-size: 13px; display: flex;
  align-items: center; gap: 16px;
}
.team-summary-stat {
  display: flex; flex-direction: column;
  align-items: center; gap: 2px;
}
.team-summary-stat .stat-value {
  font-size: 20px; font-weight: 800;
}
.team-summary-stat .stat-label {
  font-size: 11px; color: var(--color-text-subtle);
  text-transform: uppercase; font-weight: 600;
}

/* =================================================================
   FILTER BAR
   ================================================================= */

.filter-bar {
  display: flex; align-items: center;
  gap: 6px; margin-bottom: 12px;
  flex-wrap: wrap;
}
.filter-label {
  font-size: 12px; color: var(--color-text-subtle);
  font-weight: 600; margin-right: 2px;
}
.chip {
  padding: 3px 10px; border-radius: 14px;
  font-size: 12px; font-weight: 500;
  border: 1px solid var(--color-border-subtle);
  background: var(--color-surface);
  cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--color-text-subtle); }
.chip.active {
  background: var(--color-main);
  color: var(--color-text-inverse);
  border-color: var(--color-main);
}

/* View mode toggle (Cards / Table) */
.view-toggle {
  margin-left: auto;
  display: flex;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
}
.view-toggle-btn {
  padding: 4px 14px;
  font-size: 12px; font-weight: 600;
  font-family: var(--font);
  border: none; cursor: pointer;
  background: var(--color-surface);
  color: var(--color-text-subtle);
  transition: all .15s;
}
.view-toggle-btn:not(:last-child) {
  border-right: 1px solid var(--color-border-subtle);
}
.view-toggle-btn:hover {
  background: var(--alpha-5);
  color: var(--color-text);
}
.view-toggle-btn.active {
  background: var(--color-main);
  color: var(--color-text-inverse);
}

/* =================================================================
   MODAL
   ================================================================= */

.modal-overlay {
  position: fixed; inset: 0;
  background: var(--alpha-50);
  display: flex; align-items: center; justify-content: center;
  z-index: 300;
  animation: fadeIn .15s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  width: 480px; max-width: 92vw; max-height: 85vh;
  overflow: auto;
  animation: slideUp .15s ease-out;
}
@keyframes slideUp {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-header {
  padding: 16px 20px 0;
  font-size: 16px; font-weight: 700;
}
.modal-body { padding: 14px 20px; }
.modal-footer {
  padding: 10px 20px 16px;
  display: flex; justify-content: flex-end; gap: 8px;
}

/* =================================================================
   FORM ELEMENTS
   ================================================================= */

.form-group { margin-bottom: 12px; }
.form-label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--color-text-subtle);
  margin-bottom: 4px; text-transform: uppercase;
  letter-spacing: .03em;
}
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 7px 10px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius);
  font-size: 13px; font-family: var(--font);
  transition: border-color .15s;
  color: var(--color-text);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--color-alt-blue);
  box-shadow: 0 0 0 3px rgba(68,73,217,.1);
}
.form-textarea { min-height: 72px; resize: vertical; }

.form-error {
  background: var(--bg-error); border: 1px solid #fecaca;
  color: #dc2626; padding: 8px 12px; border-radius: var(--radius-sm);
  margin-bottom: 12px; font-size: 12px;
}

/* =================================================================
   BUTTONS
   ================================================================= */

.btn {
  padding: 6px 14px; border-radius: var(--radius);
  font-size: 13px; font-weight: 500;
  cursor: pointer; border: none;
  transition: background .15s, color .15s;
  display: inline-flex; align-items: center;
  gap: 5px; font-family: var(--font);
}
.btn-primary {
  background: var(--color-main);
  color: var(--color-text-inverse);
}
.btn-primary:hover { background: #42373a; }
.btn-secondary {
  background: var(--alpha-5);
  color: var(--color-text-subtle);
  border: 1px solid var(--color-border-subtle);
}
.btn-secondary:hover {
  background: var(--alpha-10);
  color: var(--color-text);
}
.btn-ghost {
  background: transparent;
  color: var(--color-text-subtle);
}
.btn-ghost:hover { background: var(--alpha-5); color: var(--color-text); }
.btn-destructive {
  background: var(--color-destructive);
  color: white;
}
.btn-sm { padding: 4px 10px; font-size: 12px; }

.btn-link-active {
  background: var(--color-alt-red) !important;
  color: white !important;
}

/* =================================================================
   BADGES
   ================================================================= */

.badge {
  padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .03em;
}
.badge-committed { background: #e8f5e0; color: #2d7a0a; }
.badge-uncommitted { background: #fef3e2; color: #9a5c0f; }

/* =================================================================
   SVG DEPENDENCY LINES
   ================================================================= */

.dependency-overlay {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 10;
}
.dep-line {
  stroke: var(--color-alt-red); stroke-width: 2; fill: none;
}
.dep-line.blocked {
  stroke-dasharray: 6 4;
}
.mouse-line { z-index: 11; }

/* =================================================================
   SETUP VIEW
   ================================================================= */

.setup-section {
  background: var(--color-surface);
  border: 1px solid var(--color-board-border);
  border-radius: var(--radius);
  overflow: hidden; margin-bottom: 16px;
}
.setup-section-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-board-border);
}
.setup-section-header h3 {
  font-size: 14px; font-weight: 700;
}
.setup-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px; padding: 14px 16px;
}
.setup-card {
  padding: 12px 14px;
  border: 1px solid var(--color-board-border);
  border-radius: var(--radius);
  transition: box-shadow .15s;
}
.setup-card:hover { box-shadow: var(--shadow-card); }
.setup-card-title { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.setup-card-meta { font-size: 12px; color: var(--color-text-subtle); }
.setup-empty {
  padding: 28px 16px; text-align: center;
  color: var(--color-text-placeholder); font-size: 13px;
}

/* =================================================================
   SCROLLBAR
   ================================================================= */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--alpha-20); border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--alpha-30); }

/* =================================================================
   INFLUENCE LINKS (Feature ↔ Objective)
   ================================================================= */

/* Badge on sticky note header showing linked objective count */
.sticky-note-obj-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--color-alt-blue);
  color: white;
  font-size: 9px; font-weight: 700;
  line-height: 1;
  margin-left: auto;
}

/* Linked features row on objective cards */
.obj-linked-features {
  display: flex; flex-wrap: wrap;
  align-items: center; gap: 4px;
  margin-top: 4px;
}
.obj-linked-features .linked-label {
  font-size: 10px; font-weight: 600;
  color: var(--color-text-subtle);
  margin-right: 2px;
}

/* Linked objectives section in edit modals */
.linked-objectives-section {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--color-board-border);
}

/* Objective picker modal list */
.objective-picker-list {
  display: flex; flex-direction: column;
  gap: 4px;
  max-height: 320px;
  overflow-y: auto;
}
.objective-picker-item {
  display: flex; align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--color-board-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .1s;
}
.objective-picker-item:hover {
  background: var(--alpha-5);
}
.objective-picker-item.already-linked {
  opacity: .5;
  cursor: default;
}
.objective-picker-item input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
}

/* =================================================================
   BOARD HISTORY
   ================================================================= */

.history-feed {
  max-width: 720px;
}

.history-date-group {
  margin-bottom: 8px;
}

.history-date-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--color-bg);
  padding: 8px 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-subtle);
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--color-board-border);
  margin-bottom: 4px;
}

.history-entry {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(45,33,36,.04);
  transition: background .1s;
}
.history-entry:hover {
  background: var(--alpha-5);
  border-radius: var(--radius-sm);
}

.history-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.history-content {
  flex: 1;
  min-width: 0;
}

.history-top-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  line-height: 1.4;
}

.history-entity-label {
  font-weight: 700;
  font-size: 13px;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.history-desc {
  font-size: 13px;
  color: var(--color-text-subtle);
}

.history-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.history-time {
  font-size: 11px;
  color: var(--color-text-placeholder);
  font-variant-numeric: tabular-nums;
}

.history-author {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-subtle);
}

/* =================================================================
   AUTH PAGES (Login / Register)
   ================================================================= */

.auth-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  background: var(--color-bg);
}
.auth-card {
  width: 380px; max-width: 92vw;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  padding: 36px 32px 28px;
}
.auth-title {
  font-size: 24px; font-weight: 800;
  color: var(--color-main);
  margin-bottom: 4px;
  letter-spacing: -.02em;
}
.auth-subtitle {
  font-size: 14px; color: var(--color-text-subtle);
  margin-bottom: 20px;
}
.auth-btn {
  width: 100%;
  padding: 10px 16px;
  font-size: 14px; font-weight: 600;
  margin-top: 4px;
  justify-content: center;
}
.auth-footer {
  margin-top: 16px; text-align: center;
  font-size: 13px; color: var(--color-text-subtle);
}
.auth-footer a {
  color: var(--color-alt-blue); text-decoration: none;
  font-weight: 600;
}
.auth-footer a:hover { text-decoration: underline; }

/* =================================================================
   ART LIST PAGE
   ================================================================= */

.art-list-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px;
}
.art-list-header {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}
.art-list-title {
  font-size: 22px; font-weight: 800;
  color: var(--color-text);
  letter-spacing: -.02em;
}
.art-list-subtitle {
  font-size: 14px; color: var(--color-text-subtle);
  margin-top: 2px;
}
.art-list-header-actions {
  display: flex; gap: 8px; align-items: center;
  flex-shrink: 0;
}
.art-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
}
.art-list-loading {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 48px 0;
  color: var(--color-text-subtle); gap: 12px;
}
.art-list-empty {
  text-align: center; padding: 48px 0;
  color: var(--color-text-placeholder);
  font-size: 14px;
}

/* ART Card */
.art-card {
  background: var(--color-surface);
  border: 1px solid var(--color-board-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  transition: box-shadow .15s, border-color .15s;
}
.art-card:hover {
  box-shadow: var(--shadow-card);
  border-color: var(--color-border);
}
.art-card-header {
  display: flex; align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.art-card-name {
  font-size: 16px; font-weight: 700;
  color: var(--color-text);
}
.art-card-date {
  font-size: 11px; color: var(--color-text-subtle);
}
.art-card-actions {
  display: flex; gap: 6px; flex-wrap: wrap;
}

/* Header back button */
.header-back-btn {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius); border: none;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.7);
  cursor: pointer; padding: 0;
  margin-right: 8px;
  transition: background .15s, color .15s;
}
.header-back-btn:hover {
  background: rgba(255,255,255,.2);
  color: white;
}
.header-back-btn svg {
  width: 16px; height: 16px; fill: none;
  stroke: currentColor;
}

/* =================================================================
   RESPONSIVE
   ================================================================= */

/* =================================================================
   ADMIN PANEL
   ================================================================= */

.admin-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px;
}
.admin-header {
  margin-bottom: 24px;
}
.admin-header h1 {
  font-size: 22px; font-weight: 800;
  color: var(--color-text);
  letter-spacing: -.02em;
}
.admin-subtitle {
  font-size: 14px; color: var(--color-text-subtle);
  margin-top: 2px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-board-border);
}
.admin-table th {
  background: var(--color-bg);
  padding: 10px 14px;
  font-size: 12px; font-weight: 700;
  text-align: left; text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--color-text-subtle);
  border-bottom: 1px solid var(--color-board-border);
}
.admin-table td {
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid rgba(45,33,36,.06);
}
.admin-table tr:hover td { background: var(--alpha-5); }

.admin-row-self td {
  background: rgba(68,73,217,.04);
}
.admin-row-self:hover td {
  background: rgba(68,73,217,.07) !important;
}

.admin-self-label {
  font-size: 12px;
  color: var(--color-text-subtle);
  font-style: italic;
}

.admin-role-select {
  padding: 4px 8px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: var(--font);
  background: var(--color-surface);
  cursor: pointer;
}
.admin-role-select:disabled {
  opacity: .5;
  cursor: default;
}

.admin-info {
  margin-top: 24px;
  padding: 16px 20px;
  background: var(--bg-ok);
  border: 1px solid rgba(68,73,217,.12);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--color-text-subtle);
  line-height: 1.6;
}
.admin-info strong {
  color: var(--color-text);
}
.admin-info ul {
  margin: 6px 0 8px 20px;
  padding: 0;
}
.admin-info li {
  margin-bottom: 2px;
}

/* Admin back row */
.admin-back-row {
  margin-bottom: 12px;
}
.admin-back-row .btn {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--color-text-subtle);
}
.admin-back-row .btn:hover {
  color: var(--color-text);
}

/* ART card member count */
.art-card-members {
  font-size: 12px;
  color: var(--color-text-subtle);
  margin-top: 2px;
}

/* Members table (setup view) */
.members-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
}
.members-table th {
  background: var(--color-bg);
  padding: 8px 14px;
  font-size: 12px; font-weight: 700;
  text-align: left; text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--color-text-subtle);
  border-bottom: 1px solid var(--color-board-border);
}
.members-table td {
  padding: 8px 14px;
  font-size: 13px;
  border-bottom: 1px solid rgba(45,33,36,.06);
}
.members-table tr:hover td { background: var(--alpha-5); }

/* Role badge — inline pill */
.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  background: var(--alpha-10);
  color: var(--color-text-subtle);
  vertical-align: middle;
}

.badge-demo {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: #e8d8b8;
  color: #6b5530;
  vertical-align: middle;
}

@media (max-width: 800px) {
  .roam-board { grid-template-columns: 1fr; grid-template-rows: auto; }
  .roam-submissions { grid-column: 1; }
  .objectives-board { flex-direction: column; }
  .obj-column + .obj-column { border-left: none; border-top: 1px solid var(--color-board-border); }
  .side-nav { display: none; }
  .view-content { padding: 12px; }
}
