<?php if (!empty($_SESSION['success'])): ?>
<div class="alert alert-success">
<?= e($_SESSION['success']) ?>
</div>
<?php unset($_SESSION['success']); ?>
<?php endif; ?>

<?php if (!empty($_SESSION['error'])): ?>
<div class="alert alert-danger">
<?= e($_SESSION['error']) ?>
</div>
<?php unset($_SESSION['error']); ?>
<?php endif; ?>
<?php 
function ad_h($v) {
    return htmlspecialchars((string)$v, ENT_QUOTES, 'UTF-8');
}

$submissions = $submissions ?? [];
$stats = $stats ?? [];
$conference = $conference ?? [];
$workflow = $workflow ?? [];

$confTitle = ($conference['title_ar'] ?? '') ?: (($conference['title_en'] ?? '') ?: 'Conference');

/*
|--------------------------------------------------------------------------
| LANGUAGE MODE
|--------------------------------------------------------------------------
*/

$lang =
    $_SESSION['lang']
    ?? 'ar';

$isArabic =
    $lang === 'ar';

$dir =
    $isArabic
        ? 'rtl'
        : 'ltr';

function status_badge_class($status) {
    return match ((string)$status) {
        'accepted', 'published' => 'bg-success',
        'rejected' => 'bg-danger',
        'under_review', 'reviewing' => 'bg-primary',
        'revision_required', 'revised' => 'bg-warning text-dark',
        'draft' => 'bg-secondary',
        default => 'bg-info text-dark',
    };
}
?>

<style>
:root{

--ec-gap:18px;

--ec-radius:22px;

--ec-shadow:
0 12px 40px rgba(
15,
23,
42,
.08
);

}

.ec-author-page{

max-width:1800px;

margin:auto;

}

.ec-card{

border-radius:
var(--ec-radius);

box-shadow:
var(--ec-shadow);

overflow:hidden;

}

.author-wide-zone{

display:grid;

grid-template-columns:

1.3fr
1fr;

gap:

var(--ec-gap);

align-items:start;

}

.author-wide-zone
>.card{

margin:0!important;

height:100%;

}

.author-wide-zone
.card-body{

padding:24px;

}

.author-wide-zone
h4{

font-size:1.25rem;

margin-bottom:20px;

}

.author-wide-zone
.display-6{

font-size:34px;

}

.author-wide-zone
.row{

--bs-gutter-x:14px;

--bs-gutter-y:14px;

}

.ec-mini-item{

padding:14px;

margin-bottom:12px;

border-radius:18px;

background:

linear-gradient(
180deg,
#ffffff,
#fafcff
);

}

.ec-section-title{

display:flex;

justify-content:space-between;

align-items:center;

}

.ec-section-title:after{

content:"";

height:3px;

width:80px;

border-radius:999px;

background:

linear-gradient(
90deg,
#2563eb,
#60a5fa
);

}

.paper-card{

margin-top:30px;

}

@media(
max-width:1200px
){

.author-wide-zone{

grid-template-columns:
1fr;

}

}


.author-kpi-card{
    border:0;
    border-radius:20px;
    box-shadow:0 14px 35px rgba(15,23,42,.08);
}
.author-kpi-label{
    color:#64748b;
    font-size:13px;
    font-weight:700;
}
.author-kpi-value{
    font-size:30px;
    font-weight:900;
    color:#0f172a;
}
.workflow-pill{
    display:inline-flex;
    align-items:center;
    border-radius:999px;
    padding:7px 12px;
    margin:3px;
    font-weight:800;
    background:#eff6ff;
    color:#1e3a8a;
    border:1px solid #dbeafe;
    font-size:13px;
}
.workflow-pill.off{
    background:#f1f5f9;
    color:#64748b;
    border-color:#e2e8f0;
}
.paper-card{
    border:0;
    border-radius:22px;
    box-shadow:0 14px 40px rgba(15,23,42,.08);
}

.meta-chip{
padding:10px 18px;
border-radius:999px;
font-weight:700;
display:inline-flex;
align-items:center;
gap:8px;
}

</style>

<div class="container-fluid ec-author-dashboard-responsive py-3">

<div
class="card border-0 shadow-sm mb-4 overflow-hidden"
style="
border-radius:28px;
background:
linear-gradient(
135deg,
#0f172a,
#1d4ed8
);
color:#fff;
"
>

<div class="card-body p-5 position-relative">

<div
style="
position:absolute;
top:-60px;
right:-60px;
width:220px;
height:220px;
background:rgba(255,255,255,.08);
border-radius:50%;
"
></div>

<div class="position-relative z-2">

<div class="d-flex justify-content-between align-items-center flex-wrap gap-4">

<div>

<div class="opacity-75 mb-2">

<?= $isArabic
? 'مساحة المؤلف'
: 'Author Workspace' ?>

</div>

<h2 class="fw-bold mb-3">

<?= ad_h($confTitle) ?>

</h2>

<div class="opacity-75 fs-5">

<?= $isArabic
? 'إدارة الأبحاث والتحكيم والنسخ النهائية'
: 'Research Submission & Review Management' ?>

</div>

<div class="mt-4 d-flex flex-wrap gap-3">

<div class="meta-chip text-dark bg-white">

<i class="fa fa-file-lines"></i>

<?= (int)($stats['total'] ?? 0) ?>

<?= $isArabic
? 'بحث'
: 'Submissions' ?>

</div>

<div class="meta-chip text-dark bg-white">

<i class="fa fa-check-circle"></i>

<?= (int)($stats['accepted'] ?? 0) ?>

<?= $isArabic
? 'مقبول'
: 'Accepted' ?>

</div>

<div class="meta-chip text-dark bg-white">

<i class="fa fa-rotate"></i>

<?= (int)($stats['revision_required'] ?? 0) ?>

<?= $isArabic
? 'تعديل'
: 'Revisions' ?>

</div>

</div>

</div>

<div class="d-flex flex-column gap-2">

<a
class="btn btn-light btn-lg rounded-pill fw-bold"
href="/easychair/author/submit"
>

<i class="fa fa-file-circle-plus"></i>

<?= $isArabic
? 'إرسال بحث جديد'
: 'Submit New Paper' ?>

</a>

<a
class="btn btn-outline-light rounded-pill fw-bold"
href="/easychair/conference/<?= urlencode(
$_SESSION['conference_slug']
?? (
$conference['slug']
?? ('conference-' . (int)($_SESSION['conference_id'] ?? 0))
)
) ?>"
>

<?= $isArabic
? 'صفحة المؤتمر'
: 'Conference Homepage' ?>

</a>

</div>

</div>

</div>

</div>

</div>    

<?php

$deadlineCards = [];

if (!empty($conference['submission_deadline'])) {

    $deadlineCards[] = [
        'icon'  => 'fa-file-circle-plus',
        'title' => $isArabic
            ? 'آخر موعد للتقديم'
            : 'Submission Deadline',
        'date'  => $conference['submission_deadline'],
        'class' => 'primary'
    ];
}

if (!empty($conference['review_deadline'])) {

    $deadlineCards[] = [
        'icon'  => 'fa-user-check',
        'title' => $isArabic
            ? 'آخر موعد للتحكيم'
            : 'Review Deadline',
        'date'  => $conference['review_deadline'],
        'class' => 'warning'
    ];
}

if (!empty($conference['camera_ready_deadline'])) {

    $deadlineCards[] = [
        'icon'  => 'fa-upload',
        'title' => $isArabic
            ? 'آخر موعد للنسخة النهائية'
            : 'Camera Ready Deadline',
        'date'  => $conference['camera_ready_deadline'],
        'class' => 'success'
    ];
}

?>

<?php if (!empty($deadlineCards)): ?>

<div class="row g-3 mb-4">

<?php foreach ($deadlineCards as $d): ?>

<div class="col-lg-4">

<div
class="card border-0 shadow-sm h-100"
style="border-radius:22px;"
>

<div class="card-body">

<div class="d-flex align-items-center gap-3">

<div
class="rounded-circle bg-<?= ad_h($d['class']) ?> text-white d-flex align-items-center justify-content-center"
style="
width:58px;
height:58px;
font-size:22px;
"
>

<i class="fa <?= ad_h($d['icon']) ?>"></i>

</div>

<div>

<div class="fw-bold">

<?= ad_h($d['title']) ?>

</div>

<div class="text-muted">

<?= ad_h($d['date']) ?>

</div>

</div>

</div>

</div>

</div>

</div>

<?php endforeach; ?>

</div>

<?php endif; ?>    

<div class="card border-0 shadow-sm mb-4" style="border-radius:22px;">

<div class="card-body">

<h5 class="fw-bold mb-4">

<?= $isArabic
? 'مراحل سير العمل'
: 'Workflow Progress' ?>

</h5>

<div class="d-flex flex-wrap gap-3">

<?php

$workflowLabels = [

'submission' => [
    'ar' => 'التقديم',
    'en' => 'Submission'
],

'screening' => [
    'ar' => 'الفحص',
    'en' => 'Screening'
],

'review' => [
    'ar' => 'التحكيم',
    'en' => 'Review'
],

'revision' => [
    'ar' => 'التعديل',
    'en' => 'Revision'
],

'decision' => [
    'ar' => 'القرار',
    'en' => 'Decision'
],

'production' => [
    'ar' => 'الإنتاج',
    'en' => 'Production'
],

'published' => [
    'ar' => 'النشر',
    'en' => 'Published'
],

];

?>

<?php foreach ($workflowLabels as $k => $label): ?>

<span class="workflow-pill <?= empty($workflow[$k]) ? 'off' : '' ?>">

<?= !empty($workflow[$k]) ? '●' : '○' ?>

<?= $isArabic
? $label['ar']
: $label['en'] ?>

</span>

<?php endforeach; ?>

</div>

</div>

</div>

    <div class="row g-3 mb-4">
        <?php
        $cards = [
            ['label'=>'كل التقديمات', 'value'=>$stats['total'] ?? 0],
            ['label'=>'مسودة', 'value'=>$stats['draft'] ?? 0],
            ['label'=>'تم التقديم', 'value'=>$stats['submitted'] ?? 0],
            ['label'=>'قيد التحكيم', 'value'=>$stats['under_review'] ?? 0],
            ['label'=>'تعديل مطلوب', 'value'=>$stats['revision_required'] ?? 0],
            ['label'=>'مقبول', 'value'=>$stats['accepted'] ?? 0],
        ];
        ?>
        <?php foreach ($cards as $c): ?>
            <div class="col-xl-2 col-md-4 col-6">
                <div class="card author-kpi-card h-100">
                    <div class="card-body">
                        <div class="author-kpi-label"><?= ad_h($c['label']) ?></div>
                        <div class="author-kpi-value"><?= (int)$c['value'] ?></div>
                    </div>
                </div>
            </div>
        <?php endforeach; ?>
    </div>

<?php

$pendingRevision =
    (int)($stats['revision_required'] ?? 0);

$acceptedCount =
    (int)($stats['accepted'] ?? 0);

?>

<?php if ($pendingRevision > 0): ?>

<div class="alert alert-warning border-0 shadow-sm mb-4" style="border-radius:18px;">

<i class="fa fa-rotate"></i>

<?= $isArabic
? "لديك {$pendingRevision} بحث يحتاج إلى تعديل."
: "You have {$pendingRevision} submissions requiring revision." ?>

</div>

<?php endif; ?>

<div
class="
card
border-0
shadow-sm
rounded-4
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'مركز أوامر المؤلف'
:
'Author Command Center'
?>

</h4>

</div>

</div>

<div class="row g-3">

<?php

$cards=[

[
$isArabic
?
'التعديلات'
:
'Revisions',

$workflowSummary[
'revision_queue'
]
],

[
$isArabic
?
'القرارات'
:
'Pending',

$workflowSummary[
'decision_pending'
]
],

[
$isArabic
?
'المراجعات'
:
'Reviews',

$workflowSummary[
'unread_reviews'
]
],

[
$isArabic
?
'جاهز للنشر'
:
'Published',

$workflowSummary[
'camera_ready'
]
]

];

?>

<?php foreach(
$cards
as $c
): ?>

<div class="col-lg-3">

<div
class="
border
rounded-4
p-4
text-center
"
>

<div
class="
display-6
fw-bold
"
>

<?= (int)$c[1] ?>

</div>

<div
class="
text-muted
"
>

<?= $c[0] ?>

</div>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

</div>

<?php if ($acceptedCount > 0): ?>

<div class="alert alert-success border-0 shadow-sm mb-4" style="border-radius:18px;">

<i class="fa fa-check-circle"></i>

<?= $isArabic
? "تهانينا! لديك {$acceptedCount} بحث مقبول."
: "Congratulations! You have {$acceptedCount} accepted papers." ?>

</div>

<?php endif; ?>

<?php

$acceptedRows = array_values(array_filter($submissions, function($x) {
    $status = strtolower((string)($x['status'] ?? ''));
    $decision = strtolower((string)($x['decision'] ?? ''));

    return in_array($status, ['accepted','published','camera_ready'], true)
        || in_array($decision, ['accept','accepted'], true);
}));

$revisionRows =
array_filter(

$submissions,

fn($x)=>

in_array(

strtolower(
$x['status']
?? ''
),

[
'revision_required',
'revised'
],

true
)

);

$reviewRows =
array_filter(

$submissions,

fn($x)=>

(
(int)(
$x['reviews_count']
?? 0
)
)>0

);

?>

<div class="row g-4 mb-4">

<div class="col-lg-6">

<div
class="card border-0 shadow-sm"
style="
border-radius:24px;
"
>

<div class="card-body">

<h5
class="fw-bold mb-4"
>

<i class="fa fa-rotate"></i>

<?= $isArabic
?
'مركز التعديلات'
:
'Revision Center'
?>

</h5>

<?php if(
count(
$revisionRows
)
): ?>

<?php foreach(
array_slice(
$revisionRows,
0,
5
)
as $r
): ?>

<div
class="
border
rounded-4
p-3
mb-3
"
>

<div
class="
fw-bold
"
>

<?= ad_h(
$r[
'display_title'
]
?? ''
) ?>

</div>

<div
class="
small
text-muted
mb-3
"
>

<?= ad_h(
$r[
'status'
]
?? ''
) ?>

</div>

<a
class="
btn
btn-warning
btn-sm
rounded-pill
"

href="/easychair/author/workflow?submission_id=<?= (int)$r['id'] ?>"
>

<?= $isArabic
?
'فتح التعديل'
:
'Open Revision'
?>

</a>

</div>

<?php endforeach; ?>

<?php else: ?>

<div
class="
text-muted
py-4
"
>

<?= $isArabic
?
'لا توجد تعديلات مطلوبة حالياً'
:
'No revisions required'
?>

</div>

<?php endif; ?>

</div>

</div>

</div>

<div
class="
card
border-0
shadow-sm
rounded-4
mb-4
"
>

<div class="card-body">

<h5 class="fw-bold mb-4">

<?= $isArabic
?
'المخطط الزمني'
:
'Submission Timeline'
?>

</h5>

<div
class="
card
border-0
shadow-sm
rounded-4
mb-4
"
>

<div class="card-body">

<h5 class="fw-bold mb-4">

<?= $isArabic
?
'الاستعداد للقرار'
:
'Decision Preparation'
?>

</h5>

<div
class="
card
border-0
shadow-sm
rounded-4
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'جاهزية النشر'
:
'Publication Readiness'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'تتبع جاهزية النسخة النهائية'
:
'Track final publication readiness'
?>

</div>

</div>

<div
style="
font-size:42px;
font-weight:900;
color:#2563eb;
"
>

<?= (int)
(
$publicationReadiness[
'ready_score'
]
??
0
) ?>%

</div>

</div>

<div
class="
progress
mb-4
"
style="
height:10px
"
>

<div
class="
progress-bar
"
style="
width:
<?= (int)
(
$publicationReadiness[
'ready_score'
]
??
0
) ?>%
"
></div>

</div>

<div class="row g-3">

<div class="col-lg-4">

<div
class="
border
rounded-4
p-4
text-center
"
>

<div class="display-6">

<?= count(
$publicationReadiness[
'accepted'
]
) ?>

</div>

<div>

<?= $isArabic
?
'مقبولة'
:
'Accepted'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div
class="
border
rounded-4
p-4
text-center
"
>

<div class="display-6">

<?= count(
$publicationReadiness[
'camera_ready'
]
) ?>

</div>

<div>

Camera Ready

</div>

</div>

</div>

<div class="col-lg-4">

<div
class="
border
rounded-4
p-4
text-center
"
>

<div class="display-6">

<?= count(
$publicationReadiness[
'blockers'
]
) ?>

</div>

<div>





<?= $isArabic
?
'عوائق'
:
'Blockers'
?>

</div>

</div>

</div>


<div class="row g-3">

<?php

foreach(

array_slice(

$reviewExplorer[
'decision_ready'
],

0,

4

)

as $x

):

?>

<div class="col-lg-3">

<div
class="
border
rounded-4
p-3
"
>

<div class="fw-bold">

<?= ad_h(
$x[
'display_title'
]
??
''
) ?>

</div>

<div class="small text-muted mb-3">

<?= (int)(
$x[
'reviews_count'
]
??
0
) ?>

Reviews

</div>

<a
class="
btn
btn-outline-primary
btn-sm
"
href="/easychair/author/submission/show?id=<?= (int)$x['id'] ?>"
>

Open

</a>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

</div>


<div
class="
row
g-4
mb-4
">

<?php

$panels=[

[
$isArabic
?
'إعادة الرفع'
:
'Reupload',

'reupload',

'fa-upload',

'warning'
],

[
$isArabic
?
'الرد على المراجعات'
:
'Review Response',

'response',

'fa-comments',

'primary'
],

[
$isArabic
?
'الإصدارات الجاهزة'
:
'Camera Ready',

'camera',

'fa-file-circle-check',

'success'
]

];

?>

<?php foreach(
$panels
as $panel
): ?>

<div class="col-lg-4">

<div
class="
card
border-0
shadow-sm
rounded-4
h-100
">

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<h5>

<i
class="
fa
<?= $panel[2] ?>
"
></i>

<?= $panel[0] ?>

</h5>

<span
class="
badge
bg-<?= $panel[3] ?>
"
>

<?= count(
$submissionWorkspace[
$panel[1]
]
) ?>

</span>

</div>

<?php

$list=
array_slice(

$submissionWorkspace[
$panel[1]
],

0,

3

);

?>

<?php if(
$list
): ?>

<?php foreach(
$list
as $x
): ?>

<div
class="
border
rounded-4
p-3
mb-3
"
>

<div
class="
fw-bold
mb-2
"
>

<?= ad_h(
$x[
'display_title'
]
??
''
) ?>

</div>

<div
class="
small
text-muted
mb-3
"
>

<?= ad_h(
$x[
'status'
]
??
''
) ?>

</div>

<div
class="
d-flex
gap-2
flex-wrap
"
>

<a
class="
btn
btn-sm
btn-outline-primary
"

href="/easychair/author/submission/show?id=<?= (int)$x['id'] ?>"
>

Open

</a>

<?php if(
$panel[1]
==='reupload'
): ?>

<a
class="
btn
btn-sm
btn-warning
"

href="/easychair/author/workflow?submission_id=<?= (int)$x['id'] ?>"
>

Upload

</a>

<?php endif; ?>

</div>

</div>

<?php endforeach; ?>

<?php else: ?>

<div
class="
text-muted
py-4
"
>

<?= $isArabic
?
'لا يوجد عناصر'
:
'No items'
?>

</div>

<?php endif; ?>

</div>

</div>

</div>


</div>

<div
class="
card
border-0
shadow-sm
rounded-4
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<h4 class="fw-bold">

<?= $isArabic
?
'مستكشف المراجعات'
:
'Review Explorer'
?>

</h4>

</div>

<div class="row g-4">

<?php

$groups=[

[
'decision_ready',

$isArabic
?
'جاهز للقرار'
:
'Decision Ready',

'success'

],

[
'version_ready',

$isArabic
?
'مقارنة الإصدارات'
:
'Version Compare',

'warning'

],

[
'needs_response',

$isArabic
?
'بانتظار الرد'
:
'Response Required',

'primary'

],

[
'accepted',

$isArabic
?
'مقبول'
:
'Accepted',

'dark'

]

];

?>

<?php foreach(
$groups
as $g
): ?>

<div class="col-lg-3">

<div
class="
border
rounded-4
p-4
h-100
"
>

<div
class="
badge
bg-<?= $g[2] ?>
mb-3
"
>

<?= count(
$reviewExplorer[
$g[0]
]
) ?>

</div>

<h6>

<?= $g[1] ?>

</h6>

<?php

foreach(

array_slice(

$reviewExplorer[
$g[0]
],

0,

3

)

as $x

):

?>

<div
class="
small
mb-3
"
>

<div
class="
fw-bold
"
>

<?= ad_h(
$x[
'display_title'
]
??
''
) ?>

</div>

<div
class="
text-muted
"
>

<?= ad_h(
$x[
'status'
]
??
''
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

</div>

<div
class="
border-start
ps-4
mb-4
"
>

<div class="fw-bold">

<?= ad_h(
$s[
'display_title'
]
??
''
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$s[
'status'
]
??
''
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$s[
'updated_at'
]
??
$s[
'submitted_at'
]
??
''
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

</div>

</div>

</div>

</div>

<div class="col-lg-6">

<div
class="
card
border-0
shadow-sm
"
style="
border-radius:24px;
"
>

<div class="card-body">

<h5
class="
fw-bold
mb-4
"
>

<i class="fa fa-comments"></i>

<?= $isArabic
?
'ملخص التحكيم'
:
'Review Summary'
?>

</h5>

<?php if(
count(
$reviewRows
)
): ?>

<?php foreach(
array_slice(
$reviewRows,
0,
5
)
as $r
): ?>

<div
class="
border
rounded-4
p-3
mb-3
"
>

<div
class="
fw-bold
"
>

<?= ad_h(
$r[
'display_title'
]
?? ''
) ?>

</div>

<div
class="
small
text-muted
mb-2
"
>

<?= $isArabic
?
'عدد المراجعات'
:
'Reviews'
?>

:

<?= (int)(
$r[
'reviews_count'
]
?? 0
) ?>

</div>

<div
class="
small
text-muted
mb-3
"
>

<?= $isArabic
?
'المعدل'
:
'Average'
?>

:

<?= ad_h(

$r[
'reviews_avg_score'
]
??

'-'

) ?>

</div>

<a
class="
btn
btn-outline-primary
btn-sm
rounded-pill
"

href="/easychair/author/submission/reviews?id=<?= (int)$r['id'] ?>"
>

<?= $isArabic
?
'عرض المراجعات'
:
'View Reviews'
?>

</a>

</div>

<?php endforeach; ?>

<?php else: ?>

<div
class="
text-muted
py-4
"
>

<?= $isArabic
?
'لا توجد مراجعات منشورة'
:
'No published reviews'
?>

</div>

<?php endif; ?>

</div>

</div>

</div>

</div>
    

</div>
</div>
</div>

<style>

.author-wide-zone{

width:100%;

display:block;

margin-top:40px;

}

.author-wide-zone>.card{

width:100%!important;

max-width:none!important;

margin-bottom:32px;

}

.author-wide-zone .row{

width:100%;

}

.author-wide-zone .col-lg-3,
.author-wide-zone .col-lg-4,
.author-wide-zone .col-xl-3,
.author-wide-zone .col-xl-4{

width:100%;

flex:0 0 100%;

}

.author-wide-zone .display-6{

font-size:48px;

}

</style>

<div class="author-wide-zone">

<div>

<div
class="
card
ec-card
mb-4
"
>

<div
class="
card-body
"
>

<div
class="
ec-section-title
"
>

<h4>

<?= $isArabic
?
'الذكاء التنفيذي للمؤلف'
:
'Author Executive Center'
?>

</h4>

</div>

<!-- PACK 625 — Acceptance Journey -->

<div
class="
card
border-0
shadow-sm
rounded-4
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'رحلة القبول'
:
'Acceptance Journey'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'متابعة الأبحاث المقبولة والنشر'
:
'Track accepted submissions and publication path'
?>

</div>

</div>

<div>

<span
class="
badge
bg-success
fs-6
"
>

<?= count(
$publicationReadiness[
'accepted'
]
?? []
) ?>

</span>

</div>

</div>

<?php

$acceptedJourney
=
array_slice(

$publicationReadiness[
'accepted'
]
??
[],

0,

10

);

?>

<?php if(
!empty(
$acceptedJourney
)
): ?>

<?php foreach(
$acceptedJourney
as $x
): ?>

<?php

$cameraReady=
!empty(
$x[
'camera_ready_file'
]
)
||
!empty(
$x[
'final_file'
]
);

?>

<div
class="
border-start
border-4
border-success
ps-4
mb-4
"
>

<div
class="
fw-bold
mb-2
"
>

<?= ad_h(
$x[
'display_title'
]
??
(
$x[
'title'
]
??
''
)
) ?>

</div>

<div
class="
small
text-muted
mb-3
"
>

<?= ad_h(
$x[
'status'
]
??
''
) ?>

</div>

<div
class="
d-flex
gap-2
flex-wrap
"
>

<span
class="
badge
<?= $cameraReady
?
'bg-success'
:
'bg-warning text-dark'
?>
"
>

<?= $cameraReady

?

(
$isArabic
?
'النسخة النهائية جاهزة'
:
'Camera Ready'
)

:

(
$isArabic
?
'بانتظار النسخة النهائية'
:
'Awaiting Final Version'
)

?>

</span>

<?php if(
!empty(
$x[
'published_at'
]
)
): ?>

<span
class="
badge
bg-primary
"
>

<?= $isArabic
?
'منشور'
:
'Published'
?>

</span>

<?php endif; ?>

</div>

<div
class="
mt-3
d-flex
gap-2
flex-wrap
"
>

<a
class="
btn
btn-sm
btn-outline-primary
"

href="/easychair/author/submission/show?id=<?= (int)$x['id'] ?>"
>

<?= $isArabic
?
'فتح'
:
'Open'
?>

</a>

<?php if(
!$cameraReady
): ?>

<a
class="
btn
btn-sm
btn-warning
"

href="/easychair/author/workflow?submission_id=<?= (int)$x['id'] ?>"
>

<?= $isArabic
?
'رفع النسخة النهائية'
:
'Upload Final'
?>

</a>

<?php endif; ?>

</div>

</div>

<?php endforeach; ?>

<?php else: ?>

<div
class="
text-center
text-muted
py-5
"
>

<i
class="
fa
fa-award
fa-2x
mb-3
d-block
"
></i>

<?= $isArabic
?
'لا توجد أبحاث مقبولة حتى الآن'
:
'No accepted submissions yet'
?>

</div>

<?php endif; ?>

</div>

</div>

<!-- END PACK 625 -->

<!-- PACK 626 -->

<div
class="
card
border-0
shadow-sm
rounded-4
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'مساحة تعاون المؤلفين'
:
'Collaboration Workspace'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'تنسيق المؤلفين وحوكمة التقديم'
:
'Co-author coordination and submission governance'
?>

</div>

</div>

</div>

<div class="row g-3">

<?php

$cards=[

[
'multi_author',

$isArabic
?
'مشاريع مشتركة'
:
'Shared Papers',

'primary'
],

[
'needs_coordination',

$isArabic
?
'بحاجة لتنسيق'
:
'Needs Coordination',

'warning'
],

[
'governance_alert',

$isArabic
?
'تنبيهات'
:
'Governance',

'danger'
],

[
'ready_to_submit',

$isArabic
?
'جاهزة'
:
'Ready',

'success'
]

];

?>

<?php foreach(
$cards
as $c
): ?>

<div class="col-lg-3">

<div
class="
border
rounded-4
p-4
text-center
"
>

<div
class="
display-6
fw-bold
text-<?= $c[2] ?>
"
>

<?= count(
$collaborationWorkspace[
$c[0]
]
?? []
) ?>

</div>

<div>

<?= $c[1] ?>

</div>

</div>

</div>

<?php endforeach; ?>

</div>

<hr>

<div class="row g-3">

<?php foreach(

array_slice(

$collaborationWorkspace[
'needs_coordination'
]
??
[],

0,

4

)

as $x

): ?>

<div class="col-lg-3">

<div
class="
border
rounded-4
p-3
h-100
"
>

<div
class="
fw-bold
mb-2
"
>

<?= ad_h(
$x[
'display_title'
]
??
''
) ?>

</div>

<div
class="
small
text-muted
mb-3
"
>

<?= $isArabic
?
'عدد المؤلفين'
:
'Authors'
?>

:

<?= (int)(
$x[
'authors_count'
]
??
1
) ?>

</div>

<a
class="
btn
btn-sm
btn-outline-primary
"

href="/easychair/author/submission/show?id=<?= (int)$x['id'] ?>"
>

<?= $isArabic
?
'فتح'
:
'Open'
?>

</a>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

</div>

<!-- END PACK 626 -->

<!-- PACK 627 -->

<div
class="
card
border-0
shadow-sm
rounded-4
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'مركز التواصل'
:
'Communication Hub'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'الإشعارات والتفاعل مع المحكمين'
:
'Notifications and reviewer interaction'
?>

</div>

</div>

<div>

<span
class="
badge
bg-danger
fs-6
"
>

<?= (int)(
$communicationHub[
'notifications'
]
??
0
) ?>

</span>

</div>

</div>

<div class="row g-3">

<?php

$commCards=[

[
'reviewer_ready',

$isArabic
?
'مراجعات'
:
'Reviews',

'primary'
],

[
'waiting_author',

$isArabic
?
'بانتظار الرد'
:
'Awaiting Response',

'warning'
],

[
'conversation',

$isArabic
?
'نشطة'
:
'Active',

'success'
]

];

?>

<?php foreach(
$commCards
as $c
): ?>

<div class="col-lg-4">

<div
class="
border
rounded-4
p-4
text-center
"
>

<div
class="
display-6
fw-bold
text-<?= $c[2] ?>
"
>

<?= count(
$communicationHub[
$c[0]
]
?? []
) ?>

</div>

<div>

<?= $c[1] ?>

</div>

</div>

</div>

<?php endforeach; ?>

</div>

<hr>

<?php foreach(

array_slice(

$communicationHub[
'waiting_author'
]
??
[],

0,

5

)

as $x

): ?>

<div
class="
border
rounded-4
p-3
mb-3
"
>

<div
class="
fw-bold
mb-2
"
>

<?= ad_h(
$x[
'display_title'
]
??
''
) ?>

</div>

<div
class="
small
text-muted
mb-3
"
>

<?= (int)(
$x[
'reviews_count'
]
??
0
) ?>

<?= $isArabic
?
'مراجعات'
:
'reviews'
?>

</div>

<div
class="
d-flex
gap-2
flex-wrap
"
>

<a
class="
btn
btn-sm
btn-outline-primary
"

href="/easychair/author/submission/show?id=<?= (int)$x['id'] ?>"
>

<?= $isArabic
?
'فتح'
:
'Open'
?>

</a>

<a
class="
btn
btn-sm
btn-warning
"

href="/easychair/author/workflow?submission_id=<?= (int)$x['id'] ?>"
>

<?= $isArabic
?
'إعداد الرد'
:
'Prepare Response'
?>

</a>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 627 -->

<!-- PACK 628 -->

<div
class="
card
border-0
shadow-sm
rounded-4
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'المحفظة البحثية'
:
'Research Portfolio'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'تحليلات الأداء البحثي والنشر'
:
'Research and publication analytics'
?>

</div>

</div>

<div
style="
font-size:40px;
font-weight:900;
color:#2563eb;
"
>

<?= (int)
(
$researchPortfolio[
'impact_score'
]
??
0
) ?>

</div>

</div>

<div class="row g-3 mb-4">

<?php

$metrics=[

[
$totalSubmissions
??
count(
$submissions
),

$isArabic
?
'الإجمالي'
:
'Total'
],

[
$researchPortfolio[
'accepted'
],

$isArabic
?
'مقبول'
:
'Accepted'
],

[
$researchPortfolio[
'published'
],

$isArabic
?
'منشور'
:
'Published'
],

[
$researchPortfolio[
'acceptance_rate'
]
.'%',

$isArabic
?
'معدل القبول'
:
'Acceptance'
]

];

?>

<?php foreach(
$metrics
as $m
): ?>

<div class="col-lg-3">

<div
class="
border
rounded-4
p-4
text-center
"
>

<div
class="
display-6
fw-bold
"
>

<?= $m[0] ?>

</div>

<div>

<?= $m[1] ?>

</div>

</div>

</div>

<?php endforeach; ?>

</div>

<div
class="
progress
mb-4
"
style="
height:10px
"
>

<div
class="
progress-bar
"
style="
width:
<?= (int)
(
$researchPortfolio[
'acceptance_rate'
]
??
0
) ?>%
"
></div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'رحلة البحث'
:
'Research Journey'
?>

</h5>

<?php foreach(

array_slice(

$researchPortfolio[
'portfolio'
],

0,

5

)

as $x

): ?>

<div
class="
border-start
ps-4
mb-4
"
>

<div class="fw-bold">

<?= ad_h(
$x[
'display_title'
]
??
''
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$x[
'status'
]
??
''
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 628 -->

<!-- PACK 629 -->

<div
class="
card
border-0
shadow-sm
rounded-4
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'الهوية الأكاديمية'
:
'Academic Identity'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'ملف الباحث والمساهمات'
:
'Research profile and contributions'
?>

</div>

</div>

<div
style="
font-size:42px;
font-weight:900;
color:#2563eb;
"
>

<?= (int)
(
$academicIdentity[
'identity_score'
]
??
0
) ?>

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= count(
$academicIdentity[
'conferences'
]
) ?>

</div>

<div>

<?= $isArabic
?
'مؤتمرات'
:
'Conferences'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= count(
$academicIdentity[
'tracks'
]
) ?>

</div>

<div>

Tracks

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= (int)
(
$academicIdentity[
'published'
]
??
0
) ?>

</div>

<div>

Published

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'الخط الزمني'
:
'Contribution Timeline'
?>

</h5>

<?php foreach(

array_slice(

$academicIdentity[
'timeline'
],

0,

8

)

as $t

): ?>

<div
class="
border-start
ps-4
mb-4
"
>

<div class="fw-bold">

<?= ad_h(
$t[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$t[
'status'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$t[
'date'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 629 -->

<!-- PACK 630 -->

<div
class="
card
border-0
shadow-sm
rounded-4
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'التحليلات المهنية'
:
'Career Analytics'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'النمو البحثي والشبكة الأكاديمية'
:
'Research growth and academic network'
?>

</div>

</div>

<div
style="
font-size:42px;
font-weight:900;
color:#2563eb;
"
>

<?= (int)
(
$careerAnalytics[
'growth_score'
]
??
0
) ?>

</div>

</div>

<div class="row g-3 mb-4">

<?php

$careerCards=[

[
count(
$careerAnalytics[
'institutions'
]
),

$isArabic
?
'جهات'
:
'Institutions'
],

[
count(
$careerAnalytics[
'active_years'
]
),

$isArabic
?
'سنوات'
:
'Years'
],

[
(int)(
$careerAnalytics[
'network_score'
]
??
0
),

$isArabic
?
'الشبكة'
:
'Network'
]

];

?>

<?php foreach(
$careerCards
as $c
): ?>

<div class="col-lg-4">

<div
class="
border
rounded-4
p-4
text-center
"
>

<div
class="
display-6
fw-bold
"
>

<?= $c[0] ?>

</div>

<div>

<?= $c[1] ?>

</div>

</div>

</div>

<?php endforeach; ?>

</div>

<h5 class="fw-bold mb-4">

<?= $isArabic
?
'المحفظة المؤسسية'
:
'Institutional Portfolio'
?>

</h5>

<?php foreach(

array_slice(

$careerAnalytics[
'portfolio'
],

0,

6

)

as $x

): ?>

<div
class="
border-start
ps-4
mb-4
"
>

<div class="fw-bold">

<?= ad_h(
$x[
'display_title'
]
??
''
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$x[
'organization_name'
]
??
''
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 630 -->

<!-- PACK 631 -->

<div
class="
card
border-0
shadow-sm
rounded-4
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'التخطيط الاستراتيجي'
:
'Strategic Planning'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'خريطة الطريق البحثية'
:
'Research roadmap and future pipeline'
?>

</div>

</div>

<div
style="
font-size:42px;
font-weight:900;
color:#2563eb;
"
>

<?= (int)
(
$strategicPlanning[
'roadmap_score'
]
??
0
) ?>

</div>

</div>

<div class="row g-3 mb-4">

<?php

$cards=[

[
'pipeline',

$isArabic
?
'الخط القادم'
:
'Pipeline'

],

[
'action_required',

$isArabic
?
'إجراءات'
:
'Actions'

],

[
'future_ready',

$isArabic
?
'جاهز للمستقبل'
:
'Future'

],

[
'stalled',

$isArabic
?
'متوقف'
:
'Stalled'

]

];

?>

<?php foreach(
$cards
as $c
): ?>

<div class="col-lg-3">

<div
class="
border
rounded-4
p-4
text-center
"
>

<div
class="
display-6
fw-bold
"
>

<?= count(
$strategicPlanning[
$c[0]
]
?? []
) ?>

</div>

<div>

<?= $c[1] ?>

</div>

</div>

</div>

<?php endforeach; ?>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'الخطوات القادمة'
:
'Next Actions'
?>

</h5>

<?php foreach(

array_slice(

$strategicPlanning[
'action_required'
]
??
[],

0,

6

)

as $x

): ?>

<div
class="
border-start
ps-4
mb-4
"
>

<div class="fw-bold">

<?= ad_h(
$x[
'display_title'
]
??
''
) ?>

</div>

<div class="small text-muted mb-2">

<?= ad_h(
$x[
'status'
]
??
''
) ?>

</div>

<a
class="
btn
btn-sm
btn-outline-primary
"

href="/easychair/author/submission/show?id=<?= (int)$x['id'] ?>"
>

<?= $isArabic
?
'إدارة'
:
'Manage'
?>

</a>

</div>

<?php endforeach; ?>

</div>

</div>



<!-- END PACK 631 -->

<!-- PACK 632 -->

<div class="card border-0 shadow-sm rounded-4 mb-4">

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
">

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'مركز التنفيذ'
:
'Execution Center'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'إدارة المهام والمواعيد'
:
'Manage actions and deadlines'
?>

</div>

</div>

<div
style="
font-size:42px;
font-weight:900;
color:#2563eb;
"
>

<?= (int)(
$executionCenter[
'execution_score'
]
??
0
) ?>

</div>

</div>

<div class="row g-3">

<?php

$cards=[

[
'urgent',

$isArabic
?
'عاجل'
:
'Urgent',

'danger'
],

[
'active',

$isArabic
?
'نشطة'
:
'Active',

'primary'
],

[
'overdue',

$isArabic
?
'متأخرة'
:
'Overdue',

'warning'
],

[
'ready',

$isArabic
?
'جاهزة'
:
'Ready',

'success'
]

];

?>

<?php foreach($cards as $c): ?>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div
class="
display-6
fw-bold
text-<?= $c[2] ?>
">

<?= count(
$executionCenter[
$c[0]
]
?? []
) ?>

</div>

<div>

<?= $c[1] ?>

</div>

</div>

</div>

<?php endforeach; ?>

</div>

<hr>

<?php foreach(

array_slice(

$executionCenter[
'urgent'
]
??
[],

0,

5

)

as $x

): ?>

<div
class="
border-start
border-danger
border-4
ps-4
mb-4
">

<div class="fw-bold">

<?= ad_h(
$x[
'display_title'
]
??
''
) ?>

</div>

<div class="small text-muted mb-3">

<?= ad_h(
$x[
'status'
]
??
''
) ?>

</div>

<a
class="
btn
btn-sm
btn-outline-danger
"

href="/easychair/author/submission/show?id=<?= (int)$x['id'] ?>"
>

<?= $isArabic
?
'تنفيذ'
:
'Execute'
?>

</a>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 632 -->


<!-- PACK 633 -->

<div
class="
card
author-card
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'نظام تشغيل المؤلف'
:
'Author Operating System'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'محاكاة القرار وإدارة دورة حياة البحث'
:
'Decision simulation and research lifecycle'
?>

</div>

</div>

<div
class="
display-6
fw-bold
text-primary
"
>

<?= (int)
(
$operatingSystem[
'publish_ready'
]
??
0
) ?>

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-6">

<div
class="
border
rounded-4
p-4
text-center
"
>

<div class="display-6">

<?= (int)
(
$operatingSystem[
'decision_ready'
]
??
0
) ?>

</div>

<div>

<?= $isArabic
?
'جاهزة للقرار'
:
'Decision Ready'
?>

</div>

</div>

</div>

<div class="col-lg-6">

<div
class="
border
rounded-4
p-4
text-center
"
>

<div class="display-6">

<?= count(
$operatingSystem[
'next_action'
]
??
[]
) ?>

</div>

<div>

<?= $isArabic
?
'إجراءات قادمة'
:
'Next Actions'
?>

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'دورة حياة الأبحاث'
:
'Research Lifecycle'
?>

</h5>

<?php foreach(

array_slice(

$operatingSystem[
'lifecycle'
]
??
[],

0,

6

)

as $x

): ?>

<div
class="
border-start
ps-4
mb-3
"
>

<div class="fw-bold">

<?= ad_h(
$x[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$x[
'status'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 633 -->


<!-- PACK 634 -->

<div
class="
card
author-card
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'رادار الفرص'
:
'Opportunity Radar'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'التوقعات وفرص التقديم'
:
'Forecast and submission opportunities'
?>

</div>

</div>

<div
class="
display-6
fw-bold
text-success
"
>

<?= (int)
(
$opportunityRadar[
'forecast'
]
??
0
) ?>

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-6">

<div
class="
border
rounded-4
p-4
text-center
"
>

<div class="display-6">

<?= (int)
(
$opportunityRadar[
'active'
]
??
0
) ?>

</div>

<div>

<?= $isArabic
?
'نشطة'
:
'Active'
?>

</div>

</div>

</div>

<div class="col-lg-6">

<div
class="
border
rounded-4
p-4
text-center
"
>

<div class="display-6">

<?= (int)
(
$opportunityRadar[
'accepted'
]
??
0
) ?>

</div>

<div>

<?= $isArabic
?
'مقبولة'
:
'Accepted'
?>

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'الجدول الزمني'
:
'Timeline'
?>

</h5>

<?php foreach(

array_slice(

$opportunityRadar[
'timeline'
]
??
[],

0,

5

)

as
$x

): ?>

<div
class="
border-start
ps-4
mb-3
"
>

<div class="fw-bold">

<?= ad_h(
$x[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$x[
'status'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 634 -->

<!-- PACK 635 -->

<div
class="
card
author-card
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'مركز القيادة البحثي'
:
'Research Command Center'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'خط سير التقديمات وخريطة التقدم'
:
'Pipeline and progress heatmap'
?>

</div>

</div>

<div
class="
display-6
fw-bold
text-danger
"
>

<?= (int)
(
$researchCommandCenter[
'score'
]
??
0
) ?>

</div>

</div>

<div class="row g-3">

<?php foreach(

array_slice(

$researchCommandCenter[
'heatmap'
]
??
[],

0,

6

)

as
$x

): ?>

<div class="col-lg-4">

<div
class="
border
rounded-4
p-3
"
>

<div class="fw-bold mb-2">

<?= ad_h(
$x[
'title'
]
) ?>

</div>

<div
class="
progress
mb-2
"
style="
height:12px
"
>

<div
class="
progress-bar
"

style="
width:
<?= (int)
$x[
'value'
] ?>%
"

>

</div>

</div>

<div
class="
small
text-muted
"
>

<?= (int)
$x[
'value'
] ?>%

</div>

</div>

</div>

<?php endforeach; ?>

</div>

<hr>

<div
class="
text-center
"
>

<span
class="
badge
bg-success
fs-6
"
>

<?= count(
$researchCommandCenter[
'pipeline'
]
??
[]
) ?>

<?= $isArabic
?
'عنصر نشط'
:
'Active Items'
?>

</span>

</div>

</div>

</div>

<!-- END PACK 635 -->

<!-- PACK 636 -->

<div class="card author-card mb-4">

<div class="card-body">

<div class="d-flex justify-content-between align-items-center mb-4">

<div>

<h4 class="fw-bold">

<?= $isArabic ? 'الذكاء الأكاديمي' : 'Academic Intelligence' ?>

</h4>

<div class="text-muted">

<?= $isArabic ? 'سمعة المؤتمر وجاهزية الاقتباس والنشر' : 'Conference reputation, citation readiness and publication maturity' ?>

</div>

</div>

<div class="display-6 fw-bold text-primary">

<?= count($acceptedRows ?? []) * 25 + count($reviewRows ?? []) * 5 ?>

</div>

</div>

<div class="row g-3">

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center h-100">

<div class="display-6 fw-bold text-success">

<?= count($acceptedRows ?? []) ?>

</div>

<div>

<?= $isArabic ? 'أبحاث مقبولة' : 'Accepted Papers' ?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center h-100">

<div class="display-6 fw-bold text-primary">

<?= count($reviewRows ?? []) ?>

</div>

<div>

<?= $isArabic ? 'أبحاث لها مراجعات' : 'Reviewed Papers' ?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center h-100">

<div class="display-6 fw-bold text-warning">

<?= count(array_filter($submissions ?? [], fn($x)=>!empty($x['doi']) || !empty($x['published_at']))) ?>

</div>

<div>

<?= $isArabic ? 'جاهزية الاقتباس' : 'Citation Ready' ?>

</div>

</div>

</div>

</div>

<hr>

<h5 class="fw-bold mb-3">

<?= $isArabic ? 'جاهزية النشر والاقتباس' : 'Publication & Citation Readiness' ?>

</h5>

<?php foreach(array_slice($acceptedRows ?? [],0,5) as $x): ?>

<div class="border-start border-4 border-success ps-4 mb-3">

<div class="fw-bold">

<?= ad_h($x['display_title'] ?? $x['title'] ?? '') ?>

</div>

<div class="small text-muted">

<?= ad_h($x['status'] ?? '') ?>

</div>

<?php if(!empty($x['doi']) || !empty($x['published_at'])): ?>

<span class="badge bg-success mt-2">

<?= $isArabic ? 'جاهز للاقتباس' : 'Citation Ready' ?>

</span>

<?php else: ?>

<span class="badge bg-warning text-dark mt-2">

<?= $isArabic ? 'بانتظار بيانات النشر' : 'Awaiting Publication Metadata' ?>

</span>

<?php endif; ?>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 636 -->


<!-- PACK 637 -->

<div
class="
card
author-card
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'ذكاء النشر'
:
'Publication Intelligence'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'جاهزية النشر والتأثير'
:
'Publication readiness and impact'
?>

</div>

</div>

<div
class="
display-6
fw-bold
text-success
"
>

<?= (int)(
$publicationIntelligence['impact']
??0
) ?>

</div>

</div>

<div class="row g-3">

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= count(
$publicationIntelligence['ready']
??[]
) ?>

</div>

<div>

<?= $isArabic
?
'جاهزة'
:
'Ready'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= count(
$publicationIntelligence['blocked']
??[]
) ?>

</div>

<div>

<?= $isArabic
?
'متوقفة'
:
'Blocked'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= (int)(
$publicationIntelligence['published']
??0
) ?>

</div>

<div>

<?= $isArabic
?
'منشورة'
:
'Published'
?>

</div>

</div>

</div>

</div>

</div>

</div>

<!-- END PACK 637 -->

<!-- PACK 640 -->

<?php

$careerAccepted=
count(
$acceptedRows
??
[]
);

$careerReviewed=
count(
$reviewRows
??
[]
);

$careerTotal=
max(
1,
count(
$submissions
??
[]
)
);

$careerScore=
round(
(
(
$careerAccepted
*
60
)
+
(
$careerReviewed
*
20
)
)
/
$careerTotal
);

$careerMomentum=
round(
(
$careerReviewed
/
$careerTotal
)
*
100
);

$careerForecast=
min(
100,
(
$careerScore
+
$careerMomentum
)
/
2
);

?>

<div
class="
card
author-card
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'المسار الأكاديمي'
:
'Career Trajectory'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'الزخم البحثي والتوقعات'
:
'Research momentum and forecast'
?>

</div>

</div>

<div
class="
display-6
fw-bold
text-success
"
>

<?= $careerForecast ?>%

</div>

</div>

<div class="row g-3">

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $careerScore ?>

</div>

<div>

<?= $isArabic
?
'النضج'
:
'Maturity'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $careerMomentum ?>%

</div>

<div>

<?= $isArabic
?
'الزخم'
:
'Momentum'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $careerAccepted ?>

</div>

<div>

<?= $isArabic
?
'منشورات مستقبلية'
:
'Forecast'
?>

</div>

</div>

</div>

</div>

</div>

</div>

<!-- END PACK 640 -->

<!-- PACK 641 -->

<?php

$repAccepted=
count(
$acceptedRows
??
[]
);

$repReviewed=
count(
$reviewRows
??
[]
);

$repTotal=
max(
1,
count(
$submissions
??
[]
)
);

$repScore=
min(
100,
round(
(
(
$repAccepted
*
50
)
+
(
$repReviewed
*
15
)
)
/
$repTotal
)
);

$reviewScore=0;

foreach(
(
$submissions
??
[]
)
as
$rs
){

$reviewScore+=
(float)(
$rs[
'reviews_avg_score'
]
??
$rs[
'avg_score'
]
??
0
);

}

$sentiment=
min(
100,
round(
(
$reviewScore
/
max(
1,
$repTotal
)
)
*
20
)
);

$quality=
round(
(
$repScore
+
$sentiment
)
/
2
);

?>

<div
class="
card
author-card
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'محرك السمعة'
:
'Reputation Engine'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'مشاعر المحكمين وجودة التقديم'
:
'Reviewer sentiment and quality radar'
?>

</div>

</div>

<div
class="
display-6
fw-bold
text-primary
"
>

<?= $quality ?>%

</div>

</div>

<div class="row g-3">

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $repScore ?>

</div>

<div>

<?= $isArabic
?
'السمعة'
:
'Reputation'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $sentiment ?>

</div>

<div>

<?= $isArabic
?
'الانطباع'
:
'Sentiment'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $quality ?>

</div>

<div>

<?= $isArabic
?
'الجودة'
:
'Quality'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $repAccepted ?>

</div>

<div>

<?= $isArabic
?
'قبول'
:
'Accepted'
?>

</div>

</div>

</div>

</div>

<hr>

<?php foreach(

array_slice(
$submissions
??
[],
0,
5

)

as
$s

): ?>

<div
class="
border-start
ps-4
mb-3
"
>

<div class="fw-bold">

<?= ad_h(
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
)
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$s[
'status'
]
??
''
) ?>

—

<?= (float)(
$s[
'reviews_avg_score'
]
??
$s[
'avg_score'
]
??
0
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 641 -->

<!-- PACK 642 -->

<?php

$influence=
min(

100,

(
count(
$acceptedRows
??
[]
)
*
25
)

+

(
count(
$reviewRows
??
[]
)
*
10
)

);

$identity=
round(

(
$influence
+
(
$careerForecast
??
0
)
)
/
2

);

$ecosystem=
count(
$submissions
??
[]
)
*
15;

?>

<div
class="
card
author-card
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'خريطة التأثير'
:
'Influence Map'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'الهوية البحثية والنظام العلمي'
:
'Research identity and publication ecosystem'
?>

</div>

</div>

<div
class="
display-6
fw-bold
text-info
"
>

<?= $identity ?>

</div>

</div>

<div class="row g-3">

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $influence ?>

</div>

<div>

<?= $isArabic
?
'التأثير'
:
'Influence'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $identity ?>

</div>

<div>

<?= $isArabic
?
'الهوية'
:
'Identity'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $ecosystem ?>

</div>

<div>

<?= $isArabic
?
'النظام'
:
'Ecosystem'
?>

</div>

</div>

</div>

</div>

</div>

</div>

<!-- END PACK 642 -->

<!-- PACK 643 -->

<?php

$revisionQueue=[];

$cameraReady=[];

$publicationOps=[];

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

if(
$status==='revision_required'
){
$revisionQueue[]=$s;
}

if(
$status==='accepted'
){
$cameraReady[]=$s;
}

if(
in_array(

$status,

[
'accepted',
'published'
],

true
)
){
$publicationOps[]=$s;
}

}

$health=
min(

100,

(
count(
$cameraReady
)
*
30
)

+

(
count(
$publicationOps
)
*
10
)

);

?>

<div
class="
card
author-card
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'مركز قيادة المؤلف'
:
'Author Mission Control'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'إدارة التعديلات والنشر'
:
'Revision and publication operations'
?>

</div>

</div>

<div
class="
display-6
fw-bold
text-success
"
>

<?= $health ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= count(
$revisionQueue
) ?>

</div>

<div>

<?= $isArabic
?
'تعديلات'
:
'Revisions'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= count(
$cameraReady
) ?>

</div>

<div>

<?= $isArabic
?
'نسخة نهائية'
:
'Camera Ready'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= count(
$publicationOps
) ?>

</div>

<div>

<?= $isArabic
?
'النشر'
:
'Publication'
?>

</div>

</div>

</div>

</div>

<?php foreach(

array_slice(

$revisionQueue,

0,

5

)

as
$x

): ?>

<div
class="
border-start
ps-4
mb-3
"
>

<div class="fw-bold">

<?= ad_h(
$x[
'display_title'
]
??
(
$x[
'title'
]
??
''
)
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$x[
'status'
]
??
''
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 643 -->

<!-- PACK 644 -->

<?php

$sharedDrafts=[];

$contributors=0;

$revisionOwners=0;

foreach(
(
$submissions
??
[]
)
as
$s
){

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

$authors=
$s[
'authors_string'
]
??
$s[
'authors'
]
??
'';

$list=
array_filter(
array_map(
'trim',
explode(
',',
(string)$authors
)
)
);

$cnt=
max(
1,
count(
$list
)
);

$contributors+=$cnt;

if(
$cnt>1
){
$sharedDrafts[]=
[
'title'=>$title,
'count'=>$cnt
];
}

if(
strtolower(
(string)(
$s[
'status'
]
??
''
)
)
==='revision_required'
){
$revisionOwners++;
}

}

$governance=
min(
100,
(
count(
$sharedDrafts
)
*
20
)
+
(
$revisionOwners
*
10
)
);

?>

<div
class="
card
author-card
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'مساحة التعاون'
:
'Collaboration Workspace'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'المسودات المشتركة وحوكمة المؤلفين'
:
'Shared drafts and contributor governance'
?>

</div>

</div>

<div
class="
display-6
fw-bold
text-primary
"
>

<?= $governance ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= count(
$sharedDrafts
) ?>

</div>

<div>

<?= $isArabic
?
'مشاريع مشتركة'
:
'Shared Drafts'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $contributors ?>

</div>

<div>

<?= $isArabic
?
'المساهمون'
:
'Contributors'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $revisionOwners ?>

</div>

<div>

<?= $isArabic
?
'بحاجة لتنسيق'
:
'Needs Coordination'
?>

</div>

</div>

</div>

</div>

<?php foreach(

array_slice(
$sharedDrafts,
0,
5

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
"
>

<div class="fw-bold">

<?= ad_h(
$row[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= $row[
'count'
] ?>

<?= $isArabic
?
'مؤلفين'
:
'Authors'
?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 644 -->

<!-- PACK 645 -->

<?php

$vault=[];

$memory=[];

$continuity=0;

foreach(
(
$submissions
??
[]
)
as
$s
){

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

$created=
$s[
'submitted_at'
]
??
$s[
'created_at'
]
??
'';

$vault[]=[

'title'=>$title,

'status'=>$status,

'date'=>$created

];

if(
!empty(
$s[
'revision_file'
]
)
||
!empty(
$s[
'response_letter_path'
]
)
||
!empty(
$s[
'file_path'
]
)
){

$memory[]=$s;

}

if(
in_array(

$status,

[
'revision_required',
'accepted',
'published'
],

true
)
){
$continuity+=20;
}

}

$continuity=
min(
100,
$continuity
);

?>

<div
class="
card
author-card
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'مخزن المعرفة'
:
'Knowledge Vault'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'ذاكرة التقديم واستمرارية البحث'
:
'Submission memory and research continuity'
?>

</div>

</div>

<div
class="
display-6
fw-bold
text-secondary
"
>

<?= $continuity ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= count(
$vault
) ?>

</div>

<div>

<?= $isArabic
?
'الأرشيف'
:
'Archive'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= count(
$memory
) ?>

</div>

<div>

<?= $isArabic
?
'الذاكرة'
:
'Memory'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $continuity ?>

</div>

<div>

<?= $isArabic
?
'الاستمرارية'
:
'Continuity'
?>

</div>

</div>

</div>

</div>

<?php foreach(

array_slice(

$vault,

0,

6

)

as
$item

): ?>

<div
class="
border-start
ps-4
mb-3
"
>

<div class="fw-bold">

<?= ad_h(
$item[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$item[
'status'
]
) ?>

—

<?= ad_h(
$item[
'date'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 645 -->

<!-- PACK 646 -->

<?php

$portfolio=[];

$timeline=[];

$contribution=0;

$maturity=0;

foreach(
(
$submissions
??
[]
)
as
$s
){

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

$date=
$s[
'updated_at'
]
??
$s[
'submitted_at'
]
??
'';

$portfolio[]=[

'title'=>$title,

'status'=>$status,

'date'=>$date

];

$timeline[]=
$date;

if(
in_array(

$status,

[
'accepted',
'published'
],

true
)
){
$contribution+=30;
}

elseif(
$status==='under_review'
){
$contribution+=15;
}

$maturity+=
match(
$status
){

'draft'=>5,

'submitted'=>20,

'screening'=>35,

'under_review'=>60,

'revision_required'=>80,

'accepted'=>95,

'published'=>100,

default=>10

};

}

$timelineCount=
count(
array_filter(
$timeline
)
);

$maturity=
count(
$submissions
??[]
)
?
round(
$maturity
/
count(
$submissions
)
)
:
0;

$portfolioScore=
min(
100,
$contribution
);

?>

<div
class="
card
author-card
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'المحفظة البحثية'
:
'Research Portfolio'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'السجل الأكاديمي وتتبع المساهمات'
:
'Academic timeline and contribution ledger'
?>

</div>

</div>

<div
class="
display-6
fw-bold
text-dark
"
>

<?= $portfolioScore ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= count(
$portfolio
) ?>

</div>

<div>

<?= $isArabic
?
'الإجمالي'
:
'Portfolio'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $timelineCount ?>

</div>

<div>

<?= $isArabic
?
'الخط الزمني'
:
'Timeline'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $contribution ?>

</div>

<div>

<?= $isArabic
?
'المساهمة'
:
'Contribution'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $maturity ?>%

</div>

<div>

<?= $isArabic
?
'النضج'
:
'Maturity'
?>

</div>

</div>

</div>

</div>

<?php foreach(

array_slice(
$portfolio,
0,
6

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
"
>

<div class="fw-bold">

<?= ad_h(
$row[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'status'
]
) ?>

—

<?= ad_h(
$row[
'date'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 646 -->

<!-- PACK 647 -->

<?php

$idAccepted=
count(
$acceptedRows
??
[]
);

$idReviewed=
count(
$reviewRows
??
[]
);

$idTotal=
max(
1,
count(
$submissions
??
[]
)
);

$idPublished=
count(
array_filter(
(
$submissions
??
[]
),
fn($x)=>
in_array(
strtolower(
(string)(
$x['status']
??''
)
),
[
'published'
],
true
)
)
);

$identityScore=
min(
100,
(
$idAccepted
*
20
)
+
(
$idPublished
*
30
)
+
(
$idReviewed
*
5
)
);

$impactLedger=
round(
(
$identityScore
+
(
$idPublished
*
10
)
)
/
2
);

$growth=
min(
100,
round(
(
(
$idAccepted
+
$idReviewed
)
/
$idTotal
)
*
100
)
);

$momentum=
round(
(
$growth
+
$impactLedger
)
/
2
);

?>

<div
class="
card
author-card
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'الهوية الأكاديمية'
:
'Academic Identity'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'الأثر والنمو البحثي'
:
'Impact and research growth'
?>

</div>

</div>

<div
class="
display-6
fw-bold
text-primary
"
>

<?= $identityScore ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $identityScore ?>

</div>

<div>

<?= $isArabic
?
'الهوية'
:
'Identity'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $impactLedger ?>

</div>

<div>

<?= $isArabic
?
'الأثر'
:
'Impact'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $growth ?>

</div>

<div>

<?= $isArabic
?
'النمو'
:
'Growth'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $momentum ?>

</div>

<div>

<?= $isArabic
?
'الزخم'
:
'Momentum'
?>

</div>

</div>

</div>

</div>

<?php foreach(

array_slice(
(
$submissions
??
[]
),
0,
5

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
"
>

<div class="fw-bold">

<?= ad_h(
$row[
'display_title'
]
??
(
$row[
'title'
]
??
''
)
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'status'
]
??
''
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 647 -->

<!-- PACK 648 -->

<?php

$plannerAccepted=
count(
$acceptedRows
??
[]
);

$plannerReviewed=
count(
$reviewRows
??
[]
);

$plannerTotal=
max(
1,
count(
$submissions
??
[]
)
);

$plannerRoad=[];

$milestones=0;

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

$plannerRoad[]=[

'title'=>$title,

'status'=>$status

];

if(
in_array(

$status,

[
'accepted',
'published'
],

true
)
){
$milestones++;
}

}

$plannerScore=
min(
100,
round(
(
(
$plannerAccepted
*
60
)
+
(
$plannerReviewed
*
20
)
)
/
$plannerTotal
)
);

$nextActions=
max(
0,
5-
$milestones
);

?>

<div
class="
card
author-card
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'المخطط الاستراتيجي'
:
'Strategic Planner'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'خارطة الطريق والإنجازات'
:
'Submission roadmap and milestones'
?>

</div>

</div>

<div
class="
display-6
fw-bold
text-success
"
>

<?= $plannerScore ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $plannerScore ?>

</div>

<div>

<?= $isArabic
?
'الجاهزية'
:
'Readiness'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $milestones ?>

</div>

<div>

<?= $isArabic
?
'الإنجازات'
:
'Milestones'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $nextActions ?>

</div>

<div>

<?= $isArabic
?
'الخطوات القادمة'
:
'Next Actions'
?>

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'خريطة الطريق'
:
'Roadmap'
?>

</h5>

<?php foreach(

array_slice(

$plannerRoad,

0,

6

)

as
$r

): ?>

<div
class="
border-start
ps-4
mb-3
"
>

<div class="fw-bold">

<?= ad_h(
$r[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$r[
'status'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 648 -->

<!-- PACK 649 -->

<?php

$executionTotal=
max(
1,
count(
$submissions
??
[]
)
);

$executionCompleted=0;

$goalQueue=[];

$outcomes=[];

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

if(
in_array(

$status,

[
'accepted',
'published'
],

true
)
){
$executionCompleted++;
}

if(
in_array(

$status,

[
'revision_required',
'under_review',
'accepted'
],

true
)
){

$goalQueue[]=[

'title'=>$title,

'status'=>$status

];

}

$outcomes[]=
$status;

}

$executionScore=
round(
(
$executionCompleted
/
$executionTotal
)
*
100
);

$progress=
min(
100,
(
count(
$goalQueue
)
*
15
)
);

$outcomeScore=
min(
100,
(
count(
array_filter(
$outcomes,
fn($x)=>
$x==='published'
)
)
*
50
)
+
(
$executionCompleted
*
10
)
);

?>

<div
class="
card
author-card
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'مركز التنفيذ'
:
'Execution Hub'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'الأهداف والمخرجات البحثية'
:
'Goal tracking and research outcomes'
?>

</div>

</div>

<div
class="
display-6
fw-bold
text-danger
"
>

<?= $executionScore ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $executionScore ?>

</div>

<div>

<?= $isArabic
?
'التنفيذ'
:
'Execution'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $progress ?>

</div>

<div>

<?= $isArabic
?
'التقدم'
:
'Progress'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $outcomeScore ?>

</div>

<div>

<?= $isArabic
?
'المخرجات'
:
'Outcomes'
?>

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'قائمة التنفيذ'
:
'Execution Queue'
?>

</h5>

<?php foreach(

array_slice(
$goalQueue,
0,
6

)

as
$r

): ?>

<div
class="
border-start
ps-4
mb-3
"
>

<div class="fw-bold">

<?= ad_h(
$r[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$r[
'status'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 649 -->

<!-- PACK 650 -->

<?php

$osTotal=
max(
1,
count(
$submissions
??
[]
)
);

$osAccepted=
count(
$acceptedRows
??
[]
);

$osReviewed=
count(
$reviewRows
??
[]
);

$osPublished=
count(
array_filter(
(
$submissions
??
[]
),
fn($x)=>
strtolower(
(string)(
$x[
'status'
]
??
''
)
)
==='published'
)
);

$velocity=
min(
100,
round(
(
(
$osReviewed
*
40
)
+
(
$osAccepted
*
60
)
)
/
$osTotal
)
);

$command=
min(
100,
(
$osPublished
*
30
)
+
(
$osAccepted
*
10
)
);

$longitudinal=
round(
(
$velocity
+
$command
)
/
2
);

$operating=
round(
(
$longitudinal
+
(
$careerForecast
??
0
)
+
(
$identityScore
??
0
)
)
/
3
);

$health=
min(
100,
round(
(
$operating
+
$velocity
)
/
2
));

?>

<div
class="
card
author-card
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'نظام تشغيل المؤلف'
:
'Author Operating System'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'القيادة الأكاديمية والتحليل الطولي'
:
'Academic command deck and longitudinal intelligence'
?>

</div>

</div>

<div
class="
display-5
fw-bold
text-success
"
>

<?= $operating ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $velocity ?>

<div>

<div>

<?= $isArabic
?
'السرعة'
:
'Velocity'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $command ?>

</div>

<div>

<?= $isArabic
?
'القيادة'
:
'Command'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $longitudinal ?>

</div>

<div>

<?= $isArabic
?
'التحليل'
:
'Intelligence'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $health ?>

</div>

<div>

<?= $isArabic
?
'الصحة'
:
'Health'
?>

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'لوحة القيادة'
:
'Command Deck'
?>

</h5>

<?php foreach(

array_slice(
(
$submissions
??
[]
),
0,
6

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
"
>

<div class="fw-bold">

<?= ad_h(
$row[
'display_title'
]
??
(
$row[
'title'
]
??
''
)
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'status'
]
??
''
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 650 -->

<!-- PACK 651 -->

<?php

$lifeStages=[];

$autoQueue=[];

$accepted=0;

$published=0;

$revisions=0;

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

$lifeStages[]=
$status;

if(
$status==='accepted'
){
$accepted++;
}

if(
$status==='published'
){
$published++;
}

if(
$status==='revision_required'
){
$revisions++;

$autoQueue[]=[

'title'=>$title,

'action'=>
(
$isArabic
?
'إعادة التقديم'
:
'Resubmit'
)

];

}

if(
$status==='under_review'
){

$autoQueue[]=[

'title'=>$title,

'action'=>
(
$isArabic
?
'انتظار القرار'
:
'Await Decision'
)

];

}

}

$lifeScore=
min(
100,

(
$accepted
*
20
)

+

(
$published
*
40
)

);

$automation=
min(
100,

(
count(
$autoQueue
)
*
15
)

);

$governance=
round(
(
$lifeScore
+
$automation
)
/
2
);

$stability=
min(
100,

100-
(
$revisions
*
10
)

);

?>

<div
class="
card
author-card
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'ذكاء دورة الحياة'
:
'Life Cycle Intelligence'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'الحوكمة والأتمتة'
:
'Decision automation and governance'
?>

</div>

</div>

<div
class="
display-5
fw-bold
text-primary
"
>

<?= $governance ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $lifeScore ?>

</div>

<div>

<?= $isArabic
?
'الدورة'
:
'Lifecycle'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $automation ?>

</div>

<div>

<?= $isArabic
?
'الأتمتة'
:
'Automation'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $governance ?>

</div>

<div>

<?= $isArabic
?
'الحوكمة'
:
'Governance'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $stability ?>

</div>

<div>

<?= $isArabic
?
'الاستقرار'
:
'Stability'
?>

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'قائمة القرار'
:
'Decision Queue'
?>

</h5>

<?php foreach(

array_slice(
$autoQueue,
0,
6

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
"
>

<div class="fw-bold">

<?= ad_h(
$row[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'action'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 651 -->

<!-- PACK 652 -->

<?php

$continuum=[];

$published=0;

$accepted=0;

$active=0;

$steering=[];

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

$continuum[]=
$status;

if(
$status==='published'
){
$published++;
}

if(
$status==='accepted'
){
$accepted++;
}

if(
!in_array(

$status,

[
'rejected',
'withdrawn'
],

true
)
){
$active++;
}

if(
in_array(

$status,

[
'accepted',
'revision_required',
'under_review'
],

true
)
){

$steering[]=[

'title'=>$title,

'status'=>$status

];

}

}

$continuity=
min(
100,
(
$published
*
40
)
+
(
$accepted
*
20
)
);

$governance=
min(
100,
round(
(
$active
/
max(
1,
count(
$submissions
??
[]
)
)
)
*
100
)
);

$steeringScore=
round(
(
$continuity
+
$governance
)
/
2
);

?>

<div
class="
card
author-card
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'استمرارية البحث'
:
'Research Continuum'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'حوكمة المحفظة والتوجيه'
:
'Portfolio governance and publication steering'
?>

</div>

</div>

<div
class="
display-5
fw-bold
text-success
"
>

<?= $steeringScore ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $continuity ?>

</div>

<div>

<?= $isArabic
?
'الاستمرارية'
:
'Continuity'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $governance ?>

</div>

<div>

<?= $isArabic
?
'الحوكمة'
:
'Governance'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $steeringScore ?>

</div>

<div>

<?= $isArabic
?
'التوجيه'
:
'Steering'
?>

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'قائمة التوجيه'
:
'Steering Queue'
?>

</h5>

<?php foreach(

array_slice(
$steering,
0,
6

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
"
>

<div class="fw-bold">

<?= ad_h(
$row[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'status'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 652 -->

<!-- PACK 653 -->

<?php

$capital=0;

$operations=0;

$assets=[];

$master=[];

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

if(
$status==='published'
){
$capital+=50;
}

elseif(
$status==='accepted'
){
$capital+=30;
}

elseif(
$status==='under_review'
){
$capital+=15;
}

if(
!empty(
$s[
'file_path'
]
)
){
$assets[]=$title;
}

if(
in_array(

$status,

[
'under_review',
'revision_required',
'accepted'
],

true
)
){

$master[]=[

'title'=>$title,

'status'=>$status

];

}

}

$operations=
min(
100,
round(
(
count(
$master
)
/
max(
1,
count(
$submissions
??
[]
)
)
)
*
100
)
);

$capital=
min(
100,
$capital
);

$workspace=
round(
(
$capital
+
$operations
)
/
2
);

?>

<div
class="
card
author-card
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'مساحة العمل الرئيسية'
:
'Master Workspace'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'رأس المال البحثي والعمليات الأكاديمية'
:
'Research capital and academic operations'
?>

</div>

</div>

<div
class="
display-5
fw-bold
text-primary
"
>

<?= $workspace ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $capital ?>

</div>

<div>

<?= $isArabic
?
'رأس المال'
:
'Capital'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $operations ?>

</div>

<div>

<?= $isArabic
?
'العمليات'
:
'Operations'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= count(
$assets
) ?>

</div>

<div>

<?= $isArabic
?
'الأصول'
:
'Assets'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= count(
$master
) ?>

</div>

<div>

<?= $isArabic
?
'نشطة'
:
'Active'
?>

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'مركز العمليات'
:
'Operations Center'
?>

</h5>

<?php foreach(

array_slice(
$master,
0,
6

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
"
>

<div class="fw-bold">

<?= ad_h(
$row[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'status'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 653 -->

<!-- PACK 654 -->

<?php

$decisionQueue=[];

$pipeline=0;

$blocked=0;

$published=0;

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

if(
in_array(

$status,

[
'under_review',
'revision_required',
'accepted'
],

true
)
){

$decisionQueue[]=[

'title'=>$title,

'status'=>$status

];

}

if(
$status==='published'
){
$published++;
}

if(
$status==='revision_required'
){
$blocked++;
}

if(
!in_array(

$status,

[
'rejected',
'withdrawn'
],

true
)
){
$pipeline++;
}

}

$governance=
min(
100,

(
$published
*
35
)

+

(
count(
$decisionQueue
)
*
8
)

);

$pressure=
max(
0,

100-
(
$blocked
*
12
)

);

$control=
round(
(
$governance
+
$pressure
)
/
2
);

?>

<div
class="
card
author-card
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'استوديو القرار'
:
'Decision Studio'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'حوكمة التقديم والتحكم بالنشر'
:
'Submission governance and publication control'
?>

</div>

</div>

<div
class="
display-5
fw-bold
text-danger
"
>

<?= $control ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $governance ?>

</div>

<div>

<?= $isArabic
?
'الحوكمة'
:
'Governance'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $pipeline ?>

</div>

<div>

<?= $isArabic
?
'الخط'
:
'Pipeline'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $pressure ?>

</div>

<div>

<?= $isArabic
?
'الضغط'
:
'Pressure'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= count(
$decisionQueue
) ?>

</div>

<div>

<?= $isArabic
?
'القرارات'
:
'Decisions'
?>

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'قائمة التحكم'
:
'Control Queue'
?>

</h5>

<?php foreach(

array_slice(
$decisionQueue,
0,
6

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
"
>

<div class="fw-bold">

<?= ad_h(
$row[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'status'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 654 -->

<!-- PACK 655 -->

<?php

$executive=[];

$priority=0;

$published=0;

$accepted=0;

$urgent=0;

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

if(
$status==='published'
){
$published++;
}

if(
$status==='accepted'
){
$accepted++;
}

if(
$status==='revision_required'
){
$urgent++;
}

if(
in_array(

$status,

[
'accepted',
'published',
'under_review',
'revision_required'
],

true
)
){

$executive[]=[

'title'=>$title,

'status'=>$status

];

}

}

$board=
min(
100,

(
$published
*
40
)

+

(
$accepted
*
20
)

);

$priority=
min(
100,

(
count(
$executive
)
*
10
)

);

$control=
round(
(
$board
+
$priority
)
/
2
);

$urgency=
max(
0,

100-
(
$urgent
*
12
)

);

?>

<div
class="
card
author-card
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
"
>

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'المكتب التنفيذي'
:
'Executive Office'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'حوكمة البحث والتحكم الاستراتيجي'
:
'Research governance and strategic publication control'
?>

</div>

</div>

<div
class="
display-5
fw-bold
text-primary
"
>

<?= $control ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $board ?>

</div>

<div>

<?= $isArabic
?
'المجلس'
:
'Board'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $priority ?>

</div>

<div>

<?= $isArabic
?
'الأولوية'
:
'Priority'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $urgency ?>

</div>

<div>

<?= $isArabic
?
'الاستقرار'
:
'Stability'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= count(
$executive
) ?>

</div>

<div>

<?= $isArabic
?
'الإجراءات'
:
'Actions'
?>

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'لوحة القرار'
:
'Executive Queue'
?>

</h5>

<?php foreach(

array_slice(
$executive,
0,
6

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
"
>

<div class="fw-bold">

<?= ad_h(
$row[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'status'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 655 -->

<!-- PACK 656 -->

<?php

$workspace=[];

$published=0;

$accepted=0;

$review=0;

$revision=0;

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

if(
$status==='published'
){
$published++;
}

if(
$status==='accepted'
){
$accepted++;
}

if(
$status==='under_review'
){
$review++;
}

if(
$status==='revision_required'
){
$revision++;
}

if(
!in_array(

$status,

[
'rejected',
'withdrawn'
],

true
)
){

$workspace[]=[

'title'=>$title,

'status'=>$status

];

}

}

$readiness=
min(
100,

(
$published
*
35
)

+

(
$accepted
*
20
)

+

(
$review
*
10
)

);

$strategy=
round(
(
$readiness
+
max(
0,
100-
(
$revision
*
10
)
)
)
/
2
);

$operations=
round(
(
count(
$workspace
)
/
max(
1,
count(
$submissions
??
[]
)
)
)
*
100
);

?>

<div
class="
card
author-card
mb-4
"
>

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
">

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'مساحة العمل الموحدة'
:
'Unified Workspace'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'مركز التشغيل والاستراتيجية'
:
'Research operating center and publication strategy'
?>

</div>

</div>

<div
class="
display-5
fw-bold
text-success
">

<?= $strategy ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $readiness ?>

</div>

<div>

<?= $isArabic
?
'الجاهزية'
:
'Readiness'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $operations ?>

</div>

<div>

<?= $isArabic
?
'التشغيل'
:
'Operations'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $strategy ?>

</div>

<div>

<?= $isArabic
?
'الاستراتيجية'
:
'Strategy'
?>

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'المركز الموحد'
:
'Unified Queue'
?>

</h5>

<?php foreach(

array_slice(
$workspace,
0,
6

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
">

<div class="fw-bold">

<?= ad_h(
$row[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'status'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 656 -->

<!-- PACK 657 -->

<?php

$wf=[

'draft'=>0,
'submitted'=>0,
'screening'=>0,
'under_review'=>0,
'revision_required'=>0,
'accepted'=>0,
'published'=>0

];

$workflowQueue=[];

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

if(
isset(
$wf[
$status
]
)
){
$wf[
$status
]++;
}

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

$action=
match(
$status
){

'draft'
=>
(
$isArabic
?
'إكمال التقديم'
:
'Complete Submission'
),

'submitted'
=>
(
$isArabic
?
'انتظار الفرز'
:
'Await Screening'
),

'screening'
=>
(
$isArabic
?
'متابعة القرار'
:
'Track Decision'
),

'under_review'
=>
(
$isArabic
?
'انتظار المراجعة'
:
'Await Reviews'
),

'revision_required'
=>
(
$isArabic
?
'رفع نسخة جديدة'
:
'Upload Revision'
),

'accepted'
=>
(
$isArabic
?
'إعداد النسخة النهائية'
:
'Prepare Camera Ready'
),

'published'
=>
(
$isArabic
?
'تتبع النشر'
:
'Track Publication'
),

default
=>
'-'

};

$workflowQueue[]=[

'title'=>$title,

'status'=>$status,

'action'=>$action

];

}

$total=
max(
1,
count(
$submissions
??
[]
)
);

$workflowHealth=
round(

(
(
$wf[
'accepted'
]
+
$wf[
'published'
]
)
/
$total
)
*
100

);

$workflowReadiness=
round(

(
$workflowHealth
+
(
100-
(
$wf[
'revision_required'
]
*
10
)
)
)
/
2

);

?>

<div class="card author-card mb-4">

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
">

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'برج قيادة البحث'
:
'Research Command Tower'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'ذكاء دورة التقديم'
:
'Submission workflow intelligence'
?>

</div>

</div>

<div
class="
display-5
fw-bold
text-primary
">

<?= $workflowReadiness ?>%

</div>

</div>

<div class="row g-3 mb-4">

<?php foreach($wf as $k=>$v): ?>

<div class="col-lg">

<div class="border rounded-4 p-3 text-center">

<div class="display-6">

<?= $v ?>

</div>

<div
class="small"
>

<?= ucfirst(
str_replace(
'_',
' ',
$k
)
) ?>

</div>

</div>

</div>

<?php endforeach; ?>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'الإجراءات القادمة'
:
'Next Workflow Actions'
?>

</h5>

<?php foreach(

array_slice(
$workflowQueue,
0,
7

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
">

<div class="fw-bold">

<?= ad_h(
$row[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'action'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 657 -->

<!-- PACK 658 -->

<?php

$ops=[];

$reviewLoop=[];

$cameraReady=[];

$published=0;

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

if(
$status==='revision_required'
){

$reviewLoop[]=[

'title'=>$title,

'next'=>
(
$isArabic
?
'رفع النسخة المعدلة'
:
'Upload Revision'
)

];

}

if(
$status==='accepted'
){

$cameraReady[]=[

'title'=>$title,

'next'=>
(
$isArabic
?
'تجهيز النسخة النهائية'
:
'Prepare Camera Ready'
)

];

}

if(
$status==='published'
){
$published++;
}

if(
!in_array(

$status,

[
'rejected',
'withdrawn'
],

true
)
){

$ops[]=[

'title'=>$title,

'status'=>$status

];

}

}

$opsScore=
round(

(
count(
$ops
)
/
max(
1,
count(
$submissions
??
[]
)
)
)
*
100

);

$feedbackScore=
min(

100,

(
count(
$reviewLoop
)
*
20
)

);

$cameraScore=
min(

100,

(
count(
$cameraReady
)
*
25
)

+

(
$published
*
30
)

);

$workspace=
round(
(
$opsScore
+
$feedbackScore
+
$cameraScore
)
/
3
);

?>

<div class="card author-card mb-4">

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
">

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'عمليات التقديم'
:
'Submission Operations'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'حلقة المراجعة والنسخة النهائية'
:
'Reviewer loop and camera ready workspace'
?>

</div>

</div>

<div
class="
display-5
fw-bold
text-success
">

<?= $workspace ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $opsScore ?>

</div>

<div>

<?= $isArabic
?
'العمليات'
:
'Operations'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= count(
$reviewLoop
) ?>

</div>

<div>

<?= $isArabic
?
'المراجعات'
:
'Review Loop'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= count(
$cameraReady
) ?>

</div>

<div>

<?= $isArabic
?
'النسخة النهائية'
:
'Camera Ready'
?>

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'الإجراءات'
:
'Action Queue'
?>

</h5>

<?php foreach(

array_slice(
array_merge(
$reviewLoop,
$cameraReady
),
0,
7

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
">

<div class="fw-bold">

<?= ad_h(
$row[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'next'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 658 -->

<!-- PACK 659 -->

<?php

$launch=[];

$production=[];

$ready=0;

$published=0;

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

if(
$status==='accepted'
){

$production[]=[

'title'=>$title,

'next'=>
(
$isArabic
?
'إكمال النسخة النهائية'
:
'Complete Camera Ready'
)

];

}

if(
$status==='published'
){

$launch[]=[

'title'=>$title,

'next'=>
(
$isArabic
?
'متابعة النشر'
:
'Track Publication'
)

];

$published++;

}

if(
in_array(

$status,

[
'accepted',
'published'
],

true
)
){
$ready++;
}

}

$total=
max(
1,
count(
$submissions
??
[]
)
);

$finalization=
round(
(
$ready
/
$total
)
*
100
);

$productionScore=
min(
100,

(
count(
$production
)
*
20
)

+

(
$published
*
35
)

);

$launchpad=
round(
(
$finalization
+
$productionScore
)
/
2
);

?>

<div class="card author-card mb-4">

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
">

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'استوديو الإطلاق'
:
'Finalization Studio'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'الإنتاج والإطلاق البحثي'
:
'Production workflow and publication launchpad'
?>

</div>

</div>

<div
class="
display-5
fw-bold
text-primary
">

<?= $launchpad ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $finalization ?>

</div>

<div>

<?= $isArabic
?
'الإكمال'
:
'Completion'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $productionScore ?>

</div>

<div>

<?= $isArabic
?
'الإنتاج'
:
'Production'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= count(
$launch
) ?>

</div>

<div>

<?= $isArabic
?
'الإطلاق'
:
'Launchpad'
?>

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'الإجراءات النهائية'
:
'Final Actions'
?>

</h5>

<?php foreach(

array_slice(
array_merge(
$production,
$launch
),
0,
8

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
">

<div class="fw-bold">

<?= ad_h(
$row[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'next'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 659 -->

<!-- PACK 660 -->

<?php

$lifecycle=[];

$negotiation=[];

$ready=0;

$revisions=0;

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

$lifecycle[]=
$status;

if(
$status==='revision_required'
){

$negotiation[]=[

'title'=>$title,

'action'=>
(
$isArabic
?
'الرد على المراجعين'
:
'Respond To Reviewers'
)

];

$revisions++;

}

elseif(
$status==='accepted'
){

$negotiation[]=[

'title'=>$title,

'action'=>
(
$isArabic
?
'رفع النسخة النهائية'
:
'Upload Camera Ready'
)

];

$ready++;

}

elseif(
$status==='published'
){

$ready++;

}

}

$total=
max(
1,
count(
$submissions
??
[]
)
);

$lifecycleScore=
round(
(
$ready
/
$total
)
*
100
);

$negotiationScore=
max(
0,
100-
(
$revisions
*
12
)
);

$readiness=
round(
(
$lifecycleScore
+
$negotiationScore
)
/
2
);

?>

<div class="card author-card mb-4">

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
">

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'دورة حياة التقديم'
:
'Submission Lifecycle'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'المراجعة والاستعداد للنشر'
:
'Reviewer negotiation and publication readiness'
?>

</div>

</div>

<div
class="
display-5
fw-bold
text-success
">

<?= $readiness ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $lifecycleScore ?>

</div>

<div>

<?= $isArabic
?
'الدورة'
:
'Lifecycle'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $negotiationScore ?>

</div>

<div>

<?= $isArabic
?
'التفاوض'
:
'Negotiation'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $ready ?>

</div>

<div>

<?= $isArabic
?
'جاهزة'
:
'Ready'
?>

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'قائمة الإجراءات'
:
'Lifecycle Queue'
?>

</h5>

<?php foreach(

array_slice(
$negotiation,
0,
8

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
">

<div class="fw-bold">

<?= ad_h(
$row[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'action'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 660 -->

<!-- PACK 661 -->

<?php

$office=[];

$decision=[];

$delivered=0;

$ready=0;

$published=0;

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

if(
$status==='accepted'
){

$decision[]=[

'title'=>$title,

'action'=>
(
$isArabic
?
'التحضير للإنتاج'
:
'Prepare Production'
)

];

$ready++;

}

elseif(
$status==='published'
){

$decision[]=[

'title'=>$title,

'action'=>
(
$isArabic
?
'تتبع الإطلاق'
:
'Track Release'
)

];

$published++;

$delivered++;

}

elseif(
$status==='revision_required'
){

$decision[]=[

'title'=>$title,

'action'=>
(
$isArabic
?
'تنفيذ التعديلات'
:
'Execute Revision'
)

];

}

if(
!in_array(

$status,

[
'rejected',
'withdrawn'
],

true
)
){

$office[]=[

'title'=>$title,

'status'=>$status

];

}

}

$total=
max(
1,
count(
$submissions
??
[]
)
);

$officeScore=
round(
(
count(
$office
)
/
$total
)
*
100
);

$delivery=
min(
100,

(
$delivered
*
40
)

+

(
$ready
*
20
)

);

$workspace=
round(
(
$officeScore
+
$delivery
)
/
2
);

?>

<div class="card author-card mb-4">

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
">

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'مكتب النشر'
:
'Publishing Office'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'مساحة القرار وتسليم البحث'
:
'Decision workspace and research delivery'
?>

</div>

</div>

<div
class="
display-5
fw-bold
text-primary
">

<?= $workspace ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $officeScore ?>

</div>

<div>

<?= $isArabic
?
'المكتب'
:
'Office'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $delivery ?>

</div>

<div>

<?= $isArabic
?
'التسليم'
:
'Delivery'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= count(
$decision
) ?>

</div>

<div>

<?= $isArabic
?
'الإجراءات'
:
'Actions'
?>

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'قائمة التنفيذ'
:
'Delivery Queue'
?>

</h5>

<?php foreach(

array_slice(
$decision,
0,
8

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
">

<div class="fw-bold">

<?= ad_h(
$row[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'action'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 661 -->

<!-- PACK 662 -->

<?php

$production=[];

$camera=[];

$completed=[];

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

if(
$status==='accepted'
){

$camera[]=[

'title'=>$title,

'step'=>
(
$isArabic
?
'رفع النسخة النهائية'
:
'Upload Camera Ready'
)

];

}

if(
in_array(

$status,

[
'accepted',
'published'
],

true
)
){

$production[]=[

'title'=>$title,

'status'=>$status

];

}

if(
$status==='published'
){

$completed[]=[

'title'=>$title,

'step'=>
(
$isArabic
?
'النشر مكتمل'
:
'Publication Complete'
)

];

}

}

$total=
max(
1,
count(
$submissions
??
[]
)
);

$cameraScore=
round(
(
count(
$camera
)
/
$total
)
*
100
);

$productionScore=
round(
(
count(
$production
)
/
$total
)
*
100
);

$completion=
round(
(
count(
$completed
)
/
$total
)
*
100
);

$orchestrator=
round(
(
$cameraScore
+
$productionScore
+
$completion
)
/
3
);

?>

<div class="card author-card mb-4">

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
">

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'مكتب الإنتاج'
:
'Production Desk'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'تنسيق النسخة النهائية وإكمال النشر'
:
'Camera ready orchestration and publication completion'
?>

</div>

</div>

<div
class="
display-5
fw-bold
text-success
">

<?= $orchestrator ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $cameraScore ?>

</div>

<div>

<?= $isArabic
?
'النسخة النهائية'
:
'Camera Ready'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $productionScore ?>

</div>

<div>

<?= $isArabic
?
'الإنتاج'
:
'Production'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $completion ?>

</div>

<div>

<?= $isArabic
?
'الإكمال'
:
'Completion'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= count(
$completed
) ?>

</div>

<div>

<?= $isArabic
?
'منشورة'
:
'Published'
?>

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'قائمة الإنتاج'
:
'Production Queue'
?>

</h5>

<?php foreach(

array_slice(
array_merge(
$camera,
$completed
),
0,
8

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
">

<div class="fw-bold">

<?= ad_h(
$row[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'step'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 662 -->

<!-- PACK 663 -->

<?php

$releaseQueue = [];
$assurance = 0;
$published = 0;
$accepted = 0;
$pendingRelease = 0;

foreach (($submissions ?? []) as $s) {

$status = strtolower((string)($s['status'] ?? ''));

$title =
$s['display_title']
??
($s['title'] ?? '');

if ($status === 'published') {
$published++;
}

if ($status === 'accepted') {
$accepted++;
$pendingRelease++;

$releaseQueue[] = [
'title' => $title,
'step' => $isArabic ? 'تأكيد ملفات النشر' : 'Confirm Publication Files'
];
}

if ($status === 'published') {
$releaseQueue[] = [
'title' => $title,
'step' => $isArabic ? 'متابعة الأثر بعد النشر' : 'Track Post-Publication Impact'
];
}

}

$total = max(1, count($submissions ?? []));

$releaseScore = round((($accepted + $published) / $total) * 100);

$assurance = min(100, ($published * 40) + ($accepted * 20));

$controlScore = round(($releaseScore + $assurance) / 2);

?>

<div class="card author-card mb-4">

<div class="card-body">

<div class="d-flex justify-content-between align-items-center mb-4">

<div>

<h4 class="fw-bold">

<?= $isArabic ? 'غرفة التحكم بالنشر' : 'Publication Control Room' ?>

</h4>

<div class="text-muted">

<?= $isArabic ? 'ضمان التسليم ومركز الإطلاق البحثي' : 'Delivery assurance and research release center' ?>

</div>

</div>

<div class="display-5 fw-bold text-primary">

<?= $controlScore ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-3">
<div class="border rounded-4 p-4 text-center">
<div class="display-6"><?= $releaseScore ?></div>
<div><?= $isArabic ? 'الإطلاق' : 'Release' ?></div>
</div>
</div>

<div class="col-lg-3">
<div class="border rounded-4 p-4 text-center">
<div class="display-6"><?= $assurance ?></div>
<div><?= $isArabic ? 'الضمان' : 'Assurance' ?></div>
</div>
</div>

<div class="col-lg-3">
<div class="border rounded-4 p-4 text-center">
<div class="display-6"><?= $pendingRelease ?></div>
<div><?= $isArabic ? 'بانتظار الإطلاق' : 'Pending Release' ?></div>
</div>
</div>

<div class="col-lg-3">
<div class="border rounded-4 p-4 text-center">
<div class="display-6"><?= $published ?></div>
<div><?= $isArabic ? 'منشورة' : 'Published' ?></div>
</div>
</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic ? 'قائمة الإطلاق' : 'Release Queue' ?>

</h5>

<?php foreach (array_slice($releaseQueue, 0, 8) as $row): ?>

<div class="border-start ps-4 mb-3">

<div class="fw-bold">

<?= ad_h($row['title']) ?>

</div>

<div class="small text-muted">

<?= ad_h($row['step']) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 663 -->

<!-- PACK 664 -->

<?php

$ops=[];

$wf=[

'draft'=>0,
'submitted'=>0,
'screening'=>0,
'under_review'=>0,
'revision_required'=>0,
'accepted'=>0,
'published'=>0

];

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

if(
isset(
$wf[
$status
]
)
){
$wf[
$status
]++;
}

$next=
match(
$status
){

'draft'=>
(
$isArabic
?
'إكمال التقديم'
:
'Complete Submission'
),

'submitted'=>
(
$isArabic
?
'انتظار الفرز'
:
'Await Screening'
),

'screening'=>
(
$isArabic
?
'متابعة التقييم'
:
'Track Evaluation'
),

'under_review'=>
(
$isArabic
?
'انتظار المراجعات'
:
'Await Reviews'
),

'revision_required'=>
(
$isArabic
?
'رفع نسخة جديدة'
:
'Upload Revision'
),

'accepted'=>
(
$isArabic
?
'إعداد النسخة النهائية'
:
'Prepare Camera Ready'
),

'published'=>
(
$isArabic
?
'قياس الأثر'
:
'Measure Impact'
),

default=>'-'

};

$ops[]=[

'title'=>$title,

'status'=>$status,

'next'=>$next

];

}

$total=
max(
1,
count(
$submissions
??
[]
)
);

$success=
round(
(
(
$wf[
'accepted'
]
+
(
$wf[
'published'
]
*
2
)
)
/
$total
)
*
100
);

$orchestration=
round(
(
100-
(
$wf[
'revision_required'
]
*
8
)
)
);

$operations=
round(
(
$success
+
max(
0,
$orchestration
)
)
/
2
);

?>

<div class="card author-card mb-4">

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
">

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'مركز العمليات البحثية'
:
'Research Operations Hub'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'تنسيق دورة التقديم والنجاح البحثي'
:
'Workflow orchestration and publication success'
?>

</div>

</div>

<div
class="
display-5
fw-bold
text-success
">

<?= $operations ?>%

</div>

</div>

<div class="row g-3 mb-4">

<?php foreach($wf as $k=>$v): ?>

<div class="col-lg">

<div class="border rounded-4 p-3 text-center">

<div class="display-6">

<?= $v ?>

</div>

<div class="small">

<?= ucfirst(
str_replace(
'_',
' ',
$k
)
) ?>

</div>

</div>

</div>

<?php endforeach; ?>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'مركز التنفيذ'
:
'Operations Queue'
?>

</h5>

<?php foreach(

array_slice(
$ops,
0,
8

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
">

<div class="fw-bold">

<?= ad_h(
$row[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'next'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 664 -->

<!-- PACK 665 -->

<?php

$board=[];

$stats=[

'draft'=>0,
'submitted'=>0,
'screening'=>0,
'under_review'=>0,
'revision_required'=>0,
'accepted'=>0,
'published'=>0

];

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

if(
isset(
$stats[
$status
]
)
){
$stats[
$status
]++;
}

$next=
match(
$status
){

'draft'=>
(
$isArabic
?
'إكمال البيانات'
:
'Complete Metadata'
),

'submitted'=>
(
$isArabic
?
'انتظار الفرز'
:
'Await Screening'
),

'screening'=>
(
$isArabic
?
'متابعة القرار'
:
'Track Decision'
),

'under_review'=>
(
$isArabic
?
'متابعة المحكمين'
:
'Monitor Reviewers'
),

'revision_required'=>
(
$isArabic
?
'رفع تعديل'
:
'Submit Revision'
),

'accepted'=>
(
$isArabic
?
'إعداد النسخة النهائية'
:
'Prepare Camera Ready'
),

'published'=>
(
$isArabic
?
'قياس الأثر'
:
'Measure Impact'
),

default=>'-'

};

$board[]=[

'title'=>$title,

'status'=>$status,

'next'=>$next

];

}

$total=
max(
1,
count(
$submissions
??
[]
)
);

$performance=
round(
(
(
$stats[
'accepted'
]
+
(
$stats[
'published'
]
*
2
)
)
/
$total
)
*
100
);

$delivery=
round(
(
100-
(
$stats[
'revision_required'
]
*
7
)
)
);

$governance=
round(
(
$performance
+
max(
0,
$delivery
)
)
/
2
);

?>

<div class="card author-card mb-4">

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
">

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'حوكمة دورة التقديم'
:
'Submission Governance'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'لوحة الأداء والتسليم البحثي'
:
'Performance board and research delivery intelligence'
?>

</div>

</div>

<div
class="
display-5
fw-bold
text-primary
">

<?= $governance ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $performance ?>

</div>

<div>

<?= $isArabic
?
'الأداء'
:
'Performance'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $delivery ?>

</div>

<div>

<?= $isArabic
?
'التسليم'
:
'Delivery'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $governance ?>

</div>

<div>

<?= $isArabic
?
'الحوكمة'
:
'Governance'
?>

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'مركز المتابعة'
:
'Governance Queue'
?>

</h5>

<?php foreach(

array_slice(
$board,
0,
8

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
">

<div class="fw-bold">

<?= ad_h(
$row[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'next'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 665 -->

<!-- PACK 666 -->

<?php

$resolution=[];

$published=0;

$accepted=0;

$reviewing=0;

$revision=0;

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

$next=
match(
$status
){

'under_review'
=>
(
$isArabic
?
'انتظار المحكمين'
:
'Await Reviewers'
),

'revision_required'
=>
(
$isArabic
?
'إغلاق الملاحظات'
:
'Resolve Comments'
),

'accepted'
=>
(
$isArabic
?
'تجهيز النسخة النهائية'
:
'Prepare Camera Ready'
),

'published'
=>
(
$isArabic
?
'متابعة أثر النشر'
:
'Track Publication Impact'
),

default
=>
(
$isArabic
?
'مراقبة الحالة'
:
'Monitor Status'
)

};

if(
in_array(

$status,

[
'under_review',
'revision_required',
'accepted',
'published'
],

true
)
){

$resolution[]=[

'title'=>$title,

'status'=>$status,

'next'=>$next

];

}

if(
$status==='published'
){
$published++;
}

if(
$status==='accepted'
){
$accepted++;
}

if(
$status==='under_review'
){
$reviewing++;
}

if(
$status==='revision_required'
){
$revision++;
}

}

$total=
max(
1,
count(
$submissions
??
[]
)
);

$office=
round(
(
(
$accepted
+
(
$published
*
2
)
)
/
$total
)
*
100
);

$resolve=
max(
0,
100-
(
$revision
*
10
)
);

$completion=
min(
100,
(
$published
*
40
)
+
(
$accepted
*
20
)
);

$intelligence=
round(
(
$office
+
$resolve
+
$completion
)
/
3
);

?>

<div class="card author-card mb-4">

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
">

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'المكتب البحثي الموحد'
:
'Unified Research Office'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'حل المراجعات وإكمال النشر'
:
'Reviewer resolution and publication completion'
?>

</div>

</div>

<div
class="
display-5
fw-bold
text-success
">

<?= $intelligence ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $office ?>

</div>

<div>

<?= $isArabic
?
'المكتب'
:
'Office'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $resolve ?>

</div>

<div>

<?= $isArabic
?
'الحسم'
:
'Resolution'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $completion ?>

</div>

<div>

<?= $isArabic
?
'الإكمال'
:
'Completion'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $reviewing ?>

</div>

<div>

<?= $isArabic
?
'المراجعات'
:
'Reviews'
?>

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'قائمة الحلول'
:
'Resolution Queue'
?>

</h5>

<?php foreach(

array_slice(
$resolution,
0,
8

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
">

<div class="fw-bold">

<?= ad_h(
$row[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'next'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 666 -->

<!-- PACK 667 -->

<?php

$automation=[];

$draft=0;

$submitted=0;

$review=0;

$revision=0;

$accepted=0;

$published=0;

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

$next=
match(
$status
){

'draft'=>
(
$isArabic
?
'استكمال البيانات'
:
'Complete Metadata'
),

'submitted'=>
(
$isArabic
?
'انتظار الفرز'
:
'Await Screening'
),

'under_review'=>
(
$isArabic
?
'انتظار القرار'
:
'Await Decision'
),

'revision_required'=>
(
$isArabic
?
'تنفيذ التعديلات'
:
'Execute Revision'
),

'accepted'=>
(
$isArabic
?
'إعداد النسخة النهائية'
:
'Prepare Camera Ready'
),

'published'=>
(
$isArabic
?
'تحليل الأثر'
:
'Analyze Impact'
),

default=>
(
$isArabic
?
'متابعة'
:
'Track'
)

};

$automation[]=[

'title'=>$title,

'next'=>$next

];

switch(
$status
){

case 'draft':
$draft++;
break;

case 'submitted':
$submitted++;
break;

case 'under_review':
$review++;
break;

case 'revision_required':
$revision++;
break;

case 'accepted':
$accepted++;
break;

case 'published':
$published++;
break;

}

}

$total=
max(
1,
count(
$submissions
??
[]
)
);

$lifecycle=
round(
(
(
$accepted
+
(
$published
*
2
)
)
/
$total
)
*
100
);

$automationScore=
max(
0,
100-
(
$revision
*
8
)
);

$excellence=
min(
100,
(
$published
*
35
)
+
(
$accepted
*
20
)
);

$center=
round(
(
$lifecycle
+
$automationScore
+
$excellence
)
/
3
);

?>

<div class="card author-card mb-4">

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
">

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'لوحة دورة البحث'
:
'Research Lifecycle Board'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'أتمتة التقديم وتميز النشر'
:
'Submission automation and publication excellence'
?>

</div>

</div>

<div
class="
display-5
fw-bold
text-primary
">

<?= $center ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $lifecycle ?>

</div>

<div>

<?= $isArabic
?
'الدورة'
:
'Lifecycle'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $automationScore ?>

</div>

<div>

<?= $isArabic
?
'الأتمتة'
:
'Automation'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $excellence ?>

</div>

<div>

<?= $isArabic
?
'التميز'
:
'Excellence'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $published ?>

</div>

<div>

<?= $isArabic
?
'منشورة'
:
'Published'
?>

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'مركز الأتمتة'
:
'Automation Queue'
?>

</h5>

<?php foreach(

array_slice(
$automation,
0,
8

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
">

<div class="fw-bold">

<?= ad_h(
$row[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'next'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 667 -->

<!-- PACK 668 -->

<?php

$impact=[];

$published=0;

$accepted=0;

$active=0;

$continuity=0;

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

$next=
match(
$status
){

'published'
=>
(
$isArabic
?
'متابعة الأثر'
:
'Track Impact'
),

'accepted'
=>
(
$isArabic
?
'استكمال النشر'
:
'Complete Publication'
),

'under_review'
=>
(
$isArabic
?
'استمرار المتابعة'
:
'Maintain Continuity'
),

default
=>
(
$isArabic
?
'المتابعة'
:
'Continue'
)

};

if(
!in_array(

$status,

[
'rejected',
'withdrawn'
],

true
)
){
$active++;
}

if(
$status==='published'
){
$published++;
}

if(
$status==='accepted'
){
$accepted++;
}

if(
in_array(

$status,

[
'accepted',
'published',
'under_review'
],

true
)
){

$impact[]=[

'title'=>$title,

'next'=>$next

];

}

}

$total=
max(
1,
count(
$submissions
??
[]
)
);

$ecosystem=
round(
(
$active
/
$total
)
*
100
);

$continuity=
min(
100,

(
$published
*
40
)

+

(
$accepted
*
20
)

);

$impactScore=
round(
(
$ecosystem
+
$continuity
)
/
2
);

$center=
round(
(
$impactScore
+
(
$published
*
10
)
)
);

$center=
min(
100,
$center
);

?>

<div class="card author-card mb-4">

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
">

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'منظومة النشر'
:
'Publication Ecosystem'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'الاستمرارية والأثر العلمي'
:
'Research continuity and scholarly impact'
?>

</div>

</div>

<div
class="
display-5
fw-bold
text-success
">

<?= $center ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $ecosystem ?>

</div>

<div>

<?= $isArabic
?
'المنظومة'
:
'Ecosystem'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $continuity ?>

</div>

<div>

<?= $isArabic
?
'الاستمرارية'
:
'Continuity'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $impactScore ?>

</div>

<div>

<?= $isArabic
?
'الأثر'
:
'Impact'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $published ?>

</div>

<div>

<?= $isArabic
?
'منشورة'
:
'Published'
?>

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'مركز الأثر'
:
'Impact Queue'
?>

</h5>

<?php foreach(

array_slice(
$impact,
0,
8

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
">

<div class="fw-bold">

<?= ad_h(
$row[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'next'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 668 -->

<!-- PACK 669 -->

<?php

$network=[];

$tracks=[];

$states=[];

$accepted=0;

$published=0;

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

$track=
(string)(
$s[
'track_name'
]
??
$s[
'track'
]
??
$s[
'track_id'
]
??
''
);

if(
$track!==''
){
$tracks[
$track
]=true;
}

$states[
$status
]=true;

if(
$status==='accepted'
){
$accepted++;
}

if(
$status==='published'
){
$published++;
}

$network[]=[

'title'=>$title,

'status'=>$status,

'track'=>$track

];

}

$total=
max(
1,
count(
$submissions
??
[]
)
);

$diversity=
round(
(
count(
$tracks
)
/
$total
)
*
100
);

$influence=
min(
100,

(
$published
*
35
)

+

(
$accepted
*
15
)

+

(
count(
$states
)
*
5
)

);

$profile=
round(
(
$diversity
+
$influence
)
/
2
);

$reach=
min(
100,
$profile+
(
count(
$tracks
)
*
3
)
);

?>

<div class="card author-card mb-4">

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
">

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'الملف البحثي العالمي'
:
'Global Research Profile'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'تنوع المشاركة وشبكة التأثير'
:
'Cross-conference intelligence and influence network'
?>

</div>

</div>

<div
class="
display-5
fw-bold
text-primary
">

<?= $reach ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $profile ?>

</div>

<div>

<?= $isArabic
?
'الملف'
:
'Profile'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $diversity ?>

</div>

<div>

<?= $isArabic
?
'التنوع'
:
'Diversity'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $influence ?>

</div>

<div>

<?= $isArabic
?
'التأثير'
:
'Influence'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= count(
$tracks
) ?>

</div>

<div>

<?= $isArabic
?
'المسارات'
:
'Tracks'
?>

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'شبكة التأثير'
:
'Influence Queue'
?>

</h5>

<?php foreach(

array_slice(
$network,
0,
8

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
">

<div class="fw-bold">

<?= ad_h(
$row[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'status'
]
) ?>

<?php if(!empty($row['track'])): ?>

•

<?= ad_h(
$row[
'track'
]
) ?>

<?php endif; ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 669 -->

<!-- PACK 670 -->

<?php

$growth=[];

$published=0;

$accepted=0;

$review=0;

$revision=0;

$tracks=[];

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

$track=
(string)(
$s[
'track_name'
]
??
$s[
'track'
]
??
$s[
'track_id'
]
??
''
);

if(
$track!==''
){
$tracks[
$track
]=true;
}

if(
$status==='published'
){
$published++;
}

if(
$status==='accepted'
){
$accepted++;
}

if(
$status==='under_review'
){
$review++;
}

if(
$status==='revision_required'
){
$revision++;
}

$next=
match(
$status
){

'published'=>
(
$isArabic
?
'قياس الأثر العلمي'
:
'Measure Scholarly Impact'
),

'accepted'=>
(
$isArabic
?
'استكمال الإنتاج'
:
'Complete Production'
),

'under_review'=>
(
$isArabic
?
'متابعة التحكيم'
:
'Monitor Review'
),

'revision_required'=>
(
$isArabic
?
'تنفيذ الملاحظات'
:
'Execute Revision'
),

default=>
(
$isArabic
?
'متابعة'
:
'Track Progress'
)

};

$growth[]=[

'title'=>$title,

'next'=>$next,

'status'=>$status

];

}

$total=
max(
1,
count(
$submissions
??
[]
)
);

$command=
round(
(
(
$accepted
+
(
$published
*
2
)
)
/
$total
)
*
100
);

$engine=
min(
100,

(
$published
*
35
)

+

(
$accepted
*
15
)

+

(
count(
$tracks
)
*
4
)

);

$footprint=
max(
0,

100-
(
$revision
*
7
)

);

$center=
round(
(
$command
+
$engine
+
$footprint
)
/
3
);

?>

<div class="card author-card mb-4">

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
">

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'مركز القيادة البحثية'
:
'Research Command Center'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'النمو العلمي والبصمة المؤسسية'
:
'Scholarly growth and institutional footprint'
?>

</div>

</div>

<div
class="
display-5
fw-bold
text-success
">

<?= $center ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $command ?>

</div>

<div>

<?= $isArabic
?
'القيادة'
:
'Command'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $engine ?>

</div>

<div>

<?= $isArabic
?
'النمو'
:
'Growth'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $footprint ?>

</div>

<div>

<?= $isArabic
?
'البصمة'
:
'Footprint'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= count(
$tracks
) ?>

</div>

<div>

<?= $isArabic
?
'المسارات'
:
'Tracks'
?>

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'مركز النمو'
:
'Growth Queue'
?>

</h5>

<?php foreach(

array_slice(
$growth,
0,
8

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
">

<div class="fw-bold">

<?= ad_h(
$row[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'next'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 670 -->

<!-- PACK 671 -->

<?php

$mesh=[];

$flow=[

'draft'=>0,
'submitted'=>0,
'screening'=>0,
'under_review'=>0,
'revision_required'=>0,
'accepted'=>0,
'published'=>0

];

$success=0;

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

if(
isset(
$flow[
$status
]
)
){
$flow[
$status
]++;
}

$next=
match(
$status
){

'draft'=>
(
$isArabic
?
'إكمال البحث'
:
'Complete Submission'
),

'submitted'=>
(
$isArabic
?
'انتظار الفرز'
:
'Await Screening'
),

'screening'=>
(
$isArabic
?
'متابعة الحالة'
:
'Track Status'
),

'under_review'=>
(
$isArabic
?
'انتظار التقييم'
:
'Await Review'
),

'revision_required'=>
(
$isArabic
?
'إغلاق الملاحظات'
:
'Resolve Review'
),

'accepted'=>
(
$isArabic
?
'إنتاج النسخة النهائية'
:
'Produce Camera Ready'
),

'published'=>
(
$isArabic
?
'قياس النجاح'
:
'Measure Success'
),

default=>'-'

};

$mesh[]=[

'title'=>$title,

'next'=>$next

];

if(
in_array(

$status,

[
'accepted',
'published'
],

true
)
){
$success++;
}

}

$total=
max(
1,
count(
$submissions
??
[]
)
);

$office=
round(
(
$success
/
$total
)
*
100
);

$navigator=
round(
(
100-
(
$flow[
'revision_required'
]
*
6
)
)
);

$meshScore=
round(
(
$office
+
max(
0,
$navigator
)
)
/
2
);

?>

<div class="card author-card mb-4">

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
">

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'المكتب الأكاديمي الموحد'
:
'Unified Academic Office'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'شبكة ذكاء التقديم ونجاح البحث'
:
'Submission intelligence mesh and research success'
?>

</div>

</div>

<div
class="
display-5
fw-bold
text-primary
">

<?= $meshScore ?>%

</div>

</div>

<div class="row g-3 mb-4">

<?php foreach($flow as $k=>$v): ?>

<div class="col-lg">

<div class="border rounded-4 p-3 text-center">

<div class="display-6">

<?= $v ?>

</div>

<div class="small">

<?= ucfirst(
str_replace(
'_',
' ',
$k
)
) ?>

</div>

</div>

</div>

<?php endforeach; ?>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'مركز النجاح'
:
'Navigator Queue'
?>

</h5>

<?php foreach(

array_slice(
$mesh,
0,
8

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
">

<div class="fw-bold">

<?= ad_h(
$row[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'next'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 671 -->

<!-- PACK 672 -->

<?php

$momentum=[];

$graph=[];

$published=0;

$accepted=0;

$review=0;

$revision=0;

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

$weight=
match(
$status
){

'draft'=>5,

'submitted'=>15,

'screening'=>25,

'under_review'=>45,

'revision_required'=>60,

'accepted'=>85,

'published'=>100,

default=>10

};

$graph[]=
$weight;

if(
$status==='published'
){
$published++;
}

if(
$status==='accepted'
){
$accepted++;
}

if(
$status==='under_review'
){
$review++;
}

if(
$status==='revision_required'
){
$revision++;
}

$next=
match(
$status
){

'accepted'=>
(
$isArabic
?
'تعظيم أثر النشر'
:
'Maximize Publication Impact'
),

'published'=>
(
$isArabic
?
'متابعة المؤشرات'
:
'Track Metrics'
),

'revision_required'=>
(
$isArabic
?
'حسم التعديلات'
:
'Finalize Revision'
),

'under_review'=>
(
$isArabic
?
'متابعة المحكمين'
:
'Monitor Review'
),

default=>
(
$isArabic
?
'استمرار التقدم'
:
'Continue Progress'
)

};

$momentum[]=[

'title'=>$title,

'next'=>$next,

'score'=>$weight

];

}

$total=
max(
1,
count(
$submissions
??
[]
)
);

$decision=
round(
array_sum(
$graph
)
/
$total
);

$engine=
min(
100,

(
$published
*
35
)

+

(
$accepted
*
20
)

+

(
$review
*
4
)

);

$velocity=
max(
0,

100-
(
$revision
*
6
)

);

$workspace=
round(
(
$decision
+
$engine
+
$velocity
)
/
3
);

?>

<div class="card author-card mb-4">

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
">

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'مساحة البحث الذاتية'
:
'Autonomous Research Workspace'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'شبكة القرار ومحرك الزخم'
:
'Decision graph and publication momentum'
?>

</div>

</div>

<div
class="
display-5
fw-bold
text-success
">

<?= $workspace ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $decision ?>

</div>

<div>

<?= $isArabic
?
'القرار'
:
'Decision'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $engine ?>

</div>

<div>

<?= $isArabic
?
'الزخم'
:
'Momentum'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $velocity ?>

</div>

<div>

<?= $isArabic
?
'السرعة'
:
'Velocity'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $published ?>

</div>

<div>

<?= $isArabic
?
'النشر'
:
'Publication'
?>

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'مركز الزخم'
:
'Momentum Queue'
?>

</h5>

<?php foreach(

array_slice(
$momentum,
0,
8

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
">

<div class="fw-bold">

<?= ad_h(
$row[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'next'
]
) ?>

•

<?= (int)$row[
'score'
] ?>%

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 672 -->

<!-- PACK 673 -->

<?php

$fabric=[];

$statuses=[];

$tracks=[];

$published=0;

$accepted=0;

$revision=0;

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s[
'status'
]
??
''
));

$title=
$s[
'display_title'
]
??
(
$s[
'title'
]
??
''
);

$track=
(string)(
$s[
'track_name'
]
??
$s[
'track'
]
??
$s[
'track_id'
]
??
''
);

$statuses[
$status
]=true;

if(
$track!==''
){
$tracks[
$track
]=true;
}

if(
$status==='published'
){
$published++;
}

if(
$status==='accepted'
){
$accepted++;
}

if(
$status==='revision_required'
){
$revision++;
}

$next=
match(
$status
){

'draft'=>
(
$isArabic
?
'تنشيط المسار'
:
'Activate Flow'
),

'submitted'=>
(
$isArabic
?
'توحيد التقدم'
:
'Align Progress'
),

'under_review'=>
(
$isArabic
?
'تنسيق المراجعات'
:
'Coordinate Reviews'
),

'revision_required'=>
(
$isArabic
?
'إغلاق الملاحظات'
:
'Close Revisions'
),

'accepted'=>
(
$isArabic
?
'تعزيز الإنجاز'
:
'Accelerate Achievement'
),

'published'=>
(
$isArabic
?
'تعظيم الأثر'
:
'Expand Impact'
),

default=>
(
$isArabic
?
'متابعة'
:
'Continue'
)

};

$fabric[]=[

'title'=>$title,

'next'=>$next,

'status'=>$status

];

}

$total=
max(
1,
count(
$submissions
??
[]
)
);

$coordination=
round(
(
count(
$statuses
)
/
7
)
*
100
);

$achievement=
min(
100,

(
$published
*
35
)

+

(
$accepted
*
20
)

+

(
count(
$tracks
)
*
5
)

);

$health=
max(
0,

100-
(
$revision
*
8
)

);

$matrix=
round(
(
$coordination
+
$achievement
+
$health
)
/
3
);

?>

<div class="card author-card mb-4">

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
">

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'نسيج البحث الذكي'
:
'Intelligent Research Fabric'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'تنسيق التقديمات ومصفوفة الإنجاز'
:
'Cross-submission coordination and achievement matrix'
?>

</div>

</div>

<div
class="
display-5
fw-bold
text-primary
">

<?= $matrix ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $coordination ?>

</div>

<div>

<?= $isArabic
?
'التنسيق'
:
'Coordination'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $achievement ?>

</div>

<div>

<?= $isArabic
?
'الإنجاز'
:
'Achievement'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $health ?>

</div>

<div>

<?= $isArabic
?
'الصحة'
:
'Health'
?>

</div>

</div>

</div>

<div class="col-lg-3">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= count(
$tracks
) ?>

</div>

<div>

<?= $isArabic
?
'المسارات'
:
'Tracks'
?>

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'مركز الإنجاز'
:
'Achievement Queue'
?>

</h5>

<?php foreach(

array_slice(
$fabric,
0,
8

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
">

<div class="fw-bold">

<?= ad_h(
$row[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'next'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 673 -->

<!-- PACK 674 -->

<?php

$ops=[];

$metrics=[

'draft'=>0,
'submitted'=>0,
'screening'=>0,
'under_review'=>0,
'revision_required'=>0,
'accepted'=>0,
'published'=>0

];

$published=0;
$accepted=0;
$revision=0;

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s['status']
??
''
));

$title=
$s['display_title']
??
(
$s['title']
??
''
);

if(
isset(
$metrics[
$status
]
)
){
$metrics[
$status
]++;
}

if(
$status==='published'
){
$published++;
}

if(
$status==='accepted'
){
$accepted++;
}

if(
$status==='revision_required'
){
$revision++;
}

$ops[]=[

'title'=>$title,

'next'=>
match(
$status
){

'draft'=>
(
$isArabic
?
'استكمال التقديم'
:
'Complete Submission'
),

'submitted'=>
(
$isArabic
?
'انتظار الفرز'
:
'Await Screening'
),

'screening'=>
(
$isArabic
?
'مراقبة القرار'
:
'Monitor Decision'
),

'under_review'=>
(
$isArabic
?
'متابعة التحكيم'
:
'Track Reviews'
),

'revision_required'=>
(
$isArabic
?
'إغلاق الملاحظات'
:
'Close Review Comments'
),

'accepted'=>
(
$isArabic
?
'رفع النسخة النهائية'
:
'Upload Camera Ready'
),

'published'=>
(
$isArabic
?
'قياس الأثر'
:
'Measure Impact'
),

default=>'-'

}

];

}

$total=
max(
1,
count(
$submissions
??
[]
)
);

$automation=
round(
(
(
$accepted
+
(
$published
*
2
)
)
/
$total
)
*
100
);

$performance=
min(
100,

(
$published
*
35
)

+

(
$accepted
*
20
)

);

$health=
max(
0,

100-
(
$revision
*
7
)

);

$os=
round(
(
$automation
+
$performance
+
$health
)
/
3
);

?>

<div class="card author-card mb-4">

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
">

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'نظام التشغيل البحثي'
:
'Research Operating System'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'طبقة القرار ولوحة الأداء'
:
'Decision automation and performance grid'
?>

</div>

</div>

<div
class="
display-5
fw-bold
text-success
">

<?= $os ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $automation ?>

</div>

<div>

<?= $isArabic
?
'الأتمتة'
:
'Automation'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $performance ?>

</div>

<div>

<?= $isArabic
?
'الأداء'
:
'Performance'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $health ?>

</div>

<div>

<?= $isArabic
?
'الصحة'
:
'Health'
?>

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'مركز التشغيل'
:
'Operating Queue'
?>

</h5>

<?php foreach(

array_slice(
$ops,
0,
8

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
">

<div class="fw-bold">

<?= ad_h(
$row[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'next'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 674 -->

<!-- PACK 675 -->

<?php

$ledger=[];

$counts=[

'draft'=>0,
'submitted'=>0,
'screening'=>0,
'under_review'=>0,
'revision_required'=>0,
'accepted'=>0,
'published'=>0

];

$published=0;
$accepted=0;
$revision=0;

foreach(
(
$submissions
??
[]
)
as
$s
){

$status=
strtolower(
(string)(
$s['status']
??
''
));

$title=
$s['display_title']
??
(
$s['title']
??
''
);

if(
isset(
$counts[
$status
]
)
){
$counts[
$status
]++;
}

if(
$status==='published'
){
$published++;
}

if(
$status==='accepted'
){
$accepted++;
}

if(
$status==='revision_required'
){
$revision++;
}

$next=
match(
$status
){

'draft'=>
(
$isArabic
?
'استكمال البيانات'
:
'Complete Metadata'
),

'submitted'=>
(
$isArabic
?
'مراقبة الفرز'
:
'Monitor Screening'
),

'screening'=>
(
$isArabic
?
'متابعة القرار'
:
'Track Decision'
),

'under_review'=>
(
$isArabic
?
'متابعة المحكمين'
:
'Monitor Reviewers'
),

'revision_required'=>
(
$isArabic
?
'تنفيذ التعديلات'
:
'Execute Revision'
),

'accepted'=>
(
$isArabic
?
'تسليم النسخة النهائية'
:
'Deliver Camera Ready'
),

'published'=>
(
$isArabic
?
'قياس التأثير'
:
'Measure Impact'
),

default=>'-'

};

$ledger[]=[

'title'=>$title,

'next'=>$next

];

}

$total=
max(
1,
count(
$submissions
??
[]
)
);

$submissionOS=
round(
(
(
$accepted
+
(
$published
*
2
)
)
/
$total
)
*
100
);

$growth=
min(
100,

(
$published
*
35
)

+

(
$accepted
*
18
)

);

$health=
max(
0,

100-
(
$revision
*
6
)

);

$engine=
round(
(
$submissionOS
+
$growth
+
$health
)
/
3
);

?>

<div class="card author-card mb-4">

<div class="card-body">

<div
class="
d-flex
justify-content-between
align-items-center
mb-4
">

<div>

<h4 class="fw-bold">

<?= $isArabic
?
'نظام التقديم الموحد'
:
'Unified Submission OS'
?>

</h4>

<div class="text-muted">

<?= $isArabic
?
'سجل النمو ومحرك النجاح البحثي'
:
'Academic growth ledger and research success engine'
?>

</div>

</div>

<div
class="
display-5
fw-bold
text-primary
">

<?= $engine ?>%

</div>

</div>

<div class="row g-3 mb-4">

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $submissionOS ?>

</div>

<div>

<?= $isArabic
?
'النظام'
:
'Submission OS'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $growth ?>

</div>

<div>

<?= $isArabic
?
'النمو'
:
'Growth'
?>

</div>

</div>

</div>

<div class="col-lg-4">

<div class="border rounded-4 p-4 text-center">

<div class="display-6">

<?= $health ?>

</div>

<div>

<?= $isArabic
?
'الصحة'
:
'Health'
?>

</div>

</div>

</div>

</div>

<h5 class="fw-bold mb-3">

<?= $isArabic
?
'مركز النجاح'
:
'Success Queue'
?>

</h5>

<?php foreach(

array_slice(
$ledger,
0,
8

)

as
$row

): ?>

<div
class="
border-start
ps-4
mb-3
">

<div class="fw-bold">

<?= ad_h(
$row[
'title'
]
) ?>

</div>

<div class="small text-muted">

<?= ad_h(
$row[
'next'
]
) ?>

</div>

</div>

<?php endforeach; ?>

</div>

</div>

<!-- END PACK 675 -->








































</div>

<div>
<div>
<div>
</div>

</div>

<div>

<div
class="
card
ec-card
sticky-top
"
style="
top:20px;
"
>

<div
class="
card-body
"
>

<h5>

<?= $isArabic
?
'المختصر التنفيذي'
:
'Executive Snapshot'
?>

</h5>

<div
class="
ec-mini-item
"
>

<?= $isArabic
?
'المنصة أصبحت مضغوطة وأكثر تركيزاً'
:
'Compressed dashboard view'
?>

</div>

<div
class="
ec-mini-item
"
>

<?= count(
$submissions
) ?>

Submissions

</div>

<div
class="
ec-mini-item
"
>


Accepted

</div>

<div
class="
ec-mini-item
"
>

<?= count(
$revisionRows
) ?>

Revisions

</div>

</div>

</div>

</div>

</div>

<div class="card paper-card">
        <div class="card-body">
            <div class="d-flex justify-content-between align-items-center flex-wrap gap-2 mb-3">
                <h5 class="fw-bold mb-0">أبحاثي</h5>
                <a class="btn btn-sm btn-primary" href="/easychair/author/submit">
                    <i class="fa fa-plus"></i>
                    بحث جديد
                </a>
            </div>

            <div class="table-responsive">
                <table class="table table-bordered align-middle">
                    <thead class="table-dark">
                    <tr>
                        <th>#</th>
                        <th>رقم التقديم</th>
                        <th><?php echo ec_h(ec_t('submission.title','العنوان')); ?></th>
                        <th><?php echo ec_h(ec_t('submission.status','الحالة')); ?></th>
                        <th><?php echo ec_h(ec_t('submission.stage','المرحلة')); ?></th>
                        <th>القرار</th>
                        <th>الجولة</th>
                        <th>المراجعات</th>
                        <th>المعدل</th>
                        <th>الملفات</th>
                        <th>التاريخ</th>
                        <th>تفاصيل</th>
                    <th><?php echo ec_h(ec_t('author.dashboard.workflow','Workflow')); ?></th></tr>
                    </thead>
                    <tbody>

                    <?php foreach ($submissions as $s): ?>
                        <tr>
                            <td><?= (int)$s['id'] ?></td>
                            <td>
                                <span class="badge bg-light text-dark">
                                    <?= ad_h($s['submission_no'] ?? '-') ?>
                                </span>
                            </td>
                            <td style="min-width:260px;">
                                <strong>
<?= ec_h(
$s['display_title']
?? $s['title']
?? $s['title_en']
?? 'Submission #' . $s['id']
) ?>
</strong>
                                <?php if (!empty($s['keywords']) || !empty($s['keywords_ar'])): ?>
                                    <div class="text-muted small">
                                        <?= ad_h(($s['keywords_ar'] ?? '') ?: ($s['keywords'] ?? '')) ?>
                                    </div>
                                <?php endif; ?>
                            </td>
                            <td>
                                <span class="badge <?= status_badge_class($s['status'] ?? '') ?>">
                                    <?= ad_h($s['status'] ?? '-') ?>
                                </span>
                            </td>
                            <td style="min-width:180px;">

<?php

$status =
    strtolower(
        (string)(
            $s['status']
            ?? ''
        )
    );

$progress = match ($status) {

    'draft' => 10,

    'submitted' => 25,

    'screening' => 40,

    'under_review' => 60,

    'revision_required' => 75,

    'accepted' => 90,

    'published' => 100,

    default => 15
};

?>

<div class="fw-bold mb-1">

<?= ad_h($s['stage'] ?? '-') ?>

</div>

<div class="progress" style="height:8px;border-radius:999px;">

<div
class="progress-bar"
style="width:<?= $progress ?>%"
></div>

</div>

<div class="small text-muted mt-1">

<?= $progress ?>%

</div>

</td>
                            <td><?= ad_h($s['decision'] ?? '-') ?></td>
                            <td><?= (int)($s['current_round_no'] ?? 1) ?></td>
                            <td>
                                <span class="badge bg-primary"><?= (int)($s['reviews_count'] ?? 0) ?></span>
                            </td>
                            <td>
                                <?= ad_h(($s['avg_score'] ?? '') ?: (($s['reviews_avg_score'] ?? '') ?: '-')) ?>
                            </td>
                            <td>
                                <div class="d-flex flex-column gap-1">
                                    <?php if (!empty($s['file_path'])): ?>
                                        <a class="btn btn-sm btn-outline-primary" target="_blank"
                                           href="/easychair/<?= ad_h($s['file_path']) ?>">
                                            الملف الأصلي
                                        </a>
                                    <?php endif; ?>

                                    <?php if (!empty($s['revision_file'])): ?>
                                        <a class="btn btn-sm btn-outline-warning" target="_blank"
                                           href="/easychair/<?= ad_h($s['revision_file']) ?>">
                                            ملف التعديل
                                        </a>
                                    <?php endif; ?>

                                    <?php if (!empty($s['response_letter_path'])): ?>
                                        <a class="btn btn-sm btn-outline-success" target="_blank"
                                           href="/easychair/<?= ad_h($s['response_letter_path']) ?>">
                                            خطاب الرد
                                        </a>
                                    <?php endif; ?>

                                    <?php if (empty($s['file_path']) && empty($s['revision_file']) && empty($s['response_letter_path'])): ?>
                                        <span class="text-muted small">لا يوجد</span>
                                    <?php endif; ?>
                                </div>
                            </td>
                            <td>
                                <div class="small">
                                    <?= ad_h($s['submitted_at'] ?: $s['created_at']) ?>
                                </div>
                            </td>
                            <td>
                                <a class="btn btn-sm btn-primary" href="/easychair/author/submission/show?id=<?= (int)$s['id'] ?>">عرض التفاصيل</a>
                            </td>
                        
<td>
<?php
$authorSubmissionRow = $s ?? $row ?? $submission ?? [];
$asid = (int)($authorSubmissionRow['id'] ?? $authorSubmissionRow['submission_id'] ?? 0);
if ($asid > 0):
?>
    <a class="btn btn-sm btn-primary rounded-pill" href="/easychair/author/workflow?submission_id=<?= $asid ?>"><?php echo ec_h(ec_t('author.dashboard.workflow','Workflow')); ?></a>
<?php endif; ?>
</td>
</tr>
                    <?php endforeach; ?>

                    <?php if (empty($submissions)): ?>
                        <tr>
                            <td colspan="12" class="text-center text-muted py-5">
                                لا توجد تقديمات لهذا المؤلف في المؤتمر الحالي.
                                <div class="mt-3">
                                    <a class="btn btn-primary" href="/easychair/author/submit">
                                        تقديم أول بحث
                                    </a>
                                </div>
                            </td>
                        </tr>
                    <?php endif; ?>

                    </tbody>
                </table>
            </div>
</div>
