.batch-range-picker {
  width: 100%;
}

.batch-range-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 15px;
  color: var(--text);
  background: linear-gradient(145deg, rgba(20, 37, 61, 0.96), rgba(11, 24, 42, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  text-align: left;
  cursor: pointer;
}

.batch-range-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.batch-range-value {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.batch-range-value:last-child {
  text-align: right;
}

.batch-range-value small {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.batch-range-value strong {
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-range-arrow {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(87, 209, 161, 0.1);
  font-size: 1rem;
}

.batch-export-card.has-custom-date-range .batch-date-grid {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.batch-range-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  align-items: end;
  padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
  background: rgba(2, 8, 18, 0.78);
  backdrop-filter: blur(12px);
}

.batch-range-dialog {
  width: min(100%, 430px);
  max-height: min(92vh, 680px);
  margin: 0 auto;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 22px 22px 16px 16px;
  color: var(--text);
  background: linear-gradient(180deg, rgba(19, 34, 56, 0.99), rgba(9, 20, 36, 0.995));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

.batch-range-dialog-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 18px 18px 10px;
}

.batch-range-dialog-header p,
.batch-range-dialog-header h3 {
  margin: 0;
}

.batch-range-dialog-header p {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.batch-range-dialog-header h3 {
  margin-top: 4px;
  font-size: 1.05rem;
}

.batch-calendar-icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: var(--panel-soft);
  font-size: 1.25rem;
  cursor: pointer;
}

.batch-calendar-icon-button:disabled {
  opacity: 0.35;
  cursor: default;
}

.batch-calendar-navigation {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 8px;
  padding: 4px 18px 12px;
}

.batch-calendar-month {
  margin: 0;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: capitalize;
}

.batch-calendar-weekdays,
.batch-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.batch-calendar-weekdays {
  gap: 4px;
  padding: 0 16px 6px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.batch-calendar-grid {
  gap: 4px;
  padding: 0 12px;
}

.batch-calendar-day {
  position: relative;
  display: inline-grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  border: 0;
  border-radius: 11px;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.batch-calendar-day:hover:not(:disabled),
.batch-calendar-day:focus-visible:not(:disabled) {
  background: rgba(125, 211, 252, 0.1);
}

.batch-calendar-day:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.batch-calendar-day.is-outside {
  color: rgba(148, 163, 184, 0.48);
}

.batch-calendar-day.is-range {
  border-radius: 8px;
  color: #dcfff1;
  background: rgba(87, 209, 161, 0.16);
}

.batch-calendar-day.is-start,
.batch-calendar-day.is-end {
  border-radius: 11px;
  color: #06150f;
  background: var(--accent);
  box-shadow: 0 6px 18px rgba(87, 209, 161, 0.22);
}

.batch-calendar-day.is-today::after {
  content: "";
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
}

.batch-calendar-day:disabled {
  color: rgba(148, 163, 184, 0.24);
  cursor: default;
}

.batch-range-summary {
  min-height: 38px;
  margin: 10px 16px 0;
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--muted);
  background: rgba(7, 16, 29, 0.45);
  font-size: 0.72rem;
  line-height: 1.35;
}

.batch-range-quick-actions,
.batch-range-dialog-actions {
  display: grid;
  gap: 8px;
  padding: 10px 16px 0;
}

.batch-range-quick-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.batch-range-dialog-actions {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  padding-bottom: 16px;
}

body.batch-calendar-open {
  overflow: hidden;
}

@media (min-width: 600px) {
  .batch-range-overlay {
    align-items: center;
    padding: 20px;
  }

  .batch-range-dialog {
    border-radius: 22px;
  }
}

@media (max-width: 360px) {
  .batch-range-trigger {
    min-height: 62px;
    padding: 9px 10px;
  }

  .batch-range-value strong {
    font-size: 0.8rem;
  }

  .batch-range-dialog-header {
    padding: 14px 14px 8px;
  }

  .batch-calendar-navigation {
    padding: 2px 14px 10px;
  }

  .batch-calendar-grid {
    gap: 2px;
    padding: 0 8px;
  }

  .batch-calendar-day {
    border-radius: 9px;
    font-size: 0.76rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .batch-range-overlay {
    scroll-behavior: auto;
  }
}
