/* Pontajul (v1.2): calendarul lunii cu indicatorii și pulsul de azi, foaia zilei cu cronologia turelor, harta lunii pe oameni,
   calendarul persoanei, tabelul lunii (antet lipit sus), foaia de prezență zilnică tipărită pe antet.
   Fără derulare pe orizontală: fiecare vedere își schimbă forma după lățimea ei (container queries). Toate clasele: .pj-… */
:root { --pj-stick: 42px; --pj-p: #2e8b57; }
@media (max-width: 1240px) { :root { --pj-stick: 0px; } }

/* ---------- culorile codurilor (aceleași în calendar, tabel, harta pe oameni, calendarul persoanei) ---------- */
.pj-k-p { --k: #1f6b3a; --kb: #e3f4e8; }
.pj-k-pend { --k: #5b6571; --kb: #f4f5f7; }
.pj-k-abs { --k: #a3201a; --kb: #fdecea; }
.pj-k-mot { --k: #8a5a06; --kb: #fdf4e2; }
.pj-k-co { --k: #2f5b98; --kb: #e8f0fa; }
.pj-k-cm { --k: #6c2c95; --kb: #f3ecfb; }
.pj-k-alt { --k: #17706a; --kb: #e2f4f2; }
.pj-k-sus { --k: #4d5560; --kb: #eceff2; }
.pj-k-sl { --k: #a3201a; --kb: #fff3f2; }
.pj-k-off, .pj-k-none { --k: #8a939e; --kb: #f4f5f7; }
.pj-code, .pj-m, .pj-lg { background: var(--kb, var(--bg)); color: var(--k, var(--text-weak)); }
.pj-code { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 18px; padding: 0 4px; border-radius: 4px; font-size: 10.5px; font-weight: 750; letter-spacing: -.2px; white-space: nowrap; flex: none; }
.pj-m-late { --k: #8a5a06; --kb: #fdf4e2; }
.pj-m-ot { --k: #9a5200; --kb: #fff0dd; }

/* ---------- filtrele ---------- */
.pj-page .toolbar { align-items: center; }
.pj-f { width: 168px; flex: 0 1 168px; }
.pj-f:first-of-type { width: 210px; flex-basis: 210px; }
.pj-page .toolbar .searchbox { flex: 1 1 180px; }
.pj-top { gap: 6px 10px; font-size: 12.5px; }
.pj-states { gap: 6px; }
@media (max-width: 760px) {
  .pj-f, .pj-f:first-of-type { flex: 1 1 calc(50% - 4px); width: auto; }
  .pj-page .toolbar .searchbox { flex-basis: 100%; }
  .pj-page .toolbar .seg { flex: 1 1 auto; display: flex; }
  .pj-page .toolbar .seg button { flex: 1; padding: 0 8px; }
  .pj-page .monthnav { flex: 1 1 100%; } .pj-page .monthnav .inp { flex: 1; width: auto; }
  .pj-page .page-head .ph-act { margin-left: 0; width: 100%; }
}

/* ---------- indicatorii lunii, cu seria pe zile ---------- */
.pj-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1180px) { .pj-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) { .pj-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
.pj-kpi { --tone: var(--slate); position: relative; display: flex; flex-direction: column; gap: 1px; padding: 9px 11px 7px 15px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); min-width: 0; }
.pj-kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: var(--radius) 0 0 var(--radius); background: var(--tone); }
.pj-kpi.t-green { --tone: var(--green); } .pj-kpi.t-blue { --tone: var(--blue); } .pj-kpi.t-purple { --tone: #7a3fc2; } .pj-kpi.t-amber { --tone: #d39b2a; }
.pj-kpi.t-red { --tone: var(--red); } .pj-kpi.t-slate { --tone: #8a939e; }
.pj-kpi-l { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--text-weak); white-space: nowrap; overflow: hidden; }
.pj-kpi-l svg { color: var(--tone); flex: none; }
.pj-kpi-v { font-size: 22px; font-weight: 750; line-height: 1.15; letter-spacing: -.3px; white-space: nowrap; }
.pj-kpi-v small { font-size: 13px; font-weight: 600; color: var(--text-weak); letter-spacing: 0; }
.pj-kpi-s { font-size: 11.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-spark { display: block; width: 100%; height: 26px; margin-top: 5px; overflow: visible; }
.pj-spark.empty { height: 26px; }
.pj-spark rect { fill: var(--tone); opacity: .72; cursor: pointer; }
.pj-spark rect.we { opacity: .4; }
.pj-spark rect.td { opacity: 1; fill: var(--brand); }
.pj-spark rect:hover { opacity: 1; fill: var(--text); }
.pj-sp-base { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
@media (max-width: 620px) { .pj-kpi { padding: 8px 9px 6px 13px; } .pj-kpi-v { font-size: 19px; } .pj-kpi-s { white-space: normal; line-height: 1.25; } }

/* ---------- pulsul de azi ---------- */
.pj-live { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; padding: 8px 12px; border: 1px solid #cfe6d7; border-radius: var(--radius); background: linear-gradient(90deg, #eef9f2, #fff 65%); }
.pj-live-t { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pj-pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--green); animation: pj-pulse 2.2s ease-out infinite; flex: none; }
@keyframes pj-pulse { 0% { box-shadow: 0 0 0 0 rgba(46, 139, 87, .5); } 70% { box-shadow: 0 0 0 9px rgba(46, 139, 87, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 139, 87, 0); } }
.pj-live-n { display: flex; flex-wrap: wrap; gap: 3px 14px; font-size: 12.5px; color: var(--text-weak); }
.pj-live-i { white-space: nowrap; }
.pj-live-i b { font-size: 14px; color: var(--text); }
.pj-live-i.g b { color: var(--green-text); } .pj-live-i.a b { color: var(--amber-text); } .pj-live-i.r b { color: var(--red-text); }
.pj-live-a { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 760px) { .pj-live-a { margin-left: 0; width: 100%; } .pj-live-a .btn { flex: 1; } }
@media (prefers-reduced-motion: reduce) { .pj-pulse, .pj-tl-bar.run { animation: none !important; } }

/* ---------- calendarul lunii ---------- */
.pj-cal { container-type: inline-size; }
.pj-cal-h { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.pj-cal-h span { padding: 6px 9px; font-size: 11px; font-weight: 700; color: var(--text-weak); text-transform: uppercase; letter-spacing: .4px; min-width: 0; overflow: hidden; }
.pj-cal-h span.we { color: var(--text-faint); }
.pj-cal-h i { display: none; font-style: normal; }
.pj-cal-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.pj-day { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 116px; padding: 6px 8px 7px; background: #fff; color: var(--text);
  border-right: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); text-decoration: none !important; transition: background-color .12s; }
.pj-cal-g > :nth-child(7n) { border-right: 0; }
.pj-day.we { background: #f9fafb; }
.pj-day.hol { background: #fff6f5; }
.pj-day.out { background: repeating-linear-gradient(135deg, #f6f7f9 0 6px, #fff 6px 12px); }
a.pj-day:hover { background: #f4f8fd; box-shadow: inset 0 0 0 1px #b9cfeb; }
.pj-day.today { box-shadow: inset 0 0 0 2px var(--brand); }
.pj-day.future .pj-pres, .pj-day.future .pj-sh { opacity: .8; }
.pj-dh { display: flex; align-items: center; gap: 6px; min-width: 0; height: 18px; }
.pj-dn { font-size: 15px; font-weight: 750; line-height: 1; }
.pj-day.we .pj-dn { color: var(--text-weak); }
.pj-day.hol .pj-dn { color: var(--red-text); }
.pj-today { flex: none; height: 16px; padding: 0 6px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 16px; }
.pj-dhol { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; font-weight: 650; color: var(--red-text); }
.pj-iss { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 2px; height: 17px; padding: 0 5px; border-radius: 99px; background: var(--amber-bg); color: var(--amber-text); font-size: 10.5px; font-weight: 750; }
.pj-pres { display: grid; grid-template-columns: auto minmax(16px, 1fr) auto; align-items: center; gap: 6px; font-size: 11px; white-space: nowrap; }
.pj-pres b { font-size: 14px; font-weight: 750; }
.pj-pres small { font-size: 11px; color: var(--text-faint); }
.pj-pres em { font-style: normal; font-size: 11px; font-weight: 750; color: var(--green-text); }
.pj-pres.mid em { color: var(--amber-text); } .pj-pres.low em { color: var(--red-text); }
.pj-pres.fut, .pj-pres.none { display: block; color: var(--text-weak); font-size: 11.5px; }
.pj-pres.fut b { font-size: 13px; color: var(--text); }
.pj-bar { position: relative; display: block; height: 6px; border-radius: 3px; background: #eceff2; overflow: hidden; }
.pj-bar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--green); }
.pj-bar > i.run { background: repeating-linear-gradient(135deg, #2e8b57 0 3px, #8fd0aa 3px 6px); }
.pj-pres.mid .pj-bar > i:first-child { background: #d39b2a; } .pj-pres.low .pj-bar > i:first-child { background: var(--red); }
.pj-sh { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px 8px; }
.pj-shc { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 11px; color: var(--text-weak); white-space: nowrap; }
.pj-shc i { width: 7px; height: 7px; border-radius: 2px; background: var(--c); flex: none; }
.pj-shc b { margin-left: auto; font-weight: 650; color: var(--text); }
.pj-shc.miss b { color: var(--amber-text); }
.pj-shc small { font-weight: 500; color: var(--text-faint); }
.pj-shbar { display: none; gap: 1px; height: 6px; border-radius: 3px; overflow: hidden; }
.pj-shbar i { min-width: 2px; background: linear-gradient(90deg, var(--c) var(--f), color-mix(in srgb, var(--c) 28%, #fff) var(--f)); }
.pj-meta { display: flex; flex-wrap: wrap; gap: 3px; margin-top: auto; }
.pj-m { display: inline-flex; align-items: center; gap: 2px; height: 17px; padding: 0 5px; border-radius: 4px; font-size: 10.5px; font-weight: 750; white-space: nowrap; }
@container (max-width: 1060px) { .pj-day { min-height: 104px; padding: 5px 6px 6px; } .pj-sh { gap: 1px 5px; } .pj-shc { font-size: 10.5px; } }
@container (max-width: 920px) {
  .pj-sh { display: none; } .pj-shbar { display: flex; }
  .pj-cal-h b { display: none; } .pj-cal-h i { display: inline; }
  .pj-dhol { display: none; } .pj-day { min-height: 88px; } .pj-pres { grid-template-columns: auto minmax(10px, 1fr); } .pj-pres em { display: none; }
}
/* pe telefon: lista zilelor */
.pj-agenda { display: flex; flex-direction: column; }
.pj-ag { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 8px 10px; border-bottom: 1px solid var(--border-soft); color: var(--text); text-decoration: none !important; }
.pj-ag:last-child { border-bottom: 0; }
.pj-ag.we { background: #f9fafb; } .pj-ag.hol { background: #fff6f5; }
.pj-ag.today { background: #fff7f4; box-shadow: inset 3px 0 var(--brand); }
.pj-ag-d { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.pj-ag-d b { font-size: 18px; font-weight: 750; } .pj-ag-d small { font-size: 11px; color: var(--text-weak); }
.pj-ag.hol .pj-ag-d b { color: var(--red-text); }
.pj-ag-b { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pj-ag .pj-sh { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pj-ag .pj-dhol { white-space: normal; }
.pj-ag .pj-iss { margin: 0; }
/* legenda */
.pj-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 11.5px; color: var(--text-weak); }
.pj-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.pj-legend > span > i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; flex: none; }
.pj-lg { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 16px; padding: 0 3px; border-radius: 4px; font-size: 10px; font-weight: 750; }
.pj-lg.pj-iss { margin: 0; }
.pj-legend .pj-sq { width: 14px; height: 12px; cursor: default; }

/* ---------- pontajul pe oameni: harta lunii ---------- */
.pj-people { --n: 31; overflow: hidden; overflow: clip; }   /* fără container de derulare: antetul se lipește de fereastră */
.pj-pr { display: grid; grid-template-columns: 186px minmax(0, 1fr) 228px; align-items: center; gap: 10px; min-height: 30px; padding: 2px 10px; border-bottom: 1px solid var(--border-soft); }
.pj-pr:hover { background: #f8fafc; }
.pj-pr-h { position: sticky; top: var(--pj-stick); z-index: 4; min-height: 32px; background: var(--bg-soft); border-bottom: 1px solid var(--border); font-size: 11px; font-weight: 650; color: var(--text-weak); }
.pj-pr-h:hover { background: var(--bg-soft); }
.pj-pr-g { padding: 4px 10px; background: var(--bg-soft); border-bottom: 1px solid var(--border-soft); font-size: 11px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--text-weak); }
.pj-pr-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; color: var(--text); text-decoration: none !important; }
.pj-pr-who b { font-size: 12.5px; } .pj-pr-who small { font-size: 10.5px; color: var(--text-weak); }
a.pj-pr-who:hover b { color: var(--link); }
.pj-strip { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 2px; min-width: 0; }
.pj-sq { position: relative; display: flex; align-items: center; justify-content: center; height: 20px; min-width: 0; overflow: hidden; border-radius: 3px; background: var(--kb); color: var(--k);
  font-size: 9px; font-style: normal; font-weight: 750; letter-spacing: -.3px; cursor: pointer; }
.pj-sq.pj-k-p { background: #9ed2b3; }
.pj-sq.pj-k-p.long { background: #3f9b68; }
.pj-sq.pj-k-pend { background: repeating-linear-gradient(135deg, #c9e6d4 0 3px, #fff 3px 6px); }
.pj-sq.pj-k-abs { background: #e0544c; color: #fff; }
.pj-sq.pj-k-mot { background: #efc26a; color: #5a3b00; }
.pj-sq.pj-k-co { background: #6e9fd8; color: #fff; }
.pj-sq.pj-k-cm { background: #a57bd6; color: #fff; }
.pj-sq.pj-k-alt { background: #5bb2ac; color: #fff; }
.pj-sq.pj-k-sus { background: #b4b9bf; color: #fff; }
.pj-sq.pj-k-sl { background: #fbd6d2; color: #a3201a; }
.pj-sq.pj-k-off, .pj-sq.pj-k-none { background: #f1f3f5; cursor: default; }
.pj-sq.we.pj-k-off, .pj-sq.we.pj-k-none { background: #e8ebee; }
.pj-sq.pj-k-plan { background: #fff; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 75%, #fff); cursor: default; }
.pj-sq.fut { opacity: .6; cursor: default; }
.pj-sq.td { outline: 2px solid var(--brand); outline-offset: -1px; }
.pj-sq.fl::after { content: ""; position: absolute; top: 0; right: 0; border: 3px solid transparent; border-top-color: #9a5c00; border-right-color: #9a5c00; }
.pj-sq.fl.red::after { border-top-color: var(--red); border-right-color: var(--red); }
.pj-sq.late::before { content: ""; position: absolute; left: 2px; right: 2px; bottom: 1px; height: 2px; border-radius: 1px; background: #b36b00; }
.pj-sq.ot { box-shadow: inset 0 2px 0 #d07a22; }
.pj-sq:not(.pj-k-off):not(.pj-k-none):not(.pj-k-plan):not(.fut):hover { filter: brightness(.9); }
.pj-sqh { display: flex; flex-direction: column; align-items: center; font-style: normal; font-size: 10px; line-height: 1.05; color: var(--text-weak); border-radius: 3px; padding: 1px 0; }
.pj-sqh small { font-size: 8.5px; color: var(--text-faint); }
.pj-sqh.we { background: #e8ebee; } .pj-sqh.hol { color: var(--red-text); background: #fdecea; }
.pj-sqh.td { background: var(--brand); color: #fff; } .pj-sqh.td small { color: #ffe2d8; }
.pj-pr-tot { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); text-align: right; font-size: 12px; white-space: nowrap; }
.pj-pr-tot > :first-child { font-weight: 700; }
.pj-pr-h .pj-pr-tot b { font-size: 11px; font-weight: 650; }
.pj-people.narrow .pj-pr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who tot" "strip strip"; gap: 4px 8px; padding: 6px 10px; }
.pj-people.narrow .pj-pr-who { grid-area: who; } .pj-people.narrow .pj-strip { grid-area: strip; gap: 1px; } .pj-people.narrow .pj-pr-tot { grid-area: tot; display: flex; gap: 8px; font-size: 11.5px; }
.pj-people.narrow .pj-pr-tot small { color: var(--text-faint); font-weight: 500; }
.pj-people.narrow .pj-sq { height: 14px; border-radius: 2px; }
@media (max-width: 1100px) { .pj-pr { grid-template-columns: 160px minmax(0, 1fr) 160px; } .pj-pr-tot { grid-template-columns: repeat(4, minmax(0, 1fr)); } .pj-pr-tot > :nth-child(4), .pj-pr-tot > :nth-child(5) { display: none; } .pj-sq { font-size: 0; } }
@media (max-width: 1100px) { .pj-people.narrow .pj-pr-tot > * { display: inline; } }

/* ---------- foaia zilei ---------- */
.pj-dnav { display: inline-flex; align-items: center; gap: 4px; }
.pj-dnav .inp { width: 150px; }
@media (max-width: 760px) { .pj-dnav { flex: 1 1 100%; } .pj-dnav .inp { flex: 1; width: auto; } }
.pj-dks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pj-dk { display: inline-flex; align-items: baseline; gap: 5px; height: 30px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: 12px; line-height: 28px; color: var(--text-weak); white-space: nowrap; }
.pj-dk b { font-size: 15px; font-weight: 750; color: var(--text); }
.pj-dk.g b { color: var(--green-text); } .pj-dk.a b { color: var(--amber-text); } .pj-dk.r b { color: var(--red-text); } .pj-dk.b b { color: var(--blue-text); } .pj-dk.v b, .pj-dk.p b { color: #6c2c95; }
.pj-dk-btn { cursor: pointer; font: inherit; font-size: 12px; }
.pj-dk-btn:hover, .pj-dk-btn.on { background: var(--amber-bg); border-color: #f1d9a6; }
.pj-dks .pj-states { margin-left: auto; }
@media (max-width: 760px) { .pj-dk { height: 26px; line-height: 24px; padding: 0 7px; } .pj-dk b { font-size: 13.5px; } .pj-dks .pj-states { margin-left: 0; } }
.pj-sheet { container-type: inline-size; display: flex; flex-direction: column; gap: 10px; }
.pj-grp { overflow: hidden; overflow: clip; }
.pj-grp-h { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 6px 12px; border: 0; border-bottom: 1px solid var(--border-soft); background: var(--bg-soft);
  box-shadow: inset 4px 0 var(--c); font: inherit; color: var(--text); text-align: left; cursor: pointer; flex-wrap: wrap; }
.pj-grp-h:hover { background: #f1f3f6; }
.pj-grp-sw { width: 12px; height: 12px; border-radius: 3px; background: var(--c); flex: none; }
.pj-grp-h > b { font-size: 14px; font-weight: 700; }
.pj-grp-sub { font-size: 12.5px; font-weight: 600; color: var(--text-weak); }
.pj-grp-t { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px 12px; font-size: 12px; color: var(--text-weak); }
.pj-grp-t b { font-size: 13px; color: var(--text); }
.pj-grp-h > svg { color: var(--text-faint); flex: none; }
.pj-rows { display: flex; flex-direction: column; }
.pj-r { display: grid; grid-template-columns: minmax(170px, 1.25fr) 84px 58px 58px 40px 46px 48px 46px 42px minmax(200px, 3fr) 112px; column-gap: 8px; align-items: center;
  min-height: 36px; padding: 3px 12px; border-bottom: 1px solid var(--border-soft); font-size: 12.5px; cursor: pointer; }
.pj-r:last-child { border-bottom: 0; }
.pj-r:hover { background: #f7f9fc; }
.pj-r.wait { color: var(--text-weak); }
.pj-r.fl { box-shadow: inset 3px 0 #e7b45a; }
.pj-rh { position: sticky; top: var(--pj-stick); z-index: 3; min-height: 28px; background: #fff; font-size: 11px; font-weight: 650; color: var(--text-faint); cursor: default; border-bottom-color: var(--border); }
.pj-rh:hover { background: #fff; }
.pj-r .num { text-align: right; }
.pj-r > span { min-width: 0; }
.pj-c-who { display: flex; align-items: center; gap: 4px; }
.pj-c-who .plink { flex: 1 1 auto; min-width: 0; }
.pj-c-who .plink .pl-n, .pj-c-who .plink small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.pj-c-who .plink small { font-size: 11px; color: var(--text-weak); }
.pj-pcal-l { flex: none; display: inline-flex; padding: 4px; border-radius: 6px; color: var(--text-faint); }
.pj-pcal-l:hover { color: var(--link); background: var(--blue-bg); }
.pj-c-pl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-c-pl b { font-size: 11.5px; } .pj-c-pl small { font-size: 11px; color: var(--text-weak); }
.pj-c-in, .pj-c-out { white-space: nowrap; font-weight: 600; }
.pj-c-in .badge, .pj-c-out .badge { font-weight: 650; }
.pj-src { margin-left: 2px; padding: 0 3px; border-radius: 3px; font-size: 9px; font-weight: 750; vertical-align: 4px; }
.pj-src.manual { background: var(--amber-bg); color: var(--amber-text); } .pj-src.foaie { background: #e2f4f2; color: #17706a; } .pj-src.corectat { background: var(--blue-bg); color: var(--blue-text); }
.pj-p1 { margin-left: 1px; font-size: 9px; font-weight: 650; color: var(--text-faint); vertical-align: 4px; }
.pj-run { color: var(--green-text); font-weight: 650; font-size: 11.5px; }
.pj-c-h b { font-weight: 750; }
.pj-c-o.ok { color: var(--green-text); font-weight: 650; } .pj-c-o.warn { color: var(--amber-text); font-weight: 650; }
.pj-c-l small { display: block; font-size: 10.5px; }
.pj-c-c { display: flex; align-items: center; gap: 3px; }
.pj-fx { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); flex: none; }
.pj-c-tl { display: flex; flex-direction: column; gap: 2px; }
.pj-flags { display: flex; flex-wrap: wrap; gap: 3px; }
.pj-flags .badge { height: 16px; padding: 0 6px; font-size: 10.5px; }
.pj-c-act { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 3px; }
.pj-c-act .btn.sm { height: 24px; padding: 0 7px; font-size: 11.5px; }
.pj-c-act .btn.icon.sm { width: 26px; height: 26px; }
.pj-c-lv { grid-column: 3 / span 7; display: flex; align-items: center; gap: 6px; color: var(--text-weak); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-r.lv { color: var(--text-weak); }
/* cronologia: tura planificată, prezența reală, peste program, întârzierea */
.pj-tl { position: relative; height: 16px; border-radius: 3px; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 12 - 1px), #f1f3f5 calc(100% / 12 - 1px) calc(100% / 12)); }
.pj-tl > i { position: absolute; top: 0; bottom: 0; display: block; }
.pj-tl-plan { top: 1px !important; bottom: 1px !important; border-radius: 4px; background: color-mix(in srgb, var(--c) 20%, #fff); border: 1px solid color-mix(in srgb, var(--c) 60%, #fff); }
.pj-tl-bar { top: 5px !important; bottom: 5px !important; border-radius: 3px; background: var(--pj-p); }
.pj-tl-bar.run { background: repeating-linear-gradient(135deg, #2e8b57 0 5px, #77c49a 5px 10px); background-size: 14.14px 14.14px; animation: pj-run 1.4s linear infinite; }
@keyframes pj-run { to { background-position: 14.14px 0; } }
.pj-tl-ot { top: 4px !important; bottom: 4px !important; border-radius: 3px; background: repeating-linear-gradient(135deg, #e08a1e 0 3px, #f5c27e 3px 6px); }
.pj-tl-ot.ok { background: #e08a1e; }
.pj-tl-late { top: 5px !important; bottom: 5px !important; background: repeating-linear-gradient(90deg, var(--red) 0 2px, transparent 2px 4px); opacity: .85; }
.pj-tl-open { top: 5px !important; bottom: 5px !important; border-radius: 3px; background: repeating-linear-gradient(90deg, #d39b2a 0 4px, transparent 4px 7px); opacity: .9; }
.pj-tl-now { top: -3px !important; bottom: -3px !important; width: 0; border-left: 2px solid var(--brand); z-index: 2; }
.pj-tl-mid { top: -3px !important; bottom: -3px !important; width: 0; border-left: 1px dashed #9aa3ad; z-index: 1; }
.pj-axis { position: relative; height: 14px; }
.pj-axis span { position: absolute; top: 0; transform: translateX(-50%); font-size: 10px; font-weight: 600; color: var(--text-faint); white-space: nowrap; }
.pj-axis span.mid { color: var(--text); font-weight: 750; }
.pj-legend i.pj-lg-plan { background: color-mix(in srgb, #2f6fb5 20%, #fff); border: 1px solid color-mix(in srgb, #2f6fb5 60%, #fff); width: 16px; }
.pj-legend i.pj-lg-bar { background: var(--pj-p); height: 6px; width: 16px; }
.pj-legend i.pj-lg-ot { background: #e08a1e; height: 8px; width: 16px; }
.pj-legend i.pj-lg-late { background: repeating-linear-gradient(90deg, var(--red) 0 2px, transparent 2px 4px); height: 6px; width: 16px; }
.pj-legend i.pj-lg-run { background: repeating-linear-gradient(135deg, #2e8b57 0 3px, #77c49a 3px 6px); height: 6px; width: 16px; }
.pj-legend i.pj-lg-open { background: repeating-linear-gradient(90deg, #d39b2a 0 4px, transparent 4px 7px); height: 6px; width: 16px; }
@container (max-width: 1150px) {
  .pj-r { grid-template-columns: minmax(150px, 1.2fr) 76px 56px 56px 40px 48px 40px minmax(150px, 2.2fr) 104px; }
  .pj-r .pj-c-n, .pj-r .pj-c-l { display: none; }
  .pj-c-lv { grid-column: 3 / span 5; }
}
@container (max-width: 900px) {
  .pj-r { grid-template-columns: minmax(150px, 1.6fr) 54px 54px 38px 44px 38px minmax(110px, 1.5fr) 100px; column-gap: 6px; padding: 3px 10px; }
  .pj-r .pj-c-pl { display: none; }
  .pj-c-lv { grid-column: 2 / span 5; }
}
@container (max-width: 720px) {
  .pj-rh { display: none; }
  .pj-r { grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-areas: "who who who c" "in out h o" "tl tl tl tl" "act act act act"; row-gap: 3px; column-gap: 12px; padding: 7px 10px; }
  .pj-r .pj-c-who { grid-area: who; } .pj-r .pj-c-c { grid-area: c; justify-self: end; } .pj-r .pj-c-in { grid-area: in; } .pj-r .pj-c-out { grid-area: out; } .pj-r .pj-c-h { grid-area: h; text-align: left; }
  .pj-r .pj-c-o { grid-area: o; } .pj-r .pj-c-tl { grid-area: tl; } .pj-r .pj-c-act { grid-area: act; justify-content: flex-start; }
  .pj-r .pj-c-pl, .pj-r .pj-c-n, .pj-r .pj-c-l { display: none; }
  .pj-r .pj-c-act > .btn.icon { display: none; }
  .pj-r .pj-c-in::before, .pj-r .pj-c-out::before, .pj-r .pj-c-h::before, .pj-r .pj-c-o:not(:empty)::before { content: attr(data-l) " "; font-size: 10.5px; font-weight: 500; color: var(--text-faint); }
  .pj-r.lv { grid-template-areas: "who who who c" "lv lv lv lv"; }
  .pj-r.lv .pj-c-lv { grid-area: lv; } .pj-r.lv .pj-c-tl, .pj-r.lv .pj-c-act, .pj-r.lv .pj-c-pl { display: none; }
  .pj-grp-h { position: relative; padding-right: 34px; }
  .pj-grp-h > svg { position: absolute; right: 12px; top: 13px; }
  .pj-grp-t { margin-left: 20px; justify-content: flex-start; width: 100%; }
}
@media (max-width: 760px) { .pj-grp-t .h-sm { display: none; } }
/* previzualizarea foii de prezență (A4 micșorată, fără derulare laterală) */
.pj-prev { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #e9ebee; }
.pj-prev-in { width: 210mm; transform-origin: 0 0; }
.pj-prev-in .doc-sheet { margin: 0; box-shadow: none; }

/* foaia de prezență zilnică (pe antet, prin doc_sheet) */
.doc-body .pj-print { font-family: var(--font); font-size: 9pt; line-height: 1.3; color: #000; }
.doc-body .pj-print h1 { margin: 0 0 2px; font-size: 13pt; letter-spacing: .6px; }
.pj-print .pj-pr-sub { text-align: center; font-size: 9.5pt; margin-bottom: 4px; }
.pj-print .pj-pr-kpi { margin: 4px 0 6px; padding: 3px 6px; border: 1px solid #000; font-size: 8.5pt; }
.doc-body .pj-print h3 { margin: 8px 0 3px; font-size: 10pt; break-after: avoid; }
.doc-body .pj-print h3 small { font-weight: 400; }
.doc-body .pj-print table { table-layout: fixed; margin-bottom: 2px; }
.doc-body .pj-print th, .doc-body .pj-print td { padding: 1.5px 3px; border: 1px solid #555; font-size: 8pt; vertical-align: middle; text-align: left; overflow: hidden; }
.doc-body .pj-print th { background: #eceef1; font-weight: 700; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.doc-body .pj-print tr { break-inside: avoid; }
.doc-body .pj-print tr.tot td { font-weight: 700; background: #f5f6f8; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.doc-body .pj-print .nr { width: 7mm; text-align: right; } .doc-body .pj-print .mc { width: 14mm; } .doc-body .pj-print .tm { width: 15mm; }
.doc-body .pj-print .t { width: 13mm; white-space: nowrap; } .doc-body .pj-print .h { width: 11.5mm; text-align: right; } .doc-body .pj-print .ob { width: 32mm; font-size: 7.5pt; }
.doc-body .pj-print .pl { width: 26mm; } .doc-body .pj-print .ob2 { width: 52mm; }
.doc-body .pj-print td sup { font-size: 6pt; margin-left: 1px; } .doc-body .pj-print td small { font-size: 6.5pt; color: #444; }
.pj-print .pj-pr-legal { margin-top: 6px; font-size: 7.5pt; color: #333; }
.pj-print .pj-pr-sig { display: flex; justify-content: space-between; gap: 10mm; margin-top: 14mm; break-inside: avoid; }
.pj-print .pj-pr-sig div { flex: 1; padding-top: 2px; border-top: 1px solid #000; font-size: 9pt; }
.pj-print .pj-pr-sig small { font-size: 7.5pt; color: #444; }

/* ---------- calendarul persoanei ---------- */
.pj-pm { min-width: 0; }
.pj-pm-bar { gap: 8px; }
.pj-kpis-p .pj-kpi { padding-bottom: 9px; }
.pj-cmp { display: flex; flex-direction: column; gap: 5px; padding: 10px 14px; }
.pj-cmp-t { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 13px; }
.pj-cmp-t small { font-size: 12px; color: var(--text-weak); }
.pj-cmp-r { display: grid; grid-template-columns: 96px minmax(0, 1fr) 64px minmax(0, 220px); align-items: center; gap: 8px; font-size: 12.5px; }
.pj-cmp-l { color: var(--text-weak); }
.pj-cmp-b { display: block; height: 10px; border-radius: 5px; background: #eef0f3; overflow: hidden; }
.pj-cmp-b i { display: block; height: 100%; border-radius: 5px; }
.pj-cmp-b i.pl { background: #8fb0da; } .pj-cmp-b i.nm { background: #bfc5cc; } .pj-cmp-b i.wk { background: var(--green); }
.pj-cmp-r b { text-align: right; }
.pj-cmp-r small { font-size: 11.5px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 620px) { .pj-cmp-r { grid-template-columns: 74px minmax(0, 1fr) 54px; } .pj-cmp-r small { display: none; } }
.pj-pcal { container-type: inline-size; }
.pj-pd { position: relative; display: flex; flex-direction: column; gap: 3px; min-width: 0; min-height: 88px; padding: 6px 7px 6px; border: 0; border-right: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft);
  background: #fff; box-shadow: inset 0 3px 0 var(--c, transparent); font: inherit; color: var(--text); text-align: left; cursor: pointer; overflow: hidden; }
.pj-pd:disabled { cursor: default; color: var(--text); }
button.pj-pd:not(:disabled):hover { background: #f4f8fd; }
.pj-pd.we { background: #f9fafb; } .pj-pd.hol { background: #fff6f5; }
.pj-pd.td { box-shadow: inset 0 3px 0 var(--c, transparent), inset 0 0 0 2px var(--brand); }
.pj-pd.out { background: repeating-linear-gradient(135deg, #f6f7f9 0 6px, #fff 6px 12px); cursor: default; }
.pj-pd.nc { background: #f6f7f9; color: var(--text-faint); cursor: default; }
.pj-pd.fut { color: var(--text-weak); }
.pj-pd.pj-k-co, .pj-pd.pj-k-cm, .pj-pd.pj-k-alt, .pj-pd.pj-k-abs, .pj-pd.pj-k-mot, .pj-pd.pj-k-sus { background: color-mix(in srgb, var(--kb) 75%, #fff); }
.pj-pd-h { display: flex; align-items: center; gap: 5px; min-width: 0; }
.pj-pd-h b { font-size: 14px; font-weight: 750; line-height: 1.1; }
.pj-pd.hol .pj-pd-h b { color: var(--red-text); }
.pj-pd-h small { font-size: 11px; color: var(--text-faint); }
.pj-pd-s { margin-left: auto; padding: 0 5px; border-radius: 4px; font-size: 10.5px; font-weight: 750; background: color-mix(in srgb, var(--c) 22%, #fff); color: color-mix(in srgb, var(--c) 65%, #000); }
.pj-pd-io { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-pd-v { font-size: 12px; color: var(--text-weak); white-space: nowrap; }
.pj-pd-v b { font-size: 15px; font-weight: 750; color: var(--text); }
.pj-pd-v small.ok { color: var(--green-text); font-weight: 700; } .pj-pd-v small.late { font-weight: 700; }
.pj-pd-c { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 11px; color: var(--text-weak); }
.pj-pd-p { font-size: 11.5px; color: var(--text-faint); }
.pj-pd-off { font-size: 11.5px; color: var(--text-faint); }
.pj-pd-f { position: absolute; top: 0; right: 0; border: 5px solid transparent; border-top-color: #d39b2a; border-right-color: #d39b2a; }
.pj-pd .pj-fx { position: absolute; left: 4px; bottom: 4px; }
.pj-pcal.compact .pj-pd { min-height: 60px; padding: 4px 3px 4px; gap: 2px; }
.pj-pcal.compact .pj-pd-h b { font-size: 12.5px; }
.pj-pcal.compact .pj-pd-s { padding: 0 2px; font-size: 9px; }
.pj-pcal.compact .pj-pd-v { font-size: 10px; } .pj-pcal.compact .pj-pd-v b { font-size: 13px; }
.pj-pcal.compact .pj-pd-c .pj-code { min-width: 0; font-size: 9.5px; padding: 0 2px; }
.pj-pcal.compact .pj-cal-h b { display: none; } .pj-pcal.compact .pj-cal-h i { display: inline; } .pj-pcal.compact .pj-cal-h span { padding: 5px 4px; text-align: center; }

/* ---------- tabelul lunii: antetul lipit sus la derulare, codurile în culorile comune ---------- */
.pj-card { overflow: hidden; overflow: clip; }
.pj-tsg thead th { position: sticky; top: var(--pj-stick); z-index: 4; box-shadow: inset 0 -1px 0 var(--border); }
.pj-tsg th.nm, .pj-tsg td.nm { position: sticky; left: 0; z-index: 2; }
.pj-tsg td.nm { background: #fff; }
.pj-tsg thead th.nm { z-index: 5; }
.pj-tsg td.tc.code[class*="pj-k-"] { background-color: var(--kb); color: var(--k); font-size: 10px; }
.pj-tsg td.tc.plan { color: var(--text-faint); }
.pj-tsg td.sum.w { font-weight: 700; }
.pj-tsg tbody tr:hover td.nm, .pj-tsg tbody tr:hover td.sum { background-color: #f6f9fd; }
.pj-tsg td.nm a { color: var(--text); }
.pj-legend b.pj-code { min-width: 22px; height: 16px; font-size: 10px; }

@media print {
  .pj-kpis .pj-spark, .pj-live, .pj-legend, .pj-dnav, .pj-pcal-l, .pj-c-act { display: none !important; }
  .pj-tsg thead th, .pj-rh, .pj-pr-h { position: static; }
}
