/* تنسيقات لصفحة إضافة المخزون الأولي للأجهزة المحمولة */

.mobile-inventory-create-page {
    padding: 0;
    max-width: 100%;
    margin: 0 auto;
}

.inventory-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
    color: #333;
}

/* تنسيق البطاقة الإحصائية */
.inventory-stats {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
    padding: 0 5px;
}

.stat-card {
    flex: 1;
    background-color: #fff;
    border-radius: 8px;
    padding: 12px 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c7be5;
}

.stat-label {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 5px;
}

/* تنسيق بطاقة التفاصيل */
.details-card {
    background-color: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.details-card-header {
    padding: 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.details-card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.result-count {
    font-size: 0.8rem;
    color: #6c757d;
    background-color: #e9ecef;
    padding: 2px 8px;
    border-radius: 12px;
}

.details-card-body {
    padding: 15px;
}

/* تنسيق النموذج */
.mobile-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

.mobile-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.mobile-input:focus {
    border-color: #2c7be5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(44, 123, 229, 0.2);
}

/* تنسيق مدخل الكمية */
.quantity-input-container {
    display: flex;
    align-items: center;
    border: 1px solid #ced4da;
    border-radius: 8px;
    overflow: hidden;
}

.quantity-btn {
    background-color: #f8f9fa;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1rem;
    color: #495057;
}

.quantity-btn:active {
    background-color: #e9ecef;
}

#quantityInput {
    border: none;
    text-align: center;
    flex-grow: 1;
    padding: 10px 5px;
    margin: 0;
    border-radius: 0;
}

#quantityInput:focus {
    box-shadow: none;
}

/* تنسيق الإجراءات */
.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.mobile-btn {
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
    text-align: center;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mobile-btn i {
    font-size: 0.9rem;
}

.mobile-btn-primary {
    background-color: #2c7be5;
    color: white;
    width: 100%;
}

.mobile-btn-primary:hover {
    background-color: #1a68d1;
}

.mobile-btn-light {
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #ced4da;
}

.mobile-btn-light:hover {
    background-color: #e9ecef;
}

/* تنسيق قائمة المعاملات */
.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.transaction-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    background-color: #f8f9fa;
    transition: background-color 0.3s;
}

.transaction-item:hover {
    background-color: #e9ecef;
}

.transaction-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 12px;
    background-color: #fff;
    border-radius: 6px;
    padding: 5px;
    width: 50px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.transaction-day {
    font-size: 1.1rem;
    font-weight: 600;
    color: #343a40;
}

.transaction-month {
    font-size: 0.7rem;
    color: #6c757d;
    text-transform: uppercase;
}

.transaction-time {
    font-size: 0.7rem;
    color: #6c757d;
    margin-top: 2px;
}

.transaction-details {
    flex: 1;
}

.transaction-product {
    font-weight: 500;
    margin-bottom: 5px;
    color: #212529;
}

.transaction-quantity {
    font-size: 0.9rem;
}

.transaction-quantity .positive {
    color: #28a745;
    font-weight: 500;
}

.transaction-actions {
    display: flex;
    gap: 8px;
}

.btn-action {
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #495057;
    transition: all 0.3s;
}

.btn-action:hover {
    background-color: #e9ecef;
}

.edit-transaction:hover {
    color: #fd7e14;
    border-color: #fd7e14;
}

.delete-transaction:hover {
    color: #dc3545;
    border-color: #dc3545;
}

.btn-small {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
}

/* تنسيق عند عدم وجود معاملات */
.no-transactions {
    text-align: center;
    padding: 30px 20px;
    color: #6c757d;
}

.no-data-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #adb5bd;
}

/* تنسيق المودال */
.mobile-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
    padding: 15px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.mobile-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #fff;
    border-radius: 8px;
    max-width: 100%;
    width: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.mobile-modal.active .modal-content {
    transform: translateY(0);
}

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

.modal-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.btn-close {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.btn-close::before {
    content: "×";
}

.modal-body {
    padding: 15px;
}

.modal-footer {
    padding: 15px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.mb-3 {
    margin-bottom: 15px;
}

/* تنسيق رسائل الإشعارات */
.toast-message {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 1060;
    background-color: #fff;
    border-radius: 8px;
    padding: 12px 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    font-size: 0.9rem;
    opacity: 0;
    transition: all 0.3s;
    min-width: 250px;
    max-width: 90%;
    text-align: center;
}

.toast-message.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-success {
    background-color: #d4edda;
    border-left: 5px solid #28a745;
    color: #155724;
}

.toast-error {
    background-color: #f8d7da;
    border-left: 5px solid #dc3545;
    color: #721c24;
}

.toast-warning {
    background-color: #fff3cd;
    border-left: 5px solid #ffc107;
    color: #856404;
}

/* تنسيقات استجابية */
@media (max-width: 480px) {
    .mobile-input, .quantity-btn {
        padding: 10px 12px;
    }
    
    .transaction-item {
        padding: 8px;
    }
    
    .transaction-date {
        width: 45px;
        margin-right: 8px;
    }
    
    .transaction-day {
        font-size: 1rem;
    }
    
    .transaction-product {
        font-size: 0.9rem;
    }
    
    .btn-small {
        width: 28px;
        height: 28px;
    }
}

/* تنسيق للشاشة عند وجود مودال مفتوح */
body.modal-open {
    overflow: hidden;
}
