/* File: admin/admin_style.css */

body {
    font-family: 'Sarabun', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
}

/* --- Login Page Styles --- */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-form {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
}

.login-form h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.login-form p {
    text-align: center;
    margin-bottom: 20px;
    color: #666;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.login-form button {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-form button:hover {
    background-color: #0056b3;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

.credentials-info {
    margin-top: 20px;
    padding: 15px;
    background-color: #e9ecef;
    border-radius: 4px;
    text-align: center;
    font-size: 0.9rem;
}
.credentials-info p {
    margin: 5px 0;
    color: #495057;
}

/* --- Admin Dashboard Styles --- */
.admin-container {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.admin-header h1 {
    margin: 0;
}

.admin-header .logout-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #dc3545;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.admin-header .logout-btn:hover {
    background-color: #c82333;
}

.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}
.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.admin-section {
    margin-bottom: 40px;
}

.admin-section h2 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Upload Form */
.upload-form {
    background: #f8f9fa;
    padding: 20px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
}

.upload-form p {
    margin-top: 0;
}

.upload-form input[type="file"] {
    margin-bottom: 15px;
}

.upload-form button {
    padding: 10px 25px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}
.upload-form button:hover {
    background-color: #218838;
}

.upload-instructions {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.upload-instructions p {
    margin: 0 0 10px 0;
}

.download-btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: #6c757d;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.download-btn:hover {
    background-color: #5a6268;
    color: #fff;
}

/* Students Table */
.students-table {
    width: 100%;
    border-collapse: collapse;
}

.students-table th, .students-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.students-table thead {
    background-color: #e9ecef;
}

.students-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.no-students {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
}
