.team-leaders-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.team-leader-card {
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.team-leader-card:hover {
    box-shadow: var(--shadow-md);
}

.team-leader-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary);
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-leader-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
}

.team-leader-count {
    font-size: 20px;
    font-weight: 700;
    color: var(--success);
}

.team-leader-title {
    font-size: 13px;
    color: var(--text-muted);
}

@media (max-width: 600px) {
    .team-leaders-grid {
        grid-template-columns: 1fr;
    }
}

/* Team View */
.team-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 16px;
}

.team-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.team-subtitle {
    color: var(--text-muted);
    font-size: 14px;
}

.team-filter .form-select {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.team-table td {
    vertical-align: middle;
}

.team-auditor-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.team-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.team-auditor-name {
    font-weight: 600;
    color: var(--text-main);
}

.team-audit-count {
    font-weight: 700;
    color: var(--success);
}

.team-table-widget {
    margin-bottom: 24px;
}

.team-insight-layer {
    position: relative;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin-top: 4px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.team-insight-layer::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #f59e0b;
}

.team-insight-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.team-insight-eyebrow,
.team-insight-label {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #b45309;
}

.team-insight-header h3 {
    font-size: 16px;
    margin-bottom: 4px;
    color: var(--text-main);
}

.team-insight-header p {
    color: var(--text-muted);
    font-size: 12px;
}

.team-insight-content {
    display: grid;
    grid-template-columns: minmax(240px, 35%) minmax(0, 65%);
    gap: 16px;
}

.team-insight-top-pic,
.team-insight-list {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
}

body.dark-theme .team-insight-top-pic,
body.dark-theme .team-insight-list {
    background: rgba(30, 41, 59, 0.78);
}

.team-insight-top-pic {
    border-color: rgba(245, 158, 11, 0.28);
    background: linear-gradient(135deg, rgba(255, 237, 213, 0.76), var(--bg-card));
}

body.dark-theme .team-insight-top-pic {
    background: linear-gradient(135deg, rgba(180, 83, 9, 0.2), var(--bg-card));
}

.team-insight-list {
    max-height: 444px;
    overflow-y: auto;
}

.team-insight-top-pic strong {
    display: block;
    font-size: 18px;
    color: var(--text-main);
    margin-bottom: 8px;
}

.team-insight-count {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 6px;
    background: #ffedd5;
    color: #9a3412;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 12px;
}

.team-insight-meta {
    display: grid;
    gap: 5px;
    color: var(--text-muted);
    font-size: 12px;
}

.team-insight-rank-item {
    display: grid;
    grid-template-columns: 30px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    border-radius: 6px;
    transition: var(--transition);
}

.team-insight-rank-item:hover {
    background: var(--bg-color);
}

.team-insight-rank-item:last-child {
    border-bottom: none;
}

.team-insight-rank-no {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.team-insight-rank-item strong,
.team-insight-rank-item span {
    display: block;
}

.team-insight-rank-item strong {
    color: var(--text-main);
    font-size: 12px;
}

.team-insight-rank-item span {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 2px;
}

.team-insight-rank-item em {
    font-style: normal;
    font-weight: 800;
    color: #c2410c;
    font-size: 12px;
}

.team-insight-empty {
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
    padding: 24px 12px;
}

@media (max-width: 900px) {
    .team-insight-content {
        grid-template-columns: 1fr;
    }
}
