/* Training Management System Styles */

/* Modern Stat Cards */
.stat-card-modern {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #f0f0f0;
}

.stat-card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.stat-card-modern .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-card-blue .stat-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stat-card-green .stat-icon {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.stat-card-orange .stat-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.stat-card-cyan .stat-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.stat-card-modern .stat-content {
    flex-grow: 1;
}

.stat-number-modern {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
    color: #2c3e50;
}

.stat-label-modern {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Clean Stat Cards (for achievements page) */
.stat-card-clean {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.stat-card-clean:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.stat-icon-clean {
    font-size: 2.5rem;
}

.stat-number-clean {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin: 0.5rem 0;
}

.stat-label-clean {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Notification Cards (for notifications page) */
.notification-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid #dee2e6;
}

.notification-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.notification-unread {
    border-left-color: #007bff;
    background: #f8f9ff;
}

.notification-read {
    border-left-color: #dee2e6;
    opacity: 0.85;
}

.notification-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.notification-icon-success {
    background: #d4edda;
    color: #28a745;
}

.notification-icon-info {
    background: #d1ecf1;
    color: #17a2b8;
}

.notification-icon-warning {
    background: #fff3cd;
    color: #ffc107;
}

.notification-icon-error {
    background: #f8d7da;
    color: #dc3545;
}

.notification-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.4;
}

.notification-body p {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

/* Notification Dropdown Styling */
.dropdown-menu .dropdown-item {
    transition: background-color 0.2s ease;
}

.dropdown-menu .dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-menu .dropdown-item strong {
    font-size: 0.9rem;
    line-height: 1.4;
}

.dropdown-menu .dropdown-item small {
    font-size: 0.8rem;
    line-height: 1.3;
}

.dropdown-menu .dropdown-item .text-primary {
    font-weight: 500;
    text-decoration: none;
}

.dropdown-menu .dropdown-item .text-primary:hover {
    text-decoration: underline;
}

.dropdown-divider {
    margin: 0.5rem 0;
}

/* Text Content Formatting */
.text-content {
    line-height: 1.8;
    color: #333;
}

.text-content h1,
.text-content h2,
.text-content h3,
.text-content h4,
.text-content h5,
.text-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #1a1a1a;
}

.text-content h1 { font-size: 2.5rem; }
.text-content h2 { font-size: 2rem; color: #007bff; }
.text-content h3 { font-size: 1.75rem; color: #0056b3; }
.text-content h4 { font-size: 1.5rem; }
.text-content h5 { font-size: 1.25rem; }
.text-content h6 { font-size: 1.1rem; }

.text-content p {
    margin-bottom: 1rem;
}

.text-content ul,
.text-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.text-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.text-content strong {
    font-weight: 600;
    color: #1a1a1a;
}

.text-content em {
    font-style: italic;
}

.text-content a {
    color: #007bff;
    text-decoration: underline;
}

.text-content a:hover {
    color: #0056b3;
}

.text-content blockquote {
    border-left: 4px solid #007bff;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    background: #f8f9fa;
    padding: 1rem;
}

.text-content table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

.text-content table th,
.text-content table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
}

.text-content table th {
    background-color: #007bff;
    color: white;
    font-weight: 600;
}

.text-content table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.text-content hr {
    margin: 2rem 0;
    border-top: 2px solid #dee2e6;
}

.text-content code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #d63384;
}

.text-content pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
}

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    
    /* Learning Journey Colors */
    --journey-step-bg: #ffffff;
    --journey-step-border: #e9ecef;
    --journey-current-bg: #e3f2fd;
    --journey-current-border: var(--primary-color);
    --journey-completed-bg: #e8f5e8;
    --journey-completed-border: var(--success-color);
    --journey-locked-bg: #f5f5f5;
    --journey-locked-border: #dee2e6;
    
    /* Urgency Colors */
    --urgency-normal: #6c757d;
    --urgency-warning: #fd7e14;
    --urgency-critical: #dc3545;
    --urgency-overdue: #721c24;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-color);
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
}

.sidebar {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin: 0.25rem 0;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link i {
    width: 20px;
    margin-right: 0.5rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    border-radius: 0.75rem 0.75rem 0 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

/* Progress bars */
.progress {
    height: 0.75rem;
    border-radius: 0.375rem;
}

.progress-bar {
    border-radius: 0.375rem;
}

/* Course cards */
.course-card {
    transition: transform 0.3s ease;
    cursor: pointer;
}

.course-card:hover {
    transform: translateY(-5px);
}

.course-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: bold;
}

.status-not-started {
    background-color: var(--secondary-color);
    color: white;
}

.status-in-progress {
    background-color: var(--warning-color);
    color: var(--dark-color);
}

.status-completed {
    background-color: var(--success-color);
    color: white;
}

.status-teachback-scheduled {
    background-color: var(--info-color);
    color: white;
}

.status-teachback-completed {
    background-color: var(--success-color);
    color: white;
}

/* Awards and achievements */
.award-card {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: var(--dark-color);
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
}

.award-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.award-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Video player */
.video-container {
    position: relative;
    background: #000;
    border-radius: 0.5rem;
    overflow: hidden;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.video-controls {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
}

/* Quiz styles */
.quiz-question {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.quiz-option {
    padding: 0.75rem;
    margin: 0.5rem 0;
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-option:hover {
    border-color: var(--primary-color);
    background-color: rgba(0, 123, 255, 0.1);
}

.quiz-option.selected {
    border-color: var(--primary-color);
    background-color: rgba(0, 123, 255, 0.2);
}

.quiz-timer {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: var(--warning-color);
    color: var(--dark-color);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: bold;
    z-index: 1000;
}

/* Dashboard stats - Clean Design */
.stat-card-clean {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    background: white;
}

.stat-card-clean:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-number-clean {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label-clean {
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Legacy Dashboard stats */
.stat-card {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    padding: 1.5rem;
    border-radius: 1rem;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Notifications */
.notification {
    border-left: 4px solid var(--primary-color);
    background: white;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Notification Dropdown Styles */
.notification-dropdown {
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
    box-sizing: border-box;
    max-width: 320px;
}

.notification-dropdown * {
    box-sizing: border-box;
    max-width: 100%;
}

.notification-item {
    padding: 12px 16px !important;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
    overflow: hidden; /* Prevent content overflow */
    word-wrap: break-word; /* Break long words */
}

.notification-item:hover {
    background-color: #f8f9fa !important;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-close-right {
    font-size: 0.7rem;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
    margin-left: 8px;
}

.notification-close-right:hover {
    opacity: 1;
}

.notification-content {
    max-width: 100%;
    overflow: hidden;
    min-width: 0; /* Allow flex item to shrink */
}

.notification-title {
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: #212529;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.notification-message {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
    margin-bottom: 6px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

.notification-short,
.notification-full {
    display: inline;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.notification-time {
    font-size: 0.75rem;
    color: #adb5bd;
    word-wrap: break-word;
}

.read-more-btn {
    font-size: 0.75rem;
    color: var(--primary-color);
    text-decoration: none;
    margin-left: 4px;
    white-space: nowrap;
}

.read-more-btn:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.read-more-link {
    font-size: 0.75rem;
    color: var(--primary-color);
    text-decoration: none;
    margin-left: 6px;
    white-space: nowrap;
    font-weight: 500;
}

.read-more-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.dropdown-header {
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    overflow: hidden;
    word-wrap: break-word;
}

.notification.unread {
    background: rgba(0, 123, 255, 0.05);
}

.notification-success {
    border-left-color: var(--success-color);
}

.notification-warning {
    border-left-color: var(--warning-color);
}

.notification-error {
    border-left-color: var(--danger-color);
}

/* Teachback status */
.teachback-pending {
    background: var(--warning-color);
    color: var(--dark-color);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    display: inline-block;
    font-weight: bold;
}

.teachback-scheduled {
    background: var(--info-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    display: inline-block;
    font-weight: bold;
}

.teachback-completed {
    background: var(--success-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    display: inline-block;
    font-weight: bold;
}

/* Responsive design */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .course-card {
        margin-bottom: 1rem;
    }
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Form enhancements */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn {
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

/* Anti-cheat indicators */
.anti-cheat-warning {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.session-monitor {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    z-index: 1000;
}

/* Content lock overlay */
.content-locked {
    position: relative;
}

.content-locked::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    z-index: 5;
}

.content-locked::after {
    content: '🔒 Complete previous sections to unlock';
}

/* Notification styles */
.notification {
    border-left: 4px solid #007bff;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 0 5px 5px 0;
    transition: all 0.3s ease;
}

.notification.unread {
    background: #e3f2fd;
    box-shadow: 0 2px 4px rgba(0,123,255,0.1);
}

.notification-success {
    border-left-color: #28a745;
}

.notification-warning {
    border-left-color: #ffc107;
}

.notification-error {
    border-left-color: #dc3545;
}

.notification-info {
    border-left-color: #17a2b8;
}

/* Achievement styles */
.award-card {
    transition: transform 0.2s ease;
    border: 2px solid transparent;
}

.award-card:hover {
    transform: translateY(-2px);
    border-color: #007bff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.award-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* Candidate details styles */
.stat-number {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Removed duplicate stat-card styles - using clean design above */

/* Progress indicators */
.progress {
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #007bff, #0056b3);
    transition: width 0.6s ease;
}

/* Modal enhancements */
.modal-xl {
    max-width: 1200px;
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* Text color utilities */
.text-light-blue {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .stat-card {
        margin-bottom: 15px;
    }
    
    .btn-group-sm .btn {
        padding: 0.25rem 0.4rem;
        font-size: 0.75rem;
    }
    
    .modal-xl {
        max-width: 95%;
    }
}

/* Course Locking Styles */
.course-locked {
    opacity: 0.6;
    cursor: not-allowed !important;
}

.course-locked:hover {
    transform: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.status-locked {
    background-color: #6c757d !important;
    color: white;
}

.status-awaiting-teachback {
    background-color: #ffc107 !important;
    color: #212529;
}

.course-locked .card-body {
    color: #6c757d;
}

/* Recording Interface Styles */
.recording-container {
    padding: 20px;
}

.camera-preview {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.recording-status {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
    z-index: 10;
}

.recording-controls {
    margin: 20px 0;
}

.recording-controls .btn {
    margin: 5px;
    min-width: 140px;
}

.upload-option {
    border-top: 1px solid #dee2e6;
    padding-top: 20px;
}

#cameraPreview {
    border: 2px solid #dee2e6;
    border-radius: 8px;
}

.recording-interface .card {
    height: fit-content;
}

.course-locked .progress-bar {
    background-color: #dee2e6 !important;
}

/* Enhanced Recording Interface Styles */
/* Blinking animation for recording indicator */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.blink {
    animation: blink 1s infinite;
}

/* Playback controls styling */
#playbackControls {
    backdrop-filter: blur(5px);
}

#playbackControls .form-range {
    background: rgba(255, 255, 255, 0.2);
}

#playbackControls .form-range::-webkit-slider-thumb {
    background: #fff;
    border: 2px solid #007bff;
}

#playbackControls .form-range::-moz-range-thumb {
    background: #fff;
    border: 2px solid #007bff;
}

/* Navbar Username Styling */
.navbar-dark .nav-link.dropdown-toggle {
    color: #ffffff !important;
}

.navbar-dark .nav-link.dropdown-toggle:hover {
    color: #f8f9fa !important;
}

.navbar-dark .nav-link.dropdown-toggle .fas.fa-user {
    margin-right: 0.5rem !important;
}

/* ================================
   LEARNING JOURNEY STYLES
   ================================ */

/* Learning Journey Container */
.learning-journey-container {
    position: relative;
    padding: 1rem 0;
}

/* Journey Step */
.journey-step {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding: 2rem;
    background: var(--journey-step-bg);
    border: 1px solid var(--journey-step-border);
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Hover effects removed */

/* Removed ugly dividers and dots */

/* Journey Step States */
.journey-step.current-step {
    background: var(--journey-current-bg);
    border-color: var(--journey-current-border);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.journey-step.completed-step {
    background: var(--journey-completed-bg);
    border-color: var(--journey-completed-border);
}

.journey-step.locked-step {
    background: var(--journey-locked-bg);
    border-color: var(--journey-locked-border);
    cursor: not-allowed;
    opacity: 0.7;
}

.journey-step.teachback-step {
    background: #fff9e6;
    border-color: #ffc107;
    border-width: 2px;
}

/* Locked step hover effects removed */

/* Step Connector Line */
.step-connector {
    position: absolute;
    left: 2.25rem;
    top: 100%;
    width: 3px;
    height: 2rem;
    background: var(--journey-step-border);
    z-index: 1;
}

.step-connector.completed-connector {
    background: var(--journey-completed-border);
}

/* Step Number Circle */
.step-number {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    margin-right: 1.5rem;
    z-index: 2;
    position: relative;
}

.journey-step .step-number {
    background: var(--primary-color);
    color: white;
}

.journey-step.current-step .step-number {
    background: var(--primary-color);
    color: white;
    animation: pulse 2s infinite;
}

.journey-step.completed-step .step-number {
    background: var(--success-color);
    color: white;
}

.journey-step.locked-step .step-number {
    background: var(--secondary-color);
    color: white;
}

.journey-step.teachback-step .step-number {
    background: #ffc107;
    color: #000;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(0, 123, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 123, 255, 0); }
}

/* Step Content */
.step-content {
    flex: 1;
    min-width: 0;
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.step-title-container {
    flex: 1;
    min-width: 0;
}

.step-title {
    margin: 0 0 0.25rem 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-color);
    line-height: 1.3;
}

.step-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
    min-width: 120px;
    margin-left: auto;
}

.step-action-btn {
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

.step-action-btn .btn {
    font-weight: 600;
    border-radius: 20px;
    padding: 0.4rem 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.step-action-btn .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.urgency-indicator {
    margin-top: 0.5rem;
}

.step-description {
    color: #6c757d;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Urgency Badges */
.urgency-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.urgency-normal {
    background: rgba(108, 117, 125, 0.1);
    color: var(--urgency-normal);
    border-color: rgba(108, 117, 125, 0.2);
}

.urgency-warning {
    background: linear-gradient(135deg, rgba(253, 126, 20, 0.1), rgba(255, 193, 7, 0.1));
    color: var(--urgency-warning);
    border-color: rgba(253, 126, 20, 0.3);
}

.urgency-critical {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.15), rgba(255, 107, 107, 0.1));
    color: var(--urgency-critical);
    border-color: rgba(220, 53, 69, 0.4);
    animation: pulse-glow 2s infinite;
}

.urgency-overdue {
    background: linear-gradient(135deg, rgba(114, 28, 36, 0.2), rgba(183, 28, 28, 0.1));
    color: var(--urgency-overdue);
    border-color: rgba(114, 28, 36, 0.5);
    animation: pulse-glow 1.5s infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(220, 53, 69, 0);
        transform: scale(1.02);
    }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.6; }
}

/* Journey Summary */
.journey-summary {
    border: 1px solid #dee2e6;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.summary-stat {
    padding: 0.5rem;
}

.summary-stat .stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.summary-stat .stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Alert Styles for Risk Indicators */
.alert-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .journey-step {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .step-number {
        width: 2.5rem;
        height: 2.5rem;
        margin-right: 1rem;
        font-size: 1rem;
    }
    
    .step-connector {
        left: 1.875rem;
        height: 1.5rem;
    }
    
    .step-title {
        font-size: 1.1rem;
    }
    
    .step-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .step-badges {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .urgency-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    
    .journey-step:not(:last-child)::after {
        width: 90%;
    }
}

/* Awaiting Teachback Button Styling */
.btn-warning.step-action-btn {
    background: linear-gradient(45deg, #ffc107, #fd7e14);
    border: none;
    color: #212529;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

.btn-warning[disabled] {
    opacity: 0.8;
    cursor: not-allowed;
}

/* Learning Streak Styling */
.badge.bg-warning.text-dark {
    background: linear-gradient(45deg, #ffc107, #fd7e14) !important;
    color: #212529 !important;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* Clean Minimal Stat Cards */
.stat-card {
    background: #ffffff;
    border: 1px solid #f1f3f4;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    min-height: 100px;
}

.stat-card:hover {
    border-color: #e3e6ea;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.stat-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6c757d;
    margin: 0;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: #f8f9fa;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 1.25rem;
}

.stat-card:nth-child(1) .stat-icon {
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.stat-card:nth-child(2) .stat-icon {
    background: rgba(25, 135, 84, 0.1);
    color: #198754;
}

.stat-card:nth-child(3) .stat-icon {
    background: rgba(13, 202, 240, 0.1);
    color: #0dcaf0;
}

.stat-card:nth-child(4) .stat-icon {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

/* User Management Button */
.user-mgmt-btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    border: 1px solid #e3e6ea;
    background: #ffffff;
    color: #495057;
}

.user-mgmt-btn:hover {
    background: #f8f9fa;
    border-color: #0d6efd;
    color: #0d6efd;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15);
}

.user-mgmt-btn i {
    opacity: 0.8;
}

/* User Management Modal */
.modal-xl .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #f1f3f4;
    padding: 1.5rem;
    background: #fafbfc;
    border-radius: 12px 12px 0 0;
}

.modal-title {
    font-weight: 600;
    color: #1a1a1a;
}

.modal-body {
    padding: 1.5rem;
}

/* User Management Tabs */
.nav-tabs {
    border-bottom: 1px solid #f1f3f4;
    margin-bottom: 1.5rem;
}

.nav-tabs .nav-link {
    border: none;
    border-radius: 8px 8px 0 0;
    color: #6c757d;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    margin-right: 0.5rem;
    transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
    background: #f8f9fa;
    color: #495057;
    border-color: transparent;
}

.nav-tabs .nav-link.active {
    background: #ffffff;
    color: #0d6efd;
    border-bottom: 2px solid #0d6efd;
    font-weight: 600;
}

/* Users Table */
.table-responsive {
    border-radius: 8px;
    border: 1px solid #f1f3f4;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: #fafbfc;
    border-bottom: 1px solid #f1f3f4;
    font-weight: 600;
    color: #495057;
    padding: 1rem 0.75rem;
    font-size: 0.875rem;
}

.table tbody td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #f8f9fa;
}

.table tbody tr:hover {
    background: #fafbfc;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* User Avatar */
.user-avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 50%;
    color: #6c757d;
}

/* User Management Forms */
.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border: 1px solid #e3e6ea;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.1);
}

.input-group-text {
    background: #f8f9fa;
    border: 1px solid #e3e6ea;
    color: #6c757d;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
}

.badge.bg-primary {
    background-color: #0d6efd !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
}

.badge.bg-success {
    background-color: #198754 !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
}

.badge.bg-light {
    background-color: #f8f9fa !important;
    color: #495057 !important;
    border: 1px solid #e3e6ea;
}

/* Button Groups */
.btn-group-sm .btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 6px;
}

.btn-outline-primary {
    border-color: #e3e6ea;
    color: #0d6efd;
}

.btn-outline-primary:hover {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-outline-danger {
    border-color: #e3e6ea;
    color: #dc3545;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
}

/* Bulk Actions Cards */
.card {
    border: 1px solid #f1f3f4;
    border-radius: 8px;
    box-shadow: none;
}

.card-header {
    background: #fafbfc;
    border-bottom: 1px solid #f1f3f4;
    padding: 1rem;
    font-weight: 600;
}

.card-body {
    padding: 1rem;
}

/* Bulk Action Buttons */
.d-grid .btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.75rem;
    transition: all 0.2s ease;
}

.btn-outline-success {
    border-color: #e3e6ea;
    color: #198754;
}

.btn-outline-success:hover:not(:disabled) {
    background-color: #198754;
    border-color: #198754;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(25, 135, 84, 0.2);
}

.btn-outline-warning {
    border-color: #e3e6ea;
    color: #fd7e14;
}

.btn-outline-warning:hover:not(:disabled) {
    background-color: #fd7e14;
    border-color: #fd7e14;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(253, 126, 20, 0.2);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Search and Filter */
.input-group .form-control {
    border-right: none;
}

.input-group .input-group-text {
    border-left: none;
}

/* Alert Styling */
.alert-info {
    background-color: rgba(13, 202, 240, 0.1);
    border: 1px solid rgba(13, 202, 240, 0.2);
    color: #055160;
    border-radius: 8px;
}

/* Modal Footer */
.modal-footer {
    border-top: 1px solid #f1f3f4;
    padding: 1rem 1.5rem;
    background: #fafbfc;
    border-radius: 0 0 12px 12px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .user-mgmt-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .user-mgmt-btn .me-1 {
        margin-right: 0.25rem !important;
    }
    
    .modal-xl .modal-dialog {
        margin: 0.5rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .nav-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* Avatar Components */
.avatar-sm {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-title {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Subtle Background Colors for Bootstrap 5.3+ */
.bg-warning-subtle {
    background-color: rgba(255, 193, 7, 0.1) !important;
}

.bg-info-subtle {
    background-color: rgba(13, 202, 240, 0.1) !important;
}

.text-warning {
    color: #f57c00 !important;
}

.text-info {
    color: #0dcaf0 !important;
}

/* Card Enhancements */
.card {
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.card-header {
    font-weight: 600;
}

.icon-wrapper {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* Attention and Teachback Items */
.attention-item,
.teachback-item {
    padding: 0.75rem;
    border-radius: 0.5rem;
    background-color: rgba(248, 249, 250, 0.5);
    transition: all 0.2s ease;
}

.attention-item:hover,
.teachback-item:hover {
    background-color: rgba(248, 249, 250, 0.8);
    transform: translateX(2px);
}

.attention-item:last-child,
.teachback-item:last-child {
    margin-bottom: 0 !important;
}

/* Badge Enhancements */
.badge {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
}

.bg-warning-subtle.text-warning {
    background-color: rgba(255, 193, 7, 0.15) !important;
    color: #f57c00 !important;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.bg-info-subtle.text-info {
    background-color: rgba(13, 202, 240, 0.15) !important;
    color: #0dcaf0 !important;
    border: 1px solid rgba(13, 202, 240, 0.3);
}

/* Modal Enhancements */
.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Button Enhancements */
.btn {
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Quick Actions Styling */
.d-grid .btn {
    justify-content: flex-start;
    text-align: left;
}

/* Enhanced Progress Bars */
.progress {
    border-radius: 0.5rem;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.6s ease;
}

/* Priority Badges */
.badge.bg-danger {
    animation: subtle-pulse 3s infinite;
}

@keyframes subtle-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}