body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

.login-container {
    width: 300px;
    margin: 100px auto;
    padding: 20px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-container h2 {
    margin-bottom: 20px;
}

.login-container label {
    display: block;
    margin: 10px 0 5px;
}

.login-container input {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.login-container button {
    width: 100%;
    padding: 10px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.login-container button:hover {
    background-color: #555;
}

/* student/dashboard */
/* تنسيق الجداول */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

th {
    background-color: #333;
    color: white;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

section {
    margin-bottom: 40px;
}

h2 {
    color: #333;
}

/* teacher dashboard */
/* تنسيق الجداول */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

th {
    background-color: #333;
    color: white;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

section {
    margin-bottom: 40px;
}

h2 {
    color: #333;
}

/* add subject */
.message.error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
}

label {
    font-weight: bold;
}

input, select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    padding: 10px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #555;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: #333;
    text-decoration: none;
}

/* timetable*/
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 20px 0;
}

h3 {
    margin-top: 20px;
    color: #333;
}


/*________________________________________________________________________________________________________*/

/* home page login */
/* css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: #f9f9f9;
    direction: rtl;
    text-align: right;
}

/* تنسيقات صفحة تسجيل الدخول */
body.login-page {
    background: linear-gradient(135deg, #007bff 0%, #00c6ff 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.login-container {
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
    animation: fadeIn 1s ease-in-out;
}

.login-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    display: block;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    animation: bounceIn 1s ease-in-out;
}

.login-container h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8em;
    animation: slideIn 0.8s ease-out;
}

.login-container p {
    color: #dc3545;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.login-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-container label {
    font-weight: 700;
    color: #333;
    font-size: 1em;
}

.login-container input[type="text"],
.login-container input[type="password"],
.login-container input[type="email"] {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Cairo', sans-serif;
    font-size: 1em;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.login-container input[type="text"]:focus,
.login-container input[type="password"]:focus,
.login-container input[type="email"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

.login-container button {
    padding: 12px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-family: 'Cairo', sans-serif;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.login-container button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.forgot-password-link {
    display: inline-block;
    margin-top: 15px;
    color: #007bff;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.forgot-password-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* تنسيقات صفحة نسيت كلمة المرور */
body.forgot-password-page {
    background: linear-gradient(135deg, #007bff 0%, #00c6ff 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

/* تأثيرات حركية */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* تنسيقات متجاوبة لصفحة تسجيل الدخول ونسيت كلمة المرور */
@media (max-width: 768px) {
    .login-container {
        padding: 30px;
        max-width: 350px;
    }

    .login-container h2 {
        font-size: 1.5em;
    }

    .login-logo {
        width: 80px;
        height: 80px;
    }

    .login-container input[type="text"],
    .login-container input[type="password"],
    .login-container input[type="email"],
    .login-container button {
        font-size: 0.9em;
        padding: 10px;
    }

    .forgot-password-link {
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 20px;
        max-width: 300px;
    }

    .login-container h2 {
        font-size: 1.2em;
    }

    .login-logo {
        width: 60px;
        height: 60px;
    }

    .login-container input[type="text"],
    .login-container input[type="password"],
    .login-container input[type="email"],
    .login-container button {
        font-size: 0.8em;
        padding: 8px;
    }

    .forgot-password-link {
        font-size: 0.7em;
    }
}

/* تنسيقات الصفحات الأخرى (مثل الـ Dashboard) */
.container {
    margin-right: 270px;
    padding: 20px;
    margin-top: 70px;
    transition: margin-right 0.3s ease;
}

.container.full-width {
    margin-right: 0;
}

main {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

h2, h3 {
    color: #333;
    margin-bottom: 20px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

label {
    font-weight: 700;
    color: #333;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="file"],
select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Cairo', sans-serif;
    font-size: 1em;
    outline: none;
    transition: border-color 0.3s ease;
    width: 100%;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="file"]:focus,
select:focus {
    border-color: #007bff;
}

select[multiple] {
    height: 120px;
}

button {
    padding: 10px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-family: 'Cairo', sans-serif;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

.message {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
}

.back-link, .add-link {
    display: inline-block;
    margin-top: 20px;
    margin-left: 10px;
    color: #007bff;
    text-decoration: none;
    font-family: 'Cairo', sans-serif;
}

.back-link:hover, .add-link:hover {
    text-decoration: underline;
}

/* تنسيقات الجدول */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-family: 'Cairo', sans-serif;
}

th, td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

th {
    background-color: #f2f2f2;
    font-weight: 700;
    color: #333;
}

td {
    color: #555;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f1f1f1;
}

/* تنسيقات نموذج البحث */
.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.search-form label {
    margin-bottom: 5px;
    font-size: 0.9em;
}

.search-form input[type="text"],
.search-form select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.9em;
    width: 200px;
}

.search-form button {
    padding: 8px 15px;
    font-size: 0.9em;
}

/* تنسيقات الأزرار في الجدول */
.edit-link, .delete-link {
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 5px;
    color: #fff;
    margin: 0 5px;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.edit-link {
    background-color: #007bff;
}

.edit-link:hover {
    background-color: #0056b3;
}

.delete-link {
    background-color: #dc3545;
}

.delete-link:hover {
    background-color: #b02a37;
}

/* تنسيقات الـ Dashboard */
.dashboard-welcome {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.dashboard-card i {
    font-size: 2em;
    color: #007bff;
    margin-bottom: 10px;
}

.dashboard-card h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.dashboard-card p {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 15px;
}

.dashboard-card a {
    text-decoration: none;
    color: #007bff;
    font-weight: 700;
    transition: color 0.3s ease;
}

.dashboard-card a:hover {
    color: #0056b3;
}

/* تنسيقات الرسوم البيانية */
.dashboard-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.chart-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.chart-container h3 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.chart-container canvas {
    max-width: 100%;
    height: auto;
}

/* تنسيقات متجاوبة للصفحات الأخرى */
@media (max-width: 1024px) {
    .container {
        margin-right: 0;
        padding: 15px;
    }

    .sidebar {
        transform: translateX(100%);
    }

    .container.full-width {
        margin-right: 0;
    }

    main {
        padding: 15px;
    }

    .search-form input[type="text"],
    .search-form select {
        width: 150px;
    }

    .dashboard-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .dashboard-charts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar .logo span {
        font-size: 1.2em;
    }

    .navbar .search-bar {
        max-width: 200px;
    }

    .navbar .user-btn {
        font-size: 0.9em;
    }

    main {
        padding: 10px;
    }

    h2, h3 {
        font-size: 1.2em;
    }

    .search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form input[type="text"],
    .search-form select {
        width: 100%;
    }

    .search-form button {
        width: 100%;
    }

    table {
        font-size: 0.9em;
    }

    th, td {
        padding: 8px;
    }

    .table-wrapper {
        overflow-x: auto;
    }

    .dashboard-welcome {
        font-size: 1.2em;
    }

    .dashboard-card {
        padding: 15px;
    }

    .dashboard-card i {
        font-size: 1.5em;
    }

    .dashboard-card h3 {
        font-size: 1em;
    }

    .dashboard-card p {
        font-size: 1.2em;
    }

    .chart-container {
        padding: 15px;
    }

    .chart-container h3 {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 8px 10px;
    }

    .navbar .logo img {
        width: 30px;
        height: 30px;
    }

    .navbar .logo span {
        font-size: 1em;
    }

    .navbar .search-bar {
        display: none; /* إخفاء شريط البحث على الشاشات الصغيرة */
    }

    .navbar .user-btn {
        font-size: 0.8em;
    }

    .container {
        padding: 10px;
        margin-top: 60px;
    }

    main {
        padding: 8px;
    }

    h2, h3 {
        font-size: 1em;
    }

    table {
        font-size: 0.8em;
    }

    th, td {
        padding: 6px;
    }

    .edit-link, .delete-link {
        padding: 4px 8px;
        font-size: 0.8em;
    }

    .dashboard-welcome {
        font-size: 1em;
    }

    .dashboard-card {
        padding: 10px;
    }

    .dashboard-card i {
        font-size: 1.2em;
    }

    .dashboard-card h3 {
        font-size: 0.9em;
    }

    .dashboard-card p {
        font-size: 1em;
    }

    .chart-container {
        padding: 10px;
    }
}