* {
  box-sizing: border-box;
}

:root {
  --navy: #102238;
  --navy-2: #142d49;
  --blue: #276ef1;
  --blue-soft: #eef5ff;
  --green: #18a558;
  --green-soft: #eaf8f0;
  --amber: #f2a900;
  --amber-soft: #fff7dd;
  --red: #e44949;
  --red-soft: #fff0f0;
  --purple: #7657ed;
  --grey: #7a8695;
  --grey-2: #a8b1bc;
  --border: #dfe5ec;
  --bg: #f4f7fb;
  --white: #ffffff;
  --text: #152033;
  --text-soft: #667085;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

body {
  overflow-x: hidden;
}

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

.sidebar {
  width: 250px;
  min-width: 250px;
  height: 100vh;
  overflow-y: auto;
  position: fixed;
  inset: 0 auto 0 0;
  background:
    linear-gradient(
      180deg,
      #0d1e32 0%,
      #112944 100%
    );
  color: white;
  padding-bottom: 30px;
  z-index: 20;
}

.brand {
  height: 66px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 17px;
  border-bottom:
    1px solid rgba(255,255,255,.08);
}

.brand-icon {
  font-size: 24px;
}

.brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .2px;
}

.brand-sub {
  margin-top: 2px;
  font-size: 10px;
  color: #9db0c7;
}

.sidebar-section-title {
  padding: 20px 18px 9px;
  font-size: 10px;
  color: #a7bad0;
  letter-spacing: .4px;
  font-weight: 700;
}

.nav-item {
  height: 40px;
  margin: 2px 8px;
  border-radius: 5px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d7e0eb;
  cursor: pointer;
  font-size: 12px;
  text-decoration: none;
  transition: .16s;
}

.nav-item:hover {
  background:
    rgba(255,255,255,.08);
}

.nav-item.active {
  background: var(--blue);
  color: white;
}

.nav-icon {
  width: 22px;
  text-align: center;
  opacity: .95;
}

.main {
  margin-left: 250px;
  width: calc(100% - 250px);
}

.topbar {
  min-height: 67px;
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 10px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 15;
}

.topbar h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.page-subtitle {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.searchbox {
  width: 390px;
  height: 37px;
  border:
    1px solid #d7dde6;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: white;
}

.searchbox input {
  border: 0;
  outline: 0;
  width: 100%;
  font-size: 12px;
  color: var(--text);
}

.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  font-weight: 700;
  font-size: 11px;
}

.username {
  font-size: 12px;
}

.content {
  padding: 14px 16px 30px;
}

.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 9px;
  box-shadow:
    0 1px 2px rgba(16,24,40,.025);
}

.status-grid {
  display: grid;
  grid-template-columns:
    1fr 1fr 1.35fr 1.35fr;
  gap: 11px;
}

.status-card {
  min-height: 101px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.status-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 25px;
}

.status-icon.green {
  background: var(--green-soft);
  color: var(--green);
}

.status-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.status-icon.purple {
  background: #f0edff;
  color: var(--purple);
}

.status-label {
  font-size: 11px;
  color: var(--text-soft);
}

.status-value {
  margin-top: 2px;
  font-size: 23px;
  font-weight: 800;
}

.status-value.green {
  color: #08783c;
}

.status-note {
  margin-top: 3px;
  font-size: 10px;
  color: var(--text-soft);
}

.progress-ring {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background:
    conic-gradient(
      var(--blue) var(--progress),
      #e8edf3 0
    );
  display: grid;
  place-items: center;
}

.progress-ring-inner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: white;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.metric-grid {
  margin-top: 11px;
  display: grid;
  grid-template-columns:
    repeat(6, minmax(0,1fr));
  gap: 9px;
}

.metric {
  padding: 13px;
  min-height: 90px;
}

.metric-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.metric-icon {
  width: 39px;
  height: 39px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  font-size: 20px;
}

.metric-value {
  font-size: 22px;
  font-weight: 800;
}

.metric-label {
  color: var(--text-soft);
  font-size: 10px;
}

.metric-link {
  margin-top: 8px;
  font-size: 10px;
  color: var(--blue);
  cursor: pointer;
}

.section-card {
  margin-top: 11px;
  padding: 13px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.section-title {
  font-size: 14px;
  font-weight: 800;
}

.section-subtitle {
  color: var(--text-soft);
  font-size: 10px;
  margin-top: 2px;
}

.outline-button {
  height: 27px;
  padding: 0 10px;
  border-radius: 4px;
  border: 1px solid #80aefa;
  color: var(--blue);
  background: white;
  font-size: 10px;
  cursor: pointer;
}

.pipeline {
  display: flex;
  align-items: flex-start;
  overflow-x: auto;
  padding: 5px 7px 8px;
  gap: 0;
}

.pipeline-stage {
  min-width: 98px;
  text-align: center;
}

.pipeline-dot {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 6px;
  color: white;
  font-weight: 700;
}

.pipeline-dot.complete {
  background: var(--green);
}

.pipeline-dot.current {
  background: var(--blue);
}

.pipeline-dot.pending {
  background: #8995a3;
}

.pipeline-name {
  font-weight: 700;
  font-size: 10px;
}

.pipeline-value {
  font-size: 10px;
  margin-top: 5px;
}

.pipeline-arrow {
  padding-top: 14px;
  color: #738197;
}

.two-column {
  display: grid;
  grid-template-columns:
    1.15fr .85fr;
  gap: 11px;
  margin-top: 11px;
}

.three-column {
  display: grid;
  grid-template-columns:
    1.1fr .8fr .85fr;
  gap: 11px;
  margin-top: 11px;
}

.table-wrap {
  overflow: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 10px;
}

th {
  text-align: left;
  background: #f7f9fc;
  color: #344054;
  padding: 8px 7px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 2;
}

td {
  padding: 7px;
  border-bottom: 1px solid #edf0f4;
  vertical-align: top;
}

tr:hover td {
  background: #fafcff;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.dot.green {
  background: var(--green);
}

.dot.blue {
  background: var(--blue);
}

.dot.amber {
  background: var(--amber);
}

.dot.grey {
  background: #b2bbc6;
}

.dot.red {
  background: var(--red);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.badge.green {
  background: var(--green-soft);
  color: #187a45;
}

.badge.blue {
  background: var(--blue-soft);
  color: #245fc2;
}

.badge.amber {
  background: var(--amber-soft);
  color: #a36d00;
}

.badge.red {
  background: var(--red-soft);
  color: #c43636;
}

.badge.grey {
  background: #f0f2f5;
  color: #667085;
}

.progress {
  width: 62px;
  height: 8px;
  border-radius: 8px;
  background: #e5eaf0;
  overflow: hidden;
}

.progress > div {
  height: 100%;
  border-radius: 8px;
  background: var(--green);
}

.quality-row {
  display: grid;
  grid-template-columns: 140px 1fr 42px;
  gap: 8px;
  align-items: center;
  margin: 9px 0;
  font-size: 10px;
}

.gap-item {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #edf0f4;
  padding: 7px 2px;
  font-size: 10px;
}

.gap-name {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gap-question {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--red);
  color: white;
  font-size: 10px;
  display: grid;
  place-items: center;
}

.roadmap {
  padding: 7px 0;
}

.roadmap-item {
  display: grid;
  grid-template-columns:
    24px 1fr auto;
  gap: 7px;
  align-items: center;
  min-height: 33px;
  font-size: 10px;
}

.roadmap-marker {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
  color: white;
}

.roadmap-marker.complete {
  background: var(--green);
}

.roadmap-marker.current {
  border: 3px solid var(--blue);
  background: white;
}

.roadmap-marker.pending {
  border: 1px solid #aab4c0;
  background: white;
}

.page-hero {
  padding: 16px;
  margin-bottom: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-hero-title {
  font-size: 18px;
  font-weight: 800;
}

.page-hero-desc {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-soft);
  max-width: 760px;
}

.page-grid {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0,1fr));
  gap: 10px;
  margin-bottom: 11px;
}

.small-stat {
  padding: 13px;
}

.small-stat-value {
  font-size: 22px;
  font-weight: 800;
}

.small-stat-label {
  font-size: 10px;
  color: var(--text-soft);
  margin-top: 2px;
}

.json-cell {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty {
  padding: 40px;
  text-align: center;
  color: var(--text-soft);
}

.callout {
  padding: 13px;
  background: #f8fbff;
  border: 1px solid #d9e8ff;
  border-radius: 7px;
  font-size: 11px;
}

.context-grid {
  display: grid;
  grid-template-columns:
    repeat(3,1fr);
  gap: 10px;
}

.context-card {
  padding: 14px;
}

.context-card h3 {
  margin: 0 0 7px;
  font-size: 13px;
}

.context-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1.5;
}

@media(max-width: 1200px) {
  .metric-grid {
    grid-template-columns:
      repeat(3,1fr);
  }

  .status-grid {
    grid-template-columns:
      repeat(2,1fr);
  }

  .two-column,
  .three-column {
    grid-template-columns: 1fr;
  }
}

@media(max-width: 800px) {
  .sidebar {
    width: 200px;
    min-width: 200px;
  }

  .main {
    margin-left: 200px;
    width: calc(100% - 200px);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .searchbox {
    width: 100%;
  }

  .topbar-actions {
    width: 100%;
  }

  .status-grid,
  .metric-grid,
  .page-grid,
  .context-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   ATHENA CAPITAL — THREE PHASE NAVIGATION
   ============================================================================ */

.investor-phase-tabs {
  position: sticky;
  top: 67px;
  z-index: 14;

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 10px;

  padding: 10px 16px;

  background: #f4f7fb;

  border-bottom: 1px solid var(--border);

  box-shadow:
    0 3px 10px rgba(16, 34, 56, .04);
}

.investor-phase-tab {
  min-height: 62px;

  display: flex;
  align-items: center;

  gap: 12px;

  padding: 10px 16px;

  border: 1px solid #dce3ec;

  border-radius: 9px;

  background: #ffffff;

  color: #344054;

  text-decoration: none;

  transition:
    transform .15s ease,
    border-color .15s ease,
    box-shadow .15s ease,
    background .15s ease;
}

.investor-phase-tab:hover {
  transform: translateY(-1px);

  border-color: #9dbcf6;

  box-shadow:
    0 5px 15px rgba(39, 110, 241, .10);
}

.investor-phase-tab.active {
  color: #ffffff;

  border-color: #276ef1;

  background:
    linear-gradient(
      135deg,
      #276ef1 0%,
      #1659d6 100%
    );

  box-shadow:
    0 6px 17px rgba(39, 110, 241, .24);
}

.phase-tab-icon {
  width: 38px;
  height: 38px;

  flex: 0 0 auto;

  display: grid;
  place-items: center;

  border-radius: 8px;

  font-size: 18px;

  background: #eef4ff;

  color: #276ef1;
}

.investor-phase-tab.active .phase-tab-icon {
  background: rgba(255,255,255,.17);
  color: #ffffff;
}

.phase-tab-content {
  display: flex;
  flex-direction: column;

  min-width: 0;
}

.phase-tab-content strong {
  font-size: 14px;
  line-height: 1.25;
}

.phase-tab-content small {
  margin-top: 3px;

  font-size: 10px;

  color: #7a8695;

  line-height: 1.25;
}

.investor-phase-tab.active
.phase-tab-content small {
  color: rgba(255,255,255,.78);
}

@media(max-width: 1000px) {

  .investor-phase-tabs {
    grid-template-columns: 1fr;
    position: static;
  }

  .investor-phase-tab {
    min-height: 54px;
  }
}


/* ============================================================================
   ATHENA CAPITAL — PHASE NAVIGATION V1.1.1
   Permanent top-level navigation:
   Construction → Execution → Monitoring
   ============================================================================ */

.investor-phase-tabs {
  position: sticky !important;
  top: 0 !important;
  z-index: 40 !important;

  display: grid !important;
  grid-template-columns:
    repeat(3, minmax(0, 1fr)) !important;

  gap: 0 !important;

  width: 100%;

  padding: 0 !important;
  margin: 0 !important;

  min-height: 70px;

  background: #ffffff !important;

  border-bottom:
    1px solid #d9e0e8 !important;

  box-shadow:
    0 4px 14px rgba(16, 34, 56, .10) !important;
}


/* ============================================================================
   SHARED TAB
   ============================================================================ */

.investor-phase-tab {
  position: relative;

  min-height: 70px !important;

  display: flex !important;
  align-items: center !important;

  gap: 13px !important;

  padding:
    10px 22px !important;

  margin: 0 !important;

  border: 0 !important;
  border-radius: 0 !important;

  text-decoration: none !important;

  transition:
    filter .15s ease,
    box-shadow .15s ease !important;
}


.investor-phase-tab:hover {
  transform: none !important;
  filter: brightness(1.06);

  box-shadow:
    inset 0 -4px 0 rgba(255,255,255,.75) !important;
}


/* ============================================================================
   CONSTRUCTION — BLUE
   ============================================================================ */

.investor-phase-tab[data-phase="construction"] {
  background:
    linear-gradient(
      135deg,
      #125fc7 0%,
      #2878f0 100%
    ) !important;

  color: #ffffff !important;
}


/* ============================================================================
   EXECUTION — PURPLE
   ============================================================================ */

.investor-phase-tab[data-phase="execution"] {
  background:
    linear-gradient(
      135deg,
      #6238bd 0%,
      #8157dc 100%
    ) !important;

  color: #ffffff !important;
}


/* ============================================================================
   MONITORING — GREEN
   ============================================================================ */

.investor-phase-tab[data-phase="monitoring"] {
  background:
    linear-gradient(
      135deg,
      #0f7f4b 0%,
      #20a764 100%
    ) !important;

  color: #ffffff !important;
}


/* ============================================================================
   ACTIVE PHASE
   ============================================================================ */

.investor-phase-tab.active {
  filter: brightness(1.06);

  box-shadow:
    inset 0 -5px 0 #ffffff,
    inset 0 0 0 2px rgba(255,255,255,.13) !important;
}


.investor-phase-tab.active::after {
  content: "CURRENT";

  position: absolute;

  top: 7px;
  right: 10px;

  padding:
    2px 7px;

  border-radius: 10px;

  background:
    rgba(255,255,255,.18);

  border:
    1px solid rgba(255,255,255,.38);

  color: white;

  font-size: 7px;

  font-weight: 800;

  letter-spacing: .6px;
}


/* ============================================================================
   ICONS
   ============================================================================ */

.investor-phase-tab
.phase-tab-icon {
  width: 42px !important;
  height: 42px !important;

  flex:
    0 0 42px !important;

  display: grid !important;
  place-items: center !important;

  border-radius: 9px !important;

  background:
    rgba(255,255,255,.17) !important;

  color: white !important;

  font-size: 19px !important;
}


/* ============================================================================
   TEXT
   ============================================================================ */

.investor-phase-tab
.phase-tab-content {
  display: flex !important;
  flex-direction: column !important;

  min-width: 0;
}


.investor-phase-tab
.phase-tab-content strong {
  color: #ffffff !important;

  font-size: 15px !important;

  line-height: 1.2;

  font-weight: 800 !important;
}


.investor-phase-tab
.phase-tab-content small {
  margin-top: 3px !important;

  color:
    rgba(255,255,255,.82) !important;

  font-size: 10px !important;

  line-height: 1.3;
}


/* ============================================================================
   PAGE HEADER SITS BELOW PHASE TABS
   ============================================================================ */

.topbar {
  position: sticky !important;
  top: 70px !important;

  z-index: 30 !important;
}


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

@media(max-width: 900px) {

  .investor-phase-tabs {
    position: relative !important;

    grid-template-columns:
      1fr !important;
  }


  .investor-phase-tab {
    min-height: 55px !important;

    padding:
      8px 14px !important;
  }


  .investor-phase-tab
  .phase-tab-icon {
    width: 36px !important;
    height: 36px !important;

    flex-basis: 36px !important;
  }


  .topbar {
    top: 0 !important;
  }
}

