/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Bootstrap CSS is loaded via CDN in layout to avoid importmap CSS 404 */

/* TildaSans webfont (from Tilda CDN) */
@font-face {
  font-family: 'TildaSans';
  font-style: normal;
  font-weight: 250 1000;
  src: url('https://static.tildacdn.com/fonts/tildasans/TildaSans-VF.woff2') format('woff2-variations'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-VF.woff') format('woff-variations');
}

@font-face {
  font-family: 'TildaSans';
  font-style: normal;
  font-weight: 300;
  src: url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Light.eot');
  src: url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Light.eot?#iefix') format('embedded-opentype'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-VF.woff2') format('woff2-variations'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-VF.woff') format('woff-variations'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Light.woff2') format('woff2'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Light.woff') format('woff');
}

@font-face {
  font-family: 'TildaSans';
  font-style: normal;
  font-weight: 400;
  src: url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Regular.eot');
  src: url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Regular.eot?#iefix') format('embedded-opentype'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-VF.woff2') format('woff2-variations'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-VF.woff') format('woff-variations'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Regular.woff2') format('woff2'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Regular.woff') format('woff');
}

@font-face {
  font-family: 'TildaSans';
  font-style: normal;
  font-weight: 500;
  src: url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Medium.eot');
  src: url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Medium.eot?#iefix') format('embedded-opentype'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-VF.woff2') format('woff2-variations'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-VF.woff') format('woff-variations'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Medium.woff2') format('woff2'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Medium.woff') format('woff');
}

@font-face {
  font-family: 'TildaSans';
  font-style: normal;
  font-weight: 600;
  src: url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Semibold.eot');
  src: url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Semibold.eot?#iefix') format('embedded-opentype'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-VF.woff2') format('woff2-variations'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-VF.woff') format('woff-variations'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Semibold.woff2') format('woff2'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Semibold.woff') format('woff');
}

@font-face {
  font-family: 'TildaSans';
  font-style: normal;
  font-weight: 700;
  src: url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Bold.eot');
  src: url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Bold.eot?#iefix') format('embedded-opentype'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-VF.woff2') format('woff2-variations'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-VF.woff') format('woff-variations'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Bold.woff2') format('woff2'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Bold.woff') format('woff');
}

@font-face {
  font-family: 'TildaSans';
  font-style: normal;
  font-weight: 800;
  src: url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Extrabold.eot');
  src: url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Extrabold.eot?#iefix') format('embedded-opentype'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-VF.woff2') format('woff2-variations'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-VF.woff') format('woff-variations'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Extrabold.woff2') format('woff2'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Extrabold.woff') format('woff');
}

@font-face {
  font-family: 'TildaSans';
  font-style: normal;
  font-weight: 900;
  src: url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Black.eot');
  src: url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Black.eot?#iefix') format('embedded-opentype'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-VF.woff2') format('woff2-variations'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-VF.woff') format('woff-variations'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Black.woff2') format('woff2'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-Black.woff') format('woff');
}

/* Default app typography */
:root {
  /* Ensure Bootstrap components inherit the custom font */
  --bs-body-font-family: 'TildaSans', Arial, sans-serif;
  --bs-primary: #3b63f3;
  --bs-primary-rgb: 59, 99, 243;
  --bs-secondary: #5f6b85;
  --bs-secondary-rgb: 95, 107, 133;
  --bs-success: #1f9d6c;
  --bs-success-rgb: 31, 157, 108;
  --bs-warning: #f0ad30;
  --bs-warning-rgb: 240, 173, 48;
  --bs-danger: #d94b63;
  --bs-danger-rgb: 217, 75, 99;
  --bs-body-color: #1f2940;
  --bs-body-bg: #f4f7fb;
  --bs-border-color: #dde4f0;
  --bs-border-radius: 1rem;
  --bs-border-radius-sm: 0.85rem;
  --bs-border-radius-lg: 1.4rem;
  --bs-border-radius-xl: 1.8rem;
  --bs-box-shadow-sm: 0 12px 30px rgba(31, 41, 64, 0.08);
  --bs-box-shadow: 0 20px 45px rgba(31, 41, 64, 0.1);
  --bs-box-shadow-lg: 0 28px 60px rgba(31, 41, 64, 0.14);
  --app-surface: rgba(255, 255, 255, 0.78);
  --app-surface-strong: #ffffff;
  --app-surface-tint: rgba(255, 255, 255, 0.58);
  --app-text-muted: #66728d;
  --app-border-strong: rgba(115, 136, 182, 0.18);
  --app-gradient: linear-gradient(135deg, #eef3ff 0%, #f8fbff 48%, #fff4e7 100%);
  --app-accent-gradient: linear-gradient(135deg, #3b63f3 0%, #5aa7ff 100%);
}

body {
  font-family: 'TildaSans', Arial, sans-serif;
  min-height: 100vh;
  color: var(--bs-body-color);
  background:
    radial-gradient(circle at top left, rgba(59, 99, 243, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 183, 77, 0.16), transparent 24%),
    var(--app-gradient);
}

html.turbo-navigation-active,
html.turbo-navigation-active body {
  cursor: progress;
}

html.turbo-navigation-active body {
  overflow: hidden;
}

.turbo-navigation-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(244, 247, 251, 0.66);
  backdrop-filter: blur(5px);
}

html[data-theme="dark"] .turbo-navigation-overlay {
  background: rgba(11, 16, 27, 0.62);
}

.turbo-navigation-overlay__dialog {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--app-border-strong);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 60px rgba(31, 41, 64, 0.16);
  color: var(--bs-body-color);
  font-weight: 600;
  letter-spacing: 0.01em;
}

html[data-theme="dark"] .turbo-navigation-overlay__dialog {
  background: rgba(19, 26, 40, 0.94);
}

.turbo-navigation-overlay__spinner {
  width: 1.15rem;
  height: 1.15rem;
  border: 0.18rem solid rgba(var(--bs-primary-rgb), 0.2);
  border-top-color: var(--bs-primary);
  border-radius: 50%;
  animation: turbo-navigation-overlay-spin 0.8s linear infinite;
  flex: 0 0 auto;
}

.turbo-navigation-overlay__label {
  white-space: nowrap;
}

@keyframes turbo-navigation-overlay-spin {
  to {
    transform: rotate(360deg);
  }
}

a {
  color: #3357d4;
  text-decoration: none;
}

a:hover {
  color: #2744a6;
}

.app-shell {
  width: min(1400px, calc(100% - 2rem));
  margin: 0 auto;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  padding: 1rem 0 0;
}

.app-navbar {
  background: rgba(255, 255, 255, 0.74) !important;
  border: 1px solid var(--app-border-strong);
  border-radius: 1.5rem;
  box-shadow: 0 16px 40px rgba(50, 68, 115, 0.12);
  backdrop-filter: blur(18px);
}

.app-navbar .container-fluid,
.app-navbar .container {
  padding: 0.6rem 1rem;
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: #172033;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.app-brand:hover {
  color: #172033;
}

.app-brand-mark {
  width: 2.6rem;
  height: 2.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: linear-gradient(135deg, #ffd95a 0%, #ffb347 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 22px rgba(255, 179, 71, 0.35);
  color: #1f2940;
  font-weight: 800;
}

.app-brand-text {
  font-size: 1.1rem;
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--app-border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--bs-body-color);
  box-shadow: 0 10px 24px rgba(31, 41, 64, 0.08);
  backdrop-filter: blur(18px);
}

.app-theme-toggle .form-check {
  margin-bottom: 0;
}

.app-theme-toggle .form-check-input {
  cursor: pointer;
}

.app-theme-toggle__icon {
  width: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--bs-body-color);
  position: relative;
}

.app-theme-toggle__icon-light,
.app-theme-toggle__icon-dark {
  line-height: 1;
}

.app-theme-toggle__icon-dark {
  display: none;
}

html[data-theme="dark"] .app-theme-toggle__icon-light {
  display: none;
}

html[data-theme="dark"] .app-theme-toggle__icon-dark {
  display: inline-block;
}

.app-navbar .nav-link {
  color: #4d5a75;
  border-radius: 999px;
  padding: 0.55rem 0.95rem !important;
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus,
.app-navbar .nav-link.active {
  color: #1f2940;
  background-color: rgba(59, 99, 243, 0.1);
  transform: translateY(-1px);
}

.app-navbar .navbar-toggler {
  border: 0;
  border-radius: 1rem;
  padding: 0.55rem 0.75rem;
  background: rgba(59, 99, 243, 0.08);
  box-shadow: none;
}

.app-page {
  padding: 1.5rem 0 2rem;
}

.app-page.app-page-centered {
  min-height: calc(100vh - 6rem);
  display: flex;
  align-items: center;
}

.app-surface {
  background: var(--app-surface);
  border: 1px solid var(--app-border-strong);
  border-radius: 1.75rem;
  box-shadow: 0 28px 64px rgba(31, 41, 64, 0.1);
  backdrop-filter: blur(18px);
}

.app-surface-section {
  padding: 1.25rem;
}

.app-flash {
  max-width: 960px;
  margin: 0 auto 1.5rem;
}

.app-centered-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (max-width: 767.98px) {
  .app-centered-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .app-header-actions,
  .app-theme-toggle {
    width: 100%;
  }

  .app-theme-toggle {
    justify-content: space-between;
  }
}

.page-title,
h1, h2, h3, h4, h5, h6 {
  color: #162034;
  font-weight: 700;
}

.text-muted,
.form-text,
.form-label-hint {
  color: var(--app-text-muted) !important;
}

.form-label--with-hint {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

/* Tag autocomplete styles */
.tag-suggestion {
  cursor: pointer;
}

.tag-suggestion:hover,
.tag-suggestion.active {
  background-color: var(--bs-primary);
  color: white;
}

.tag-suggestion.active {
  font-weight: 500;
}

/* Collapse icon rotation */
button[data-bs-toggle="collapse"] .bi-chevron-down {
  transition: transform 0.3s ease;
}

button[data-bs-toggle="collapse"]:not(.collapsed) .bi-chevron-down {
  transform: rotate(180deg);
}

/* Payment overlay styles */
.payment-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1040;
  display: flex;
  align-items: center;
  justify-content: center;
}

.payment-overlay-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.card,
.modal-content,
.dropdown-menu,
.list-group,
.accordion-item {
  border: 1px solid var(--app-border-strong);
  border-radius: 1.5rem;
  box-shadow: 0 18px 45px rgba(31, 41, 64, 0.08);
}

.card,
.modal-content,
.dropdown-menu,
.list-group-item,
.accordion-item {
  background: var(--app-surface-strong);
}

.card {
  overflow: hidden;
}

.card-header,
.modal-header,
.modal-footer,
.list-group-item,
.accordion-button {
  border-color: rgba(115, 136, 182, 0.16);
}

.card-header,
.modal-header {
  background: linear-gradient(180deg, rgba(59, 99, 243, 0.08), rgba(59, 99, 243, 0.02));
}

.card-header.bg-primary,
.bg-primary {
  background: var(--app-accent-gradient) !important;
}

.btn {
  --bs-btn-border-radius: 999px;
  --bs-btn-padding-y: 0.62rem;
  --bs-btn-padding-x: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 24px rgba(31, 41, 64, 0.08);
}

.btn:hover {
  transform: translateY(-1px);
}

.feature-requests-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-requests-hero {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.6rem 1.75rem;
  border: 1px solid var(--app-border-strong);
  border-radius: 1.75rem;
  background:
    radial-gradient(circle at top right, rgba(90, 167, 255, 0.18), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.44));
  box-shadow: 0 18px 45px rgba(31, 41, 64, 0.08);
}

.feature-requests-eyebrow {
  display: inline-flex;
  margin-bottom: 0.8rem;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  background: rgba(var(--bs-primary-rgb), 0.1);
  color: var(--bs-primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feature-requests-page-title {
  margin: 0 0 0.6rem;
}

.feature-requests-lead {
  max-width: 42rem;
  margin: 0;
  color: var(--app-text-muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.feature-requests-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  min-width: 14rem;
}

.feature-requests-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--app-border-strong);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.64);
  backdrop-filter: blur(16px);
}

.feature-requests-stat__label {
  color: var(--app-text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.feature-requests-stat__value {
  color: #162034;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}

.feature-requests-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-request-card {
  border: 1px solid var(--app-border-strong);
  border-radius: 1.6rem;
  background: var(--app-surface-strong);
  box-shadow: 0 18px 45px rgba(31, 41, 64, 0.08);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-request-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 56px rgba(31, 41, 64, 0.12);
}

.feature-request-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 1.5rem;
  cursor: pointer;
}

.feature-request-title-section {
  flex: 1;
  min-width: 0;
}

.feature-request-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.feature-request-title {
  margin: 0;
  color: #162034;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.45;
}

.votes-count {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(var(--bs-primary-rgb), 0.08);
  color: var(--bs-primary);
  font-size: 0.92rem;
  font-weight: 700;
}

.votes-count i {
  color: #d94b63;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-pending {
  background: rgba(240, 173, 48, 0.16);
  color: #9a6200;
}

.status-rolledout {
  background: rgba(31, 157, 108, 0.14);
  color: #187552;
}

.expand-button {
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--app-border-strong);
  border-radius: 999px;
  background: rgba(var(--bs-primary-rgb), 0.06);
  color: var(--bs-primary);
  transition: transform 0.3s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.expand-button:hover {
  background: rgba(var(--bs-primary-rgb), 0.12);
}

.expand-button.expanded {
  transform: rotate(180deg);
}

.feature-request-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.feature-request-body.expanded {
  max-height: 1000px;
}

.feature-request-description {
  padding: 0 1.5rem 1.15rem;
  color: var(--app-text-muted);
  font-size: 0.98rem;
  line-height: 1.75;
}

.feature-request-description p:last-child {
  margin-bottom: 0;
}

.feature-request-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid rgba(115, 136, 182, 0.16);
}

.feature-request-actions form {
  margin: 0;
}

.btn-vote {
  --bs-btn-bg: var(--bs-primary);
  --bs-btn-border-color: var(--bs-primary);
  --bs-btn-hover-bg: #3357d4;
  --bs-btn-hover-border-color: #3357d4;
  --bs-btn-active-bg: #2d4dc0;
  --bs-btn-active-border-color: #2d4dc0;
  --bs-btn-color: #ffffff;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-active-color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.btn-voted,
.btn-vote:disabled {
  --bs-btn-bg: #d8e0ed;
  --bs-btn-border-color: #d8e0ed;
  --bs-btn-hover-bg: #d8e0ed;
  --bs-btn-hover-border-color: #d8e0ed;
  --bs-btn-active-bg: #d8e0ed;
  --bs-btn-active-border-color: #d8e0ed;
  --bs-btn-color: #6c7a92;
  opacity: 1;
  box-shadow: none;
}

.feature-requests-empty-state {
  padding: 3.25rem 1.5rem;
  border: 1px dashed rgba(115, 136, 182, 0.3);
  border-radius: 1.75rem;
  background: rgba(255, 255, 255, 0.48);
  text-align: center;
}

.feature-requests-empty-state__icon {
  width: 4rem;
  height: 4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: rgba(var(--bs-primary-rgb), 0.08);
  color: var(--bs-primary);
  font-size: 1.6rem;
}

.btn-primary {
  --bs-btn-bg: #3b63f3;
  --bs-btn-border-color: #3b63f3;
  --bs-btn-hover-bg: #3053d5;
  --bs-btn-hover-border-color: #3053d5;
  --bs-btn-active-bg: #2847bb;
  --bs-btn-active-border-color: #2847bb;
}

.btn-outline-primary {
  --bs-btn-color: #3053d5;
  --bs-btn-border-color: rgba(59, 99, 243, 0.26);
  --bs-btn-hover-bg: rgba(59, 99, 243, 0.1);
  --bs-btn-hover-color: #2141b0;
  --bs-btn-hover-border-color: rgba(59, 99, 243, 0.34);
}

.btn-outline-secondary,
.btn-outline-warning,
.btn-outline-danger,
.btn-outline-success {
  background: rgba(255, 255, 255, 0.85);
}

.form-control,
.form-select {
  min-height: 3rem;
  border-radius: 1rem;
  border-color: rgba(115, 136, 182, 0.26);
  background-color: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 2px rgba(31, 41, 64, 0.02);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: rgba(59, 99, 243, 0.45);
  box-shadow: 0 0 0 0.3rem rgba(59, 99, 243, 0.14);
}

.form-check-input {
  border-radius: 0.45rem;
}

.table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: rgba(59, 99, 243, 0.05);
}

.table thead th {
  padding-top: 1rem;
  padding-bottom: 1rem;
  color: #4f5d78;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom-width: 1px;
  border-color: rgba(115, 136, 182, 0.16);
}

.table tbody td {
  padding-top: 1rem;
  padding-bottom: 1rem;
  vertical-align: middle;
  border-color: rgba(115, 136, 182, 0.12);
}

.badge {
  border-radius: 999px;
  padding: 0.48em 0.8em;
  font-weight: 600;
}

.badge.bg-secondary {
  background: rgba(95, 107, 133, 0.12) !important;
  color: #47516a;
}

.alert {
  border: 1px solid transparent;
  border-radius: 1.25rem;
  box-shadow: 0 14px 36px rgba(31, 41, 64, 0.08);
}

.alert-info {
  background: rgba(59, 99, 243, 0.1);
  border-color: rgba(59, 99, 243, 0.14);
  color: #2141b0;
}

.alert-success {
  background: rgba(31, 157, 108, 0.1);
  border-color: rgba(31, 157, 108, 0.14);
  color: #15714c;
}

.alert-warning {
  background: rgba(240, 173, 48, 0.14);
  border-color: rgba(240, 173, 48, 0.18);
  color: #9f6b05;
}

.alert-danger {
  background: rgba(217, 75, 99, 0.1);
  border-color: rgba(217, 75, 99, 0.15);
  color: #a12743;
}

.dropdown-menu {
  padding: 0.55rem;
}

.dropdown-item {
  border-radius: 0.9rem;
  padding: 0.65rem 0.85rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: rgba(59, 99, 243, 0.08);
}

.searchable-dropdown {
  position: relative;
}

.searchable-dropdown__trigger {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(115, 136, 182, 0.26);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.92);
  color: #24314d;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: left;
  box-shadow: inset 0 1px 2px rgba(31, 41, 64, 0.02);
}

.searchable-dropdown__trigger:focus {
  outline: none;
  border-color: rgba(59, 99, 243, 0.45);
  box-shadow: 0 0 0 0.3rem rgba(59, 99, 243, 0.14);
}

.searchable-dropdown__trigger span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.searchable-dropdown__chevron {
  color: #7388b6;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.searchable-dropdown__menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  min-width: 200pt;
  z-index: 1080;
  padding: 0.65rem;
  border: 1px solid rgba(115, 136, 182, 0.18);
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 50px rgba(31, 41, 64, 0.18);
  backdrop-filter: blur(14px);
}

.searchable-dropdown__search-wrap {
  margin-bottom: 0.5rem;
}

.searchable-dropdown__search {
  width: 100%;
  min-height: 2.6rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(115, 136, 182, 0.22);
  border-radius: 0.9rem;
  background: #fff;
}

.searchable-dropdown__search:focus {
  outline: none;
  border-color: rgba(59, 99, 243, 0.45);
  box-shadow: 0 0 0 0.25rem rgba(59, 99, 243, 0.12);
}

.searchable-dropdown__options {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 480px;
  overflow-y: auto;
}

.searchable-dropdown__option {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 0;
  border-radius: 0.9rem;
  background: transparent;
  color: #24314d;
  text-align: left;
}

.searchable-dropdown__option-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.searchable-dropdown__option-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.searchable-dropdown__option-label {
  display: block;
}

.searchable-dropdown__option-subtitle {
  display: block;
  margin-top: 0.15rem;
  font-size: 8px;
  line-height: 1.2;
  letter-spacing: 0.03em;
  color: #8c98b3;
  text-transform: uppercase;
}

.searchable-dropdown__hint {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: rgba(59, 99, 243, 0.12);
  color: #3357d4;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}

.searchable-dropdown__hint-wrap {
  flex-shrink: 0;
  display: inline-flex;
}

.searchable-dropdown__floating-tooltip {
  position: fixed;
  min-width: 180px;
  max-width: 260px;
  padding: 0.55rem 0.7rem;
  border-radius: 0.8rem;
  background: rgba(28, 37, 59, 0.96);
  color: #fff;
  font-size: 0.75rem;
  line-height: 1.35;
  box-shadow: 0 14px 30px rgba(31, 41, 64, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.08s ease;
  z-index: 2000;
}

.searchable-dropdown__floating-tooltip.is-visible {
  opacity: 1;
}

.searchable-dropdown__option:hover,
.searchable-dropdown__option:focus,
.searchable-dropdown__option.is-selected {
  background: rgba(59, 99, 243, 0.08);
}

.searchable-dropdown__empty {
  padding: 0.85rem 0.25rem 0.15rem;
  color: #7388b6;
  font-size: 0.95rem;
}

.searchable-dropdown__menu-actions {
  margin-bottom: 0.5rem;
}

.searchable-dropdown__clear {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(209, 82, 100, 0.2);
  border-radius: 0.8rem;
  background: rgba(209, 82, 100, 0.06);
  color: #b23a52;
  font-size: 0.9rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.searchable-dropdown__clear:hover,
.searchable-dropdown__clear:focus {
  outline: none;
  background: rgba(209, 82, 100, 0.12);
  border-color: rgba(209, 82, 100, 0.32);
}

.searchable-dropdown--multiselect .searchable-dropdown__option {
  cursor: grab;
}

.searchable-dropdown--multiselect .searchable-dropdown__option[hidden] {
  display: none;
}

.searchable-dropdown--multiselect [data-sortable-multiselect-target="list"] {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 480px;
  overflow-y: auto;
}

.sortable-multiselect__option-check {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}

.sortable-multiselect__checkbox {
  flex-shrink: 0;
  margin-top: 0.2rem;
  width: 1rem;
  height: 1rem;
  accent-color: #3b63f3;
}

.autosuggest-input {
  position: relative;
  min-width: 180px;
}

.autosuggest-input__field {
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(115, 136, 182, 0.26);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.92);
  color: #24314d;
  box-shadow: inset 0 1px 2px rgba(31, 41, 64, 0.02);
}

.autosuggest-input__field:focus {
  outline: none;
  border-color: rgba(59, 99, 243, 0.45);
  box-shadow: 0 0 0 0.3rem rgba(59, 99, 243, 0.14);
}

.autosuggest-input__panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  z-index: 1080;
  padding: 0.5rem;
  border: 1px solid rgba(115, 136, 182, 0.18);
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 50px rgba(31, 41, 64, 0.18);
  backdrop-filter: blur(14px);
}

.autosuggest-input__list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 260px;
  overflow-y: auto;
}

.autosuggest-input__item {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 0;
  border-radius: 0.9rem;
  background: transparent;
  color: #24314d;
  text-align: left;
}

.autosuggest-input__item:hover,
.autosuggest-input__item:focus,
.autosuggest-input__item.is-selected {
  background: rgba(59, 99, 243, 0.08);
}

.autosuggest-input__empty {
  padding: 0.85rem 0.25rem 0.15rem;
  color: #7388b6;
  font-size: 0.95rem;
}

.reports-preset-save-form__body {
  padding-bottom: 2rem;
}

.reports-preset-save-form__field {
  margin-bottom: 5.5rem;
}

.reports-filters-card,
.reports-filters-card .card-body {
  overflow: visible;
}

.clicks-filters-card,
.clicks-filters-card .card-body,
.clicks-campaign-filter {
  overflow: visible;
}

.conversions-filters-card,
.conversions-filters-card .card-body,
.conversions-campaign-filter {
  overflow: visible;
}

.filter-row {
  position: relative;
  padding-top: 3rem !important;
}

.filter-row__remove {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  min-width: 2.4rem;
  min-height: 2.4rem;
  padding: 0;
}

.results-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
}

.results-toolbar__start {
  min-width: 0;
}

.results-toolbar__center {
  justify-self: center;
}

.results-toolbar__end {
  justify-self: end;
}

@media (max-width: 767.98px) {
  .results-toolbar {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .results-toolbar__center,
  .results-toolbar__end {
    justify-self: start;
  }
}

.pagination {
  gap: 0.35rem;
}

.page-link {
  border: 0;
  border-radius: 999px !important;
  color: #405173;
  box-shadow: 0 8px 20px rgba(31, 41, 64, 0.06);
}

.page-item.active .page-link {
  background: var(--app-accent-gradient);
}

/* Feature Request Modal - должен быть выше чата поддержки */
#featureRequestModal {
  z-index: 1060 !important;
}

/* Backdrop для модального окна feature request должен быть выше чата */
#featureRequestModal.show ~ .modal-backdrop {
  z-index: 1055 !important;
}

/* Switch Plan Modal - должен быть выше payment-overlay и других элементов */
#switchPlanModal {
  z-index: 1055 !important;
}

/* Reports preset modal should stay above backdrop and custom page overlays */
#saveAnalyticsPresetModal {
  z-index: 1060 !important;
}

#manageAnalyticsPresetsModal {
  z-index: 1060 !important;
}

/* Стандартный backdrop для всех модальных окон (кроме featureRequestModal) */
body.modal-open .modal-backdrop {
  z-index: 1050 !important;
}

.reports-presets-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  height: 2.7rem;
  padding: 0;
  border-radius: 999px;
  flex-shrink: 0;
}

.reports-presets-menu-button .bi-gear {
  font-size: 1.15rem;
  line-height: 1;
}

.reports-presets-manager-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.reports-presets-manager-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(115, 136, 182, 0.22);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.9);
  transition: border-color 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.reports-presets-manager-item.is-dragging {
  opacity: 0.55;
}

.reports-presets-manager-item.drop-before {
  border-top: 3px solid #3b63f3;
}

.reports-presets-manager-item.drop-after {
  border-bottom: 3px solid #3b63f3;
}

.reports-presets-manager-handle {
  color: #7388b6;
  cursor: grab;
  font-size: 1rem;
  line-height: 1;
}

.reports-table .dimension-column,
.reports-table .measure-column {
  background: transparent !important;
}

.reports-table .reports-table__group-separator {
  border-left: 4px solid rgba(95, 107, 133, 0.28);
}

.reports-table__header--draggable {
  cursor: grab;
  user-select: none;
}

.reports-table__header--draggable.is-dragging {
  opacity: 0.55;
}

.reports-table__header--draggable.drop-before {
  border-left: 3px solid #3b63f3;
}

.reports-table__header--draggable.drop-after {
  border-right: 3px solid #3b63f3;
}

/* Reconciliation discrepancy row highlighting (pastel tones) */
.table tbody tr.rc-discrepancy-low > td {
  background-color: #e8f8eb;
}

.table-hover tbody tr.rc-discrepancy-low:hover > td {
  background-color: #dcf3e1;
}

.table tbody tr.rc-discrepancy-medium > td {
  background-color: #fff7db;
}

.table-hover tbody tr.rc-discrepancy-medium:hover > td {
  background-color: #fdf0c7;
}

.table tbody tr.rc-discrepancy-high > td {
  background-color: #fbe3e3;
}

.table-hover tbody tr.rc-discrepancy-high:hover > td {
  background-color: #f8d3d3;
}

.table tbody tr.rc-unmatched-traffic > td {
  color: #b3261e;
  font-weight: 600;
}

/* Campaigns page import dropdown should not be clipped by table responsive wrapper */
.campaigns-table-responsive {
  overflow: visible;
}

.campaigns-table-responsive .dropdown-menu {
  z-index: 1081;
}

.config-preview {
  background: rgba(59, 99, 243, 0.06);
  border: 1px solid rgba(115, 136, 182, 0.16);
  color: inherit;
  margin-bottom: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.route-offer-card {
  overflow: visible;
}

.route-card,
.route-card__body {
  overflow: visible;
}

@media (max-width: 991.98px) {
  .app-shell {
    width: min(100% - 1rem, 1400px);
  }

  .app-topbar {
    padding-top: 0.75rem;
  }

  .app-navbar {
    border-radius: 1.25rem;
  }

  .app-page {
    padding-top: 1rem;
  }

  .campaigns-table-responsive {
    overflow-x: auto;
    overflow-y: visible;
  }

  .feature-requests-hero {
    flex-direction: column;
    padding: 1.3rem;
  }

  .feature-requests-stats {
    min-width: 0;
  }

  .feature-request-header,
  .feature-request-description,
  .feature-request-actions {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .feature-request-header {
    padding-top: 1.15rem;
    padding-bottom: 1.15rem;
  }

  .feature-request-title {
    font-size: 1.12rem;
  }

  .feature-request-actions {
    align-items: stretch;
  }

  .feature-request-actions form,
  .feature-request-actions .btn-vote {
    width: 100%;
  }

  .feature-request-actions .btn-vote {
    justify-content: center;
  }
}
