:root {
  --bbva: #072e6f;
  --blue: #001391;
  --light: #f4f7fb;
  --card: #fff;
  --ink: #071b4d;
  --muted: #60708f;
  --line: #d9e2f3;
  --green: #20a676;
  --yellow: #ffc247;
  --red: #ef6b6b;
  --cyan: #37b7c9;
  --purple: #6755c4;
  --shadow: 0 14px 34px rgba(7, 46, 111, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: var(--light);
  color: var(--ink);
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 118px;
  background: var(--bbva);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 12px;
  gap: 28px;
  position: fixed;
  inset: 0 auto 0 0;
}

.brand {
  font-size: 28px;
  letter-spacing: 1px;
}

.tower-mark {
  font-size: 42px;
  margin-top: 120px;
}

.side-title {
  text-align: center;
  font-weight: 800;
  font-size: 20px;
  line-height: 1.05;
}

.main {
  margin-left: 118px;
  padding: 42px 52px;
  width: calc(100% - 118px);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 32px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
}

h1 {
  font-family: Georgia, serif;
  color: var(--blue);
  font-size: 52px;
  line-height: 1;
  margin: 0;
}

.subtitle {
  color: var(--blue);
  font-size: 22px;
  margin: 10px 0 0;
}

h2,
h3,
h4 {
  font-family: Georgia, serif;
  color: var(--blue);
}

.home-link,
.ghost-button {
  border: 0;
  background: #eaf1ff;
  color: var(--blue);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  cursor: pointer;
}

.home-link {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.data-status {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
  white-space: nowrap;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 8px;
}

.data-source-btn {
  border: 0;
  background: var(--blue);
  color: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  margin-left: 10px;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease,
    filter 0.18s ease;
}

.data-source-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.data-source-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.data-source-btn.secondary {
  background: #dde8ee;
  color: #17384d;
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 38px;
  box-shadow: var(--shadow);
}

.kpi {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 22px;
  border-right: 1px solid #b8c7e8;
}

.kpi:last-child {
  border-right: 0;
}

.kpi-icon,
.program-icon {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--bbva), #1464c9);
}

.kpi-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;

  background: #edf4ff;
  color: var(--blue);

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 26px;
}

.kpi-label {
  font-family: Georgia, serif;
  color: var(--blue);
  font-weight: 800;
}

.kpi-value {
  font-family: Georgia, serif;
  font-size: 34px;
  color: var(--blue);
  font-weight: 900;
}

.kpi-sub {
  color: var(--muted);
}

.section-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 18px 0;
}

.section-title-row h2 {
  font-size: 34px;
  margin: 0;
}

.section-title-row p {
  color: var(--muted);
  margin: 0;
}

.program-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 22px;
}

.program-card,
.panel,
.module-card,
.program-hero,
.domain,
.layer {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.program-card,
.panel,
.module-card,
.program-hero {
  border-radius: 22px;
  padding: 22px;
}

.program-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 310px;
}

.program-head {
  display: flex;
  gap: 14px;
  align-items: center;
}

.program-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  font-size: 28px;
}

.program-card h3,
.module-card h3,
.panel h3 {
  margin-bottom: 14px;
  line-height: 1.1;
}
.management-section .panel h3 {
  margin-bottom: 18px;
}
.program-card p,
.module-card p {
  margin: 4px 0;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  width: max-content;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: #def7ec;
  color: #08744f;
}

.pill.yellow {
  background: #fff1c9;
  color: #8b6400;
}

.pill.red {
  background: #ffe1e1;
  color: #a92b2b;
}

.progress-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: auto;
}

.donut {
  --p: 50;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--blue) calc(var(--p) * 1%), #e7ebf3 0);
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--blue);
}

.donut::before {
  content: attr(data-label);
  background: #fff;
  border-radius: 50%;
  width: 68%;
  height: 68%;
  display: grid;
  place-items: center;
}

.card-link {
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: #0a4fae;
  font-weight: 900;
  padding-top: 14px;
  cursor: pointer;
  text-align: left;
}

.disabled {
  opacity: 0.55;
}

.program-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.program-hero h2 {
  font-size: 44px;
  margin: 16px 0 4px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 110px);
  gap: 12px;
}

.metric-tile {
  background: #f5f8ff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  text-align: center;
}

.metric-tile strong {
  font-size: 28px;
  color: var(--blue);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}

.module-card {
  min-height: 170px;
  cursor: pointer;
}

.module-card.active {
  border-color: #75a7ff;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  padding: 9px 12px;
  background: #edf4ff;
  border-radius: 999px;
  color: var(--blue);
  font-weight: 800;
}

.stack-list {
  display: grid;
  gap: 10px;
}

.stack-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f9fbff;
}

/* Functional map */

.functional-map {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.domain {
  border-radius: 20px;
  padding: 18px;
}

.domain h3 {
  margin: 0 0 14px;
}

.capability,
.systems-mini-capability {
  border-left: 4px solid var(--cyan);
  padding: 10px 12px;
  background: #f6fbff;
  border-radius: 12px;
  margin-top: 10px;
}

.capability:first-child {
  margin-top: 0;
}

.capability strong,
.systems-mini-capability strong {
  display: block;
  color: var(--ink);
  margin-bottom: 6px;
}

.feature {
  font-size: 13px;
  color: var(--muted);
  margin-top: 5px;
}

/* Selectors */

.country-selector,
.systems-product-selector {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 0 22px;
  flex-wrap: wrap;
}

.country-flag {
  width: 58px;
  height: 58px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.45;
  filter: grayscale(1);
  overflow: hidden;
  transition:
    opacity 0.18s ease,
    filter 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.country-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.country-flag.active {
  opacity: 1;
  filter: grayscale(0);
  box-shadow: 0 8px 22px rgba(7, 46, 111, 0.16);
  transform: translateY(-1px);
  border-color: #75a7ff;
}

.systems-product-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--blue);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.systems-product-btn:hover {
  transform: translateY(-1px);
}

.systems-product-btn.active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 20px rgba(7, 46, 111, 0.18);
}

/* Systems dashboard */

.systems-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  gap: 18px;
  align-items: start;
}

.systems-dashboard-grid .panel {
  min-height: 520px;
}

.systems-dashboard-grid.system-map-expanded {
  grid-template-columns: minmax(760px, 2.6fr) minmax(220px, 0.65fr) minmax(
      220px,
      0.65fr
    );
}

.systems-dashboard-grid.system-map-expanded > article:nth-child(2),
.systems-dashboard-grid.system-map-expanded > article:nth-child(3) {
  max-height: 760px;
  overflow: auto;
  opacity: 0.72;
}

.systems-dashboard-grid.system-map-expanded .system-map-canvas {
  min-height: 900px;
}

.expand-map-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0 16px;
  border: 1px solid var(--line);
  background: #eaf1ff;
  color: var(--blue);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.expand-map-btn:hover {
  transform: translateY(-1px);
  border-color: var(--cyan);
  box-shadow: 0 8px 18px rgba(7, 46, 111, 0.1);
}

.system-map-canvas {
  position: relative;
}

.system-links-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 3;
}

.system-layers {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.layer {
  width: 100%;
  border-radius: 18px;
  padding: 18px;
}

.layer:not(.layer-half-width) {
  grid-column: 1 / -1;
}

.layer-half-width {
  grid-column: auto;
}

.layer h3 {
  margin: 0 0 12px;
}

.system-groups {
  display: flex;
  /* flex-direction: column; */
  gap: 14px;
}

.system-group-box {
  border: 1px dashed var(--blue);
  border-radius: 18px;
  padding: 14px;
  background: #fbfdff;
}

.system-group-title {
  color: var(--blue);
  font-weight: 900;
  margin-bottom: 12px;
}

.system-level-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 14px 0;
  flex-wrap: wrap;
}

.system-level-row[data-level="3"] {
  justify-content: center;
}

.component {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 72px;
  max-width: 190px;
  padding: 9px 13px;
  background: #f6f8fc;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 0;
  white-space: normal;
  line-height: 1.15;
}

.system-component-card {
  flex: 0 0 auto;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.system-component-card:hover {
  transform: translateY(-1px);
  border-color: var(--cyan);
  box-shadow: 0 8px 18px rgba(7, 46, 111, 0.1);
}

.system-component-card.selected-system-component {
  background: #fff4a3;
  border-color: #e3c400;
  box-shadow: inset 0 0 0 1px #e3c400;
}

.component.affected-by-capability {
  background: #24e000;
  border: 2px solid #159400;
  color: #001391;
  font-weight: 900;
}

/* SVG relationships */

.system-relationship-link {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2;
  stroke-dasharray: 4 4;
  opacity: 0.75;
}

.system-relationship-link.api {
  stroke: var(--cyan);
}

.system-relationship-link.dependency {
  stroke: var(--purple);
}

.system-relationship-link.orchestration {
  stroke: var(--green);
}

.relationship-arrow-head {
  fill: var(--blue);
}

.system-relationship-label {
  font-size: 11px;
  font-weight: 800;
  fill: var(--blue);
  paint-order: stroke;
  stroke: white;
  stroke-width: 4px;
}

/* Right functional map */

.systems-mini-domain {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f9fbff;
  margin-bottom: 12px;
}

.systems-mini-domain h4 {
  margin: 0 0 10px;
}

.feature-card-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.feature-card {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 9px 11px;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.feature-card:hover {
  transform: translateY(-1px);
  border-color: var(--cyan);
  box-shadow: 0 8px 18px rgba(7, 46, 111, 0.1);
}

.feature-card.selected {
  background: #fff4a3;
  border-color: #e3c400;
  box-shadow: inset 0 0 0 1px #e3c400;
}

/* Architecture gaps */

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

.architecture-gap-card {
  width: 100%;
  border: 1px solid var(--line);
  background: #f6f8fc;
  color: var(--ink);
  border-radius: 14px;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.architecture-gap-card:hover {
  transform: translateY(-1px);
  border-color: var(--cyan);
  box-shadow: 0 8px 18px rgba(7, 46, 111, 0.1);
}

.architecture-gap-card.selected {
  background: #fff4a3;
  border-color: #e3c400;
  box-shadow: inset 0 0 0 1px #e3c400;
}

.architecture-gap-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.architecture-gap-status,
.architecture-gap-priority {
  font-size: 12px;
  font-weight: 900;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eaf1ff;
  color: var(--blue);
}

.architecture-gap-title {
  display: block;
  margin-bottom: 12px;
  color: var(--blue);
  line-height: 1.25;
}

.architecture-gap-meta {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

/* Tables */

.table-wrap {
  overflow: auto;
}

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

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--blue);
  font-weight: 900;
  background: #f5f8ff;
}

/* Responsive */

@media (max-width: 1200px) {
  .systems-dashboard-grid,
  .systems-dashboard-grid.system-map-expanded {
    grid-template-columns: 1fr;
  }

  .system-layers {
    grid-template-columns: 1fr;
  }

  .layer,
  .layer-half-width {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1100px) {
  .program-grid,
  .functional-map {
    grid-template-columns: 1fr 1fr;
  }

  .module-grid {
    grid-template-columns: 1fr 1fr;
  }

  .kpi-strip {
    grid-template-columns: 1fr 1fr;
  }

  .kpi {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .sidebar {
    display: none;
  }

  .main {
    margin: 0;
    width: 100%;
    padding: 24px;
  }

  .program-grid,
  .functional-map,
  .module-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 38px;
  }

  .topbar,
  .program-hero {
    flex-direction: column;
  }

  .hero-metrics {
    grid-template-columns: repeat(3, 1fr);
  }
}
/* Grupos en horizontal dentro de la capa GenAI */
.layer h3 {
  display: block;
}

.layer:has(h3) {
  display: flex;
  flex-direction: column;
}

/* Solo capas cuyo título contiene GenAI */
.layer-half-width .system-groups,
.layer:has(h3:first-child) .system-groups {
  display: flex;
  flex-direction: row;
  gap: 18px;
  align-items: stretch;
}

.layer-half-width .system-group-box {
  flex: 1 1 0;
  min-width: 260px;
}
.layer .system-groups {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 18px;
}

.layer .system-group-box {
  flex: 0 1 420px;
  max-width: 520px;
}

.layer .system-group-box:only-child {
  flex-basis: min(760px, 100%);
}
.relationship-label {
  fill: var(--blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  pointer-events: none;
  user-select: none;
  text-anchor: middle;
}
.relationship-label-bg {
  fill: rgba(255, 255, 255, 0.92);
  stroke: rgba(29, 51, 176, 0.15);
}
.relationship-label {
  fill: var(--blue);
  font-size: 10px;
  font-weight: 800;
  text-anchor: middle;
  pointer-events: none;
}

.relationship-label-bg {
  fill: rgba(255, 255, 255, 0.9);
  stroke: rgba(0, 19, 145, 0.18);
}
.footer {
  width: 100%;
  padding: 24px;

  display: flex;
  justify-content: center;
  align-items: center;

  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  color: rgba(0, 19, 145, 0.55);

  border-top: 1px solid rgba(0, 19, 145, 0.08);

  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
}
.management-section {
  margin-top: 22px;
}

.management-list {
  display: grid;
  gap: 12px;
}

.management-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #f6f8fc;
}

.management-card.done {
  background: #f7fffb;
}

.management-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.management-card p {
  margin: 8px 0;
  color: var(--muted);
}

.management-card small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}

.management-subtitle {
  margin: 18px 0 10px;
  font-family: Georgia, serif;
  color: var(--blue);
}

.empty-state {
  color: var(--muted);
  margin: 0;
}
.secondary-module-grid,
.final-info-section {
  margin-top: 22px;
}
.management-section,
.secondary-module-grid,
.final-info-section {
  margin-top: 22px;
}

.secondary-module-grid {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}
/* Compactar pantalla de programa */
.main {
  padding-top: 28px;
}

.topbar {
  margin-bottom: 22px;
}

.country-selector {
  margin-bottom: 14px;
}

.program-hero {
  margin-bottom: 18px;
  padding: 18px;
}

.program-hero h2 {
  margin-top: 10px;
}

/* Evita hueco al tener 3 cards */
.module-grid {
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 18px;
}

.module-card {
  min-height: 130px;
}

/* Reduce aire interno en cards */
.module-card h3 {
  line-height: 1.05;
}

.module-card p {
  margin-top: 4px;
}

/* Secciones inferiores más compactas */
.management-section,
.secondary-module-grid,
.final-info-section {
  margin-top: 18px;
}

.panel {
  padding: 18px;
}

.management-card {
  padding: 12px;
}
.localisms-toggle-section {
  margin-top: 22px;
  display: flex;
  justify-content: center;
}

.localisms-toggle-btn {
  border: 1px solid var(--line);
  background: var(--blue);
  color: #fff;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(7, 46, 111, 0.12);
}

.program-localisms {
  display: none;
}

.program-localisms.is-open {
  display: block;
}
.systems-dashboard-grid.systems-two-columns {
  grid-template-columns: minmax(620px, 1.5fr) minmax(320px, 0.8fr);
}

.systems-dashboard-grid.systems-two-columns.system-map-expanded {
  grid-template-columns: minmax(900px, 2fr) minmax(260px, 0.45fr);
}

.systems-dashboard-grid.systems-two-columns.system-map-expanded
  .systems-functional-panel {
  max-height: 760px;
  overflow: auto;
  opacity: 0.72;
}

.systems-map-panel {
  min-width: 0;
}

.systems-functional-panel {
  min-width: 0;
}
.systems-tobe-panel.tobe-map-expanded {
  grid-column: 1 / -1;
}

.systems-tobe-panel.tobe-map-expanded .system-map-canvas {
  min-height: 900px;
}
.systems-dashboard-grid:has(.systems-tobe-panel.tobe-map-expanded) {
  grid-template-columns: 0.45fr 0.45fr 2.2fr;
}

.systems-tobe-panel.tobe-map-expanded {
  min-height: 900px;
}

.systems-tobe-panel.tobe-map-expanded .system-map-canvas {
  min-height: 820px;
}

.systems-tobe-panel.tobe-map-expanded .system-layers {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
}
.data-source-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.data-source-toggle input {
  cursor: pointer;
}
.projects-panel,
.project-detail-panel {
  margin-top: 18px;
}

.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.project-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f9fbff;
  padding: 18px;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: var(--cyan);
  box-shadow: 0 12px 28px rgba(7, 46, 111, 0.1);
}

.project-card-main {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.project-name {
  color: var(--blue);
  font-weight: 900;
  font-size: 20px;
}

.project-progress {
  color: var(--blue);
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 900;
  white-space: nowrap;
}

.project-summary {
  color: var(--muted);
  margin-top: 6px;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.project-card-action {
  margin-top: 14px;
  color: #0a4fae;
  font-weight: 900;
}

.status-pill {
  display: inline-flex;
  width: max-content;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  background: #eaf1ff;
  color: var(--blue);
}

.status-on-track {
  background: #def7ec;
  color: #08744f;
}

.status-at-risk {
  background: #fff1c9;
  color: #8b6400;
}

.status-blocked {
  background: #ffe1e1;
  color: #a92b2b;
}

.status-done {
  background: #e8f7ef;
  color: #08744f;
}

.status-pending,
.status-planned {
  background: #eaf1ff;
  color: var(--blue);
}

.project-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.project-detail-header h3 {
  margin: 0 0 6px;
}

.project-detail-header p {
  margin: 0;
  color: var(--muted);
}

.project-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.detail-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f6f8fc;
  padding: 14px;
}

.detail-card span,
.detail-card small {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}

.detail-card strong {
  color: var(--blue);
}

.phase-section {
  margin-top: 18px;
}

.phase-roadmap {
  display: grid;
  gap: 14px;
}

.phase-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 14px;
}

.phase-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.phase-card-head h4 {
  margin: 0;
}

.phase-bar {
  height: 9px;
  background: #e7ebf3;
  border-radius: 999px;
  overflow: hidden;
  margin: 12px 0;
}

.phase-bar span {
  display: block;
  height: 100%;
  background: var(--blue);
}

.phase-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.project-detail-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.project-detail-notes article {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f9fbff;
  padding: 16px;
}

.project-detail-notes h3 {
  margin: 0 0 8px;
}

.project-detail-notes p {
  margin: 0;
  color: var(--muted);
}
.phase-roadmap {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 16px;
}

.phase-card {
  min-height: 170px;
}

.phase-card p {
  margin-bottom: 0;
}

.phase-meta {
  margin-top: 8px;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toolbar-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1rem;
  background: #eef4fb;
  color: #001391;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.toolbar-btn.primary {
  background: #001391;
  color: #ffffff;
}

.toolbar-btn:hover {
  filter: brightness(0.96);
}

.toolbar-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .project-detail-grid,
  .project-detail-notes {
    grid-template-columns: 1fr;
  }

  .project-detail-header,
  .project-card-main {
    flex-direction: column;
  }
}
@media (max-width: 1100px) {
  .phase-roadmap {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
}

@media (max-width: 760px) {
  .phase-roadmap {
    grid-template-columns: 1fr;
  }
}
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(244, 247, 251, 0.78);
  backdrop-filter: blur(8px);
}

.loading-overlay[hidden] {
  display: none;
}

.loading-card {
  min-width: 280px;
  padding: 28px 32px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 60px rgba(7, 46, 111, 0.16);
  text-align: center;
}

.loading-card strong {
  display: block;
  margin-top: 18px;
  color: var(--blue);
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 900;
}

.loading-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.loading-orb {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, #ffffff 0 12%, transparent 13%),
    linear-gradient(135deg, var(--blue), #2dcccd);
  box-shadow:
    0 0 0 8px rgba(0, 19, 145, 0.08),
    0 18px 34px rgba(0, 19, 145, 0.24);
  animation: loadingPulse 1.6s ease-in-out infinite;
}

.loading-orb::before {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.7);
  border-top-color: transparent;
  animation: loadingSpin 1s linear infinite;
}

.loading-orb span {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.95;
}

.loading-orb span:nth-child(1) {
  top: 14px;
  left: 36px;
}

.loading-orb span:nth-child(2) {
  right: 16px;
  bottom: 22px;
}

.loading-orb span:nth-child(3) {
  left: 18px;
  bottom: 18px;
}

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

@keyframes loadingPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 0 0 8px rgba(0, 19, 145, 0.08),
      0 18px 34px rgba(0, 19, 145, 0.24);
  }

  50% {
    transform: scale(1.04);
    box-shadow:
      0 0 0 16px rgba(0, 19, 145, 0.05),
      0 24px 46px rgba(0, 19, 145, 0.28);
  }
}
.executive-quarter-panel {
  margin-top: 22px;
}

.executive-quarter-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.executive-quarter-header h3 {
  margin: 0;
}

.executive-quarter-header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.executive-quarter-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quarter-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--blue);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 900;
  cursor: pointer;
}

.quarter-btn.active {
  background: var(--blue);
  color: #fff;
}

.executive-quarter-group {
  margin-top: 18px;
}

.executive-quarter-group h4 {
  margin: 0 0 10px;
  font-size: 24px;
}

.executive-quarter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.executive-item-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f9fbff;
  padding: 14px;
  cursor: pointer;
}

.executive-item-card:hover {
  border-color: #75a7ff;
  transform: translateY(-1px);
}

.executive-item-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.executive-item-type {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.executive-item-card h5 {
  margin: 12px 0 6px;
  color: var(--blue);
  font-size: 18px;
}

.executive-item-card p {
  margin: 0;
  color: var(--muted);
}

.executive-item-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}
.phase-timeline-wrap {
  margin-top: 22px;
}

.phase-timeline-wrap h4 {
  margin: 0 0 12px;
  color: var(--blue);
}

.phase-delivery {
  margin-top: 10px;
  text-align: right;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.phase-timeline-wrap {
  margin-top: 24px;
}

.phase-timeline-wrap h4 {
  margin: 0 0 12px;
  color: var(--blue);
}

.phase-timeline {
  display: grid;
  grid-template-columns: 240px repeat(var(--month-count), minmax(220px, 1fr));
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: visible;
  background: #fff;
}

.timeline-header,
.timeline-month {
  min-height: 44px;
  padding: 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f5f8ff;
  color: var(--blue);
  font-weight: 900;
  text-align: center;
}

.timeline-phase-name {
  min-height: 72px;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--blue);
}

.timeline-phase-name strong {
  display: block;
  margin-bottom: 4px;
}

.timeline-phase-name small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.timeline-phase-name small br + * {
  color: var(--red);
}

.timeline-cell {
  min-height: 72px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: relative;
  overflow: visible;
}

.timeline-bar {
  position: absolute;
  top: 50%;
  height: 16px;
  transform: translateY(-50%);
  border-radius: 999px;
  z-index: 2;
}

.timeline-target {
  position: absolute;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--red);
  border-radius: 999px;
  z-index: 4;
}

.timeline-target::before {
  position: absolute;
  top: -3px;
  left: 5px;
  font-size: 12px;
}

.timeline-target::after {
  position: absolute;
  top: -4px;
  left: 24px;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.timeline-cell.timeline-done .timeline-bar {
  background: var(--green);
}

.timeline-cell.timeline-on-track .timeline-bar {
  background: var(--blue);
}

.timeline-cell.timeline-at-risk .timeline-bar {
  background: #f59e0b;
}

.timeline-cell.timeline-planned .timeline-bar,
.timeline-cell.timeline-pending .timeline-bar {
  background: #9ed3ff;
}

.timeline-cell.timeline-blocked .timeline-bar {
  background: var(--red);
}
.timeline-target {
  position: absolute;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--red);
  border-radius: 999px;
  z-index: 10;
}

.timeline-target em {
  position: absolute;
  top: -4px;
  left: 8px;
  font-style: normal;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.timeline-target.is-near-end em {
  left: auto;
  right: 8px;
  text-align: right;
}
.executive-filter-row {
  display: flex;
  gap: 8px;
  margin: 12px 0 18px;
  flex-wrap: wrap;
}

.quarter-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--blue);
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 900;
  cursor: pointer;
}

.quarter-btn.active {
  background: var(--blue);
  color: #fff;
}
.project-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.document-link {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  padding: 7px 12px;
  background: #eaf1ff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.document-link:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}
.project-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.msa-inline-link {
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  color: var(--primary-color);
  white-space: nowrap;
}

.msa-inline-link:hover {
  text-decoration: underline;
}
.project-card-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.project-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.error-banner {
  margin: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #ec5c57;
  border: 1px solid #ffe69c;
  color: #f2f4f5;
  font-weight: 600;
  text-align: center;
}
.teams-dashboard-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 18px;
  margin-bottom: 28px;
}

.team-bar-row {
  margin-bottom: 14px;
}

.team-bar-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  color: var(--blue);
}

.team-bar {
  height: 10px;
  background: #e7ebf3;
  border-radius: 999px;
  overflow: hidden;
}

.team-bar span {
  display: block;
  height: 100%;
  background: var(--blue);
}

.matrix-active-cell {
  background: #fff4a3;
  font-weight: 900;
  color: var(--blue);
}

.scrum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.scrum-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 18px;
}

.scrum-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.scrum-card-header h3 {
  margin: 0;
}

.scrum-card-header p {
  color: var(--muted);
  margin: 4px 0 0;
}

.scrum-meta {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  color: var(--muted);
}

.scrum-role-list {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.scrum-role-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

@media (max-width: 900px) {
  .teams-dashboard-grid {
    grid-template-columns: 1fr;
  }
}
.scrum-kpis {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.scrum-kpi {
  flex: 1;
  text-align: center;
}

.scrum-kpi-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.scrum-kpi strong {
  font-size: 1.15rem;
  color: var(--blue);
}
.kpi-strip {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px;
}
.scrum-card {
  position: relative;
  overflow: hidden;
}

.scrum-product-band {
  height: 7px;
  margin: -18px -18px 16px;
  background: var(--product-color);
}

.scrum-product-pill {
  display: inline-flex;
  width: max-content;
  margin-top: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--product-color) 14%, white);
  color: var(--product-color);
  font-size: 12px;
  font-weight: 900;
}
