/* نظام المبيعات - ملف الأنماط الرئيسي */

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

body {
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container-fluid {
    flex: 1;
}

/* بطاقات */
.card {
    border: none;
    box-shadow: 0 0 20px rgba(0,0,0,0.08);
    border-radius: 10px;
    margin-bottom: 20px;
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px 10px 0 0 !important;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 1.1rem;
}

/* الجداول */
.table {
    background: white;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

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

/* الأزرار */
.btn {
    border-radius: 5px;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.3s;
}

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

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    border: none;
}

.btn-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    color: white;
}

/* النماذج */
.form-control, .form-select {
    border-radius: 5px;
    border: 1px solid #ced4da;
    padding: 10px 15px;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

/* شريط التنقل */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s;
}

.nav-link:hover {
    transform: translateY(-2px);
}

/* الفوتر */
.footer {
    margin-top: auto;
    border-top: 1px solid #dee2e6;
}

/* صفحة تسجيل الدخول */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    max-width: 450px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 4rem;
    color: #667eea;
}

/* الرسائل */
.alert {
    border-radius: 8px;
    border: none;
}

/* جدول الأصناف في الفاتورة */
#itemsTable tbody tr {
    transition: all 0.3s;
}

#itemsTable tbody tr:hover {
    background-color: #f8f9fa;
}

.item-row input, .item-row select, .item-row textarea {
    font-size: 0.9rem;
}

/* صفحة الطباعة */
@media print {
    body * {
        visibility: hidden;
    }
    
    .print-area, .print-area * {
        visibility: visible;
    }
    
    .print-area {
        position: absolute;
        right: 0;
        top: 0;
        width: 100%;
    }
    
    .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}

.print-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #667eea;
}

.print-header h1 {
    color: #667eea;
    font-weight: 700;
    margin-bottom: 10px;
}

.print-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.print-table {
    margin-top: 20px;
}

.print-table th {
    background-color: #667eea;
    color: white;
}

.print-summary {
    margin-top: 30px;
    text-align: left;
}

.print-summary table {
    width: 300px;
    margin-right: auto;
}

.print-notes {
    margin-top: 30px;
    padding: 15px;
    background-color: #fff3cd;
    border-right: 4px solid #ffc107;
    border-radius: 5px;
}

/* Badge */
.badge {
    padding: 6px 12px;
    font-weight: 500;
}

/* كشف الحساب */
.account-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.account-summary h3 {
    font-weight: 700;
    margin-bottom: 20px;
}

.account-summary .summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.account-summary .summary-item:last-child {
    border-bottom: none;
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 10px;
}

/* تحسينات إضافية */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.icon-box {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.5rem;
}

.icon-box.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.icon-box.success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    color: white;
}

.icon-box.danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .card-header {
        font-size: 1rem;
    }
    
    .btn {
        padding: 6px 15px;
        font-size: 0.9rem;
    }
    
    .table {
        font-size: 0.85rem;
    }
}
