/* Global: Date Filter Popup (range) */

.date-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r);
  border: 1px solid var(--admin-border);
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  color: var(--admin-text);
}

.date-btn:hover {
  filter: brightness(0.98);
}

.date-popup {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 90px 14px 14px;
}

.date-popup.is-open {
  display: flex;
}

.date-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 18, 20, 0.45);
}

.date-card {
  position: relative;
  width: min(760px, calc(100vw - 28px));
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: calc(var(--r) + 2px);
  box-shadow: var(--admin-shadow);
  overflow: hidden;
}

.date-card-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 380px;
}

.date-card-f {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--admin-border);
  background: #fff;
}

.date-left {
  background: #f4f5f7;
  border-right: 1px solid var(--admin-border);
  display: flex;
  flex-direction: column;
}

.date-presets {
  padding: 12px;
  background: transparent;
}

.date-right {
  padding: 12px 14px 16px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
}

.date-presets .date-preset {
  width: 100%;
  text-align: left;
  padding: 10px 10px;
  border-radius: var(--r);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  color: var(--admin-text);
}

.date-presets .date-preset:hover {
  background: #f3f3f6;
}

.date-presets .date-preset.is-active {
  background: rgba(26, 115, 232, 0.10);
  border-color: rgba(26, 115, 232, 0.18);
}

/* Date range display (read-only) */

.date-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: stretch;
}

.date-range-pill {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 10px;
  border: 1px solid rgba(96, 100, 108, 0.16);
  border-radius: calc(var(--r) + 2px);
  background: #f7f7fa;
  min-width: 0;
}

.date-range-k {
  font-size: 11px;
  color: var(--admin-muted);
  font-weight: 700;
  line-height: 1.1;
}

.date-range-v {
  font-size: 13px;
  color: var(--admin-text);
  font-weight: 750;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.date-cal {
  margin-top: 0;
  width: 100%;
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
  justify-self: start;
}

.date-cal-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.date-cal-title {
  font-weight: 750;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.date-cal-nav {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.date-cal-btn {
  padding: 6px 10px;
  border-radius: var(--r);
  border: 1px solid var(--admin-border);
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}

.date-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--admin-border);
  border-radius: calc(var(--r) + 2px);
  background: #fff;
}

.date-cal-dow {
  font-size: 11px;
  color: var(--admin-muted);
  font-weight: 800;
  text-align: center;
}

.date-cal-day {
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(96, 100, 108, 0.14);
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}

.date-cal-day.is-inrange {
  background: rgba(26, 115, 232, 0.10);
  border-color: rgba(26, 115, 232, 0.18);
}

.date-cal-day.is-start,
.date-cal-day.is-end {
  background: rgba(26, 115, 232, 0.95);
  border-color: rgba(26, 115, 232, 0.95);
  color: #fff;
}

