/* ============================================================================
 * progress_report.css
 * ============================================================================
 * Progress Report Modal Styles - Creative Projects Module
 * Styling for the project progress report overlay and components
 * Part of the TrackStage Creative Projects ecosystem
 *
 * Version History:
 * -----------------------------------------------------------------------------
 * v1.0.5  2025-12-23  Fixed avatar sizing and badge positioning
 *                     - Avatar size increased to 48x48
 *                     - Fixed lead badge position (bottom-right)
 *                     - Avatar container explicit dimensions
 *                     - Placeholder styling for lead state
 * v1.0.4  2025-12-22  Team section with avatar images
 *                     - Avatar images (42x42 circular with border)
 *                     - Lead badge positioned on avatar
 *                     - Letter placeholder for missing images
 *                     - Adjusted borders for different states
 * v1.0.3  2025-12-22  Enhanced Team section pills
 *                     - Larger pills with rounded corners
 *                     - Two-line layout (name + email)
 *                     - Adjusted colors for email in lead/invited states
 * v1.0.2  2025-12-22  Added Track Info / Metadata section styles
 *                     - Two-column layout with artwork
 *                     - Field groups with grid layouts
 *                     - Collapsible Additional Info section
 *                     - File stats display
 *                     - Responsive breakpoints for track info
 * v1.0.1  2025-12-22  Layout and UX improvements
 *                     - Added .pr-bottom-row for side-by-side Team/Files
 *                     - Added .pr-overdue-row styling for overdue tasks
 *                     - Responsive stacking at 900px breakpoint
 * v1.0.0  2025-12-20  Initial release
 *                     - Modal overlay with fade-in animation
 *                     - Responsive width (92% of viewport)
 *                     - Purple gradient header matching TrackStage brand
 *                     - Summary cards with colored left borders
 *                     - Progress bars with gradient fills
 *                     - Expandable stage cards with status indicators
 *                     - Activities table with status badges
 *                     - Loading spinner animation
 *                     - Print styles (auto-expand all stages)
 *                     - Responsive breakpoints for tablet/mobile
 * ============================================================================
 */

/* Modal Overlay */
.progress-report-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.progress-report-overlay.visible {
    opacity: 1;
}

/* Inherit system font */
.progress-report-overlay,
.progress-report-overlay * {
    font-family: "Poppins", sans-serif;
}

/* Modal Container */
.progress-report-modal {
    background: #fff;
    width: 92%;
    height: 85vh;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.progress-report-overlay.visible .progress-report-modal {
    transform: scale(1);
}

/* Header */
.pr-header {
    background: linear-gradient(135deg, #351b5b 0%, #5a2d82 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pr-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pr-header-icon {
    font-size: 28px;
    opacity: 0.9;
}

.pr-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.pr-header-subtitle {
    font-size: 13px;
    opacity: 0.8;
    margin-top: 2px;
}

.pr-close-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pr-close-btn:hover {
    background: rgba(255,255,255,0.25);
}

/* Content Area */
.pr-content {
    flex: 1;
    overflow-y: auto;
    padding: 25px 30px;
    background: #f8f7fa;
}

/* Summary Cards Row */
.pr-summary-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.pr-summary-card {
    background: white;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 4px solid #351b5b;
}

.pr-summary-card.current {
    border-left-color: #ffc300;
}

.pr-summary-card.tasks {
    border-left-color: #28a745;
}

.pr-summary-card.time {
    border-left-color: #17a2b8;
}

.pr-summary-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.pr-summary-value {
    font-size: 24px;
    font-weight: 700;
    color: #351b5b;
}

.pr-summary-sub {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
}

/* Progress Bar */
.pr-progress-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
}

.pr-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #351b5b, #7c4dba);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Project Info Section */
.pr-project-info {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.pr-project-info h3 {
    margin: 0 0 15px 0;
    color: #351b5b;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pr-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.pr-info-item {
    display: flex;
    flex-direction: column;
}

.pr-info-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.pr-info-value {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* Stages Timeline */
.pr-stages-section {
    margin-bottom: 25px;
}

.pr-section-title {
    font-size: 16px;
    color: #351b5b;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Stage Card */
.pr-stage-card {
    background: white;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
}

.pr-stage-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-left: 4px solid #ccc;
    transition: background 0.2s;
}

.pr-stage-header:hover {
    background: #fafafa;
}

.pr-stage-header.completed {
    border-left-color: #28a745;
}

.pr-stage-header.current {
    border-left-color: #ffc300;
    background: #fffdf5;
}

.pr-stage-header.pending {
    border-left-color: #ddd;
}

.pr-stage-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pr-stage-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.pr-stage-icon.completed {
    background: #d4edda;
    color: #28a745;
}

.pr-stage-icon.current {
    background: #fff3cd;
    color: #856404;
}

.pr-stage-icon.pending {
    background: #e9ecef;
    color: #6c757d;
}

.pr-stage-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.pr-stage-status {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.pr-stage-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.pr-stage-stat {
    text-align: center;
}

.pr-stage-stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #351b5b;
}

.pr-stage-stat-label {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
}

.pr-stage-toggle {
    color: #999;
    transition: transform 0.2s;
}

.pr-stage-toggle.expanded {
    transform: rotate(180deg);
}

/* Stage Body (Activities) */
.pr-stage-body {
    display: none;
    padding: 0 20px 20px 20px;
    border-top: 1px solid #eee;
}

.pr-stage-body.expanded {
    display: block;
}

.pr-stage-notes {
    background: #f8f7fa;
    border-radius: 8px;
    padding: 12px 15px;
    margin: 15px 0;
    font-size: 13px;
    color: #555;
    border-left: 3px solid #351b5b;
}

.pr-stage-notes-label {
    font-size: 11px;
    color: #888;
    margin-bottom: 5px;
    text-transform: uppercase;
}

/* Activities Table */
.pr-activities-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.pr-activities-table th {
    text-align: left;
    padding: 10px 12px;
    background: #f8f7fa;
    font-size: 11px;
    text-transform: uppercase;
    color: #666;
    font-weight: 600;
    border-bottom: 2px solid #eee;
}

.pr-activities-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    color: #333;
}

.pr-activities-table tr:hover {
    background: #fafafa;
}

.pr-task-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.pr-task-status.complete {
    background: #d4edda;
    color: #155724;
}

.pr-task-status.pending {
    background: #fff3cd;
    color: #856404;
}

.pr-task-status.ignore {
    background: #f8d7da;
    color: #721c24;
}

/* Overdue Task Row */
.pr-activities-table tr.pr-overdue-row {
    background: #fff5f5;
}

.pr-activities-table tr.pr-overdue-row:hover {
    background: #ffeded;
}

.pr-overdue-icon {
    color: #dc3545;
    margin-left: 5px;
    font-size: 12px;
}

/* No Activities */
.pr-no-activities {
    text-align: center;
    padding: 30px;
    color: #999;
    font-size: 14px;
}

/* Collaborators Section */
.pr-collabs-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Bottom Row: Team and Files side by side */
.pr-bottom-row {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.pr-bottom-row .pr-collabs-section,
.pr-bottom-row .pr-files-section {
    flex: 1;
    min-width: 0;
    margin-top: 0;
}

.pr-collabs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.pr-collab-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f7fa;
    padding: 10px 16px 10px 10px;
    border-radius: 12px;
    font-size: 13px;
    min-width: 160px;
}

.pr-collab-avatar {
    position: relative;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
}

.pr-collab-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0dce5;
}

.pr-collab-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #351b5b;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    border: 2px solid #e0dce5;
    box-sizing: border-box;
}

.pr-lead-badge {
    position: absolute;
    bottom: 0px;
    right: 0px;
    background: #ffc107;
    color: #856404;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.pr-lead-badge i {
    line-height: 1;
}

.pr-collab-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pr-collab-name {
    font-weight: 500;
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pr-collab-email {
    font-size: 11px;
    color: #888;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pr-collab-item.lead {
    background: #351b5b;
    color: white;
}

.pr-collab-item.lead .pr-collab-avatar img {
    border-color: rgba(255, 255, 255, 0.3);
}

.pr-collab-item.lead .pr-collab-avatar-placeholder {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.pr-collab-item.lead .pr-collab-email {
    color: rgba(255, 255, 255, 0.7);
}

.pr-collab-item.invited {
    background: #fff3cd;
    color: #856404;
}

.pr-collab-item.invited .pr-collab-avatar img {
    border-color: #f0e0a0;
}

.pr-collab-item.invited .pr-collab-email {
    color: #997a2d;
}

/* Loading State */
.pr-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: #666;
}

.pr-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #eee;
    border-top-color: #351b5b;
    border-radius: 50%;
    animation: pr-spin 0.8s linear infinite;
    margin-bottom: 15px;
}

@keyframes pr-spin {
    to { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .pr-summary-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pr-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pr-stage-right {
        gap: 12px;
    }
    
    .pr-bottom-row {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .pr-summary-row {
        grid-template-columns: 1fr;
    }
    
    .pr-info-grid {
        grid-template-columns: 1fr;
    }
    
    .progress-report-modal {
        width: 95%;
        height: 90vh;
    }
    
    .pr-content {
        padding: 15px;
    }
}

/* Print Styles */
@media print {
    .progress-report-overlay {
        position: static;
        background: white;
    }
    
    .progress-report-modal {
        width: 100%;
        height: auto;
        box-shadow: none;
    }
    
    .pr-close-btn, 
    .pr-stage-toggle {
        display: none !important;
    }
    
    .pr-stage-body {
        display: block !important;
    }
    
    .pr-stage-card {
        break-inside: avoid;
    }
}

.pr-priority-circle {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

/* Files Section */
.pr-files-section {
    background: rgba(53, 27, 91, 0.03);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.pr-files-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.pr-file-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid rgba(53, 27, 91, 0.1);
}

.pr-file-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(53, 27, 91, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pr-file-icon i {
    font-size: 18px;
    color: #351b5b;
}

.pr-file-details {
    flex: 1;
    min-width: 0;
}

.pr-file-name {
    font-weight: 500;
    color: #351b5b;
}

.pr-file-name a {
    color: #351b5b;
    text-decoration: none;
}

.pr-file-name a:hover {
    text-decoration: underline;
}

.pr-file-meta {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
}

.pr-file-notes {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
    font-style: italic;
}

/* ============================================================================
 * TRACK INFO / METADATA SECTION
 * ============================================================================ */

.pr-track-info-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* No ghost track placeholder */
.pr-track-no-data {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 30px;
    background: #f8f7fa;
    border-radius: 8px;
    color: #666;
}

.pr-track-no-data i {
    font-size: 32px;
    color: #351b5b;
    opacity: 0.5;
}

.pr-track-no-data-text strong {
    display: block;
    color: #351b5b;
    margin-bottom: 5px;
}

.pr-track-no-data-text p {
    margin: 0;
    font-size: 13px;
}

/* Two-column layout */
.pr-track-layout {
    display: flex;
    gap: 25px;
}

.pr-track-left {
    flex: 1;
    min-width: 0;
}

.pr-track-right {
    width: 280px;
    flex-shrink: 0;
}

/* Track field groups */
.pr-track-group {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.pr-track-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.pr-track-group-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #351b5b;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.pr-track-group-subtitle {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #888;
    margin: 15px 0 10px 0;
    letter-spacing: 0.5px;
}

/* Individual fields */
.pr-track-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pr-track-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pr-track-field-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
}

.pr-track-field-value {
    font-size: 14px;
    color: #333;
}

.pr-track-field-value-multi {
    font-size: 13px;
    color: #333;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.pr-track-field-value-block {
    font-size: 13px;
    color: #333;
    background: #f8f7fa;
    padding: 10px 12px;
    border-radius: 6px;
    margin-top: 5px;
}

.pr-track-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.pr-track-required {
    color: #dc3545;
    margin-left: 2px;
}

/* Grid layouts for compact fields */
.pr-track-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.pr-track-fields-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.pr-track-field-compact {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pr-track-field-wide {
    grid-column: span 2;
}

/* Album artwork */
.pr-track-artwork-container {
    margin-bottom: 20px;
}

.pr-track-artwork-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.pr-track-artwork {
    width: 100%;
    max-width: 250px;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    background: #f0f0f0;
}

/* File stats row */
.pr-track-file-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.pr-track-stat {
    background: #f8f7fa;
    padding: 8px 10px;
    border-radius: 6px;
    text-align: center;
}

.pr-track-stat-label {
    display: block;
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.pr-track-stat-value {
    font-size: 13px;
    font-weight: 600;
    color: #351b5b;
}

/* URL links */
.pr-track-url-link {
    color: #351b5b;
    text-decoration: none;
    font-size: 13px;
}

.pr-track-url-link:hover {
    text-decoration: underline;
}

.pr-track-url-link i {
    margin-right: 4px;
    font-size: 11px;
}

/* Additional Info collapsible section */
.pr-track-additional {
    margin-top: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.pr-track-additional-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f7fa;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #351b5b;
    transition: background 0.2s;
}

.pr-track-additional-header:hover {
    background: #f0eef3;
}

.pr-track-additional-header i:first-child {
    margin-right: 8px;
}

.pr-track-additional-toggle {
    transition: transform 0.2s;
    color: #888;
}

.pr-track-additional-toggle.expanded {
    transform: rotate(180deg);
}

.pr-track-additional-body {
    display: none;
    padding: 15px;
}

.pr-track-additional-body.expanded {
    display: block;
}

/* Notes section */
.pr-track-notes {
    margin-top: 15px;
}

.pr-track-notes-content {
    background: #f8f7fa;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    max-height: 150px;
    overflow-y: auto;
}

/* Custom fields section */
.pr-track-custom {
    margin-top: 15px;
}

.pr-track-custom-textarea {
    margin-top: 10px;
}

/* URLs section */
.pr-track-urls {
    margin-top: 15px;
}

/* Responsive adjustments for Track Info */
@media (max-width: 900px) {
    .pr-track-layout {
        flex-direction: column;
    }
    
    .pr-track-right {
        width: 100%;
    }
    
    .pr-track-artwork {
        max-width: 200px;
    }
    
    .pr-track-fields-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pr-track-file-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .pr-track-fields-grid,
    .pr-track-fields-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .pr-track-field-wide {
        grid-column: span 1;
    }
    
    .pr-track-file-stats {
        grid-template-columns: 1fr;
    }
}


/* FILE: progress_report.css | VERSION: 1.0.5 */