.waybill-month-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  flex: 0 0 auto;
  --month-accent: #1658a5;
  --month-text: #233b53;
  --month-border: #c9d8e7;
}
.waybill-month-filter button, .waybill-month-year select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--month-border);
  border-radius: 7px;
  background: #fff;
  color: var(--month-text);
  font-size: 13px;
  white-space: nowrap;
}
.waybill-month-filter button:hover:not(:disabled) { background: #edf5ff; color: var(--month-accent); }
.waybill-month-filter button:focus-visible, .waybill-month-year select:focus-visible { outline: 2px solid #2775cf; outline-offset: 2px; }
.waybill-month-filter button:disabled { opacity: .4; cursor: default; }
.waybill-month-filter [data-month-open] { justify-content: space-between; gap: 12px; min-width: 116px; font-weight: 650; }
.waybill-month-caret { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.waybill-month-filter .waybill-month-current { color: var(--month-accent); background: #f2f7ff; }
.waybill-month-filter button[aria-expanded="true"], .waybill-month-filter .waybill-month-current[aria-pressed="true"] { border-color: var(--month-accent); }
.waybill-month-options {
  position: absolute;
  z-index: 12;
  top: calc(100% + 7px);
  left: 0;
  width: min(252px, calc(100vw - 24px));
  padding: 10px;
  border: 1px solid var(--month-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(23, 48, 76, .16);
}
.waybill-month-options[hidden] { display: none; }
.waybill-month-year { display: grid; grid-template-columns: 34px 1fr 34px; gap: 6px; }
.waybill-month-year button { padding: 0; font-size: 20px; }
.waybill-month-year select { width: 100%; }
.waybill-month-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 10px 0; }
.waybill-month-grid button { padding: 0 4px; }
.waybill-month-grid button[aria-current="date"] { border-color: var(--month-accent); }
.waybill-month-options button[aria-pressed="true"] { background: var(--month-accent); border-color: var(--month-accent); color: #fff; }
.waybill-month-options .waybill-month-all { width: 100%; }
@media (pointer: coarse) {
  .waybill-month-filter button, .waybill-month-year select { min-height: 44px; }
}
