body.pa-page {
  --pa-blue: #0b72b9;
  --pa-navy: #123f63;
  --pa-green: #168a42;
  --pa-amber: #c47a12;
  --pa-red: #b3261e;
}

.pa-header {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 58%, var(--blue) 100%);
  color: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.pa-header h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .3px;
}
.pa-header-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 5px;
  color: rgba(255,255,255,.82);
  font-size: 12px;
}
.pa-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: rgba(255,255,255,.9);
}
.pa-refresh {
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.12);
  color: #fff;
  width: 34px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, transform .2s ease;
}
.pa-refresh:hover {
  background: rgba(255,255,255,.22);
  transform: translateY(-1px);
}

.pa-refresh .ic,
.sidebar-logout .ic {
  width: 14px;
  height: 14px;
  stroke-width: 2.1;
}

.pa-header .icon-inline,
.pa-header .ic {
  color: rgba(255,255,255,.92);
}

.sidebar-logout {
  width: 100%;
  margin-top: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: #5b647a;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.sidebar-logout:hover { background: #f4f6fd; color: var(--navy); }

.pa-kpis {
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.pa-kpis .kpi-card {
  min-height: 92px;
}

.pa-chart-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid #d7dee9;
}
.pa-card-head {
  align-items: center;
}
.pa-chart-card .card-head {
  background: #fff;
  color: var(--text);
  border-radius: 12px 12px 0 0;
  padding: 14px 18px 10px;
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.pa-chart-card .card-head h2 {
  color: var(--navy);
  font-size: 13px;
  letter-spacing: .2px;
}
.pa-chart-card .muted {
  color: var(--muted);
}

.pa-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 12px;
  font-size: 10.5px;
  color: #637493;
}
.pa-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.pa-legend-item span {
  display: inline-block;
  width: 12px;
  height: 8px;
  border-radius: 2px;
}

.pa-chart-wrap {
  background: #fff;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  overflow-x: auto;
  padding: 8px 8px 0;
}
.pa-chart {
  width: 100%;
  min-width: 980px;
  height: 360px;
  display: block;
}
.pa-grid-line {
  stroke: #d9e0ec;
  stroke-width: 1;
}
.pa-axis-label,
.pa-axis-title,
.pa-day-label,
.pa-capacity-label {
  fill: #324153;
  font-family: "Poppins", sans-serif;
}
.pa-axis-label,
.pa-day-label {
  font-size: 10px;
}
.pa-axis-title {
  font-size: 11px;
  font-weight: 700;
}
.pa-capacity-label {
  fill: #7c4a18;
  font-size: 11px;
  font-weight: 700;
}
.pa-demand-bar {
  stroke: rgba(255,255,255,.7);
  stroke-width: .6;
}
.pa-capacity-line {
  fill: none;
  stroke: #8b5e3c;
  stroke-width: 3;
}
.pa-capacity-band {
  stroke: rgba(139, 94, 60, .28);
  stroke-width: 2;
  stroke-dasharray: 6 4;
}
.pa-breach-marker {
  fill: #b3261e;
  stroke: #fff;
  stroke-width: 1;
}

.pa-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 9px 10px 10px;
  background: #eef3f8;
  border-top: 1px solid #cfd8e5;
}
.pa-btn {
  border: none;
  color: #fff;
  border-radius: 5px;
  padding: 7px 10px;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  cursor: default;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.18);
  text-transform: capitalize;
}
.pa-btn.navy { background: #0b3b63; }
.pa-btn.slate { background: #52616f; }
.pa-btn.green { background: #168a42; }
.pa-btn.amber { background: #b87316; }
.pa-btn.orange { background: #d46b1f; }
.pa-btn.red { background: #a82317; }
.pa-btn { cursor: pointer; }

.pa-calc-card {
  padding: 0;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid #d7dee9;
}
.pa-calc-head {
  background: #fff;
  color: var(--text);
  border-radius: 12px 12px 0 0;
  padding: 14px 18px 10px;
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.pa-calc-head h2 {
  color: var(--navy);
  font-size: 13px;
}
.pa-calc-head .muted {
  color: var(--muted);
}
.pa-calc-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.pa-calc-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #41506b;
}
.pa-calc-controls input[type="date"],
.pa-calc-controls input[type="time"] {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 5px 8px;
  font-family: inherit;
  font-size: 12px;
  color: #243043;
}
.pa-calc-wrap {
  max-height: 360px;
  overflow: auto;
}
.pa-calc-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--header-row);
}
.pa-calc-table td {
  vertical-align: middle;
  font-size: 12px;
}
.pa-input {
  width: 100%;
  min-width: 72px;
  border: 1px solid #cfd8e5;
  border-radius: 6px;
  padding: 5px 7px;
  font-family: inherit;
  font-size: 12px;
  background: #fff;
}
.pa-qty-input {
  min-width: 88px;
  text-align: right;
}
.pa-delete-btn {
  border: none;
  background: #a82317;
  color: #fff;
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.pa-save-msg {
  padding: 8px 14px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #14753a;
  background: #f4faf6;
  border-top: 1px solid #dcefe3;
}
.pa-chart-foot {
  padding: 8px 14px 12px;
  border-top: 1px solid #cfd8e5;
  background: #eef3f8;
}

.pa-capacity-note {
  color: #6b748c;
  font-size: 12px;
  font-weight: 600;
}
.pa-sheet-wrap {
  max-height: 340px;
  overflow-y: auto;
}
.pa-sheet-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}
.pa-model-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 7px;
  vertical-align: -1px;
}
.pa-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 126px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
}
.pa-status.ok {
  background: #e9f8ef;
  color: #14753a;
}
.pa-status.breach {
  background: #fff0ed;
  color: #b3261e;
}

@media (max-width: 1200px) {
  .pa-kpis {
    grid-template-columns: repeat(3, 1fr);
  }
  .pa-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}
