:root {
  --ink: #173239;
  --muted: #657878;
  --green: #176657;
  --line: #dfe7e3;
  --bg: #f4f6f4;
  --soft: #e9f3ee;
  --amber: #896321;
  --red: #a44034;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select,
summary {
  touch-action: manipulation;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 12px 17px;
  background: var(--green);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  filter: brightness(0.94);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.secondary {
  background: #fff;
  border: 1px solid #c9d6ce;
  color: var(--ink);
}

button.danger {
  color: var(--red);
  background: #fff2ef;
  border: 1px solid #eed5cf;
}

a {
  color: var(--green);
  text-decoration: none;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid #ba9136;
  outline-offset: 3px;
}

.shell {
  display: flex;
  min-height: 100vh;
}

aside {
  width: 240px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
}

.brand small {
  display: block;
  font-size: 8px;
  letter-spacing: 1.3px;
  font-weight: 600;
  color: var(--muted);
}

.monogram {
  display: grid;
  place-items: center;
  width: 38px;
  height: 42px;
  background: var(--ink);
  color: #fff;
  border-radius: 9px;
  font-family: Georgia, serif;
  font-size: 17px;
}

.nav-label {
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--muted);
  margin: 40px 12px 14px;
}

nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

nav a {
  color: #526566;
  padding: 13px 12px;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}

nav a.active {
  background: var(--soft);
  color: var(--green);
  font-weight: 650;
}

nav .icon {
  width: 20px;
  text-align: center;
  font-size: 18px;
}

.aside-bottom {
  margin-top: auto;
  padding: 25px 8px 0;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}

.connection {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 10px;
}

.connection i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b48e47;
}

.link-button {
  background: none !important;
  color: var(--muted);
  padding: 10px 0;
  font-size: 12px;
  font-weight: 500;
}

.workspace {
  flex: 1;
  min-width: 0;
}

header {
  height: 82px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.header-title {
  font-size: 13px;
  font-weight: 600;
}

.tag {
  font-size: 9px;
  letter-spacing: 1px;
  background: #eef2ef;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 6px;
  margin-left: 9px;
  color: var(--muted);
}

.role-switch {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

select {
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 22px 9px 10px;
  font-size: 12px;
  max-width: 100%;
}

.demo-banner {
  margin: 24px 40px 0;
  padding: 14px 17px;
  border: 1px solid #dedac6;
  background: #f8f6eb;
  border-radius: 10px;
  display: flex;
  gap: 13px;
  color: #645936;
}

.demo-banner strong {
  font-size: 12px;
  display: block;
}

.demo-banner span:not(.demo-icon) {
  display: block;
  font-size: 11px;
  line-height: 1.65;
  margin-top: 4px;
}

.demo-icon {
  border: 1px solid #a29258;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  text-align: center;
  font-size: 12px;
  flex-shrink: 0;
}

main {
  padding: 34px 40px;
  max-width: 1360px;
  margin: auto;
}

h1 {
  font-size: 30px;
  letter-spacing: -0.9px;
  margin: 0 0 9px;
  font-weight: 650;
}

h2 {
  font-size: 18px;
  margin: 0 0 18px;
  font-weight: 650;
}

h3 {
  font-size: 15px;
  margin: 0 0 10px;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 600;
  color: var(--green);
  margin: 0 0 9px;
}

.subtitle {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  margin: 0 0 28px;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.date-tag {
  font-size: 11px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  white-space: nowrap;
}

.grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 22px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 24px;
  margin-bottom: 22px;
  min-width: 0;
}

.grid .card {
  margin-bottom: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  min-width: 0;
}

.stat .value {
  font-size: 30px;
  letter-spacing: -1px;
  font-weight: 600;
  display: block;
  margin: 12px 0 7px;
}

.stat .label {
  font-size: 12px;
  color: var(--muted);
}

.stat small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.stat.highlight {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.stat.highlight .label,
.stat.highlight small {
  color: #d5e8df;
}

.badge {
  display: inline-block;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 600;
  white-space: nowrap;
  background: #eef2ef;
  color: var(--muted);
}

.badge.pending {
  color: var(--amber);
  background: #faf1d9;
}

.badge.approved {
  background: var(--soft);
  color: var(--green);
}

.badge.rejected,
.badge.cancelled {
  background: #f3eceb;
  color: #895650;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.row:first-of-type {
  border-top: 0;
}

.row p {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.row strong {
  font-size: 14px;
}

.attention {
  background: var(--soft);
  border-left: 3px solid var(--green);
  padding: 17px;
  border-radius: 7px;
  margin-bottom: 14px;
}

.attention p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 6px 0 12px;
}

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

.actions button {
  font-size: 12px;
  padding: 10px 13px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 19px 0;
}

label.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}

input {
  border: 1px solid #c9d5d1;
  border-radius: 8px;
  padding: 11px 10px;
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: #fff;
  font-size: 14px;
}

.validation {
  font-size: 12px;
  padding: 13px;
  border-radius: 8px;
  line-height: 1.65;
  background: var(--soft);
  color: var(--green);
  margin: 15px 0;
}

.validation.error {
  background: #fcf0ed;
  color: var(--red);
}

.help {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}

.text-button {
  background: none;
  padding: 5px 0;
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
}

.presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.presets button {
  font-size: 10px;
  background: #f2f6f3;
  color: var(--muted);
  padding: 9px;
}

.presets button[aria-pressed='true'] {
  background: var(--green);
  color: #fff;
}

.calendar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 17px;
}

.calendar-top button {
  padding: 6px 12px;
  background: #f0f4f1;
  color: var(--green);
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.weekday {
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  padding: 4px 0;
}

.day {
  border-radius: 6px;
  min-height: 39px;
  padding: 5px 0;
  background: #f6f8f6;
  color: var(--ink);
  font-weight: 400;
  font-size: 12px;
  border: 1px solid transparent;
  position: relative;
}

.day:disabled {
  opacity: 0.35;
}

.day.busy {
  background: #fcf0ed;
  color: #99473c;
}

.day.selected {
  background: var(--green);
  color: #fff;
}

.day.today {
  border-color: var(--green);
}

.day.pending::after {
  content: '';
  width: 4px;
  height: 4px;
  position: absolute;
  background: #b58b32;
  border-radius: 50%;
  bottom: 3px;
  left: calc(50% - 2px);
}

.legend {
  display: flex;
  gap: 13px;
  flex-wrap: wrap;
  font-size: 10px;
  color: var(--muted);
  margin-top: 16px;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dot {
  height: 7px;
  width: 7px;
  background: #fcddd6;
  border-radius: 3px;
}

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

.dot.amber {
  background: #b58b32;
}

.section-space {
  margin-top: 24px;
}

.empty {
  padding: 22px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.profile {
  display: flex;
  gap: 17px;
  align-items: center;
  margin-bottom: 25px;
}

.avatar {
  width: 62px;
  height: 62px;
  background: var(--soft);
  color: var(--green);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 21px;
}

.profile p {
  margin: 5px 0;
  font-size: 13px;
  color: var(--muted);
}

dl {
  margin: 0;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 15px 0;
  font-size: 13px;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  text-align: right;
}

progress {
  width: 100%;
  height: 7px;
  accent-color: var(--green);
  border: 0;
  border-radius: 6px;
  margin: 13px 0 7px;
}

progress::-webkit-progress-bar {
  background: #edf2ee;
  border-radius: 6px;
}

progress::-webkit-progress-value {
  background: var(--green);
  border-radius: 6px;
}

.sources {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.source-line {
  display: grid;
  grid-template-columns: 100px 1fr 32px;
  gap: 15px;
  align-items: center;
  font-size: 12px;
}

.bar {
  height: 6px;
  background: #edf1ee;
  border-radius: 3px;
}

.bar i {
  display: block;
  background: #79a395;
  height: 100%;
  border-radius: 3px;
}

.salary-total {
  padding-top: 20px;
  margin-top: 10px;
  border-top: 2px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.salary-total strong {
  font-size: 26px;
}

.knowledge-search {
  max-width: 530px;
  margin-bottom: 22px;
}

details {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

details:first-of-type {
  border-top: 0;
}

summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.6;
}

details p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 760px;
}

.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  background: #f8faf9;
}

footer {
  padding: 0 40px 25px;
  color: #71827b;
  font-size: 10px;
  line-height: 1.7;
}

#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 20px;
  border-radius: 10px;
  background: #173239;
  color: #fff;
  max-width: calc(100% - 32px);
  font-size: 13px;
  box-shadow: 0 7px 25px #16342a22;
  z-index: 5;
  display: none;
}

#toast.visible {
  display: block;
}

dialog {
  max-width: 450px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  color: var(--ink);
}

dialog::backdrop {
  background: #102a3166;
}

dialog p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

.mobile-only {
  display: none;
}

.filters {
  align-items: flex-end;
}

.chart {
  width: 100%;
  display: block;
  margin-top: 18px;
}

.chart-table {
  font-size: 12px;
  width: 100%;
  border-collapse: collapse;
}

.chart-table th,
.chart-table td {
  text-align: left;
  padding: 10px 5px;
  border-bottom: 1px solid var(--line);
}

.chart-table th {
  font-weight: 500;
  color: var(--muted);
}

.wide-table {
  overflow-x: auto;
}

h2 .badge {
  vertical-align: middle;
  margin-left: 5px;
}

.subtle {
  color: var(--muted);
}

@media (max-width: 1100px) {
  aside {
    width: 200px;
    padding: 25px 14px;
  }

  header {
    padding: 0 25px;
  }

  .demo-banner {
    margin: 20px 25px 0;
  }

  main {
    padding: 28px 25px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .brand {
    font-size: 14px;
  }

  footer {
    padding-left: 25px;
  }

  .stat {
    padding: 16px;
  }

  .date-tag {
    display: none;
  }

  .filters {
    gap: 14px;
  }
}

@media (max-width: 680px) {
  .shell {
    display: block;
  }

  aside {
    width: 100%;
    height: auto;
    position: static;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    font-size: 16px;
  }

  .brand small {
    font-size: 8px;
  }

  .monogram {
    height: 34px;
    width: 33px;
  }

  .nav-label,
  .aside-bottom {
    display: none;
  }

  nav {
    margin-top: 15px;
    flex-direction: row;
    overflow: auto;
    gap: 4px;
    padding-bottom: 4px;
  }

  nav a {
    white-space: nowrap;
    padding: 10px 12px;
    font-size: 11px;
  }

  nav .icon {
    display: none;
  }

  header {
    padding: 12px 16px;
    height: auto;
    min-height: 66px;
    align-items: center;
  }

  .header-title {
    font-size: 11px;
  }

  .tag {
    margin-left: 3px;
    font-size: 8px;
  }

  .role-switch {
    display: block;
    font-size: 9px;
  }

  select {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    padding: 8px 18px 8px 8px;
  }

  .demo-banner {
    margin: 14px 16px 0;
    padding: 12px;
    gap: 9px;
  }

  .demo-banner strong {
    font-size: 11px;
  }

  .demo-banner span:not(.demo-icon) {
    font-size: 10px;
  }

  main {
    padding: 24px 16px;
  }

  h1 {
    font-size: 25px;
  }

  .subtitle {
    font-size: 12px;
    margin-bottom: 20px;
  }

  .stats {
    gap: 8px;
    margin-bottom: 18px;
  }

  .stat {
    padding: 14px 10px;
  }

  .stat .value {
    font-size: 25px;
  }

  .stat .label {
    font-size: 10px;
  }

  .stat small {
    font-size: 9px;
  }

  .stats.money .stat .value {
    font-size: 20px;
  }

  .card {
    padding: 19px;
    margin-bottom: 18px;
  }

  .grid {
    gap: 18px;
  }

  h2 {
    font-size: 16px;
  }

  .row > .actions {
    width: 100%;
  }

  .row > .badge {
    margin-left: auto;
  }

  .form-row {
    gap: 10px;
  }

  input {
    padding: 10px 6px;
    font-size: 12px;
  }

  .day {
    min-height: 38px;
  }

  footer {
    padding: 0 16px 18px;
    font-size: 9px;
  }

  dl div {
    font-size: 12px;
  }

  .page-heading {
    display: block;
  }

  .mobile-only {
    display: inline-block;
  }

  .page-heading .mobile-only {
    margin-bottom: 15px;
  }

  .salary-total strong {
    font-size: 23px;
  }

  .filters .field {
    flex: 1;
    min-width: 130px;
  }

  .chart-table {
    font-size: 10px;
  }

  .chart-table th,
  .chart-table td {
    padding: 9px 4px;
  }

  .connection {
    font-size: 10px;
  }

  .stats.two {
    grid-template-columns: 1fr 1fr;
  }

  .reset-small {
    font-size: 10px;
  }
}

.result-period {
  font-size: 12px;
  color: var(--muted);
  margin: -10px 0 16px;
}

.compact-profile {
  margin-left: 9px;
  white-space: nowrap;
  font-size: 12px;
}

.trajectory-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.trajectory-heading h2 {
  margin-bottom: 6px;
}

.trajectory-heading .help {
  margin: 0;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 20px 0 5px;
  font-size: 12px;
  color: var(--muted);
}

.chart-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.chart-legend i {
  width: 18px;
  height: 3px;
  border-radius: 2px;
}

.trajectory-chart {
  display: block;
  width: 100%;
  max-height: 380px;
  margin-top: 12px;
}

.trajectory-chart text {
  font-size: 15px;
  fill: var(--muted);
}

.axis-caption {
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  margin-top: -3px;
  margin-bottom: 16px;
}

.same-day-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.same-day {
  background: #f5f7f5;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.same-day.current {
  background: var(--soft);
  border-color: #bdd4c7;
}

.same-day span {
  font-size: 11px;
  color: var(--muted);
}

.same-day strong {
  font-size: 24px;
  line-height: 1.2;
}

.same-day small {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.day-control {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 20px;
}

.day-control strong {
  color: var(--ink);
  font-weight: 600;
}

.day-control input {
  display: block;
  border: 0;
  padding: 0;
  margin: 12px 0 4px;
  accent-color: var(--green);
  height: 24px;
}

.range-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
}

.small-notice {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf3ef;
  font-size: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.metric-policy {
  margin: 13px 0 0;
}

.source-table th {
  font-size: 11px;
}

.source-table td {
  font-size: 12px;
}

.chart-rules {
  margin-bottom: 0;
}

.trajectory-panel .help {
  line-height: 1.7;
}

.result-stats {
  margin-bottom: 22px;
}

@media (max-width: 680px) {
  .trajectory-heading {
    display: block;
  }

  .trajectory-heading .field {
    margin-top: 15px;
    max-width: 230px;
  }

  .same-day-grid {
    gap: 7px;
  }

  .same-day {
    padding: 11px 8px;
    gap: 6px;
  }

  .same-day span {
    font-size: 9px;
  }

  .same-day strong {
    font-size: 21px;
  }

  .same-day small {
    font-size: 9px;
  }

  .chart-legend {
    gap: 10px;
    font-size: 10px;
  }

  .trajectory-chart text {
    font-size: 22px;
  }

  .trajectory-chart {
    margin-top: 10px;
  }

  .source-table th {
    font-size: 9px;
  }

  .source-table td {
    font-size: 10px;
  }

  .result-period {
    font-size: 11px;
  }

  .compact-profile {
    display: inline-block;
    margin: 6px 0 0 0;
  }

  .trajectory-heading h2 {
    font-size: 16px;
  }

  .result-stats .stat .value {
    font-size: 24px;
  }
}

.range-ticks {
  position: relative;
  display: block;
  height: 14px;
}

.range-ticks span {
  position: absolute;
  top: 0;
}

.range-ticks span:first-child {
  left: 0;
}

.range-ticks span:nth-child(2) {
  left: 40%;
  transform: translateX(-50%);
}

.range-ticks span:last-child {
  right: 0;
}

.live-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 22px;
  margin: 20px 0;
}

.live-fields strong {
  display: block;
  margin-top: 6px;
}

.live-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 10px 0 24px;
}

.live-empty {
  max-width: 760px;
}

.chart-scroll {
  overflow-x: auto;
}

.chart-scroll svg {
  width: 100%;
  min-width: 470px;
}

.live-fields + .validation {
  margin: 18px 0;
}

[data-live-metric][aria-pressed='true'] {
  background: #174d73;
  color: white;
}

[hidden] {
  display: none !important;
}

.node-owner {
  font-size: 11px;
  color: var(--muted);
}

.node-status {
  font-size: 12px;
  color: var(--muted);
  margin: 16px 40px 0;
}

.node-status:empty {
  display: none;
}

.member-nav {
  align-items: stretch;
}

.member-nav button {
  display: block;
  text-align: left;
  background: transparent;
  color: #526566;
  border-radius: 8px;
  padding: 13px 12px;
  font-size: 13px;
  font-weight: 500;
}

.member-nav button[aria-pressed='true'] {
  background: var(--soft);
  color: var(--green);
  font-weight: 650;
}

.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.filters label {
  flex: 1;
  min-width: 150px;
  font-size: 12px;
  font-weight: 600;
}

.filters select {
  display: block;
  width: 100%;
  margin-top: 8px;
}

.scroll {
  overflow: auto;
  max-width: 100%;
}

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

td,
th {
  padding: 10px 6px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

caption {
  text-align: left;
  font-weight: 600;
  margin-bottom: 12px;
}

#content > section,
#content > [data-member-view='accounts'] > section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 24px;
  margin-bottom: 22px;
}

#content input[type='checkbox'] {
  width: auto;
}

#content form label,
main > form label {
  display: block;
  margin: 12px 0;
}

main > form {
  max-width: 480px;
}

#invite-link {
  font-size: 12px;
}

.member-portal select {
  min-width: 0;
}

.member-portal .node-session {
  flex-wrap: wrap;
}

nav.member-nav {
  display: flex;
  flex-direction: column;
}

#content > h1 {
  margin-bottom: 20px;
}

@media (max-width: 680px) {
  .node-status {
    margin: 12px 16px 0;
  }

  .member-nav button {
    white-space: nowrap;
    padding: 10px 12px;
    font-size: 11px;
  }

  nav.member-nav {
    flex-direction: row;
    overflow: auto;
    gap: 4px;
    align-items: center;
  }

  .filters label {
    min-width: 100%;
  }

  .heading {
    display: block;
  }

  #content > section,
  #content > [data-member-view='accounts'] > section {
    padding: 19px;
  }

  .node-owner {
    font-size: 10px;
  }
}

#personal-vacation > section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 24px;
  margin-bottom: 22px;
}

.personal-vacation-calendar {
  table-layout: fixed;
  width: 100%;
  max-width: 560px;
  margin: 16px 0;
  border-collapse: separate;
  border-spacing: 4px;
}

.personal-vacation-calendar th {
  text-align: center;
  padding: 4px;
  border: 0;
  font-size: 12px;
}

.personal-vacation-calendar td {
  border: 0;
  padding: 0;
  text-align: center;
}

.personal-vacation-calendar button {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 5px;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid transparent;
}

.personal-vacation-calendar .personal-day-available {
  background: #e8f3ed;
  color: #174936;
}

.personal-vacation-calendar .personal-day-blocked {
  background: #f8e7e2;
  color: #7d3020;
}

.personal-vacation-calendar .personal-day-unknown {
  background: #f3efdf;
  color: #63551e;
}

.personal-vacation-calendar button[aria-pressed='true'] {
  border: 2px solid #176657;
  background: #d2e8dd;
  color: #173c32;
  font-weight: 700;
}

.personal-vacation-calendar button:disabled {
  background: #f0f2f2;
  color: #647173;
  opacity: 0.75;
}

.personal-vacation-calendar button:focus-visible {
  outline: 3px solid #176657;
  outline-offset: 2px;
}

@media (max-width: 680px) {
  #personal-vacation > section {
    padding: 19px;
  }

  .personal-vacation-calendar {
    border-spacing: 2px;
  }

  .personal-vacation-calendar button {
    min-height: 34px;
    padding: 3px;
    font-size: 11px;
  }
}

.personal-calendar-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 560px;
  margin: 16px 0 0;
}

.personal-calendar-navigation button {
  padding: 6px 14px;
}

.personal-calendar-legend {
  max-width: 560px;
  font-size: 11px;
  line-height: 1.8;
}

.personal-calendar-legend span {
  padding: 3px 5px;
  border-radius: 4px;
}

.personal-day-manager {
  background: #f8e7e2;
  color: #7d3020;
}

.personal-day-readonly {
  background: #f0f2f2;
  color: #647173;
}

.personal-vacation-calendar .personal-day-manager {
  background: #f8e7e2;
  color: #7d3020;
}

.personal-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.personal-summary-cards > div {
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 10px;
}

.personal-summary-cards small {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
}

.personal-summary-cards strong {
  display: block;
  font-size: 22px;
}

.personal-year-summary {
  margin: 22px 0 28px;
}

@media (max-width: 900px) {
  .personal-summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .personal-summary-cards {
    grid-template-columns: 1fr;
  }
}

#profile-container > section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 24px;
  margin-bottom: 22px;
}

#member-profile dl {
  display: grid;
  grid-template-columns: minmax(110px, 180px) minmax(0, 1fr);
  gap: 10px 18px;
}

#member-profile dt {
  color: var(--muted);
}

#member-profile dd {
  margin: 0;
  overflow-wrap: anywhere;
}

#password-change-form {
  max-width: 480px;
}

#password-change-form input {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

#member-profile {
  overflow-wrap: anywhere;
}

@media (max-width: 680px) {
  #profile-container > section {
    padding: 19px;
  }

  #member-profile dl {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  #member-profile dd {
    margin-bottom: 10px;
  }
}

.member-sales .sales-chart-frame {
  position: relative;
  min-width: 0;
}

.member-sales .sales-chart {
  display: block;
  width: 100%;
  height: 216px;
  max-height: none;
  touch-action: pan-y;
  cursor: crosshair;
}

.member-sales .sales-chart [hidden],
.member-sales .sales-chart-tooltip[hidden] {
  display: none;
}

.member-sales .sales-chart text {
  fill: #40594f;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  text-rendering: optimizeLegibility;
}

.member-sales .sales-chart-tooltip {
  position: absolute;
  left: 6px;
  top: 6px;
  width: max-content;
  min-width: 54px;
  max-width: 150px;
  padding: 7px 9px;
  border: 1px solid #cbd7cf;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.98);
  color: #193a37;
  box-shadow: 0 3px 12px #183b2814;
  pointer-events: none;
  z-index: 1;
}

.member-sales .sales-tooltip-rows {
  display: grid;
  gap: 4px;
}

.member-sales .sales-tooltip-reading {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.member-sales .sales-tooltip-reading i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.member-sales .sales-tooltip-reading strong {
  font-size: 12px;
  line-height: 1.3;
  text-align: right;
  font-weight: 600;
}

.member-sales .sales-month-0 {
  background: #7c3aed;
}

.member-sales .sales-month-1 {
  background: #0072b2;
}

.member-sales .sales-month-2 {
  background: #d55e00;
}

.member-sales .sales-legend {
  display: flex;
  flex-wrap: wrap;
  margin-top: 8px;
}

.member-sales .sales-legend span {
  display: flex;
  gap: 6px;
  align-items: center;
}

.member-sales .sales-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.member-sales .sales-legend .sales-plan-swatch {
  width: 18px;
  height: 0;
  border-radius: 0;
  border-top: 2px dashed #15803d;
}

.member-sales .sales-day-control {
  display: block;
  font-weight: 600;
  margin-top: 10px;
}

.member-sales .sales-day-control input {
  display: block;
  width: 100%;
  height: 32px;
  margin: 8px 0;
  accent-color: #176657;
  padding: 0;
  border: 0;
}

.member-sales .sales-day-control input:focus-visible {
  outline: 2px solid #176657;
  outline-offset: 4px;
}

.member-sales .sales-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.member-sales .sales-trajectory,
.member-sales .sales-breakdown {
  margin-top: 18px;
  padding: 18px;
}

.member-sales .sales-result-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.member-sales .sales-result-stats .stat {
  min-width: 0;
}

.member-sales .sales-result-stats small {
  display: block;
  color: #52665b;
  margin-top: 6px;
}

.member-sales .sales-result-stats .highlight {
  background: #176657;
  color: #fff;
  border-color: #176657;
}

.member-sales .sales-result-stats .highlight .label,
.member-sales .sales-result-stats .highlight small {
  color: #d5e8df;
}

.member-sales .sales-scope-note,
.member-sales .sales-coverage {
  color: #52665b;
  font-size: 13px;
}

@media (max-width: 680px) {
  .member-sales .sales-chart {
    height: 188px;
  }

  .member-sales .sales-day-control {
    margin-top: 12px;
  }

  .member-sales .sales-trajectory,
  .member-sales .sales-breakdown {
    padding: 12px;
  }

  .member-sales .sales-result-stats {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .member-sales .sales-result-stats .stat {
    min-width: 0;
  }

  .member-sales .sales-chart-tooltip {
    max-width: 140px;
  }
}

/* Important home actions precede sales in DOM and visual order. */

.important-notifications {
  background: #fff7e6;
  border: 1px solid #c58a29;
  border-left: 5px solid #a85e09;
  border-radius: 12px;
  padding: 20px;
  margin: 0 0 24px;
  color: #49320c;
}

.important-notifications h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-size: 20px;
  color: #49320c;
}

.important-notifications-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #734509;
  color: #fff;
  font-size: 19px;
  font-weight: 750;
  flex-shrink: 0;
}

.important-notifications-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.important-notification {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #e0c58d;
  border-radius: 9px;
  background: #fff;
  padding: 16px;
  min-width: 0;
}

.important-notification-body {
  min-width: 0;
  max-width: 72ch;
  overflow-wrap: anywhere;
}

.important-notification h3 {
  margin: 0 0 7px;
  font-size: 16px;
  color: #49320c;
}

.important-notification p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #49320c;
}

.important-notification-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.important-notification button {
  min-height: 44px;
  font-size: 13px;
  padding: 10px 16px;
  white-space: normal;
}

.important-notification button:focus-visible {
  outline: 3px solid #734509;
  outline-offset: 3px;
}

.important-notification .secondary {
  background: #fff;
  border: 1px solid #6c614b;
  color: #49320c;
}

@media (max-width: 680px) {
  .important-notifications {
    padding: 16px 12px;
    margin-bottom: 18px;
  }

  .important-notifications h2 {
    font-size: 18px;
    gap: 8px;
  }

  .important-notification {
    display: block;
    padding: 14px;
  }

  .important-notification-actions {
    margin-top: 13px;
    align-items: stretch;
  }

  .important-notification-actions button {
    flex: 1;
    min-width: 120px;
  }

  .important-notification p {
    font-size: 14px;
  }
}

.home-overview {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 22px;
}

.home-overview h2 {
  margin: 0 0 20px;
}

.home-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  margin-bottom: 12px;
}

.home-section-heading h3 {
  margin: 0;
  font-size: 16px;
}

.home-section-heading button,
.home-events button {
  font-size: 13px;
  min-height: 44px;
  white-space: normal;
}

.home-events {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.home-events li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 13px 15px;
  background: #f4f7f5;
  border-radius: 8px;
}

.home-events strong {
  font-size: 14px;
}

.home-events p,
.home-muted {
  font-size: 13px;
  color: #526566;
  line-height: 1.6;
  margin: 6px 0;
}

.home-brief-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.home-brief-cards > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f9fbfa;
}

.home-brief-cards small {
  display: block;
  color: #526566;
  font-size: 12px;
  margin-bottom: 9px;
}

.home-brief-cards strong {
  display: block;
  font-size: 22px;
  overflow-wrap: anywhere;
}

@media (max-width: 680px) {
  .home-overview {
    padding: 18px 14px;
  }

  .home-brief-cards {
    grid-template-columns: 1fr;
  }

  .home-section-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .home-events li {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .home-events button {
    width: 100%;
  }
}

.vacation-plan-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 22px;
}

.vacation-plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #ccd6d2;
}

.vacation-plan-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.vacation-plan-info strong {
  font-size: 14px;
}

.vacation-plan-status {
  font-size: 13px;
  color: #344b43;
}

.vacation-plan-info small {
  font-size: 12px;
  line-height: 1.5;
  max-width: 52ch;
}

.vacation-plan-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.vacation-plan-actions button {
  min-height: 44px;
  padding: 9px 12px;
}

.vacation-history {
  margin: 12px 0;
}

.vacation-history summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
}

@media (max-width: 680px) {
  .vacation-plan-row {
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
  }

  .vacation-plan-info {
    flex: 1 1 100%;
  }

  .vacation-plan-actions {
    margin-left: auto;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}

.vacation-team-list,
.manager-upcoming ul {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}

.vacation-team-row,
.manager-upcoming-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 0;
  border-bottom: 1px solid #ccd6d2;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.vacation-team-row strong,
.manager-upcoming-row strong {
  font-size: 14px;
}

.manager-upcoming {
  margin-top: 18px;
}

.manager-upcoming-row.requires-action {
  border-left: 3px solid #a65b0a;
  padding-left: 10px;
}

.manager-upcoming-row small,
.vacation-team-row small {
  line-height: 1.5;
}

.manager-upcoming p {
  font-size: 12px;
}

.importance-label {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: #74400b;
}

.important-group {
  margin-top: 16px;
}

.thematic-notifications li {
  margin: 12px 0;
}

.manager-upcoming-row small {
  color: #344b43;
}

/* Approved personal vacation layout: real server data, scoped to this page. */

.personal-page {
  --pv-muted: #536966;
  --pv-line: #d9e2de;
  line-height: 1.5;
  max-width: 1140px;
  margin: 0 auto;
  color: #163333;
}

.personal-page p {
  overflow-wrap: anywhere;
}

.pv-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.pv-heading h2 {
  font-size: 30px;
  letter-spacing: -0.7px;
  line-height: 1.25;
  margin: 0;
}

.pv-heading p {
  font-size: 14px;
  color: var(--pv-muted);
  margin: 5px 0 0;
}

.personal-page button {
  min-height: 42px;
}

.pv-heading > button {
  white-space: normal;
  flex-shrink: 0;
}

.pv-notice {
  border: 1px solid #e4c58d;
  border-left: 4px solid #af7218;
  border-radius: 12px;
  background: #fff6e5;
  padding: 19px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.pv-notice strong {
  font-size: 17px;
  display: block;
}

.pv-notice p {
  font-size: 14px;
  margin: 4px 0 0;
  color: #694e28;
}

.pv-notice-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.pv-notice-actions button {
  background: #6d4a19;
}

.pv-notice-success {
  background: #edf5ee;
  border-color: #b9cfbd;
  border-left-color: #165d51;
}

.pv-notice-success p {
  color: #335d43;
}

.personal-page .personal-year-summary {
  margin: 0 0 26px;
}

.personal-page .personal-year-summary > h3 {
  font-size: 14px;
  color: var(--pv-muted);
  font-weight: 500;
  margin: 0 0 8px;
}

.personal-page .personal-year-summary > label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  margin: 0 0 12px;
}

.personal-page .personal-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  background: white;
  border: 1px solid var(--pv-line);
  border-radius: 12px;
  margin: 0;
  padding: 19px 0;
}

.personal-page .personal-summary-cards > div {
  border: 0;
  border-right: 1px solid var(--pv-line);
  border-radius: 0;
  padding: 0 22px;
  min-width: 0;
}

.personal-page .personal-summary-cards > div:last-child {
  border: 0;
}

.personal-page .personal-summary-cards small {
  font-size: 13px;
  line-height: 1.4;
  color: var(--pv-muted);
  margin-bottom: 8px;
}

.personal-page .personal-summary-cards strong {
  font-size: 28px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.personal-page .personal-summary-cards > div:last-child strong {
  color: #165d51;
}

.personal-page .personal-year-summary > p:not(.notice),
.personal-page .personal-year-summary > small {
  font-size: 12px;
  color: var(--pv-muted);
  display: inline-block;
  margin: 9px 12px 0 0;
}

.pv-list-panel {
  background: #fff;
  border: 1px solid var(--pv-line);
  border-radius: 12px;
  overflow: hidden;
}

.personal-page .home-section-heading {
  margin: 0;
  padding: 18px 22px;
  border-bottom: 1px solid var(--pv-line);
  gap: 12px;
}

.personal-page .home-section-heading h3 {
  font-size: 19px;
  margin: 0;
}

.personal-page .home-section-heading button {
  min-height: 38px;
  font-size: 13px;
  padding: 6px 12px;
}

.personal-page .vacation-plan-list {
  padding: 0 22px;
  margin: 0;
  list-style: none;
}

.personal-page .vacation-plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 0;
  border-bottom: 1px solid var(--pv-line);
  border-radius: 0;
  margin: 0;
  padding: 20px 0;
  background: white;
}

.personal-page .vacation-plan-row:last-child {
  border: 0;
}

.personal-page .vacation-plan-info {
  min-width: 0;
}

.personal-page .vacation-plan-info strong {
  font-size: 16px;
  font-weight: 650;
}

.pv-row-title {
  display: flex;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
}

.pv-duration {
  font-size: 13px;
  color: var(--pv-muted);
  white-space: nowrap;
}

.personal-page .vacation-plan-status {
  display: table;
  background: #eaf3ed;
  color: #275b40;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 12px;
  margin-top: 7px;
}

.personal-page .vacation-plan-status.pv-taken {
  color: #52655d;
  background: #eef1ef;
}

.personal-page .vacation-plan-status.pv-pending {
  background: #fff1d8;
  color: #795013;
}

.personal-page .vacation-plan-info small {
  display: block;
  font-size: 12px;
  margin-top: 7px;
  color: #755222;
}

.personal-page .vacation-plan-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.personal-page .vacation-plan-actions button {
  min-height: 38px;
  font-size: 13px;
  padding: 7px 12px;
}

.personal-page .pv-list-panel [data-vacation-plan-list] > p {
  padding: 16px 22px;
  color: var(--pv-muted);
}

.pv-policy {
  padding: 0 4px;
  margin: 17px 0 0;
  max-width: 780px;
  color: var(--pv-muted);
}

.pv-policy strong {
  color: #344f45;
}

.personal-page [data-personal-result]:empty,
.personal-page [data-personal-inbox-slot] section:has(> p:only-child:empty) {
  display: none;
}

.personal-page [data-personal-inbox-slot] {
  margin-top: 20px;
}

.personal-page [data-personal-inbox-slot] section {
  padding: 0;
  border: 0;
}

.personal-page [data-personal-result] {
  font-size: 14px;
  background: #edf3ef;
  padding: 12px;
  border-radius: 8px;
}

.pv-calendar-dialog,
.pv-confirm {
  padding: 0;
  border: 1px solid #d2dcd6;
  border-radius: 15px;
  width: min(600px, calc(100% - 32px));
  max-width: 600px;
  max-height: calc(100dvh - 40px);
  color: #163333;
  box-shadow: 0 24px 90px #122b2733;
  overflow: auto;
  line-height: 1.5;
}

.pv-calendar-dialog::backdrop,
.pv-confirm::backdrop {
  background: #0b252770;
}

.pv-dialog-heading {
  padding: 22px 24px 16px;
  border-bottom: 1px solid #d9e2de;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.pv-dialog-heading h3 {
  font-size: 22px;
  margin: 0;
  line-height: 1.3;
}

.pv-dialog-heading p {
  color: #536966;
  font-size: 13px;
  margin: 4px 0 0;
}

.pv-close {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  font-size: 22px;
}

.pv-dialog-body {
  padding: 20px 24px;
}

.pv-date-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pv-date-fields label {
  font-size: 13px;
  color: #536966;
  font-weight: 600;
  margin: 0 !important;
}

.pv-date-fields input {
  display: block;
  margin-top: 6px;
  min-height: 44px;
  font-size: 16px;
}

.pv-calendar-dialog [data-personal-quota] {
  font-size: 12px;
  color: #536966;
}

.pv-calendar-dialog .personal-calendar-navigation {
  margin: 12px 0 6px;
  max-width: none;
}

.pv-calendar-dialog .personal-calendar-navigation button {
  min-width: 42px;
  min-height: 42px;
  background: #edf3ef;
  color: #165d51;
}

.pv-calendar-dialog .personal-vacation-calendar {
  max-width: none;
  margin: 0;
  border-spacing: 4px;
}

.pv-calendar-dialog .personal-vacation-calendar th {
  font-size: 11px;
  padding: 4px 0;
}

.pv-calendar-dialog .personal-vacation-calendar button {
  min-height: 46px;
  font-size: 14px;
  padding: 4px 0;
}

.pv-calendar-dialog .personal-vacation-calendar button small {
  display: block;
  font-size: 9px;
  font-weight: 400;
}

.pv-calendar-dialog .personal-vacation-calendar .personal-day-manager {
  background: repeating-linear-gradient(135deg, #fff5df, #fff5df 5px, #faedcf 5px, #faedcf 7px);
  color: #755122;
}

.pv-calendar-dialog .personal-vacation-calendar [aria-pressed='true'] {
  background: #165d51;
  color: white;
  border-color: #165d51;
}

.pv-calendar-dialog .personal-vacation-calendar [aria-pressed='true'] small {
  color: #fff;
}

.pv-calendar-dialog .personal-calendar-legend {
  font-size: 11px;
  margin: 10px 0 0;
}

.pv-range-summary {
  border: 1px solid #d9e2de;
  border-radius: 8px;
  background: #f6f8f4;
  padding: 14px 16px;
  margin-top: 18px;
  min-height: 72px;
}

.pv-range-summary strong {
  font-size: 14px;
  display: block;
}

.pv-range-summary p {
  font-size: 13px;
  margin: 5px 0 0;
  color: #536966;
}

.pv-range-summary ul {
  padding-left: 18px;
  font-size: 12px;
  color: #765425;
  margin: 8px 0 0;
}

.pv-range-summary[data-kind='manager'] {
  background: #fff7e8;
  border-color: #e7c993;
}

.pv-range-summary[data-kind='unknown'],
.pv-range-summary[data-kind='readonly'],
.pv-range-summary[data-kind='personal-limit'],
.pv-range-summary[data-kind='short-notice-no-manager'] {
  background: #fff5f3;
  border-color: #d9a3a3;
}

.pv-check {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  margin: 18px 0 0 !important;
  cursor: pointer;
}

.pv-check input {
  width: 19px !important;
  height: 19px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: #165d51;
  flex-shrink: 0;
}

.pv-dialog-footer {
  padding: 16px 24px;
  border-top: 1px solid #d9e2de;
  background: #fff;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  position: sticky;
  bottom: 0;
  flex-wrap: wrap;
}

.pv-dialog-footer button {
  min-height: 44px;
  font-size: 13px;
}

.pv-dialog-result {
  font-size: 13px;
  padding: 0 24px;
  margin: 0 0 12px;
  color: #536966;
}

.pv-dialog-result:empty {
  display: none;
}

.pv-confirm .pv-dialog-body p {
  font-size: 15px;
  white-space: pre-line;
  margin: 0;
  color: #536966;
}

.pv-confirm form {
  margin: 0;
}

@media (max-width: 760px) {
  .pv-heading {
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
  }

  .pv-heading h2 {
    font-size: 27px;
  }

  .pv-heading p {
    font-size: 12px;
  }

  .pv-heading > button {
    font-size: 13px;
    padding: 9px 12px;
  }

  .pv-notice {
    display: block;
    padding: 16px 15px;
    margin-bottom: 18px;
  }

  .pv-notice strong {
    font-size: 16px;
  }

  .pv-notice p {
    font-size: 13px;
  }

  .pv-notice-actions {
    margin-top: 14px;
  }

  .pv-notice-actions button {
    width: 100%;
    font-size: 13px;
  }

  .personal-page .personal-summary-cards {
    grid-template-columns: 1fr 1fr;
    padding: 0;
  }

  .personal-page .personal-summary-cards > div {
    padding: 16px 18px;
    border-right: 1px solid #d9e2de;
    border-bottom: 1px solid #d9e2de;
  }

  .personal-page .personal-summary-cards > div:nth-child(2) {
    border-right: 0;
  }

  .personal-page .personal-summary-cards > div:nth-child(3) {
    border-bottom: 0;
  }

  .personal-page .personal-summary-cards small {
    font-size: 12px;
  }

  .personal-page .personal-summary-cards strong {
    font-size: 25px;
  }

  .personal-page .home-section-heading {
    padding: 15px 16px;
  }

  .personal-page .home-section-heading h3 {
    font-size: 17px;
  }

  .personal-page .home-section-heading button {
    font-size: 11px;
    min-height: 40px;
    padding: 6px 8px;
  }

  .personal-page .vacation-plan-list {
    padding: 0 16px;
  }

  .personal-page .vacation-plan-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 17px 0;
  }

  .personal-page .vacation-plan-info strong {
    font-size: 15px;
  }

  .personal-page .vacation-plan-actions {
    align-self: stretch;
    justify-content: flex-end;
  }

  .personal-page .vacation-plan-actions button {
    min-height: 42px;
    font-size: 12px;
    min-width: 90px;
  }

  .pv-policy {
    font-size: 12px;
  }

  .pv-calendar-dialog,
  .pv-confirm {
    max-height: calc(100dvh - 24px);
    width: calc(100% - 24px);
  }

  .pv-dialog-heading {
    padding: 19px 16px 14px;
  }

  .pv-dialog-heading h3 {
    font-size: 20px;
  }

  .pv-dialog-body {
    padding: 17px 16px;
  }

  .pv-date-fields {
    gap: 8px;
  }

  .pv-date-fields input {
    padding: 9px 6px;
  }

  .pv-dialog-footer {
    padding: 13px 16px;
  }

  .pv-dialog-footer button {
    flex: 1;
  }

  .pv-calendar-dialog .personal-vacation-calendar {
    border-spacing: 3px;
  }

  .pv-calendar-dialog .personal-vacation-calendar button {
    min-height: 42px;
  }

  .pv-range-summary {
    padding: 12px;
  }

  .pv-dialog-result {
    padding: 0 16px;
  }
}

@media (max-width: 360px) {
  .personal-page .personal-summary-cards > div {
    padding: 14px;
  }

  .personal-page .personal-summary-cards small {
    font-size: 11px;
  }

  .personal-page .personal-summary-cards strong {
    font-size: 23px;
  }

  .personal-page .vacation-plan-info strong {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .personal-page *,
  .pv-confirm * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}

.personal-page .vacation-plan-status {
  align-self: flex-start;
}

.pv-calendar-dialog .pv-dialog-heading,
.pv-confirm .pv-dialog-heading {
  position: sticky;
  top: 0;
  background: white;
  z-index: 2;
}

.pv-calendar-dialog input,
.pv-calendar-dialog button {
  scroll-margin-top: 100px;
  scroll-margin-bottom: 90px;
}

/* Approved team vacation layout: scoped presentation over existing API. */

.team-page {
  --muted: #536966;
  --line: #d9e2de;
  line-height: 1.5;
  color: #163333;
  max-width: 1300px;
  margin: auto;
}

.team-page button {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #bdcdc4;
  border-radius: 7px;
  background: white;
  color: #163333;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.team-page h2,
.team-page h3,
.team-page p {
  margin: 0;
}

.team-page .team-heading h2 {
  font-size: 30px;
  letter-spacing: -0.7px;
  line-height: 1.25;
}

.team-page .team-callout button {
  background: #6d4a19;
  border-color: #6d4a19;
  color: white;
}

.team-page .team-period-right button {
  font-size: 12px;
}

.team-page .team-request-actions button[data-inbox-action='approve'],
.team-page .team-request-actions button[data-inbox-action='reconcile'] {
  background: var(--green);
  color: white;
  border-color: var(--green);
}

.team-page .team-request-actions button[data-inbox-action='reject'] {
  color: #a43132;
  border-color: #d6b1ac;
}

.team-page .team-active-filter input {
  width: auto;
}

.team-page [data-inbox-status] {
  padding: 0 20px;
  font-size: 12px;
}

.team-page [data-inbox-status]:empty {
  display: none;
}

.team-page .team-request-history {
  border-top: 1px solid var(--line);
  padding: 12px 20px;
}

.team-page .team-request-history summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 13px;
}

.team-page .thematic-notifications {
  border-top: 1px solid var(--line);
  padding: 14px 20px;
}

.team-page .thematic-notifications h3 {
  font-size: 14px;
}

.team-page .thematic-notifications ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.team-page .thematic-notifications li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  font-size: 12px;
}

.team-page .thematic-notifications button {
  flex-shrink: 0;
  font-size: 12px;
}

.team-page .team-period-badge {
  display: inline-flex;
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 5px;
  background: #eaf3ed;
  color: #275b40;
}

.team-page .team-period-badge.amber,
.team-page .team-period-badge.unknown {
  background: #fff1d8;
  color: #795013;
}

.team-page .team-period-badge.gray {
  background: #eef1ef;
  color: #52655d;
}

.team-page .team-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.team-page .team-heading p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 5px;
}

.team-page .team-callout {
  border: 1px solid #e4c58d;
  border-left: 4px solid #af7218;
  border-radius: 12px;
  background: var(--amber-bg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.team-page .team-callout strong {
  font-size: 16px;
  display: block;
}

.team-page .team-callout p {
  font-size: 13px;
  margin-top: 3px;
  color: #694e28;
}

.team-page .team-callout .primary {
  background: #6d4a19;
  border-color: #6d4a19;
  flex-shrink: 0;
}

.team-page .team-stats {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 17px 0;
  margin-bottom: 24px;
}

.team-page .team-stats > div {
  padding: 0 20px;
  border-right: 1px solid var(--line);
  min-width: 0;
}

.team-page .team-stats > div:last-child {
  border: 0;
}

.team-page .team-stats > div span {
  font-size: 12px;
  color: var(--muted);
  display: block;
}

.team-page .team-stats > div strong {
  font-size: 28px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  display: block;
  margin-top: 6px;
}

.team-page .team-stats > div small {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 5px;
}

.team-page .team-stats > div:last-child strong {
  color: var(--amber);
}

.team-page .team-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 22px;
  overflow: hidden;
}

.team-page .team-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.team-page .team-panel-heading p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.team-page .team-switch {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: #eff3ef;
  border: 1px solid #dce4df;
  border-radius: 8px;
}

.team-page .team-switch button {
  border: 0;
  background: transparent;
  min-height: 34px;
  font-size: 12px;
  padding: 6px 12px;
  color: #52675c;
}

.team-page .team-switch button[aria-pressed='true'] {
  background: #fff;
  box-shadow: 0 1px 3px #17372a14;
  color: var(--brand);
}

.team-page .team-filters {
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  align-items: flex-end;
  border-bottom: 1px solid var(--line);
}

.team-page .team-filters label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  flex: 1;
  min-width: 0;
}

.team-page .team-filters select {
  display: block;
  width: 100%;
  margin-top: 6px;
}

.team-page .team-filters > .quiet {
  font-size: 12px;
  min-height: 42px;
}

.team-page .team-timeline-tools {
  padding: 14px 20px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.team-page .team-range {
  display: flex;
  gap: 8px;
  align-items: center;
}

.team-page .team-range button {
  width: 36px;
  min-height: 36px;
  padding: 0;
  font-size: 18px;
}

.team-page .team-range strong {
  font-size: 14px;
  min-width: 135px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.team-page .team-range .today {
  font-size: 12px;
  width: auto;
  padding: 6px 10px;
}

.team-page .team-active-filter {
  display: flex;
  gap: 7px;
  align-items: center;
  min-height: 32px;
  font-size: 11px;
  color: var(--muted);
  text-align: right;
}

.team-page .team-timeline {
  padding: 0 20px;
}

.team-page .team-timeline-header {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 6px 0 10px;
}

.team-page .team-timeline-header > span {
  font-size: 11px;
  color: var(--muted);
  align-self: center;
}

.team-page .team-days {
  display: grid;
  grid-template-columns: repeat(var(--team-days), minmax(0, 1fr));
  gap: 3px;
}

.team-page .team-day-head {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.team-page .team-day-head small {
  display: block;
  font-size: 9px;
  color: #728278;
}

.team-page .team-day-head.today {
  color: var(--brand);
  font-weight: 700;
}

.team-page .team-day-head.weekend {
  color: #85775b;
}

.team-page .team-person-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.team-page .team-person-row:last-child {
  border: 0;
}

.team-page .team-person-name strong {
  display: block;
  font-weight: 600;
}

.team-page .team-person-name small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.team-page .team-person-track {
  display: grid;
  grid-template-columns: repeat(var(--team-days), minmax(0, 1fr));
  gap: 3px;
  position: relative;
  background: repeating-linear-gradient(
    to right,
    transparent,
    transparent calc(100% / var(--team-days) - 1px),
    #edf1ec calc(100% / var(--team-days) - 1px),
    #edf1ec calc(100% / var(--team-days))
  );
  border-radius: 5px;
}

.team-page .team-interval {
  grid-row: 1;
  align-self: center;
  min-height: 29px;
  min-width: 0;
  width: 100%;
  padding: 4px 7px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: left;
  border: 1px solid #b5cebf;
  border-radius: 5px;
  background: #e7f0e9;
  color: #20533a;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.team-page .team-interval:hover {
  background: #dceade !important;
  border-color: #769c83 !important;
}

.team-page .team-interval.unknown {
  background: repeating-linear-gradient(135deg, #fff2d9, #fff2d9 5px, #fce9c4 5px, #fce9c4 7px);
  border: 1px dashed #bb8d3e;
  color: #73511f;
}

.team-page .team-interval small {
  font-size: 10px;
  font-weight: 400;
  margin-left: 4px;
}

.team-page .team-nothing {
  grid-column: 1/-1;
  color: #728278;
  align-self: center;
  font-size: 11px;
  padding-left: 6px;
}

.team-page .team-legend {
  padding: 12px 20px 15px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
}

.team-page .team-legend span {
  display: flex;
  gap: 6px;
  align-items: center;
}

.team-page .team-legend i {
  width: 12px;
  height: 9px;
  display: block;
  border: 1px solid #b5cebf;
  border-radius: 2px;
  background: #e7f0e9;
}

.team-page .team-legend .unknown {
  background: #fff2d9;
  border: 1px dashed #bb8d3e;
}

.team-page .team-schedule-note {
  font-size: 11px;
  color: var(--muted);
  padding: 0 20px 16px;
}

.team-page .team-overlaps {
  border-top: 1px solid var(--line);
  background: #f8faf7;
  padding: 12px 20px;
  font-size: 12px;
  color: #50665a;
}

.team-page .team-overlaps strong {
  color: #344f45;
}

.team-page .team-data-status {
  padding: 14px 20px;
  background: #fff7e8;
  color: #795013;
  border-bottom: 1px solid #e7cf9d;
}

.team-page .team-data-status:empty {
  display: none;
}

.team-page .team-data-status.error {
  background: #fff3f1;
  color: var(--red);
}

.team-page .team-data-status button {
  margin-left: 12px;
}

.team-page .vacation-team-list {
  list-style: none;
  padding: 0 20px;
  margin: 0;
}

.team-page .vacation-team-row {
  padding: 15px 0;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.team-page .vacation-team-row:last-child {
  border: 0;
}

.team-page .vacation-team-row strong {
  font-size: 14px;
  display: block;
}

.team-page .vacation-team-row p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.team-page .team-period-right {
  text-align: right;
  flex-shrink: 0;
}

.team-page .team-period-right > strong {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.team-page .team-period-right .team-period-badge {
  margin-top: 6px;
}

.team-page .team-queue-subtitle {
  font-size: 12px;
  color: var(--muted);
  padding: 14px 20px 0;
}

.team-page .team-requests {
  padding: 0 20px;
  list-style: none;
  margin: 0;
}

.team-page .team-request {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
}

.team-page .team-request:last-child {
  border: 0;
}

.team-page .team-request-heading {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.team-page .team-request-heading strong {
  font-size: 14px;
}

.team-page .team-request p {
  font-size: 13px;
}

.team-page .team-request .team-request-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.team-page .team-request-reasons {
  font-size: 12px;
  color: #795013;
  line-height: 1.6;
  margin-top: 7px;
}

.team-page .team-request-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.team-page .team-request-actions button {
  font-size: 12px;
  min-height: 38px;
  padding: 8px 12px;
}

@media (max-width: 1100px) {
  .team-page .team-timeline-header,
  .team-page .team-person-row {
    grid-template-columns: 165px 1fr;
    gap: 12px;
  }

  .team-page .team-active-filter {
    max-width: 170px;
  }

  .team-page .team-interval small {
    display: none;
  }
}

@media (max-width: 760px) {
  .team-page .team-heading {
    display: block;
    margin-bottom: 19px;
  }

  .team-page .team-heading p {
    font-size: 12px;
    margin-top: 4px;
  }

  .team-page .team-callout {
    padding: 15px 16px;
    display: block;
    margin-bottom: 18px;
  }

  .team-page .team-callout strong {
    font-size: 15px;
  }

  .team-page .team-callout p {
    font-size: 12px;
  }

  .team-page .team-callout button {
    margin-top: 12px;
    width: 100%;
    min-height: 42px;
  }

  .team-page .team-stats {
    padding: 15px 0;
    margin-bottom: 20px;
  }

  .team-page .team-stats > div {
    padding: 0 12px;
  }

  .team-page .team-stats > div span {
    font-size: 10px;
    min-height: 30px;
  }

  .team-page .team-stats > div strong {
    font-size: 25px;
    margin-top: 4px;
  }

  .team-page .team-stats > div small {
    font-size: 9px;
  }

  .team-page .team-panel-heading {
    padding: 15px 16px;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .team-page .team-panel-heading h2 {
    font-size: 17px;
  }

  .team-page .team-panel-heading p {
    font-size: 11px;
  }

  .team-page .team-switch button {
    min-height: 36px;
    font-size: 11px;
    padding: 6px 10px;
  }

  .team-page .team-panel-heading > .team-switch {
    margin-left: auto;
  }

  .team-page .team-filters {
    padding: 14px 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .team-page .team-filters label {
    font-size: 10px;
  }

  .team-page .team-filters select {
    font-size: 12px;
    padding: 8px;
  }

  .team-page .team-filters > .quiet {
    grid-column: 1/-1;
    min-height: 30px;
    padding: 4px 0;
    justify-self: start;
    font-size: 11px;
  }

  .team-page .team-timeline-tools {
    padding: 13px 16px 8px;
    display: block;
  }

  .team-page .team-range {
    justify-content: space-between;
    gap: 7px;
  }

  .team-page .team-range button {
    width: 40px;
    min-height: 40px;
  }

  .team-page .team-range strong {
    font-size: 13px;
    min-width: 125px;
  }

  .team-page .team-range .today {
    font-size: 11px;
    padding: 6px 8px;
  }

  .team-page .team-active-filter {
    min-height: 40px;
    text-align: left;
    font-size: 10px;
    margin-top: 9px;
    max-width: none;
  }

  .team-page .team-timeline {
    padding: 0 16px;
  }

  .team-page .team-timeline-header {
    padding: 4px 0 8px;
  }

  .team-page .team-timeline-header > span {
    display: none;
  }

  .team-page .team-day-head {
    font-size: 11px;
  }

  .team-page .team-day-head small {
    font-size: 9px;
  }

  .team-page .team-person-row {
    padding: 13px 0;
  }

  .team-page .team-person-name {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
  }

  .team-page .team-person-name strong {
    font-size: 12px;
  }

  .team-page .team-person-name small {
    font-size: 10px;
    text-align: right;
    max-width: 130px;
    margin: 0;
  }

  .team-page .team-person-track {
    min-height: 32px;
  }

  .team-page .team-interval {
    min-height: 32px;
    font-size: 10px;
    padding: 4px 6px;
  }

  .team-page .team-legend {
    padding: 12px 16px;
    font-size: 10px;
    gap: 12px;
  }

  .team-page .team-schedule-note {
    font-size: 10px;
    padding: 0 16px 13px;
  }

  .team-page .team-overlaps {
    padding: 12px 16px;
    font-size: 11px;
  }

  .team-page .vacation-team-list {
    padding: 0 16px;
  }

  .team-page .vacation-team-row {
    display: block;
    position: relative;
    padding: 15px 0;
  }

  .team-page .vacation-team-row strong {
    font-size: 13px;
  }

  .team-page .vacation-team-row p {
    font-size: 11px;
  }

  .team-page .team-period-right {
    text-align: left;
    margin-top: 8px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
  }

  .team-page .team-period-right .team-period-badge {
    margin: 0;
  }

  .team-page .team-period-right > strong {
    font-size: 12px;
  }

  .team-page .team-queue-subtitle {
    padding: 13px 16px 0;
    font-size: 11px;
  }

  .team-page .team-requests {
    padding: 0 16px;
  }

  .team-page .team-request {
    grid-template-columns: 1fr;
    padding: 16px 0;
    gap: 12px;
  }

  .team-page .team-request-heading strong {
    font-size: 13px;
  }

  .team-page .team-request p {
    font-size: 12px;
  }

  .team-page .team-request .team-request-meta {
    font-size: 10px;
  }

  .team-page .team-request-reasons {
    font-size: 11px;
  }

  .team-page .team-request-actions {
    justify-content: flex-end;
  }

  .team-page .team-request-actions button {
    font-size: 12px;
  }

  .team-page .team-data-status {
    padding: 13px 16px;
  }

  .team-page .team-data-status button {
    margin: 10px 0 0;
    min-height: 42px;
    display: block;
  }
}

@media (max-width: 760px) {
  .team-page .team-range button {
    width: 44px;
  }

  .team-page .team-person-track {
    min-height: 44px;
  }

  .team-page .team-interval {
    min-height: 44px;
  }

  .team-page .team-mobile-dates {
    color: var(--muted);
  }
}

@media (max-width: 360px) {
  .team-page .team-stats > div {
    padding: 0 10px;
  }

  .team-page .team-stats > div small {
    font-size: 9px;
  }

  .team-page .team-range strong {
    min-width: 105px;
    font-size: 12px;
  }

  .team-page .team-range .today {
    font-size: 10px;
    padding: 5px;
  }

  .team-page .team-person-name small {
    max-width: 115px;
  }

  .team-page .team-switch button {
    padding: 6px 8px;
  }
}

.team-page .team-days,
.team-page .team-person-track {
  grid-template-columns: repeat(var(--team-days), minmax(0, 1fr));
}

.team-page .team-mobile-dates {
  display: none;
}

.team-page .team-panel-heading h2,
.team-page .team-panel-heading h3 {
  font-size: 18px;
}

.team-page .team-request-actions {
  max-width: 290px;
}

.team-page .team-request p {
  margin-top: 5px;
}

.team-page .team-person-track {
  row-gap: 4px;
}

.team-page .team-empty {
  font-size: 13px;
}

.team-page [data-team-retry] {
  margin: 0 20px 16px;
}

.team-page .team-data-status {
  margin: 0;
}

.team-page .team-timeline-tools .team-range button {
  min-width: 36px;
}

.team-detail {
  padding: 0;
  width: min(520px, calc(100% - 24px));
  max-width: 520px;
  max-height: calc(100dvh - 24px);
  border: 1px solid #d2dcd6;
  border-radius: 15px;
  color: #163333;
  line-height: 1.5;
  overflow: auto;
}

.team-detail::backdrop {
  background: #0b252770;
}

.team-dialog-heading {
  padding: 21px 22px 15px;
  border-bottom: 1px solid #d9e2de;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.team-dialog-heading h3 {
  font-size: 21px;
  margin: 0;
}

.team-dialog-heading button {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  font-size: 20px;
}

.team-dialog-body {
  padding: 18px 22px;
}

.team-dialog-body dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.team-dialog-body dl div {
  display: block;
  border: 0;
  padding: 0;
}

.team-dialog-body dt {
  font-size: 11px;
  color: #536966;
}

.team-dialog-body dd {
  text-align: left;
  font-size: 14px;
  margin: 4px 0 0;
}

.team-dialog-body p {
  font-size: 12px;
  margin-top: 16px;
}

.team-dialog-footer {
  padding: 15px 22px;
  border-top: 1px solid #d9e2de;
  display: flex;
  justify-content: flex-end;
}

.team-dialog-footer button {
  min-height: 44px;
}

@media (max-width: 760px) {
  .team-page .team-heading h2 {
    font-size: 27px;
  }

  .team-page .team-mobile-dates {
    display: block;
    font-size: 11px;
    color: #536966;
    margin: -2px 0 7px;
  }

  .team-page .team-mobile-dates:empty {
    display: none;
  }

  .team-page .thematic-notifications li {
    align-items: flex-start;
    font-size: 11px;
  }

  .team-page .thematic-notifications button {
    font-size: 10px;
    max-width: 130px;
    min-height: 44px;
    white-space: normal;
  }

  .team-page .team-range button {
    min-height: 44px;
    min-width: 40px;
  }

  .team-page .team-range strong {
    min-width: 110px;
  }

  .team-page .team-active-filter {
    min-height: 44px;
  }

  .team-page .team-request-actions {
    max-width: none;
  }

  .team-page .team-request-actions button {
    flex: 1;
    min-height: 44px;
  }

  .team-page .team-filters select {
    margin-top: 6px;
  }

  .team-page .team-person-row {
    grid-template-columns: 1fr;
  }

  .team-detail .team-dialog-heading,
  .team-detail .team-dialog-body,
  .team-detail .team-dialog-footer {
    padding: 16px;
  }

  .team-dialog-footer button {
    width: 100%;
  }
}

/* Positions are static stylesheet classes, preserving the existing self-only CSP. */

.team-page .team-timeline {
  --team-days: 14;
}

.team-page .team-from-1 {
  grid-column-start: 1;
}

.team-page .team-until-1 {
  grid-column-end: 1;
}

.team-page .team-from-2 {
  grid-column-start: 2;
}

.team-page .team-until-2 {
  grid-column-end: 2;
}

.team-page .team-from-3 {
  grid-column-start: 3;
}

.team-page .team-until-3 {
  grid-column-end: 3;
}

.team-page .team-from-4 {
  grid-column-start: 4;
}

.team-page .team-until-4 {
  grid-column-end: 4;
}

.team-page .team-from-5 {
  grid-column-start: 5;
}

.team-page .team-until-5 {
  grid-column-end: 5;
}

.team-page .team-from-6 {
  grid-column-start: 6;
}

.team-page .team-until-6 {
  grid-column-end: 6;
}

.team-page .team-from-7 {
  grid-column-start: 7;
}

.team-page .team-until-7 {
  grid-column-end: 7;
}

.team-page .team-from-8 {
  grid-column-start: 8;
}

.team-page .team-until-8 {
  grid-column-end: 8;
}

.team-page .team-from-9 {
  grid-column-start: 9;
}

.team-page .team-until-9 {
  grid-column-end: 9;
}

.team-page .team-from-10 {
  grid-column-start: 10;
}

.team-page .team-until-10 {
  grid-column-end: 10;
}

.team-page .team-from-11 {
  grid-column-start: 11;
}

.team-page .team-until-11 {
  grid-column-end: 11;
}

.team-page .team-from-12 {
  grid-column-start: 12;
}

.team-page .team-until-12 {
  grid-column-end: 12;
}

.team-page .team-from-13 {
  grid-column-start: 13;
}

.team-page .team-until-13 {
  grid-column-end: 13;
}

.team-page .team-from-14 {
  grid-column-start: 14;
}

.team-page .team-until-14 {
  grid-column-end: 14;
}

.team-page .team-from-15 {
  grid-column-start: 15;
}

.team-page .team-until-15 {
  grid-column-end: 15;
}

.team-page .team-lane-1 {
  grid-row: 1;
}

.team-page .team-lane-2 {
  grid-row: 2;
}

.team-page .team-lane-3 {
  grid-row: 3;
}

.team-page .team-lane-4 {
  grid-row: 4;
}

.team-page .team-lane-5 {
  grid-row: 5;
}

.team-page .team-lane-6 {
  grid-row: 6;
}

.team-page .team-lane-7 {
  grid-row: 7;
}

.team-page .team-lane-8 {
  grid-row: 8;
}

.team-page .team-lane-9 {
  grid-row: 9;
}

.team-page .team-lane-10 {
  grid-row: 10;
}

.team-page .team-lane-11 {
  grid-row: 11;
}

.team-page .team-lane-12 {
  grid-row: 12;
}

.team-page .team-lane-13 {
  grid-row: 13;
}

.team-page .team-lane-14 {
  grid-row: 14;
}

.team-page .team-lane-15 {
  grid-row: 15;
}

.team-page .team-lane-16 {
  grid-row: 16;
}

.team-page .team-lane-17 {
  grid-row: 17;
}

.team-page .team-lane-18 {
  grid-row: 18;
}

.team-page .team-lane-19 {
  grid-row: 19;
}

.team-page .team-lane-20 {
  grid-row: 20;
}

.team-page .team-lane-21 {
  grid-row: 21;
}

.team-page .team-lane-22 {
  grid-row: 22;
}

.team-page .team-lane-23 {
  grid-row: 23;
}

.team-page .team-lane-24 {
  grid-row: 24;
}

.team-page .team-lane-25 {
  grid-row: 25;
}

.team-page .team-lane-26 {
  grid-row: 26;
}

.team-page .team-lane-27 {
  grid-row: 27;
}

.team-page .team-lane-28 {
  grid-row: 28;
}

.team-page .team-lane-29 {
  grid-row: 29;
}

.team-page .team-lane-30 {
  grid-row: 30;
}

.team-page .team-lane-31 {
  grid-row: 31;
}

.team-page .team-lane-32 {
  grid-row: 32;
}

.team-page .team-lane-overflow {
  grid-row: auto;
}

@media (max-width: 760px) {
  .team-page .team-timeline {
    --team-days: 7;
  }
}

.team-page .team-range button[data-team-today] {
  width: auto;
  min-width: 0;
  flex-shrink: 0;
  font-size: 12px;
  padding: 6px 10px;
}

.team-page .team-empty {
  padding: 24px 20px;
  color: var(--muted);
  margin: 0;
}

.team-page #upcoming .team-empty {
  padding: 16px 0;
}

@media (max-width: 760px) {
  .team-page .team-range {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px auto;
    gap: 6px;
    width: 100%;
  }

  .team-page .team-range strong {
    min-width: 0;
    font-size: 12px;
  }

  .team-page .team-range button[data-team-today] {
    font-size: 11px;
    padding: 6px 8px;
    min-width: 0;
  }

  .team-page .team-range button[data-team-period] {
    width: 40px;
    min-width: 40px;
  }
}

/* Shared portal system: approved green/ivory palette, accessible controls, no external fonts. */

:root {
  --portal-surface: #fff;
  --portal-ink: #163333;
  --portal-muted: #536966;
  --portal-border: #d9e2de;
  --portal-soft: #edf4ef;
  --portal-radius: 14px;
  --portal-space: 24px;
  --portal-focus: #946915;
}

.portal-skip {
  position: fixed;
  left: 16px;
  top: -100px;
  padding: 12px 18px;
  background: var(--portal-ink);
  color: #fff;
  z-index: 100;
}

.portal-skip:focus {
  top: 12px;
}

.member-portal {
  color: var(--portal-ink);
  line-height: 1.5;
}

.member-portal .shell {
  min-height: 100dvh;
}

.member-portal aside {
  width: 244px;
  padding: 28px 18px;
}

.member-portal .brand {
  gap: 12px;
  font-size: 16px;
}

.member-portal .brand small {
  font-size: 9px;
  letter-spacing: 1px;
}

.member-portal .nav-label {
  font-size: 11px;
  letter-spacing: 1.1px;
  margin: 36px 12px 14px;
  color: var(--portal-muted);
}

.member-portal nav.member-nav {
  gap: 6px;
  margin: 0;
  overflow: visible;
}

.member-portal .member-nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  text-align: left;
  font-size: 14px;
  line-height: 1.45;
  white-space: normal;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--portal-muted);
  transition:
    background 0.16s,
    color 0.16s;
}

.member-portal .member-nav button svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.member-portal .member-nav button:hover {
  background: var(--portal-soft);
  filter: none;
}

.member-portal .member-nav button[aria-current='page'] {
  background: #e7f1ea;
  border-color: #d6e6da;
  color: #155f4c;
  font-weight: 650;
}

.member-portal header {
  min-height: 82px;
  height: auto;
  padding: 16px 36px;
  gap: 20px;
}

.member-portal .header-title {
  font-size: 14px;
  color: var(--portal-muted);
}

.member-portal .node-owner {
  font-size: 12px;
  color: var(--portal-muted);
  overflow-wrap: anywhere;
}

.member-portal .node-session {
  justify-content: flex-end;
  gap: 12px;
}

.member-portal #logout {
  font-size: 13px;
  min-height: 44px;
  padding: 10px 16px;
}

.member-portal .node-status {
  font-size: 12px;
  color: var(--portal-muted);
  margin: 16px 36px 0;
}

.member-portal main {
  max-width: 1440px;
  padding: 28px 36px 40px;
  outline: none;
}

.member-portal main > div {
  min-width: 0;
}

.portal-page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.portal-page-heading h2 {
  font-size: 32px;
  letter-spacing: -0.7px;
  line-height: 1.2;
  margin: 0 0 8px;
  font-weight: 650;
}

.portal-eyebrow {
  font-size: 11px;
  color: #176657;
  font-weight: 650;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.portal-subtitle {
  font-size: 14px;
  color: var(--portal-muted);
  line-height: 1.6;
  margin: 0;
}

.portal-page-heading > button {
  flex-shrink: 0;
  min-height: 44px;
  font-size: 13px;
}

.portal-panel {
  background: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius);
  overflow: hidden;
}

.portal-panel-heading {
  padding: 20px 24px;
  border-bottom: 1px solid var(--portal-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.portal-panel-heading h3 {
  line-height: 1.4;
  margin: 0;
}

.portal-panel-heading p {
  font-size: 13px;
  margin: 5px 0 0;
  color: var(--portal-muted);
}

.portal-panel-heading button {
  font-size: 13px;
  min-height: 44px;
  flex-shrink: 0;
}

.home-overview {
  margin: 0;
}

.home-sales-panel {
  margin-bottom: 20px;
}

.home-sales-panel #home-sales-brief {
  padding: 20px 24px;
  min-height: 100px;
}

.home-sales-panel .home-muted {
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
  color: var(--portal-muted);
  max-width: 65ch;
}

.home-sales-panel .home-brief-cards {
  margin: 16px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.home-sales-panel .home-brief-cards > div {
  border: 0;
  border-right: 1px solid var(--portal-border);
  border-radius: 0;
  padding: 4px 16px 4px 0;
  background: transparent;
}

.home-sales-panel .home-brief-cards > div:last-child {
  border: 0;
}

.home-sales-panel .home-brief-cards small {
  font-size: 13px;
  color: var(--portal-muted);
}

.home-sales-panel .home-brief-cards strong {
  display: block;
  font-size: 30px;
  letter-spacing: -0.5px;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}

.home-shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.home-shortcut {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  background: #fff;
  color: var(--portal-ink);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius);
  padding: 22px;
  min-height: 104px;
}

.home-shortcut > svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: #176657;
}

.home-shortcut > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.home-shortcut strong {
  display: block;
  font-size: 16px;
  font-weight: 650;
}

.home-shortcut small {
  display: block;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--portal-muted);
  margin-top: 5px;
}

.home-shortcut:hover {
  border-color: #8eac9a;
  background: #f9fcfa;
  filter: none;
}

.member-portal .member-sales > section {
  padding: 0;
  background: transparent;
  border: 0;
  margin: 0;
}

.member-sales > .heading,
.member-sales > section > .heading {
  margin-bottom: 22px;
}

.member-sales .heading h2 {
  font-size: 32px;
  letter-spacing: -0.7px;
  line-height: 1.2;
  margin: 0;
}

.member-sales .heading button {
  min-height: 44px;
  font-size: 13px;
  background: white;
  color: var(--portal-ink);
  border: 1px solid #c9d6ce;
}

.member-sales .filters {
  padding: 20px 24px;
  background: white;
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius);
  gap: 16px;
  margin-bottom: 22px;
}

.member-sales .filters label {
  color: var(--portal-muted);
  font-weight: 500;
  min-width: 130px;
}

.member-sales .filters select {
  min-height: 44px;
  border-color: #c9d6ce;
}

.member-sales .stats {
  gap: 16px;
  margin-bottom: 12px;
}

.member-sales .stat {
  border-radius: var(--portal-radius);
  border-color: var(--portal-border);
  padding: 22px;
}

.member-sales .stat .label {
  font-size: 13px;
}

.member-sales .stat .value {
  font-size: 34px;
  font-variant-numeric: tabular-nums;
  margin: 14px 0 10px;
  line-height: 1.15;
}

.member-sales .stat small {
  font-size: 12px;
  line-height: 1.6;
}

.member-sales .sales-coverage {
  font-size: 13px;
  line-height: 1.65;
  color: var(--portal-muted);
  margin: 0 0 22px;
}

.member-sales .sales-trajectory,
.member-sales .sales-breakdown,
.member-sales .sales-clarifications,
.member-sales > section > details {
  background: white;
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius);
  padding: 22px 24px;
  margin: 0 0 20px;
}

.member-sales .sales-trajectory h3,
.member-sales .sales-breakdown h3,
.member-sales .sales-clarifications h3 {
  font-size: 18px;
}

.member-sales .sales-metric-control {
  font-size: 13px;
}

.member-sales .sales-metric-control select {
  min-height: 44px;
  font-size: 14px;
}

.member-sales .sales-legend {
  font-size: 12px;
  line-height: 1.6;
  gap: 12px;
}

.member-sales .sales-day-control {
  font-size: 13px;
}

.member-sales #sales-day {
  min-height: 44px;
}

.member-sales table {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.member-sales td,
.member-sales th {
  padding: 13px 12px;
}

.member-sales tbody tr:hover {
  background: #f5f8f5;
}

.member-sales summary {
  font-size: 15px;
  min-height: 36px;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
}

.profile-page dl {
  padding: 8px 24px 16px;
}

.profile-page dl > div {
  display: block;
  padding: 15px 0;
  font-size: 15px;
}

.profile-page dl > div:first-child {
  border-top: 0;
}

.profile-page dt {
  font-size: 12px;
  color: var(--portal-muted);
  margin-bottom: 5px;
}

.profile-page dd {
  text-align: left;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.profile-security > p,
.profile-security > form {
  margin: 18px 24px;
  font-size: 14px;
  color: var(--portal-muted);
}

.profile-security input {
  font-size: 16px;
  min-height: 46px;
  margin-top: 7px;
}

.profile-security form label {
  font-size: 13px;
  color: var(--portal-ink);
}

.profile-security form button {
  min-height: 44px;
  margin-top: 8px;
}

.profile-security #password-change-status:empty {
  display: none;
}

.member-portal #content > [data-member-view='accounts'] > section.accounts-page {
  background: transparent;
  border: 0;
  padding: 0;
}

.accounts-page .scroll {
  background: white;
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius);
  padding: 0 16px;
  margin: 20px 0;
}

.accounts-page table {
  font-size: 13px;
}

.accounts-page th,
.accounts-page td {
  padding: 16px 8px;
}

.accounts-page table button {
  min-height: 44px;
}

.accounts-page input,
.accounts-page select {
  min-height: 44px;
  font-size: 16px;
}

.accounts-page h3 {
  font-size: 18px;
  margin-top: 24px;
}

body:not(.member-portal) > main {
  max-width: 560px;
  margin: 56px auto;
  padding: 32px;
  background: white;
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius);
  line-height: 1.6;
}

body:not(.member-portal) > main h1 {
  font-size: 28px;
  line-height: 1.25;
}

body:not(.member-portal) > main input {
  font-size: 16px;
  min-height: 46px;
}

body:not(.member-portal) > main button {
  min-height: 46px;
}

body:not(.member-portal) > main form {
  max-width: none;
}

body:not(.member-portal) > main p {
  font-size: 14px;
  color: var(--portal-muted);
}

.member-portal :is(button, a, input, select, summary):focus-visible {
  outline: 3px solid var(--portal-focus);
  outline-offset: 3px;
}

.member-portal .home-shortcut:focus-visible {
  outline-offset: 2px;
}

.member-portal button {
  touch-action: manipulation;
}

.member-portal h2,
.member-portal h3 {
  text-wrap: balance;
}

.member-portal .portal-panel p {
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .member-portal aside {
    width: 218px;
    padding: 24px 14px;
  }

  .member-portal main {
    padding: 26px 24px;
  }

  .member-portal header {
    padding: 16px 24px;
  }

  .member-portal .node-status {
    margin-left: 24px;
    margin-right: 24px;
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .home-shortcuts {
    gap: 16px;
  }

  .home-shortcut {
    padding: 18px;
    gap: 12px;
  }

  .member-sales .stat {
    padding: 18px;
  }

  .member-sales .stat .value {
    font-size: 30px;
  }
}

@media (max-width: 760px) {
  .member-portal .shell {
    display: block;
  }

  .member-portal aside {
    width: 100%;
    position: static;
    padding: 20px 16px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--portal-border);
  }

  .member-portal .nav-label {
    display: none;
  }

  .member-portal nav.member-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 18px;
    overflow: visible;
  }

  .member-portal .member-nav button {
    padding: 10px 8px;
    gap: 7px;
    min-height: 54px;
    line-height: 1.35;
  }

  .member-portal .member-nav button svg {
    width: 18px;
    height: 18px;
  }

  .member-portal header {
    padding: 14px 16px;
    gap: 12px;
    min-height: 72px;
  }

  .member-portal .header-title {
    font-size: 12px;
  }

  .member-portal .node-owner {
    font-size: 11px;
    max-width: 210px;
  }

  .member-portal .node-session {
    gap: 8px;
  }

  .member-portal #logout {
    min-height: 44px;
    padding: 9px 12px;
    font-size: 12px;
  }

  .member-portal main {
    padding: 24px 16px 32px;
  }

  .member-portal .node-status {
    margin: 12px 16px 0;
    font-size: 11px;
  }

  .portal-page-heading {
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
  }

  .portal-page-heading h2,
  .member-sales .heading h2 {
    font-size: 28px;
  }

  .portal-eyebrow {
    font-size: 10px;
    margin-bottom: 8px;
  }

  .portal-subtitle {
    font-size: 13px;
  }

  .portal-page-heading > button {
    font-size: 12px;
  }

  .portal-panel-heading {
    padding: 17px 18px;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
  }

  .portal-panel-heading h3 {
    font-size: 18px;
  }

  .home-sales-panel #home-sales-brief {
    padding: 18px;
  }

  .home-sales-panel .home-muted {
    font-size: 13px;
  }

  .home-sales-panel .home-brief-cards {
    grid-template-columns: 1fr;
  }

  .home-sales-panel .home-brief-cards > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--portal-border);
  }

  .home-sales-panel .home-brief-cards strong {
    font-size: 25px;
    margin: 0;
  }

  .home-shortcuts {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .home-shortcut {
    min-height: 92px;
    padding: 18px;
  }

  .home-shortcut strong {
    font-size: 15px;
  }

  .home-shortcut small {
    font-size: 12px;
  }

  .member-sales .heading {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .member-sales .heading button {
    font-size: 12px;
    padding: 10px 12px;
  }

  .member-sales .filters {
    padding: 16px;
    gap: 14px;
  }

  .member-sales .filters label {
    min-width: 100%;
  }

  .member-sales .stats {
    gap: 12px;
  }

  .member-sales .stat {
    padding: 20px;
  }

  .member-sales .stat .value {
    font-size: 32px;
  }

  .member-sales .sales-trajectory,
  .member-sales .sales-breakdown,
  .member-sales .sales-clarifications,
  .member-sales > section > details {
    padding: 18px 16px;
  }

  .member-sales .sales-legend {
    font-size: 11px;
    gap: 10px;
  }

  .member-sales .scroll {
    margin-inline: -4px;
  }

  .member-sales table {
    font-size: 12px;
  }

  .profile-page dl {
    padding: 6px 18px 12px;
  }

  .profile-security > p,
  .profile-security > form {
    margin: 18px;
  }

  .accounts-page .scroll {
    padding: 0 10px;
  }

  .accounts-page table {
    font-size: 12px;
  }

  body:not(.member-portal) > main {
    margin: 24px 12px;
    padding: 24px 20px;
  }
}

@media (max-width: 360px) {
  .member-portal nav.member-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-portal header {
    align-items: flex-start;
  }

  .member-portal .node-session {
    flex: 1;
  }

  .member-portal .node-owner {
    max-width: 150px;
  }

  .portal-panel-heading button {
    width: 100%;
  }

  .portal-page-heading > button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .member-portal * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 210px;
}

.admin-dialog {
  padding: 0;
  width: min(600px, calc(100% - 24px));
  max-width: 600px;
  max-height: calc(100dvh - 24px);
  overflow: auto;
  color: var(--portal-ink);
}

.admin-dialog .portal-panel-heading {
  align-items: flex-start;
}

.admin-dialog h3 {
  font-size: 20px;
  line-height: 1.4;
}

.admin-dialog [data-admin-close] {
  min-width: 44px;
  min-height: 44px;
  padding: 6px 12px;
  font-size: 22px;
}

.admin-dialog-body {
  padding: 20px 24px;
}

.admin-dialog-body p {
  font-size: 14px;
  line-height: 1.6;
}

.admin-dialog label {
  display: block;
  font-size: 13px;
  margin: 16px 0;
}

.admin-dialog input {
  margin-top: 7px;
  font-size: 16px;
  min-height: 46px;
}

.admin-dialog .admin-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.admin-dialog .admin-check input {
  width: 22px !important;
  height: 22px;
  min-height: 22px;
  flex-shrink: 0;
  margin-top: 0;
}

.admin-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.admin-dialog-actions button {
  min-height: 44px;
}

.admin-history {
  padding: 0;
  list-style: none;
  margin: 0;
}

.admin-history li {
  padding: 18px 0;
  border-bottom: 1px solid var(--portal-border);
}

.admin-history li:first-child {
  padding-top: 0;
}

.admin-history li:last-child {
  border-bottom: 0;
}

.admin-history p {
  margin: 5px 0;
}

.admin-history small {
  font-size: 12px;
  color: var(--portal-muted);
}

@media (max-width: 760px) {
  .admin-dialog-body {
    padding: 18px;
  }

  .admin-dialog-actions button {
    flex: 1;
  }

  .admin-dialog .portal-panel-heading {
    padding: 18px;
  }
}

/* One account row aligned with the brand; the full name remains accessible. */

.member-portal .member-topbar {
  min-height: 76px;
  padding: 16px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  background: #fff;
  border-bottom: 1px solid var(--portal-border);
  position: relative;
}

.member-topbar .brand {
  flex: 0 1 auto;
  min-width: 0;
}

.member-topbar .brand-name {
  min-width: 0;
}

.member-account {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
  max-width: 50%;
}

.member-account-label {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: right;
  max-width: 260px;
}

.member-topbar .node-owner {
  position: relative;
  display: block;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--portal-ink);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.member-topbar .member-account-role {
  font-size: 11px;
  color: var(--portal-muted);
  line-height: 1.4;
}

.member-topbar #logout {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
}

.member-topbar #logout svg {
  width: 20px;
  height: 20px;
}

.member-portal .shell {
  min-height: calc(100dvh - 76px);
}

.member-portal aside {
  top: 0;
  height: calc(100dvh - 76px);
  min-height: 0;
  padding-top: 24px;
}

.member-portal .nav-label {
  margin-top: 0;
}

.member-portal .member-topbar .sales-visually-hidden {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 760px) {
  .member-portal .member-topbar {
    min-height: 72px;
    padding: 14px 16px;
    gap: 12px;
  }

  .member-topbar .brand {
    gap: 9px;
    font-size: 15px;
  }

  .member-topbar .brand small {
    font-size: 8px;
    letter-spacing: 0.65px;
  }

  .member-topbar .monogram {
    width: 33px;
    height: 36px;
    flex-shrink: 0;
  }

  .member-account {
    max-width: 48%;
    gap: 9px;
  }

  .member-account-label {
    max-width: 135px;
  }

  .member-topbar .node-owner {
    font-size: 12px;
  }

  .member-topbar .member-account-role {
    font-size: 10px;
  }

  .member-portal aside {
    height: auto;
    padding: 10px 16px 12px;
  }

  .member-portal nav.member-nav {
    margin-top: 0;
  }

  .member-portal .shell {
    min-height: calc(100dvh - 72px);
  }
}

@media (max-width: 360px) {
  .member-portal .member-topbar {
    padding: 12px;
    gap: 8px;
    min-height: 68px;
  }

  .member-topbar .brand {
    gap: 7px;
    font-size: 13px;
  }

  .member-topbar .monogram {
    width: 29px;
    height: 33px;
    font-size: 15px;
  }

  .member-topbar .brand small {
    font-size: 6.5px;
    letter-spacing: 0.25px;
  }

  .member-account {
    max-width: 48%;
    gap: 6px;
  }

  .member-account-label {
    max-width: 94px;
  }

  .member-topbar .node-owner {
    font-size: 11px;
  }

  .member-topbar .member-account-role {
    font-size: 10px;
  }

  .member-topbar #logout {
    width: 44px;
    height: 44px;
    padding: 10px;
  }

  .member-portal .shell {
    min-height: calc(100dvh - 68px);
  }
}

/* Compact per-employee disclosure: independent of the legacy column row. */

.team-page .team-compact-employee {
  list-style: none;
  border-bottom: 1px solid var(--line);
  margin: 0;
  padding: 0;
}

.team-page .team-compact-employee summary {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(110px, 0.8fr) minmax(130px, 1fr) 20px;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 12px 4px;
  cursor: pointer;
  list-style: none;
}

.team-page .team-compact-employee summary::-webkit-details-marker {
  display: none;
}

.team-page .team-compact-employee summary:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
  border-radius: 5px;
}

.team-compact-person,
.team-compact-balance {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.team-compact-person strong,
.team-compact-person small,
.team-compact-status {
  overflow-wrap: anywhere;
}

.team-compact-person small,
.team-compact-balance small,
.team-compact-period small,
.team-compact-body > p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.team-compact-balance {
  font-variant-numeric: tabular-nums;
}

.team-compact-status {
  font-size: 14px;
}

.team-compact-status.needs-review {
  color: var(--amber);
  font-weight: 600;
}

.team-compact-chevron {
  font-size: 22px;
  text-align: center;
}

.team-compact-employee details[open] > summary .team-compact-chevron {
  transform: rotate(180deg);
}

.team-compact-body {
  padding: 0 4px 12px 20px;
}

.team-compact-body ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.team-page .team-compact-period {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.team-compact-period > div {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 200px;
}

.team-compact-period button {
  min-height: 44px;
  min-width: 44px;
}

.team-compact-period .team-period-badge {
  max-width: 100%;
  white-space: normal;
}

@media (max-width: 760px) {
  .team-page .team-compact-employee summary {
    grid-template-columns: minmax(0, 1fr) 20px;
    gap: 6px 12px;
    padding: 12px 2px;
  }

  .team-compact-person {
    grid-column: 1;
  }

  .team-compact-chevron {
    grid-column: 2;
    grid-row: 1/4;
  }

  .team-compact-balance {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
  }

  .team-compact-status {
    grid-column: 1;
  }

  .team-compact-body {
    padding-left: 2px;
  }

  .team-compact-period > div {
    min-width: 0;
    flex-basis: 100%;
  }
}

.team-compact-status small {
  display: block;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 4px;
}

.team-page .team-compact-employee > details {
  padding: 0;
  border: 0;
}

.team-page .team-compact-employee summary {
  font-weight: 400;
}

@media (max-width: 480px) {
  .team-page .team-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .team-page .team-filters label {
    font-size: 12px;
  }

  .team-page .team-filters select {
    font-size: 14px;
  }

  .team-page .team-filters > button {
    width: 100%;
    min-height: 44px;
  }
}

.staff-directory-filters {
  display: grid;
  grid-template-columns: minmax(12rem, 2fr) minmax(9rem, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin: 18px 0;
}

.staff-directory-filters label,
.payroll-period-filter {
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
}

.staff-directory-filters input,
.staff-directory-filters select,
.payroll-period-filter select {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.staff-directory-count {
  font-size: 0.9rem;
  color: #51676c;
}

.staff-directory-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.staff-directory-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 0.8fr) minmax(0, 1.3fr);
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid #e4ebe8;
  font-size: 0.9rem;
}

.staff-directory-row p {
  margin: 5px 0 0;
  color: #51676c;
  font-size: 0.84rem;
}

.staff-directory-row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.staff-directory-caption {
  display: block;
  font-size: 0.75rem;
  color: #5b7276;
  margin-bottom: 5px;
}

.staff-directory-group .portal-panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.staff-directory-group h3 {
  margin: 0;
}

.payroll-page,
.staff-directory {
  min-width: 0;
}

.payroll-period-filter {
  max-width: 22rem;
  margin: 18px 0;
}

.payroll-person h3 {
  margin-top: 0;
}

.payroll-total {
  display: grid;
  gap: 5px;
}

.payroll-total strong {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  letter-spacing: -0.035em;
}

.payroll-total span {
  color: #51676c;
  font-size: 0.88rem;
}

.payroll-breakdown {
  margin: 18px 0 0;
}

.payroll-breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid #e4ebe8;
  padding: 12px 0;
}

.payroll-breakdown dt {
  color: #51676c;
  overflow-wrap: anywhere;
  min-width: 0;
}

.payroll-breakdown dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
  white-space: nowrap;
}

.payroll-trend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.payroll-trend > div {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.payroll-trend small {
  font-size: 0.78rem;
  color: #51676c;
}

.payroll-bar-track {
  height: 12px;
  background: #e6f1ed;
  border-radius: 3px;
  overflow: hidden;
}

.payroll-bar-track svg {
  width: 100%;
  height: 12px;
  display: block;
  fill: #237660;
}

.payroll-delta {
  font-size: 1.3rem;
  font-weight: 600;
}

.payroll-page h3,
.staff-directory h3 {
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .staff-directory-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .staff-directory-filters button {
    width: 100%;
  }

  .staff-directory-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
  }

  .staff-directory-row > div:first-child {
    grid-column: 1/-1;
  }

  .staff-directory-row strong {
    font-size: 0.98rem;
  }

  .payroll-trend {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .payroll-breakdown > div {
    gap: 12px;
    font-size: 0.86rem;
  }

  .payroll-breakdown dd {
    white-space: normal;
    flex: 0 0 auto;
    max-width: 45%;
    overflow-wrap: anywhere;
  }

  .payroll-page .portal-page-heading,
  .staff-directory .portal-page-heading {
    flex-wrap: wrap;
  }

  .payroll-page .portal-page-heading > button,
  .staff-directory .portal-page-heading > button {
    max-width: 100%;
  }
}

.payroll-page .portal-panel {
  padding: 20px;
  margin-block: 18px;
}

.staff-directory-group {
  margin-block: 14px;
}

.staff-directory-list {
  padding-inline: 18px;
}

.payroll-page .payroll-breakdown {
  margin-top: 10px;
}

.payroll-page .payroll-person h4 {
  margin-top: 24px;
  margin-bottom: 10px;
}

.payroll-page .payroll-total {
  border-top: 1px solid #e4ebe8;
  padding-top: 18px;
  margin-top: 24px;
}

@media (max-width: 760px) {
  .payroll-page .portal-panel {
    padding: 16px;
  }

  .staff-directory-list {
    padding-inline: 16px;
  }
}

.payroll-person:has(.payroll-position + .payroll-position) .payroll-position {
  border: 1px solid #dce7e2;
  border-radius: 12px;
  padding: 16px;
  margin-top: 18px;
}

.payroll-position-title {
  color: #175d4c;
  margin: 0 !important;
}

.payroll-position h5 {
  font-size: 0.92rem;
  margin: 22px 0 8px;
}

.payroll-position-total {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #e4ebe8;
  padding-top: 14px;
  font-size: 0.9rem;
}

.payroll-position-total strong {
  white-space: nowrap;
}

@media (max-width: 760px) {
  .payroll-person:has(.payroll-position + .payroll-position) .payroll-position {
    padding: 12px;
  }
}

/* Dense roster: complete table on phones, with horizontal scrolling and pinned names. */

.staff-directory-dense {
  font-size: 14px;
  line-height: 1.35;
}

.staff-directory-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.staff-directory-heading h2 {
  margin: 0;
  font-size: 20px;
}

.staff-directory-dense button,
.staff-directory-dense input,
.staff-directory-dense select {
  font-size: 14px;
  line-height: 1.35;
}

.staff-directory-dense .staff-directory-filters {
  grid-template-columns: minmax(10rem, 2fr) minmax(8rem, 1fr) auto;
  gap: 8px;
  margin: 8px 0;
}

.staff-directory-dense .staff-directory-filters label {
  font-size: 13px;
  gap: 4px;
}

.staff-directory-dense .staff-directory-filters input,
.staff-directory-dense .staff-directory-filters select,
.staff-directory-heading button,
.staff-directory-dense [data-staff-reset] {
  min-height: 36px;
  padding: 6px 10px;
  margin: 0;
}

.staff-directory-dense .staff-directory-count {
  font-size: 13px;
  margin: 8px 0;
}

.staff-table-scroll {
  overflow-x: auto;
  border: 1px solid #dce5e1;
  border-radius: 4px;
  max-width: 100%;
  isolation: isolate;
}

.staff-table-scroll:focus-visible {
  outline: 2px solid #237660;
  outline-offset: 2px;
}

.staff-directory-table {
  width: 100%;
  min-width: 650px;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  table-layout: fixed;
  font-size: 14px;
  line-height: 1.35;
}

.staff-directory-table th,
.staff-directory-table td {
  padding: 4px 10px;
  border-bottom: 1px solid #e4ebe8;
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.staff-directory-table thead th {
  background: #eef4f0;
  font-size: 13px;
  font-weight: 600;
  padding-block: 8px;
}

.staff-directory-table th:first-child,
.staff-directory-table td:first-child {
  width: 180px;
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
}

.staff-directory-table thead th:first-child {
  background: #eef4f0;
  z-index: 2;
}

.staff-directory-table th:nth-child(2) {
  width: 32%;
}

.staff-directory-table th:nth-child(3) {
  width: 18%;
}

.staff-directory-table .staff-group-row th {
  position: static;
  padding: 6px 10px;
  background: #f3f7f5;
  font-size: 14px;
  font-weight: 650;
}

.staff-group-count {
  font-size: 12px;
  font-weight: 400;
  color: #51676c;
  flex-shrink: 0;
}

.staff-directory-table tbody tr:last-child td {
  border-bottom: 1px solid #d2ded8;
}

.staff-directory-table button.staff-open-person {
  min-height: 30px;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #173e36;
  font-weight: 600;
  padding: 4px 0;
  margin: 0;
  cursor: pointer;
  white-space: normal;
}

.staff-open-person:hover {
  text-decoration: underline;
}

.staff-open-person small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #51676c;
}

.staff-open-person:focus-visible {
  outline: 2px solid #237660;
  outline-offset: 1px;
}

.staff-person-dialog {
  max-width: 500px;
  width: calc(100% - 32px);
  box-sizing: border-box;
  padding: 20px;
  border: 1px solid #d2ded8;
  border-radius: 8px;
  color: #173239;
}

.staff-person-dialog::backdrop {
  background: rgba(20, 40, 35, 0.4);
}

.staff-person-dialog form {
  margin: 0;
}

.staff-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.staff-card-heading h3 {
  margin: 0;
  font-size: 18px;
}

.staff-card-heading button {
  min-height: 44px;
  margin: 0;
  font-size: 14px;
}

.staff-person-dialog dl {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  font-size: 14px;
}

.staff-person-dialog dl > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.staff-person-dialog dt {
  color: #51676c;
  font-size: 13px;
  margin-bottom: 3px;
}

.staff-person-dialog dd {
  margin: 0;
}

@media (max-width: 760px) {
  .staff-directory-dense .staff-directory-filters [data-staff-reset] {
    grid-column: 1/-1;
    min-height: 40px;
  }

  .staff-directory-dense .staff-directory-filters input,
  .staff-directory-dense .staff-directory-filters select {
    min-height: 40px;
  }

  .staff-directory-table {
    min-width: 640px;
  }

  .staff-directory-table th,
  .staff-directory-table td {
    padding-inline: 8px;
  }

  .staff-directory-table button.staff-open-person {
    min-height: 38px;
  }

  .staff-directory-heading button {
    min-height: 40px;
  }
}

.staff-directory-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.staff-table-scroll {
  container-type: inline-size;
}

.staff-group-label {
  position: sticky;
  left: 8px;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  max-width: calc(100vw - 64px);
  max-width: calc(100cqi - 20px);
  white-space: normal;
  vertical-align: middle;
  z-index: 3;
}

.staff-group-title {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Payroll uses a dense matrix; employee details open only on request. */

.payroll-filters {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.payroll-filters label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  min-width: 0;
}

.payroll-filters select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  font-size: 14px;
  margin: 0;
  min-height: 38px;
  padding: 7px;
}

.payroll-filters button {
  margin: 0;
  min-height: 38px;
  font-size: 14px;
}

.payroll-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.payroll-summary > div {
  display: grid;
  gap: 7px;
  padding: 16px;
  background: #f3f7f5;
  border: 1px solid #dce5e1;
  border-radius: 6px;
  min-width: 0;
}

.payroll-summary span,
.payroll-summary small {
  font-size: 13px;
  color: #51676c;
}

.payroll-summary strong {
  font-size: clamp(17px, 2vw, 25px);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.payroll-table-scroll {
  max-width: 100%;
  overflow: auto;
  border: 1px solid #dce5e1;
  border-radius: 5px;
  margin-block: 18px;
  isolation: isolate;
}

.payroll-matrix {
  width: 100%;
  min-width: 620px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  line-height: 1.3;
  margin: 0;
}

.payroll-matrix caption {
  text-align: left;
  padding: 9px;
  color: #51676c;
}

.payroll-matrix td,
.payroll-matrix th {
  padding: 6px 10px;
  border-bottom: 1px solid #e4ebe8;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

.payroll-matrix th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  text-align: left;
  min-width: 155px;
  max-width: 240px;
  white-space: normal;
}

.payroll-matrix thead th,
.payroll-matrix tfoot th,
.payroll-matrix tfoot td {
  background: #eef4f0;
  font-weight: 600;
}

.payroll-matrix th:nth-child(2),
.payroll-matrix td:nth-child(2) {
  text-align: left;
}

.payroll-matrix button {
  border: 0;
  background: none;
  padding: 3px 0;
  margin: 0;
  min-height: 28px;
  text-align: left;
  color: #173e36;
  font-size: 13px;
  font-weight: 600;
}

.payroll-matrix button:hover {
  text-decoration: underline;
}

.payroll-matrix small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #51676c;
}

.payroll-ledger-trend {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.payroll-changes {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.payroll-changes p {
  display: grid;
  gap: 4px;
  font-size: 13px;
  min-width: 180px;
}

.payroll-changes small {
  color: #51676c;
}

.payroll-department-chart {
  display: grid;
  gap: 14px;
  margin-block: 18px;
}

.payroll-department-chart > div {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(50px, 2fr) auto;
  font-size: 13px;
}

.payroll-detail-dialog {
  max-width: 620px;
  max-height: calc(100dvh - 32px);
  overflow: auto;
}

.payroll-detail-dialog section + section {
  border-top: 1px solid #dce5e1;
  margin-top: 20px;
}

.payroll-detail-dialog h5 {
  font-size: 14px;
  margin-bottom: 5px;
}

/* Dialog controls are scoped so site form defaults cannot stretch or overlap fields. */

.staff-tool-dialog {
  max-width: 680px;
  width: calc(100% - 24px);
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 22px;
}

.staff-dialog-close {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px !important;
}

.staff-dialog-close button {
  font-size: 13px;
  min-height: 34px;
  margin: 0;
  padding: 6px 12px;
}

.staff-card-editor {
  min-width: 0;
}

.staff-card-editor h3 {
  font-size: 21px;
  margin: 0 0 8px;
}

.staff-card-editor header p {
  font-size: 14px;
  color: #51676c;
  margin: 0 0 20px;
}

.staff-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

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

.staff-card-editor label {
  display: grid;
  gap: 6px;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
}

.staff-card-editor input,
.staff-card-editor select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 10px;
  font-size: 15px;
  line-height: 1.4;
  min-height: 44px;
}

.staff-card-editor .staff-form-manager {
  margin: 0;
  font-size: 13px;
  color: #51676c;
}

.staff-form-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid #dce5e1;
  padding-top: 18px;
  margin-top: 18px;
}

.staff-form-actions button {
  width: auto;
  min-height: 44px;
  font-size: 14px;
  padding: 10px 16px;
  margin: 0;
}

.staff-card-created {
  display: grid;
  gap: 12px;
}

.staff-card-editor [data-create-status] {
  min-height: 20px;
  font-size: 14px;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .payroll-summary {
    grid-template-columns: 1fr;
  }

  .payroll-summary > div {
    padding: 12px;
  }

  .payroll-department-chart > div {
    grid-template-columns: 1fr auto;
  }

  .staff-directory-heading {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .staff-tool-dialog {
    padding: 16px;
  }

  .staff-card-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
  }

  .staff-field-wide {
    grid-column: auto;
  }

  .staff-form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .staff-form-actions button {
    width: 100%;
  }

  .staff-card-editor h3 {
    font-size: 19px;
  }
}

.staff-directory-dense .staff-directory-filters {
  grid-template-columns: minmax(10rem, 2fr) minmax(8rem, 1fr) minmax(9rem, 1fr) auto;
}

.staff-name-cell {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.staff-name-cell .staff-open-person {
  flex: 1;
  min-width: 0;
}

.staff-row-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 2px;
}

.staff-directory-dense button.staff-row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 26px;
  min-height: 26px;
  border: 0;
  background: transparent;
  color: #51676c;
  padding: 2px;
  margin: 0;
  border-radius: 3px;
}

.staff-row-action:hover:not(:disabled) {
  background: #e6f1ed;
  color: #173e36;
}

.staff-row-action:disabled {
  opacity: 0.25;
  cursor: default;
}

.staff-row-action:focus-visible {
  outline: 2px solid #237660;
}

.staff-card-editor .staff-confirm {
  display: flex;
  align-items: flex-start;
  font-weight: 400;
  margin-top: 16px;
}

.staff-card-editor .staff-confirm input {
  width: 18px;
  min-width: 18px;
  min-height: 18px;
  height: 18px;
  margin-top: 2px;
  padding: 0;
}

@media (max-width: 760px) {
  .staff-directory-dense .staff-directory-filters {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .staff-directory-dense .staff-directory-filters [data-staff-reset] {
    grid-column: auto;
  }
}

.staff-directory-table button.staff-open-person {
  padding: 2px 0;
  line-height: 1.25;
}

.staff-card-editor > header {
  display: block;
  height: auto;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
}

.staff-card-editor > header h3,
.staff-card-editor > header p {
  width: auto;
  max-width: none;
}

.payroll-analysis .payroll-summary {
  grid-template-columns: minmax(0, 1fr);
}

.payroll-analysis .payroll-summary > div {
  padding: 14px 18px;
}

.payroll-analysis .payroll-matrix {
  min-width: 800px;
}

.payroll-analysis .payroll-matrix th:nth-child(2),
.payroll-analysis .payroll-matrix td:nth-child(2) {
  text-align: right;
}

.payroll-analysis .payroll-matrix thead tr:nth-child(2) th:first-child {
  position: static;
  min-width: 0;
  max-width: none;
  text-align: right;
}

.payroll-factor-period {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.payroll-factor-period strong {
  font-size: 21px;
}

.payroll-factor-stats,
.payroll-factor-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  margin: 14px 0;
}

.payroll-factor-stats > div,
.payroll-factor-effects > div {
  display: grid;
  gap: 5px;
  min-width: 145px;
}

.payroll-factor-stats dt,
.payroll-factor-effects dt {
  font-size: 13px;
  color: #51676c;
}

.payroll-factor-stats dd,
.payroll-factor-effects dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.payroll-factors summary {
  cursor: pointer;
  font-weight: 600;
}

.payroll-factor-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 13px;
  margin: 0;
}

.payroll-factor-table th,
.payroll-factor-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #e4ebe8;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.payroll-factor-table th:first-child {
  text-align: left;
  white-space: normal;
  min-width: 170px;
}

.payroll-factor-table thead {
  background: #eef4f0;
}

.payroll-analysis .payroll-matrix {
  min-width: 920px;
}

.payroll-analysis .payroll-matrix thead tr:first-child th[colspan] {
  text-align: center;
}

.payroll-analysis .payroll-matrix thead tr:nth-child(2) th {
  font-size: 12px;
  text-align: right;
}

.payroll-factor-conclusion {
  line-height: 1.55;
  font-weight: 600;
}

.payroll-job-history-unavailable {
  font-size: 13px;
  line-height: 1.5;
  color: #51676c;
  margin: 14px 0 0;
}

.payroll-analysis .payroll-name-col {
  width: 180px;
}

.payroll-analysis .payroll-matrix tfoot th {
  position: static;
  min-width: 0;
  max-width: none;
}

@media (max-width: 760px) {
  .payroll-analysis .payroll-name-col {
    width: 132px;
  }

  .payroll-analysis .payroll-matrix th:first-child {
    min-width: 0;
    max-width: none;
  }
}

/* Keep the compact staff controls at the row edge while horizontally scrolling. */

.staff-directory-table .staff-actions-cell,
.staff-directory-table th.staff-actions-heading {
  width: 64px;
  min-width: 64px;
  position: sticky;
  right: 0;
  z-index: 2;
  text-align: right;
  background: #fff;
  white-space: nowrap;
  padding-inline: 8px;
  border-left: 1px solid #e4ebe8;
}

.staff-directory-table th.staff-actions-heading {
  background: #eef4f0;
  z-index: 3;
}

.staff-actions-cell .staff-row-actions {
  justify-content: flex-end;
  align-items: center;
  gap: 2px;
}

.staff-action-slot {
  display: inline-flex;
  flex: 0 0 auto;
}

.staff-action-slot:focus-visible {
  outline: 2px solid #237660;
  outline-offset: 1px;
  border-radius: 3px;
}

/* Accessible descriptions remain available to assistive technology. */

.portal-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.home-sales-panel #home-sales-brief:empty {
  display: none;
}

/* UI UX Pro Max: content-first density, readable values, progressive disclosure and unobscured controls. */

.member-portal main {
  min-width: 0;
  padding: 20px 24px 32px;
}

.portal-page-heading {
  margin-bottom: 16px;
  gap: 12px;
}

.portal-page-heading h2 {
  font-size: 27px;
  margin-bottom: 4px;
}

.portal-panel-heading {
  padding: 14px 18px;
}

.portal-panel-heading h3 {
  font-size: 18px;
}

.home-overview {
  background: transparent;
  border: 0;
  padding: 0;
}

.home-overview h2 {
  margin-bottom: 4px;
}

.home-sales-panel {
  margin-bottom: 16px;
}

.home-sales-panel #home-sales-brief {
  min-height: 0;
  padding: 14px 18px;
}

.home-sales-panel .home-brief-cards {
  margin-top: 10px;
  gap: 12px;
}

.home-sales-panel .home-brief-cards strong {
  font-size: 26px;
  margin-top: 4px;
}

.home-shortcuts {
  gap: 12px;
}

.home-shortcut {
  padding: 14px 16px;
  min-height: 76px;
}

.member-sales .filters {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(210px, 1.4fr) minmax(180px, 1.2fr) minmax(140px, 1fr) auto;
  gap: 12px;
  margin-bottom: 14px;
}

.member-sales .filters label {
  display: grid;
  gap: 5px;
  min-width: 0;
  margin: 0;
  font-size: 13px;
}

.member-sales .filters select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 40px;
  margin: 0;
  padding: 8px 30px 8px 10px;
  font-size: 14px;
}

.member-sales .filters > button {
  min-height: 40px;
  margin: 0;
  padding: 8px 12px;
  font-size: 13px;
}

.member-sales .sales-metric-control {
  display: grid;
  gap: 6px;
  max-width: 320px;
  margin: 12px 0;
}

.member-sales .sales-metric-control select {
  display: block;
  width: 100%;
  margin: 0;
}

.member-sales .stat {
  padding: 14px 16px;
}

.member-sales .stat .value {
  font-size: 30px;
  margin: 8px 0 6px;
}

.member-sales .stat small {
  line-height: 1.4;
}

.member-sales .sales-trajectory,
.member-sales .sales-breakdown,
.member-sales .sales-clarifications {
  padding: 14px 16px;
  margin-top: 14px;
}

.member-sales th,
.member-sales td {
  padding: 7px 8px;
  vertical-align: middle;
  line-height: 1.4;
}

.payroll-filters {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 12px 0;
  align-items: end;
}

#content .payroll-filters label {
  display: grid;
  gap: 4px;
  margin: 0;
  min-width: 0;
}

.payroll-filters select {
  height: 40px;
  min-height: 40px;
  padding: 7px 28px 7px 8px;
}

.payroll-filters > button {
  height: 40px;
  min-height: 40px;
  align-self: end;
  padding: 7px 12px;
}

.payroll-analysis .payroll-matrix {
  --payroll-name: 176px;
  min-width: 1056px;
  table-layout: fixed;
}

.payroll-name-col {
  width: var(--payroll-name, 176px);
}

.payroll-amount-col {
  width: 124px;
}

.payroll-total-col {
  width: 136px;
}

.payroll-analysis .payroll-matrix td,
.payroll-analysis .payroll-matrix th {
  padding: 6px 8px;
  overflow-wrap: normal;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.payroll-analysis .payroll-matrix tbody th {
  white-space: normal;
}

.payroll-analysis .payroll-matrix button {
  width: 100%;
  overflow-wrap: anywhere;
}

.payroll-analysis .payroll-matrix tbody td:last-child,
.payroll-analysis .payroll-matrix thead tr:first-child th:last-child,
.payroll-analysis .payroll-matrix tfoot td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  border-left: 1px solid var(--portal-border, #dfe7e3);
}

.payroll-analysis .payroll-matrix thead tr:first-child th:last-child,
.payroll-analysis .payroll-matrix tfoot td:last-child {
  background: #eef4f0;
  z-index: 3;
}

.payroll-table-scroll {
  scroll-padding-inline: 176px 136px;
  scrollbar-width: thin;
}

.payroll-department-chart {
  gap: 10px;
  margin-block: 12px;
}

.payroll-department-chart > div {
  grid-template-columns: minmax(160px, 2fr) minmax(100px, 3fr) 140px;
  gap: 12px;
  align-items: center;
}

.payroll-department-chart .payroll-bar-track {
  grid-column: auto;
  grid-row: auto;
  width: 100%;
}

.payroll-department-chart strong {
  width: 100%;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.team-page .team-heading {
  margin-bottom: 14px;
}

.team-page .team-heading h2 {
  font-size: 27px;
  margin: 0;
}

.team-page .team-stats {
  padding: 12px 0;
  margin-bottom: 14px;
}

.team-page .team-stats > div strong {
  font-size: 24px;
  margin-top: 4px;
}

.team-page .team-panel-heading {
  padding: 12px 16px;
}

.team-page .team-data-status {
  padding: 10px 16px;
  font-size: 13px;
  line-height: 1.5;
}

.team-page .team-filters {
  gap: 8px;
  padding: 12px 16px;
}

.team-page .team-filters label {
  margin: 0;
  font-size: 13px;
}

.team-page .team-filters select {
  margin-top: 4px;
  min-height: 40px;
}

.team-page .team-timeline-tools {
  padding: 10px 16px;
}

.team-page .team-timeline {
  padding-inline: 16px;
}

.team-page .team-timeline-header,
.team-page .team-person-row {
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
}

.team-page .team-person-row {
  padding: 8px 0;
}

.team-page .team-person-name strong {
  font-size: 13px;
}

.team-page .team-person-name small {
  font-size: 11px;
  line-height: 1.35;
}

.team-page .team-mobile-dates {
  display: block;
  font-size: 11px;
  line-height: 1.4;
  color: var(--portal-muted, #536966);
  margin: 3px 0 0;
  white-space: normal;
}

.team-page .team-person-track {
  min-height: 32px;
}

.team-page .team-interval {
  min-height: 28px;
  padding: 4px;
  font-size: 11px;
}

.team-page .team-schedule-note,
.team-page .team-overlaps {
  padding: 8px 16px;
  font-size: 12px;
  line-height: 1.45;
}

.staff-directory-heading {
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.staff-directory-heading h2 {
  margin-right: auto;
}

.staff-directory-heading button {
  font-size: 13px;
  white-space: nowrap;
}

.staff-directory-table {
  min-width: 880px;
}

.staff-directory-table th:first-child,
.staff-directory-table td:first-child {
  width: 216px;
}

.staff-directory-table th:nth-child(2) {
  width: 28%;
}

.staff-directory-table th:nth-child(3) {
  width: 22%;
}

.staff-directory-table td,
.staff-directory-table th {
  overflow-wrap: normal;
  word-break: normal;
}

.staff-name-cell .staff-open-person {
  overflow-wrap: anywhere;
}

.staff-directory-table .staff-actions-cell,
.staff-directory-table th.staff-actions-heading {
  width: 80px;
  min-width: 80px;
}

.staff-directory-dense button.staff-row-action {
  width: 28px;
  height: 32px;
  min-height: 32px;
}

.staff-actions-cell .staff-row-actions {
  gap: 4px;
}

.staff-person-dialog {
  max-width: 640px;
  width: calc(100% - 24px);
  max-height: calc(100dvh - 24px);
  padding: 16px;
  overflow: auto;
}

.staff-person-dialog dl {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin: 14px 0;
}

.staff-person-dialog dl > div:last-child {
  grid-column: 1/-1;
}

.staff-person-dialog dl > div {
  display: block;
  padding: 0;
  border: 0;
}

.staff-person-dialog dd {
  text-align: left;
}

.staff-person-dialog input[data-staff-permanent-id] {
  width: 100%;
  font-size: 13px;
}

.staff-person-dialog .notice {
  padding: 9px 12px;
  font-size: 13px;
}

.staff-sync-details,
.staff-person-dialog details {
  font-size: 13px;
  margin-top: 10px;
}

.staff-card-editor h3 {
  margin-bottom: 8px;
}

.staff-card-editor header p {
  margin-bottom: 14px;
}

.accounts-page th,
.accounts-page td {
  padding: 9px 8px;
  vertical-align: middle;
}

.accounts-page table button {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 12px;
}

.accounts-page .admin-row-actions {
  min-width: 0;
  gap: 6px;
}

.accounts-page > p:has([data-invite]),
.accounts-page > p:has([data-prepare]),
.accounts-page > p:has([data-revoke]) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 6px;
  margin-block: 6px;
}

.accounts-page > p > button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 6px 10px;
  font-size: 12px;
}

.profile-layout {
  grid-template-columns: minmax(260px, 1fr) minmax(300px, 1fr);
  align-items: start;
  gap: 16px;
  max-width: 1080px;
}

.profile-page dl {
  padding: 6px 18px 12px;
}

.profile-page dl > div {
  padding-block: 10px;
}

.profile-security > p,
.profile-security > form {
  margin: 14px 18px;
}

.profile-security input {
  height: 44px;
  min-height: 44px;
  margin-top: 5px;
}

.profile-security form label {
  margin: 10px 0 5px;
}

.personal-page .personal-summary-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 12px 0;
}

.personal-page .personal-summary-cards > div {
  padding: 0 16px;
}

.personal-page .personal-summary-cards strong {
  font-size: 24px;
}

.personal-page .personal-summary-cards small {
  font-size: 12px;
  margin-bottom: 5px;
}

.personal-page .personal-year-summary {
  margin-bottom: 16px;
}

.pv-heading {
  margin-bottom: 16px;
}

.pv-policy {
  font-size: 13px;
  line-height: 1.5;
}

dialog[open].pv-calendar-dialog {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 24px);
  overflow: hidden;
}

.pv-calendar-dialog .pv-dialog-heading {
  position: static;
  flex: 0 0 auto;
  padding: 14px 16px 10px;
}

.pv-calendar-dialog .pv-dialog-heading h3 {
  font-size: 20px;
}

.pv-calendar-dialog form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.pv-calendar-dialog .pv-dialog-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px 16px;
  scroll-padding-block: 8px;
}

.pv-calendar-dialog .personal-vacation-calendar {
  border-spacing: 3px;
}

.pv-calendar-dialog .personal-vacation-calendar button {
  min-height: 40px;
}

.pv-calendar-dialog .pv-dialog-footer {
  position: static;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px 16px;
}

.pv-calendar-dialog .pv-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.pv-calendar-dialog .pv-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  font-size: 13px;
  line-height: 1.4;
}

.pv-calendar-dialog .pv-check input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  scroll-margin: 8px;
}

.pv-calendar-dialog .pv-dialog-result {
  flex: 0 0 auto;
  margin: 0;
  padding: 6px 16px;
}

.pv-calendar-dialog input,
.pv-calendar-dialog button {
  scroll-margin-block: 8px;
}

@media (max-width: 1200px) {
  .member-sales .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-sales .filters > button {
    justify-self: start;
  }

  .profile-layout {
    grid-template-columns: 1fr;
    max-width: 720px;
  }
}

@media (max-width: 760px) {
  .member-portal aside {
    padding: 8px 12px;
  }

  .member-portal nav.member-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    margin: 0;
    padding: 2px 0 6px;
    scroll-padding-inline: 8px;
  }

  .member-portal .member-nav button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 8px 10px;
    gap: 6px;
    white-space: nowrap;
    font-size: 12px;
  }

  .member-portal .member-nav button svg {
    width: 17px;
    height: 17px;
  }

  .member-portal main {
    padding: 16px 12px 24px;
  }

  .portal-page-heading h2,
  .member-sales .heading h2,
  .team-page .team-heading h2,
  .pv-heading h2 {
    font-size: 24px;
  }

  .member-sales .filters {
    grid-template-columns: 1fr;
    padding: 10px;
    gap: 8px;
  }

  .member-sales .filters select {
    font-size: 16px;
    height: 44px;
  }

  .member-sales .filters > button {
    min-height: 44px;
    justify-self: stretch;
  }

  .member-sales .stats {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .member-sales .stat {
    padding: 12px 14px;
  }

  .member-sales .stat .value {
    font-size: 28px;
    margin: 6px 0 4px;
  }

  .member-sales .sales-metric-control select {
    font-size: 16px;
    min-height: 44px;
  }

  .member-sales .sales-trajectory,
  .member-sales .sales-breakdown,
  .member-sales .sales-clarifications {
    padding: 12px;
    margin-top: 12px;
  }

  .payroll-filters {
    gap: 8px;
  }

  .payroll-filters select {
    font-size: 16px;
    height: 44px;
    min-height: 44px;
  }

  .payroll-filters > button {
    height: 44px;
    min-height: 44px;
  }

  .payroll-analysis .payroll-matrix {
    --payroll-name: 132px;
    min-width: 1012px;
  }

  .payroll-table-scroll {
    scroll-padding-inline: 132px 136px;
  }

  .payroll-department-chart > div {
    grid-template-columns: minmax(0, 1fr) 136px;
    gap: 6px 10px;
  }

  .payroll-department-chart .payroll-bar-track {
    grid-column: 1/-1;
    grid-row: 2;
  }

  .payroll-department-chart > div > span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .team-page .team-stats {
    padding: 10px 0;
    margin-bottom: 12px;
  }

  .team-page .team-stats > div {
    padding: 0 10px;
  }

  .team-page .team-stats > div span {
    min-height: 28px;
    font-size: 11px;
  }

  .team-page .team-stats > div small {
    font-size: 10px;
    line-height: 1.4;
  }

  .team-page .team-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px 12px;
    gap: 8px;
  }

  .team-page .team-filters label {
    min-width: 0;
  }

  .team-page .team-filters select {
    font-size: 16px;
    min-height: 44px;
  }

  .team-page .team-filters > button {
    min-height: 44px;
    width: auto;
    align-self: end;
  }

  .team-page .team-timeline-header {
    display: block;
  }

  .team-page .team-person-row {
    display: block;
    padding: 8px 0;
  }

  .team-page .team-person-name small {
    font-size: 12px;
  }

  .team-page .team-mobile-dates {
    font-size: 12px;
    margin: 3px 0 6px;
  }

  .team-page .team-person-track,
  .team-page .team-interval {
    min-height: 44px;
  }

  .team-page .team-data-status {
    padding: 9px 12px;
    font-size: 12px;
  }

  .team-page .team-panel-heading {
    padding: 12px;
  }

  .team-page .team-timeline {
    padding-inline: 12px;
  }

  .staff-directory-heading h2 {
    width: 100%;
    margin: 0;
  }

  .staff-directory-heading button {
    font-size: 12px;
    min-height: 44px;
    padding: 7px 8px;
  }

  .staff-directory-table {
    min-width: 800px;
  }

  .staff-directory-table th:first-child,
  .staff-directory-table td:first-child {
    width: 160px;
  }

  .staff-directory-table th:nth-child(3) {
    width: 180px;
  }

  .staff-person-dialog {
    padding: 14px;
  }

  .staff-person-dialog dl {
    gap: 10px 12px;
  }

  .staff-person-dialog dl > div {
    min-width: 0;
  }

  .staff-person-dialog dt {
    font-size: 12px;
  }

  .staff-person-dialog dd {
    font-size: 13px;
  }

  .accounts-page table button {
    min-height: 40px;
  }

  .accounts-page > p:has(button) {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .accounts-page > p > button {
    min-height: 44px;
  }

  .accounts-page .scroll {
    padding-inline: 8px;
  }

  .profile-layout {
    gap: 12px;
  }

  .profile-page dl > div {
    padding-block: 8px;
  }

  .profile-security > p,
  .profile-security > form {
    margin: 12px 16px;
  }

  .home-sales-panel .home-brief-cards {
    gap: 0;
  }

  .home-sales-panel .home-brief-cards > div {
    padding: 8px 0;
  }

  .home-shortcut {
    padding: 12px 14px;
    min-height: 72px;
  }

  .personal-page .personal-summary-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 10px 0;
  }

  .personal-page .personal-summary-cards > div {
    padding: 0 10px;
    border-bottom: 0;
    border-right: 1px solid var(--pv-line);
  }

  .personal-page .personal-summary-cards > div:last-child {
    border: 0;
  }

  .personal-page .personal-summary-cards small {
    font-size: 11px;
    min-height: 28px;
    margin: 0 0 4px;
  }

  .personal-page .personal-summary-cards strong {
    font-size: 21px;
  }

  .pv-calendar-dialog .personal-vacation-calendar button {
    min-height: 44px;
  }

  .pv-calendar-dialog .pv-dialog-footer {
    padding: 10px 12px;
  }

  .pv-calendar-dialog .pv-dialog-actions button {
    flex: 1;
    min-height: 44px;
    padding: 8px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .member-portal .member-nav button {
    transition: none;
    scroll-behavior: auto;
  }
}

@media (max-width: 760px) {
  .payroll-analysis .payroll-matrix tbody td:last-child,
  .payroll-analysis .payroll-matrix thead tr:first-child th:last-child,
  .payroll-analysis .payroll-matrix tfoot td:last-child {
    position: static;
  }

  .payroll-table-scroll {
    scroll-padding-right: 8px;
  }

  .staff-directory-table .staff-actions-cell,
  .staff-directory-table th.staff-actions-heading {
    position: static;
  }
}

/* Long unknown states and calendar metadata must remain readable on narrow phones. */

.personal-summary-cards strong {
  overflow-wrap: anywhere;
}

/* Two requested continuous-balance values; negative values keep their warning colour. */

.personal-page [data-continuous-accrual] .personal-summary-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 14px 0;
}

.personal-page [data-continuous-accrual] .personal-summary-cards > div {
  min-width: 0;
  padding: 0 16px;
  border-bottom: 0;
}

.personal-page [data-continuous-accrual] .personal-summary-cards small {
  min-height: 0;
}

.personal-page [data-continuous-accrual] .personal-summary-cards [data-negative-balance] strong {
  color: #9b3030;
}

.accounts-page .account-access-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 16px;
  min-height: 40px;
  margin: 10px 0;
}

.accounts-page .account-access-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .personal-page .personal-summary-cards strong {
    font-size: 18px;
    line-height: 1.3;
  }

  .team-page .team-person-name {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 8px;
    align-items: start;
    margin-bottom: 6px;
  }

  .team-page .team-person-name strong {
    grid-column: 1;
    grid-row: 1;
  }

  .team-page .team-person-name small {
    grid-column: 1/-1;
    grid-row: 2;
    max-width: none;
    text-align: left;
  }

  .team-page .team-person-name .team-mobile-dates {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    white-space: nowrap;
  }

  .accounts-page .account-access-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .accounts-page .account-access-row > button {
    justify-self: end;
  }
}

.profile-page {
  padding: 0;
  border: 0;
  background: transparent;
}

.important-notifications {
  padding: 14px 18px;
}

.important-notifications h2 {
  margin-bottom: 12px;
  font-size: 19px;
}

.important-notifications .important-group h3 {
  margin: 8px 0;
  font-size: 14px;
}

.important-notifications .important-notification {
  padding: 10px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.accounts-page table {
  min-width: 650px;
}

.accounts-page .admin-row-actions button {
  white-space: nowrap;
}

.accounts-page .account-access-row:has(button) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

@media (max-width: 760px) {
  .accounts-page .account-access-row:has(button) {
    grid-template-columns: 1fr;
  }

  .member-sales .filters:has(#sales-dept) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-sales .filters > label:has(#sales-dept) {
    grid-column: 1;
    grid-row: 1;
  }

  .member-sales .filters:has(#sales-dept) > label:has(#sales-service) {
    grid-column: 2;
    grid-row: 1;
  }

  .member-sales .filters > label:has(#sales-office) {
    grid-column: 1/-1;
    grid-row: 2;
  }

  .member-sales .filters > label:has(#sales-person) {
    grid-column: 1/-1;
    grid-row: 3;
  }

  .member-sales .filters:has(#sales-dept) > button {
    grid-column: 1/-1;
  }

  .important-notifications {
    padding: 12px 14px;
  }

  .important-notifications .important-notification-actions {
    gap: 6px;
  }
}

@media (max-width: 360px) {
  .member-sales .filters:has(#sales-dept) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
}

.member-portal #member-profile {
  padding: 0;
  border: 0;
  background: transparent;
}

.home-sales-panel .home-brief-cards strong {
  white-space: nowrap;
}

.payroll-page .payroll-person {
  max-width: 900px;
  padding: 16px;
}

.payroll-person h4 {
  margin: 16px 0 8px;
}

.payroll-person .payroll-breakdown > div {
  padding-block: 8px;
}

.payroll-person .payroll-total {
  margin-top: 16px;
  padding-top: 14px;
}

@media (max-width: 760px) {
  .home-sales-panel .home-brief-cards > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    align-items: center;
  }

  .home-sales-panel .home-brief-cards > div > strong {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    font-size: 24px;
  }

  .home-sales-panel .home-brief-cards > div > small:last-child:not(:first-child) {
    grid-column: 1/-1;
    font-size: 11px;
  }
}

/* Compact visible completeness status; load errors remain fully visible. */

.vacation-data-warning {
  font-size: 13px;
  line-height: 1.5;
  margin: 8px 0;
  color: #66512a;
}

.vacation-data-warning > summary {
  cursor: pointer;
  min-height: 28px;
  padding: 4px 0;
  font-weight: 600;
}

.vacation-data-warning > summary:focus-visible {
  outline: 2px solid #996515;
  outline-offset: 3px;
  border-radius: 2px;
}

.vacation-data-warning > p {
  margin: 6px 0 0;
  font-size: 13px;
  color: #536966;
  max-width: 900px;
}

#vacation-overview-status {
  padding: 6px 16px;
}

#vacation-overview-status:empty {
  display: none;
}

#vacation-overview-status > p {
  margin: 4px 0;
}

#vacation-overview-status > .vacation-data-warning {
  margin: 0;
}

@media (max-width: 760px) {
  .vacation-data-warning > summary {
    min-height: 36px;
  }

  #vacation-overview-status {
    padding: 4px 12px;
  }
}

.member-portal .vacation-data-warning {
  padding: 0;
  border: 0;
  background: transparent;
}

/* Visible overflow guidance is enabled only for genuinely wider content. */

.member-portal .scroll[data-horizontal-overflow='true']::before,
.member-portal .payroll-table-scroll[data-horizontal-overflow='true']::before,
.member-portal .staff-table-scroll[data-horizontal-overflow='true']::before {
  content: '↔ Листайте таблицу';
  position: sticky;
  left: 0;
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 600;
  color: #43645c;
  background: #eef4f0;
  border-radius: 4px;
}

.staff-person-dialog dl > div:last-child dd {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 8px;
  align-items: start;
}

.staff-person-dialog input[data-staff-permanent-id] {
  margin: 0;
  min-height: 36px;
  height: 36px;
  min-width: 0;
  padding: 6px 8px;
}

.staff-person-dialog [data-staff-copy-id] {
  margin: 0;
  min-height: 36px;
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.staff-person-dialog [data-staff-copy-status] {
  grid-column: 1/-1;
  margin: 0;
  font-size: 12px;
}

.staff-person-dialog [data-staff-copy-status]:empty {
  display: none;
}

.staff-person-dialog dl {
  margin: 10px 0;
  gap: 9px 14px;
}

.staff-person-dialog dd {
  margin-top: 3px;
  line-height: 1.4;
}

.staff-person-dialog [data-staff-edit] {
  margin-block: 8px;
}

.staff-person-dialog details {
  margin-top: 8px;
}

@media (max-width: 760px) {
  .member-portal aside:has(.member-nav[data-horizontal-overflow='true'])::after {
    content: '↔ Листайте разделы';
    display: block;
    text-align: right;
    font-size: 11px;
    line-height: 1.4;
    color: #43645c;
    margin-top: 2px;
  }

  #member-profile dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
    padding: 8px 16px 12px;
  }

  .profile-page dl > div {
    min-width: 0;
    padding-block: 6px;
  }

  .profile-page dd {
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.4;
  }

  .profile-security > form label {
    margin-top: 8px;
  }

  .profile-security > p,
  .profile-security > form {
    margin-block: 10px;
  }
}

/* Annual manager planning is a bounded read-only table. */

.team-year-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.team-year-picker select {
  width: 100px;
  min-height: 36px;
}

.team-year-label {
  font-weight: 600;
  color: var(--pv-muted, #53675d);
}

.year-planning-control {
  padding: 12px 16px;
  border-bottom: 1px solid var(--pv-line, #dce7df);
  min-width: 0;
}

.year-planning-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.year-planning-heading h3 {
  margin: 0;
}

.year-planning-heading label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  margin: 0;
}

.year-planning-heading input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
}

.year-planning-scroll {
  max-width: 100%;
  margin-top: 8px;
}

.year-planning-table {
  width: 100%;
  min-width: 840px;
  font-size: 13px;
  border-collapse: collapse;
}

.year-planning-table th,
.year-planning-table td {
  padding: 8px 10px;
  text-align: right;
  vertical-align: top;
  border-bottom: 1px solid var(--pv-line, #dce7df);
}

.year-planning-table th:first-child {
  text-align: left;
  min-width: 180px;
  max-width: 260px;
}

.year-planning-table thead th {
  font-size: 12px;
  font-weight: 500;
  white-space: normal;
  line-height: 1.4;
}

.year-planning-table tbody th {
  font-weight: 600;
}

.year-planning-table small {
  display: block;
  font-weight: 400;
  font-size: 11px;
  line-height: 1.4;
  white-space: normal;
  color: var(--pv-muted, #53675d);
  margin-top: 2px;
}

.year-planning-note {
  font-size: 12px;
  margin-top: 8px;
}

.year-planning-note summary {
  cursor: pointer;
  min-height: 28px;
  display: list-item;
}

.year-planning-note p {
  margin: 6px 0;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .year-planning-control {
    padding: 10px 12px;
  }

  .year-planning-heading {
    gap: 6px;
  }

  .year-planning-heading label {
    min-height: 44px;
  }

  .team-year-picker select {
    min-height: 44px;
    font-size: 16px;
  }

  .year-planning-note summary {
    min-height: 44px;
    padding-top: 10px;
  }

  .year-planning-table th,
  .year-planning-table td {
    padding: 7px 8px;
  }
}

/* Explicit template navigation is independent of the personal Bitrix attestation. */

.bitrix-task-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #cad8d2;
  border-radius: 10px;
  background: #fff;
  color: #175b49;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  white-space: normal;
}

.bitrix-task-link:hover {
  background: #edf5f1;
}

.bitrix-task-link:focus-visible {
  outline: 3px solid #1d6e56;
  outline-offset: 3px;
}

.pv-notice-actions:has(.bitrix-task-link) {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 760px) {
  .pv-notice-actions:has(.bitrix-task-link) {
    margin-top: 12px;
  }

  .bitrix-task-link {
    max-width: 100%;
  }
}

.payroll-role-groups {
  margin: 20px 0;
}

.payroll-role-group-table {
  min-width: 1080px;
  width: 100%;
  border-collapse: collapse;
}

.payroll-role-group-table th,
.payroll-role-group-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: right;
}

.payroll-role-group-table th:first-child {
  text-align: left;
  min-width: 160px;
}

.payroll-role-group-table caption {
  text-align: left;
  padding: 8px 0;
  font-weight: 600;
}

.payroll-role-groups > p {
  font-size: 13px;
  color: var(--muted);
}

/* Desktop audit 2026-10-21: density and hierarchy; no access changes. */

.account-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin: 14px 0;
}

.account-filters label {
  display: grid;
  gap: 5px;
  font-size: 13px;
}

.account-filters input,
.account-filters select {
  margin: 0;
  width: 100%;
  min-width: 0;
}

.accounts-page tr[hidden] {
  display: none;
}

.accounts-page .admin-row-actions {
  align-items: center;
  flex-wrap: nowrap;
}

.admin-more {
  position: relative;
}

.admin-more > summary {
  cursor: pointer;
  white-space: nowrap;
}

.admin-more > div {
  position: static;
  display: grid;
  gap: 8px;
  min-width: 150px;
  padding: 8px 0;
  background: white;
}

.admin-more button {
  width: 100%;
  text-align: left;
}

.year-planning-control > summary {
  font-weight: 600;
  cursor: pointer;
  padding: 10px 0;
}

.year-planning-scroll {
  max-height: none;
  overflow-x: auto;
}

.year-planning-table thead {
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
}

.profile-page dl > div {
  border-top: 1px solid var(--portal-border);
}

.profile-page dl > div:first-child {
  border-top: 1px solid var(--portal-border);
}

.payroll-month-editor {
  padding: 20px !important;
}

.payroll-import-fields {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 16px;
  align-items: end;
}

.payroll-import-fields label {
  margin: 0;
  display: grid;
  gap: 6px;
}

.payroll-import-fields .payroll-import-check {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-bottom: 10px;
}

.payroll-import-check input {
  width: 20px !important;
  height: 20px !important;
  min-height: 20px !important;
  margin: 0;
}

.payroll-import-actions {
  margin: 18px 0 4px;
  display: flex;
  gap: 12px;
}

.payroll-filters {
  grid-template-columns: repeat(6, minmax(0, 1fr)) auto;
}

.payroll-factor-detail > summary,
.payroll-charts-detail > summary,
.sales-trajectory > summary {
  font-weight: 600;
  cursor: pointer;
  padding: 10px 0;
}

.payroll-summary small {
  display: block;
  font-size: 12px;
  margin-top: 6px;
  font-weight: 400;
}

.staff-form-help {
  font-size: 13px;
}

.staff-card-editor header {
  padding-bottom: 12px;
}

.staff-card-editor .staff-card-grid {
  gap: 12px;
}

.vacation-notice-details {
  font-size: 12px;
  margin: 6px 0 12px;
}

.vacation-conflict-summary {
  line-height: 1.6;
}

.sales-period-note {
  font-size: 13px;
  color: var(--portal-muted);
  margin: 10px 0;
}

.member-sales .stats .stat {
  padding: 14px 18px;
}

.member-sales .stats .value {
  font-size: 30px;
}

.member-sales .stats .stat small {
  font-size: 12px;
}

@media (max-width: 1050px) {
  .account-filters {
    grid-template-columns: 1fr 1fr;
  }

  .payroll-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .payroll-import-fields,
  .account-filters {
    grid-template-columns: 1fr;
  }

  .payroll-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payroll-month-editor {
    padding: 16px !important;
  }

  .accounts-page .admin-row-actions {
    flex-wrap: wrap;
  }
}

@media (min-width: 761px) {
  .accounts-page td {
    padding: 6px 8px;
    line-height: 1.35;
  }

  .accounts-page td small {
    display: block;
    font-size: 11px;
    line-height: 1.3;
    margin-top: 2px;
  }

  .accounts-page td button {
    min-height: 32px;
  }

  .accounts-page .scroll {
    max-height: 620px;
    overflow: auto;
  }

  .accounts-page thead {
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
  }
}

.accounts-page .admin-more {
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
}

.accounts-page .admin-more > summary {
  padding: 6px 4px;
  font-size: 12px;
  line-height: 18px;
}

[data-login-suggestion] {
  display: block;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  min-height: 1em;
}

.staff-card-grid [data-login-apply] {
  font-size: 12px;
  min-height: 32px;
  padding: 5px 9px;
  justify-self: start;
}

.staff-card-editor input[name='hireDate']::-webkit-calendar-picker-indicator {
  display: none;
}

[data-hire-calendar] {
  display: block;
}

[data-hire-picker] {
  position: fixed;
  inset: auto;
  box-sizing: border-box;
  border: 1px solid #cad8d2;
  border-radius: 8px;
  padding: 8px;
  background: white;
  margin: 0;
  min-width: 0;
  max-width: calc(100vw - 16px);
  overflow: auto;
  z-index: 10000;
  box-shadow: 0 8px 28px #18392d33;
}

[data-hire-picker][hidden] {
  display: none;
}

.staff-calendar-heading {
  display: grid;
  grid-template-columns: 32px 1fr 76px 32px;
  gap: 4px;
}

.staff-calendar-heading select,
.staff-calendar-heading input,
.staff-calendar-heading button {
  padding: 4px;
  min-height: 32px;
  margin: 0;
  width: 100%;
  min-width: 0;
}

.staff-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  margin: 8px 0;
}

.staff-calendar-days button {
  padding: 4px;
  min-height: 32px;
}

.staff-calendar-days span {
  text-align: center;
  font-size: 12px;
}

.staff-calendar-days [aria-current='date'] {
  outline: 2px solid #175b49;
}

.staff-directory-dense .staff-directory-filters {
  grid-template-columns: minmax(10rem, 2fr) minmax(7rem, 1fr) minmax(10rem, 1.4fr) minmax(9rem, 1fr) auto;
}

@media (max-width: 1100px) {
  .staff-directory-dense .staff-directory-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .staff-directory-dense .staff-directory-filters [data-staff-reset] {
    grid-column: 1/-1;
  }
}

.year-planning-table [data-team-balance='free'][data-negative-balance] {
  color: #9b3030;
  font-weight: 650;
}

/* Monthly feedback follows the portal panels, controls and sales graph palette. */

.feedback-own {
  max-width: 900px;
}

.feedback-questions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}

.feedback-questions label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feedback-questions select {
  width: 84px;
  flex-shrink: 0;
}

.feedback-own textarea,
.feedback-dialog textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  padding: 10px;
  border: 1px solid #bdceca;
  border-radius: 8px;
}

.feedback-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
}

.feedback-check input {
  width: 20px;
  height: 20px;
}

.feedback-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: end;
}

.feedback-toolbar label {
  min-width: 120px;
  max-width: 240px;
  flex: 1;
}

.feedback-toolbar select {
  width: 100%;
  min-height: 44px;
}

.feedback-toolbar button {
  min-height: 44px;
}

.feedback-table-scroll,
.feedback-chart-scroll {
  max-width: 100%;
  overflow: auto;
}

.feedback-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}

.feedback-table th,
.feedback-table td {
  padding: 8px;
  border-bottom: 1px solid #dbe4e1;
  text-align: right;
}

.feedback-table th:first-child {
  text-align: left;
  min-width: 150px;
}

.feedback-table thead th {
  min-width: 85px;
}

.feedback-table .feedback-total {
  background: #e9f4ef;
}

.feedback-table .feedback-group {
  background: #f2f6f4;
}

.feedback-table .feedback-job {
  padding-left: 24px;
  font-weight: 400;
}

.feedback-company > strong {
  font-size: 32px;
  color: #176657;
}

.feedback-company > strong small {
  font-size: 16px;
}

.feedback-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.feedback-chart-card {
  min-width: 0;
  background: #fff;
  border: 1px solid #dbe4e1;
  border-radius: 12px;
}

.feedback-chart-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.feedback-chart {
  display: block;
  min-width: 460px;
}

.feedback-chart text {
  font-size: 13px;
  fill: #3e5752;
}

.feedback-grid {
  stroke: #dbe4e1;
  stroke-width: 1;
}

.feedback-line {
  stroke: #176657;
  stroke-width: 3;
}

.feedback-chart circle {
  fill: #176657;
  stroke: #fff;
  stroke-width: 2;
  cursor: pointer;
}

.feedback-chart circle:focus {
  stroke: #102b23;
  stroke-width: 4;
  outline: none;
}

.feedback-reading,
.feedback-empty,
.feedback-formula {
  font-size: 14px;
  color: #465d56;
}

.feedback-named ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.feedback-named li {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid #dbe4e1;
}

.feedback-named li div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.feedback-named li small {
  display: block;
  color: #465d56;
}

.feedback-named li p {
  font-size: 13px;
  line-height: 1.7;
  margin: 6px 0;
}

.feedback-named li button {
  align-self: start;
  flex-shrink: 0;
  min-height: 44px;
}

.feedback-low {
  color: #a43220;
}

.feedback-dialog {
  width: min(600px, calc(100vw - 32px));
  max-height: 85dvh;
  box-sizing: border-box;
  border: 1px solid #bdceca;
  border-radius: 14px;
  padding: 24px;
  overflow: auto;
}

.feedback-dialog::backdrop {
  background: rgb(12 32 27 / 50%);
}

.feedback-dialog h2 {
  font-size: 20px;
}

.feedback-comment-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.feedback-saved div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #dbe4e1;
  padding: 8px;
}

.feedback-saved dd {
  margin: 0;
  white-space: nowrap;
}

.feedback-report [aria-busy='true'] {
  opacity: 0.75;
}

@media (max-width: 760px) {
  .feedback-questions,
  .feedback-charts {
    grid-template-columns: 1fr;
  }

  .feedback-named li {
    display: block;
  }

  .feedback-named li button {
    margin-top: 8px;
  }

  .feedback-toolbar label {
    max-width: 100%;
  }

  .feedback-dialog {
    padding: 16px;
  }

  .feedback-own .portal-page-heading,
  .feedback-report .portal-page-heading {
    flex-wrap: wrap;
  }
}

/* Feedback specificity follows the established portal control rules. */

.member-portal .feedback-own,
.member-portal .feedback-report > .portal-panel {
  padding: 20px;
  box-sizing: border-box;
}

.member-portal .feedback-questions {
  gap: 8px 24px;
  margin: 18px 0;
}

#content .feedback-questions label {
  display: grid;
  grid-template-columns: minmax(0, max-content) 84px;
  justify-content: start;
  align-items: center;
  gap: 12px;
  margin: 0;
  min-height: 52px;
}

.member-portal .feedback-questions select {
  width: 84px;
  margin: 0;
  min-height: 44px;
}

#content .feedback-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
}

#content .feedback-check input[type='checkbox'] {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin: 0;
  flex: 0 0 20px;
}

.member-portal .feedback-dialog label {
  display: block;
  margin: 12px 0;
}

.member-portal .feedback-dialog button {
  min-height: 44px;
}

@media (max-width: 760px) {
  .member-portal .feedback-own,
  .member-portal .feedback-report > .portal-panel {
    padding: 16px;
  }

  .member-portal .feedback-questions {
    grid-template-columns: 1fr;
  }
}

.member-portal .private-contact-home {
  padding: 20px;
}

.private-contact-home button,
.private-contact-modes button {
  min-height: 44px;
}

.private-contact-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.private-contact-modes [aria-pressed='true'] {
  background: #176657;
  color: #fff;
}

.private-contact-dialog {
  width: min(720px, calc(100vw - 32px));
}

.private-contact-list {
  padding-left: 0;
  list-style: none;
}

.private-contact-list li {
  padding: 10px 0;
  border-bottom: 1px solid #dbe4e1;
}

.private-contact-list p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
}

#content .private-contact-dialog form label {
  display: grid;
  gap: 8px;
}

#content .private-contact-dialog select {
  width: 100%;
  min-width: 0;
}

.private-contact-dialog [data-contact-status] {
  overflow-wrap: anywhere;
}

#content .private-contact-modes button[aria-pressed='false'] {
  background: #fff;
  color: #176657;
  border: 1px solid #8fb6aa;
}

/* Compact home actions precede notices in DOM and keyboard order. Essential text reflows. */

#member-contact-actions:empty {
  display: none;
}

.member-portal #member-contact-actions .private-contact-home {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 10px 14px;
  margin: 0 0 14px;
}

#member-contact-actions .private-contact-heading {
  flex: 1 1 250px;
  min-width: 0;
}

#member-contact-actions .private-contact-heading h2 {
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

#member-contact-actions .private-contact-heading p {
  font-size: 13px;
  line-height: 1.5;
  margin: 2px 0 0;
  color: var(--portal-muted);
  overflow-wrap: anywhere;
}

#member-contact-actions .private-contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

#member-contact-actions .private-contact-actions button {
  min-height: 44px;
  max-width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  white-space: normal;
  overflow-wrap: anywhere;
}

#member-contact-actions #private-contact-container {
  flex-basis: 100%;
  min-width: 0;
}

#member-contact-actions #private-contact-container:empty {
  display: none;
}

.member-portal #member-notifications .important-notifications {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0 14px;
  align-items: start;
  margin: 0 0 14px;
  padding: 8px 14px;
  border-left-width: 3px;
}

#member-notifications .important-notifications h2 {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

#member-notifications .important-group {
  display: contents;
}

#member-notifications .important-notifications-list {
  grid-column: 2;
  list-style: none;
  padding: 0;
  margin: 0;
  min-width: 0;
}

#member-notifications .important-notification {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px 16px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  min-width: 0;
}

#member-notifications .important-notification + .important-notification {
  margin-top: 8px;
}

#member-notifications .important-notification-body {
  flex: 1 1 230px;
  min-width: 0;
  max-width: none;
  overflow-wrap: anywhere;
}

#member-notifications .important-notification p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

#member-notifications .important-notification-actions {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  min-width: 0;
  max-width: 100%;
}

#member-notifications .important-notification-actions button,
#member-notifications .important-notification-actions a {
  min-height: 44px;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}

#member-notifications .manager-upcoming {
  grid-column: 2;
  margin: 0;
  min-width: 0;
}

#member-notifications .manager-upcoming ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#member-notifications .manager-upcoming-row {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding: 6px 0;
  border: 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

#member-notifications .manager-upcoming-row.requires-action {
  border-left: 0;
  padding-left: 0;
}

#member-notifications .manager-upcoming-row small {
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .member-portal #member-notifications .important-notifications {
    grid-template-columns: minmax(0, 1fr);
    padding: 10px 12px;
    gap: 6px;
  }

  #member-notifications .important-notifications h2 {
    min-height: 0;
  }

  #member-notifications .important-notifications-list,
  #member-notifications .manager-upcoming {
    grid-column: 1;
  }

  #member-notifications .important-notification {
    gap: 6px;
  }

  #member-notifications .important-notification-body {
    flex-basis: 100%;
  }

  #member-contact-actions .private-contact-actions {
    width: 100%;
  }
}

.feedback-named-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  flex: none;
  max-width: 100%;
}

.feedback-discussion-control {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  max-width: 100%;
}

.feedback-discussion-control button {
  min-height: 44px;
  white-space: normal;
}

.feedback-discussion-done {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 7px;
  background: #e2f2e7;
  color: #205532;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
}

.feedback-discussion-error {
  max-width: 280px;
  margin: 0 !important;
  color: #982b23;
  font-size: 14px !important;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .feedback-named-actions {
    width: 100%;
  }

  .feedback-discussion-control {
    flex: 1;
    min-width: 180px;
  }

  .feedback-discussion-control button {
    width: 100%;
  }
}

.home-monthly-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 14px;
  padding: 8px 14px;
  background: var(--portal-soft);
  border: 1px solid var(--portal-border);
  border-radius: 10px;
}

.home-monthly-notice p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.home-monthly-notice button {
  min-height: 44px;
}

/* Audit follow-up: preserve information and controls, reduce unused space. */

.member-portal .private-contact-dialog {
  width: min(640px, calc(100vw - 24px));
  padding: 20px;
}

.private-contact-dialog h2 {
  font-size: 20px;
  margin: 0 0 10px;
}

.private-contact-dialog .private-contact-modes {
  gap: 8px;
  margin-bottom: 10px;
}

.private-contact-dialog [data-contact-disclosure] {
  padding: 10px 12px;
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
}

#content .private-contact-dialog form label {
  margin: 10px 0;
  font-size: 14px;
  gap: 6px;
}

.private-contact-dialog label small {
  display: inline;
  font-size: 12px;
  font-weight: 400;
  color: var(--portal-muted);
  margin-left: 6px;
}

.private-contact-dialog textarea {
  font-size: 16px;
  line-height: 1.5;
  resize: vertical;
  min-height: 112px;
}

.private-contact-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.private-contact-form-actions button {
  min-height: 44px;
  margin: 0;
}

.private-contact-dialog [data-contact-status]:empty {
  display: none;
}

.private-contact-dialog [data-contact-status] {
  font-size: 13px;
  line-height: 1.5;
}

.accounts-page .account-help {
  font-size: 13px;
  color: var(--portal-muted);
  line-height: 1.5;
  margin: 0 0 12px;
}

.accounts-page .account-filters {
  align-items: end;
  gap: 8px 12px;
}

#content .accounts-page .account-filters label {
  margin: 0;
  display: grid;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
}

#content .accounts-page .account-filters input,
#content .accounts-page .account-filters select,
#content .accounts-page .account-filters > button {
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 8px 10px;
  line-height: 1.5;
}

.accounts-page .recovery-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.accounts-page #invitation-result p {
  font-size: 13px;
  line-height: 1.5;
}

.staff-directory-overview {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 10px 0 12px;
}

.staff-directory-overview .staff-directory-summary,
.staff-directory-overview .staff-directory-count {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.staff-directory-overview .staff-directory-count {
  color: var(--portal-muted);
}

.member-sales .heading {
  margin-bottom: 12px;
}

.member-sales .sales-copy-status {
  margin: 0 0 12px;
  font-size: 13px;
}

.member-sales #sales-status:empty {
  display: none;
}

.member-sales .filters {
  padding: 12px;
  gap: 8px 12px;
  margin-bottom: 12px;
  align-items: end;
}

.member-sales .stats {
  gap: 12px;
  margin-bottom: 10px;
}

.member-sales .stats .stat {
  padding: 12px 16px;
}

.member-sales .stats .stat .value {
  margin: 6px 0 4px;
  font-size: 28px;
}

.member-sales .sales-period-note,
.member-sales .sales-coverage {
  margin: 8px 0 12px;
  font-size: 13px;
  line-height: 1.5;
}

.member-sales .sales-breakdown {
  padding: 16px;
  margin: 12px 0;
}

.member-sales .sales-breakdown h3 {
  margin-bottom: 10px;
}

.member-sales table th:not(:first-child),
.member-sales table td:not(:first-child) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.team-page .team-timeline {
  max-height: min(70dvh, 800px);
  overflow: auto;
  scroll-padding-top: 48px;
}

.team-page .team-timeline-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fff;
  min-height: 40px;
  margin: 0;
  padding: 6px 0;
  border-bottom: 1px solid var(--portal-border);
}

.team-page .team-person-row {
  padding: 6px 0;
  min-height: 52px;
}

.team-page .team-person-name {
  align-self: center;
}

.team-page .team-person-track {
  grid-auto-rows: 44px;
  min-height: 44px;
}

.team-page .team-interval {
  min-height: 44px;
}

.team-page .team-mobile-dates:empty {
  display: none;
}

.team-page .year-planning-control {
  padding: 12px 16px;
}

.team-page .year-planning-control > summary {
  font-size: 15px;
  line-height: 1.5;
}

.team-page .year-planning-table td,
.team-page .year-planning-table th {
  padding-block: 8px;
}

.team-page .approval-reason-summary {
  font-weight: 600;
}

.team-page .approval-calculation {
  margin-top: 8px;
}

.team-page .approval-calculation > summary {
  cursor: pointer;
  min-height: 32px;
  padding: 5px 0;
  font-size: 13px;
}

.team-page .team-request-reasons p {
  margin: 5px 0;
  font-size: 13px;
  line-height: 1.5;
}

.thematic-notifications ul {
  list-style: none;
  padding: 0;
  margin: 8px 0;
}

.thematic-notifications li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--portal-border);
}

.thematic-notice-copy {
  flex: 1 1 260px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.thematic-notice-copy p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.thematic-notice-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.thematic-notice-actions button {
  min-height: 44px;
  margin: 0;
  padding: 8px 12px;
  font-size: 13px;
}

@media (max-width: 760px) {
  .private-contact-dialog label small {
    margin-left: 4px;
  }

  .private-contact-form-actions button {
    flex: 1;
  }

  .accounts-page .account-filters > button {
    justify-self: stretch;
  }

  .team-page .team-timeline-header {
    display: grid;
  }

  .thematic-notice-actions {
    width: 100%;
  }
}

.profile-security > p {
  margin: 0.35rem 0 0.65rem;
}

.profile-security form {
  display: grid;
  gap: 0.35rem;
}

.profile-security #password-rules {
  margin: 0 0 0.25rem;
  font-size: 0.85rem;
  color: var(--muted, #57677b);
}

.profile-page .portal-panel-heading {
  border-bottom: 0;
  margin-bottom: 0.4rem;
  padding-bottom: 0;
}

.profile-page dl {
  border-top: 0;
}

.private-contact-list li {
  padding: 0.5rem 0;
}

.private-contact-list [data-contact-read-state] {
  display: inline-block;
  margin-inline: 0.5rem;
  font-size: 0.85rem;
}

.private-contact-list p {
  margin: 0.3rem 0;
}

.private-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.private-contact-home [data-contact-alert] {
  grid-column: 1/-1;
  margin: 0.25rem 0;
}

.private-contact-home [data-contact-alert][hidden] {
  display: none;
}

.payroll-filters {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 10px 14px;
}

.payroll-filters > button {
  justify-self: start;
  min-height: 44px;
}

.payroll-filters select {
  height: 44px;
  min-height: 44px;
}

.payroll-summary > div {
  padding: 12px 16px;
}

.payroll-summary strong {
  font-size: 26px;
}

.payroll-detail-dialog .payroll-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}

.payroll-detail-dialog .payroll-breakdown > div {
  min-width: 0;
  padding-block: 9px;
}

.payroll-detail-dialog [data-payroll-article='settlementOfficial'] {
  grid-column: 1;
}

.payroll-detail-dialog [data-payroll-article='settlementCash'] {
  grid-column: 2;
}

.payroll-analysis > details,
.payroll-analysis .payroll-factor-detail {
  margin-block: 14px;
  padding: 12px 16px;
}

.payroll-analysis details > summary {
  padding: 8px 0;
}

.feedback-company {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px !important;
  padding: 12px 16px !important;
}

.feedback-company h3,
.feedback-company p {
  margin: 0;
}

.feedback-company > strong {
  font-size: 24px;
}

.feedback-toolbar {
  margin-top: 4px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}

.feedback-toolbar label {
  max-width: none;
  min-width: 0;
  margin: 0;
}

.feedback-toolbar button {
  align-self: end;
  white-space: nowrap;
}

.staff-hire-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.staff-hire-field [data-hire-open] {
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
}

.staff-calendar-days button {
  background: #f5f8f7;
  color: #233f38;
  box-shadow: none;
}

.staff-calendar-days [data-hire-today] {
  border: 2px solid #176657;
  background: #e7f3ef;
  font-weight: 700;
}

.staff-calendar-days [aria-pressed='true'] {
  background: #176657;
  color: white;
}

.pv-calendar-dialog .pv-dialog-body {
  padding-bottom: 24px;
  scroll-padding-bottom: 30px;
}

.pv-calendar-dialog .pv-dialog-result:empty {
  padding: 0;
}

.personal-vacation-calendar .personal-day-booked,
.personal-calendar-legend .personal-day-booked {
  background: #dcebe5;
  color: #234d40;
  border: 1px solid #8ba99e;
}

.personal-vacation-calendar .personal-day-past,
.personal-calendar-legend .personal-day-past {
  background: #f1f3f3;
  color: #7a8480;
}

.personal-vacation-calendar button:disabled {
  opacity: 1;
}

.staff-card-heading,
.pv-dialog-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 520px) {
  .payroll-detail-dialog .payroll-breakdown {
    gap: 0 12px;
  }

  .payroll-detail-dialog .payroll-breakdown > div {
    flex-direction: column;
    gap: 4px;
  }

  .payroll-detail-dialog .payroll-breakdown dd {
    max-width: none;
    text-align: left;
  }
}

.payroll-detail-dialog .payroll-breakdown > div:last-child {
  grid-column: 2;
}

.payroll-detail-dialog .payroll-breakdown > div:last-child dd {
  display: block;
}

.personal-vacation-calendar button:disabled.personal-day-booked {
  background: #dcebe5;
  color: #234d40;
  border: 1px solid #8ba99e;
}

.personal-vacation-calendar button:disabled.personal-day-past {
  background: #f1f3f3;
  color: #7a8480;
}

.feedback-subnav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
  align-items: center;
}

.feedback-subnav button {
  min-height: 44px;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 10px 14px;
}

.feedback-subnav button[aria-current='page'] {
  background: var(--soft);
  border-color: #a7c7bb;
  color: var(--green);
}

.private-inbox-page .portal-page-heading {
  align-items: center;
  gap: 12px;
}

.private-inbox-page h2 {
  margin: 0;
}

.private-inbox-page [data-contact-unread] {
  margin: 10px 0;
}

.private-inbox-page [data-contact-status]:empty {
  display: none;
}

.private-inbox-scroll {
  max-width: 100%;
  overflow: auto;
}

.private-inbox-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 14px;
}

.private-inbox-table th,
.private-inbox-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.private-inbox-table th {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.private-inbox-table td:first-child {
  font-weight: 600;
}

.private-inbox-table td:nth-child(n + 3) {
  white-space: nowrap;
}

.private-inbox-table button {
  font-size: 13px;
  padding: 8px 12px;
  min-height: 44px;
}

.private-inbox-page [data-contact-reading] {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 20px;
}

.private-inbox-page [data-contact-reading] h3 {
  margin: 0 0 10px;
}

.private-inbox-page [data-contact-reading]:focus {
  outline: 2px solid #a7c7bb;
  outline-offset: 6px;
}

#feedback-container[hidden],
#feedback-inbox-page[hidden],
.private-inbox-page [data-contact-reading][hidden] {
  display: none;
}

.member-portal .private-inbox-page,
#feedback-hub > section.portal-panel {
  padding: 16px;
  box-sizing: border-box;
}

.profile-security > p {
  margin: 0.35rem 18px 0.65rem;
  line-height: 1.5;
}

.member-sales .sales-trajectory > h3 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
}

.member-sales .sales-trajectory {
  display: block;
}

#member-contact-notification:empty {
  display: none;
}

#member-contact-notification .notice {
  margin: 0 0 14px;
}

.pv-heading,
.member-sales .heading,
.team-page .team-heading,
.staff-directory .staff-directory-heading {
  align-items: flex-start;
}

.pv-page-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
}

.pv-page-actions > button {
  min-height: 44px;
}

/* Monthly hierarchy and trajectory reuse portal controls and the sales line treatment. */

#content .feedback-questions .feedback-overall-question {
  grid-column: 1/-1;
  font-weight: 700;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 8px;
}

.feedback-tree-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 0;
  min-width: 0;
}

.feedback-tree-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 4px 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: inherit;
  font-weight: 600;
  border: 0;
}

.feedback-tree-toggle svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.feedback-tree-toggle[aria-expanded='true'] svg {
  transform: rotate(90deg);
}

.feedback-tree-comment {
  min-height: 36px;
  font-size: 12px;
  padding: 6px 8px;
}

.feedback-table th:first-child {
  min-width: 240px;
}

.feedback-employee th {
  font-weight: 400;
}

.feedback-chart-frame {
  position: relative;
  min-width: 0;
}

.feedback-chart {
  min-width: 0;
  height: 216px;
  width: 100%;
  max-height: none;
  touch-action: pan-y;
}

.feedback-chart text {
  font-size: 12px;
  font-weight: 500;
  fill: #40594f;
}

.feedback-grid {
  stroke: #e1e7ee;
}

.feedback-line {
  stroke: #7c3aed;
  stroke-width: 2;
  fill: none;
}

.feedback-chart .feedback-hit {
  fill: transparent;
  stroke: none;
}

.feedback-chart .feedback-dot {
  fill: #7c3aed;
  stroke: white;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.feedback-chart g:focus {
  outline: none;
}

.feedback-chart g:focus .feedback-dot {
  stroke: #173239;
  stroke-width: 4;
}

.feedback-chart-tooltip {
  position: absolute;
  top: 6px;
  max-width: calc(100% - 12px);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 2px 9px rgb(23 50 57 / 12%);
  font-size: 12px;
  pointer-events: none;
  z-index: 1;
}

.feedback-chart-card {
  padding: 16px;
}

.feedback-chart-card .feedback-reading {
  margin: 10px 0 0;
}

.feedback-tree-label.feedback-level-1 {
  padding-left: 16px;
}

.feedback-tree-label.feedback-level-2 {
  padding-left: 32px;
}

.feedback-tree-label.feedback-level-3 {
  padding-left: 48px;
}

.feedback-tree-label.feedback-level-4 {
  padding-left: 64px;
}

@media (max-width: 420px) {
  #content .feedback-questions label:has(select[name='manager']) {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    row-gap: 8px;
  }
}

/* Audited table geometry: stable name/action space and explicit scroll affordance. */

.feedback-hierarchy-table {
  table-layout: auto;
  min-width: 1256px;
}

.feedback-hierarchy-table .feedback-label-col {
  width: 360px;
}

.feedback-hierarchy-table .feedback-count-col {
  width: 110px;
}

.feedback-hierarchy-table td:nth-child(2) {
  white-space: nowrap;
}

.feedback-hierarchy-table .feedback-score-col {
  width: 104px;
}

.feedback-hierarchy-table th,
.feedback-hierarchy-table td {
  vertical-align: middle;
  padding: 6px 10px;
  line-height: 20px;
}

.feedback-hierarchy-table tbody tr {
  height: 56px;
}

.feedback-hierarchy-table .feedback-tree-label {
  width: 100%;
  box-sizing: border-box;
}

.feedback-hierarchy-table .feedback-tree-toggle {
  line-height: 20px;
  min-height: 44px;
  padding: 0 6px;
}

.feedback-hierarchy-table .feedback-tree-toggle span {
  text-wrap: wrap;
}

.feedback-hierarchy-table .feedback-employee .feedback-tree-label {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 104px;
  gap: 8px;
  align-items: center;
}

.feedback-hierarchy-table .feedback-person-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.feedback-hierarchy-table .feedback-tree-comment {
  width: 104px;
  justify-self: end;
  min-height: 36px;
  height: 36px;
  padding: 0 8px;
  line-height: 20px;
  white-space: nowrap;
}

.feedback-table-pan {
  overflow-x: scroll;
  overflow-y: hidden;
  max-width: 100%;
  margin: 4px 0 6px;
}

.feedback-table-pan > div {
  height: 1px;
}

.feedback-table-scroll {
  overflow-x: auto;
  max-width: 100%;
}

.feedback-table-pan::-webkit-scrollbar,
.feedback-table-scroll::-webkit-scrollbar {
  height: 12px;
}

.feedback-table-pan::-webkit-scrollbar-track,
.feedback-table-scroll::-webkit-scrollbar-track {
  background: #e8eeeb;
  border-radius: 8px;
}

.feedback-table-pan::-webkit-scrollbar-thumb,
.feedback-table-scroll::-webkit-scrollbar-thumb {
  background: #829b8f;
  border: 2px solid #e8eeeb;
  border-radius: 8px;
}

.feedback-table-pan:focus-visible {
  outline: 2px solid #176657;
  outline-offset: 2px;
}

.member-portal .feedback-report > details.portal-panel {
  margin: 0 0 16px;
}

.member-portal .feedback-report > .feedback-named {
  margin: 0 0 16px;
}

.feedback-toolbar select,
.feedback-toolbar button {
  box-sizing: border-box;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
}

.feedback-toolbar button {
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.feedback-hierarchy-table thead th {
  min-width: 0;
  overflow-wrap: normal;
  white-space: normal;
}

.feedback-hierarchy-table th:first-child {
  min-width: 360px;
}

.feedback-table-pan {
  height: 16px;
  overflow: hidden;
}

.feedback-table-pan input[type='range'] {
  display: block;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 16px;
  min-height: 16px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: ew-resize;
}

.feedback-table-pan input[type='range']::-webkit-slider-runnable-track {
  height: 12px;
  border-radius: 8px;
  background: #e8eeeb;
}

.feedback-table-pan input[type='range']::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: var(--scroll-thumb-width, 80px);
  height: 12px;
  border: 1px solid #698173;
  border-radius: 8px;
  background: #829b8f;
}

.feedback-table-pan input[type='range']::-moz-range-track {
  height: 12px;
  border-radius: 8px;
  background: #e8eeeb;
}

.feedback-table-pan input[type='range']::-moz-range-thumb {
  width: var(--scroll-thumb-width, 80px);
  height: 10px;
  border: 1px solid #698173;
  border-radius: 8px;
  background: #829b8f;
}

/* Reputation: existing portal typography, surfaces and accent. */

.rep-page small,
.rep-matrix td > span,
.rep-matrix td > small {
  display: block;
}

.rep-status {
  padding: 12px;
  border-left: 3px solid #7861a8;
  background: #f3f0f8;
}

.rep-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rep-attention {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.rep-attention article {
  padding: 12px;
  background: #f6f5f8;
  border: 1px solid #dedbe4;
  border-radius: 8px;
}

.rep-attention h4 {
  margin: 0 0 8px;
}

.rep-attention p {
  font-size: 14px;
  margin: 4px 0;
  color: #4e4859;
}

.rep-attention strong {
  font-size: 24px;
}

.rep-filters {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.rep-filters label {
  min-width: 130px;
  flex: 1;
}

.rep-filters select,
.rep-filters input {
  width: 100%;
}

.rep-matrix {
  min-width: 700px;
}

.rep-matrix td,
.rep-matrix th {
  vertical-align: top;
  padding: 12px;
}

.rep-matrix td strong {
  font-size: 20px;
}

.rep-matrix small,
.rep-muted {
  color: #554f60;
  font-size: 13px;
}

.rep-matrix th small {
  font-weight: 400;
  margin-top: 4px;
}

.rep-detail {
  background: #f8f7fa;
}

.rep-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.rep-charts svg {
  width: 100%;
  color: #7655a3;
}

.rep-charts svg text {
  font: 12px system-ui;
  fill: #4d4757;
}

.rep-charts section {
  min-width: 0;
}

.rep-page details {
  margin-block: 12px;
}

.rep-page summary {
  cursor: pointer;
}

.rep-page :focus-visible {
  outline: 3px solid #7655a3;
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .rep-attention,
  .rep-charts {
    grid-template-columns: 1fr 1fr;
  }

  .rep-filters label {
    min-width: 140px;
  }

  .rep-actions button {
    min-height: 44px;
  }
}

@media (max-width: 440px) {
  .rep-charts {
    grid-template-columns: 1fr;
  }

  .rep-attention {
    gap: 8px;
  }

  .rep-attention article {
    padding: 10px;
  }
}

.member-portal .rep-page > .portal-panel {
  padding: 16px;
  margin-block: 12px;
  box-sizing: border-box;
}

.rep-page h3 {
  margin: 0 0 12px;
}

.rep-page > .portal-panel > details {
  padding: 0;
  margin: 8px 0;
  border: 0;
}

.rep-page > .portal-panel > details > summary {
  padding: 6px 0;
  min-height: 32px;
  font-size: 14px;
}

.rep-page .rep-attention p {
  font-size: 13px;
  line-height: 1.4;
}

.rep-page .rep-status {
  font-size: 13px;
  line-height: 1.5;
  margin: 12px 0;
}

.rep-page .rep-actions button {
  font-size: 14px;
  min-height: 44px;
  padding: 10px 16px;
}

.rep-page .rep-filters {
  margin: 8px 0 12px;
}

.rep-page .rep-filters label {
  font-size: 13px;
  margin: 0;
}

.rep-page .rep-filters input,
.rep-page .rep-filters select {
  height: 40px;
  min-height: 40px;
  margin: 4px 0 0;
  font-size: 14px;
}

.rep-page .rep-filters button {
  min-height: 40px;
  font-size: 14px;
  padding: 8px 14px;
  margin: 0;
}

.rep-page .rep-matrix th > button {
  margin: 0;
}

.rep-page .rep-matrix td,
.rep-page .rep-matrix th {
  padding: 10px;
}

.rep-page .rep-detail article {
  padding: 12px 0;
}

.rep-page .rep-detail details {
  padding: 8px 12px;
}

.rep-page .rep-detail summary {
  padding: 4px 0;
  min-height: 32px;
}

.rep-page .rep-charts section {
  padding: 0;
  margin: 12px 0;
}

.rep-page .rep-charts h4 {
  margin: 0 0 8px;
}

@media (max-width: 760px) {
  .rep-page .rep-detail > article {
    max-width: calc(100vw - 88px);
  }

  .rep-page .rep-detail .scroll {
    max-width: 100%;
  }
}

.rep-page .rep-matrix.rep-single {
  min-width: 0;
}

/* Compact reputation rows and legible calendar-month axes. */

.rep-page .rep-matrix {
  min-width: 1040px;
  table-layout: fixed;
}

.rep-page .rep-matrix.rep-single {
  min-width: 540px;
}

.rep-page .rep-matrix th:first-child {
  width: 25%;
}

.rep-page .rep-matrix.rep-single th:first-child {
  width: 38%;
}

.rep-page .rep-matrix td,
.rep-page .rep-matrix th {
  padding: 8px 10px;
  vertical-align: middle;
  line-height: 1.35;
}

.rep-page .rep-matrix td strong {
  font-size: 16px;
  font-weight: 650;
}

.rep-page .rep-value {
  font-size: 14px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.rep-page .rep-change {
  margin-top: 4px;
  font-size: 12px;
  color: #554f60;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.rep-page .rep-origin {
  display: inline;
  margin-left: 2px;
  cursor: help;
  color: #554f60;
}

.rep-page .rep-matrix th > small {
  font-size: 12px;
  line-height: 1.35;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.rep-page .rep-matrix th > button {
  font-size: 14px;
  min-height: 36px;
  padding: 6px 12px;
}

.rep-page .rep-detail {
  padding: 12px 16px;
}

.rep-page .rep-chart-caption {
  font-size: 13px;
  color: #554f60;
  margin: 8px 0;
}

.rep-page .rep-chart-months {
  display: flex;
  justify-content: space-between;
  padding: 0 calc(7.5% - 0.75rem);
  gap: 0;
}

.rep-page .rep-chart-months > span {
  flex: 0 0 1.5rem;
}

.rep-page .rep-chart-months > span:only-child {
  margin-inline: auto;
}

.rep-page .rep-chart-months small {
  display: block;
  font-size: 11px;
  color: #554f60;
}

.rep-page .rep-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 10px 16px;
}

.rep-page .rep-filters label {
  min-width: 0;
}

.rep-page .rep-filters input,
.rep-page .rep-filters select {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding-inline: 10px;
}

.rep-page .rep-filters select {
  padding-right: 30px;
}

.rep-page .rep-filters button {
  justify-self: start;
}

.rep-page .rep-filters button[data-rep-reset] {
  justify-self: start;
}

@media (max-width: 600px) {
  .rep-page .rep-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rep-page .rep-charts {
    grid-template-columns: 1fr;
  }

  .rep-page .rep-filters select,
  .rep-page .rep-filters input {
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  .rep-page .rep-filters {
    grid-template-columns: 1fr;
  }
}

.rep-page .rep-card-links {
  display: flex;
  align-items: center;
  gap: 8px 16px;
  flex-wrap: wrap;
  padding: 2px 0 12px;
  border-bottom: 1px solid #dedbe4;
}

.rep-page .rep-card-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 0;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rep-page .rep-card-links span {
  font-size: 13px;
  color: #554f60;
}

.rep-page .rep-low {
  color: #9c3029;
}

.rep-page > .portal-panel > details ul {
  max-height: 280px;
  overflow: auto;
  padding-right: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.rep-page .rep-chart-months small {
  font-size: 12px;
}

/* Keep the main table header within its own scrolling area, clear of global navigation. */

.rep-page .rep-table-scroll {
  max-height: 68vh;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border: 1px solid #dce5e0;
  border-radius: 8px;
}

.rep-page .rep-table-scroll > .rep-matrix > thead > tr > th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f4f7f5;
  box-shadow: 0 1px 0 #cbd8d0;
}

.rep-page .rep-table-scroll > .rep-matrix {
  margin: 0;
}

.rep-page .rep-attention {
  gap: 10px;
}

.rep-page .rep-attention article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  padding: 10px;
  gap: 4px 8px;
}

.rep-page .rep-attention h4 {
  font-size: 14px;
  line-height: 1.3;
  margin: 0;
}

.rep-page .rep-attention strong {
  font-size: 22px;
  line-height: 1;
}

.rep-page .rep-attention p {
  grid-column: 1/-1;
  line-height: 1.35;
  margin: 0;
}

.rep-page .rep-chart-plot {
  position: relative;
  padding-left: 44px;
}

.rep-page .rep-chart-plot svg {
  display: block;
  width: 100%;
  overflow: visible;
}

.rep-page .rep-chart-y {
  position: absolute;
  inset: 0 auto 0 0;
  width: 36px;
  font-size: 12px;
  line-height: 1;
  color: #4d4757;
}

.rep-page .rep-chart-y span {
  position: absolute;
  right: 0;
  transform: translateY(-50%);
  white-space: nowrap;
}

.rep-page .rep-chart-months {
  position: relative;
  display: block;
  margin-left: 44px;
  padding: 0;
  height: 36px;
}

.rep-page .rep-chart-months > span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  width: 1.5rem;
  font-size: 12px;
  line-height: 1.3;
}

.rep-page .rep-source-notes {
  font-size: 13px;
}

.rep-page .rep-source-notes p {
  margin: 8px 0;
  color: #554f60;
}

@media (max-width: 760px) {
  .rep-page .rep-attention {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 380px) {
  .rep-page .rep-card-links {
    gap: 6px 12px;
  }
}

.rep-page .rep-matrix {
  min-width: 960px;
}

.rep-page .rep-office > button {
  max-width: 48%;
  font-size: 14px;
  min-height: 36px;
  padding: 6px 10px;
  margin: 0;
  white-space: normal;
}

.rep-page .rep-office > .rep-address {
  flex: 1;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  overflow-wrap: anywhere;
  color: #554f60;
}

.rep-page .rep-value {
  white-space: normal;
}

.rep-page .rep-change {
  white-space: normal;
}

/* Explicit coordinates comply with the existing CSP; no inline styles are needed. */

.rep-page .rep-chart-y .rep-y-high {
  top: 13.333%;
}

.rep-page .rep-chart-y .rep-y-mid {
  top: 52.222%;
}

.rep-page .rep-chart-y .rep-y-low {
  top: 91.111%;
}

.rep-page .rep-chart-months .rep-month-index-0 {
  left: 0%;
}

.rep-page .rep-chart-months .rep-month-index-1 {
  left: 11.111%;
}

.rep-page .rep-chart-months .rep-month-index-2 {
  left: 22.222%;
}

.rep-page .rep-chart-months .rep-month-index-3 {
  left: 33.333%;
}

.rep-page .rep-chart-months .rep-month-index-4 {
  left: 44.444%;
}

.rep-page .rep-chart-months .rep-month-index-5 {
  left: 55.555%;
}

.rep-page .rep-chart-months .rep-month-index-6 {
  left: 66.666%;
}

.rep-page .rep-chart-months .rep-month-index-7 {
  left: 77.777%;
}

.rep-page .rep-chart-months .rep-month-index-8 {
  left: 88.888%;
}

.rep-page .rep-chart-months .rep-month-index-9 {
  left: 100%;
}

.rep-page .rep-chart-months > span:only-child {
  left: 50%;
}

.rep-page .rep-matrix,
.rep-page .rep-matrix.rep-single {
  min-width: 0;
  width: 100%;
}

.rep-page .rep-matrix td,
.rep-page .rep-matrix th {
  padding: 8px 6px;
}

.rep-page .rep-office {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 8px;
}

.rep-page .rep-office > button {
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.rep-page .rep-filter-actions {
  grid-column: 1/-1;
  display: flex;
  gap: 8px;
  align-items: center;
}

.rep-page .rep-attention p {
  font-size: 12px;
}

.rep-page .rep-matrix .rep-change {
  overflow-wrap: normal;
  white-space: normal;
}

@media (max-width: 900px) {
  .rep-page .rep-matrix {
    min-width: 880px;
  }

  .rep-page .rep-matrix.rep-single {
    min-width: 520px;
  }
}

.rep-page .rep-card-links {
  flex-direction: row;
}

.rep-page .rep-manager {
  font-size: 14px;
  margin: 4px 0 8px;
}

.rep-page .rep-chart-months {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  margin-right: 0;
}

.rep-page .rep-chart-months > span {
  position: static;
  transform: none;
  width: auto;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
}

.rep-page .rep-chart-months > span:only-child {
  margin: 0;
}

/* Keep city words intact; the address may move below when space is limited. */

.rep-page .rep-office {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.rep-page .rep-office > button {
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.rep-page .rep-office > .rep-address {
  flex: 1 1 72px;
  min-width: 0;
}

/* Monthly deltas keep each label/value together; wrap between complete metrics. */

.rep-page .rep-change {
  display: flex;
  flex-wrap: wrap;
  gap: 0 10px;
}

.rep-page .rep-change > span {
  white-space: nowrap;
}

/* Address wraps at words; reserve its intrinsic word width within the office cell. */

.rep-page .rep-office {
  grid-template-columns: minmax(0, 0.95fr) minmax(min-content, 1.05fr);
}

.rep-page .rep-office > .rep-address {
  overflow-wrap: normal;
  word-break: normal;
}

.member-sales .sales-monthly-table th:first-child {
  min-width: 136px;
  white-space: nowrap;
  padding-right: 24px;
}

.payroll-analysis .payroll-table-scroll,
.staff-table-scroll {
  max-height: min(70dvh, 640px);
  overflow: auto;
  overscroll-behavior-y: contain;
  scroll-padding-block: 6rem 16px;
}

.payroll-analysis .payroll-table-scroll > table > thead,
.staff-directory-table > thead {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #eef4f0;
}

.payroll-analysis .payroll-table-scroll > table > thead th,
.staff-directory-table > thead th {
  background: #eef4f0;
}

.staff-table-scroll:focus-visible,
.payroll-analysis .payroll-table-scroll:focus-visible {
  outline: 2px solid #237660;
  outline-offset: 2px;
}

.year-planning-table tbody th > span {
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Staff analytics stays above the roster, within the existing personnel scope. */

.staff-turnover {
  margin: 0 0 24px;
  padding: 20px;
  border: 1px solid var(--border, #d7e1dc);
  border-radius: 12px;
  background: var(--surface, #fff);
}

.turnover-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.turnover-heading h3,
.turnover-heading h4 {
  margin: 0;
}

.turnover-heading > span,
.turnover-note,
.turnover-period-summary {
  color: var(--muted, #52675c);
  font-size: 14px;
}

.turnover-filters {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}

.turnover-filters label,
.turnover-heading label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  min-width: 140px;
}

.turnover-filters input,
.turnover-filters select,
.turnover-heading select,
.turnover-filters button {
  box-sizing: border-box;
  min-height: 44px;
  height: 44px;
  margin: 0;
}

.turnover-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.turnover-kpis > div {
  padding: 12px 16px;
  background: var(--surface-muted, #f3f7f4);
  border-radius: 8px;
}

.turnover-kpis dt {
  font-size: 14px;
  line-height: 1.5;
}

.turnover-kpis dd {
  margin: 4px 0;
  font-size: 24px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.turnover-kpis small {
  font-size: 13px;
  color: var(--muted, #52675c);
}

.turnover-table-scroll {
  overflow: auto;
  max-height: 400px;
  border: 1px solid var(--border, #d7e1dc);
  border-radius: 8px;
  margin: 16px 0;
  scroll-padding-top: 48px;
}

.turnover-table-scroll table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.turnover-table-scroll th,
.turnover-table-scroll td {
  padding: 10px 14px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border, #d7e1dc);
  white-space: nowrap;
  text-align: right;
}

.turnover-table-scroll th:first-child {
  text-align: left;
  max-width: 330px;
  white-space: normal;
  min-width: 180px;
}

.turnover-table-scroll thead th {
  position: sticky;
  top: 0;
  background: #edf3ef;
  z-index: 1;
}

.turnover-dynamics {
  margin: 24px 0 16px;
}

.turnover-chart {
  overflow: auto;
}

.turnover-chart svg {
  display: block;
  min-width: 580px;
  width: 100%;
  max-height: 290px;
}

.turnover-chart text {
  fill: #42594c;
  font: 13px system-ui;
}

.turnover-legend {
  display: flex;
  gap: 20px;
  font-size: 14px;
}

.turnover-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.turnover-legend i {
  width: 20px;
  height: 3px;
  display: inline-block;
}

.turnover-events,
.turnover-help {
  margin-top: 16px;
}

.turnover-events summary,
.turnover-help summary,
.turnover-dynamics summary {
  padding: 8px 0;
  cursor: pointer;
}

.turnover-help p {
  font-size: 14px;
  color: var(--muted, #52675c);
  max-width: 90ch;
}

.turnover-empty {
  padding: 24px 0;
  color: var(--muted, #52675c);
}

@media (max-width: 850px) {
  .turnover-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .staff-turnover {
    padding: 16px;
  }

  .turnover-filters label {
    flex: 1 1 150px;
  }
}

@media (max-width: 430px) {
  .turnover-kpis {
    grid-template-columns: 1fr;
  }

  .turnover-filters button {
    flex: 1;
  }

  .turnover-heading > span {
    line-height: 1.5;
  }
}

.staff-directory .staff-turnover .turnover-filters :is(input, select, button) {
  box-sizing: border-box;
  min-height: 44px;
  height: 44px;
  margin: 0;
}

.staff-turnover .turnover-kpis {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr));
}

.staff-turnover .turnover-kpis > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0;
  min-width: 0;
  border: 0;
  overflow-wrap: normal;
}

.staff-turnover .turnover-kpis dt,
.staff-turnover .turnover-kpis dd,
.staff-turnover .turnover-kpis small {
  max-width: 100%;
  width: 100%;
  overflow-wrap: normal;
  word-break: normal;
}

.staff-turnover .turnover-kpis dd {
  white-space: nowrap;
  line-height: 1.35;
  font-size: 24px;
}

.staff-directory-dense .staff-directory-filters {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
}

.staff-directory-filters > * {
  min-width: 0;
  max-width: 100%;
}

.turnover-chart::-webkit-scrollbar {
  height: 10px;
}

.turnover-chart::-webkit-scrollbar-thumb {
  background: #9ab7a8;
  border-radius: 5px;
}

/* Compact staff analytics: current tenure and covered events are separate tables. */

.staff-directory .turnover-compact {
  padding: 14px 16px;
  margin-bottom: 16px;
}

.turnover-compact .turnover-heading {
  margin-bottom: 8px;
}

.turnover-compact .turnover-filters {
  gap: 8px;
  margin: 8px 0 10px;
}

.turnover-compact .turnover-filters label {
  min-width: 120px;
  gap: 4px;
  flex: 1 1 140px;
  font-size: 13px;
}

.turnover-compact .turnover-filters button {
  flex: 0 0 auto;
}

.turnover-compact .turnover-table-scroll {
  margin: 8px 0;
  max-height: 240px;
}

.turnover-compact .turnover-current th:first-child {
  min-width: 180px;
  width: 55%;
}

.turnover-compact .turnover-table-scroll th,
.turnover-compact .turnover-table-scroll td {
  padding: 7px 12px;
  line-height: 1.4;
}

.turnover-compact .turnover-total {
  background: #edf4ef;
  font-weight: 650;
}

.turnover-compact .turnover-coverage {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted, #657878);
}

.turnover-compact .turnover-detail {
  margin-top: 8px;
}

.turnover-compact .turnover-detail > summary,
.turnover-compact .turnover-months > summary,
.turnover-compact .turnover-events > summary {
  padding: 8px 0;
  cursor: pointer;
}

.turnover-compact .turnover-ratios {
  font-size: 13px;
  margin: 10px 0;
  line-height: 1.5;
}

.turnover-compact .turnover-chart {
  margin-top: 8px;
}

.turnover-compact .turnover-chart svg {
  max-height: 220px;
}

.turnover-compact .turnover-metric {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.turnover-compact .turnover-metric select {
  min-height: 44px;
}

.turnover-compact .turnover-legend {
  margin: 6px 0 10px;
  font-size: 13px;
}

.turnover-compact .turnover-events,
.turnover-compact .turnover-months {
  margin-top: 8px;
}

.turnover-compact .turnover-note {
  margin: 8px 0;
  font-size: 13px;
}

@media (max-width: 600px) {
  .staff-directory .turnover-compact {
    padding: 12px;
  }

  .turnover-compact .turnover-heading {
    align-items: baseline;
  }

  .turnover-compact .turnover-heading > span {
    font-size: 12px;
  }

  .turnover-compact .turnover-filters button {
    flex: 1;
  }

  .turnover-compact .turnover-current th:first-child {
    min-width: 145px;
  }

  .turnover-compact .turnover-table-scroll th,
  .turnover-compact .turnover-table-scroll td {
    padding: 7px 9px;
  }
}

.member-portal #content .turnover-compact .turnover-filters {
  display: grid;
  grid-template-columns: 160px 160px minmax(140px, 1.3fr) minmax(120px, 1fr) auto auto;
  gap: 8px;
  align-items: end;
}

.member-portal #content .turnover-compact .turnover-filters label {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  margin: 0;
  min-width: 0;
  max-width: none;
}

.member-portal #content .turnover-compact .turnover-filters :is(input, select, button) {
  box-sizing: border-box;
  width: 100%;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 7px 9px;
}

.member-portal #content .turnover-compact .turnover-filters:has(label:first-child > select) {
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) auto auto;
}

@media (max-width: 1100px) {
  .member-portal #content .turnover-compact .turnover-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto auto;
  }
}

@media (max-width: 700px) {
  .member-portal #content .turnover-compact .turnover-filters,
  .member-portal #content .turnover-compact .turnover-filters:has(label:first-child > select) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Recorded personnel dates and current tenure share the actual content width on desktop. */

.turnover-facts .turnover-current table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

/* Keep all seven analytics headers legible when the sidebar narrows the content. */
.turnover-facts .turnover-current table[data-current-only='false'] {
  min-width: 840px;
}

.turnover-facts .turnover-current th:first-child {
  width: auto;
  min-width: 0;
  max-width: none;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.turnover-facts .turnover-current thead th {
  font-size: 12px;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

.turnover-facts .turnover-current tbody th {
  font-size: 13px;
  line-height: 1.35;
}

.turnover-facts .turnover-current th,
.turnover-facts .turnover-current td {
  padding: 7px 8px;
  vertical-align: middle;
}

.turnover-facts .turnover-col-department {
  width: 25%;
}

.turnover-facts .turnover-col-current {
  width: 7%;
}

.turnover-facts .turnover-col-hires {
  width: 7%;
}

.turnover-facts .turnover-col-leavers {
  width: 8%;
}

.turnover-facts .turnover-col-tenure {
  width: 12%;
}

.turnover-facts .turnover-col-recent {
  width: 10%;
}

.turnover-facts .turnover-col-cohort {
  width: 31%;
}

.turnover-facts [data-current-only='true'] .turnover-col-department {
  width: 46%;
}

.turnover-facts [data-current-only='true'] .turnover-col-current {
  width: 14%;
}

.turnover-facts [data-current-only='true'] .turnover-col-tenure {
  width: 22%;
}

.turnover-facts [data-current-only='true'] .turnover-col-recent {
  width: 18%;
}

.turnover-facts .turnover-cohort-result {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  text-align: right;
}

.turnover-facts .turnover-cohort-result > strong {
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.turnover-facts .turnover-cohort-outcomes {
  display: flex;
  justify-content: flex-end;
  gap: 2px 8px;
  flex-wrap: wrap;
  min-width: 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted, #52675c);
  line-height: 1.35;
}

.turnover-facts .turnover-cohort-outcomes > span {
  white-space: nowrap;
}

.turnover-facts .turnover-table-scroll::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

.turnover-facts .turnover-table-scroll::-webkit-scrollbar-thumb {
  background: #9ab7a8;
  border-radius: 5px;
}

.turnover-facts .turnover-known-events {
  margin-top: 4px;
}

.turnover-facts .turnover-known-events > summary {
  padding: 8px 0;
  cursor: pointer;
  font-size: 14px;
}

.turnover-facts .turnover-known-events .turnover-table-scroll {
  max-height: 290px;
}

.turnover-facts .turnover-known-events table {
  width: 100%;
  min-width: 700px;
  table-layout: fixed;
}

.turnover-facts .turnover-event-name {
  width: 32%;
}

.turnover-facts .turnover-event-date {
  width: 15%;
}

.turnover-facts .turnover-event-kind {
  width: 14%;
}

.turnover-facts .turnover-event-department {
  width: 23%;
}

.turnover-facts .turnover-event-tenure {
  width: 16%;
}

.turnover-facts .turnover-known-events th:first-child {
  width: auto;
  min-width: 0;
  max-width: none;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  padding-right: 24px;
}

.turnover-facts .turnover-known-events thead th {
  white-space: normal;
  line-height: 1.35;
}

.turnover-facts .turnover-known-events td:nth-child(2) {
  padding-left: 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.turnover-facts .turnover-hire-assignments {
  min-width: 0;
  max-width: 100%;
}

.turnover-facts .turnover-hire-assignments > summary {
  padding: 8px 0;
  cursor: pointer;
  font-size: 14px;
}

.turnover-facts .turnover-hire-assignments .turnover-table-scroll {
  max-height: 340px;
  max-width: 100%;
}

.turnover-facts .turnover-hire-assignments table {
  min-width: 1080px;
  table-layout: fixed;
}

.turnover-facts .turnover-hire-assignments th,
.turnover-facts .turnover-hire-assignments td {
  min-width: 0;
  max-width: none;
  text-align: left;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
}

.turnover-facts .turnover-hire-assignments small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.4;
  color: #4b625b;
}

.turnover-facts .turnover-history-filters {
  margin-top: 8px;
}

.turnover-facts .turnover-main-filters label {
  min-width: 160px;
}

.member-portal .staff-directory .turnover-facts > details {
  padding: 0;
  border: 0;
  margin: 4px 0;
}

.member-portal .staff-directory .turnover-facts > details > summary {
  padding: 8px 0;
  min-height: 0;
}

@media (max-width: 760px) {
  .turnover-facts .turnover-current table {
    min-width: 760px;
  }
}

/* A named month selects recorded events; current staff and tenure remain explicitly dated today. */

.member-portal #content .turnover-facts .turnover-main-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}

.member-portal #content .turnover-facts .turnover-main-filters > label {
  flex: 1 1 150px;
  min-width: 140px;
}

.member-portal #content .turnover-facts .turnover-main-filters > .turnover-month-filter {
  flex: 0 1 190px;
  min-width: 170px;
}

.member-portal #content .turnover-facts .turnover-main-filters > button {
  width: auto;
  flex: 0 0 auto;
}

@media (max-width: 700px) {
  .member-portal #content .turnover-facts .turnover-main-filters > .turnover-month-filter {
    flex: 1 1 100%;
    min-width: 0;
  }

  .member-portal #content .turnover-facts .turnover-main-filters > label {
    flex: 1 1 130px;
    min-width: 0;
  }

  .member-portal #content .turnover-facts .turnover-main-filters > button {
    flex: 1 1 40%;
  }
}

/* Last foreground activity; no online/attendance badge or perpetual heartbeat. */

.staff-directory-table .staff-activity-cell,
.staff-directory-table .staff-activity-heading {
  width: 182px;
  min-width: 182px;
  font-variant-numeric: tabular-nums;
}

.staff-activity-cell time {
  display: block;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.5;
}

.staff-activity-cell small {
  display: block;
  color: #50655d;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 2px;
}

.staff-activity-heading button {
  min-height: 44px;
  padding: 6px 4px;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 600;
  white-space: nowrap;
}

.staff-directory-table th:first-child,
.staff-directory-table td:first-child {
  width: 190px;
}

.staff-directory-table th:nth-child(2) {
  width: auto;
}

.staff-directory-table th:nth-child(3) {
  width: 110px;
}

.staff-directory-table th:nth-child(4) {
  width: 130px;
}

.push-preferences {
  margin-top: 16px;
  padding: 16px;
}

.push-preferences h3 {
  margin: 0 0 8px;
}

.push-preferences p {
  max-width: 72ch;
  margin: 0 0 12px;
  line-height: 1.5;
}

.push-preferences button {
  min-height: 44px;
  max-width: 100%;
  white-space: normal;
}

/* Data placeholders keep page-specific geometry without inventing values. */

.progressive-value,
.progressive-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.2em;
  min-width: 1.4em;
  vertical-align: middle;
}

.progressive-spinner {
  display: inline-block;
  box-sizing: border-box;
  width: 1em;
  height: 1em;
  min-width: 14px;
  min-height: 14px;
  border: 2px solid #d5e0da;
  border-top-color: #2d6b5a;
  border-radius: 50%;
  animation: progressive-spin 1s linear infinite;
}

.progressive-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.progressive-error {
  min-height: 72px;
}

.progressive-error p {
  margin: 0 0 12px;
}

.progressive-chart-placeholder {
  min-height: 216px;
  display: grid;
  place-items: center;
}

.progressive-chart-placeholder-compact {
  min-height: 140px;
  display: grid;
  place-items: center;
}

.progressive-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.progressive-filter-fieldset {
  display: contents;
}

.progressive-home-lines {
  min-height: 92px;
  display: grid;
  place-items: center;
}

.home-vacation-panel [data-home-vacation-body] {
  min-height: 92px;
}

.home-brief-cards strong {
  min-height: 1.3em;
}

.home-monthly-panel {
  min-height: 90px;
}

.home-monthly-panel > p:empty {
  margin: 0;
}

.progressive-filters[aria-busy='true'] button {
  cursor: wait;
}

@keyframes progressive-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .progressive-spinner {
    animation: none;
  }
}

.member-sales [data-progressive-key='sales-results'] > details {
  margin-top: 24px;
}

.home-monthly-panel {
  min-height: 190px;
}

/* Keep assistive loading labels inside their own clipped/scrolled cell. */

.progressive-value,
.progressive-loading {
  position: relative;
}

.progressive-sr {
  left: 0;
  top: 0;
}

.home-monthly-panel {
  padding: 20px 24px;
  margin-block: 14px;
  box-sizing: border-box;
}

.home-monthly-panel h3 {
  margin: 0 0 12px;
}

.home-monthly-panel [data-progressive-key='home-monthly-state'] {
  min-height: 110px;
}

@media (max-width: 760px) {
  .home-monthly-panel {
    padding: 18px;
  }
}

.home-monthly-prompt {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 24px;
  margin: 0 0 24px;
  border: 2px solid #a56b20;
  border-left-width: 7px;
  border-radius: 16px;
  background: #fff4d9;
  color: #342610;
  box-shadow: 0 5px 18px #6247190d;
  box-sizing: border-box;
  min-width: 0;
}

.home-monthly-prompt-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 13px;
  background: #f5dfaa;
  color: #67430e;
}

.home-monthly-prompt-icon svg {
  width: 29px;
  height: 29px;
}

.home-monthly-prompt-copy {
  flex: 1 1 280px;
  min-width: 0;
}

.home-monthly-prompt h2 {
  margin: 0 0 8px;
  font-size: clamp(20px, 2.3vw, 26px);
  font-weight: 700;
  line-height: 1.25;
  color: inherit;
  overflow-wrap: normal;
}

.home-monthly-prompt p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}

.home-monthly-prompt .home-monthly-prompt-deadline {
  margin-top: 3px;
  color: #5f4b2b;
  font-size: 14px;
}

.home-monthly-prompt button {
  flex: none;
  margin-left: auto;
  min-height: 48px;
  padding: 12px 20px;
  border: 2px solid #67430e;
  background: #67430e;
  color: #fff;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.home-monthly-prompt button:hover {
  background: #4b3009;
  border-color: #4b3009;
}

.home-monthly-prompt button:focus-visible {
  outline: 3px solid #176551;
  outline-offset: 4px;
}

@media (max-width: 760px) {
  .home-monthly-prompt {
    gap: 12px;
    padding: 18px 16px;
    flex-wrap: wrap;
    border-left-width: 5px;
  }

  .home-monthly-prompt-icon {
    width: 42px;
    height: 42px;
  }

  .home-monthly-prompt-copy {
    flex-basis: calc(100% - 54px);
  }

  .home-monthly-prompt button {
    width: 100%;
    white-space: normal;
  }
}

.home-vacation-panel [data-home-vacation-body] {
  padding: 20px 24px;
  box-sizing: border-box;
}

@media (max-width: 760px) {
  .home-vacation-panel [data-home-vacation-body] {
    padding: 18px;
  }
}

.rep-page .rep-growth .rep-attention {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rep-growth-month {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 14px;
}

.rep-growth-month input {
  width: 180px;
  max-width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  margin: 0;
}

.rep-growth > .rep-muted {
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .rep-page .rep-growth .rep-attention {
    grid-template-columns: 1fr;
  }
}

.home-push-suggestion {
  padding: 20px;
  margin: 0 0 20px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.home-push-suggestion > div:first-child {
  min-width: 0;
}

.home-push-suggestion h3 {
  margin: 0 0 7px;
  font-size: 16px;
  line-height: 1.5;
}

.home-push-suggestion p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.home-push-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}

.home-push-actions button {
  min-height: 44px;
}

.home-push-suggestion button:focus-visible {
  outline: 3px solid #176657;
  outline-offset: 3px;
}

@media (max-width: 680px) {
  .home-push-suggestion {
    padding: 16px;
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .home-push-suggestion h3 {
    font-size: 15px;
  }
}

/* Approved annual team calendar, scoped presentation only. */

.tac-annual-panel {
  --ink: #193a32;
  --muted: #52685e;
  --line: #ccd9d0;
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: #f5f7f3;
  box-shadow: none;
  font:
    14px/1.45 -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
}

.tac-annual-panel::backdrop {
  background: #17352b88;
}

.tac-annual-panel * {
  box-sizing: border-box;
}

.tac-annual-scroll {
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
}

.tac-annual-top {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 15px 24px 11px;
  height: auto;
  display: block;
}

.tac-annual-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.tac-annual-heading h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.tac-annual-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.tac-annual-panel button,
.tac-annual-day-details button {
  font: inherit;
  border: 1px solid #9ab5a4;
  border-radius: 7px;
  background: white;
  color: #193a32;
  min-height: 40px;
  padding: 8px 13px;
  cursor: pointer;
  touch-action: manipulation;
}

.tac-annual-panel .tac-year-close {
  white-space: nowrap;
  background: #176657;
  color: #fff;
  border-color: #176657;
  min-height: 44px;
}

.tac-year-close span {
  margin-left: 12px;
  font-size: 21px;
}

.tac-annual-filters {
  display: flex;
  gap: 12px;
  align-items: end;
  margin-top: 12px;
  flex-wrap: wrap;
}

.tac-annual-filters label {
  font-size: 12px;
  font-weight: 550;
  color: #435d50;
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 135px;
}

.tac-annual-filters label:first-child {
  min-width: 90px;
  flex: 0.5;
}

.tac-annual-filters label:last-of-type {
  min-width: 225px;
  flex: 1.5;
}

.tac-annual-filters select {
  width: 100%;
  min-height: 40px;
  font:
    14px -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  padding: 8px 10px;
  color: #193a32;
  background: #fff;
  border: 1px solid #aabfb1;
  border-radius: 6px;
}

.tac-annual-summary {
  margin: 9px 0 0;
  font-size: 12px;
  color: #476050;
  min-height: 18px;
}

.tac-year-legend {
  padding: 10px 24px 6px;
}

.tac-legend-chips {
  display: flex;
  gap: 9px 18px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
}

.tac-legend-chips > span {
  display: flex;
  gap: 5px;
  align-items: center;
}

.tac-legend-chips i {
  display: inline-block;
  width: 17px;
  height: 17px;
  border: 1px solid #75917d;
  border-radius: 3px;
}

.tac-year-legend p {
  font-size: 11px;
  color: #4e6556;
  margin: 7px 0 0;
}

.tac-weekend-key {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tac-today-key:before {
  content: '';
  width: 15px;
  height: 15px;
  border: 2px solid #163f37;
  border-radius: 3px;
}

.tac-year-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 8px 24px 16px;
}

.tac-year-month {
  background: #fff;
  border: 1px solid #d4dfd6;
  border-radius: 9px;
  padding: 9px 10px 10px;
  min-width: 0;
}

.tac-year-month h3 {
  font-size: 14px;
  text-transform: capitalize;
  margin: 0 0 5px;
  line-height: 1.3;
  letter-spacing: 0;
  color: #183e32;
}

.tac-month-weekdays,
.tac-month-dates {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.tac-month-weekdays {
  font-size: 10px;
  text-align: center;
  color: #5a7161;
  padding: 0 0 4px;
}

.tac-month-weekdays span:nth-last-child(-n + 2) {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tac-annual-panel .tac-year-date {
  min-height: 27px;
  height: 27px;
  padding: 2px 4px;
  border-radius: 4px;
  border: 1px solid #c1d2be;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2px;
  min-width: 0;
  font-size: 11px;
  line-height: 1.1;
  position: relative;
  color: #1b392b;
  background: var(--heat);
}

.tac-year-date strong {
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  min-width: 8px;
  text-align: right;
}

.tac-year-date .tac-date-number {
  font-size: 9px;
  opacity: 0.85;
}

.tac-annual-panel .tac-year-date:hover {
  outline: 2px solid #557a60;
  outline-offset: -2px;
}

.tac-annual-panel .tac-year-date.is-today {
  outline: 2px solid #173e36;
  outline-offset: 1px;
  z-index: 1;
}

.tac-year-date.is-weekend .tac-date-number {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.tac-annual-panel :focus-visible,
.tac-annual-day-details :focus-visible {
  outline: 3px solid #285db0 !important;
  outline-offset: 2px !important;
  z-index: 2;
}

.tac-date-empty {
  min-height: 27px;
}

.tac-h0 {
  --heat: #eef6e9;
  background: #eef6e9;
}

.tac-h1 {
  --heat: #d7ecc6;
  background: #d7ecc6;
}

.tac-h2 {
  --heat: #e8ebb2;
  background: #e8ebb2;
}

.tac-h3 {
  --heat: #f3d2a6;
  background: #f3d2a6;
}

.tac-h4 {
  --heat: #e9b4a7;
  background: #e9b4a7;
}

.tac-none {
  --heat: #f1f3f1;
  background: #f1f3f1;
}

.tac-annual-foot {
  padding: 0 24px 15px;
  color: #5d7163;
  font-size: 11px;
}

.tac-annual-day-details {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(640px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: 88dvh;
  padding: 0;
  border: 1px solid #9eb5a5;
  border-radius: 12px;
  color: #1a382f;
  background: white;
  font:
    14px/1.5 -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  overflow: auto;
}

.tac-annual-day-details::backdrop {
  background: #15342b77;
}

.tac-day-detail-heading {
  position: sticky;
  top: 0;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  background: #fff;
  padding: 20px;
  border-bottom: 1px solid #d5e0d8;
  height: auto;
}

.tac-day-detail-heading h3 {
  font-size: 20px;
  line-height: 1.3;
  margin: 0;
  text-transform: capitalize;
}

.tac-day-detail-heading p {
  margin: 6px 0 0;
  color: #526f5b;
}

.tac-day-detail-heading button {
  font-size: 25px;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  padding: 5px;
}

.tac-day-detail-body {
  padding: 12px 20px 20px;
}

.tac-day-mode {
  font-weight: 650;
}

.tac-day-detail-body ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.tac-day-detail-body li {
  padding: 14px 0;
  border-top: 1px solid #d8e3db;
  overflow-wrap: anywhere;
}

.tac-day-detail-body li > strong {
  display: block;
  font-size: 15px;
}

.tac-day-detail-body small {
  display: block;
  color: #596e60;
  font-size: 12px;
}

.tac-day-detail-body p {
  margin: 7px 0;
  font-size: 13px;
}

.tac-period-state {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: #e6f1e9;
  color: #1b5b3d;
  font-size: 11px;
}

.tac-period-state.pending {
  background: #fff0cd;
  color: #6a4918;
}

.tac-period-state.unknown {
  background: #edf0f4;
  color: #465363;
}

.tac-annual-day-details footer {
  padding: 14px 20px;
  border-top: 1px solid #d5e0d8;
  text-align: right;
  background: #f6f9f5;
}

.tac-year-empty {
  padding: 25px 0;
}

.tac-annual-day-details h3:focus,
.tac-annual-heading h2:focus {
  outline: none;
}

@media (min-width: 1600px) {
  .tac-year-grid {
    max-width: 1800px;
    margin: auto;
  }

  .tac-annual-panel .tac-year-date {
    height: 30px;
    min-height: 30px;
  }

  .tac-date-empty {
    min-height: 30px;
  }
}

@media (max-width: 1100px) {
  .tac-year-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tac-annual-top {
    position: relative;
  }

  .tac-annual-filters label:last-of-type {
    min-width: 230px;
  }
}

@media (max-width: 760px) {
  .tac-year-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px 14px 18px;
    gap: 12px;
  }

  .tac-annual-heading h2 {
    font-size: 22px;
  }

  .tac-annual-top {
    padding: 16px 14px 12px;
    position: relative;
  }

  .tac-annual-heading {
    align-items: start;
    gap: 12px;
  }

  .tac-annual-heading p {
    max-width: 250px;
  }

  .tac-annual-panel .tac-year-close {
    font-size: 12px;
    padding-inline: 10px;
  }

  .tac-annual-filters {
    gap: 10px;
  }

  .tac-annual-filters label,
  .tac-annual-filters label:first-child {
    flex: 1 1 calc(50% - 10px);
    min-width: 120px;
  }

  .tac-annual-filters label:last-of-type {
    flex: 1 1 100%;
    min-width: 0;
  }

  .tac-annual-filters select {
    min-height: 44px;
    font-size: 14px;
  }

  .tac-annual-panel .tac-year-reset {
    min-height: 44px;
  }

  .tac-year-legend {
    padding: 12px 14px 4px;
  }

  .tac-year-legend p {
    font-size: 12px;
    line-height: 1.55;
  }

  .tac-annual-summary {
    line-height: 1.55;
  }

  .tac-annual-panel .tac-year-date {
    height: 35px;
    min-height: 35px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 3px 1px;
  }

  .tac-year-date strong {
    font-size: 12px;
  }

  .tac-year-date .tac-date-number {
    font-size: 9px;
  }

  .tac-date-empty {
    min-height: 35px;
  }

  .tac-annual-foot {
    padding: 0 14px 20px;
  }
}

@media (max-width: 520px) {
  .tac-year-grid {
    grid-template-columns: 1fr;
  }

  .tac-year-month {
    padding: 13px;
  }

  .tac-year-month h3 {
    font-size: 17px;
    margin-bottom: 8px;
  }

  .tac-month-weekdays {
    font-size: 12px;
    padding-bottom: 6px;
  }

  .tac-annual-panel .tac-year-date {
    height: 45px;
    min-height: 45px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 5px;
    gap: 1px;
  }

  .tac-year-date strong {
    font-size: 16px;
  }

  .tac-year-date .tac-date-number {
    font-size: 11px;
  }

  .tac-date-empty {
    min-height: 45px;
  }

  .tac-annual-day-details {
    max-height: 93dvh;
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }

  .tac-day-detail-heading,
  .tac-day-detail-body {
    padding-inline: 16px;
  }

  .tac-day-detail-heading h3 {
    font-size: 18px;
  }

  .tac-annual-heading p {
    font-size: 11px;
  }

  .tac-legend-chips {
    gap: 7px 12px;
  }

  .tac-legend-chips > span {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tac-annual-panel *,
  .tac-annual-day-details * {
    scroll-behavior: auto;
    transition: none;
    animation: none;
  }
}

@media (min-width: 1200px) {
  .tac-annual-top {
    padding: 10px 24px 8px;
  }

  .tac-annual-heading {
    min-height: 44px;
  }

  .tac-annual-heading h2 {
    font-size: 23px;
  }

  .tac-annual-heading p {
    font-size: 11px;
    line-height: 1.35;
    margin-top: 3px;
  }

  .tac-annual-filters {
    margin-top: 8px;
  }

  .tac-annual-filters label {
    font-size: 11px;
    line-height: 15px;
  }

  .tac-annual-filters select {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 13px;
  }

  .tac-annual-panel .tac-year-reset {
    min-height: 36px;
  }

  .tac-annual-summary {
    font-size: 11px;
    line-height: 16px;
    min-height: 16px;
    margin-top: 7px;
  }

  .tac-year-legend {
    padding: 8px 24px 4px;
  }

  .tac-year-legend p {
    font-size: 11px;
    line-height: 1.35;
    margin-top: 5px;
  }

  .tac-year-grid {
    gap: 10px;
    padding: 6px 24px 10px;
  }

  .tac-year-month {
    padding: 6px;
  }

  .tac-year-month h3 {
    margin-bottom: 3px;
  }

  .tac-month-weekdays {
    padding-bottom: 2px;
    font-size: 10px;
    line-height: 14px;
  }

  .tac-month-dates {
    gap: 2px;
  }

  .tac-annual-panel .tac-year-date {
    height: 24px;
    min-height: 24px;
  }

  .tac-date-empty {
    min-height: 24px;
  }

  .tac-annual-foot {
    font-size: 10px;
    line-height: 15px;
    padding-bottom: 10px;
  }
}

.tac-annual-panel .tac-annual-mobile-close {
  display: none;
}

@media (max-width: 1100px) {
  .tac-annual-panel .tac-annual-mobile-close {
    display: block;
    position: fixed;
    right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom));
    z-index: 5;
    background: #176657;
    color: white;
    border-color: #176657;
    box-shadow: 0 3px 15px #193d3033;
    min-height: 44px;
    font-size: 13px;
  }

  .tac-annual-foot {
    padding-bottom: 85px;
  }
}

.team-page .team-panel-heading:has([data-team-annual-open]) {
  flex-wrap: wrap;
}

.team-page [data-team-annual-open] {
  background: #176657;
  color: #fff;
  border-color: #176657;
  white-space: nowrap;
}

.tac-annual-error {
  grid-column: 1/-1;
  padding: 25px;
}

.tac-annual-panel .tac-legend-chips {
  font-size: 11px;
}

@media (max-width: 520px) {
  .team-page [data-team-annual-open] {
    width: 100%;
    min-height: 44px;
  }

  .tac-year-date strong {
    font-size: 14px;
  }
}

/* Focused readability changes; the established layout and typefaces stay intact. */

.team-page .team-day-head small {
  font-size: 12px;
  color: #536966;
  line-height: 1.3;
}

.team-page .team-nothing {
  color: #536966;
}

.team-page .team-day-head.weekend {
  color: #786849;
}

.turnover-facts .turnover-cohort-outcomes {
  color: #4b625b;
}

#member-source-notice .notice {
  color: #526761;
}

.thematic-notice-copy time {
  display: block;
  color: #536966;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 5px;
}

.thematic-notifications details {
  margin-top: 14px;
}

.thematic-notifications summary {
  cursor: pointer;
  min-height: 44px;
  display: list-item;
  padding: 10px 0;
  font-weight: 600;
}

@media (max-width: 900px) {
  #feedback-container select,
  #feedback-container input:not([type='checkbox']):not([type='radio']):not([type='range']),
  #payroll-container select,
  #fot-container .payroll-filters select,
  .rep-page .rep-filters select,
  .rep-page .rep-filters input,
  .team-page select,
  .tac-annual-panel select,
  #staff-container select,
  #staff-container input:not([type='checkbox']):not([type='radio']):not([type='range']) {
    font-size: 16px;
    line-height: 1.4;
    min-height: 44px;
  }
}

/* An explicit update notice never obscures forms or refreshes private data. */
.staff-hire-date-editor {
  border-top: 1px solid var(--portal-border);
  margin-top: 20px;
  padding-top: 16px;
}
.staff-hire-date-editor fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.staff-bitrix-approval a {
  overflow-wrap: anywhere;
}
.staff-person-dialog .staff-bitrix-approval {
  grid-column: 1 / -1;
}
.staff-person-dialog [data-staff-bitrix-editor] label {
  display: block;
  margin: 12px 0;
}
.staff-person-dialog [data-staff-bitrix-input] {
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  font-size: 16px;
}
.staff-person-dialog .staff-bitrix-approval button {
  min-height: 44px;
}
.staff-person-dialog .staff-bitrix-approval .staff-form-actions {
  flex-wrap: wrap;
}
.member-release-update {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 12px 24px;
  border-bottom: 1px solid #b9d1cc;
  background: #edf7f4;
  color: #143e35;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
.member-release-update p {
  margin: 0;
}
.member-release-update button {
  min-height: 44px;
  padding: 8px 16px;
  background: #176657;
  color: white;
  border: 1px solid #176657;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}
.member-release-update button:focus-visible {
  outline: 3px solid #143e35;
  outline-offset: 3px;
}
.member-release-update [data-member-release-status]:empty {
  display: none;
}
@media (max-width: 480px) {
  .member-release-update {
    padding: 12px 16px;
  }
}

/* Keep native select behavior with one inset, centered arrow across section themes.
   Only arrow geometry wins over section background/padding shorthands. */
select:not([multiple]):is(:not([size]), [size='0'], [size='1']) {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23173239' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-position: right 12px center !important;
  background-repeat: no-repeat !important;
  background-size: 12px 12px !important;
  padding-right: 36px !important;
}

/* Let the OS provide a visible arrow in high-contrast mode. */
@media (forced-colors: active) {
  select:not([multiple]):is(:not([size]), [size='0'], [size='1']) {
    -webkit-appearance: auto;
    appearance: auto;
    background-image: none !important;
  }
}

/* Motion sandbox: original palette, typography, geometry and values are unchanged. */
.member-portal nav.portal-motion-nav {
  position: relative;
  isolation: isolate;
}

.portal-motion-selection {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  background: #e7f1ea;
  border: 1px solid #d6e6da;
  border-radius: 10px;
  transform-origin: top left;
}

.member-portal .portal-motion-nav button[aria-current='page'],
.member-portal .portal-motion-nav button[aria-current='page']:hover {
  background: transparent;
  border-color: transparent;
}

@media (prefers-reduced-motion: no-preference) {
  .member-portal #content > [data-member-view]:not([hidden]) {
    animation: portal-motion-enter 620ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
  }

  .member-portal #content > [data-member-view='home']:not([hidden]):nth-child(2) {
    animation-delay: 45ms;
  }

  .member-portal #content > [data-member-view='home']:not([hidden]):nth-child(n + 3) {
    animation-delay: 90ms;
  }

  .member-portal #content > [data-member-view='home']:not([hidden]):nth-child(n + 6) {
    animation-delay: 135ms;
  }

  .member-portal dialog[open] {
    animation: portal-motion-dialog 380ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
  }

  .member-portal dialog[open]::backdrop {
    animation: portal-motion-fade 200ms ease-out backwards;
  }

  .member-portal details[open] > :not(summary) {
    animation: portal-motion-detail 320ms ease-out backwards;
  }

  .member-portal button:not(.cn-video-btn):not([aria-disabled='true']) {
    transition:
      background-color 160ms ease,
      border-color 160ms ease,
      color 160ms ease,
      box-shadow 160ms ease,
      filter 160ms ease,
      scale 140ms ease;
  }

  .member-portal button:active:not(:disabled):not([aria-disabled='true']) {
    scale: 0.98;
  }

  /* Cascade the existing blocks, keeping their final layout and values untouched. */
  .member-portal
    :is(
      .home-vacation-panel,
      .home-sales-panel,
      .home-shortcuts > button,
      .sales-result-stats > .stat,
      .sales-trajectory,
      .sales-breakdown,
      .staff-directory-filters,
      .staff-turnover,
      .staff-table-scroll,
      .personal-year-summary,
      .pv-list-panel,
      .team-stats > *,
      .team-panel,
      .profile-layout > .portal-panel,
      .push-preferences,
      .cn-totals > .cn-stat,
      .cn-page > .cn-section
    ) {
    animation: portal-motion-block 700ms cubic-bezier(0.16, 1, 0.3, 1) backwards;
    animation-delay: 75ms;
  }

  .member-portal
    :is(
      .home-sales-panel,
      .home-shortcuts > button:nth-child(2),
      .sales-result-stats > .stat:nth-child(2),
      .staff-directory-filters,
      .pv-list-panel,
      .team-stats > :nth-child(2),
      .profile-layout > .portal-panel:nth-child(2),
      .cn-totals > .cn-stat:nth-child(2)
    ) {
    animation-delay: 135ms;
  }

  .member-portal
    :is(
      .sales-result-stats > .stat:nth-child(3),
      .sales-trajectory,
      .sales-breakdown,
      .staff-table-scroll,
      .team-stats > :nth-child(3),
      .push-preferences,
      .cn-totals > .cn-stat:nth-child(3),
      .cn-page > .cn-section
    ) {
    animation-delay: 195ms;
  }

  /* Reveal only chart paths produced by the real data renderer. */
  .member-portal :is(.sales-chart [data-month-line], .turnover-chart path[fill='none']) {
    animation: portal-motion-chart 850ms cubic-bezier(0.22, 1, 0.36, 1) 140ms backwards;
  }

  .member-portal :is(.home-shortcut, .cn-stat) {
    transition:
      translate 220ms ease,
      box-shadow 220ms ease;
  }

  /* Quiet skeletons only while a real value is loading. */
  .member-portal .progressive-value .progressive-spinner {
    border: 0;
    border-radius: 4px;
    background: linear-gradient(100deg, #d5e0da 20%, #e9f3ee 45%, #d5e0da 70%);
    background-size: 250% 100%;
    animation: portal-motion-skeleton 1800ms ease-in-out infinite;
  }
}

@keyframes portal-motion-enter {
  from {
    opacity: 0;
    translate: 0 24px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes portal-motion-dialog {
  from {
    opacity: 0;
    translate: 0 14px;
    scale: 0.96;
  }
  to {
    opacity: 1;
    translate: 0 0;
    scale: 1;
  }
}

@keyframes portal-motion-detail {
  from {
    opacity: 0;
    translate: 0 4px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes portal-motion-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes portal-motion-skeleton {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

@keyframes portal-motion-block {
  from {
    opacity: 0;
    translate: 0 22px;
    scale: 0.985;
  }
  to {
    opacity: 1;
    translate: 0 0;
    scale: 1;
  }
}

@keyframes portal-motion-chart {
  from {
    clip-path: inset(0 100% 0 0);
    opacity: 0.3;
  }
  to {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .member-portal .home-shortcut:hover {
    translate: 0 -3px;
  }
}

/* Source text reserves the final geometry and remains the accessible/copyable value. */
.portal-motion-number {
  position: relative;
  display: inline-block;
  color: transparent !important;
  white-space: pre;
}
.portal-motion-digits {
  position: absolute;
  inset: 0;
  pointer-events: none;
  white-space: pre;
}
.portal-motion-digits::after {
  content: attr(data-motion-value);
}
@media (prefers-reduced-motion: no-preference) {
  .member-portal .payroll-bar-track rect {
    transform-box: fill-box;
    transform-origin: left center;
    animation: portal-motion-bar 950ms cubic-bezier(0.16, 1, 0.3, 1) backwards;
  }
  .member-portal .turnover-chart circle {
    transform-box: fill-box;
    transform-origin: center;
    animation: portal-motion-point 400ms ease-out 450ms backwards;
  }
}
@keyframes portal-motion-bar {
  from {
    transform: scaleX(0);
  }
  to {
    transform: none;
  }
}
@keyframes portal-motion-point {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

/* Restore the earlier sandbox's gentle 2px sidebar hover, in the existing palette. */
@media (min-width: 761px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .member-portal .member-nav button:not(.cn-video-btn):not([aria-disabled='true']) {
    transition:
      background-color 180ms ease,
      color 180ms ease,
      border-color 160ms ease,
      box-shadow 160ms ease,
      filter 160ms ease,
      scale 140ms ease,
      translate 250ms cubic-bezier(0.22, 1, 0.36, 1);
  }
  .member-portal .member-nav button:hover:not(:disabled) {
    translate: 2px 0;
  }
  .member-portal .portal-motion-selection {
    transition: translate 250ms cubic-bezier(0.22, 1, 0.36, 1);
  }
  .member-portal .portal-motion-nav:has(> button[aria-current='page']:hover) > .portal-motion-selection {
    translate: 2px 0;
  }
}
