/* Employee self-service portal */
body.portal{background:var(--pp-bg);padding-bottom:84px}
@media (min-width:768px){body.portal{padding-bottom:24px}}
.p-wrap{max-width:1180px;margin:0 auto;padding:0 16px}
.p-main{padding-top:20px}

/* top bar */
.p-top{position:sticky;top:0;z-index:1030;background:color-mix(in srgb,var(--pp-surface) 88%,transparent);backdrop-filter:blur(12px);border-bottom:1px solid var(--pp-border)}
.p-top .p-wrap{height:64px}
.p-brand{display:flex;align-items:center;gap:.65rem;text-decoration:none;color:inherit;min-width:0}
.p-brand b{display:block;font-size:.95rem;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px}
.p-brand small{display:block;font-size:.72rem;color:var(--pp-muted)}
.p-logo{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;overflow:hidden;background:#fff;border:1px solid var(--pp-border);flex:0 0 38px}
.p-logo img{max-width:100%;max-height:100%;object-fit:contain}
.p-mono{background:var(--brand);color:#fff;font-weight:800;font-size:.9rem;border:0}
.p-tabs{gap:.25rem;margin-left:1.25rem}
.p-tabs a{display:flex;align-items:center;gap:.45rem;padding:.5rem .85rem;border-radius:10px;color:var(--pp-muted);text-decoration:none;font-weight:500;font-size:.9rem}
.p-tabs a:hover{background:var(--bs-tertiary-bg);color:var(--pp-text)}
.p-tabs a.active{background:color-mix(in srgb,var(--brand) 12%,transparent);color:var(--brand);font-weight:600}
.p-icon{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;border:1px solid var(--pp-border);background:var(--pp-surface);color:inherit;text-decoration:none}
.p-me{display:flex;align-items:center;gap:.5rem;padding:.2rem .7rem .2rem .25rem;border:1px solid var(--pp-border);border-radius:999px;text-decoration:none;color:inherit;font-weight:600;font-size:.88rem;background:var(--pp-surface)}

/* bottom nav (mobile) */
.p-bottom{position:fixed;left:0;right:0;bottom:0;z-index:1030;display:flex;background:var(--pp-surface);border-top:1px solid var(--pp-border);padding:6px 6px calc(6px + env(safe-area-inset-bottom));box-shadow:0 -6px 20px rgba(15,23,42,.06)}
.p-bottom a{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 0;border-radius:12px;color:var(--pp-muted);text-decoration:none;font-size:.7rem;font-weight:500}
.p-bottom a i{font-size:1.2rem}
.p-bottom a.active{color:var(--brand);background:color-mix(in srgb,var(--brand) 10%,transparent);font-weight:700}

/* hero */
.p-hero{border-radius:22px;padding:24px;color:#fff;position:relative;overflow:hidden;
  background:radial-gradient(600px 260px at 100% 0,rgba(255,255,255,.18),transparent 60%),linear-gradient(135deg,var(--brand),color-mix(in srgb,var(--brand) 55%,#0f172a));box-shadow:0 18px 40px -18px color-mix(in srgb,var(--brand) 70%,transparent)}
.p-hero:after{content:"";position:absolute;right:-60px;bottom:-80px;width:260px;height:260px;border-radius:50%;border:40px solid rgba(255,255,255,.06)}
.p-hero-main{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;position:relative;z-index:1}
.p-hero .avatar{border:3px solid rgba(255,255,255,.55);box-shadow:0 6px 16px rgba(0,0,0,.18)}
.p-greet{opacity:.8;font-size:.9rem}
.p-hero h1{font-size:1.55rem;font-weight:800;margin:0 0 4px;letter-spacing:-.02em}
.p-meta{display:flex;flex-wrap:wrap;gap:6px}
.p-meta span{background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.18);padding:3px 10px;border-radius:999px;font-size:.78rem}
.p-clock{text-align:right}
.p-clock div{font-size:2rem;font-weight:800;letter-spacing:-.03em;line-height:1;font-variant-numeric:tabular-nums}
.p-clock small{opacity:.8}
.p-today{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-top:20px;position:relative;z-index:1}
.p-tile{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);border-radius:14px;padding:10px 12px;backdrop-filter:blur(4px)}
.p-tile label{display:block;font-size:.68rem;text-transform:uppercase;letter-spacing:.08em;opacity:.75;margin-bottom:2px}
.p-tile b{font-size:1.02rem;font-weight:700;display:flex;align-items:center;gap:6px}
.p-tile small{display:block;font-size:.72rem;color:#fde68a}
.p-dot{width:9px;height:9px;border-radius:50%;background:#cbd5e1;flex:0 0 9px}
.p-present,.p-off_duty{background:#4ade80}.p-late{background:#fbbf24}.p-absent{background:#f87171}.p-leave{background:#a5b4fc}.p-half_day{background:#7dd3fc}
@media (max-width:767.98px){
  .p-hero{padding:18px;border-radius:18px}.p-hero h1{font-size:1.25rem}.p-clock{display:none}
  .p-today{grid-template-columns:repeat(2,1fr)}.p-today .p-tile:first-child{grid-column:1/-1}
}

/* cards */
.p-card{background:var(--pp-surface);border:1px solid var(--pp-border);border-radius:18px;padding:18px;box-shadow:var(--pp-shadow)}
.p-card-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}
.p-card-head h2{font-size:1rem;font-weight:700;margin:0}
.p-card-head a{font-size:.82rem;text-decoration:none;color:var(--brand);font-weight:600}
.p-page-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}
.p-page-head h1{font-size:1.4rem;font-weight:800;margin:0;letter-spacing:-.02em}
.p-page-head .form-control{max-width:200px}

.p-ring{--v:0;width:132px;height:132px;border-radius:50%;flex:0 0 132px;display:grid;place-items:center;
  background:conic-gradient(var(--brand) calc(var(--v)*1%),color-mix(in srgb,var(--brand) 12%,var(--bs-tertiary-bg)) 0)}
.p-ring>div{width:104px;height:104px;border-radius:50%;background:var(--pp-surface);display:grid;place-content:center;text-align:center}
.p-ring b{font-size:1.6rem;font-weight:800;line-height:1}.p-ring small{font-size:.72rem;color:var(--pp-muted)}
.p-stats{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}
.p-stat{border-radius:14px;padding:12px;display:flex;flex-direction:column;gap:2px;border:1px solid transparent}
.p-stat i{font-size:1.1rem}.p-stat b{font-size:1.35rem;font-weight:800;line-height:1.1}.p-stat span{font-size:.75rem;font-weight:500;opacity:.85}
.s-ok{background:#ecfdf3;color:#15803d}.s-warn{background:#fffbeb;color:#b45309}.s-bad{background:#fef2f2;color:#b91c1c}.s-info{background:#eef2ff;color:#4338ca}.s-ot{background:#f5f3ff;color:#7c3aed}
[data-bs-theme=dark] .s-ok{background:#12301f;color:#86efac}[data-bs-theme=dark] .s-warn{background:#3a2a0c;color:#fcd34d}[data-bs-theme=dark] .s-bad{background:#3b1414;color:#fca5a5}
[data-bs-theme=dark] .s-info{background:#24285a;color:#a5b4fc}[data-bs-theme=dark] .s-ot{background:#2e1a45;color:#c4b5fd}
@media (max-width:575.98px){.p-stats{grid-template-columns:repeat(3,1fr)}.p-ring{margin:0 auto}}

.p-cal{display:grid;grid-template-columns:repeat(7,1fr);gap:5px}
.p-cal-h{text-align:center;font-size:.7rem;font-weight:700;color:var(--pp-muted)}
.p-day{height:38px;display:grid;place-items:center;border-radius:9px;font-size:.8rem;font-weight:600;background:var(--bs-tertiary-bg);color:var(--pp-muted)}
.p-day.c-present,.p-legend .c-present{background:#bbf7d0;color:#14532d}.p-day.c-late,.p-legend .c-late{background:#fde68a;color:#78350f}
.p-day.c-absent,.p-legend .c-absent{background:#fecaca;color:#7f1d1d}.p-day.c-leave,.p-legend .c-leave{background:#c7d2fe;color:#312e81}
.p-day.c-half_day{background:#bae6fd;color:#0c4a6e}.p-day.c-off_duty{background:#ddd6fe;color:#4c1d95}
.p-day.c-weekend,.p-day.c-holiday,.p-legend .c-weekend{background:#e2e8f0;color:#64748b}
[data-bs-theme=dark] .p-day.c-weekend,[data-bs-theme=dark] .p-day.c-holiday{background:#1e2235;color:#94a3b8}
.p-day.is-today{outline:2px solid var(--brand);outline-offset:1px}.p-day.c-none.is-today{color:var(--pp-text)}
.p-day.c-none{background:transparent;border:1px dashed var(--pp-border)}
.p-legend{display:flex;flex-wrap:wrap;gap:4px 12px;align-items:center;margin-top:10px;font-size:.75rem;color:var(--pp-muted)}
.p-legend span{width:10px;height:10px;border-radius:3px;display:inline-block;margin-right:-6px}

.p-pay{background:linear-gradient(180deg,color-mix(in srgb,var(--brand) 7%,var(--pp-surface)),var(--pp-surface) 70%)}
.p-pay-period{font-weight:600;color:var(--pp-muted);display:flex;gap:8px;align-items:center}
.p-pay-net{font-size:1.9rem;font-weight:800;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.p-pay-split{display:flex;flex-direction:column;gap:3px;font-size:.82rem;color:var(--pp-muted)}
.p-pay-split b{color:var(--pp-text)}.p-pay-split .bi-arrow-up-right{color:#16a34a}.p-pay-split .bi-arrow-down-right{color:#dc2626}
.p-lb{margin-bottom:12px;font-size:.88rem}.p-lb:last-child{margin-bottom:0}.p-lb small{color:var(--pp-muted)}
.p-bar{height:7px;border-radius:99px;background:var(--bs-tertiary-bg);margin-top:5px;overflow:hidden}.p-bar i{display:block;height:100%;border-radius:99px}

.p-timeline{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px}
.p-tl{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border:1px solid var(--pp-border);border-radius:12px}
.p-tl-dot{width:10px;height:10px;border-radius:50%;background:var(--brand);margin-top:6px;box-shadow:0 0 0 4px color-mix(in srgb,var(--brand) 18%,transparent)}
.p-tl b{display:block}.p-tl small{color:var(--pp-muted);font-size:.75rem}

.p-slip{transition:transform .15s,box-shadow .15s;border-top:4px solid var(--brand)}
.p-slip:hover{transform:translateY(-2px);box-shadow:0 12px 28px -12px rgba(15,23,42,.25)}
.p-slip-type{font-size:.7rem;text-transform:uppercase;letter-spacing:.08em;color:var(--pp-muted);font-weight:700}
.p-slip-open{margin-top:12px;padding-top:10px;border-top:1px solid var(--pp-border);font-size:.82rem;font-weight:600;color:var(--brand)}
.p-req{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--pp-border)}
.p-req:last-child{border-bottom:0}.p-req-bar{width:4px;align-self:stretch;border-radius:4px}
.p-req b{display:block}.p-req small{color:var(--pp-muted)}
body.portal .login-wrap{min-height:calc(100vh - 0px)}
