/* Staff dashboard shortcode [dessm_staff_dashboard] */
.dessm-sd-wrap {
  max-width: 1200px;
}

.dessm-sd-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 20px;
  border-bottom: 1px solid #c3c4c7;
  padding-bottom: 8px;
}

.dessm-sd-tab {
  padding: 8px 14px;
  border: 1px solid transparent;
  background: #f0f0f1;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  font-size: 14px;
}

.dessm-sd-tab.is-active {
  background: #fff;
  border-color: #c3c4c7;
  border-bottom-color: #fff;
  margin-bottom: -9px;
  font-weight: 600;
}

.dessm-sd-panel h3 {
  margin-top: 0;
}

.dessm-sd-table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}

.dessm-sd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.dessm-sd-table th,
.dessm-sd-table td {
  border: 1px solid #c3c4c7;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

/* Theme overrides often set light text on th — force readable headers (Entries + Leaderboard) */
.dessm-sd-wrap .dessm-sd-table thead th {
  color: #1d2327 !important;
  background: #dcdcde !important;
  border-color: #8c8f94 !important;
  font-weight: 600;
}

.dessm-sd-table-wrap .dessm-btn {
  padding: 4px 10px;
  font-size: 12px;
}

.dessm-sd-empty {
  color: #646970;
  font-style: italic;
}

/* Modal */
.dessm-sd-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
}

.dessm-sd-modal[hidden] {
  display: none !important;
}

.dessm-sd-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.dessm-sd-modal__box {
  position: relative;
  background: #fff;
  max-width: 520px;
  width: 100%;
  padding: 20px 24px;
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  margin-top: 40px;
}

.dessm-sd-modal__box h3 {
  margin-top: 0;
  color: #1d2327 !important;
}

/* Theme / dark global styles often make labels white on white — force readable labels */
.dessm-sd-modal__box .dessm-sd-modal__fields label {
  display: block;
  color: #1d2327 !important;
  -webkit-text-fill-color: #1d2327 !important;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
}

.dessm-sd-modal__fields input.large-text {
  width: 100%;
  max-width: 100%;
}

.dessm-sd-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.dessm-sd-off {
  padding: 12px;
  background: #fcf0f1;
  border-left: 4px solid #d63638;
}

.dessm-sd-picks-wrap {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #c3c4c7;
}

/* Theme dark styles often leak into the modal — force readable contrast */
.dessm-sd-modal__box .dessm-sd-picks-wrap h4 {
  margin: 0 0 8px;
  font-size: 1em;
  color: #1d2327 !important;
  font-weight: 600;
}

.dessm-sd-e-picks-scroll {
  max-height: 240px;
  overflow: auto;
  border: 1px solid #8c8f94;
  border-radius: 4px;
  background: #fff !important;
  color: #1d2327 !important;
}

.dessm-sd-picks-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: #1d2327 !important;
  background: #fff !important;
}

.dessm-sd-picks-table th,
.dessm-sd-picks-table td {
  border: 1px solid #c3c4c7;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  color: #1d2327 !important;
  background: #fff !important;
  -webkit-text-fill-color: #1d2327 !important;
}

.dessm-sd-picks-table thead th {
  background: #dcdcde !important;
  color: #1d2327 !important;
  font-weight: 700 !important;
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 1px 0 #8c8f94;
}

.dessm-sd-picks-table tbody tr:nth-child(even) td {
  background: #f0f0f1 !important;
}

.dessm-sd-picks-table code {
  font-size: 12px;
  color: #0a4b78 !important;
  background: rgba(0, 0, 0, 0.04) !important;
  padding: 2px 5px;
  border-radius: 3px;
  -webkit-text-fill-color: #0a4b78 !important;
}

/* Instant manual lock (DB) — red locked / green unlocked */
.dessm-sd-wrap .dessm-manual-lock-btn {
  display: inline-block;
  margin: 0 0 6px;
  padding: 5px 12px;
  border: none;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  line-height: 1.2;
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.dessm-sd-wrap .dessm-manual-lock-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.dessm-sd-wrap .dessm-manual-lock-btn.is-locked {
  background: #b91c1c;
  box-shadow: inset 0 0 0 1px rgba(254, 202, 202, 0.35);
}

.dessm-sd-wrap .dessm-manual-lock-btn.is-unlocked {
  background: #15803d;
  box-shadow: inset 0 0 0 1px rgba(187, 247, 208, 0.35);
}
