:root {
  --pde-salary-text: #162033;
  --pde-salary-muted: #5d6b7e;
  --pde-salary-line: #d8e2ee;
  --pde-salary-line-strong: #bfd1e3;
  --pde-salary-panel: #ffffff;
  --pde-salary-panel-soft: #f4f8fc;
  --pde-salary-accent: #289DCC;
  --pde-salary-accent-dark: #1f7fa6;
  --pde-salary-accent-soft: rgba(40, 157, 204, 0.12);
  --pde-salary-green: #0f766e;
  --pde-salary-shadow: 0 14px 34px rgba(17, 24, 39, 0.08);
}

* {
  box-sizing: border-box;
}

body.pde-salary-standalone {
  margin: 0;
  background: #ffffff;
  color: var(--pde-salary-text);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.pde-salary-page {
  width: 100%;
  max-width: 1160px;
  margin: 8px auto 28px;
  padding: 0 10px;
  color: var(--pde-salary-text);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
}

.pde-salary-page button,
.pde-salary-page input,
.pde-salary-page select {
  font: inherit;
}

.pde-salary-workbench {
  display: grid;
  grid-template-columns: minmax(330px, 1.05fr) minmax(300px, 0.95fr);
  gap: 12px;
  align-items: stretch;
}

.pde-salary-panel,
.pde-salary-table-block {
  border: 1px solid var(--pde-salary-line);
  border-radius: 10px;
  background: var(--pde-salary-panel);
  box-shadow: var(--pde-salary-shadow);
}

.pde-salary-controls {
  padding: 14px;
}

.pde-salary-heading {
  margin: 0 0 10px;
}

.pde-salary-title {
  margin: 0;
  color: var(--pde-salary-text);
  font-size: 24px;
  line-height: 1.15;
  font-weight: 850;
  letter-spacing: 0;
}

.pde-salary-note {
  margin: 6px 0 0;
  color: var(--pde-salary-muted);
  font-size: 14px;
  line-height: 1.35;
}

.pde-salary-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}

.pde-salary-direction-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-column: 1 / -1;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(40, 157, 204, 0.22);
  border-radius: 8px;
  background: rgba(40, 157, 204, 0.06);
}

.pde-salary-direction-fields[hidden],
.pde-salary-breakdown [data-pde-salary-rep-item][hidden],
.pde-salary-breakdown [hidden] {
  display: none !important;
}

.pde-salary-field {
  display: grid;
  gap: 5px;
  margin: 0;
  color: var(--pde-salary-text);
  font-size: 13px;
  font-weight: 750;
}

.pde-salary-field--wide {
  grid-column: 1 / -1;
}

.pde-salary-field select,
.pde-salary-field input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--pde-salary-line-strong);
  border-radius: 7px;
  background: #ffffff;
  color: var(--pde-salary-text);
  padding: 7px 9px;
  font-size: 15px;
  font-weight: 600;
}

.pde-salary-field select:focus,
.pde-salary-field input:focus {
  border-color: var(--pde-salary-accent);
  outline: 0;
  box-shadow: 0 0 0 4px var(--pde-salary-accent-soft);
}

.pde-salary-result {
  display: grid;
  align-content: start;
  min-height: 100%;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(40, 157, 204, 0.1), rgba(15, 118, 110, 0.08)),
    #ffffff;
}

.pde-salary-totals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
  margin: 0 0 9px;
}

.pde-salary-total-block {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
}

.pde-salary-result-label {
  margin: 0 0 4px;
  color: var(--pde-salary-muted);
  font-size: 13px;
  font-weight: 800;
}

.pde-salary-total,
.pde-salary-annual-total {
  display: block;
  color: var(--pde-salary-green);
  font-size: 26px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0;
}

.pde-salary-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

.pde-salary-breakdown div {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(216, 226, 238, 0.9);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.82);
}

.pde-salary-breakdown dt {
  margin: 0 0 3px;
  color: var(--pde-salary-muted);
  font-size: 12px;
  font-weight: 800;
}

.pde-salary-breakdown dd {
  margin: 0;
  color: var(--pde-salary-text);
  font-size: 15px;
  font-weight: 850;
}

.pde-salary-grid-section {
  margin: 18px 0 0;
}

.pde-salary-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.pde-salary-section-head h2 {
  margin: 0;
  color: var(--pde-salary-text);
  font-size: 23px;
  line-height: 1.18;
  font-weight: 850;
}

.pde-salary-section-head p {
  max-width: 560px;
  margin: 0;
  color: var(--pde-salary-muted);
  font-size: 15px;
  line-height: 1.45;
  text-align: right;
}

.pde-salary-tables {
  display: grid;
  gap: 14px;
}

.pde-salary-table-block {
  overflow: hidden;
}

.pde-salary-table-block h3 {
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--pde-salary-line);
  background: var(--pde-salary-panel-soft);
  color: var(--pde-salary-text);
  font-size: 16px;
  line-height: 1.25;
  font-weight: 850;
}

.pde-salary-table-scroll {
  width: 100%;
  overflow-x: auto;
}

.pde-salary-table-block table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  table-layout: auto;
}

.pde-salary-page.is-director .pde-salary-table-block:not(.pde-salary-table-block--direction) table {
  min-width: 900px;
}

.pde-salary-page.is-rep .pde-salary-table-block:not(.pde-salary-table-block--direction) table {
  min-width: 720px;
}

.pde-salary-page.is-director.is-rep .pde-salary-table-block:not(.pde-salary-table-block--direction) table {
  min-width: 1040px;
}

.pde-salary-table-block th,
.pde-salary-table-block td {
  padding: 6px 6px;
  border-bottom: 1px solid var(--pde-salary-line);
  color: var(--pde-salary-text);
  font-size: 12px;
  line-height: 1.18;
  text-align: right;
  white-space: nowrap;
}

.pde-salary-table-block thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #ffffff;
  color: var(--pde-salary-muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  white-space: normal;
}

.pde-salary-table-block tbody tr:nth-child(even) td,
.pde-salary-table-block tbody tr:nth-child(even) th {
  background: #fbfdff;
}

.pde-salary-table-block tbody tr.is-selected td,
.pde-salary-table-block tbody tr.is-selected th {
  background: var(--pde-salary-accent-soft);
  color: #0c3c52;
}

.pde-salary-table-block th:first-child,
.pde-salary-table-block td:first-child {
  text-align: left;
}

.pde-salary-table-block th:nth-child(1),
.pde-salary-table-block td:nth-child(1) {
  min-width: 54px;
}

.pde-salary-table-block th:nth-child(2),
.pde-salary-table-block td:nth-child(2) {
  min-width: 52px;
}

.pde-salary-table-block th:nth-child(n+3),
.pde-salary-table-block td:nth-child(n+3) {
  min-width: 82px;
}

.pde-salary-table-block th:nth-child(6),
.pde-salary-table-block td:nth-child(6) {
  min-width: 112px;
}

.pde-salary-table-block tbody tr:last-child th,
.pde-salary-table-block tbody tr:last-child td {
  border-bottom: 0;
}

.pde-salary-chart {
  min-width: 560px;
  padding: 8px 10px 12px;
  border-top: 1px solid var(--pde-salary-line);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.pde-salary-page.is-director .pde-salary-table-block:not(.pde-salary-table-block--direction) .pde-salary-chart {
  min-width: 900px;
}

.pde-salary-page.is-rep .pde-salary-table-block:not(.pde-salary-table-block--direction) .pde-salary-chart {
  min-width: 720px;
}

.pde-salary-page.is-director.is-rep .pde-salary-table-block:not(.pde-salary-table-block--direction) .pde-salary-chart {
  min-width: 1040px;
}

.pde-salary-chart svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 240px;
  margin: 0;
}

.pde-salary-chart__bg {
  fill: #ffffff;
}

.pde-salary-chart__grid {
  stroke: #d6e3ee;
  stroke-width: 1;
}

.pde-salary-chart__area {
  fill: rgba(40, 157, 204, 0.13);
}

.pde-salary-chart__line {
  fill: none;
  stroke: var(--pde-salary-accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.pde-salary-chart__point {
  fill: #ffffff;
  stroke: var(--pde-salary-accent);
  stroke-width: 2;
  transition: fill 0.16s ease, r 0.16s ease, stroke 0.16s ease;
}

.pde-salary-chart__point.is-selected {
  fill: var(--pde-salary-green);
  stroke: var(--pde-salary-green);
}

.pde-salary-chart__point-group {
  cursor: pointer;
  outline: none;
}

.pde-salary-chart__hit {
  fill: transparent;
  pointer-events: all;
}

.pde-salary-chart__point-group:hover .pde-salary-chart__point,
.pde-salary-chart__point-group:focus .pde-salary-chart__point {
  fill: var(--pde-salary-green);
  stroke: var(--pde-salary-green);
  r: 6;
}

.pde-salary-chart__tooltip {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.pde-salary-chart__point-group:hover .pde-salary-chart__tooltip,
.pde-salary-chart__point-group:focus .pde-salary-chart__tooltip {
  opacity: 1;
}

.pde-salary-chart__tooltip rect {
  fill: #ffffff;
  stroke: rgba(15, 118, 110, 0.24);
  stroke-width: 1;
  filter: drop-shadow(0 8px 14px rgba(17, 24, 39, 0.16));
}

.pde-salary-chart__tooltip text {
  fill: var(--pde-salary-text);
  font-size: 11px;
  font-weight: 850;
  text-anchor: middle;
}

.pde-salary-chart__x-label,
.pde-salary-chart__y-label,
.pde-salary-chart__axis {
  fill: #42526e;
  font-size: 11px;
  font-weight: 750;
}

.pde-salary-chart__x-label {
  text-anchor: middle;
}

.pde-salary-chart__y-label {
  text-anchor: end;
}

.pde-salary-chart__axis--x {
  text-anchor: middle;
}

.pde-salary-chart__axis--y {
  text-anchor: middle;
  letter-spacing: 0;
}

.pde-salary-table-block--direction table {
  min-width: 760px;
}

@media (max-width: 860px) {
  .pde-salary-workbench {
    grid-template-columns: 1fr;
  }

  .pde-salary-total,
  .pde-salary-annual-total {
    font-size: 26px;
  }

  .pde-salary-section-head {
    display: block;
  }

  .pde-salary-section-head p {
    margin-top: 6px;
    text-align: left;
  }
}

@media (max-width: 560px) {
  .pde-salary-page {
    padding: 0 8px;
  }

  .pde-salary-controls,
  .pde-salary-result {
    padding: 12px;
  }

  .pde-salary-title {
    font-size: 22px;
  }

  .pde-salary-total,
  .pde-salary-annual-total {
    font-size: 26px;
  }

  .pde-salary-breakdown {
    grid-template-columns: 1fr;
  }

  .pde-salary-totals {
    grid-template-columns: 1fr;
  }

  .pde-salary-form {
    grid-template-columns: 1fr;
  }

  .pde-salary-direction-fields {
    grid-template-columns: 1fr;
  }
}
