/* Team View Styles */

#view-team {
    padding: 0;
    height: 100%;
}

.team-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    width: 100%;
}

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

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding-bottom: 40px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
}

.personnel-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.personnel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-top {
    display: flex;
    gap: 20px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
}

.profile-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--card-bg);
    background-size: cover;
    background-position: center;
    border: 2px solid var(--accent-blue);
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.profile-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: rgba(0, 122, 255, 0.15);
    color: var(--accent-blue);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-right: 8px;
}

.profile-rank {
    font-size: 14px;
    color: var(--text-secondary);
}

.card-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Add Card Style */
.add-card {
    border: 2px dashed var(--card-border);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    /* Approximate height of filled card */
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-blue);
}

.add-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--text-secondary);
}

.add-icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    transition: all 0.3s ease;
}

.add-card:hover .add-icon-circle {
    background: var(--accent-blue);
    color: white;
    transform: scale(1.1);
}

.add-text {
    font-size: 16px;
    font-weight: 600;
}

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

.detail-header-actions {
    display: flex;
    gap: 12px;
}

.team-detail-layout {
    display: flex;
    gap: 24px;
    height: calc(100vh - 200px);
    overflow-y: auto;
    padding-bottom: 40px;
}

.detail-left-col {
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.detail-right-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-card {
    text-align: center;
    padding: 32px 24px !important;
}

.profile-edit-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
}

.large-profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 3px solid var(--accent-blue);
    background-color: var(--macos-bg);
}

.edit-avatar-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.edit-avatar-btn:hover {
    background: var(--accent-blue);
    color: white;
}

.profile-main-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-name-input {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-primary);
    width: 100%;
    padding: 4px;
    transition: all 0.2s ease;
}

.detail-name-input:focus {
    border-bottom-color: var(--accent-blue);
    outline: none;
}

.rank-role-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.detail-sub-input {
    font-size: 14px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 6px 12px;
    color: var(--text-secondary);
    width: 100px;
}

.detail-sub-input:focus {
    border-color: var(--accent-blue);
    color: var(--text-primary);
    outline: none;
}

.info-grid {
    display: grid;
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-item label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.info-item input {
    background: transparent;
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.info-item input:focus {
    border-color: var(--accent-blue);
    outline: none;
    background: rgba(255, 255, 255, 0.02);
}

/* Right Column Styles */
.score-display {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.score-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.score-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-blue);
}

.behavior-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.behavior-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.behavior-btn.good {
    background: rgba(48, 209, 88, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(48, 209, 88, 0.2);
}

.behavior-btn.good:hover {
    background: rgba(48, 209, 88, 0.2);
    transform: translateY(-2px);
}

.behavior-btn.bad {
    background: rgba(255, 69, 58, 0.1);
    color: var(--status-urgent);
    border: 1px solid rgba(255, 69, 58, 0.2);
}

.behavior-btn.bad:hover {
    background: rgba(255, 69, 58, 0.2);
    transform: translateY(-2px);
}

.behavior-btn i {
    font-size: 18px;
}

.behavior-log-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid var(--card-border);
}

.log-header {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.behavior-log-list {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.log-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    font-size: 13px;
}

.log-item.good {
    border-left: 3px solid var(--accent-green);
}

.log-item.bad {
    border-left: 3px solid var(--status-urgent);
}

.log-date {
    color: var(--text-secondary);
    font-size: 11px;
}

.detail-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 16px;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.2s ease;
}

.detail-textarea:focus {
    border-color: var(--accent-blue);
    outline: none;
    background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 900px) {
    .team-detail-layout {
        flex-direction: column;
        height: auto;
        overflow-y: visible;
    }

    .detail-left-col,
    .detail-right-col {
        flex: none;
        width: 100%;
    }
}