/* Training Progress Report Styles */

/* Export Dropdown */
.export-dropdown {
    position: relative;
    display: inline-block;
}

.export-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 5px;
    background: rgba(20, 25, 30, 0.98);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    min-width: 200px;
    overflow: hidden;
}

.export-dropdown-menu.show {
    display: block;
    animation: dropdownSlideIn 0.2s ease;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.export-option {
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    color: #e0e0e0;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    transition: background 0.2s ease;
}

.export-option:hover {
    background: rgba(59, 130, 246, 0.2);
}

.export-icon {
    font-size: 1.2rem;
}

.export-icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
}

.report-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.report-header {
    padding: 40px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
}

.report-header h1 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
    background: linear-gradient(135deg, #3b82f6 0%, #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.report-header .report-date {
    opacity: 0.9;
    font-size: 1.1em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(34, 197, 94, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    background: linear-gradient(135deg, #3b82f6 0%, #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.stat-label {
    color: #b8c5d6;
    font-size: 0.9em;
}

.section {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(34, 197, 94, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.8em;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.skill-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(34, 197, 94, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.skill-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3);
}

.skill-card h3 {
    background: linear-gradient(135deg, #3b82f6 0%, #22c55e 100%);
    background-clip: text;
    margin: 0 0 15px 0;
    font-size: 1.3em;
}

.skill-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.skill-card li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #e0e0e0;
}

.skill-card li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: bold;
}

.campaign-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.campaign-stat-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(34, 197, 94, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 25px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.campaign-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3);
}

.campaign-stat-card h3 {
    margin: 0 0 15px 0;
    font-size: 1.5em;
    background: linear-gradient(135deg, #3b82f6 0%, #22c55e 100%);

    background-clip: text;
}

.campaign-progress-bar {
    background: rgba(255, 255, 255, 0.1);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.campaign-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #22c55e 100%);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.campaign-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.metric {
    text-align: center;
}

.metric-value {
    font-size: 1.8em;
    font-weight: bold;
    background: linear-gradient(135deg, #3b82f6 0%, #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.metric-label {
    font-size: 0.9em;
    color: #b8c5d6;
    margin-top: 5px;
}

.user-list {
    margin-top: 20px;
}

.user-item {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(34, 197, 94, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.user-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.user-name {
    font-weight: 500;
    color: #e0e0e0;
}

.user-stats {
    display: flex;
    gap: 20px;
    color: #b8c5d6;
}

.back-button {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(34, 197, 94, 0.2) 100%);
    color: white;
    padding: 12px 24px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(34, 197, 94, 0.3) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 1.2em;
}

.trend-indicator {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

.trend-up {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.trend-down {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.trend-stable {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

/* Risk Score Section */
.risk-score-section {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(34, 197, 94, 0.08) 100%);
}

.risk-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 40px;
    align-items: center;
}

.risk-left {
    text-align: center;
    padding-right: 40px;
    border-right: 2px solid rgba(59, 130, 246, 0.2);
}

.risk-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.risk-meter-container {
    max-width: 500px;
}

.risk-meter {
    position: relative;
    height: 24px;
    background: linear-gradient(90deg, 
        #22c55e 0%, 
        #22c55e 33%, 
        #eab308 33%, 
        #eab308 66%, 
        #ef4444 66%, 
        #ef4444 100%);
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.risk-meter-marker {
    position: absolute;
    top: -5px;
    width: 3px;
    height: 34px;
    background: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    transition: left 0.5s ease;
    z-index: 10;
}

.risk-meter-marker::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid white;
}

.risk-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-weight: 600;
    font-size: 0.85em;
}

.risk-label-low {
    color: #22c55e;
}

.risk-label-medium {
    color: #eab308;
}

.risk-label-high {
    color: #ef4444;
}

.risk-score-value {
    font-size: 3em;
    font-weight: bold;
    background: linear-gradient(135deg, #3b82f6 0%, #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    line-height: 1;
}

.risk-score-description {
    font-size: 1em;
    color: #b8c5d6;
    font-weight: 500;
}

.risk-factors {
    display: flex;
    gap: 20px;
    max-width: 500px;
}

.risk-factor {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex: 1;
}

.risk-factor-label {
    color: #b8c5d6;
    font-size: 0.9em;
}

.risk-factor-value {
    font-size: 1em;
    font-weight: bold;
    background: linear-gradient(135deg, #3b82f6 0%, #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 768px) {
    .risk-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .risk-left {
        border-right: none;
        border-bottom: 2px solid rgba(59, 130, 246, 0.2);
        padding-right: 0;
        padding-bottom: 20px;
    }
}

/* Export Button */
#exportBtn {
    background: linear-gradient(135deg, #3b82f6 0%, #22c55e 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

#exportBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* Print Styles for PDF Generation */
@media print {
    body {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Ensure tables don't break across pages */
    .data-table,
    .risk-section,
    .chart-card {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    /* Make sure text doesn't overflow */
    .data-table td,
    .data-table th {
        font-size: 10px !important;
        padding: 8px !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    /* Ensure images load */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Fix adaptive risk score visibility */
    .risk-section {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Hide export button in PDF */
    #exportBtn,
    .export-dropdown {
        display: none !important;
    }
}

/* Ensure adaptive risk score is always visible */
.risk-section {
    display: block;
    opacity: 1;
    visibility: visible;
}
