
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 500px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    text-align: center;
}

h1 {
    color: #4a5568;
    font-weight: 700;
    margin-bottom: 25px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input, select {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

button {
    padding: 15px;
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

button:hover {
    background-color: #5a67d8;
    transform: translateY(-2px);
}

.error-message {
    color: #e53e3e;
    font-size: 14px;
    margin-top: -10px;
    text-align: left;
}

/* Room Page Styles */
.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.room {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.room:hover {
    border-color: #9fa6b2;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.room.selected {
    border-color: #667eea;
    background-color: #eef2ff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.room-number {
    font-size: 24px;
    font-weight: 700;
    color: #4a5568;
}

.room-capacity {
    font-size: 14px;
    color: #718096;
    margin-top: 5px;
}

.room-students {
    margin-top: 15px;
    font-size: 14px;
    color: #4a5568;
    text-align: left;
}

.student-list {
    list-style: none;
    padding: 0;
    margin-top: 5px;
}

.student-list li {
    padding: 3px 0;
}

.refresh-btn {
    margin-bottom: 20px;
}

.fixed-message {
    background-color: #c6f6d5;
    color: #2f855a;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.fixed-student .room-grid .room {
    pointer-events: none; /* Disable clicks on rooms */
    opacity: 0.6; /* Visually indicate disabled state */
    cursor: not-allowed;
}

.fixed-student-in-room {
    font-weight: bold;
    color: #2f855a; /* A green color to indicate fixed */
}

.room-capacity-details p {
    margin: 5px 0;
    font-size: 14px;
    color: #4a5568;
}

.room-capacity-details ul {
    list-style: none;
    padding-left: 15px;
    margin: 5px 0 10px 0;
}

.room-capacity-details ul li {
    font-size: 13px;
    color: #667eea;
}

.room-capacity-details .fixed-list li {
    color: #2f855a; /* Green for fixed students */
    font-weight: bold;
}

.room-capacity-details .temp-list li {
    color: #f6ad55; /* Orange for temporary students */
}

/* Admin Panel Styles */
.admin-controls {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.freeze-btn {
    background-color: #28a745 !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: background-color 0.3s !important;
}

.freeze-btn:hover {
    opacity: 0.9 !important;
}

.table-controls {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.filters-section h3 {
    margin-top: 0;
    color: #4a5568;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 5px;
}

.filter-group select, .filter-group input[type="text"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.results-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.summary-stats span {
    font-size: 14px;
    font-weight: 500;
    margin-right: 15px;
    color: #4a5568;
}

.pagination-controls label {
    font-size: 14px;
    color: #4a5568;
    margin-right: 5px;
}

.pagination-controls select {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

#assignment-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#assignment-table th, #assignment-table td {
    border: 1px solid #e2e8f0;
    padding: 12px;
    text-align: left;
}

#assignment-table th {
    background-color: #f8fafc;
    font-weight: 600;
    cursor: pointer;
}

#assignment-table th.sortable:hover {
    background-color: #edf2f7;
}

.fixed-row {
    background-color: #ebf8ff;
}

.action-btn {
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 6px;
}

.fix-btn {
    background-color: #48bb78;
    color: white;
    border: none;
}

.unfix-btn {
    background-color: #f6ad55;
    color: white;
    border: none;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 10px;
}

.pagination button {
    padding: 8px 15px;
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.pagination button:disabled {
    background-color: #a0aec0;
    cursor: not-allowed;
}

.pagination span {
    font-size: 14px;
    color: #4a5568;
}

.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    opacity: 0;
    animation: fadeInOut 4s ease-in-out;
}

.notification.info {
    background-color: #4299e1;
}

.notification.success {
    background-color: #48bb78;
}

.notification.warning {
    background-color: #f6ad55;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; transform: translate(-50%, -20px); }
    10%, 90% { opacity: 1; transform: translate(-50%, 0); }
}
