﻿/* ==========================================
   أُفق برو - إدارة الطاولات & العناصر المشتركة
   ========================================== */

/* --- الهوية البصرية والعناصر المشتركة --- */
.title-with-icon {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-box-new {
    background: var(--accent);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(0, 108, 53, 0.25);
    flex-shrink: 0;
}

/* --- الفلترة والتصفية --- */
.filter-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.select-branch {
    min-width: 220px;
    background-color: var(--bg-side, #ffffff);
    border: 1px solid var(--border-color, #e0e0e0);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

    .select-branch:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(0, 108, 53, 0.15);
    }

/* --- عناصر الجدول الحديث --- */
.table-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--accent);
}

.branch-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    font-size: 0.9rem;
}

    .branch-info i {
        font-size: 18px;
        color: var(--text-muted);
    }

.empty-state {
    padding: 40px !important;
    text-align: center;
    color: var(--text-muted);
}

    .empty-state i {
        font-size: 48px;
        opacity: 0.3;
        margin-bottom: 10px;
        display: block;
    }

/* --- ستايل السويتش الحديث (Toggle Switch RTL) --- */
.checkbox-field {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    background: var(--bg-app);
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color, #f0f0f0);
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 34px;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 18px;
        width: 18px;
        right: 3px; /* للتحاذي الصحيح مع الواجهة العربية */
        bottom: 3px;
        background-color: white;
        transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 50%;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

input:checked + .slider {
    background-color: var(--accent);
}

    input:checked + .slider:before {
        transform: translateX(-20px); /* تحريك المقبض لليسار في RTL */
    }

.chk-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    user-select: none;
}

/* --- التجاوب مع الشاشات (Responsive) --- */
@media (max-width: 992px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .btn-add-user {
        width: 100%;
        justify-content: center;
    }

    .select-branch {
        width: 100%;
    }
}
