/* Общие стили */
html {
  scrollbar-gutter: stable;
}

body {
  padding-top: 68px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  background-color: #121212;
  color: #e0e0e0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.light-theme {
  background-color: #ffffff;
  color: #333;
}

a {
  text-decoration: none !important;
}

/* Шапка сайта */
.navbar {
  background-color: #1e1e1e;
  border-bottom: 1px solid #333;
}

.navbar.site-navbar {
  min-height: 68px;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  align-items: flex-start;
  background: rgba(18, 18, 18, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
  transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

@media (min-width: 992px) {
  .navbar.site-navbar {
    align-items: center;
  }

  .site-navbar > .container {
    align-items: center;
  }
}

body.light-theme .navbar {
  background-color: #ffffff;
  border-bottom: 1px solid #ddd;
}

body.light-theme .navbar.site-navbar {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
  text-decoration: none !important;
}

.site-brand-wordmark {
  display: inline-flex;
  align-items: stretch;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(21, 101, 192, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-brand-tap,
.site-brand-tv {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 0.62rem;
  font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  font-size: clamp(0.95rem, 2.2vw, 1.08rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
}

.site-brand-tap {
  background-color: #1565c0;
  border-right: 2px solid #ffffff;
}

body.dark-theme .site-brand-tap {
  border-right-color: #000000;
}

.site-brand-tv {
  background-color: #2196f3;
}

.site-brand:hover .site-brand-wordmark,
.site-brand:focus .site-brand-wordmark {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(21, 101, 192, 0.38);
}

.site-brand:hover,
.site-brand:focus {
  opacity: 1;
}

.navbar-brand,
.nav-link {
  color: #ffffff !important;
  transition: color 0.3s ease, background-color 0.2s ease;
}

body.light-theme .navbar-brand,
body.light-theme .nav-link {
  color: #333 !important;
}

.site-navbar .nav-link {
  font-weight: 600;
  font-size: 0.925rem;
  border-radius: 10px;
  padding: 0.5rem 0.85rem !important;
  margin: 0.15rem 0.1rem;
}

.site-navbar .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e3f2fd !important;
}

body.light-theme .site-navbar .nav-link:hover {
  background: rgba(33, 150, 243, 0.08);
  color: #1565c0 !important;
}

.navbar-brand:hover,
.nav-link:hover {
  color: #bbdefb !important;
}

body.light-theme .navbar-brand:hover,
body.light-theme .nav-link:hover {
  color: #007bff !important;
}

.site-navbar .nav-link-accent {
  border: 1px solid transparent;
}

.site-navbar .nav-link-accent:hover,
.site-navbar .nav-link-accent.active {
  background: rgba(33, 150, 243, 0.18);
  border-color: rgba(33, 150, 243, 0.35);
}

body.light-theme .site-navbar .nav-link-accent:hover,
body.light-theme .site-navbar .nav-link-accent.active {
  background: rgba(33, 150, 243, 0.1);
  border-color: rgba(33, 150, 243, 0.25);
  color: #1565c0 !important;
}

.site-navbar .nav-link-logout:hover {
  background: rgba(244, 67, 54, 0.12) !important;
  color: #ef9a9a !important;
}

body.light-theme .site-navbar .nav-link-logout:hover {
  background: rgba(244, 67, 54, 0.08) !important;
  color: #c62828 !important;
}

.site-navbar .navbar-theme-toggle {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0.1rem 0 0.1rem 0.2rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.site-navbar .theme-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 84px;
  height: 40px;
  padding: 3px;
  border-radius: 999px;
  box-sizing: border-box;
  background: #e4f1ff;
  border: 0;
  box-shadow: none;
  transition: background-color 0.28s ease;
}

body.dark-theme .site-navbar .theme-switch {
  background: #243044;
}

.site-navbar .theme-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 3px 10px rgba(59, 130, 246, 0.38);
  transform: translateX(0);
  transition: transform 0.38s cubic-bezier(0.22, 0.8, 0.28, 1);
  z-index: 0;
  pointer-events: none;
}

body.dark-theme .site-navbar .theme-switch-thumb {
  transform: translateX(44px);
}

.site-navbar .theme-switch-opt {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8ec0f8;
  transition: color 0.28s ease;
}

.site-navbar .theme-switch-opt svg {
  width: 18px;
  height: 18px;
  display: block;
  overflow: visible;
}

body.light-theme .site-navbar .theme-switch-light,
body.dark-theme .site-navbar .theme-switch-dark {
  color: #fff;
}

body.light-theme .site-navbar .theme-switch-dark,
body.dark-theme .site-navbar .theme-switch-light {
  color: #8ec0f8;
}

.site-navbar .navbar-theme-toggle:hover .theme-switch {
  background: #d9ebff;
}

body.dark-theme .site-navbar .navbar-theme-toggle:hover .theme-switch {
  background: #2c3b52;
}

.site-navbar .navbar-theme-toggle:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 3px;
  border-radius: 999px;
}

.site-navbar-toggler {
  border-color: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 0.35rem 0.55rem;
}

body.light-theme .site-navbar-toggler {
  border-color: rgba(0, 0, 0, 0.12);
}

.site-nav-toggle-icon {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background-color: #ffffff;
  position: relative;
  transition: background-color 0.2s ease;
}

body.light-theme .site-nav-toggle-icon {
  background-color: #333333;
}

.site-nav-toggle-icon::before,
.site-nav-toggle-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background-color: #ffffff;
  transition: transform 0.25s ease, top 0.25s ease, background-color 0.2s ease;
}

body.light-theme .site-nav-toggle-icon::before,
body.light-theme .site-nav-toggle-icon::after {
  background-color: #333333;
}

.site-nav-toggle-icon::before {
  top: -7px;
}

.site-nav-toggle-icon::after {
  top: 7px;
}

.site-navbar-toggler[aria-expanded="true"] .site-nav-toggle-icon {
  background-color: transparent;
}

.site-navbar-toggler[aria-expanded="true"] .site-nav-toggle-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.site-navbar-toggler[aria-expanded="true"] .site-nav-toggle-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Фиксированная шапка сайта */
.fixed-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
}

body.dark-theme .fixed-top,
body.dark-theme .navbar.site-navbar {
  background-color: rgba(18, 18, 18, 0.92);
}

body.light-theme .fixed-top,
body.light-theme .navbar.site-navbar {
  background-color: rgba(255, 255, 255, 0.95);
}

/* Основная часть сайта */
.feature-box {
  background-color: #1e1e1e;
  border: 1px solid #333;
  padding: 20px;
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

body.light-theme .feature-box {
  background-color: #ffffff;
  border: 1px solid #ddd;
  color: #333;
}

.feature-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Карусель */
.carousel-inner {
  overflow: visible;
}

.carousel-item {
  padding: 10px 0;
}

.carousel-item.active {
  overflow-x: hidden;
}

body.no-scroll {
  overflow-x: hidden;
}

.carousel.sliding {
  overflow-x: hidden;
}

/* Иконки и медиа */
.feature-icon {
  font-size: 3rem;
  color: #2196f3;
  margin-bottom: 15px;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #1e1e1e, #2c3e50);
  color: white;
  padding: 100px 20px;
  text-align: center;
}

body.light-theme .hero-section {
  background: linear-gradient(135deg, #ffffff, #f0f8ff);
  color: #333;
}

.hero-section h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  text-shadow: 1px 2px 2px rgba(0, 0, 0, 0.2);
}

.hero-section p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

/* Кнопки */
.btn-primary {
  background-color: #2196f3;
  border-color: #2196f3;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  background-color: #1976d2;
  border-color: #1976d2;
}

.btn-warning {
  color: #fff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Футер */
.site-footer {
  margin-top: auto;
  background: rgba(18, 18, 18, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #cfd8dc;
  padding: 2.5rem 0 1.5rem;
}

body.light-theme .site-footer {
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  color: #495057;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.04);
}

.site-footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 1.75rem;
}

.site-footer-logo {
  display: inline-flex;
  text-decoration: none !important;
  margin-bottom: 0.85rem;
}

.site-brand-wordmark--footer .site-brand-tap,
.site-brand-wordmark--footer .site-brand-tv {
  padding: 0.32rem 0.5rem;
  font-size: 0.82rem;
}

.site-footer-tagline {
  margin: 0;
  max-width: 28rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #90a4ae;
}

body.light-theme .site-footer-tagline {
  color: #6c757d;
}

.site-footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1.25rem;
}

.site-footer-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #bbdefb !important;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.35rem 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.site-footer-nav a i {
  color: #64b5f6;
  font-size: 1rem;
}

body.light-theme .site-footer-nav a {
  color: #1565c0 !important;
}

body.light-theme .site-footer-nav a i {
  color: #2196f3;
}

.site-footer-nav a:hover {
  color: #ffffff !important;
  transform: translateX(3px);
}

body.light-theme .site-footer-nav a:hover {
  color: #0d47a1 !important;
}

.site-footer-bottom {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

body.light-theme .site-footer-bottom {
  border-top-color: rgba(0, 0, 0, 0.08);
}

.site-footer-copy {
  margin: 0;
  font-size: 0.875rem;
  color: #78909c;
}

body.light-theme .site-footer-copy {
  color: #868e96;
}

@media (max-width: 767.98px) {
  .site-footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .site-footer-nav {
    grid-template-columns: 1fr;
  }
}

/* legacy footer selector fallback */
footer:not(.site-footer) {
  background-color: #121212;
  color: #e0e0e0;
  padding: 20px 0;
  text-align: center;
}

/* Формы авторизации / регистрации (legacy, без hero) */
.auth-page:not(:has(.auth-hero)) {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 3rem 1rem 4rem;
}

.registration-form, .contact-form, .login-form,
.auth-form-card {
  width: 100%;
  max-width: 520px;
  min-width: 0;
  flex-shrink: 0;
  margin: 0 auto;
  padding: 40px 36px;
  background-color: #1e1e1e;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

body.light-theme .registration-form,
body.light-theme .contact-form,
body.light-theme .login-form,
body.light-theme .auth-form-card {
  background-color: #ffffff;
  color: #333;
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.registration-form h2,
.contact-form h3,
.login-form h2,
.registration-form .form-page-title,
.login-form .form-page-title,
.forgot-password-form .form-page-title {
  text-align: center;
  margin-bottom: 30px;
  color: #ffffff;
  transition: color 0.3s ease;
  font-size: 2rem;
  font-weight: 700;
}

body.light-theme .registration-form h2,
body.light-theme .contact-form h3,
body.light-theme .login-form h2,
body.light-theme .registration-form .form-page-title,
body.light-theme .login-form .form-page-title,
body.light-theme .forgot-password-form .form-page-title {
  color: #333;
}

.login-form .form-page-title,
.registration-form .form-page-title {
  margin-bottom: 30px;
}

.form-control::placeholder {
  color: #ddd;
  opacity: 1;
  transition: color 0.3s ease;
}

body.light-theme .form-control::placeholder {
  color: #6c757d;
}

.registration-form label, .contact-form label, .login-form label {
  color: #bbdefb;
  transition: color 0.3s ease;
}

body.light-theme .registration-form label,
body.light-theme .contact-form label,
body.light-theme .login-form label {
  color: #333;
}

.registration-form .form-control, .contact-form .form-control, .login-form .form-control {
  background-color: #333;
  border: 1px solid #444;
  color: #ffffff;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

body.light-theme .registration-form .form-control,
body.light-theme .contact-form .form-control,
body.light-theme .login-form .form-control {
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  color: #333;
}

.registration-form .form-control:focus, .contact-form .form-control:focus, .login-form .form-control:focus {
  background-color: #333;
  border-color: #2196f3;
  box-shadow: 0 0 5px rgba(33, 150, 243, 0.5);
}

body.light-theme .registration-form .form-control:focus,
body.light-theme .contact-form .form-control:focus,
body.light-theme .login-form .form-control:focus {
  background-color: #f8f9fa;
  border-color: #2196f3;
  box-shadow: 0 0 5px rgba(33, 150, 243, 0.5);
}

.registration-form .btn-primary, .contact-form .btn-primary, .login-form .btn-primary {
  width: 100%;
  background-color: #2196f3;
  border-color: #2196f3;
}

.registration-form .btn-primary:hover, .contact-form .btn-primary:hover, .login-form .btn-primary:hover {
  background-color: #1976d2;
  border-color: #1976d2;
}

/* Контактная форма */
.contact-form {
  max-width: 600px;
}

/* Раздел поддержки */
.support-section {
  background-color: #1e1e1e;
  color: #ffffff;
  padding: 60px 20px;
  text-align: center;
}

body.light-theme .support-section {
  background-color: #edf5ee;
  color: #333;
}

.support-section h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.support-section p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

.support-section .btn-outline-light {
  border-color: #ffffff;
  color: #ffffff;
}

.support-section .btn-outline-light:hover {
  background-color: #ffffff;
  color: #1e1e1e;
}

/* Раздел для правообладателей */
.rights-section {
  padding: 40px 20px;
  text-align: left;
}

.rights-section h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #ffffff;
  transition: color 0.3s ease;
}

body.light-theme .rights-section h2 {
  color: #333;
}

.rights-section p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 15px;
  color: #e0e0e0;
  transition: color 0.3s ease;
}

body.light-theme .rights-section p {
  color: #333;
}

/* Контент страницы */
.contact-section {
  padding: 60px 20px;
  text-align: center;
}

.contact-section h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #ffffff;
  transition: color 0.3s ease;
}

body.light-theme .contact-section h2 {
  color: #333;
}

.contact-section p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: #e0e0e0;
  transition: color 0.3s ease;
}

body.light-theme .contact-section p {
  color: #333;
}

.contact-info {
  margin-bottom: 40px;
}

.contact-info i {
  font-size: 2rem;
  color: #2196f3;
  margin-right: 10px;
}

#contactForm {
  text-align: left;
}

/* Раздел с пакетами */
.packages-section {
  padding: 60px 20px;
  text-align: center;
}

.packages-section h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #ffffff;
  transition: color 0.3s ease;
}

body.light-theme .packages-section h2 {
  color: #333;
}

.packages-section p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: #e0e0e0;
  transition: color 0.3s ease;
}

body.light-theme .packages-section p {
  color: #333;
}

/* Карточки тарифов */
.package-card {
  background-color: #1e1e1e;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.light-theme .package-card {
  background-color: #ffffff;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.package-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.package-card h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: #ffffff;
  transition: color 0.3s ease;
}

body.light-theme .package-card h3 {
  color: #333;
}

.package-card .price {
  font-size: 2.2rem;
  font-weight: bold;
  margin-bottom: 10px;
  color: #2196f3;
}

.package-card .channels {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: #bbdefb;
}

.package-card .features {
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}

.package-card .features li {
  font-size: 1rem;
  margin-bottom: 10px;
  color: #e0e0e0;
  transition: color 0.3s ease;
}

body.light-theme .package-card .channels,
body.light-theme .package-card .features li {
  color: #333;
}

/* Блок статуса подписки */
.subscription-status {
  background-color: #1e1e1e;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  margin-top: 30px;
  margin-bottom: 30px;
}

body.light-theme .subscription-status {
  background-color: #ffffff;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.subscription-status h4 {
  margin-bottom: 15px;
  color: #ffffff;
  transition: color 0.3s ease;
}

body.light-theme .subscription-status h4 {
  color: #333;
}

.subscription-status .status-list {
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}

.subscription-status .status-list li {
  font-size: 1rem;
  margin-bottom: 10px;
  color: #bbdefb;
  transition: color 0.3s ease;
}

body.light-theme .subscription-status .status-list li {
  color: #333;
}

/* Стили для блоков категорий */
.channel-categories,
.additional-categories {
  background-color: #1e1e1e;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

body.light-theme .channel-categories,
body.light-theme .additional-categories {
  background-color: #ffffff;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.channel-categories h4,
.additional-categories h4 {
  margin-bottom: 15px;
  color: #ffffff;
  transition: color 0.3s ease;
}

body.light-theme .channel-categories h4,
body.light-theme .additional-categories h4 {
  color: #333;
}

.channel-categories .category,
.additional-categories .category {
  margin-bottom: 15px;
}

.channel-categories .form-check-label,
.additional-categories .form-check-label {
  font-size: 1rem;
  margin-bottom: 10px;
  color: #bbdefb;
  transition: color 0.3s ease;
}

body.light-theme .channel-categories .form-check-label,
body.light-theme .additional-categories .form-check-label {
  color: #333;
}

/* Список каналов (просмотр) — в стиле блока категорий */
.channel-list-view .channel-list-categories {
  max-height: 520px;
}

.channel-list-category-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 5px 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.channel-list-category-name {
  flex: 1;
  font-size: 1rem;
  color: #bbdefb;
  transition: color 0.3s ease;
}

body.light-theme .channel-list-category-name {
  color: #333;
}

.channel-list-category-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.channel-list-category-chevron {
  font-size: 0.85rem;
  opacity: 0.75;
  transition: transform 0.2s ease;
}

.channel-list-category-toggle:not(.collapsed) .channel-list-category-chevron {
  transform: rotate(180deg);
}

.channel-list-category-panel {
  margin-top: 0.35rem;
}

.channel-list-category-actions {
  margin-bottom: 0.5rem;
}

.channel-list-category-panel .channel-list-group {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

body.dark-theme .channel-list-category-panel .channel-list-group {
  border-color: #444444;
}

body.dark-theme .channel-list-category-loading .text-muted {
  color: #bdbdbd !important;
}

/* Секция личного кабинета */
.user-profile-section {
  padding: 60px 20px;
  background: linear-gradient(135deg, #1e1e1e, #2c3e50);
  color: #ffffff;
  transition: background 0.3s ease, color 0.3s ease;
}

body.light-theme .user-profile-section {
  background: linear-gradient(135deg, #ffffff, #f0f8ff);
  color: #333;
}

.user-profile-section h2:not(.page-title):not(.lk-hero-name) {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 40px;
  transition: color 0.3s ease;
}

body.light-theme .user-profile-section h2:not(.page-title):not(.lk-hero-name) {
  color: #333;
}

.page-hero-title {
  text-align: center;
  margin-bottom: 2rem;
}

.page-hero-title .page-title {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  color: #ffffff;
}

body.light-theme .page-hero-title .page-title {
  color: #333;
}

.page-hero-title .page-title-icon {
  flex: 0 0 auto;
}

.page-hero-title .page-title-text {
  flex: 0 1 auto;
}

.page-subtitle {
  margin: 0.75rem 0 0;
  font-size: 1rem;
  color: #90a4ae;
}

body.light-theme .page-subtitle {
  color: #6c757d;
}

.form-page-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  text-align: center;
  color: #ffffff;
}

.form-page-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  line-height: 1;
  color: #64b5f6;
}

.form-page-title-text {
  line-height: 1.15;
}

.form-page-title i {
  color: inherit;
}

body.light-theme .form-page-title {
  color: #333;
}

body.light-theme .form-page-title-icon {
  color: #1976d2;
}

.page-title {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 700;
  margin-bottom: 0;
  letter-spacing: -0.02em;
}

.page-title-text {
  line-height: 1.15;
}

.page-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.28), rgba(102, 126, 234, 0.22));
  color: #90caf9;
  font-size: 1.45rem;
  box-shadow: 0 6px 18px rgba(33, 150, 243, 0.18);
  flex-shrink: 0;
}

body.light-theme .page-title-icon {
  background: linear-gradient(135deg, rgba(25, 118, 210, 0.12), rgba(33, 150, 243, 0.08));
  color: #1976d2;
  box-shadow: 0 6px 18px rgba(33, 150, 243, 0.1);
}

body.light-theme .user-profile-section .page-title {
  color: #333;
}

.user-profile-section .page-hero-title .page-title {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  margin-bottom: 0;
}

.user-profile-section .page-hero-title .page-title-icon {
  flex-shrink: 0;
}

/* Информация о пользователе */
.user-info {
  background-color: #1e1e1e;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  margin-bottom: 30px;
}

body.light-theme .user-info {
  background-color: #ffffff;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.user-info h4 {
  margin-bottom: 15px;
  color: #ffffff;
  transition: color 0.3s ease;
}

body.light-theme .user-info h4 {
  color: #333;
}

.user-info h6 {
  font-size: 1.1rem !important;
}

.user-info .info-list {
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}

.user-info .info-list li {
  font-size: 1rem;
  margin-bottom: 10px;
  color: #bbdefb;
  transition: color 0.3s ease;
}

body.light-theme .user-info .info-list li {
  color: #333;
}

/* Стили для alert в личном кабинете */
.user-profile-section .alert,
.lk-page .alert {
  background-color: #1e3a5f;
  border-color: #0d6efd;
  color: #b3d9ff;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

body.light-theme .user-profile-section .alert,
body.light-theme .lk-page .alert {
  background-color: #d1ecf1;
  border-color: #bee5eb;
  color: #0c5460;
}

.user-profile-section .alert-info,
.lk-page .alert-info {
  background-color: #1e3a5f;
  border-color: #0d6efd;
  color: #b3d9ff;
}

body.light-theme .user-profile-section .alert-info,
body.light-theme .lk-page .alert-info {
  background-color: #d1ecf1;
  border-color: #bee5eb;
  color: #0c5460;
}

.user-profile-section .alert-info strong,
.user-profile-section .alert-info #connections_total_cost_display,
.lk-page .alert-info strong,
.lk-page .alert-info #connections_total_cost_display {
  color: #ffffff;
  font-weight: bold;
}

body.light-theme .user-profile-section .alert-info strong,
body.light-theme .user-profile-section .alert-info #connections_total_cost_display,
body.light-theme .lk-page .alert-info strong,
body.light-theme .lk-page .alert-info #connections_total_cost_display {
  color: #0c5460;
}

/* Личный плейлист */
.personal-playlist {
  background-color: #1e1e1e;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
}

body.light-theme .personal-playlist {
  background-color: #ffffff;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.personal-playlist h4 {
  margin-bottom: 15px;
  color: #ffffff;
  transition: color 0.3s ease;
}

body.light-theme .personal-playlist h4 {
  color: #333;
}

.personal-playlist .playlist-list {
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}

.personal-playlist .playlist-list li {
  font-size: 1rem;
  margin-bottom: 10px;
  color: #bbdefb;
  transition: color 0.3s ease;
}

body.light-theme .personal-playlist .playlist-list li {
  color: #333;
}

/* Реферальная программа */
.referral-program {
  background-color: #1e1e1e;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
}

body.light-theme .referral-program {
  background-color: #ffffff;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.referral-program h4 {
  margin-bottom: 15px;
  color: #ffffff;
  transition: color 0.3s ease;
}

body.light-theme .referral-program h4 {
  color: #333;
}

.referral-program .referral-list {
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}

.referral-program .referral-list li {
  font-size: 1rem;
  margin-bottom: 15px;
  color: #bbdefb;
  transition: color 0.3s ease;
}

body.light-theme .referral-program .referral-list li {
  color: #333;
}

.referral-program .referral-list li strong {
  display: block;
  margin-bottom: 5px;
}

.referral-program .input-group {
  margin-top: 10px;
  margin-bottom: 10px;
}

.referral-program .input-group .form-control {
  background-color: #333;
  border: 1px solid #444;
  color: #ffffff;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

body.light-theme .referral-program .input-group .form-control {
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  color: #333;
}

.referral-program .input-group .form-control:focus {
  background-color: #333;
  border-color: #2196f3;
  color: #ffffff;
  box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
}

body.light-theme .referral-program .input-group .form-control:focus {
  background-color: #ffffff;
  border-color: #2196f3;
  color: #333;
  box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
}

.referral-program .text-success {
  color: #4caf50 !important;
}

body.light-theme .referral-program .text-success {
  color: #28a745 !important;
}

/* Telegram — блок в личном кабинете */
.telegram-lk-block {
  background-color: #1e1e1e;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
}

body.light-theme .telegram-lk-block {
  background-color: #ffffff;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.telegram-lk-block h4 {
  margin-bottom: 15px;
  color: #54a9eb;
  transition: color 0.3s ease;
}

body.light-theme .telegram-lk-block h4 {
  color: #229ED9;
}

.telegram-lk-block .telegram-lk-desc,
.telegram-lk-block .telegram-lk-steps,
.telegram-lk-block .telegram-lk-waiting {
  color: #bbdefb;
  font-size: 0.875rem;
  margin-bottom: 15px;
}

body.light-theme .telegram-lk-block .telegram-lk-desc,
body.light-theme .telegram-lk-block .telegram-lk-steps,
body.light-theme .telegram-lk-block .telegram-lk-waiting {
  color: #666;
}

.telegram-lk-block .telegram-lk-steps {
  padding-left: 1.25rem;
}

.telegram-lk-block .telegram-lk-status {
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.telegram-lk-block .telegram-lk-status--bound {
  background-color: rgba(76, 175, 80, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.35);
  color: #a5d6a7;
}

body.light-theme .telegram-lk-block .telegram-lk-status--bound {
  background-color: rgba(40, 167, 69, 0.1);
  border-color: rgba(40, 167, 69, 0.25);
  color: #155724;
}

.telegram-lk-block .telegram-lk-status small {
  opacity: 0.85;
}

.telegram-lk-block .telegram-lk-actions {
  display: grid;
  gap: 10px;
  margin-bottom: 5px;
}

.telegram-lk-block .input-group {
  margin-top: 10px;
  margin-bottom: 10px;
}

.telegram-lk-block .input-group .form-control {
  background-color: #333;
  border: 1px solid #444;
  color: #ffffff;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

body.light-theme .telegram-lk-block .input-group .form-control {
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  color: #333;
}

.telegram-lk-block .input-group .form-control:focus {
  background-color: #333;
  border-color: #2196f3;
  color: #ffffff;
  box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
}

body.light-theme .telegram-lk-block .input-group .form-control:focus {
  background-color: #ffffff;
  border-color: #2196f3;
  color: #333;
  box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
}

/* Текстовое поле для личного плейлиста */
.personal-playlist textarea {
  background-color: #333;
  border: 1px solid #444;
  color: #ffffff;
  font-family: monospace;
  resize: none;
  margin-bottom: 15px;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

body.light-theme .personal-playlist textarea {
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  color: #333;
}

body.light-theme .personal-playlist textarea:focus {
  background-color: #f8f9fa;
  border-color: #2196f3;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Toast-уведомления для темной темы */
body:not(.light-theme) .toast {
  background-color: #2a2a2a;
  color: #e0e0e0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

body:not(.light-theme) .toast .toast-header {
  background-color: #1e1e1e;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body:not(.light-theme) .toast .toast-body {
  background-color: #2a2a2a;
  color: #e0e0e0;
}

/* Toast-уведомления для светлой темы */
body.light-theme .toast {
  background-color: #f8f9fa;
  color: #333;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.light-theme .toast .toast-header {
  background-color: #e9ecef;
  color: #333;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .toast .toast-body {
  background-color: #f8f9fa;
  color: #333;
}

/* Общие стили для кнопки закрытия */
.toast .btn-close {
  filter: invert(1);
}

body.light-theme .toast .btn-close {
  filter: none;
}

/* Стили для различных типов уведомлений */
body:not(.light-theme) .toast-success .toast-header {
  background-color: #28a745;
}

body.light-theme .toast-success .toast-header {
  background-color: #d4edda;
  color: #155724;
}

body:not(.light-theme) .toast-danger .toast-header {
  background-color: #dc3545;
}

body.light-theme .toast-danger .toast-header {
  background-color: #f8d7da;
  color: #721c24;
}


/* Раздел политики */
.policy-section {
  padding: 60px 20px;
}

.policy-section h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2.5rem;
  color: #ffffff;
  transition: color 0.3s ease;
}

body.light-theme .policy-section h2 {
  color: #333;
}

.policy-section h3 {
  font-size: 1.8rem;
  margin-top: 30px;
  margin-bottom: 20px;
  color: #ffffff;
  transition: color 0.3s ease;
}

body.light-theme .policy-section h3 {
  color: #333;
}

.policy-section p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 15px;
  color: #e0e0e0;
  transition: color 0.3s ease;
}

body.light-theme .policy-section p {
  color: #333;
}

/* Форма авторизации */
.login-form a {
  color: #2196f3;
  text-decoration: underline;
}

.login-form a:hover {
  color: #1976d2;
}

/* Секция помощи */
.help-section {
  padding: 60px 20px;
}

.help-section h2 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  text-align: center;
  transition: color 0.3s ease;
}

body.light-theme .help-section h2 {
  color: #333;
}

/* Аккордеон */
.accordion-item {
  border: none;
  border-radius: 0px;
  overflow: hidden;
  margin-bottom: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body.light-theme .accordion-item {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.accordion-button {
  background-color: #1e1e1e;
  color: #ffffff;
  border: none;
  border-radius: 0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.light-theme .accordion-button {
  background-color: #ffffff;
  color: #333;
  border: 1px solid #ddd;
}

.accordion-button:hover {
  background-color: #333;
}

body.light-theme .accordion-button:hover {
  background-color: #f8f9fa;
  border-color: #ccc;
}

.accordion-button:not(.collapsed) {
  background-color: #2a5298;
  color: #ffffff;
  border-radius: 0;
}

body.light-theme .accordion-button:not(.collapsed) {
  background-color: #b3e5fc;
  color: #333;
  border-color: #b3e5fc;
}

/* Стили для иконки стрелки в accordion-button в темной теме */
body.dark-theme .accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

body.dark-theme .accordion-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  transform: rotate(-180deg);
}

.accordion-body {
  background-color: #2a2a2a;
  color: #bbdefb;
  padding: 20px;
  border: 1px solid #333;
  border-top: none;
  border-radius: 0;
}

body.light-theme .accordion-body {
  background-color: #ffffff;
  color: #333;
  border: 1px solid #ddd;
  border-top: none;
}

/* Стили для accordion-body в темной теме (дополнительная специфичность) */
body.dark-theme .accordion-body,
.dark-theme .accordion-body {
  background-color: #2a2a2a !important;
  color: #bbdefb !important;
}

body.dark-theme .accordion-body .bg-light,
.dark-theme .accordion-body .bg-light {
  background-color: #1e1e1e !important;
  color: #e0e0e0 !important;
  border-color: #333 !important;
}

body.dark-theme .accordion-body .list-group,
.dark-theme .accordion-body .list-group {
  background-color: #2a2a2a !important;
}

body.dark-theme .accordion-body .list-group-item,
.dark-theme .accordion-body .list-group-item {
  background-color: #2a2a2a !important;
  border-color: #333 !important;
  color: #e0e0e0 !important;
}

body.dark-theme .accordion-body .list-group-item:hover,
.dark-theme .accordion-body .list-group-item:hover {
  background-color: #333 !important;
}

/* Стили для accordion-item с border в темной теме */
body.dark-theme .accordion-item.border {
  border-color: #333 !important;
}

body.light-theme .accordion-item.border {
  border-color: #dee2e6 !important;
}

/* Аккордеон в тёмной теме (FAQ и др.) */
body.dark-theme .accordion,
body.dark-theme #faqAccordion {
  --bs-accordion-bg: transparent;
  --bs-accordion-border-color: #333;
  --bs-accordion-border-width: 1px;
  --bs-accordion-active-bg: #2a5298;
  --bs-accordion-active-color: #ffffff;
  --bs-accordion-btn-focus-box-shadow: none;
}

body.dark-theme .accordion-item {
  --bs-accordion-bg: transparent;
  background-color: transparent;
}

body.dark-theme .accordion-button:not(.collapsed) {
  box-shadow: inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color) !important;
  border-bottom: 1px solid #333 !important;
}

body.dark-theme .accordion-collapse {
  border: none !important;
}

body.dark-theme .accordion-body,
.dark-theme .accordion-body {
  border: 1px solid #333 !important;
  border-top: 1px solid #333 !important;
}

/* Стили для кнопки btn-outline-secondary в светлой теме */
.btn-outline-secondary {
  --bs-btn-border-color: #dddddd;
}

/* Toast-уведомления */
.toast {
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast .toast-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.toast .toast-body {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
}

.btn-close-white {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* Стили для категорий */
.categories-container {
  max-height: 600px;
  overflow-y: auto;
  padding: 15px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

.category-item {
  margin-bottom: 10px;
  padding: 5px;
  border-bottom: 1px solid #f0f0f0;
}

.category-item:last-child {
  border-bottom: none;
}

/* Стили для темной темы */
body.dark-theme .categories-container {
  border-color: #444444 !important;
}

body.dark-theme .category-item {
  border-bottom-color: #444444 !important;
}

/* Стили для прокрутки в темной теме */
body.dark-theme .categories-container::-webkit-scrollbar {
  width: 8px;
}

body.dark-theme .categories-container::-webkit-scrollbar-track {
  background: #1e1e1e;
}

body.dark-theme .categories-container::-webkit-scrollbar-thumb {
  background: #444444;
  border-radius: 4px;
}

body.dark-theme .categories-container::-webkit-scrollbar-thumb:hover {
  background: #555555;
}

/* Стили для списка рефералов в темной теме */
body.dark-theme .list-group-item {
  background-color: #1e1e1e !important;
  border-color: #444444 !important;
  color: #e0e0e0 !important;
}

body.dark-theme .list-group-item-action:hover {
  background-color: #2a2a2a !important;
}

.badge {
  font-size: 0.8em;
  padding: 5px 10px;
}

.discount {
  font-size: 0.8em;
  color: #e74c3c;
  font-weight: bold;
}

#theme-toggle {
  cursor: pointer;
}

/* Выравнивание кнопки внутри навигации */
.navbar-nav {
  align-items: center;
}

.nav-item:last-child {
  display: flex;
  align-items: center;
}

/* Меню-бургер */
.navbar-toggler {
  border: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.navbar-toggler:focus {
  outline: none;
  box-shadow: none;
}

.navbar-toggler:focus {
  border-color: #fff;
}

body.light-theme .navbar-toggler:focus {
  border-color: #000;
}

/* Адаптация меню для мобильной версии */
@media (max-width: 991.98px) {
  .site-navbar > .container {
    align-items: flex-start;
  }

  /* Логотип и бургер — на одной горизонтальной оси */
  .site-navbar > .container > .navbar-brand,
  .site-navbar > .container > .navbar-toggler {
    align-self: center;
    flex-shrink: 0;
    height: 40px;
    margin-top: 0;
    margin-bottom: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-navbar > .container > .navbar-brand {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .site-navbar > .container > .navbar-toggler {
    padding: 0 0.55rem;
  }

  .navbar-collapse {
    text-align: left;
  }

  .navbar-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .navbar-nav .nav-item {
    margin-bottom: 10px;
  }

  .navbar-nav .nav-link {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    color: #ffffff;
    transition: color 0.3s ease;
  }

  .navbar-nav .nav-link:hover {
    color: #bbdefb;
  }

  .navbar-nav .nav-link i {
    margin-right: 8px;
  }

  body.light-theme .navbar-nav .nav-link {
    color: #333;
  }

  body.light-theme .navbar-nav .nav-link:hover {
    color: #007bff;
  }
}

/* Стили для активного пункта меню */
.nav-link.active {
  color: #90caf9 !important;
  font-weight: 700;
  position: relative;
  background: rgba(33, 150, 243, 0.16) !important;
}

.site-navbar .nav-link.active::after {
  display: none;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #2196f3;
  transition: all 0.3s ease;
}

body.light-theme .nav-link.active {
  color: #1565c0 !important;
  background: rgba(33, 150, 243, 0.12) !important;
}

body.light-theme .nav-link.active::after {
  background-color: #1976d2;
}

/* Стили для мобильной версии активного пункта меню */
@media (max-width: 991.98px) {
  .site-navbar .navbar-collapse.show,
  .site-navbar .navbar-collapse.collapsing {
    margin-top: 0.75rem;
    padding: 0.75rem 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }

  body.light-theme .site-navbar .navbar-collapse.show,
  body.light-theme .site-navbar .navbar-collapse.collapsing {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.06);
  }

  .site-navbar .nav-link {
    width: 100%;
  }

  .site-navbar .navbar-theme-toggle {
    margin-top: 0.35rem;
    align-self: flex-start;
  }

  .nav-link.active::after {
    bottom: 0;
    height: 100%;
    width: 3px;
    left: -1rem;
  }

  .site-navbar .nav-link.active::after {
    display: block;
    left: 0;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    border-radius: 0 3px 3px 0;
  }
}

/* Стили для страницы пополнения */
.payment-section {
  padding: 3rem 0;
}

.payment-section .card {
  background-color: #1e1e1e;
  border: 1px solid #333;
  color: #e0e0e0;
}

body.light-theme .payment-section .card {
  background-color: #ffffff;
  border: 1px solid #ddd;
  color: #333;
}

.payment-section .card-header {
  background-color: #2a2a2a;
  border-bottom: 1px solid #333;
  color: #ffffff;
}

body.light-theme .payment-section .card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #ddd;
  color: #333;
}

.payment-section .form-control {
  background-color: #333;
  border: 1px solid #444;
  color: #ffffff;
}

body.light-theme .payment-section .form-control {
  background-color: #ffffff;
  border: 1px solid #ddd;
  color: #333;
}

.payment-section .form-control:focus {
  background-color: #333;
  border-color: #2196f3;
  color: #ffffff;
  box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
}

body.light-theme .payment-section .form-control:focus {
  background-color: #ffffff;
  border-color: #2196f3;
  color: #333;
}

/* Стили для дилерского кабинета */
.dealer-profile-section {
  padding: 3rem 0;
}

.dealer-profile-section .card {
  background-color: #1e1e1e;
  border: 1px solid #333;
  color: #e0e0e0;
  margin-bottom: 1.5rem;
}

body.light-theme .dealer-profile-section .card {
  background-color: #ffffff;
  border: 1px solid #ddd;
  color: #333;
}

.dealer-profile-section .card-header {
  background-color: #2a2a2a;
  border-bottom: 1px solid #333;
  color: #ffffff;
}

body.light-theme .dealer-profile-section .card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #ddd;
  color: #333;
}

.dealer-profile-section .card-title {
  color: #ffffff;
  margin-bottom: 1rem;
}

body.light-theme .dealer-profile-section .card-title {
  color: #333;
}

.dealer-profile-section .form-control {
  background-color: #333;
  border: 1px solid #444;
  color: #ffffff;
}

body.light-theme .dealer-profile-section .form-control {
  background-color: #ffffff;
  border: 1px solid #ddd;
  color: #333;
}

.dealer-profile-section .form-control:focus {
  background-color: #333;
  border-color: #2196f3;
  color: #ffffff;
  box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
}

body.light-theme .dealer-profile-section .form-control:focus {
  background-color: #ffffff;
  border-color: #2196f3;
  color: #333;
}

.dealer-profile-section .table {
  color: #e0e0e0;
}

body.light-theme .dealer-profile-section .table {
  color: #333;
}

.dealer-profile-section .table th {
  border-color: #444;
}

body.light-theme .dealer-profile-section .table th {
  border-color: #ddd;
}

.dealer-profile-section .table td {
  border-color: #444;
}

body.light-theme .dealer-profile-section .table td {
  border-color: #ddd;
}

.dealer-profile-section .btn-outline-secondary {
  color: #e0e0e0;
  border-color: #444;
}

.dealer-profile-section .btn-outline-secondary:hover {
  background-color: #444;
  color: #ffffff;
}

body.light-theme .dealer-profile-section .btn-outline-secondary {
  color: #333;
  border-color: #ddd;
}

body.light-theme .dealer-profile-section .btn-outline-secondary:hover {
  background-color: #ddd;
  color: #333;
}

.dealer-profile-section .badge {
  background-color: #2a2a2a;
  color: #e0e0e0;
}

body.light-theme .dealer-profile-section .badge {
  background-color: #f8f9fa;
  color: #333;
}

.dealer-profile-section .alert {
  background-color: #2a2a2a;
  border-color: #444;
  color: #e0e0e0;
}

body.light-theme .dealer-profile-section .alert {
  background-color: #f8f9fa;
  border-color: #ddd;
  color: #333;
}

.dealer-profile-section .alert-success {
  background-color: #1e3a2a;
  border-color: #28a745;
  color: #28a745;
}

body.light-theme .dealer-profile-section .alert-success {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

.dealer-profile-section .alert-danger {
  background-color: #3a1e1e;
  border-color: #dc3545;
  color: #dc3545;
}

body.light-theme .dealer-profile-section .alert-danger {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}


.btn-primary, .btn-success, .btn-danger, .btn-warning, .btn-info { min-width: 90px; }

/* Цвет текста для кнопок действий (для всех тем) */
.btn-warning,
.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active,
.btn-warning.btn-sm,
.btn-warning.btn-sm:hover,
.btn-warning.btn-sm:focus,
.btn-warning.btn-sm:active,
body.light-theme .btn-warning,
body.light-theme .btn-warning:hover,
body.light-theme .btn-warning:focus,
body.light-theme .btn-warning:active,
body.light-theme .btn-warning.btn-sm,
body.light-theme .btn-warning.btn-sm:hover,
body.light-theme .btn-warning.btn-sm:focus,
body.light-theme .btn-warning.btn-sm:active,
body.dark-theme .btn-warning,
body.dark-theme .btn-warning:hover,
body.dark-theme .btn-warning:focus,
body.dark-theme .btn-warning:active,
body.dark-theme .btn-warning.btn-sm,
body.dark-theme .btn-warning.btn-sm:hover,
body.dark-theme .btn-warning.btn-sm:focus,
body.dark-theme .btn-warning.btn-sm:active {
    color: #ffffff !important;
}

.btn-danger,
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active,
.btn-danger.btn-sm,
.btn-danger.btn-sm:hover,
.btn-danger.btn-sm:focus,
.btn-danger.btn-sm:active,
body.light-theme .btn-danger,
body.light-theme .btn-danger:hover,
body.light-theme .btn-danger:focus,
body.light-theme .btn-danger:active,
body.light-theme .btn-danger.btn-sm,
body.light-theme .btn-danger.btn-sm:hover,
body.light-theme .btn-danger.btn-sm:focus,
body.light-theme .btn-danger.btn-sm:active,
body.dark-theme .btn-danger,
body.dark-theme .btn-danger:hover,
body.dark-theme .btn-danger:focus,
body.dark-theme .btn-danger:active,
body.dark-theme .btn-danger.btn-sm,
body.dark-theme .btn-danger.btn-sm:hover,
body.dark-theme .btn-danger.btn-sm:focus,
body.dark-theme .btn-danger.btn-sm:active {
    color: #ffffff !important;
}

.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.btn-sm,
.btn-primary.btn-sm:hover,
.btn-primary.btn-sm:focus,
.btn-primary.btn-sm:active,
body.light-theme .btn-primary,
body.light-theme .btn-primary:hover,
body.light-theme .btn-primary:focus,
body.light-theme .btn-primary:active,
body.light-theme .btn-primary.btn-sm,
body.light-theme .btn-primary.btn-sm:hover,
body.light-theme .btn-primary.btn-sm:focus,
body.light-theme .btn-primary.btn-sm:active,
body.dark-theme .btn-primary,
body.dark-theme .btn-primary:hover,
body.dark-theme .btn-primary:focus,
body.dark-theme .btn-primary:active,
body.dark-theme .btn-primary.btn-sm,
body.dark-theme .btn-primary.btn-sm:hover,
body.dark-theme .btn-primary.btn-sm:focus,
body.dark-theme .btn-primary.btn-sm:active {
    color: #ffffff !important;
}

.btn-success,
.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn-success.btn-sm,
.btn-success.btn-sm:hover,
.btn-success.btn-sm:focus,
.btn-success.btn-sm:active,
body.light-theme .btn-success,
body.light-theme .btn-success:hover,
body.light-theme .btn-success:focus,
body.light-theme .btn-success:active,
body.light-theme .btn-success.btn-sm,
body.light-theme .btn-success.btn-sm:hover,
body.light-theme .btn-success.btn-sm:focus,
body.light-theme .btn-success.btn-sm:active,
body.dark-theme .btn-success,
body.dark-theme .btn-success:hover,
body.dark-theme .btn-success:focus,
body.dark-theme .btn-success:active,
body.dark-theme .btn-success.btn-sm,
body.dark-theme .btn-success.btn-sm:hover,
body.dark-theme .btn-success.btn-sm:focus,
body.dark-theme .btn-success.btn-sm:active {
    color: #ffffff !important;
}


/* Темная тема */
body.dark-theme {
  background: #121212;
  color: #e0e0e0;
}

body.dark-theme .card {
  background: #1e1e1e;
  border-color: #333;
}

body.dark-theme .card-body {
  color: #e0e0e0;
}

body.dark-theme .form-control,
body.dark-theme .form-select {
  background: #2d2d2d;
  border-color: #444;
  color: #e0e0e0;
}

body.dark-theme .form-control:focus,
body.dark-theme .form-select:focus {
  background: #2d2d2d;
  border-color: #666;
  box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.1);
}

body.dark-theme .btn-light {
  background: #333;
  color: #e0e0e0;
}

body.dark-theme .btn-light:hover {
  background: #444;
}

body.dark-theme .text-muted {
  color: #aaa !important;
}

/* Исправление фона collapse-блока в темной теме */

/* Адаптация input-полей: располагаем их сверху вниз */
.card-user .ajax-form {
  display: flex;
  gap: 0.5rem;
}

.card-user .ajax-form .form-group {
  margin-bottom: 0.5rem;
}

/* Цветовая индикация статуса пользователя */
.user-status {
  font-weight: 500;
}

.user-status.trial {
  color: #ffc107; /* Желтый для пробного периода */
}

.user-status.active {
  color: #28a745; /* Зеленый для активной подписки */
}

.user-status.expired {
  color: #dc3545; /* Красный для просроченной/неактивной */
}


/* Стили для вкладок */
.nav-tabs {
  border-bottom: 1px solid #333;
  margin-bottom: 1.5rem;
}

.nav-tabs .nav-link {
  color: #e0e0e0;
  border: 1px solid transparent;
  border-top-left-radius: 0.25rem;
  border-top-right-radius: 0.25rem;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
  border-color: #444;
  color: #2196f3;
}

.nav-tabs .nav-link.active {
  color: #2196f3;
  background-color: #1e1e1e;
  border-color: #333 #333 #1e1e1e;
}

.nav-tabs .nav-link.active::after {
  display: none;
}

body.light-theme .nav-tabs {
  border-bottom: 1px solid #ddd;
}

body.light-theme .nav-tabs .nav-link {
  color: #333;
}

body.light-theme .nav-tabs .nav-link:hover {
  border-color: #ddd;
  color: #1976d2;
}

body.light-theme .nav-tabs .nav-link.active {
  color: #1976d2;
  background-color: #ffffff;
  border-color: #ddd #ddd #ffffff;
}

/* Стили для input в личном кабинете */
.personal-playlist input[type="text"],
.personal-playlist input[type="url"] {
  background-color: #333;
  border: 1px solid #444;
  color: #ffffff;
  padding: 0.5rem;
  border-radius: 0.25rem;
  width: 100%;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.personal-playlist input[type="text"]:focus,
.personal-playlist input[type="url"]:focus {
  background-color: #333;
  border-color: #2196f3;
  color: #ffffff;
  box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
}

body.light-theme .personal-playlist input[type="text"],
body.light-theme .personal-playlist input[type="url"] {
  background-color: #ffffff;
  border: 1px solid #ddd;
  color: #333;
}

body.light-theme .personal-playlist input[type="text"]:focus,
body.light-theme .personal-playlist input[type="url"]:focus {
  background-color: #ffffff;
  border-color: #2196f3;
  color: #333;
  box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
}

/* Спойлер «Изменить аватар» — как поле ссылки плейлиста */
body.dark-theme #lkAvatarAccordion .accordion-item {
  background: transparent;
  border: none !important;
  box-shadow: none;
}

body.dark-theme #lkAvatarAccordion .accordion-button,
body.dark-theme #lkAvatarAccordion .accordion-button:not(.collapsed) {
  background-color: #333 !important;
  border: 1px solid #444 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

body.dark-theme #lkAvatarAccordion .accordion-button {
  border-radius: 0.25rem !important;
}

body.dark-theme #lkAvatarAccordion .accordion-button:not(.collapsed) {
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-bottom-color: #444 !important;
}

body.dark-theme #lkAvatarAccordion .accordion-body {
  background-color: #333 !important;
  border: 1px solid #444 !important;
  border-top: none !important;
  color: #e0e0e0 !important;
  border-bottom-left-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
}

body.light-theme #lkAvatarAccordion .accordion-button,
body.light-theme #lkAvatarAccordion .accordion-button:not(.collapsed) {
  background-color: #ffffff !important;
  border: 1px solid #ddd !important;
  color: #333 !important;
  box-shadow: none !important;
}

body.light-theme #lkAvatarAccordion .accordion-button {
  border-radius: 0.25rem !important;
}

body.light-theme #lkAvatarAccordion .accordion-button:not(.collapsed) {
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

body.light-theme #lkAvatarAccordion .accordion-body {
  background-color: #ffffff !important;
  border: 1px solid #ddd !important;
  border-top: none !important;
  color: #333 !important;
  border-bottom-left-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
}

/* Стили для вкладок устройств */
.devices-section .nav-tabs {
  margin-bottom: 2rem;
}

.devices-section .tab-content {
  background-color: #1e1e1e;
  border: 1px solid #333;
  border-top: none;
  padding: 1.5rem;
  border-radius: 0 0 0.25rem 0.25rem;
}

body.light-theme .devices-section .tab-content {
  background-color: #ffffff;
  border: 1px solid #ddd;
}

/* Стили для вкладок пополнения */
.payment-section .nav-tabs {
  margin-bottom: 2rem;
}

.payment-section .tab-content {
  background-color: #1e1e1e;
  border: 1px solid #333;
  border-top: none;
  padding: 1.5rem;
  border-radius: 0 0 0.25rem 0.25rem;
}

body.light-theme .payment-section .tab-content {
  background-color: #ffffff;
  border: 1px solid #ddd;
}

/* Стили для списков в личном кабинете */
.personal-playlist .playlist-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

.personal-playlist .playlist-list li {
  background-color: #2a2a2a;
  border: 1px solid #333;
  padding: 1rem;
  margin-bottom: 0.5rem;
  border-radius: 0.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

body.light-theme .personal-playlist .playlist-list li {
  background-color: #f8f9fa;
  border: 1px solid #ddd;
}

.personal-playlist .playlist-list li:last-child {
  margin-bottom: 0;
}

.personal-playlist .playlist-list .btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* Стили для кнопок в личном кабинете */
.personal-playlist .btn-group {
  display: flex;
  gap: 0.5rem;
}

.personal-playlist .btn-group .btn {
  flex: 1;
}

.personal-playlist .btn-success {
  background-color: #28a745;
  border-color: #28a745;
}

.personal-playlist .btn-success:hover {
  background-color: #218838;
  border-color: #1e7e34;
}

.personal-playlist .btn-danger {
  background-color: #dc3545;
  border-color: #dc3545;
}

.personal-playlist .btn-danger:hover {
  background-color: #c82333;
  border-color: #bd2130;
}

/* ========== Стили для дилерского кабинета (dealer.php) ========== */

.dealer-header {
  margin-bottom: 0;
}

/* Toast-уведомления дилерского кабинета */
.dealer-toast-compact::before {
  display: none !important;
  content: none !important;
}

.dealer-toast-compact .dealer-toast-row {
  min-height: 100%;
}

.dealer-toast-compact .toast-body {
  align-self: stretch;
  display: flex;
  align-items: center;
}

body.light-theme .dealer-toast-compact .toast-body {
  background-color: #fff !important;
  color: #212529 !important;
}

body:not(.light-theme) .dealer-toast-compact .toast-body {
  background-color: #2a2a2a !important;
  color: #e0e0e0 !important;
}

.dealer-toast-compact .dealer-toast-close-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  flex-shrink: 0;
  min-width: 3rem;
  padding: 0.5rem 0.65rem;
}

.dealer-toast-compact .dealer-toast-close {
  width: 1.35rem;
  height: 1.35rem;
  min-width: 1.35rem;
  min-height: 1.35rem;
  padding: 0;
  margin: 0;
  background-position: center center;
  background-size: 1.35rem;
  opacity: 0.95;
  flex-shrink: 0;
  box-sizing: border-box;
}

.dealer-toast-compact.text-bg-success .dealer-toast-close,
.dealer-toast-compact.text-bg-danger .dealer-toast-close,
.dealer-toast-compact.text-bg-info .dealer-toast-close,
.dealer-toast-compact.text-bg-warning .dealer-toast-close {
  filter: none;
}

.dealer-toast-compact .dealer-toast-close:hover {
  opacity: 1;
}

/* Поиск, сортировка, карточки */
body.dark-theme #userSearch,
body.dark-theme #sortSelect,
body.dark-theme .card-user .form-control,
body.dark-theme .card-user .form-select {
  border-color: #333 !important;
}

body.dark-theme #userSearch:focus,
body.dark-theme #sortSelect:focus,
body.dark-theme .card-user .form-control:focus,
body.dark-theme .card-user .form-select:focus {
  border-color: #555 !important;
}

body.dark-theme #sortSelect {
  color: #e0e0e0 !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23cccccc' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 14px 10px;
}

body.dark-theme #clearSearch.btn-outline-secondary,
body.dark-theme #addUserModal #generatePasswordBtn.btn-outline-secondary {
  --bs-btn-border-color: #333;
  border-color: #333 !important;
  color: #e0e0e0 !important;
}

body.dark-theme #clearSearch.btn-outline-secondary svg {
  fill: #ccc;
  color: #ccc;
}

body.dark-theme #addUserModal #generatePasswordBtn.btn-outline-secondary:hover,
body.dark-theme #addUserModal #generatePasswordBtn.btn-outline-secondary:focus {
  --bs-btn-border-color: #444;
  border-color: #444 !important;
  color: #ffffff !important;
  background-color: #2d2d2d !important;
}

body.dark-theme #addUserModal .btn-close,
body.dark-theme #categoryModal .btn-close,
body.dark-theme #rechargeModal .btn-close,
body.dark-theme #dealerBalanceHistoryModal .btn-close,
body.dark-theme #dealerClientTopupsHistoryModal .btn-close,
body.dark-theme #dealerReferralBalanceHistoryModal .btn-close,
body.dark-theme #liveWatchingModal .btn-close,
body.dark-theme #devicesModal .btn-close {
  --bs-btn-close-opacity: 1;
  opacity: 1;
  filter: none;
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23e0e0e0'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
}

body.dark-theme #addUserModal .btn-close:hover,
body.dark-theme #categoryModal .btn-close:hover,
body.dark-theme #rechargeModal .btn-close:hover,
body.dark-theme #devicesModal .btn-close:hover {
  opacity: 1;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
}

body.dark-theme .card-user.card,
body.dark-theme .dealer-balance-card.card,
body.dark-theme .col-lg-4 > .card.shadow {
  background-color: #1e1e1e !important;
  border: 1px solid #333 !important;
  color: #e0e0e0 !important;
}

body.dark-theme .card-user .card-body,
body.dark-theme .dealer-balance-card .card-body {
  color: #e0e0e0 !important;
  background-color: transparent !important;
}

body.dark-theme .card-user .user-email {
  color: #ffffff !important;
}

body.dark-theme .card-user .section-title {
  color: #e0e0e0 !important;
  border-bottom-color: #444 !important;
}

body.dark-theme .card-user .form-label,
body.dark-theme .card-user .info-label {
  color: #aaa !important;
}

body.dark-theme .card-user .text-muted {
  color: #adb5bd !important;
}

body.dark-theme .card-user .quick-connections-btn {
  --bs-btn-border-color: #333;
  border-color: #333 !important;
}

body.dark-theme .card-user .quick-connections-btn:hover,
body.dark-theme .card-user .quick-connections-btn:focus {
  border-color: #444 !important;
}

body.dark-theme .card-user .quick-connections-btn.active {
  border-color: #6c757d !important;
}

/* Карточка пользователя */
.card-user .section-title {
  font-weight: 700;
  color: inherit;
  margin-bottom: 0.85rem;
}

.card-user .section-title i {
  color: #2196f3;
}

body.light-theme .card-user .section-title i {
  color: #1565c0;
}

.card-user .copy-all-creds-btn {
  white-space: nowrap;
  border-radius: 10px;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  box-shadow: 0 2px 8px rgba(25, 135, 84, 0.22);
}

.card-user .copy-all-creds-btn:hover,
.card-user .copy-all-creds-btn:focus {
  box-shadow: 0 4px 14px rgba(25, 135, 84, 0.32);
}

body.dark-theme .card-user .copy-all-creds-btn {
  box-shadow: 0 2px 10px rgba(25, 135, 84, 0.35);
}

.card-user {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 1.5rem;
}

body.dark-theme .card-user.card {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.2) !important;
}

body.light-theme .card-user {
  border: none;
}

.card-user .card-body {
  padding: 1.5rem;
}

.card-user .user-email {
  font-weight: 600;
  font-size: 1.1rem;
}

.card-user .user-status {
  font-size: 0.95rem;
}

.card-user .actions {
  gap: 0.5rem;
}

.card-user .playlist-url {
  font-size: 0.95rem;
}

.card-user .copy-btn:not(.input-group .copy-btn):not(.input-group-sm .copy-btn) {
  border: none;
  background: none;
}

.card-user .copy-btn svg {
  vertical-align: middle;
}

.card-user .input-group .copy-btn,
.card-user .input-group .copy-short-btn,
.card-user .input-group-sm .copy-btn,
.card-user .input-group-sm .copy-short-btn {
  border: 1px solid #28a745 !important;
  background-color: transparent !important;
}

.card-user .input-group .copy-btn:hover,
.card-user .input-group .copy-short-btn:hover,
.card-user .input-group-sm .copy-btn:hover,
.card-user .input-group-sm .copy-short-btn:hover {
  background-color: #28a745 !important;
  border-color: #28a745 !important;
  color: #fff !important;
}

.card-user .input-group .copy-btn:hover svg,
.card-user .input-group .copy-short-btn:hover svg,
.card-user .input-group-sm .copy-btn:hover svg,
.card-user .input-group-sm .copy-short-btn:hover svg {
  fill: #fff !important;
}

.card-user .badge {
  font-size: 0.85em;
}

.dealer-balance-card {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

body.light-theme .dealer-balance-card {
  border: none;
}

/* Модалки дилерского кабинета (тёмная тема) */
body.dark-theme #addUserModal #categoriesAccordion .accordion-item {
  background: transparent;
  box-shadow: none;
  margin-bottom: 0;
}

body.dark-theme #addUserModal #categoriesAccordion .accordion-button,
body.dark-theme #addUserModal #categoriesAccordion .accordion-button:not(.collapsed) {
  background-color: #2d2d2d !important;
  border: 1px solid #333 !important;
  color: #e0e0e0 !important;
  box-shadow: none !important;
}

body.dark-theme #addUserModal #categoriesAccordion .accordion-button {
  border-radius: 0.375rem !important;
}

body.dark-theme #addUserModal #categoriesAccordion .accordion-button:not(.collapsed) {
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

body.dark-theme #addUserModal #categoriesAccordion .accordion-button::after,
body.dark-theme #addUserModal #categoriesAccordion .accordion-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23cccccc' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
}

body.dark-theme #addUserModal #categoriesAccordion .accordion-body {
  background-color: #2d2d2d !important;
  border: 1px solid #333 !important;
  border-top: none !important;
  color: #e0e0e0 !important;
  border-bottom-left-radius: 0.375rem;
  border-bottom-right-radius: 0.375rem;
}

body.dark-theme #addUserModal .categories-container,
body.dark-theme #categoryModal .categories-container {
  background-color: #1e1e1e !important;
  border-color: #333 !important;
}

body.dark-theme #addUserModal .form-check-input,
body.dark-theme #categoryModal .form-check-input {
  background-color: #1e1e1e !important;
  border: 1px solid #888 !important;
}

body.dark-theme #addUserModal .form-check-input:checked,
body.dark-theme #categoryModal .form-check-input:checked {
  background-color: #0d6efd !important;
  border-color: #0d6efd !important;
}

body.dark-theme #addUserModal .form-check-input:checked[type="checkbox"],
body.dark-theme #categoryModal .form-check-input:checked[type="checkbox"],
body.dark-theme #categoryModal .dealer-channel-checkbox:checked[type="checkbox"] {
  --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
  background-image: var(--bs-form-check-bg-image);
}

body.dark-theme #addUserModal .form-check-label,
body.dark-theme #categoryModal .form-check-label {
  color: #e0e0e0 !important;
}

@media (max-width: 576px) {
  #categoryModal .channels-container {
    max-height: 220px !important;
  }

  #categoryModal .modal-footer {
    position: sticky;
    bottom: 0;
  }
}

body.dark-theme #categoryModal .modal-footer {
  background: #1e1e1e !important;
}

.dealer-scroll-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(33, 150, 243, 0.35);
  background: rgba(18, 18, 18, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #90caf9;
  font-size: 1.15rem;
  line-height: 1;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  z-index: 1040;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease,
    background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dealer-scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.dealer-scroll-top:hover {
  background: rgba(33, 150, 243, 0.22);
  border-color: rgba(33, 150, 243, 0.5);
  color: #e3f2fd;
  box-shadow: 0 6px 24px rgba(33, 150, 243, 0.28);
}

.dealer-scroll-top:focus-visible {
  outline: 2px solid rgba(33, 150, 243, 0.55);
  outline-offset: 2px;
}

body.light-theme .dealer-scroll-top {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(33, 150, 243, 0.28);
  color: #1565c0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

body.light-theme .dealer-scroll-top:hover {
  background: rgba(33, 150, 243, 0.12);
  border-color: rgba(33, 150, 243, 0.45);
  color: #0d47a1;
}

@media (max-width: 575.98px) {
  .dealer-scroll-top {
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

/* Стили для кнопок действий в дилерском кабинете (для всех тем) */
.dealer-profile-section .btn-warning,
.dealer-profile-section .btn-danger,
.dealer-profile-section .btn-primary,
.dealer-profile-section .btn-success,
.dealer-profile-section .btn-info,
.dealer-profile-section .btn-secondary,
.dealer-profile-section .btn-warning.btn-sm,
.dealer-profile-section .btn-danger.btn-sm,
.dealer-profile-section .btn-primary.btn-sm,
.dealer-profile-section .btn-success.btn-sm,
.dealer-profile-section .btn-info.btn-sm,
.dealer-profile-section .btn-secondary.btn-sm,
.card-user .btn-warning,
.card-user .btn-danger,
.card-user .btn-primary,
.card-user .btn-success,
.card-user .btn-info,
.card-user .btn-secondary,
.card-user .btn-warning.btn-sm,
.card-user .btn-danger.btn-sm,
.card-user .btn-primary.btn-sm,
.card-user .btn-success.btn-sm,
.card-user .btn-info.btn-sm,
.card-user .btn-secondary.btn-sm,
body.light-theme .dealer-profile-section .btn-warning,
body.light-theme .dealer-profile-section .btn-danger,
body.light-theme .dealer-profile-section .btn-primary,
body.light-theme .dealer-profile-section .btn-success,
body.light-theme .dealer-profile-section .btn-info,
body.light-theme .dealer-profile-section .btn-secondary,
body.light-theme .dealer-profile-section .btn-warning.btn-sm,
body.light-theme .dealer-profile-section .btn-danger.btn-sm,
body.light-theme .dealer-profile-section .btn-primary.btn-sm,
body.light-theme .dealer-profile-section .btn-success.btn-sm,
body.light-theme .dealer-profile-section .btn-info.btn-sm,
body.light-theme .dealer-profile-section .btn-secondary.btn-sm,
body.light-theme .card-user .btn-warning,
body.light-theme .card-user .btn-danger,
body.light-theme .card-user .btn-primary,
body.light-theme .card-user .btn-success,
body.light-theme .card-user .btn-info,
body.light-theme .card-user .btn-secondary,
body.light-theme .card-user .btn-warning.btn-sm,
body.light-theme .card-user .btn-danger.btn-sm,
body.light-theme .card-user .btn-primary.btn-sm,
body.light-theme .card-user .btn-success.btn-sm,
body.light-theme .card-user .btn-info.btn-sm,
body.light-theme .card-user .btn-secondary.btn-sm,
body.dark-theme .dealer-profile-section .btn-warning,
body.dark-theme .dealer-profile-section .btn-danger,
body.dark-theme .dealer-profile-section .btn-primary,
body.dark-theme .dealer-profile-section .btn-success,
body.dark-theme .dealer-profile-section .btn-info,
body.dark-theme .dealer-profile-section .btn-secondary,
body.dark-theme .dealer-profile-section .btn-warning.btn-sm,
body.dark-theme .dealer-profile-section .btn-danger.btn-sm,
body.dark-theme .dealer-profile-section .btn-primary.btn-sm,
body.dark-theme .dealer-profile-section .btn-success.btn-sm,
body.dark-theme .dealer-profile-section .btn-info.btn-sm,
body.dark-theme .dealer-profile-section .btn-secondary.btn-sm,
body.dark-theme .card-user .btn-warning,
body.dark-theme .card-user .btn-danger,
body.dark-theme .card-user .btn-primary,
body.dark-theme .card-user .btn-success,
body.dark-theme .card-user .btn-info,
body.dark-theme .card-user .btn-secondary,
body.dark-theme .card-user .btn-warning.btn-sm,
body.dark-theme .card-user .btn-danger.btn-sm,
body.dark-theme .card-user .btn-primary.btn-sm,
body.dark-theme .card-user .btn-success.btn-sm,
body.dark-theme .card-user .btn-info.btn-sm,
body.dark-theme .card-user .btn-secondary.btn-sm {
    color: #ffffff !important;
}

.dealer-profile-section .btn-warning:hover,
.dealer-profile-section .btn-warning:focus,
.dealer-profile-section .btn-warning:active,
.dealer-profile-section .btn-warning.btn-sm:hover,
.dealer-profile-section .btn-warning.btn-sm:focus,
.dealer-profile-section .btn-warning.btn-sm:active,
.dealer-profile-section .btn-danger:hover,
.dealer-profile-section .btn-danger:focus,
.dealer-profile-section .btn-danger:active,
.dealer-profile-section .btn-danger.btn-sm:hover,
.dealer-profile-section .btn-danger.btn-sm:focus,
.dealer-profile-section .btn-danger.btn-sm:active,
.dealer-profile-section .btn-primary:hover,
.dealer-profile-section .btn-primary:focus,
.dealer-profile-section .btn-primary:active,
.dealer-profile-section .btn-primary.btn-sm:hover,
.dealer-profile-section .btn-primary.btn-sm:focus,
.dealer-profile-section .btn-primary.btn-sm:active,
.dealer-profile-section .btn-success:hover,
.dealer-profile-section .btn-success:focus,
.dealer-profile-section .btn-success:active,
.dealer-profile-section .btn-success.btn-sm:hover,
.dealer-profile-section .btn-success.btn-sm:focus,
.dealer-profile-section .btn-success.btn-sm:active,
.dealer-profile-section .btn-info:hover,
.dealer-profile-section .btn-info:focus,
.dealer-profile-section .btn-info:active,
.dealer-profile-section .btn-info.btn-sm:hover,
.dealer-profile-section .btn-info.btn-sm:focus,
.dealer-profile-section .btn-info.btn-sm:active,
.dealer-profile-section .btn-secondary:hover,
.dealer-profile-section .btn-secondary:focus,
.dealer-profile-section .btn-secondary:active,
.dealer-profile-section .btn-secondary.btn-sm:hover,
.dealer-profile-section .btn-secondary.btn-sm:focus,
.dealer-profile-section .btn-secondary.btn-sm:active,
.card-user .btn-warning:hover,
.card-user .btn-warning:focus,
.card-user .btn-warning:active,
.card-user .btn-warning.btn-sm:hover,
.card-user .btn-warning.btn-sm:focus,
.card-user .btn-warning.btn-sm:active,
.card-user .btn-danger:hover,
.card-user .btn-danger:focus,
.card-user .btn-danger:active,
.card-user .btn-danger.btn-sm:hover,
.card-user .btn-danger.btn-sm:focus,
.card-user .btn-danger.btn-sm:active,
.card-user .btn-primary:hover,
.card-user .btn-primary:focus,
.card-user .btn-primary:active,
.card-user .btn-primary.btn-sm:hover,
.card-user .btn-primary.btn-sm:focus,
.card-user .btn-primary.btn-sm:active,
.card-user .btn-success:hover,
.card-user .btn-success:focus,
.card-user .btn-success:active,
.card-user .btn-success.btn-sm:hover,
.card-user .btn-success.btn-sm:focus,
.card-user .btn-success.btn-sm:active,
.card-user .btn-info:hover,
.card-user .btn-info:focus,
.card-user .btn-info:active,
.card-user .btn-info.btn-sm:hover,
.card-user .btn-info.btn-sm:focus,
.card-user .btn-info.btn-sm:active,
.card-user .btn-secondary:hover,
.card-user .btn-secondary:focus,
.card-user .btn-secondary:active,
.card-user .btn-secondary.btn-sm:hover,
.card-user .btn-secondary.btn-sm:focus,
.card-user .btn-secondary.btn-sm:active,
body.light-theme .dealer-profile-section .btn-warning:hover,
body.light-theme .dealer-profile-section .btn-warning:focus,
body.light-theme .dealer-profile-section .btn-warning:active,
body.light-theme .dealer-profile-section .btn-warning.btn-sm:hover,
body.light-theme .dealer-profile-section .btn-warning.btn-sm:focus,
body.light-theme .dealer-profile-section .btn-warning.btn-sm:active,
body.light-theme .dealer-profile-section .btn-danger:hover,
body.light-theme .dealer-profile-section .btn-danger:focus,
body.light-theme .dealer-profile-section .btn-danger:active,
body.light-theme .dealer-profile-section .btn-danger.btn-sm:hover,
body.light-theme .dealer-profile-section .btn-danger.btn-sm:focus,
body.light-theme .dealer-profile-section .btn-danger.btn-sm:active,
body.light-theme .dealer-profile-section .btn-primary:hover,
body.light-theme .dealer-profile-section .btn-primary:focus,
body.light-theme .dealer-profile-section .btn-primary:active,
body.light-theme .dealer-profile-section .btn-primary.btn-sm:hover,
body.light-theme .dealer-profile-section .btn-primary.btn-sm:focus,
body.light-theme .dealer-profile-section .btn-primary.btn-sm:active,
body.light-theme .dealer-profile-section .btn-success:hover,
body.light-theme .dealer-profile-section .btn-success:focus,
body.light-theme .dealer-profile-section .btn-success:active,
body.light-theme .dealer-profile-section .btn-success.btn-sm:hover,
body.light-theme .dealer-profile-section .btn-success.btn-sm:focus,
body.light-theme .dealer-profile-section .btn-success.btn-sm:active,
body.light-theme .dealer-profile-section .btn-info:hover,
body.light-theme .dealer-profile-section .btn-info:focus,
body.light-theme .dealer-profile-section .btn-info:active,
body.light-theme .dealer-profile-section .btn-info.btn-sm:hover,
body.light-theme .dealer-profile-section .btn-info.btn-sm:focus,
body.light-theme .dealer-profile-section .btn-info.btn-sm:active,
body.light-theme .dealer-profile-section .btn-secondary:hover,
body.light-theme .dealer-profile-section .btn-secondary:focus,
body.light-theme .dealer-profile-section .btn-secondary:active,
body.light-theme .dealer-profile-section .btn-secondary.btn-sm:hover,
body.light-theme .dealer-profile-section .btn-secondary.btn-sm:focus,
body.light-theme .dealer-profile-section .btn-secondary.btn-sm:active,
body.light-theme .card-user .btn-warning:hover,
body.light-theme .card-user .btn-warning:focus,
body.light-theme .card-user .btn-warning:active,
body.light-theme .card-user .btn-warning.btn-sm:hover,
body.light-theme .card-user .btn-warning.btn-sm:focus,
body.light-theme .card-user .btn-warning.btn-sm:active,
body.light-theme .card-user .btn-danger:hover,
body.light-theme .card-user .btn-danger:focus,
body.light-theme .card-user .btn-danger:active,
body.light-theme .card-user .btn-danger.btn-sm:hover,
body.light-theme .card-user .btn-danger.btn-sm:focus,
body.light-theme .card-user .btn-danger.btn-sm:active,
body.light-theme .card-user .btn-primary:hover,
body.light-theme .card-user .btn-primary:focus,
body.light-theme .card-user .btn-primary:active,
body.light-theme .card-user .btn-primary.btn-sm:hover,
body.light-theme .card-user .btn-primary.btn-sm:focus,
body.light-theme .card-user .btn-primary.btn-sm:active,
body.light-theme .card-user .btn-success:hover,
body.light-theme .card-user .btn-success:focus,
body.light-theme .card-user .btn-success:active,
body.light-theme .card-user .btn-success.btn-sm:hover,
body.light-theme .card-user .btn-success.btn-sm:focus,
body.light-theme .card-user .btn-success.btn-sm:active,
body.light-theme .card-user .btn-info:hover,
body.light-theme .card-user .btn-info:focus,
body.light-theme .card-user .btn-info:active,
body.light-theme .card-user .btn-info.btn-sm:hover,
body.light-theme .card-user .btn-info.btn-sm:focus,
body.light-theme .card-user .btn-info.btn-sm:active,
body.light-theme .card-user .btn-secondary:hover,
body.light-theme .card-user .btn-secondary:focus,
body.light-theme .card-user .btn-secondary:active,
body.light-theme .card-user .btn-secondary.btn-sm:hover,
body.light-theme .card-user .btn-secondary.btn-sm:focus,
body.light-theme .card-user .btn-secondary.btn-sm:active,
body.dark-theme .dealer-profile-section .btn-warning:hover,
body.dark-theme .dealer-profile-section .btn-warning:focus,
body.dark-theme .dealer-profile-section .btn-warning:active,
body.dark-theme .dealer-profile-section .btn-warning.btn-sm:hover,
body.dark-theme .dealer-profile-section .btn-warning.btn-sm:focus,
body.dark-theme .dealer-profile-section .btn-warning.btn-sm:active,
body.dark-theme .dealer-profile-section .btn-danger:hover,
body.dark-theme .dealer-profile-section .btn-danger:focus,
body.dark-theme .dealer-profile-section .btn-danger:active,
body.dark-theme .dealer-profile-section .btn-danger.btn-sm:hover,
body.dark-theme .dealer-profile-section .btn-danger.btn-sm:focus,
body.dark-theme .dealer-profile-section .btn-danger.btn-sm:active,
body.dark-theme .dealer-profile-section .btn-primary:hover,
body.dark-theme .dealer-profile-section .btn-primary:focus,
body.dark-theme .dealer-profile-section .btn-primary:active,
body.dark-theme .dealer-profile-section .btn-primary.btn-sm:hover,
body.dark-theme .dealer-profile-section .btn-primary.btn-sm:focus,
body.dark-theme .dealer-profile-section .btn-primary.btn-sm:active,
body.dark-theme .dealer-profile-section .btn-success:hover,
body.dark-theme .dealer-profile-section .btn-success:focus,
body.dark-theme .dealer-profile-section .btn-success:active,
body.dark-theme .dealer-profile-section .btn-success.btn-sm:hover,
body.dark-theme .dealer-profile-section .btn-success.btn-sm:focus,
body.dark-theme .dealer-profile-section .btn-success.btn-sm:active,
body.dark-theme .dealer-profile-section .btn-info:hover,
body.dark-theme .dealer-profile-section .btn-info:focus,
body.dark-theme .dealer-profile-section .btn-info:active,
body.dark-theme .dealer-profile-section .btn-info.btn-sm:hover,
body.dark-theme .dealer-profile-section .btn-info.btn-sm:focus,
body.dark-theme .dealer-profile-section .btn-info.btn-sm:active,
body.dark-theme .dealer-profile-section .btn-secondary:hover,
body.dark-theme .dealer-profile-section .btn-secondary:focus,
body.dark-theme .dealer-profile-section .btn-secondary:active,
body.dark-theme .dealer-profile-section .btn-secondary.btn-sm:hover,
body.dark-theme .dealer-profile-section .btn-secondary.btn-sm:focus,
body.dark-theme .dealer-profile-section .btn-secondary.btn-sm:active,
body.dark-theme .card-user .btn-warning:hover,
body.dark-theme .card-user .btn-warning:focus,
body.dark-theme .card-user .btn-warning:active,
body.dark-theme .card-user .btn-warning.btn-sm:hover,
body.dark-theme .card-user .btn-warning.btn-sm:focus,
body.dark-theme .card-user .btn-warning.btn-sm:active,
body.dark-theme .card-user .btn-danger:hover,
body.dark-theme .card-user .btn-danger:focus,
body.dark-theme .card-user .btn-danger:active,
body.dark-theme .card-user .btn-danger.btn-sm:hover,
body.dark-theme .card-user .btn-danger.btn-sm:focus,
body.dark-theme .card-user .btn-danger.btn-sm:active,
body.dark-theme .card-user .btn-primary:hover,
body.dark-theme .card-user .btn-primary:focus,
body.dark-theme .card-user .btn-primary:active,
body.dark-theme .card-user .btn-primary.btn-sm:hover,
body.dark-theme .card-user .btn-primary.btn-sm:focus,
body.dark-theme .card-user .btn-primary.btn-sm:active,
body.dark-theme .card-user .btn-success:hover,
body.dark-theme .card-user .btn-success:focus,
body.dark-theme .card-user .btn-success:active,
body.dark-theme .card-user .btn-success.btn-sm:hover,
body.dark-theme .card-user .btn-success.btn-sm:focus,
body.dark-theme .card-user .btn-success.btn-sm:active,
body.dark-theme .card-user .btn-info:hover,
body.dark-theme .card-user .btn-info:focus,
body.dark-theme .card-user .btn-info:active,
body.dark-theme .card-user .btn-info.btn-sm:hover,
body.dark-theme .card-user .btn-info.btn-sm:focus,
body.dark-theme .card-user .btn-info.btn-sm:active,
body.dark-theme .card-user .btn-secondary:hover,
body.dark-theme .card-user .btn-secondary:focus,
body.dark-theme .card-user .btn-secondary:active,
body.dark-theme .card-user .btn-secondary.btn-sm:hover,
body.dark-theme .card-user .btn-secondary.btn-sm:focus,
body.dark-theme .card-user .btn-secondary.btn-sm:active {
    color: #ffffff !important;
}

/* Стили для модального окна устройств */
.devices-modal .table-responsive {
  max-height: 60vh;
  overflow-y: auto;
}

.devices-modal .btn-group .btn {
  margin: 0 1px;
}

.devices-modal .device-info {
  font-size: 0.875rem;
}

.devices-modal .device-type {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.devices-modal .device-type svg {
  flex-shrink: 0;
}

/* Предотвращение сжатия при открытии модального окна */
body.modal-open {
  overflow: hidden;
}

.modal {
  z-index: 1055;
}

.modal-backdrop {
  z-index: 1050;
}

/* Стили для модального окна в темной теме */
body.dark-theme .modal-content {
  background-color: #1e1e1e !important;
  border-color: #333 !important;
  color: #e0e0e0 !important;
}

body.dark-theme .modal-header {
  background-color: #1e1e1e !important;
  border-bottom-color: #333 !important;
  color: #e0e0e0 !important;
}

body.dark-theme .modal-body {
  background-color: #1e1e1e !important;
  color: #e0e0e0 !important;
}

body.dark-theme .modal-footer {
  background-color: #1e1e1e !important;
  border-top-color: #333 !important;
  color: #e0e0e0 !important;
}

body.dark-theme .modal-title {
  color: #e0e0e0 !important;
}

body.dark-theme .modal .form-control,
body.dark-theme .modal .form-select {
  background-color: #2d2d2d !important;
  border-color: #333 !important;
  color: #e0e0e0 !important;
}

body.dark-theme .modal .form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23cccccc' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
}

body.dark-theme .modal .form-control:focus,
body.dark-theme .modal .form-select:focus {
  background-color: #2d2d2d !important;
  border-color: #80bdff !important;
  color: #e0e0e0 !important;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

body.dark-theme .modal .form-control::placeholder,
body.dark-theme .modal .form-select::placeholder {
  color: #888 !important;
}

body.dark-theme .modal .form-label {
  color: #e0e0e0 !important;
}

body.dark-theme .modal .text-muted {
  color: #aaa !important;
}

body.dark-theme .modal .alert {
  background-color: #2d2d2d !important;
  border-color: #444 !important;
  color: #e0e0e0 !important;
}

/* Стили для таблиц в модальных окнах в темной теме */
body.dark-theme .modal .table {
  color: #e0e0e0 !important;
}

body.dark-theme .modal .table thead th {
  background-color: #2d2d2d !important;
  border-color: #444 !important;
  color: #e0e0e0 !important;
}

body.dark-theme .modal .table tbody td {
  background-color: #1e1e1e !important;
  border-color: #333 !important;
  color: #e0e0e0 !important;
}

body.dark-theme .modal .table-striped tbody tr:nth-of-type(odd) {
  background-color: #252525 !important;
}

body.dark-theme .modal .table-striped tbody tr:nth-of-type(even) {
  background-color: #1e1e1e !important;
}

body.dark-theme .modal .table-striped tbody tr:nth-of-type(odd) td {
  background-color: #252525 !important;
  color: #e0e0e0 !important;
}

body.dark-theme .modal .table-striped tbody tr:nth-of-type(even) td {
  background-color: #1e1e1e !important;
  color: #e0e0e0 !important;
}

body.dark-theme .modal .login-history-table {
  color: #e0e0e0 !important;
}

body.dark-theme .modal .login-history-table thead th {
  background-color: #2d2d2d !important;
  border-color: #444 !important;
  color: #ffffff !important;
  font-weight: bold;
}

body.dark-theme .modal .login-history-table tbody td {
  border-color: #333 !important;
  color: #e0e0e0 !important;
}

body.dark-theme .modal .login-history-table tbody tr:nth-of-type(odd) {
  background-color: #252525 !important;
}

body.dark-theme .modal .login-history-table tbody tr:nth-of-type(even) {
  background-color: #1e1e1e !important;
}

/* Дополнительные стили для модальных окон в темной теме (на случай если класс применяется не к body) */
.dark-theme .modal-content,
body.dark-theme .modal-content {
  background-color: #1e1e1e !important;
  border-color: #333 !important;
  color: #e0e0e0 !important;
}

.dark-theme .modal-body,
body.dark-theme .modal-body {
  background-color: #1e1e1e !important;
  color: #e0e0e0 !important;
}

.dark-theme .modal .table,
body.dark-theme .modal .table {
  color: #e0e0e0 !important;
}

.dark-theme .modal .table thead th,
body.dark-theme .modal .table thead th {
  background-color: #2d2d2d !important;
  border-color: #444 !important;
  color: #ffffff !important;
}

.dark-theme .modal .table tbody td,
body.dark-theme .modal .table tbody td {
  border-color: #333 !important;
  color: #e0e0e0 !important;
}

.dark-theme .modal .table-striped tbody tr:nth-of-type(odd),
body.dark-theme .modal .table-striped tbody tr:nth-of-type(odd) {
  background-color: #252525 !important;
}

.dark-theme .modal .table-striped tbody tr:nth-of-type(even),
body.dark-theme .modal .table-striped tbody tr:nth-of-type(even) {
  background-color: #1e1e1e !important;
}

body.light-theme .modal-content {
  background-color: #ffffff !important;
  border-color: #dee2e6 !important;
  color: #333 !important;
}

body.light-theme .modal-header {
  background-color: #ffffff !important;
  border-bottom-color: #dee2e6 !important;
  color: #333 !important;
}

body.light-theme .modal-body {
  background-color: #ffffff !important;
  color: #333 !important;
}

body.light-theme .modal-footer {
  background-color: #ffffff !important;
  border-top-color: #dee2e6 !important;
  color: #333 !important;
}

/* Стили для нового интерфейса */
.info-section {
  background: #f8f9fa;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

/* Стили для темной темы - колонки и секции */
body.dark-theme .col-md-6,
body.dark-theme .col-md-3,
body.dark-theme .col-12 {
  background-color: transparent !important;
}

body.dark-theme .info-section {
  background: #1e1e1e !important;
  border: 1px solid #333 !important;
  color: #e0e0e0 !important;
}

body.light-theme .info-section {
  background: #f8f9fa !important;
  border: 1px solid #dee2e6 !important;
  color: #333 !important;
}

.section-title {
  color: #495057;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 0.5rem;
}

body.dark-theme .section-title {
  color: #e0e0e0 !important;
  border-bottom: 1px solid #444 !important;
}

body.light-theme .section-title {
  color: #495057 !important;
  border-bottom: 1px solid #dee2e6 !important;
}

.info-item {
  margin-bottom: 0.75rem;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-label {
  font-size: 0.8rem;
  color: #6c757d;
  font-weight: 500;
  margin-bottom: 0.25rem;
  display: block;
}

body.dark-theme .info-label {
  color: #aaa !important;
}

body.light-theme .info-label {
  color: #6c757d !important;
}

.info-value {
  font-size: 0.9rem;
  color: #212529;
}

body.dark-theme .info-value,
body.dark-theme .info-value * {
  color: #e0e0e0 !important;
}

body.light-theme .info-value {
  color: #212529 !important;
}

.actions-section {
  background: #f8f9fa;
  border-radius: 0.5rem;
  padding: 1rem;
}

body.dark-theme .actions-section {
  background: #1e1e1e !important;
  border: 1px solid #333 !important;
  color: #e0e0e0 !important;
}

body.dark-theme .actions-section * {
  color: #e0e0e0 !important;
}

body.light-theme .actions-section {
  background: #f8f9fa !important;
  border: 1px solid #dee2e6 !important;
  color: #333 !important;
}

body.light-theme .actions-section * {
  color: #333 !important;
}

.user-status {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 0.25rem;
  font-weight: 500;
  display: inline-block;
  max-width: 200px;
  word-wrap: break-word;
  white-space: normal;
  line-height: 1.2;
}

.user-status.active {
  background-color: #d1edff;
  color: #0c5460;
}

.user-status.trial {
  background-color: #fff3cd;
  color: #856404;
}

.user-status.expired {
  background-color: #f8d7da;
  color: #721c24;
}

.user-note {
  border-left: 3px solid #007bff;
  background-color: #f8f9fa !important;
  font-size: 0.85rem;
  line-height: 1.4;
}

/* Стили для темной темы - блок примечания */
body.dark-theme .user-note,
body.dark-theme .user-note.bg-light {
  background-color: #2d2d2d !important;
  border-left-color: #007bff !important;
  color: #e0e0e0 !important;
}

body.dark-theme .user-note strong,
body.dark-theme .user-note.bg-light strong {
  color: #e0e0e0 !important;
}

body.dark-theme .user-note .text-muted,
body.dark-theme .user-note.bg-light .text-muted {
  color: #aaa !important;
}

/* Стили для темной темы - общий класс bg-light */
body.dark-theme .bg-light {
  background-color: #2d2d2d !important;
  color: #e0e0e0 !important;
}

body.dark-theme .bg-light code,
body.dark-theme .bg-light span {
  color: #e0e0e0 !important;
}

/* Улучшенные кнопки */
.btn-group-sm > .btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

/* Быстрые действия */
.btn-group.flex-wrap {
  gap: 0.25rem;
}

.btn-group.flex-wrap > .btn {
  margin-bottom: 0.25rem;
  border-radius: 0.25rem !important;
}

.btn-group.flex-wrap > .btn:not(:last-child) {
  margin-right: 0.25rem;
}

/* Анимация для копирования */
.copy-btn.text-success,
.copy-short-btn.text-success {
  background-color: #d4edda !important;
  border-color: #c3e6cb !important;
  color: #155724 !important;
}

/* Убеждаемся, что обе кнопки копирования имеют одинаковый стиль */
.input-group .copy-btn,
.input-group .copy-short-btn {
  border-color: #28a745;
  color: #28a745;
  background-color: transparent;
  transition: all 0.2s ease;
  width: auto;
  min-width: 38px;
  padding: 0.25rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-group .copy-btn svg,
.input-group .copy-short-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.input-group .copy-btn:hover,
.input-group .copy-short-btn:hover {
  background-color: #28a745 !important;
  border-color: #28a745 !important;
  color: #fff !important;
}

.input-group .copy-btn:hover svg,
.input-group .copy-short-btn:hover svg {
  fill: #fff !important;
}

.input-group .copy-btn:focus,
.input-group .copy-short-btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
  border-color: #28a745;
  color: #28a745;
}

.input-group .copy-btn:active,
.input-group .copy-short-btn:active {
  background-color: #218838;
  border-color: #1e7e34;
  color: #fff;
}

/* Для обратной совместимости (если кнопки используются вне input-group) */
.copy-btn,
.copy-short-btn {
  border-color: #28a745;
  color: #28a745;
  background-color: transparent;
  transition: all 0.2s ease;
}

.copy-btn:hover,
.copy-short-btn:hover {
  background-color: #28a745;
  border-color: #28a745;
  color: #fff;
}

.copy-btn:focus,
.copy-short-btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
  border-color: #28a745;
  color: #28a745;
}

.copy-btn:active,
.copy-short-btn:active {
  background-color: #218838;
  border-color: #1e7e34;
  color: #fff;
}

/* Улучшенные поля ввода */
.form-control:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Стили для темной темы - поля ввода */
body.dark-theme .form-control,
body.dark-theme .note-input {
  background-color: #2d2d2d !important;
  border-color: #444 !important;
  color: #e0e0e0 !important;
}

/* Специфичные стили для поля примечания в дилерском кабинете */
body.dark-theme .form-control.note-input,
body.dark-theme input.note-input,
body.dark-theme .input-group .form-control.note-input,
body.dark-theme .input-group-sm .form-control.note-input,
body.dark-theme .info-value .form-control.note-input,
body.dark-theme .info-value input.note-input,
body.dark-theme .info-value .input-group .form-control.note-input,
body.dark-theme .info-value .input-group-sm .form-control.note-input {
  background-color: #2d2d2d !important;
  border-color: #444 !important;
  color: #e0e0e0 !important;
}

body.dark-theme .form-control:focus,
body.dark-theme .note-input:focus {
  background-color: #2d2d2d !important;
  border-color: #80bdff !important;
  color: #e0e0e0 !important;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

body.dark-theme .form-control.note-input:focus,
body.dark-theme input.note-input:focus,
body.dark-theme .input-group .form-control.note-input:focus,
body.dark-theme .input-group-sm .form-control.note-input:focus,
body.dark-theme .info-value .form-control.note-input:focus,
body.dark-theme .info-value input.note-input:focus,
body.dark-theme .info-value .input-group .form-control.note-input:focus,
body.dark-theme .info-value .input-group-sm .form-control.note-input:focus {
  background-color: #2d2d2d !important;
  border-color: #80bdff !important;
  color: #e0e0e0 !important;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

body.dark-theme .form-control::placeholder,
body.dark-theme .note-input::placeholder {
  color: #888 !important;
}

body.dark-theme .form-control.note-input::placeholder,
body.dark-theme input.note-input::placeholder,
body.dark-theme .info-value .form-control.note-input::placeholder,
body.dark-theme .info-value input.note-input::placeholder {
  color: #888 !important;
}

/* Стили для светлой темы - поля ввода */
body.light-theme .form-control,
body.light-theme .note-input {
  background-color: #ffffff !important;
  border-color: #ddd !important;
  color: #333 !important;
}

body.light-theme .form-control:focus,
body.light-theme .note-input:focus {
  background-color: #ffffff !important;
  border-color: #80bdff !important;
  color: #333 !important;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
  .info-section {
    padding: 0.75rem;
  }
  
  .section-title {
    font-size: 0.85rem;
  }
  
  .info-label {
    font-size: 0.75rem;
  }
  
  .info-value {
    font-size: 0.85rem;
  }
  
  .btn-group-sm > .btn {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }
  
  .user-status {
    max-width: 150px;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }
  
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }
  
  .modal-content {
    border-radius: 0.5rem;
  }
  
  .devices-modal .table-responsive {
    max-height: 50vh;
  }
  
  .devices-modal .btn-group {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .devices-modal .btn-group .btn {
    margin: 0;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }
  
  .categories-container {
    max-height: 250px !important;
  }
  
  .card-user {
    margin-bottom: 1rem;
  }
  
  .user-email {
    font-size: 0.9rem;
    word-break: break-all;
  }
  
  .actions {
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  
  .actions .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
  }
}

/* ========== Стили для страницы устройств (devices.php) ========== */

.content-body {
    background-color: transparent;
    min-height: calc(100vh - 57px);
    padding: 2rem 0;
}

body.dark-theme .content-body {
    background-color: #121212;
    color: #e0e0e0;
}

body.light-theme .content-body {
    background-color: #ffffff;
    color: #333;
}

/* Карточка */
.card {
    border: 1px solid #333;
    background-color: #1e1e1e;
}

body.light-theme .card {
    border: 1px solid #ddd;
    background-color: #ffffff;
}

.card-title {
    color: #e0e0e0;
}

body.light-theme .card-title {
    color: #333;
}

/* Таблица */
.devices-table th {
    border-top: none;
    font-weight: 600;
    color: #e0e0e0;
    background-color: #2d2d2d;
    border-bottom: 2px solid #444;
}

body.light-theme .devices-table th {
    color: #495057;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.devices-table td {
    vertical-align: middle;
    color: #e0e0e0;
    border-bottom: 1px solid #333;
}

body.light-theme .devices-table td {
    color: #333;
    border-bottom: 1px solid #dee2e6;
}

.devices-table tbody {
    background-color: #1e1e1e !important;
}

.devices-table tbody tr {
    background-color: #1e1e1e !important;
}

body.dark-theme .devices-table tbody {
    background-color: #1e1e1e !important;
}

body.dark-theme .devices-table tbody tr {
    background-color: #1e1e1e !important;
}

body.dark-theme .devices-table tbody td {
    background-color: transparent !important;
}

body.light-theme .devices-table tbody {
    background-color: #ffffff !important;
}

body.light-theme .devices-table tbody tr {
    background-color: #ffffff !important;
}

.badge {
    font-size: 0.75rem;
}

code {
    font-size: 0.85rem;
    background-color: #2d2d2d;
    color: #ff6b6b;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
}

body.light-theme code {
    background-color: #f8f9fa;
    color: #dc3545;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

body.light-theme .table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Текст */
.text-muted {
    color: #aaa !important;
}

body.light-theme .text-muted {
    color: #6c757d !important;
}

.text-primary {
    color: #2196f3 !important;
}

@media (max-width: 768px) {
    .devices-table {
        font-size: 0.85rem;
    }
    
    .devices-table th,
    .devices-table td {
        padding: 0.5rem 0.25rem;
    }
}

/* ========== Стили для личного кабинета (lk.php) ========== */

@keyframes highlight {
  0% { background-color: #fff; }
  50% { background-color: #d4edda; }
  100% { background-color: #fff; }
}

/* Стили для списка каналов */
.channel-card {
  background: #fff;
  border-radius: 6px;
  transition: all 0.2s ease;
  border: 1px solid #dee2e6;
  margin-bottom: 6px;
}

.channel-card:hover {
  background: #f8f9fa;
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.channel-logo-wrapper {
  position: relative;
  width: 45px;
  height: 45px;
  flex-shrink: 0;
}

.channel-logo {
  width: 45px;
  height: 45px;
  object-fit: contain;
  background: #f8f9fa;
  padding: 4px;
}

.channel-logo-placeholder {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  font-size: 1.3rem;
}

.channel-name {
  font-size: 0.95rem;
  color: #212529;
  line-height: 1.3;
}

.channel-card:hover .channel-name {
  color: #007bff;
}

.channel-meta {
  margin-top: 4px;
}

.channel-meta .badge {
  font-size: 0.7rem;
  padding: 3px 7px;
  font-weight: 500;
}

.channel-list-group {
  max-height: 500px;
  overflow-y: auto;
}

/* Красивый скроллбар */
.channel-list-group::-webkit-scrollbar {
  width: 6px;
}

.channel-list-group::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.channel-list-group::-webkit-scrollbar-thumb {
  background: #6c757d;
  border-radius: 10px;
}

.channel-list-group::-webkit-scrollbar-thumb:hover {
  background: #495057;
}

/* Стили для channel-list-group в темной теме */
body.dark-theme .channel-list-group,
.dark-theme .channel-list-group {
  background-color: #2a2a2a !important;
}

body.dark-theme .channel-list-group .list-group-item,
.dark-theme .channel-list-group .list-group-item {
  background-color: #2a2a2a !important;
  border-color: #333 !important;
  color: #e0e0e0 !important;
}

body.dark-theme .channel-list-group .list-group-item:hover,
.dark-theme .channel-list-group .list-group-item:hover {
  background-color: #333 !important;
}

body.dark-theme .channel-list-group::-webkit-scrollbar-track,
.dark-theme .channel-list-group::-webkit-scrollbar-track {
  background: #1e1e1e !important;
}

body.dark-theme .channel-list-group::-webkit-scrollbar-thumb,
.dark-theme .channel-list-group::-webkit-scrollbar-thumb {
  background: #555 !important;
}

body.dark-theme .channel-list-group::-webkit-scrollbar-thumb:hover,
.dark-theme .channel-list-group::-webkit-scrollbar-thumb:hover {
  background: #666 !important;
}

/* Карточки каналов: базовые .channel-card задали белый фон — в тёмной теме выравниваем с accordion */
body.dark-theme .channel-card,
.dark-theme .channel-card {
  background-color: #2d2d2d !important;
  border-color: #444444 !important;
}

body.dark-theme .channel-card:hover,
.dark-theme .channel-card:hover {
  background-color: #383838 !important;
  border-color: #0d6efd !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

body.dark-theme .channel-name,
.dark-theme .channel-name {
  color: #e8e8e8 !important;
}

body.dark-theme .channel-card:hover .channel-name,
.dark-theme .channel-card:hover .channel-name {
  color: #74b9ff !important;
}

body.dark-theme .channel-logo,
.dark-theme .channel-logo {
  background: #252525 !important;
}

body.dark-theme .channel-meta .badge.bg-light,
.dark-theme .channel-meta .badge.bg-light {
  background-color: #3a3a3a !important;
  color: #eaeaea !important;
  border-color: #555 !important;
}

/* Анимация появления */
.channel-item {
  animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Кнопки копирования */
.btn-copy-category {
  padding: 2px 8px;
  font-size: 0.8rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.btn-copy-category:hover {
  background: #007bff !important;
  color: white !important;
  border-color: #007bff !important;
}

/* Адаптивность */
@media (max-width: 768px) {
  .channel-logo-wrapper {
    width: 38px;
    height: 38px;
  }
  
  .channel-logo,
  .channel-logo-placeholder {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }
  
  .channel-name {
    font-size: 0.85rem;
  }
  
  .channel-meta .badge {
    font-size: 0.65rem;
    padding: 2px 5px;
  }
  
  .btn-copy-category {
    padding: 1px 6px;
    font-size: 0.7rem;
  }
}

/* ========== Стили для страницы тарифов (tarifffs.php) ========== */

.tariff-card {
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: 2px solid #dee2e6;
    height: 100%;
}

.tariff-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: #007bff;
}

.tariff-card.selected {
    border-color: #007bff;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

.popular-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
    z-index: 10;
}

.price-display {
    font-size: 2.5rem;
    font-weight: bold;
    color: #007bff;
}

.days-badge {
    background: #007bff;
    color: white;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.hd-icon-wrapper {
    display: inline-block;
    animation: pulse-hd 2s ease-in-out infinite;
}

@keyframes pulse-hd {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ========== Стили для страницы оплаты (payment.php) ========== */
/* Стили уже включены в секцию "Стили для страницы тарифов" выше */

/* ========== Стили для страницы buy.php ========== */

/* Стили для темной темы */
.dark-layout .card {
    background-color: #283046 !important;
    color: #fff !important;
}

.dark-layout .card-body {
    background-color: #283046 !important;
    color: #fff !important;
}

.dark-layout .form-control {
    background-color: #161d31 !important;
    border-color: #404656 !important;
    color: #fff !important;
}

.dark-layout .alert-warning {
    background-color: #483d1c !important;
    color: #ffc107 !important;
    border-color: #675d2d !important;
}

.dark-layout .input-group-text {
    background-color: #161d31 !important;
    border-color: #404656 !important;
    color: #fff !important;
}

.dark-layout .badge.bg-light-success {
    background-color: #28544c !important;
    color: #28c76f !important;
}

.dark-layout h4 {
    color: #fff !important;
}

.content-header-title {
    float: none !important;
    text-align: center;
    display: block;
}

.content-header .breadcrumb {
    display: none;
}

/* Стили для светлой темы остаются без изменений */
.card {
    transition: all 0.3s ease;
}

/* Дополнительные стили для кнопок в темной теме */
.dark-layout .btn-outline-primary {
    border-color: #7367f0 !important;
    color: #7367f0 !important;
}

.dark-layout .btn-outline-primary:hover {
    background-color: #7367f0 !important;
    color: #fff !important;
}

/* ========== Стили для страницы новостей ========== */

/* Заголовок страницы */
.news-header {
    text-align: center;
}

.news-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0;
    display: inline-flex;
    align-items: center;
}

.news-title i {
    color: #0d6efd;
}

/* Пустое состояние */
.news-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    border: 2px dashed #dee2e6;
}

.empty-icon {
    font-size: 4rem;
    color: #adb5bd;
}

.empty-text {
    font-size: 1.25rem;
    color: #6c757d;
    margin: 0;
}

/* Карточка новости */
.news-article {
    animation: fadeIn 0.5s ease-in;
}

.news-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
}

.news-body {
    padding: 3rem;
}

/* Содержимое новости */
.news-content {
    word-wrap: break-word;
    line-height: 1.58;
    font-size: 1.1rem;
    color: #2c3e50;
    font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
}

.news-content p {
    margin-top: 0;
    /* синхрон с .news-editor-visual в adms2/news.php (раньше 0.65rem давало большие промежутки, чем в редакторе) */
    margin-bottom: 0.4rem;
    text-align: justify;
}

.news-content p:last-child {
    margin-bottom: 0;
}

.news-content h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
    line-height: 1.3;
}

.news-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 1.1rem;
    margin-bottom: 0.45rem;
    color: #1a1a1a;
    line-height: 1.3;
}

.news-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.35rem;
    color: #2c3e50;
    line-height: 1.4;
}

.news-content h4, .news-content h5, .news-content h6 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 0.85rem;
    margin-bottom: 0.3rem;
    color: #2c3e50;
}

.news-content ul, .news-content ol {
    margin-bottom: 0.45rem;
    margin-top: 0.25rem;
    padding-left: 2.5rem;
    line-height: 1.58;
}

.news-content ul li, .news-content ol li {
    margin-bottom: 0.2rem;
}

.news-content ul {
    list-style-type: disc;
}

.news-content ol {
    list-style-type: decimal;
}

.news-content a {
    color: #0d6efd;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.news-content a:hover {
    color: #0a58ca;
    border-bottom-color: #0a58ca;
}

.news-content strong, .news-content b {
    font-weight: 700;
    color: #1a1a1a;
}

.news-content em, .news-content i {
    font-style: italic;
}

.news-content u {
    text-decoration: underline;
}

.news-content blockquote {
    border-left: 4px solid #0d6efd;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #6c757d;
}

.news-content hr {
    border: none;
    border-top: 2px solid #e9ecef;
    /* раньше 2rem+2rem суммировалось с margin у <p> — между двумя новостями в одном news.txt было слишком широко */
    margin: 0.75rem 0;
}

/* Анимация появления */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность для новостей */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .news-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    .news-body {
        padding: 1.5rem 1.25rem;
    }
    
    .news-content {
        font-size: 1rem;
        line-height: 1.55;
        text-align: left;
    }
    
    .news-content p {
        margin-bottom: 0.38rem;
        text-align: left;
        font-size: 1rem;
    }
    
    .news-content h1 {
        font-size: 1.5rem;
        margin-top: 1.5rem;
        margin-bottom: 0.875rem;
        line-height: 1.3;
    }
    
    .news-content h2 {
        font-size: 1.35rem;
        margin-top: 1.5rem;
        margin-bottom: 0.875rem;
        line-height: 1.3;
    }
    
    .news-content h3 {
        font-size: 1.2rem;
        margin-top: 1.25rem;
        margin-bottom: 0.75rem;
        line-height: 1.4;
    }
    
    .news-content h4, .news-content h5, .news-content h6 {
        font-size: 1.1rem;
        margin-top: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    .news-content ul, .news-content ol {
        margin-bottom: 0.4rem;
        margin-top: 0.22rem;
        padding-left: 1.75rem;
        line-height: 1.55;
    }
    
    .news-content ul li, .news-content ol li {
        margin-bottom: 0.15rem;
    }
    
    .news-content blockquote {
        padding-left: 1rem;
        margin: 1.25rem 0;
        font-size: 0.95rem;
    }
    
    .news-card {
        border-radius: 15px;
    }
    
    .empty-icon {
        font-size: 3rem;
    }
    
    .empty-text {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .news-title {
        font-size: 1.5rem;
    }
    
    .news-body {
        padding: 1.25rem 1rem;
    }
    
    .news-content {
        font-size: 0.95rem;
        line-height: 1.52;
    }
    
    .news-content p {
        font-size: 0.95rem;
        margin-bottom: 0.36rem;
    }
    
    .news-content h1 {
        font-size: 1.35rem;
    }
    
    .news-content h2 {
        font-size: 1.25rem;
    }
    
    .news-content h3 {
        font-size: 1.15rem;
    }
    
    .news-content ul, .news-content ol {
        padding-left: 1.5rem;
    }
}

/* Темная тема для новостей */
body.dark-theme .news-card,
html.dark-theme .news-card {
    background: #1e1e1e;
    border-color: #333;
}

body.dark-theme .news-content,
html.dark-theme .news-content {
    color: #e0e0e0;
}

body.dark-theme .news-content h1,
body.dark-theme .news-content h2,
body.dark-theme .news-content h3,
body.dark-theme .news-content h4,
body.dark-theme .news-content h5,
body.dark-theme .news-content h6,
html.dark-theme .news-content h1,
html.dark-theme .news-content h2,
html.dark-theme .news-content h3,
html.dark-theme .news-content h4,
html.dark-theme .news-content h5,
html.dark-theme .news-content h6 {
    color: #ffffff;
}

body.dark-theme .news-content strong,
body.dark-theme .news-content b,
html.dark-theme .news-content strong,
html.dark-theme .news-content b {
    color: #ffffff;
}

/* Текст из редактора с инлайном color/color:rgb(...) остаётся тёмным — inline бьёт обычные правила темы */
html.dark-theme .news-content [style*="color"]:not(.badge):not(.btn),
body.dark-theme .news-content [style*="color"]:not(.badge):not(.btn),
.dark-theme .news-content [style*="color"]:not(.badge):not(.btn),
html.dark-theme .news-content font[color]:not(.badge),
body.dark-theme .news-content font[color]:not(.badge),
.dark-theme .news-content font[color]:not(.badge) {
    color: #e0e0e0 !important;
}

html.dark-theme .news-content p,
body.dark-theme .news-content p,
.dark-theme .news-content p,
html.dark-theme .news-content li,
body.dark-theme .news-content li,
.dark-theme .news-content li {
    color: #e0e0e0;
}

html.dark-theme .news-content a[style*="color"],
body.dark-theme .news-content a[style*="color"],
.dark-theme .news-content a[style*="color"] {
    color: #7aa7ff !important;
}

body.dark-theme .news-empty-state,
html.dark-theme .news-empty-state {
    background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
    border-color: #444;
}

body.dark-theme .empty-text,
html.dark-theme .empty-text {
    color: #adb5bd;
}

/* Дополнительные стили для кнопок действий - гарантированный белый цвет текста */
button.btn-warning,
button.btn-danger,
button.btn-primary,
button.btn-success,
button.btn-info,
button.btn-secondary,
button.btn-warning.btn-sm,
button.btn-danger.btn-sm,
button.btn-primary.btn-sm,
button.btn-success.btn-sm,
button.btn-info.btn-sm,
button.btn-secondary.btn-sm,
body.light-theme button.btn-warning,
body.light-theme button.btn-danger,
body.light-theme button.btn-primary,
body.light-theme button.btn-success,
body.light-theme button.btn-info,
body.light-theme button.btn-secondary,
body.light-theme button.btn-warning.btn-sm,
body.light-theme button.btn-danger.btn-sm,
body.light-theme button.btn-primary.btn-sm,
body.light-theme button.btn-success.btn-sm,
body.light-theme button.btn-info.btn-sm,
body.light-theme button.btn-secondary.btn-sm,
body.dark-theme button.btn-warning,
body.dark-theme button.btn-danger,
body.dark-theme button.btn-primary,
body.dark-theme button.btn-success,
body.dark-theme button.btn-info,
body.dark-theme button.btn-secondary,
body.dark-theme button.btn-warning.btn-sm,
body.dark-theme button.btn-danger.btn-sm,
body.dark-theme button.btn-primary.btn-sm,
body.dark-theme button.btn-success.btn-sm,
body.dark-theme button.btn-info.btn-sm,
body.dark-theme button.btn-secondary.btn-sm {
    color: #ffffff !important;
}

button.btn-warning:hover,
button.btn-warning:focus,
button.btn-warning:active,
button.btn-danger:hover,
button.btn-danger:focus,
button.btn-danger:active,
button.btn-primary:hover,
button.btn-primary:focus,
button.btn-primary:active,
button.btn-success:hover,
button.btn-success:focus,
button.btn-success:active,
button.btn-info:hover,
button.btn-info:focus,
button.btn-info:active,
button.btn-secondary:hover,
button.btn-secondary:focus,
button.btn-secondary:active,
button.btn-warning.btn-sm:hover,
button.btn-warning.btn-sm:focus,
button.btn-warning.btn-sm:active,
button.btn-danger.btn-sm:hover,
button.btn-danger.btn-sm:focus,
button.btn-danger.btn-sm:active,
button.btn-primary.btn-sm:hover,
button.btn-primary.btn-sm:focus,
button.btn-primary.btn-sm:active,
button.btn-success.btn-sm:hover,
button.btn-success.btn-sm:focus,
button.btn-success.btn-sm:active,
button.btn-info.btn-sm:hover,
button.btn-info.btn-sm:focus,
button.btn-info.btn-sm:active,
button.btn-secondary.btn-sm:hover,
button.btn-secondary.btn-sm:focus,
button.btn-secondary.btn-sm:active,
body.light-theme button.btn-warning:hover,
body.light-theme button.btn-warning:focus,
body.light-theme button.btn-warning:active,
body.light-theme button.btn-danger:hover,
body.light-theme button.btn-danger:focus,
body.light-theme button.btn-danger:active,
body.light-theme button.btn-primary:hover,
body.light-theme button.btn-primary:focus,
body.light-theme button.btn-primary:active,
body.light-theme button.btn-success:hover,
body.light-theme button.btn-success:focus,
body.light-theme button.btn-success:active,
body.light-theme button.btn-warning.btn-sm:hover,
body.light-theme button.btn-warning.btn-sm:focus,
body.light-theme button.btn-warning.btn-sm:active,
body.light-theme button.btn-danger.btn-sm:hover,
body.light-theme button.btn-danger.btn-sm:focus,
body.light-theme button.btn-danger.btn-sm:active,
body.light-theme button.btn-primary.btn-sm:hover,
body.light-theme button.btn-primary.btn-sm:focus,
body.light-theme button.btn-primary.btn-sm:active,
body.light-theme button.btn-success.btn-sm:hover,
body.light-theme button.btn-success.btn-sm:focus,
body.light-theme button.btn-success.btn-sm:active,
body.light-theme button.btn-info:hover,
body.light-theme button.btn-info:focus,
body.light-theme button.btn-info:active,
body.light-theme button.btn-secondary:hover,
body.light-theme button.btn-secondary:focus,
body.light-theme button.btn-secondary:active,
body.light-theme button.btn-info.btn-sm:hover,
body.light-theme button.btn-info.btn-sm:focus,
body.light-theme button.btn-info.btn-sm:active,
body.light-theme button.btn-secondary.btn-sm:hover,
body.light-theme button.btn-secondary.btn-sm:focus,
body.light-theme button.btn-secondary.btn-sm:active,
body.dark-theme button.btn-warning:hover,
body.dark-theme button.btn-warning:focus,
body.dark-theme button.btn-warning:active,
body.dark-theme button.btn-danger:hover,
body.dark-theme button.btn-danger:focus,
body.dark-theme button.btn-danger:active,
body.dark-theme button.btn-primary:hover,
body.dark-theme button.btn-primary:focus,
body.dark-theme button.btn-primary:active,
body.dark-theme button.btn-success:hover,
body.dark-theme button.btn-success:focus,
body.dark-theme button.btn-success:active,
body.dark-theme button.btn-warning.btn-sm:hover,
body.dark-theme button.btn-warning.btn-sm:focus,
body.dark-theme button.btn-warning.btn-sm:active,
body.dark-theme button.btn-danger.btn-sm:hover,
body.dark-theme button.btn-danger.btn-sm:focus,
body.dark-theme button.btn-danger.btn-sm:active,
body.dark-theme button.btn-primary.btn-sm:hover,
body.dark-theme button.btn-primary.btn-sm:focus,
body.dark-theme button.btn-primary.btn-sm:active,
body.dark-theme button.btn-success.btn-sm:hover,
body.dark-theme button.btn-success.btn-sm:focus,
body.dark-theme button.btn-success.btn-sm:active,
body.dark-theme button.btn-info:hover,
body.dark-theme button.btn-info:focus,
body.dark-theme button.btn-info:active,
body.dark-theme button.btn-secondary:hover,
body.dark-theme button.btn-secondary:focus,
body.dark-theme button.btn-secondary:active,
body.dark-theme button.btn-info.btn-sm:hover,
body.dark-theme button.btn-info.btn-sm:focus,
body.dark-theme button.btn-info.btn-sm:active,
body.dark-theme button.btn-secondary.btn-sm:hover,
body.dark-theme button.btn-secondary.btn-sm:focus,
body.dark-theme button.btn-secondary.btn-sm:active {
    color: #ffffff !important;
}

/* ========== Главная страница ========== */

.home-top-alert {
  border-radius: 0;
  z-index: 1040;
}

.home-page {
  flex: 1;
}

.home-hero {
  position: relative;
  overflow: hidden;
  padding: 3.75rem 0 1rem;
  color: #fff;
}

.home-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% -10%, rgba(33, 150, 243, 0.42), transparent 55%),
    radial-gradient(circle at 85% 80%, rgba(102, 126, 234, 0.22), transparent 40%),
    linear-gradient(155deg, #0b1220 0%, #0d3b7a 42%, rgba(21, 101, 192, 0.5) 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 48%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 48%, transparent 100%);
}

body.light-theme .home-hero-bg {
  background:
    radial-gradient(ellipse 90% 70% at 50% -10%, rgba(33, 150, 243, 0.18), transparent 55%),
    radial-gradient(circle at 85% 80%, rgba(33, 150, 243, 0.1), transparent 40%),
    linear-gradient(155deg, #ffffff 0%, #e3f2fd 42%, rgba(187, 222, 251, 0.45) 72%, transparent 100%);
}

.home-hero-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 88%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 88%);
}

.home-hero-glow--left {
  top: 10%;
  left: -8%;
  background: #2196f3;
}

.home-hero-glow--right {
  bottom: 0;
  right: -5%;
  background: #667eea;
}

body.light-theme .home-hero {
  color: #1a237e;
}

body.light-theme .home-hero-glow {
  opacity: 0.2;
}

.home-hero > .container {
  position: relative;
  z-index: 1;
}

.site-brand-wordmark--hero .site-brand-tap,
.site-brand-wordmark--hero .site-brand-tv {
  padding: 0.55rem 0.85rem;
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  letter-spacing: 0.06em;
}

.site-brand-wordmark--hero {
  box-shadow: 0 12px 40px rgba(21, 101, 192, 0.35);
  border-radius: 8px;
}

.home-hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  margin-bottom: 1.25rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

body.light-theme .home-hero-badge {
  background: rgba(21, 101, 192, 0.08);
  border-color: rgba(21, 101, 192, 0.15);
  color: #1565c0;
}

.home-hero-title {
  font-size: clamp(1.85rem, 4.5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.home-hero-lead {
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 640px;
  margin: 0 auto 2rem;
  opacity: 0.92;
  line-height: 1.6;
}

body.light-theme .home-hero-lead {
  color: #37474f;
  opacity: 1;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.home-btn-primary {
  border-radius: 12px;
  padding: 0.75rem 1.6rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(33, 150, 243, 0.35);
}

.home-btn-outline {
  border-radius: 12px;
  padding: 0.75rem 1.6rem;
  font-weight: 700;
  border-width: 2px;
}

body.light-theme .home-btn-outline {
  color: #1565c0 !important;
  border-color: #1565c0 !important;
}

body.light-theme .home-btn-outline:hover {
  background: #1565c0 !important;
  color: #fff !important;
}

.home-hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.home-stat {
  min-width: 120px;
  padding: 1rem 1.35rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

body.light-theme .home-stat {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(21, 101, 192, 0.12);
  box-shadow: 0 8px 24px rgba(21, 101, 192, 0.08);
}

.home-stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
  color: #90caf9;
}

body.light-theme .home-stat-value {
  color: #1565c0;
}

.home-stat-label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  opacity: 0.85;
}

body.light-theme .home-stat-label {
  color: #546e7a;
  opacity: 1;
}

.home-features,
.home-steps {
  padding-bottom: 4rem;
}

.home-features {
  padding-top: 1.75rem;
  background: #121212;
}

body.light-theme .home-features {
  background: #f8fbff;
}

.home-feature-card {
  height: 100%;
  padding: 1.75rem 1.5rem;
  border-radius: 16px;
  background: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

body.light-theme .home-feature-card {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

.home-feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(33, 150, 243, 0.15);
  border-color: rgba(33, 150, 243, 0.25);
}

.home-feature-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  margin-bottom: 1rem;
  font-size: 1.45rem;
  color: #fff;
  background: linear-gradient(135deg, #1565c0, #2196f3);
  box-shadow: 0 6px 18px rgba(33, 150, 243, 0.25);
}

.home-feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.home-feature-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #b0bec5;
}

body.light-theme .home-feature-card p {
  color: #607d8b;
}

.home-steps {
  padding-top: 4rem;
  background: linear-gradient(180deg, rgba(21, 101, 192, 0.06) 0%, transparent 100%);
}

body.dark-theme .home-steps,
body:not(.light-theme) .home-steps {
  background: linear-gradient(180deg, rgba(33, 150, 243, 0.08) 0%, transparent 100%);
}

.home-step-card {
  position: relative;
  height: 100%;
  text-align: center;
  padding: 2rem 1.5rem 1.75rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.home-step-card--link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.home-step-card--link:hover,
.home-step-card--link:focus-visible {
  color: inherit;
  text-decoration: none;
}

body.light-theme .home-step-card {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

.home-step-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(33, 150, 243, 0.15);
  border-color: rgba(33, 150, 243, 0.25);
  cursor: pointer;
}

.home-step-num {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  color: #fff;
  background: linear-gradient(135deg, #1565c0, #2196f3);
  user-select: none;
  pointer-events: none;
}

.home-step-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.6rem;
  color: #2196f3;
  background: rgba(33, 150, 243, 0.12);
}

body.light-theme .home-step-icon {
  background: rgba(33, 150, 243, 0.1);
  color: #1565c0;
}

.home-step-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.home-step-card p {
  margin: 0;
  font-size: 0.92rem;
  color: #90a4ae;
}

body.light-theme .home-step-card p {
  color: #607d8b;
}

.home-support {
  padding: 0 0 4rem;
}

.home-support-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2rem;
  padding: 2rem 2.25rem;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(21, 101, 192, 0.95) 0%, rgba(33, 150, 243, 0.9) 100%);
  color: #fff;
  box-shadow: 0 16px 48px rgba(21, 101, 192, 0.28);
}

body.light-theme .home-support-card {
  background: linear-gradient(135deg, #1565c0 0%, #2196f3 100%);
}

.home-support-icon {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.15);
}

.home-support-body {
  flex: 1;
  min-width: 220px;
}

.home-support-body h2 {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.home-support-body p {
  margin-bottom: 1.15rem;
  opacity: 0.92;
  max-width: 520px;
}

.home-support-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.home-support-actions .btn-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.25;
  min-height: 3rem;
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}

.home-support-actions .btn-lg i {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.btn-telegram {
  background: #fff;
  color: #1565c0 !important;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.btn-telegram:hover {
  background: #e3f2fd;
  color: #0d47a1 !important;
  transform: translateY(-1px);
}

.btn-support-chat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #fff !important;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  font-weight: 700;
  box-shadow: none;
}

.btn-support-chat:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff !important;
  border-color: #fff;
  transform: translateY(-1px);
}

.home-features .page-title,
.home-steps .page-title {
  color: inherit;
}

@media (max-width: 767.98px) {
  .home-hero {
    padding: 2.5rem 0 0.75rem;
  }

  .home-support-card {
    text-align: center;
    justify-content: center;
    padding: 1.75rem 1.25rem;
  }

  .home-support-body p {
    margin-left: auto;
    margin-right: auto;
  }

  .home-support-actions {
    justify-content: center;
  }
}

/* ===== Auth: вход, регистрация, восстановление пароля (FAQ-style) ===== */
.auth-page {
  flex: 1;
  display: block;
}

.auth-hero {
  position: relative;
  overflow: hidden;
  padding: 3.75rem 0 1rem;
  color: #fff;
}

.auth-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(33, 150, 243, 0.38), transparent 58%),
    linear-gradient(155deg, #0b1220 0%, #0d3b7a 42%, rgba(21, 101, 192, 0.5) 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 48%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 48%, transparent 100%);
}

body.light-theme .auth-hero-bg {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(33, 150, 243, 0.16), transparent 58%),
    linear-gradient(155deg, #ffffff 0%, #e3f2fd 42%, rgba(187, 222, 251, 0.45) 72%, transparent 100%);
}

body.light-theme .auth-hero {
  color: #1a237e;
}

.auth-hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.auth-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.95rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

body.light-theme .auth-hero-badge {
  background: rgba(21, 101, 192, 0.08);
  border-color: rgba(21, 101, 192, 0.15);
  color: #1565c0;
}

.auth-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.auth-hero-lead {
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.65;
  opacity: 0.92;
  margin: 0;
}

body.light-theme .auth-hero-lead {
  color: #37474f;
  opacity: 1;
}

.auth-content {
  padding: 0 0 4rem;
  margin-top: -0.25rem;
  position: relative;
  z-index: 2;
}

.auth-panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

body.light-theme .auth-panel {
  background: #fff;
  border-color: rgba(25, 118, 210, 0.08);
  box-shadow: 0 4px 24px rgba(33, 150, 243, 0.06);
}

.auth-panel-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.35rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

body.light-theme .auth-panel-head {
  background: #fafafa;
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

.auth-panel-head-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  flex-shrink: 0;
  font-size: 1.15rem;
  color: #fff;
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.55), rgba(102, 126, 234, 0.4));
}

.auth-panel-head-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.95);
}

body.light-theme .auth-panel-head-title {
  color: #1a237e;
}

.auth-panel-head-sub {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.6);
}

body.light-theme .auth-panel-head-sub {
  color: #78909c;
}

.auth-panel-body {
  padding: 1.75rem 1.5rem 2rem;
}

@media (min-width: 768px) {
  .auth-panel-body {
    padding: 2rem 2.25rem 2.25rem;
  }
}

.auth-perks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.35rem;
}

@media (max-width: 575px) {
  .auth-perks {
    grid-template-columns: 1fr;
  }
}

.auth-perk {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  padding: 0.75rem 0.5rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.78rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.82);
}

body.light-theme .auth-perk {
  background: #f8fbff;
  border-color: rgba(25, 118, 210, 0.1);
  color: #546e7a;
}

.auth-perk i {
  font-size: 1.15rem;
  color: #64b5f6;
}

body.light-theme .auth-perk i {
  color: #1976d2;
}

.auth-perk strong {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.95);
}

body.light-theme .auth-perk strong {
  color: #263238;
}

.auth-promo-note {
  margin-bottom: 1.35rem;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  border: 1px solid rgba(33, 150, 243, 0.35);
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.22), rgba(102, 126, 234, 0.12));
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
}

body.light-theme .auth-promo-note {
  background: linear-gradient(135deg, rgba(227, 242, 253, 0.98), rgba(187, 222, 251, 0.55));
  border-color: rgba(21, 101, 192, 0.2);
  color: #263238;
}

.auth-panel-body .form-label {
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: rgba(255, 255, 255, 0.88);
}

body.light-theme .auth-panel-body .form-label {
  color: #37474f;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap .form-control {
  padding-right: 2.75rem;
}

.auth-input-toggle {
  position: absolute;
  top: 50%;
  right: 0.65rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.auth-input-toggle:hover {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.06);
}

body.light-theme .auth-input-toggle {
  color: #90a4ae;
}

body.light-theme .auth-input-toggle:hover {
  color: #1976d2;
  background: rgba(25, 118, 210, 0.08);
}

.auth-panel-body .form-control {
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.92);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.light-theme .auth-panel-body .form-control {
  background: #f8f9fa;
  border-color: rgba(0, 0, 0, 0.1);
  color: #263238;
}

.auth-panel-body .form-control:focus {
  border-color: rgba(33, 150, 243, 0.65);
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.18);
  background: rgba(0, 0, 0, 0.25);
  color: rgba(255, 255, 255, 0.92);
}

body.light-theme .auth-panel-body .form-control:focus {
  background: #fff;
  border-color: #2196f3;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.15);
  color: #263238;
}

.auth-panel-body .form-text {
  font-size: 0.8rem;
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.55);
}

body.light-theme .auth-panel-body .form-text {
  color: #78909c;
}

.auth-captcha {
  display: flex;
  align-items: stretch;
  gap: 0.55rem;
}

.auth-captcha-task {
  flex: 0 0 auto;
  min-width: 7.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: rgba(33, 150, 243, 0.16);
  border: 1px solid rgba(33, 150, 243, 0.35);
  color: #e3f2fd;
}

body.light-theme .auth-captcha-task {
  background: #e3f2fd;
  border-color: rgba(25, 118, 210, 0.25);
  color: #1565c0;
}

.auth-captcha .form-control {
  flex: 1 1 auto;
  min-width: 0;
}

.auth-captcha-refresh {
  flex: 0 0 auto;
  width: 2.75rem;
  padding: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-captcha input::-webkit-outer-spin-button,
.auth-captcha input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.auth-captcha input[type='number'] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.auth-captcha-error {
  display: none;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ef5350;
}

.auth-captcha-error.is-visible {
  display: block;
}

body.light-theme .auth-captcha-error {
  color: #c62828;
}

.auth-panel-body .form-check-input {
  border-radius: 4px;
  margin-top: 0.2rem;
}

.auth-panel-body .form-check-label {
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}

body.light-theme .auth-panel-body .form-check-label {
  color: #546e7a;
}

.auth-panel-body .form-check-label a {
  color: #90caf9;
  font-weight: 600;
  text-decoration: none;
}

.auth-panel-body .form-check-label a:hover {
  text-decoration: underline;
}

body.light-theme .auth-panel-body .form-check-label a {
  color: #1976d2;
}

.auth-panel-body .btn-primary,
.auth-panel-body .auth-btn-primary {
  width: 100%;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  padding: 0.72rem 1rem;
  color: #fff;
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 55%, #1565c0 100%);
  box-shadow: 0 4px 16px rgba(33, 150, 243, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.auth-panel-body .btn-primary:hover:not(:disabled),
.auth-panel-body .auth-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(33, 150, 243, 0.42);
  color: #fff;
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 55%, #1565c0 100%);
}

.auth-panel-body .btn-primary:disabled,
.auth-panel-body .auth-btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.auth-panel-body .btn-secondary,
.auth-panel-body .btn-success {
  border-radius: 12px;
  font-weight: 600;
  padding: 0.65rem 1rem;
}


/* TAPTV_AUTH_OAUTH_BTNS */
.auth-or {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.1rem 0 !important;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-or::before,
.auth-or::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
}

body.light-theme .auth-or {
  color: #90a4ae;
}

body.light-theme .auth-or::before,
body.light-theme .auth-or::after {
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.12), transparent);
}

.auth-oauth {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.auth-oauth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 2.85rem;
  padding: 0.68rem 1rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none !important;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, filter 0.2s ease;
}

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

.auth-oauth-btn:active {
  transform: translateY(0);
}

.auth-oauth-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.auth-oauth-btn__icon svg {
  display: block;
}

/* Google: всегда белая кнопка — читается и на тёмной, и на светлой панели */
.auth-oauth-btn--google,
body.light-theme .auth-oauth-btn--google,
body.dark-theme .auth-oauth-btn--google,
html.dark-theme .auth-oauth-btn--google,
html.light-theme .auth-oauth-btn--google {
  color: #3c4043 !important;
  background: #ffffff !important;
  border-color: #dadce0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.auth-oauth-btn--google:hover,
body.light-theme .auth-oauth-btn--google:hover,
body.dark-theme .auth-oauth-btn--google:hover,
html.dark-theme .auth-oauth-btn--google:hover,
html.light-theme .auth-oauth-btn--google:hover {
  color: #202124 !important;
  background: #f8f9fa !important;
  border-color: #c6c9ce !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.auth-oauth-btn--google .auth-oauth-btn__icon,
body.dark-theme .auth-oauth-btn--google .auth-oauth-btn__icon,
html.dark-theme .auth-oauth-btn--google .auth-oauth-btn__icon {
  background: #fff;
  box-shadow: none;
}

.auth-oauth-btn--telegram {
  color: #fff;
  background: linear-gradient(135deg, #34b7f1 0%, #229ed9 55%, #1b86bf 100%);
  border-color: rgba(34, 158, 217, 0.45);
  box-shadow: 0 4px 16px rgba(34, 158, 217, 0.28);
}

.auth-oauth-btn--telegram:hover {
  color: #fff;
  border-color: rgba(27, 134, 191, 0.65);
  box-shadow: 0 6px 20px rgba(34, 158, 217, 0.38);
  background: linear-gradient(135deg, #47c2f7 0%, #229ed9 50%, #1780b5 100%);
}

.auth-oauth-btn--telegram .auth-oauth-btn__icon {
  background: rgba(255, 255, 255, 0.96);
}

.auth-panel-links {
  margin-top: 1.35rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

body.light-theme .auth-panel-links {
  border-top-color: rgba(0, 0, 0, 0.08);
}

.auth-panel-links a,
.auth-back-link {
  text-decoration: none;
  font-weight: 600;
  color: #90caf9;
  transition: color 0.2s ease;
}

.auth-panel-links a:hover,
.auth-back-link:hover {
  color: #bbdefb;
  text-decoration: underline;
}

body.light-theme .auth-panel-links a,
body.light-theme .auth-back-link {
  color: #1976d2;
}

body.light-theme .auth-panel-links a:hover,
body.light-theme .auth-back-link:hover {
  color: #1565c0;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.9rem;
}

.auth-panel-body .alert {
  border-radius: 12px;
  font-size: 0.92rem;
  margin-bottom: 1.15rem;
}

/* Плавные уведомления на auth-страницах */
.auth-alert {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-bottom: 0;
  transition:
    grid-template-rows 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.35s ease,
    margin-bottom 0.45s ease;
}

.auth-alert.is-visible {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-bottom: 1.15rem;
}

.auth-alert > .auth-alert-box {
  overflow: hidden;
}

.auth-alert-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.95rem 1.1rem;
  border-radius: 14px;
  border: 1px solid transparent;
  line-height: 1.5;
  font-size: 0.92rem;
  transform: translateY(-6px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.35s ease;
}

.auth-alert.is-visible .auth-alert-inner {
  transform: translateY(0);
  opacity: 1;
}

.auth-alert-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  flex-shrink: 0;
  font-size: 1.15rem;
  margin-top: 0.05rem;
}

.auth-alert-text {
  flex: 1;
  min-width: 0;
}

.auth-alert--success .auth-alert-inner {
  background: linear-gradient(135deg, rgba(46, 125, 50, 0.18), rgba(102, 187, 106, 0.1));
  border-color: rgba(76, 175, 80, 0.35);
  color: #a5d6a7;
}

body.light-theme .auth-alert--success .auth-alert-inner {
  background: linear-gradient(135deg, rgba(232, 245, 233, 0.98), rgba(200, 230, 201, 0.65));
  border-color: rgba(76, 175, 80, 0.35);
  color: #2e7d32;
}

.auth-alert--success .auth-alert-icon {
  color: #66bb6a;
  animation: authAlertIconPop 0.55s cubic-bezier(0.34, 1.4, 0.64, 1) 0.1s both;
}

body.light-theme .auth-alert--success .auth-alert-icon {
  color: #43a047;
}

.auth-alert--danger .auth-alert-inner {
  background: linear-gradient(135deg, rgba(211, 47, 47, 0.16), rgba(239, 83, 80, 0.08));
  border-color: rgba(229, 57, 53, 0.32);
  color: #ef9a9a;
}

body.light-theme .auth-alert--danger .auth-alert-inner {
  background: linear-gradient(135deg, rgba(255, 235, 238, 0.98), rgba(255, 205, 210, 0.55));
  border-color: rgba(229, 57, 53, 0.28);
  color: #c62828;
}

.auth-alert--danger .auth-alert-icon {
  color: #ef5350;
}

.auth-alert--info .auth-alert-inner {
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.16), rgba(100, 181, 246, 0.08));
  border-color: rgba(33, 150, 243, 0.28);
  color: #90caf9;
}

body.light-theme .auth-alert--info .auth-alert-inner {
  background: linear-gradient(135deg, rgba(227, 242, 253, 0.98), rgba(187, 222, 251, 0.55));
  border-color: rgba(33, 150, 243, 0.22);
  color: #1565c0;
}

.auth-alert--warning .auth-alert-inner {
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.16), rgba(255, 193, 7, 0.08));
  border-color: rgba(255, 152, 0, 0.32);
  color: #ffcc80;
}

body.light-theme .auth-alert--warning .auth-alert-inner {
  background: linear-gradient(135deg, rgba(255, 243, 224, 0.98), rgba(255, 224, 178, 0.55));
  border-color: rgba(255, 152, 0, 0.28);
  color: #e65100;
}

.auth-alert--promo .auth-alert-inner {
  background: linear-gradient(135deg, rgba(156, 39, 176, 0.18), rgba(33, 150, 243, 0.12));
  border-color: rgba(171, 71, 188, 0.32);
  color: #ce93d8;
}

body.light-theme .auth-alert--promo .auth-alert-inner {
  background: linear-gradient(135deg, rgba(243, 229, 245, 0.98), rgba(225, 190, 231, 0.55));
  border-color: rgba(156, 39, 176, 0.25);
  color: #7b1fa2;
}

.auth-alert--promo .auth-alert-icon {
  color: #ba68c8;
  animation: authAlertIconPop 0.55s cubic-bezier(0.34, 1.4, 0.64, 1) 0.15s both;
}

body.light-theme .auth-alert--promo .auth-alert-icon {
  color: #8e24aa;
}

.auth-alerts .auth-alert.is-visible:nth-child(2) .auth-alert-inner {
  transition-delay: 0.1s;
}

.auth-alerts .auth-alert.is-visible:nth-child(3) .auth-alert-inner {
  transition-delay: 0.18s;
}

.auth-alert--redirect .auth-alert-inner {
  position: relative;
  padding-bottom: 1.15rem;
}

.auth-alert-progress {
  position: absolute;
  left: 1.1rem;
  right: 1.1rem;
  bottom: 0.55rem;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

body.light-theme .auth-alert-progress {
  background: rgba(46, 125, 50, 0.12);
}

.auth-alert-progress::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #66bb6a, #43a047);
  transform: scaleX(0);
  transform-origin: left center;
}

.auth-alert--redirect.is-visible .auth-alert-progress::after {
  animation: authAlertProgress 1.2s linear forwards;
}

@keyframes authAlertIconPop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
  70% {
    transform: scale(1.12);
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes authAlertProgress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.auth-forms-wrap {
  transition: opacity 0.45s ease, transform 0.45s ease, filter 0.45s ease;
}

.auth-forms-wrap.is-waiting {
  opacity: 0.55;
  pointer-events: none;
}

.auth-forms-wrap.is-success {
  opacity: 0.45;
  transform: scale(0.985);
  filter: blur(1px);
  pointer-events: none;
}

.auth-alert--loading .auth-alert-inner {
  background: rgba(21, 101, 192, 0.1);
  border-color: rgba(21, 101, 192, 0.28);
  color: #1565c0;
}

body.light-theme .auth-alert--loading .auth-alert-inner {
  background: rgba(21, 101, 192, 0.08);
  border-color: rgba(21, 101, 192, 0.22);
  color: #0d47a1;
}

.auth-alert--loading .auth-alert-icon {
  color: #1976d2;
}

.auth-spin {
  display: inline-block;
  animation: authSpin 0.9s linear infinite;
}

@keyframes authSpin {
  to { transform: rotate(360deg); }
}

.auth-view {
  animation: authFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes authFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-page .form-page-title {
  display: none;
}

@media (max-width: 575.98px) {
  .auth-hero {
    padding-top: 3rem;
    padding-bottom: 0.75rem;
  }
}

.platega-method-btn:hover,
.platega-method-btn:focus,
.platega-method-btn:active,
body.light-theme .platega-method-btn:hover,
body.light-theme .platega-method-btn:focus,
body.light-theme .platega-method-btn:active {
  color: #fff !important;
  background-color: #0d6efd !important;
  border-color: #0d6efd !important;
}

.platega-method-btn:hover .fw-semibold,
.platega-method-btn:focus .fw-semibold,
.platega-method-btn:active .fw-semibold,
.platega-method-btn:hover .text-muted,
.platega-method-btn:focus .text-muted,
.platega-method-btn:active .text-muted,
body.light-theme .platega-method-btn:hover .fw-semibold,
body.light-theme .platega-method-btn:focus .fw-semibold,
body.light-theme .platega-method-btn:active .fw-semibold,
body.light-theme .platega-method-btn:hover .text-muted,
body.light-theme .platega-method-btn:focus .text-muted,
body.light-theme .platega-method-btn:active .text-muted {
  color: #fff !important;
}
