/* Account Pages Styles */

/* Account Page Layout */
.account-page {
    padding: 20px 0;
}

/* Account Sidebar */
.account-sidebar {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 8px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-nav li {
    border-bottom: none;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    color: #555;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.sidebar-nav a:hover {
    background: #fff5f5;
    color: #e74c3c;
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.sidebar-nav a.active i {
    color: #fff;
}

.sidebar-nav a i {
    font-size: 20px;
    color: #999;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.sidebar-nav a:hover i {
    color: #e74c3c;
}

.logout-link {
    color: #e74c3c !important;
    margin-top: 4px;
}

.logout-link i {
    color: #e74c3c !important;
}

/* ── Mobile Bottom Nav ─────────────────────────────────── */
.account-bottom-nav {
    display: none;
}

@media (max-width: 767px) {
    /* Hide desktop sidebar */
    .account-sidebar {
        display: none;
    }

    /* Show bottom nav */
    .account-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: #fff;
        border-top: 1px solid #eee;
        box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.1);
        padding: 6px 0 env(safe-area-inset-bottom, 6px);
    }

    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 6px 4px;
        color: #999;
        text-decoration: none;
        font-size: 10px;
        font-weight: 500;
        transition: color 0.2s ease;
        position: relative;
    }

    .bottom-nav-item i {
        font-size: 22px;
        transition: transform 0.2s ease;
    }

    .bottom-nav-item:hover {
        color: #e74c3c;
    }

    .bottom-nav-item.active {
        color: #e74c3c;
    }

    .bottom-nav-item.active i {
        transform: scale(1.15);
    }

    .bottom-nav-item.active::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 32px;
        height: 3px;
        background: #e74c3c;
        border-radius: 0 0 4px 4px;
    }

    .bottom-nav-item.logout-link {
        color: #e74c3c;
    }

    /* Add bottom padding to account content so it's not hidden behind the nav */
    .account-content {
        padding-bottom: 72px;
    }
}


/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Stats Card */
.stats-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
}

.stats-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stats-card--primary .stats-icon {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.stats-card--success .stats-icon {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.stats-card--warning .stats-icon {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.stats-card--danger .stats-icon {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.stats-icon i {
    font-size: 28px;
}

.stats-content {
    flex: 1;
}

.stats-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.stats-value {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.stats-trend {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    margin-top: 5px;
}

.stats-trend.positive {
    color: #27ae60;
}

.stats-trend.negative {
    color: #e74c3c;
}

.stats-trend i {
    font-size: 16px;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge i {
    font-size: 16px;
}

.status-badge--success {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.status-badge--warning {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.status-badge--danger {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.status-badge--info {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
}

/* Wallet Balance Card */
.wallet-balance-card {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.balance-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.balance-header i {
    font-size: 36px;
}

.balance-header h3 {
    margin: 0;
    font-size: 20px;
}

.balance-amount {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 30px;
}

.balance-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Transactions List */
.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.transaction-item:hover {
    background: #f0f0f0;
}

.transaction-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.transaction-icon i {
    font-size: 24px;
    color: #e74c3c;
}

.transaction-details {
    flex: 1;
}

.transaction-details h5 {
    margin: 0 0 5px 0;
    font-size: 16px;
}

.transaction-details p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.transaction-amount {
    font-size: 18px;
    font-weight: 600;
}

.transaction-amount.positive {
    color: #27ae60;
}

.transaction-amount.negative {
    color: #e74c3c;
}

.transaction-type {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Fund Wallet */
.fund-wallet-container {
    max-width: 600px;
    margin: 0 auto;
}

.fund-section {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.fund-section h4 {
    margin: 0 0 20px 0;
}

.amount-input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.currency-symbol {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    font-weight: 600;
    color: #666;
}

.amount-input {
    width: 100%;
    padding: 15px 15px 15px 50px;
    font-size: 24px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-weight: 600;
}

.amount-input:focus {
    outline: none;
    border-color: #e74c3c;
}

.quick-amounts {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.payment-method-card {
    position: relative;
    cursor: pointer;
}

.payment-method-card input {
    position: absolute;
    opacity: 0;
}

.method-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.method-content i {
    font-size: 36px;
    color: #666;
}

.payment-method-card.active .method-content {
    border-color: #e74c3c;
    background: #fff5f5;
}

.payment-method-card.active .method-content i {
    color: #e74c3c;
}

.summary-table {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.summary-row.total {
    border-top: 2px solid #ddd;
    border-bottom: none;
    padding-top: 15px;
    margin-top: 10px;
    font-size: 18px;
    color: #e74c3c;
}

/* Referral Page */
.referral-card {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
}

.referral-code-display,
.referral-link-display {
    margin: 20px 0;
}

.code-box,
.link-box {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.code {
    font-size: 32px;
    font-weight: 700;
    color: #e74c3c;
    letter-spacing: 2px;
}

.link-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.share-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

.how-it-works {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.step-card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e74c3c;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 15px;
}

.step-card h4 {
    margin: 0 0 10px 0;
}

.step-card p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Leaderboard */
.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    margin: 40px 0;
}

.podium-position {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-width: 150px;
}

.position-1 {
    order: 2;
    padding-top: 40px;
}

.position-2 {
    order: 1;
}

.position-3 {
    order: 3;
}

.podium-badge {
    font-size: 48px;
    margin-bottom: 10px;
}

.podium-rank {
    font-size: 18px;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
}

.podium-avatar i {
    font-size: 60px;
    color: #e74c3c;
}

.podium-name {
    font-weight: 600;
    margin: 10px 0;
}

.podium-stats {
    font-size: 14px;
    color: #666;
}

.leaderboard-table .current-user {
    background: #fff5f5;
    font-weight: 600;
}

.rank-badge {
    display: inline-block;
    padding: 5px 12px;
    background: #e74c3c;
    color: #fff;
    border-radius: 20px;
    font-weight: 600;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-cell i {
    font-size: 32px;
    color: #e74c3c;
}

.you-badge {
    background: #27ae60;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.badge-icon {
    font-size: 24px;
}

.rewards-info {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    margin-top: 30px;
}

.rewards-info h4 {
    text-align: center;
    margin-bottom: 20px;
}

.rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.reward-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.reward-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.reward-card h5 {
    margin: 0 0 10px 0;
}

.reward-card p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* Loan Page */
.eligibility-card {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.eligibility-card i {
    font-size: 60px;
    margin-bottom: 15px;
}

.eligibility-card i.success {
    color: #27ae60;
}

.eligibility-card i.danger {
    color: #e74c3c;
}

.loan-calculator {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
}

.calculator-input {
    margin-bottom: 30px;
}

.calculator-input label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.slider-container {
    position: relative;
}

.loan-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.loan-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e74c3c;
    cursor: pointer;
}

.slider-value {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #e74c3c;
    margin-top: 15px;
}

.duration-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.calculator-summary {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.calculator-summary .summary-row.highlight {
    background: #fff5f5;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 18px;
}

.terms-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.term-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.term-item i {
    color: #27ae60;
    font-size: 24px;
}

/* Support Page */
.quick-help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.help-card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.help-card i {
    font-size: 48px;
    color: #e74c3c;
    margin-bottom: 15px;
}

.help-card h4 {
    margin: 0 0 10px 0;
}

.help-card p {
    margin: 0 0 15px 0;
    color: #666;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #f9f9f9;
}

.faq-question.active {
    background: #fff5f5;
    color: #e74c3c;
}

.faq-answer {
    padding: 0 20px 20px 20px;
    color: #666;
}

.support-form {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
}

.support-form .form-group {
    margin-bottom: 20px;
}

.support-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.support-form input,
.support-form select,
.support-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.support-form input:focus,
.support-form select:focus,
.support-form textarea:focus {
    outline: none;
    border-color: #e74c3c;
}

.support-hours {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hours-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.hours-item i {
    font-size: 32px;
    color: #e74c3c;
}

.hours-item strong {
    display: block;
    margin-bottom: 5px;
}

.hours-item p {
    margin: 0;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .filter-buttons {
        width: 100%;
    }

    .filter-buttons button {
        flex: 1;
    }

    .balance-actions {
        flex-direction: column;
    }

    .balance-actions button {
        width: 100%;
    }

    .payment-methods {
        grid-template-columns: 1fr;
    }

    .share-buttons {
        flex-direction: column;
    }

    .podium {
        flex-direction: column;
        align-items: center;
    }

    .podium-position {
        order: initial !important;
        width: 100%;
    }

    .quick-help-grid {
        grid-template-columns: 1fr;
    }
}