/* ── DETAIL PANEL CONTENT ── */

.back-btn {
  color: var(--accent-developing);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: opacity var(--transition);
}

.back-btn:hover { opacity: 0.7; }

.action-btn {
  background: var(--bg-input);
  border: none;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.action-btn:hover {
  background: var(--border);
  color: var(--text-primary);
}

.action-btn.primary {
  background: var(--accent-developing);
  color: #fff;
}

.action-btn.primary:hover {
  background: #005EC2;
}

.action-btn.danger {
  background: rgba(255,59,48,0.08);
  color: #C0392B;
  margin-left: auto;
}

.action-btn.danger:hover {
  background: rgba(255,59,48,0.15);
  color: #A93226;
}

/* ── PASSPORT ── */
.detail-wrap {
  padding: 0;
}

.passport {
  background: var(--bg-card);
}

/* ── passport header: dark gradient hero ── */
.pass-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 28px 24px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #09152B 0%, #143563 55%, #1a4a8a 100%);
  border-bottom: none;
}

.pass-header::before {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  right: -60px; top: -140px;
  border-radius: 50%;
  background: rgba(0,113,227,0.20);
  filter: blur(70px);
  pointer-events: none;
}

.pass-header::after {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  left: -40px; bottom: -100px;
  border-radius: 50%;
  background: rgba(48,209,88,0.13);
  filter: blur(60px);
  pointer-events: none;
}

.pass-avatar {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 26px;
  color: #fff;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.25);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  position: relative;
  z-index: 1;
}

.pass-name {
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.4px;
  color: #ffffff;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.pass-tagline {
  font-size: 13px;
  color: rgba(255,255,255,0.62);
  margin-top: 3px;
  position: relative;
  z-index: 1;
}

.pass-signal-badge {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 999px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.pass-signal-badge.early      { background: rgba(255,159,10,0.22);  border: 1px solid rgba(255,159,10,0.40);  color: #FFD060; }
.pass-signal-badge.developing { background: rgba(0,113,227,0.22);   border: 1px solid rgba(0,113,227,0.40);   color: #6EB8FF; }
.pass-signal-badge.strong     { background: rgba(48,209,88,0.22);   border: 1px solid rgba(48,209,88,0.40);   color: #5AE87A; }

/* ── meta row: continues dark theme ── */
.pass-meta-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: #0d1e3a;
}

.pass-meta-cell {
  padding: 14px 20px;
  border-right: 1px solid rgba(255,255,255,0.08);
}

.pass-meta-cell:last-child { border-right: none; }

.pmc-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.38);
  text-transform: uppercase;
  margin-bottom: 5px;
}

.pmc-value {
  font-weight: 600;
  font-size: 13px;
  color: rgba(255,255,255,0.88);
}

.pmc-value a {
  color: #6EB8FF !important;
  text-decoration: none;
}

.pmc-value a:hover { opacity: 0.8; }

/* action buttons row */
.pass-actions {
  display: flex;
  gap: 8px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

/* ── info table ── */
.info-table {
  border-bottom: 1px solid var(--border);
}

.info-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

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

.info-row:hover { background: rgba(0,113,227,0.025); }

.ir-key {
  padding: 14px 16px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  text-transform: uppercase;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  background: var(--bg);
}

.ir-val {
  padding: 14px 20px;
  font-size: 13.5px;
  color: var(--text-primary);
  line-height: 1.7;
}

/* metric dots */
.metric-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}

.metric-dot.green  { background: var(--accent-strong); }
.metric-dot.yellow { background: var(--accent-early); }
.metric-dot.red    { background: #FF3B30; }

/* ── scores block ── */
.scores-block {
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.scores-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.scores-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.score-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.score-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.09);
}

.si-icon {
  font-size: 15px;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.si-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  text-transform: uppercase;
}

.si-value {
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  line-height: 1;
  margin-top: 2px;
}

.si-value span {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 400;
}

.si-bar {
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  margin-top: 10px;
  overflow: hidden;
}

.si-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── alert blocks ── */
.alert-block {
  display: flex;
  gap: 14px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
  border-left: 3px solid transparent;
  transition: background 0.15s;
}

.alert-block:hover { background: rgba(0,0,0,0.015); }

.alert-block.risk   { border-left-color: #FF3B30; }
.alert-block.why    { border-left-color: var(--accent-developing); }
.alert-block.action { border-left-color: var(--accent-early); }
.alert-block.notes  { border-left-color: var(--border); }

.ab-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.alert-block.risk   .ab-icon { background: rgba(255,59,48,0.10);  color: #FF3B30; }
.alert-block.why    .ab-icon { background: rgba(0,113,227,0.10);  color: #0071E3; }
.alert-block.action .ab-icon { background: rgba(255,159,10,0.12); color: #C07600; }
.alert-block.notes  .ab-icon { background: var(--bg); color: var(--text-tertiary); border: 1px solid var(--border); }

.ab-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--text-tertiary);
  text-transform: uppercase;
  margin-bottom: 5px;
}

.ab-text {
  font-size: 13.5px;
  color: var(--text-primary);
  line-height: 1.7;
}

.ab-italic { font-style: italic; }

/* ── snapshot footer ── */
.snapshot {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.snap-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  text-transform: uppercase;
  white-space: nowrap;
}

.snap-scores {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.snap-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 12px;
  border-left: 3px solid var(--accent-developing);
}

.snap-item b {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.2px;
}

.snap-item span {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* ── pass footer ── */
.pass-footer {
  display: flex;
  justify-content: space-between;
  padding: 14px 28px;
  font-size: 12px;
  color: var(--text-tertiary);
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.pass-footer b { color: var(--text-secondary); font-weight: 600; }

/* standalone detail page */
.detail-main { background: var(--bg); }

.detail-wrap.standalone {
  padding: 28px 32px;
  max-width: 860px;
}

.detail-wrap.standalone .passport {
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(0,0,0,0.10), 0 1px 4px rgba(0,0,0,0.06);
}

/* ════════════════════════════════════════
   MOBILE detail panel content (≤ 768px)
   ════════════════════════════════════════ */
@media (max-width: 768px) {

  .pass-header {
    padding: 20px 16px 18px;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .pass-avatar { width: 48px; height: 48px; font-size: 20px; border-radius: 13px; }
  .pass-name { font-size: 19px; }
  .pass-tagline { font-size: 12px; }
  .pass-signal-badge { font-size: 11px; padding: 5px 11px; }

  .pass-meta-row { grid-template-columns: repeat(2, 1fr); }
  .pass-meta-cell { padding: 11px 14px; }
  .pass-meta-cell:nth-child(2)  { border-right: none; }
  .pass-meta-cell:nth-child(3)  { border-right: 1px solid rgba(255,255,255,0.08); border-top: 1px solid rgba(255,255,255,0.08); }
  .pass-meta-cell:nth-child(4)  { border-right: none; border-top: 1px solid rgba(255,255,255,0.08); }

  .pass-actions {
    padding: 10px 14px !important;
    flex-wrap: wrap;
    gap: 8px !important;
  }
  .pass-actions .action-btn { flex: 1; min-width: 80px; text-align: center; }

  .info-row { grid-template-columns: 1fr; }
  .ir-key {
    padding: 9px 16px 5px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    font-size: 10px;
  }
  .ir-val { padding: 8px 16px 14px; font-size: 13px; }

  .scores-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .scores-block { padding: 18px 14px; }
  .score-item { padding: 14px; }
  .si-icon { width: 28px; height: 28px; font-size: 14px; margin-bottom: 6px; }
  .si-value { font-size: 22px; }

  .alert-block { padding: 12px 16px; }
  .ab-icon { width: 30px; height: 30px; font-size: 14px; border-radius: 8px; }
  .ab-text { font-size: 13px; }

  .snapshot { flex-direction: column; gap: 12px; padding: 14px 16px; }
  .snap-scores { gap: 14px; flex-wrap: wrap; }
  .snap-item b { font-size: 13px; }
  .snap-item span { font-size: 10px; }

  .pass-footer { padding: 12px 16px; font-size: 11px; }

  .detail-wrap.standalone { padding: 12px; max-width: 100%; }
}

/* ── Score cards: colored top border per position ── */
.score-item:nth-child(1) { border-top: 3px solid var(--accent-developing); }
.score-item:nth-child(2) { border-top: 3px solid var(--accent-score); }
.score-item:nth-child(3) { border-top: 3px solid var(--accent-strong); }
.score-item:nth-child(4) { border-top: 3px solid var(--accent-early); }

/* ── Info table: alternating row tint ── */
.info-row:nth-child(even) .ir-val {
  background: rgba(0, 113, 227, 0.018);
}
.info-row:nth-child(even) .ir-key {
  background: rgba(0, 113, 227, 0.03);
}

/* ── Alert blocks: subtle background tint ── */
.alert-block.risk   { background: rgba(255, 59, 48, 0.03); }
.alert-block.why    { background: rgba(0, 113, 227, 0.03); }
.alert-block.action { background: rgba(255, 159, 10, 0.03); }

/* ── Snapshot: dark gradient mirroring the header ── */
.snapshot {
  background: linear-gradient(135deg, #09152B 0%, #143563 100%) !important;
  border-bottom: none !important;
  padding: 20px 28px !important;
}

.snap-label {
  color: rgba(255, 255, 255, 0.42) !important;
}

.snap-item {
  border-left-color: rgba(255, 255, 255, 0.25) !important;
}

.snap-item span {
  color: rgba(255, 255, 255, 0.45) !important;
}

/* ── Footer: subtle dark tint to connect with snapshot ── */
.pass-footer {
  background: #0d1e3a !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.35) !important;
}

.pass-footer b {
  color: rgba(255, 255, 255, 0.6) !important;
}