/* SONNY Dashboard — Team Tab v1 */

.team-layout {
    padding: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

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

.team-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.team-header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-search {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 6px 10px;
    font-size: 13px;
    width: 200px;
}
.team-search::placeholder { color: var(--text-muted); }
.team-search:focus { outline: none; border-color: var(--accent); }

.team-scope-filter {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 6px 10px;
    font-size: 13px;
}

.team-count {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Card list */
.team-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Individual card */
.team-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s;
}
.team-card:hover {
    border-color: var(--accent);
}
.team-card.expanded {
    border-color: var(--accent);
}

/* Card header — always visible */
.team-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
}
.team-card-header:hover {
    background: var(--bg-tertiary);
}

.team-card-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.team-emoji {
    font-size: 24px;
    line-height: 1;
    width: 36px;
    text-align: center;
}

.team-card-titles {
    display: flex;
    flex-direction: column;
}

.team-card-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.team-card-role {
    font-size: 12px;
    color: var(--text-secondary);
}

.team-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-scope-badge {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.team-status {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    white-space: nowrap;
}
.team-status-active {
    background: rgba(63, 185, 80, 0.15);
    color: var(--green);
}
.team-status-phase1 {
    background: rgba(210, 153, 34, 0.15);
    color: var(--yellow);
}
.team-status-inactive {
    background: rgba(139, 148, 158, 0.15);
    color: var(--text-muted);
}

.team-expand-icon {
    color: var(--text-muted);
    font-size: 14px;
    transition: transform 0.2s;
}
.team-card.expanded .team-expand-icon {
    transform: rotate(90deg);
}

/* Summary — always visible under header */
.team-card-summary {
    padding: 0 16px 12px 64px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Details — expanded only */
.team-card-details {
    display: none;
    padding: 0 16px 16px 16px;
    border-top: 1px solid var(--border);
}
.team-card.expanded .team-card-details {
    display: block;
}

.team-detail-section {
    margin-top: 14px;
}
.team-detail-section:first-child {
    margin-top: 14px;
}

.team-detail-heading {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* Responsibilities list */
.team-resp-list {
    margin: 0;
    padding-left: 20px;
    list-style: disc;
}
.team-resp-list li {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Capabilities grid */
.team-caps-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.team-cap-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.team-cap-category {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 100px;
    padding-top: 3px;
    flex-shrink: 0;
}

.team-cap-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.team-cap-tag {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Memory scope */
.team-memory-scope {
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .team-layout { padding: 12px; }
    .team-header { flex-direction: column; align-items: flex-start; }
    .team-header-controls { width: 100%; }
    .team-search { flex: 1; width: auto; }
    .team-card-header { padding: 10px 12px; }
    .team-card-summary { padding: 0 12px 10px 12px; }
    .team-card-details { padding: 0 12px 12px 12px; }
    .team-card-meta { gap: 4px; }
    .team-scope-badge { display: none; }
    .team-cap-group { flex-direction: column; gap: 4px; }
    .team-cap-category { min-width: unset; }
}
