/* Dashboard Styles */

.dashboard-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 2rem;
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.card h3 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.card-subtitle { color: var(--text-secondary); font-size: 0.85rem; margin: -0.5rem 0 0.75rem; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.card-header h3 { margin-bottom: 0; }

.btn-small { font-size: 0.8rem; padding: 0.4rem 0.8rem; }

/* Financials */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg);
    border-radius: 8px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-dark);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Quick actions */
.action-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    background: var(--bg);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 500;
    transition: background 0.15s;
}
.action-btn:hover { background: var(--border); }
.action-btn svg { color: var(--primary); }

/* Pipeline */
.pipeline-bar {
    display: flex;
    height: 24px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg);
    margin-bottom: 0.5rem;
}

.pipeline-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.5s ease;
    min-width: 0;
}
.pipeline-segment span { font-size: 0.7rem; font-weight: 600; color: #fff; }
.pipeline-segment.identified { background: #90caf9; }
.pipeline-segment.pulled { background: #ffb74d; }
.pipeline-segment.listed { background: #7e57c2; }
.pipeline-segment.sold { background: var(--success); }

.pipeline-legend {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.legend-item { display: flex; align-items: center; gap: 0.3rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.identified { background: #90caf9; }
.dot.pulled { background: #ffb74d; }
.dot.listed { background: #7e57c2; }
.dot.sold { background: var(--success); }

/* Tabs */
.tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.75rem;
}

.tab {
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-family: inherit;
}
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* List items */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
    gap: 0.75rem;
}
.list-item:last-child { border-bottom: none; }

.list-item-info { flex: 1; min-width: 0; }
.list-item-title { font-weight: 500; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item-meta { font-size: 0.8rem; color: var(--text-secondary); }
.list-item-value { font-weight: 700; color: var(--accent-dark); white-space: nowrap; }
.list-item-badge {
    font-size: 0.7rem; font-weight: 600; padding: 0.2rem 0.5rem;
    border-radius: 4px; text-transform: uppercase;
}
.badge-acquired { background: #e3f2fd; color: #1565c0; }
.badge-in_progress { background: #fff3e0; color: #e65100; }
.badge-parted_out { background: #e8f5e9; color: #2e7d32; }
.badge-sold { background: #e8f5e9; color: #2e7d32; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}
.empty-state p { margin-bottom: 1rem; }

/* Nav active */
.nav-link.active { color: var(--primary); font-weight: 600; }

/* Sourcing lead */
.lead-card {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}
.lead-card:last-child { border-bottom: none; }
.lead-img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; background: var(--bg); }
.lead-info { flex: 1; }
.lead-title { font-weight: 500; font-size: 0.9rem; }
.lead-profit { color: var(--accent-dark); font-weight: 700; font-size: 0.9rem; }
.lead-meta { font-size: 0.8rem; color: var(--text-secondary); }

/* Responsive */
@media (max-width: 480px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .action-row { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 481px) {
    .stat-grid { grid-template-columns: repeat(4, 1fr); }
}
