.isnads-content {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.content-title {
    color: #2c3e50;
    font-weight: 600;
    margin: 0;
    font-size: 1.3rem;
}

.content-title i {
    color: #374868;
}

.search-box {
    position: relative;
    width: 300px;
}

.search-box input {
    width: 100%;
    padding: 10px 45px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s;
}

.search-box input:focus {
    border-color: #374868;
    box-shadow: 0 0 0 0.2rem rgba(74, 108, 247, 0.25);
    outline: none;
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* ============ جدول الأسانيد ============ */
.isnads-table {
    padding: 20px 30px;
}

.isnads-table table {
    margin-bottom: 0;
}

.isnads-table thead th {
    background: #f8f9fa;
    border-top: 0;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    vertical-align: middle;
    padding: 15px;
}

.isnads-table tbody td {
    padding: 15px;
    vertical-align: middle;
    border-color: #eee;
}

.isnads-table tbody tr:hover {
    background-color: #f8fafc;
}

/* ============ سلسلة السند ============ */
.isnad-chain {
    line-height: 1.6;
    direction: rtl;
    text-align: right;
}

.chain-arrow {
    color: #374868;
    margin: 0 8px;
    font-weight: bold;
}

.formulation {
    background: #e9ecef;
    color: #495057;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 5px;
    display: inline-block;
}

.narrator {
    font-weight: 500;
    color: #2c3e50;
}

/* ============ أزرار الإجراءات ============ */
.action-buttons {
    display: flex;
    gap: 8px;
}

.action-buttons .btn {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 4px;
}

/* ============ بطاقات الأسانيد ============ */
.isnad-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    padding: 15px;
    height: 100%;
    transition: all 0.3s;
}

.isnad-card:hover {
    border-color: #374868;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.isnad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.isnad-header h6 {
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
}

.isnad-stats .badge {
    font-size: 11px;
    padding: 4px 8px;
}

/* ============ قائمة الروايات ============ */
.hadiths-list {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.hadiths-list strong {
    color: #2c3e50;
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}

.hadiths-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 80px;
    overflow-y: auto;
}

.hadiths-list li {
    padding: 5px 0;
    font-size: 13px;
    color: #495057;
    border-bottom: 1px solid #f8f9fa;
}

.hadiths-list li:last-child {
    border-bottom: none;
}

.hadiths-list li.text-muted {
    color: #6c757d;
    font-style: italic;
}

/* ============ Modal تفاصيل السند ============ */
.modal .modal-header {
    background: #374868;
    color: white;
    border-radius: 10px 10px 0 0;
}

.modal .modal-title {
    font-weight: 600;
}

.modal .modal-body {
    padding: 25px;
    max-height: 70vh;
    overflow-y: auto;
}

/* ============ المقدمة ============ */
.companion-header {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.companion-name {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.companion-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.companion-info .badge {
    font-size: 1rem;
    padding: 8px 16px;
    border-radius: 20px;
}

.companion-info .text-muted {
    font-size: 15px;
}

/* ============ التجاوب ============ */
@media (max-width: 992px) {
    .content-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .search-box {
        width: 100%;
    }
    
    .companion-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .content-header,
    .isnads-table {
        padding: 15px;
    }
    
    .isnads-table table {
        font-size: 14px;
    }
    
    .isnads-table th,
    .isnads-table td {
        padding: 10px;
    }
    
    .companion-name {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .action-buttons {
        flex-direction: column;
        gap: 5px;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    .isnad-chain {
        font-size: 13px;
    }
    
    .formulation {
        font-size: 11px;
        padding: 1px 5px;
    }
}

/* ===== تصميم محسن للعرض الشبكي ===== */
.isnad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.companion-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.companion-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.companion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: #1f2937;
    margin-bottom: 10px;
}

.companion-header i {
    transition: transform 0.3s;
}

.collapse.show + .companion-header i {
    transform: rotate(180deg);
}

.isnad-box {
    background: #f8fafc;
    border-left: 4px solid #374868;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 10px;
    transition: background 0.3s;
}

.isnad-box:hover {
    background: #eef2f7;
}

.isnad-chain {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.isnad-chain span.fw-semibold {
    color: #2c3e50;
}

.hadiths {
    font-size: 13px;
    color: #6b7280;
    max-height: 150px;
    overflow-y: auto;
    padding-right: 5px;
}

.hadiths .hadith-text {
    margin-bottom: 5px;
    line-height: 1.4;
}

/* شريط تمرير للـ hadiths */
.hadiths::-webkit-scrollbar {
    width: 6px;
}

.hadiths::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.hadiths::-webkit-scrollbar-thumb {
    background: #374868;
    border-radius: 3px;
}
.hadith-text {
    border-right: 3px solid #374868;
    padding-right: 10px;
}

@media (max-width: 768px) {
    .isnad-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
        gap: 15px;
    }

    .companion-card {
        padding: 15px;
    }

    .isnad-box {
        padding: 10px 12px;
    }
}


