/* Custom styles for SIM Pelatihan */

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8fafc;
}

.main-content {
    min-height: calc(100vh - 200px);
}

/* Dashboard specific styles */
.dashboard-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.dashboard-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.dashboard-stat-icon {
    opacity: 0.8;
}

/* Quick Actions styling */
.quick-action-btn {
    transition: all 0.3s ease;
    border-radius: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* Dashboard tables */
.dashboard-table {
    border-radius: 0.5rem;
    overflow: hidden;
}

.dashboard-table th {
    background-color: #f8fafc;
    border: none;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    padding: 1rem 0.75rem;
}

.dashboard-table td {
    border: none;
    border-bottom: 1px solid #f1f5f9;
    padding: 0.75rem;
    vertical-align: middle;
}

.dashboard-table tbody tr:hover {
    background-color: #f8fafc;
}

/* Alert styling */
.dashboard-alert {
    border-radius: 0.75rem;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .dashboard-stat-number {
        font-size: 2rem;
    }
    
    .dashboard-stat-icon i {
        font-size: 2rem !important;
    }
    
    .quick-action-btn {
        margin-bottom: 0.5rem;
    }
}

/* Badge improvements */
.badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

/* Card header improvements */
.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    background-color: transparent;
}

.card-header.bg-warning {
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.card-header.bg-dark {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0.75rem 0.75rem 0 0 !important;
    font-weight: 600;
}

/* Buttons */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-1px);
}

/* Forms */
.form-control {
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

/* Tables */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table th {
    background-color: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.875rem;
}

.table td {
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

/* Status indicators */
.status-pending {
    color: var(--warning-color);
}

.status-verified {
    color: var(--success-color);
}

.status-rejected {
    color: var(--danger-color);
}

/* File upload area */
.file-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background-color: #f8fafc;
}

.file-upload-area.dragover {
    border-color: var(--primary-color);
    background-color: #eff6ff;
}

/* Certificate display */
.certificate-preview {
    max-width: 100%;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.qr-code {
    max-width: 150px;
    border-radius: 0.5rem;
}

/* Training cards */
.training-card {
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.training-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.training-type-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

/* Progress bars */
.progress {
    height: 0.5rem;
    border-radius: 0.25rem;
}

.progress-bar {
    border-radius: 0.25rem;
}

/* Alert messages */
.alert {
    border: none;
    border-radius: 0.75rem;
    border-left: 4px solid;
}

.alert-success {
    border-left-color: var(--success-color);
    background-color: #f0fdf4;
    color: #166534;
}

.alert-warning {
    border-left-color: var(--warning-color);
    background-color: #fffbeb;
    color: #92400e;
}

.alert-danger {
    border-left-color: var(--danger-color);
    background-color: #fef2f2;
    color: #991b1b;
}

.alert-info {
    border-left-color: var(--info-color);
    background-color: #f0f9ff;
    color: #075985;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .training-card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here */
}

/* Home page specific styles */
.hero-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.training-card-hover {
    transition: all 0.3s ease;
}

.training-card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.stats-gradient {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.feature-icon-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: transform 0.3s ease;
}

.feature-icon-gradient:hover {
    transform: scale(1.1);
}

.navbar-scroll {
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.card-shadow-hover {
    transition: box-shadow 0.3s ease;
}

.card-shadow-hover:hover {
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.1);
}

.alert-custom {
    border-radius: 0.75rem;
    border: none;
    padding: 1rem 1.25rem;
}

.alert-custom.alert-info {
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.1) 0%, rgba(102, 126, 234, 0.1) 100%);
    border-left: 4px solid var(--info-color);
    color: #055160;
}

.badge-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-hover-lift {
    transition: all 0.3s ease;
}

.btn-hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Materials Page Specific Styles */
.materials-container {
    padding: 1rem 0;
}

.upload-section {
    background: #f8f9fa;
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.material-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.material-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.material-card .file-icon {
    text-align: center;
    margin-bottom: 1rem;
}

.material-card .file-icon i {
    font-size: 3rem;
    color: #007bff;
}

.material-card .material-title {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.material-card .material-info {
    font-size: 0.875rem;
    color: #6c757d;
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
    margin-top: 1rem;
}

.material-card .material-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.material-card .material-actions .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* View Toggle Buttons */
.view-toggle {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    overflow: hidden;
}

.view-toggle .btn {
    border: none;
    background: transparent;
    color: #6c757d;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.view-toggle .btn.active {
    background: #007bff;
    color: white;
}

/* Upload Area Enhanced Styling */
.upload-area {
    border: 2px dashed #007bff;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.upload-area:hover {
    border-color: #0056b3;
    background-color: #e9ecef;
}

.upload-area.dragover {
    border-color: #28a745;
    background-color: #d4edda;
}

.upload-content {
    transition: all 0.3s ease;
}

.upload-preview {
    padding: 1rem;
    background-color: #e9ecef;
    border-radius: 0.5rem;
}

/* Material Type Selection */
.btn-check:checked + .btn-outline-primary {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.btn-check:checked + .btn-outline-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

/* Link Input Section */
.link-input-section {
    background: #f8f9fa;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
}

.link-input-section .form-text {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
    margin-top: 0.5rem;
}

/* Platform Icons */
.platform-google-drive { color: #4285f4; }
.platform-youtube { color: #ff0000; }
.platform-onedrive { color: #0078d4; }
.platform-dropbox { color: #0061ff; }
.platform-other { color: #28a745; }

/* File Icons Colors */
.file-icon-pdf { color: #dc3545; }
.file-icon-doc { color: #007bff; }
.file-icon-video { color: #28a745; }
.file-icon-image { color: #fd7e14; }
.file-icon-default { color: #6c757d; }

/* Link Badge Styling */
.badge.bg-info {
    background-color: #17a2b8 !important;
}

.badge.bg-success {
    background-color: #28a745 !important;
}

/* Toast Notification */
.toast {
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Statistics Cards for Materials */
.materials-stats .card {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.materials-stats .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.materials-stats .card-body h4 {
    color: #007bff;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.materials-stats .card-body h6 {
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 0;
}

/* Form enhancements for materials */
.materials-form .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.materials-form .btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}

.materials-form .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.4);
}

/* Responsive Design for Materials */
@media (max-width: 768px) {
    .materials-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .upload-section {
        padding: 1rem;
    }
    
    .material-card {
        padding: 1rem;
    }
    
    .material-card .file-icon i {
        font-size: 2rem;
    }
    
    .view-toggle .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .link-input-section {
        padding: 1rem;
    }
    
    .btn-group.w-100 .btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Animation for loading states */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress Bar for Upload */
.upload-progress {
    margin-top: 1rem;
}

.upload-progress .progress {
    height: 0.75rem;
    border-radius: 0.375rem;
}

/* Custom scrollbar for materials list */
.materials-list-container::-webkit-scrollbar {
    width: 8px;
}

.materials-list-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.materials-list-container::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 4px;
}

.materials-list-container::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}
