/* ══════════════════════════════════════════════════════════
   تفاصيل الحكم (Modal)
   ══════════════════════════════════════════════════════════ */
.hokm-detail {
    font-family: 'Tajawal', sans-serif;
    font-size: 15px;
    direction: rtl;
    color: var(--text-main);
    line-height: 1.85;
}

/* ── رأس الحكم ── */
.hokm-detail-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 8px;
    padding: 14px 20px;
    margin-bottom: 20px;
    text-align: center;
    color: #fff;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 14px;
    font-size: 14px;
    font-weight: 600;
}

.hokm-meta-sep {
    opacity: .6;
    margin: 0 4px;
}

.hokm-circle {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    padding: 2px 12px;
    font-size: 13px;
}

.badge-status {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    padding: 3px 14px;
    font-size: 14px;
    color: #fff;
}

/* ── تنبيهات ── */
.hokm-alert {
    border-radius: 8px;
    padding: 10px 16px;
    margin: 0 20px 16px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hokm-alert-warning {
    background: #fff8e6;
    border: 1px solid rgba(200,134,10,0.3);
    color: var(--accent);
}

.hokm-alert-info {
    background: rgba(37,99,168,0.05);
    border: 1px solid rgba(37,99,168,0.15);
    color: var(--primary);
}

/* ── أقسام المحتوى ── */
.hokm-section {
    margin: 0 16px 4px;
    padding: 14px 16px;
    border-radius: 8px;
    transition: background .15s;
}

    .hokm-section + .hokm-section {
        border-top: 1px solid var(--border-light);
    }

    .hokm-section:hover {
        background: var(--bg-elevated);
    }

.hokm-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: .4px;
    opacity: .8;
}

    .hokm-section-title i {
        color: var(--accent);
        font-size: 12px;
    }

.hokm-section-body {
    font-size: 15px;
    color: var(--text-main);
    line-height: 1.95;
    text-align: justify;
    /*white-space: pre-wrap;*/
}

.hokm-subject-green {
    color: var(--success);
    font-weight: 600;
}

.hokm-notes {
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    font-style: italic;
}

/* ── نص الحكم الكامل ── */
.hokm-fulltext-section {
    margin-bottom: 0;
}

.hokm-full-text {
    font-size: 15px;
    line-height: 2;
    color: var(--text-main);
    font-family: 'Amiri', serif;
}

    .hokm-full-text.collapsed {
        max-height: 280px;
        overflow-y: hidden;
        position: relative;
    }

        .hokm-full-text.collapsed::after {
            content: "";
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 80px;
            background: linear-gradient(transparent, var(--bg-card, #fff));
            pointer-events: none;
        }

    .hokm-full-text.expanded {
        max-height: 600px;
        overflow-y: auto;
        scroll-behavior: smooth;
        border: 1px solid var(--border-light);
        border-radius: 6px;
        padding: 16px 20px;
        background: var(--bg-elevated);
    }

/* ── زر toggle ── */
.hokm-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    padding: 3px 10px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: transparent;
    cursor: pointer;
    color: var(--primary-light);
    margin-right: auto;
    transition: all .15s;
    font-family: 'Tajawal', sans-serif;
}

    .hokm-toggle-btn:hover {
        background: rgba(37,99,168,0.07);
        border-color: var(--primary-light);
    }

    .hokm-toggle-btn i {
        transition: transform .25s;
    }

    .hokm-toggle-btn[aria-expanded="true"] i {
        transform: rotate(180deg);
    }
.hokm-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 16px 12px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 4px;
}

/* ══ جدول الطعون في الشريط الجانبي ══ */
.judgements-table-wrap {
    max-height: 340px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.judgements-mini-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    font-family: 'Tajawal', sans-serif;
}

    .judgements-mini-table thead {
        position: sticky;
        top: 0;
        z-index: 2;
        background: var(--primary);
        color: #fff;
    }

    .judgements-mini-table th {
        padding: 7px 6px;
        text-align: center;
        font-weight: 700;
        font-size: 11px;
        white-space: nowrap;
        cursor: pointer;
        user-select: none;
        transition: background .15s;
    }

        .judgements-mini-table th:hover {
            background: var(--primary-light);
        }

        .judgements-mini-table th.active {
            background: var(--accent);
        }

.sort-icon {
    font-size: 9px;
    opacity: .7;
    margin-right: 2px;
}

.judgements-mini-table td {
    padding: 5px 6px;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-main);
    white-space: nowrap;
}

.judgements-mini-table tbody tr:hover {
    background: var(--bg-elevated);
    cursor: pointer;
}

.judgements-mini-table tbody tr:last-child td {
    border-bottom: none;
}

.col-m {
    width: 28px;
}

.col-num {
    width: 44px;
}

.col-year {
    width: 38px;
}

.col-date {
    width: 78px;
}

.col-circle {
    width: auto;
}
.judgements-mini-table tbody tr.active td {
    background: rgba(37,99,168,0.1);
    color: var(--primary);
    font-weight: 600;
}

/* ══ المواضيع ══ */
.subject-type-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-light);
}

.subject-tab {
    flex: 1;
    padding: 8px;
    border: none;
    background: transparent;
    font-family: 'Tajawal', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

    .subject-tab.active {
        color: var(--primary);
        border-bottom-color: var(--primary);
        background: rgba(37,99,168,0.04);
    }

.subject-alpha-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-elevated);
}

.subject-alpha-label {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    margin: 0;
}

.subject-alpha-select {
    font-size: 12px !important;
    padding: 3px 6px !important;
    height: auto !important;
}

.subject-tree {
    max-height: 380px;
    overflow-y: auto;
    padding: 4px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.subject-node {
    margin-bottom: 1px;
}

.subject-node-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    font-size: 13px;
    color: var(--text-main);
    cursor: pointer;
    border-radius: 4px;
    transition: background .15s;
    line-height: 1.5;
}

    .subject-node-label:hover {
        background: var(--bg-elevated);
        color: var(--primary-light);
    }

    .subject-node-label.active {
        background: rgba(37,99,168,0.1);
        color: var(--primary);
        font-weight: 700;
    }

    .subject-node-label.child {
        padding-right: 24px;
        font-size: 12.5px;
        color: var(--text-muted);
    }

        .subject-node-label.child:hover {
            color: var(--primary-light);
        }

.subject-toggle-icon {
    font-size: 10px;
    color: var(--text-muted);
    transition: transform .2s;
    flex-shrink: 0;
}

.subject-node-label.open .subject-toggle-icon {
    transform: rotate(-90deg);
}

.subject-leaf-icon {
    font-size: 6px;
    color: var(--border);
    flex-shrink: 0;
}

.subject-node-label span:first-of-type {
    flex: 1;
}

.subject-count {
    font-size: 11px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1px 6px;
    color: var(--text-muted);
    flex-shrink: 0;
}
/* ══════════════════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .hokm-section {
        margin: 0 8px 4px;
        padding: 10px 12px;
    }

    .hokm-alert {
        margin: 0 8px 12px;
    }

    .hokm-section-body {
        font-size: 14px;
    }

    .hokm-full-text {
        font-size: 14px;
    }

        .hokm-full-text.expanded {
            max-height: 400px;
        }
}
.mashora-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-family: 'Tajawal', sans-serif;
    font-weight: 500;
    transition: border-color .15s, background .15s, color .15s;
    white-space: nowrap;
    margin-right: 4px;
}

    .mashora-toggle:hover {
        border-color: var(--accent);
        color: var(--accent);
        background: rgba(200,134,10,0.05);
    }

    .mashora-toggle input[type="checkbox"] {
        display: none;
    }

.mashora-toggle-box {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--border);
    border-radius: 3px;
    background: #fff;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, border-color .15s;
    position: relative;
}

    .mashora-toggle-box::after {
        content: '';
        display: block;
        width: 9px;
        height: 5px;
        border-left: 2px solid #fff;
        border-bottom: 2px solid #fff;
        transform: rotate(-45deg) translateY(-1px);
        opacity: 0;
        transition: opacity .1s;
    }

.mashora-toggle input[type="checkbox"]:checked ~ .mashora-toggle-box {
    background: var(--accent);
    border-color: var(--accent);
}

    .mashora-toggle input[type="checkbox"]:checked ~ .mashora-toggle-box::after {
        opacity: 1;
    }

.mashora-toggle input[type="checkbox"]:checked ~ .mashora-toggle-text {
    color: var(--accent);
    font-weight: 600;
}

.mashora-toggle-text {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color .15s;
}

    .mashora-toggle-text i {
        font-size: 12px;
    }
/* ══ عرض الجدول المزدوج ══ */
.jt-layout {
    display: flex;
    gap: 10px;
    height: calc(100vh - 280px);
    min-height: 500px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: var(--shadow);
}

.jt-list-panel {
    width: 380px;
    flex-shrink: 0;
    border-left: 1px solid var(--border-light);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    background: var(--bg-elevated);
}

.jt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-family: 'Tajawal', sans-serif;
}

    .jt-table thead {
        position: sticky;
        top: 0;
        z-index: 2;

        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
        border-radius: 8px;
        padding: 14px 20px;
        margin-bottom: 20px;
        text-align: center;
        color: #fff;
        align-items: center;
        justify-content: center;

    }

    .jt-table th {
        padding: 10px 8px;
        text-align: center;
        font-weight: 700;
        font-size: 12px;
        white-space: nowrap;
    }

    .jt-table td {
        padding: 8px 8px;
        text-align: center;
        border-bottom: 1px solid var(--border-light);
        color: var(--text-main);
        white-space: nowrap;
        font-size: 15px;
    }

.jt-row {
    cursor: pointer;
    transition: background .12s;
}

    .jt-row:hover td {
        background: rgba(37,99,168,0.06);
    }

    .jt-row.active td {
        background: rgba(37,99,168,0.13);
        color: var(--primary);
        font-weight: 700;
    }

    .jt-row:last-child td {
        border-bottom: none;
    }

.jt-detail-panel {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    padding: 0;
    background: var(--bg-card);
}

.jt-detail-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 12px;
    color: var(--text-muted);
    font-size: 15px;
}

    .jt-detail-placeholder i {
        font-size: 32px;
        opacity: .3;
    }

.jt-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

    .jt-loading i {
        font-size: 28px;
        color: var(--primary-light);
    }

@media (max-width: 768px) {
    .jt-layout {
        flex-direction: column;
        height: auto;
    }

    .jt-list-panel {
        width: 100%;
        max-height: 260px;
        border-left: none;
        border-bottom: 1px solid var(--border-light);
    }
}