/* مركز التحليلات */
.an { --an-card: #fff; --an-line: #dde4e2; --an-soft: #f6f8f7; display: block; }
.an-hero { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding: 26px 30px; border-radius: 18px; color: #fff; margin: 4px 0 14px;
  background: radial-gradient(900px 300px at 85% -40%, rgba(66, 190, 190, .38), transparent 60%), radial-gradient(600px 260px at 0% 120%, rgba(47, 85, 164, .45), transparent 60%), linear-gradient(120deg, #101c33, #0b4f58); box-shadow: 0 10px 30px -14px rgba(11, 79, 88, .6); }
.an-hero h1 { font-size: 1.75rem; letter-spacing: -.2px; }
.an-hero p { margin: 4px 0 0; color: #cfe1e4; } .an-hero p.sm { font-size: .85rem; opacity: .8; }
.an-hero-h { display: flex; align-items: center; gap: 18px; }
.an-hero-s { display: flex; flex-direction: column; gap: 2px; max-width: 220px; } .an-hero-s .lab { font-size: .85rem; color: #b9d0d3; }
.an-hero-s b { font-size: 1.5rem; } .an-hero-s .hint { font-size: .76rem; color: #a9c2c6; line-height: 1.45; }
.c-ring-v { fill: #fff; font-size: 38px; font-weight: 600; }

.an-bar { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border: 1px solid var(--an-line); border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; box-shadow: 0 6px 18px -14px rgba(20, 32, 51, .5); }
.an-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.an-chip { border: 1px solid var(--an-line); background: #fff; color: var(--ink-2); border-radius: 99px; padding: 5px 13px; font-size: .88rem; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.an-chip:hover { border-color: var(--teal); color: var(--teal); } .an-chip.on { background: var(--teal); border-color: var(--teal); color: #fff; } .an-chip.ghost { background: transparent; }
.an-f { display: flex; flex-direction: column; gap: 2px; font-size: .78rem; color: var(--mute); }
.an-f input, .an-f select { border: 1px solid var(--an-line); border-radius: 9px; padding: 5px 8px; background: #fff; min-width: 120px; font-size: .9rem; color: var(--ink); }

.an-ins { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px 12px; margin-bottom: 14px; }
.an-ins .in { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid var(--an-line); border-radius: 12px; padding: 9px 12px; font-size: .92rem; border-inline-start: 4px solid #8aa; }
.an-ins .in i { font-style: normal; font-size: .8rem; margin-top: 4px; }
.an-ins .good { border-inline-start-color: #0ca30c; } .an-ins .good i { color: #0a7a0a; } .an-ins .bad { border-inline-start-color: #d03b3b; } .an-ins .bad i { color: #d03b3b; }
.an-ins .warn { border-inline-start-color: #e0a100; } .an-ins .warn i { color: #a96a06; } .an-ins .info { border-inline-start-color: #2a78d6; } .an-ins .info i { color: #2a78d6; }

.an-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 6px; }
.an-k { position: relative; background: #fff; border: 1px solid var(--an-line); border-radius: 14px; padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 4px; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.an-k:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -16px rgba(20, 32, 51, .55); }
.an-k::before { content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; background: var(--teal); opacity: .85; }
.an-k.bad::before { background: #d03b3b; } .an-k.ok::before { background: #0ca30c; }
.an-k .l { font-size: .84rem; color: var(--mute); } .an-k .v { font-size: 1.85rem; line-height: 1.15; font-weight: 600; letter-spacing: -.3px; }
.an-k .f { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; }
.an-k .mini { font-size: .78rem; color: var(--mute); }
.an-d { font-size: .8rem; font-weight: 600; padding: 1px 8px; border-radius: 99px; white-space: nowrap; }
.an-d.up { color: #006300; background: #e3f4e6; } .an-d.down { color: #a62323; background: #fbe6e6; } .an-d.flat { color: var(--mute); background: #eef1f0; }

.an-sec { font-size: 1.05rem; margin: 22px 2px 10px; display: flex; align-items: center; gap: 10px; color: var(--ink); }
.an-sec::before { content: ''; width: 22px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--teal), #42bebe); }
.an-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; margin-top: 12px; }
.an-grid .s3 { grid-column: span 3; } .an-grid .s4 { grid-column: span 4; } .an-grid .s5 { grid-column: span 5; } .an-grid .s6 { grid-column: span 6; }
.an-grid .s7 { grid-column: span 7; } .an-grid .s8 { grid-column: span 8; } .an-grid .s12 { grid-column: span 12; }
.an-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--an-line); border-radius: 14px; padding: 14px 16px 16px; min-width: 0; }
.an-card > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.an-card h3 { font-size: 1rem; } .an-card header p { margin: 1px 0 0; font-size: .8rem; color: var(--mute); }
.an-tg { border: 1px solid var(--an-line); background: #fff; border-radius: 8px; width: 30px; height: 30px; cursor: pointer; color: var(--mute); font-size: 1rem; line-height: 1; }
.an-tg:hover, .an-tg.on { background: var(--teal-l); color: var(--teal); border-color: var(--teal); }
.an-lg { display: flex; flex-wrap: wrap; gap: 14px; font-size: .82rem; color: var(--ink-2); margin-bottom: 4px; align-items: center; }
.an-lg i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-inline-end: 6px; vertical-align: middle; } .an-lg small { color: var(--mute); }
.an-ch { width: 100%; overflow: hidden; } .an-ch svg { display: block; max-width: 100%; }
.an-lgd { text-align: center; font-weight: 600; font-size: .95rem; margin-top: -6px; }

/* عناصر الرسوم */
.c-ax { font-size: 11px; fill: #6b7684; } .c-dn-v { font-size: 22px; font-weight: 600; fill: #142033; } .c-dn-l { font-size: 11px; fill: #6b7684; }
.c-g-v { font-size: 30px; font-weight: 600; fill: #142033; } .c-g-l { font-size: 10.5px; fill: #6b7684; }
.c-mark { transition: opacity .12s; outline: none; } .c-mark:hover, .c-mark:focus { opacity: .8; }
.c-hit { outline: none; }
.c-dn { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; }
.c-lg { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .86rem; min-width: 140px; }
.c-lg li { display: flex; align-items: center; gap: 8px; } .c-lg i { width: 10px; height: 10px; border-radius: 3px; flex: none; } .c-lg span { flex: 1; } .c-lg b { font-weight: 600; color: var(--ink); }
.c-hb { display: flex; flex-direction: column; gap: 9px; }
.c-hb-r { display: grid; grid-template-columns: minmax(90px, 36%) 1fr auto; align-items: center; gap: 10px; padding: 2px 4px; border-radius: 8px; outline: none; }
.c-hb-r.click { cursor: pointer; } .c-hb-r:hover, .c-hb-r:focus-visible { background: var(--an-soft); }
.c-hb-l { font-size: .88rem; line-height: 1.3; } .c-hb-l small { display: block; color: var(--mute); font-size: .74rem; }
.c-hb-t { height: 9px; background: #edf1f0; border-radius: 9px; overflow: hidden; } .c-hb-f { height: 100%; border-radius: 9px; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.c-hb b { font-size: .88rem; min-width: 34px; text-align: end; }
.c-fn { display: flex; flex-direction: column; gap: 7px; }
.c-fn-r { display: grid; grid-template-columns: minmax(96px, 34%) 1fr 44px 40px; align-items: center; gap: 8px; font-size: .86rem; border-radius: 8px; padding: 1px 4px; outline: none; } .c-fn-r:hover { background: var(--an-soft); }
.c-fn-t { height: 20px; background: #edf1f0; border-radius: 6px; overflow: hidden; } .c-fn-f { height: 100%; border-radius: 6px; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.c-fn-r small { color: var(--mute); font-size: .74rem; text-align: end; } .c-fn-r b { text-align: end; }
.c-heat { display: flex; flex-direction: column; gap: 3px; }
.c-heat-r { display: flex; gap: 3px; align-items: center; } .c-heat-d { width: 56px; flex: none; font-size: .78rem; color: var(--mute); direction: rtl; text-align: end; padding-inline-end: 6px; }
.c-heat-h span { flex: 1; text-align: center; font-size: .68rem; color: var(--mute); min-width: 0; } .c-heat-h span:first-child { flex: none; width: 56px; }
.c-cell { flex: 1; height: 24px; border-radius: 5px; background: #f0f3f2; min-width: 0; outline: none; transition: transform .1s; } .c-cell:hover, .c-cell:focus { transform: scale(1.18); box-shadow: 0 0 0 2px #fff, 0 0 0 3px #184f95; position: relative; z-index: 1; }
.an-scale { display: flex; align-items: center; gap: 4px; justify-content: flex-end; margin-top: 10px; font-size: .74rem; color: var(--mute); } .an-scale i { width: 20px; height: 10px; border-radius: 3px; }
.c-spark { display: block; }
.c-tip { position: fixed; z-index: 100; pointer-events: none; background: #142033; color: #fff; border-radius: 10px; padding: 8px 11px; font-size: .84rem; box-shadow: 0 10px 28px -10px rgba(0, 0, 0, .55); max-width: 260px; }
.c-tip-h { color: #b8c6d6; font-size: .76rem; margin-bottom: 3px; } .c-tip-r { display: flex; align-items: center; gap: 7px; } .c-tip-r i { width: 12px; height: 3px; border-radius: 2px; } .c-tip-r b { font-size: .95rem; } .c-tip-r span { color: #cdd8e4; }
.c-table-w { overflow: auto; max-height: 320px; } .c-table { width: 100%; border-collapse: collapse; font-size: .86rem; } .c-table th { text-align: start; color: var(--mute); font-weight: 500; padding: 5px 8px; border-bottom: 1px solid var(--an-line); position: sticky; top: 0; background: #fff; } .c-table td { padding: 5px 8px; border-bottom: 1px solid #eef2f1; }

/* جداول الموظفين/الجهات */
.an-t { width: 100%; border-collapse: collapse; font-size: .88rem; } .an-t th { text-align: start; font-weight: 500; font-size: .78rem; color: var(--mute); padding: 8px 10px; border-bottom: 1px solid var(--an-line); white-space: nowrap; background: var(--an-soft); }
.an-t td { padding: 9px 10px; border-bottom: 1px solid #eef2f1; vertical-align: middle; } .an-t tr.click { cursor: pointer; } .an-t tbody tr:hover { background: #f4faf9; } .an-t .n { text-align: center; } .an-t .sub { display: block; color: var(--mute); font-size: .75rem; }
.an-scc { white-space: nowrap; } .an-sc { display: inline-block; width: 64px; height: 8px; background: #edf1f0; border-radius: 8px; overflow: hidden; vertical-align: middle; margin-inline-end: 8px; } .an-sc i { display: block; height: 100%; border-radius: 8px; }

@media (max-width: 1000px) { .an-kpis { grid-template-columns: repeat(2, 1fr); } .an-grid .s3, .an-grid .s4, .an-grid .s5, .an-grid .s6, .an-grid .s7, .an-grid .s8 { grid-column: span 12; } .an-hero { padding: 20px; } .an-bar { position: static; } }
@media (max-width: 520px) { .an-kpis { grid-template-columns: 1fr; } .an-k .v { font-size: 1.6rem; } }
@media print { .no-print, .topbar, .an-tg { display: none !important; } .an-bar { display: none; } .an-card, .an-k { break-inside: avoid; box-shadow: none; } .an-hero { color: #000; background: #fff; border: 1px solid #ccc; } .an-hero p, .an-hero-s .lab, .an-hero-s .hint { color: #333; } body { background: #fff; } .an-grid .s3, .an-grid .s4, .an-grid .s5 { grid-column: span 6; } .an-grid .s7, .an-grid .s8 { grid-column: span 12; } }
@media (prefers-reduced-motion: reduce) { .c-hb-f, .c-fn-f, .an-k { transition: none; } }

.an-card > .an-body { flex: 1; min-width: 0; } .an-card.ctr > .an-body { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.c-lg .num, .c-lg b { unicode-bidi: isolate; }
