/* ============================================
   INVESTMENT  PAGE - PROFESSIONAL STYLE
   Mobile App + Desktop | Admin Configurable Theme
   ============================================ */

/* ===== PAGE CONTAINER ===== */
.invest-statistics-page {
    min-height: 100vh;
    background: var(--bg-secondary);
    padding-bottom: 40px;
}

/* ===== HEADER ===== */
.stats-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 25px 20px 35px 20px;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.header-gradient {
    position: absolute;
    top: -30%;
    right: -20%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.header-label {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 4px;
}

.header-title {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin: 0 0 4px 0;
}

.header-subtitle {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin: 0;
}

/* ===== STATS CARD ===== */
.stats-card {
    background: var(--bg-primary);
    border-radius: 24px;
    margin: -20px 16px 20px 16px;
    padding: 20px;
    position: relative;
    z-index: 10;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
}

.stats-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.stat-block {
    flex: 1;
    text-align: center;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 16px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.stat-value.positive {
    color: #28c76f;
}

/* ===== WALLET SECTION ===== */
.wallet-section {
    margin: 20px 16px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.section-header i {
    font-size: 20px;
    color: var(--primary);
}

.section-header h5 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.wallet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.wallet-card {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.wallet-card:active {
    transform: scale(0.98);
}

.wallet-label {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
}

.wallet-balance {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
    margin-bottom: 6px;
}

.wallet-action {
    font-size: 10px;
    color: var(--primary);
    text-decoration: none;
    display: inline-block;
}

.wallet-action:active {
    opacity: 0.7;
}

/* ===== INVESTMENT SECTION ===== */
.investment-section {
    margin: 0 16px 20px 16px;
}

/* ===== INVESTMENT CARDS ===== */
.invest-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.invest-card {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    cursor: pointer;
}

.invest-card:active {
    transform: scale(0.98);
}

.invest-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.plan-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.plan-details {
    font-size: 11px;
    color: var(--text-muted);
}

.status-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-badge.active {
    background: rgba(40, 199, 111, 0.1);
    color: #28c76f;
}

.status-badge.completed {
    background: rgba(0, 207, 232, 0.1);
    color: #00cfe8;
}

.status-badge.cancelled {
    background: rgba(234, 84, 85, 0.1);
    color: #ea5455;
}

.status-badge.paused {
    background: rgba(255, 159, 67, 0.1);
    color: #ff9f43;
}

.invest-card-body {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.invest-amount .label,
.invest-date .label,
.invest-next .label {
    font-size: 10px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 2px;
}

.invest-amount .value,
.invest-date .value,
.invest-next .value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Progress Bar */
.invest-progress {
    grid-column: span 3;
    margin-top: 8px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.progress-bar-container {
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border-radius: 3px;
    transition: width 0.3s;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 6px;
}

.invest-card-footer {
    display: flex;
    justify-content: flex-end;
}

.view-link {
    color: var(--primary);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.view-link:active {
    opacity: 0.7;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    background: var(--bg-primary);
    border-radius: 24px;
    padding: 50px 20px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.empty-state i {
    font-size: 64px;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: block;
}

.empty-state h5 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.empty-state .btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 44px;
    padding: 12px 24px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

/* ===== PAGINATION ===== */
.pagination-wrapper {
    margin-top: 20px;
    padding: 0 16px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
}

.pagination .page-item {
    display: inline-block;
}

.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination .page-link:active {
    transform: scale(0.95);
}

.pagination .active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ===== DESKTOP ===== */
@media (min-width: 768px) {
    .invest-statistics-page {
        max-width: 1000px;
        margin: 0 auto;
    }
    
    .wallet-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
    
    .invest-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    }
}

@media (max-width: 640px) {
    .stats-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .invest-card-body {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .invest-progress {
        grid-column: span 2;
    }
    
    .wallet-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== DARK THEME ===== */
body.dark-theme .stats-card,
body.dark-theme .wallet-card,
body.dark-theme .invest-card,
body.dark-theme .empty-state {
    background: var(--dark-bg-secondary);
    border-color: var(--dark-border);
}

body.dark-theme .stat-block {
    background: var(--dark-bg-tertiary);
}

/* ===== ANIMATIONS ===== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stats-card, .wallet-card, .invest-card {
    animation: slideUp 0.3s ease-out;
    animation-fill-mode: both;
}

.stats-card { animation-delay: 0.05s; }
.wallet-card:nth-child(1) { animation-delay: 0.1s; }
.wallet-card:nth-child(2) { animation-delay: 0.15s; }
.wallet-card:nth-child(3) { animation-delay: 0.2s; }
.wallet-card:nth-child(4) { animation-delay: 0.25s; }
.invest-card:nth-child(1) { animation-delay: 0.05s; }