.esag-main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 1rem;
}

.esag-wrap {
  width: 100%;
}

.esag-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 900px) {
  .esag-grid {
    grid-template-columns: 1fr;
  }
}

.esag-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.esag-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 1.25rem;
  color: var(--text, #1e293b);
}

.esag-sub-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  color: var(--text, #1e293b);
}

.esag-form-group {
  margin-bottom: 1.15rem;
}

.esag-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.esag-col {
  flex: 1;
}

.esag-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text, #1e293b);
  margin-bottom: 0.35rem;
}

.esag-input,
.esag-select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  color: var(--text, #1e293b);
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 6px;
  box-sizing: border-box;
  font-family: inherit;
}

.esag-input:focus,
.esag-select:focus {
  outline: none;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.esag-check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.esag-check-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text, #1e293b);
  cursor: pointer;
}

/* KPI Cards */
.esag-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.esag-kpi-card {
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.esag-kpi-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.esag-kpi-val {
  font-size: 1.45rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.esag-kpi-sub {
  font-size: 0.75rem;
  opacity: 0.85;
  margin-top: 0.25rem;
}

.esag-kpi-tables {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.esag-kpi-capacity {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

.esag-kpi-area {
  background: #faf5ff;
  border: 1px solid #f3e8ff;
  color: #7e22ce;
}

.esag-kpi-density {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
}

/* Floor Plan Box */
.esag-floorplan-box {
  background: #f8fafc;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.esag-fp-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.esag-fp-legend {
  font-size: 0.75rem;
  color: var(--muted, #64748b);
}

.esag-svg-wrap {
  width: 100%;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  display: flex;
  justify-content: center;
}

.esag-svg {
  width: 100%;
  max-height: 320px;
  display: block;
}

.esag-action-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.esag-btn-action {
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
}

.esag-btn-action:hover {
  background: #0369a1;
}

.esag-status-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #16a34a;
}
