/* TejHR admin additions on top of app.css */
.avatar.has-img, .avatar.has-img.sm, .avatar.has-img.lg { background: #E2E8F0; overflow: hidden; padding: 0; }
.avatar.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.xl { width: 96px; height: 96px; flex-basis: 96px; border-radius: 26px; font-size: 32px; }

.emp-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.emp-cell .nm { font-weight: 600; color: var(--ink); line-height: 1.2; }
.emp-cell .nm:hover { color: var(--brand); }
.emp-cell .sub { font-size: 12px; color: var(--muted); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; background: #F1F5F9; color: var(--ink-2); padding: 2px 7px; border-radius: 6px; white-space: nowrap; }

/* Profile header */
.emp-hero { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.emp-hero h2 { font-size: 22px; font-weight: 800; margin: 0; color: var(--ink); letter-spacing: -.3px; }
.emp-hero .meta { color: var(--muted); font-size: 13.5px; }

/* Org chart */
.org-tree, .org-tree ul { list-style: none; margin: 0; padding: 0; }
.org-tree ul { margin-left: 22px; padding-left: 18px; border-left: 2px solid #E6EDF5; }
.org-tree li { position: relative; padding: 6px 0; }
.org-tree ul > li::before { content: ""; position: absolute; left: -18px; top: 26px; width: 16px; height: 2px; background: #E6EDF5; }
.org-node { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.org-node .nm { font-weight: 700; color: var(--ink); font-size: 13.5px; line-height: 1.15; }
.org-node .sub { font-size: 11.5px; color: var(--muted); }
.org-node .cnt { margin-left: 6px; font-size: 11px; font-weight: 700; color: var(--brand); background: var(--brand-50); padding: 1px 8px; border-radius: 20px; }
.org-toggle { border: 0; background: none; color: var(--muted); padding: 0 4px; }

/* Map picker */
.map-box { height: 380px; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; z-index: 0; }
.map-box.sm { height: 220px; }

/* Masters */
.master-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.master-tabs a { padding: 8px 14px; border-radius: 12px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); background: #fff; border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 7px; }
.master-tabs a.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.wk-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.wk-pick label { cursor: pointer; margin: 0; }
.wk-pick input { position: absolute; opacity: 0; pointer-events: none; }
.wk-pick span { display: inline-grid; place-items: center; min-width: 44px; height: 36px; padding: 0 8px; border-radius: 10px; border: 1.5px solid var(--line); font-weight: 600; font-size: 12.5px; color: var(--ink-2); background: #fff; }
.wk-pick input:checked + span { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Attendance register */
.reg-table th, .reg-table td { font-size: 12.5px; }
.reg-table > :not(caption) > * > * { padding: 6px 4px; }
.reg-table .sticky-col { position: sticky; left: 0; background: #fff; z-index: 3; min-width: 170px; padding-left: 14px !important; box-shadow: 1px 0 0 var(--line); }
.reg-table thead .sticky-col { background: #F8FAFC; z-index: 4; }
.reg-cell { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 3px; border-radius: 7px; font-weight: 700; font-size: 11.5px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, white); position: relative; }
.reg-cell.late::after { content: ""; position: absolute; top: -2px; right: -2px; width: 7px; height: 7px; border-radius: 50%; background: #E9A21B; border: 1.5px solid #fff; }
.face-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.face-thumbs img { width: 64px; height: 80px; object-fit: cover; border-radius: 12px; }
.cam-box { position: relative; max-width: 420px; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: #0E1A26; margin: 0 auto; }
.cam-box video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.cam-box .hint { position: absolute; left: 10px; right: 10px; bottom: 10px; background: rgba(14, 26, 38, .75); color: #fff; border-radius: 12px; padding: 8px 12px; text-align: center; font-weight: 600; }

.temp-pass { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 20px; font-weight: 700; letter-spacing: .08em; background: #F8FAFC; border: 1px dashed var(--brand); border-radius: 12px; padding: 10px 16px; display: inline-block; color: var(--ink); }
.phase-list .item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #F1F3F8; }
.phase-list .item:last-child { border-bottom: 0; }
.phase-list .n { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: #F1F5F9; color: var(--muted); flex: 0 0 30px; }
.phase-list .item.done .n { background: #ECFDF5; color: #047857; }
.phase-list .item.now .n { background: var(--brand); color: #fff; }

/* Settings → Theme colours */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.theme-opt { position: relative; border: 1.5px solid #E5E9F0; border-radius: 14px; padding: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; transition: border-color .15s; }
.theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
.theme-opt:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.theme-sw { display: flex; height: 26px; width: 100%; border-radius: 8px; overflow: hidden; background: #F1F5F9; align-items: center; justify-content: center; color: var(--muted); }
.theme-sw i[style] { flex: 1; height: 100%; }
.theme-lbl { font-size: 13px; font-weight: 600; }

/* Install-app button (PWA) */
.install-btn[hidden] { display: none !important; }

/* Downloads: CSV / Excel / PDF dropdown */
.dl-menu .dropdown-item i { width: 18px; }
