/* ANB Enterprise ERP v660.0.57
   Projects & Units only: approved compact project analytics layout.
   Presentation-only. No project/customer/unit/payment data mutation. */

@media (min-width:1101px){
  #projectGrid.project-live-grid-v527{
    display:grid!important;
    grid-template-columns:minmax(0,50%)!important;
    justify-content:start!important;
    align-items:start!important;
    gap:20px!important;
  }
  #projectGrid .project-live-v527{
    width:100%!important;
    max-width:100%!important;
    aspect-ratio:1 / 1!important;
    height:auto!important;
    min-height:0!important;
    display:grid!important;
    grid-template-rows:92px minmax(0,1fr) 38px!important;
    overflow:hidden!important;
  }
}

/* 25% project identity + 75% KPI strip */
#projectGrid .project-live-header-v527{
  display:grid!important;
  grid-template-columns:minmax(0,25%) minmax(0,75%)!important;
  height:92px!important;
  min-height:92px!important;
  overflow:hidden!important;
  border-bottom:1px solid #ded2c5!important;
}
#projectGrid .project-live-v527 .project-master-head{
  height:92px!important;
  min-height:92px!important;
  padding:10px 12px!important;
  overflow:hidden!important;
  background:linear-gradient(135deg,#123a56 0%,#0b2d46 62%,#102f47 100%)!important;
}
#projectGrid .project-live-v527 .project-master-head>div{
  width:100%!important;
  height:100%!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  grid-template-rows:auto auto!important;
  grid-template-areas:"title status" "address address"!important;
  align-content:center!important;
  align-items:center!important;
  column-gap:8px!important;
  row-gap:4px!important;
}
#projectGrid .project-live-v527 .project-master-head h2{
  grid-area:title!important;
  margin:0!important;
  min-width:0!important;
  color:#fff!important;
  font-size:20px!important;
  line-height:1.05!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
#projectGrid .project-live-v527 .project-master-head .tower-chip{
  grid-area:status!important;
  grid-row:auto!important;
  margin:0!important;
  align-self:center!important;
  padding:4px 8px!important;
  font-size:7px!important;
  border-radius:7px!important;
  background:#f5dfb4!important;
  color:#593817!important;
  border:1px solid #e5c786!important;
}
#projectGrid .project-live-v527 .project-master-head p{
  grid-area:address!important;
  margin:0!important;
  color:#e6edf1!important;
  font-size:7.6px!important;
  line-height:1.25!important;
  white-space:normal!important;
  overflow:hidden!important;
  display:-webkit-box!important;
  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;
}
#projectGrid .project-live-header-right-v527{
  height:92px!important;
  min-height:92px!important;
  display:flex!important;
  align-items:center!important;
  padding:9px 10px!important;
  overflow:hidden!important;
  background:#fffaf3!important;
}
#projectGrid .project-live-v527 .project-kpis{
  display:grid!important;
  grid-template-columns:repeat(7,minmax(0,1fr))!important;
  gap:6px!important;
  width:100%!important;
  margin:0!important;
}
#projectGrid .project-live-v527 .project-kpis>div,
#projectGrid .project-live-v527 .project-unit-stat-v527{
  box-sizing:border-box!important;
  min-width:0!important;
  min-height:58px!important;
  padding:7px 3px!important;
  border-radius:10px!important;
  text-align:center!important;
}
#projectGrid .project-live-v527 .project-kpis b,
#projectGrid .project-live-v527 .project-unit-stat-v527>strong{
  display:block!important;
  font-size:16px!important;
  line-height:1!important;
  color:#15344b!important;
}
#projectGrid .project-live-v527 .project-kpis span,
#projectGrid .project-live-v527 .project-unit-stat-v527 small{
  display:block!important;
  margin-top:4px!important;
  font-size:6.8px!important;
  line-height:1.1!important;
  color:#715c4d!important;
}

/* Keep ANB branding metric colors */
#projectGrid .project-live-v527 .project-kpis>div:nth-child(1){background:linear-gradient(145deg,#eef7fd,#f8fcff)!important;border-color:#9ccce8!important}
#projectGrid .project-live-v527 .project-kpis>div:nth-child(2){background:linear-gradient(145deg,#fff8ea,#fffdf7)!important;border-color:#e4c58b!important}
#projectGrid .project-live-v527 .project-kpis>div:nth-child(3){background:linear-gradient(145deg,#eef7fd,#f8fcff)!important;border-color:#9ccce8!important}
#projectGrid .project-live-v527 .project-kpis>div:nth-child(4){background:linear-gradient(145deg,#edf9f3,#fbfffd)!important;border-color:#9ad5ba!important}
#projectGrid .project-live-v527 .project-kpis>div:nth-child(5){background:linear-gradient(145deg,#fff8ea,#fffdf7)!important;border-color:#e8c88d!important}
#projectGrid .project-live-v527 .project-kpis>div:nth-child(6){background:linear-gradient(145deg,#fff5e9,#fffdf9)!important;border-color:#eab67d!important}
#projectGrid .project-live-v527 .project-kpis>div:nth-child(7){background:linear-gradient(145deg,#fff1f2,#fffafa)!important;border-color:#e8a4a9!important}

/* Left 50% = inventory. Right 50% = 2x2 Towers/Floors/Sales/Value */
#projectGrid .project-analytics-v527{
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,.5fr) minmax(0,.5fr)!important;
  grid-template-rows:minmax(0,1fr)!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  gap:8px!important;
  padding:8px!important;
  overflow:hidden!important;
  background:linear-gradient(135deg,#f8f3eb,#fbf8f2)!important;
}
#projectGrid .project-donut-card-v527{
  grid-column:1!important;
  grid-row:1!important;
  height:100%!important;
  min-height:0!important;
  padding:7px!important;
}
#projectGrid .project-analytics-stack-v527{
  display:grid!important;
  grid-template-columns:1fr!important;
  grid-template-rows:1fr 1fr!important;
  gap:8px!important;
  min-width:0!important;
  min-height:0!important;
  height:100%!important;
}
#projectGrid .project-analytics-stack-v527:nth-of-type(2){grid-column:2!important;grid-row:1!important}
#projectGrid .project-analytics-stack-v527:nth-of-type(3){grid-column:3!important;grid-row:1!important}
#projectGrid .project-chart-v527{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  min-height:0!important;
  height:100%!important;
  overflow:hidden!important;
  padding:6px!important;
  border-radius:11px!important;
}
#projectGrid .project-chart-heading-v527{
  min-height:20px!important;
  justify-content:center!important;
  text-align:center!important;
}
#projectGrid .project-chart-heading-v527 h3{
  margin:1px 0!important;
  font-size:10.5px!important;
  line-height:1.1!important;
  white-space:normal!important;
}
#projectGrid .project-chart-heading-v527.compact-v527{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:4px!important;
  text-align:left!important;
}
#projectGrid .project-chart-heading-v527.compact-v527 b{font-size:8px!important}

/* Approved inventory donut: preserve shape, labels, automatic colored leader threads and dots */
#projectGrid .donut-layout-v527{
  position:relative!important;
  display:block!important;
  width:100%!important;
  height:calc(100% - 24px)!important;
  min-height:0!important;
  overflow:visible!important;
}
#projectGrid .project-donut-svg-v527{
  position:absolute!important;
  left:50%!important;
  top:19%!important;
  transform:translateX(-50%)!important;
  width:min(68%,270px)!important;
  height:auto!important;
  max-height:none!important;
  z-index:2!important;
  filter:drop-shadow(0 5px 5px rgba(22,48,66,.18))!important;
}
#projectGrid .donut-callouts-v527{
  position:absolute!important;
  inset:0!important;
  display:block!important;
  z-index:4!important;
  pointer-events:none!important;
}
#projectGrid .donut-callout-v527{
  position:absolute!important;
  display:flex!important;
  align-items:center!important;
  gap:3px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  font-size:6.5px!important;
  line-height:1.15!important;
  color:#3f4142!important;
  white-space:nowrap!important;
}
#projectGrid .donut-callout-v527 i{width:6px!important;height:6px!important;border-radius:50%!important}
#projectGrid .donut-callout-v527 small{font-size:6.2px!important;color:#5c5550!important}
#projectGrid .donut-callout-v527:nth-child(1){top:3%!important;left:5%!important}
#projectGrid .donut-callout-v527:nth-child(2){top:3%!important;right:5%!important}
#projectGrid .donut-callout-v527:nth-child(3){top:17%!important;left:1%!important;white-space:normal!important;width:76px!important}
#projectGrid .donut-callout-v527:nth-child(4){right:1%!important;bottom:1%!important;white-space:normal!important;width:94px!important}
#projectGrid .donut-connectors-v541{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;z-index:3!important;overflow:visible!important;pointer-events:none!important}
#projectGrid .donut-thread-v541{stroke-width:1.7!important}
#projectGrid .donut-center-label-v527{font-size:10px!important}
#projectGrid .donut-center-sub-v527{font-size:6.5px!important}

#projectGrid .project-building-svg-v527,
#projectGrid .project-floor-svg-v527{height:92px!important;max-height:92px!important;margin:0 auto!important}
#projectGrid .project-trajectory-svg-v527{height:78px!important;max-height:78px!important;margin:0!important}
#projectGrid .project-gauge-svg-v527{height:78px!important;max-height:78px!important;margin:0!important}
#projectGrid .chart-open-hint-v527{opacity:0!important;font-size:5.5px!important;right:4px!important;bottom:2px!important}
#projectGrid .project-chart-v527:hover .chart-open-hint-v527{opacity:.72!important}

#projectGrid .project-bottom-actions-v529{
  box-sizing:border-box!important;
  height:38px!important;
  min-height:38px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:6px!important;
  padding:4px 9px!important;
  background:#fffaf3!important;
  border-top:1px solid #e5d9cc!important;
}
#projectGrid .project-bottom-actions-v529 .btn{font-size:7px!important;padding:5px 9px!important;border-radius:7px!important}

@media (max-width:1100px){
  #projectGrid.project-live-grid-v527{grid-template-columns:minmax(0,1fr)!important}
  #projectGrid .project-live-v527{aspect-ratio:auto!important;height:auto!important;display:block!important}
  #projectGrid .project-live-header-v527{grid-template-columns:1fr!important;height:auto!important;min-height:0!important}
  #projectGrid .project-live-v527 .project-master-head,#projectGrid .project-live-header-right-v527{height:auto!important;min-height:72px!important}
  #projectGrid .project-analytics-v527{height:520px!important}
}
@media (max-width:720px){
  #projectGrid .project-live-v527 .project-kpis{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  #projectGrid .project-analytics-v527{grid-template-columns:1fr!important;height:auto!important}
  #projectGrid .project-donut-card-v527{grid-column:1!important;grid-row:auto!important;height:330px!important}
  #projectGrid .project-analytics-stack-v527,#projectGrid .project-analytics-stack-v527:nth-of-type(2),#projectGrid .project-analytics-stack-v527:nth-of-type(3){grid-column:1!important;grid-row:auto!important;grid-template-columns:1fr 1fr!important;grid-template-rows:1fr!important;height:180px!important}
}
