/* 
 * Eco System Dashboard - Overview Tab Styles
 * Premium V17.5 Standard
 */

/* 1. Layout & Grid */
.eco-dashboard-v6 .eco-ov-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px; /* Increased gap */
    margin-bottom: 30px;
}

.eco-dashboard-v6 .eco-glass-card {
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08); /* Crisp base shadow */
}

.eco-dashboard-v6 .eco-glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); /* Sharper hover shadow */
}

/* 2. Referral Box - Smart Share Card */
.eco-dashboard-v6 .eco-ov-referral-card {
    padding: 20px;
    margin-bottom: 30px;
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%);
    border: 1px solid rgba(131, 157, 3, 0.15);
}

.eco-dashboard-v6 .eco-ov-referral-label {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.eco-dashboard-v6 .eco-ov-referral-label .material-icons {
    font-size: 18px;
    color: var(--eco-pri);
}

.eco-dashboard-v6 .eco-ov-referral-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.eco-dashboard-v6 .eco-ov-referral-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    color: #1e293b;
    font-weight: 600;
    transition: border-color 0.2s, background-color 0.2s;
    outline: none;
}

.eco-dashboard-v6 .eco-ov-referral-input:focus {
    border-color: var(--eco-pri);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(131, 157, 3, 0.1);
}

.eco-dashboard-v6 .eco-ov-referral-btn {
    background: var(--eco-pri);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(131, 157, 3, 0.2);
}

.eco-dashboard-v6 .eco-ov-referral-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(131, 157, 3, 0.3);
}

.eco-dashboard-v6 .eco-ov-referral-btn:active {
    transform: scale(0.98);
}

/* 3. Stat Cards (Revenue & Sales) */
.eco-dashboard-v6 .eco-ov-stat-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
}

.eco-dashboard-v6 .eco-ov-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.eco-dashboard-v6 .eco-ov-stat-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.eco-dashboard-v6 .eco-balance-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-weight: 600;
    font-size: 12px;
}

.eco-dashboard-v6 .eco-balance-label .material-icons {
    font-size: 16px;
    opacity: 0.8;
}

.eco-dashboard-v6 .eco-ov-stat-value {
    font-size: 26px;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.eco-dashboard-v6 .eco-ov-rank-badge {
    color: #fff;
    font-size: 9px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.2s;
}

/* 4. Active Missions Card */
.eco-dashboard-v6 .eco-ov-mission-card {
    padding: 24px;
    margin-bottom: 25px;
}

.eco-dashboard-v6 .eco-ov-mission-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 20px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.eco-dashboard-v6 .eco-ov-mission-label .material-icons {
    color: #f59e0b; /* Amber for stars */
}

.eco-dashboard-v6 .eco-ov-mission-list {
    max-height: 380px; /* Approximately 3 items */
    overflow-y: auto;
    padding-right: 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Slim Scrollbar for Missions */
.eco-dashboard-v6 .eco-ov-mission-list::-webkit-scrollbar {
    width: 4px;
}

.eco-dashboard-v6 .eco-ov-mission-list::-webkit-scrollbar-track {
    background: transparent;
}

.eco-dashboard-v6 .eco-ov-mission-list::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.eco-dashboard-v6 .eco-ov-mission-list::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

/* 5. List Sections & History Items */
.eco-dashboard-v6 .eco-ov-section-label {
    margin: 20px 0 10px;
    font-weight: 700;
    color: #1e293b;
}

.eco-dashboard-v6 .eco-ov-list-card {
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.eco-dashboard-v6 .eco-ov-history-item {
    background: #fff;
    transition: background-color 0.1s;
    border-bottom: 1px solid #f1f5f9;
}

.eco-dashboard-v6 .eco-ov-history-item:last-child {
    border-bottom: none;
}

.eco-dashboard-v6 .eco-ov-history-item:hover {
    background: #f8fafc;
}

.eco-dashboard-v6 .eco-ov-item-main {
    padding: 10px 16px; 
    display: grid;
    grid-template-columns: 36px 1fr 110px 100px 32px;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.eco-dashboard-v6 .eco-ov-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eco-dashboard-v6 .eco-ov-item-icon .material-icons {
    font-size: 18px;
}

.eco-dashboard-v6 .eco-ov-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.eco-dashboard-v6 .eco-ov-item-title {
    font-weight: 700;
    color: #1e293b;
    font-size: 13px;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.eco-dashboard-v6 .eco-ov-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #eff6ff;
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 10px;
    border-radius: 20px;
    border: 1px solid rgba(29, 78, 216, 0.1);
    margin-left: 8px;
    white-space: nowrap;
}

.eco-dashboard-v6 .eco-ov-item-time {
    font-size: 10px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.eco-dashboard-v6 .eco-ov-item-amount {
    text-align: right;
    white-space: nowrap;
}

.eco-dashboard-v6 .eco-ov-item-amount .val {
    font-size: 15px;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.eco-dashboard-v6 .eco-ov-status-box {
    display: flex;
    justify-content: center;
}

.eco-dashboard-v6 .eco-ov-status-box .st {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(0,0,0,0.03);
    white-space: nowrap;
}

.eco-dashboard-v6 .eco-ov-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.eco-dashboard-v6 .eco-ov-toggle-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: transform 0.2s, background-color 0.2s;
}

.eco-dashboard-v6 .eco-ov-history-item.is-open .eco-ov-toggle-btn {
    background: var(--eco-pri, #839d03);
    color: #fff;
    border-color: var(--eco-pri, #839d03);
}

/* Timeline Design */
.eco-dashboard-v6 .eco-ov-item-timeline {
    padding: 0 20px 0 75px;
    background: #fafafb;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease, opacity 0.2s ease;
    opacity: 0;
}

.eco-dashboard-v6 .eco-ov-history-item.is-open .eco-ov-item-timeline {
    padding: 15px 20px 20px 75px;
    max-height: 1000px;
    opacity: 1;
    border-top: 1px solid #f1f5f9;
}

.eco-dashboard-v6 .eco-ov-history-item.is-open .toggle-icon {
    transform: rotate(180deg);
}

.eco-dashboard-v6 .eco-ov-item-timeline::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.eco-dashboard-v6 .eco-ov-timeline-node {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.eco-dashboard-v6 .node-dot {
    position: absolute;
    left: -39px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #fff;
    z-index: 2;
}

/* 5. Pagination & Empty State */
.eco-dashboard-v6 .eco-ov-pagination {
    padding: 15px;
    display: flex;
    justify-content: center;
    gap: 5px;
    border-top: 1px solid rgba(0,0,0,0.03);
}

.eco-dashboard-v6 .eco-ov-pagination-link {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid #e2e8f0;
    transition: background-color 0.2s, color 0.1s;
}

.eco-dashboard-v6 .eco-ov-pagination-link.is-active {
    background: var(--eco-pri);
    color: #fff;
}

/* 6. Commission Tabs */
.eco-dashboard-v6 .eco-ov-tab-nav {
    display: flex;
    gap: 10px;
    margin: 30px 0 15px;
    flex-wrap: wrap;
}

.eco-dashboard-v6 .eco-ov-tab-link {
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid #e2e8f0;
    transition: background-color 0.2s, color 0.2s;
}

.eco-dashboard-v6 .eco-ov-tab-link.is-active {
    background: var(--eco-pri, #839d03);
    color: #fff;
    border-color: var(--eco-pri, #839d03);
}

.eco-dashboard-v6 .eco-ov-tab-link:not(.is-active) {
    background: #fff;
    color: #64748b;
}

.eco-dashboard-v6 .eco-ov-tab-link:hover:not(.is-active) {
    background: #f8f9fa;
    border-color: #cbd5e1;
}

/* 8. Empty States */
.eco-dashboard-v6 .eco-ov-empty-state {
    padding: 60px 20px;
    text-align: center;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.eco-dashboard-v6 .eco-ov-empty-state .material-icons {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 16px;
    opacity: 0.8;
}

.eco-dashboard-v6 .eco-ov-empty-state p {
    font-size: 16px;
    font-weight: 700;
    color: #475569;
    margin: 0 0 8px;
}

.eco-dashboard-v6 .eco-ov-empty-state small {
    font-size: 13px;
    color: #94a3b8;
    max-width: 300px;
    line-height: 1.5;
}

/* 7. Mobile Adjustments */
@media (max-width: 768px) {
    .eco-dashboard-v6 .eco-ov-grid {
        grid-template-columns: 1fr;
    }

    .eco-dashboard-v6 .eco-ov-item-main {
        grid-template-columns: 36px 1fr auto;
        grid-template-rows: auto auto auto;
        gap: 6px 12px;
        padding: 12px;
    }

    .eco-dashboard-v6 .eco-ov-item-icon {
        grid-row: 1 / 2;
    }

    .eco-dashboard-v6 .eco-ov-item-info {
        grid-column: 2 / 3;
        grid-row: 1 / 3;
    }

    .eco-dashboard-v6 .eco-ov-item-title {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .eco-dashboard-v6 .eco-ov-item-time {
        flex-wrap: wrap;
        gap: 6px;
    }

    .eco-dashboard-v6 .eco-ov-deadline-badge {
        margin-left: 0;
        font-size: 10px;
        padding: 1px 6px;
        white-space: nowrap;
    }

    .eco-dashboard-v6 .eco-ov-item-amount {
        grid-column: 3 / 4;
        grid-row: 1 / 2;
    }

    .eco-dashboard-v6 .eco-ov-status-box {
        grid-column: 2 / 4;
        grid-row: 3 / 4;
        justify-content: flex-start;
        margin-top: 4px;
    }

    .eco-dashboard-v6 .eco-ov-actions {
        grid-column: 3 / 4;
        grid-row: 2 / 4;
        align-self: flex-end;
    }

    /* Referral Mobile Fix */
    .eco-dashboard-v6 .eco-ov-referral-group {
        flex-direction: column;
        align-items: stretch;
    }

    .eco-dashboard-v6 .eco-ov-referral-btn {
        width: 100%;
        padding: 14px;
    }
}
