/* Project Digital Hub Styles */

.project-page {
    background: #f8fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.project-header {
    background: white;
    border-bottom: 3px solid var(--exxon-red, #D71920);
    padding: 1.25rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.header-breadcrumb {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.header-breadcrumb a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.header-breadcrumb a:hover {
    color: var(--exxon-blue, #0066CC);
}

.breadcrumb-sep {
    margin: 0 0.5rem;
    color: #d1d5db;
}

.header-title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: -0.02em;
}

.delivery-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.meta-item i {
    color: #9ca3af;
    font-size: 0.8rem;
}

.meta-divider {
    color: #d1d5db;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.phase-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.625rem 1rem;
    border-radius: 8px;
}

.phase-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.phase-progress {
    font-size: 0.75rem;
    opacity: 0.9;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.back-btn:hover {
    color: var(--exxon-blue, #0066CC);
    background: #f1f5f9;
}

/* Metrics Bar - Inside main content area */
.metrics-bar {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.metric-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.metric-icon.budget {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.metric-icon.spend {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
}

.metric-icon.positive {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.metric-icon.warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.metric-icon.target {
    background: rgba(244, 63, 94, 0.2);
    color: #fb7185;
}

.metric-content {
    display: flex;
    flex-direction: column;
}

.metric-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.metric-value.text-positive {
    color: #34d399;
}

.metric-value.text-warning {
    color: #fbbf24;
}

.metric-label {
    font-size: 0.7rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Project Body - Sidebar + Main Layout */
.project-body {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* Sidebar Navigation */
.project-sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid #e2e8f0;
    flex-shrink: 0;
    overflow-y: auto;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-section {
    margin-bottom: 0.5rem;
}

.nav-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s;
}

.nav-section-header:hover {
    background: #f8fafc;
}

.nav-section-header.static {
    cursor: default;
}

.nav-section-header.static:hover {
    background: none;
}

.nav-section-title {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.nav-section-title i {
    font-size: 0.9rem;
    color: #6b7280;
    width: 18px;
    text-align: center;
}

.nav-chevron {
    font-size: 0.7rem;
    color: #9ca3af;
    transition: transform 0.2s;
}

.nav-section-header[aria-expanded="false"] .nav-chevron {
    transform: rotate(-90deg);
}

.nav-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease;
}

.nav-submenu.expanded {
    max-height: 500px;
    opacity: 1;
}

.nav-submenu.collapsed {
    max-height: 0;
    opacity: 0;
}

.nav-submenu li {
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1.25rem 0.625rem 2.75rem;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: #f1f5f9;
    color: var(--exxon-blue, #0066CC);
    border-left-color: var(--exxon-blue, #0066CC);
}

.nav-link i {
    font-size: 0.8rem;
    color: #9ca3af;
    width: 16px;
    text-align: center;
}

.nav-link:hover i {
    color: var(--exxon-blue, #0066CC);
}

/* Main Content */
.project-main {
    flex: 1;
    padding: 1.5rem 2rem;
    overflow-y: auto;
    min-width: 0;
}

.main-content {
    max-width: 1200px;
}

.project-description {
    background: white;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
}

.project-description p {
    margin: 0;
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.6;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 1.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Timeline Section */
.timeline-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.25rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    z-index: 1;
}

.timeline-item.completed .timeline-marker {
    background: #10b981;
    color: white;
}

.timeline-item.in_progress .timeline-marker {
    background: #3b82f6;
    color: white;
    animation: pulse 2s infinite;
}

.timeline-item.upcoming .timeline-marker {
    background: white;
    border: 2px solid #d1d5db;
    color: #9ca3af;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(59, 130, 246, 0); }
}

.timeline-content {
    padding-left: 0.5rem;
}

.timeline-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 0.125rem 0;
}

.timeline-item.upcoming .timeline-title {
    color: #6b7280;
}

.timeline-date {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Chart Section */
.chart-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.chart-container {
    height: 280px;
    margin-bottom: 1rem;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-color.planned {
    background: rgba(100, 116, 139, 0.7);
}

.legend-color.actual {
    background: rgba(16, 185, 129, 0.7);
}

/* Risk Section */
.risk-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.risk-table-wrapper {
    overflow-x: auto;
}

.risk-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.risk-table th {
    background: #f8fafc;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #4b5563;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.risk-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    color: #374151;
}

.risk-row.high td:first-child {
    border-left: 3px solid #ef4444;
}

.risk-row.medium td:first-child {
    border-left: 3px solid #f59e0b;
}

.risk-row.low td:first-child {
    border-left: 3px solid #10b981;
}

.risk-id {
    font-weight: 600;
    color: #6b7280;
}

.risk-title {
    max-width: 200px;
}

.risk-mitigation {
    max-width: 250px;
    font-size: 0.75rem;
    color: #6b7280;
}

.severity-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.severity-badge.high {
    background: #fef2f2;
    color: #dc2626;
}

.severity-badge.medium {
    background: #fffbeb;
    color: #d97706;
}

.severity-badge.low {
    background: #f0fdf4;
    color: #16a34a;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.status-badge.active {
    background: #dbeafe;
    color: #2563eb;
}

.status-badge.monitoring {
    background: #fef3c7;
    color: #d97706;
}

.status-badge.closed {
    background: #f1f5f9;
    color: #64748b;
}

/* Footer */
.project-footer {
    background: #1a1a1a;
    padding: 1rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-text {
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
}

.footer-date {
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .metrics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .project-sidebar {
        width: 220px;
    }
    
    .project-main {
        padding: 1.25rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-right {
        align-items: flex-start;
        width: 100%;
    }
    
    .project-title {
        font-size: 1.5rem;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .project-body {
        flex-direction: column;
    }
    
    .project-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .nav-section {
        flex: 1;
        min-width: 200px;
        margin-bottom: 0;
    }
    
    .nav-section-header {
        padding: 0.5rem 0.75rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem 0.5rem 2rem;
        font-size: 0.8rem;
    }
    
    .project-main {
        padding: 1rem;
    }
    
    .risk-table {
        font-size: 0.75rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* Print Styles */
@media print {
    .back-btn,
    .project-sidebar {
        display: none;
    }
    
    .project-page {
        background: white;
    }
    
    .project-body {
        display: block;
    }
    
    .metrics-bar {
        background: #1a1a1a;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
