/* ========================================================
   RyuExam CBT & Portal PJJ (Pembelajaran Jarak Jauh)
   Stylesheet v1.6.8 - High Fidelity Mobile & Desktop
   Font: DM Sans
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

.katex-display {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 0;
    margin: 0.5em 0;
}
.katex {
    font-size: 1.05em;
}

body, button, input, select, textarea {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: #f4f6f9;
    color: #333333;
    margin: 0;
    padding: 0;
}

/* Header Background - Deep Modern Blue with Geometric Pattern */
.header-bg {
    background-color: #1F7FAB;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        radial-gradient(circle at center, #1F7FAB 0%, #14597b 50%, #0d3d54 100%);
    background-size: 24px 24px, 24px 24px, auto;
}

/* App Top Header - Modern Curved Gradient (Sesuai Referensi UI) */
.app-top-header {
    background: linear-gradient(135deg, #1877F2 0%, #1976D2 50%, #1565C0 100%);
    border-bottom-left-radius: 28px;
    border-bottom-right-radius: 28px;
    box-shadow: 0 4px 20px -2px rgba(25, 118, 210, 0.25);
}

/* Windows 11 Fluent Folder Card (Sesuai Referensi UI Windows 11) */
.win11-folder-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.win11-folder-card:hover {
    background: #f8fafc;
    border-color: #90caf9;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px -2px rgba(25, 118, 210, 0.12);
}

.win11-folder-card:active {
    transform: scale(0.98);
}



.btn-primary {
    background: linear-gradient(180deg, #1F7FAB 0%, #155675 100%);
    border-color: #155675;
    color: #ffffff !important;
}
.btn-primary:hover {
    background: #155675;
    color: #ffffff !important;
}

.btn-info {
    background: linear-gradient(180deg, #71b1d3 0%, #579ebd 100%);
    border-color: #4b8ba8;
}
.btn-info:hover {
    background: #579ebd;
}

/* Unified Input Group & Form Control */
.custom-input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
    position: relative;
}

.input-group-addon {
    background-color: #eeeeee;
    border: 1px solid #cccccc;
    border-right: none;
    border-radius: 4px 0 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    min-width: 46px;
    max-width: 46px;
    color: #555555;
    padding: 0;
    flex-shrink: 0;
    box-sizing: border-box;
    height: 44px;
}

.form-control {
    display: block;
    width: 100%;
    flex: 1 1 auto;
    height: 44px;
    padding: 8px 12px;
    font-size: 15px;
    line-height: 1.42857143;
    color: #333333;
    background-color: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 0 4px 4px 0;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: #66afe9;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
    outline: none;
    z-index: 3;
}

.form-control:disabled,
.form-control[disabled] {
    background-color: #f9f9f9;
    color: #888888;
    cursor: not-allowed;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.25s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Scrollbars */
.custom-dropdown-scroll::-webkit-scrollbar {
    width: 6px;
}
.custom-dropdown-scroll::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
}

/* Task Cards & Dashboard Elements */
.task-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
}

.task-card.is-done {
    background-color: #f8fafc;
    border-color: #e2e8f0;
}
.task-card.is-done .task-title {
    text-decoration: line-through;
    color: #64748b;
}

/* Google Drive Style Folder Cards */
.gdrive-folder-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    user-select: none;
}

.gdrive-folder-card:hover {
    background-color: #f8fafd;
    border-color: #93c5fd;
    box-shadow: 0 4px 14px -2px rgba(15, 23, 42, 0.07);
    transform: translateY(-2px);
}

.gdrive-folder-card.is-done {
    background-color: #f8fafc;
    border-color: #e2e8f0;
    opacity: 0.88;
}

.gdrive-folder-card.is-done .folder-title {
    color: #94a3b8;
    text-decoration: line-through;
}

/* Category Badges */
.badge-kat-tugas {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.badge-kat-materi {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.badge-kat-kuis {
    background: #f3e8ff;
    color: #7e22ce;
    border: 1px solid #d8b4fe;
}

.badge-kat-video {
    background: #fff1f2;
    color: #e11d48;
    border: 1px solid #fecdd3;
}

.badge-kat-link {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* Time & Clock Box */
.live-clock-badge {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #38bdf8;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    letter-spacing: 1.5px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

/* Student Mobile Bottom Bar Navigation */
.student-mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid #e2e8f0;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)) 4px;
    z-index: 50;
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.mob-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 3px;
    border-radius: 8px;
    color: #64748b;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.1;
    min-width: 54px;
    position: relative;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
}

.mob-nav-btn i {
    font-size: 17px;
    line-height: 1;
    margin-bottom: 2px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.mob-nav-btn:active {
    transform: scale(0.92);
}

.mob-nav-btn.active {
    color: #1976D2;
    font-weight: 700;
}

.mob-nav-btn.active i {
    color: #1976D2;
    transform: translateY(-1px);
}

.mob-nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    width: 20px;
    height: 3px;
    background: #1976D2;
    border-radius: 9999px;
}

.mob-nav-btn.text-rose-danger {
    color: #e11d48;
}

.mob-nav-btn.text-rose-danger:hover,
.mob-nav-btn.text-rose-danger:active {
    color: #be123c;
}

.mob-badge-pill {
    position: absolute;
    top: 2px;
    right: 8px;
    background: #1F7FAB;
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    padding: 1px 4.5px;
    border-radius: 9999px;
    line-height: 1.2;
    border: 1.5px solid #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.12);
}

/* Table Responsive for Rich Text */
.q-text table,
.task-card table {
    display: table !important;
    border-collapse: collapse !important;
    margin: 10px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.q-text table th,
.q-text table td,
.task-card table th,
.task-card table td {
    border: 1px solid #cbd5e1 !important;
    padding: 6px 10px !important;
    font-size: 14px !important;
}

.q-text table th,
.task-card table th {
    background-color: #f1f5f9 !important;
    font-weight: 700 !important;
}

/* Dropdown Notifikasi Siswa */
#student-notif-dropdown {
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(226, 232, 240, 0.8);
    transform-origin: top right;
    animation: notifDropdownPop 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes notifDropdownPop {
    0% {
        opacity: 0;
        transform: scale(0.96) translateY(-6px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#student-notif-list::-webkit-scrollbar {
    width: 5px;
}
#student-notif-list::-webkit-scrollbar-track {
    background: #f8fafc;
}
#student-notif-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}
#student-notif-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Utilitas Sembunyikan Scrollbar Horizontal */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
