/* SMPN3 WADASLINTANG SMART - Main Stylesheet */
/* Professional Blue & White Theme */

/* Import Google Fonts - Support untuk simbol matematika dan bahasa Arab */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+Arabic:wght@400;700&family=Noto+Sans+Math&display=swap');

:root {
    --primary-color: #0d6efd;
    --primary-dark: #0b5ed7;
    --primary-light: #6ea8fe;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --dark-text: #212529;
    --border-color: #dee2e6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Noto Sans Arabic', 'Noto Sans Math', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-text);
}

/* Login Page Styles */
.login-page {
    overflow: hidden;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
}

.login-container {
    padding: 2rem;
}

.nav-pills .nav-link {
    color: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-pills .nav-link:hover {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
}

.nav-pills .nav-link.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.card {
    border-radius: 12px;
    overflow: hidden;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-control-lg {
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
}

.btn {
    border-radius: 8px;
    padding: 0.625rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.125rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
}

.code-input {
    width: 60px !important;
    height: 60px;
    font-size: 1.5rem;
    font-weight: bold;
    border: 2px solid var(--border-color);
}

.code-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Dashboard Styles */
.sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, #0d6efd 0%, #0b5ed7 100%);
    color: var(--white);
    padding: 0;
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    z-index: 1000;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header img {
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.sidebar-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.nav-sidebar {
    padding: 1rem 0;
}

.nav-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.85);
    padding: 0.875rem 1.5rem;
    margin: 0.25rem 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transform: translateX(5px);
}

.nav-sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
    font-weight: 600;
}

.nav-sidebar .nav-link i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.main-content {
    margin-left: 260px;
    padding: 2rem;
    background-color: var(--light-bg);
    min-height: 100vh;
}

.topbar {
    background-color: var(--white);
    padding: 1rem 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.stats-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: none;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.stats-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.stats-icon.bg-primary-soft {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
}

.stats-icon.bg-success-soft {
    background-color: rgba(25, 135, 84, 0.1);
    color: var(--success-color);
}

.stats-icon.bg-warning-soft {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
}

.stats-icon.bg-danger-soft {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.stats-icon.bg-info-soft {
    background-color: rgba(13, 202, 240, 0.1);
    color: var(--info-color);
}

/* Stat Cards for Laporan */
.stat-card {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    color: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 120px;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-card.bg-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
}

.stat-card.bg-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
}

.stat-card.bg-warning {
    background: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%);
}

.stat-card.bg-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
}

.stat-card.bg-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.9;
}

.stat-content h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

.stat-content p {
    margin: 0.5rem 0 0 0;
    font-size: 0.95rem;
    opacity: 0.9;
    font-weight: 500;
}

.table-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.table-card h5 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: var(--light-bg);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--secondary-color);
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    font-size: 0.9rem;
}

.table-sm thead th,
.table-sm tbody td {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.badge {
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .topbar {
        padding: 1rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .stat-content h3 {
        font-size: 2rem;
    }
    
    .stat-icon {
        font-size: 2rem;
    }
    
    .table-card {
        padding: 1rem;
    }
    
    .code-input {
        width: 50px !important;
        height: 50px;
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        margin-bottom: 0.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Modal */
.modal-content {
    border-radius: 12px;
    border: none;
}

.modal-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    color: var(--white);
    border-radius: 12px 12px 0 0;
}

/* Exam interface */
.exam-container {
    max-width: 900px;
    margin: 0 auto;
}

.exam-timer {
    position: sticky;
    top: 20px;
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.timer-display {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

.question-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.question-nav {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 0.5rem;
}

.question-nav-btn {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.question-nav-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--white);
}

.question-nav-btn.answered {
    background: var(--success-color);
    border-color: var(--success-color);
    color: var(--white);
}

.question-nav-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* Loading */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Multi-language Support - Matematika & Bahasa Arab */
textarea, 
.form-control, 
.soal-text,
.jawaban-text,
.pertanyaan,
pre {
    font-family: 'Inter', 'Noto Sans Arabic', 'Noto Sans Math', 'Segoe UI Math', 'Arial Unicode MS', sans-serif;
    direction: auto; /* Auto-detect arah teks (LTR/RTL) */
    unicode-bidi: plaintext;
}

/* Support untuk simbol matematika */
.math-content {
    font-family: 'Noto Sans Math', 'Cambria Math', 'STIX Two Math', serif;
    font-size: 1.1em;
    line-height: 1.8;
}

/* Support untuk teks Arab */
.arabic-content {
    font-family: 'Noto Sans Arabic', 'Traditional Arabic', 'Arial Unicode MS', sans-serif;
    direction: rtl;
    text-align: right;
    line-height: 2;
    font-size: 1.1em;
}

/* Textarea dengan support multi-font */
textarea.multi-lang {
    font-size: 16px;
    line-height: 1.6;
    min-height: 150px;
    resize: vertical;
}

