/* ===== MODERN TRAINING MANAGEMENT SYSTEM CSS ===== */

:root {
    /* Educational Theme Colors */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;

    /* Secondary Colors */
    --secondary-color: #059669;
    --accent-color: #0891b2;

    /* Status Colors */
    --success-color: #059669;
    --warning-color: #d97706;
    --info-color: #0284c7;
    --danger-color: #dc2626;

    /* Neutral Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0fdf4 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

/* Clean container for educational theme */
.main-container {
    background: var(--bg-primary);
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin: 1.5rem auto;
    max-width: 1200px;
}

/* ===== EDUCATIONAL HEADER STYLES ===== */
.modern-header {
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(5, 150, 105, 0.1) 100%);
    border-radius: var(--radius-lg);
    padding: 1.2rem 1.2rem;
    margin-bottom: 1.2rem;
    text-align: center;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.modern-header h1 {
    color: #1e40af;
    font-weight: 700;
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
}

.modern-header .lead {
    color: #4b5563;
    font-size: 1.125rem;
    font-weight: 400;
    margin-bottom: 0;
}

/* ===== EDUCATIONAL CARD STYLES ===== */
.session-card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid #e5e7eb;
    transition: all var(--transition-normal);
    margin-bottom: 1.25rem;
    overflow: hidden;
    position: relative;
}

.session-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    transition: width var(--transition-normal);
}

.session-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.session-card:hover::before {
    width: 6px;
}

/* Status-specific card styles */
.session-card.status-ongoing::before {
    background: var(--success-color);
}

.session-card.status-upcoming::before {
    background: var(--warning-color);
}

.session-card.status-past::before {
    background: var(--info-color);
}

.session-card-body {
    padding: 1.5rem;
}

.session-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.session-meta {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    color: #4b5563;
    font-size: 0.9rem;
}

.session-meta i {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
    color: #6b7280;
}

/* Status borders - Updated */
.border-success {
    border-left: 4px solid var(--success-color) !important;
}

.border-warning {
    border-left: 4px solid var(--warning-color) !important;
}

.border-info {
    border-left: 4px solid var(--info-color) !important;
}

/* ===== EDUCATIONAL COUNTDOWN TIMER ===== */
.countdown-container {
    background: #f8fafc;
    border-radius: var(--radius-md);
    padding: 0.875rem 1rem;
    margin: 0.75rem 0;
    border: 1px solid #e2e8f0;
}

.countdown-timer {
    font-size: 1rem;
    font-weight: 700;
    padding: 0.5rem 0.875rem;
    background: #1f2937;
    color: white;
    border-radius: var(--radius-sm);
    display: inline-block;
    box-shadow: var(--shadow-sm);
    border: 2px solid #374151;
}

/* ===== EDUCATIONAL BUTTON STYLES ===== */
.btn {
    border-radius: var(--radius-md);
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    transition: all var(--transition-normal);
    border: 1px solid transparent;
    font-size: 0.875rem;
    line-height: 1.5;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #047857;
    border-color: #047857;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-info {
    background-color: var(--info-color);
    border-color: var(--info-color);
    color: white;
}

.btn-info:hover {
    background-color: #0369a1;
    border-color: #0369a1;
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-outline-secondary {
    border-color: var(--text-secondary);
    color: var(--text-secondary);
    background: transparent;
}

.btn-outline-secondary:hover {
    background-color: var(--text-secondary);
    color: white;
}

.btn-outline-danger {
    border-color: var(--danger-color);
    color: var(--danger-color);
    background: transparent;
}

.btn-outline-danger:hover {
    background-color: var(--danger-color);
    color: white;
}

/* ===== EDUCATIONAL TAB STYLES ===== */
.modern-tabs {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e5e7eb;
}

.nav-tabs {
    border: none;
    gap: 0.25rem;
}

.nav-tabs .nav-link {
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    padding: 0.875rem 1.25rem;
    transition: all var(--transition-normal);
    color: #4b5563;
    background: transparent;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

.nav-tabs .nav-link.active {
    background-color: var(--primary-color);
    color: white !important;
    box-shadow: var(--shadow-sm);
}

.nav-tabs .nav-link.active .badge {
    background-color: rgba(255, 255, 255, 0.95) !important;
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* ===== EDUCATIONAL FOOTER STYLES ===== */
.modern-footer {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid #e5e7eb;
    box-shadow: var(--shadow-sm);
    margin-top: 2.5rem;
    padding: 2rem;
    position: relative;
}

.modern-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

/* Educational Admin page styles */
.card {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid #e5e7eb;
}

.card-header {
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
    font-weight: 500;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.table-hover tbody tr:hover {
    background-color: var(--primary-light);
}

/* Educational Form styles */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.form-label {
    font-weight: 500;
    color: #495057;
}

/* Badge styles */
.badge {
    font-size: 0.75em;
    padding: 0.35em 0.65em;
}

/* Alert styles */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ===== MOBILE-FRIENDLY RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    .main-container {
        margin: 0.75rem;
        padding: 1rem !important;
        border-radius: var(--radius-md);
    }

    .modern-header {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
    }

    .modern-header h1 {
        font-size: 1.875rem;
        line-height: 1.2;
    }

    .modern-header .lead {
        font-size: 1rem;
    }

    .search-container {
        padding: 0.7rem;
        margin-bottom: 1rem;
    }

    .search-container .row {
        flex-direction: column;
        gap: 1rem;
    }

    .search-container .col-md-4 {
        text-align: center !important;
    }

    .status-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
        margin: 0.125rem;
    }

    .modern-tabs {
        padding: 0.375rem;
        margin-bottom: 1.5rem;
    }

    .nav-tabs .nav-link {
        font-size: 0.875rem;
        padding: 0.75rem 0.875rem;
    }

    .session-card {
        margin-bottom: 1rem;
    }

    .session-card-body {
        padding: 1rem;
    }

    .session-card .row {
        flex-direction: column;
    }

    .session-card .col-md-4 {
        margin-top: 1rem;
    }

    .session-title {
        font-size: 1.125rem;
        line-height: 1.3;
    }

    .session-meta {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }

    .countdown-container {
        padding: 0.75rem;
        margin: 0.75rem 0;
    }

    .countdown-timer {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }

    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .d-grid.gap-3 {
        gap: 0.75rem !important;
    }

    .modern-footer {
        padding: 1.5rem 1rem;
        text-align: center;
        margin-top: 2rem;
    }

    .modern-footer .row {
        flex-direction: column;
        gap: 1rem;
    }

    .modern-footer .small {
        font-size: 0.8rem !important;
    }
}

@media (max-width: 576px) {
    body {
        font-size: 14px;
    }

    .main-container {
        margin: 0.5rem;
        padding: 0.75rem !important;
        border-radius: var(--radius-sm);
    }

    .modern-header {
        padding: 1.25rem 0.75rem;
        margin-bottom: 1.25rem;
    }

    .modern-header h1 {
        font-size: 1.625rem;
        margin-bottom: 0.5rem;
    }

    .modern-header .lead {
        font-size: 0.9rem;
    }

    .search-container {
        padding: 0.875rem;
        margin-bottom: 1.25rem;
    }

    .modern-tabs {
        padding: 0.25rem;
    }

    .nav-tabs .nav-link {
        padding: 0.625rem 0.75rem;
        font-size: 0.8rem;
    }

    .nav-tabs .nav-link i {
        font-size: 0.875rem;
        margin-right: 0.25rem;
    }

    .session-card-body {
        padding: 0.875rem;
    }

    .session-title {
        font-size: 1rem;
        line-height: 1.25;
        margin-bottom: 0.5rem;
    }

    .session-meta {
        font-size: 0.8rem;
        margin-bottom: 0.375rem;
    }

    .countdown-container {
        padding: 0.625rem;
        margin: 0.5rem 0;
    }

    .countdown-timer {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }

    .btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8rem;
        border-radius: var(--radius-sm);
    }

    .status-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }

    .modern-footer {
        padding: 1.25rem 0.75rem;
        margin-top: 1.5rem;
    }

    .modern-footer .small {
        font-size: 0.75rem !important;
        line-height: 1.4;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

/* Animation classes */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.bounce-in {
    animation: bounce 1s ease-out;
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success/Error states */
.text-success {
    color: #198754 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-info {
    color: #0dcaf0 !important;
}

/* ===== UTILITY CLASSES ===== */
.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.ongoing {
    background-color: var(--success-color);
    color: white;
}

.status-badge.upcoming {
    background-color: var(--warning-color);
    color: white;
}

.status-badge.past {
    background-color: var(--info-color);
    color: white;
}

/* ===== ENHANCED SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
    background-clip: content-box;
}

/* ===== EDUCATIONAL SEARCH STYLES ===== */
.search-container {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e5e7eb;
}

.search-input {
    border: 1px solid #d1d5db;
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all var(--transition-normal);
    background: var(--bg-primary);
    color: #374151;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: white;
    color: #111827;
}

.search-input::placeholder {
    color: #9ca3af;
}

/* ===== LOADING SKELETON ===== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    width: 70%;
}
