* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 15px;
}

header h1 i {
    color: #667eea;
}

.week-info {
    display: flex;
    align-items: center;
    padding-top: 10px;
    gap: 10px;
    flex-wrap: wrap;
}

#current-week {
    font-size: 1.2rem;
    color: #666;
    font-weight: 500;
}

.btn-export {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 8px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    gap: 8px;
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 15px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 150px;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.tab-btn:hover:not(.active) {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.blue { background: linear-gradient(135deg, #667eea, #764ba2); }
.stat-icon.green { background: linear-gradient(135deg, #28a745, #20c997); }
.stat-icon.yellow { background: linear-gradient(135deg, #ffc107, #fd7e14); }
.stat-icon.red { background: linear-gradient(135deg, #dc3545, #e83e8c); }

.stat-info h3 {
    color: #666;
    font-size: 1rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.chart-container, .issues-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.risk-map-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 0;
    overflow: hidden;
}

.chart-container h3, .issues-container h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.3rem;
    font-weight: 600;
}

.pie-chart {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #666;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-color.green { background: #28a745; }
.legend-color.yellow { background: #ffc107; }
.legend-color.red { background: #dc3545; }

.issues-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.issue-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.issue-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.issue-item.green { border-left-color: #28a745; }
.issue-item.yellow { border-left-color: #ffc107; }
.issue-item.red { border-left-color: #dc3545; }

.issue-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.issue-item.green .issue-icon { background: #28a745; }
.issue-item.yellow .issue-icon { background: #ffc107; }
.issue-item.red .issue-icon { background: #dc3545; }

.issue-content h4 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.1rem;
    font-weight: 600;
}

.issue-content p {
    color: #666;
    line-height: 1.5;
    font-size: 0.95rem;
}

.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.projects-header h2 {
    color: white;
    font-size: 2rem;
    font-weight: 600;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.timeline-header h2 {
    color: white;
    font-size: 2rem;
    font-weight: 600;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.settings-header h2 {
    color: white;
    font-size: 2rem;
    font-weight: 600;
}


.btn-add {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.project-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.project-card.healthy { border-left-color: #28a745; }
.project-card.warning { border-left-color: #ffc107; }
.project-card.critical { border-left-color: #dc3545; }

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.project-title {
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.project-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-status.healthy {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.project-status.warning {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.project-status.critical {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.project-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.project-section {
    margin-bottom: 15px;
}

.project-section h4 {
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-section p {
    color: #666;
    line-height: 1.5;
    font-size: 0.9rem;
}

.project-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-edit, .btn-delete {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-edit {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.btn-edit:hover {
    background: #667eea;
    color: white;
}

.btn-delete {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.btn-delete:hover {
    background: #dc3545;
    color: white;
}

/* Gantt Chart styles */
.gantt-container {
    position: relative;
    background: #ffffff;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    overflow: hidden;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.gantt-header {
    display: flex;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: 2px solid #5a67d8;
    font-weight: bold;
    color: #ffffff;
    width: 100%;
    box-sizing: border-box;
}

.gantt-project-column {
    flex: 3;
    padding: 15px;
    border-right: 2px solid #e0e6ed;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
    box-sizing: border-box;
    text-align: left;
    min-width: 0;
}

.gantt-timeline-header {
    flex: 9;
    display: flex;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.gantt-month {
    flex: 1;
    padding: 15px 5px;
    text-align: center;
    border-right: 1px solid #e0e6ed;
    font-size: 0.85em;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
    border: none;
    white-space: nowrap;
    min-width: 0;
    overflow: hidden;
}

.gantt-body {
    position: relative;
    background: #ffffff;
}

.gantt-row {
    display: flex;
    border-bottom: 1px solid #f1f5f9;
    min-height: 60px;
    align-items: center;
}

.gantt-row:hover {
    background: #f8fafc;
}

.gantt-project-info {
    flex: 3;
    padding: 15px;
    border-right: 2px solid #e0e6ed;
    background: #ffffff;
    box-sizing: border-box;
    text-align: left;
    min-width: 0;
}

.gantt-project-name {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 0.95em;
}

.gantt-project-manager {
    color: #7f8c8d;
    font-size: 0.85em;
}

.gantt-timeline {
    flex: 9;
    position: relative;
    height: 60px;
    display: flex;
}

.gantt-month-column {
    flex: 1;
    border-right: 1px solid #f1f5f9;
    position: relative;
    background: #fefefe;
}

.gantt-month-column:nth-child(even) {
    background: #f8fafc;
}

.gantt-bar {
    position: absolute;
    height: 24px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: 500;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gantt-bar:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.gantt-bar.healthy {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.gantt-bar.warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.gantt-bar.critical {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.gantt-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    transition: width 0.3s ease;
}

.gantt-today-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #ff6b6b 0%, #ee5a52 100%);
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.6);
    border-radius: 2px;
}

.gantt-today-line::before {
    /* content: '▼'; */
    position: absolute;
    top: -35px;
    left: -30px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8em;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    border: 2px solid white;
}

.gantt-today-line::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -3px;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(255, 107, 107, 0.8);
    border: 2px solid white;
}

/* Responsive design for Gantt chart */
@media (max-width: 768px) {
    .gantt-project-column,
    .gantt-project-info {
        width: 200px;
    }
    
    .gantt-month {
        font-size: 0.8em;
        padding: 10px 5px;
    }
    
    .gantt-bar {
        height: 20px;
        font-size: 0.7em;
    }
}

.timeline-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.timeline-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 120px;
    top: 30px;
    width: 12px;
    height: 12px;
    background: #667eea;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 3px #667eea;
}

.timeline-date {
    width: 120px;
    font-weight: 600;
    color: #667eea;
    font-size: 0.9rem;
}

.timeline-content {
    flex: 1;
    padding-left: 30px;
}

.timeline-content h4 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.1rem;
    font-weight: 600;
}

.timeline-content p {
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.timeline-status {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.timeline-status.completed {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.timeline-status.warning {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.settings-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Weekly Report Management Styles */
.weekly-report-management {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid rgba(0, 0, 0, 0.1);
}

.weekly-report-management h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
}

.weekly-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.new-week-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.copy-data-option {
    margin-left: 8px;
}

.copy-data-option label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #555;
    cursor: pointer;
    user-select: none;
}

.copy-data-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

@media (min-width: 600px) {
    .weekly-buttons {
        justify-content: flex-start;
    }
}

.btn-new-week {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    min-width: 200px;
    justify-content: center;
}

.btn-new-week:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.week-selection {
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

.week-selection label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.week-selection select {
    width: 100%;
    padding: 10px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.3s ease;
}

.week-selection select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.data-management {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid rgba(0, 0, 0, 0.1);
}

.data-management h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
}

.data-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.export-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

@media (min-width: 600px) {
    .data-buttons {
        justify-content: space-between;
    }
    
    .export-options {
        flex: 1;
        max-width: 600px;
    }
    
    .btn-import-data {
        flex: 0 0 auto;
        max-width: 300px;
        justify-content: center;
    }
}

.btn-export-current,
.btn-export-all,
.btn-import-data {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-export-current:hover,
.btn-export-all:hover,
.btn-import-data:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-export-current {
    background: linear-gradient(135deg, #17a2b8, #138496);
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.btn-export-current:hover {
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
}

.btn-export-all {
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-export-all:hover {
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* Legacy styles for backward compatibility */
.btn-export-data,
.btn-import-data {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-export-data:hover,
.btn-import-data:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-export-data {
    background: linear-gradient(135deg, #17a2b8, #138496);
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.btn-export-data:hover {
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
}

.btn-save {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5vh auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    min-width: 450px;
    max-width: 800px;
    min-height: 300px;
    max-height: 90vh;
    overflow-y: auto;
    resize: both;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #000;
}

#modal-title {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.5rem;
    font-weight: 600;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

.btn-cancel {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #6c757d;
    color: white;
}

.risk-details-section {
    margin-top: 20px;
}

/* Table Styles */
.table-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

/* Risk Map Table Styles */
.risk-matrix-table,
.risk-details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-bottom: 20px;
    margin-top: 20px;
}

.risk-matrix-table th,
.risk-details-table th {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    border: 1px solid #ddd;
}

.risk-matrix-table th:first-child,
.risk-details-table th:first-child {
    border-top-left-radius: 8px;
}

.risk-matrix-table th:last-child,
.risk-details-table th:last-child {
    border-top-right-radius: 8px;
}

.risk-matrix-table td,
.risk-details-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: center;
    vertical-align: middle;
}

.risk-details-table td {
    text-align: left;
}

.risk-details-table td:nth-child(2),
.risk-details-table td:nth-child(3) {
    text-align: center;
}

.risk-details-table td:nth-child(4) {
    padding-left: 20px;
}

.risk-details-table td:nth-child(5) {
    padding-left: 20px;
}

/* Risk Matrix Status Headers */
.status-healthy {
    background-color: #d4edda !important;
    color: #155724 !important;
}

.status-warning {
    background-color: #fff3cd !important;
    color: #856404 !important;
}

.status-critical {
    background-color: #f8d7da !important;
    color: #721c24 !important;
}

/* Risk Matrix Priority Cells */
.priority-high {
    background-color: #f8d7da;
    color: #721c24;
    font-weight: bold;
}

.priority-medium {
    background-color: #fff3cd;
    color: #856404;
    font-weight: bold;
}

.priority-low {
    background-color: #d4edda;
    color: #155724;
    font-weight: bold;
}

/* Risk Matrix Count Cells */
.risk-count {
    font-size: 1.2rem;
    font-weight: bold;
}

.risk-count.zero {
    color: #6c757d;
    opacity: 0.6;
}

.projects-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.projects-table th {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    border: none;
    white-space: nowrap;
}

.projects-table th:first-child {
    border-top-left-radius: 8px;
}

.projects-table th:last-child {
    border-top-right-radius: 8px;
}

.projects-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    vertical-align: top;
    max-width: 200px;
    word-wrap: break-word;
}

.projects-table tbody tr {
    transition: all 0.3s ease;
}

.projects-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.projects-table tbody tr:last-child td {
    border-bottom: none;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.status-badge.healthy {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.status-badge.warning {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.status-badge.critical {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.priority-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.priority-badge.high {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.priority-badge.medium {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.priority-badge.low {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.table-actions .btn-edit,
.table-actions .btn-delete {
    padding: 6px 12px;
    font-size: 0.8rem;
    min-width: auto;
}

/* Custom Popup Modal Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.popup-overlay.show {
    display: flex;
}

.popup-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
}

.popup-header {
    display: flex;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.popup-icon {
    font-size: 24px;
    margin-right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.popup-title {
    flex: 1;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.popup-content {
    padding: 24px;
}

.popup-message {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    color: #374151;
}

.popup-footer {
    padding: 16px 24px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.popup-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.popup-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.popup-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.popup-btn-secondary {
    background: #6c757d;
    color: white;
    margin-right: 10px;
}

.popup-btn-secondary:hover {
    background: #545b62;
}

.popup-btn-danger {
    background: #dc3545;
    color: white;
}

.popup-btn-danger:hover {
    background: #c82333;
}

.popup-success .popup-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.popup-success .popup-icon::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.popup-error .popup-header {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.popup-error .popup-icon::before {
    content: '\f071';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.popup-info .popup-header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.popup-info .popup-icon::before {
    content: '\f05a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-20px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        min-width: auto;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-header {
        flex-direction: column;
        text-align: center;
    }

    .timeline-header {
        flex-direction: column;
        text-align: center;
    }
    
    .timeline-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .timeline-item::before {
        display: none;
    }
    
    .timeline-content {
        padding-left: 0;
    }
    
    .modal-content {
        margin: 5vh auto;
        width: 95%;
        min-width: 320px;
        max-width: 95vw;
        min-height: 280px;
        max-height: 85vh;
        padding: 20px;
        overflow-y: auto;
        resize: both;
        display: flex;
        flex-direction: column;
    }
    
    .table-container {
        padding: 15px;
    }
    
    .projects-table {
        font-size: 0.8rem;
    }
    
    .projects-table th,
    .projects-table td {
        padding: 8px 6px;
    }
    
    .projects-table td {
        max-width: 150px;
    }
    
    .popup-modal {
        width: 95%;
        margin: 20px;
    }
    
    .popup-header {
        padding: 16px 20px 12px;
    }
    
    .popup-content {
        padding: 20px;
    }
    
    .popup-footer {
        padding: 12px 20px 20px;
    }
}

/* Quill Rich Text Editor Styles */
.quill-editor {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

.quill-editor .ql-toolbar {
    border-bottom: 1px solid #ddd;
    border-radius: 4px 4px 0 0;
    background: #f8f9fa;
}

.quill-editor .ql-container {
    border: none;
    border-radius: 0 0 4px 4px;
    font-family: inherit;
    font-size: 14px;
}

.quill-editor .ql-editor {
    min-height: 80px;
    padding: 12px;
    line-height: 1.5;
}

.quill-editor .ql-editor.ql-blank::before {
    color: #999;
    font-style: italic;
}

/* Mobile responsive for Quill editors */
@media (max-width: 768px) {
    .quill-editor .ql-toolbar {
        padding: 8px;
    }
    
    .quill-editor .ql-editor {
        padding: 8px;
        min-height: 60px;
    }
    
    .quill-editor {
        margin-bottom: 8px;
    }
}