.view-salary-admin {
  position: relative;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: #f2f2f7;
}

.sa-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border-bottom: 1px solid #e5e5ea;
  flex-shrink: 0;
}

.sa-title { font-size: 17px; font-weight: 700; color: #1c1c1e; }

.sa-filter-bar {
  background: #fff;
  padding: 12px 14px;
  border-bottom: 1px solid #e5e5ea;
  flex-shrink: 0;
}

.sa-row-one {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.sa-preset-tabs {
  display: flex;
  background: #f2f2f7;
  border-radius: 8px;
  padding: 2px;
}

.sa-tab {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 800;
  color: #8e8e93;
  border-radius: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.sa-tab.active {
  background: #fff;
  color: #007aff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.sa-daily-box { display: flex; align-items: center; gap: 6px; }
.sa-p-label { font-size: 11px; color: #8e8e93; font-weight: 800; }
.sa-date-link {
  font-size: 12px;
  font-weight: 800;
  background: #f8f8f9;
  padding: 3px 8px;
  border-radius: 6px;
  color: #007aff;
  border: none;
}
.sa-panel-label { font-size: 10px; color: #aeaeab; font-weight: 800; }

.sa-row-two {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.sa-range-label { font-size: 12px; color: #8e8e93; font-weight: 800; margin-right: 8px; }

.sa-date-range {
  display: flex;
  align-items: center;
  background: #f8f8f9;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid #e5e5ea;
  gap: 6px;
}

.sa-date-range input {
  font-size: 13px;
  font-weight: 800;
  color: #1c1c1e;
  border: none;
  background: transparent;
}

.sa-row-three {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sa-btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

.sa-op-btn {
  font-size: 12px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

.sa-op-btn.save { background: #1c1c1e; color: #fff; }
.sa-op-btn.setting { background: #f2f2f7; color: #8e8e93; }
.sa-op-btn.landscape { background: #e5f1ff; color: #007aff; }

.sa-refresh-btn {
  font-size: 22px;
  color: #007aff;
  font-weight: bold;
  border: none;
  background: transparent;
  cursor: pointer;
}

.sa-main-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sa-table-area {
  width: 100%;
  max-height: 320px;
  overflow: auto;
  background: #fff;
  border-bottom: 1px solid #e5e5ea;
}

.sa-table-area.landscape-mode {
  max-height: none;
  min-height: 240px;
}

.sa-table-wrap { min-width: max-content; padding: 6px; }

.sa-table {
  display: table;
  border-collapse: collapse;
  border: 1px solid #eee;
  border-radius: 6px;
  table-layout: auto;
}

.sa-tr { display: table-row; min-height: 40px; }
.sa-td {
  display: table-cell;
  vertical-align: middle;
  padding: 6px 8px;
  font-size: 12px;
  border-right: 1px solid #f0f0f0;
  border-bottom: 1px solid #f5f5f5;
  text-align: center;
  white-space: nowrap;
}

.sa-td.flex-col {
  text-align: left !important;
  padding-left: 10px !important;
  white-space: normal;
  min-width: 120px;
}

.sa-header-dark { background: #1c1c1e !important; color: #fff !important; }
.sa-header-orange { background: #ff9500 !important; color: #fff !important; }

.sa-num { font-weight: 800; font-size: 13px; display: block; }
.sa-num.comp-up { color: #34c759; }
.sa-num.comp-down { color: #ff3b30; }

.sa-cell-detail {
  display: block;
  font-size: 10px;
  color: #8e8e93;
  white-space: pre-wrap;
  text-align: left;
  line-height: 1.3;
  margin-top: 2px;
  word-break: break-all;
}

.sa-sticky-col {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 100px;
  font-weight: 800;
  background: inherit;
  border-right: 2px solid #ddd !important;
  text-align: left;
  padding-left: 8px;
}

.sa-company-col { background: #f8faff; color: #007aff; font-weight: 800; }

.sa-table-divider {
  padding: 8px;
  font-size: 11px;
  color: #aeaeab;
  text-align: center;
  background: #f2f2f7;
  font-weight: 800;
  border-top: 2px solid #e5e5ea;
  border-bottom: 2px solid #e5e5ea;
}

.sa-role-group { margin-bottom: 18px; }

.sa-role-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px 10px;
}

.sa-role-title {
  font-size: 15px;
  font-weight: 800;
  color: #1c1c1e;
}

.sa-role-meta {
  font-size: 12px;
  color: #8e8e93;
  font-weight: 600;
}

.sa-role-tag {
  font-size: 10px;
  color: #007aff;
  font-weight: 700;
  background: #e5f1ff;
  padding: 1px 6px;
  border-radius: 4px;
}

.sa-est-label {
  font-size: 10px;
  color: #8e8e93;
  font-weight: 700;
  margin-right: 2px;
}

.sa-conv-mini {
  margin: 0 12px 12px;
  padding: 12px;
  background: #f8faff;
  border-radius: 12px;
  border: 0.5px solid rgba(0, 122, 255, 0.12);
}

.sa-conv-mini-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.sa-conv-mini-title {
  font-size: 12px;
  font-weight: 800;
  color: #1c1c1e;
}

.sa-conv-mini-sub { font-size: 11px; color: #8e8e93; }

.sa-conv-mini-hero { margin-bottom: 8px; }

.sa-conv-mini-rate {
  font-size: 24px;
  font-weight: 800;
  color: #007aff;
  line-height: 1;
  margin-right: 8px;
}

.sa-conv-mini-label { font-size: 12px; color: #636366; }

.sa-conv-mini-rows {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.sa-conv-mini-item {
  font-size: 12px;
  color: #3a3a3c;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sa-conv-mini-item .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.sa-conv-mini-item .dot.sourcing { background: #ff9500; }
.sa-conv-mini-item .dot.inspection { background: #34c759; }
.sa-conv-mini-item .dot.consulting { background: #5856d6; }

.sa-card-area { padding: 14px 10px 24px; }

.sa-area-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #aeaeab;
  font-weight: 800;
  margin-bottom: 10px;
  padding: 0 6px;
  cursor: pointer;
}

.sa-card {
  background: #fff;
  border-radius: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  overflow: hidden;
}

.sa-card-main {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.sa-sales-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.sa-name-row { display: flex; align-items: center; gap: 8px; }
.sa-sales-name { font-size: 20px; font-weight: 800; color: #1c1c1e; }
.sa-month-tag {
  font-size: 10px;
  color: #8e8e93;
  font-weight: 600;
  background: #f2f2f7;
  padding: 1px 6px;
  border-radius: 4px;
}
.sa-quick-summary { display: flex; gap: 10px; }
.sa-qs-item { font-size: 14px; color: #8e8e93; font-weight: 600; }

.sa-total-amount { display: flex; align-items: baseline; gap: 2px; }
.sa-total-amount .symbol { font-size: 12px; color: #ff9500; font-weight: 800; }
.sa-total-amount .val { font-size: 30px; color: #ff9500; font-weight: 900; }
.sa-arrow { font-size: 11px; color: #c7c7cc; margin-left: 6px; }

.sa-card-detail { padding: 0 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.sa-detail-section { border-radius: 10px; padding: 12px; }
.sa-base-bg { background: #f2f2f7; }
.sa-insp-bg { background: #f0f7ff; border-left: 3px solid #007aff; }
.sa-sour-bg { background: #fff9f0; border-left: 3px solid #ff9500; }
.sa-cons-bg { background: #f6f5ff; border-left: 3px solid #5856d6; }

.sa-section-tag { font-size: 12px; font-weight: 800; margin-bottom: 8px; }
.sa-detail-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; gap: 8px; }
.sa-d-label { font-size: 13px; color: #3a3a3c; }
.sa-d-val { font-size: 12px; font-weight: 700; color: #1c1c1e; flex-shrink: 0; }
.sa-sub-item { margin-bottom: 10px; cursor: pointer; }
.sa-d-info { flex: 1; min-width: 0; }
.sa-d-sub { font-size: 11px; color: #8e8e93; padding-left: 12px; display: block; margin-top: 2px; }

.sa-subtotal {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(0,0,0,0.05);
  text-align: right;
  font-size: 12px;
  font-weight: 800;
}

.sa-reward-row { margin-top: 6px; padding-top: 6px; border-top: 1px dashed rgba(255,149,0,0.3); }
.sa-reward-label { font-size: 12px; color: #d46b08; font-weight: 800; }
.sa-reward-val { font-size: 13px; color: #ff3b30; font-weight: 900; }

.sa-total-footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 2px solid #f2f2f7;
  display: flex;
  justify-content: space-between;
}

.sa-loading, .sa-empty {
  padding: 40px;
  text-align: center;
  color: #8e8e93;
}

.sa-inline-loading {
  padding: 20px;
  font-size: 13px;
}

.sa-inspector-fail {
  padding: 16px;
  font-size: 13px;
  color: #8e8e93;
}

.sa-card-pending {
  margin: 0 16px 10px;
  padding: 8px 10px;
  background: #fff9f0;
  border-radius: 8px;
  font-size: 12px;
  color: #d46b08;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sa-card-pending-state {
  border: 1px dashed rgba(255, 149, 0, 0.35);
}

.sa-retry-btn {
  border: none;
  background: #ff9500;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
}

.sa-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.sa-modal-overlay[hidden] {
  display: none !important;
}

.sa-config-modal {
  background: #fff;
  width: 100%;
  max-width: 480px;
  border-radius: 20px 20px 0 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  max-height: min(85dvh, 100%);
  overflow: hidden;
}

.sa-config-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 16px 8px;
  -webkit-overflow-scrolling: touch;
}

.sa-config-modal .sa-close-btn {
  flex-shrink: 0;
  margin: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
}

.sa-group-title {
  font-size: 12px;
  font-weight: 800;
  color: #8e8e93;
  margin-bottom: 10px;
  padding-left: 6px;
}

.sa-tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.sa-tag-btn {
  padding: 8px 14px;
  background: #f2f2f7;
  border-radius: 18px;
  font-size: 12px;
  color: #8e8e93;
  font-weight: 800;
  border: none;
  cursor: pointer;
}

.sa-tag-btn.on { background: #ebf5ff; color: #007aff; }

.sa-close-btn {
  background: #1c1c1e;
  color: #fff;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  margin-top: 16px;
  border: none;
  width: 100%;
  cursor: pointer;
}

.sa-hidden-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
