.planner-work-orders {
  min-width: 0;
  max-width: 100%;
  --po-green: #23c483;
  --po-red: #f05264;
}
.po-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.po-head-actions button,
.planner-work-orders button:not(.routine-day) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.po-toolbar,
.po-toolbar > div,
.po-order-top,
.po-order-meta,
.po-order-actions,
.po-day-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.po-toolbar {
  justify-content: space-between;
  margin: 18px 0;
}
.po-private,
.po-note {
  color: var(--muted);
  font-size: 13px;
}
.po-private {
  display: flex;
  align-items: center;
  gap: 8px;
}
.po-panel {
  margin-top: 18px;
}
.po-panel .routine-head {
  gap: 18px;
}
.po-panel h2 {
  font-size: 22px;
  margin: 6px 0;
}
.po-panel .routine-head p,
.po-month .routine-range p {
  color: var(--muted);
  margin: 6px 0;
}
.po-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}
.po-filters button {
  font-size: 13px;
  min-height: 38px;
}
.po-day-progress {
  margin-bottom: 22px;
}
.po-day-progress > .track {
  flex: 1;
  min-width: 100px;
}
.po-day-progress b {
  font-size: 13px;
  white-space: nowrap;
}
.po-list {
  display: grid;
  gap: 12px;
}
.po-order {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface2);
}
.po-order-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #1494da20;
  color: var(--primary);
  display: grid;
  place-items: center;
}
.po-order-icon svg {
  width: 25px;
  height: 25px;
}
.po-done .po-order-icon {
  color: var(--po-green);
  background: #23c48320;
}
.po-order-icon.po-warning {
  color: var(--po-red);
  background: #f0526420;
}
.po-order h3 {
  font-size: 17px;
  line-height: 1.4;
  margin: 10px 0 5px;
  overflow-wrap: anywhere;
}
.po-order-content {
  min-width: 0;
}
.po-order-content p {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}
.po-order-top > b {
  color: var(--primary);
  font-size: 14px;
}
.po-status,
.po-safety {
  border-radius: 20px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}
.po-status {
  background: #1494da20;
  color: var(--primary);
}
.po-status.completed {
  background: #23c48320;
  color: var(--po-green);
}
.po-status.missed {
  background: #f0526420;
  color: var(--po-red);
}
.po-safety {
  background: #ffc34920;
  color: #eeb448;
  display: flex;
  gap: 5px;
  align-items: center;
}
.po-order-meta {
  font-size: 12px;
  color: var(--muted);
}
.po-order-meta > span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.po-order-meta svg,
.po-safety svg,
.po-private svg {
  width: 17px;
  height: 17px;
}
.po-order-actions {
  flex-direction: column;
  align-items: stretch;
  min-width: 136px;
}
.po-order-actions button {
  justify-content: center;
}
.po-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 13px;
}
.po-progress .track {
  flex: 1;
}
.po-progress span {
  font-size: 12px;
  white-space: nowrap;
}
.po-progress .fill,
.po-day-progress .fill {
  background: var(--po-green);
}
.po-empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
}
.po-empty > span svg {
  width: 38px;
  height: 38px;
  color: var(--primary);
}
.po-empty h3 {
  color: var(--ink);
}
.po-note {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 24px;
  line-height: 1.6;
}
.po-error {
  color: var(--po-red);
}
.po-green {
  color: var(--po-green) !important;
}
.po-red {
  color: var(--po-red) !important;
}
.po-today b {
  color: var(--primary);
}
.po-month .routine-month-status p {
  line-height: 1.6;
}
.po-month .routine-day:focus-visible {
  outline: 2px solid var(--primary);
}
@media (max-width: 700px) {
  .po-toolbar > div {
    width: 100%;
  }
  .po-toolbar > div button {
    flex: 1;
  }
  .po-order {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 14px;
    gap: 12px;
  }
  .po-order-icon {
    width: 38px;
    height: 38px;
  }
  .po-order-actions {
    grid-column: 2;
    flex-direction: row;
    flex-wrap: wrap;
    min-width: 0;
  }
  .po-order-actions button {
    flex: 1;
    font-size: 12px;
  }
  .po-panel .routine-date-nav {
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
  }
  .po-panel .routine-date-nav input {
    min-width: 0;
    max-width: 145px;
  }
  .po-panel .routine-head {
    flex-direction: column;
    align-items: stretch;
  }
  .po-order-top {
    gap: 7px;
  }
  .po-toolbar button {
    font-size: 12px;
    padding: 10px;
  }
  .po-panel {
    padding: 15px;
  }
  .po-month {
    padding: 12px;
  }
  .po-month .routine-day-empty {
    min-height: 0;
  }
}
