/* 👥 Team Module Styles - Unified with Users */

/* === HEADER === */
.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    background: var(--users-bg-secondary, #1a1a1a);
    border-bottom: 1px solid var(--users-border, #333);
}

.team-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.team-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* === INLINE STATS (из Users) === */
.title-with-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.inline-stats {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--users-text-secondary, #b0b0b0);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-badge i {
    font-size: 0.65rem;
    opacity: 0.7;
}

.stat-badge.team {
    background: rgba(40, 167, 69, 0.15);
    border-color: rgba(40, 167, 69, 0.3);
    color: #28a745;
}

.stat-badge.sales {
    background: rgba(255, 193, 7, 0.2);
    border-color: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

/* === ROLE BADGES (из Users) === */
.role-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    line-height: 1.2;
}

.role-badge.team-member {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.4);
}

.role-badge.team-client {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.role-badge.role-support {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

.role-badge.role-sales {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.role-badge.role-client {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

/* === EXCEL-STYLE TABLE === */
.team-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #0f172a;
    border: 1px solid rgba(99, 102, 241, 0.35);
    font-size: 12px;
    line-height: 1.3;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.team-table th,
.team-table td {
    padding: 4px 8px;
    line-height: 1.3;
    text-align: left;
    border-bottom: 2px solid #1e293b;
    border-right: 1px solid rgba(51, 65, 85, 0.5);
}

.team-table th {
    height: 40px;
    padding: 8px 10px;
    font-size: 12px;
    background: linear-gradient(180deg, #13214a, #163079);
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.06em;
    border-bottom: 2px solid #3b82f6;
    position: sticky;
    top: 0;
    z-index: 10;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    backdrop-filter: saturate(120%) blur(6px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

.team-table th:last-child,
.team-table td:last-child {
    border-right: none;
}

.team-table .sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.team-table .sortable:hover {
    background-color: rgba(59, 130, 246, 0.15);
}

.member-row {
    height: 34px;
    border-bottom: 2px solid #1e293b;
    transition: all 0.2s ease;
    background: #0f172a;
}

.member-row:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

.member-row:hover {
    background: rgba(59, 130, 246, 0.08) !important;
    transform: none;
    box-shadow: none;
}

.member-row td {
    padding: 4px 8px;
    vertical-align: middle;
}

/* === CELL TYPES === */
.number-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.time-cell {
    color: var(--users-text-secondary, #b0b0b0);
    font-size: 0.85rem;
}

/* === EFFICIENCY INDICATORS === */
.efficiency-cell {
    text-align: center;
    font-weight: 600;
}

.efficiency-high {
    color: #22c55e;
    background-color: rgba(34, 197, 94, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.efficiency-medium {
    color: #f59e0b;
    background-color: rgba(245, 158, 11, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.efficiency-low {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* === MEMBER INFO === */
.member-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.username {
    font-weight: 500;
    color: var(--users-text-primary, #fff);
}

/* === OLD STYLES (скрыты) === */
.team-stats {
    display: none;
}

.stat-card {
    display: none;
}
