.presentation-shell .presentation-hero {
  padding: 16px 18px;
  border-radius: 16px;
}

.presentation-shell .presentation-hero h2 {
  font-size: 24px;
  line-height: 1.15;
  margin: 0 0 8px;
}

.presentation-shell .presentation-hero p {
  font-size: 13px;
  line-height: 1.45;
  max-width: 920px;
}

.presentation-command {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.presentation-command label {
  display: grid;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.presentation-command .input,
.presentation-command select {
  min-height: 38px;
  font-size: 13px;
  border-radius: 12px;
}

.presentation-kpis {
  display: grid;
  grid-template-columns: repeat(8, minmax(110px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.presentation-kpi {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 10px 12px;
  min-height: 70px;
  display: grid;
  grid-template-columns: 28px 1fr;
  column-gap: 8px;
  align-items: center;
}

.presentation-kpi i {
  grid-row: span 2;
  color: #3557d4;
  font-size: 18px;
}

.presentation-kpi span {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
}

.presentation-kpi strong {
  display: block;
  margin-top: 2px;
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
}

.presentation-kpis.modal-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.presentation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 14px;
}

.presentation-top-grid {
  display: grid;
  grid-template-columns: minmax(300px, .9fr) minmax(280px, .8fr) minmax(360px, 1fr) minmax(320px, .9fr);
  gap: 12px;
}

.presentation-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.presentation-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 14px;
  min-width: 0;
}

.presentation-panel h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.presentation-panel .sub {
  font-size: 13px;
}

.chart-row {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.donut-chart {
  width: 210px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(#ba4d4b 0deg, #ba4d4b var(--below, 0deg), #c59a31 var(--below, 0deg), #c59a31 var(--mid, 0deg), #4b9568 var(--mid, 0deg), #4b9568 var(--high, 0deg), #4b5bd5 var(--high, 0deg), #4b5bd5 360deg);
}

.donut-chart::after {
  content: attr(data-total);
  width: 112px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 900;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.legend-list,
.rank-list,
.bottleneck-list,
.evidence-list,
.project-list {
  display: grid;
  gap: 10px;
  max-height: 440px;
  overflow: auto;
  padding-right: 4px;
}

.legend-list.compact,
.rank-list.compact,
.bottleneck-list.compact {
  max-height: 280px;
}

.portfolio-stack {
  display: flex;
  height: 18px;
  border-radius: 999px;
  overflow: hidden;
  background: #e9eef6;
  margin: 18px 0 14px;
}

.portfolio-stack-segment {
  width: max(var(--w, 0%), 0%);
  min-width: var(--w, 0%);
  background: var(--c, #4b5bd5);
}

.legend-item,
.rank-item,
.bottleneck-item,
.evidence-item,
.presentation-project {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
  padding: 12px;
}

.bottleneck-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  background: #fffafa;
}

.bottleneck-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ba4d4b;
  background: #fff0f0;
}

.compact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 12px;
  align-items: center;
}

.mini-progress {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 8px;
  align-items: center;
}

.legend-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  background: var(--dot, #4b5bd5);
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: #e9eef6;
  overflow: hidden;
  margin-top: 8px;
}

.bar-fill {
  height: 100%;
  width: var(--w, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, #ba4d4b, #4b5bd5);
}

.line-chart {
  min-height: 210px;
  display: flex;
  align-items: end;
  gap: 7px;
  padding: 18px 8px 8px;
  border-radius: 14px;
  background: repeating-linear-gradient(to top, #eef3fa 0 1px, transparent 1px 36px);
}

.line-chart.compact {
  min-height: 190px;
}

.line-bar {
  flex: 1;
  min-width: 8px;
  height: var(--h, 8%);
  border-radius: 9px 9px 2px 2px;
  background: linear-gradient(180deg, #4b5bd5, #83a4ff);
}

.presentation-project strong,
.rank-item strong,
.bottleneck-item strong {
  font-size: 15px;
  line-height: 1.25;
}

.presentation-project .project-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.star-rating {
  color: #c59a31;
  font-weight: 900;
  letter-spacing: .03em;
  white-space: nowrap;
}

.table-wrap {
  overflow: auto;
  max-height: 420px;
}

.presentation-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.presentation-table th,
.presentation-table td {
  text-align: left;
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.presentation-table th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  background: #f8fbff;
  position: sticky;
  top: 0;
  z-index: 1;
}

.table-progress {
  display: grid;
  grid-template-columns: 44px minmax(80px, 1fr);
  gap: 8px;
  align-items: center;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-actions .btn-light,
.project-actions .btn-primary {
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 10px;
  font-size: 12px;
}

body.presentation-modal-active {
  overflow: hidden;
}

.presentation-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999;
  background: rgba(15, 23, 42, .48);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  box-sizing: border-box;
}

.presentation-modal.open {
  display: flex;
}

.presentation-modal-card {
  width: min(1280px, 94vw);
  height: min(860px, 90vh);
  max-height: 90vh;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 28px 80px rgba(15, 23, 42, .24);
  display: flex;
  flex-direction: column;
}

.presentation-modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  padding: 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.presentation-modal-body {
  padding: 16px;
  overflow: auto;
  min-height: 0;
}

.evidence-thumb {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  margin-top: 8px;
}

.evidence-thumb.large {
  max-height: 70vh;
}

.evidence-placeholder {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 86px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: #f8fbff;
}

.evidence-placeholder i {
  font-size: 24px;
}

.timeline-project-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.evidence-timeline {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 220px);
  gap: 12px;
  min-width: 700px;
  padding: 112px 8px 112px;
  overflow-x: auto;
}

.evidence-timeline::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 50%;
  height: 3px;
  border-radius: 999px;
  background: #b9c5d8;
}

.timeline-bubble {
  position: relative;
  min-height: 245px;
}

.timeline-node {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #3557d4;
  box-shadow: 0 0 0 4px #eef3ff;
  z-index: 2;
  font-size: 13px;
}

.timeline-card {
  position: absolute;
  left: 0;
  right: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 8px;
  min-height: 190px;
  overflow: visible;
  box-shadow: 0 10px 24px rgba(15,23,42,.07);
  transition: transform .18s ease, box-shadow .18s ease;
}

.timeline-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.timeline-card strong {
  display: block;
  font-size: 13px;
  line-height: 1.18;
  margin-top: 4px;
}

.timeline-card .small {
  font-size: 10.5px;
  line-height: 1.25;
}

.timeline-eye {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f4f7fb;
  color: #1b2740;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.timeline-eye:hover {
  background: #e9eef8;
  color: #3557d4;
}

.timeline-bubble.above .timeline-card {
  bottom: calc(50% + 26px);
}

.timeline-bubble.below .timeline-card {
  top: calc(50% + 26px);
}

.timeline-card p {
  font-size: 10.5px;
  line-height: 1.28;
  margin: 4px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.timeline-evidence-media {
  width: 100%;
  height: 104px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 0;
  margin-top: 4px;
  border-radius: 8px;
  background: #eef2f7;
}

.timeline-evidence-media img,
.timeline-card .evidence-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}

.timeline-evidence-media.evidence-placeholder {
  min-height: 104px;
  border: 1px dashed var(--line);
  color: var(--muted);
}

.evidence-image-button {
  cursor: pointer;
  padding: 0;
}

.milestone-modal-timeline {
  margin-top: 14px;
}

.evidence-hydration {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7f9fd;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.evidence-hydration i,
.evidence-loading i {
  animation: evidence-spin .9s linear infinite;
}

@keyframes evidence-spin {
  to { transform: rotate(360deg); }
}

.timeline-card:hover {
  z-index: 5;
  transform: scale(1.015);
  box-shadow: 0 14px 34px rgba(15,23,42,.14);
}

.milestone-evidence-flow {
  position: relative;
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding-left: 20px;
}

.milestone-evidence-flow::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #d8e0ee;
}

.milestone-evidence-row {
  position: relative;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
}

.milestone-evidence-row::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3557d4;
  box-shadow: 0 0 0 4px #eef3ff;
}

.evidence-date {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.milestone-evidence-body {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
  padding: 12px;
}

.milestone-evidence-body p {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.milestone-evidence-body .evidence-thumb.large {
  width: min(100%, 560px);
  max-height: 340px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

@media (max-width: 1280px) {
  .presentation-command { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .presentation-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .presentation-grid, .presentation-two, .presentation-top-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .presentation-command, .presentation-kpis, .chart-row, .presentation-grid, .presentation-two, .presentation-top-grid { grid-template-columns: 1fr; }
  .donut-chart { width: min(220px, 74vw); }
  .presentation-table { min-width: 760px; }
  .evidence-timeline { min-width: 660px; }
  .timeline-project-head { align-items: flex-start; flex-direction: column; }
  .milestone-evidence-row { grid-template-columns: 1fr; }
}
