﻿:root {
    --brand: #143D6B;
    --brand2: #1B66D6;
    --soft: #F5F7FB;
    --card: #ffffff;
    --muted: #6B7280;
    --danger: #DC2626;
    --success: #16A34A;
    --warning: #D97706;
    --radius: 22px;
}

body {
    background: var(--soft);
}

.page-wrap {
    padding: 22px 0 40px;
}

.glass {
    background: rgba(255,255,255,.78);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.55);
    border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(20,61,107,.10);
}

.shadow-soft {
    box-shadow: 0 16px 45px rgba(15,23,42,.08);
}

.hero {
    background: radial-gradient(1200px 600px at 85% 0%, rgba(27,102,214,.18), transparent 60%), radial-gradient(900px 450px at 10% 20%, rgba(20,61,107,.16), transparent 55%), linear-gradient(135deg, rgba(255,255,255,.9), rgba(255,255,255,.72));
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: .85rem;
    background: #EEF4FF;
    color: var(--brand);
    border: 1px solid rgba(27,102,214,.18);
}

.btn-brand {
    background: linear-gradient(135deg, var(--brand), var(--brand2));
    border: 0;
    color: #fff;
    padding: 10px 16px;
    border-radius: 14px;
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(27,102,214,.22);
}

    .btn-brand:hover {
        filter: brightness(.98);
    }

.btn-ghost {
    border: 1px solid rgba(20,61,107,.22);
    color: var(--brand);
    border-radius: 14px;
    font-weight: 800;
    padding: 10px 16px;
    background: #fff;
}

.kpi {
    background: #fff;
    border-radius: 18px;
    border: 1px solid rgba(15,23,42,.07);
    padding: 14px 16px;
}

    .kpi .v {
        font-weight: 900;
        font-size: 1.35rem;
        color: var(--brand);
    }

    .kpi .l {
        color: var(--muted);
        font-size: .9rem;
    }

.card-x {
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid rgba(15,23,42,.07);
}

.section-title {
    font-weight: 900;
    color: var(--brand);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.section-sub {
    color: var(--muted);
    margin: 6px 0 0;
}

.badge-soft {
    border-radius: 999px;
    padding: 7px 12px;
    font-weight: 800;
    font-size: .82rem;
    border: 1px solid rgba(15,23,42,.08);
    background: #fff;
}

.badge-success {
    background: rgba(22,163,74,.10);
    color: var(--success);
    border-color: rgba(22,163,74,.18);
}

.badge-danger {
    background: rgba(220,38,38,.10);
    color: var(--danger);
    border-color: rgba(220,38,38,.18);
}

.badge-warn {
    background: rgba(217,119,6,.10);
    color: var(--warning);
    border-color: rgba(217,119,6,.18);
}

.template-card {
    border-radius: 22px;
    border: 1px solid rgba(15,23,42,.08);
    background: #fff;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
    height: 100%;
}

    .template-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 18px 50px rgba(20,61,107,.12);
        border-color: rgba(27,102,214,.22);
    }

    .template-card.selected {
        border-color: rgba(27,102,214,.55);
        box-shadow: 0 22px 55px rgba(27,102,214,.16);
        position: relative;
    }

        .template-card.selected:after {
            content: "✓ النموذج المحدد";
            position: absolute;
            top: 14px;
            left: 14px;
            font-weight: 900;
            font-size: .85rem;
            color: #0f5132;
            background: rgba(22,163,74,.12);
            border: 1px solid rgba(22,163,74,.20);
            border-radius: 999px;
            padding: 6px 10px;
        }

.headers-list {
    max-height: 160px;
    overflow: auto;
    padding-left: 0;
    margin: 0;
}

    .headers-list li {
        list-style: none;
        padding: 7px 0;
        border-bottom: 1px dashed rgba(15,23,42,.08);
        display: flex;
        justify-content: space-between;
        gap: 12px;
        font-size: .92rem;
    }

        .headers-list li:last-child {
            border-bottom: 0;
        }

.dropzone {
    border: 2px dashed rgba(27,102,214,.30);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(27,102,214,.06), rgba(20,61,107,.04));
    padding: 18px;
}

    .dropzone.disabled {
        opacity: .6;
        filter: grayscale(.2);
    }

.hint {
    color: var(--muted);
    font-size: .9rem;
}

.mini {
    color: var(--muted);
    font-size: .85rem;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: .86rem;
    background: #0b1220;
    color: #e5e7eb;
    border-radius: 16px;
    padding: 14px;
    overflow: auto;
}

/* ===== UX Enhancements (Add-only) ===== */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 12px;
    margin: 14px 0 10px;
}

.kpi-card {
    grid-column: span 3;
    background: #fff;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 16px;
    padding: 14px 14px;
    box-shadow: 0 10px 30px -18px rgba(0,0,0,.25);
}

@media (max-width: 1100px) {
    .kpi-card {
        grid-column: span 6;
    }
}

@media (max-width: 600px) {
    .kpi-card {
        grid-column: span 12;
    }
}

.kpi-title {
    font-size: .85rem;
    color: var(--muted, #6b7280);
    margin-bottom: 8px;
    font-weight: 700;
}

.kpi-value {
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: .2px;
}

.kpi-sub {
    font-size: .85rem;
    color: var(--muted, #6b7280);
    margin-top: 6px;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 800;
    font-size: .82rem;
    border: 1px solid rgba(0,0,0,.08);
}

.badge-ok {
    background: rgba(22,163,74,.10);
    color: #166534;
    border-color: rgba(22,163,74,.25);
}

.badge-warn {
    background: rgba(245,158,11,.12);
    color: #92400e;
    border-color: rgba(245,158,11,.28);
}

.badge-bad {
    background: rgba(220,38,38,.10);
    color: #991b1b;
    border-color: rgba(220,38,38,.22);
}

.badge-info {
    background: rgba(59,130,246,.10);
    color: #1d4ed8;
    border-color: rgba(59,130,246,.22);
}

.section-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 18px;
    padding: 16px 16px;
    margin: 12px 0;
    box-shadow: 0 10px 30px -18px rgba(0,0,0,.25);
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

    .section-title h3 {
        margin: 0;
        font-weight: 900;
        font-size: 1.05rem;
    }

.section-hint {
    color: var(--muted, #6b7280);
    font-size: .9rem;
}

.table-clean {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,.06);
}

    .table-clean th {
        position: sticky;
        top: 0;
        background: #f8fafc;
        font-weight: 900;
        font-size: .9rem;
        color: #334155;
        padding: 10px 12px;
        border-bottom: 1px solid rgba(0,0,0,.06);
    }

    .table-clean td {
        padding: 10px 12px;
        border-bottom: 1px solid rgba(0,0,0,.05);
        font-size: .95rem;
    }

    .table-clean tr:nth-child(even) td {
        background: #fcfdff;
    }

    .table-clean tr:last-child td {
        border-bottom: none;
    }

.action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    background: rgba(245,247,251,.75);
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 16px;
    padding: 10px 12px;
    margin: 10px 0 12px;
    backdrop-filter: blur(8px);
}

.action-left, .action-right {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.mini-note {
    font-size: .85rem;
    color: var(--muted, #6b7280);
}

.progress-wrap {
    height: 10px;
    background: rgba(2,6,23,.08);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: var(--w, 0%);
    background: linear-gradient(90deg, var(--brand2, #1B66D6), var(--brand, #143D6B));
}
.ng-money {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    direction: ltr; /* يخلي الرقم يطلع مضبوط حتى في RTL */
    unicode-bidi: plaintext;
}

.ng-money-value {
    font-weight: 700;
}

.ng-sar-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    opacity: .9;
}
