/* ================================================================
   PROJECT CARD VIEW STYLES
   File rieng de quan ly giao dien Card View
   ================================================================ */

/* Grid Layout */
.project-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 1200px) {
    .project-cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .project-cards-grid { grid-template-columns: 1fr; }
}

/* Group Header trong Card View */
.card-group-header {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #4A90E2;
    padding: 12px 18px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Card Item */
.project-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e8eaed;
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    border-color: #4A90E2;
}

/* Card Header */
.project-card .card-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}
.project-card .card-header-bar .card-code {
    opacity: 0.85;
    font-size: 11px;
    letter-spacing: 0.5px;
}

/* Card Body */
.project-card .card-body-content {
    padding: 15px;
    flex: 1;
}
.project-card .card-project-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
}
.project-card .card-project-name:hover {
    color: #3498db;
}
.project-card .card-owner-text {
    font-size: 11.5px;
    color: #7f8c8d;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Avatar Stack trong Card */
.project-card .card-avatar-stack {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}
.project-card .card-avatar-item {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 10px;
    color: #fff;
    font-weight: bold;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    position: relative;
    cursor: default;
}
.project-card .card-avatar-item:not(:first-child) {
    margin-left: -8px;
}
.project-card .card-avatar-item img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Metrics Row */
.project-card .card-metrics {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    border-top: 1px solid #f0f0f0;
    background: #fafbfc;
}

/* Progress Donut */
.card-progress-donut {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}
.card-progress-donut svg {
    transform: rotate(-90deg);
}
.card-progress-donut .donut-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    font-weight: 700;
    color: #2c3e50;
}

/* Metrics Info */
.card-metrics-info {
    flex: 1;
    min-width: 0;
}
.card-metrics-info .metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    line-height: 1.8;
}
.card-metrics-info .metric-label {
    color: #95a5a6;
    font-size: 10.5px;
}
.card-metrics-info .metric-value {
    font-weight: 600;
    color: #2c3e50;
    font-size: 11px;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

/* Card Footer */
.project-card .card-footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    border-top: 1px solid #f0f0f0;
    background: #fff;
}
.project-card .card-footer-bar .card-time-badge {
    font-size: 10.5px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    color: #fff;
}
.project-card .card-footer-bar .card-view-btn {
    font-size: 11px;
    color: #3498db;
    font-weight: 600;
    text-decoration: none;
    padding: 3px 10px;
    border-radius: 4px;
    transition: all 0.2s;
}
.project-card .card-footer-bar .card-view-btn:hover {
    background: #3498db;
    color: #fff;
}

/* Toggle Button Active State */
#view_toggle_group .btn.active {
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
}
