  :root{
    --green:#00ABAF; --green-d:#2A206A; --green-dd:#1a1448;
    --gold:#7C32C9; --gold-l:#1CC182;
    --ink:#2b2747; --muted:#6f6c80; --line:#e8e7f0;
    --bg:#f5f5fa; --surface:#ffffff; --surface-2:#faf9fd;
    --new:#2A6FB0; --prog:#E8920C; --wait:#7C32C9; --done:#1CC182;
    --post:#8a8794; --canc:#B30001; --late:#B30001;
    --teal:#00ABAF; --teal-d:#018a8d; --navy:#2A206A; --purple:#7C32C9; --dgreen:#1CC182;
    --shadow:0 1px 2px rgba(30,24,70,.05),0 6px 20px rgba(30,24,70,.07);
    --radius:14px;
    --font:"Segoe UI","Tahoma","Geeza Pro","Noto Naskh Arabic","Traditional Arabic",system-ui,sans-serif;
  }
  *{box-sizing:border-box;margin:0;padding:0}
  html,body{height:100%}
  body{font-family:var(--font);background:var(--bg);color:var(--ink);line-height:1.55;-webkit-font-smoothing:antialiased}
  button{font-family:inherit;cursor:pointer}
  input,select,textarea{font-family:inherit;font-size:14px}
  ::selection{background:var(--gold-l);color:#fff}

  /* ===== Layout ===== */
  .app{display:grid;grid-template-columns:248px 1fr;height:100vh;overflow:hidden}
  .sidebar{background:linear-gradient(180deg,var(--green-d),var(--green-dd));color:#dfeee6;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}
  .brand{padding:20px 18px 16px;display:flex;flex-direction:column;gap:11px;border-bottom:1px solid rgba(255,255,255,.1)}
  .brand .dga-logo{height:40px;width:auto;align-self:flex-start}
  .brand .unit{font-size:13.5px;font-weight:700;color:#fff;line-height:1.45}
  .brand .unit span{display:block;font-size:11px;color:#a9a6d8;font-weight:500;margin-top:1px}
  nav{padding:12px 10px;flex:1;overflow-y:auto}
  .nav-label{font-size:10.5px;letter-spacing:.04em;color:#8b87c4;padding:12px 12px 6px;text-transform:uppercase}
  .nav-item{display:flex;align-items:center;gap:11px;padding:10px 12px;border-radius:10px;color:#d3d1ee;font-size:14px;font-weight:500;border:none;background:none;width:100%;text-align:right;transition:.15s;margin-bottom:2px}
  .nav-item:hover{background:rgba(255,255,255,.07);color:#fff}
  .nav-item.active{background:var(--green);color:#fff;box-shadow:inset 3px 0 0 var(--gold)}
  .nav-item svg{width:18px;height:18px;flex:none;opacity:.9}
  .nav-item .badge{margin-inline-start:auto;background:var(--late);color:#fff;font-size:11px;font-weight:700;padding:1px 7px;border-radius:20px}
  .sidebar-foot{padding:12px 16px;border-top:1px solid rgba(255,255,255,.08);font-size:11px;color:#908cc4}

  .main{display:flex;flex-direction:column;min-width:0;height:100vh;overflow:hidden}
  .topbar{background:var(--surface);border-bottom:1px solid var(--line);padding:14px 26px;display:flex;align-items:center;gap:16px;flex:none;z-index:5}
  .topbar h2{font-size:17px;font-weight:700}
  .topbar .sub{font-size:12px;color:var(--muted);font-weight:400}
  .topbar .spacer{flex:1}
  .role-pick{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted)}
  .role-pick select{padding:7px 10px;border:1px solid var(--line);border-radius:9px;background:var(--surface-2);color:var(--ink)}
  .icon-btn{position:relative;width:40px;height:40px;border-radius:10px;border:1px solid var(--line);background:var(--surface-2);display:flex;align-items:center;justify-content:center;color:var(--green-d)}
  .icon-btn:hover{background:#eef3ee}
  .icon-btn svg{width:19px;height:19px}
  .icon-btn .dot{position:absolute;top:-5px;left:-5px;background:var(--late);color:#fff;font-size:10px;font-weight:700;min-width:18px;height:18px;border-radius:10px;display:flex;align-items:center;justify-content:center;padding:0 4px;border:2px solid var(--surface)}
  .btn{display:inline-flex;align-items:center;gap:7px;padding:9px 16px;border-radius:10px;border:1px solid transparent;font-size:13.5px;font-weight:600;transition:.15s}
  .btn svg{width:16px;height:16px}
  .btn-primary{background:var(--green);color:#fff}
  .btn-primary:hover{background:var(--teal-d)}
  .btn-gold{background:var(--gold);color:#fff}.btn-gold:hover{background:#5f2399}
  .btn-ghost{background:var(--surface-2);border-color:var(--line);color:var(--ink)}
  .btn-ghost:hover{background:#eef3ee}

  .content{padding:24px 26px 60px;overflow-y:auto;flex:1;min-height:0}
  .page{display:none;animation:fade .25s ease}
  .page.active{display:block}
  @keyframes fade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

  /* ===== Cards / grids ===== */
  .kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:22px}
  @media(max-width:1240px){.kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
  .kpi{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:16px 16px 15px;position:relative;overflow:hidden;box-shadow:var(--shadow);min-width:0}
  .kpi::before{content:"";position:absolute;inset-inline-end:0;top:0;bottom:0;width:4px;background:var(--green)}
  .kpi.gold::before{background:var(--gold)}.kpi.late::before{background:var(--late)}.kpi.prog::before{background:var(--prog)}
  .kpi .k-label{font-size:12.5px;color:var(--muted);font-weight:500;display:flex;align-items:center;gap:7px}
  .kpi .k-label svg{width:15px;height:15px;opacity:.7}
  .kpi .k-val{font-size:30px;font-weight:800;letter-spacing:-.02em;margin-top:6px;color:var(--ink)}
  .kpi .k-val small{font-size:14px;font-weight:600;color:var(--muted)}
  .kpi .k-sub{font-size:11.5px;color:var(--muted);margin-top:2px}

  .grid-2{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}
  .grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:16px}
  .card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
  .card-h{padding:15px 18px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}
  .card-h h3{font-size:14.5px;font-weight:700}
  .card-h .h-note{font-size:11.5px;color:var(--muted);font-weight:500}
  .card-b{padding:16px 18px}

  /* ===== Charts ===== */
  .chart .card-b svg{width:100%;height:auto;display:block;overflow:visible}
  .legend{display:flex;flex-wrap:wrap;gap:6px 16px;margin-top:12px;font-size:12px;color:var(--muted)}
  .legend i{width:11px;height:11px;border-radius:3px;display:inline-block;margin-inline-end:6px;vertical-align:-1px}
  .empty{text-align:center;color:var(--muted);font-size:13px;padding:28px 10px}

  /* ===== Table ===== */
  .toolbar{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:16px;align-items:center}
  .search{position:relative;flex:1;min-width:200px}
  .search svg{position:absolute;inset-inline-start:12px;top:50%;transform:translateY(-50%);width:17px;height:17px;color:var(--muted)}
  .search input{width:100%;padding:10px 38px 10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
  .toolbar select{padding:9px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink)}
  .table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow)}
  table{width:100%;border-collapse:collapse;font-size:13px;min-width:880px}
  thead th{background:var(--surface-2);text-align:right;padding:12px 14px;font-weight:700;color:var(--green-d);border-bottom:1px solid var(--line);white-space:nowrap;font-size:12.5px}
  tbody td{padding:11px 14px;border-bottom:1px solid #eef2ee;vertical-align:middle}
  /* خلفية صريحة على الصفّ: يرثها العمود المثبَّت فلا يظهر المحتوى خلفه
     عند التمرير، ويبقى تلوين الصفوف المتأخرة/القريبة كما هو. */
  tbody tr{background:var(--surface)}
  /* خلية التصنيف: حبّتان متجاورتان تلتفّان على الشاشات الضيّقة */
  td.col-tags{white-space:normal}
  td.col-tags .pill{display:inline-block;margin:1px 0 1px 4px}
  /* تثبيت عمود الإجراءات عند حافة التمرير (الصفحة RTL فالحافة يسارًا) */
  th.col-act,td.col-act{position:sticky;left:0;z-index:2;background:inherit;
    box-shadow:1px 0 0 var(--line)}
  thead th.col-act{background:var(--surface-2);z-index:3}
  @media print{th.col-act,td.col-act{position:static;box-shadow:none}}
  tbody tr:hover{background:#f7faf7}
  tbody tr:last-child td{border-bottom:none}
  .tno{font-weight:700;color:var(--green-d);font-variant-numeric:tabular-nums;white-space:nowrap}
  .pill{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;font-weight:600;padding:3px 10px;border-radius:20px;white-space:nowrap}
  .pill::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
  .s-جديد{color:var(--new);background:#eaf1f9}
  .s-تحت-الإجراء{color:var(--prog);background:#fbf2e2}
  .s-بانتظار-الرد{color:var(--wait);background:#f0ecf9}
  .s-مكتمل{color:var(--done);background:#e7f3ec}
  .s-مؤجل{color:var(--post);background:#eef1f3}
  .s-ملغى{color:var(--canc);background:#fbeae8}
  .prio{font-size:11.5px;font-weight:700}
  .p-عادي{color:var(--muted)}.p-عاجل{color:var(--prog)}.p-عاجل-جدًا{color:#d35400}.p-حالاً{color:var(--late)}
  .late-tag{color:var(--late);font-size:11px;font-weight:700;margin-inline-start:6px}
  .held-tag{color:var(--purple);font-size:11px;font-weight:700;margin-inline-start:6px}
  .due-tag{color:#d97706;font-size:11px;font-weight:700;margin-inline-start:6px}
  .row-act{display:flex;gap:6px}
  .row-act button{width:30px;height:30px;border-radius:8px;border:1px solid var(--line);background:var(--surface-2);display:flex;align-items:center;justify-content:center;color:var(--muted)}
  .row-act button:hover{background:#eef3ee;color:var(--green-d)}
  .row-act button svg{width:15px;height:15px}

  /* ===== Modal ===== */
  .overlay{position:fixed;inset:0;background:rgba(15,30,20,.45);display:none;align-items:flex-start;justify-content:center;z-index:80;padding:30px 16px;overflow-y:auto}
  .overlay.show{display:flex}
  .modal{background:var(--surface);border-radius:18px;width:100%;max-width:720px;box-shadow:0 24px 60px rgba(0,0,0,.25);animation:pop .2s ease}
  @keyframes pop{from{opacity:0;transform:scale(.97)}to{opacity:1;transform:none}}
  .modal-h{padding:18px 22px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}
  .modal-h h3{font-size:16px;font-weight:700}
  .modal-h button{width:34px;height:34px;border-radius:9px;border:none;background:var(--surface-2);color:var(--muted);font-size:20px}
  .modal-h button:hover{background:#eee}
  .modal-b{padding:20px 22px}
  .form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px 16px}
  .field{display:flex;flex-direction:column;gap:5px}
  .field.full{grid-column:1/-1}
  .field label{font-size:12.5px;font-weight:600;color:var(--ink)}
  .field label .req{color:var(--canc)}
  .field input,.field select,.field textarea{padding:9px 11px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--ink);width:100%}
  .field input:focus,.field select:focus,.field textarea:focus{outline:none;border-color:var(--green);box-shadow:0 0 0 3px rgba(0,171,175,.16)}
  .field textarea{resize:vertical;min-height:62px}
  .chk-row{display:flex;flex-wrap:wrap;gap:8px 14px;padding:4px 0}
  .chk-row label{display:inline-flex;align-items:center;gap:5px;font-size:12.5px;font-weight:500;color:var(--ink);cursor:pointer}
  .chk-row input{width:auto;margin:0}
  #loginScreen{position:fixed;inset:0;z-index:6000;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#2A206A 0%,#1a1448 100%);padding:20px}
  #loginScreen.hidden{display:none}
  .login-card{background:#fff;border-radius:20px;padding:34px 30px 28px;width:100%;max-width:390px;box-shadow:0 24px 70px rgba(0,0,0,.35);text-align:center}
  .login-card img{height:48px;margin-bottom:16px}
  .login-card h2{font-size:17px;color:var(--green-d);margin:0 0 4px;font-weight:800}
  .login-card .lsub{font-size:12.5px;color:var(--muted);margin-bottom:22px}
  .login-card .field{text-align:right;margin-bottom:14px}
  .login-card .field input{width:100%}
  .login-err{color:var(--canc);font-size:12.5px;min-height:18px;margin:2px 0 8px;font-weight:600}
  .login-card .btn-primary{width:100%;justify-content:center;padding:11px}
  .login-demo{margin-top:18px;font-size:11px;color:var(--muted);background:var(--surface-2);border-radius:12px;padding:11px 12px;text-align:right;line-height:1.95}
  .login-demo b{color:var(--green-d)}
  .user-chip{display:flex;align-items:center;gap:10px}
  .user-chip .uc-info{display:flex;flex-direction:column;line-height:1.25}
  .user-chip .uc-name{font-size:13px;font-weight:700;color:#2b2747}
  .user-chip .uc-role{font-size:11px;color:var(--green);font-weight:600}
  .btn-sm{padding:5px 10px;font-size:12px}
  .mono{font-family:ui-monospace,Menlo,monospace;direction:ltr;font-size:12px;color:var(--muted)}
  .init-kpis{display:grid;grid-template-columns:repeat(auto-fill,minmax(185px,1fr));gap:14px;margin-bottom:18px}
  .init-alert{background:#fff7ed;border:1px solid #fed7aa;border-radius:14px;padding:14px 16px;margin-bottom:18px;display:flex;gap:12px;align-items:flex-start}
  .init-alert svg{width:20px;height:20px;flex:0 0 auto;color:#d97706;margin-top:2px}
  .init-alert .ia-t{font-weight:700;color:#b45309;margin-bottom:4px;font-size:13.5px}
  .init-alert ul{margin:0;padding-inline-start:18px;font-size:12.5px;color:#92400e;line-height:1.9}
  .about-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px}
  .about-item{background:var(--surface-2);border-radius:12px;padding:12px 14px}
  .about-item .ai-l{font-size:11.5px;color:var(--muted);margin-bottom:3px}
  .about-item .ai-v{font-size:13.5px;font-weight:700;color:#2b2747}
  .chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
  .chip{background:rgba(0,171,175,.1);color:var(--green-d);border-radius:20px;padding:3px 11px;font-size:12px;font-weight:600}
  .lnk{background:none;border:none;color:var(--teal);font-weight:600;font-size:12.5px;cursor:pointer;padding:2px 4px}
  .lnk:hover{text-decoration:underline}
  .kpi-click{cursor:pointer;transition:transform .12s ease,box-shadow .12s ease}
  .kpi-click:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(42,32,106,.13)}
  .qf-chip{display:inline-block;background:rgba(0,171,175,.12);color:var(--green-d);border-radius:20px;padding:2px 10px;font-weight:600;margin-inline-start:8px}
  .qf-chip b{cursor:pointer;color:var(--canc);margin-inline-start:4px}
  .row-act{white-space:nowrap}
  .modal-f{padding:16px 22px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:10px;background:var(--surface-2);border-radius:0 0 18px 18px}

  /* ===== Achievements ===== */
  .ach-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:16px;margin-bottom:22px}
  .ach{background:linear-gradient(135deg,var(--green),var(--green-d));color:#fff;border-radius:var(--radius);padding:20px;box-shadow:var(--shadow);position:relative;overflow:hidden}
  .ach.gold{background:linear-gradient(135deg,var(--gold),#4a1f7a)}
  .ach .a-icon{width:40px;height:40px;border-radius:11px;background:rgba(255,255,255,.16);display:flex;align-items:center;justify-content:center;margin-bottom:14px}
  .ach .a-icon svg{width:21px;height:21px}
  .ach .a-val{font-size:34px;font-weight:800;letter-spacing:-.02em}
  .ach .a-label{font-size:13px;opacity:.92;margin-top:2px}
  .ach-list .item{display:flex;gap:12px;padding:12px 0;border-bottom:1px solid #eef2ee}
  .ach-list .item:last-child{border:none}
  .ach-list .dot{width:9px;height:9px;border-radius:50%;background:var(--gold);margin-top:6px;flex:none}
  .ach-list .t{font-size:13.5px;font-weight:600}
  .ach-list .m{font-size:11.5px;color:var(--muted)}

  /* ===== Settings ===== */
  .set-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:10px}
  .tag{display:inline-flex;align-items:center;gap:6px;background:var(--surface-2);border:1px solid var(--line);border-radius:20px;padding:5px 8px 5px 12px;font-size:12.5px}
  .tag button{border:none;background:none;color:var(--muted);font-size:15px;line-height:1;padding:0 2px}
  .tag button:hover{color:var(--canc)}
  .add-inline{display:flex;gap:8px;margin-top:8px}
  .add-inline input{flex:1;padding:8px 11px;border:1px solid var(--line);border-radius:9px}
  .audit-item{display:flex;gap:12px;padding:10px 0;border-bottom:1px solid #eef2ee;font-size:13px}
  .audit-item:last-child{border:none}
  .audit-item .ico{width:30px;height:30px;border-radius:8px;background:var(--surface-2);display:flex;align-items:center;justify-content:center;flex:none;color:var(--green-d)}
  .audit-item .ico svg{width:15px;height:15px}
  .audit-item .when{margin-inline-start:auto;color:var(--muted);font-size:11.5px;white-space:nowrap}
  .file-in{display:none}

  .toast{position:fixed;bottom:24px;inset-inline-start:50%;transform:translateX(50%) translateY(20px);background:var(--ink);color:#fff;padding:11px 20px;border-radius:11px;font-size:13.5px;font-weight:600;box-shadow:0 8px 28px rgba(0,0,0,.3);opacity:0;pointer-events:none;transition:.3s;z-index:200;display:flex;align-items:center;gap:9px}
  .toast.show{opacity:1;transform:translateX(50%) translateY(0)}
  .toast svg{width:17px;height:17px;color:var(--gold-l)}

  .hint{background:#e7f6f6;border:1px solid #c2e8e9;color:var(--green-d);border-radius:10px;padding:10px 14px;font-size:12.5px;display:flex;gap:9px;align-items:flex-start;margin-bottom:16px}
  .hint svg{width:17px;height:17px;flex:none;margin-top:1px;color:var(--green)}

  @media(max-width:980px){
    .app{grid-template-columns:1fr}
    .sidebar{position:fixed;inset-inline-start:0;top:0;width:248px;z-index:90;transform:translateX(100%);transition:.25s;box-shadow:0 0 40px rgba(0,0,0,.3)}
    .sidebar.open{transform:none}
    .menu-btn{display:flex!important}
    .grid-2,.grid-3{grid-template-columns:1fr}
    .form-grid{grid-template-columns:1fr}
    .content{padding:18px 16px 60px}
    .topbar{padding:12px 16px}
  }
  .menu-btn{display:none}
  .scrim{display:none;position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:85}
  .scrim.show{display:block}

  .rep-controls{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:12px 14px;margin-bottom:14px}
  .rep-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
  .rep-actions .sp{flex:1}
  .rep-actions .btn{height:38px}
  .rep-table-wrap{overflow-x:auto;margin-bottom:4px}
  .report{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}
  .rep-head{display:flex;align-items:center;gap:16px;padding:22px 24px;border-bottom:2px solid var(--green);background:var(--surface-2)}
  .rep-head .rlogo{height:48px;display:flex;align-items:center;flex:none}
  .rep-head .rlogo img{height:48px;width:auto;object-fit:contain}
  .rep-head .rlogo svg{width:28px;height:28px}
  .rep-head h2{font-size:19px;color:var(--green-d);font-weight:800}
  .rep-head .meta{font-size:12.5px;color:var(--muted);margin-top:3px}
  .rep-body{padding:20px 24px 26px}
  .rep-kpis{display:grid;grid-template-columns:repeat(auto-fill,minmax(148px,1fr));gap:12px;margin-bottom:10px}
  .rep-kpi{border:1px solid var(--line);border-radius:11px;padding:12px 14px;background:var(--surface-2)}
  .rep-kpi .v{font-size:23px;font-weight:800;color:var(--green-d);letter-spacing:-.02em}
  .rep-kpi .l{font-size:11.5px;color:var(--muted);margin-top:1px}
  .rep-section-title{font-size:14.5px;font-weight:700;color:var(--green-d);margin:24px 0 10px;padding-bottom:6px;border-bottom:1px solid var(--line)}
  .rep-table{width:100%;border-collapse:collapse;font-size:13px}
  .rep-table th{background:var(--green);color:#fff;text-align:right;padding:9px 12px;font-weight:600;font-size:12.5px;white-space:nowrap}
  .rep-table td{padding:8px 12px;border-bottom:1px solid #eef2ee}
  .rep-table tr:nth-child(even) td{background:var(--surface-2)}
  .rep-empty{padding:34px;text-align:center;color:var(--muted);font-size:13.5px}

  /* ===== Print ===== */
  @media print{
    .sidebar,.topbar,.toolbar,.row-act,.no-print,.menu-btn{display:none!important}
    .app,.main{display:block!important;height:auto!important;overflow:visible!important}.content{padding:0;overflow:visible!important;height:auto!important;min-height:0}
    .card,.kpi,.ach{box-shadow:none;border:1px solid #ccc;break-inside:avoid}
    body{background:#fff}
    .page{display:none!important}.page.print-active{display:block!important}
    .print-head{display:flex!important}
    body.rep-print .print-head{display:none!important}
    body.rep-print .report{box-shadow:none;border:none}
    .rep-table tr,.rep-table thead{break-inside:avoid}
  }
  .print-head{display:none;align-items:center;gap:14px;padding-bottom:14px;margin-bottom:18px;border-bottom:2px solid var(--green)}
  .print-head img{height:46px}
  .print-head .ph-t{font-size:18px;font-weight:800;color:var(--green-d)}
  .print-head .ph-s{font-size:12px;color:var(--muted)}

/* ===== تقويم الحضور والإجازات ===== */
.cal-head{display:flex;align-items:center;gap:8px;margin-bottom:12px}
.cal-head h3{flex:1;text-align:center;font-size:15px;color:var(--green-d);font-weight:700}
.cal-nav{width:32px;height:32px;border-radius:8px;border:1px solid var(--line);background:var(--surface-2);font-size:18px;color:var(--green-d);line-height:1}
.cal-nav:hover{background:#eef3ee}
.cal-grid{border:1px solid var(--line);border-radius:12px;overflow:hidden}
.cal-row{display:grid;grid-template-columns:repeat(7,1fr)}
.cal-dow-cell{background:var(--surface-2);padding:8px 4px;text-align:center;font-size:12px;font-weight:700;color:var(--green-d);border-bottom:1px solid var(--line)}
.cal-cell{min-height:82px;border-inline-start:1px solid #eef2ee;border-bottom:1px solid #eef2ee;padding:4px;overflow:hidden}
.cal-cell:nth-child(7n){border-inline-start:none}
.cal-empty{background:#fafafa}
.cal-today{background:#eef7f0}
.cal-num{font-size:12px;color:var(--muted);text-align:center;font-weight:600;margin-bottom:3px}
.cal-today .cal-num{color:var(--green);font-weight:800}
.cal-ev{color:#fff;font-size:10.5px;border-radius:5px;padding:1px 5px;margin-bottom:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
.cal-ev:hover{opacity:.88}
.cal-more{font-size:10px;color:var(--muted);text-align:center}
@media(max-width:640px){.cal-cell{min-height:56px}.cal-ev{font-size:9px;padding:1px 3px}}

/* ===== ملف الموظفة (P5) ===== */
.pf-basis{display:inline-block;font-size:10.5px;font-weight:600;color:var(--muted);
  background:var(--surface-2);border-radius:6px;padding:2px 7px;margin-top:6px}
.pf-denom{font-size:11px;color:var(--muted);line-height:1.7;margin-top:6px}
.pf-warn{font-size:11px;color:#b45309;background:#fffbeb;border:1px solid #fde68a;
  border-radius:8px;padding:7px 9px;margin-top:8px;line-height:1.75}
.pf-low{opacity:.72}
.pf-dist{list-style:none;margin:0;padding:0}
.pf-dist li{display:flex;align-items:center;gap:8px;padding:5px 0;cursor:pointer;border-radius:6px}
.pf-dist li:hover{background:var(--surface-2)}
.pf-dist .lbl{flex:0 0 42%;font-size:12.5px}
.pf-dist .bar{flex:1;height:8px;background:#eef1f6;border-radius:4px;overflow:hidden}
.pf-dist .bar i{display:block;height:100%;border-radius:4px}
.pf-dist .num{flex:0 0 38px;text-align:left;font-weight:700;font-size:12.5px}
.pf-unset .lbl,.pf-unset .num{color:var(--muted)}
.pf-notes textarea{width:100%;min-height:110px;resize:vertical;font:inherit;
  padding:10px;border:1px solid var(--line);border-radius:10px}
.pf-private{font-size:11px;font-weight:700;color:#7c2d12;background:#fff7ed;
  border:1px solid #fed7aa;border-radius:8px;padding:5px 9px;display:inline-block}
.kpi-drill{cursor:pointer}
.kpi-drill:hover{box-shadow:0 4px 14px rgba(0,0,0,.09)}

/* ===== المصفوفة الربعية/السنوية (P9) ===== */
.pf-mx{width:100%;border-collapse:collapse;font-size:12.5px;min-width:640px}
.pf-mx th,.pf-mx td{padding:9px 11px;border-bottom:1px solid #eef2ee;text-align:center;white-space:nowrap}
.pf-mx th:first-child,.pf-mx td:first-child{text-align:right;white-space:normal}
.pf-mx thead th{background:var(--surface-2);color:var(--green-d);font-weight:700}
.pf-mx tbody tr:hover{background:var(--surface-2)}
.pf-mx .mx-group td{background:var(--surface-2);font-weight:700;color:var(--green-d);text-align:right}
.pf-mx .mx-sub td:first-child{padding-inline-start:26px;color:var(--muted);font-weight:500}
.pf-mx .mx-denom td{font-size:11px;color:var(--muted);border-bottom:1px solid #f6f8f6}
.pf-mx .mx-year{background:#fafbfc;font-weight:700}
.pf-mx td.mx-cell{cursor:pointer}
.pf-mx td.mx-cell:hover{outline:2px solid var(--teal);outline-offset:-2px;border-radius:6px}
.pf-mx .mx-none{color:var(--muted)}

/* ===== تنبيه قراءة المؤشّرات =====
   ثابت لا يُغلَق، واضح بلا إزعاج: حياد لوني ولا أيقونة تحذير حمراء،
   ويُطبع مع التقرير لأن قارئ الورقة أحوج إليه من قارئ الشاشة. */
  .eval-note{display:flex;gap:9px;align-items:flex-start;
    background:var(--surface-2);border:1px solid var(--line);
    border-inline-start:3px solid var(--teal);border-radius:10px;
    padding:10px 13px;margin-bottom:16px;
    font-size:11.5px;line-height:1.95;color:var(--muted)}
  .eval-note svg{width:15px;height:15px;flex:0 0 15px;margin-top:3px;color:var(--teal)}
  .eval-note b{color:var(--green-d);font-weight:700}
  .report .eval-note{margin:0 0 14px}
  @media print{.eval-note{background:#fff;border-color:#ccc;color:#444;
    -webkit-print-color-adjust:exact;print-color-adjust:exact}}
