.todo-trigger {
  position: relative;
  background: #f8fbff;
  border-color: #c9d8ed;
}
.todo-bell { font-size: 14px; line-height: 1; }
.todo-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e5484d;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.todo-badge.empty { background: #94a3b8; }
.todo-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 240;
  background: rgba(15, 23, 42, 0);
  pointer-events: none;
  transition: background .18s ease;
}
.todo-drawer-backdrop.show {
  background: rgba(15, 23, 42, .26);
  pointer-events: auto;
}
.todo-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(620px, 96vw);
  height: 100%;
  background: #f8fafc;
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 42px rgba(15, 23, 42, .14);
  transform: translateX(102%);
  transition: transform .2s ease;
  display: flex;
  flex-direction: column;
}
.todo-drawer-backdrop.show .todo-drawer { transform: translateX(0); }
.todo-drawer-header,
.todo-drawer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.todo-drawer-toolbar { padding-block: 10px; }
.todo-filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 12px 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.todo-filter-panel > label:not(.todo-customer-id-toggle) {
  display: grid;
  gap: 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}
.todo-filter-panel select {
  width: 100%;
  height: 36px;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 32px 0 10px;
  background: #fff;
  color: #1e293b;
}
.todo-customer-id-toggle {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.todo-customer-id-toggle input { margin: 0; }
.todo-list { overflow-y: auto; padding: 14px; }
.todo-group { margin-bottom: 16px; }
.todo-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  margin: 0 2px 8px;
}
.todo-group-title span:last-child {
  color: var(--muted);
  font-weight: 700;
}
.todo-vendor-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 2px 7px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #eef6ff;
  color: #1d4f91;
  font-size: 12px;
  font-weight: 800;
}
.todo-vendor-title:first-of-type { margin-top: 0; }
.todo-vendor-title span:last-child { color: #6681a6; }
.todo-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .035);
}
.todo-item.high { border-left: 3px solid #e99b18; }
.todo-production-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 176px;
  align-items: stretch;
  gap: 12px;
}
.todo-item-content { min-width: 0; }
.todo-production-sheet {
  width: 176px;
  min-height: 112px;
  padding: 5px;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
  cursor: default;
}
.todo-production-sheet img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 132px;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
}
.todo-production-sheet.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #64748b;
  cursor: default;
}
.todo-production-sheet.empty span { font-size: 12px; font-weight: 800; }
.todo-production-sheet.empty small { font-size: 11px; }
.todo-shipping-group .todo-group-title { color: #8a5b00; }
.todo-item-head,
.todo-item-footer,
.todo-followup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.todo-item-head strong { color: #18243a; }
.todo-due { color: #b45309; font-size: 12px; font-weight: 700; white-space: nowrap; }
.todo-subtitle { color: var(--muted); font-size: 12px; margin: 4px 0 9px; overflow-wrap: anywhere; }
.todo-stage-time { color: #64748b; font-size: 12px; margin: -3px 0 9px; }
.todo-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.todo-tag,
.priority-marker {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 7px;
  background: #fff7df;
  color: #8a5b00;
  font-size: 11px;
  font-weight: 700;
}
.todo-followup-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px auto;
  margin-top: 9px;
}
.todo-followup-row input {
  width: 100%;
  min-width: 0;
  height: 30px;
  border: 1px solid #d3dce9;
  border-radius: 7px;
  padding: 5px 8px;
}
.todo-followup-row select {
  width: 88px;
  height: 30px;
  border: 1px solid #d3dce9;
  border-radius: 7px;
  padding: 4px 6px;
  background: #fff;
  color: #334155;
}
.todo-followup-row .btn { flex: 0 0 auto; }
@media (max-width: 560px) {
  .todo-production-layout { grid-template-columns: minmax(0, 1fr); }
  .todo-production-sheet { width: 176px; min-height: 112px; justify-self: end; }
  .todo-production-sheet img { max-height: 132px; }
  .todo-followup-row { grid-template-columns: minmax(0, 1fr) 86px; }
  .todo-followup-row .btn { grid-column: 1 / -1; width: 100%; }
}
.todo-empty {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  text-align: center;
}
.todo-empty strong { color: #334155; }
.todo-more { color: var(--muted); font-size: 12px; text-align: center; padding: 6px; }
.todo-filter-empty {
  padding: 24px 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, .7);
}
.priority-cell { display: grid; gap: 4px; justify-items: start; }
.priority-cell select { width: 104px; min-height: 30px; font-size: 12px; }
.priority-marker { background: #fff0d5; color: #a15c00; }
.recycle-modal { width: min(1160px, 96vw); }
.recycle-filter-row { grid-template-columns: minmax(180px, 260px) auto auto; justify-content: start; }
.recycle-purge-panel {
  margin-top: 14px;
  border: 1px solid #f0b5b7;
  background: #fff8f8;
  border-radius: var(--radius);
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 320px) auto;
  align-items: end;
  gap: 12px;
}
.recycle-purge-panel[hidden] { display: none; }
.recycle-purge-panel .actions { margin: 0; flex-wrap: nowrap; }

@media (max-width: 900px) {
  .todo-trigger > span:nth-child(2) { display: none; }
  .recycle-purge-panel { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .todo-filter-panel { grid-template-columns: 1fr 1fr; }
  .todo-customer-id-toggle { grid-column: 1 / -1; justify-content: center; }
}
