@import 'variables.css';
@import 'footer.css';

/* الهيكل الأساسي */
body {
    margin: 0;
    padding: 0;
    font-family: 'Cairo', sans-serif;
    background-color: #f5f6fa;
}

.admin-container {
    display: grid;
    grid-template-columns: 1fr auto; /* تغيير ترتيب الأعمدة */
    min-height: 100vh;
}

/* تنسيق القائمة الجانبية */
.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: white;
    height: 100vh;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1000;
}

.sidebar .logo {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar .logo h1 {
    margin: 0;
    font-size: 1.5rem;
}

.sidebar nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar nav ul li a {
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    display: block;
    transition: all 0.3s ease;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
    background-color: #3498db;
}

/* تنسيق المحتوى الرئيسي */
.content {
    margin-right: 250px; /* مساحة للقائمة الجانبية */
    padding: 20px;
    min-height: 100vh;
    background-color: #f5f6fa;
}

/* تنسيق النماذج */
.add-service-form {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 15px;
}

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

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

/* تنسيق الجدول */
.services-table {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

th, td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    font-weight: bold;
}

/* الأزرار */
.btn {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-edit {
    background-color: #f39c12;
    color: white;
    margin-left: 5px;
}

.btn-delete {
    background-color: #e74c3c;
    color: white;
}

/* العناوين */
h1 {
    margin-bottom: 30px;
    color: #2c3e50;
}

h2 {
    color: #34495e;
    margin-bottom: 20px;
}

/* تنسيق الصور في الجدول */
table img {
    max-width: 50px;
    height: auto;
    border-radius: 5px;
}

/* تنسيق رسائل النجاح والخطأ */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* تحسينات للتجاوب */
@media (max-width: 768px) {
    .admin-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .content {
        margin-right: 0;
    }

    table {
        display: block;
        overflow-x: auto;
    }
}

/* تنسيقات التقويم */
.fc {
    direction: rtl;
    text-align: right;
}

.fc-toolbar-title {
    font-family: 'Cairo', sans-serif !important;
}

.fc-button {
    font-family: 'Cairo', sans-serif !important;
}

.fc-event {
    cursor: pointer;
    padding: 2px 5px;
    margin: 2px 0;
    border-radius: 3px;
}

.fc-day-today {
    background-color: rgba(52, 152, 219, 0.1) !important;
}

/* مؤشر التحميل */
#loading-indicator {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

/* تحسين مظهر الأزرار */
.fc-button-primary {
    background-color: #3498db !important;
    border-color: #2980b9 !important;
}

.fc-button-primary:hover {
    background-color: #2980b9 !important;
    border-color: #2573a7 !important;
}

/* تحسين مظهر الأحداث */
.fc-event {
    background-color: #3498db;
    border: none;
    color: white !important;
}

.fc-event-pending {
    background-color: #f39c12;
}

.fc-event-confirmed {
    background-color: #27ae60;
}

.fc-event-cancelled {
    background-color: #e74c3c;
}

.closed-day {
    background-color: #ffebee !important;
    cursor: not-allowed !important;
}

.closed-day:hover {
    background-color: #ffcdd2 !important;
}

.settings-form {
    max-width: 800px;
    margin: 2rem auto;
}

.settings-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.settings-section h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--light-color);
    padding-bottom: 0.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.login-page {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.password-input {
    position: relative;
}

.toggle-password {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
}

.toggle-password:hover {
    color: #333;
}

.login-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.login-form input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.btn-block {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    margin-top: 1.5rem;
}

@media (max-width: 480px) {
    .login-container {
        padding: 1.5rem;
    }
}

/* أنماط النافذة المنبثقة - تحديث موحد */
.modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 25px;
    border: none;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-title {
    margin: 0;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.modal-body {
    padding: 1rem;
}

/* تنسيق تفاصيل الحجز */
.booking-details {
    background: var(--light-color);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #dee2e6;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row label {
    font-weight: bold;
    color: var(--primary-color);
}

/* تنسيق الأزرار والإجراءات */
.booking-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.btn {
    padding: 0.5rem 1.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* تنسيق الشارات */
.badge {
    padding: 0.35rem 0.65rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: bold;
}

.badge-warning { background-color: var(--warning-color); color: #000; }
.badge-success { background-color: var(--success-color); color: #fff; }
.badge-info { background-color: var(--accent-color); color: #fff; }
.badge-danger { background-color: var(--danger-color); color: #fff; }

/* تنسيق القائمة المنسدلة */
#bookingStatus {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* تأثيرات الحركة */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* إعدادات الطباعة */
@media print {
    body * {
        visibility: hidden;
    }
    .modal-content,
    .modal-content * {
        visibility: visible;
    }
    .modal-content {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    .booking-actions {
        display: none;
    }
}

/* مؤشر التحميل */
.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1060;
}

/* تحسين مظهر النافذة المنبثقة */
.modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    max-width: 500px;
}

.modal-content {
    position: relative;
    background-color: #fff;
    border-radius: 0.3rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.booking-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn:hover {
    opacity: 0.9;
}

/* تنسيق الفوتر */




/* تعديل المحتوى الرئيسي ليناسب الفوتر */
.admin-container {
    min-height: calc(100vh - 200px); /* يترك مساحة للفوتر */
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

/* تنسيق الإصائيات */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card i {
    font-size: 2em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: var(--primary-color);
    margin: 10px 0;
}

/* تنسيق الأقسام */
.dashboard-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #eee;
}

.dashboard-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

/* تنسيق شارات الحالة */
.status-badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
}

.status-pending { background-color: #ffeeba; color: #856404; }
.status-confirmed { background-color: #d4edda; color: #155724; }
.status-completed { background-color: #c3e6cb; color: #155724; }
.status-cancelled { background-color: #f8d7da; color: #721c24; }

/* تنسيق الأزرار الصغيرة */
.btn-sm {
    padding: 5px 10px;
    font-size: 0.9em;
}

/* إضافة أنماط Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 5px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

#loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1001;
} 