@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");

/* Bartomes Font - place the font file in /static/fonts/ folder */
@font-face {
    font-family: 'Bartomes';
    src: url('../fonts/Bartomes.woff2') format('woff2'),
         url('../fonts/Bartomes.woff') format('woff'),
         url('../fonts/Bartomes.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --color-primary: #ffda29;
    --color-primary-dark: #f0c419;
    --color-background: #000000;
    --color-background-secondary: #1a1a1a;
    --color-background-tertiary: #262626;
    --color-card-bg: #1c1c1e;
    --color-card-item-bg: #262626;
    --color-text-primary: #ffffff;
    --color-text-secondary: rgba(255, 255, 255, 0.8);
    --color-text-muted: rgba(255, 255, 255, 0.5);
    --color-border: rgba(255, 255, 255, 0.1);
    --color-card-border: rgba(255, 255, 255, 0.3);
    --color-input-bg: #2c2c2e;
    --color-check-green: #54cc38;
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--color-background);
    color: var(--color-text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}


/* --- Mobile Header --- */
.mobile-header {
    background: var(--color-background);
    padding: 12px 20px 8px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
}

.mobile-header.sticky-top {
    position: sticky;
    top: 0;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-background);
    width: 100%;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hamburger-btn {
    background: none;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger-btn svg {
    width: 28px;
    height: 28px;
}

.logo-container-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon {
    height: 40px;
    width: 40px;
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.header-bottom-row {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 8px;
}

.header-title-link {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.header-title-img {
    height: 15px;
    width: auto;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--color-text-primary);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition-fast);
}

.icon-btn:hover {
    color: var(--color-primary);
}

.icon-btn svg {
    width: 24px;
    height: 24px;
}

/* Shimmer effect for contact button */
.shimmer-icon {
    position: relative;
    overflow: visible;
}

.shimmer-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 218, 41, 0.4) 0%, rgba(255, 218, 41, 0) 70%);
    border-radius: 50%;
    opacity: 0;
    animation: shimmerPulse 3s ease-in-out infinite;
}

@keyframes shimmerPulse {
    0%, 100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.5);
    }
}

.shimmer-icon svg {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 2px rgba(255, 218, 41, 0.3));
    animation: iconGlow 3s ease-in-out infinite;
}

@keyframes iconGlow {
    0%, 100% {
        filter: drop-shadow(0 0 2px rgba(255, 218, 41, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(255, 218, 41, 0.8));
    }
}

/* --- Contact Menu Dropdown --- */
.contact-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.contact-menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.contact-menu {
    position: fixed;
    top: -100%;
    right: 0;
    width: 90%;
    max-width: 320px;
    background: var(--color-background-secondary);
    z-index: 1999;
    transition: top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
    border-radius: 0 0 0 24px;
    overflow: hidden;
}

.contact-menu.open {
    top: 0;
}

.contact-menu-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-menu-title {
    font-size: 1.1rem;
    font-weight: 100;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-menu-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.contact-menu-close:hover {
    color: var(--color-text-primary);
}

.contact-menu-close svg {
    width: 24px;
    height: 24px;
}

.contact-menu-list {
    padding: 12px 0;
}

.contact-menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    color: var(--color-text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 1rem;
    cursor: pointer;
}

.contact-menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.contact-menu-item svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.contact-menu-item span {
    font-weight: 500;
}

/* --- Mobile Menu (Left Aligned) --- */
.mobile-menu {
    position: fixed;
    top: -100%;
    left: 0;
    width: 90%;
    max-width: 320px;
    height: auto;
    max-height: 80vh;
    background: var(--color-background-secondary);
    z-index: 2000;
    transition: top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    border-radius: 0 0 24px 0;
}

.mobile-menu.open {
    top: 0;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.menu-header {
    padding: 24px 20px 10px 20px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.menu-close {
    background: none;
    border: none;
    color: var(--color-text-primary);
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.menu-nav {
    padding: 0 0 20px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.menu-nav-item {
    display: block;
    width: 100%;
    padding: 12px 24px 12px 24px;
    color: #ffffff;
    text-decoration: none;
    transition: var(--transition-normal);
    font-size: 1.1rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left;
    border: none;
    background: none;
}

.menu-nav-item:hover {
    color: var(--color-text-secondary);
    opacity: 0.8;
}

.menu-footer {
    padding: 20px 24px 30px 24px;
    border-top: 1px solid var(--color-border);
}

/* Кнопка выйти - просто текст без рамки */
.menu-logout-text,
button.menu-logout-text,
.menu-footer button.menu-logout-text {
    width: 100%;
    padding: 12px 0;
    background: transparent !important;
    border: none !important;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: var(--transition-normal);
    font-size: 1rem;
    text-align: left;
    font-family: inherit;
    box-shadow: none !important;
    outline: none;
    font-weight: 100;
}

.menu-logout-text:hover,
button.menu-logout-text:hover {
    color: var(--color-text-primary);
    background: transparent !important;
}

/* CSS-only Dropdown Menu (Личный кабинет) */
.menu-dropdown {
    width: 100%;
}

.menu-dropdown-checkbox {
    display: none;
}

.menu-dropdown-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.menu-dropdown-arrow {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.menu-dropdown-checkbox:checked ~ .menu-dropdown-label .menu-dropdown-arrow {
    transform: rotate(180deg);
}

.menu-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
}

.menu-dropdown-checkbox:checked ~ .menu-dropdown-content {
    max-height: 200px;
}

.menu-dropdown-item {
    padding-left: 40px !important;
    font-size: 1rem !important;
    letter-spacing: 0 !important;
    opacity: 0.8;
}

.menu-dropdown-item:hover {
    opacity: 1;
}

/* --- Containers --- */
.container {
    padding: 10px 20px 20px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.container-wide {
    padding: 10px 20px 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Tabs (Images) --- */
.program-tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    width: 100%;
}

.program-tab-link {
    display: block;
    flex: 1; /* Занимают 50% ширины каждая */
    text-decoration: none;
    text-align: center;
    transition: opacity 0.3s ease;
}

.program-tab-img {
    width: 100%;
    height: 34px;
    display: block;
    max-width: 220px;
    margin: 0 auto;
    object-fit: contain;
}

/* 3. Состояние неактивной кнопки */
.program-tab-link.inactive {
    opacity: 0.2;
}
.program-tab-link.inactive:hover {
    opacity: 0.5;
}

.program-tab-link.active {
    opacity: 1;
}


/* --- Partner Program Page --- */
.partner-content {
    text-align: center;
    padding: 10px 0;
}

.partner-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #ffffff;
}

.partner-desc {
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.qr-code-wrapper {
    margin-bottom: 30px;
    display: inline-block;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.qr-code-wrapper:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(255, 218, 41, 0.3);
}

.qr-code-img {
    width: 200px;
    height: 200px;
    display: block;
}

/* QR код модальное окно на весь экран (как просмотр фото) */
.qr-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.qr-modal.active {
    display: flex;
}

.qr-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    animation: qrZoomIn 0.3s ease;
    z-index: 10000;
}

@keyframes qrZoomIn {
    from {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.qr-modal-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 50%;
    z-index: 10001;
    transition: background 0.2s;
}

.qr-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.qr-modal-img {
    width: 85vw;
    max-width: 400px;
    height: auto;
    border-radius: 16px;
    background: #fff;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.qr-modal-hint {
    color: rgba(255, 255, 255, 0.6);
    margin-top: 24px;
    font-size: 0.9rem;
}

/* Модальное окно формы заявки */
.order-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.order-modal.active {
    display: flex;
}

/* QR Modal */
.qr-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.qr-modal.active {
    display: flex;
}

.qr-modal-img {
    width: 90%;
    max-width: 400px;
    height: auto;
    border-radius: 12px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.order-modal-content {
    background: var(--color-background-secondary);
    border-radius: 20px;
    width: 95%;
    max-width: 500px;
    height: 85vh;
    max-height: 700px;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.order-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.order-modal-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.order-modal-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.order-modal-close:hover {
    color: var(--color-text-primary);
}

.order-modal-body {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.order-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

.order-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-background-secondary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    color: var(--color-text-muted);
}

.order-loading.hidden {
    display: none;
}

.order-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Форма заявки внутри модалки */
.order-modal-form {
    height: auto;
    max-height: 90vh;
}

.order-modal-form .order-modal-body {
    overflow-y: auto;
    padding: 0;
}

.order-form-container {
    padding: 20px;
}

.order-form-desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 24px;
    text-align: center;
}

.order-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-form-label {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.order-form-textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--color-input-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    color: var(--color-text-primary);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s;
}

.order-form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.order-form-textarea::placeholder {
    color: var(--color-text-muted);
    opacity: 0.6;
}

.order-form-submit {
    width: 100%;
    padding: 16px;
    background: var(--color-primary);
    border: none;
    border-radius: 12px;
    color: #000;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.order-form-submit:hover {
    background: var(--color-primary-dark);
}

.order-form-submit:active {
    transform: scale(0.98);
}

.order-form-submit .btn-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.2);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.order-form-submit.loading .btn-text {
    opacity: 0.7;
}

.order-form-submit.loading .btn-spinner {
    display: block;
}

.order-form-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.partner-link-label {
    display: block;
    text-align: left;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

.partner-link-input-container {
    margin-bottom: 20px;
}

.partner-link-input {
    width: 100%;
    background: #2c2c2e;
    border: none;
    border-radius: 8px;
    padding: 14px 16px;
    color: #fff;
    font-size: 1rem;
    text-decoration: underline;
    text-align: center;
    cursor: text;
}

.partner-invite-btn {
    width: 100%;
    background: var(--color-primary);
    color: #000;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 16px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 30px;
    transition: background 0.2s;
}

.partner-invite-btn:hover {
    background: var(--color-primary-dark);
}

/* --- User Info Clean --- */
.user-info-clean {
    background: transparent;
    padding: 0 0 20px 0;
    margin-bottom: 10px;
}

.user-info-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.user-name-bright {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.user-contact-muted {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    /* Отключаем автоматическую кликабельность телефонных номеров */
    pointer-events: none;
    -webkit-text-decoration: none;
    text-decoration: none;
}

/* Отключаем автоматическое определение номеров телефонов браузером */
.user-contact-muted a,
.user-contact-muted a[href^="tel:"] {
    color: inherit !important;
    text-decoration: none !important;
    pointer-events: none !important;
}

.edit-profile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: var(--transition-normal);
    padding: 5px;
}

.edit-profile-icon:hover {
    color: var(--color-primary);
}

/* --- Bonus Card --- */
.bonus-card-large {
    background: var(--color-input-bg);
    /* border: 1px solid var(--color-border); */
    border-radius: 12px;
    padding: 10px 5vw;
    margin-bottom: 8px;
    position: relative;
    height: 70px;
    display: flex;
    align-items: center;
}

.bonus-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Горизонтальное расположение бонусов и переключателя */
.bonus-content-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 60px;
    padding: 5px 0;
    width: 100%;
}

.bonus-amount-large {
    font-size: clamp(2rem, 8.5vw, 3.5rem);
    font-weight: 400;
    color: var(--color-primary);
    line-height: 1;
    font-family: 'Bartomes', 'Inter', sans-serif;
    max-width: 65%;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    text-align: left;
    display: flex;
    align-items: center;
}

/* Адаптация размера для больших чисел */
.bonus-amount-large[data-digits="5"] {
    font-size: clamp(1.8rem, 7vw, 3rem);
}

.bonus-amount-large[data-digits="6"] {
    font-size: clamp(1.6rem, 6vw, 2.5rem);
}

.bonus-amount-large[data-digits="7"],
.bonus-amount-large[data-digits="8"] {
    font-size: clamp(1.4rem, 5vw, 2rem);
}

.bonus-amount-large[data-digits="9"],
.bonus-amount-large[data-digits="10"] {
    font-size: clamp(1.2rem, 4vw, 1.7rem);
}

.bonus-amount-large[data-digits="11"],
.bonus-amount-large[data-digits="12"] {
    font-size: clamp(1rem, 3.5vw, 1.4rem);
}

.bonus-switch-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
}

.bonus-switch {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 23px;
    cursor: pointer;
}

.bonus-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.bonus-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    transition: var(--transition-normal);
}

.bonus-slider:before {
    position: absolute;
    content: "";
    height: 19px;
    width: 31px;
    left: 3px;
    bottom: 2px;
    background-color: white;
    border-radius: 11px;
    transition: var(--transition-normal);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.bonus-switch input:checked + .bonus-slider {
    background-color: #26d72f;
}

.bonus-switch input:checked + .bonus-slider:before {
    transform: translateX(18px);
}

.bonus-labels {
    font-size: 0.65rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    text-align: center;
}

/* Лоадер */
.bonus-slider-loader {
    position: absolute;
    /* Центрируем БЕЗ transform — через inset + margin */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    display: none;
    z-index: 3;
    animation: spin 0.7s linear infinite;
    pointer-events: none;
}

/* !important нужен чтобы перебить input:checked + .bonus-slider */
.bonus-switch.loading .bonus-slider-loader {
    display: block;
}

.bonus-switch.loading .bonus-slider {
    background-color: rgba(255, 255, 255, 0.15) !important;
}

.bonus-switch.loading .bonus-slider:before {
    transform: translateX(9px) !important;
    background-color: #888 !important;
    box-shadow: none !important;
    transition: none !important;
}

.bonus-switch.loading {
    pointer-events: none;
}

.bonus-switch.loading ~ .bonus-labels .bonus-label-text {
    opacity: 0.5;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Разделительная линия */
.section-divider {
    height: 1px;
    background: var(--color-border);
    margin: 8px 0 16px 0;
}

.bonus-info-btn {
    width: 100%;
    background: var(--color-primary);
    border-radius: 12px;
    padding: 14px 16px;
    margin: 8px 0 24px 0;
    color: #000;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    text-align: center;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background-color 0.2s ease;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(255, 218, 41, 0.3);
}

.bonus-info-btn:hover {
    background: var(--color-primary-dark);
    box-shadow: 0 4px 12px rgba(255, 218, 41, 0.4);
}

.bonus-info-btn:active {
    transform: scale(0.98);
    background-color: var(--color-primary-dark);
}

/* --- Level Card --- */
.level-card {
    background: var(--color-input-bg);
    border-radius: 12px;
    padding: 3px 5vw;
    margin-bottom: 8px;
    /* border: 1px solid var(--color-border); */
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    height: 70px;
}

.level-card > div {
    width: 100%;
}

.level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.level-name {
    font-size: 1.1rem;
    font-weight: 300;
    color: white;
}

.level-percent {
    color: black;
    font-weight: 700;
    font-size: .9rem;
    font-family: 'Bartomes', 'Inter', sans-serif;
    background: var(--color-primary);
    padding: 3px 10px 3px 10px;
    border-radius: 11px;
    line-height: 1;
    display: flex;
    align-items: center;
}

.progress-bar-container {
    height: 8px;
    /* background: rgba(255, 255, 255, 0.1); */
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 3px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, .4);
    padding: 1px;
}

.progress-bar-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 3px;
    transition: width 1s ease-out;
}

.level-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--color-text-muted);
    position: relative;
    z-index: 1;
}

.level-purchase-sum {
    position: absolute;
    left: 49%;
    transform: translateX(-50%);
    bottom: 5px;
    color: #4CAF50 !important;
    font-size: 0.65rem;
    white-space: nowrap;
    display: flex;
    gap: 4px;
}

/* --- CTA Section --- */
.cta-section {
    text-align: center;
    margin: 0 0 30px;
    padding: 0 10px;
}

.cta-title {
    font-size: 1.4rem;
    font-weight: 300;
    margin-bottom: 12px;
    line-height: 1.4;
    color: #ffffff;
}

.cta-desc {
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--color-text-secondary);
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

/* --- Tiers Scroll --- */
.tiers-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.tiers-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 4px 0 20px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    width: 100%;
}

.tiers-scroll-container::-webkit-scrollbar {
    display: none;
}

.scroll-arrow {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    flex-shrink: 0;
}

.scroll-arrow:hover {
    background: var(--color-primary);
    color: #000;
}

.scroll-arrow.left {
    margin-right: 16px;
    display: none;
}

.scroll-arrow.right {
    margin-left: 16px;
    display: none;
}

/* --- Tier Cards --- */
.tier-card {
    flex: 0 0 200px;
    background-color: #262626;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    text-align: center;
    min-height: 380px;
    position: relative;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.tier-name {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #fff;
    font-family: inherit;
}

.tier-sub {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.tier-section {
    margin-bottom: 16px;
}

.tier-label-small {
    font-size: 0.8rem;
    color: #888;
    line-height: 1.2;
    margin-bottom: 6px;
}

.tier-val-bold {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
}

.tier-percent-val {
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
    line-height: 1;
}

.tier-reward-val {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.tier-reward-desc {
    font-size: 0.75rem;
    color: #888;
    line-height: 1.3;
    max-width: 95%;
    margin: 0 auto;
}

.tier-check-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0);
    border: 2px solid var(--color-check-green);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 12px auto 0 auto;
    box-shadow: 0 2px 8px rgba(84, 204, 56, 0.4);
}

.tier-check-circle svg {
    color: var(--color-check-green);;
    width: 28px;
    height: 28px;
}

/* Placeholder для карточек без галочки */
.tier-check-placeholder {
    width: 48px;
    height: 48px;
    margin: 12px auto 0 auto;
}

/* Пустой круг для невыполненных уровней */
.tier-empty-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    margin: 12px auto 0 auto;
}

/* --- Levels Description Text --- */
.levels-description {
    margin-top: 40px;
    padding: 0 10px;
    color: var(--color-text-primary);
}

.levels-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: left;
}

.level-desc-block {
    margin-bottom: 24px;
}

.level-desc-head {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 8px;
    color: #fff;
}

.level-desc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.level-desc-item {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    padding-left: 12px;
    margin-bottom: 4px;
}

/* --- History Section --- */
.history-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.section-title {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
    text-align: center;
    color: var(--color-text-primary);
}

.section-title-img {
    height: 15px;
    width: auto;
    display: block;
    margin: 0.5rem auto 1rem auto;
    object-fit: contain;
    opacity: 0.9;
}

.program-title-img {
    height: 30px;
    width: auto;
    object-fit: contain;
    opacity: 0.9;
}

.history-title-img,
.small-title-img {
    height: 15px;
    width: auto;
    object-fit: contain;
    opacity: 0.9;
}

.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticket-card {
    background: var(--color-card-bg);
    border-radius: 16px;
    padding: 16px 20px;
    border: none;
}

.ticket-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: flex-start;
}

.ticket-col-center {
    padding: 0 4px;
}

.ticket-label {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    margin-bottom: 2px;
}

.ticket-date {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--color-text-secondary);
}

.ticket-amount {
    font-size: .8rem;
    font-style: italic;
    font-weight: 600;
    color: white;
}

.ticket-address {
    font-size: 0.8rem;
    font-style: italic;
    color: white;
    line-height: 1.4;
    margin-top: 4px;
}

.ticket-expand-container {
    display: block;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.expand-btn, .collapse-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 0;
    gap: 8px;
}

.expand-btn:hover, .collapse-btn:hover {
    color: var(--color-primary);
}

.ticket-details-expanded {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
    margin-top: 12px;
}

.ticket-items-list {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ticket-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.item-name {
    font-size: 0.9rem;
    color: #fff;
    margin-bottom: 12px;
    font-weight: 500;
    line-height: 1.3;
}

.item-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr;
    gap: 8px;
}

.item-col {
    display: flex;
    flex-direction: column;
}

.item-col.right {
    align-items: flex-end;
}

.item-label {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    margin-bottom: 2px;
}

.item-val {
    font-size: 0.9rem;
    color: var(--color-text-primary);
    font-weight: 600;
    font-style: italic;
}

.empty-tickets {
    text-align: center;
    color: var(--color-text-muted);
    margin-top: 20px;
}

.footer-levels-link {
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    margin: 20px 0 30px;
    cursor: pointer;
    color: #fff;
}

/* --- Modal --- */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #1c1c1e;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    position: relative;
    animation: slideUp 0.3s ease-out;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
}

.modal-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-close:hover {
    color: #fff;
}

.edit-form-group {
    margin-bottom: 16px;
}

.edit-label {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.edit-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--color-input-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.edit-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.edit-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.btn-cancel {
    flex: 1;
    padding: 14px;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    color: var(--color-text-secondary);
    cursor: pointer;
    font-weight: 500;
}

.btn-save {
    flex: 2;
    padding: 14px;
    background: var(--color-primary);
    border: none;
    border-radius: 12px;
    color: #000;
    cursor: pointer;
    font-weight: 600;
}

/* --- Alerts --- */
.alert-container {
    margin-bottom: 20px;
}

.alert {
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    display: flex;
    gap: 10px;
    align-items: center;
}

.alert-success {
    background: rgba(84, 204, 56, 0.15);
    border: 1px solid rgba(84, 204, 56, 0.3);
    color: #68d391;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fc8181;
}

/* --- Login Page --- */
.login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-background);
    padding: 20px;
    z-index: 2000;
    overflow-y: auto;
}

.login-card {
    background: transparent;
    border: none;
    padding: 5px;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo img {
    height: 80px;
    width: auto;
    margin-bottom: 20px;
}

.login-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin-left: 4px;
}

.form-input-clean {
    width: 100%;
    padding: 16px 20px;
    background: var(--color-card-item-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    color: var(--color-text-primary);
    font-size: 1rem;
    font-weight: 400;
    transition: all 0.3s ease;
}

.form-input-clean:focus {
    outline: none;
    border-color: var(--color-primary);
    background: #333;
}

.form-input-clean::placeholder {
    color: var(--color-text-muted);
    opacity: 0.5;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .form-input-clean {
    padding-right: 50px;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.password-toggle-btn:hover {
    color: var(--color-text-primary);
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: var(--color-primary);
    color: #000000;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: background 0.3s ease;
    margin-top: 10px;
}

.login-btn:hover {
    background: var(--color-primary-dark);
}

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #000;
    animation: spin 1s linear infinite;
}

.login-btn.loading .spinner {
    display: block;
}

.login-btn.loading .btn-text {
    opacity: 0.7;
}

/* Auth switch (link to register/login) */
.auth-switch {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.auth-switch p {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.auth-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

.auth-link:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* Page transition animation */
.page-wrapper {
    animation: fadeInPage 0.5s ease-in-out;
}

@keyframes fadeInPage {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-container {
    animation: slideInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form inputs animation */
.form-group {
    animation: fadeIn 0.4s ease-in-out backwards;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.15s; }
.form-group:nth-child(3) { animation-delay: 0.2s; }
.form-group:nth-child(4) { animation-delay: 0.25s; }
.form-group:nth-child(5) { animation-delay: 0.3s; }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 800px;
        padding-top: 40px;
    }

    .scroll-arrow.left, .scroll-arrow.right {
        display: flex;
    }

    .logo-icon {
        height: 48px;
        width: 48px;
    }

    .header-title-img {
        height: 32px;
    }

    .contact-menu {
        max-width: 360px;
    }

    .bonus-amount-large {
        font-size: 3rem;
    }

    .bonus-amount-large[data-digits="5"] {
        font-size: 2.8rem;
    }

    .bonus-amount-large[data-digits="6"] {
        font-size: 2.4rem;
    }

    .bonus-amount-large[data-digits="7"],
    .bonus-amount-large[data-digits="8"] {
        font-size: 2rem;
    }

    .bonus-amount-large[data-digits="9"],
    .bonus-amount-large[data-digits="10"] {
        font-size: 1.7rem;
    }

    .bonus-amount-large[data-digits="11"],
    .bonus-amount-large[data-digits="12"] {
        font-size: 1.4rem;
    }

    /* Увеличенные кнопки программ на ПК */
    .program-tab-img {
        height: 38px;
        max-width: 280px;
    }

    .program-tabs {
        gap: 20px;
        margin-bottom: 40px;
    }
}
/* --- Notification Popup (Тост уведомление) --- */
.copy-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px); /* Спрятано снизу */
    background-color: var(--color-card-bg);
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Плавная анимация */
    z-index: 3000;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--color-border);
    white-space: nowrap;
}

.copy-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.copy-notification svg {
    width: 20px;
    height: 20px;
    color: var(--color-check-green);
}

/* --- FAQ Section (Accordion) --- */
.faq-section {
    margin-top: 40px;
    padding-bottom: 40px;
}

.faq-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 24px;
    padding: 0 10px;
    color: #ffffff;
}

.faq-item {
    background-color: var(--color-card-item-bg);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: background-color 0.2s;
}

.faq-question {
    padding: 20px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.faq-icon {
    min-width: 24px;
    width: 24px;
    height: 24px;
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

/* Поворот стрелки при открытии */
.faq-item.open .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: rgba(255, 255, 255, 0.02);
}

.faq-answer-content {
    padding: 16px 20px 24px 20px;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
    white-space: pre-line;
}

/* Стили внутри ответов FAQ (для списков уровней) */
.faq-level-block {
    margin-bottom: 20px;
}
.faq-level-head {
    color: #fff;
    font-weight: 600;
    margin-bottom: 8px;
}
.faq-level-list {
    list-style: none;
    padding-left: 10px;
}
.faq-level-item {
    position: relative;
    padding-left: 15px;
    margin-bottom: 4px;
    color: var(--color-text-muted);
}
.faq-level-item::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-primary);
}

/* ========================================
   Битрикс24 Виджет - Кастомизация
   ======================================== */

/* Скрываем стандартную кнопку виджета в правом нижнем углу */
/* Виджет будет открываться только программно через openBitrix24Chat() */
.b24-widget-button-wrapper,
.bx-livechat-button-wrapper,
.b24-widget-button-position-bottom-right {
    position: fixed !important;
    bottom: -200px !important;
    right: 20px !important;
    opacity: 0 !important;
    z-index: -1 !important;
    pointer-events: auto !important;
    /* Не используем display: none, чтобы виджет мог загрузиться */
}

/* Стилизация iframe чата (если доступно) */
.b24-widget-button-inner-container,
.bx-livechat-chat-container {
    background-color: var(--color-card-bg) !important;
}

/* Кастомизация заголовка чата */
.bx-livechat-header {
    background-color: var(--color-background-tertiary) !important;
    border-bottom: 1px solid var(--color-border) !important;
}

/* Цвет кнопок и акцентов в чате */
.bx-livechat-message-send-button,
.bx-livechat-button-primary {
    background-color: var(--color-primary) !important;
    color: #000 !important;
}

/* Входящие сообщения */
.bx-livechat-message-in .bx-livechat-message-body {
    background-color: var(--color-card-item-bg) !important;
    color: var(--color-text-primary) !important;
}

/* Исходящие сообщения */
.bx-livechat-message-out .bx-livechat-message-body {
    background-color: var(--color-primary) !important;
    color: #000 !important;
}

/* Поле ввода сообщения */
.bx-livechat-input-container,
.bx-livechat-input-text {
    background-color: var(--color-input-bg) !important;
    color: var(--color-text-primary) !important;
    border-color: var(--color-border) !important;
}

/* Текст placeholder */
.bx-livechat-input-text::placeholder {
    color: var(--color-text-muted) !important;
}

/* Кнопка отправки */
.bx-livechat-send-button {
    background-color: var(--color-primary) !important;
}

/* Скролл-бар чата */
.bx-livechat-messages::-webkit-scrollbar {
    width: 8px;
}

.bx-livechat-messages::-webkit-scrollbar-track {
    background: var(--color-background-secondary);
}

.bx-livechat-messages::-webkit-scrollbar-thumb {
    background: var(--color-text-muted);
    border-radius: 4px;
}

.bx-livechat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-secondary);
}

/* ========================================
   Секция списка партнеров
   ======================================== */

.partners-list-section {
    margin-top: 40px;
    padding-top: 20px;
}

.partners-section-title-img {
    height: 18px;
    width: auto;
    display: block;
    margin: 0 auto 24px auto;
    object-fit: contain;
    opacity: 0.9;
}

.partners-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.partner-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px 16px;
}

.partner-card-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 3px 0;
}

.partner-card-label {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    font-weight: 300;
}

.partner-card-value {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    font-weight: 300;
    text-align: right;
}

.partner-card-value.partner-name {
    font-style: italic;
    color: var(--color-text-primary);
    font-weight: 400;
}

.partner-card-value.partner-bonus {
    color: var(--color-check-green);
    font-weight: 400;
}

/* Пагинация партнеров */
.partners-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.partners-pagination-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--color-text-secondary);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 300;
    transition: var(--transition-fast);
}

.partners-pagination-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.partners-pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.partners-pagination-info {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    font-weight: 300;
    padding: 0 12px;
}

/* ========================================
   Кнопка раскрытия бонусной программы
   ======================================== */

.bonus-program-expand-btn {
    width: 100%;
    background: #000000;
    border: 1px solid #ffffff;
    border-radius: 12px;
    color: #ffffff;
    padding: 16px 20px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin: 8px 0 4px 0;
    transition: var(--transition-fast);
    min-height: 62px;
}

.bonus-program-expand-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.bonus-program-expand-btn:active {
    transform: scale(0.98);
}

.bonus-program-expand-btn .expand-arrow {
    position: absolute;
    right: 20px;
    transition: transform 0.3s ease;
}

.bonus-program-expand-btn.open .expand-arrow {
    transform: rotate(180deg);
}

/* Выпадающая секция */
.bonus-program-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease;
    opacity: 0;
}

.bonus-program-dropdown.open {
    max-height: none;
    opacity: 1;
    overflow: visible;
}

/* Партнерская программа inline */
.partner-content-inline {
    padding: 16px 0;
    text-align: center;
}

.partner-title-inline {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 12px;
}

.partner-desc-inline {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.qr-code-wrapper-inline {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    cursor: pointer;
}

.qr-code-wrapper-inline .qr-code-img {
    width: 150px;
    height: 150px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.qr-code-wrapper-inline .qr-code-img:hover {
    transform: scale(1.05);
}