/* Local layout pass: sidebar history controls and the report date toolbar. */

/* Product picker: make every destination read as an interactive button. */
.flex.gap-2.overflow-x-auto > a[href="/daily/all"],
.flex.gap-2.overflow-x-auto > a[href="/daily/cards"],
.flex.gap-2.overflow-x-auto > a[href="/daily/payments"],
.flex.gap-2.overflow-x-auto > a[href="/daily/esim"],
.flex.gap-2.overflow-x-auto > a[href="/daily/hotels"] {
  border: 1px solid transparent;
  border-radius: 14px !important;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease !important;
  cursor: pointer;
}

.flex.gap-2.overflow-x-auto > a[href="/daily/all"] { background: rgba(99, 102, 241, .055); border-color: rgba(99, 102, 241, .15); }
.flex.gap-2.overflow-x-auto > a[href="/daily/cards"] { background: rgba(245, 158, 11, .065); border-color: rgba(245, 158, 11, .18); }
.flex.gap-2.overflow-x-auto > a[href="/daily/payments"] { background: rgba(14, 165, 233, .06); border-color: rgba(14, 165, 233, .16); }
.flex.gap-2.overflow-x-auto > a[href="/daily/esim"] { background: rgba(16, 185, 129, .06); border-color: rgba(16, 185, 129, .16); }
.flex.gap-2.overflow-x-auto > a[href="/daily/hotels"] { background: rgba(168, 85, 247, .055); border-color: rgba(168, 85, 247, .15); }

.flex.gap-2.overflow-x-auto > a[href^="/daily/"]:hover {
  transform: translateY(-1px);
  border-color: rgba(251, 191, 36, .48) !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .09);
}

.flex.gap-2.overflow-x-auto > a[href^="/daily/"]:active { transform: translateY(0); }

.flex.gap-2.overflow-x-auto > a[href="/daily/all"]:hover { background: rgba(99, 102, 241, .11); }
.flex.gap-2.overflow-x-auto > a[href="/daily/cards"]:hover { background: rgba(245, 158, 11, .12); }
.flex.gap-2.overflow-x-auto > a[href="/daily/payments"]:hover { background: rgba(14, 165, 233, .11); }
.flex.gap-2.overflow-x-auto > a[href="/daily/esim"]:hover { background: rgba(16, 185, 129, .11); }
.flex.gap-2.overflow-x-auto > a[href="/daily/hotels"]:hover { background: rgba(168, 85, 247, .1); }

html.light-ui .flex.gap-2.overflow-x-auto > a[href="/daily/all"] { background: #f3f4ff; border-color: #dfe1ff; }
html.light-ui .flex.gap-2.overflow-x-auto > a[href="/daily/cards"] { background: #fff8e8; border-color: #f8d995; }
html.light-ui .flex.gap-2.overflow-x-auto > a[href="/daily/payments"] { background: #effaff; border-color: #cceefa; }
html.light-ui .flex.gap-2.overflow-x-auto > a[href="/daily/esim"] { background: #effcf7; border-color: #ccefe2; }
html.light-ui .flex.gap-2.overflow-x-auto > a[href="/daily/hotels"] { background: #faf5ff; border-color: #ead8fb; }

/* Dashboard: remove the oversized ecosystem promo hero. */
main .space-y-6 > section.relative.overflow-hidden.rounded-3xl {
  display: none !important;
}

/* Back / forward controls: compact, balanced and visually intentional. */
button[aria-label="Назад"],
button[aria-label="Вперёд"] {
  width: 42px !important;
  height: 38px !important;
  border: 1px solid rgba(148, 163, 184, .2) !important;
  border-radius: 11px !important;
  background: rgba(255, 255, 255, .045) !important;
  color: #94a3b8 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}

button[aria-label="Назад"]:hover,
button[aria-label="Вперёд"]:hover {
  border-color: rgba(251, 191, 36, .42) !important;
  background: rgba(251, 191, 36, .09) !important;
  color: #fbbf24 !important;
  transform: translateY(-1px);
}

button[aria-label="Назад"]:disabled,
button[aria-label="Вперёд"]:disabled {
  opacity: .38;
  transform: none;
}

*:has(> button[aria-label="Назад"]):has(> button[aria-label="Вперёд"]) {
  display: grid !important;
  grid-template-columns: repeat(2, 42px) !important;
  gap: 6px !important;
  width: fit-content !important;
  padding: 5px !important;
  border-radius: 15px !important;
  border-color: rgba(148, 163, 184, .18) !important;
  background: rgba(15, 23, 42, .68) !important;
}

/* The date toolbar is a grid instead of a fragile wrapping flex row. */
.sticky.top-0:has(button):has([role="combobox"]) {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  width: 100% !important;
  min-height: 68px;
  padding: 10px 20px !important;
  box-sizing: border-box;
  background: rgba(15, 23, 42, .92) !important;
}

.sticky.top-0:has(button):has([role="combobox"]) > :last-child {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex: 0 1 auto !important;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

/* Main period control: consistent rhythm and less visual noise. */
.sticky.top-0:has([role="combobox"]) .inline-flex.items-center.flex-wrap {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 7px !important;
  max-width: 100%;
  padding: 6px !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 24px rgba(2, 6, 23, .14);
}

.sticky.top-0:has([role="combobox"]) button {
  min-height: 34px;
  border-radius: 9px !important;
  white-space: nowrap;
}

.sticky.top-0:has([role="combobox"]) [role="combobox"] {
  min-width: 72px;
  height: 34px !important;
  padding-inline: 10px !important;
}

.sticky.top-0:has([role="combobox"]) label,
.sticky.top-0:has([role="combobox"]) .text-\[10px\] {
  margin-left: 2px;
  color: #94a3b8 !important;
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: .04em;
}

@media (max-width: 1440px) {
  .sticky.top-0:has(button):has([role="combobox"]) {
    justify-content: flex-start !important;
    gap: 10px !important;
    overflow-x: auto;
  }

  .sticky.top-0:has(button):has([role="combobox"]) > :last-child {
    justify-content: flex-start !important;
    overflow-x: auto;
  }
}

@media (max-width: 900px) {
  .sticky.top-0:has(button):has([role="combobox"]) {
    padding: 10px 14px !important;
  }

  .sticky.top-0:has([role="combobox"]) .inline-flex.items-center.flex-wrap {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
  }
}

/* Light theme equivalents. */
html.light-ui button[aria-label="Назад"],
html.light-ui button[aria-label="Вперёд"] {
  border-color: #dbe3ee !important;
  background: #fff !important;
  color: #64748b !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}

html.light-ui *:has(> button[aria-label="Назад"]):has(> button[aria-label="Вперёд"]) {
  border-color: #dbe3ee !important;
  background: #f8fafc !important;
}

html.light-ui .sticky.top-0:has(button):has([role="combobox"]) {
  border-color: #e2e8f0 !important;
  background: rgba(255, 255, 255, .96) !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06) !important;
}

/* Daily funnel: quiet separators between marketing, finance and conversion metrics. */
.funnel-table .funnel-divider {
  border-left: 2px solid rgba(251, 191, 36, .28) !important;
  padding-left: 18px !important;
}

.funnel-table thead .funnel-divider {
  background: rgba(251, 191, 36, .07);
}

html.light-ui .funnel-table .funnel-divider {
  border-left-color: rgba(180, 126, 13, .3) !important;
}

html.light-ui .funnel-table thead .funnel-divider {
  background: #fff9eb;
}
