/* ═══════════════════════════════════════════
   THE QUARTET — BOT TASK PORTAL
   Dark crypto-finance theme, iPad optimized
   ═══════════════════════════════════════════ */

:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-tertiary: #1a2332;
  --bg-hover: #1e293b;
  --border: #1e293b;
  --border-hover: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #10b981;
  --accent-dim: rgba(16, 185, 129, 0.12);
  --accent-amber: #f59e0b;
  --accent-amber-dim: rgba(245, 158, 11, 0.12);
  --accent-red: #ef4444;
  --accent-red-dim: rgba(239, 68, 68, 0.12);
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* ── LOGIN PAGE ─────────────────────────── */

.login-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(ellipse at 50% 0%, rgba(16, 185, 129, 0.08) 0%, transparent 60%),
              var(--bg-primary);
}

.login-brand {
  text-align: center;
  margin-bottom: 48px;
}

.login-brand h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 6px;
  color: var(--text-primary);
  text-transform: uppercase;
}

.login-brand .subtitle {
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--accent);
  text-transform: uppercase;
  margin-top: 8px;
  font-weight: 500;
}

.login-brand .line {
  width: 60px;
  height: 2px;
  background: var(--accent);
  margin: 16px auto 0;
  border-radius: 1px;
}

.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  max-width: 800px;
  width: 100%;
}

.user-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-user-select: none;
  user-select: none;
}

.user-card:active {
  transform: scale(0.97);
}

.user-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-tertiary);
}

.user-card.inactive {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.user-card .avatar {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  margin: 0 auto 14px;
  color: var(--bg-primary);
}

/* ── IMAGE AVATARS ───────────────────────── */

.avatar-img {
  object-fit: cover;
}

.avatar-img.mini-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.avatar-img.task-assignee {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.avatar-img.act-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
}

.avatar-img.comment-avatar {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  flex-shrink: 0;
}

.avatar-img.bot-brand-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
}

.avatar-img.bot-avatar-large {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  flex-shrink: 0;
}

.avatar-img.login-avatar {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  margin: 0 auto 14px;
  display: block;
}

.user-card .name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.user-card .role {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

.user-card .badge-hatched {
  display: inline-block;
  margin-top: 10px;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--accent-red);
  background: var(--accent-red-dim);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}

/* ── PIN PROMPT ──────────────────────────── */

.pin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.pin-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
}

.pin-avatar-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.pin-box .avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 22px;
  color: var(--bg-primary);
}

.pin-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.pin-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 16px;
  text-align: center;
  letter-spacing: 4px;
  outline: none;
  transition: border-color 0.2s;
}

.pin-input:focus {
  border-color: var(--accent);
}

.pin-error {
  color: var(--accent-red);
  font-size: 13px;
  min-height: 18px;
}

.pin-actions {
  display: flex;
  gap: 12px;
  width: 100%;
}

.pin-actions .btn {
  flex: 1;
}

/* ── TOP NAV ────────────────────────────── */

.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 25, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 56px;
  gap: 12px;
}

.topnav .brand {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text-primary);
  white-space: nowrap;
  margin-right: 8px;
}

.topnav .brand span {
  color: var(--accent);
}

.nav-tabs {
  display: flex;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: relative;
  mask-image: linear-gradient(to right, transparent 0px, black 8px, black calc(100% - 24px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0px, black 8px, black calc(100% - 24px), transparent 100%);
  padding-right: 12px;
}

.nav-tabs::-webkit-scrollbar { display: none; }

.nav-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.nav-tab:hover { color: var(--text-secondary); background: var(--bg-hover); }
.nav-tab.active { color: var(--accent); background: var(--accent-dim); }

.nav-tab .count {
  background: var(--accent-amber);
  color: var(--bg-primary);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-user .user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px 4px 4px;
}

.nav-user .mini-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--bg-primary);
}

.nav-user .user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.btn-logout {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  min-height: 44px;
}

.btn-logout:hover { border-color: var(--accent-red); color: var(--accent-red); }

/* ── MAIN LAYOUT ────────────────────────── */

.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── STATS CARDS ────────────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.stat-card .stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.stat-card .stat-value.green { color: var(--accent); }
.stat-card .stat-value.amber { color: var(--accent-amber); }
.stat-card .stat-value.red { color: var(--accent-red); }
.stat-card .stat-value.blue { color: var(--accent-blue); }

/* ── SECTION HEADERS ────────────────────── */

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

.section-header h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ── BUTTONS ────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  min-height: 44px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}
.btn-primary:hover { background: #0ea572; }

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border-hover); color: var(--text-primary); }

.btn-danger {
  background: var(--accent-red-dim);
  color: var(--accent-red);
  border: 1px solid transparent;
}
.btn-danger:hover { border-color: var(--accent-red); }

.btn-approve {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid transparent;
}
.btn-approve:hover { border-color: var(--accent); }

.btn-deny {
  background: var(--accent-red-dim);
  color: var(--accent-red);
  border: 1px solid transparent;
}
.btn-deny:hover { border-color: var(--accent-red); }

.btn-sm { padding: 6px 12px; font-size: 12px; min-height: 36px; }

/* ── FILTERS BAR ────────────────────────── */

.filters-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: center;
}

.filter-select {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  min-height: 44px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.filter-select:focus { border-color: var(--accent); outline: none; }

/* ── TASK CARDS ──────────────────────────── */

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

.task-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all 0.15s;
  display: grid;
  grid-template-columns: 4px 1fr auto;
  gap: 14px;
  align-items: center;
}

.task-card:hover { border-color: var(--border-hover); background: var(--bg-tertiary); }
.task-card:active { transform: scale(0.995); }

.task-card .priority-bar {
  width: 4px;
  height: 100%;
  min-height: 36px;
  border-radius: 2px;
}

.priority-low { background: var(--text-muted); }
.priority-normal { background: var(--accent-blue); }
.priority-high { background: var(--accent-amber); }
.priority-critical { background: var(--accent-red); }

.task-card .task-info {
  min-width: 0;
}

.task-card .task-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-card .task-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.task-card .task-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.task-card .task-assignee {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--bg-primary);
}

/* ── PILLS & BADGES ─────────────────────── */

.pill {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.pill-project {
  color: var(--bg-primary);
}

.pill-status {
  border: 1px solid;
}

.status-new { color: var(--accent-blue); background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.25); }
.status-in-progress { color: var(--accent-amber); background: var(--accent-amber-dim); border-color: rgba(245,158,11,0.25); }
.status-done { color: var(--accent); background: var(--accent-dim); border-color: rgba(16,185,129,0.25); }
.status-archived { color: var(--text-muted); background: rgba(100,116,139,0.1); border-color: rgba(100,116,139,0.25); }

.pill-priority { font-size: 10px; }

.pill-approval-type {
  background: var(--accent-amber-dim);
  color: var(--accent-amber);
}

.pill-pending { color: var(--accent-amber); background: var(--accent-amber-dim); }
.pill-approved { color: var(--accent); background: var(--accent-dim); }
.pill-denied { color: var(--accent-red); background: var(--accent-red-dim); }

/* ── ACTIVITY LOG ───────────────────────── */

.activity-list {
  display: flex;
  flex-direction: column;
}

.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.activity-item:last-child { border-bottom: none; }

.activity-item .act-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--bg-primary);
  flex-shrink: 0;
}

.activity-item .act-content {
  flex: 1;
  min-width: 0;
}

.activity-item .act-text {
  font-size: 13px;
  color: var(--text-secondary);
}

.activity-item .act-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.activity-item .act-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── APPROVAL CARDS ─────────────────────── */

.approval-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 10px;
}

.approval-card.pending { border-left: 3px solid var(--accent-amber); }
.approval-card.approved { border-left: 3px solid var(--accent); }
.approval-card.denied { border-left: 3px solid var(--accent-red); }

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

.approval-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.approval-body {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
}

.approval-amount {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent-amber);
  margin-bottom: 12px;
}

.approval-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.approval-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.approval-actions {
  display: flex;
  gap: 8px;
}

/* ── MODAL ──────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover { color: var(--text-primary); }

.modal-body {
  padding: 20px;
}

/* ── FORM ELEMENTS ──────────────────────── */

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  min-height: 44px;
  transition: border-color 0.15s;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent);
  outline: none;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 8px;
}

/* ── COLOR PICKER ────────────────────────── */

.color-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: border-color 0.2s, transform 0.15s;
}

.color-swatch:hover {
  transform: scale(1.15);
}

.color-swatch.selected {
  border-color: var(--text-primary);
}

/* ── TASK DETAIL (inside modal) ─────────── */

.task-detail-status {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.task-detail-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  padding: 12px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  min-height: 40px;
}

.task-detail-desc.empty {
  color: var(--text-muted);
  font-style: italic;
}

.task-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.detail-field {
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

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

.detail-field .detail-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.comments-section h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.comment {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  align-items: flex-start;
}

.comment .comment-avatar {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--bg-primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.comment .comment-body {
  flex: 1;
}

.comment .comment-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.comment .comment-meta strong {
  color: var(--text-secondary);
}

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

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

.comment-form input {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  min-height: 44px;
}

.comment-form input:focus { border-color: var(--accent); outline: none; }

/* ── EMPTY STATE ────────────────────────── */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 36px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 14px;
}

/* ── TOAST NOTIFICATION ─────────────────── */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 13px;
  color: var(--text-primary);
  box-shadow: var(--shadow);
  z-index: 300;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-left: 3px solid var(--accent); }
.toast.error { border-left: 3px solid var(--accent-red); }

/* ── BOT PROFILE PAGE ────────────────────── */

.bot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
}

.bot-brand-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: var(--bg-primary);
  flex-shrink: 0;
}

.bot-identity-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.bot-avatar-large {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 28px;
  color: var(--bg-primary);
  flex-shrink: 0;
}

.bot-identity-info {
  flex: 1;
}

.bot-identity-name {
  font-size: 22px;
  font-weight: 700;
}

.bot-identity-role {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 2px;
}

.bot-identity-active {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: var(--accent-dim);
  color: var(--accent);
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.stat-number {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── DOCUMENT MANAGEMENT ─────────────────── */

.doc-category-group {
  margin-bottom: 20px;
}

.doc-category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.pill-doc-category {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cat-health { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.cat-capabilities { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.cat-knowledge { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.cat-config { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.cat-general { background: rgba(100, 116, 139, 0.15); color: #94a3b8; }

.doc-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.doc-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-hover);
}

.doc-card-title {
  font-weight: 600;
  font-size: 14px;
}

.doc-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.doc-meta-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.doc-preview {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-height: 400px;
  overflow-y: auto;
}

.doc-preview h1, .doc-preview h2, .doc-preview h3 {
  color: var(--text-primary);
}

.doc-preview code {
  background: var(--bg-primary);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 13px;
}

.doc-preview ul {
  margin-left: 16px;
}

.doc-editor-textarea {
  min-height: 250px !important;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 13px;
  line-height: 1.6;
}

/* ── CLICKABLE AVATARS ───────────────────── */

.task-assignee.clickable,
.act-avatar.clickable {
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.task-assignee.clickable:hover,
.act-avatar.clickable:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 2px var(--border-hover);
}

/* ── RESPONSIVE — iPad + Mobile ─────────── */

@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .task-detail-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .topnav {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px;
    gap: 8px;
  }

  .topnav .brand {
    font-size: 12px;
    letter-spacing: 2px;
  }

  .nav-tabs {
    order: 3;
    width: 100%;
    padding-bottom: 4px;
  }

  .nav-user {
    margin-left: auto;
  }

  .nav-user .user-name { display: none; }

  .main-content {
    padding: 16px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .stat-card { padding: 14px; }
  .stat-card .stat-value { font-size: 24px; }

  .user-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .task-card {
    padding: 14px;
  }

  .task-detail-grid {
    grid-template-columns: 1fr;
  }

  .modal-box {
    max-height: 85vh;
  }

  .filters-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .login-brand h1 { font-size: 24px; letter-spacing: 4px; }
}

/* ── SCROLLBAR STYLING ──────────────────── */

::-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(--border-hover); }

/* ── UTILITY ────────────────────────────── */

.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-12 { margin-top: 12px; }
.mt-20 { margin-top: 20px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12px; }
.hidden { display: none !important; }

/* ═══════════════════════════════════════════
   PROJECT HUB STYLES
   ═══════════════════════════════════════════ */

.back-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 8px 12px;
  min-height: 44px;
  display: flex;
  align-items: center;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.back-link:hover { color: var(--text-primary); background: var(--bg-hover); }

.project-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  white-space: nowrap;
}

.project-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── PROJECT CARDS (dashboard) ─────────── */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.project-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all 0.15s;
  border-top: 3px solid transparent;
}
.project-card:hover { border-color: var(--border-hover); background: var(--bg-tertiary); }
.project-card:active { transform: scale(0.98); }

.project-card .project-card-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.project-card .project-card-code {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.project-card .project-card-stats {
  display: flex;
  gap: 16px;
}

.project-card .pcs {
  font-size: 11px;
  color: var(--text-muted);
}

.project-card .pcs strong {
  display: block;
  font-size: 18px;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* ── DAILY LOG CARDS ──────────────────── */

.log-date-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.log-date-nav .date-label {
  font-size: 15px;
  font-weight: 600;
  min-width: 120px;
  text-align: center;
}

.log-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 10px;
}

.log-card.missing {
  border: 1px dashed var(--accent-amber);
  background: var(--accent-amber-dim);
}

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

.log-card .log-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.log-card .log-body {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  white-space: pre-wrap;
}

.voice-summary {
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.voice-summary h5 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.voice-summary .vs-field { margin-bottom: 10px; }
.voice-summary .vs-field:last-child { margin-bottom: 0; }

.voice-summary .vs-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  margin-bottom: 2px;
  font-weight: 600;
}

.voice-summary .vs-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.btn-voice {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid transparent;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  min-height: 36px;
  transition: all 0.15s;
}
.btn-voice:hover { border-color: var(--accent); }
.btn-voice.playing { background: var(--accent); color: var(--bg-primary); }

/* ── TASK PURPOSE ────────────────────── */

.task-purpose {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 2px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── LINK CARDS ──────────────────────── */

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.link-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: all 0.15s;
}
.link-card:hover { border-color: var(--border-hover); }

.link-card .link-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.link-card .link-url {
  font-size: 11px;
  color: var(--accent-blue);
  word-break: break-all;
  margin-bottom: 8px;
  text-decoration: none;
  display: block;
}
.link-card .link-url:hover { text-decoration: underline; }

.link-card .link-preview-img {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  max-height: 200px;
  object-fit: cover;
}

.link-card .link-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.link-card .link-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-muted);
}

/* ── BRIEF EDITOR ────────────────────── */

.brief-editor {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
}

.brief-editor textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}
.brief-editor textarea:focus { outline: none; }

/* ── PHASE SELECTOR ──────────────────── */

.phase-selector {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.phase-pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-muted);
  transition: all 0.15s;
  min-height: 36px;
  text-transform: capitalize;
}
.phase-pill.active { background: var(--accent); color: var(--bg-primary); border-color: var(--accent); }
.phase-pill:hover { border-color: var(--border-hover); }

/* ── RESPONSIVE — Project Hub ─────────── */

@media (max-width: 768px) {
  .project-grid {
    grid-template-columns: 1fr;
  }

  .link-grid {
    grid-template-columns: 1fr;
  }

  .log-date-nav .date-label {
    min-width: 100px;
    font-size: 13px;
  }

  .project-brand {
    font-size: 12px;
    letter-spacing: 1px;
  }

  .bot-identity-card {
    flex-direction: column;
    text-align: center;
  }

  .bot-brand {
    font-size: 13px;
  }

  .doc-editor-textarea {
    min-height: 180px !important;
  }

  .hr-bot-grid {
    grid-template-columns: 1fr;
  }

  .hr-bot-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .chat-bubble {
    max-width: 95%;
  }

  .chat-container {
    height: calc(100vh - 280px);
  }
}

/* ═══════════════════════════════════════════
   HR CENTER STYLES
   ═══════════════════════════════════════════ */

/* ── HR Bot Grid ────────────────────────── */

.hr-bot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.hr-bot-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all 0.15s;
}

.hr-bot-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-tertiary);
}

.hr-bot-card:active {
  transform: scale(0.98);
}

.hr-bot-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.hr-bot-avatar {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}

.avatar-img.hr-bot-avatar {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
}

.hr-bot-info {
  flex: 1;
  min-width: 0;
}

.hr-bot-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.hr-bot-role {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Health Status Dots ─────────────────── */

.health-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pill-health {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.health-online { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.health-degraded { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.health-offline { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.health-maintenance { background: rgba(100, 116, 139, 0.15); color: #94a3b8; }

/* ── HR Bot Stats Row ───────────────────── */

.hr-bot-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.hr-stat {
  text-align: center;
  padding: 8px 4px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
}

.hr-stat strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.hr-stat span {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hr-bot-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.hr-bot-actions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.hr-status-select {
  width: 100%;
  font-size: 12px;
}

/* ── Comms Monitor Feed ─────────────────── */

.comms-feed {
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.comms-message {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.comms-message:last-child { border-bottom: none; }

.comms-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: #fff;
  flex-shrink: 0;
}

.avatar-img.comms-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

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

.comms-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.comms-meta strong {
  color: var(--text-primary);
}

.comms-arrow {
  color: var(--accent);
  font-size: 11px;
}

.comms-recipient {
  color: var(--text-secondary);
  font-weight: 500;
}

.comms-time {
  margin-left: auto;
  font-size: 11px;
}

.comms-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Chat UI (Bot Profile Comms Tab) ────── */

.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 220px);
  min-height: 400px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 80%;
}

.chat-bubble.chat-sent {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-bubble.chat-received {
  align-self: flex-start;
}

.chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 10px;
  color: #fff;
  flex-shrink: 0;
}

.avatar-img.chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}

.chat-bubble-body {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
}

.chat-sent .chat-bubble-body {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
}

.chat-bubble-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.chat-bubble-meta strong {
  color: var(--text-primary);
  font-size: 12px;
}

.chat-arrow {
  color: var(--accent);
  font-size: 10px;
}

.chat-time {
  margin-left: 8px;
}

.chat-bubble-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  word-break: break-word;
}

.chat-input-bar {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  align-items: center;
}

.chat-input-bar .form-input {
  flex: 1;
}

/* ═══════════════════════════════════════════
   VENTING ROOM
   ═══════════════════════════════════════════ */

.venting-input-bar {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  align-items: center;
}

.venting-input-bar .form-input {
  flex: 1;
}

/* ═══════════════════════════════════════════
   SUGGESTION BOX
   ═══════════════════════════════════════════ */

.suggestion-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.suggestion-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color 0.2s;
}

.suggestion-card:hover {
  border-color: var(--border-hover);
}

.suggestion-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.suggestion-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
}

.suggestion-pills {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.pill-suggestion-cat,
.pill-suggestion-status {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.suggestion-body {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.suggestion-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.suggestion-submitter {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.suggestion-avatar {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 8px;
  color: #fff;
  flex-shrink: 0;
}

.avatar-img.suggestion-avatar {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  object-fit: cover;
}

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

.suggestion-vote-btn {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 32px;
}

.suggestion-vote-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.suggestion-vote-btn.vote-active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.suggestion-status-select {
  font-size: 11px;
  padding: 4px 24px 4px 8px;
  min-height: 32px;
}

/* ═══════════════════════════════════════════
   ONBOARDING CHECKLIST
   ═══════════════════════════════════════════ */

.onboarding-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.onboarding-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.onboarding-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.onboarding-avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}

.avatar-img.onboarding-avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

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

.onboarding-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.onboarding-card-progress-text {
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
}

.onboarding-pct {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ── Progress Bar ──────────────────────── */

.progress-bar {
  height: 6px;
  background: var(--bg-primary);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease, background 0.3s ease;
}

.hr-onboarding-progress {
  margin-bottom: 14px;
}

/* ── Checklist Items ───────────────────── */

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

.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
  cursor: pointer;
}

.checklist-item:hover {
  background: var(--bg-hover);
}

.checklist-item.checklist-readonly {
  cursor: default;
}

.checklist-item.checklist-readonly:hover {
  background: transparent;
}

.checklist-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

.checklist-check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--bg-primary);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.2s;
}

.checklist-done .checklist-check {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

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

.checklist-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.checklist-done .checklist-title {
  color: var(--text-muted);
  text-decoration: line-through;
}

.checklist-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.checklist-text {
  font-size: 13px;
  color: var(--text-secondary);
}

.checklist-time {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ── Onboarding Self View ──────────────── */

.onboarding-self {
  max-width: 600px;
}

.onboarding-self-header {
  margin-bottom: 24px;
}

.onboarding-self-progress {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.onboarding-self-pct {
  font-size: 36px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.onboarding-self-label {
  font-size: 14px;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════
   SKILLS & TRAINING
   ═══════════════════════════════════════════ */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.skill-card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skill-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-tertiary);
}

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

.skill-card-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}

.pill-skill-cat {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.skill-card-body {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.skill-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.skill-avatar-row {
  display: flex;
  align-items: center;
  gap: 2px;
}

.skill-mini-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--bg-secondary);
  margin-left: -6px;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--bg-primary);
  object-fit: cover;
}

.skill-mini-avatar:first-child {
  margin-left: 0;
}

.skill-count {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 6px;
  font-weight: 600;
}

.skill-acquire-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.skill-acquire-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.skill-acquire-btn.skill-acquired {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.skill-delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s;
  opacity: 0;
}

.skill-card:hover .skill-delete-btn {
  opacity: 1;
}

.skill-delete-btn:hover {
  color: var(--accent-red);
  background: var(--accent-red-dim);
}

/* ── Skill Detail Modal ──── */

.skill-detail-bots {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skill-detail-bot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
}

.skill-detail-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--bg-primary);
}

.skill-detail-bot-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
}

.skill-detail-status {
  font-size: 12px;
  font-weight: 600;
}

.skill-detail-status.skill-has {
  color: var(--accent);
}

.skill-detail-status.skill-missing {
  color: var(--text-muted);
}

/* ── Responsive ────────────────────────── */

@media (max-width: 768px) {
  .onboarding-grid {
    grid-template-columns: 1fr;
  }

  .suggestion-header {
    flex-direction: column;
    gap: 6px;
  }

  .suggestion-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .onboarding-self-pct {
    font-size: 28px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .skill-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .skill-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ═══════════════════════════════════════════
   MEDIA ATTACHMENTS & FILE UPLOADS
   ═══════════════════════════════════════════ */

.file-input-hidden {
  display: none;
}

.btn-icon {
  padding: 6px 10px;
  font-size: 16px;
  line-height: 1;
  min-width: unset;
}

.attachment-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-secondary);
}

.attachment-preview.hidden {
  display: none;
}

.attach-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attach-remove {
  background: none;
  border: none;
  color: var(--accent-red);
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
}

/* Message attachments */
.msg-attachment {
  margin-top: 8px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.msg-attachment-image img {
  max-width: 320px;
  max-height: 240px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity 0.2s;
  display: block;
}

.msg-attachment-image img:hover {
  opacity: 0.85;
}

.msg-attachment-video video {
  max-width: 320px;
  max-height: 240px;
  border-radius: var(--radius-sm);
  display: block;
}

.msg-attachment-file .file-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  transition: border-color 0.2s;
}

.msg-attachment-file .file-link:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.file-icon {
  padding: 2px 6px;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.file-name {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  cursor: pointer;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lightbox-close:hover {
  opacity: 1;
}

/* ═══════════════════════════════════════════
   COMMS LAYOUT — Split-panel chat
   ═══════════════════════════════════════════ */

.comms-layout {
  display: flex;
  flex-direction: row;
  height: calc(100vh - 160px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-secondary);
}

.channel-list {
  width: 220px;
  min-width: 220px;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  background: var(--bg-primary);
  padding: 8px 0;
}

.channel-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-left: 3px solid transparent;
}

.channel-item:hover {
  background: var(--bg-tertiary);
}

.channel-item.channel-active {
  background: var(--bg-tertiary);
  border-left-color: var(--accent);
}

.channel-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--bg-primary);
  object-fit: cover;
}

img.channel-avatar {
  background: none;
}

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

.channel-item.channel-active .channel-name {
  color: var(--accent);
  font-weight: 600;
}

.channel-unread {
  margin-left: auto;
  background: var(--accent);
  color: var(--bg-primary);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.chat-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-panel .chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  border: none;
  border-radius: 0;
}

.chat-panel .chat-messages {
  flex: 1;
  overflow-y: auto;
}

.chat-panel .chat-input-bar,
.chat-panel .venting-input-bar {
  border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
  .comms-layout {
    flex-direction: column;
    height: calc(100vh - 140px);
  }

  .channel-list {
    width: 100%;
    min-width: unset;
    max-height: 120px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 0;
  }

  .channel-item {
    flex-direction: column;
    gap: 4px;
    padding: 6px 12px;
    min-width: 70px;
    text-align: center;
    border-left: none;
    border-bottom: 3px solid transparent;
  }

  .channel-item.channel-active {
    border-left-color: transparent;
    border-bottom-color: var(--accent);
  }

  .channel-name {
    font-size: 11px;
  }

  .channel-avatar {
    width: 28px;
    height: 28px;
    min-width: 28px;
    font-size: 11px;
  }
}

/* ═══════════════════════════════════════════
   OVERSEER COMMAND POST
   ═══════════════════════════════════════════ */

.cmd-header {
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.cmd-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.cmd-greeting {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.cmd-status {
  font-size: 13px;
  color: var(--text-muted);
}

.cmd-status .cmd-attention {
  color: var(--accent-amber);
  font-weight: 600;
}

/* Alert Strip */
.alert-strip {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.alert-card {
  flex: 1;
  min-width: 140px;
  padding: 14px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.alert-card:active { transform: scale(0.98); }

.alert-card .alert-count {
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.alert-card .alert-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.3;
}

.alert-amber { background: var(--accent-amber-dim); }
.alert-amber .alert-count { color: var(--accent-amber); }
.alert-amber .alert-label { color: var(--accent-amber); }

.alert-blue { background: rgba(59,130,246,0.12); }
.alert-blue .alert-count { color: var(--accent-blue); }
.alert-blue .alert-label { color: var(--accent-blue); }

.alert-red { background: var(--accent-red-dim); }
.alert-red .alert-count { color: var(--accent-red); }
.alert-red .alert-label { color: var(--accent-red); }

.alert-purple { background: rgba(139,92,246,0.12); }
.alert-purple .alert-count { color: var(--accent-purple); }
.alert-purple .alert-label { color: var(--accent-purple); }

/* Bot Fleet */
.cmd-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.fleet-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fleet-card:hover { border-color: var(--border-hover); background: var(--bg-tertiary); }

.fleet-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.fleet-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.fleet-card-health {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.fleet-card-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.fleet-card-stats strong {
  color: var(--text-primary);
  font-weight: 700;
  margin-right: 3px;
}

/* Weekly Pulse */
.pulse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.pulse-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.pulse-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-bottom: 6px;
}

.pulse-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Latest Comms Preview */
.cmd-comms-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 28px;
}

.cmd-comms-item {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  align-items: center;
  transition: background 0.15s;
  cursor: pointer;
}

.cmd-comms-item:hover { background: var(--bg-hover); }

.cmd-comms-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 10px;
  color: var(--bg-primary);
}

.avatar-img.cmd-comms-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}

.cmd-comms-body { flex: 1; min-width: 0; }

.cmd-comms-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.cmd-comms-meta strong { color: var(--text-primary); }

.cmd-comms-text {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmd-comms-time {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   FILE VAULT
   ═══════════════════════════════════════════ */

.vault-folders {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.vault-folder-pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-muted);
  transition: all 0.15s;
}

.vault-folder-pill:hover { border-color: var(--border-hover); color: var(--text-secondary); }

.vault-folder-pill.active {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
  font-weight: 600;
}

.vault-folder-pill .folder-count {
  display: inline-block;
  margin-left: 6px;
  background: rgba(0,0,0,0.2);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
}

.vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.vault-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.15s;
}

.vault-card:hover { border-color: var(--border-hover); }

.vault-card-preview {
  height: 140px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.vault-card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vault-card-preview .vault-type-icon {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 8px 16px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
}

.vault-card-body {
  padding: 14px;
}

.vault-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vault-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.vault-card-folder {
  background: var(--accent-dim);
  color: var(--accent);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

.vault-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
}

.vault-card-footer .vault-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s;
  opacity: 0;
}

.vault-card:hover .vault-delete { opacity: 1; }
.vault-delete:hover { color: var(--accent-red); background: var(--accent-red-dim); }

/* ═══════════════════════════════════════════
   ONLINE PRESENCE BAR
   ═══════════════════════════════════════════ */

.presence-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}

.presence-bar::-webkit-scrollbar { display: none; }

.presence-user {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 52px;
  opacity: 0.4;
  transition: opacity 0.2s;
}

.presence-user.is-online {
  opacity: 1;
}

.presence-avatar-wrap {
  position: relative;
}

.presence-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  color: var(--bg-primary);
}

img.presence-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.presence-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--bg-secondary);
}

.dot-online {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.dot-offline {
  background: #334155;
}

.presence-name {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.presence-user.is-online .presence-name {
  color: var(--text-secondary);
}

/* Channel sidebar online dots */
.channel-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.channel-avatar-wrap .presence-dot {
  bottom: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  border-color: var(--bg-primary);
}

/* ═══════════════════════════════════════════
   TARGET CALENDAR
   ═══════════════════════════════════════════ */

.cal-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.cal-month-label {
  font-size: 18px;
  font-weight: 700;
  min-width: 180px;
  text-align: center;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 8px;
}

.cal-day-header {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 0;
}

.cal-cell {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  min-height: 72px;
  cursor: pointer;
  transition: all 0.15s;
}

.cal-cell:hover { border-color: var(--border-hover); background: var(--bg-tertiary); }
.cal-cell.cal-empty { background: transparent; border-color: transparent; cursor: default; }
.cal-cell.cal-empty:hover { background: transparent; border-color: transparent; }

.cal-cell.cal-today {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.cal-cell.cal-today .cal-date {
  color: var(--accent);
  font-weight: 800;
}

.cal-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.cal-dots {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.cal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-dot.cal-dot-done {
  opacity: 0.4;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.4);
}

/* Target List Items */
.target-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  transition: all 0.15s;
}

.target-item:hover { border-color: var(--border-hover); }

.target-item.target-done {
  opacity: 0.5;
}

.target-item.target-done .target-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.target-date-badge {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  border: 2px solid;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-primary);
}

.target-day {
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
}

.target-month-abbr {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

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

.target-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.target-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.target-meta {
  display: flex;
  gap: 8px;
  align-items: center;
}

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

/* ═══════════════════════════════════════════
   MARKDOWN RENDERING
   ═══════════════════════════════════════════ */

.md-h1 { font-size: 20px; font-weight: 700; color: var(--text-primary); margin: 16px 0 8px; }
.md-h2 { font-size: 17px; font-weight: 700; color: var(--text-primary); margin: 14px 0 6px; }
.md-h3 { font-size: 15px; font-weight: 700; color: var(--text-primary); margin: 12px 0 4px; }
.md-h4 { font-size: 13px; font-weight: 700; color: var(--text-secondary); margin: 10px 0 4px; text-transform: uppercase; letter-spacing: 0.5px; }

.md-hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

.md-codeblock {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
  overflow-x: auto;
  margin: 12px 0;
  white-space: pre;
}

.md-inline-code {
  background: var(--bg-tertiary);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  color: var(--accent);
}

.md-link {
  color: var(--accent-blue);
  text-decoration: none;
}
.md-link:hover { text-decoration: underline; }

.md-image {
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin: 8px 0;
  cursor: pointer;
}

.md-blockquote {
  border-left: 3px solid var(--accent);
  padding: 8px 14px;
  margin: 8px 0;
  background: var(--accent-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-style: italic;
}

.md-ul, .md-ol {
  margin: 6px 0 6px 20px;
  color: var(--text-secondary);
}

.md-ul-item, .md-ol-item {
  margin-bottom: 3px;
  line-height: 1.5;
}

.md-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  color: var(--text-secondary);
}

.md-checkbox::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-radius: 4px;
  flex-shrink: 0;
}

.md-checkbox.checked::before {
  background: var(--accent);
  border-color: var(--accent);
}

.md-checkbox.checked {
  color: var(--text-muted);
  text-decoration: line-through;
}

/* Viewable vault cards */
.vault-card-viewable { cursor: pointer; }
.vault-card-viewable:hover .vault-type-icon {
  background: var(--accent-dim);
  color: var(--accent);
}

@media (max-width: 768px) {
  .alert-strip { flex-direction: column; }
  .fleet-grid { grid-template-columns: 1fr 1fr; }
  .pulse-grid { grid-template-columns: repeat(3, 1fr); }
  .vault-grid { grid-template-columns: 1fr; }
  .presence-bar { padding: 6px 12px; gap: 12px; }
  .presence-name { display: none; }
  .cal-grid { gap: 1px; }
  .cal-cell { min-height: 48px; padding: 4px; }
  .cal-date { font-size: 11px; }
  .target-item { flex-wrap: wrap; }
}

/* Core File Cards */
.core-file-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.core-file-card:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.core-file-card.has-content {
  border-color: rgba(16, 185, 129, 0.3);
}

.core-file-card.empty {
  border-style: dashed;
  border-color: var(--border-dim);
}

.core-file-name {
  font-weight: 600;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.core-file-status {
  font-size: 11px;
  color: var(--text-secondary);
}

.core-file-card.has-content .core-file-status {
  color: #10b981;
}

.core-file-card.empty .core-file-status {
  color: var(--text-dim);
}

/* ═══════════════════════════════════════════
   ARCHITECT HQ — Full Dashboard Override
   ═══════════════════════════════════════════ */

.conductor-hq {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 28px 40px;
}

.conductor-hq.hidden {
  display: none !important;
}

/* ── HQ Toolbar (compact actions + status) ── */

.hq-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.hq-toolbar-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.hq-toolbar-stats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.hq-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  letter-spacing: 0.3px;
}

.hq-chip.green { background: var(--accent-dim); color: var(--accent); }
.hq-chip.amber { background: var(--accent-amber-dim); color: var(--accent-amber); }
.hq-chip.blue { background: rgba(59,130,246,0.12); color: var(--accent-blue); }
.hq-chip.red { background: var(--accent-red-dim); color: var(--accent-red); }
.hq-chip.muted { background: var(--bg-tertiary); color: var(--text-muted); }

/* Legacy stat cards (kept for bot view) */
.hq-stat-value.green { color: var(--accent); }
.hq-stat-value.amber { color: var(--accent-amber); }
.hq-stat-value.blue { color: var(--accent-blue); }
.hq-stat-value.red { color: var(--accent-red); }

.hq-stat-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

/* ── HQ Section Titles ──────────────────── */

.hq-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ── Fleet Strip ───────────────────────── */

.fleet-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 8px;
  scrollbar-width: none;
}

.fleet-strip::-webkit-scrollbar { display: none; }

.fleet-strip .fleet-card {
  min-width: 220px;
  max-width: 280px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fleet-strip .fleet-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-tertiary);
}

.fleet-strip .fleet-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 16px rgba(16, 185, 129, 0.1);
  background: rgba(16, 185, 129, 0.04);
}

.fleet-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.fleet-expand-btn {
  margin-top: auto;
  font-size: 11px !important;
  padding: 4px 10px !important;
  min-height: 28px !important;
}

/* ── Fleet Expanded ────────────────────── */

.fleet-expanded {
  background: var(--bg-secondary);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 28px;
  box-shadow: 0 4px 24px rgba(16, 185, 129, 0.08);
}

.fleet-expanded-header {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.fleet-expanded-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.fleet-expanded-section {
  min-width: 0;
}

.fleet-expanded-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.fleet-expanded-tasks {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 240px;
  overflow-y: auto;
}

.fleet-task-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.fleet-task-row:hover {
  background: var(--bg-hover);
}

.fleet-task-info {
  flex: 1;
  min-width: 0;
}

.fleet-task-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fleet-expanded-log {
  padding: 4px 0;
}

.fleet-log-preview {
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.fleet-log-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.fleet-log-body {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-wrap;
}

.fleet-expanded-docs {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fleet-doc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.fleet-doc-item:hover {
  background: var(--bg-hover);
}

.fleet-doc-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fleet-quick-msg {
  display: flex;
  gap: 8px;
  align-items: center;
}

.fleet-quick-msg .form-input {
  flex: 1;
  min-height: 36px;
  font-size: 13px;
}

/* ── HQ Body (Feed + Sidebar) ──────────── */

.hq-body {
  display: flex;
  gap: 28px;
  margin-bottom: 28px;
  align-items: flex-start;
}

.hq-feed {
  flex: 2;
  min-width: 0;
}

.hq-sidebar {
  flex: 1;
  min-width: 260px;
  max-width: 380px;
  position: sticky;
  top: 80px;
}

/* ── Feed Items ────────────────────────── */

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

.feed-item {
  display: flex;
  gap: 12px;
  padding: 14px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.feed-item:last-child {
  border-bottom: none;
}

.feed-item:hover {
  background: var(--bg-hover);
}

.feed-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: var(--bg-primary);
  flex-shrink: 0;
}

.avatar-img.feed-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

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

.feed-item-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.feed-item-header strong {
  color: var(--text-primary);
  font-weight: 600;
}

.feed-time {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.feed-msg-arrow {
  color: var(--accent);
  font-size: 11px;
}

.feed-msg-recipient {
  color: var(--text-secondary);
  font-weight: 500;
}

.feed-item-content {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 4px;
}

.feed-item-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.feed-item-actions {
  margin-top: 6px;
}

.feed-reply-btn {
  font-size: 11px !important;
  padding: 3px 10px !important;
  min-height: 24px !important;
}

/* Feed item type accents */
.feed-item-message {
  border-left: 3px solid var(--accent-blue);
  padding-left: 14px;
}

.feed-item-task {
  border-left: 3px solid var(--accent);
  padding-left: 14px;
}

.feed-item-approval {
  border-left: 3px solid var(--accent-amber);
  padding-left: 14px;
}

.feed-item-log {
  border-left: 3px solid var(--accent-purple);
  padding-left: 14px;
}

.feed-item-vault {
  border-left: 3px solid var(--text-muted);
  padding-left: 14px;
}

.feed-item-target {
  border-left: 3px solid var(--accent-red);
  padding-left: 14px;
}

/* ── Sidebar Sections ──────────────────── */

.sidebar-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}

.sidebar-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.15s;
  user-select: none;
}

.sidebar-section-title:hover {
  background: var(--bg-hover);
}

.sidebar-section-title.collapsed {
  border-bottom-color: transparent;
}

.sidebar-section-title::after {
  content: '\\25B2';
  font-size: 8px;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.sidebar-section-title.collapsed::after {
  transform: rotate(180deg);
}

.sidebar-count {
  background: var(--accent-amber);
  color: var(--bg-primary);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  margin-right: 8px;
}

.sidebar-section-body {
  padding: 12px 16px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  overflow: hidden;
}

.sidebar-section-body.collapsed {
  max-height: 0 !important;
  padding-top: 0;
  padding-bottom: 0;
}

/* ── Sidebar: Pending Actions ──────────── */

.sidebar-pending-group {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.sidebar-pending-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sidebar-pending-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.sidebar-approval-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(30, 41, 59, 0.5);
}

.sidebar-approval-item:last-child {
  border-bottom: none;
}

.sidebar-approval-info {
  flex: 1;
  min-width: 0;
}

.sidebar-approval-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.sidebar-approval-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11px;
}

.sidebar-approval-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.sidebar-approval-actions .btn {
  font-size: 11px !important;
  padding: 3px 8px !important;
  min-height: 24px !important;
}

.sidebar-go-comms {
  font-size: 11px !important;
  padding: 4px 10px !important;
  min-height: 28px !important;
}

.sidebar-overdue-task {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  font-size: 13px;
  color: var(--text-secondary);
}

.sidebar-overdue-task:hover {
  background: var(--bg-hover);
}

/* ── Sidebar: Projects ─────────────────── */

.sidebar-project-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.sidebar-project-card:hover {
  background: var(--bg-hover);
}

.sidebar-project-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sidebar-project-info {
  flex: 1;
  min-width: 0;
}

.sidebar-project-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.sidebar-project-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ── Sidebar: Vault ────────────────────── */

.sidebar-vault-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.sidebar-vault-item:hover {
  background: var(--bg-hover);
}

.sidebar-vault-type {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.sidebar-vault-info {
  flex: 1;
  min-width: 0;
}

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

.sidebar-vault-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Quick Access Bar ──────────────────── */

.hq-actions-bar {
  display: flex;
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  justify-content: center;
}

.hq-actions-bar .btn {
  flex: 1;
  min-width: 140px;
  max-width: 220px;
}

/* ── HQ Responsive ─────────────────────── */

@media (max-width: 1024px) {
  .hq-body {
    flex-direction: column;
  }

  .hq-sidebar {
    position: static;
    max-width: 100%;
    width: 100%;
  }

  .fleet-expanded-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .conductor-hq {
    padding: 16px;
  }

  .hq-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hq-stats-row {
    width: 100%;
  }

  .hq-stat {
    flex: 1;
    min-width: 80px;
    padding: 10px 12px;
  }

  .hq-stat-value {
    font-size: 24px;
  }

  .hq-greeting {
    font-size: 20px;
  }

  .fleet-strip .fleet-card {
    min-width: 180px;
  }

  .hq-actions-bar {
    flex-direction: column;
  }

  .hq-actions-bar .btn {
    max-width: 100%;
  }
}

/* ═══════════════════════════════════════════
   PROJECT WORKSPACE — PREMIUM EDITION
   ═══════════════════════════════════════════ */

.project-page { background: var(--bg-primary); }

.project-workspace {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* Phase nav in topnav */
.project-phase-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.project-phase-nav::-webkit-scrollbar { display: none; }

/* ── HERO BANNER ──────────────────────── */

.proj-hero {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(15,23,42,0.95) 100%);
  border: 1px solid var(--border);
  border-bottom: 3px solid var(--proj-color, var(--accent));
  border-radius: var(--radius);
  padding: 36px 40px 28px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.proj-hero::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, color-mix(in srgb, var(--proj-color, var(--accent)) 8%, transparent), transparent);
  pointer-events: none;
}

.proj-hero-inner { position: relative; z-index: 1; }

.proj-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.proj-hero-text { flex: 1; }

.proj-hero-code {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
  opacity: 0.6;
}

.proj-hero-title {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin: 0;
}

.proj-hero-team-stack {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding-top: 8px;
}

.proj-hero-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--bg-secondary);
  margin-left: -10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  color: var(--bg-primary);
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.proj-hero-avatar:first-child { margin-left: 0; }
.proj-hero-avatar:hover { transform: scale(1.1); z-index: 2; }
img.proj-hero-avatar { object-fit: cover; width: 34px; height: 34px; border-radius: 50%; }

.proj-hero-no-team {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

.proj-hero-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.proj-hero-phase {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--bg-primary);
  padding: 5px 14px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.proj-hero-phase:hover { opacity: 0.85; transform: scale(1.03); }

.proj-hero-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.proj-hero-stat {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.proj-hero-stat-val {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.proj-hero-stat-active { color: var(--accent-amber); }
.proj-hero-stat-done { color: var(--accent); }

.proj-hero-stat-lbl {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.proj-hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.proj-action-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}
.proj-action-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.proj-action-icon {
  font-size: 14px;
  font-weight: 700;
  opacity: 0.7;
}

/* ── TWO-COLUMN BODY ──────────────────── */

.proj-body {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 32px;
  align-items: start;
}

.proj-main { min-width: 0; }
.proj-sidebar { min-width: 0; }

/* ── Launch Hub Row Layout ────────────── */
.proj-row {
  display: grid;
  gap: 20px;
  margin-bottom: 24px;
}
.proj-row-brief {
  grid-template-columns: 3fr 2fr;
}
.proj-row-triple {
  grid-template-columns: 1fr 1fr 1fr;
}
.proj-col-main { min-width: 0; }
.proj-col-side { min-width: 0; }
@media (max-width: 1024px) {
  .proj-row-brief { grid-template-columns: 1fr; }
  .proj-row-triple { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .proj-row-triple { grid-template-columns: 1fr; }
}

/* ── Links & Resources Panel ─────────── */
.proj-links-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.proj-link-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  min-height: 48px;
}
.proj-link-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-tertiary);
}
.proj-link-icon {
  font-size: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: 6px;
  flex-shrink: 0;
}
.proj-link-body { flex: 1; min-width: 0; }
.proj-link-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.proj-link-domain {
  font-size: 10px;
  color: var(--accent-blue);
}
.proj-link-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}
.proj-link-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
}
.proj-link-item:hover .proj-link-delete { opacity: 1; }
.proj-link-delete:hover { color: var(--accent-red); }
.proj-empty-mini {
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Cycle Nav Label ─────────────────── */
.cycle-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-right: 4px;
}

/* ── Cycle Banner ────────────────────── */
.cycle-banner { margin-bottom: 20px; }
.cycle-banner-inner {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.cycle-banner-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cycle-color), transparent);
}
.cycle-banner-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
.cycle-banner-identity { flex: 1; }
.cycle-number {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.cycle-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 2px;
}
.cycle-phase-ring { flex-shrink: 0; }
.cycle-banner-stats {
  display: flex;
  gap: 20px;
}
.cycle-stat { text-align: center; }
.cycle-stat-val {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.cycle-stat-lbl {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}
.cycle-focus, .cycle-goals {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 8px 12px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  border-left: 3px solid var(--cycle-color);
}
.cycle-focus-label, .cycle-goals-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--cycle-color);
  text-transform: uppercase;
  margin-right: 8px;
}

/* Phase Track — visual pipeline */
.cycle-phase-track {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 16px 0;
  padding: 12px 0;
}
.cycle-phase-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}
.phase-step-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 2px solid var(--border);
  transition: all 0.3s;
}
.phase-active .phase-step-dot {
  background: var(--phase-color);
  border-color: var(--phase-color);
  box-shadow: 0 0 12px var(--phase-color);
  animation: phase-glow 2s infinite;
}
@keyframes phase-glow {
  0%, 100% { box-shadow: 0 0 8px var(--phase-color); }
  50% { box-shadow: 0 0 20px var(--phase-color); }
}
.phase-done .phase-step-dot {
  background: var(--phase-color);
  border-color: var(--phase-color);
  opacity: 0.5;
}
.phase-step-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.phase-active .phase-step-label { color: var(--text-primary); }
.phase-step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 -4px;
  margin-bottom: 20px;
}
.cycle-actions {
  display: flex;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* Cycle Empty State */
.cycle-empty { margin-bottom: 20px; }
.cycle-empty-inner {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  border-left: 3px solid var(--accent-amber);
}
.cycle-empty-text {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Cycle History */
.cycle-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cycle-history-item {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}
.cycle-history-item:hover { border-color: var(--border-hover); }
.cycle-history-num {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cycle-history-body { flex: 1; min-width: 0; }
.cycle-history-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.cycle-history-meta {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}
.cycle-history-outcomes {
  font-size: 11px;
  color: var(--accent);
  margin-top: 4px;
}
.cycle-history-lessons {
  font-size: 11px;
  color: var(--accent-amber);
  margin-top: 2px;
  font-style: italic;
}

/* ── Compact Hero Header ─────────────── */
.proj-hero-compact {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.proj-hero-id {
  display: flex;
  align-items: center;
  gap: 8px;
}
.proj-hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.proj-hero-code-text {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-muted);
}
.proj-hero-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}
.proj-hero-metrics {
  display: flex;
  gap: 10px;
  margin-left: auto;
}
.phm {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}
.phm-green { color: var(--accent); }
.proj-hero-team-row {
  display: flex;
  gap: -4px;
}
.proj-hero-mini-av {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  color: var(--bg-primary);
  margin-left: -4px;
  border: 2px solid var(--bg-secondary);
}
img.proj-hero-mini-av { width: 22px; height: 22px; border-radius: 5px; object-fit: cover; margin-left: -4px; border: 2px solid var(--bg-secondary); }
.proj-hero-mini-av:first-child, img.proj-hero-mini-av:first-child { margin-left: 0; }

/* ── Gantt Chart ─────────────────────── */
.gantt-container {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.gantt-header-row {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}
.gantt-label-header {
  width: 220px;
  flex-shrink: 0;
  padding: 8px 12px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  border-right: 1px solid var(--border);
}
.gantt-track-header {
  flex: 1;
  position: relative;
  height: 28px;
  min-width: 0;
}
.gantt-week-mark {
  position: absolute;
  top: 0;
  height: 100%;
  border-left: 1px solid var(--border);
}
.gantt-week-mark span {
  font-size: 8px;
  color: var(--text-muted);
  padding: 2px 4px;
  white-space: nowrap;
}
.gantt-today-line {
  position: absolute;
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--accent);
  z-index: 2;
  box-shadow: 0 0 6px rgba(16,185,129,0.4);
}
.gantt-body {
  max-height: 300px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.gantt-body::-webkit-scrollbar { width: 3px; }
.gantt-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Job headers */
.gantt-job-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}
.gantt-job-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
}
.gantt-job-progress {
  font-size: 9px;
  color: var(--text-muted);
}
.gantt-job-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
  max-width: 120px;
}
.gantt-job-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.5s;
}

/* Task rows */
.gantt-row {
  display: flex;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
  min-height: 36px;
}
.gantt-row:hover { background: var(--bg-tertiary); }
.gantt-row:last-child { border-bottom: none; }
.gantt-label {
  width: 220px;
  flex-shrink: 0;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-right: 1px solid var(--border);
  overflow: hidden;
}
.gantt-avatar {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 7px;
  font-weight: 700;
  color: var(--bg-primary);
}
img.gantt-avatar { width: 20px; height: 20px; border-radius: 4px; object-fit: cover; }
.gantt-task-name {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.gantt-done { text-decoration: line-through; opacity: 0.5; }
.gantt-status {
  font-size: 8px;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 3px;
  flex-shrink: 0;
  text-transform: uppercase;
}
.gantt-st-new { background: rgba(59,130,246,0.12); color: var(--accent-blue); }
.gantt-st-in-progress { background: var(--accent-dim); color: var(--accent); }
.gantt-st-done { background: rgba(16,185,129,0.12); color: var(--accent); }
.gantt-dep {
  font-size: 10px;
  color: var(--accent-amber);
  flex-shrink: 0;
}

/* Gantt track and bars */
.gantt-track {
  flex: 1;
  position: relative;
  min-height: 24px;
  display: flex;
  align-items: center;
}
.gantt-bar {
  position: absolute;
  height: 12px;
  border-radius: 3px;
  opacity: 0.85;
  transition: all 0.3s;
  min-width: 4px;
}
.gantt-bar:hover { opacity: 1; height: 16px; margin-top: -2px; }
.gantt-bar-done { opacity: 0.4; }
.gantt-bar-none {
  font-size: 9px;
  color: var(--text-muted);
  font-style: italic;
  padding-left: 8px;
}
.gantt-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
}

@media (max-width: 768px) {
  .gantt-label { width: 140px; }
  .gantt-label-header { width: 140px; }
  .proj-hero-compact { flex-direction: column; align-items: flex-start; }
  .proj-hero-metrics { margin-left: 0; flex-wrap: wrap; }
}

/* Hero action primary */
.proj-action-primary {
  background: var(--accent) !important;
  color: var(--bg-primary) !important;
  border-color: var(--accent) !important;
}

@media (max-width: 768px) {
  .cycle-banner-top { flex-direction: column; align-items: flex-start; }
  .cycle-banner-stats { gap: 12px; }
  .cycle-phase-track { flex-wrap: wrap; gap: 4px; }
  .phase-step-line { display: none; }
}

/* ── Section Headers ──────────────────── */

.proj-section {
  margin-bottom: 32px;
}

.proj-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.proj-section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.proj-section-count {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.proj-section-action {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.proj-section-action:hover {
  background: var(--accent-dim);
}

/* ── THE BRIEF ────────────────────────── */

.proj-brief {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 3px solid var(--proj-color, var(--accent));
}
.proj-brief:hover {
  border-color: var(--border-hover);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.proj-brief h1, .proj-brief .md-h1 { font-size: 24px; font-weight: 800; color: var(--text-primary); margin: 0 0 12px; }
.proj-brief h2, .proj-brief .md-h2 { font-size: 20px; font-weight: 700; color: var(--text-primary); margin: 20px 0 10px; }
.proj-brief h3, .proj-brief .md-h3 { font-size: 17px; font-weight: 700; color: var(--text-primary); margin: 16px 0 8px; }
.proj-brief strong { color: var(--text-primary); }

.proj-brief-empty {
  background: var(--bg-secondary);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.proj-brief-empty:hover {
  border-color: var(--border-hover);
  background: var(--bg-tertiary);
}

.proj-brief-empty-text {
  font-size: 15px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 14px;
  line-height: 1.6;
}

/* ── Phase Selector Modal ─────────────── */

.proj-phase-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.proj-phase-option {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.proj-phase-option:hover { border-color: var(--border-hover); color: var(--text-primary); }
.proj-phase-option.active { font-weight: 700; }

/* ── KANBAN BOARD ─────────────────────── */

.kanban-board {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.kanban-column {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  min-height: 220px;
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid;
}

.kanban-col-todo .kanban-column-header { border-color: var(--accent-blue); }
.kanban-col-progress .kanban-column-header { border-color: var(--accent-amber); }
.kanban-col-done .kanban-column-header { border-color: var(--accent); }

.kanban-column-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.kanban-col-todo .kanban-column-title { color: var(--accent-blue); }
.kanban-col-progress .kanban-column-title { color: var(--accent-amber); }
.kanban-col-done .kanban-column-title { color: var(--accent); }

.kanban-count {
  font-size: 10px;
  font-weight: 700;
  background: var(--bg-primary);
  padding: 2px 8px;
  border-radius: 10px;
  color: var(--text-muted);
}

.kanban-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kanban-empty {
  padding: 24px 12px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

.kanban-add-card {
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.kanban-add-card:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.kanban-add-card span { font-size: 15px; font-weight: 700; }

.kanban-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.kanban-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.kanban-col-done .kanban-card { opacity: 0.55; }
.kanban-col-done .kanban-card:hover { opacity: 1; }

.kanban-card-priority {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
}

.kanban-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  padding-left: 10px;
  line-height: 1.4;
}

.kanban-card-purpose {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 8px;
  padding-left: 10px;
  line-height: 1.4;
}

.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 10px;
  margin-top: 4px;
}

.kanban-card-footer-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.kanban-card-assignee {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 8px;
  color: var(--bg-primary);
  object-fit: cover;
}

img.kanban-card-assignee {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.kanban-card-due {
  font-size: 10px;
  color: var(--text-muted);
}

.kanban-card-arrows {
  display: flex;
  gap: 3px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.kanban-card:hover .kanban-card-arrows { opacity: 1; }

.kanban-arrow {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.kanban-arrow:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

/* ── TEAM PANEL ───────────────────────── */

.proj-team-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.proj-team-member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}
.proj-team-member:hover { border-color: var(--border-hover); }

.proj-team-member.active {
  border-color: rgba(16, 185, 129, 0.2);
}

.proj-team-member-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.proj-team-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 10px;
  color: var(--bg-primary);
  object-fit: cover;
}
img.proj-team-avatar { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }

.proj-team-info { min-width: 0; }

.proj-team-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.proj-team-role {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proj-team-member-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.proj-team-tasks {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

.proj-team-toggle {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.proj-team-toggle:hover { border-color: var(--border-hover); color: var(--text-primary); }
.proj-team-toggle.on {
  background: var(--accent-dim);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--accent);
}

/* ── MEDIA GALLERY ────────────────────── */

.proj-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.proj-media-empty {
  grid-column: 1 / -1;
  padding: 32px 20px;
  text-align: center;
  background: var(--bg-secondary);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.proj-empty-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.proj-empty-sub {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.media-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s ease;
  cursor: pointer;
}
.media-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.media-card-preview {
  height: 100px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.media-card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.media-card:hover .media-card-preview img {
  transform: scale(1.03);
}

.media-card-preview .media-type-badge {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 2px;
  padding: 5px 10px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
}

.media-card-info {
  padding: 8px 10px;
}

.media-card-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-card-meta {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 2px;
}

.media-add-card {
  border-style: dashed;
}
.media-add-card:hover {
  border-color: var(--accent);
}

.media-add-preview {
  background: transparent !important;
}

.media-add-icon {
  font-size: 24px;
  font-weight: 300;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.media-add-card:hover .media-add-icon { color: var(--accent); }

/* ── ACTIVITY STREAM ──────────────────── */

.proj-activity-stream {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.proj-activity-empty {
  padding: 24px 16px;
  text-align: center;
}

.proj-activity-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
  transition: background 0.15s;
}
.proj-activity-item:last-of-type { border-bottom: none; }

.proj-activity-avatar {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 9px;
  color: var(--bg-primary);
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.proj-activity-avatar:hover { transform: scale(1.1); }
img.proj-activity-avatar { object-fit: cover; width: 26px; height: 26px; border-radius: 6px; }

.proj-activity-body { flex: 1; min-width: 0; }

.proj-activity-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.proj-activity-meta strong { color: var(--text-primary); font-weight: 600; }

.proj-activity-time {
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.7;
}

.proj-activity-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.proj-thread-input {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.proj-thread-input .form-input {
  flex: 1;
  font-size: 13px;
}

.proj-thread-send {
  background: var(--accent);
  color: var(--bg-primary);
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.proj-thread-send:hover { opacity: 0.85; }

/* ── DAILY LOG STRIP ──────────────────── */

.proj-log-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.proj-log-date {
  font-size: 13px;
  font-weight: 600;
  min-width: 80px;
  text-align: center;
  color: var(--text-secondary);
}

.proj-log-nav-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.proj-log-nav-btn:hover:not(:disabled) { border-color: var(--border-hover); color: var(--text-primary); }
.proj-log-nav-btn:disabled { opacity: 0.3; cursor: default; }

.proj-log-today-btn {
  width: auto;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 600;
}

.proj-log-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.proj-log-strip::-webkit-scrollbar { display: none; }

.proj-log-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}
.proj-log-card:hover { border-color: var(--border-hover); }

.proj-log-card.proj-log-done {
  border-color: rgba(16, 185, 129, 0.25);
}

.proj-log-card.proj-log-missing {
  border-style: dashed;
  border-color: var(--accent-amber);
  background: var(--accent-amber-dim);
}

.proj-log-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 10px;
  color: var(--bg-primary);
  object-fit: cover;
}
img.proj-log-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.proj-log-avatar-dim { opacity: 0.5; }

.proj-log-info { min-width: 0; }

.proj-log-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.proj-log-status {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.proj-log-status-done { color: var(--accent); }
.proj-log-status-missing { color: var(--accent-amber); }

.proj-log-empty {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  padding: 16px;
  text-align: center;
  width: 100%;
}

/* ── RESPONSIVE ───────────────────────── */

@media (max-width: 1024px) {
  .proj-body { grid-template-columns: 1fr; gap: 24px; }
  .kanban-board { grid-template-columns: 1fr; }
  .proj-hero { padding: 24px; }
  .proj-hero-title { font-size: 28px; }
}

@media (max-width: 768px) {
  .project-workspace { padding: 0 12px 24px; }
  .proj-hero { padding: 20px; }
  .proj-hero-top { flex-direction: column; }
  .proj-hero-title { font-size: 24px; }
  .proj-hero-meta { gap: 12px; }
  .proj-hero-stat-val { font-size: 18px; }
  .proj-hero-actions { flex-wrap: wrap; }
  .proj-action-btn { font-size: 11px; padding: 6px 12px; }
  .proj-brief { padding: 20px; font-size: 14px; }
  .proj-media-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

/* ═══════════════════════════════════════════
   QUARTET FLEET VIEW
   ═══════════════════════════════════════════ */

.fleet-view {
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px;
}

.fleet-view-controls {
  display: flex;
  gap: 6px;
  flex: 1;
  justify-content: flex-end;
  margin-right: 12px;
}

/* Bot header row */
.fleet-header-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.fleet-bot-header {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  transition: all 0.15s;
  cursor: pointer;
}

.fleet-bot-header:hover {
  border-color: var(--border-hover);
  background: var(--bg-tertiary);
}

.fleet-bot-header-avatar {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: var(--bg-primary);
  position: relative;
}

img.fleet-bot-header-avatar {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  margin: 0 auto 10px;
  display: block;
}

.fleet-bot-header .fleet-online-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid var(--bg-secondary);
}

.fleet-bot-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.fleet-bot-role {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.fleet-bot-health {
  font-size: 10px;
  color: var(--text-muted);
}

/* Section rows */
.fleet-section {
  margin-bottom: 4px;
}

.fleet-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.fleet-section-header:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

.fleet-section-arrow {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s;
  width: 16px;
}

.fleet-section-arrow.expanded {
  transform: rotate(90deg);
}

.fleet-section-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-secondary);
  flex: 1;
}

.fleet-section-badge {
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg-primary);
  padding: 2px 8px;
  border-radius: 10px;
}

.fleet-section-body {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 14px 0;
}

.fleet-section-body.collapsed {
  display: none;
}

/* Individual bot column content */
.fleet-col {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  min-height: 80px;
}

.fleet-col-empty {
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
  text-align: center;
  padding: 20px 8px;
}

/* Task items in fleet */
.fleet-task-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 4px;
  padding-left: 4px;
}

.fleet-task-item:last-child { border-bottom: none; }
.fleet-task-item:hover { background: var(--bg-hover); }

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

.fleet-task-title {
  font-size: 12px;
  color: var(--text-primary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fleet-task-status {
  font-size: 9px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.fleet-show-all {
  font-size: 11px;
  color: var(--accent);
  cursor: pointer;
  text-align: center;
  padding: 6px 0;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.fleet-show-all:hover { text-decoration: underline; }

/* Log preview in fleet */
.fleet-log-date {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.fleet-log-body {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fleet-log-fields {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.fleet-log-fields strong {
  color: var(--text-secondary);
}

/* Doc items in fleet */
.fleet-doc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 4px;
  padding-left: 4px;
}

.fleet-doc-item:last-child { border-bottom: none; }
.fleet-doc-item:hover { background: var(--bg-hover); }

.fleet-doc-cat {
  font-size: 8px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.fleet-doc-title {
  font-size: 12px;
  color: var(--text-primary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Message items in fleet */
.fleet-msg-item {
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.fleet-msg-item:last-child { border-bottom: none; }

.fleet-msg-meta {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.fleet-msg-meta strong { color: var(--text-secondary); }

.fleet-msg-text {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Activity items in fleet */
.fleet-activity-item {
  font-size: 11px;
  color: var(--text-muted);
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.4;
}
.fleet-activity-item:last-child { border-bottom: none; }
.fleet-activity-item strong { color: var(--text-secondary); }

.fleet-activity-time {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Count badge in column headers */
.fleet-col-count {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}

@media (max-width: 1024px) {
  .fleet-header-row { grid-template-columns: repeat(2, 1fr); }
  .fleet-section-body { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .fleet-header-row { grid-template-columns: 1fr; }
  .fleet-section-body { grid-template-columns: 1fr; }
  .fleet-view { padding: 12px; }
}

/* ═══════════════════════════════════════════
   SHARED KNOWLEDGE NEST & DAILY LOGS
   ═══════════════════════════════════════════ */

.knowledge-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.knowledge-bot-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.knowledge-bot-section { margin-bottom: 24px; }

.knowledge-bot-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.knowledge-bot-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 10px;
  color: var(--bg-primary);
  flex-shrink: 0;
}

img.knowledge-bot-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}

.knowledge-bot-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.knowledge-doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.knowledge-doc-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.knowledge-doc-card:hover { border-color: var(--border-hover); background: var(--bg-tertiary); }

.knowledge-doc-cat {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.knowledge-doc-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.knowledge-doc-meta {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Knowledge Nest: Category-first layout ── */
.nest-category { margin-bottom: 24px; }

.nest-category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 3px solid;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.nest-category-icon { font-size: 16px; }
.nest-category-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }

.nest-bot-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.nest-bot-col {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  min-height: 60px;
}

.nest-bot-col-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.nest-bot-col-avatar {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 8px;
  color: var(--bg-primary);
  flex-shrink: 0;
}
img.nest-bot-col-avatar { width: 22px; height: 22px; border-radius: 5px; object-fit: cover; }

.nest-empty {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  padding: 8px 0;
}

.nest-doc-item {
  padding: 6px 4px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s;
}
.nest-doc-item:last-child { border-bottom: none; }
.nest-doc-item:hover { background: var(--bg-hover); }

.nest-doc-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.nest-doc-updated {
  font-size: 10px;
  color: var(--text-muted);
}

.nest-doc-viewer-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.shared-log-bot-section { margin-bottom: 20px; }

.shared-log-bot-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.shared-log-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 8px;
}

.shared-log-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.shared-log-body {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
  white-space: pre-wrap;
}

.shared-log-field {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 3px;
}

.shared-log-field strong { color: var(--text-secondary); }

.shared-log-gaps-section {
  margin-top: 20px;
  padding: 16px;
  background: var(--accent-amber-dim);
  border: 1px dashed var(--accent-amber);
  border-radius: var(--radius);
}

.shared-log-gap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

/* ═══════════════════════════════════════════
   THE CONDUCTOR'S PODIUM
   ═══════════════════════════════════════════ */

.conductor-hq { max-width: 1400px; margin: 0 auto; padding: 16px 20px; }
.conductor-hq.hidden { display: none; }

/* Toolbar */
.podium-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; margin-bottom: 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 8px; }
.pod-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.pod-action-btn { background: var(--bg-tertiary); border: 1px solid var(--border); color: var(--text-muted); font-size: 10px; font-weight: 700; letter-spacing: 1px; padding: 6px 12px; border-radius: 6px; cursor: pointer; transition: all 0.15s; text-transform: uppercase; }
.pod-action-btn:hover { border-color: var(--border-hover); color: var(--text-primary); }
.pod-action-btn.pod-primary { background: var(--accent); color: var(--bg-primary); border-color: var(--accent); }

/* The Call — Conductor's call to arms */
.the-call-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #1e293b, #0f172a);
  border: 1.5px solid rgba(239, 68, 68, 0.4);
  color: rgba(239, 68, 68, 0.7);
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.1), inset 0 0 8px rgba(0,0,0,0.5);
  flex-shrink: 0;
}
.the-call-btn:hover {
  border-color: rgba(239, 68, 68, 0.8);
  color: #ef4444;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.3), inset 0 0 8px rgba(0,0,0,0.5);
  transform: scale(1.08);
}
.the-call-active {
  animation: the-call-pulse 1s ease-in-out infinite;
  background: radial-gradient(circle at 50% 50%, #7f1d1d, #0f172a);
  border-color: #ef4444;
  color: #fff;
  box-shadow: 0 0 40px rgba(239, 68, 68, 0.5), inset 0 0 12px rgba(239, 68, 68, 0.2);
}
@keyframes the-call-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.4), inset 0 0 12px rgba(239, 68, 68, 0.1); }
  50% { box-shadow: 0 0 50px rgba(239, 68, 68, 0.7), inset 0 0 20px rgba(239, 68, 68, 0.3); }
}
.pod-status-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pod-chip { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 12px; }
.pod-chip-green { background: var(--accent-dim); color: var(--accent); }
.pod-chip-amber { background: var(--accent-amber-dim); color: var(--accent-amber); }
.pod-chip-blue { background: rgba(59,130,246,0.12); color: var(--accent-blue); }
.pod-chip-red { background: var(--accent-red-dim); color: var(--accent-red); }
.pod-chip-muted { background: var(--bg-tertiary); color: var(--text-muted); }

/* Quartet Strip */
.podium-quartet { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 24px; }
.pod-bot { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; cursor: pointer; transition: all 0.15s; position: relative; overflow: hidden; }
.pod-bot:hover { border-color: var(--border-hover); background: var(--bg-tertiary); }
.pod-bot-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pod-bot-avatar-wrap { position: relative; flex-shrink: 0; }
.pod-bot-avatar { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: var(--bg-primary); }
img.pod-bot-avatar { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }
.pod-bot-online { position: absolute; bottom: -2px; right: -2px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--bg-secondary); }
.pod-bot-online.online { background: var(--accent); animation: pod-pulse 2s infinite; }
.pod-bot-online.offline { background: #334155; }
@keyframes pod-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); } 50% { box-shadow: 0 0 0 4px rgba(16,185,129,0); } }
.pod-bot-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.pod-bot-focus { font-size: 11px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.pod-bot-focus-empty { color: var(--text-muted); font-style: italic; }
.pod-bot-stats { font-size: 10px; color: var(--text-muted); }
.pod-bot-accent { position: absolute; top: 0; left: 0; right: 0; height: 2px; }
.pod-project-nav { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.pod-project-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--bg-secondary); border: 1px solid var(--border); border-left: 3px solid; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; color: var(--text-secondary); text-decoration: none; transition: all 0.15s; }
.pod-project-link:hover { border-color: var(--border-hover); background: var(--bg-tertiary); color: var(--text-primary); }

/* Section Headers */
.podium-section { margin-bottom: 28px; }
.pod-section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 11px; font-weight: 700; letter-spacing: 3px; color: var(--text-muted); text-transform: uppercase; }
.pod-section-header::before, .pod-section-header::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.pod-pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pod-pulse 2s infinite; }

/* Feed Items */
.pod-feed { display: flex; flex-direction: column; gap: 6px; }
.pod-feed-item { display: flex; gap: 10px; padding: 10px 12px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm); align-items: flex-start; transition: all 0.15s; border-left: 3px solid transparent; }
.pod-feed-item:hover { border-color: var(--border-hover); }
.pod-feed-msg { border-left-color: var(--accent-blue); }
.pod-feed-task { border-left-color: var(--accent); }
.pod-feed-approval { border-left-color: var(--accent-amber); }
.pod-feed-vault { border-left-color: var(--accent-purple); }
.pod-feed-avatar { width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 10px; color: var(--bg-primary); }
img.pod-feed-avatar { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.pod-feed-body { flex: 1; min-width: 0; }
.pod-feed-header { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-muted); margin-bottom: 3px; flex-wrap: wrap; }
.pod-feed-header strong { color: var(--text-primary); }
.pod-feed-content { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.pod-feed-action { background: none; border: 1px solid var(--border); color: var(--text-muted); font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 4px; cursor: pointer; transition: all 0.15s; flex-shrink: 0; align-self: center; text-transform: uppercase; letter-spacing: 0.5px; }
.pod-feed-action:hover { border-color: var(--accent); color: var(--accent); }
.pod-reply-box { display: flex; gap: 6px; padding: 8px 0 0; margin-top: 6px; border-top: 1px solid var(--border); }
.pod-reply-box input { flex: 1; background: var(--bg-primary); border: 1px solid var(--border); color: var(--text-primary); padding: 6px 10px; border-radius: 6px; font-size: 12px; }
.pod-reply-box input:focus { border-color: var(--accent); outline: none; }
.pod-reply-box button { background: var(--accent); color: var(--bg-primary); border: none; padding: 6px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; cursor: pointer; }
.pod-approval-actions { display: flex; gap: 4px; margin-top: 6px; }
.pod-approve-btn, .pod-deny-btn { font-size: 10px; font-weight: 700; padding: 4px 10px; border-radius: 4px; cursor: pointer; border: none; text-transform: uppercase; letter-spacing: 0.5px; }
.pod-approve-btn { background: var(--accent-dim); color: var(--accent); }
.pod-approve-btn:hover { background: var(--accent); color: var(--bg-primary); }
.pod-deny-btn { background: var(--accent-red-dim); color: var(--accent-red); }
.pod-deny-btn:hover { background: var(--accent-red); color: #fff; }

/* Today */
.pod-today-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pod-today-col { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.pod-today-bot { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.pod-today-bot-name { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.pod-today-log { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.pod-today-missing { font-size: 12px; color: var(--accent-amber); font-style: italic; text-align: center; padding: 16px 0; }
.pod-today-field { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.pod-today-field strong { color: var(--text-secondary); }

/* Ahead */
.pod-ahead-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pod-ahead-title { font-size: 10px; font-weight: 700; letter-spacing: 1.5px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 10px; }
.pod-target-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.pod-target-item:last-child { border-bottom: none; }
.pod-target-date { font-size: 11px; font-weight: 700; color: var(--text-primary); min-width: 50px; }
.pod-target-title { font-size: 13px; color: var(--text-secondary); flex: 1; }
.pod-target-done { opacity: 0.4; }
.pod-target-done .pod-target-title { text-decoration: line-through; }
.pod-due-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.pod-due-item:last-child { border-bottom: none; }
.pod-due-days { font-size: 11px; font-weight: 700; min-width: 45px; text-align: center; padding: 2px 6px; border-radius: 4px; }
.pod-due-overdue { background: var(--accent-red-dim); color: var(--accent-red); }
.pod-due-soon { background: var(--accent-amber-dim); color: var(--accent-amber); }
.pod-due-ok { background: var(--bg-tertiary); color: var(--text-muted); }
.pod-due-title { font-size: 13px; color: var(--text-secondary); flex: 1; }

/* Record */
.pod-record-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.pod-record-table th { text-align: center; padding: 8px 12px; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.pod-record-table td { text-align: center; padding: 8px 12px; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
.pod-record-table td:first-child { text-align: left; color: var(--text-muted); font-weight: 600; }
.pod-record-value { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-primary); }

/* Bot Panel */
.bot-panel-overlay { position: fixed; inset: 0; z-index: 500; background: rgba(0,0,0,0.5); opacity: 0; transition: opacity 0.2s; }
.bot-panel-overlay.active { opacity: 1; }
.bot-panel-overlay.hidden { display: none; }
.bot-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 90vw; background: var(--bg-secondary); border-left: 1px solid var(--border); transform: translateX(100%); transition: transform 0.25s ease; overflow-y: auto; z-index: 501; }
.bot-panel-overlay.active .bot-panel { transform: translateX(0); }
.bot-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg-secondary); z-index: 1; }
.bot-panel-close { background: none; border: none; color: var(--text-muted); font-size: 22px; cursor: pointer; padding: 4px 8px; }
.bot-panel-close:hover { color: var(--text-primary); }
.bot-panel-content { padding: 20px; }
.bot-panel-identity { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.bot-panel-avatar { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; color: var(--bg-primary); }
img.bot-panel-avatar { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; }
.bot-panel-name { font-size: 18px; font-weight: 700; }
.bot-panel-role { font-size: 12px; color: var(--text-muted); }
.bot-panel-section { margin-bottom: 20px; }
.bot-panel-section-title { font-size: 10px; font-weight: 700; letter-spacing: 1.5px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.bot-panel-task { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 12px; color: var(--text-secondary); border-radius: 4px; }
.bot-panel-task:last-child { border-bottom: none; }
.bot-panel-task:hover { background: var(--bg-hover); color: var(--accent); }
.bot-panel-doc { padding: 6px 4px; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 12px; color: var(--text-secondary); border-radius: 4px; }
.bot-panel-doc:last-child { border-bottom: none; }
.bot-panel-doc:hover { background: var(--bg-hover); color: var(--accent); }
.bot-panel-log { font-size: 12px; color: var(--text-secondary); line-height: 1.5; background: var(--bg-primary); padding: 12px; border-radius: var(--radius-sm); }
.bot-panel-msg-input { display: flex; gap: 6px; margin-top: 12px; }
.bot-panel-msg-input input { flex: 1; background: var(--bg-primary); border: 1px solid var(--border); color: var(--text-primary); padding: 8px 12px; border-radius: 6px; font-size: 13px; }
.bot-panel-msg-input input:focus { border-color: var(--accent); outline: none; }
.bot-panel-msg-input button { background: var(--accent); color: var(--bg-primary); border: none; padding: 8px 14px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; }

/* Fleet Health Widget — v1 styles (overridden by v2 below) */

.fh-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.fh-score {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.fh-score-num {
  font-size: 32px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.fh-score-pct {
  font-size: 14px;
  font-weight: 600;
}

.fh-bots {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.fh-bot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 160px;
  padding: 8px 10px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
}

.fh-bot-status { font-size: 16px; flex-shrink: 0; }

.fh-bot-info { flex: 1; min-width: 0; }

.fh-bot-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.fh-bot-meta {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.4;
}

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

.fh-alerts { }

.fh-alert {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}

.fh-alert-warning {
  background: var(--accent-amber-dim);
  color: var(--accent-amber);
}

.fh-alert-critical {
  background: var(--accent-red-dim);
  color: var(--accent-red);
}

.fh-all-clear {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

.fh-history-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.fh-history {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.fh-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 600;
}

.fh-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

@media (max-width: 1024px) {
  .podium-quartet { grid-template-columns: repeat(2, 1fr); }
  .pod-today-grid { grid-template-columns: repeat(2, 1fr); }
  .pod-ahead-grid { grid-template-columns: 1fr; }
  .fh-bots { flex-direction: column; }
}
@media (max-width: 768px) {
  .podium-quartet { grid-template-columns: 1fr; }
  .pod-today-grid { grid-template-columns: 1fr; }
  .podium-toolbar { flex-direction: column; }
  .conductor-hq { padding: 12px; }
  .bot-panel { width: 100%; }
}

/* ════════════════════════════════════════════════
   CONDUCTOR'S DECK v2 — New styles
   ════════════════════════════════════════════════ */

/* ── Tab Badges ─────────────────────────────── */
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--accent-red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  margin-left: 4px;
  vertical-align: middle;
}
.tab-badge.hidden { display: none; }
.tab-badge-pulse {
  animation: badge-pulse 0.5s ease-out;
}
@keyframes badge-pulse {
  0% { transform: scale(1.4); }
  50% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* ── Cmd+K Trigger Button ───────────────────── */
.cmd-k-trigger {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  letter-spacing: 0.5px;
}
.cmd-k-trigger:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── SVG Gauge ──────────────────────────────── */
.gauge-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gauge-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  line-height: 1;
}
.gauge-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
}
.gauge-unit {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 1px;
}
.gauge-ring {
  animation: gauge-fill 1s ease-out forwards;
  stroke-dashoffset: var(--circumference) !important;
}
@keyframes gauge-fill {
  to { stroke-dashoffset: var(--target-offset); }
}

/* ── Progress Ring ──────────────────────────── */
.progress-ring-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.progress-ring-label {
  position: absolute;
  font-size: 8px;
  font-weight: 700;
}
.progress-ring-circle {
  transition: stroke-dashoffset 0.6s ease-out;
}

/* ── Sparkline ──────────────────────────────── */
.sparkline-chart { flex-shrink: 0; }
.sparkline-path { transition: d 0.3s; }
.sparkline-dot { animation: sparkle-dot 2s infinite; }
@keyframes sparkle-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ── Stacked Bar ────────────────────────────── */
.stacked-bar {
  display: flex;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-tertiary);
}
.stacked-segment {
  height: 100%;
  transition: width 0.5s ease-out;
  min-width: 2px;
}

/* ── Quartet Bot Cards — Enhanced ───────────── */
.pod-bot { position: relative; }
.pod-bot-ring {
  position: absolute;
  top: 8px;
  left: 8px;
  opacity: 0.7;
}
.pod-bot-info { flex: 1; min-width: 0; }
.pod-bot-spark { flex-shrink: 0; margin-left: auto; opacity: 0.8; }
.pod-streak {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 8px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 6px;
  margin-left: 6px;
  letter-spacing: 0.3px;
}
.pod-bot-health-bar {
  height: 2px;
  background: var(--bg-tertiary);
  border-radius: 1px;
  margin-top: 8px;
  overflow: hidden;
}
.pod-bot-health-fill {
  height: 100%;
  border-radius: 1px;
  transition: width 0.8s ease-out;
}

/* ── Fleet Health — Compact Strip ────────────── */
.fhs-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.fhs-strip::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-blue), var(--accent-purple, #8b5cf6));
  opacity: 0.6;
}
.fhs-score-wrap { text-align: center; flex-shrink: 0; }
.fhs-score {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
}
.fhs-pct { font-size: 12px; font-weight: 600; opacity: 0.6; }
.fhs-label {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}
.fhs-bots {
  display: flex;
  gap: 10px;
  flex: 1;
}
.fhs-bot {
  position: relative;
  cursor: pointer;
  transition: transform 0.15s;
}
.fhs-bot:hover { transform: scale(1.1); }
.fhs-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--bg-primary);
}
img.fhs-avatar { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.fhs-pip {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid var(--bg-secondary);
}
.fhs-trend { flex-shrink: 0; opacity: 0.7; }
.fhs-alert-badge {
  background: var(--accent-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: alert-glow 2s infinite;
}
@keyframes alert-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}
.fhs-expand {
  color: var(--text-muted);
  font-size: 16px;
  text-decoration: none;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.15s;
  flex-shrink: 0;
}
.fhs-expand:hover { border-color: var(--accent); color: var(--accent); }

/* ── Targets Widget ─────────────────────────── */
.tw-strip {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
}
.tw-strip::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-amber), var(--accent-red));
  opacity: 0.5;
}
.tw-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
}
.tw-empty-text { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.tw-empty .tw-add-btn { width: auto; padding: 0 10px; white-space: nowrap; font-size: 11px; }
.tw-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.tw-icon {
  font-size: 14px;
  color: var(--accent-amber);
}
.tw-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.tw-count {
  font-size: 10px;
  color: var(--text-muted);
  margin-left: auto;
}
.tw-add-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.tw-add-btn:hover { border-color: var(--accent); color: var(--accent); }
.tw-expand-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.tw-expand-btn:hover { border-color: var(--accent); color: var(--accent); }
.tw-items {
  display: flex;
  overflow-x: auto;
  gap: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tw-items::-webkit-scrollbar { display: none; }
.tw-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  min-width: 160px;
  max-width: 220px;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.12s;
  border-right: 1px solid var(--border);
  min-height: 48px;
}
.tw-item:last-child { border-right: none; }
.tw-item:hover { background: var(--bg-tertiary); }
.tw-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tw-content { flex: 1; min-width: 0; }
.tw-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tw-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.tw-due {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
}
.tw-proj { font-size: 9px; font-weight: 600; }
.tw-overdue .tw-due { background: var(--accent-red-dim); color: var(--accent-red); }
.tw-overdue { background: rgba(239, 68, 68, 0.03); }
.tw-today .tw-due {
  background: var(--accent-amber-dim);
  color: var(--accent-amber);
  animation: countdown-pulse 2s infinite;
}
.tw-soon .tw-due { background: var(--accent-amber-dim); color: var(--accent-amber); }
.tw-ok .tw-due { background: var(--bg-tertiary); color: var(--text-muted); }

/* ── Mini Calendar (Target Date Picker) ──── */
.mc-wrap {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 8px;
}
.mc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.mc-month {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.mc-nav {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.mc-nav:hover { border-color: var(--accent); color: var(--accent); }
.mc-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.mc-day-name {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  padding: 4px 0;
  text-transform: uppercase;
}
.mc-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  font-size: 12px;
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s;
  font-weight: 500;
  -webkit-tap-highlight-color: transparent;
}
.mc-cell:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.mc-empty { cursor: default; }
.mc-empty:hover { background: none; }
.mc-today {
  color: var(--accent);
  font-weight: 700;
  position: relative;
}
.mc-today::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}
.mc-selected {
  background: var(--accent) !important;
  color: var(--bg-primary) !important;
  font-weight: 700;
}
.mc-selected::after { display: none; }
.mc-selected-display {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  text-align: center;
}

/* ── Mission Control Matrix ─────────────────── */
.mx-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  min-height: 340px;
}
.mx-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s;
}
.mx-panel:hover { border-color: var(--border-hover); }
.mx-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}
.mx-panel-msgs::before { background: var(--accent-blue); }
.mx-panel-tasks::before { background: var(--accent); }
.mx-panel-approvals::before { background: var(--accent-amber); }
.mx-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.mx-panel-icon {
  font-size: 14px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.mx-icon-blue { background: rgba(59,130,246,0.12); color: var(--accent-blue); }
.mx-icon-green { background: var(--accent-dim); color: var(--accent); }
.mx-icon-amber { background: var(--accent-amber-dim); color: var(--accent-amber); }
.mx-panel-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.mx-panel-count {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 8px;
  margin-left: auto;
}
.mx-count-blue { background: rgba(59,130,246,0.15); color: var(--accent-blue); }
.mx-count-green { background: var(--accent-dim); color: var(--accent); }
.mx-count-amber { background: var(--accent-amber-dim); color: var(--accent-amber); }
.mx-count-red { background: var(--accent-red-dim); color: var(--accent-red); margin-left: 4px; }
.mx-panel-body {
  flex: 1;
  padding: 6px 0;
}
.mx-scroll {
  overflow-y: auto;
  max-height: 380px;
  -webkit-overflow-scrolling: touch;
}
.mx-scroll::-webkit-scrollbar { width: 3px; }
.mx-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.mx-panel-footer {
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  text-transform: uppercase;
  letter-spacing: 1px;
  flex-shrink: 0;
}
.mx-panel-footer:hover { background: var(--bg-tertiary); color: var(--accent); }

/* Matrix items */
.mx-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 14px;
  transition: background 0.12s;
  cursor: pointer;
  min-height: 44px; /* iPad touch target */
}
.mx-item:hover { background: var(--bg-tertiary); }
.mx-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 10px;
  color: var(--bg-primary);
}
img.mx-avatar { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.mx-avatar-sm {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 8px;
  color: var(--bg-primary);
}
img.mx-avatar-sm { width: 22px; height: 22px; border-radius: 5px; object-fit: cover; }
.mx-body { flex: 1; min-width: 0; }
.mx-text {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mx-text-sm {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.mx-meta {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.mx-meta strong { color: var(--text-primary); }
.mx-time { margin-left: auto; }
.mx-arrow { color: var(--text-muted); font-size: 10px; }
.mx-desc {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  font-style: italic;
}
.mx-proj { font-weight: 600; }
.mx-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
}

/* Group labels */
.mx-group-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 8px 14px 4px;
  border-top: 1px solid var(--border);
}
.mx-group-label:first-child { border-top: none; }
.mx-label-red { color: var(--accent-red); }
.mx-label-green { color: var(--accent); }
.mx-label-blue { color: var(--accent-blue); }
.mx-label-amber { color: var(--accent-amber); }
.mx-label-muted { color: var(--text-muted); opacity: 0.6; }

/* Task items */
.mx-task { align-items: center; }
.mx-task-priority {
  width: 4px;
  height: 28px;
  border-radius: 2px;
  flex-shrink: 0;
}
.mx-pri-critical { background: var(--accent-red); box-shadow: 0 0 6px rgba(239,68,68,0.3); }
.mx-pri-high { background: var(--accent-amber); }
.mx-pri-normal { background: var(--accent-blue); opacity: 0.5; }
.mx-pri-low { background: var(--text-muted); opacity: 0.3; }
.mx-task-overdue { background: rgba(239, 68, 68, 0.04); }
.mx-task-done { opacity: 0.5; }
.mx-task-done .mx-text { text-decoration: line-through; }
.mx-task-check {
  color: var(--accent);
  font-size: 14px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

/* Approval items */
.mx-approval-pending {
  border-left: 3px solid var(--accent-amber);
  background: rgba(245, 158, 11, 0.03);
}
.mx-approval-btns {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}
.mx-approve, .mx-deny {
  width: 32px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  background: var(--bg-primary);
}
.mx-approve { color: var(--accent); }
.mx-approve:hover { background: var(--accent); color: var(--bg-primary); border-color: var(--accent); }
.mx-deny { color: var(--accent-red); }
.mx-deny:hover { background: var(--accent-red); color: #fff; border-color: var(--accent-red); }
.mx-resolved-icon { font-size: 14px; flex-shrink: 0; width: 22px; text-align: center; }
.mx-approval-resolved { opacity: 0.5; }

/* Activity items */
.mx-activity { min-height: 36px; }
.mx-action-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: center;
  transition: all 0.15s;
}
.mx-action-btn:hover { border-color: var(--accent-blue); color: var(--accent-blue); }

/* ── Ambient & Life Animations ──────────────── */
.conductor-hq {
  animation: deck-fadein 0.4s ease-out;
}
@keyframes deck-fadein {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.mx-panel {
  animation: panel-rise 0.5s ease-out both;
}
.mx-panel:nth-child(1) { animation-delay: 0.05s; }
.mx-panel:nth-child(2) { animation-delay: 0.1s; }
.mx-panel:nth-child(3) { animation-delay: 0.15s; }
@keyframes panel-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.pod-bot {
  animation: card-rise 0.4s ease-out both;
}
.pod-bot:nth-child(1) { animation-delay: 0s; }
.pod-bot:nth-child(2) { animation-delay: 0.05s; }
.pod-bot:nth-child(3) { animation-delay: 0.1s; }
.pod-bot:nth-child(4) { animation-delay: 0.15s; }
@keyframes card-rise {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Subtle gradient border glow on panels */
.mx-panel-msgs:hover { box-shadow: 0 0 20px rgba(59, 130, 246, 0.06); }
.mx-panel-tasks:hover { box-shadow: 0 0 20px rgba(16, 185, 129, 0.06); }
.mx-panel-approvals:hover { box-shadow: 0 0 20px rgba(245, 158, 11, 0.06); }

/* ── iPad Optimizations ─────────────────────── */
@media (min-width: 768px) and (max-width: 1199px) {
  .mx-grid { grid-template-columns: 1fr 1fr; }
  .mx-panel-approvals { grid-column: 1 / -1; }
  .mx-panel-body { max-height: 300px; }
  .mx-item { padding: 10px 14px; min-height: 48px; }
  .mx-approve, .mx-deny { width: 40px; height: 36px; font-size: 16px; }
  .mx-action-btn { width: 36px; height: 36px; }
  .pod-bot { padding: 16px; }
  .pod-action-btn { padding: 10px 16px; font-size: 11px; }
  .podium-quartet { gap: 12px; }
  .fhs-strip { padding: 12px 20px; gap: 20px; }
  .fhs-avatar, img.fhs-avatar { width: 36px; height: 36px; }
  .fhs-score { font-size: 32px; }
  .pod-nudge-btn { padding: 8px 16px; font-size: 11px; }
  .nav-tab { padding: 8px 10px; font-size: 11px; }
  .topnav { padding: 0 12px; gap: 8px; }
  .topnav .brand { font-size: 12px; letter-spacing: 2px; margin-right: 4px; }
  .nav-user { gap: 6px; }
  .user-name { display: none; }
  .btn-logout { font-size: 10px; padding: 4px 8px; }
  .cmd-k-trigger { display: none; }
}

/* ── NOW Feed — Enhanced ────────────────────── */
.pod-feed-filters {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}
.pod-feed-filter {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pod-feed-filter:hover { border-color: var(--border-hover); color: var(--text-primary); }
.pod-feed-filter.active {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}
.pod-feed-faded { opacity: 0.5; }
.pod-feed-faded:hover { opacity: 0.8; }
.pod-feed-arrow { color: var(--text-muted); font-size: 10px; }

/* ── TODAY — Enhanced ───────────────────────── */
.pod-today-col {
  transition: all 0.2s;
}
.pod-today-needs-help {
  border-color: var(--accent-amber) !important;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.15);
}
.pod-today-ring { flex-shrink: 0; }
.pod-today-score {
  font-size: 10px;
  font-weight: 700;
  margin-left: auto;
}
.pod-today-log-entry { margin-bottom: 8px; }
.pod-today-done { color: var(--accent); }
.pod-today-next { color: var(--text-secondary); }
.pod-today-help {
  color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.08);
  padding: 4px 6px;
  border-radius: 4px;
  margin-top: 4px;
}
.pod-field-icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  margin-right: 4px;
}
.pod-nudge-btn {
  background: var(--accent-amber-dim);
  color: var(--accent-amber);
  border: 1px solid var(--accent-amber);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
}
.pod-nudge-btn:hover {
  background: var(--accent-amber);
  color: var(--bg-primary);
}
.pod-nudge-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.pod-today-missing {
  text-align: center;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* ── AHEAD — Timeline ───────────────────────── */
.pod-timeline-wrap {
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.timeline-track {
  position: relative;
  height: 80px;
  margin: 10px 0;
}
.timeline-line {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
}
.timeline-today-line {
  position: absolute;
  top: 10px;
  width: 2px;
  height: 30px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}
.timeline-marker {
  position: absolute;
  top: 28px;
  transform: translateX(-50%);
  font-size: 8px;
  color: var(--text-muted);
  text-align: center;
}
.timeline-item {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  max-width: 80px;
}
.timeline-item:hover { transform: translateX(-50%) translateY(-2px); }
.timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin: 16px auto 4px;
  border: 2px solid var(--bg-secondary);
  box-shadow: 0 0 0 1px var(--border);
}
.timeline-label {
  font-size: 9px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70px;
}
.timeline-date {
  font-size: 8px;
  color: var(--text-muted);
}
.timeline-done { opacity: 0.4; }
.timeline-past .timeline-dot { opacity: 0.4; }
.timeline-today .timeline-dot {
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}
.pod-countdown {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  background: var(--accent-red-dim);
  color: var(--accent-red);
  font-size: 9px;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: 0.5px;
  animation: countdown-pulse 2s infinite;
}
@keyframes countdown-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ── RECORD — Performance Dashboard ─────────── */
.pod-record-chart-section {
  margin-bottom: 20px;
}
.pod-record-chart-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.pod-record-stacked { margin-bottom: 8px; }
.pod-record-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.pod-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-secondary);
}
.pod-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}
.pod-leaderboard {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}
.pod-leader-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.pod-leader-row:hover { border-color: var(--border-hover); }
.pod-medal {
  font-size: 10px;
  font-weight: 700;
  min-width: 28px;
  text-align: center;
  padding: 2px 4px;
  border-radius: 4px;
  background: var(--bg-tertiary);
  color: var(--text-muted);
}
.pod-gold { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.pod-silver { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }
.pod-bronze { background: rgba(180, 120, 80, 0.15); color: #c4956a; }
.pod-leader-info { flex: 1; min-width: 0; }
.pod-leader-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
}
.pod-leader-stats {
  font-size: 10px;
  color: var(--text-muted);
}
.pod-leader-spark { flex-shrink: 0; opacity: 0.7; }
.pod-leader-score {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  min-width: 32px;
  text-align: right;
}
.pod-record-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.pod-summary-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  transition: all 0.15s;
}
.pod-summary-card:hover { border-color: var(--border-hover); }
.pod-summary-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.pod-summary-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ── Status Bar ─────────────────────────────── */
.status-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 10px;
  z-index: 100;
}
.status-bar.hidden { display: none; }
.status-bar-left, .status-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sb-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
}
.sb-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.sb-dot-green { background: var(--accent); }
.sb-muted { color: var(--text-muted); opacity: 0.6; }
.sb-cmd-k {
  cursor: pointer;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: all 0.15s;
}
.sb-cmd-k:hover { border-color: var(--accent); color: var(--accent); }

/* Add bottom padding for status bar */
.conductor-hq { padding-bottom: 40px !important; }

/* ── Command Palette ────────────────────────── */
.cmd-palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
}
.cmd-palette-overlay.active {
  opacity: 1;
  visibility: visible;
}
.cmd-palette {
  width: 560px;
  max-width: 90vw;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transform: translateY(-10px) scale(0.98);
  transition: transform 0.15s;
}
.cmd-palette-overlay.active .cmd-palette {
  transform: translateY(0) scale(1);
}
.cmd-palette-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.cmd-palette-icon {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
#cmdPaletteInput {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
#cmdPaletteInput::placeholder { color: var(--text-muted); }
.cmd-palette-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.15s;
}
.cmd-palette-close:hover { color: var(--text-primary); }
.cmd-palette-results {
  max-height: 360px;
  overflow-y: auto;
  padding: 6px 0;
}
.cmd-palette-results::-webkit-scrollbar { width: 4px; }
.cmd-palette-results::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.cmd-palette-section { padding: 4px 0; }
.cmd-palette-section-title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 6px 16px;
}
.cmd-palette-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  transition: background 0.1s;
}
.cmd-palette-item:hover,
.cmd-palette-item.selected {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}
.cmd-palette-item-icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--bg-tertiary);
  font-size: 12px;
  flex-shrink: 0;
  color: var(--text-muted);
}
.cmd-palette-meta {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.cmd-palette-shortcut {
  margin-left: auto;
  font-size: 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--text-muted);
}
.cmd-palette-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
.cmd-palette-footer {
  display: flex;
  gap: 16px;
  padding: 8px 16px;
  border-top: 1px solid var(--border);
  font-size: 10px;
  color: var(--text-muted);
}
.cmd-palette-footer kbd {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  padding: 1px 4px;
  border-radius: 3px;
  font-family: inherit;
  font-size: 9px;
}
.cmd-palette-item mark {
  background: rgba(16, 185, 129, 0.25);
  color: var(--accent);
  border-radius: 2px;
  padding: 0 1px;
}

/* ── Mini Bar Chart hover ───────────────────── */
.chart-bar { transition: opacity 0.15s; }
.bar-group:hover .chart-bar { opacity: 1 !important; }

/* ── Mission Brief Form ─────────────────────── */
.brief-form {}
.form-input-lg { font-size: 16px; font-weight: 600; padding: 12px; }
.brief-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 768px) {
  .brief-form-grid { grid-template-columns: 1fr 1fr; }
}
.brief-form-section {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.brief-form-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ── Mission Briefing View ──────────────────── */
.task-briefing { margin-bottom: 20px; }
.brief-sections { margin: 16px 0; }
.brief-block {
  margin-bottom: 14px;
  padding: 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}
.brief-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.brief-value {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
}
.brief-empty {
  border-left-color: var(--text-muted);
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
}
.detail-inline-avatar {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  color: var(--bg-primary);
  vertical-align: middle;
  margin-right: 4px;
}
img.detail-inline-avatar { width: 18px; height: 18px; border-radius: 4px; object-fit: cover; vertical-align: middle; margin-right: 4px; }
.task-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.task-controls-left, .task-controls-right { display: flex; gap: 8px; align-items: center; }

/* ── Discussion Thread ──────────────────────── */
.task-discussion {
  border-top: 2px solid var(--border);
  padding-top: 16px;
}
.discussion-header {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.discussion-thread {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}
.discussion-thread::-webkit-scrollbar { width: 3px; }
.discussion-thread::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.thread-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  padding-left: 8px;
}
.thread-item:last-child { border-bottom: none; }
.thread-question { border-left-color: var(--accent-amber); background: rgba(245, 158, 11, 0.03); }
.thread-answer { border-left-color: var(--accent); background: rgba(16, 185, 129, 0.03); }
.thread-update { border-left-color: var(--accent-blue); }
.thread-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 10px;
  color: var(--bg-primary);
}
img.thread-avatar { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.thread-body { flex: 1; min-width: 0; }
.thread-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.thread-meta strong { color: var(--text-primary); }
.thread-time { margin-left: auto; }
.thread-type-badge {
  font-size: 8px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.thread-badge-question { background: var(--accent-amber-dim); color: var(--accent-amber); }
.thread-badge-answer { background: var(--accent-dim); color: var(--accent); }
.thread-badge-update { background: rgba(59,130,246,0.12); color: var(--accent-blue); }
.thread-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
}
.thread-empty {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
}

/* Discussion input */
.discussion-input {}
.discussion-type-row {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.disc-type-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 32px;
}
.disc-type-btn:hover { border-color: var(--border-hover); color: var(--text-primary); }
.disc-type-active {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}
.discussion-compose {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.discussion-compose textarea {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  min-height: 50px;
}
.discussion-compose textarea:focus { border-color: var(--accent); outline: none; }
.discussion-compose .btn { align-self: flex-end; }

/* ── Comms Wall — Multi-channel view ─────────── */
.comms-wall {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  padding: 0;
  height: calc(100vh - 140px);
}
.cw-channel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  transition: border-color 0.2s;
}
.cw-channel:hover { border-color: var(--border-hover); }
.cw-channel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.cw-ch-avatar-wrap { position: relative; flex-shrink: 0; }
.cw-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--bg-primary);
}
img.cw-avatar { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.cw-avatar-group { background: #334155; font-size: 14px; }
.cw-ch-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #334155;
  border: 2px solid var(--bg-secondary);
}
.cw-online { background: var(--accent); }
.cw-ch-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}
.cw-ch-count {
  font-size: 9px;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 8px;
}
.cw-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}
.cw-messages::-webkit-scrollbar { width: 3px; }
.cw-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.cw-msg {
  display: flex;
  gap: 6px;
  padding: 4px 0;
  align-items: flex-start;
}
.cw-msg-mine { flex-direction: row-reverse; }
.cw-msg-mine .cw-msg-body { text-align: right; }
.cw-msg-av {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 7px;
  font-weight: 700;
  color: var(--bg-primary);
}
img.cw-msg-av { width: 20px; height: 20px; border-radius: 5px; object-fit: cover; }
.cw-msg-body {
  flex: 1;
  min-width: 0;
}
.cw-msg-name {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 4px;
}
.cw-msg-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  word-break: break-word;
}
.cw-msg-mine .cw-msg-text { color: var(--text-primary); }
.cw-msg-time {
  font-size: 8px;
  color: var(--text-muted);
  margin-left: 4px;
  opacity: 0.6;
}
.cw-msg-att { font-size: 10px; color: var(--accent-blue); }
.cw-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 11px;
  font-style: italic;
}
.cw-input-bar {
  display: flex;
  gap: 4px;
  padding: 8px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.cw-input {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: 16px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  min-height: 32px;
}
.cw-input:focus { border-color: var(--accent-blue); }
.cw-send {
  background: var(--accent-blue);
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.cw-send:hover { background: #2563eb; }

@media (max-width: 768px) {
  .comms-wall { grid-template-columns: 1fr; height: auto; }
  .cw-channel { max-height: 400px; }
}
@media (min-width: 769px) and (max-width: 1199px) {
  .comms-wall { grid-template-columns: repeat(2, 1fr); }
}

/* ── Chat Drawer ────────────────────────────── */
.chat-fab {
  position: fixed;
  bottom: 44px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.chat-fab:hover { border-color: var(--accent-blue); color: var(--accent-blue); transform: scale(1.05); }
.chat-fab-active { background: var(--accent-blue); color: #fff; border-color: var(--accent-blue); }
.chat-fab-icon { font-size: 18px; }
.chat-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--accent-red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: badge-pulse 0.5s ease-out;
}
.chat-fab-badge.hidden { display: none; }

.chat-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  height: 100vh;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: right 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 30px rgba(0,0,0,0.3);
}
.chat-drawer-open { right: 0; }

.chat-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-drawer-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.chat-drawer-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.15s;
}
.chat-drawer-close:hover { color: var(--text-primary); }

/* Channel list */
.chat-drawer-channels {
  display: flex;
  gap: 2px;
  padding: 8px 8px;
  overflow-x: auto;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.chat-drawer-channels::-webkit-scrollbar { display: none; }
.cd-channel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
  min-width: 52px;
  flex-shrink: 0;
}
.cd-channel:hover { background: var(--bg-tertiary); }
.cd-channel-active { background: var(--bg-tertiary); }
.cd-channel-active .cd-ch-name { color: var(--text-primary); }
.cd-ch-avatar-wrap { position: relative; }
.cd-ch-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--bg-primary);
  object-fit: cover;
}
img.cd-ch-avatar { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.cd-ch-group { background: #334155; font-size: 14px; }
.cd-ch-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #334155;
  border: 2px solid var(--bg-secondary);
}
.cd-online { background: var(--accent); }
.cd-ch-name {
  font-size: 9px;
  color: var(--text-muted);
  text-align: center;
  max-width: 48px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Conversation */
.chat-drawer-conversation {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.chat-drawer-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  -webkit-overflow-scrolling: touch;
}
.chat-drawer-messages::-webkit-scrollbar { width: 3px; }
.chat-drawer-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.cd-msg {
  display: flex;
  gap: 8px;
  max-width: 85%;
}
.cd-msg-mine { align-self: flex-end; flex-direction: row-reverse; }
.cd-msg-theirs { align-self: flex-start; }
.cd-msg-avatar {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--bg-primary);
  object-fit: cover;
  align-self: flex-end;
}
img.cd-msg-avatar { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; }
.cd-msg-bubble {
  padding: 8px 12px;
  border-radius: 12px;
  max-width: 100%;
}
.cd-msg-theirs .cd-msg-bubble {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.cd-msg-mine .cd-msg-bubble {
  background: var(--accent-blue);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.cd-msg-name {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.cd-msg-mine .cd-msg-name { color: rgba(255,255,255,0.7); }
.cd-msg-text {
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}
.cd-msg-time {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 3px;
}
.cd-msg-mine .cd-msg-time { color: rgba(255,255,255,0.5); }
.cd-msg-img img {
  max-width: 200px;
  max-height: 150px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 4px;
}
.cd-msg-file a {
  color: var(--accent-blue);
  font-size: 12px;
  text-decoration: underline;
}
.cd-msg-mine .cd-msg-file a { color: rgba(255,255,255,0.9); }
.cd-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
}

/* Input bar */
.chat-drawer-input {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-drawer-attach {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.15s;
  flex-shrink: 0;
}
.chat-drawer-attach:hover { color: var(--accent-blue); }
#chatDrawerInput {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  min-height: 36px;
}
#chatDrawerInput:focus { border-color: var(--accent-blue); }
.chat-drawer-send {
  background: var(--accent-blue);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.chat-drawer-send:hover { background: #2563eb; transform: scale(1.05); }

.chat-drawer-attach-preview {
  padding: 6px 12px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-drawer-attach-preview.hidden { display: none; }
.chat-attach-name { color: var(--text-secondary); flex: 1; }
.chat-attach-remove {
  background: none;
  border: none;
  color: var(--accent-red);
  font-size: 16px;
  cursor: pointer;
}

/* iPad responsive */
@media (max-width: 768px) {
  .chat-drawer { width: 100%; right: -100%; }
  .chat-fab { bottom: 20px; right: 16px; }
}
@media (min-width: 769px) and (max-width: 1199px) {
  .chat-drawer { width: 340px; right: -360px; }
}

/* ── Responsive overrides for new components ── */
@media (max-width: 768px) {
  .mx-grid { grid-template-columns: 1fr; }
  .mx-panel-body { max-height: 260px; }
  .pod-record-summary { grid-template-columns: repeat(2, 1fr); }
  .pod-timeline-wrap { overflow-x: auto; }
  .timeline-track { min-width: 400px; }
  .fhs-strip { flex-wrap: wrap; }
  .fhs-bots { flex-wrap: wrap; }
  .cmd-palette { width: 95vw; }
  .status-bar { display: none; }
}
