/* Отображение баланса */
    .calculator-balance-display {
        /* Создаем контейнер-карточку */
        display: inline-flex; /* Позволяет иконке и тексту выстроиться в ряд */
        align-items: center; /* Центрирует иконку и текст по вертикали */
        background-color: #ffffff; /* Белый фон */
        padding: 0.75rem 1.25rem; /* Внутренние отступы (Tailwind: py-3 px-5) */
        border-radius: 9999px; /* Делает его полностью скругленным, как "пилюля" (Tailwind: rounded-full) */
        border: 1px solid #e2e8f0; /* Тонкая серая рамка (Tailwind: border-slate-200) */
        box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); /* Легкая тень (Tailwind: shadow-md) */
        
        /* Типографика */
        font-size: 1rem; /* Стандартный размер шрифта (16px) */
        color: #475569; /* Приглушенный цвет для текста "Ваш баланс" (Tailwind: text-slate-600) */
        font-weight: 500; /* Средняя жирность (Tailwind: font-medium) */

        /* Отступы и выравнивание */
        margin-bottom: 1.5rem; /* Отступ снизу (Tailwind: mb-6) */
        text-align: left; /* Переопределяем старое выравнивание */

        /* Убираем старую рамку */
        border-bottom: none;
    }

    /* Добавляем иконку кошелька перед текстом */
.calculator-balance-display::before {
    content: '';
    display: inline-block;
    height: 1.25rem;
    width: 1.25rem;
    margin-right: 0.75rem;
    
    /* Нормальная SVG иконка кошелька */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230284c7'%3E%3Cpath d='M21 6.375c0 2.692-4.03 4.875-9 4.875S3 9.067 3 6.375 7.03 1.5 12 1.5s9 2.183 9 4.875z'/%3E%3Cpath d='M12 12.75c2.685 0 5.19-.586 7.078-1.609a8.283 8.283 0 001.897-1.384c.016.121.025.244.025.368C21 12.817 16.97 15 12 15s-9-2.183-9-4.875c0-.124.009-.247.025-.368a8.285 8.285 0 001.897 1.384C6.809 12.164 9.315 12.75 12 12.75z'/%3E%3Cpath d='M12 18.75c2.685 0 5.19-.586 7.078-1.609a8.282 8.282 0 001.897-1.384c.016.121.025.244.025.368 0 2.692-4.03 4.875-9 4.875s-9-2.183-9-4.875c0-.124.009-.247.025-.368a8.284 8.284 0 001.897 1.384C6.809 18.164 9.315 18.75 12 18.75z'/%3E%3Cpath d='M12 24.75c2.685 0 5.19-.586 7.078-1.609a8.282 8.282 0 001.897-1.384c.016.121.025.244.025.368 0 2.692-4.03 4.875-9 4.875s-9-2.183-9-4.875c0-.124.009-.247.025-.368a8.284 8.284 0 001.897 1.384C6.809 24.164 9.315 24.75 12 24.75z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

    /* Стилизуем саму сумму баланса, чтобы она выделялась */
    #pcl-current-balance {
        font-weight: 700; /* Делаем жирным (Tailwind: font-bold) */
        color: #0f172a; /* Темный цвет (Tailwind: text-slate-900) */
        margin-left: 0.25rem; /* Небольшой отступ слева */
        margin-right: 0.25rem; /* Небольшой отступ справа */
        font-size: 1.125rem; /* Чуть крупнее (Tailwind: text-lg) */
    }

.calculator-balance-display {
    font-weight: bold;
    color: #0073aa;
}

/* Контент самого калькулятора */
.calculator-content {
    /* Здесь можно добавить стили, если нужно ограничить ширину/высоту калькулятора */
}

/* Обратная связь для пользователя при клике на кнопку */
.calculator-content button:disabled,
.calculator-content .paid-action:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.paid-calculator-wrapper {

}

.paid-calculator-wrapper .calculator-balance-display {
    font-weight: bold;
    color: #005a9c;
}

/* --- НОВЫЕ СТИЛИ для блока гостя в области баланса --- */
.calculator-balance-display .pcl-guest-prompt {
    display: block;
    margin-bottom: 12px;
    font-size: 15px;
}

.calculator-balance-display .pcl-guest-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.calculator-balance-display .pcl-guest-actions .button {
    text-decoration: none;
    padding: 6px 14px;
    font-size: 13px;
    line-height: 1.5;
    border-radius: 3px;
    border-width: 1px;
    border-style: solid;
    margin: 0;
    white-space: nowrap;
}

.calculator-balance-display .pcl-guest-actions .button.button-primary {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.calculator-balance-display .pcl-guest-actions .button.button-primary:hover {
    background: #005a9c;
    border-color: #005a9c;
    color: #fff;
}

.calculator-balance-display .pcl-guest-actions .button:not(.button-primary) {
    background: #f0f0f0;
    color: #333;
    border-color: #ccc;
}

.calculator-balance-display .pcl-guest-actions .button:not(.button-primary):hover {
    background: #e0e0e0;
    border-color: #bbb;
    color: #333;
}


/* --- Примечание: Стили модальных окон, авторизации и регистрации вынесены в auth-modal.css --- */


/* --- Стили для личного кабинета пользователя --- */
.pcl-dashboard-wrapper {
    width: auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.pcl-dashboard-wrapper h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.pcl-dashboard-card {
    background: #fff;
    margin-bottom: 25px;
    
    background-color: #ffffff; /* bg-white */
    padding: 1.5rem; /* p-6 (24px) */
    border-radius: 1rem; /* rounded-2xl (16px) */
    border: 1px solid rgba(226, 232, 240, 0.8); /* border border-slate-200/80 */

    /* Тень (одна из стандартных теней Tailwind) */
    --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}

.pcl-dashboard-card h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}


.pcl-balance-info {
    font-size: 20px;
    font-weight: 400;
    color: #555;
}

.purchase-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.pcl-balance-info .purchase-section p {
    margin-top: 0;
}

/* Стили для таблицы транзакций */
.pcl-transactions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.pcl-transactions-table th,
.pcl-transactions-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.pcl-transactions-table th {
    background-color: #f9f9f9;
    font-weight: 600;
}

.pcl-transactions-table tbody tr:last-child td {
    border-bottom: 0;
}

.pcl-transactions-table tbody tr:hover {
    background-color: #f5f5f5;
}

/* --- Стили для пагинации в личном кабинете --- */
.pcl-dashboard-pagination {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.pcl-dashboard-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    border: 1px solid #ddd;
    background-color: #f7f7f7;
    color: #555;
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.2s, color 0.2s;
}

.pcl-dashboard-pagination .page-numbers:hover {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.pcl-dashboard-pagination .page-numbers.current {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
    cursor: default;
}

.pcl-dashboard-pagination .page-numbers.dots {
    border: none;
    background: transparent;
}

/* Адаптивность для таблицы на мобильных устройствах */
@media screen and (max-width: 600px) {
    .pcl-transactions-table thead {
        display: none;
    }
    .pcl-transactions-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 3px;
    }
    .pcl-transactions-table td {
        display: block;
        text-align: right;
        border-bottom: 1px dotted #ccc;
    }
    .pcl-transactions-table td:last-child {
        border-bottom: none;
    }
    .pcl-transactions-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
    }
}

/* --- Стили для предупреждения на мобильных --- */
.pcl-mobile-warning {
    background-color: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 15px 20px;
    margin-top: 15px;
    border-radius: 4px;
    color: #5f4c00;
}
.pcl-mobile-warning h3 {
    margin-top: 0;
    color: #5f4c00;
}
.pcl-mobile-warning p:last-child {
    margin-bottom: 0;
}


.pcl-user-balance-value {
    font-size: 30px;
    font-weight: 700;
    color: #0073aa;
}
.pcl-submit-btn {
    background: #0073aa !important;
}
.pcl-submit-btn :hover {
    background: #0073aabf !important;
}


.pcl-proactive-topup{
    display: flex;
    gap: 10px;
    flex-direction: column;
    align-items: center;
}
#pcl-proactive-topup-btn {
    width: auto !important;
}

/* ==========================================================================
   USER SIDEBAR: MODERN IN-FLOW TABS & CONTENT AREA
   ========================================================================== */

.pcl-sidebar-wrapper {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* Sidebar Custom Hover Links */
.custom-hover-link {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.custom-hover-link:hover {
    color: var(--custom-hover-color) !important;
}
.custom-hover-link:hover .link-text {
    color: var(--custom-hover-color) !important;
}

/* Sidebar Navigation Card */
.pcl-sidebar-nav-card {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

/* Tab Action Buttons inside Sidebar */
.pcl-sidebar-tab-button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 8px;
    box-sizing: border-box;
}
.pcl-sidebar-tab-button:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateX(2px);
}
.pcl-sidebar-tab-button.is-active {
    background-color: #f0f9ff;
    border-color: #38bdf8;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.12);
}
.pcl-sidebar-tab-button .pcl-tab-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.pcl-sidebar-tab-button.is-active .pcl-tab-icon-wrap {
    transform: scale(1.05);
}
.pcl-sidebar-tab-button .pcl-tab-icon-wrap svg {
    width: 18px;
    height: 18px;
    display: block;
}
.pcl-sidebar-tab-button .pcl-tab-label {
    margin-left: 12px;
    font-weight: 600;
    color: #334155;
    flex: 1;
    transition: color 0.2s ease;
}
.pcl-sidebar-tab-button.is-active .pcl-tab-label {
    color: #0284c7;
    font-weight: 700;
}
.pcl-sidebar-tab-button .pcl-tab-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0284c7;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.pcl-sidebar-tab-button.is-active .pcl-tab-indicator {
    opacity: 1;
}

/* Content Area & Tab Panels (Natural In-Flow Card) */
.pcl-sidebar-content-area,
.pcl-tabs-content-container {
    width: 100%;
    min-width: 0;
    display: block;
    box-sizing: border-box;
}

.pcl-sidebar-inline-content-slot {
    margin: 0;
    width: 100%;
}

.pcl-tab-panel {
    background: #ffffff;
    border-radius: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    display: none;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin-bottom: 24px;
}
.pcl-tab-panel.is-active {
    display: block !important;
    animation: pclFadeIn 0.25s ease-out;
}

/* Position: Right (Справа от сайдбара) - Занимает всю оставшуюся ширину строки */
@media (min-width: 768px) {
    .pcl-inline-content-area .pcl-tab-panel.pos-right {
        position: absolute;
        top: 0;
        left: calc(100% + 24px);
        width: var(--panel-custom-width, calc(200% - 24px));
        min-width: 320px;
        z-index: 50;
    }
    .pcl-inline-content-area .pcl-tab-panel.pos-left {
        position: absolute;
        top: 0;
        right: calc(100% + 24px);
        width: var(--panel-custom-width, calc(200% - 24px));
        min-width: 320px;
        z-index: 50;
    }
    .pcl-inline-content-area .pcl-tab-panel.pos-inline {
        position: relative;
        margin-top: 20px;
        width: 100%;
    }
}

/* Mobile & Standalone */
@media (max-width: 767px) {
    .pcl-inline-content-area .pcl-tab-panel.pos-right,
    .pcl-inline-content-area .pcl-tab-panel.pos-left {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 20px !important;
    }
}

.pcl-standalone-content-area .pcl-tab-panel {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Мгновенный скрывающий фильтр: если на странице есть отдельная колонка контента, полностью исключаем дублирование */
body:has(.pcl-standalone-content-area) .pcl-sidebar-inline-content-slot,
html:has(.pcl-standalone-content-area) .pcl-sidebar-inline-content-slot {
    display: none !important;
}

/* Panel Header */
.pcl-tab-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
.pcl-tab-panel-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pcl-tab-panel-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pcl-tab-panel-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}
.pcl-tab-panel-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}

/* Panel Body */
.pcl-tab-panel-body {
    padding: 24px;
    font-size: 15px;
    line-height: 1.65;
    color: #334155;
    word-break: break-word;
}
.pcl-tab-panel-body > *:first-child {
    margin-top: 0;
}
.pcl-tab-panel-body > *:last-child {
    margin-bottom: 0;
}

/* Бесшовное встраивание внутренних компонентов (Dashboard, История операций, Калькуляторы) */
.pcl-tab-panel-body .pcl-dashboard-wrapper,
.pcl-tab-panel-body .pcl-dashboard-card,
.pcl-tab-panel-body .paid-calculator-wrapper {
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    margin: 0 !important;
}
.pcl-tab-panel-body .pcl-dashboard-card > h4 {
    margin-top: 0 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    padding-bottom: 14px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    margin-bottom: 20px !important;
}

/* Side-by-Side Flex Layout (if used in 1 container) */
.pcl-sidebar-flex-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
}
.pcl-sidebar-flex-layout .pcl-sidebar-nav-col {
    width: 320px;
    min-width: 280px;
    max-width: 360px;
    flex-shrink: 0;
}
.pcl-sidebar-flex-layout .pcl-sidebar-content-col {
    flex: 1;
    min-width: 0;
}

@media (max-width: 860px) {
    .pcl-sidebar-flex-layout {
        flex-direction: column;
    }
    .pcl-sidebar-flex-layout .pcl-sidebar-nav-col {
        width: 100%;
        max-width: 100%;
    }
}

@keyframes pclFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Стили для модального окна подтверждения VIP-подписки --- */
.pcl-vip-confirm-modal {
    margin: 10px 0 5px;
    text-align: left;
}

.pcl-vip-modal-card {
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

.pcl-vip-modal-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #1d4ed8;
}

.pcl-vip-modal-row {
    font-size: 13.5px;
    color: #334155;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pcl-vip-modal-row:last-child {
    margin-bottom: 0;
}

.pcl-vip-modal-text {
    font-size: 13.5px;
    color: #475569;
    line-height: 1.5;
    margin: 0;
    text-align: left;
}

/* --- Плавающий бар с напоминанием о сохранении отчета --- */
.pcl-save-reminder-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    max-width: 640px;
    width: calc(100% - 32px);
    background: #0f172a;
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    z-index: 999999;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    box-sizing: border-box;
}

.pcl-save-reminder-bar.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.pcl-save-reminder-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.pcl-save-reminder-icon {
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1;
}

.pcl-save-reminder-text {
    font-size: 13.5px;
    font-weight: 500;
    color: #f8fafc;
    line-height: 1.4;
    text-align: left;
}

.pcl-save-reminder-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pcl-save-reminder-btn {
    background: #0284c7;
    color: #ffffff !important;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
}

.pcl-save-reminder-btn:hover {
    background: #0369a1;
    transform: translateY(-1px);
    color: #ffffff !important;
}

.pcl-save-reminder-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 22px;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.pcl-save-reminder-close:hover {
    color: #ffffff;
}

@media (max-width: 480px) {
    .pcl-save-reminder-bar {
        bottom: 16px;
        padding: 10px 12px;
        gap: 8px;
    }
    .pcl-save-reminder-text {
        font-size: 12.5px;
    }
    .pcl-save-reminder-btn {
        padding: 7px 12px;
        font-size: 12px;
    }
}

/* Анимация подсветки целевой кнопки сохранения */
@keyframes pclButtonPulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.8);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(2, 132, 199, 0);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(2, 132, 199, 0);
        transform: scale(1);
    }
}

.pcl-highlight-target-btn {
    animation: pclButtonPulseGlow 1.2s ease-in-out 3 !important;
    outline: 2px solid #0284c7 !important;
    outline-offset: 3px !important;
    transition: all 0.3s ease !important;
}