* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background: #1e293b;
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar h1 { font-size: 20px; }
.navbar .user-info { display: flex; align-items: center; gap: 15px; font-size: 14px; }

/* Container & Grid */
.container {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
}

.login-box {
    max-width: 400px;
    margin: 80px auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Card */
.card {
    background: white;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Form Elements */
.form-group { margin-bottom: 15px; }
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; color: #475569; }
input[type="text"], input[type="password"], select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    transition: border 0.2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #2563eb; }
input[type="file"] { padding: 8px; background: #f8fafc; border: 1px dashed #94a3b8; width: 100%; border-radius: 6px; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s;
}
.btn-primary { background: #2563eb; color: white; width: 100%; }
.btn-primary:hover { background: #1d4ed8; }
.btn-success { background: #10b981; color: white; padding: 6px 12px; font-size: 13px; }
.btn-success:hover { background: #059669; }
.btn-danger { background: #ef4444; color: white; padding: 6px 12px; font-size: 13px; }
.btn-danger:hover { background: #dc2626; }
.btn-logout { background: #ef4444; color: white; padding: 6px 12px; border-radius: 5px; text-decoration: none; font-size: 13px; }

/* Badges & Alerts */
.badge { padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: bold; color: white; }
.badge-materi { background: #0ea5e9; }
.badge-tugas { background: #f59e0b; }
.alert { padding: 12px 15px; border-radius: 6px; margin-bottom: 20px; font-size: 14px; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* File Lists & Tables */
.file-list { list-style: none; margin-top: 15px; }
.file-list li {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 10px 15px;
    margin-bottom: 8px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.submission-box {
    background: #f8fafc;
    border-left: 4px solid #f59e0b;
    padding: 15px;
    margin-top: 15px;
    border-radius: 0 6px 6px 0;
}

table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; }
th, td { padding: 10px; text-align: left; border-bottom: 1px solid #e2e8f0; }
th { background: #f1f5f9; color: #475569; }

/* =========================================
   RESPONSIF UNTUK LAYAR HP (MOBILE)
   ========================================= */
/* Tombol Lihat File & Pembungkus Tombol */
.btn-info {
    background: #0284c7;
    color: white;
    padding: 6px 12px;
    font-size: 13px;
}
.btn-info:hover {
    background: #0369a1;
}

.file-actions {
    display: flex;
    gap: 8px;
}

/* =========================================
   RESPONSIF UNTUK LAYAR HP (MOBILE)
   ========================================= */
@media screen and (max-width: 768px) {
    /* Navbar menumpuk rapi ke bawah di layar HP */
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 20px;
        gap: 12px;
    }

    .navbar h1 {
        font-size: 18px;
    }

    .navbar .user-info {
        flex-wrap: wrap;
        width: 100%;
        gap: 8px;
    }

    /* Kurangi jarak tepi agar konten lebih lega */
    .container {
        margin: 15px auto;
        padding: 0 12px;
    }

    .card {
        padding: 16px;
    }

    .login-box {
        margin: 30px 15px;
        padding: 20px;
    }

    /* Daftar file di HP: nama file di atas, tombol Lihat & Unduh sejajar di bawah */
    .file-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .file-actions {
        width: 100%;
    }

    .file-actions .btn {
        flex: 1;
        text-align: center;
    }

    /* Tabel pengumpulan tugas & admin bisa digeser (scroll) ke samping */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
