/* ==========================================================================
   Matrix OSINT — Phase 2 (Progress) & Phase 3 (3-Column Posts Board) Stylesheet
   Matches exact light theme (#FFFFFF cards, #F6F7F9 base, #E2E8F0 borders),
   with WCAG AA contrast, dark theme compatibility, and mobile responsiveness.
   ========================================================================== */

/* --- Top Step Switcher Navigation Bar --- */
.board-step-nav-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 14px 24px 6px;
  max-width: 1440px;
  margin: 0 auto;
}

.board-step-nav-btn {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #475569;
  border-radius: 9px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.board-step-nav-btn:hover {
  background: #F8FAFC;
  color: #0F172A;
  border-color: #94A3B8;
}

.board-step-nav-btn.active {
  background: #0F172A;
  color: #FFFFFF;
  border-color: #0F172A;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
}

body:not(.light-theme) .board-step-nav-btn {
  background: #121C29;
  border-color: rgba(255, 255, 255, 0.12);
  color: #91A0B5;
}

body:not(.light-theme) .board-step-nav-btn:hover {
  background: #172333;
  color: #E8EDF5;
}

body:not(.light-theme) .board-step-nav-btn.active {
  background: #4F83F1;
  color: #FFFFFF;
  border-color: #4F83F1;
}

/* ==========================================================================
   PHASE 2: PROGRESS VIEW CONTAINER
   ========================================================================== */
.target-progress-workspace {
  max-width: 880px;
  margin: 16px auto 40px;
  padding: 0 20px;
  box-sizing: border-box;
}

.target-progress-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.05);
  padding: 24px;
  overflow: hidden;
}

body:not(.light-theme) .target-progress-card {
  background: #121C29;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.4);
}

.target-progress-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.target-progress-title {
  font-size: 19px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 4px 0;
  letter-spacing: -0.02em;
}

body:not(.light-theme) .target-progress-title {
  color: #E8EDF5;
}

.target-progress-subtitle {
  font-size: 13px;
  color: #64748B;
  margin: 0;
}

body:not(.light-theme) .target-progress-subtitle {
  color: #91A0B5;
}

.target-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #BBF7D0;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

body:not(.light-theme) .target-live-pill {
  background: rgba(22, 199, 132, 0.15);
  color: #16C784;
  border-color: rgba(22, 199, 132, 0.3);
}

.target-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16A34A;
  animation: livePulse 1.8s infinite;
}

@keyframes livePulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Progress Grid */
.target-progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
  min-height: 50px;
}

.target-prog-account-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 110px;
}

body:not(.light-theme) .target-prog-account-card {
  background: #0D1520;
  border-color: rgba(255, 255, 255, 0.08);
}

.target-prog-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.target-prog-user-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.target-prog-handle {
  font-size: 14px;
  font-weight: 600;
  color: #0F172A;
}

body:not(.light-theme) .target-prog-handle {
  color: #E8EDF5;
}

.target-prog-status-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
}

.target-prog-status-tag.done,
.target-prog-status-tag.active {
  color: #15803D;
  background: #DCFCE7;
}

.target-prog-status-tag.collecting {
  color: #1D4ED8;
  background: #DBEAFE;
}

.target-prog-status-tag.queued {
  color: #B45309;
  background: #FEF3C7;
}

.target-prog-status-tag.failed {
  color: #B91C1C;
  background: #FEE2E2;
}

body:not(.light-theme) .target-prog-status-tag.done {
  color: #16C784;
  background: rgba(22, 199, 132, 0.15);
}

body:not(.light-theme) .target-prog-status-tag.collecting {
  color: #60A5FA;
  background: rgba(79, 131, 241, 0.18);
}

body:not(.light-theme) .target-prog-status-tag.queued {
  color: #FBBF24;
  background: rgba(232, 180, 90, 0.18);
}

body:not(.light-theme) .target-prog-status-tag.failed {
  color: #F87171;
  background: rgba(241, 107, 114, 0.18);
}

/* Progress Bars */
.target-prog-bar-track {
  width: 100%;
  height: 5px;
  background: #E2E8F0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

body:not(.light-theme) .target-prog-bar-track {
  background: rgba(255, 255, 255, 0.1);
}

.target-prog-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.target-prog-bar-fill.done,
.target-prog-bar-fill.active {
  background: #16A34A;
  width: 100%;
}

.target-prog-bar-fill.collecting {
  background: #2563EB;
  animation: barIndeterminate 1.5s infinite linear;
}

.target-prog-bar-fill.queued {
  background: #F59E0B;
  width: 25%;
}

.target-prog-bar-fill.failed {
  background: #DC2626;
  width: 100%;
}

@keyframes barIndeterminate {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

.target-prog-subtext {
  font-size: 12px;
  color: #64748B;
  margin: 0;
  line-height: 1.4;
}

body:not(.light-theme) .target-prog-subtext {
  color: #91A0B5;
}

.target-btn-retry {
  background: #FEE2E2;
  border: 1px solid #FCA5A5;
  color: #B91C1C;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  margin-left: 6px;
}

.target-btn-retry:hover {
  background: #FCA5A5;
  color: #7F1D1D;
}

/* What happens next box */
.target-progress-next-card {
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 16px 20px;
  background: #FFFFFF;
}

body:not(.light-theme) .target-progress-next-card {
  background: #0D1520;
  border-color: rgba(255, 255, 255, 0.08);
}

.target-next-title {
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 4px 0;
}

body:not(.light-theme) .target-next-title {
  color: #E8EDF5;
}

.target-next-desc {
  font-size: 12px;
  color: #64748B;
  margin: 0 0 16px 0;
}

body:not(.light-theme) .target-next-desc {
  color: #91A0B5;
}

.target-next-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ==========================================================================
   PHASE 3: POSTS BOARD 3-COLUMN REDESIGN
   ========================================================================== */
.board-main-workspace {
  max-width: 1440px;
  margin: 0 auto;
  padding: 10px 24px 40px;
  box-sizing: border-box;
}

/* Top Posts Header */
.board-top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.board-top-title-group h2 {
  font-size: 22px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 2px 0;
  letter-spacing: -0.02em;
}

body:not(.light-theme) .board-top-title-group h2 {
  color: #E8EDF5;
}

.board-top-stats {
  font-size: 13px;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 8px;
}

body:not(.light-theme) .board-top-stats {
  color: #91A0B5;
}

.board-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.board-btn-filter-toggle {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #334155;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.board-btn-filter-toggle:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
}

body:not(.light-theme) .board-btn-filter-toggle {
  background: #172333;
  border-color: rgba(255, 255, 255, 0.12);
  color: #E8EDF5;
}

.board-btn-add-person {
  background: #0F172A;
  color: #FFFFFF;
  border: 1px solid #0F172A;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: all 0.15s ease;
}

.board-btn-add-person:hover {
  background: #1E293B;
}

body:not(.light-theme) .board-btn-add-person {
  background: #2563EB;
  border-color: #2563EB;
}

body:not(.light-theme) .board-btn-add-person:hover {
  background: #1D4ED8;
}

/* Posts Filter Bar */
.board-filters-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
}

body:not(.light-theme) .board-filters-bar {
  background: #121C29;
  border-color: rgba(255, 255, 255, 0.08);
}

.board-search-input-wrap {
  flex: 1;
  min-width: 220px;
  position: relative;
  display: flex;
  align-items: center;
}

.board-search-input {
  width: 100%;
  border: 1px solid #CBD5E1;
  border-radius: 7px;
  padding: 6px 10px 6px 30px;
  font-size: 13px;
  background: #F8FAFC;
  color: #0F172A;
  outline: none;
}

.board-search-input:focus {
  border-color: #2563EB;
  background: #FFFFFF;
}

body:not(.light-theme) .board-search-input {
  background: #080D14;
  border-color: rgba(255, 255, 255, 0.12);
  color: #E8EDF5;
}

body:not(.light-theme) .board-search-input:focus {
  border-color: #4F83F1;
}

.board-search-icon-inside {
  position: absolute;
  left: 9px;
  color: #94A3B8;
  pointer-events: none;
}

.board-filter-pill-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.board-filter-pill {
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.board-filter-pill:hover {
  background: #E2E8F0;
  color: #0F172A;
}

.board-filter-pill.active {
  background: #0F172A;
  color: #FFFFFF;
  border-color: #0F172A;
}

body:not(.light-theme) .board-filter-pill {
  background: #172333;
  border-color: rgba(255, 255, 255, 0.08);
  color: #91A0B5;
}

body:not(.light-theme) .board-filter-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

body:not(.light-theme) .board-filter-pill.active {
  background: #4F83F1;
  color: #FFFFFF;
  border-color: #4F83F1;
}

/* 3-Column Layout */
.board-columns-grid {
  display: grid;
  grid-template-columns: 280px 1fr 340px;
  gap: 16px;
  align-items: start;
}

/* Column 1: People List */
.board-col-people {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

body:not(.light-theme) .board-col-people {
  background: #121C29;
  border-color: rgba(255, 255, 255, 0.08);
}

.board-col-header {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #475569;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body:not(.light-theme) .board-col-header {
  color: #91A0B5;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.board-people-list {
  max-height: calc(100vh - 280px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.board-person-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #F1F5F9;
  cursor: pointer;
  transition: all 0.15s ease;
}

body:not(.light-theme) .board-person-item {
  border-bottom-color: rgba(255, 255, 255, 0.04);
}

.board-person-item:hover {
  background: #F8FAFC;
}

body:not(.light-theme) .board-person-item:hover {
  background: #172333;
}

.board-person-item.selected {
  background: #EFF6FF;
  border-left: 3px solid #2563EB;
}

body:not(.light-theme) .board-person-item.selected {
  background: rgba(79, 131, 241, 0.14);
  border-left: 3px solid #4F83F1;
}

.board-person-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.board-person-name {
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.light-theme) .board-person-name {
  color: #E8EDF5;
}

.board-person-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: #F1F5F9;
  color: #64748B;
}

.board-person-badge.flagged {
  background: #FEE2E2;
  color: #B91C1C;
}

body:not(.light-theme) .board-person-badge {
  background: #172333;
  color: #91A0B5;
}

body:not(.light-theme) .board-person-badge.flagged {
  background: rgba(241, 107, 114, 0.18);
  color: #F87171;
}

.board-people-footer {
  padding: 10px 14px;
  font-size: 12px;
  color: #64748B;
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
}

body:not(.light-theme) .board-people-footer {
  background: #0D1520;
  border-top-color: rgba(255, 255, 255, 0.08);
  color: #91A0B5;
}

/* Column 2: Posts Stream */
.board-col-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 120px;
  max-height: calc(100vh - 280px);
  overflow-y: auto;
  padding-right: 4px;
}

.board-post-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: border-color 0.15s ease;
}

body:not(.light-theme) .board-post-card {
  background: #121C29;
  border-color: rgba(255, 255, 255, 0.08);
}

.board-post-card.flagged {
  border-color: #FCA5A5;
  background: #FFFBFB;
}

body:not(.light-theme) .board-post-card.flagged {
  border-color: rgba(241, 107, 114, 0.35);
  background: rgba(241, 107, 114, 0.05);
}

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

.board-post-author-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.board-post-handle {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
}

body:not(.light-theme) .board-post-handle {
  color: #E8EDF5;
}

.board-post-time {
  font-size: 12px;
  color: #64748B;
}

.board-flagged-tag {
  background: #FEE2E2;
  color: #B91C1C;
  border: 1px solid #FCA5A5;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
}

body:not(.light-theme) .board-flagged-tag {
  background: rgba(241, 107, 114, 0.18);
  color: #F87171;
  border-color: rgba(241, 107, 114, 0.35);
}

.board-post-caption {
  font-size: 13.5px;
  line-height: 1.5;
  color: #1E293B;
  margin: 0 0 12px 0;
  word-break: break-word;
}

body:not(.light-theme) .board-post-caption {
  color: #CBD5E1;
}

.board-post-caption mark {
  background: #FEF08A;
  color: #854D0E;
  padding: 1px 3px;
  border-radius: 3px;
  font-weight: 600;
}

body:not(.light-theme) .board-post-caption mark {
  background: rgba(232, 180, 90, 0.25);
  color: #FCD34D;
}

.board-post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #F1F5F9;
  padding-top: 10px;
}

body:not(.light-theme) .board-post-footer {
  border-top-color: rgba(255, 255, 255, 0.05);
}

.board-post-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #64748B;
}

body:not(.light-theme) .board-post-metrics {
  color: #91A0B5;
}

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

.board-btn-post-action {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
}

.board-btn-post-action:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
  color: #0F172A;
}

.board-btn-comments {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #1E293B;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.board-btn-comments:hover {
  background: #EEF2FF;
  border-color: #6366F1;
  color: #4338CA;
}

body:not(.light-theme) .board-btn-post-action {
  background: #172333;
  border-color: rgba(255, 255, 255, 0.12);
  color: #E8EDF5;
}

body:not(.light-theme) .board-btn-comments {
  background: #172333;
  border-color: rgba(255, 255, 255, 0.16);
  color: #E2E8F0;
}

body:not(.light-theme) .board-btn-comments:hover {
  background: #1E2D42;
  border-color: #818CF8;
  color: #C7D2FE;
}

/* Column 3: Person Summary */
.board-col-summary {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

body:not(.light-theme) .board-col-summary {
  background: #121C29;
  border-color: rgba(255, 255, 255, 0.08);
}

.board-summary-profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.board-summary-name {
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 2px 0;
}

body:not(.light-theme) .board-summary-name {
  color: #E8EDF5;
}

.board-summary-sub {
  font-size: 12px;
  color: #64748B;
  margin: 0;
}

body:not(.light-theme) .board-summary-sub {
  color: #91A0B5;
}

.board-chart-box {
  margin-bottom: 20px;
}

.board-chart-title {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 8px;
}

body:not(.light-theme) .board-chart-title {
  color: #91A0B5;
}

.board-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 60px;
  padding-top: 10px;
}

.board-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.board-bar-fill {
  width: 100%;
  background: #93C5FD;
  border-radius: 3px 3px 0 0;
  min-height: 4px;
  transition: height 0.3s ease;
}

.board-bar-fill.busiest {
  background: #2563EB;
}

body:not(.light-theme) .board-bar-fill {
  background: rgba(79, 131, 241, 0.4);
}

body:not(.light-theme) .board-bar-fill.busiest {
  background: #4F83F1;
}

.board-bar-day {
  font-size: 10px;
  color: #94A3B8;
}

/* Metrics Table */
.board-summary-metrics {
  border-top: 1px solid #F1F5F9;
  border-bottom: 1px solid #F1F5F9;
  padding: 12px 0;
  margin-bottom: 20px;
}

body:not(.light-theme) .board-summary-metrics {
  border-color: rgba(255, 255, 255, 0.05);
}

.board-metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  padding: 5px 0;
}

.board-metric-label {
  color: #64748B;
}

body:not(.light-theme) .board-metric-label {
  color: #91A0B5;
}

.board-metric-val {
  font-weight: 700;
  color: #0F172A;
}

body:not(.light-theme) .board-metric-val {
  color: #E8EDF5;
}

.board-summary-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.board-btn-summary-link {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #1E293B;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 7px;
  padding: 8px 12px;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.board-btn-summary-link:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
}

body:not(.light-theme) .board-btn-summary-link {
  background: #172333;
  border-color: rgba(255, 255, 255, 0.12);
  color: #E8EDF5;
}

/* Responsive Breakpoints */
@media (max-width: 1100px) {
  .board-columns-grid {
    grid-template-columns: 240px 1fr;
  }
  .board-col-summary {
    display: none;
  }
}

@media (max-width: 768px) {
  .board-columns-grid {
    grid-template-columns: 1fr;
  }
  .board-col-people {
    display: none;
  }
  .board-col-summary {
    display: none;
  }
  .board-main-workspace {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* Real post count (last 7 days) next to each person */
.board-person-count {
  flex: 0 0 auto;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #EEF2FF;
  color: #3730A3;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}
.board-person-count.none { background: #F1F5F9; color: #94A3B8; font-weight: 500; }
