/* ===== ENHANCED STYLESHEET - OLIMPIADE INFORMATIKA ===== */

/* Custom Colors */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

/* Sidebar Styling */
.sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, #0d6efd 0%, #0056b3 100%);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 20px;
    margin: 5px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.sidebar .nav-link i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateX(5px);
}

.sidebar .nav-link.active {
    background-color: #ffffff;
    color: #0d6efd;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.sidebar .nav-link.active i {
    color: #0d6efd;
}

/* Sidebar Brand */
.sidebar-brand {
    padding: 20px;
    text-align: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

/* Main Content */
.main-content {
    min-height: 100vh;
    background-color: #f8f9fa;
}

/* Navbar */
.navbar {
    background: white !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    padding: 15px 20px;
}

.navbar-brand {
    font-weight: bold;
    color: #0d6efd !important;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.card-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
    color: white;
    border-radius: 12px 12px 0 0 !important;
    padding: 15px 20px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #198754 0%, #146c43 100%);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
    border: none;
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
}

/* Tables */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: #0d6efd;
    color: white;
    border: none;
    padding: 15px;
    font-weight: 600;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
    padding: 15px 20px;
}

/* Dashboard Stats Cards */
.stat-card {
    border-radius: 12px;
    padding: 20px;
    color: rgb(69, 196, 69);
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: scale(1.05);
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 10px 0;
}

.stat-card p {
    margin: 0;
    opacity: 0.9;
}

.stat-primary { background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%); }
.stat-success { background: linear-gradient(135deg, #198754 0%, #146c43 100%); }
.stat-warning { background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%); }
.stat-danger { background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%); }
.stat-info { background: linear-gradient(135deg, #0dcaf0 0%, #0aa2c0 100%); }

/* Difficulty Badges */
.badge-mudah { background-color: #198754; }
.badge-sedang { background-color: #ffc107; color: #000; }
.badge-sulit { background-color: #dc3545; }

/* Verdict Badges */
.badge-accepted { background-color: #198754; }
.badge-wrong-answer { background-color: #dc3545; }
.badge-time-limit { background-color: #ffc107; color: #000; }
.badge-runtime-error { background-color: #6f42c1; }
.badge-compile-error { background-color: #fd7e14; }
.badge-pending { background-color: #6c757d; }

/* Status Badges */
.badge-hadir { background-color: #198754; }
.badge-terlambat { background-color: #ffc107; color: #000; }
.badge-sakit { background-color: #0dcaf0; }
.badge-izin { background-color: #6f42c1; }
.badge-alpha { background-color: #dc3545; }

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
    }
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Footer */
footer {
    background-color: #212529;
    color: white;
    padding: 20px 0;
    margin-top: 50px;
}

/* Code Editor */
#codeEditor {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 8px;
    background-color: #f8f9fa;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}