/* AF Tables v1 — جداول منظمة مخططة لكل المحتوى (مشروعات/مقالات/وحدات) */

/* الأساس: حدود واضحة وحشو مريح */
.af-entry table,
.entry-content table,
article table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.25rem 0;
    font-size: 0.95rem;
    border: 1px solid var(--af-border, #d8dee0);
    border-radius: 10px;
    overflow: hidden;
}

.af-entry table th,
.entry-content table th,
article table th {
    background: var(--af-surface-2, #eef2f3);
    font-weight: 700;
}

.af-entry table th,
.af-entry table td,
.entry-content table th,
.entry-content table td,
article table th,
article table td {
    padding: 0.65rem 0.9rem;
    text-align: right;
    border-bottom: 1px solid var(--af-border, #d8dee0);
}

/* الخطوط المتناوبة (striping) */
.af-entry table tbody tr:nth-child(even) td,
.entry-content table tbody tr:nth-child(even) td,
article table tbody tr:nth-child(even) td {
    background: rgba(45, 111, 111, 0.05);
}

/* آخر صف بلا حد سفلي */
.af-entry table tbody tr:last-child td,
.entry-content table tbody tr:last-child td,
article table tbody tr:last-child td {
    border-bottom: none;
}

/* صف الرأس بلا خطوط */
.af-entry table thead tr,
.entry-content table thead tr,
article table thead tr {
    background: var(--af-surface-2, #eef2f3);
}

/* الموبايل: تمرير أفقي بدل الكسر */
@media (max-width: 640px) {
    .af-entry table,
    .entry-content table,
    article table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
}

/* الوضع الليلي إن وُجد */
@media (prefers-color-scheme: dark) {
    .af-entry table tbody tr:nth-child(even) td,
    .entry-content table tbody tr:nth-child(even) td,
    article table tbody tr:nth-child(even) td {
        background: rgba(255, 255, 255, 0.04);
    }
}
