@media (max-width: 411px) {
  body #root header > div:last-child > :first-child {
    display: none !important;
  }

  body #root header button:has(.lucide-monitor):has(.lucide-chevron-down) {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }

  body #root header div[class*="space-x-4"][class*="sm:space-x-6"] > :first-child {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }
}

@media (max-width: 430px) {
  body #root main div[class*="space-x-3"][class*="rounded-xl"]:has(input[type="date"]) {
    width: 100%;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 0.6rem !important;
    padding: 0.85rem 0.95rem !important;
  }

  body #root main div[class*="space-x-3"][class*="rounded-xl"]:has(input[type="date"]) > svg,
  body #root main div[class*="space-x-3"][class*="rounded-xl"]:has(input[type="date"]) > div:first-child svg {
    flex-shrink: 0;
  }

  body #root main div[class*="space-x-3"][class*="rounded-xl"]:has(input[type="date"]) > div:last-child {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.65rem 0.5rem !important;
    width: 100%;
    min-width: 0;
  }

  body #root main div[class*="space-x-3"][class*="rounded-xl"]:has(input[type="date"]) > div:last-child > span {
    display: none !important;
  }

  body #root main div[class*="space-x-3"][class*="rounded-xl"]:has(input[type="date"]) > div:last-child > div {
    min-width: 0;
  }

  body #root main input[type="date"] {
    width: 100%;
    min-width: 0;
    font-size: 0.82rem !important;
    line-height: 1.15;
  }

  body #root main input[type="date"]::-webkit-calendar-picker-indicator {
    margin-left: 0.2rem;
    padding: 0;
  }
}

@media (max-width: 360px) {
  body #root main div[class*="space-x-3"][class*="rounded-xl"]:has(input[type="date"]) {
    padding: 0.75rem 0.8rem !important;
  }

  body #root main div[class*="space-x-3"][class*="rounded-xl"]:has(input[type="date"]) > div:last-child {
    gap: 0.5rem 0.4rem !important;
  }

  body #root main div[class*="space-x-3"][class*="rounded-xl"]:has(input[type="date"]) span[class*="text-[10px]"] {
    font-size: 0.56rem !important;
    letter-spacing: 0.06em;
  }

  body #root main input[type="date"] {
    font-size: 0.76rem !important;
  }
}

@media (max-width: 640px) {
  body #root div[class*="rounded-b-2xl"][class*="justify-end"][class*="border-t"] {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 0.75rem !important;
    padding: 1rem !important;
  }

  body #root div[class*="rounded-b-2xl"][class*="justify-end"][class*="border-t"] > button {
    width: 100%;
    min-width: 0;
    justify-content: center;
    text-align: center;
    padding-left: 0.85rem !important;
    padding-right: 0.85rem !important;
  }
}

@media (max-width: 430px) {
  body #root div[class*="rounded-b-2xl"][class*="justify-end"][class*="border-t"] {
    padding-left: 1.1rem !important;
    padding-right: 1.1rem !important;
  }

  body #root div[class*="rounded-b-2xl"][class*="justify-end"][class*="border-t"] > button {
    font-size: 0.95rem;
  }
}

.mobile-theme-menu {
  margin-top: 0.5rem;
  padding: 0.75rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(37, 99, 235, 0.08);
}

.dark .mobile-theme-menu {
  border-color: rgba(96, 165, 250, 0.16);
  background: rgba(30, 41, 59, 0.72);
}

.mobile-theme-menu__title {
  margin-bottom: 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #60a5fa;
}

.dark .mobile-theme-menu__title {
  color: #93c5fd;
}

.mobile-theme-menu__buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.mobile-theme-menu__button {
  min-height: 2.5rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.82);
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.dark .mobile-theme-menu__button {
  background: rgba(51, 65, 85, 0.9);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.18);
}

.mobile-theme-menu__button.is-active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.dark .mobile-theme-menu__button.is-active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #ffffff;
}

.mobile-theme-menu__button:active {
  transform: scale(0.98);
}
