.billing-summary-control-bar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin: 0 0 14px;
  padding: 12px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  flex-wrap: wrap;
}

.control-label {
  margin-bottom: 5px;
  color: #374151;
  font-size: 12px;
  font-weight: 700;
}

.month-selector-form,
.snapshot-action-form {
  margin: 0;
}

.month-selector-fields {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.month-selector-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.month-selector-field label {
  color: #374151;
  font-size: 12px;
  font-weight: 700;
}

.month-selector-field select {
  min-height: 36px;
  min-width: 140px;
  padding: 7px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-size: 13px;
}

.month-selector-field select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.billing-month-menu-wrapper {
  min-width: 180px;
}

.billing-month-menu .dropdown-menu-button {
  min-width: 180px;
}

.billing-month-menu .dropdown-menu-panel {
  width: 220px;
}

.snapshot-button {
  background: #0f766e;
  border-color: #0f766e;
}

.snapshot-button:hover {
  background: #0d5f59;
  border-color: #0d5f59;
}

.snapshot-controls {
  display: flex;
  align-items: end;
  gap: 10px;
  margin-left: auto;
  position: relative;
}

.snapshot-menu .dropdown-menu-panel,
.compare-menu .dropdown-menu-panel {
  width: 360px;
  max-width: calc(100vw - 56px);
}

.snapshot-menu-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
}

.snapshot-menu-item:hover {
  background: #f8fafc;
}

.snapshot-menu-item.active .dropdown-menu-option {
  background: #eff6ff;
  color: #1d4ed8;
}

.snapshot-delete-form {
  margin: 0;
  padding-right: 4px;
}

.snapshot-delete-button {
  padding: 6px 8px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: #fff;
  color: #b91c1c;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.snapshot-delete-button:hover {
  background: #fef2f2;
  border-color: #ef4444;
}

.compare-menu .dropdown-menu-button {
  min-width: 170px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compare-menu[open] .dropdown-menu-button {
  background: #f5f3ff;
  border-color: #7c3aed;
  color: #5b21b6;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.compare-menu .dropdown-menu-option.active {
  background: #f5f3ff;
  color: #5b21b6;
}

.personal-billing-control-bar {
  justify-content: flex-start;
}

.personal-billing-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 0 0 14px;
  max-width: 520px;
}

.personal-billing-total-card {
  padding: 16px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.personal-billing-total-card span {
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.personal-billing-total-card strong {
  display: block;
  color: #0f172a;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
}

.personal-billing-total-card.pay-total {
  background: #ecfdf5;
  border-color: #99f6e4;
}

.personal-billing-total-card.pay-total strong {
  color: #0f766e;
}

.personal-billing-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 900px;
}

.personal-billing-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(120px, 150px) minmax(120px, 150px);
  gap: 10px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.personal-billing-row:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.personal-billing-row.muted {
  background: #f8fafc;
  color: #94a3b8;
}

.personal-billing-partner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.personal-billing-partner h3 {
  margin: 0 0 4px;
  color: #111827;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.25;
}

.personal-billing-partner p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.personal-billing-row.muted .personal-billing-partner h3,
.personal-billing-row.muted .personal-billing-partner p {
  color: #94a3b8;
}

.personal-billing-metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  min-width: 0;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  background: #f8fafc;
  color: #111827;
  font: inherit;
  text-align: right;
  cursor: pointer;
}

.personal-billing-metric:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #075985;
}

.personal-billing-metric span {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.personal-billing-metric strong {
  display: block;
  color: inherit;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.1;
}

.personal-billing-metric.pay {
  background: #ecfdf5;
  border-color: #99f6e4;
  color: #0f766e;
}

.personal-billing-metric.pay:hover {
  background: #ccfbf1;
  border-color: #5eead4;
  color: #0f766e;
}

.personal-billing-row.muted .personal-billing-metric {
  background: #f1f5f9;
  border-color: #e5e7eb;
  color: #94a3b8;
}

.personal-billing-row.muted .personal-billing-metric span,
.personal-billing-row.muted .personal-billing-metric strong {
  color: #94a3b8;
}

.comparison-card {
  margin: 0 0 14px;
  padding: 16px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.comparison-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.comparison-header h3 {
  margin: 0 0 4px;
  color: #111827;
  font-size: 18px;
  font-weight: 800;
}

.comparison-header p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
}

.comparison-header strong {
  color: #334155;
  font-weight: 800;
}

.comparison-section {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
}

.comparison-section h4 {
  margin: 0 0 8px;
  color: #334155;
  font-size: 14px;
  font-weight: 800;
}

.comparison-message-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
  color: #111827;
  font-size: 13px;
  line-height: 1.45;
}

.comparison-message-list li::marker {
  color: #7c3aed;
  font-weight: 800;
}

.comparison-empty {
  margin-top: 14px;
  padding: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.detail-cell {
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.detail-cell:hover {
  background: #e0f2fe !important;
  color: #075985 !important;
  box-shadow: inset 0 0 0 2px rgba(14, 165, 233, 0.22);
}

.detail-cell.muted-zero:hover {
  background: #f1f5f9 !important;
  color: #64748b !important;
}

body.detail-modal-open {
  overflow: hidden;
}

.detail-modal[hidden] {
  display: none;
}

.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.detail-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
}

.detail-modal-panel {
  position: relative;
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.detail-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

.detail-modal-header h3 {
  margin: 0 0 4px;
  color: #111827;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}

.detail-modal-header p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.detail-modal-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.detail-modal-close:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #111827;
}

.detail-modal-body {
  padding: 16px 18px 18px;
  overflow-y: auto;
}

.detail-empty {
  padding: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.detail-export-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
}

.detail-export-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid #0f766e;
  border-radius: 7px;
  background: #f0fdfa;
  color: #0f766e;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.detail-export-button:hover {
  background: #ccfbf1;
  border-color: #0d5f59;
  color: #0d5f59;
}

.detail-log-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 9px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  flex-wrap: wrap;
}

.detail-log-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.legend-dot.added {
  background: #10b981;
}

.legend-dot.edited {
  background: #f59e0b;
}

.legend-dot.removed {
  background: #dc2626;
}

.detail-log-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-log-item {
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.detail-log-item:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.detail-log-main {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
}

.detail-log-main strong {
  color: #0f172a;
  font-weight: 800;
  white-space: nowrap;
}

.detail-log-main span {
  text-align: right;
}

.detail-log-meta {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.detail-log-status {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.detail-log-added {
  background: #ecfdf5;
  border-color: #86efac;
  color: #064e3b;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.28);
}

.detail-log-added .detail-log-status {
  background: #10b981;
  color: #fff;
}

.detail-log-changed {
  background: #fef3c7;
  border-color: #fbbf24;
  color: #78350f;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.32);
}

.detail-log-changed .detail-log-status {
  background: #f59e0b;
  color: #fff;
}

.detail-log-removed {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #7f1d1d;
  opacity: 0.78;
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.28);
}

.detail-log-removed .detail-log-main,
.detail-log-removed .detail-log-meta {
  color: #991b1b;
}

.detail-log-removed .detail-log-main strong,
.detail-log-removed .detail-log-main span {
  color: #991b1b;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.detail-log-removed .detail-log-status {
  background: #dc2626;
  color: #fff;
}

.detail-log-previous {
  margin-top: 8px;
  padding: 7px 9px;
  border: 1px dashed #d6d3d1;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.58);
  color: #78716c;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.detail-log-previous span {
  color: #57534e;
  font-weight: 900;
}

.detail-log-added:hover {
  background: #dcfce7;
  border-color: #4ade80;
}

.detail-log-changed:hover {
  background: #fde68a;
  border-color: #f59e0b;
}

.detail-log-removed:hover {
  background: #fee2e2;
  border-color: #ef4444;
  opacity: 0.86;
}

.detail-pay-card {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.detail-pay-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.detail-pay-row:last-child {
  border-bottom: none;
}

.detail-pay-row strong {
  color: #111827;
  font-weight: 800;
  text-align: right;
}

.detail-pay-row.total {
  background: #f8fafc;
  color: #0f172a;
}

.detail-pay-row.total strong {
  color: #0f766e;
  font-size: 16px;
}

.detail-pay-comparison-card {
  display: grid;
  grid-template-columns: 1fr;
}

.detail-pay-comparison-header,
.detail-pay-comparison-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(120px, auto);
  gap: 12px;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid #e5e7eb;
}

.detail-pay-comparison-card.has-compare .detail-pay-comparison-header,
.detail-pay-comparison-card.has-compare .detail-pay-comparison-row {
  grid-template-columns: minmax(130px, 1fr) minmax(120px, auto) minmax(120px, auto);
}

.detail-pay-comparison-header {
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-pay-comparison-row:last-child {
  border-bottom: none;
}

.detail-pay-comparison-row span {
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.detail-pay-comparison-row strong {
  color: #111827;
  font-size: 14px;
  font-weight: 800;
  text-align: right;
}

.detail-pay-comparison-row.total {
  background: #f8fafc;
}

.detail-pay-comparison-row.total strong {
  color: #0f766e;
  font-size: 16px;
}

.detail-pay-column-heading {
  text-align: right;
}


.detail-pay-compare-value.comparison-highlight {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 6px;
  background: #fef3c7 !important;
  color: #78350f !important;
  box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.35);
}

.detail-pay-comparison-metrics-row {
  align-items: stretch;
}

.detail-pay-metric-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 6px;
  min-width: 0;
}

.detail-pay-inline-metric {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  background: #f8fafc;
  text-align: right;
}

.detail-pay-inline-metric span {
  display: block;
  margin-bottom: 2px;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-pay-inline-metric strong {
  display: block;
  color: #111827;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.detail-pay-inline-metric.total {
  background: #ecfdf5;
  border-color: #99f6e4;
}

.detail-pay-inline-metric.total strong {
  color: #0f766e;
}

.detail-pay-inline-metric.comparison-highlight {
  background: #fef3c7 !important;
  border-color: #f59e0b !important;
  color: #78350f !important;
  box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.35);
}

.detail-pay-inline-metric.comparison-highlight span,
.detail-pay-inline-metric.comparison-highlight strong {
  color: #78350f !important;
}

.teacher-pay-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.teacher-pay-item {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 2fr;
  gap: 10px;
  align-items: stretch;
  padding: 9px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  background: #fff;
}

.teacher-pay-item:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.teacher-pay-item.muted {
  background: #f8fafc;
  color: #94a3b8;
}

.teacher-pay-partner {
  display: flex;
  align-items: center;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.teacher-pay-item.muted .teacher-pay-partner {
  color: #94a3b8;
}

.teacher-pay-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  gap: 6px;
}

.teacher-pay-metric {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  background: #f8fafc;
  text-align: right;
}

.teacher-pay-metric span {
  display: block;
  margin-bottom: 2px;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.teacher-pay-metric strong {
  display: block;
  color: #111827;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.teacher-pay-metric em {
  display: block;
  margin-top: 2px;
  color: #78716c;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
}

.teacher-pay-metric.total {
  background: #ecfdf5;
  border-color: #99f6e4;
}

.teacher-pay-metric.total strong {
  color: #0f766e;
}

.teacher-pay-item.muted .teacher-pay-metric {
  background: #f1f5f9;
  color: #94a3b8;
}

.teacher-pay-item.muted .teacher-pay-metric span,
.teacher-pay-item.muted .teacher-pay-metric strong,
.teacher-pay-item.muted .teacher-pay-metric em {
  color: #94a3b8;
}

.teacher-pay-metric.comparison-highlight {
  background: #fef3c7 !important;
  border-color: #f59e0b !important;
  color: #78350f !important;
  box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.35);
}

.teacher-pay-metric.comparison-highlight span,
.teacher-pay-metric.comparison-highlight strong,
.teacher-pay-metric.comparison-highlight em {
  color: #78350f !important;
}

.teacher-pay-total-item {
  background: #e2e8f0;
  border-color: #94a3b8;
  border-top-width: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.teacher-pay-total-item:hover {
  background: #dbe3ee;
  border-color: #64748b;
}

.teacher-pay-total-item .teacher-pay-partner {
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.teacher-pay-total-item .teacher-pay-metric {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.teacher-pay-total-item .teacher-pay-metric span {
  color: #475569;
}

.teacher-pay-total-item .teacher-pay-metric strong {
  color: #0f172a;
  font-size: 14px;
}

.teacher-pay-total-item .teacher-pay-metric.total {
  background: #ccfbf1;
  border-color: #5eead4;
}

.teacher-pay-total-item .teacher-pay-metric.total strong {
  color: #0f766e;
  font-size: 15px;
}

.teacher-pay-total-item .teacher-pay-metric.muted-rate {
  background: #e5e7eb;
  border-color: #cbd5e1;
}

.teacher-pay-total-item .teacher-pay-metric.muted-rate strong {
  color: #64748b;
}

.billing-summary-table {
  width: max-content;
  min-width: 100%;
  max-width: none;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.billing-summary-table th,
.billing-summary-table td {
  padding: 9px 10px;
  white-space: nowrap;
  text-align: right;
  border-right: 1px solid #b7bfc8;
  border-bottom: 1px solid #b7bfc8;
  font-size: 13px;
  font-weight: 700;
}

.billing-summary-table th:last-child,
.billing-summary-table td:last-child {
  border-right: none;
}

.billing-summary-table tbody tr:last-child th,
.billing-summary-table tbody tr:last-child td {
  border-bottom: none;
}

.billing-summary-table thead tr:first-child th {
  background: #e2e8f0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  border-bottom: 1px solid #cbd5e1;
}

.billing-summary-table thead tr:nth-child(2) th {
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.billing-summary-table thead th:first-child {
  background: #dbeafe;
  color: #1e3a8a;
  text-align: left;
}

.billing-summary-table .compact-header {
  min-width: 54px;
  max-width: 64px;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}

.billing-summary-table .billing-summary-total-row th,
.billing-summary-table .billing-summary-total-row td {
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 800;
  border-top: 2px solid #94a3b8;
}

.billing-summary-table .billing-summary-total-row td.muted-zero {
  color: #94a3b8;
  background: #f1f5f9;
}

.billing-summary-table .comparison-highlight,
.billing-summary-table td.comparison-highlight,
.billing-summary-table th.comparison-highlight,
.billing-summary-table td.muted-zero.comparison-highlight,
.billing-summary-table .billing-summary-total-row td.comparison-highlight,
.billing-summary-table .billing-summary-total-row th.comparison-highlight {
  background: #fef3c7 !important;
  color: #78350f !important;
  box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.35);
}

.billing-summary-table .comparison-highlight:hover,
.billing-summary-table td.comparison-highlight:hover,
.billing-summary-table th.comparison-highlight:hover,
.billing-summary-table tbody tr:hover .comparison-highlight {
  background: #fde68a !important;
  color: #78350f !important;
  box-shadow: inset 0 0 0 2px rgba(217, 119, 6, 0.48);
}

.billing-summary-table .partner-total-label {
  font-size: 8.5px;
  line-height: 1.0;
  white-space: normal;
  text-align: right;
  max-width: 54px;
}

.billing-summary-table .partner-total-hours {
  text-align: left;
}

.billing-summary-table .sticky-teacher-cell {
  position: sticky;
  left: 0;
  z-index: 4;
  width: 1%;
  min-width: max-content;
  background: #f8fafc;
  color: #111827;
  text-align: left;
  font-weight: 700;
  border-right: 2px solid #cbd5e1;
}

.billing-summary-table .sticky-teacher-header {
  position: sticky;
  left: 0;
  z-index: 5;
  width: 1%;
  min-width: max-content;
  background: #dbeafe;
  color: #1e3a8a;
}

.billing-summary-table tbody td {
  background: #fff;
  color: #0f172a;
}

.billing-summary-table tbody tr:hover th,
.billing-summary-table tbody tr:hover td {
  background: #eef6ff;
  border-top-color: #93c5fd;
  border-bottom-color: #93c5fd;
}

.billing-summary-table tbody tr:hover th {
  box-shadow: inset 0 1px 0 #93c5fd, inset 0 -1px 0 #93c5fd;
}

.billing-summary-table tbody tr:hover td {
  box-shadow: inset 0 1px 0 #93c5fd, inset 0 -1px 0 #93c5fd;
}

.billing-summary-table tbody tr:hover td:not(.muted-zero) {
  color: #0f172a;
  background: #dbeafe;
}

.billing-summary-table tbody tr:hover td.muted-zero {
  color: #94a3b8;
  background: #eef2f7;
}

.billing-summary-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}

.billing-summary-table .group-start {
  border-left: 1px solid #94a3b8;
}

.billing-summary-table td.muted-zero {
  color: #cbd5e1;
  background: #f8fafc;
  font-weight: 600;
}

@media (max-width: 700px) {
  .billing-summary-control-bar {
    align-items: stretch;
  }

  .billing-month-menu-wrapper,
  .billing-month-menu,
  .billing-month-menu .dropdown-menu-button {
    width: 100%;
  }

  .month-selector-form,
  .snapshot-action-form {
    width: 100%;
  }

  .month-selector-fields {
    width: 100%;
  }

  .month-selector-field {
    flex: 1;
  }

  .month-selector-field select,
  .month-selector-fields .action-button,
  .snapshot-action-form .action-button {
    width: 100%;
  }

  .snapshot-controls {
    width: 100%;
    margin-left: 0;
    align-items: stretch;
    flex-direction: column;
  }

  .snapshot-menu,
  .snapshot-menu .dropdown-menu-button,
  .compare-menu,
  .compare-menu .dropdown-menu-button,
  .snapshot-action-form,
  .snapshot-action-form .action-button {
    width: 100%;
    max-width: none;
  }

  .detail-modal {
    align-items: stretch;
    padding: 12px;
  }

  .detail-modal-panel {
    width: 100%;
    max-height: calc(100vh - 24px);
  }

  .detail-modal-header {
    padding: 14px;
  }

  .detail-modal-body {
    padding: 14px;
  }

  .detail-export-row {
    justify-content: stretch;
  }

  .detail-export-button {
    width: 100%;
  }

  .detail-log-main {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .detail-log-main span {
    text-align: left;
  }

  .detail-pay-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .detail-pay-row strong {
    text-align: left;
  }

  .detail-pay-comparison-header {
    display: none;
  }

  .detail-pay-comparison-row,
  .detail-pay-comparison-card.has-compare .detail-pay-comparison-row {
    grid-template-columns: 1fr;
    gap: 5px;
    align-items: flex-start;
  }

  .detail-pay-comparison-row strong,
  .detail-pay-column-heading {
    text-align: left;
  }

  .detail-pay-compare-value::before {
    content: "Compared: ";
    color: #92400e;
    font-size: 12px;
    font-weight: 800;
  }

  .detail-pay-metric-stack {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .detail-pay-inline-metric {
    text-align: left;
  }

  .teacher-pay-item {
    grid-template-columns: 1fr;
  }

  .teacher-pay-metrics {
    grid-template-columns: 1fr;
  }

  .teacher-pay-metric {
    text-align: left;
  }

  .personal-billing-summary-grid {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .personal-billing-list {
    max-width: none;
  }

  .personal-billing-row {
    grid-template-columns: 1fr;
  }

  .personal-billing-metric {
    align-items: flex-start;
    text-align: left;
  }
}