﻿
.dash {
    direction: rtl;
    padding: 16px;
    /*background: #f5f7fb;*/
    background-image: url('/image/body-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    min-height: 100vh;
    font-family: Cambria; /*"Segoe UI", Tahoma, Arial, sans-serif;*/
    color: #1f2937;
}

/* رأس الصفحة */
.dash-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.dash-title .h1 {
    font-size: 28px;
    font-weight: 800;
    margin: 0;
    color: #111827;
}

.dash-title .sub {
    color: #6b7280;
    font-size: 14px;
    margin-top: 4px;
}

/* زر */
.btn-soft {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #111827;
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: .2s ease;
    font-size: 14px;
    font-weight: 700;
}

    .btn-soft:hover:not(:disabled) {
        background: #f3f4f6;
        border-color: #9ca3af;
    }

    .btn-soft:disabled {
        opacity: .6;
        cursor: not-allowed;
    }

/* تحميل */
.dash-loading {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    color: #374151;
    box-shadow: 0 6px 18px rgba(0,0,0,.05);
}

/* KPIs */
.kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

@media (max-width: 1100px) {
    .kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .kpis {
        grid-template-columns: 1fr;
    }
}

.kpi-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,.05);
}

.kpi-label {
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
}

.kpi-value {
    font-size: 28px;
    font-weight: 800;
    margin-top: 8px;
    color: #111827;
    line-height: 1.2;
}

.kpi-hint {
    color: #6b7280;
    font-size: 13px;
    margin-top: 8px;
}

/* الصناديق العامة */
.dash-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,.05);
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eef2f7;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.section-title {
    font-weight: 800;
    font-size: 18px;
    color: #111827;
}

.section-sub {
    color: #6b7280;
    font-size: 13px;
}

/* الاختصارات */
.shortcuts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 1100px) {
    .shortcuts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .shortcuts {
        grid-template-columns: 1fr;
    }
}

.shortcut {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: inherit;
    background: #f9fafb;
    transition: .2s ease;
}

    .shortcut:hover {
        transform: translateY(-2px);
        background: #eef6ff;
        border-color: #bfdbfe;
        box-shadow: 0 8px 20px rgba(0,0,0,.06);
        color: inherit;
    }

    .shortcut .bi {
        font-size: 24px;
        color: #2563eb;
        flex-shrink: 0;
    }

    .shortcut .t {
        font-weight: 800;
        font-size: 15px;
        color: #111827;
    }

    .shortcut .s {
        font-size: 13px;
        color: #6b7280;
        margin-top: 3px;
    }

/* الشبكة السفلية */
.dash-grid2 {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 14px;
    margin-top: 14px;
}

@media (max-width: 1100px) {
    .dash-grid2 {
        grid-template-columns: 1fr;
    }
}

/* الجداول */
.table-wrap {
    overflow-x: auto;
    border: 1px solid #eef2f7;
    border-radius: 12px;
}

.dash-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    background: #fff;
}

    .dash-table th {
        text-align: right;
        font-size: 13px;
        color: #374151;
        font-weight: 800;
        padding: 12px 10px;
        border-bottom: 1px solid #e5e7eb;
        background: #f9fafb;
        white-space: nowrap;
    }

    .dash-table td {
        padding: 12px 10px;
        border-bottom: 1px solid #f3f4f6;
        font-size: 14px;
        color: #111827;
        cursor: pointer;
        vertical-align: middle;
    }

    .dash-table tbody tr:hover td {
        background: #f9fbff;
    }

/* نص مختصر */
.ellipsis {
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* أسفل الصندوق */
.section-foot {
    padding-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.link {
    text-decoration: none;
    font-weight: 700;
    color: #2563eb;
}

    .link:hover {
        color: #1d4ed8;
        text-decoration: underline;
    }

/* فراغ */
.empty {
    padding: 20px 8px;
    color: #6b7280;
    text-align: center;
    font-size: 15px;
}

/* Pills */
.pill {
    display: inline-block;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid transparent;
    white-space: nowrap;
}

.pill-ok {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.pill-warn {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.pill-bad {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.pill-neutral {
    background: #e5e7eb;
    color: #374151;
    border-color: #d1d5db;
}
