/* Workbench extension: employee dashboard priority order + daily notes. */
.wb-dashboard.wb-ext-employee {
  display: flex;
  flex-direction: column;
}
.wb-dashboard.wb-ext-employee > .wb-dashboard-heading { order: 0; }
.wb-dashboard.wb-ext-employee > .wb-task-home { order: 1; margin-bottom: 16px; }
.wb-dashboard.wb-ext-employee > .wb-dw { order: 2; }
.wb-dashboard.wb-ext-employee > .wb-operations-core { order: 3; }
.wb-dashboard.wb-ext-employee > * { order: 4; }

/* On the employee dashboard, make the third section lead with its alerts. */
.wb-dashboard.wb-ext-employee .wb-operations-core {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.wb-dashboard.wb-ext-employee .wb-operations-core > .wb-operations-load-error { order: 0; }
.wb-dashboard.wb-ext-employee .wb-operations-core > .wb-patrol-alert-panel { order: 1; }
.wb-dashboard.wb-ext-employee .wb-operations-core > .wb-profit-alert-panel { order: 2; }
.wb-dashboard.wb-ext-employee .wb-operations-core > .wb-operations-main-grid {
  order: 3;
  margin-bottom: 0;
}

.wb-ext-notes {
  margin-top: 2px;
  border: 1px solid #dbe7df;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdfc 0%, #ffffff 44%);
  padding: 18px 20px 16px;
  box-shadow: 0 5px 18px rgba(35, 72, 51, 0.045);
  min-width: 0;
}
.wb-ext-notes-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.wb-ext-notes-title {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-width: 0;
}
.wb-ext-notes-mark {
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #e5f1e9;
  color: #2f6b4f;
  font-size: 14px;
  font-weight: 700;
}
.wb-ext-notes-kicker {
  margin: 1px 0 3px;
  color: #7b9182;
  font-size: 9.5px;
  line-height: 1.4;
  letter-spacing: 0.12em;
}
.wb-ext-notes h3 {
  margin: 0;
  color: #213b2c;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.wb-ext-notes-sub {
  margin: 4px 0 0;
  color: #7e9185;
  font-size: 11px;
  line-height: 1.65;
}
.wb-ext-notes-side {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.wb-ext-notes-date {
  padding: 4px 8px;
  border: 1px solid #dbe7df;
  border-radius: 6px;
  background: #f6faf7;
  color: #5b7564;
  font-size: 10px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.wb-ext-notes-refresh {
  width: 26px;
  height: 26px;
  border: 1px solid #dbe7df;
  border-radius: 6px;
  background: #fff;
  color: #6f8577;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.wb-ext-notes-refresh:hover { background: #f4f9f5; color: #2f6b4f; }
.wb-ext-notes-refresh:disabled { opacity: 0.45; cursor: default; }

.wb-ext-notes-add {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.wb-ext-notes-input {
  flex: 1;
  min-width: 0;
  height: 37px;
  box-sizing: border-box;
  padding: 0 11px;
  border: 1px solid #d7e4da;
  border-radius: 7px;
  background: #fff;
  color: #243a2e;
  font: inherit;
  font-size: 12.5px;
  outline: none;
}
.wb-ext-notes-input::placeholder { color: #9eada2; }
.wb-ext-notes-input:focus {
  border-color: #79a98a;
  box-shadow: 0 0 0 3px rgba(79, 132, 97, 0.11);
}
.wb-ext-notes-addbtn {
  height: 37px;
  flex: 0 0 auto;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  background: #2f6b4f;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.wb-ext-notes-addbtn:hover { background: #24563f; }
.wb-ext-notes-addbtn:disabled { opacity: 0.45; cursor: not-allowed; }
.wb-ext-notes-status {
  min-height: 16px;
  margin: 6px 0 0;
  color: #7e9185;
  font-size: 10.5px;
  line-height: 1.5;
}
.wb-ext-notes-status.is-error { color: #b14542; }
.wb-ext-notes-list {
  display: flex;
  flex-direction: column;
  margin-top: 9px;
  max-height: 360px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.wb-ext-note-group { padding-top: 5px; }
.wb-ext-note-group + .wb-ext-note-group { margin-top: 3px; }
.wb-ext-note-group-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 2px 5px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #e9f0eb;
}
.wb-ext-channel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: #9aa99f;
}
.wb-ext-channel-dot.channel-京喜 { background: #d97706; }
.wb-ext-channel-dot.channel-拼多多 { background: #dc2626; }
.wb-ext-channel-dot.channel-新希望 { background: #2563eb; }
.wb-ext-channel-dot.channel-潮香村 { background: #0f766e; }
.wb-ext-channel-dot.channel-其他 { background: #94a3b8; }
.wb-ext-note-group-title {
  color: #3d5b48;
  font-size: 10.5px;
  font-weight: 650;
}
.wb-ext-note-group-count {
  color: #9aa99f;
  font-size: 9.5px;
}
.wb-ext-note-channel {
  width: auto;
  max-width: 74px;
  margin-left: 2px;
  padding: 1px 3px;
  border: 1px solid #e1eae4;
  border-radius: 4px;
  background: #fff;
  color: #789082;
  font: inherit;
  font-size: 9.5px;
  line-height: 16px;
  outline: none;
  cursor: pointer;
}
.wb-ext-note-channel:disabled { opacity: 0.55; cursor: default; }
.wb-ext-note-channel:focus { border-color: #79a98a; }
.wb-ext-note {
  display: grid;
  grid-template-columns: 19px minmax(0, 1fr) auto;
  align-items: start;
  gap: 9px;
  padding: 9px 0;
  border-top: 1px solid #edf3ee;
}
.wb-ext-note:first-child { border-top: 0; }
.wb-ext-note-check {
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
  accent-color: #3d7c5a;
  cursor: pointer;
}
.wb-ext-note-main { min-width: 0; }
.wb-ext-note-content {
  color: #2e4638;
  font-size: 12.5px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.wb-ext-note.is-done .wb-ext-note-content {
  color: #8b9a91;
  text-decoration: line-through;
  text-decoration-color: #b4c5ba;
}
.wb-ext-note-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 2px;
  color: #9aa99f;
  font-size: 9.5px;
  line-height: 1.4;
}
.wb-ext-note-delete {
  width: 23px;
  height: 23px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #a5b3aa;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.wb-ext-note-delete:hover { color: #b14542; background: #fdf3f2; }
.wb-ext-note-empty {
  margin: 4px 0 0;
  padding: 19px 12px;
  border: 1px dashed #dbe7df;
  border-radius: 8px;
  color: #93a398;
  font-size: 11.5px;
  line-height: 1.7;
  text-align: center;
}
.wb-ext-notes.is-readonly .wb-ext-notes-add { display: none; }
.wb-ext-notes-readonly {
  margin: 10px 0 0;
  padding: 7px 10px;
  border: 1px solid #e9e2cf;
  border-radius: 6px;
  background: #fffbf1;
  color: #8b6b33;
  font-size: 10.5px;
  line-height: 1.55;
}
.wb-ext-notes.is-busy { opacity: 0.72; }

.wb-ext-delete-user {
  height: 32px;
  padding: 0 10px;
  border: 1px solid #f1b7b3;
  border-radius: 6px;
  background: #fff;
  color: #b42318;
  font: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}
.wb-ext-delete-user:hover {
  background: #fef3f2;
  border-color: #e89a94;
}
.wb-ext-delete-user:disabled {
  opacity: 0.55;
  cursor: default;
}

/* Daily memo: one editable paragraph + keyword/date search. */
.wb-memo {
  margin-top: 2px;
  border: 1px solid #dbe7df;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdfc 0%, #ffffff 44%);
  padding: 18px 20px 16px;
  box-shadow: 0 5px 18px rgba(35, 72, 51, 0.045);
  min-width: 0;
}
.wb-memo-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.wb-memo-title { display: flex; align-items: flex-start; gap: 11px; min-width: 0; }
.wb-memo-mark {
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #e5f1e9;
  color: #2f6b4f;
  font-size: 14px;
  font-weight: 700;
}
.wb-memo-kicker {
  margin: 1px 0 3px;
  color: #7b9182;
  font-size: 9.5px;
  line-height: 1.4;
  letter-spacing: 0.12em;
}
.wb-memo h3 { margin: 0; color: #213b2c; font-size: 15px; font-weight: 650; }
.wb-memo-title p { margin: 4px 0 0; color: #7e9185; font-size: 11px; line-height: 1.65; }
.wb-memo-side { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.wb-memo-date {
  padding: 4px 8px;
  border: 1px solid #dbe7df;
  border-radius: 6px;
  background: #f6faf7;
  color: #5b7564;
  font-size: 10px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.wb-memo-refresh {
  width: 26px;
  height: 26px;
  border: 1px solid #dbe7df;
  border-radius: 6px;
  background: #fff;
  color: #6f8577;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.wb-memo-refresh:hover { background: #f4f9f5; color: #2f6b4f; }
.wb-memo-textarea {
  display: block;
  width: 100%;
  min-height: 94px;
  box-sizing: border-box;
  margin-top: 13px;
  padding: 10px 11px;
  border: 1px solid #d7e4da;
  border-radius: 7px;
  background: #fff;
  color: #243a2e;
  font: inherit;
  font-size: 12.5px;
  line-height: 1.7;
  resize: vertical;
  outline: none;
}
.wb-memo-textarea::placeholder { color: #9eada2; }
.wb-memo-textarea:focus { border-color: #79a98a; box-shadow: 0 0 0 3px rgba(79, 132, 97, 0.11); }
.wb-memo-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
}
.wb-memo-status { color: #7e9185; font-size: 10.5px; line-height: 1.5; min-height: 16px; }
.wb-memo-status.is-error { color: #b14542; }
.wb-memo-save {
  height: 32px;
  flex: 0 0 auto;
  padding: 0 15px;
  border: 0;
  border-radius: 6px;
  background: #2f6b4f;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.wb-memo-save:hover { background: #24563f; }
.wb-memo-save:disabled { opacity: 0.45; cursor: default; }
.wb-memo-readonly {
  margin: 9px 0 0;
  padding: 7px 10px;
  border: 1px solid #e9e2cf;
  border-radius: 6px;
  background: #fffbf1;
  color: #8b6b33;
  font-size: 10.5px;
  line-height: 1.55;
}
.wb-memo-search { margin-top: 15px; padding-top: 12px; border-top: 1px solid #eaf1ec; }
.wb-memo-search-title { color: #60786a; font-size: 10.5px; font-weight: 650; margin-bottom: 7px; }
.wb-memo-search-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.wb-memo-q, .wb-memo-sdate {
  height: 32px;
  box-sizing: border-box;
  padding: 0 9px;
  border: 1px solid #d7e4da;
  border-radius: 6px;
  background: #fff;
  color: #2e4638;
  font: inherit;
  font-size: 11.5px;
  outline: none;
}
.wb-memo-q { flex: 1 1 240px; min-width: 0; }
.wb-memo-sdate { flex: 0 0 auto; color: #6f8577; }
.wb-memo-searchbtn, .wb-memo-clear {
  height: 32px;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 1px solid #d7e4da;
  border-radius: 6px;
  background: #f7fbf8;
  color: #3d6b4f;
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
}
.wb-memo-searchbtn:hover, .wb-memo-clear:hover { background: #edf6f0; border-color: #b9d5c2; }
.wb-memo-results { margin-top: 8px; display: flex; flex-direction: column; max-height: 260px; overflow-y: auto; }
.wb-memo-result {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 6px;
  border: 0;
  border-top: 1px solid #edf3ee;
  background: transparent;
  color: #36503f;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.wb-memo-result:first-child { border-top: 0; }
.wb-memo-result:hover { background: #f6faf7; }
.wb-memo-result-date {
  color: #6f8577;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.wb-memo-result-text {
  color: #3b5544;
  font-size: 11.5px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.wb-memo-empty {
  margin: 3px 0 0;
  padding: 16px 10px;
  border: 1px dashed #dbe7df;
  border-radius: 7px;
  color: #93a398;
  font-size: 11px;
  text-align: center;
}
.wb-memo.is-readonly .wb-memo-textarea { background: #f8faf8; color: #5f7466; }
@media (max-width: 640px) {
  .wb-memo { padding: 15px 14px 13px; }
  .wb-memo-title p { font-size: 10.5px; }
  .wb-memo-side { flex-direction: column; align-items: flex-end; gap: 5px; }
  .wb-memo-result { grid-template-columns: 68px minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .wb-ext-notes { padding: 15px 14px 13px; }
  .wb-ext-notes-head { gap: 8px; }
  .wb-ext-notes-side { flex-direction: column; align-items: flex-end; gap: 5px; }
  .wb-ext-notes-sub { font-size: 10.5px; }
  .wb-ext-notes-add { align-items: stretch; }
  .wb-ext-notes-input { height: 36px; font-size: 12px; }
  .wb-ext-notes-addbtn { height: 36px; padding: 0 11px; }
}
