/* تنسيقات عامة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tahoma', 'Arial', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    direction: rtl;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* تنسيقات الرأس */
.header {
    background-color: #2c3e50;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 24px;
}

.header nav ul {
    display: flex;
    list-style: none;
}

.header nav ul li {
    margin-left: 20px;
}

.header nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.header nav ul li a:hover {
    color: #3498db;
}

/* تنسيقات التذييل */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    margin-top: 30px;
}

.footer .container {
    text-align: center;
}

/* تنسيقات النماذج */
.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* تنسيقات الأزرار */
.btn {
    display: inline-block;
    padding: 10px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-primary {
    background-color: #3498db;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-success {
    background-color: #2ecc71;
}

.btn-success:hover {
    background-color: #27ae60;
}

.btn-info {
    background-color: #1abc9c;
}

.btn-info:hover {
    background-color: #16a085;
}

.btn-warning {
    background-color: #f39c12;
}

.btn-warning:hover {
    background-color: #e67e22;
}

.btn-danger {
    background-color: #e74c3c;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-secondary {
    background-color: #95a5a6;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* تنسيقات الجداول */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

table th, table td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

table tr:hover {
    background-color: #f9f9f9;
}

table tfoot th {
    background-color: #e2e2e2;
    font-weight: bold;
}

/* تنسيقات التنبيهات */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* تنسيقات لوحة التحكم */
.dashboard {
    padding: 20px 0;
}

.dashboard h1 {
    margin-bottom: 20px;
    font-size: 28px;
}

.stats-container {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    flex: 1;
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    margin-bottom: 10px;
    font-size: 18px;
    color: #7f8c8d;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #2c3e50;
}

.actions-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.action-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.action-card h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.action-card p {
    margin-bottom: 15px;
    color: #7f8c8d;
}

/* تنسيقات صفحة الموظفين */
.employees-page {
    padding: 20px 0;
}

.employees-page h1 {
    margin-bottom: 20px;
    font-size: 28px;
}

.actions {
    margin-bottom: 20px;
}

/* تنسيقات النوافذ المنبثقة */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

/* تنسيقات صفحة حساب الرواتب */
.salary-calculator {
    padding: 20px 0;
}

.salary-calculator h1 {
    margin-bottom: 20px;
    font-size: 28px;
}

.calculator-form {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.salaries-table {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.salaries-table h2 {
    margin-bottom: 20px;
    font-size: 22px;
}

.salaries-table .actions {
    margin-top: 20px;
}

/* تنسيقات صفحة تسجيل الدخول */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f5f5f5;
}

.login-form {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.login-form h1 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 24px;
    color: #2c3e50;
}

.login-form p {
    text-align: center;
    margin-bottom: 20px;
    color: #7f8c8d;
}

.login-form .btn {
    width: 100%;
}

/* تنسيقات الاستجابة */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
    }
    
    .header nav ul {
        margin-top: 15px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .stats-container {
        flex-direction: column;
    }
    
    .actions-container {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    table {
        display: block;
        overflow-x: auto;
    }
}