/* Employee portal, attendance and approval steps */
.mb-sm { margin-bottom: 6px; }
.btn.disabled { opacity: .6; pointer-events: none; }

/* ---- Approval steps ---- */
.lv-steps { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.lv-step { position: relative; display: flex; gap: 10px; align-items: flex-start; padding-bottom: 14px; }
.lv-step:last-child { padding-bottom: 0; }
.lv-step-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: #f1f5f9; color: #64748b; border: 2px solid var(--border); position: relative; z-index: 1; }
.lv-step-line { position: absolute; inset-inline-start: 12px; top: 26px; bottom: 0; width: 2px; background: var(--border); }
.lv-step.done .lv-step-dot { background: var(--success-bg); color: var(--success); border-color: #a7f3d0; }
.lv-step.done .lv-step-line { background: #a7f3d0; }
.lv-step.current .lv-step-dot { background: var(--warning-bg); color: var(--warning); border-color: #fcd34d; box-shadow: 0 0 0 4px rgba(245, 158, 11, .12); }
.lv-step.rejected .lv-step-dot { background: var(--danger-bg); color: var(--danger); border-color: #fecaca; }
.lv-step.skipped { opacity: .45; }
.lv-step-text { padding-top: 3px; min-width: 0; }
.lv-steps.compact { flex-direction: row; align-items: center; gap: 0; margin-top: 10px; }
.lv-steps.compact .lv-step { flex: 1; flex-direction: column; align-items: center; text-align: center; padding: 0; gap: 4px; }
.lv-steps.compact .lv-step-dot { width: 22px; height: 22px; }
.lv-steps.compact .lv-step-line { top: 10px; bottom: auto; height: 2px; width: auto; inset-inline-start: calc(50% + 14px); inset-inline-end: calc(-50% + 14px); }
.lv-steps.compact .lv-step-text { padding: 0; }
.lv-steps.compact .lv-step-text .strong { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.lv-steps.compact .lv-step.current .strong { color: var(--warning); }
.lv-steps.compact .lv-step.done .strong { color: var(--success); }
.lv-steps.compact .lv-step.rejected .strong { color: var(--danger); }

/* ---- Attendance ---- */
.at-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.at-chip { display: flex; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); }
.at-chip-v { font-size: 17px; font-weight: 700; color: var(--text); line-height: 1.2; }
.at-chip-l { font-size: 12px; }
.at-chip.green svg { color: var(--success); }
.at-chip.red { border-color: #fecaca; background: var(--danger-bg); } .at-chip.red svg, .at-chip.red .at-chip-v { color: var(--danger); }
.at-chip.amber { border-color: #fde68a; background: var(--warning-bg); } .at-chip.amber svg, .at-chip.amber .at-chip-v { color: var(--warning); }
.at-sec { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface); }
.at-days-edit { display: flex; flex-direction: column; gap: 6px; }
.at-day-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 6px 10px; border-radius: 8px; background: var(--bg); min-height: 44px; }
.at-day-row.on { background: var(--brand-50); }
.at-day-row .input { width: 120px; }
.at-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; display: inline-block; }
.at-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.at-group { display: flex; flex-direction: column; gap: 8px; text-align: start; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font: inherit; color: inherit; cursor: pointer; min-width: 0; }
.at-group:hover { border-color: var(--brand-200); background: var(--brand-50); }
.at-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; max-height: 320px; overflow-y: auto; padding: 2px; }
.at-member { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; min-height: 44px; min-width: 0; }
.at-member.on { border-color: var(--brand-200); background: var(--brand-50); }
.at-member input { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--brand); }
@media (max-width: 640px) { .at-groups, .at-members { grid-template-columns: 1fr; } .at-members { max-height: none; } }
.at-day-pick { padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.badge.brand .dot { background: var(--brand); }

/* ---- Portal ---- */
.pt { display: flex; flex-direction: column; gap: 16px; max-width: 1120px; margin: 0 auto; }
.pt-hero { border-radius: 18px; padding: 20px; color: var(--on-brand); background: linear-gradient(135deg, var(--brand) 0%, var(--brand-800) 100%); box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.pt-hero::after { content: ''; position: absolute; inset-inline-end: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .08); pointer-events: none; }
.pt-hero-top { display: flex; gap: 14px; align-items: center; position: relative; z-index: 1; }
.pt-hero .avatar.lg { width: 64px; height: 64px; font-size: 22px; border: 3px solid rgba(255, 255, 255, .5); box-shadow: none; background: rgba(255, 255, 255, .2); color: inherit; }
.pt-hello { font-size: 21px; font-weight: 700; line-height: 1.3; }
.pt-role { opacity: .9; font-size: 14px; }
.pt-meta { opacity: .75; font-size: 12.5px; margin-top: 2px; }
.pt-eye { width: 38px; height: 38px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .12); color: inherit; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; align-self: flex-start; }
.pt-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; position: relative; z-index: 1; }
.pt-act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px 6px; min-height: 72px; border-radius: 14px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2); color: inherit; text-decoration: none; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-align: center; line-height: 1.3; }
.pt-act:hover { background: rgba(255, 255, 255, .22); }
.pt-act.primary { background: #fff; color: var(--brand-text); border-color: #fff; }
.pt-approvals { text-decoration: none; }
.pt-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pt-kpi { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; min-width: 0; }
a.pt-kpi:hover { border-color: var(--brand-200); }
.pt-kpi-l { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12.5px; }
.pt-kpi-l svg { color: var(--brand-text); }
.pt-kpi-v { font-size: 22px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.pt-kpi-v small { font-size: 13px; font-weight: 500; color: var(--muted); }
.pt-masked { letter-spacing: 2px; color: var(--muted); }
.pt-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.pt-reqs { display: flex; flex-direction: column; gap: 10px; }
.pt-req { display: block; width: 100%; text-align: start; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font: inherit; color: inherit; cursor: pointer; }
.pt-req:hover { border-color: var(--brand-200); background: var(--brand-50); }
.pt-line { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 14px; color: inherit; text-decoration: none; }
.pt-line.total { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--border); margin-top: 2px; }
.pt-line.link:hover { color: var(--brand-text); }
.pt-infos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.pt-info .k { font-size: 12px; color: var(--muted); }
.pt-info .v { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.pt-info .v.empty { color: var(--muted); font-weight: 400; }
.pt-days { display: flex; flex-direction: column; }
.pt-day { display: grid; grid-template-columns: 80px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.pt-day:last-child { border-bottom: 0; }

/* ---- Bottom navigation (phones) ---- */
.bottom-nav { display: none; }
@media (max-width: 1100px) {
  .pt-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .pt-grid { grid-template-columns: 1fr; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset-inline: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(15, 23, 42, .06); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 2px; color: var(--muted); text-decoration: none; font-size: 10.5px; font-weight: 600; border-radius: 10px; text-align: center; line-height: 1.2; }
  .bottom-nav a.active { color: var(--brand-text); background: var(--brand-50); }
  .has-bottom-nav .content { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
}
@media (max-width: 640px) {
  .pt { gap: 12px; }
  .pt-hero { padding: 16px; border-radius: 16px; }
  .pt-hello { font-size: 18px; }
  .pt-actions { gap: 8px; margin-top: 14px; }
  .pt-act { min-height: 64px; font-size: 12px; padding: 10px 4px; border-radius: 12px; }
  .pt-kpis { gap: 10px; }
  .pt-kpi { padding: 12px; }
  .pt-kpi-v { font-size: 18px; }
  .pt-infos { grid-template-columns: 1fr 1fr; gap: 10px 12px; }
  .at-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .at-chip { padding: 10px; }
  .pt-day { grid-template-columns: 70px 1fr auto; }
}
@media print { .bottom-nav { display: none !important; } }