/* ==========================================================================
   HostinPL 5.6 - Modern Design System & Complete Dark Mode
   ========================================================================== */

/* --- CSS Variables --- */
:root {
  --app-font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --theme-transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  
  /* Light theme tokens */
  --bg-app: #f4f6fa;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f8fafc;
  --bg-header: #ffffff;
  --bg-card: #ffffff;
  --bg-card-header: #ffffff;
  --bg-input: #f3f6f9;
  --bg-input-focus: #ffffff;
  --border-subtle: #ebedf3;
  --border-card: #e5e7eb;
  --border-input: #e4e6ef;
  
  --text-main: #1e293b;
  --text-heading: #0f172a;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  --accent-primary: #0284c7;
  --accent-primary-hover: #0369a1;
  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;
  
  --shadow-card: 0 4px 18px 0 rgba(0, 0, 0, 0.04);
  --shadow-dropdown: 0 10px 30px 0 rgba(0, 0, 0, 0.1);
  --radius-card: 14px;
  --radius-btn: 10px;
  --radius-input: 10px;
}

[data-theme="dark"] {
  /* Dark theme tokens (Deep Cyber Slate) */
  --bg-app: #090e1a;
  --bg-surface: #111a2e;
  --bg-surface-hover: #18243f;
  --bg-header: #0d1527;
  --bg-card: #111a2e;
  --bg-card-header: #0e172a;
  --bg-input: #152038;
  --bg-input-focus: #1c2b4a;
  --border-subtle: #1e2c4a;
  --border-card: #1c2a45;
  --border-input: #243659;
  
  --text-main: #e2e8f0;
  --text-heading: #f8fafc;
  --text-muted: #94a3b8;
  --text-inverse: #090e1a;
  
  --accent-primary: #38bdf8;
  --accent-primary-hover: #7dd3fc;
  --accent-success: #34d399;
  --accent-warning: #fbbf24;
  --accent-danger: #f87171;
  
  --shadow-card: 0 6px 24px 0 rgba(0, 0, 0, 0.35);
  --shadow-dropdown: 0 12px 36px 0 rgba(0, 0, 0, 0.55);
}

/* ==========================================================================
   1. Absolute Full-Screen Layout Override (Сброс Metronic Boxed Layout)
   ========================================================================== */
html, body {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden;
}

body {
  font-family: var(--app-font) !important;
  background-color: var(--bg-app) !important;
  color: var(--text-main);
  transition: var(--theme-transition);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex !important;
  flex-direction: column !important;
}

.d-flex.flex-column.flex-root {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 1 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
}

.page {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  flex: 1 0 auto !important;
  background: transparent !important;
}

#kt_wrapper.wrapper,
.wrapper {
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  background: transparent !important;
  display: flex !important;
  flex-direction: column !important;
  flex: 1 0 auto !important;
  box-shadow: none !important;
}

#kt_footer.footer,
.footer {
  width: 100% !important;
  max-width: 100% !important;
  margin-top: auto !important;
  margin-bottom: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 20px 0 !important;
  border-radius: 0 !important;
  background-color: var(--bg-header) !important;
  border-top: 1px solid var(--border-subtle) !important;
  color: var(--text-muted) !important;
}

#kt_content.content,
.content {
  width: 100% !important;
  max-width: 100% !important;
  padding: 25px 0 50px 0 !important;
  margin: 0 !important;
  flex: 1 0 auto !important;
}

#kt_content > .d-flex.flex-column-fluid {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  justify-content: center !important;
}

.container,
.container-fluid {
  width: 100% !important;
  max-width: 1460px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
}

@media (min-width: 1600px) {
  .container,
  .container-fluid {
    max-width: 1560px !important;
    padding-left: 30px !important;
    padding-right: 30px !important;
  }
}

/* ==========================================================================
   2. Desktop vs Mobile Headers
   ========================================================================== */

/* --- Desktop Layout (>= 992px) --- */
@media (min-width: 992px) {
  #kt_header_mobile.header-mobile,
  .header-mobile {
    display: none !important;
  }

  #kt_header.header,
  .header {
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background-color: var(--bg-header) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.05) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 99 !important;
    height: 75px !important;
    display: flex !important;
  }

  .header .container-fluid {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .header-menu-wrapper {
    display: flex;
    align-items: center;
  }

  .topbar {
    display: flex;
    align-items: center;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    position: relative !important;
    height: 100% !important;
    padding: 0 !important;
  }
}

/* --- Mobile Layout (< 992px) --- */
@media (max-width: 991.98px) {
  #kt_header.header,
  .header {
    display: contents !important;
  }

  #kt_header_mobile.header-mobile,
  .header-mobile {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 58px !important;
    z-index: 1000 !important;
    background-color: var(--bg-header) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15) !important;
    padding: 0 16px !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .page {
    padding-top: 58px !important;
  }

  /* Мобильный Topbar */
  .topbar {
    position: fixed !important;
    top: -120px !important;
    left: 0 !important;
    right: 0 !important;
    height: 58px !important;
    margin: 0 !important;
    margin-top: 0 !important;
    z-index: 1000 !important;
    background-color: var(--bg-header) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding: 0 16px !important;
    transition: top 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  body.topbar-mobile-on .topbar,
  .topbar-mobile-on .topbar {
    top: 58px !important;
    margin: 0 !important;
    margin-top: 0 !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .topbar .topbar-item {
    margin-left: 8px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
  }

  /* Мобильная шторка меню СЛЕВА */
  #kt_header_menu_wrapper.header-menu-wrapper {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: -320px !important;
    width: 290px !important;
    max-width: 85vw !important;
    z-index: 1005 !important;
    background-color: var(--bg-surface) !important;
    border-right: 1px solid var(--border-subtle) !important;
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.7) !important;
    transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  #kt_header_menu_wrapper.header-menu-wrapper::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
  }

  #kt_header_menu_wrapper.header-menu-wrapper.header-menu-wrapper-on {
    left: 0 !important;
  }

  /* Внутренний контейнер меню */
  #kt_header_menu.header-menu-mobile,
  .header-menu-mobile {
    position: static !important;
    left: auto !important;
    top: auto !important;
    bottom: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    display: block !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Оверлей затемнения */
  .header-menu-wrapper-overlay,
  .offcanvas-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.65) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    z-index: 1000 !important;
    opacity: 1 !important;
    display: block !important;
    -webkit-animation: animation-offcanvas-fade-in 0.25s ease 1 !important;
    animation: animation-offcanvas-fade-in 0.25s ease 1 !important;
  }

  /* Пункты мобильного меню */
  .header-menu-mobile .menu-nav,
  .header-menu-wrapper .menu-nav {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    background: transparent !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .header-menu-mobile .menu-nav > .menu-item,
  .header-menu-wrapper .menu-nav > .menu-item {
    width: 100% !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    display: block !important;
  }

  .header-menu-mobile .menu-nav > .menu-item > .menu-link,
  .header-menu-wrapper .menu-nav > .menu-item > .menu-link {
    width: 100% !important;
    padding: 15px 20px !important;
    background-color: transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
  }

  .header-menu-mobile .menu-nav > .menu-item > .menu-link .menu-text,
  .header-menu-wrapper .menu-nav > .menu-item > .menu-link .menu-text {
    color: var(--text-main) !important;
    font-size: 0.98rem !important;
    font-weight: 500 !important;
    flex-grow: 1 !important;
  }

  .header-menu-mobile .menu-nav > .menu-item:hover > .menu-link,
  .header-menu-wrapper .menu-nav > .menu-item:hover > .menu-link {
    background-color: var(--bg-surface-hover) !important;
  }

  .header-menu-mobile .menu-nav > .menu-item:hover > .menu-link .menu-text,
  .header-menu-wrapper .menu-nav > .menu-item:hover > .menu-link .menu-text {
    color: var(--accent-primary) !important;
  }

  .header-menu-mobile .menu-nav > .menu-item.menu-item-active > .menu-link,
  .header-menu-mobile .menu-nav > .menu-item.menu-item-here > .menu-link,
  .header-menu-wrapper .menu-nav > .menu-item.menu-item-active > .menu-link,
  .header-menu-wrapper .menu-nav > .menu-item.menu-item-here > .menu-link {
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.15) 0%, transparent 100%) !important;
    border-left: 3px solid var(--accent-primary) !important;
  }

  .header-menu-mobile .menu-nav > .menu-item.menu-item-active > .menu-link .menu-text,
  .header-menu-mobile .menu-nav > .menu-item.menu-item-here > .menu-link .menu-text,
  .header-menu-wrapper .menu-nav > .menu-item.menu-item-active > .menu-link .menu-text,
  .header-menu-wrapper .menu-nav > .menu-item.menu-item-here > .menu-link .menu-text {
    color: var(--accent-primary) !important;
    font-weight: 600 !important;
  }

  /* Стрелочка категории */
  .header-menu-mobile .menu-nav > .menu-item > .menu-link .menu-arrow,
  .header-menu-wrapper .menu-nav > .menu-item > .menu-link .menu-arrow {
    color: var(--text-muted) !important;
    transition: transform 0.25s ease, color 0.25s ease !important;
    display: flex !important;
    align-items: center !important;
  }

  .header-menu-mobile .menu-nav > .menu-item.menu-item-open > .menu-link .menu-arrow,
  .header-menu-wrapper .menu-nav > .menu-item.menu-item-open > .menu-link .menu-arrow {
    transform: rotate(90deg) !important;
    color: var(--accent-primary) !important;
  }

  /* Подменю (Аккордеон) */
  .header-menu-mobile .menu-submenu,
  .header-menu-wrapper .menu-submenu {
    display: none;
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.4) !important;
    background-color: #090e1a !important;
    border-top: 1px solid var(--border-subtle) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    padding: 6px 0 !important;
    margin: 0 !important;
    z-index: 1 !important;
  }

  .header-menu-mobile .menu-item.menu-item-open > .menu-submenu,
  .header-menu-wrapper .menu-item.menu-item-open > .menu-submenu {
    display: block;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .header-menu-mobile .menu-submenu .menu-subnav,
  .header-menu-wrapper .menu-submenu .menu-subnav {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .header-menu-mobile .menu-submenu .menu-item,
  .header-menu-wrapper .menu-submenu .menu-item {
    width: 100% !important;
    display: block !important;
    border: none !important;
    background: transparent !important;
  }

  .header-menu-mobile .menu-submenu .menu-item .menu-link,
  .header-menu-wrapper .menu-submenu .menu-item .menu-link {
    width: 100% !important;
    padding: 12px 20px 12px 36px !important;
    background: transparent !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
  }

  .header-menu-mobile .menu-submenu .menu-item .menu-link .menu-text,
  .header-menu-wrapper .menu-submenu .menu-item .menu-link .menu-text {
    color: #94a3b8 !important;
    font-size: 0.93rem !important;
    font-weight: 400 !important;
    transition: color 0.2s ease !important;
  }

  .header-menu-mobile .menu-submenu .menu-item:hover .menu-link .menu-text,
  .header-menu-mobile .menu-submenu .menu-item.menu-item-here .menu-link .menu-text,
  .header-menu-wrapper .menu-submenu .menu-item:hover .menu-link .menu-text,
  .header-menu-wrapper .menu-submenu .menu-item.menu-item-here .menu-link .menu-text {
    color: var(--accent-primary) !important;
  }

  .header-menu-mobile .menu-submenu .menu-item .menu-link .menu-arrow,
  .header-menu-wrapper .menu-submenu .menu-item .menu-link .menu-arrow {
    display: none !important;
  }
}

/* ==========================================================================
   3. Universal Components, Cards & Forms Styling
   ========================================================================== */

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(140, 150, 175, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(140, 150, 175, 0.5);
}

/* Universal Cards */
.card.card-custom {
  border-radius: var(--radius-card) !important;
  border: 1px solid var(--border-card) !important;
  box-shadow: var(--shadow-card) !important;
  background-color: var(--bg-card) !important;
  overflow: hidden;
  transition: var(--theme-transition);
}

.card.card-custom > .card-header {
  border-bottom: 1px solid var(--border-subtle) !important;
  background-color: var(--bg-card-header) !important;
  min-height: 65px;
}

/* Wave Widgets fix */
.wave {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--border-card) !important;
  position: relative !important;
  overflow: hidden !important;
}

.wave:before {
  display: none !important;
}

.wave:after {
  background: radial-gradient(circle, rgba(56, 189, 248, 0.08) 0%, rgba(17, 26, 46, 0) 70%) !important;
}

/* Buttons */
.btn {
  border-radius: var(--radius-btn);
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.btn:active {
  transform: translateY(0);
}

.form-control {
  border-radius: var(--radius-input);
  font-size: 0.95rem;
}

/* ==========================================================================
   4. Dark Theme Specific Overrides
   ========================================================================== */

[data-theme="dark"] #kt_body,
[data-theme="dark"] .page,
[data-theme="dark"] #kt_wrapper {
  background-color: var(--bg-app) !important;
}

[data-theme="dark"] .bg-gray-100,
[data-theme="dark"] .bg-gray-200,
[data-theme="dark"] .bg-white {
  background-color: var(--bg-card) !important;
}

/* Typography in Dark Mode */
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6,
[data-theme="dark"] .card-title .card-label,
[data-theme="dark"] .text-dark,
[data-theme="dark"] .text-dark-75,
[data-theme="dark"] .text-dark-50,
[data-theme="dark"] .font-size-h4,
[data-theme="dark"] .font-size-h5,
[data-theme="dark"] label {
  color: var(--text-heading) !important;
}

[data-theme="dark"] .text-muted {
  color: var(--text-muted) !important;
}

/* Navigation in Dark Mode (Desktop & Dropdowns) */
[data-theme="dark"] .header-menu .menu-nav > .menu-item > .menu-link .menu-text {
  color: #cbd5e1 !important;
  font-weight: 500;
}

[data-theme="dark"] .header-menu .menu-nav > .menu-item:hover > .menu-link .menu-text,
[data-theme="dark"] .header-menu .menu-nav > .menu-item.menu-item-active > .menu-link .menu-text,
[data-theme="dark"] .header-menu .menu-nav > .menu-item.menu-item-here > .menu-link .menu-text {
  color: #38bdf8 !important;
}

[data-theme="dark"] .header-menu .menu-nav > .menu-item > .menu-link .menu-arrow {
  color: #64748b !important;
}

[data-theme="dark"] .header-menu .menu-nav > .menu-item:hover > .menu-link .menu-arrow,
[data-theme="dark"] .header-menu .menu-nav > .menu-item.menu-item-active > .menu-link .menu-arrow,
[data-theme="dark"] .header-menu .menu-nav > .menu-item.menu-item-here > .menu-link .menu-arrow {
  color: #38bdf8 !important;
}

/* Выпадающее меню подпунктов (Submenu) */
[data-theme="dark"] .menu-submenu,
[data-theme="dark"] .header-menu .menu-nav > .menu-item .menu-submenu {
  background-color: #111a2e !important;
  border: 1px solid #1e2c4a !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45) !important;
  border-radius: 12px !important;
  padding: 8px !important;
}

[data-theme="dark"] .menu-submenu .menu-subnav {
  padding: 0 !important;
  margin: 0 !important;
}

/* Базовый пункт подменю */
[data-theme="dark"] .menu-submenu .menu-subnav .menu-item > .menu-link,
[data-theme="dark"] .header-menu .menu-nav > .menu-item .menu-submenu > .menu-subnav > .menu-item > .menu-link {
  background-color: transparent !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  transition: all 0.2s ease !important;
}

[data-theme="dark"] .menu-submenu .menu-subnav .menu-item > .menu-link .menu-text,
[data-theme="dark"] .header-menu .menu-nav > .menu-item .menu-submenu > .menu-subnav > .menu-item > .menu-link .menu-text {
  color: #cbd5e1 !important;
  font-size: 0.92rem !important;
  font-weight: 500 !important;
  transition: color 0.2s ease !important;
}

[data-theme="dark"] .menu-submenu .menu-subnav .menu-item > .menu-link .menu-arrow,
[data-theme="dark"] .header-menu .menu-nav > .menu-item .menu-submenu > .menu-subnav > .menu-item > .menu-link .menu-arrow {
  color: #64748b !important;
  transition: color 0.2s ease !important;
}

/* Hover состояние подменю */
[data-theme="dark"] .menu-submenu .menu-subnav .menu-item:hover:not(.menu-item-here):not(.menu-item-active) > .menu-link,
[data-theme="dark"] .header-menu .menu-nav > .menu-item .menu-submenu > .menu-subnav > .menu-item:hover:not(.menu-item-here):not(.menu-item-active) > .menu-link {
  background-color: rgba(56, 189, 248, 0.08) !important;
}

[data-theme="dark"] .menu-submenu .menu-subnav .menu-item:hover:not(.menu-item-here):not(.menu-item-active) > .menu-link .menu-text,
[data-theme="dark"] .header-menu .menu-nav > .menu-item .menu-submenu > .menu-subnav > .menu-item:hover:not(.menu-item-here):not(.menu-item-active) > .menu-link .menu-text {
  color: #38bdf8 !important;
}

[data-theme="dark"] .menu-submenu .menu-subnav .menu-item:hover:not(.menu-item-here):not(.menu-item-active) > .menu-link .menu-arrow,
[data-theme="dark"] .header-menu .menu-nav > .menu-item .menu-submenu > .menu-subnav > .menu-item:hover:not(.menu-item-here):not(.menu-item-active) > .menu-link .menu-arrow {
  color: #38bdf8 !important;
}

/* АКТИВНЫЙ пункт подменю (menu-item-here / menu-item-active) */
[data-theme="dark"] .menu-submenu .menu-subnav .menu-item.menu-item-here > .menu-link,
[data-theme="dark"] .menu-submenu .menu-subnav .menu-item.menu-item-active > .menu-link,
[data-theme="dark"] .header-menu .menu-nav > .menu-item .menu-submenu > .menu-subnav > .menu-item.menu-item-here > .menu-link,
[data-theme="dark"] .header-menu .menu-nav > .menu-item .menu-submenu > .menu-subnav > .menu-item.menu-item-active > .menu-link {
  background-color: rgba(56, 189, 248, 0.14) !important;
  border-radius: 8px !important;
}

[data-theme="dark"] .menu-submenu .menu-subnav .menu-item.menu-item-here > .menu-link .menu-text,
[data-theme="dark"] .menu-submenu .menu-subnav .menu-item.menu-item-active > .menu-link .menu-text,
[data-theme="dark"] .header-menu .menu-nav > .menu-item .menu-submenu > .menu-subnav > .menu-item.menu-item-here > .menu-link .menu-text,
[data-theme="dark"] .header-menu .menu-nav > .menu-item .menu-submenu > .menu-subnav > .menu-item.menu-item-active > .menu-link .menu-text {
  color: #38bdf8 !important;
  font-weight: 700 !important;
}

[data-theme="dark"] .menu-submenu .menu-subnav .menu-item.menu-item-here > .menu-link .menu-arrow,
[data-theme="dark"] .menu-submenu .menu-subnav .menu-item.menu-item-active > .menu-link .menu-arrow,
[data-theme="dark"] .header-menu .menu-nav > .menu-item .menu-submenu > .menu-subnav > .menu-item.menu-item-here > .menu-link .menu-arrow,
[data-theme="dark"] .header-menu .menu-nav > .menu-item .menu-submenu > .menu-subnav > .menu-item.menu-item-active > .menu-link .menu-arrow {
  color: #38bdf8 !important;
}

/* Accordion (Купоны) in Dark Mode */
[data-theme="dark"] .accordion .card {
  background-color: var(--bg-input) !important;
  border: 1px solid var(--border-input) !important;
  border-radius: var(--radius-input) !important;
  margin-bottom: 12px;
}

[data-theme="dark"] .accordion .card-header {
  background-color: var(--bg-input) !important;
  border: none !important;
}

[data-theme="dark"] .accordion .card-title {
  color: var(--text-heading) !important;
  font-weight: 600;
}

[data-theme="dark"] .accordion .card-body {
  background-color: var(--bg-surface) !important;
  border-top: 1px solid var(--border-subtle) !important;
}

/* Buttons in Dark Mode */
[data-theme="dark"] .btn.btn-light-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3) !important;
}

[data-theme="dark"] .btn.btn-light-primary:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.45) !important;
}

[data-theme="dark"] .btn.btn-light-primary i {
  color: #ffffff !important;
}

/* Инпуты с кнопками */
[data-theme="dark"] .input-group-prepend .btn,
[data-theme="dark"] .input-group-append .btn {
  background: var(--bg-input-focus) !important;
  border: 1px solid var(--border-input) !important;
  color: var(--accent-primary) !important;
}

[data-theme="dark"] .input-group-prepend .btn:hover,
[data-theme="dark"] .input-group-append .btn:hover {
  background: var(--accent-primary) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .input-group-prepend .btn i,
[data-theme="dark"] .input-group-append .btn i {
  color: inherit !important;
}

[data-theme="dark"] .input-group-text {
  background-color: var(--bg-input) !important;
  border-color: var(--border-input) !important;
  color: var(--text-muted) !important;
}

/* Alerts in Dark Mode */
[data-theme="dark"] .alert.alert-light-primary,
[data-theme="dark"] .alert.alert-primary,
[data-theme="dark"] .alert.alert-custom.alert-light-primary {
  background-color: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.28) !important;
  color: #38bdf8 !important;
}

[data-theme="dark"] .alert.alert-light-primary .alert-icon i,
[data-theme="dark"] .alert.alert-light-primary .alert-text {
  color: #7dd3fc !important;
}

[data-theme="dark"] .alert.alert-light-success,
[data-theme="dark"] .alert.alert-success {
  background-color: rgba(16, 185, 129, 0.12) !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  color: #34d399 !important;
}

[data-theme="dark"] .alert.alert-light-success strong,
[data-theme="dark"] .alert.alert-success strong {
  color: #6ee7b7 !important;
}

[data-theme="dark"] .alert.alert-light-warning,
[data-theme="dark"] .alert.alert-warning {
  background-color: rgba(245, 158, 11, 0.12) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  color: #fbbf24 !important;
}

[data-theme="dark"] .alert.alert-light-danger,
[data-theme="dark"] .alert.alert-danger {
  background-color: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  color: #f87171 !important;
}

[data-theme="dark"] .alert.alert-light-info,
[data-theme="dark"] .alert.alert-info {
  background-color: rgba(14, 165, 233, 0.12) !important;
  border: 1px solid rgba(14, 165, 233, 0.3) !important;
  color: #38bdf8 !important;
}

/* SVG Icons coloring */
.svg-icon svg rect:not([fill]),
.svg-icon svg rect[fill="none"],
.header-mobile .svg-icon svg rect:not([fill]),
.header-mobile .svg-icon svg rect[fill="none"] {
  fill: none !important;
  opacity: 0 !important;
}

[data-theme="dark"] .svg-icon svg path[fill="#000000"],
[data-theme="dark"] .svg-icon svg path[fill="black"],
[data-theme="dark"] .svg-icon svg path:not([fill]),
[data-theme="dark"] .header-mobile .svg-icon svg path {
  fill: #94a3b8 !important;
}

[data-theme="dark"] .header-mobile .btn:hover .svg-icon svg path,
[data-theme="dark"] .header-mobile .btn.active .svg-icon svg path {
  fill: #38bdf8 !important;
}

[data-theme="dark"] .svg-icon.svg-icon-primary svg path {
  fill: #38bdf8 !important;
}

[data-theme="dark"] .svg-icon.svg-icon-success svg path {
  fill: #10b981 !important;
}

/* Tables in Dark Mode */
[data-theme="dark"] .table {
  color: var(--text-main) !important;
}

[data-theme="dark"] .table thead th,
[data-theme="dark"] .table.table-head-custom thead th {
  color: var(--text-muted) !important;
  background-color: rgba(255, 255, 255, 0.02) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  border-top: none !important;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.6px;
}

[data-theme="dark"] .table td,
[data-theme="dark"] .table th {
  border-top: 1px solid var(--border-subtle) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
}

[data-theme="dark"] .table-hover tbody tr:hover,
[data-theme="dark"] .table-vertical-center tbody tr:hover {
  background-color: var(--bg-surface-hover) !important;
}

/* Forms & Inputs in Dark Mode */
[data-theme="dark"] .form-control,
[data-theme="dark"] select.form-control,
[data-theme="dark"] textarea.form-control {
  background-color: var(--bg-input) !important;
  border-color: var(--border-input) !important;
  color: var(--text-heading) !important;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] select.form-control:focus,
[data-theme="dark"] textarea.form-control:focus {
  background-color: var(--bg-input-focus) !important;
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .form-control::placeholder {
  color: #64748b !important;
}

/* Modals & Dropdowns in Dark Mode */
[data-theme="dark"] .modal-content {
  background-color: var(--bg-surface) !important;
  border: 1px solid var(--border-subtle) !important;
  box-shadow: var(--shadow-dropdown) !important;
  border-radius: var(--radius-card) !important;
}

[data-theme="dark"] .modal-header {
  border-bottom: 1px solid var(--border-subtle) !important;
  background-color: var(--bg-card-header) !important;
}

[data-theme="dark"] .modal-footer {
  border-top: 1px solid var(--border-subtle) !important;
  background-color: var(--bg-card-header) !important;
}

[data-theme="dark"] .dropdown-menu {
  background-color: var(--bg-surface) !important;
  border: 1px solid var(--border-subtle) !important;
  box-shadow: var(--shadow-dropdown) !important;
  border-radius: var(--radius-card) !important;
}

[data-theme="dark"] .dropdown-item {
  color: var(--text-main) !important;
}

[data-theme="dark"] .dropdown-item:hover {
  background-color: var(--bg-surface-hover) !important;
  color: #38bdf8 !important;
}

[data-theme="dark"] .dropdown-item.active,
[data-theme="dark"] .dropdown-item:active {
  background-color: rgba(56, 189, 248, 0.14) !important;
  color: #38bdf8 !important;
}

/* Logo sizing rules across all header elements */
.h-28px {
  height: 28px !important;
  max-height: 28px !important;
  width: auto !important;
}

.h-30px {
  height: 30px !important;
  max-height: 30px !important;
  width: auto !important;
}

.h-35px {
  height: 35px !important;
  max-height: 35px !important;
  width: auto !important;
}

.header-logo img,
.header-mobile img,
.header-menu-wrapper img {
  max-height: 35px !important;
  width: auto !important;
  object-fit: contain !important;
}

/* Offcanvas Panels & Overlays in Dark Mode */
.offcanvas {
  z-index: 1005 !important;
}

.offcanvas-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(0, 0, 0, 0.65) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  z-index: 1000 !important;
  opacity: 1 !important;
  display: block !important;
  -webkit-animation: animation-offcanvas-fade-in 0.25s ease 1 !important;
  animation: animation-offcanvas-fade-in 0.25s ease 1 !important;
}

[data-theme="dark"] .offcanvas {
  background-color: var(--bg-surface) !important;
  border-left: 1px solid var(--border-subtle) !important;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.6) !important;
}

[data-theme="dark"] .offcanvas-header {
  border-bottom: 1px solid var(--border-subtle) !important;
}

[data-theme="dark"] .offcanvas-footer {
  border-top: 1px solid var(--border-subtle) !important;
  background-color: var(--bg-card-header) !important;
}

[data-theme="dark"] .navi .navi-link:hover {
  background-color: var(--bg-surface-hover) !important;
}

[data-theme="dark"] .navi .navi-text {
  color: var(--text-main) !important;
}

/* Topbar Balance Widget */
[data-theme="dark"] .topbar .btn-light-primary {
  background: rgba(56, 189, 248, 0.12) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.28) !important;
  box-shadow: none !important;
}

[data-theme="dark"] .topbar .btn-light-primary:hover {
  background: rgba(56, 189, 248, 0.2) !important;
  color: #7dd3fc !important;
}

/* Logo */
.header-logo img {
  border-radius: 8px;
  transition: transform 0.2s ease;
}

.header-logo img:hover {
  transform: scale(1.05);
}

/* ==========================================================================
   5. Theme Switcher Button Widget
   ========================================================================== */
.theme-switch-btn {
  width: 38px;
  height: 38px;
  border-radius: 50% !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  color: var(--text-main);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  padding: 0;
}

.theme-switch-btn:hover {
  transform: rotate(20deg) scale(1.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.theme-switch-btn .icon-sun {
  display: none;
  font-size: 1.1rem;
  color: #fbbf24;
}

.theme-switch-btn .icon-moon {
  display: inline-block;
  font-size: 1.05rem;
  color: #64748b;
}

[data-theme="dark"] .theme-switch-btn {
  background-color: #152038;
  border-color: #25375c;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .theme-switch-btn .icon-sun {
  display: inline-block;
}

[data-theme="dark"] .theme-switch-btn .icon-moon {
  display: none;
}

/* ==========================================================================
   Account Storage Quota Component (Light & Dark Theme Unified)
   ========================================================================== */
.quota-card {
  background: #ffffff;
  border: 1px solid #ebedf3;
  border-radius: 14px;
  box-shadow: 0 0 20px 0 rgba(76, 87, 125, 0.03);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.quota-title {
  color: #181C32;
  transition: color 0.2s ease;
}
.quota-desc {
  color: #7E8299;
  transition: color 0.2s ease;
}
.quota-progress-track {
  background: #EBEDF3;
  border-radius: 9px;
  border: none;
}
.quota-chip {
  background: #F3F6F9;
  border: 1px solid #EBEDF3;
  border-radius: 12px;
  padding: 16px 12px;
  transition: all 0.2s ease;
}
.quota-chip-label {
  color: #7E8299;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.quota-chip-val {
  color: #181C32;
  font-size: 1.18rem;
  font-weight: 800;
}
.quota-pkg-card {
  background: #ffffff;
  border: 1.5px solid #E4E6EF;
  border-radius: 12px;
  padding: 18px 14px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.quota-pkg-name {
  color: #181C32;
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 2px;
}
.quota-pkg-sub {
  color: #7E8299;
  font-size: 0.8rem;
}
.quota-pkg-price {
  color: #3699FF;
  font-weight: 800;
  font-size: 1.4rem;
}
.quota-pkg-card:hover {
  border-color: #3699FF;
  background: #F8FBFF;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(54, 153, 255, 0.12);
}
.quota-pkg-card.active {
  border: 2px solid #3699FF !important;
  background: rgba(54, 153, 255, 0.07) !important;
  box-shadow: 0 0 0 3px rgba(54, 153, 255, 0.15), 0 8px 24px rgba(54, 153, 255, 0.12) !important;
}
.quota-custom-box {
  background: #F3F6F9;
  border: 1px solid #EBEDF3;
  border-radius: 12px;
  padding: 18px 20px;
  transition: all 0.2s ease;
}
.quota-summary-box {
  background: rgba(54, 153, 255, 0.06);
  border: 1px solid rgba(54, 153, 255, 0.22);
  border-radius: 12px;
  padding: 18px 22px;
  transition: all 0.2s ease;
}

/* Стилизация ползунка (Range Slider) */
.quota-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #e2e8f0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  accent-color: #3699FF;
  margin: 12px 0 6px 0;
}
.quota-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #3699FF;
  cursor: pointer;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 8px rgba(54, 153, 255, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.quota-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 12px rgba(54, 153, 255, 0.6);
}
.quota-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #3699FF;
  cursor: pointer;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 8px rgba(54, 153, 255, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* --- Dark Theme Quota Overrides --- */
[data-theme="dark"] .quota-card,
body.theme-dark .quota-card {
  background: #111a2e !important;
  border-color: #1c2a45 !important;
  box-shadow: 0 6px 24px 0 rgba(0, 0, 0, 0.35) !important;
}
[data-theme="dark"] .quota-title,
body.theme-dark .quota-title {
  color: #f8fafc !important;
}
[data-theme="dark"] .quota-desc,
body.theme-dark .quota-desc {
  color: #94a3b8 !important;
}
[data-theme="dark"] .quota-progress-track,
body.theme-dark .quota-progress-track {
  background: #0d1527 !important;
  border: 1px solid #1e2c4a !important;
}
[data-theme="dark"] .quota-chip,
body.theme-dark .quota-chip {
  background: #152038 !important;
  border-color: #1e2c4a !important;
}
[data-theme="dark"] .quota-chip-label,
body.theme-dark .quota-chip-label {
  color: #94a3b8 !important;
}
[data-theme="dark"] .quota-chip-val,
body.theme-dark .quota-chip-val {
  color: #f8fafc !important;
}
[data-theme="dark"] .quota-pkg-card,
body.theme-dark .quota-pkg-card {
  background: #152038 !important;
  border-color: #1e2c4a !important;
}
[data-theme="dark"] .quota-pkg-name,
body.theme-dark .quota-pkg-name {
  color: #f8fafc !important;
}
[data-theme="dark"] .quota-pkg-sub,
body.theme-dark .quota-pkg-sub {
  color: #94a3b8 !important;
}
[data-theme="dark"] .quota-pkg-price,
body.theme-dark .quota-pkg-price {
  color: #38bdf8 !important;
}
[data-theme="dark"] .quota-pkg-card:hover,
body.theme-dark .quota-pkg-card:hover {
  border-color: #38bdf8 !important;
  background: #18243f !important;
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.15) !important;
}
[data-theme="dark"] .quota-pkg-card.active,
body.theme-dark .quota-pkg-card.active {
  border: 2px solid #38bdf8 !important;
  background: rgba(56, 189, 248, 0.15) !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25), 0 8px 25px rgba(56, 189, 248, 0.2) !important;
}
[data-theme="dark"] .quota-custom-box,
body.theme-dark .quota-custom-box {
  background: #152038 !important;
  border-color: #1e2c4a !important;
}
[data-theme="dark"] .quota-summary-box,
body.theme-dark .quota-summary-box {
  background: rgba(56, 189, 248, 0.08) !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
}
[data-theme="dark"] .quota-slider,
body.theme-dark .quota-slider {
  background: #0d1527;
  accent-color: #38bdf8 !important;
}
[data-theme="dark"] .quota-slider::-webkit-slider-thumb,
body.theme-dark .quota-slider::-webkit-slider-thumb {
  background: #38bdf8;
  border-color: #111a2e;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.5);
}
[data-theme="dark"] .quota-slider::-moz-range-thumb,
body.theme-dark .quota-slider::-moz-range-thumb {
  background: #38bdf8;
  border-color: #111a2e;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.5);
}

/* ==========================================================================
   PREMIUM TOASTR NOTIFICATIONS (LIGHT & DARK THEMES)
   ========================================================================== */

#toast-container {
  position: fixed !important;
  z-index: 999999 !important;
  pointer-events: none !important;
}

#toast-container.toast-top-right {
  top: 24px !important;
  right: 24px !important;
}

#toast-container.toast-top-left {
  top: 24px !important;
  left: 24px !important;
}

#toast-container.toast-bottom-right {
  bottom: 24px !important;
  right: 24px !important;
}

#toast-container.toast-bottom-left {
  bottom: 24px !important;
  left: 24px !important;
}

#toast-container.toast-top-center {
  top: 24px !important;
  right: 0 !important;
  width: 100% !important;
}

#toast-container.toast-bottom-center {
  bottom: 24px !important;
  right: 0 !important;
  width: 100% !important;
}

/* Базовая карточка уведомления (Light Theme by default) */
#toast-container > div {
  position: relative !important;
  pointer-events: auto !important;
  overflow: hidden !important;
  margin: 0 0 12px 0 !important;
  padding: 16px 20px 16px 56px !important;
  min-width: 320px !important;
  max-width: 420px !important;
  width: auto !important;
  border-radius: 14px !important;
  background-color: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  color: #1e293b !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04) !important;
  opacity: 1 !important;
  background-repeat: no-repeat !important;
  background-position: 18px 16px !important;
  background-size: 24px 24px !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, opacity 0.2s ease !important;
}

#toast-container > div:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.18), 0 6px 16px rgba(0, 0, 0, 0.06) !important;
  cursor: default !important;
}

/* SUCCESS (Светлая тема) */
#toast-container > .toast-success {
  background-color: rgba(255, 255, 255, 0.96) !important;
  border-left: 4px solid #10b981 !important;
  box-shadow: 0 12px 32px -4px rgba(16, 185, 129, 0.18), 0 4px 12px rgba(0, 0, 0, 0.05) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2310b981'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E") !important;
}

/* ERROR (Светлая тема) */
#toast-container > .toast-error {
  background-color: rgba(255, 255, 255, 0.96) !important;
  border-left: 4px solid #f43f5e !important;
  box-shadow: 0 12px 32px -4px rgba(244, 63, 94, 0.18), 0 4px 12px rgba(0, 0, 0, 0.05) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f43f5e'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z'/%3E%3C/svg%3E") !important;
}

/* WARNING (Светлая тема) */
#toast-container > .toast-warning {
  background-color: rgba(255, 255, 255, 0.96) !important;
  border-left: 4px solid #f59e0b !important;
  box-shadow: 0 12px 32px -4px rgba(245, 158, 11, 0.18), 0 4px 12px rgba(0, 0, 0, 0.05) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f59e0b'%3E%3Cpath d='M12 2 1 21h22L12 2zm0 3.99L19.53 19H4.47L12 5.99zM11 10v4h2v-4h-2zm0 6v2h2v-2h-2z'/%3E%3C/svg%3E") !important;
}

/* INFO (Светлая тема) */
#toast-container > .toast-info {
  background-color: rgba(255, 255, 255, 0.96) !important;
  border-left: 4px solid #0ea5e9 !important;
  box-shadow: 0 12px 32px -4px rgba(14, 165, 233, 0.18), 0 4px 12px rgba(0, 0, 0, 0.05) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230ea5e9'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E") !important;
}

/* ==========================================================================
   TOASTR В ТЁМНОЙ ТЕМЕ (Glassmorphism & Neon Glow)
   ========================================================================== */

[data-theme="dark"] #toast-container > div,
body.theme-dark #toast-container > div {
  background-color: rgba(15, 23, 42, 0.90) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc !important;
  box-shadow: 0 16px 40px -6px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] #toast-container > div:hover,
body.theme-dark #toast-container > div:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 20px 48px -6px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

/* SUCCESS (Тёмная тема) */
[data-theme="dark"] #toast-container > .toast-success,
body.theme-dark #toast-container > .toast-success {
  border-left: 4px solid #10b981 !important;
  box-shadow: 0 16px 40px -6px rgba(0, 0, 0, 0.7), 0 0 25px rgba(16, 185, 129, 0.22) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2334d399'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E") !important;
}

/* ERROR (Тёмная тема) */
[data-theme="dark"] #toast-container > .toast-error,
body.theme-dark #toast-container > .toast-error {
  border-left: 4px solid #f43f5e !important;
  box-shadow: 0 16px 40px -6px rgba(0, 0, 0, 0.7), 0 0 25px rgba(244, 63, 94, 0.22) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fb7185'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z'/%3E%3C/svg%3E") !important;
}

/* WARNING (Тёмная тема) */
[data-theme="dark"] #toast-container > .toast-warning,
body.theme-dark #toast-container > .toast-warning {
  border-left: 4px solid #f59e0b !important;
  box-shadow: 0 16px 40px -6px rgba(0, 0, 0, 0.7), 0 0 25px rgba(245, 158, 11, 0.22) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fbbf24'%3E%3Cpath d='M12 2 1 21h22L12 2zm0 3.99L19.53 19H4.47L12 5.99zM11 10v4h2v-4h-2zm0 6v2h2v-2h-2z'/%3E%3C/svg%3E") !important;
}

/* INFO (Тёмная тема) */
[data-theme="dark"] #toast-container > .toast-info,
body.theme-dark #toast-container > .toast-info {
  border-left: 4px solid #38bdf8 !important;
  box-shadow: 0 16px 40px -6px rgba(0, 0, 0, 0.7), 0 0 25px rgba(56, 189, 248, 0.22) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2338bdf8'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E") !important;
}

/* Кнопка закрытия тоаста */
#toast-container .toast-close-button {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  width: 22px !important;
  height: 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  background: rgba(0, 0, 0, 0.06) !important;
  color: #64748b !important;
  font-family: Arial, sans-serif !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  border: none !important;
  outline: none !important;
  padding: 0 !important;
  margin: 0 !important;
  opacity: 0.75 !important;
  text-shadow: none !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
}

#toast-container .toast-close-button:before,
#toast-container .toast-close-button:after,
.toast .toast-close-button:before,
.toast .toast-close-button:after {
  content: "" !important;
  display: none !important;
}

#toast-container .toast-close-button:hover {
  background: rgba(0, 0, 0, 0.12) !important;
  color: #0f172a !important;
  opacity: 1 !important;
  transform: scale(1.1) !important;
}

[data-theme="dark"] #toast-container .toast-close-button,
body.theme-dark #toast-container .toast-close-button {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
}

[data-theme="dark"] #toast-container .toast-close-button:hover,
body.theme-dark #toast-container .toast-close-button:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

/* Заголовок и Текст */
#toast-container .toast-title {
  font-weight: 700 !important;
  font-size: 14px !important;
  margin-bottom: 4px !important;
  color: inherit !important;
}

#toast-container .toast-message {
  font-size: 13.5px !important;
  line-height: 1.45 !important;
  color: inherit !important;
  word-break: break-word !important;
}

#toast-container .toast-message a {
  color: #38bdf8 !important;
  text-decoration: underline !important;
  font-weight: 600 !important;
}

/* Прогресс-бар */
#toast-container .toast-progress {
  position: absolute !important;
  left: 0 !important;
  bottom: 0 !important;
  height: 3.5px !important;
  border-radius: 0 0 14px 14px !important;
  opacity: 0.9 !important;
}

#toast-container > .toast-success .toast-progress {
  background: linear-gradient(90deg, #059669, #10b981) !important;
}

#toast-container > .toast-error .toast-progress {
  background: linear-gradient(90deg, #e11d48, #f43f5e) !important;
}

#toast-container > .toast-warning .toast-progress {
  background: linear-gradient(90deg, #d97706, #f59e0b) !important;
}

#toast-container > .toast-info .toast-progress {
  background: linear-gradient(90deg, #0284c7, #38bdf8) !important;
}

/* Мобильная адаптация */
@media (max-width: 576px) {
  #toast-container.toast-top-right,
  #toast-container.toast-top-left,
  #toast-container.toast-top-center {
    top: 12px !important;
    left: 12px !important;
    right: 12px !important;
  }
  #toast-container > div {
    min-width: unset !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 14px 18px 14px 48px !important;
    background-position: 14px 14px !important;
  }
}
