/* ===== SP Diagnostics — Strategy Partners ===== */

:root {
  --dark: #171523;
  --dark-hover: #222035;
  --bg: #F2F3F7;
  --white: #FFFFFF;
  --text: #1E1F21;
  --text-secondary: #6B6D76;
  --gray: #E4E6EC;
  --gray-light: #F7F8FA;
  --cyan: #08F0F1;
  --cyan-dim: rgba(8, 240, 241, 0.15);
  --cyan-glow: rgba(8, 240, 241, 0.4);
  --blue: #4496D2;
  --teal: #34B0AB;
  --gradient: linear-gradient(135deg, #4496D2, #34B0AB);
  --red: #E8453C;
  --red-dim: rgba(232, 69, 60, 0.1);
  --orange: #F09B08;
  --orange-dim: rgba(240, 155, 8, 0.1);
  --green: #2ECC71;
  --green-dim: rgba(46, 204, 113, 0.1);
  --radius: 3.75px;
  --radius-lg: 12px;
  --radius-pill: 62.5px;
  --shadow: 0 1px 3px rgba(23,21,35,0.06);
  --shadow-md: 0 4px 12px rgba(23,21,35,0.08);
  --shadow-lg: 0 8px 32px rgba(23,21,35,0.12);
  --transition: 0.2s ease;
}

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

body {
  font-family: 'Commissioner', sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ===== SIDEBAR ===== */

.sidebar {
  width: 240px;
  background: var(--dark);
  color: var(--white);
  display: flex;
  flex-direction: column;
  padding: 28px 16px 20px;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.sidebar::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--cyan-glow), transparent);
  opacity: 0.7;
}

.sidebar-logo {
  padding: 0 8px 28px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 24px;
}

.logo-text {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 2px;
}

.logo-slash {
  display: inline-block;
  margin: 0 4px;
  font-weight: 300;
  font-size: 16px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-sub {
  font-size: 11px;
  font-weight: 300;
  color: rgba(255,255,255,0.4);
  letter-spacing: 1px;
  margin-top: 6px;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: var(--transition);
}

.nav-item:hover {
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.06);
}

.nav-item.active {
  color: var(--white);
  background: rgba(8, 240, 241, 0.1);
  font-weight: 500;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  width: 3px;
  height: 24px;
  background: var(--gradient);
  border-radius: 0 4px 4px 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 8px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}

.user-name { font-size: 13px; font-weight: 500; }
.user-role { font-size: 11px; color: rgba(255,255,255,0.4); }

/* ===== MAIN ===== */

.main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 32px 40px;
  height: 100vh;
  transition: margin-right 0.3s ease;
}

body.detail-open .main {
  margin-right: 420px;
}

body.agent-open .main {
  margin-right: 800px;
}

.view { display: none; }
.view.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== HEADER ===== */

.view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
}

.view-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.header-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--dark);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--dark-hover);
  box-shadow: 0 0 0 3px var(--cyan-dim);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--gray);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.btn-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

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

/* ===== STATS ===== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.stat-value {
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-value.accent { color: var(--teal); }
.stat-value.warn { color: var(--orange); }

.stat-unit {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-secondary);
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.stat-trend {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.stat-trend.up { color: var(--green); }
.stat-trend.down { color: var(--green); }

/* ===== KANBAN BOARD ===== */

.kanban-board {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 16px;
  min-height: calc(100vh - 240px);
}

.kanban-col {
  min-width: 200px;
  flex: 1;
  background: var(--gray-light);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
}

.kanban-col.col-done {
  opacity: 0.75;
}

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

.kanban-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gray);
}

.kanban-col-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.kanban-col-count {
  font-size: 11px;
  font-weight: 600;
  background: var(--gray);
  color: var(--text-secondary);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kanban-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
}

/* ===== KANBAN CARDS (kb-card) ===== */

.kb-card {
  background: var(--white);
  border-radius: 8px;
  padding: 12px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1.5px solid transparent;
}

.kb-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--cyan);
}

.kb-card.done {
  opacity: 0.7;
}

.kb-card.done:hover {
  opacity: 1;
}

.kb-card-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.3;
}

.kb-card-meta {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.kb-card-bar {
  height: 3px;
  background: var(--gray);
  border-radius: 3px;
  overflow: hidden;
}

.kb-bar-fill {
  height: 100%;
  width: var(--w);
  background: var(--gradient);
  border-radius: 3px;
  transition: width 0.6s ease;
}

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

.status {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}

.status-progress { background: var(--cyan-dim); color: var(--teal); }
.status-done { background: var(--green-dim); color: var(--green); }
.status-wait { background: var(--orange-dim); color: var(--orange); }
.status-complete { background: var(--gray); color: var(--text-secondary); }

/* ===== SEARCH ===== */

.search-wrap {
  position: relative;
}

.search-wrap svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

.search-input {
  padding: 10px 16px 10px 40px;
  background: var(--white);
  border: 1.5px solid var(--gray);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 13px;
  width: 240px;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--cyan-dim);
}

/* ===== DETAIL PANEL ===== */

.detail-panel {
  position: fixed;
  top: 0; right: 0;
  width: 420px;
  height: 100vh;
  background: var(--white);
  transform: translateX(100%);
  transition: transform 0.3s ease, right 0.3s ease;
  z-index: 20;
  box-shadow: -4px 0 24px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}

.detail-panel.open {
  transform: translateX(0);
}

body.agent-open .detail-panel {
  right: 380px;
}

.dp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--gray);
  flex-shrink: 0;
}

.dp-header h2 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.dp-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
  padding: 0 0 0 12px;
  transition: var(--transition);
}

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

/* ===== DP TABS ===== */

.dp-tabs {
  display: flex;
  border-bottom: 1.5px solid var(--gray);
  flex-shrink: 0;
}

.dp-tab {
  flex: 1;
  padding: 10px 8px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: -1.5px;
  text-align: center;
}

.dp-tab:hover { color: var(--text); }

.dp-tab.active {
  color: var(--text);
  font-weight: 600;
  border-bottom-color: var(--teal);
}

/* ===== DP CONTENT ===== */

.dp-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.dp-tab-content { display: none; animation: fadeIn 0.2s ease; }
.dp-tab-content.active { display: block; }

/* ===== DP AGENTS BAR ===== */

.dp-agents {
  border-top: 1px solid var(--gray);
  padding: 12px 16px;
  flex-shrink: 0;
  background: var(--gray-light);
}

.dp-agents-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.dp-agents-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.agent-role-btn {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--gray);
  background: var(--white);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.agent-role-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--cyan-dim);
}

.agent-role-btn.active {
  background: var(--dark);
  color: var(--white);
  border-color: var(--dark);
}

/* ===== AGENT PANEL ===== */

.agent-panel {
  position: fixed;
  top: 0; right: 0;
  width: 380px;
  height: 100vh;
  background: var(--dark);
  color: var(--white);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 21;
  display: flex;
  flex-direction: column;
}

.agent-panel.open {
  transform: translateX(0);
}

.ap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.ap-role-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ap-role-icon {
  font-size: 20px;
}

.ap-role-name {
  font-size: 15px;
  font-weight: 600;
}

.ap-close {
  background: none;
  border: none;
  font-size: 26px;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.ap-close:hover { color: var(--white); }

/* ===== AGENT MESSAGES ===== */

.ap-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ap-msg {
  display: flex;
  gap: 10px;
  max-width: 100%;
  animation: msgIn 0.3s ease;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.ap-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ap-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.ap-msg-avatar.analyst {
  background: rgba(8,240,241,0.2);
  color: var(--cyan);
}

.ap-msg-avatar.consultant {
  background: var(--teal);
  color: var(--white);
}

.ap-msg-avatar.strategist {
  background: var(--blue);
  color: var(--white);
}

.ap-msg-avatar.editor {
  background: var(--orange);
  color: var(--white);
}

.ap-msg-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.ap-msg.bot .ap-msg-bubble {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
  border-bottom-left-radius: 4px;
}

.ap-msg.user .ap-msg-bubble {
  background: var(--teal);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.ap-msg-time {
  font-size: 10px;
  margin-top: 4px;
  opacity: 0.4;
}

/* ===== AGENT QUICK ACTIONS ===== */

.ap-quick {
  display: flex;
  gap: 6px;
  padding: 10px 20px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.ap-quick-btn {
  padding: 5px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: var(--transition);
}

.ap-quick-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(8,240,241,0.1);
}

/* ===== AGENT INPUT ===== */

.ap-input-wrap {
  display: flex;
  gap: 8px;
  padding: 14px 20px 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.ap-input {
  flex: 1;
  padding: 10px 16px;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 13px;
  color: var(--white);
  outline: none;
  transition: var(--transition);
}

.ap-input::placeholder {
  color: rgba(255,255,255,0.3);
}

.ap-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(8,240,241,0.15);
}

.ap-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  transition: var(--transition);
  flex-shrink: 0;
}

.ap-send:hover {
  background: var(--blue);
  box-shadow: 0 0 12px var(--cyan-glow);
}

/* ===== TYPING INDICATOR ===== */

.typing-dots {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
}

.typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  animation: typingBounce 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* ===== UPLOAD ===== */

.upload-zone {
  border: 2px dashed var(--gray);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  background: var(--gray-light);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 16px;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--teal);
  background: var(--cyan-dim);
}

.upload-icon { color: var(--text-secondary); margin-bottom: 8px; }
.upload-zone:hover .upload-icon { color: var(--teal); }
.upload-text { font-size: 13px; color: var(--text); margin-bottom: 4px; }
.upload-link { color: var(--teal); font-weight: 500; text-decoration: underline; }
.upload-hint { font-size: 11px; color: var(--text-secondary); }

/* ===== DOCS LIST ===== */

.docs-list { display: flex; flex-direction: column; gap: 6px; }

.doc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--gray-light);
  border-radius: 8px;
}

.doc-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.doc-icon.pdf { background: var(--red-dim); color: var(--red); }
.doc-icon.xls { background: var(--green-dim); color: var(--green); }

.doc-info { flex: 1; min-width: 0; }
.doc-name { font-size: 12px; font-weight: 500; margin-bottom: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-meta { font-size: 11px; color: var(--text-secondary); }

.doc-status {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

.doc-status.done { background: var(--green-dim); color: var(--green); }

.doc-status.processing {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--cyan-dim);
  color: var(--teal);
}

.spinner {
  width: 12px;
  height: 12px;
  border: 2px solid var(--cyan-dim);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== ANALYSIS (inside DP) ===== */

.radar-section {
  background: var(--gray-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
}

.radar-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.radar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.radar-chart {
  width: 100%;
  max-width: 360px;
}

.radar-legend {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-dot.company {
  background: rgba(232,69,60,0.3);
  border: 2px solid #E8453C;
}

.legend-dot.benchmark {
  background: rgba(52,176,171,0.15);
  border: 2px solid #34B0AB;
}

.dp-findings {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.finding-card {
  background: var(--gray-light);
  border-radius: 8px;
  padding: 14px 16px;
  border-left: 3px solid transparent;
}

.finding-card.problem { border-left-color: var(--red); }
.finding-card.opportunity { border-left-color: var(--teal); }

.finding-severity {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  display: inline-block;
  margin-bottom: 6px;
}

.finding-severity.high { background: var(--red-dim); color: var(--red); }
.finding-severity.medium { background: var(--orange-dim); color: var(--orange); }
.finding-severity.opp-high { background: var(--cyan-dim); color: var(--teal); }
.finding-severity.opp-medium { background: rgba(68,150,210,0.1); color: var(--blue); }

.finding-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.finding-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 6px;
}

.finding-source {
  font-size: 10px;
  color: var(--text-secondary);
  opacity: 0.7;
}

/* ===== QUESTIONS (inside DP) ===== */

.questions-header {
  margin-bottom: 12px;
}

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

.questions-counter {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-weight: 500;
}

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

.question-group {
  background: var(--gray-light);
  border-radius: 8px;
  padding: 14px 16px;
}

.group-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--teal);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray);
}

.question-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.question-item:last-child { border-bottom: none; padding-bottom: 0; }

.q-number {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 20px;
  padding-top: 1px;
}

.q-body { flex: 1; }

.q-text {
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 4px;
}

.q-priority {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  display: inline-block;
}

.q-priority.high { background: var(--red-dim); color: var(--red); }
.q-priority.medium { background: var(--orange-dim); color: var(--orange); }
.q-priority.low { background: var(--gray); color: var(--text-secondary); }

.q-check {
  padding-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.q-check input { display: none; }

.checkmark {
  display: block;
  width: 18px;
  height: 18px;
  border: 2px solid #B0B3BC;
  border-radius: 4px;
  transition: var(--transition);
}

.q-check:hover .checkmark {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--cyan-dim);
}

.q-check input:checked + .checkmark {
  background: var(--teal);
  border-color: var(--teal);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='white' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
}

/* ===== REPORT (inside DP) ===== */

.report-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.report-card {
  background: var(--gray-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.report-header {
  background: var(--dark);
  color: var(--white);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.report-logo {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  opacity: 0.6;
}

.report-logo span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 3px;
}

.report-title-block { text-align: right; }
.report-title-block h2 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.report-company { font-size: 13px; color: var(--cyan); font-weight: 500; }
.report-date { font-size: 11px; opacity: 0.5; margin-top: 2px; }

.report-section {
  padding: 16px 24px;
  border-bottom: 1px solid var(--gray);
}

.report-section:last-child { border-bottom: none; }
.report-section h3 { font-size: 14px; font-weight: 600; margin-bottom: 10px; }

.report-section p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.report-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.report-metric {
  text-align: center;
  padding: 12px;
  background: var(--white);
  border-radius: 8px;
}

.rm-value {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 2px;
}

.rm-value.negative { color: var(--red); }
.rm-value.warning { color: var(--orange); }
.rm-value.positive { color: var(--teal); }
.rm-label { font-size: 11px; color: var(--text-secondary); margin-bottom: 2px; }
.rm-benchmark { font-size: 10px; color: var(--text-secondary); opacity: 0.7; }

.report-recs { display: flex; flex-direction: column; gap: 10px; }

.rec-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.rec-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gradient);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.rec-text {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
  padding-top: 2px;
}

.rec-text strong { color: var(--text); }

/* ===== CLIENTS TABLE ===== */

.clients-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
}

.clients-filters .search-input {
  width: 320px;
}

.filter-pills {
  display: flex;
  gap: 6px;
}

.filter-pill {
  padding: 7px 16px;
  background: var(--white);
  border: 1.5px solid var(--gray);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.filter-pill:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.filter-pill.active {
  background: var(--dark);
  color: var(--white);
  border-color: var(--dark);
}

.clients-table-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.clients-table {
  width: 100%;
  border-collapse: collapse;
}

.clients-table th {
  text-align: left;
  padding: 14px 18px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1.5px solid var(--gray);
  background: var(--gray-light);
}

.clients-table td {
  padding: 14px 18px;
  font-size: 14px;
  border-bottom: 1px solid var(--gray-light);
}

.client-row {
  cursor: pointer;
  transition: var(--transition);
}

.client-row:hover {
  background: var(--cyan-dim);
}

.client-row:last-child td {
  border-bottom: none;
}

.td-company {
  font-weight: 600;
}

.td-arrow {
  color: var(--text-secondary);
  width: 32px;
}

/* ===== REPORTS LIST VIEW ===== */

.reports-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.report-list-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.report-list-card:hover {
  box-shadow: var(--shadow-md);
}

.report-list-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.report-list-icon.pdf-ready {
  background: var(--red-dim);
  color: var(--red);
}

.report-list-icon.pdf-draft {
  background: var(--orange-dim);
  color: var(--orange);
}

.report-list-info {
  flex: 1;
}

.report-list-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

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

.report-list-date {
  font-size: 13px;
  color: var(--text-secondary);
  min-width: 100px;
}

.report-list-card .status {
  min-width: 80px;
  text-align: center;
}

/* ===== HISTORY / TIMELINE ===== */

.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--gray);
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--teal);
  z-index: 1;
}

.timeline-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow);
}

.timeline-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 4px;
}

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

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

.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(23,21,35,0.6);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

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

.modal-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 90%;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  animation: fadeIn 0.2s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

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

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: var(--transition);
}

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

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.modal-input {
  padding: 10px 16px;
  border: 1.5px solid var(--gray);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.modal-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--cyan-dim);
}

.modal-actions {
  display: flex;
  gap: 10px;
}

/* ===== STAGGER ANIMATIONS ===== */

.stat-card { animation: cardIn 0.4s ease both; }
.stat-card:nth-child(1) { animation-delay: 0s; }
.stat-card:nth-child(2) { animation-delay: 0.06s; }
.stat-card:nth-child(3) { animation-delay: 0.12s; }
.stat-card:nth-child(4) { animation-delay: 0.18s; }

.kb-card { animation: cardIn 0.4s ease both; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== BURGER & MOBILE SIDEBAR ===== */

.burger-btn {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 20;
  background: var(--dark);
  color: var(--white);
  border: none;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(23,21,35,0.4);
  z-index: 8;
}

/* ===== Q&A INTERVIEW ===== */

.qa-list { display: flex; flex-direction: column; gap: 16px; }

.qa-group {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.qa-group .group-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--teal);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray);
}

.qa-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-light);
}

.qa-item:last-child { border-bottom: none; padding-bottom: 0; }

.qa-q {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.qa-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 20px;
}

.qa-priority {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
}

.qa-priority.high { background: var(--red-dim); color: var(--red); }
.qa-priority.medium { background: var(--orange-dim); color: var(--orange); }
.qa-priority.low { background: var(--gray); color: var(--text-secondary); }

.qa-text {
  width: 100%;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  margin-top: 2px;
}

.qa-answer {
  width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  border: 1.5px solid var(--gray);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
  resize: vertical;
  outline: none;
  transition: var(--transition);
  background: var(--gray-light);
  color: var(--text);
}

.qa-answer:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--cyan-dim);
  background: var(--white);
}

.qa-answer::placeholder {
  color: var(--text-secondary);
  opacity: 0.5;
}

/* Interview upload */
.interview-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1.5px solid var(--gray);
}

.interview-header-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.interview-upload {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1.5px dashed var(--gray);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
  font-size: 12px;
}

.interview-upload:hover {
  border-color: var(--teal);
  background: var(--cyan-dim);
  color: var(--teal);
}

.interview-upload .upload-link {
  color: var(--teal);
  font-weight: 500;
  text-decoration: underline;
}

.interview-file-attached {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--green-dim);
  border-radius: 8px;
  font-size: 13px;
}

.ifa-icon { font-size: 16px; }
.ifa-name { font-weight: 500; color: var(--text); }
.ifa-size { color: var(--text-secondary); font-size: 12px; }

.ifa-remove {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.ifa-remove:hover { color: var(--red); }

/* Submit answers */
.qa-submit {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1.5px solid var(--gray);
  display: flex;
  align-items: center;
  gap: 12px;
}

.qa-submit-hint {
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.7;
}

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

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

@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .main { padding: 24px 28px; }
  .detail-panel { width: 360px; }
  .agent-panel { width: 320px; }
  body.detail-open .main { margin-right: 360px; }
  body.agent-open .main { margin-right: 680px; }
  body.agent-open .detail-panel { right: 320px; }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    height: 100vh;
    transition: left 0.3s ease;
    z-index: 12;
  }

  .sidebar.open {
    left: 0;
  }

  .sidebar-overlay.active {
    display: block;
  }

  .burger-btn {
    display: flex;
  }

  .main {
    padding: 20px 16px;
    padding-top: 64px;
  }

  .view-header {
    flex-direction: column;
    gap: 12px;
  }

  .view-header h1 {
    font-size: 22px;
  }

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

  .kanban-board {
    min-height: auto;
  }

  .kanban-col {
    min-width: 180px;
  }

  .detail-panel {
    width: 100%;
  }

  .agent-panel {
    width: 100%;
  }

  body.detail-open .main {
    margin-right: 0;
  }

  body.agent-open .main {
    margin-right: 0;
  }

  body.agent-open .detail-panel {
    right: 0;
    display: none;
  }
}
