/* «ملفّي»: صفحة الموظف الشخصية — لوحة رئيسية وخمسة أقسام قابلة للطي */
.mp-root{--mp-ink:#0f172a;--mp-muted:#64748b;--mp-line:#e2e8f0;--mp-soft:#f8fafc;--mp-card:#fff;color:var(--mp-ink);line-height:1.6;display:flex;flex-direction:column;gap:14px;font-family:inherit}
.mp-root *{box-sizing:border-box}
.mp-root h2,.mp-root h3,.mp-root h4,.mp-root p,.mp-root dl,.mp-root dd{margin:0}
.mp-root button{font:inherit;color:inherit}
.mp-root button:focus-visible,.mp-root a:focus-visible,.mp-root summary:focus-visible{outline:3px solid #5eead4;outline-offset:2px}
.mp-muted{color:var(--mp-muted);font-size:12.5px}
.mp-stack{display:flex;flex-direction:column;gap:14px;min-width:0}
.mp-grid-2{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px}

/* اللوحة الرئيسية */
.mp-hero{border-radius:22px;border:1px solid #ccfbf1;background:linear-gradient(135deg,#f0fdfa 0%,#ffffff 55%,#f5f3ff 100%);padding:18px;display:flex;flex-direction:column;gap:16px;box-shadow:0 1px 2px #0f172a0d}
.mp-hero-id{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.mp-avatar{width:58px;height:58px;border-radius:18px;background:linear-gradient(135deg,#0d9488,#6366f1);color:#fff;display:flex;align-items:center;justify-content:center;font-size:26px;font-weight:900;flex-shrink:0;box-shadow:0 6px 16px #0d948840}
.mp-hero-text{min-width:0;flex:1}
.mp-hero-text h2{font-size:13px;font-weight:800;color:#0f766e;letter-spacing:.2px}
.mp-hero-name{font-size:20px;font-weight:900;line-height:1.35;overflow-wrap:anywhere}
.mp-hero-meta{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:12.5px;color:var(--mp-muted);font-weight:600;margin-top:2px}
.mp-rings{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.mp-ring{display:flex;align-items:center;gap:8px;background:#ffffffcc;border:1px solid var(--mp-line);border-radius:16px;padding:8px 10px;min-width:0}
.mp-ring svg{flex-shrink:0}
.mp-ring-track{fill:none;stroke:#e2e8f0;stroke-width:7}
.mp-ring-bar{fill:none;stroke-width:7;stroke-linecap:round;transition:stroke-dasharray .6s ease}
.mp-ring-teal .mp-ring-bar{stroke:#0d9488}.mp-ring-green .mp-ring-bar{stroke:#16a34a}.mp-ring-sky .mp-ring-bar{stroke:#0284c7}.mp-ring-violet .mp-ring-bar{stroke:#7c3aed}.mp-ring-amber .mp-ring-bar{stroke:#d97706}
.mp-ring-text{display:flex;flex-direction:column;min-width:0}
.mp-ring-text b{font-size:15px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mp-ring-text span{font-size:11.5px;color:var(--mp-muted);font-weight:700}
.mp-alerts{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.mp-alerts-title{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:800;color:#b45309}
.mp-alert{border:1px solid;border-radius:999px;padding:4px 12px;font-size:12.5px;font-weight:700;cursor:pointer;background:#fff;text-align:right}
.mp-alert-warning{border-color:#fde68a;background:#fffbeb;color:#92400e}
.mp-alert-danger{border-color:#fecaca;background:#fef2f2;color:#b91c1c}
.mp-alert-info{border-color:#bae6fd;background:#f0f9ff;color:#075985}

/* الأقسام القابلة للطي */
.mp-section{--mp-accent:#0d9488;--mp-accent-2:#14b8a6;--mp-accent-soft:#f0fdfa;--mp-accent-line:#99f6e4;border:2px solid var(--mp-accent-line);border-radius:20px;background:var(--mp-accent-soft);overflow:hidden;box-shadow:0 1px 3px #0f172a12;transition:box-shadow .2s}
.mp-section.is-open{box-shadow:0 8px 24px #0f172a14}
.mp-tone-cyan{--mp-accent:#0e7490;--mp-accent-2:#0891b2;--mp-accent-soft:#f0fbfd;--mp-accent-line:#a5f3fc}
.mp-tone-emerald{--mp-accent:#047857;--mp-accent-2:#10b981;--mp-accent-soft:#f0fdf6;--mp-accent-line:#a7f3d0}
.mp-tone-amber{--mp-accent:#b45309;--mp-accent-2:#f59e0b;--mp-accent-soft:#fffcf0;--mp-accent-line:#fcd34d}
.mp-tone-rose{--mp-accent:#be123c;--mp-accent-2:#f43f5e;--mp-accent-soft:#fff5f7;--mp-accent-line:#fda4af}
.mp-tone-indigo{--mp-accent:#4338ca;--mp-accent-2:#6366f1;--mp-accent-soft:#f5f6ff;--mp-accent-line:#c7d2fe}
.mp-root .mp-section-head{width:100%;display:flex;align-items:center;gap:12px;padding:14px 16px;background:linear-gradient(100deg,var(--mp-accent),var(--mp-accent-2));color:#fff;border:0;cursor:pointer;text-align:right}
.mp-section-head:hover{filter:brightness(1.05)}
.mp-section-icon{width:40px;height:40px;border-radius:13px;background:#ffffff2e;border:1px solid #ffffff59;color:#fff;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.mp-section-title{font-size:16px;font-weight:900;white-space:nowrap;color:#fff}
.mp-section-head .mp-chip{background:#ffffffeb;border-color:transparent}
.mp-section-head .mp-muted{color:#ffffffd9}
.mp-section-summary{flex:1;display:flex;flex-wrap:wrap;gap:6px;align-items:center;justify-content:flex-end;min-width:0}
.mp-chevron{color:#fff;transition:transform .25s;flex-shrink:0;display:flex;width:30px;height:30px;border-radius:10px;background:#ffffff26;align-items:center;justify-content:center}
.mp-section.is-open .mp-chevron{transform:rotate(180deg)}
.mp-section-body{padding:16px;display:flex;flex-direction:column;gap:14px;animation:mp-open .25s ease}
@keyframes mp-open{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}

.mp-chip{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:3px 10px;font-size:12px;font-weight:700;background:var(--mp-soft);color:#334155;border:1px solid var(--mp-line);white-space:nowrap}
.mp-chip b{font-weight:900}
.mp-chip-teal{background:#f0fdfa;color:#0f766e;border-color:#99f6e4}.mp-chip-sky{background:#f0f9ff;color:#0369a1;border-color:#bae6fd}
.mp-chip-violet{background:#f5f3ff;color:#6d28d9;border-color:#ddd6fe}.mp-chip-green{background:#f0fdf4;color:#15803d;border-color:#bbf7d0}
.mp-chip-amber{background:#fffbeb;color:#b45309;border-color:#fde68a}.mp-chip-rose{background:#fff1f2;color:#be123c;border-color:#fecdd3}
.mp-chip-indigo{background:#eef2ff;color:#4338ca;border-color:#c7d2fe}
.mp-chips{display:flex;flex-wrap:wrap;gap:8px}

.mp-card{background:#fff;border:1px solid var(--mp-line);border-radius:16px;padding:14px;display:flex;flex-direction:column;gap:12px;min-width:0}
.mp-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;flex-wrap:wrap}
.mp-card-head h4{font-size:14.5px;font-weight:900}
.mp-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.mp-btn{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--mp-line);background:#fff;border-radius:11px;padding:7px 13px;font-size:13px;font-weight:800;cursor:pointer;white-space:nowrap;transition:background .15s}
.mp-btn:hover{background:var(--mp-soft)}
.mp-btn:disabled{opacity:.6;cursor:not-allowed}
.mp-btn-ghost{background:#ffffffb3}
.mp-spin{display:inline-flex;animation:mp-spin 1s linear infinite}
@keyframes mp-spin{to{transform:rotate(360deg)}}
.mp-link{display:inline-flex;align-items:center;gap:4px;color:#4f46e5;font-weight:800;font-size:13px;text-decoration:none}
.mp-link:hover{text-decoration:underline}
.mp-badge{display:inline-flex;align-items:center;border-radius:999px;padding:2px 10px;font-size:12px;font-weight:800;white-space:nowrap;border:1px solid}
.mp-badge-ok{background:#f0fdf4;color:#15803d;border-color:#bbf7d0}
.mp-badge-warning{background:#fffbeb;color:#b45309;border-color:#fde68a}
.mp-badge-danger{background:#fef2f2;color:#b91c1c;border-color:#fecaca}
.mp-badge-info{background:#f0f9ff;color:#0369a1;border-color:#bae6fd}
.mp-badge-neutral{background:var(--mp-soft);color:var(--mp-muted);border-color:var(--mp-line)}
.mp-empty{border:1px dashed #cbd5e1;border-radius:14px;padding:22px;text-align:center;color:var(--mp-muted);font-size:13.5px;background:var(--mp-soft)}
.mp-error{border:1px solid #fecaca;background:#fef2f2;color:#b91c1c;border-radius:14px;padding:14px;font-weight:700;font-size:13.5px}
.mp-note{font-size:12.5px;color:#92400e;background:#fffbeb;border:1px solid #fde68a;border-radius:12px;padding:8px 12px}

/* التواريخ: الهجري بارز والميلادي صغير تحته */
.mp-date{display:inline-flex;flex-direction:column;line-height:1.35}
.mp-date b{font-weight:800}
.mp-date small{font-size:11px;color:var(--mp-muted);font-weight:600}

/* الرسوم */
.mp-bars{display:flex;align-items:flex-end;gap:8px;height:230px;padding:18px 4px 4px;overflow-x:auto}
.mp-bar{flex:1 0 46px;max-width:84px;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:4px;border:0;background:transparent;cursor:pointer;padding:0}
.mp-bar-fill{width:70%;border-radius:10px 10px 4px 4px;background:linear-gradient(180deg,#fcd34d,#f59e0b);transition:height .5s ease,filter .2s}
.mp-bar:hover .mp-bar-fill{filter:brightness(1.05)}
.mp-bar.is-active .mp-bar-fill{background:linear-gradient(180deg,#f59e0b,#b45309)}
.mp-bar-value{font-size:10.5px;font-weight:800;color:#92400e;white-space:nowrap}
.mp-bar-label{font-size:10.5px;color:#334155;font-weight:800;text-align:center;line-height:1.25;min-height:48px;display:flex;flex-direction:column;justify-content:flex-start}
.mp-bar-label small{font-size:9.5px;color:var(--mp-muted);font-weight:600}
.mp-line{width:100%;max-width:560px;height:auto;max-height:170px;align-self:center}
.mp-line-grid{stroke:#e2e8f0;stroke-dasharray:3 4}
.mp-line-path{fill:none;stroke:#0891b2;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.mp-line-dot{fill:#fff;stroke:#0891b2;stroke-width:2.5}
.mp-line-text{font-size:10px;font-weight:800;fill:#0e7490}
.mp-meters{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.mp-meter-head{display:flex;justify-content:space-between;gap:8px;font-size:13px;font-weight:700}
.mp-meter-head b{font-weight:900;color:#047857}
.mp-meter-head small{color:var(--mp-muted);font-weight:600}
.mp-meter-track{height:10px;border-radius:999px;background:#e2e8f0;overflow:hidden;margin-top:6px}
.mp-meter-track span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#34d399,#059669);transition:width .5s ease}

/* الجداول والقوائم */
.mp-split{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px}
.mp-table{width:100%;border-collapse:collapse;font-size:13px}
.mp-table th,.mp-table td{padding:8px 10px;border-bottom:1px solid var(--mp-line);text-align:right}
.mp-table th{background:var(--mp-soft);font-weight:800;color:#334155}
.mp-table td:last-child,.mp-table th:last-child{text-align:left;white-space:nowrap}
.mp-total td{font-weight:900;background:#fafafa}
.mp-net{display:flex;align-items:center;justify-content:space-between;gap:10px;border-radius:14px;background:linear-gradient(90deg,#ecfdf5,#f0fdfa);border:1px solid #a7f3d0;padding:12px 16px;font-weight:800;color:#065f46}
.mp-net b{font-size:22px;font-weight:900}
.mp-details{border:1px solid var(--mp-line);border-radius:14px;background:#fff}
.mp-details>summary{cursor:pointer;padding:10px 14px;font-weight:800;font-size:13.5px;color:#334155}
.mp-details[open]>summary{border-bottom:1px solid var(--mp-line)}
.mp-details>:not(summary){margin:12px}
.mp-discipline{border-color:#fde68a;background:#fffdf5}
.mp-list{display:flex;flex-direction:column}
.mp-list-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 12px;border:0;border-bottom:1px solid var(--mp-line);background:transparent;font-size:13px;text-align:right;width:100%}
.mp-list-row:last-child{border-bottom:0}
button.mp-list-row{cursor:pointer}
button.mp-list-row:hover,.mp-list-row.is-active{background:#fffbeb}
.mp-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px 16px}
.mp-fields-1{grid-template-columns:1fr 1fr}
.mp-fields dt{font-size:11.5px;color:var(--mp-muted);font-weight:700}
.mp-fields dd{font-size:13.5px;font-weight:700;overflow-wrap:anywhere}
.mp-tile{display:flex;flex-direction:column;gap:4px;text-align:right;border:1px solid #fecdd3;background:linear-gradient(135deg,#fff1f2,#fff);border-radius:16px;padding:16px;cursor:pointer;transition:transform .15s,box-shadow .15s}
.mp-tile:hover{transform:translateY(-1px);box-shadow:0 6px 16px #e11d481a}
.mp-tile b{font-size:15px;font-weight:900;color:#be123c}
.mp-tile span{font-size:12.5px;color:var(--mp-muted);font-weight:600}

/* بطاقة العقد */
.mp-contract{border-color:#c7d2fe;background:linear-gradient(180deg,#f5f6ff,#fff 40%)}
.mp-contract .mp-fields{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}

/* جدول جميع المسيّرات */
.mp-table-wrap{overflow-x:auto;border:1px solid var(--mp-line);border-radius:12px}
.mp-payroll-table{min-width:640px}
.mp-payroll-table tbody tr{cursor:pointer;transition:background .15s}
.mp-payroll-table tbody tr:hover,.mp-payroll-table tbody tr.is-active{background:#fffbeb}
.mp-payroll-table tbody tr.is-active td:first-child{box-shadow:inset -4px 0 0 #f59e0b}
.mp-payroll-table td,.mp-payroll-table th{white-space:nowrap}
.mp-payroll-table td:nth-child(2){white-space:normal}
.mp-payroll-table tfoot td{font-weight:900;background:#fef3c7;border-bottom:0}

/* الطلبات الشخصية */
.mp-requests{display:flex;flex-direction:column;gap:8px}
.mp-request{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;border:1px solid var(--mp-line);border-radius:14px;padding:10px 14px;flex-wrap:wrap}
.mp-request-main{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.mp-request-main b{font-size:14px;font-weight:800;overflow-wrap:anywhere}
.mp-request-type{font-size:11.5px;font-weight:800;color:var(--mp-accent)}
.mp-request-side{display:flex;align-items:center;gap:12px;flex-shrink:0}

/* تبويبا الطلبات */
.mp-tabs{display:flex;gap:6px;background:#fff;border:1px solid var(--mp-accent-line);border-radius:14px;padding:4px;width:fit-content}
.mp-tab{border:0;background:transparent;border-radius:10px;padding:7px 18px;font-weight:800;font-size:13.5px;cursor:pointer;color:var(--mp-accent)}
.mp-tab.is-active{background:var(--mp-accent);color:#fff}
.mp-embedded{background:#fff;border-radius:16px;border:1px solid var(--mp-line);padding:12px;min-width:0;overflow:hidden}

/* الإنذارات تُعرض مطويّة في «ملاحظات الانضباط» لا داخل سجل الحضور */
.mp-attendance [data-my-warnings]{display:none}

@media (max-width:900px){.mp-rings{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:560px){
  .mp-hero{padding:14px;border-radius:18px}
  .mp-rings{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mp-section-head{flex-wrap:wrap;padding:12px}
  .mp-section-summary{order:4;width:100%;justify-content:flex-start}
  .mp-section-body{padding:12px}
  .mp-fields-1{grid-template-columns:1fr}
  .mp-bars{gap:5px}
  .mp-bar{flex-basis:40px}
  .mp-bar-value{font-size:9.5px}
}
@media (prefers-reduced-motion:reduce){.mp-section-body,.mp-ring-bar,.mp-bar-fill,.mp-meter-track span,.mp-chevron{animation:none;transition:none}}
