body {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    font-size: 20px;
    line-height: 1.6;
    background-color: #f4f4f4;
    margin: 0;
    padding: 20px;
    padding-bottom: 80px; /* Space for fixed footer */
    direction: rtl;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.form-panel {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    border: 2px solid #007bff;
    margin-bottom: 35px;
    text-align: center;
}

.form-panel button {
    display: inline-block;
    margin: 0 10px;
}

.form-button {
    width: 200px;
    height: 50px;
    padding: 10px 20px;
    margin: 10px;
    font-size: 18px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.stats-panel {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #17a2b8;
    margin-bottom: 35px;
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 3px;
}

.stat-box {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.stat-box h3 {
    margin: 0 0 5px 0;
    color: #17a2b8;
    font-size: 14px;
    white-space: nowrap;
}

.stat-box p {
    margin: 0;
    font-size: 22px;
    font-weight: bold;
    color: #333;
    white-space: nowrap;
}

.table-panel {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    border: 2px solid #28a745;
    margin-bottom: 35px;
}

#loading {
    font-size: 18px;
    color: #007bff;
}

/* Toast Notification Styles */
.toast {
    position: fixed;
    top: 20px;
    right: -400px; /* Start off-screen */
    width: 350px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-weight: bold;
    font-size: 16px;
    z-index: 10000;
    transition: right 0.5s ease-in-out;
    direction: rtl;
    text-align: right;
}

.toast.show {
    right: 20px; /* Slide in from right */
}

.toast.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.toast.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.toast.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.toast.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

h1 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 30px;
}

h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 22px;
    font-weight: bold;
    text-align: right;
}

input, select {
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
    font-size: 20px;
    border: 2px solid #ccc;
    border-radius: 5px;
    text-align: right;
}

input:focus, select:focus {
    border-color: #28a745;
}

button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 14px 24px;
    cursor: pointer;
    width: auto;
    font-size: 20px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

button:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

#showFormBtn {
    background-color: #007bff;
    margin-bottom: 20px;
}

#showFormBtn:hover {
    background-color: #0056b3;
}

#cancelBtn {
    background-color: #dc3545;
    margin-top: 10px;
}

#cancelBtn:hover {
    background-color: #c82333;
}

.edit-btn, .delete-btn {
    border: none;
    padding: 10px 16px;
    margin: 0 5px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    display: inline-block;
}

.edit-btn {
    background-color: #ffc107;
    color: black;
}

.edit-btn:hover {
    background-color: #e0a800;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
}

.delete-btn:hover {
    background-color: #c82333;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    font-size: 20px;
}

th, td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: right;
}

th {
    background-color: #f2f2f2;
    font-size: 22px;
}

/* Custom Modal Styles */
#deleteModal {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

#deleteModal h3 {
    margin: 0 0 25px 0;
    color: #dc3545;
    font-size: 28px;
    font-weight: bold;
}

#deleteModal p {
    margin: 0 0 35px 0;
    font-size: 20px;
    color: #333;
    line-height: 1.6;
}

#confirmDeleteBtn, #cancelDeleteBtn {
    padding: 14px 32px;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

#confirmDeleteBtn {
    background-color: #dc3545;
    color: white;
}

#confirmDeleteBtn:hover {
    background-color: #c82333;
    transform: translateY(-2px);
}

#cancelDeleteBtn {
    background-color: #6c757d;
    color: white;
}

#cancelDeleteBtn:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}
.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    align-items: center;
}

#searchInput, #classFilter {
    padding: 12px;
    font-size: 18px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#searchInput {
    flex: 1;
}

#classFilter {
    width: 200px;
}
#attendanceBtn {
    background-color: #17a2b8;
    margin-bottom: 20px;
}

#attendanceBtn:hover {
    background-color: #138496;
}

#messagesBtn {
    background-color: #17a2b8;
    margin-bottom: 20px;
}

#messagesBtn:hover {
    background-color: #138496;
}

#deleteAllMessagesBtn {
    background-color: #dc3545;
    margin-bottom: 20px;
}

#deleteAllMessagesBtn:hover {
    background-color: #c82333;
}

#attendanceModal {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

#attendanceModal h3 {
    margin: 0 0 20px 0;
    color: #17a2b8;
    font-size: 24px;
    font-weight: bold;
}

#attendanceModal label {
    font-size: 18px;
    font-weight: bold;
}

#attendanceModal input[type="date"] {
    border: 1px solid #ccc;
    border-radius: 5px;
}

#attendanceList {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 5px;
    background: #f9f9f9;
}

#studentTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 18px;
}

#studentTable th, #studentTable td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: right;
}

#studentTable th {
    background-color: #f2f2f2;
    font-weight: bold;
}

#studentTable input[type="checkbox"] {
    transform: scale(1.2);
    cursor: pointer;
}

.student-search input {
    padding: 12px 12px 12px 40px;
    font-size: 18px;
    border: 2px solid #ccc;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
}

.student-search span {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #999;
    pointer-events: none;
}

#attendanceList div {
    margin-bottom: 10px;
    text-align: right;
}

#attendanceList label {
    font-size: 16px;
    margin-right: 10px;
}

#saveAttendanceBtn, #cancelAttendanceBtn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

#saveAttendanceBtn {
    background-color: #17a2b8;
    color: white;
}

#saveAttendanceBtn:hover {
    background-color: #138496;
    transform: translateY(-2px);
}

#cancelAttendanceBtn {
    background-color: #6c757d;
    color: white;
}

#cancelAttendanceBtn:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}
/* Attendance page specific button styles */
#backBtn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 18px;
    border-radius: 5px;
    transition: all 0.3s ease;
    width: 200px;
    margin-top: -10px;
}

#backBtn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

#deleteAllBtn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 18px;
    border-radius: 5px;
    transition: all 0.3s ease;
    width: auto;
}

#deleteAllBtn:hover {
    background-color: #c82333;
    transform: translateY(-2px);
}

.delete-attendance-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.delete-attendance-btn:hover {
    background-color: #c82333;
    transform: translateY(-2px);
}

.edit-grade-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.edit-grade-btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.submit-btn {
    width: 200px;
}

/* Send Message Modal Styles */
#sendMessageModal {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

#sendMessageModal h3 {
    margin: 0 0 20px 0;
    color: #007bff;
    font-size: 24px;
    font-weight: bold;
}

#sendMessageModal label {
    font-size: 18px;
    font-weight: bold;
}

#sendMessageModal input[type="radio"] {
    margin-left: 10px;
}

#sendMessageModal textarea {
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

#sendMessageModal select {
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

#sendMessageModal button[type="submit"], #cancelMessageBtn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

#sendMessageModal button[type="submit"] {
    background-color: #007bff;
    color: white;
}

#sendMessageModal button[type="submit"]:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

#cancelMessageBtn {
    background-color: #6c757d;
    color: white;
}

#cancelMessageBtn:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

.accept-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    transition: all 0.3s ease;
    margin: 0 2px;
}

.accept-btn:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

.suspend-btn {
    background-color: #ffc107;
    color: black;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    transition: all 0.3s ease;
    margin: 0 2px;
}

.suspend-btn:hover {
    background-color: #e0a800;
    transform: translateY(-2px);
}

/* Book Card Styles */
.book-card {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.book-card:hover {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.book-card h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #007bff;
}

.book-card p {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
}

.request-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.request-btn:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

/* Request Modal Styles */
#requestModal {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

#requestModal h3 {
    margin: 0 0 20px 0;
    color: #007bff;
    font-size: 24px;
    font-weight: bold;
}

#requestModal label {
    font-size: 18px;
    font-weight: bold;
}

#requestModal input {
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

#requestModal button[type="submit"], #cancelRequestBtn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

#requestModal button[type="submit"] {
    background-color: #007bff;
    color: white;
}

#requestModal button[type="submit"]:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

#cancelRequestBtn {
    background-color: #6c757d;
    color: white;
}

#cancelRequestBtn:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

/* Mobile Responsiveness */
@media (max-width: 1200px) {
    .stat-box {
        padding: 12px;
    }
    .stat-box h3 {
        font-size: 16px;
    }
    .stat-box p {
        font-size: 20px;
    }
    .stats-panel {
        gap: 2px;
    }
}

@media (max-width: 900px) {
    .stat-box {
        padding: 8px;
    }
    .stat-box h3 {
        font-size: 14px;
    }
    .stat-box p {
        font-size: 18px;
    }
    .stats-panel {
        gap: 1px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
        padding: 0;
        padding-bottom: 80px;
    }

    .container {
        padding: 0;
        max-width: 100%;
    }

    .form-panel {
        padding: 10px;
        margin-bottom: 10px;
    }

    .form-panel button {
        display: block;
        width: 100%;
        margin: 5px 0;
        font-size: 16px;
        padding: 12px;
    }

    .form-button {
        width: 100%;
        margin: 5px 0;
        font-size: 16px;
        padding: 12px;
    }

    .stats-panel {
        padding: 10px;
        margin-bottom: 10px;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        justify-items: center;
    }

    .stat-box {
        min-width: 120px;
        padding: 15px;
    }
    .stat-box h3 {
        font-size: 14px;
    }
    .stat-box p {
        font-size: 18px;
    }
    .stat-box h3 {
        font-size: 16px;
    }
    .stat-box p {
        font-size: 20px;
    }

    .stat-box h3 {
        font-size: 16px;
    }

    .stat-box p {
        font-size: 20px;
    }

    .table-panel {
        padding: 10px;
        margin-bottom: 10px;
    }

    h1 {
        font-size: 28px;
        margin-bottom: 20px;
    }

    h2 {
        font-size: 24px;
        margin-bottom: 15px;
    }

    label {
        font-size: 18px;
    }

    input, select {
        font-size: 16px;
        padding: 10px;
    }

    button {
        font-size: 16px;
        padding: 12px 20px;
    }

    table {
        font-size: 14px;
        width: 100%;
    }

    thead {
        display: none;
    }

    tbody {
        display: block;
    }

    tr {
        display: block;
        border: 1px solid #ddd;
        margin-bottom: 10px;
        padding: 10px;
    }

    td {
        display: block;
        text-align: right;
        padding: 5px 0;
        border: none;
    }

    td:before {
        content: attr(data-label) ": ";
        font-weight: bold;
        display: inline-block;
        width: 100px;
    }

    .filters {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    #searchInput, #classFilter {
        width: 100%;
        flex: none;
    }

    #backBtn {
        width: 100%;
        margin: 5px 0;
    }

    #deleteAllBtn, #deleteAllAbsenceBtn {
        width: 100%;
        margin: 5px 0;
    }

    .edit-btn, .delete-btn, .delete-absence-btn {
        padding: 8px 12px;
        font-size: 14px;
        margin: 2px;
    }

    .accept-btn, .suspend-btn {
        padding: 8px 12px;
        font-size: 14px;
        margin: 2px;
    }

    /* Modal adjustments */
    #deleteModal div, #addStudentModal div, #messageSuccessModal div, #sendMessageModal div, #deleteBookModal div, #bookModal div {
        width: 95%;
        max-width: none;
        padding: 20px;
    }

    #deleteModal h3, #addStudentModal h3, #messageSuccessModal h3, #sendMessageModal h3, #deleteBookModal h3, #bookModal h3 {
        font-size: 20px;
    }

    #deleteModal p, #addStudentModal p, #messageSuccessModal p, #sendMessageModal p, #deleteBookModal p, #bookModal p {
        font-size: 16px;
    }

    #confirmDeleteBtn, #cancelDeleteBtn, #confirmDeleteBookBtn, #cancelDeleteBookBtn {
        padding: 10px 20px;
        font-size: 14px;
    }

    /* Specific for admin2.html */
    #studentTable {
        font-size: 14px;
    }

    #studentTable th, #studentTable td {
        padding: 8px;
    }

    /* Specific for admin3.html */
    #messagesTable {
        font-size: 14px;
    }

    #messagesTable th, #messagesTable td {
        padding: 8px;
    }

    /* Specific for admin4.html */
    #booksTable, #requestsTable, #approvedRequestsTable {
        font-size: 14px;
    }

    #booksTable th, #booksTable td, #requestsTable th, #requestsTable td, #approvedRequestsTable th, #approvedRequestsTable td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
        padding: 0;
        padding-bottom: 80px;
    }

    .container {
        padding: 0;
    }

    .form-panel, .table-panel {
        padding: 5px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    label {
        font-size: 16px;
    }

    input, select {
        font-size: 14px;
        padding: 8px;
    }

    button {
        font-size: 14px;
        padding: 10px 15px;
    }

    table {
        font-size: 12px;
    }

    thead {
        display: none;
    }

    tbody {
        display: block;
    }

    tr {
        display: block;
        border: 1px solid #ddd;
        margin-bottom: 10px;
        padding: 10px;
    }

    td {
        display: block;
        text-align: right;
        padding: 5px 0;
        border: none;
    }

    td:before {
        content: attr(data-label) ": ";
        font-weight: bold;
        display: inline-block;
        width: 80px;
    }

    th, td {
        padding: 6px;
        min-width: 80px;
    }

    .edit-btn, .delete-btn, .delete-absence-btn, .accept-btn, .suspend-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Footer Styles */
.footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 10px 15px;
    border-top: 3px solid #007bff;
    font-size: 16px;
    margin-top: 20px;
    direction: rtl;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-left {
    flex: 1;
    text-align: right;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background-color: #28a745;
    border-radius: 50%;
}

.footer-developer {
    font-size: 14px;
    color: #ccc;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: right;
    }

    .footer-left, .footer-right {
        text-align: initial;
    }
}

