:root,
html {
  color-scheme: dark;
}

select,
input[type="date"] {
  color-scheme: dark;
  border: 1px solid #4b5d75 !important;
  background-color: #374151 !important;
  color: #f8fafc !important;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

select:hover,
input[type="date"]:hover {
  border-color: #647792 !important;
  background-color: #3d485a !important;
}

select:focus,
input[type="date"]:focus,
input[type="date"]:focus-visible {
  border-color: #218ce5 !important;
  box-shadow: 0 0 0 3px rgba(33, 140, 229, .18), inset 0 1px 0 rgba(255, 255, 255, .04) !important;
}

input[type="date"] {
  cursor: pointer;
  accent-color: #218ce5;
}

input[type="date"]::-webkit-datetime-edit,
input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  color: #f8fafc;
}

input[type="date"]::-webkit-datetime-edit-text {
  color: #94a3b8;
  padding: 0 2px;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  width: 22px;
  height: 22px;
  margin-left: 8px;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  opacity: .9;
  filter: invert(86%) sepia(15%) saturate(348%) hue-rotate(175deg) brightness(98%);
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  background-color: rgba(33, 140, 229, .18);
  opacity: 1;
}

select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 48px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23dbeafe' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
  background-size: 20px 20px !important;
}

select option,
select optgroup {
  background: #1f2937;
  color: #f8fafc;
}

select option:checked {
  background: #197bcd;
  color: #fff;
}

select:disabled,
input[type="date"]:disabled {
  cursor: not-allowed;
  opacity: .55;
}

@media (max-width: 520px) {
  select {
    background-position: right 12px center !important;
    padding-right: 40px !important;
  }

  input[type="date"]::-webkit-calendar-picker-indicator {
    margin-left: 3px;
    padding: 5px;
  }
}
