/* Assets/css/style.css */
/* Premium Custom Style for Sistem Ujian Online (CBT) */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-navy: #0f172a;
    --primary-navy-light: #1e293b;
    --primary-tosca: #0d9488;
    --primary-tosca-light: #14b8a6;
    --accent-gray-light: #f8fafc;
    --accent-gray-border: #e2e8f0;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --font-outfit: 'Outfit', sans-serif;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
}

body {
    font-family: var(--font-outfit);
    background-color: #f1f5f9;
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Auth Login Styling */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-navy) 0%, #1e1b4b 100%);
    position: relative;
    padding: 1.5rem;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.25rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.auth-header {
    background-color: var(--primary-navy);
    color: #ffffff;
    padding: 2.5rem 2rem 2rem 2rem;
    text-align: center;
    border-bottom: 4px solid var(--primary-tosca);
}

.auth-body {
    padding: 2.5rem 2rem;
}

/* Layout Wrapper */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* Sidebar Styling */
#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--primary-navy);
    color: #fff;
    transition: all 0.3s ease-in-out;
    min-height: 100vh;
    z-index: 1000;
    position: fixed;
    height: 100%;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

#sidebar.active {
    margin-left: calc(-1 * var(--sidebar-width));
}

#sidebar .sidebar-header {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 2px solid var(--primary-tosca);
}

#sidebar ul.components, #sidebarOffcanvas ul.components {
    padding: 1.5rem 0;
}

#sidebar ul li a, #sidebarOffcanvas ul.components li a {
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

#sidebar ul li a:hover, #sidebar ul li.active > a,
#sidebarOffcanvas ul.components li a:hover, #sidebarOffcanvas ul.components li.active > a {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-left-color: var(--primary-tosca);
}

#sidebar ul li a i, #sidebarOffcanvas ul.components li a i {
    font-size: 1.15rem;
}

/* Main Content Area */
#content {
    width: 100%;
    padding: 2rem;
    min-height: 100vh;
    transition: all 0.3s;
    margin-left: var(--sidebar-width);
}

#content.active {
    margin-left: 0;
}

/* Navigation Navbar */
.navbar-custom {
    background-color: #ffffff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    margin-bottom: 2rem;
}

/* Cards & Components */
.card-custom {
    background: #ffffff;
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

.card-custom-header {
    background-color: transparent;
    border-bottom: 1px solid var(--accent-gray-border);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-counter {
    border-left: 4px solid var(--primary-navy);
}

.card-counter.tosca {
    border-left-color: var(--primary-tosca);
}

.card-counter.warning {
    border-left-color: #eab308;
}

.card-counter.danger {
    border-left-color: #ef4444;
}

/* CBT Question Nav Box */
.q-box-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
    gap: 8px;
    padding: 0.75rem;
}

.q-box {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent-gray-border);
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    background-color: #ffffff;
    transition: all 0.2s ease;
    user-select: none;
    color: var(--text-dark);
}

.q-box:hover {
    border-color: var(--primary-navy);
    background-color: var(--accent-gray-light);
}

.q-box.answered {
    background-color: var(--primary-tosca);
    color: #ffffff;
    border-color: var(--primary-tosca);
}

.q-box.flagged {
    background-color: #eab308;
    color: #ffffff;
    border-color: #eab308;
}

.q-box.active {
    border: 2px solid var(--primary-navy);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.15);
}

/* Option List in Exam */
.option-item {
    border: 1px solid var(--accent-gray-border);
    border-radius: 0.5rem;
    padding: 0.9rem 1.25rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.option-item:hover {
    background-color: var(--accent-gray-light);
    border-color: var(--primary-tosca-light);
}

.option-item.selected {
    background-color: rgba(13, 148, 136, 0.08);
    border-color: var(--primary-tosca);
    box-shadow: 0 0 0 1px var(--primary-tosca);
}

.option-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--accent-gray-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    background-color: #ffffff;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.option-item.selected .option-badge {
    background-color: var(--primary-tosca);
    color: #ffffff;
    border-color: var(--primary-tosca);
}

/* Responsive Overrides */
@media (max-width: 991.98px) {
    #sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    #sidebar.active {
        margin-left: 0;
    }
    #content {
        margin-left: 0;
        padding: 1rem;
    }
    #content.active {
        margin-left: 0;
    }
}
