/* Executive reporting refinement. Palette and semantic data classes are inherited.
   No colors, data, scripts, chart panels, or business behavior are introduced. */
.shell {
  padding: 16px 24px 20px;
}
.topline {
  gap: 20px;
  margin-bottom: 12px;
}
h1 {
  font-size: 26px;
  line-height: 1.2;
}
.eyebrow {
  margin-bottom: 4px;
}
.subtitle {
  margin-top: 5px;
}
.workspace-nav {
  padding-top: 18px;
}
.workspace-brand {
  padding-bottom: 18px;
}
.nav-link {
  min-height: 40px;
  padding-block: 8px;
}
.nav-group {
  gap: 3px;
}
.nav-utilities {
  padding-top: 16px;
}
.nav-note {
  margin-top: 10px;
  padding-top: 10px;
}
.field {
  gap: 4px;
}
.field input,
.field select,
.custom-date {
  min-height: 36px;
  padding: 7px 10px;
}
.field select[multiple] {
  min-height: 96px;
}
.button {
  min-height: 36px;
  padding: 6px 12px;
}
.button.quiet {
  min-height: 32px;
  padding: 5px 9px;
}
.icon-button {
  width: 36px;
  height: 36px;
}
.report-controls {
  gap: 10px 14px;
  padding: 10px 14px;
  margin-bottom: 12px;
}
.report-fields {
  gap: 10px;
}
.period-summary-label {
  margin-bottom: 2px;
}
.period-summary-value {
  font-size: 13px;
}
.banner,
.load-error {
  margin-bottom: 12px;
  padding: 9px 12px;
}
.section-head {
  padding: 11px 14px;
  gap: 12px;
}
.section-title {
  font-size: 18px;
  line-height: 1.3;
}
.section-copy,
.performance-dates {
  margin-top: 4px;
}
.section-kicker {
  margin-bottom: 4px;
}
.performance-explanation {
  padding: 8px 14px;
}
.performance-breakdown {
  margin: 0 14px 10px;
  padding: 8px 10px;
}
.table-foot {
  padding: 8px 14px;
  gap: 8px;
}
.tph-guide {
  gap: 10px;
}
.table-scroll,
.auth-table-wrap,
.performance-scroll,
.mb-table-wrap {
  max-width: 100%;
  overscroll-behavior-inline: contain;
}
table {
  font-variant-numeric: tabular-nums lining-nums;
}
th.numeric,
td.numeric {
  text-align: right;
}
/* Keep each day, weekly total and team total in the same table coordinate system. */
.performance-card .perf-table {
  min-width: 1120px;
  width: 100%;
}
.performance-card .perf-table th,
.performance-card .perf-table td {
  padding: 5px 5px;
}
.performance-card .perf-table thead tr:first-child th {
  height: 36px;
  line-height: 1.3;
}
.performance-card .perf-table thead tr:nth-child(2) th {
  height: 44px;
  top: 36px;
  font-size: 11px;
  line-height: 1.25;
}
.performance-card .perf-table .rep-cell {
  width: 200px;
  min-width: 200px;
}
.performance-card .perf-table tbody td {
  height: 42px;
  font-size: 13px;
  line-height: 1.3;
}
.performance-card .perf-table .rep-name {
  font-size: 13px;
  line-height: 1.3;
  font-weight: 650;
}
.performance-card .perf-table .perf-records {
  min-height: 30px;
  margin-left: 6px;
  padding: 4px 7px;
}
.performance-card .perf-table .week-total-start[colspan] {
  font-weight: 800;
  letter-spacing: 0.04em;
}
.performance-card .perf-table .total-col {
  font-weight: 750;
}
.performance-card .perf-table tbody tr.total-row td {
  position: static !important;
  font-weight: 750;
}
.performance-card .perf-table tbody tr.total-row .rep-name {
  font-weight: 800;
}
.performance-card .perf-table tbody tr.total-row td.total-col {
  font-size: 13px;
  font-weight: 850;
}
.performance-card .perf-table .tph-badge {
  font-variant-numeric: tabular-nums;
  transform: none !important;
}
#performanceTableWrap {
  max-height: 660px;
}
.entry-card {
  margin-top: 12px;
}
.entry-head {
  padding: 12px 14px 8px;
}
.entry-subtitle {
  margin-top: 4px;
}
.entry-grid {
  gap: 10px;
  padding: 0 14px 12px;
  grid-template-columns: minmax(150px, 1.25fr) minmax(150px, 1fr) minmax(
      100px,
      0.8fr
    ) minmax(100px, 0.8fr) auto;
}
.entry-preview {
  margin-top: 0;
}
dialog {
  max-height: 90vh;
  max-height: 90dvh;
  max-width: calc(100vw - 24px);
}
.dialog-head {
  padding: 14px 16px;
  gap: 10px;
}
.dialog-head h2 {
  font-size: 19px;
}
.dialog-body {
  padding: 14px 16px 16px;
}
.dialog-foot {
  padding: 10px 16px;
  gap: 8px;
}
.detail-record {
  padding: 8px 0;
}
.campaign-create {
  gap: 10px;
  padding-bottom: 12px;
}
.campaign-item {
  padding: 10px 0;
}
.mb-body {
  padding: 14px;
}
.mb-fields {
  gap: 10px;
}
.mb-tabs,
.mb-actions {
  padding: 10px 0;
  gap: 8px;
  flex-wrap: wrap;
}
.mb-report {
  padding: 18px;
  margin-top: 12px;
}
.mb-report th,
.mb-report td,
#performanceContent th,
#performanceContent td {
  padding: 8px 9px;
  line-height: 1.4;
}
.mb-kv {
  gap: 20px;
  margin: 12px 0;
}
.mb-total {
  margin-top: 12px;
}
.performance-fields {
  gap: 10px;
}
.performance-tabs {
  gap: 6px;
  margin: 10px 0;
  flex-wrap: wrap;
}
.performance-totals {
  gap: 18px;
  padding: 10px 0;
}
#authWorkspace {
  padding: 14px;
}
.auth-section {
  margin-bottom: 16px;
}
.auth-grid,
.auth-create-form {
  gap: 10px;
}
.auth-table-wrap th,
.auth-table-wrap td {
  padding: 8px 10px;
}
.campaign-control,
.report-fields,
.range-fields,
.mb-fields,
.auth-grid {
  min-width: 0;
}
.campaign-control select {
  min-width: 0;
}
.footer {
  margin-top: 16px;
}
/* Screen capture keeps a readable wide table inside its own scroll area. */
#performanceCaptureContent {
  padding: 16px;
  overflow: auto;
}
#performanceCaptureContent .performance-card {
  overflow: visible;
}
#performanceCaptureContent .performance-card .perf-table {
  min-width: 1120px;
}
#performanceCaptureContent .performance-card .perf-table .rep-cell {
  width: 160px;
  min-width: 160px;
}
#performanceCaptureContent .performance-card .perf-table th {
  font-size: 11px;
}
#performanceCaptureContent .performance-card .perf-table tbody td {
  height: 34px;
  font-size: 12px;
}
#performanceCaptureContent .table-foot {
  display: block;
}
@media (max-width: 1100px) {
  .entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .entry-grid .save-cell {
    grid-column: 1/-1;
    display: flex;
    gap: 8px;
  }
}
@media (max-width: 900px) {
  .shell {
    padding: 14px 18px;
  }
  .workspace-nav {
    padding: 10px 18px;
    gap: 10px;
  }
  .workspace-brand {
    padding-bottom: 0;
  }
  .nav-link,
  .nav-logout {
    min-height: 44px;
  }
  .topline {
    flex-wrap: wrap;
    gap: 12px;
  }
  .campaign-control {
    min-width: 0;
    max-width: 100%;
    flex: 1 1 250px;
  }
  .campaign-control > .field {
    min-width: 0;
  }
  .period-summary {
    margin-left: 0;
    flex: 1 0 100%;
    text-align: left;
  }
}
@media (max-width: 620px) {
  .shell {
    padding: 14px 12px;
  }
  .workspace-nav {
    padding: 10px 12px;
  }
  .topline {
    margin-bottom: 12px;
  }
  h1 {
    font-size: 24px;
  }
  .campaign-control {
    flex: none;
    width: 100%;
  }
  .button,
  .button.quiet,
  .icon-button,
  .field input,
  .field select,
  .custom-date,
  .req-date input,
  .daily-picker input,
  .actual-editor-grid input {
    min-height: 44px;
  }
  .icon-button {
    min-width: 44px;
  }
  .performance-card .perf-table .perf-records {
    min-height: 44px;
  }
  .report-controls {
    padding: 12px;
    gap: 10px;
  }
  .report-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    gap: 10px;
  }
  .report-fields .period-mode,
  .report-fields .period-date {
    width: 100%;
  }
  .range-fields {
    flex-wrap: wrap;
  }
  .range-fields > .field {
    min-width: 0;
    flex: 1 1 125px;
  }
  .section-head {
    padding: 12px;
    flex-wrap: wrap;
  }
  .section-head > div {
    min-width: 0;
  }
  .section-title {
    font-size: 17px;
  }
  .performance-dates {
    overflow-wrap: anywhere;
  }
  .performance-breakdown summary {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .entry-grid {
    padding-inline: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .entry-grid > .field {
    min-width: 0;
  }
  .entry-grid > .field:first-child,
  .entry-grid > .field:nth-child(2) {
    grid-column: 1/-1;
  }
  .entry-grid .save-cell {
    justify-content: stretch;
  }
  .entry-grid .save-cell .button {
    flex: 1;
  }
  .dialog-head,
  .dialog-body,
  .dialog-foot {
    padding: 12px;
  }
  .dialog-head {
    flex-wrap: wrap;
  }
  .dialog-head > div {
    min-width: 0;
    flex: 1;
  }
  .mb-body,
  .mb-report,
  #authWorkspace {
    padding: 12px;
  }
  .mb-kv {
    gap: 12px;
    flex-wrap: wrap;
  }
  .auth-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .performance-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .mb-fields > * {
    min-width: 0;
  }
  .performance-totals {
    flex-wrap: wrap;
  }
}
@media print {
  @page {
    size: A4 landscape;
    margin: 10mm;
  }
  body.print-grid #performanceCaptureDialog {
    max-width: none !important;
    max-height: none !important;
    overflow: visible !important;
  }
  body.print-grid #performanceCaptureDialog #performanceCaptureContent {
    padding: 0;
    overflow: visible;
  }
  body.print-grid
    #performanceCaptureDialog
    #performanceCaptureContent
    .performance-card
    .perf-table {
    min-width: 0 !important;
    width: 100%;
    table-layout: fixed;
  }
  body.print-grid
    #performanceCaptureDialog
    #performanceCaptureContent
    .performance-card
    .perf-table
    .rep-cell {
    min-width: 0;
    width: 145px;
  }
  body.print-grid
    #performanceCaptureDialog
    #performanceCaptureContent
    .performance-card
    .perf-table
    th,
  body.print-grid
    #performanceCaptureDialog
    #performanceCaptureContent
    .performance-card
    .perf-table
    td {
    position: static !important;
    height: auto;
    padding: 5px 4px;
    font-size: 10px;
    line-height: 1.35;
    white-space: normal;
  }
  body.print-grid
    #performanceCaptureDialog
    #performanceCaptureContent
    .performance-card
    .perf-table
    .rep-name {
    font-size: 10px;
  }
  body.print-grid
    #performanceCaptureDialog
    #performanceCaptureContent
    .performance-card
    .perf-table
    tbody
    tr.total-row
    td.total-col {
    font-size: 10px;
  }
  body.print-grid
    #performanceCaptureDialog
    #performanceCaptureContent
    .table-foot {
    display: block !important;
    padding: 8px 0;
    font-size: 10px;
  }
  body.print-grid
    #performanceCaptureDialog
    #performanceCaptureContent
    .tph-guide {
    display: none;
  }
  body.print-grid
    #performanceCaptureDialog
    #performanceCaptureContent
    .perf-table
    thead {
    display: table-header-group;
  }
  body.print-grid
    #performanceCaptureDialog
    #performanceCaptureContent
    .perf-table
    tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  body.print-grid
    #performanceCaptureDialog
    #performanceCaptureContent
    .perf-table {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}
@media (prefers-reduced-motion: reduce) {
  .button,
  .field input,
  .field select {
    transition: none;
  }
}
