/* assets/css/style.css */

/* إعدادات عامة */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* رأس الصفحة */
header {
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0;
    font-size: 2.5em;
}

/* منطقة المحتوى الرئيسية */
.main-content {
    display: flex;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* عمود الإعدادات */
.settings-column {
    flex: 1;
    min-width: 300px;
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-right: 20px;
    margin-bottom: 20px;
}

/* عمود الرسائل */
.messages-column {
    flex: 2;
    min-width: 300px;
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    max-height: 600px;
    overflow-y: auto;
}

/* نموذج الإعدادات */
.settings-form {
    display: grid;
    grid-gap: 15px;
}

/* مجموعة الإعدادات */
.settings-group {
    margin-bottom: 15px;
}

/* تسمية الحقل */
label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

/* حقول الإدخال */
input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

/* زر الإضافة */
.add-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}

.add-btn:hover {
    background-color: #2980b9;
}

/* زر الحفظ */
.save-btn {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 10px;
    width: 100%;
}

.save-btn:hover {
    background-color: #27ae60;
}

/* قائمة الأصول */
.assets-list {
    margin-top: 20px;
}

.asset-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.asset-item:last-child {
    border-bottom: none;
}

.remove-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.remove-btn:hover {
    background-color: #c0392b;
}

/* منطقة الرسائل */
.alerts-area {
    padding: 10px;
}

.alert-item {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    animation: fadeIn 0.5s;
}

.alert-item.buy {
    background-color: #d4edda;
    border-left: 5px solid #28a745;
}

.alert-item.sell {
    background-color: #f8d7da;
    border-left: 5px solid #dc3545;
}

.alert-item.info {
    background-color: #d1ecf1;
    border-left: 5px solid #17a2b8;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* حالة الاتصال */
.connection-status {
    text-align: center;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.status-connected {
    background-color: #d4edda;
    color: #155724;
}

.status-disconnected {
    background-color: #f8d7da;
    color: #721c24;
}

/* منطقة التحميل */
.loading {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #666;
}

/* تنسيق الجدول */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
}

tr:hover {
    background-color: #f5f5f5;
}

/* أزرار الإجراءات */
.action-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 5px;
}

.view-btn {
    background-color: #3498db;
    color: white;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
}

/* نافذة المعلومات */
.info-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-width: 500px;
    width: 90%;
}

.info-popup h3 {
    margin-top: 0;
    color: #2c3e50;
}

.close-btn {
    background-color: #7f8c8d;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

.close-btn:hover {
    background-color: #6c7a7d;
}

/* رأس الجدول المخصص */
.custom-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.search-box {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 250px;
}

/* تنسيق الأزرار */
.btn {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-success {
    background-color: #2ecc71;
    color: white;
}

.btn-success:hover {
    background-color: #27ae60;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-info {
    background-color: #3498db;
    color: white;
}

.btn-info:hover {
    background-color: #2980b9;
}

/* تنسيق الفواصل */
hr {
    border: none;
    height: 1px;
    background-color: #ddd;
    margin: 20px 0;
}

/* تنسيق العناوين */
h2 {
    color: #2c3e50;
    margin-top: 0;
}

h3 {
    color: #34495e;
}

/* تنسيق الحالة */
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.8em;
    font-weight: bold;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

/* تنسيق الزر العائم */
.floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #2ecc71;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    font-size: 1.5em;
    z-index: 999;
}

.floating-btn:hover {
    background-color: #27ae60;
}

/* تنسيق وحدة التحكم */
.console {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 10px;
    border-radius: 5px;
    font-family: monospace;
    height: 200px;
    overflow-y: auto;
    margin-top: 20px;
}

/* تنسيق التبويبات */
.tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-bottom: none;
    margin-right: 5px;
    border-radius: 5px 5px 0 0;
}

.tab.active {
    background-color: white;
    border-bottom: 1px solid white;
    margin-bottom: -1px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* تنسيق الجدول الاستجابي */
@media screen and (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .settings-column {
        margin-right: 0;
    }
    
    th, td {
        padding: 8px 10px;
    }
}