/* ===== الأداء البحثي ===== */
.perf-section{padding:2.5rem 0 3rem;scroll-margin-top:24px}
.perf-panel{
  background:#fff;border:1px solid #d4e8f0;border-radius:18px;
  box-shadow:0 8px 28px rgba(45,90,110,.08);overflow:hidden
}
.perf-panel-head{
  padding:1.25rem 1.35rem 1rem;text-align:center;
  background:linear-gradient(180deg,#e8f2f6 0%,#fff 100%);
  border-bottom:1px solid #e4eef3
}
.perf-panel-head h2{
  font-size:clamp(1.05rem,2.6vw,1.35rem);font-weight:800;color:#2c5f70;
  margin:0 0 .35rem;line-height:1.5
}
.perf-panel-head p{margin:0;color:#7a9eab;font-size:.85rem;font-weight:600}

.perf-summary-cards{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.85rem;
  padding:1rem 1.15rem .35rem
}
.perf-summary-card{
  display:flex;gap:.75rem;align-items:flex-start;
  background:linear-gradient(160deg,#f4fafc 0%,#fff 70%);
  border:1px solid #d9eaf1;border-radius:14px;padding:.9rem 1rem
}
.perf-summary-icon{
  width:40px;height:40px;border-radius:12px;flex-shrink:0;
  display:inline-flex;align-items:center;justify-content:center;
  background:linear-gradient(145deg,#00b8c4,#5ec4d4);color:#fff;font-size:.95rem
}
.perf-summary-label{font-size:.72rem;font-weight:700;color:#7a9eab;line-height:1.35}
.perf-summary-value{
  font-size:1.45rem;font-weight:800;color:#1e2a4a;margin:.15rem 0;
  font-variant-numeric:tabular-nums;unicode-bidi:isolate
}
.perf-summary-sub{font-size:.72rem;font-weight:700;color:#5f6b7a}

.perf-insights{
  display:grid;grid-template-columns:1fr 1.2fr;gap:1rem;
  padding:.35rem 1.15rem 1.25rem
}
.perf-insight-card{
  background:#f8fbfd;border:1px solid #e4eef3;border-radius:16px;padding:1rem 1.1rem
}
.perf-insight-card h3{
  margin:0 0 .65rem;font-size:.9rem;font-weight:800;color:#2c5f70;
  display:flex;align-items:center;gap:.4rem
}
.perf-insight-card h3 i{color:#00b8c4}
.perf-insight-card p{margin:0;color:#3d4f5c;font-size:.84rem;font-weight:600;line-height:1.75}
.perf-detail-item{margin:0 0 .7rem!important;padding-bottom:.55rem;border-bottom:1px dashed #e4eef3}
.perf-detail-item:last-child{margin-bottom:0!important;padding-bottom:0;border-bottom:0}
.perf-detail-item strong{color:#1e2a4a;display:inline-flex;align-items:center;gap:.35rem}
.perf-detail-item strong i{color:#00b8c4;font-size:.85rem}
.perf-detail-quality{background:#fff7ed;border:1px solid #fed7aa;border-radius:10px;padding:.65rem .75rem!important;border-bottom:0!important}

.perf-ind-icon{color:#00b8c4;margin-left:.35rem;font-size:.82rem}
.perf-auto-tag{
  display:inline-block;margin-top:.2rem;padding:.12rem .45rem;border-radius:6px;
  background:#e0f2fe;color:#0369a1;font-size:.65rem;font-weight:800
}

.perf-admin-bar{
  display:none;flex-wrap:wrap;gap:.5rem;justify-content:center;
  padding:.85rem 1rem;background:#f8fbfd;border-bottom:1px solid #e4eef3
}
body.admin-logged-in .perf-admin-bar{display:flex}
.perf-admin-bar .btn{padding:.45rem .9rem!important;font-size:.8rem!important}

.perf-charts{
  display:grid;grid-template-columns:1fr 1.35fr;gap:1rem;
  padding:1.15rem 1.15rem .5rem
}
.perf-chart-card{
  background:#f8fbfd;border:1px solid #e4eef3;border-radius:16px;padding:1rem
}
.perf-chart-card h3{
  font-size:.9rem;font-weight:800;color:#2c5f70;margin:0 0 .75rem;
  display:flex;align-items:center;gap:.45rem
}
.perf-chart-card h3 i{color:#00b8c4}
.perf-chart-wrap{position:relative;height:240px}
.perf-chart-wrap--tall{height:300px}

.perf-table-wrap{padding:.75rem 1rem 1rem}
.perf-table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
.perf-table{
  width:100%;min-width:980px;border-collapse:separate;border-spacing:0 .42rem;margin:0
}
.perf-table thead th{padding:0 .15rem;border:none;background:transparent;vertical-align:bottom}
.perf-th{
  display:inline-flex;align-items:center;justify-content:center;gap:.3rem;
  width:100%;min-height:40px;padding:.5rem .45rem;border-radius:10px;
  color:#fff;font-weight:800;font-size:.72rem;line-height:1.25;white-space:nowrap;
  background:linear-gradient(180deg,#7eb6d4,#6aa8c8)
}
.perf-th--name{background:#1e2a4a;justify-content:flex-start;padding-inline:.85rem;min-width:230px}
.perf-th--year{
  min-width:76px;background:linear-gradient(180deg,#5ec4d4,#00b8c4);
  cursor:pointer;transition:transform .15s,box-shadow .15s;user-select:none
}
.perf-th--year:hover{transform:translateY(-1px);box-shadow:0 6px 14px rgba(0,184,196,.35)}
.perf-th--kpi{background:#00b8c4;min-width:110px}
.perf-th--notes{background:#6aa8c8;min-width:200px}
.perf-th--acts{background:#1e2a4a;min-width:90px}

.perf-table tbody tr td{
  padding:.65rem .5rem;background:#f4f9fc;border-top:1px solid #e4eef3;border-bottom:1px solid #e4eef3;
  text-align:center;font-weight:700;font-size:.84rem;color:#1a2332;vertical-align:middle
}
.perf-table tbody tr:nth-child(even) td{background:#fff}
.perf-table tbody tr td:first-child{
  text-align:right;border-right:1px solid #e4eef3;border-radius:0 12px 12px 0;padding-right:.9rem
}
.perf-table tbody tr td:last-child{border-left:1px solid #e4eef3;border-radius:12px 0 0 12px}
.perf-ind{display:flex;flex-direction:column;gap:.15rem;align-items:flex-start}
.perf-ind strong{font-size:.86rem;color:#1e2a4a}
.perf-num{font-variant-numeric:tabular-nums;unicode-bidi:isolate;direction:ltr;display:inline-block}
.perf-empty{color:#94a3b8;font-weight:600}

.perf-kpi-badge{
  display:inline-flex;align-items:center;gap:.3rem;padding:.35rem .65rem;border-radius:10px;
  font-size:.75rem;font-weight:800;white-space:nowrap
}
.perf-kpi-up{background:#d1fae5;color:#047857}
.perf-kpi-down{background:#fee2e2;color:#b91c1c}
.perf-kpi-flat{background:#e2e8f0;color:#475569}
.perf-kpi-new{background:#e0f2fe;color:#0369a1}
.perf-notes{font-size:.75rem;font-weight:600;color:#5f6b7a;line-height:1.55;text-align:right;max-width:280px}

.perf-row-acts{display:inline-flex;gap:.35rem}
.perf-row-acts button{
  width:32px;height:32px;border-radius:8px;border:1px solid #d4e8f0;background:#fff;
  color:#1a73e8;display:inline-flex;align-items:center;justify-content:center;cursor:pointer
}
.perf-row-acts button.del{color:#b91c1c;border-color:#fecaca;background:#fef2f2}
.perf-row-acts button:hover{transform:translateY(-1px)}

.perf-foot{
  display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap;
  padding:.65rem 1.15rem 1rem;color:#7a9eab;font-size:.78rem;font-weight:700
}

/* نافذة السنة */
.perf-year-modal .modal-box{max-width:720px}
.perf-year-grid{display:grid;grid-template-columns:1fr 1fr;gap:.75rem;margin-top:.75rem}
.perf-year-card{
  background:#f8fbfd;border:1px solid #e4eef3;border-radius:14px;padding:1rem;
  display:flex;flex-direction:column;gap:.35rem
}
.perf-year-card .label{font-size:.78rem;font-weight:700;color:#7a9eab}
.perf-year-card .value{font-size:1.45rem;font-weight:800;color:#1e2a4a}
.perf-year-card .note{font-size:.75rem;color:#5f6b7a;font-weight:600;line-height:1.5}

@media(max-width:1100px){
  .perf-summary-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .perf-insights{grid-template-columns:1fr}
}
@media(max-width:900px){
  .perf-charts{grid-template-columns:1fr}
  .perf-year-grid{grid-template-columns:1fr}
  .perf-chart-wrap,.perf-chart-wrap--tall{height:220px}
  .perf-section{padding:1.5rem 0 2rem}
  .perf-panel{border-radius:16px}
  .perf-panel-head{padding:1rem}
  .perf-table{min-width:980px}
  .perf-notes{max-width:100%}
}
@media(max-width:560px){
  .perf-summary-cards{grid-template-columns:1fr;padding:1rem}
  .perf-insights{padding:0 1rem 1.15rem}
}
@media(max-width:480px){
  .perf-admin-bar .btn{flex:1 1 auto;justify-content:center;min-height:42px}
  .perf-kpi-value{font-size:1.15rem}
  .perf-summary-value{font-size:1.25rem}
}
