/*! SmartHRM UI - Bootstrap 5.3 theme layer */
:root {
    --shm-primary: #0b4ea2;
    --shm-primary-dark: #083b7a;
    --shm-accent: #ce1126;
    --shm-sidebar-w: 248px;
    --shm-navbar-h: 56px;
    --shm-tabbar-h: 62px;
    --bs-primary: #0b4ea2;
    --bs-primary-rgb: 11, 78, 162;
    --bs-body-font-family: "Inter", "Noto Sans Lao", system-ui, -apple-system, "Segoe UI", sans-serif;
    --bs-body-bg: #f4f6fa;
}
.lang-lao { --bs-body-font-family: "Noto Sans Lao", "Inter", system-ui, sans-serif; }
body { font-family: var(--bs-body-font-family); background: var(--bs-body-bg); }
.lang-lao body, .lang-lao { line-height: 1.6; }

.btn-primary { --bs-btn-bg: var(--shm-primary); --bs-btn-border-color: var(--shm-primary); --bs-btn-hover-bg: var(--shm-primary-dark); --bs-btn-hover-border-color: var(--shm-primary-dark); --bs-btn-active-bg: var(--shm-primary-dark); }
.btn-outline-primary { --bs-btn-color: var(--shm-primary); --bs-btn-border-color: var(--shm-primary); --bs-btn-hover-bg: var(--shm-primary); --bs-btn-hover-border-color: var(--shm-primary); }
.nav-pills { --bs-nav-pills-link-active-bg: var(--shm-primary); }
a { color: var(--shm-primary); }

/* ---------- navbar ---------- */
.shm-navbar { height: var(--shm-navbar-h); background: linear-gradient(90deg, var(--shm-primary-dark), var(--shm-primary)); box-shadow: 0 2px 8px rgba(0,0,0,.12); z-index: 1040; }
.shm-navbar .navbar-brand { color: #fff; }
.shm-logo { width: 32px; height: 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: #fff; color: var(--shm-primary); font-size: 1.1rem; }
.shm-logo-lg { width: 64px; height: 64px; border-radius: 18px; font-size: 2rem; background: var(--shm-primary); color: #fff; }
.shm-avatar { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.2); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.shm-avatar-sm { width: 30px; height: 30px; background: var(--bs-primary-bg-subtle); color: var(--shm-primary); font-size: .85rem; }

/* ---------- layout ---------- */
.shm-layout { display: flex; padding-top: var(--shm-navbar-h); min-height: 100vh; }
.shm-main { flex: 1; min-width: 0; padding: 1.25rem; padding-bottom: calc(var(--shm-tabbar-h) + 1.25rem); }
@media (min-width: 992px) {
    .shm-main { padding: 1.75rem 2rem; margin-left: var(--shm-sidebar-w); }
    .shm-sidebar { position: fixed; top: var(--shm-navbar-h); bottom: 0; left: 0; width: var(--shm-sidebar-w); overflow-y: auto; }
}
.shm-sidebar { background: #fff; border-right: 1px solid rgba(0,0,0,.06); }
.shm-sidebar .nav-link { display: flex; align-items: center; gap: .75rem; color: #3b4351; padding: .55rem 1.25rem; margin: 1px .6rem; border-radius: .5rem; font-weight: 500; font-size: .925rem; }
.shm-sidebar .nav-link i { font-size: 1.1rem; opacity: .75; }
.shm-sidebar .nav-link:hover { background: #f1f4f9; color: var(--shm-primary); }
.shm-sidebar .nav-link.active { background: var(--bs-primary-bg-subtle); color: var(--shm-primary); }
.shm-sidebar .nav-link.active i { opacity: 1; }
.shm-nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #8a94a6; padding: 1rem 1.6rem .35rem; font-weight: 600; }

/* bottom tab bar (mobile) */
.shm-tabbar { position: fixed; bottom: 0; left: 0; right: 0; height: var(--shm-tabbar-h); padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid rgba(0,0,0,.08); display: flex; z-index: 1030; }
.shm-tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; color: #7b8494; font-size: .7rem; gap: 2px; }
.shm-tabbar a i { font-size: 1.3rem; }
.shm-tabbar a.active { color: var(--shm-primary); font-weight: 600; }

/* ---------- KPIs & cards ---------- */
.card { border-radius: .85rem; }
.shm-kpi { background: #fff; border-radius: .85rem; padding: 1rem 1.1rem; box-shadow: 0 1px 2px rgba(16,24,40,.06); height: 100%; color: inherit; }
.shm-kpi-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; }
.shm-kpi-value { font-size: 1.45rem; font-weight: 700; color: #111827; }
.shm-kpi-value.small-value { font-size: 1.05rem; }
.shm-kpi-accent { background: linear-gradient(135deg, var(--shm-primary), var(--shm-primary-dark)); }
.shm-kpi-accent .shm-kpi-label, .shm-kpi-accent .shm-kpi-value { color: #fff; }
.shm-icon-pill { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.shm-hover { transition: transform .15s, box-shadow .15s; }
.shm-hover:hover { transform: translateY(-2px); box-shadow: 0 .5rem 1.25rem rgba(16,24,40,.1) !important; }
.shm-stat-label { font-size: .7rem; text-transform: uppercase; color: #8a94a6; letter-spacing: .04em; }
.shm-stat-value { font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.shm-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .45rem; vertical-align: middle; }
.shm-balance { border-top: 4px solid var(--accent) !important; }
@keyframes shmFlash { from { background: #fff7d6; } to { background: transparent; } }
.shm-flash { animation: shmFlash 1.2s ease-out; }

/* ---------- punch screen ---------- */
.shm-punch { max-width: 560px; }
.shm-clock { font-size: 3.2rem; font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; color: #111827; line-height: 1.1; }
.shm-punch-btn { padding: 1rem; font-size: 1.2rem; font-weight: 600; border-radius: 1rem; box-shadow: 0 .5rem 1rem rgba(0,0,0,.12); }
.shm-map { height: 240px; width: 100%; background: #e9eef5; }
.shm-map-lg { height: 340px; border-radius: .85rem .85rem 0 0; }
.shm-branch-pin { background: var(--shm-primary); color: #fff; border-radius: 50%; display: flex !important; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); }

/* ---------- roster ---------- */
.shm-chip { --chip: #6c757d; display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .65rem; border-radius: 2rem; font-size: .8rem; cursor: grab; user-select: none; background: color-mix(in srgb, var(--chip) 14%, #fff); color: color-mix(in srgb, var(--chip) 80%, #000); border: 1px solid color-mix(in srgb, var(--chip) 35%, #fff); }
.shm-chip-rest { --chip: #6c757d; }
.shm-chip-clear { --chip: #adb5bd; border-style: dashed; }
.shm-roster { min-width: 860px; }
.shm-roster th.shm-roster-name, .shm-roster td.shm-roster-name { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 170px; max-width: 200px; }
.shm-roster th.shm-today { background: var(--bs-primary-bg-subtle) !important; }
.shm-cell { position: relative; width: 11%; height: 58px; padding: 4px !important; cursor: pointer; }
.shm-cell.is-over { background: #e7f1ff; outline: 2px dashed var(--shm-primary); outline-offset: -3px; }
.shm-cell.is-saving { opacity: .5; }
.shm-cell.is-default .shm-assign { opacity: .55; border-style: dashed; }
.shm-assign { --chip: #6c757d; height: 100%; border-radius: .5rem; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: .78rem; line-height: 1.15; background: color-mix(in srgb, var(--chip) 16%, #fff); color: color-mix(in srgb, var(--chip) 80%, #000); border: 1px solid color-mix(in srgb, var(--chip) 40%, #fff); cursor: grab; }
.shm-assign-rest { background: #f3f4f6; color: #9ca3af; border-color: #e5e7eb; }
.shm-holiday { position: absolute; top: 3px; right: 5px; font-size: .65rem; color: var(--shm-accent); }
.shm-row-violation td { background: #fff5f5; }

/* ---------- auth ---------- */
.auth-page { background: radial-gradient(1200px 600px at 10% -10%, #dbe7fb 0, transparent 60%), radial-gradient(900px 500px at 110% 110%, #fde2e4 0, transparent 55%), #f4f6fa; }
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.auth-card { width: 100%; max-width: 420px; border-radius: 1.25rem; }

/* ---------- kiosk ---------- */
.kiosk-mode { background: #0b1220; color: #e5e7eb; }
.kiosk { min-height: 100vh; display: flex; flex-direction: column; }
.kiosk-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; background: rgba(255,255,255,.04); }
.kiosk-branch { background-color: transparent; color: #cbd5e1; border-color: rgba(255,255,255,.2); margin-top: 2px; }
.kiosk-branch option { color: #111; }
.kiosk-clock { font-size: 2.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.kiosk-body { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; padding: 1.5rem; align-items: center; }
@media (max-width: 860px) { .kiosk-body { grid-template-columns: 1fr; } }
.kiosk-reader { width: 100%; max-width: 440px; margin: 0 auto; border-radius: 1rem; overflow: hidden; background: #000; aspect-ratio: 1; }
.kiosk-reader video { object-fit: cover; }
.kiosk-hint { text-align: center; margin-top: .75rem; color: #94a3b8; }
.kiosk-wedge { position: absolute; left: -9999px; opacity: 0; }
.kiosk-result { min-height: 340px; display: flex; align-items: center; justify-content: center; }
.kiosk-idle { text-align: center; color: #64748b; font-size: 1.4rem; }
.kiosk-idle i { font-size: 5rem; display: block; margin-bottom: .5rem; }
.kiosk-card { text-align: center; padding: 2.5rem 2rem; border-radius: 1.5rem; width: 100%; max-width: 480px; animation: kioskPop .25s ease-out; }
.kiosk-card i { font-size: 4.5rem; }
.kiosk-name { font-size: 2rem; font-weight: 700; margin-top: .5rem; }
.kiosk-sub { font-size: 1.2rem; opacity: .9; }
.kiosk-detail { margin-top: .5rem; opacity: .8; }
.kiosk-in { background: #065f46; }
.kiosk-out { background: #1e3a8a; }
.kiosk-warning { background: #92400e; }
.kiosk-error { background: #991b1b; }
@keyframes kioskPop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.kiosk-footer { padding: .75rem 1.5rem 1.25rem; background: rgba(255,255,255,.03); }
.kiosk-recent { display: flex; gap: .5rem; overflow-x: auto; }
.kiosk-chip { white-space: nowrap; padding: .35rem .8rem; border-radius: 2rem; font-size: .85rem; background: rgba(255,255,255,.08); }
.kiosk-chip.in i { color: #34d399; }
.kiosk-chip.out i { color: #60a5fa; }
.kiosk-chip span { opacity: .6; margin-left: .25rem; }

/* ---------- payslip (screen + print) ---------- */
.payslip-page { background: #e9edf3; }
.payslip-toolbar { position: sticky; top: 0; padding: .75rem; display: flex; gap: .5rem; justify-content: center; background: rgba(233,237,243,.9); backdrop-filter: blur(4px); z-index: 2; }
.payslip { position: relative; max-width: 820px; margin: 1rem auto 3rem; background: #fff; padding: 2.5rem; border-radius: .75rem; box-shadow: 0 10px 30px rgba(16,24,40,.08); font-size: .92rem; overflow: hidden; }
.payslip-head { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 3px solid var(--shm-primary); padding-bottom: 1rem; margin-bottom: 1.25rem; }
.payslip-company { font-size: 1.2rem; font-weight: 700; color: var(--shm-primary); }
.payslip-title { font-size: 1.4rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.payslip-grid, .payslip-days { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem 1.5rem; margin-bottom: 1.25rem; }
.payslip-days { grid-template-columns: repeat(5, 1fr); background: #f6f8fb; padding: .75rem 1rem; border-radius: .5rem; }
.payslip-grid span, .payslip-days span { display: block; font-size: .7rem; text-transform: uppercase; color: #6b7280; letter-spacing: .04em; }
.payslip-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.payslip-table { width: 100%; border-collapse: collapse; }
.payslip-table th, .payslip-table td { padding: .45rem .25rem; border-bottom: 1px solid #eef0f4; vertical-align: top; }
.payslip-table thead th { font-size: .75rem; text-transform: uppercase; color: #6b7280; border-bottom: 2px solid #dfe3ea; }
.payslip-table tfoot th { border-top: 2px solid #dfe3ea; border-bottom: 0; }
.payslip-net { margin-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; background: var(--shm-primary); color: #fff; padding: 1rem 1.25rem; border-radius: .6rem; font-size: 1.1rem; }
.payslip-net strong { font-size: 1.6rem; }
.payslip-pit { margin-top: 1.25rem; }
.payslip-foot { margin-top: 1.5rem; display: flex; justify-content: space-between; border-top: 1px solid #eef0f4; padding-top: .75rem; }
.payslip-watermark { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-25deg); font-size: 7rem; font-weight: 800; color: rgba(220,53,69,.08); pointer-events: none; text-transform: uppercase; }
@media (max-width: 640px) {
    .payslip { padding: 1.25rem; margin: 0; border-radius: 0; }
    .payslip-grid { grid-template-columns: 1fr 1fr; }
    .payslip-days { grid-template-columns: repeat(3, 1fr); }
    .payslip-cols { grid-template-columns: 1fr; }
}
@media print {
    @page { size: A4; margin: 12mm; }
    body, .payslip-page { background: #fff !important; }
    .payslip { box-shadow: none; margin: 0; max-width: none; padding: 0; }
    .payslip-net { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- SweetAlert2 brand colour (danger dialogs set red inline) ---------- */
.swal2-styled.swal2-confirm { background-color: var(--shm-primary); }
.swal2-styled.swal2-confirm:focus { box-shadow: 0 0 0 3px rgba(11, 78, 162, .35); }

/* ---------- work calendar ---------- */
.shm-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.shm-cal-head { padding: .5rem; text-align: center; font-size: .75rem; font-weight: 600; text-transform: uppercase; color: #6b7280; background: #f8f9fb; border-bottom: 1px solid #eef0f4; }
.shm-cal-day { min-height: 112px; padding: .35rem .4rem; border-right: 1px solid #eef0f4; border-bottom: 1px solid #eef0f4; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.shm-cal-day:nth-child(7n) { border-right: 0; }
.shm-cal-day.is-out { background: #fafbfc; opacity: .45; }
.shm-cal-day.is-rest { background: #f8f9fb; }
.shm-cal-day.is-holiday { background: #fff5f5; }
.shm-cal-day.is-today { box-shadow: inset 0 0 0 2px var(--shm-primary); }
.shm-cal-date { font-weight: 700; font-size: .9rem; }
.is-today .shm-cal-date { color: var(--shm-primary); }
.shm-cal-tag { --chip: #6c757d; font-size: .72rem; line-height: 1.25; padding: 2px 6px; border-radius: .4rem; background: color-mix(in srgb, var(--chip) 14%, #fff); color: color-mix(in srgb, var(--chip) 80%, #000); border: 1px solid color-mix(in srgb, var(--chip) 30%, #fff); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shm-cal-tag.tag-rest { --chip: #9ca3af; }
.shm-cal-tag.tag-holiday { --chip: #ce1126; white-space: normal; }
.shm-cal-punch { font-size: .72rem; font-weight: 600; padding: 2px 6px; border-radius: .4rem; background: #ecfdf3; color: #067647; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shm-cal-punch.status-late, .shm-cal-punch.status-early_exit { background: #fffaeb; color: #b54708; }
.shm-cal-punch.status-out_of_bounds, .shm-cal-punch.status-absent { background: #fef3f2; color: #b42318; }
.shm-cal-punch.status-incomplete { background: #eff8ff; color: #175cd3; }
@media (max-width: 767.98px) {
    .shm-cal-day { min-height: 84px; padding: .25rem; }
    .shm-cal-tag, .shm-cal-punch { font-size: .62rem; padding: 1px 3px; }
    .shm-cal-tag strong + * { display: none; }
}

/* ---------- team month (staff x days) ---------- */
.shm-month-wrap { max-height: calc(100vh - 260px); }
.shm-month { font-size: .78rem; border-collapse: separate; border-spacing: 0; }
.shm-month thead th { position: sticky; top: 0; z-index: 2; }
.shm-month th.shm-month-name, .shm-month td.shm-month-name { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 160px; max-width: 180px; }
.shm-month thead th.shm-month-name { z-index: 3; background: var(--bs-tertiary-bg); }
.shm-month tfoot th.shm-month-name { background: var(--bs-tertiary-bg); }
.shm-month th.shm-month-day { min-width: 38px; padding: .25rem .1rem; line-height: 1.1; }
.shm-month th.shm-today { background: var(--bs-primary-bg-subtle) !important; }
.shm-month th.shm-month-tot { min-width: 46px; font-size: .7rem; white-space: nowrap; }
.shm-month .is-monday { border-left: 2px solid #cfd4dc !important; }
.shm-month td.mc { position: relative; height: 46px; padding: 2px !important; text-align: center; cursor: pointer; user-select: none; vertical-align: top; }
.shm-month td.mc:hover { background: #f1f5ff; }
.shm-month td.mc.is-rest { background: #f8f9fb; }
.shm-month td.mc.is-holiday { background: #fff5f5; }
.shm-month td.mc.is-today { box-shadow: inset 0 0 0 2px var(--shm-primary); }
.shm-month td.mc.is-sel { background: #dbe7ff !important; outline: 2px dashed var(--shm-primary); outline-offset: -2px; }
.shm-month tr.is-readonly td.mc { cursor: default; }
.shm-month.is-painting td.mc { cursor: crosshair; }
.shm-month.is-saving { opacity: .6; pointer-events: none; }
.mc-shift { --chip: #6c757d; border-radius: .3rem; font-weight: 700; font-size: .68rem; line-height: 1.4; background: color-mix(in srgb, var(--chip) 18%, #fff); color: color-mix(in srgb, var(--chip) 80%, #000); border: 1px solid color-mix(in srgb, var(--chip) 40%, #fff); overflow: hidden; white-space: nowrap; }
.mc.is-default .mc-shift { border-style: dashed; opacity: .7; }
.mc-shift.mc-restday { background: transparent; border-color: transparent; color: #9ca3af; font-weight: 400; }
.mc-shift.mc-hol { background: transparent; border-color: transparent; color: #ce1126; }
.mc-bottom { line-height: 1.3; font-size: .72rem; min-height: 16px; position: relative; }
.mc-att { font-size: .78rem; }
.mc-man { position: absolute; right: 0; bottom: 0; font-size: .55rem; color: #6c757d; }
.mc-leave, .mc-leave-demo { --chip: #0dcaf0; display: inline-block; margin-top: 1px; padding: 0 3px; border-radius: .25rem; font-size: .62rem; font-weight: 700; color: #fff; background: var(--chip); }
.mc-leave.is-pending, .mc-leave-demo.is-pending { background: transparent; color: color-mix(in srgb, var(--chip) 80%, #000); border: 1px dashed var(--chip); }
.mc-badges { position: absolute; top: -1px; right: -1px; display: flex; gap: 1px; }
.mc-badge, .mc-badge-demo { font-size: .5rem; line-height: 1; padding: 1px 2px; border-radius: .2rem; color: #fff; font-weight: 700; }
.mc-ot { background: #6f42c1; }
.mc-ot.is-pending { background: transparent; color: #6f42c1; border: 1px dashed #6f42c1; }
.mc-cr { background: #fd7e14; }
.mc-dashed-demo { display: inline-block; width: 18px; height: 10px; border: 1px dashed #6c757d; border-radius: .2rem; vertical-align: middle; }
.shm-month.mode-shift .mc-bottom, .shm-month.mode-shift .mc-badges { display: none; }
.shm-month.mode-shift td.mc { height: 34px; vertical-align: middle; }
.shm-month.mode-att .mc-shift { background: transparent; border-color: transparent; color: #adb5bd; font-weight: 500; }
.shm-chip.is-armed { box-shadow: 0 0 0 2px var(--shm-primary); font-weight: 600; }
.shm-chip-inspect { --chip: #0b4ea2; cursor: pointer; }
#paintPalette .shm-chip { cursor: pointer; }
input.is-auto { background: #eef4ff; border-color: #9ec5fe; }
@media (max-width: 767.98px) {
    .shm-month th.shm-month-name, .shm-month td.shm-month-name { min-width: 110px; max-width: 120px; }
    .shm-month-wrap { max-height: none; }
}
.mc-pj { background: #0f766e; }
.shm-cal-tag.tag-project { --chip: #0f766e; }
.shm-member-list { max-height: 260px; overflow-y: auto; }
.shm-project { border-top: 3px solid var(--chip) !important; }
.shm-qr-reader { width: 100%; max-width: 360px; margin: 0 auto; border-radius: .75rem; overflow: hidden; }
.shm-qr-poster { max-width: 520px; margin: 0 auto; text-align: center; }
.shm-qr-poster #qrBox img, .shm-qr-poster #qrBox canvas { margin: 0 auto; }
@media print { .shm-sidebar, .shm-navbar, .no-print { display: none !important; } .shm-main { padding: 0 !important; } }

/* ---------- organisation chart ---------- */
.shm-org-scroll { overflow: auto; padding: 1.5rem 1rem; max-height: calc(100vh - 220px); min-height: 320px; cursor: grab; }
.shm-org-scroll.dragging { cursor: grabbing; user-select: none; }
.shm-org { --org-line: #c3cad6; display: inline-block; min-width: 100%; }
.shm-org ul { position: relative; display: flex; justify-content: center; margin: 0; padding: 22px 0 0; list-style: none; }
.shm-org > ul { padding-top: 0; }
.shm-org li { position: relative; padding: 22px 6px 0; text-align: center; }
.shm-org li::before, .shm-org li::after { content: ""; position: absolute; top: 0; right: 50%; width: 50%; height: 22px; border-top: 2px solid var(--org-line); }
.shm-org li::after { right: auto; left: 50%; border-left: 2px solid var(--org-line); }
.shm-org li:only-child::before, .shm-org li:only-child::after { display: none; }
.shm-org li:only-child { padding-top: 0; }
.shm-org li:first-child::before, .shm-org li:last-child::after { border: 0 none; }
.shm-org li:last-child::before { border-right: 2px solid var(--org-line); border-radius: 0 8px 0 0; }
.shm-org li:first-child::after { border-radius: 8px 0 0 0; }
.shm-org ul ul::before { content: ""; position: absolute; top: 0; left: 50%; height: 22px; border-left: 2px solid var(--org-line); }
.shm-org li.collapsed > ul { display: none; }
.shm-org-node { position: relative; display: inline-flex; flex-direction: column; align-items: center; width: 168px; padding: .65rem .6rem .7rem; background: #fff;
    border: 1px solid #e3e7ee; border-top: 3px solid var(--shm-primary); border-radius: .7rem; box-shadow: 0 1px 3px rgba(16,24,40,.07); transition: box-shadow .15s, transform .15s; }
.shm-org-node:hover { box-shadow: 0 4px 14px rgba(16,24,40,.12); }
.shm-org-node.match { outline: 3px solid #ffc107; outline-offset: 2px; }
.shm-org.searching .shm-org-node:not(.match):not(.shm-org-root) { opacity: .35; }
.shm-org-root { border-top-color: var(--shm-accent); background: linear-gradient(180deg, #fff, #f5f8fd); }
.shm-org-dept { border-top-color: #198754; }
.shm-org-pos { border-top-color: #6f42c1; }
.shm-org-avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-bottom: .35rem;
    background: var(--bs-primary-bg-subtle); color: var(--shm-primary); font-weight: 700; font-size: 1.05rem; }
.shm-org-avatar.f { background: #fde7ef; color: #b02a5b; }
.shm-org-name { font-weight: 600; font-size: .86rem; line-height: 1.25; color: #111827; overflow-wrap: anywhere; }
.shm-org-title { font-size: .76rem; color: #4b5563; margin-top: .15rem; overflow-wrap: anywhere; }
.shm-org-meta { font-size: .7rem; color: #8a94a6; margin-top: .25rem; }
.shm-org-code { font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #6b7280; margin-bottom: .1rem; }
.shm-org-toggle { position: absolute; bottom: -11px; left: 50%; transform: translateX(-50%); min-width: 22px; height: 22px; padding: 0 6px; z-index: 1;
    border-radius: 11px; border: 1px solid #cfd6e1; background: #fff; color: #4b5563; font-size: .68rem; font-weight: 600; line-height: 20px; }
.shm-org-toggle:hover { background: var(--shm-primary); border-color: var(--shm-primary); color: #fff; }
li.collapsed > .shm-org-node .shm-org-toggle { background: var(--shm-primary); border-color: var(--shm-primary); color: #fff; }
li.collapsed > .shm-org-node .shm-org-toggle::before { content: "+"; margin-right: 1px; }
@media print {
    .shm-org-scroll { overflow: visible; max-height: none; padding: 0; }
    .shm-org { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .shm-org-toggle { display: none; }
}

/* ---------- excel import / export ---------- */
.shm-transfer-icon { width: 42px; height: 42px; border-radius: .75rem; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; background: #e8f5ee; color: #198754; flex-shrink: 0; }

/* ---------- clock-in screen as a mobile app ---------- */
.shm-app { max-width: 1080px; }
.shm-app-hero { background: linear-gradient(145deg, var(--shm-primary), var(--shm-primary-dark)); color: #fff; border-radius: 1.25rem; padding: 1.1rem 1.1rem .9rem; box-shadow: 0 .6rem 1.4rem rgba(11,78,162,.25); }
.shm-app-hero .shm-clock { color: #fff; }
.shm-app-hero .shm-stat-label { color: rgba(255,255,255,.7); }
.shm-app-avatar { width: 46px; height: 46px; flex: none; border-radius: 50%; background: rgba(255,255,255,.18); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem; }
.shm-app-chip { background: rgba(255,255,255,.16); color: #fff; font-weight: 500; }
.shm-app-stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; margin-top: 1rem; padding-top: .8rem; border-top: 1px solid rgba(255,255,255,.18); }
.shm-app-stats > div + div { border-left: 1px solid rgba(255,255,255,.18); }
.min-w-0 { min-width: 0; }

.shm-punch-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.shm-punch-tile { --c: #198754; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; min-height: 132px; padding: .9rem .5rem;
    border: 0; border-radius: 1.25rem; color: #fff; background: var(--c); box-shadow: 0 .5rem 1.1rem color-mix(in srgb, var(--c) 35%, transparent);
    transition: transform .12s, box-shadow .12s, opacity .12s; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.shm-punch-tile.out { --c: #dc3545; }
.shm-punch-tile i { font-size: 2.2rem; line-height: 1; }
.shm-punch-label { font-size: 1.1rem; font-weight: 700; }
.shm-punch-sub { font-size: .75rem; opacity: .85; min-height: 1.1em; }
.shm-punch-tile:active:not(:disabled) { transform: scale(.96); }
.shm-punch-tile:disabled { background: #e9edf3; color: #8a94a6; box-shadow: none; }
.shm-punch-tile.busy:disabled { background: var(--c); color: #fff; opacity: .85; }
.shm-map-sm { height: 170px; }

.shm-app-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.shm-app-quick > a, .shm-app-quick > button { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .7rem .25rem; border: 0; border-radius: .9rem;
    background: #fff; color: #3b4351; text-decoration: none; font-size: .72rem; line-height: 1.2; text-align: center; box-shadow: 0 1px 2px rgba(16,24,40,.06); }
.shm-app-quick i { font-size: 1.35rem; color: var(--shm-primary); }

.shm-app-section { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #8a94a6; margin: .25rem .25rem .5rem; }
.shm-app-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem .5rem; background: #fff; border-radius: 1rem; padding: 1rem .5rem; box-shadow: 0 1px 2px rgba(16,24,40,.06); }
@media (min-width: 576px) { .shm-app-grid { grid-template-columns: repeat(5, 1fr); } }
.shm-app-icon { display: flex; flex-direction: column; align-items: center; gap: .35rem; text-decoration: none; color: #3b4351; -webkit-tap-highlight-color: transparent; }
.shm-app-glyph { width: 50px; height: 50px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem;
    background: var(--bs-primary-bg-subtle); color: var(--shm-primary); transition: transform .12s; }
.shm-app-icon:active .shm-app-glyph { transform: scale(.92); }
.shm-app-name { font-size: .7rem; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.shm-app-grid > .shm-app-icon:nth-child(5n+2) .shm-app-glyph { background: #e8f6ee; color: #198754; }
.shm-app-grid > .shm-app-icon:nth-child(5n+3) .shm-app-glyph { background: #fff1e6; color: #d9480f; }
.shm-app-grid > .shm-app-icon:nth-child(5n+4) .shm-app-glyph { background: #f1ebfb; color: #6f42c1; }
.shm-app-grid > .shm-app-icon:nth-child(5n+5) .shm-app-glyph { background: #fdeaed; color: #c82333; }
@media (max-width: 575.98px) { .shm-app-hero .shm-clock { font-size: 2.6rem; } }

/* ---------- notifications / announcements / action center ---------- */
.shm-bell-menu { width: 360px; max-width: calc(100vw - 24px); }
.shm-bell-list { max-height: 60vh; overflow-y: auto; }
.shm-ntf.is-unread { background: #eef4ff; }
.shm-ntf-icon { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #e8eefb; color: var(--shm-primary); }
.shm-ntf-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--shm-primary); flex-shrink: 0; }
.shm-bell-ring { animation: shm-ring .9s ease-in-out 2; transform-origin: top center; }
@keyframes shm-ring { 0%,100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } }
.shm-avatar-lg { width: 56px; height: 56px; font-size: 1.5rem; }
.shm-ann.is-pinned { border-left: 4px solid #dc3545 !important; }
.shm-ann-body { white-space: normal; overflow-wrap: anywhere; }
.shm-alert { border-top: 3px solid var(--bs-secondary) !important; }
.shm-alert-danger { border-top-color: var(--bs-danger) !important; }
.shm-alert-warning { border-top-color: var(--bs-warning) !important; }
.shm-alert-info { border-top-color: var(--bs-info) !important; }
.shm-alert-success { border-top-color: var(--bs-success) !important; }
.shm-alert .list-group { max-height: 260px; overflow-y: auto; }
.shm-avatar.shm-avatar-lg { background: var(--shm-primary); color: #fff; }

/* reference photo (selfie) capture */
.shm-selfie { position: relative; width: 100%; max-width: 360px; aspect-ratio: 3 / 4; margin: 0 auto; border-radius: 1rem; overflow: hidden; background: #111827; }
.shm-selfie video, .shm-selfie img { width: 100%; height: 100%; object-fit: cover; }
.shm-selfie video { transform: scaleX(-1); }
.shm-punch-photo { width: 44px; height: 44px; object-fit: cover; border-radius: .5rem; border: 1px solid #e3e7ee; }

/* ---------- payslip in the company layout + pay inputs grid ---------- */
.payslip-lines { max-width: 760px; font-size: .9rem; }
.psl-head, .psl-table { width: 100%; border-collapse: collapse; }
.psl-head td { border: 1px solid #c9ced6; padding: .3rem .5rem; }
.psl-head .psl-company { font-weight: 700; color: var(--shm-primary); }
.psl-head .psl-title { font-weight: 700; }
.psl-head .psl-k { width: 120px; text-align: right; color: #4b5563; }
.psl-head .psl-v { width: 130px; text-align: center; font-weight: 600; background: #f6f8fb; }
.psl-table { margin-top: -1px; }
.psl-table th, .psl-table td { border: 1px solid #c9ced6; padding: .28rem .5rem; }
.psl-table thead th { background: #f6f8fb; font-weight: 600; }
.psl-table .psl-qty { width: 70px; }
.psl-table .psl-amt { width: 190px; }
.psl-table td.text-end { font-variant-numeric: tabular-nums; }
.psl-total td { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.psl-total td:empty, .psl-total td.text-end { text-decoration: none; }
.psl-section td { font-weight: 700; background: #fafbfc; }
.psl-net td { font-weight: 800; font-size: 1.05rem; background: #eef4ff; }
.psl-info { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin-top: .75rem; }
.psl-sign { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2.5rem; text-align: center; font-weight: 600; }
.psl-sign div { padding-bottom: 3.5rem; border-bottom: 1px dotted #9ca3af; }
@media print { .psl-net td, .psl-head .psl-v, .psl-table thead th { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.shm-inputs-wrap { max-height: calc(100vh - 240px); }
.shm-inputs thead th { position: sticky; top: 0; z-index: 2; min-width: 120px; }
.shm-inputs .shm-inputs-name { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 170px; max-width: 200px; }
.shm-inputs thead .shm-inputs-name { z-index: 3; background: var(--bs-tertiary-bg); }
.shm-inputs input.is-saving { background: #fff8e1; }

/* Licence: token top-up options */
.shm-topup-option { cursor: pointer; border-width: 2px; }
.shm-topup-option:hover { border-color: var(--bs-primary-border-subtle); }

/* ---------- work patterns & day-off swap ---------- */
.shm-pat-strip { display: flex; flex-wrap: wrap; gap: .35rem; }
.shm-pat-strip > div { min-width: 2.6rem; }
.shm-pat-day { --chip: #6c757d; display: inline-block; min-width: 2.6rem; padding: .2rem .35rem; border-radius: .45rem; font-size: .75rem; font-weight: 600; text-align: center; background: color-mix(in srgb, var(--chip) 16%, #fff); color: color-mix(in srgb, var(--chip) 80%, #000); border: 1px solid color-mix(in srgb, var(--chip) 40%, #fff); }
.shm-pat-day.is-off { background: #f3f4f6; color: #9ca3af; border-color: #e5e7eb; }
.shm-pat-edit { flex: 0 0 auto; width: 6.2rem; }
.shm-days-strip { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .75rem; }
.shm-day-chip { flex: 0 0 3.4rem; text-align: center; padding: .35rem .2rem; border-radius: .6rem; border: 1px solid #dbe3ef; background: #f5f8fd; cursor: pointer; line-height: 1.2; user-select: none; }
.shm-day-chip:hover { border-color: var(--shm-primary); }
.shm-day-chip.is-off { background: #f3f4f6; color: #6b7280; border-style: dashed; }
.shm-day-chip.is-holiday { background: #fff7e6; border-color: #f5c46b; color: #9a6200; }
.shm-day-chip.is-today { box-shadow: 0 0 0 2px var(--shm-primary); }
.shm-day-chip.is-picked-work { background: #e6f6ec; border-color: #2e9d5b; }
.shm-day-chip.is-picked-off { background: #fdecec; border-color: #d64545; }
.shm-day-tag { font-size: .68rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 360° performance reviews ---------- */
.rv-cycle-card { transition: transform .12s, box-shadow .12s; }
.rv-cycle-card:hover { transform: translateY(-2px); box-shadow: 0 .5rem 1.25rem rgba(11,78,162,.12) !important; }
.rv-form-tab { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border-radius: .6rem; border: 1.5px solid #dbe3ef; background: #fff; color: #1f2937; text-decoration: none; font-weight: 600; font-size: .88rem; }
.rv-form-tab.active { border-color: var(--shm-primary); background: #eaf1fb; color: var(--shm-primary); }
.rv-section-head { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--shm-primary); margin: 1rem 0 .4rem; }
.rv-section-head:first-child { margin-top: 0; }
.rv-q-row { display: flex; gap: .75rem; align-items: flex-start; border: 1px solid #e5e9f0; border-radius: .6rem; padding: .7rem .85rem; margin-bottom: .5rem; background: #fbfcfe; }
.rv-q-row.is-off { opacity: .55; }
.min-w-0 { min-width: 0; }
.rv-pick-list { max-height: 320px; overflow-y: auto; }
.rv-pick:hover { background: #f5f8fd; }
.rv-scroll { max-height: 420px; overflow-y: auto; }
.rv-btn-wa { background: #25d366; border-color: #25d366; color: #fff; }
.rv-btn-wa:hover, .rv-btn-wa:focus { background: #1ebe5b; border-color: #1ebe5b; color: #fff; }
.rv-qr-box { display: inline-block; padding: .75rem; background: #fff; border: 1px solid #e5e9f0; border-radius: .9rem; }
.rv-share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.rv-avatar { width: 44px; height: 44px; border-radius: 50%; background: #eaf1fb; color: var(--shm-primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; flex-shrink: 0; }

/* answering */
.rv-progress { background: #fff; padding: .6rem .8rem; border-radius: .6rem; box-shadow: 0 2px 10px rgba(0,0,0,.06); top: .5rem; z-index: 5; }
.rv-legend { display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: .76rem; color: #6b7280; }
.rv-q.rv-rating { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; padding: .8rem 0; border-top: 1px solid #eef1f5; }
.rv-legend + .rv-q.rv-rating { border-top: 0; }
.rv-q-text { flex: 1 1 18rem; min-width: 0; }
.rv-pills { display: flex; gap: .4rem; }
.rv-pill { position: relative; width: 44px; height: 44px; margin: 0; border-radius: .6rem; border: 1.5px solid #dbe3ef; background: #f7f9fc; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #6b7280; cursor: pointer; user-select: none; transition: all .1s; }
.rv-pill input { position: absolute; opacity: 0; pointer-events: none; }
.rv-pill:hover { border-color: var(--shm-primary); }
.rv-pill:has(input:checked) { background: var(--shm-primary); border-color: var(--shm-primary); color: #fff; }
.rv-pill:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(11,78,162,.3); }
.rv-q.is-missing, .rv-types.is-missing { background: #fff5f5; border-radius: .6rem; box-shadow: 0 0 0 2px #f1aeb5; padding-left: .5rem; padding-right: .5rem; }
.rv-type-card { display: block; position: relative; height: 100%; border: 1.5px solid #dbe3ef; border-radius: .7rem; padding: .7rem .85rem; cursor: pointer; background: #fff; }
.rv-type-card input { position: absolute; opacity: 0; }
.rv-type-card:has(input:checked) { border-color: var(--shm-primary); background: #eaf1fb; }
.rv-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 575.98px) { .rv-pills { width: 100%; justify-content: space-between; } .rv-pill { width: 17.5%; } }

/* public link */
.rv-public { background: linear-gradient(135deg, #eaf1fb 0%, #f6f8fc 60%, #fdf1f2 100%); min-height: 100vh; }
.rv-public-wrap { max-width: 820px; margin: 0 auto; padding: 1.25rem 1rem 2rem; }
.rv-public-card { background: rgba(255,255,255,.7); border-radius: 1.25rem; padding: 1.25rem; }
.rv-public-badge { width: 56px; height: 56px; margin: 0 auto .6rem; border-radius: 1rem; background: var(--shm-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
@media (max-width: 575.98px) { .rv-public-wrap { padding: .5rem .5rem 1.5rem; } .rv-public-card { padding: .75rem; border-radius: .9rem; } }

/* results */
.rv-kpi { border: 1px solid #e5e9f0; border-radius: .8rem; padding: .8rem 1rem; height: 100%; background: #fff; }
.rv-kpi-main { border-color: var(--shm-primary); background: #f5f8fd; }
.rv-kpi-label { font-size: .78rem; color: #6b7280; }
.rv-kpi-value { font-size: 1.7rem; font-weight: 700; line-height: 1.15; color: #111827; }
.rv-kpi-unit { font-size: .9rem; font-weight: 500; color: #6b7280; }
.rv-chip { font-size: .8rem; background: #f1f4f8; border-radius: 99px; padding: .3rem .8rem; color: #374151; }
.rv-highlight { border-radius: .8rem; padding: .75rem 1rem; border: 1px solid; height: 100%; }
.rv-highlight-success { border-color: #b7e4c7; background: #f2fbf5; }
.rv-highlight-warning { border-color: #f5d9a6; background: #fffaf0; }
.rv-h { font-size: 1rem; font-weight: 700; color: var(--shm-primary); margin: 1.25rem 0 .6rem; }
.rv-score-table { font-size: .9rem; }
.rv-score-table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: #6b7280; font-weight: 600; }
.rv-sec-row td { background: #f7f9fc; font-weight: 700; font-size: .78rem; color: #374151; padding-top: .35rem; padding-bottom: .35rem; }
.rv-bar-col { width: 28%; min-width: 110px; }
.rv-dist-col { width: 16%; min-width: 100px; }
.rv-meter { height: 8px; border-radius: 4px; background: #eef1f5; overflow: hidden; }
.rv-meter-fill { height: 100%; border-radius: 4px; background: var(--shm-primary); }
/* 1..5 distribution: diverging red, grey midpoint, green; 2px gaps between segments */
.rv-dist { display: flex; gap: 2px; height: 10px; }
.rv-dist span { min-width: 3px; }
.rv-dist span:first-child { border-radius: 4px 0 0 4px; }
.rv-dist span:last-child { border-radius: 0 4px 4px 0; }
.rv-dist span:only-child { border-radius: 4px; }
/* validated with the dataviz palette checker: CVD ΔE ≥ 12, normal-vision ΔE ≥ 17.6 between neighbours; grey midpoint by design */
.rv-dist-1 { background: #a61b1b; } .rv-dist-2 { background: #e0634f; } .rv-dist-3 { background: #aab2bf; } .rv-dist-4 { background: #3fa86b; } .rv-dist-5 { background: #146c3a; }
.rv-dist-legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.rv-dist-legend i[class^="rv-dist-"] { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .3rem; vertical-align: -1px; }
.rv-comment-block { margin-bottom: 1rem; }
.rv-comment { padding: .55rem 0; border-top: 1px solid #eef1f5; font-size: .9rem; }
.rv-comment:first-of-type { border-top: 0; }
.rv-who { font-size: .75rem; color: #6b7280; margin-bottom: .15rem; }

/* A4 print */
.rv-print-page { background: #e9ecef; }
.rv-print-bar { width: 210mm; max-width: 100%; margin: 1rem auto .5rem; display: flex; gap: .5rem; justify-content: flex-end; }
.rv-sheet { background: #fff; width: 210mm; max-width: 100%; min-height: 297mm; margin: 0 auto 2rem; padding: 14mm; box-shadow: 0 0 12px rgba(0,0,0,.15); font-size: 12px; }
.rv-letterhead { text-align: center; border-bottom: 2px solid var(--shm-primary); padding-bottom: .5rem; margin-bottom: .8rem; }
.rv-company { font-size: 17px; font-weight: 700; color: var(--shm-primary); }
.rv-doc-title { font-size: 15px; font-weight: 700; }
.rv-details { width: 100%; border-collapse: collapse; margin-bottom: .8rem; }
.rv-details th, .rv-details td { border: 1px solid #ccd3dd; padding: 4px 8px; }
.rv-details th { background: #f5f7fa; width: 16%; font-weight: 600; }
.rv-sheet .rv-kpi-value { font-size: 1.3rem; }
.rv-sheet .rv-score-table { font-size: 11px; }
.rv-sheet .rv-score-table td, .rv-sheet .rv-score-table th { padding: .25rem .4rem; }
.rv-sheet .rv-dist-col { display: table-cell !important; }
.rv-signs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 2.5rem; text-align: center; }
.rv-sign-line { border-bottom: 1px dotted #6b7280; height: 3rem; margin-bottom: .3rem; }
.rv-printed { text-align: right; margin-top: 1rem; }
@media print {
    @page { size: A4; margin: 0; }
    .rv-print-page { background: #fff; }
    .rv-sheet { box-shadow: none; margin: 0; width: auto; min-height: 0; }
    .rv-sheet .rv-kpis > div { flex: 0 0 25%; max-width: 25%; }
    .rv-comment-block, .rv-score-table tr, .rv-signs { break-inside: avoid; }
    .rv-sheet * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* bonus & debt tracker */
.fin-preview { max-height: 440px; overflow-y: auto; }
.js-fin-row { cursor: pointer; }

/* reports */
.rep-icon { width: 42px; height: 42px; flex-shrink: 0; border-radius: .7rem; background: #eaf1fb; color: var(--shm-primary); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.rep-icon-muted { background: #f1f4f8; color: #6b7280; }
.rep-chart { width: 100%; overflow: hidden; }
.rep-chart svg { display: block; max-width: 100%; }
.rep-mark { transition: opacity .1s; }
.rep-chart svg:hover .rep-mark { opacity: .55; }
.rep-chart svg .rep-mark:hover { opacity: 1; }
.rep-legend { display: flex; gap: 1rem; font-size: .78rem; color: #374151; margin-top: .25rem; }
.rep-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .35rem; vertical-align: -1px; }
.rep-table th.js-rep-sort { white-space: nowrap; font-size: .75rem; }
.rep-table th.is-sorted::after { content: " 95"; color: var(--shm-primary); }
.rep-table td { font-size: .82rem; }
.js-rep-row { cursor: pointer; }
.rep-kpi-value { font-size: 1.35rem; }
.rep-sheet-wide { width: 297mm; min-height: 210mm; }
.rep-print-bar { width: 297mm; }
@media print { .rep-print-page .rep-sheet-wide { width: auto; } .rep-print-page .card { box-shadow: none !important; border: 1px solid #dde3ea !important; break-inside: avoid; } .rep-print-page .table-responsive { overflow: visible; } }
/* Only report sheets print landscape (named page); payslips and reviews keep A4 portrait. */
.rep-sheet-wide { page: rep-landscape; }
@page rep-landscape { size: A4 landscape; margin: 0; }

/* help center / user manual */
.help-nav { top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; font-size: .86rem; }
.help-nav-part { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; font-weight: 600; margin: .9rem 0 .25rem; }
.help-nav-link { display: block; padding: .3rem .5rem; border-radius: .4rem; color: #1f2937; text-decoration: none; }
.help-nav-link:hover { background: #f1f4f8; }
.help-nav-link.active { background: #eaf1fb; color: var(--shm-primary); font-weight: 600; }
.help-nav-link i { color: #6b7280; margin-right: .25rem; }
.help-body { font-size: .95rem; line-height: 1.65; }
.help-body h2 { font-size: 1.15rem; font-weight: 700; color: var(--shm-primary); margin: 1.6rem 0 .6rem; padding-top: .3rem; border-top: 1px solid #eef1f5; }
.help-body h3 { font-size: 1rem; font-weight: 700; margin: 1.2rem 0 .4rem; }
.help-body ul, .help-body ol { padding-left: 1.3rem; }
.help-body li { margin-bottom: .25rem; }
.help-body code { background: #f1f4f8; color: #b42318; padding: .05rem .3rem; border-radius: .3rem; }
.help-tip { display: flex; gap: .6rem; background: #fff8e6; border: 1px solid #f5d9a6; border-radius: .6rem; padding: .6rem .8rem; margin: .8rem 0; font-size: .9rem; }
.help-tip i { color: #b45309; font-size: 1.1rem; }
.help-toc { background: #f7f9fc; border-radius: .6rem; padding: .6rem .9rem; display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: baseline; }
.help-toc a { font-size: .85rem; text-decoration: none; }
.help-table { font-size: .88rem; }
.help-cover { text-align: center; padding: 30mm 0 12mm; border-bottom: 2px solid var(--shm-primary); margin-bottom: 8mm; }
.help-cover-title { font-size: 34px; font-weight: 800; color: var(--shm-primary); margin: 6mm 0 2mm; }
.help-print-toc ol { columns: 2; font-size: 12px; }
.help-print-chapter { break-before: page; }
.help-print-chapter h1 { color: var(--shm-primary); border-bottom: 1px solid #dde3ea; padding-bottom: 2mm; }
.help-print .help-body { font-size: 12px; }
@media print { .help-article .card-footer, .help-article .btn { display: none !important; } .help-nav { display: none; } }

/* system monitor */
.mon-table .mon-msg, .mon-msg { max-width: 0; width: 100%; min-width: 12rem; }
.mon-table tr.js-mon-error { cursor: pointer; }
.mon-diff { font-family: ui-monospace, Consolas, monospace; font-size: .78rem; word-break: break-all; }
.mon-old { color: #a61b1b; text-decoration: line-through; }
.mon-new { color: #146c3a; font-weight: 600; }
.mon-pre { background: #0f172a; color: #e2e8f0; border-radius: .5rem; padding: .75rem; font-size: .75rem; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.mon-kpi-bad { border-color: #f1aeb5; background: #fff5f5; }

/* Developer credit */
.shm-credit { text-align: center; font-size: .8rem; padding: 1.5rem 0 .5rem; }
.shm-credit a { color: #7b8494; text-decoration: none; }
.shm-credit a:hover { color: #25d366; }
