/* --- Global Styles --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #0056b3;
    text-align: center;
    margin-bottom: 20px;
}

/* --- Login Page Styles --- */
.login-container {
    width: 350px;
    margin: 100px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-container h2 {
    margin-bottom: 25px;
    color: #333;
}

.login-container label {
    display: block;
    text-align: left;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Ensures padding doesn't affect width */
}

.login-container button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 4px;
    background-color: #007bff;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-container button:hover {
    background-color: #0056b3;
}


/* --- Main Table Styles (Admin, User, Public) --- */
table {
    width: 100%;
    border-collapse: collapse; /* Removes space between borders */
    margin-top: 20px;
    font-size: 14px;
}

table th,
table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

table th {
    background-color: #007bff;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
}

/* Alternating row colors for better readability */
table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tbody tr:hover {
    background-color: #f1f1f1;
}

/* Style for specific columns */
table td:nth-child(1), /* No */
table td:nth-child(2) { /* Semester */
    width: 50px;
}

table td:nth-child(3), /* Nama Mata Kuliah */
table td:nth-child(4) { /* Nama Dosen */
    text-align: left;
}

table td:last-child {
    font-weight: bold;
    background-color: #e9ecef;
}

/* --- Checkbox Styling --- */
.kehadiran-checkbox {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

/* --- Public View Specific Styles --- */
.hadir {
    background-color: #d4edda; /* Light green */
    color: #155724;
    font-weight: bold;
}

.absen {
    background-color: #f8d7da; /* Light red */
    color: #721c24;
}

/* --- Header Paragraph and Logout Link --- */
p {
    text-align: center;
    font-size: 16px;
    margin-bottom: 25px;
    color: #555;
}

p a {
    color: #dc3545;
    text-decoration: none;
    font-weight: bold;
    margin-left: 15px;
}

p a:hover {
    text-decoration: underline;
}