/* UI/UX Improvements for Test Management System */

/* Modern Card Design */
.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0 !important;
    padding: 1rem 1.5rem;
    border: none;
}

.card-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

/* Compact Layout */
.content-wrapper {
    padding: 15px;
}

.content-header {
    margin-bottom: 20px;
}

.content-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

/* Compact Table Design */
.table-compact {
    font-size: 0.9rem;
}

.table-compact th {
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.table-compact td {
    padding: 0.75rem;
    vertical-align: middle;
}

/* Modern Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    text-transform: none;
    transition: all 0.2s ease;
    border: none;
    padding: 0.5rem 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.85rem;
}

/* Status Badges */
.badge {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
}

.badge-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

.badge-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.badge-secondary {
    background: linear-gradient(135deg, #7f8c8d 0%, #95a5a6 100%);
    color: white;
}

/* Form Improvements */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.2s ease;
    padding: 0.75rem 1rem;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Sidebar Improvements */
.main-sidebar {
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.nav-sidebar .nav-link {
    border-radius: 8px;
    margin: 2px 8px;
    transition: all 0.2s ease;
}

.nav-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

/* Alert Improvements */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

/* Breadcrumb Improvements */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: #5a6fd8;
}

/* Space Optimization */
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

.row {
    margin-left: -8px;
    margin-right: -8px;
}

.col, .col-auto, .col-sm, .col-md, .col-lg, .col-xl {
    padding-left: 8px;
    padding-right: 8px;
}

/* Dropdown Improvements */
.dropdown-menu {
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    border-radius: 4px;
    margin: 2px 8px;
}

.dropdown-item:hover {
    background: #f8f9fa;
    transform: translateX(4px);
}

/* Tab Improvements */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
    border-radius: 8px 8px 0 0;
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.2s ease;
}

.nav-tabs .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.nav-tabs .nav-link:hover:not(.active) {
    background: #f8f9fa;
    color: #495057;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .content-wrapper {
        padding: 10px;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
    }
    
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .btn-group .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .content-header h1 {
        font-size: 1.3rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .card {
        background-color: #2c3e50;
        color: #ecf0f1;
    }
    
    .table-compact th {
        background: #34495e;
        color: #ecf0f1;
    }
    
    .form-control {
        background-color: #34495e;
        border-color: #4a5f7a;
        color: #ecf0f1;
    }
    
    .form-control:focus {
        background-color: #34495e;
        border-color: #667eea;
        color: #ecf0f1;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Focus Indicators */
.form-control:focus,
.btn:focus,
.dropdown-toggle:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    .btn, .dropdown-menu {
        display: none;
    }
    
    .content-wrapper {
        padding: 0;
    }
} 