/* الأساسيات */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: #f5f5f5;
    line-height: 1.6;
    font-family: 'Cairo', sans-serif;
}

/* التنسيق العام */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mt-3 {
    margin-top: 1rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

/* الشريط الجانبي */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    font-family: 'Cairo', sans-serif;
}

.sidebar {
    width: 250px;
    min-height: 100vh;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    font-family: 'Cairo', sans-serif;
}

.sidebar-header {
    padding: 20px;
    color: white;
    font-family: 'Cairo', sans-serif;
}

.sidebar-header h2 {
    margin-bottom: 5px;
    font-size: 1.5rem;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
}

.sidebar-header p {
    font-size: 0.9rem;
    opacity: 0.9;
    font-family: 'Cairo', sans-serif;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
    font-family: 'Cairo', sans-serif;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    border-right: 3px solid transparent;
    font-family: 'Cairo', sans-serif;
    font-weight: 400;
}

.sidebar-menu a:hover {
    background-color: rgba(0,0,0,0.05);
    border-right-color: #007bff;
}

.sidebar-menu a.active {
    background-color: rgba(0,0,0,0.1);
    border-right-color: #007bff;
    font-weight: 700;
}

.sidebar-menu span {
    margin-right: 10px;
}

/* المحتوى الرئيسي */
.main-content {
    flex: 1;
    background-color: #fff;
    font-family: 'Cairo', sans-serif;
}

.main-header {
    padding: 20px 30px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Cairo', sans-serif;
}

.content {
    padding: 30px;
    font-family: 'Cairo', sans-serif;
}

/* البطاقات */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    overflow: hidden;
    font-family: 'Cairo', sans-serif;
}

.card-header {
    padding: 20px;
    color: white;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
}

.card-body {
    padding: 20px;
    font-family: 'Cairo', sans-serif;
}

/* الإحصائيات */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    font-family: 'Cairo', sans-serif;
}

.stat-card {
    padding: 25px;
    border-radius: 8px;
    color: white;
    text-align: center;
    font-family: 'Cairo', sans-serif;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 15px 0;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
}

/* الجداول */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-family: 'Cairo', sans-serif;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid #ddd;
    font-family: 'Cairo', sans-serif;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
}

.table tr:hover {
    background-color: #f5f5f5;
}

.table-responsive {
    overflow-x: auto;
}

/* النماذج */
.form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    font-family: 'Cairo', sans-serif;
}

.form-wrapper {
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    font-family: 'Cairo', sans-serif;
}

.form-header {
    padding: 30px;
    color: white;
    text-align: center;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
}

.form-body {
    padding: 30px;
    font-family: 'Cairo', sans-serif;
}

.form-footer {
    padding: 15px 30px;
    text-align: center;
    font-family: 'Cairo', sans-serif;
}

.form-group {
    margin-bottom: 20px;
    font-family: 'Cairo', sans-serif;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-family: 'Cairo', sans-serif;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: 'Cairo', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
    font-family: 'Cairo', sans-serif;
}

/* الأزرار */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* التنبيهات */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-right: 4px solid transparent;
    font-family: 'Cairo', sans-serif;
}

.alert-green {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-red {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.alert-blue {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

.alert-grey {
    background-color: #f8f9fa;
    color: #6c757d;
    border-color: #e2e6ea;
}

/* صفحة تسجيل الدخول */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    font-family: 'Cairo', sans-serif;
}

.login-box {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    font-family: 'Cairo', sans-serif;
}

/* الشبكة */
.row {
    display: flex;
    margin: 0 -10px;
    font-family: 'Cairo', sans-serif;
}

.col {
    flex: 1;
    padding: 0 10px;
}

/* الإدخال مع زر */
.input-group {
    display: flex;
    margin-bottom: 20px;
    font-family: 'Cairo', sans-serif;
}

.input-group .form-control {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* علامة مطلوب */
.required {
    color: #dc3545;
    font-family: 'Cairo', sans-serif;
}

/* النافذة المنبثقة */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    font-family: 'Cairo', sans-serif;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 700px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    animation: modalFade 0.3s;
    font-family: 'Cairo', sans-serif;
}

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

.modal-header {
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
    font-family: 'Cairo', sans-serif;
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: white;
    font-family: 'Cairo', sans-serif;
}

.close:hover {
    opacity: 0.8;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Cairo', sans-serif;
}

.details-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    font-family: 'Cairo', sans-serif;
}

.details-table td:first-child {
    width: 150px;
    font-weight: 600;
    color: #555;
    font-family: 'Cairo', sans-serif;
}

/* حقل التنويه */
.notice-field {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 5px;
    border-right: 4px solid #007bff;
    margin-bottom: 20px;
    font-family: 'Cairo', sans-serif;
}

.notice-field h4 {
    color: #0056b3;
    margin-bottom: 10px;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
}

.notice-field p {
    margin: 0;
    color: #333;
    font-size: 14px;
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
}

/* حالة المتابعة */
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin: 2px;
    font-family: 'Cairo', sans-serif;
}

.status-new { background: #007bff; color: white; }
.status-interested { background: #28a745; color: white; }
.status-not-interested { background: #dc3545; color: white; }
.status-follow-up { background: #ffc107; color: #212529; }
.status-paid { background: #17a2b8; color: white; }

/* حقل الدفع */
.payment-info {
    background: #e8f5e8;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    font-family: 'Cairo', sans-serif;
}

.payment-info.hidden { display: none; }

/* إحصائيات */
.form-stats {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    font-family: 'Cairo', sans-serif;
}

.form-stat {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    flex: 1;
    text-align: center;
    font-family: 'Cairo', sans-serif;
}

.form-stat h4 {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
    font-family: 'Cairo', sans-serif;
}

.form-stat p {
    margin: 10px 0 0 0;
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
}

/* أزرار الإجراءات */
.action-buttons {
    display: flex;
    gap: 5px;
    font-family: 'Cairo', sans-serif;
}

.action-buttons .btn {
    padding: 5px 10px;
    font-size: 12px;
}

/* طباعة */
@media print {
    body { margin: 0; padding: 0; font-family: 'Cairo', sans-serif; }
    .no-print { display: none !important; }
    .page-break { page-break-after: always; }
    table { font-family: 'Cairo', sans-serif; }
    th, td { font-family: 'Cairo', sans-serif; }
}

/* استجابة للهواتف */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
        font-family: 'Cairo', sans-serif;
    }
    
    .sidebar {
        width: 100%;
        min-height: auto;
        font-family: 'Cairo', sans-serif;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
        font-family: 'Cairo', sans-serif;
    }
    
    .row {
        flex-direction: column;
        font-family: 'Cairo', sans-serif;
    }
    
    .col {
        margin-bottom: 15px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        font-family: 'Cairo', sans-serif;
    }
    
    .form-stats {
        flex-direction: column;
        font-family: 'Cairo', sans-serif;
    }
    
    .form-stat {
        margin-bottom: 10px;
    }
}

/* عنوان الصفحة */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
}

/* الروابط */
a {
    font-family: 'Cairo', sans-serif;
    font-weight: 500;
}

/* النصوص الصغيرة */
small, .text-muted {
    font-family: 'Cairo', sans-serif;
    font-weight: 400;
}

/* النصوص الغامقة */
strong, b {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
}

/* القوائم */
ul, ol {
    font-family: 'Cairo', sans-serif;
}

li {
    font-family: 'Cairo', sans-serif;
}