/* 4Sofit — Reports Center premium layout */

.reports-center-shell {
    /* flex/card shell — see page-shell-pro.css */
}

.reports-center-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 0;
}

.reports-exec-panel {
    padding: 20px 22px;
    border-radius: 16px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
}

.reports-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.reports-section-title {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
}

.reports-section-desc {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.reports-exec-stats {
    margin-bottom: 14px;
}

.reports-exec-par {
    margin-bottom: 0;
}

.reports-par-card {
    padding: 14px 16px;
}

.reports-par-card--link .report-inline-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-dark);
    text-decoration: none;
}

.reports-par-card--link .report-inline-link:hover {
    text-decoration: underline;
}

.reports-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 14px;
}

.reports-search {
    width: 100%;
    max-width: none;
}

.reports-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.report-filter-chip {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-muted);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.report-filter-chip:hover {
    border-color: #99f6e4;
    color: var(--brand-dark);
}

.report-filter-chip.is-active {
    background: #ecfeff;
    border-color: #5eead4;
    color: #0f766e;
}

.reports-category-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reports-category-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #fff;
}

.reports-category-head--teal { border-right: 4px solid #14b8a6; }
.reports-category-head--amber { border-right: 4px solid #f59e0b; }
.reports-category-head--cyan { border-right: 4px solid #06b6d4; }
.reports-category-head--green { border-right: 4px solid #22c55e; }

.reports-category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #0f766e;
    flex-shrink: 0;
}

.reports-category-title {
    margin: 0 0 2px;
    font-size: 16px;
    font-weight: 700;
}

.reports-category-desc {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

.reports-category-count {
    margin-inline-start: auto;
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Hub cards — override legacy flat link card */
.reports-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.report-hub-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 148px;
    background: linear-gradient(155deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.report-hub-card--teal { border-right: 3px solid #14b8a6; }
.report-hub-card--amber { border-right: 3px solid #f59e0b; }
.report-hub-card--cyan { border-right: 3px solid #06b6d4; }
.report-hub-card--green { border-right: 3px solid #22c55e; }

.report-hub-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
}

.report-hub-card__link {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
    padding: 16px 16px 12px;
    text-decoration: none;
    color: inherit;
}

.report-hub-card__head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.report-hub-card__titles {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.report-hub-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.report-hub-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    background: #f1f5f9;
    color: #64748b;
}

.report-hub-tag--pdf {
    background: #ecfeff;
    color: #0f766e;
}

.report-hub-open {
    margin-top: auto;
    font-size: 12px;
    font-weight: 700;
    color: var(--brand-dark);
}

.report-hub-card .report-hub-pdf {
    margin: 0 12px 12px;
    align-self: flex-start;
}

.report-hub-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #ecfeff;
    color: #0891b2;
    flex-shrink: 0;
}

.report-hub-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
}

.report-hub-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.45;
}

/* Individual report page — shell flex/scroll in page-shell-pro.css */
.report-page-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
}

/* تمرير الصفحة وليس الجدول الداخلي */
.report-page-body .data-table-wrap.data-table-scroll,
.reports-center-body .data-table-wrap.data-table-scroll {
    max-height: none !important;
    overflow: visible !important;
    height: auto;
}

.report-page-body .summary-row,
.report-page-body .dash-par-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin: 0;
}

.report-page-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--border);
}

.report-page-toolbar__exports {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.report-period-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.report-period-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.report-period-btn {
    border: 1px solid var(--border);
    background: #fff;
    color: #475569;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.report-period-btn.is-active {
    background: #ecfeff;
    border-color: #5eead4;
    color: #0f766e;
}

.report-period-custom {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.report-period-field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.report-kpi-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.report-kpi-chip {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.report-kpi-chip.is-success { border-right: 3px solid #22c55e; }
.report-kpi-chip.is-warning { border-right: 3px solid #f59e0b; }
.report-kpi-chip.is-danger { border-right: 3px solid #ef4444; }
.report-kpi-chip.is-info { border-right: 3px solid #06b6d4; }

.report-kpi-chip__label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.report-kpi-chip__value {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.report-kpi-chip__hint {
    font-size: 11px;
    color: var(--text-muted);
}

.report-panel {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.report-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}

.report-panel__title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.report-panel__meta {
    font-size: 12px;
    color: var(--text-muted);
}

.report-panel__body {
    padding: 0;
}

.report-panel__body .data-table-wrap {
    border: none;
    border-radius: 0;
}

.report-related-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px dashed var(--border);
}

.report-related-strip__label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

.report-related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.report-related-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
}

.report-related-link:hover {
    border-color: #99f6e4;
    color: #0f766e;
}

.report-related-link--hub {
    background: #ecfeff;
    border-color: #99f6e4;
    color: #0f766e;
}

/* شريط سفلي — تقارير ذات صلة + تصدير */
.report-page-footer {
    flex-wrap: wrap;
    gap: 12px 16px;
}

.report-page-footer .report-related-strip--footer,
.report-related-strip.report-related-strip--footer {
    flex: 1 1 280px;
    min-width: 0;
    padding: 0;
    border: none;
    background: transparent;
    margin: 0;
}

.report-page-footer__exports {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.report-page-footer .report-related-links {
    flex-wrap: wrap;
}

.sidebar-flyout-section {
    padding: 10px 14px 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #64748b;
    text-transform: none;
}

@media (max-width: 767px) {
    .report-page-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .report-period-picker {
        flex-direction: column;
        align-items: stretch;
    }

    .report-kpi-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-page-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .report-page-footer__exports {
        width: 100%;
        justify-content: stretch;
    }

    .report-page-footer__exports .btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .reports-hub-grid {
        grid-template-columns: 1fr;
    }
}
