/* ========================================= */
/* === СТИЛІ КАБІНЕТУ (FLUX MARKETPLACE) === */
/* ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;800&display=swap');

/* 1. НАЛАШТУВАННЯ МАКЕТУ СТОРІНКИ */
body {
    background-color: #111310;
    color: #fff;
    font-family: 'Neue Machina', 'Montserrat', sans-serif;
    margin: 0;
    padding-top: 90px; 
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden; 
    width: 100%;
}

*, ::after, ::before { box-sizing: border-box; }

/* 2. ІЗОЛЬОВАНІ СТИЛІ */

.profile-container h2, 
.profile-container h3,
.modal h2 {
    font-family: 'Neue Machina', sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    color: #ffffff;
    margin: 0;
}

.profile-container ul { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
}

/* ========================================= */
/* 3. ГОЛОВНИЙ КОНТЕЙНЕР І СІТКА             */
/* ========================================= */
.profile-container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto 50px auto;
    flex: 1; 
}

.profile-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr; /* Профіль ширший, Гаманець вужчий */
    gap: 25px;
    margin-bottom: 40px;
}

/* ========================================= */
/* 4. КАРТКА ПРОФІЛЮ                         */
/* ========================================= */
.profile-card {
    background: #16181b;
    border-radius: 24px;
    padding: 35px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.profile-header-content {
    display: flex;
    gap: 35px;
    align-items: center;
}

.profile-pic {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #7300ff;
    box-shadow: 0 0 30px rgba(115, 0, 255, 0.3);
    transition: transform 0.3s ease;
}

.profile-pic:hover { transform: scale(1.05); border-color: #fff; }

.profile-info { flex: 1; min-width: 0; }

.user-roles { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }

.role {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: default;
}

.role.owner { background: linear-gradient(135deg, #ffd700, #ffaa00); color: #000; box-shadow: 0 0 10px rgba(255, 215, 0, 0.4); }
.role.admin { background: rgba(115, 0, 255, 0.2); color: #a855f7; border: 1px solid rgba(115, 0, 255, 0.4); }
.role.user { background: rgba(255, 255, 255, 0.1); color: #aaa; }

.badge-business, 
#accountTypeBadge .badge-business { 
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(115, 0, 255, 0.15) !important; 
    color: #a855f7 !important; 
    border: 1px solid #7300ff !important; 
    padding: 5px 12px; border-radius: 6px; 
    font-size: 0.75rem; font-weight: 800; text-transform: uppercase;
    box-shadow: 0 0 10px rgba(115, 0, 255, 0.2);
}

.badge-verified {
    color: #1da1f2; margin-left: 10px; font-size: 0.7em; 
    vertical-align: middle; display: inline-flex; align-items: center;
    border: none; background: transparent; padding: 0;
    filter: drop-shadow(0 0 8px rgba(29, 161, 242, 0.6));
    transform: translateY(-3px);
}
.badge-verified i { font-size: 1.3em; }

.profile-info h2 { font-size: 2.2rem; margin-bottom: 15px; letter-spacing: 1px; color: #fff; word-wrap: break-word; }

.user-meta { color: #888; margin: 6px 0; font-size: 1rem; }
.user-meta strong { color: #fff; }

.profile-actions-row { 
    display: flex; 
    gap: 15px; 
    margin-top: 25px; 
    flex-wrap: wrap; 
}

/* КНОПКИ ПРОФІЛЮ */
.admin-btn, .edit-btn, .business-btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.95rem;
    white-space: nowrap;
}

.admin-btn {
    background: linear-gradient(135deg, #7300ff, #5e00d1);
    color: #fff;
    box-shadow: 0 5px 20px rgba(115, 0, 255, 0.3);
}
.admin-btn:hover { box-shadow: 0 5px 25px rgba(115, 0, 255, 0.6); transform: translateY(-2px); }

.business-btn {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    color: #fff;
    box-shadow: 0 5px 20px rgba(0, 198, 255, 0.3);
}
.business-btn:hover { 
    box-shadow: 0 5px 25px rgba(0, 198, 255, 0.6); 
    transform: translateY(-2px); 
}

.edit-btn {
    background: #25282e;
    color: #fff;
    border: 1px solid #333;
}
.edit-btn:hover { background: #333; border-color: #fff; }

/* Блок постачальника — преміум (фіолетово-синій) / зелений */
/* Преміум картка (НЕ постачальник) */
/* Зелена картка (вже постачальник) */
/* ========================================= */
/* 5. КАРТКА ГАМАНЦЯ (FLUX WALLET)           */
/* ========================================= */
.wallet-card {
    background: radial-gradient(circle at top right, #1a221d, #0d0e0f);
    border-radius: 24px;
    padding: 30px; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(0, 230, 118, 0.15);
    position: relative;
    overflow: hidden;
    min-height: 260px; 
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    width: 100%;
}

.wallet-card::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 250px; height: 250px;
    background: radial-gradient(circle, rgba(0, 230, 118, 0.1) 0%, transparent 70%);
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
}

.wallet-header {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #888;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    z-index: 1;
    text-transform: uppercase;
}

.wallet-icon { 
    color: #00e676; 
    font-size: 1.2rem; 
    filter: drop-shadow(0 0 5px rgba(0, 230, 118, 0.5));
}

.wallet-balance {
    font-family: 'Neue Machina', sans-serif;
    font-size: 2.6rem; 
    font-weight: 800;
    color: #fff;
    margin: 15px 0;
    z-index: 1;
    text-shadow: 0 0 25px rgba(0, 230, 118, 0.15);
    line-height: 1;
    display: flex;
    align-items: baseline; 
    flex-wrap: wrap; 
}

.wallet-balance span:last-child {
    font-size: 1rem; 
    color: #00e676;
    font-weight: 600;
    margin-left: 8px;
}

.wallet-stats {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    color: #aaa;
    z-index: 1;
    flex-wrap: wrap;
}
.wallet-stats strong { color: #fff; font-size: 1rem; }

.wallet-actions-row {
    display: flex;
    gap: 12px;
    width: 100%;
    z-index: 1;
    margin-top: auto;
    flex-wrap: wrap;
}

.topup-btn-large, 
.withdraw-btn-large {
    flex: 1; 
    min-width: 120px; 
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: 'Montserrat', sans-serif;
    text-decoration: none;
    font-size: 0.9rem;
}

.topup-btn-large {
    background: #00e676;
    color: #000;
    border: none;
    box-shadow: 0 5px 20px rgba(0, 230, 118, 0.2);
}
.topup-btn-large:hover { 
    background: #00ff80; 
    box-shadow: 0 10px 30px rgba(0, 230, 118, 0.4); 
    transform: translateY(-2px);
}

.withdraw-btn-large {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}
.withdraw-btn-large:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    transform: translateY(-2px);
}

/* ========================================= */
/* 6. СИСТЕМА ВКЛАДОК (TABS)                 */
/* ========================================= */
.tabs-container { margin-top: 20px; width: 100%; }

.tabs-header {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch;
}

.tab-btn {
    background: transparent;
    border: none;
    color: #777;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    padding: 12px 24px;
    border-radius: 8px;
    transition: all 0.3s;
    font-family: inherit;
    display: flex; align-items: center; gap: 8px;
    white-space: nowrap; 
}

.tab-btn:hover { color: #fff; background: rgba(255,255,255,0.05); }

.tab-btn.active {
    background: rgba(115, 0, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(115, 0, 255, 0.3);
}
.tab-btn.active i { color: #7300ff; }

/* Особливий стиль для кнопки Premium в табах */
.tab-btn.active i.fa-crown { color: #ffcc00; }

.logout-tab { margin-left: auto; color: #ff4444; }
.logout-tab:hover { background: rgba(255, 68, 68, 0.1); color: #ff4444; border: 1px solid rgba(255, 68, 68, 0.3); }

.tab-content { display: none; animation: fadeIn 0.4s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ========================================= */
/* 🔥 6.1. НОВА ВКЛАДКА "FLUX PREMIUM" 🔥    */
/* ========================================= */
.sub-tab-container {
    background: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sub-header-large {
    background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 204, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.sub-header-large::before { 
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255, 204, 0, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.sub-header-large i {
    font-size: 3rem;
    color: #ffcc00;
    margin-bottom: 10px;
    display: inline-block;
}

.sub-header-large h2 {
    margin: 0;
    color: #ffcc00;
    font-size: 1.8rem;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.3);
}

.sub-header-large p {
    margin: 5px 0 0;
    color: #888;
    font-size: 0.9rem;
}

.sub-dashboard {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 0;
}

/* ЛІВА ПАНЕЛЬ (Статус) */
.sub-info-panel {
    padding: 30px;
    background: rgba(255, 255, 255, 0.02);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.sub-info-panel h4 { margin-top: 0; color: #ccc; }

.status-badge-large {
    font-size: 1.1rem;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    text-transform: uppercase;
    margin: 15px 0;
    display: inline-block;
}

.status-badge-large.free {
    background: #333;
    color: #aaa;
    border: 1px solid #444;
}

.status-badge-large.premium {
    background: linear-gradient(45deg, #ffd700, #ffaa00);
    color: #000;
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.4);
    border: none;
    animation: pulse 2s infinite;
}

.sub-price-tag {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin: 20px 0;
}

.buy-sub-btn-large {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(45deg, #ffcc00, #ff9900);
    color: #000;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(255, 165, 0, 0.3);
}

.buy-sub-btn-large:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(255, 165, 0, 0.5); }

.buy-sub-btn-large.active-sub {
    background: #1e1e1e;
    border: 2px solid #00e676;
    color: #00e676;
    cursor: default;
    box-shadow: none;
}
.buy-sub-btn-large.active-sub:hover { transform: none; }

/* ПРАВА ПАНЕЛЬ (Переваги) */
.sub-benefits-panel {
    padding: 30px;
}

.sub-benefits-panel h4 { margin-top: 0; margin-bottom: 20px; color: #fff; }

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.benefits-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 10px;
    border-radius: 8px;
    transition: 0.3s;
}

.benefits-list li:hover { background: rgba(255, 255, 255, 0.03); }

.icon-box {
    width: 40px; height: 40px;
    background: rgba(115, 0, 255, 0.1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.text-box { display: flex; flex-direction: column; }
.text-box strong { color: #fff; font-size: 1rem; margin-bottom: 2px; }
.text-box span { color: #888; font-size: 0.85rem; }

@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 204, 0, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(255, 204, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 204, 0, 0); } }
@keyframes bounceIcon { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.bounce-icon { animation: bounceIcon 2s infinite ease-in-out; }

/* ========================================= */
/* 7. СПИСОК ОГОЛОШЕНЬ (ADS LIST)            */
/* ========================================= */
.ads-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.ads-controls h3 { font-size: 1.4rem; letter-spacing: 1px; color: #fff; }

.add-product-btn {
    background: linear-gradient(90deg, #00e676, #00c853);
    color: #000;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    display: flex; align-items: center; gap: 8px;
    transition: 0.3s;
    font-size: 0.9rem;
    white-space: nowrap;
}
.add-product-btn:hover { box-shadow: 0 0 15px rgba(0, 230, 118, 0.5); transform: translateY(-2px); }

.ads-list-container { display: flex; flex-direction: column; gap: 12px; }

/* Картка оголошення */
.ad-item {
    background: #1e2024;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.03);
    transition: 0.3s;
}
.ad-item:hover {
    transform: translateX(5px);
    border-color: #7300ff;
    background: #23262b;
}

.ad-info { display: flex; align-items: center; gap: 15px; overflow: hidden; }
.ad-icon { color: #00e676; font-size: 1.3rem; background: rgba(0, 230, 118, 0.1); padding: 10px; border-radius: 8px; flex-shrink: 0; }
.ad-name { font-weight: 700; font-size: 1.1rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-price { color: #00e676; font-family: 'Neue Machina'; font-weight: 700; margin-left: 15px; font-size: 1.1rem; white-space: nowrap;}

.ad-actions { display: flex; gap: 8px; flex-shrink: 0; }

.icon-btn {
    width: 38px; height: 38px;
    border-radius: 8px;
    border: 1px solid #444;
    background: #2c2f36;
    color: #ccc;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: 0.3s;
}
.icon-btn.edit:hover { border-color: #7300ff; color: #7300ff; background: rgba(115, 0, 255, 0.1); }
.icon-btn.delete:hover { border-color: #ff4444; color: #ff4444; background: rgba(255, 68, 68, 0.1); }

/* ========================================= */
/* 8. ТАБЛИЦІ (ІЗОЛЬОВАНІ)                   */
/* ========================================= */
.orders-list-container, .support-list-container {
    background: #1e2024;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}

.orders-list-container li, .support-list-container li {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ddd;
}
.orders-list-container li:last-child { border-bottom: none; }
.orders-list-container li:hover { background: rgba(255,255,255,0.02); }

/* ========================================= */
/* 9. ФУТЕР                                  */
/* ========================================= */
footer {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #888;
    padding: 30px;
    text-align: center;
    font-size: 1em;
    background: #121212;
    width: 100%;
}

footer a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}
footer a:hover { color: #7300ff; }

/* ========================================= */
/* 10. МОДАЛЬНЕ ВІКНО (РЕДАГУВАННЯ)          */
/* ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
}

.modal-content {
    background: #1e2024;
    margin: 10% auto;
    padding: 30px;
    width: 90%; max-width: 450px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    animation: slideDown 0.3s ease;
}
@keyframes slideDown { from { transform: translateY(-30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; border-bottom: 1px solid #333; padding-bottom: 15px; }
.modal-header h2 { font-size: 1.3rem; }
.close-modal { font-size: 28px; cursor: pointer; color: #888; }
.close-modal:hover { color: #fff; }

.input-group { margin-bottom: 20px; }
.input-group label { display: block; margin-bottom: 8px; color: #ccc; font-size: 0.9rem; }
.input-group input[type="text"] {
    width: 100%; padding: 12px; background: #111; border: 1px solid #333;
    color: #fff; border-radius: 8px; font-family: inherit; transition: 0.3s;
}
.input-group input:focus { border-color: #7300ff; outline: none; }

.custom-file-upload {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 15px; border: 2px dashed #444; border-radius: 12px;
    cursor: pointer; color: #aaa; transition: 0.3s;
}
.custom-file-upload:hover { border-color: #7300ff; color: #fff; background: rgba(115,0,255,0.05); }

.save-btn {
    width: 100%; padding: 14px;
    background: linear-gradient(90deg, #00e676, #00c853);
    color: #000; border: none; border-radius: 10px;
    font-weight: 700; cursor: pointer; font-size: 1rem;
    transition: 0.3s;
}
.save-btn:hover { box-shadow: 0 0 15px rgba(0,230,118,0.4); }

/* ========================================= */
/* 11. АДАПТИВНІСТЬ (MOBILE FIRST FIXED)     */
/* ========================================= */
@media (max-width: 900px) {
    .profile-grid { grid-template-columns: 1fr; }
    .profile-header-content { flex-direction: column; text-align: center; }
    
    .profile-actions-row { justify-content: center; flex-wrap: wrap; }
    .admin-btn, .edit-btn, .business-btn { flex: 1 1 auto; min-width: 120px; }

    .profile-card, .wallet-card { padding: 20px; }
    
    .wallet-card { min-height: auto; align-items: center; text-align: center; }
    .wallet-card::before { left: 50%; transform: translateX(-50%); }
    
    .wallet-stats { justify-content: center; }
    
    .tabs-header { justify-content: flex-start; padding-bottom: 10px; }
    .logout-tab { margin-left: 0; }

    /* Адаптивність нової вкладки */
    .sub-dashboard { grid-template-columns: 1fr; }
    .sub-info-panel { border-right: none; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
}

/* ========================================= */
/* 768px: глобальна ширина, відступи 12–16px */
/* ========================================= */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        width: 100%;
    }

    .profile-container {
        width: 100%;
        max-width: 100%;
        padding: 0 12px 30px;
        box-sizing: border-box;
    }

    .profile-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 24px;
    }

    .profile-card,
    .wallet-card {
        padding: 16px;
        width: 100%;
        box-sizing: border-box;
    }

    .profile-header-content {
        gap: 20px;
    }

    .profile-pic {
        width: 120px;
        height: 120px;
    }

    .profile-info h2 {
        font-size: 1.5rem;
        word-break: break-word;
    }

    .admin-btn, .edit-btn, .business-btn {
        min-height: 44px;
        padding: 12px 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .wallet-card {
        padding: 16px;
    }

    .wallet-actions-row .topup-btn-large,
    .wallet-actions-row .withdraw-btn-large {
        min-height: 44px;
        width: 100%;
    }

    .tabs-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .tab-btn {
        min-height: 44px;
        padding: 12px 16px;
    }

    .sub-dashboard {
        grid-template-columns: 1fr;
    }

    .sub-header-large h2 {
        font-size: 1.4rem;
        word-break: break-word;
    }

.ad-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }

    .ads-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .add-product-btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }

    .modal-content {
        width: 95%;
        max-width: 100%;
        padding: 20px 16px;
        margin: 10px;
        box-sizing: border-box;
    }

    .input-group input[type="text"] {
        width: 100%;
        box-sizing: border-box;
    }

    .save-btn {
        width: 100%;
        min-height: 44px;
    }
}

/* ============================================================ */
/* 🔥 12. КАСТОМНІ ЕЛЕМЕНТИ (CONFIRM, TOAST) 🔥                */
/* ============================================================ */

/* Вікно підтвердження */
.custom-confirm-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.custom-confirm-box {
    background: #1e1e1e;
    border: 1px solid #333;
    padding: 25px;
    border-radius: 12px;
    width: 320px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform: scale(0.9);
    animation: scaleUp 0.2s ease forwards;
}

.custom-confirm-box h3 { margin: 0 0 10px 0; color: #fff; font-size: 1.2rem; }
.custom-confirm-box p { color: #aaa; margin-bottom: 20px; font-size: 0.95rem; }

.confirm-actions { display: flex; gap: 10px; justify-content: center; }

.btn-confirm-yes, .btn-confirm-no {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    transition: 0.2s;
}

.btn-confirm-no { background: #333; color: #fff; }
.btn-confirm-no:hover { background: #444; }

.btn-confirm-yes { background: #ff4444; color: white; }
.btn-confirm-yes:hover { background: #cc0000; }

@keyframes scaleUp { to { transform: scale(1); } }

/* ========================================= */
/* 🔥 TOAST - ТЕМНИЙ СТИЛЬ (FORCE DARK) 🔥   */
/* ========================================= */
#toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.toast {
    min-width: 300px;
    padding: 16px 20px;
    
    background: #1e1e1e !important; 
    
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid #333;
    
    color: #fff !important;
    font-weight: 600;
    font-size: 0.95rem;
    
    display: flex;
    align-items: center;
    gap: 15px;
    
    border-left: 6px solid transparent; 
    
    animation: slideInRight 0.4s ease;
}

/* Іконка */
.toast i { font-size: 1.4rem; }

.toast.success {
    background: #1e1e1e !important;
    border-left-color: #00e676 !important;
}
.toast.success i { color: #00e676 !important; }

.toast.error {
    background: #1e1e1e !important;
    border-left-color: #ff4444 !important;
}
.toast.error i { color: #ff4444 !important; }

.toast.info {
    background: #1e1e1e !important;
    border-left-color: #7300ff !important;
}
.toast.info i { color: #7300ff !important; }

@keyframes slideInRight {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
    to { transform: translateX(120%); opacity: 0; }
}

/* ========================================= */
/* === ІСТОРІЯ ПОКУПОК (STYLES)          === */
/* ========================================= */

.orders-list-container {
    list-style: none;
    padding: 0;
    margin: 0;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease;
}

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

.order-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.order-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.order-icon-box {
    width: 45px;
    height: 45px;
    background: rgba(115, 0, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7300ff;
    font-size: 1.2em;
}

.order-title {
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
    margin-bottom: 4px;
}

.order-meta {
    font-size: 0.85em;
    color: #888;
    display: flex;
    gap: 15px;
}

.order-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.order-price {
    font-family: 'Neue Machina', sans-serif;
    font-weight: 700;
    color: #ff4444; /* Червоний, бо це витрата */
    font-size: 1.1em;
}

/* Кнопка "Перейти до покупок" (для порожнього списку) */
.btn-shop-now {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9em;
    transition: 0.3s;
}
.btn-shop-now:hover {
    background: #7300ff;
}

@media (max-width: 600px) {
    .order-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .order-price {
        align-self: flex-end; 
    }
}

/* Telegram Button */
.tg-btn {
    background: #229ED9; /* Telegram Blue */
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(34, 158, 217, 0.2);
    text-decoration: none;
}

.tg-btn:hover {
    background: #1c88bc;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 158, 217, 0.3);
}

.tg-btn i {
    font-size: 16px;
}