/* Engineering department — supplemental styles layered on departments.css. */

.eng-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.eng-chart-card .dept-section-body {
  padding-top: 8px;
}

.eng-chart-card canvas {
  width: 100% !important;
  max-height: 220px;
}

.dept-kpi-sublabel {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  letter-spacing: 0.01em;
}

.eng-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.eng-filter-chip {
  background: var(--bg-card, rgba(255,255,255,0.04));
  color: var(--text-primary, #e2e8f0);
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.eng-filter-chip:hover {
  border-color: #60a5fa;
  color: #60a5fa;
}

.eng-filter-chip.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.eng-filter-chip.eng-filter-reset {
  background: transparent;
  color: var(--text-muted, #94a3b8);
}

.eng-filter-meta {
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
}

.dept-table td.eng-cycle-warn {
  color: #f59e0b;
  font-weight: 600;
}

.dept-table td.eng-cycle-bad {
  color: #f43f5e;
  font-weight: 600;
}

/* ── ITSC Roadmap tab ─────────────────────────────────────────────── */

.itsc-intro {
  font-size: 13px;
  color: var(--text-secondary, #cbd5e1);
  margin-bottom: 12px;
  line-height: 1.5;
}

.itsc-intro code {
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.itsc-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.itsc-toolbar-spacer { flex: 1; }

.itsc-search {
  background: var(--bg-card, rgba(255, 255, 255, 0.04));
  color: var(--text-primary, #e2e8f0);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  min-width: 220px;
}

.itsc-select {
  background: var(--bg-card, rgba(255, 255, 255, 0.04));
  color: var(--text-primary, #e2e8f0);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
}

.itsc-btn-primary {
  background: #2563eb;
  color: #fff;
  border: 1px solid #2563eb;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.itsc-btn-primary:hover { background: #1d4ed8; }
.itsc-btn-primary:disabled { opacity: 0.5; cursor: wait; }

.itsc-btn-secondary {
  background: transparent;
  color: var(--text-primary, #e2e8f0);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.15));
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
}
.itsc-btn-secondary:hover { border-color: #60a5fa; color: #60a5fa; }

.itsc-btn-danger {
  background: transparent;
  color: #f43f5e;
  border: 1px solid #f43f5e;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
}
.itsc-btn-danger:hover { background: #f43f5e; color: #fff; }

.itsc-btn-link {
  background: none;
  border: none;
  color: #60a5fa;
  font-size: 12px;
  cursor: pointer;
  padding: 0 4px;
}
.itsc-btn-link:hover { text-decoration: underline; }

/* ─────────────────────────────────────────────────────────────────────
   Summary cards — three rows: KPI strip / distribution bars / action lists.
   All rows are uniform-height; cards use the same theme tokens as the
   rest of the app so density and contrast match the dashboard chrome.
   ─────────────────────────────────────────────────────────────────── */

.itsc-summary-wrap { margin: 16px 0; display: grid; gap: 12px; }

/* Row 1 — KPI strip: small headline tiles in one row. */
.itsc-kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
@media (max-width: 1080px) {
  .itsc-kpi-strip { grid-template-columns: repeat(2, 1fr); }
}
.itsc-kpi-tile {
  background: var(--bg-card, #1a2234);
  border: 1px solid var(--border, #2d3748);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 88px;
  justify-content: center;
}
.itsc-kpi-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary, #cbd5e1);
  font-weight: 600;
}
.itsc-kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary, #e2e8f0);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.itsc-kpi-value.accent-blue   { color: #60a5fa; }
.itsc-kpi-value.accent-green  { color: #4ade80; }
.itsc-kpi-value.accent-amber  { color: #fbbf24; }
.itsc-kpi-value.accent-red    { color: #f87171; }
.itsc-kpi-sub {
  font-size: 11px;
  color: var(--text-secondary, #cbd5e1);
}

/* Row 2 — Distributions: 4 equal cards with horizontal mini-bars. */
.itsc-dist-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 1080px) {
  .itsc-dist-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .itsc-dist-row { grid-template-columns: 1fr; }
}

/* Row 3 — Action lists: 2 equal cards side by side. */
.itsc-action-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 900px) {
  .itsc-action-row { grid-template-columns: 1fr; }
}

.itsc-summary-tile {
  background: var(--bg-card, #1a2234);
  border: 1px solid var(--border, #2d3748);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.itsc-summary-tile-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary, #cbd5e1);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.itsc-summary-tile-meta {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.itsc-summary-tile-body {
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.itsc-summary-empty {
  color: var(--text-muted, #94a3b8);
  font-size: 12px;
  font-style: italic;
}

/* Horizontal mini-bar rows inside distribution cards. */
.itsc-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.itsc-bar-row-label {
  color: var(--text-primary, #e2e8f0);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.itsc-bar-track {
  position: relative;
  height: 18px;
  background: var(--bg-tertiary, #1e293b);
  border: 1px solid var(--border, #2d3748);
  border-radius: 5px;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}
.itsc-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  border-radius: 4px;
  transition: width 220ms ease;
}
.itsc-bar-fill.tone-green  { background: linear-gradient(90deg, #16a34a, #4ade80); }
.itsc-bar-fill.tone-amber  { background: linear-gradient(90deg, #d97706, #fbbf24); }
.itsc-bar-fill.tone-red    { background: linear-gradient(90deg, #dc2626, #f87171); }
.itsc-bar-fill.tone-muted  { background: linear-gradient(90deg, #475569, #94a3b8); }
.itsc-bar-row-count {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text-secondary, #cbd5e1);
  text-align: right;
}
.itsc-bar-name-only {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

/* Action lists (upcoming / blocked) */
.itsc-summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.itsc-summary-list li {
  padding: 7px 0;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.05));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.itsc-summary-list li:last-child { border-bottom: none; }
.itsc-summary-list a {
  color: var(--text-primary, #e2e8f0);
  text-decoration: none;
  font-size: 12.5px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.itsc-summary-list a:hover { color: #60a5fa; }
.itsc-summary-meta {
  font-size: 11px;
  color: var(--text-secondary, #cbd5e1);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ─────────────────────────────────────────────────────────────────────
   Table — sortable column headers, hover row, sort indicators.
   ─────────────────────────────────────────────────────────────────── */
.itsc-table tbody tr.itsc-row { cursor: pointer; }
.itsc-table tbody tr.itsc-row:hover { background: rgba(96, 165, 250, 0.06); }

.itsc-table thead th.itsc-sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 22px;
  transition: color 120ms ease, background 120ms ease;
}
.itsc-table thead th.itsc-sortable:hover {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.05);
}
.itsc-table thead th.itsc-sortable::after {
  content: '↕';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--text-muted, #94a3b8);
  opacity: 0.4;
}
.itsc-table thead th.itsc-sortable.sort-asc::after {
  content: '▲';
  opacity: 1;
  color: #60a5fa;
}
.itsc-table thead th.itsc-sortable.sort-desc::after {
  content: '▼';
  opacity: 1;
  color: #60a5fa;
}

/* Detail view */
.itsc-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px 0;
}
.itsc-detail-actions { display: flex; gap: 8px; }

.itsc-detail-title-row { margin-bottom: 12px; }
.itsc-detail-title {
  font-size: 22px;
  margin: 0 0 4px;
  color: var(--text-primary, #e2e8f0);
}
.itsc-detail-sub {
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
}

.itsc-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 16px;
  margin: 12px 0;
}

.itsc-detail-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13px;
}
.itsc-detail-cell-wide { grid-column: 1 / -1; }
.itsc-detail-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #94a3b8);
}

.itsc-detail-section-title {
  margin-top: 20px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #e2e8f0);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 4px;
}

.itsc-flags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.itsc-flag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.itsc-flag-chip.on {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}
.itsc-flag-chip.off { color: var(--text-muted, #94a3b8); }

.itsc-detail-briefs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}

.itsc-detail-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 10px 12px;
}
.itsc-detail-panel-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 6px;
}
.itsc-detail-panel-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary, #e2e8f0);
}
.itsc-detail-panel-empty {
  border-style: dashed;
  opacity: 0.7;
}
.itsc-detail-panel-empty-msg {
  font-size: 12px;
  font-style: italic;
  color: var(--text-muted, #94a3b8);
}

.itsc-detail-voters {
  max-width: 420px;
}

.itsc-detail-audit {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
}

/* ─────────────────────────────────────────────────────────────────────
   Form overlay — centered, height-capped, scrolls inside the panel
   so the dashboard underneath stays locked. Background uses the same
   theme tokens the rest of the app uses (--bg-card / --bg-tertiary /
   --border-color) so the panel reads as a solid surface against the
   dim backdrop instead of a washed-out tinted sheet.
   ─────────────────────────────────────────────────────────────────── */
.itsc-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

/* Lock body scroll while the modal is open so the page underneath
   can't scroll out from beneath the panel. JS toggles the class. */
body.itsc-modal-open { overflow: hidden; }

.itsc-overlay-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 14, 0.78);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.itsc-overlay-panel {
  position: relative;
  background: var(--bg-card, #1a2234);
  border: 1px solid var(--border, #2d3748);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  width: 100%;
  max-width: 880px;
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1;
}

.itsc-overlay-header {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border, #2d3748);
  background: var(--bg-card, #1a2234);
}
.itsc-overlay-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary, #e2e8f0);
  letter-spacing: 0.01em;
}

.itsc-overlay-close {
  background: transparent;
  border: 1px solid var(--border, #2d3748);
  color: var(--text-secondary, #cbd5e1);
  width: 30px;
  height: 30px;
  border-radius: 6px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: inherit;
  transition: border-color 120ms ease, color 120ms ease;
}
.itsc-overlay-close:hover {
  border-color: #f43f5e;
  color: #f43f5e;
}

/* The form is the scrollable region between header + footer. The
   footer uses position: sticky so Save / Cancel stay visible no
   matter how far the user scrolls down the form. */
#itsc-form {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px 24px 16px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.itsc-form-errors {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 12px;
}
.itsc-form-errors ul { margin: 4px 0 0 18px; padding: 0; }

.itsc-fieldset {
  border: 1px solid var(--border, #2d3748);
  border-radius: 10px;
  padding: 14px 18px 16px;
  margin: 0 0 16px;
  background: var(--bg-secondary, #111827);
}
.itsc-fieldset legend {
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary, #cbd5e1);
}

.itsc-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 16px;
}

.itsc-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  min-width: 0;
}
.itsc-field-wide { grid-column: 1 / -1; }
.itsc-field > span {
  color: var(--text-secondary, #cbd5e1);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.itsc-required { color: #f43f5e; font-weight: 700; }

.itsc-field input,
.itsc-field select,
.itsc-field textarea {
  background: var(--bg-tertiary, #1e293b);
  color: var(--text-primary, #e2e8f0);
  border: 1px solid var(--border, #2d3748);
  border-radius: 6px;
  padding: 8px 11px;
  font-size: 13px;
  font-family: inherit;
  width: 100%;
  min-width: 0;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.itsc-field input::placeholder,
.itsc-field textarea::placeholder {
  color: var(--text-muted, #94a3b8);
}
.itsc-field select {
  /* Match the input look across browsers — kill the native chrome
     and add our own caret so the dropdowns don't render as a tiny
     OS-themed widget that clashes with the dark panel. */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-secondary, #cbd5e1) 50%),
                    linear-gradient(135deg, var(--text-secondary, #cbd5e1) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
}
.itsc-field textarea {
  resize: vertical;
  min-height: 64px;
}
.itsc-field input:focus,
.itsc-field select:focus,
.itsc-field textarea:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.18);
}

.itsc-flags-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}
.itsc-flag-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--bg-tertiary, #1e293b);
  border: 1px solid var(--border, #2d3748);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-primary, #e2e8f0);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}
.itsc-flag-checkbox:hover { border-color: #60a5fa; }
.itsc-flag-checkbox input {
  margin: 0;
  width: 15px;
  height: 15px;
  accent-color: #60a5fa;
  cursor: pointer;
}

.itsc-voter-block { margin-top: 14px; }
.itsc-voter-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--text-primary, #e2e8f0);
}
.itsc-voter-hint { color: var(--text-secondary, #cbd5e1); flex: 1; font-size: 11px; }

.itsc-voter-row {
  display: grid;
  grid-template-columns: 1fr 100px 32px;
  gap: 8px;
  margin-bottom: 6px;
}
.itsc-voter-row input {
  background: var(--bg-tertiary, #1e293b);
  color: var(--text-primary, #e2e8f0);
  border: 1px solid var(--border, #2d3748);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12px;
}
.itsc-voter-row input:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.18);
}
.itsc-voter-empty {
  font-size: 12px;
  color: var(--text-secondary, #cbd5e1);
  font-style: italic;
  padding: 6px 0;
}

/* Sticky footer — stays anchored at the bottom of the scroll region
   so Save and Cancel are always reachable even on a tall form. */
.itsc-form-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 0 4px;
  margin-top: auto;
  background: linear-gradient(to top, var(--bg-card, #1a2234) 80%, rgba(26, 34, 52, 0));
}

@media (max-width: 720px) {
  .itsc-form-grid { grid-template-columns: 1fr; }
  .itsc-overlay { padding: 16px 12px; }
  .itsc-overlay-panel { max-height: calc(100vh - 32px); }
  #itsc-form { padding: 14px 16px 12px; }
  .itsc-overlay-header { padding: 12px 16px; }
}

/* ─────────────────────────────────────────────────────────────────────
   ITSC subtabs — Roadmap | Salesforce Plan (V2)
   Lives inside #panel-itsc; chrome modelled on the .dept-tab strip
   above it but visually de-weighted so it reads as a child level.
   ─────────────────────────────────────────────────────────────────── */

.itsc-subnav {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin: 0 0 16px;
  background: var(--bg-tertiary, #0f1623);
  border: 1px solid var(--border, #2d3748);
  border-radius: 10px;
  width: fit-content;
}

.itsc-subtab {
  background: transparent;
  border: none;
  color: var(--text-secondary, #cbd5e1);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.itsc-subtab:hover {
  color: var(--text-primary, #e2e8f0);
  background: rgba(96, 165, 250, 0.07);
}
.itsc-subtab.active {
  background: var(--bg-card, #1a2234);
  color: var(--text-primary, #e2e8f0);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset;
}

.itsc-subpanel { display: none; }
.itsc-subpanel.itsc-subpanel-active { display: block; }

/* ─────────────────────────────────────────────────────────────────────
   Salesforce Plan (V2) — in-app review document.
   Source: templates/_dept_engineering_itsc_sf_plan.html
   Goal: dense, scannable, citation-grade. Matches dashboard chrome.
   All selectors namespaced under .itsc-sfp so they cannot leak.
   ─────────────────────────────────────────────────────────────────── */

.itsc-sfp {
  color: var(--text-primary, #e2e8f0);
  font-size: 14px;
  line-height: 1.55;
  max-width: 1100px;
}

/* Header banner */
.itsc-sfp-header {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.08), rgba(96, 165, 250, 0.02));
  border: 1px solid var(--border, #2d3748);
  border-left: 3px solid #60a5fa;
  border-radius: 10px;
  padding: 18px 22px;
  margin: 0 0 18px;
}
.itsc-sfp-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary, #cbd5e1);
  font-weight: 600;
  margin-bottom: 8px;
}
.itsc-sfp-version-badge {
  background: #60a5fa;
  color: #0f1623;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  letter-spacing: 0.05em;
  font-weight: 700;
}
.itsc-sfp-eyebrow-text { letter-spacing: 0.08em; }
.itsc-sfp-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text-primary, #e2e8f0);
}
.itsc-sfp-lede {
  margin: 0;
  color: var(--text-secondary, #cbd5e1);
  font-size: 13.5px;
  max-width: 880px;
}

/* TOC */
.itsc-sfp-toc {
  background: var(--bg-card, #1a2234);
  border: 1px solid var(--border, #2d3748);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 0 0 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.itsc-sfp-toc-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
  margin-right: 6px;
}
.itsc-sfp-toc a {
  color: #93c5fd;
  text-decoration: none;
  font-size: 12.5px;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(96, 165, 250, 0.06);
  transition: background 0.12s ease;
}
.itsc-sfp-toc a:hover {
  background: rgba(96, 165, 250, 0.15);
  text-decoration: none;
}

/* Sections */
.itsc-sfp-section {
  background: var(--bg-card, #1a2234);
  border: 1px solid var(--border, #2d3748);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 0 0 14px;
  scroll-margin-top: 12px; /* anchor jumps land below sticky-ish chrome */
}
.itsc-sfp-h {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text-primary, #e2e8f0);
  border-bottom: 1px solid var(--border, #2d3748);
  padding-bottom: 8px;
}
.itsc-sfp-h4 {
  font-size: 13.5px;
  font-weight: 700;
  margin: 18px 0 8px;
  color: var(--text-primary, #e2e8f0);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.itsc-sfp-section p,
.itsc-sfp-section ul,
.itsc-sfp-section ol {
  color: var(--text-secondary, #cbd5e1);
  margin: 8px 0;
}
.itsc-sfp-section ul,
.itsc-sfp-section ol { padding-left: 22px; }
.itsc-sfp-section li { margin: 4px 0; }
.itsc-sfp-section code {
  background: rgba(15, 22, 35, 0.6);
  color: #fde68a;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12.5px;
  font-family: 'SF Mono', Menlo, Consolas, 'Courier New', monospace;
}
.itsc-sfp-section strong { color: var(--text-primary, #e2e8f0); }
.itsc-sfp-section em { color: var(--text-secondary, #cbd5e1); }

/* Tables */
.itsc-sfp-table-wrap {
  overflow-x: auto;
  margin: 10px 0;
  border: 1px solid var(--border, #2d3748);
  border-radius: 8px;
}
.itsc-sfp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.itsc-sfp-table thead th {
  background: var(--bg-tertiary, #0f1623);
  color: var(--text-secondary, #cbd5e1);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border, #2d3748);
}
.itsc-sfp-table tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(45, 55, 72, 0.5);
  vertical-align: top;
  color: var(--text-primary, #e2e8f0);
}
.itsc-sfp-table tbody tr:last-child td { border-bottom: none; }
.itsc-sfp-table tbody tr:hover td { background: rgba(96, 165, 250, 0.04); }
.itsc-sfp-table .itsc-sfp-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Highlight rows added/changed in v2 */
.itsc-sfp-row-new td {
  background: rgba(74, 222, 128, 0.04);
  border-left: 2px solid rgba(74, 222, 128, 0.5);
}
.itsc-sfp-row-new:first-child td:first-child { border-top-left-radius: 4px; }

.itsc-sfp-new-tag {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  font-size: 10px;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
}

/* Pre-formatted diagrams */
.itsc-sfp-diagram {
  background: var(--bg-tertiary, #0f1623);
  border: 1px solid var(--border, #2d3748);
  border-radius: 8px;
  padding: 14px 16px;
  font-family: 'SF Mono', Menlo, Consolas, 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-primary, #e2e8f0);
  overflow-x: auto;
  white-space: pre;
  margin: 12px 0;
}
.itsc-sfp-diagram strong { color: #93c5fd; }

/* Callout */
.itsc-sfp-callout {
  background: rgba(251, 191, 36, 0.08);
  border-left: 3px solid #fbbf24;
  padding: 10px 14px;
  border-radius: 6px;
  margin: 12px 0;
  color: var(--text-primary, #e2e8f0);
  font-size: 13.5px;
}

.itsc-sfp-note {
  background: rgba(96, 165, 250, 0.05);
  border-left: 2px solid rgba(96, 165, 250, 0.4);
  padding: 8px 12px;
  border-radius: 5px;
  margin: 8px 0;
  font-size: 13px;
  color: var(--text-secondary, #cbd5e1);
}

/* Footer */
.itsc-sfp-footer {
  margin: 18px 0 0;
  padding: 14px 18px;
  border: 1px dashed var(--border, #2d3748);
  border-radius: 8px;
  background: rgba(15, 22, 35, 0.4);
}
.itsc-sfp-footer p { margin: 0 0 6px; color: var(--text-secondary, #cbd5e1); font-size: 13px; }
.itsc-sfp-footer p:last-child { margin: 0; }
.itsc-sfp-footer-meta {
  font-size: 11.5px !important;
  color: var(--text-muted, #94a3b8) !important;
  font-style: italic;
}

@media (max-width: 720px) {
  .itsc-sfp-section { padding: 14px 16px; }
  .itsc-sfp-header { padding: 14px 16px; }
  .itsc-sfp-table { font-size: 12px; }
  .itsc-sfp-table thead th,
  .itsc-sfp-table tbody td { padding: 7px 9px; }
}
