/* User Dashboard V2 - Rollenbasiertes Onboarding Portal */

.aom-user-dashboard-v2 {
    padding: 2rem;
}

/* Category Content Modal */
.aom-modal-large .aom-modal-content {
    max-width: 1100px;
    padding: 0;
}

.aom-modal-large .aom-modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.aom-modal-large .aom-modal-body {
    padding: 2rem;
}

/* Content Detail View - Centered Video at 50% width */
.aom-content-detail .aom-content-media {
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 2rem;
    width: 600px !important;
    max-width: 50%;
    display: block;
}

.aom-content-media .aom-video-container {
    position: relative !important;
    width: 100% !important;
    max-width: 800px !important;
    margin: 0 auto !important;
    padding-bottom: 56.25% !important; /* 16:9 aspect ratio */
    height: 0 !important;
    overflow: hidden !important;
    background: #000 !important;
    border-radius: 8px !important;
}

.aom-content-detail .aom-content-media .aom-video-container iframe,
.aom-content-detail .aom-content-media .aom-video-container video {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    display: block !important;
    border: 0 !important;
    object-fit: contain !important;
}

/* Force video element to respect container */
.aom-video-container > video {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* Additional override for any iframe */
.aom-video-container iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
}

.aom-loading {
    text-align: center;
    padding: 3rem;
}

.aom-spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.aom-category-content-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.aom-content-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.aom-content-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.aom-content-item.completed {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.05);
}

.aom-content-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.aom-content-icon i {
    font-size: 24px;
    color: #fff;
}

.aom-content-info {
    flex: 1;
}

.aom-content-info h4 {
    margin: 0 0 0.5rem 0;
    color: #fff;
    font-size: 1.1rem;
}

.aom-content-info p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.aom-content-status {
    flex-shrink: 0;
}

.aom-status-icon {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.3);
}

.aom-content-item.completed .aom-status-icon {
    color: #10b981;
}

.aom-content-actions {
    flex-shrink: 0;
}

.aom-category-summary {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.aom-summary-progress {
    width: 100%;
}

.aom-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    color: #fff;
}

.aom-progress-percent {
    font-size: 1.25rem;
    font-weight: 700;
    color: #667eea;
}

/* Welcome Section */
.aom-welcome-section {
    padding: 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    margin-bottom: 2rem;
    color: #fff;
}

.aom-welcome-content h1 {
    font-size: 2.5rem;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.aom-welcome-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin: 0;
}

/* Overall Progress Card */
.aom-overall-progress-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    display: block;
    min-height: 150px;
}

.aom-overall-progress-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

.aom-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.aom-progress-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #e5e7eb;
}

.aom-progress-percentage {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.aom-overall-progress-card .aom-progress-bar-wrapper {
    margin-bottom: 1rem;
    width: 100%;
    display: block;
    clear: both;
    min-height: 24px;
}

.aom-overall-progress-card .aom-progress-bar-track {
    width: 100%;
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: 10px;
    overflow: visible;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    display: block !important;
    line-height: 20px;
}

.aom-overall-progress-card .aom-progress-bar-fill {
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 8px;
    transition: width 0.6s ease;
    position: absolute;
    top: 0;
    left: 0;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.6), 
                0 2px 10px rgba(102, 126, 234, 0.4);
    min-width: 3%;
    display: block !important;
    line-height: 20px;
}

.aom-progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.aom-progress-description {
    margin: 0;
    font-size: 0.95rem;
    color: #9ca3af;
    line-height: 1.5;
}

/* Stats Grid */
.aom-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.aom-stat-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.aom-stat-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.aom-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.25rem;
}

.aom-stat-icon i {
    font-size: 28px;
    color: #fff;
}

.aom-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.aom-stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Section Headers */
.aom-section {
    margin-bottom: 3rem;
}

.aom-section-header {
    margin-bottom: 1.5rem;
}

.aom-section-header h2 {
    font-size: 1.75rem;
    margin: 0 0 0.5rem 0;
    color: #fff;
}

.aom-section-header p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Categories Grid */
.aom-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.aom-category-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.75rem;
    transition: all 0.3s ease;
}

.aom-category-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

.aom-category-card.required {
    border-color: rgba(239, 68, 68, 0.4);
}

.aom-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.aom-category-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aom-category-icon i {
    font-size: 24px;
    color: #fff;
}

.aom-category-card h3 {
    font-size: 1.25rem;
    margin: 0 0 0.75rem 0;
    color: #fff;
}

.aom-category-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.aom-category-progress {
    margin-bottom: 1.25rem;
}

.aom-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.aom-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.aom-progress-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Courses List */
.aom-courses-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.aom-course-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.aom-course-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.aom-course-item.completed {
    border-color: rgba(16, 185, 129, 0.3);
}

.aom-course-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.aom-course-icon i {
    font-size: 24px;
    color: #fff;
}

.aom-course-info {
    flex: 1;
}

.aom-course-info h4 {
    margin: 0 0 0.5rem 0;
    color: #fff;
    font-size: 1.1rem;
}

.aom-course-info p {
    margin: 0 0 0.75rem 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.aom-course-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.aom-course-meta i {
    font-size: 16px;
}

.aom-course-actions {
    flex-shrink: 0;
}

.aom-completed-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(16, 185, 129, 0.2);
    border-radius: 50%;
    color: #10b981;
    font-size: 20px;
    font-weight: bold;
}

/* Documents Grid */
.aom-documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.aom-document-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.aom-document-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.aom-document-card.submitted {
    border-color: rgba(16, 185, 129, 0.3);
}

.aom-document-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.aom-document-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aom-document-icon i {
    font-size: 22px;
    color: #fff;
}

.aom-document-card h4 {
    margin: 0 0 0.75rem 0;
    color: #fff;
    font-size: 1.1rem;
}

.aom-document-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.aom-document-category {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.aom-document-category i {
    font-size: 14px;
}

.aom-document-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.aom-document-submitted {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.aom-document-submitted small {
    color: rgba(16, 185, 129, 0.8);
    font-size: 0.85rem;
}

/* Empty State */
.aom-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

.aom-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aom-empty-icon i {
    font-size: 40px;
    color: rgba(255, 255, 255, 0.3);
}

.aom-empty-state h3 {
    color: #fff;
    margin-bottom: 0.75rem;
}

.aom-empty-state p {
    color: rgba(255, 255, 255, 0.6);
    max-width: 500px;
    margin: 0 auto;
}

/* Badges */
.aom-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.aom-badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.aom-badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.aom-badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.aom-badge-info {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.aom-badge i {
    font-size: 14px;
}

/* Content Detail View */
.aom-content-detail {
    padding: 0;
}

.aom-content-detail-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.aom-content-detail-header .back-to-category {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.aom-content-detail-header .back-to-category:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.aom-content-detail h3 {
    font-size: 1.5rem;
    color: #fff;
    margin: 0 0 1.5rem 0;
}

/* Video Container - Always at the top */
.aom-content-media {
    order: -1; /* Ensures it appears first */
}

.aom-content-media img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: block;
}

.aom-content-media video {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.aom-content-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: block;
    position: relative;
    z-index: 1;
}

.aom-content-body {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    display: block;
    position: relative;
    z-index: 1;
}

.aom-content-body h1,
.aom-content-body h2,
.aom-content-body h3,
.aom-content-body h4,
.aom-content-body h5,
.aom-content-body h6 {
    color: #fff;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.aom-content-body p {
    margin-bottom: 1rem;
}

.aom-content-body ul,
.aom-content-body ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.aom-content-body li {
    margin-bottom: 0.5rem;
}

.aom-content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .aom-content-detail .aom-content-media {
        width: 100%;
    }
    
    .aom-welcome-section {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .aom-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .aom-categories-grid {
        grid-template-columns: 1fr;
    }
    
    .aom-documents-grid {
        grid-template-columns: 1fr;
    }
    
    .aom-course-item {
        flex-direction: column;
        text-align: center;
    }
    
    .aom-course-actions {
        width: 100%;
    }
    
    .aom-course-actions .aom-btn {
        width: 100%;
    }
}
