/*
=========================================================
SISTEM UJIAN ONLINE
Theme v1.0
=========================================================
*/

/* ======================================================
ROOT VARIABLES
====================================================== */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --background: #f5f7fb;
    --card: #fff;
    --border: #dbe3ec;
    --text: #1f2937;
    --text-light: #6b7280;
    --radius: 10px;
    --shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

/* ======================================================
RESET
====================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--background);
    color: var(--text);
    font-family: 'Poppins', Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

/* ======================================================
TYPOGRAPHY
====================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 15px;
}

p {
    margin-bottom: 15px;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* ======================================================
LAYOUT
====================================================== */

.container {
    width: 95%;
    max-width: 1200px;
    margin: auto;
}

.page {
    padding: 30px 0;
}

.page-center,
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
}

.login-wrapper {
    background: linear-gradient(135deg, #eef4ff, #f8fbff);
}

/* ======================================================
GRID
====================================================== */

.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ======================================================
CARD
====================================================== */

.card,
.login-card {
    background: #fff;
    border: 1px solid var(--border);
    border-top: 5px solid var(--primary);
    border-radius: 18px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, .08);
    padding: 25px;
    transition: .2s;
}

.card:hover{

    transform:translateY(-3px);

    box-shadow:0 20px 45px rgba(0,0,0,.10);

}

.login-card {
    width: 100%;
    max-width: 600px;
    padding: 40px;
}

.login-logo {
    text-align: center;
    margin-bottom: 4px;
}

.login-logo img {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.login-title {
    text-align: center;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 8px;
    color: var(--text);
}

.login-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 18px;
    line-height: 1.35;
    margin: 8px 0 28px;
}

/* ======================================================
FORM ELEMENTS
====================================================== */

.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

input,
select,
textarea {
    width: 100%;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    font-size: 18px;
    transition: .25s;
    background: #fff;
}

input:focus,
select:focus,
textarea:focus {

    outline:none;

    border-color:var(--primary);

    box-shadow:
        0 0 0 4px rgba(37,99,235,.18),
        0 10px 25px rgba(37,99,235,.08);

}

.password-group {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    cursor: pointer;
    font-weight: 700;
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 18px 0 24px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.remember-me input {
    width: 18px;
    height: 18px;
    margin: 0;
}

/* ======================================================
BUTTONS
====================================================== */

.btn {
    display: inline-block;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    transition: .2s;
}

.btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover{

    background:var(--primary-dark);

    transform:translateY(-2px);

    box-shadow:0 12px 30px rgba(37,99,235,.30);

}

.btn-block {
    display: block;
    width: 100%;
}

/* ==========================================
BUTTON AUTO (UNTUK PANEL ADMIN)
========================================== */

.btn-auto{

    width:auto;

    display:inline-flex;

    align-items:center;

    justify-content:center;

    padding:10px 18px;

    font-size:15px;

}

/* ======================================================
ALERT
====================================================== */

.alert {
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 18px;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* ======================================================
FOOTER
====================================================== */

.login-register,
.login-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-light);
}

/* ======================================================
TABLE
====================================================== */

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: #eef4ff;
}

/* ======================================================
BADGE
====================================================== */

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.badge-primary {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* ======================================================
ROLE BADGE
====================================================== */

.role-badge{

display:inline-flex;

align-items:center;

justify-content:center;

gap:8px;

padding:10px 18px;

margin:12px auto 20px;

border-radius:999px;

font-size:15px;

font-weight:600;

border:1px solid;

}

.login-card .role-badge{

display:flex;

}

/* ----------------------------
DOSEN / GURU
---------------------------- */

.role-dosen{

background:#eef4ff;

border-color:#bfd7ff;

color:#2563eb;

}

/* ----------------------------
MAHASISWA / SISWA
---------------------------- */

.role-mahasiswa{

background:#ecfdf5;

border-color:#bbf7d0;

color:#16a34a;

}

/* ======================================================
UTILITY
====================================================== */

.text-center {
    text-align: center;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* ======================================================
ROLE SELECT
====================================================== */

.alert-info{
    background:#eaf3ff;
    color:#1d4ed8;
}

.role-select{
    display:flex;
    flex-direction:column;
    gap:14px;
    margin-top:25px;
}

.role-card{

display:block;

padding:24px;

background:#fff;

border:2px solid #dbeafe;

border-radius:18px;

box-shadow:0 10px 30px rgba(0,0,0,.08);

transition:.25s;

text-align:center;

color:var(--text);

}

.role-card:hover{

text-decoration:none;

border-color:var(--primary);

transform:translateY(-4px);

box-shadow:0 18px 40px rgba(37,99,235,.18);

}

.role-icon{
    font-size:34px;
    margin-bottom:12px;
}

.role-card h3{
    font-size:20px;
    margin-bottom:6px;
}

.role-card p{
    margin:0;
    color:var(--text-light);
    line-height:1.5;
    font-size:14px;
}

.role-button{

display:inline-block;

margin-top:18px;

padding:12px 26px;

border-radius:40px;

background:var(--primary);

color:#fff;

font-weight:700;

font-size:15px;

transition:.25s;

}

.role-card:hover .role-button{

background:var(--primary-dark);

}

/* ======================================================
RESPONSIVE
====================================================== */

@media (max-width: 768px) {
    .login-card {
    max-width: 100%;
    padding: 28px;
}

.login-title{
    font-size:26px;
}

.login-subtitle{
    font-size:18px;
    line-height:1.3;
    margin:6px 0 22px;
}

    .login-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

.role-card{
    padding:16px;
}

.role-icon{
    font-size:32px;
}

.role-card h3{
    font-size:18px;
}

.role-card p{
    font-size:13px;
    line-height:1.45;
}

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ======================================================
NAVBAR
====================================================== */

/* disiapkan */

/* ======================================================
SIDEBAR
====================================================== */

/* disiapkan */

/* ======================================================
STAT CARD
====================================================== */

/* disiapkan */

/* ======================================================
AUTOCOMPLETE INSTITUTION
====================================================== */

.institution-list{

display:none;
margin-top:8px;
background:#fff;
border:1px solid #dbe3ec;
border-radius:12px;
box-shadow:0 8px 25px rgba(0,0,0,.08);
overflow:hidden;

}

.institution-item{

padding:14px 16px;
cursor:pointer;
transition:.2s;

}

.institution-item:hover{

background:#eef4ff;

}

.institution-empty{

padding:16px;
text-align:center;
color:#666;

}

.institution-add{

padding:14px;
background:#2563eb;
color:#fff;
cursor:pointer;
text-align:center;
font-weight:600;

}

.institution-add:hover{

background:#1d4ed8;

}

/* ===================================================
   ACTION BUTTONS
=================================================== */

.action-buttons{

    display:flex;

    justify-content:center;

    align-items:center;

    gap:6px;

    flex-wrap:wrap;

}

.action-buttons .btn{

    min-width:34px;

    padding:6px 8px;

}

.btnMove{

    font-weight:bold;

    width:34px;

}

.btnEdit{

    background:#2563eb;

}

.btnDanger{

    background:#dc2626;

}

/* =====================================================
   MOBILE EXAMS CARD
===================================================== */

@media (max-width:768px){

.table{
    border:0;
}

.table thead{
    display:none;
}

.table,
.table tbody,
.table tr,
.table td{
    display:block;
    width:100%;
}

.table tr{

    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:14px;
    margin-bottom:18px;
    padding:16px;
    box-shadow:0 6px 18px rgba(0,0,0,.06);

}

.table td{

    display:flex;
    justify-content:space-between;
    align-items:flex-start;

    padding:10px 0;
    border:none;

}

.table td::before{

    font-weight:700;
    color:#374151;
    flex:0 0 42%;
    padding-right:10px;

}

.table td:nth-child(1)::before{
    content:"Mata Kuliah";
}

.table td:nth-child(2)::before{
    content:"Kelas";
}

.table td:nth-child(3)::before{
    content:"Tanggal";
}

.table td:nth-child(4)::before{
    content:"Jenis";
}

.table td:nth-child(5)::before{
    content:"Soal";
}

.table td:nth-child(6)::before{
    content:"Peserta";
}

.table td:nth-child(7)::before{
    content:"Durasi";
}

.table td:nth-child(8)::before{
    content:"Status";
}

.table td:nth-child(9)::before{
    content:"Sesi";
}

.table td:nth-child(10)::before{
    content:"Aksi";
}

.exam-actions{

    width:100%;
    display:flex;
    flex-direction:column;
    gap:10px;

}

.exam-actions a{

    width:100%;
    text-align:center;

}

}

.exam-actions{

display:flex;

flex-direction:column;

gap:8px;

align-items:flex-start;

}

.action-link{

display:inline-flex;

align-items:center;

gap:5px;

font-size:14px;

font-weight:500;

text-decoration:none;

}

.btn-soal{

min-width:120px;

justify-content:center;

font-weight:600;

}

/* =====================================================
   MOBILE EXAMS
===================================================== */

.desktop-table{
    display:block;
}

.mobile-exams{
    display:none;
}

@media(max-width:768px){

.desktop-table{
    display:none;
}

.mobile-exams{
    display:block;
}

}

.exam-card{

    background:#fff;

    border-radius:16px;

    padding:18px;

    margin-bottom:18px;

    box-shadow:0 4px 15px rgba(0,0,0,.08);

}

.exam-card-header{

    margin-bottom:18px;

    padding-bottom:14px;

    border-bottom:1px solid #ececec;

}

.exam-card-title{

    font-size:18px;

    font-weight:700;

    color:#111827;

    line-height:1.4;

}

.exam-card-class{

    margin-top:6px;

    color:#6b7280;

    font-size:16px;
    
    font-weight:700;

}

.exam-card-grid{

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:14px;

}

.exam-card-grid small{

    display:block;

    color:#6b7280;

    font-size:12px;

    margin-bottom:4px;

}

.exam-card-grid strong{

    font-size:15px;

    color:#111827;

}

.exam-card-badges{

    display:flex;

    gap:10px;

    flex-wrap:wrap;

    margin-top:18px;

    padding-top:15px;

    border-top:1px solid #ececec;

}

.exam-card-actions{

display:grid;

grid-template-columns:repeat(3,1fr);

gap:10px;

margin-top:18px;

}

.exam-card-actions .btn{

text-align:center;

padding:10px;

border-radius:10px;

font-size:14px;

font-weight:600;

}

.exam-card-actions .btn-danger{

background:#ef4444;

color:#fff;

}

.exam-card-actions .btn-light{

background:#f3f4f6;

color:#111827;

border:1px solid #ddd;

}

.exam-card-subtitle{
    color:#4b5563;
    font-size:17px;
    font-weight:500;
    margin-top:6px;
}

.exam-card-grid small{
    display:block;
    color:#6b7280;
    font-size:14px;
    font-weight:500;
    margin-bottom:6px;
}

.exam-card-grid strong{
    font-size:17px;
    font-weight:700;
    color:#111827;
    line-height:1.35;
}