:root {
  --color-accent: oklch(0.52 0.12 165);
  --color-accent-hover: oklch(0.46 0.12 165);
  --color-accent-deep: oklch(0.34 0.10 165);
  --color-accent-link: oklch(0.45 0.12 165);
  --color-accent-soft: oklch(0.52 0.12 165 / 0.13);
  --color-canvas: #f6f7f7;
  --color-surface: #fff;
  --color-surface-muted: #fbfcfb;
  --color-border: #e7eae9;
  --color-border-control: #e2e6e5;
  --color-border-soft: #f0f2f1;
  --color-text: #191c1b;
  --color-text-strong: #26302e;
  --color-text-muted: #6f7674;
  --color-text-subtle: #8f9795;
  --color-text-faint: #a2aaa8;
  --color-neutral-soft: #eef1f0;
  --color-neutral-fg: #4a5250;
  --color-warning-bg: oklch(0.75 0.13 75 / 0.20);
  --color-warning-fg: oklch(0.44 0.10 65);
  --color-danger-bg: oklch(0.62 0.16 27 / 0.14);
  --color-danger-fg: oklch(0.44 0.15 27);
  --color-danger-solid: oklch(0.52 0.16 27);
  --color-scrim: rgba(20, 30, 28, 0.34);
  --shadow-card: 0 1px 2px rgba(20, 30, 28, 0.03);
  --shadow-menu: 0 12px 32px rgba(20, 30, 28, 0.12);
}

body.hr-body { margin: 0; font-family: "Instrument Sans", Helvetica, Arial, sans-serif; font-size: 13.5px; line-height: 1.45; background: var(--color-canvas); color: var(--color-text); -webkit-font-smoothing: antialiased; }
.hr-body * { box-sizing: border-box; }
.hr-body a { color: var(--color-accent-link); text-decoration: none; }
.hr-body a:hover { color: oklch(0.36 0.11 165); }
.hr-body input, .hr-body select, .hr-body button, .hr-body textarea { font: inherit; color: inherit; }
.hr-body input:focus, .hr-body select:focus, .hr-body textarea:focus { outline: 2px solid oklch(0.52 0.12 165 / 0.35); outline-offset: 0; border-color: var(--color-accent) !important; }
@keyframes hrToast { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Shell */
.hr-shell { display: flex; align-items: stretch; min-height: 100vh; }
.hr-side { position: sticky; top: 0; height: 100vh; flex: 0 0 auto; width: 248px; border-right: 1px solid var(--color-border); background: var(--color-surface-muted); padding: 14px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.hr-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.hr-logo { width: 26px; height: 26px; border-radius: 7px; background: var(--color-accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex: 0 0 auto; }
.hr-brand-name { font-size: 13.5px; font-weight: 650; letter-spacing: -0.02em; white-space: nowrap; }
.hr-brand-sub { font-size: 11px; color: var(--color-text-subtle); white-space: nowrap; }
.hr-nav-label { font-size: 10.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--color-text-faint); padding: 14px 10px 5px; }
.hr-nav-label:first-of-type { padding-top: 6px; }
.hr-nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 13.5px; letter-spacing: -0.01em; color: var(--color-neutral-fg) !important; font-weight: 450; }
.hr-nav-item.is-active { background: var(--color-accent-soft); color: var(--color-accent-deep) !important; font-weight: 600; }
.hr-nav-item .ico { flex: 0 0 auto; display: flex; align-items: center; }
.hr-nav-item .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.hr-nav-count { font-size: 11px; font-weight: 600; color: var(--color-text-muted); background: var(--color-neutral-soft); border-radius: 20px; padding: 1px 7px; }
.is-active .hr-nav-count { color: var(--color-accent-deep); background: #fff; }
.hr-side-foot { border-top: 1px solid var(--color-border); margin: 8px 2px 0; padding-top: 10px; display: flex; align-items: center; gap: 9px; }
.hr-icon-btn { display: flex; align-items: center; justify-content: center; border-radius: 6px; cursor: pointer; color: var(--color-text-subtle); flex: 0 0 auto; background: none; border: 0; padding: 0; }
.hr-icon-btn:hover { background: var(--color-neutral-soft); color: #3c4442; }
.hr-main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hr-top { position: sticky; top: 0; z-index: 30; background: rgba(251, 252, 251, 0.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--color-border); padding: 10px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hr-crumb { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--color-text-subtle); margin-bottom: 1px; }
.hr-crumb b { font-weight: 400; color: var(--color-neutral-fg); }
.hr-title { font-size: 16px; font-weight: 650; letter-spacing: -0.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.hr-main { flex: 1; padding: 22px 20px 40px; max-width: 1400px; width: 100%; }
.hr-burger { display: none; width: 32px; height: 32px; border: 1px solid var(--color-border-control); border-radius: 8px; background: #fff; color: #3c4442; }
.hr-topsearch { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 11px; border: 1px solid var(--color-border-control); border-radius: 9px; background: #fff; width: 280px; }
.hr-topsearch input { border: 0; outline: 0; flex: 1; min-width: 0; font-size: 13px; background: transparent; }
.hr-kbd { font-size: 10.5px; color: var(--color-text-faint); border: 1px solid var(--color-border); border-radius: 5px; padding: 1px 5px; }
.hr-square-btn { width: 34px; height: 34px; border: 1px solid var(--color-border-control); border-radius: 9px; background: #fff; color: #3c4442; position: relative; }
.hr-pos { position: relative; flex: 0 0 auto; }
.hr-avatar { border-radius: 50%; object-fit: cover; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; font-weight: 650; background: var(--color-accent-soft); color: oklch(0.4 0.11 165); }

/* Menus, modals, toast */
.hr-menu { position: absolute; top: 40px; right: 0; background: #fff; border: 1px solid var(--color-border); border-radius: 12px; box-shadow: var(--shadow-menu); padding: 6px; z-index: 40; width: 212px; display: none; }
.hr-menu.hr-open { display: block; }
.hr-menu-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 9px; border-radius: 8px; font-size: 13px; cursor: pointer; color: inherit !important; }
.hr-menu-item:hover { background: #f4f6f5; }
.hr-menu-item.danger { color: #b04141 !important; }
.hr-menu-head { padding: 9px 10px 11px; border-bottom: 1px solid var(--color-border-soft); margin-bottom: 5px; }
[data-hr-drawer-overlay], [data-hr-drawer] { display: none; }
[data-hr-drawer-overlay].hr-open { display: block; }
[data-hr-drawer].hr-open { display: flex; }
[data-hr-drawer-overlay] { position: fixed; inset: 0; background: var(--color-scrim); z-index: 60; }
[data-hr-drawer] { position: fixed; top: 0; left: 0; bottom: 0; width: 252px; background: var(--color-surface-muted); border-right: 1px solid var(--color-border); z-index: 61; padding: 14px 10px; overflow-y: auto; flex-direction: column; gap: 1px; }
.hr-overlay { position: fixed; inset: 0; background: var(--color-scrim); z-index: 70; align-items: center; justify-content: center; padding: 24px; display: none; }
.hr-overlay.hr-open { display: flex; }
.hr-dialog { width: 100%; max-width: 380px; background: #fff; border-radius: 14px; padding: 20px; box-shadow: 0 20px 50px rgba(20, 30, 28, 0.24); }
.hr-dialog.wide { max-width: 520px; max-height: 90vh; overflow-y: auto; }
.hr-dialog h2 { font-size: 15px; font-weight: 650; letter-spacing: -0.02em; margin: 0; }
.hr-dialog p { font-size: 12.5px; color: var(--color-text-muted); margin: 7px 0 0; line-height: 1.55; }
.hr-dialog-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
[data-hr-toast] { position: fixed; bottom: 20px; right: 20px; z-index: 80; align-items: flex-start; gap: 10px; background: #fff; border: 1px solid var(--color-border); border-radius: 11px; padding: 12px 14px; box-shadow: 0 12px 30px rgba(20, 30, 28, 0.14); max-width: 330px; display: none; animation: hrToast 160ms ease-out; }
[data-hr-toast].hr-open { display: flex; }
.hr-toast-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-accent); margin-top: 5px; flex: 0 0 auto; }

/* Controls */
.btn { height: 34px; padding: 0 13px; border: 1px solid var(--color-border-control); border-radius: 9px; background: #fff; font-size: 13px; font-weight: 550; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--color-text) !important; white-space: nowrap; }
.btn:hover { background: #f4f6f5; }
.btn-primary { background: var(--color-accent); border-color: var(--color-accent); color: #fff !important; font-weight: 600; }
.btn-primary:hover { background: var(--color-accent-hover); }
.btn-danger { background: var(--color-danger-solid); border-color: var(--color-danger-solid); color: #fff !important; font-weight: 600; }
.btn-danger:hover { background: oklch(0.46 0.16 27); }
.btn-sm { width: 28px; height: 28px; padding: 0; border-radius: 7px; color: var(--color-neutral-fg) !important; }
.btn-sm.danger:hover { background: #fdf3f3; border-color: #e8c9c9; color: #b04141 !important; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label { font-size: 12px; font-weight: 550; color: var(--color-neutral-fg); }
.field label i { color: var(--color-danger-fg); font-style: normal; }
.input { height: 36px; padding: 0 11px; border: 1px solid var(--color-border-control); border-radius: 9px; background: #fff; font-size: 13px; width: 100%; }
.input.sm { height: 34px; padding: 0 9px; font-size: 12.5px; width: auto; }
.field .help { font-size: 11.5px; color: var(--color-text-subtle); }
.field .err { font-size: 11.5px; color: var(--color-danger-fg); }
.input.invalid { border-color: var(--color-danger-solid); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; }

/* Surfaces */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; box-shadow: var(--shadow-card); overflow: hidden; }
.card-pad { padding: 16px 18px; }
.card h3 { font-size: 13.5px; font-weight: 650; margin: 0; letter-spacing: -0.01em; }
.page-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.page-bar .note { font-size: 12.5px; color: var(--color-text-muted); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.toolbar { padding: 12px 14px; border-bottom: 1px solid var(--color-border-soft); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.search-box { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 11px; border: 1px solid var(--color-border-control); border-radius: 9px; background: #fff; flex: 1; min-width: 190px; }
.search-box input { border: 0; outline: 0; flex: 1; min-width: 0; font-size: 13px; background: transparent; }

table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--color-text-subtle); font-weight: 600; padding: 10px 16px; background: var(--color-surface-muted); border-bottom: 1px solid var(--color-border-soft); white-space: nowrap; }
.tbl td { padding: 13px 16px; font-size: 12.5px; color: var(--color-neutral-fg); white-space: nowrap; border-bottom: 1px solid #f4f6f5; }
.tbl tbody tr:hover { background: var(--color-surface-muted); }
.tbl .strong { font-size: 13px; font-weight: 600; color: var(--color-text); }
.tbl .meta { font-size: 11px; color: #98a09e; }
.table-scroll { overflow-x: auto; }
.cell-person { display: flex; align-items: center; gap: 10px; color: inherit !important; }
.row-actions { display: flex; gap: 4px; align-items: center; }
.row-actions form { margin: 0; }

.badge { font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 20px; background: var(--color-neutral-soft); color: var(--color-neutral-fg); display: inline-block; }
.badge.positive { background: var(--color-accent-soft); color: var(--color-accent-deep); }
.badge.warning { background: var(--color-warning-bg); color: var(--color-warning-fg); }
.badge.danger { background: var(--color-danger-bg); color: var(--color-danger-fg); }

.pager { padding: 11px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--color-border-soft); font-size: 12px; color: var(--color-text-subtle); }
.pager nav > div:first-child { display: none; }
.pager-links { display: flex; gap: 5px; }
.pager-links a, .pager-links span { min-width: 30px; height: 30px; line-height: 28px; padding: 0 8px; border: 1px solid var(--color-border-control); border-radius: 8px; background: #fff; color: var(--color-neutral-fg) !important; font-size: 12.5px; text-align: center; display: inline-block; }
.pager-links a:hover { background: #f4f6f5; }
.pager-links .current { background: var(--color-accent-soft); border-color: oklch(0.52 0.12 165 / 0.3); color: var(--color-accent-deep) !important; font-weight: 600; }
.pager-links .off { opacity: .45; }

.empty { padding: 52px 20px; text-align: center; }
.empty .ico { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--color-border); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; color: var(--color-text-faint); }
.empty b { display: block; font-size: 14px; font-weight: 600; }
.empty span { display: block; font-size: 12.5px; color: var(--color-text-subtle); margin-top: 4px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat { padding: 14px 16px; }
.stat .k { font-size: 11.5px; color: var(--color-text-subtle); }
.stat .v { font-size: 24px; font-weight: 650; letter-spacing: -0.03em; margin: 4px 0 2px; }
.stat .n { font-size: 11.5px; color: var(--color-text-subtle); }
.bars { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.bar-row .top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 4px; }
.bar-row .track { height: 6px; border-radius: 6px; background: var(--color-neutral-soft); overflow: hidden; }
.bar-row .fill { height: 100%; background: var(--color-accent); border-radius: 6px; }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dl { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 10px 16px; margin: 0; font-size: 13px; }
.dl dt { color: var(--color-text-subtle); }
.dl dd { margin: 0; }
.flash { padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 14px; }
.flash.error { background: var(--color-danger-bg); color: var(--color-danger-fg); }
.flash.notice { background: var(--color-accent-soft); color: var(--color-accent-deep); }
.form-card section { padding: 18px 20px; border-bottom: 1px solid var(--color-border-soft); }
.form-card section:last-of-type { border-bottom: 0; }
.form-card .hint { font-size: 12px; color: var(--color-text-subtle); margin: 2px 0 14px; }
.form-foot { padding: 14px 20px; border-top: 1px solid var(--color-border-soft); display: flex; gap: 8px; justify-content: flex-end; background: var(--color-surface-muted); }

/* Auth */

@media (max-width: 900px) {
  .hr-side { display: none !important; }
  .hr-burger { display: flex; }
  .hr-topsearch { width: 100%; }
  .hr-only-wide { display: none !important; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .dl { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .dl dd { margin-bottom: 10px; }
}

/* Collapsed sidebar (toggled by hr.js) */
.hr-side.hr-collapsed { width: 62px; }
.hr-side.hr-collapsed .lbl, .hr-side.hr-collapsed .hr-nav-count, .hr-side.hr-collapsed .hr-nav-label,
.hr-side.hr-collapsed .hr-brand-text, .hr-side.hr-collapsed [data-hr-collapse-toggle],
.hr-side.hr-collapsed .hr-foot-text, .hr-side.hr-collapsed .hr-foot-out { display: none; }
.hr-side [data-hr-expand-toggle] { display: none; height: 32px; }
.hr-side.hr-collapsed [data-hr-expand-toggle] { display: flex; }

/* Profile tabs */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--color-border); scrollbar-width: none; }
.tabs::-webkit-scrollbar { height: 0; }
.tabs .tab { padding: 9px 13px; font-size: 13px; font-weight: 550; color: var(--color-text-muted) !important; border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tabs .tab:hover { color: var(--color-text) !important; }
.tabs .tab.is-active { color: var(--color-accent-deep) !important; border-bottom-color: var(--color-accent); }
.tabs.sub { border-bottom: 0; gap: 6px; }
.tabs.sub .tab { border: 1px solid var(--color-border-control); border-radius: 20px; padding: 5px 12px; font-size: 12.5px; margin: 0; background: #fff; }
.tabs.sub .tab.is-active { background: var(--color-accent-soft); border-color: oklch(0.52 0.12 165 / 0.3); }
@media (max-width: 900px) { .stats[style*="repeat(5"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }

/* Profile header / panels (field grid with inline edit) */
.btn-compact { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.flabel { display: block; font-size: 10.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--color-text-faint); line-height: 1.4; }
.fval { font-size: 13px; color: var(--color-text-strong); margin-top: 3px; line-height: 1.45; word-break: break-word; }
.fgrid { padding: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 15px 22px; }
.fgrid .err { font-size: 11.5px; color: var(--color-danger-fg); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px 20px; margin-top: 14px; }
.panel-head { padding: 14px 16px; border-bottom: 1px solid var(--color-border-soft); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel-title { font-size: 13.5px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.3; }
.panel-note { font-size: 11.5px; color: var(--color-text-subtle); margin-top: 2px; line-height: 1.4; }
.panel-foot { padding: 11px 16px; border-top: 1px solid var(--color-border-soft); font-size: 11.5px; color: #98a09e; }
.photo-ph { width: 74px; height: 88px; border-radius: 10px; background: repeating-linear-gradient(135deg, #f2f4f3 0 6px, #eceeed 6px 12px); border: 1px solid var(--color-border); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.photo-ph .mono { font-size: 9px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--color-text-faint); }
.ptabs { display: flex; gap: 2px; overflow-x: auto; margin-top: 18px; border-top: 1px solid var(--color-border-soft); padding-top: 10px; scrollbar-width: none; }
.ptabs::-webkit-scrollbar { height: 0; }
.ptabs a { padding: 6px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 450; white-space: nowrap; color: var(--color-text-muted) !important; }
.ptabs a:hover { background: #f0f2f1; }
.ptabs a.is-active { background: var(--color-accent-soft); color: var(--color-accent-deep) !important; font-weight: 600; }
.psubtabs { display: flex; gap: 3px; overflow-x: auto; background: var(--color-neutral-soft); border-radius: 10px; padding: 3px; width: fit-content; max-width: 100%; }
.psubtabs a { padding: 6px 12px; border-radius: 8px; font-size: 12.5px; white-space: nowrap; color: var(--color-text-muted) !important; }
.psubtabs a.is-active { background: #fff; color: var(--color-text) !important; font-weight: 600; box-shadow: 0 1px 2px rgba(20, 30, 28, 0.08); }

/* Dashboard */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 12px; }
.stat-row .stat { padding: 14px 15px; }
.stat .k { font-size: 12px; color: var(--color-text-muted); }
.stat .v-row { display: flex; align-items: baseline; gap: 8px; margin-top: 7px; flex-wrap: wrap; }
.stat .v-row .v { font-size: 24px; font-weight: 650; letter-spacing: -0.03em; line-height: 1.15; margin: 0; }
.stat .delta { font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.stat .n { margin-top: 4px; }
.badge.demo { background: var(--color-warning-bg); color: var(--color-warning-fg); font-size: 10px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; font-weight: 600; }
.dash-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.dash-cols.wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.stackbar { display: flex; height: 9px; border-radius: 20px; overflow: hidden; margin-top: 16px; gap: 2px; }
.legend { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 16px; }
.legend > div { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.legend .sw { width: 8px; height: 8px; border-radius: 3px; flex: 0 0 auto; }
.weekbars { display: flex; align-items: flex-end; gap: 6px; height: 64px; margin-top: 20px; border-top: 1px solid var(--color-border-soft); padding-top: 14px; box-sizing: content-box; }
.weekbars > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.weekbars > div > div { width: 100%; max-width: 16px; border-radius: 3px; }
.weekbars span { font-size: 10px; color: var(--color-text-faint); }
.dist-row { display: flex; align-items: center; gap: 10px; }
.dist-row .lbl { font-size: 12.5px; color: var(--color-neutral-fg); width: 112px; flex: 0 0 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dist-row .track { flex: 1; height: 6px; background: var(--color-border-soft); border-radius: 20px; overflow: hidden; display: block; }
.dist-row .track span { display: block; height: 6px; border-radius: 20px; }
.dist-row .num { font-size: 12px; font-weight: 600; width: 38px; text-align: right; flex: 0 0 auto; }

/* Sign-in */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-aside { background: var(--color-surface-muted); border-right: 1px solid var(--color-border); padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; position: relative; overflow: hidden; }
.auth-aside::after { content: ""; position: absolute; width: 520px; height: 520px; right: -220px; bottom: -240px; border-radius: 50%; background: radial-gradient(closest-side, oklch(0.52 0.12 165 / 0.12), transparent); pointer-events: none; }
.auth-brand { display: flex; align-items: center; gap: 11px; }
.auth-brand .hr-logo { width: 32px; height: 32px; border-radius: 9px; font-size: 13px; }
.auth-brand .hr-brand-name { font-size: 15px; }
.auth-pitch { max-width: 440px; position: relative; z-index: 1; }
.auth-pitch h2 { font-size: 30px; line-height: 1.15; letter-spacing: -0.035em; font-weight: 650; margin: 0 0 12px; }
.auth-pitch > p { font-size: 14px; color: var(--color-text-muted); line-height: 1.6; margin: 0 0 28px; }
.auth-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.auth-points li { display: flex; gap: 12px; align-items: flex-start; }
.auth-points .ico { width: 32px; height: 32px; border-radius: 9px; background: var(--color-accent-soft); color: var(--color-accent-deep); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.auth-points b { display: block; font-size: 13.5px; font-weight: 600; }
.auth-points span { font-size: 12.5px; color: var(--color-text-muted); }
.auth-foot { font-size: 11.5px; color: var(--color-text-subtle); position: relative; z-index: 1; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 32px 24px; }
.auth-panel { width: 100%; max-width: 380px; }
.auth-panel .mobile-brand { display: none; margin-bottom: 28px; }
.auth-panel h1 { font-size: 22px; font-weight: 650; letter-spacing: -0.03em; margin: 0; }
.auth-panel .lede { font-size: 13.5px; color: var(--color-text-muted); margin: 6px 0 24px; line-height: 1.5; }
.auth-panel .input { height: 40px; font-size: 14px; }
.auth-panel .btn-primary { height: 42px; font-size: 14px; width: 100%; }
.auth-panel .btn-primary[disabled] { opacity: .7; cursor: progress; }
.pw { position: relative; }
.pw .input { padding-right: 56px; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 28px; padding: 0 9px; border: 0; background: none; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--color-text-muted); cursor: pointer; }
.pw button:hover { background: var(--color-neutral-soft); color: var(--color-text); }
.auth-links { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; margin-top: 4px; }
.auth-help { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--color-border-soft); font-size: 12px; color: var(--color-text-subtle); line-height: 1.55; }
@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-aside { display: none; }
  .auth-panel .mobile-brand { display: flex; }
}

/* Employee dashboard */
.today { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 16px; }
.today .k { font-size: 11.5px; color: var(--color-text-subtle); }
.today .big { font-size: 24px; font-weight: 650; letter-spacing: -0.03em; line-height: 1.2; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.meter { display: block; height: 6px; background: var(--color-border-soft); border-radius: 20px; overflow: hidden; margin-top: 9px; }
.meter span { display: block; height: 6px; border-radius: 20px; }
.ed-cols { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.monthbars { display: flex; align-items: flex-end; gap: 5px; height: 74px; margin-top: 16px; }
.monthbars div { flex: 1; border-radius: 3px; min-width: 4px; }
.month-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--color-border-soft); }
.month-legend > div { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.month-legend .sw { width: 8px; height: 8px; border-radius: 3px; }
.payslip { padding: 12px 16px; border-bottom: 1px solid #f4f6f5; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.quick a { border: 1px solid var(--color-neutral-soft); border-radius: 10px; padding: 11px; background: var(--color-surface-muted); color: inherit !important; display: block; }
.quick a:hover { border-color: oklch(0.52 0.12 165 / 0.4); background: #fff; }
.quick b { display: block; font-size: 12.5px; font-weight: 600; }
.quick span { display: block; font-size: 11px; color: var(--color-text-subtle); margin-top: 2px; }
.todo { padding: 12px 16px; border-bottom: 1px solid #f4f6f5; display: flex; gap: 11px; align-items: flex-start; }
.todo .dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; flex: 0 0 auto; }
.member { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f4f6f5; }
.member .nm { font-size: 12.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member .rl { font-size: 11px; color: var(--color-text-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 940px) { .ed-cols { grid-template-columns: minmax(0, 1fr); } }

/* File picker styled to match .input / .btn */
.file-input { padding: 0 4px 0 4px; display: flex; align-items: center; font-size: 12.5px; color: var(--color-text-muted); cursor: pointer; }
.file-input::file-selector-button { height: 26px; margin-right: 10px; padding: 0 12px; border: 1px solid var(--color-border-control); border-radius: 7px; background: #f4f6f5; font: inherit; font-weight: 550; color: var(--color-text, #222); cursor: pointer; }
.file-input::file-selector-button:hover { background: #eaeeec; }
.upload-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.upload-row .file-input { width: 100%; min-width: 0; }
.upload-row .upload-btn { height: 36px; white-space: nowrap; }
@media (max-width: 560px) { .upload-row { grid-template-columns: 1fr; } .upload-row .upload-btn { justify-self: end; } }

/* Vertical timeline (profile service history) */
.tl { list-style: none; margin: 0; padding: 20px 22px 8px 34px; position: relative; }
.tl::before { content: ""; position: absolute; left: 41px; top: 28px; bottom: 28px; width: 2px; background: var(--color-border); }
.tl-item { position: relative; padding: 0 0 16px 28px; }
.tl-dot { position: absolute; left: 0; top: 18px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--color-border-control); box-sizing: border-box; z-index: 1; }
.tl-item.is-current .tl-dot { border-color: var(--color-accent); background: var(--color-accent); box-shadow: 0 0 0 4px var(--color-accent-soft); }
.tl-card { border: 1px solid var(--color-border-soft); border-radius: 10px; padding: 12px 14px; background: var(--color-surface); }
.tl-item.is-current .tl-card { border-color: var(--color-accent-soft); background: var(--color-surface-muted); }
.tl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tl-side { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.tl-title { font-size: 14px; font-weight: 650; color: var(--color-text); }
.tl-sub { font-size: 12.5px; color: var(--color-text-muted); margin-top: 2px; }
.tl-dates { font-size: 12px; color: var(--color-neutral-fg); margin-top: 8px; font-weight: 550; }
.tl-span { color: var(--color-text-subtle); font-weight: 400; }
.tl-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 12px; color: var(--color-text-muted); }
.tl-meta b { font-weight: 550; color: var(--color-neutral-fg); }
.tl-note { margin: 8px 0 0; font-size: 12.5px; color: var(--color-neutral-fg); line-height: 1.5; }
@media (max-width: 560px) { .tl { padding-left: 18px; padding-right: 14px; } .tl::before { left: 25px; } .tl-head { flex-direction: column; } }
.thumb { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: block; border: 1px solid var(--color-border); }
.nom-share { width: 96px; height: 32px; }
.nom-badges { display: flex; flex-wrap: wrap; gap: 4px; }
/* Dynamic nomination rows */
.nom-fill[hidden] { display: none; }
.nom-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.nom-summary { font-size: 12px; color: var(--color-text-subtle); }
.nom-share { width: 92px; height: 34px; }
.nom-share-wrap { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--color-text-muted); }

/* Nominee cards */
.nm-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; padding: 16px 18px 0; }
.nm-tile { border: 1px solid var(--color-border-soft); border-radius: 10px; padding: 10px 12px; background: var(--color-surface-muted); }
.nm-tile-top, .nm-nom-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12.5px; color: var(--color-neutral-fg); }
.nm-tile-top b, .nm-nom-top b { font-size: 13px; color: var(--color-text); }
.nm-tile-note { font-size: 11.5px; margin-top: 6px; color: var(--color-text-subtle); }
.nm-bar { height: 6px; border-radius: 99px; background: var(--color-border-soft); overflow: hidden; margin-top: 7px; }
.nm-bar i { display: block; height: 100%; border-radius: 99px; background: var(--color-accent); }
.nm-tile.is-part .nm-tile-note { color: var(--color-warning-fg); }
.nm-tile.is-full .nm-tile-note { color: var(--color-accent-link); font-weight: 550; }
.nm-tile.is-over .nm-tile-note { color: var(--color-danger-fg); font-weight: 550; }
.nm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; padding: 16px 18px 18px; }
.nm-card { border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; transition: box-shadow .15s, border-color .15s; }
.nm-card:hover { border-color: var(--color-border-control); box-shadow: var(--shadow-card); }
.nm-head { display: flex; align-items: center; gap: 12px; }
.nm-photo { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 1px solid var(--color-border); flex-shrink: 0; }
.nm-id { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.nm-name { font-size: 14.5px; font-weight: 650; color: var(--color-text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm-info { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; padding: 10px 0; border-top: 1px solid var(--color-border-soft); border-bottom: 1px solid var(--color-border-soft); }
.nm-info dt { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-subtle); font-weight: 600; }
.nm-info dd { margin: 3px 0 0; font-size: 12.5px; color: var(--color-neutral-fg); word-break: break-word; display: flex; flex-direction: column; gap: 2px; }
.nm-info a { color: var(--color-accent-link); text-decoration: none; font-weight: 550; }
.nm-info a:hover { text-decoration: underline; }
.nm-none { color: var(--color-text-faint, #9aa3a0); font-style: italic; }
.nm-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-subtle); font-weight: 600; margin-bottom: 6px; }
.nm-tile-right { display: flex; align-items: center; gap: 8px; }
.nm-faces { display: inline-flex; align-items: center; }
.nm-face { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; border: 2px solid var(--color-surface-muted); box-sizing: border-box; flex-shrink: 0; }
.nm-faces > * + * { margin-left: -7px; }
.nm-face-init { display: inline-flex; align-items: center; justify-content: center; background: var(--color-surface-muted); }
.nm-opt { font-weight: 400; color: var(--color-text-subtle); }

/* ---- Modern pop-up (nominee) ---- */
.hr-dialog.modern { max-width: 660px; padding: 0; display: flex; flex-direction: column; overflow: hidden; max-height: 92vh; border-radius: 16px; }
.hr-dialog.modern .dlg-head { padding: 22px 26px 14px; border-bottom: 1px solid var(--color-border-soft); }
.hr-dialog.modern .dlg-head h2 { font-size: 17px; }
.hr-dialog.modern .dlg-head p { margin: 4px 0 0; font-size: 13px; }
.hr-dialog.modern .dlg-body { padding: 18px 26px 22px; overflow-y: auto; flex: 1; margin: 0; }
.hr-dialog.modern .hr-dialog-actions { margin: 0; padding: 14px 26px; border-top: 1px solid var(--color-border-soft); background: var(--color-surface-muted); }
.fs-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--color-text-subtle); margin-top: 6px; }
.fs-head::after { content: ""; flex: 1; height: 1px; background: var(--color-border-soft); }
.hr-dialog.modern .form-grid { gap: 14px 16px; }
.hr-dialog.modern .input:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-soft); }

/* Upload cards */
.upl { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 76px; border: 1.5px dashed var(--color-border-control); border-radius: 12px; background: var(--color-surface-muted); cursor: pointer; transition: border-color .12s, background .12s, box-shadow .12s; }
.upl:hover, .upl.is-drag { border-color: var(--color-accent); background: var(--color-accent-soft); }
.upl:focus-within { border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-soft); }
.upl.has-file, .upl.has-current { border-style: solid; background: #fff; }
.upl.has-file { border-color: var(--color-accent); }
.upl.invalid { border-color: var(--color-danger-solid); }
.upl-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.upl-visual { width: 52px; height: 52px; flex-shrink: 0; border-radius: 12px; background: #fff; border: 1px solid var(--color-border); display: flex; align-items: center; justify-content: center; color: var(--color-text-subtle); overflow: hidden; }
.upl-photo .upl-visual { border-radius: 50%; }
.upl.has-file .upl-visual { color: var(--color-accent); }
.upl-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.upl-img[hidden], .upl-ph[hidden], .upl-clear[hidden] { display: none; }
.upl-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.upl-text b { font-size: 13px; font-weight: 600; color: var(--color-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upl-text small { font-size: 11.5px; color: var(--color-text-subtle); }
.upl-clear { position: relative; z-index: 1; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--color-border-control); background: #fff; font-size: 16px; line-height: 1; cursor: pointer; color: var(--color-neutral-fg); flex-shrink: 0; }
.upl-clear:hover { background: #fdf3f3; border-color: #e8c9c9; color: #b04141; }

/* Nomination rows (modern) */
.nom-share-wrap { position: relative; }
.nom-share { width: 104px; padding-right: 26px; text-align: right; }
.nom-share-wrap > span { position: absolute; right: 10px; pointer-events: none; font-size: 12.5px; }
.nom-fill { border: 0; background: none; color: var(--color-accent-link); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 4px 2px; }
.nom-fill:hover { text-decoration: underline; }
.nom-foot .btn { border-style: dashed; color: var(--color-accent-link); }
@media (max-width: 560px) { .hr-overlay { padding: 10px; } .hr-dialog.modern .dlg-head, .hr-dialog.modern .dlg-body, .hr-dialog.modern .hr-dialog-actions { padding-left: 16px; padding-right: 16px; } .nom-item { grid-template-columns: 1fr auto; } .nom-item select { grid-column: 1 / -1; } }

/* Family quick-pick chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 9px; padding: 6px 14px 6px 7px; border: 1px solid var(--color-border-control); border-radius: 999px; background: #fff; font: inherit; font-size: 13px; font-weight: 550; cursor: pointer; color: var(--color-neutral-fg); transition: border-color .12s, background .12s, box-shadow .12s; }
.chip:first-child { padding: 8px 16px; }
.chip:hover:not(:disabled) { border-color: var(--color-accent); }
.chip.is-on { border-color: var(--color-accent); background: var(--color-accent-soft); color: var(--color-accent-deep); box-shadow: 0 0 0 3px var(--color-accent-soft); }
.chip:disabled { opacity: .5; cursor: not-allowed; }
.chip-av { width: 26px; height: 26px; border-radius: 50%; background: var(--color-accent-soft); color: var(--color-accent-deep); display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; }
.chip.is-on .chip-av { background: var(--color-accent); color: #fff; }
.chip-tx { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; text-align: left; }
.chip-tx small { font-size: 11px; font-weight: 400; color: var(--color-text-subtle); }

/* Nominee card: benefit tiles with a share ring */
.nm-label { display: flex; align-items: center; gap: 8px; }
.nm-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--color-border-soft); color: var(--color-neutral-fg); font-size: 11px; font-weight: 650; letter-spacing: 0; display: inline-flex; align-items: center; justify-content: center; }
.nm-bens { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.nm-ben { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--color-border-soft); border-radius: 12px; background: var(--color-surface-muted); }
.nm-ring { --p: 0; position: relative; width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; background: conic-gradient(var(--tc) calc(var(--p) * 1%), var(--color-border) 0); display: grid; place-items: center; }
.nm-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--color-surface-muted); }
.nm-ring b { position: relative; font-size: 11px; font-weight: 700; color: var(--color-text); letter-spacing: -0.02em; }
.nm-ben-name { font-size: 12.5px; font-weight: 600; color: var(--color-text-strong); line-height: 1.25; }
.nm-tname { display: inline-flex; align-items: center; gap: 6px; }
.nm-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }

/* Summary tile: round progress ring + details */
.nm-summary { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.nm-tile { display: flex; align-items: center; gap: 14px; padding: 12px 14px; --tc: var(--color-border); }
.nm-tile.is-full { --tc: var(--color-accent); }
.nm-tile.is-part { --tc: oklch(0.72 0.14 75); }
.nm-tile.is-over { --tc: var(--color-danger-solid); }
.nm-ring.lg { width: 62px; height: 62px; }
.nm-ring.lg::before { inset: 6px; }
.nm-ring.lg b { font-size: 12.5px; }
.nm-tile-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.nm-tile-body .nm-tname { font-size: 13px; font-weight: 600; color: var(--color-text-strong); }
.nm-tile-body .nm-tile-note { margin-top: 0; }
.nm-tile-body .nm-faces { margin-top: 4px; align-self: flex-start; }

/* Nominee card: plain nomination list (rings are kept for the summary strip only) */
.nm-bens { list-style: none; margin: 0; padding: 0; display: block; }
.nm-ben { display: flex; align-items: center; gap: 9px; padding: 8px 0; border: 0; border-radius: 0; background: none; }
.nm-ben + .nm-ben { border-top: 1px dashed var(--color-border); }
.nm-ben .nm-dot { width: 9px; height: 9px; }
.nm-ben-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 550; color: var(--color-text-strong); }
.nm-ben-share { font-size: 13.5px; font-weight: 700; color: var(--color-text); font-variant-numeric: tabular-nums; }
li.nm-none { padding: 6px 0; }

/* National ID row: number on the left, copy / download icons on the right */
.nm-info dd.nm-nid-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; }
.nm-nid-num { font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.nm-nid-actions { display: inline-flex; gap: 4px; flex-shrink: 0; }
.nm-info a.nm-ico, .nm-ico { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--color-border); border-radius: 7px; background: #fff; color: var(--color-neutral-fg); cursor: pointer; padding: 0; text-decoration: none; transition: border-color .12s, color .12s, background .12s; }
.nm-info a.nm-ico:hover, .nm-ico:hover { border-color: var(--color-accent); color: var(--color-accent-link); background: var(--color-accent-soft); text-decoration: none; }
.nm-ico.is-done { border-color: var(--color-accent); color: var(--color-accent); background: var(--color-accent-soft); }

/* Nominee section: view switch + type-wise view */
.nm-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 0; }
.nm-toolbar-note { font-size: 12px; color: var(--color-text-subtle); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface-muted); }
.seg button { border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--color-text-muted); padding: 6px 14px; border-radius: 7px; cursor: pointer; transition: background .12s, color .12s, box-shadow .12s; }
.seg button:hover { color: var(--color-text); }
.seg button.is-on { background: #fff; color: var(--color-accent-deep); box-shadow: 0 1px 3px rgba(20, 30, 28, .12); }
.nm-root[data-view="type"] .nm-summary, .nm-root[data-view="type"] .nm-grid { display: none; }
.nm-root[data-view="nominee"] .nm-types { display: none; }
.nm-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; padding: 16px 18px 18px; }
.nm-type { border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.nm-type-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nm-type-head .nm-tname { font-size: 14px; font-weight: 650; color: var(--color-text); }
.nm-type-total { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; color: var(--color-text); font-variant-numeric: tabular-nums; }
.nm-type-status { font-size: 12px; color: var(--color-text-subtle); }
.nm-type.is-full .nm-type-status { color: var(--color-accent-link); font-weight: 550; }
.nm-type.is-part .nm-type-status { color: var(--color-warning-fg); }
.nm-type.is-over .nm-type-status { color: var(--color-danger-fg); font-weight: 550; }
.nm-type-list { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--color-border-soft); }
.nm-type-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.nm-type-list li + li { border-top: 1px dashed var(--color-border); }
.nm-type-photo { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid var(--color-border); flex-shrink: 0; }
.nm-type-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.nm-type-who b { font-size: 13px; font-weight: 600; color: var(--color-text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm-type-who small { font-size: 11.5px; color: var(--color-text-subtle); }
.nm-type-list li.nm-type-left { justify-content: space-between; font-size: 12.5px; color: var(--color-warning-fg); background: var(--color-warning-bg); border-radius: 8px; padding: 7px 10px; margin-top: 6px; border-top: 0; }
.nm-type-empty { margin-top: 8px; padding: 14px 12px; border: 1px dashed var(--color-border-control); border-radius: 10px; font-size: 12.5px; color: var(--color-text-subtle); text-align: center; }
.nm-link { border: 0; background: none; font: inherit; font-weight: 600; color: var(--color-accent-link); cursor: pointer; padding: 0; }
.nm-link:hover { text-decoration: underline; }
.sys-id { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; color: var(--color-text-muted); background: var(--color-surface-muted); border: 1px solid var(--color-border-soft); border-radius: 6px; padding: 2px 6px; }

/* Pill choices (radio groups) and conditional fields */
[data-show-when][hidden] { display: none !important; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.pill span { display: inline-flex; align-items: center; padding: 8px 18px; border: 1px solid var(--color-border-control); border-radius: 999px; background: #fff; font-size: 13px; font-weight: 550; color: var(--color-neutral-fg); transition: border-color .12s, background .12s, color .12s, box-shadow .12s; }
.pill:hover span { border-color: var(--color-accent); }
.pill input:checked + span { border-color: var(--color-accent); background: var(--color-accent-soft); color: var(--color-accent-deep); box-shadow: 0 0 0 3px var(--color-accent-soft); }
.pill input:focus-visible + span { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.pills.invalid .pill span { border-color: var(--color-danger-solid); }
.pill.is-off { cursor: not-allowed; }
.pill.is-off input { cursor: not-allowed; }
.pill.is-off span { opacity: .45; background: var(--color-surface-muted); text-decoration: line-through; border-style: dashed; }
.pill.is-off:hover span { border-color: var(--color-border-control); }
.help a { color: var(--color-accent-link); font-weight: 600; }
.help.is-filled { color: var(--color-accent-link); font-weight: 600; }

/* Family Information: grouped cards */
.fm { display: flex; flex-direction: column; gap: 22px; padding: 18px; }
.fm-av { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: var(--gc); background: color-mix(in oklab, var(--gc) 14%, white); }
.fm-meta { font-size: 12px; color: var(--color-text-subtle); font-weight: 400; }
.fm-facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; padding-top: 12px; border-top: 1px solid var(--color-border-soft); }
.fm-facts dt { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-subtle); font-weight: 600; }
.fm-facts dd { margin: 3px 0 0; font-size: 12.5px; color: var(--color-neutral-fg); word-break: break-word; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fm-facts a:not(.nm-ico) { color: var(--color-accent-link); text-decoration: none; font-weight: 550; }
.fm-facts a:not(.nm-ico):hover { text-decoration: underline; }
.fm-wide { grid-column: 1 / -1; }
.fm-row { justify-content: space-between; }
.fm-none { margin: 0; padding-top: 12px; border-top: 1px solid var(--color-border-soft); font-size: 12.5px; color: var(--color-text-faint, #9aa3a0); font-style: italic; }
@media (max-width: 560px) { .fm { padding: 14px; } .fm-facts { grid-template-columns: 1fr; } }

/* Family tree */
.fv[data-view="tree"] .fv-cards, .fv[data-view="cards"] .fv-tree { display: none; }
.ft { display: flex; flex-direction: column; align-items: center; padding: 22px 18px 26px; gap: 0; }
.ft-level { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ft-label { font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-subtle); }
.ft-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 12px; }
.ft-link { width: 2px; height: 26px; background: var(--color-border-control); border-radius: 2px; margin: 4px 0; }
.ft-me-level .ft-row { align-items: center; gap: 14px; flex-wrap: nowrap; }
.ft-me { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 22px; min-width: 190px; border: 1.5px solid var(--color-accent); border-radius: 16px; background: var(--color-accent-soft); text-align: center; }
.ft-me-name { font-size: 15px; font-weight: 700; color: var(--color-text); }
.ft-me-sub { font-size: 11.5px; color: var(--color-accent-deep); font-weight: 600; }
.ft-heart { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--gc); background: color-mix(in oklab, var(--gc) 14%, white); flex-shrink: 0; }
.ft-spouse { display: flex; flex-direction: column; gap: 10px; }

.ft-node { position: relative; }
.ft-node > summary { list-style: none; font: inherit; color: inherit; text-align: center; background: var(--color-surface); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 148px; padding: 12px 10px; border: 1px solid var(--color-border); border-bottom: 3px solid var(--gc); border-radius: 14px; background: var(--color-surface); text-align: center; transition: box-shadow .15s, transform .15s; }

.ft-node > summary:hover { box-shadow: var(--shadow-card); transform: translateY(-1px); }
.ft-name { font-size: 13px; font-weight: 650; color: var(--color-text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft-meta { font-size: 11.5px; color: var(--color-text-subtle); }

.ft-add { width: 148px; min-height: 86px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1.5px dashed var(--color-border-control); border-radius: 14px; background: var(--color-surface-muted); font: inherit; font-size: 12.5px; font-weight: 600; color: var(--color-text-muted); cursor: pointer; transition: border-color .12s, color .12s, background .12s; }
.ft-add span { font-size: 20px; line-height: 1; color: var(--color-accent); }
.ft-add:hover { border-color: var(--color-accent); color: var(--color-accent-deep); background: var(--color-accent-soft); }
@media (max-width: 560px) { .ft-me-level .ft-row { flex-wrap: wrap; } .ft-node > summary, .ft-add { width: 132px; } }

/* Family cards: tinted header, avatar, quick actions, label / value list */

/* Family Information: three cards (Parents / Spouse / Children), like the nominee "by type" cards */
.fg { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; padding: 18px; align-items: start; }
.fg-card .nm-tname { margin: 0; font-size: 14px; font-weight: 650; }
.nm-type.fg-card.is-full .nm-type-status { color: var(--color-text-subtle); font-weight: 400; }
.fg-person { flex-direction: column; align-items: stretch !important; gap: 8px !important; }
.fg-main { display: flex; align-items: center; gap: 10px; }
.fg-main .nm-type-who { flex: 1; min-width: 0; }
.fg-main .nm-type-who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fg-av { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--gc); background: color-mix(in oklab, var(--gc) 14%, white); }
.fg-add { margin-top: 10px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border: 1.5px dashed var(--color-border-control); border-radius: 10px; background: var(--color-surface-muted); font: inherit; font-size: 12.5px; font-weight: 600; color: var(--color-text-muted); cursor: pointer; transition: border-color .12s, color .12s, background .12s; }
.fg-add span { font-size: 17px; line-height: 1; color: var(--color-accent); }
.fg-add:hover { border-color: var(--color-accent); color: var(--color-accent-deep); background: var(--color-accent-soft); }
@media (max-width: 560px) { .fg { padding: 14px; grid-template-columns: 1fr; } }
.fg-ico { width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--gc); background: color-mix(in oklab, var(--gc) 14%, white); }
.fg-card .nm-tname { gap: 10px; }
.fg-alert { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 12px 14px; border: 1px solid color-mix(in oklab, var(--color-warning-fg) 25%, white); border-radius: 12px; background: var(--color-warning-bg); color: var(--color-warning-fg); font-size: 12.5px; line-height: 1.45; }
.fg-alert-ico { flex-shrink: 0; margin-top: 1px; }
.fg-alert b { font-weight: 650; }
.fg-alert p { margin: 4px 0 0; }
.fg-alert a { color: inherit; font-weight: 650; text-decoration: underline; }

/* Family tree, horizontal: Parents -> the employee (and spouse) -> Children, left to right.
   Narrow screens fall back to the stacked layout. */
.card:has(.ft) { overflow: visible; }
.ft { flex-direction: row; align-items: center; justify-content: center; padding: 26px 18px 30px; }
.ft-level { width: auto; flex-shrink: 0; }
.ft-row { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
.ft-link { width: 48px; height: 2px; margin: 0 6px; flex-shrink: 0; }
.ft-me-level .ft-row { flex-direction: column; flex-wrap: nowrap; align-items: center; gap: 8px; }
.ft-spouse { align-items: stretch; }
.ft-node > summary, .ft-add { width: 176px; }


@media (max-width: 820px) {
  .ft { flex-direction: column; }
  .ft-level { width: 100%; }
  .ft-row { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  .ft-link { width: 2px; height: 26px; margin: 4px 0; }
  .ft-me-level .ft-row { flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 14px; }
  .ft-spouse { align-items: stretch; }
  .ft-node > summary, .ft-add { width: 148px; }
}
@media (max-width: 560px) { .ft-me-level .ft-row { flex-wrap: wrap; } .ft-node > summary, .ft-add { width: 132px; } }

.fg-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; border-radius: 10px; }
.fg-open:hover .nm-type-who b { text-decoration: underline; text-underline-offset: 2px; }
.fg-open:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.fg-main .fg-open .nm-type-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* Tree details panel: fixed to the screen and placed by script (right of the node, flipped left if needed, kept inside the
   viewport), so it can never be cut off by the card or the bottom of the page. */
.ft-node > summary::-webkit-details-marker { display: none; }
.ft-node[open] > summary { box-shadow: 0 0 0 3px color-mix(in oklab, var(--gc) 22%, white); }
.ft-panel { position: fixed; z-index: 60; top: 12px; left: 12px; width: 280px; max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); overflow-y: auto; padding: 14px; border: 1px solid var(--color-border); border-radius: 14px; background: #fff; box-shadow: 0 16px 40px rgba(20, 30, 28, .18); text-align: left; }
.ft-panel .fm-facts { padding-top: 0; border-top: 0; grid-template-columns: 1fr; }
.ft-panel .fm-none { border-top: 0; padding-top: 0; }
.ft-actions { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--color-border-soft); }
.ft-actions form { margin: 0; }
.ft-actions .danger:hover { background: #fdf3f3; border-color: #e8c9c9; color: #b04141; }

/* Card row: the person is a node with the same side panel as the tree */
.sp-node { flex: 1; min-width: 0; }
.sp-node > summary { list-style: none; }
.sp-node > summary::-webkit-details-marker { display: none; }
.sp-node[open] .fg-av { box-shadow: 0 0 0 3px color-mix(in oklab, var(--gc) 22%, white); }
.fg-photo, .fm-photo { object-fit: cover; background: #fff; display: block; }
.ft-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--color-border-soft); }
.fp-photo, .fp-av { width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; }
.fp-photo { object-fit: cover; border: 1px solid var(--color-border); display: block; }
.fp-av { display: inline-flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; color: var(--gc); background: color-mix(in oklab, var(--gc) 14%, white); }
.ft-id { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ft-id b { font-size: 14.5px; font-weight: 700; color: var(--color-text); overflow-wrap: anywhere; }
.ft-id small { font-size: 12px; color: var(--color-text-subtle); }

/* Nominations as a table */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.nom-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--color-border); border-radius: 12px; overflow: hidden; background: #fff; }
.nom-table th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--color-text-subtle); background: var(--color-surface-muted); padding: 9px 12px; border-bottom: 1px solid var(--color-border-soft); white-space: nowrap; }
.nom-table td { padding: 10px 12px; vertical-align: middle; border-top: 1px solid var(--color-border-soft); font-size: 13px; }
.nom-table tbody tr:first-child td { border-top: 0; }
.nom-table td:first-child { width: 36%; }
.nom-table select.input { width: 100%; min-width: 0; }
.nom-share-cell { display: flex; align-items: center; gap: 8px; }
.nom-others { color: var(--color-text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.nom-total { font-size: 12.5px; font-weight: 600; white-space: nowrap; color: var(--color-text-subtle); font-variant-numeric: tabular-nums; }
.nom-total.is-idle { font-weight: 400; }
.nom-total.is-part { color: var(--color-warning-fg); }
.nom-total.is-full { color: var(--color-accent-link); }
.nom-total.is-over { color: var(--color-danger-fg); }
.nom-act { width: 1%; text-align: right; }
@media (max-width: 640px) {
  .nom-table { display: block; border: 0; border-radius: 0; background: none; overflow: visible; }
  .nom-table thead { display: none; }
  .nom-table tbody { display: block; }
  .nom-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; padding: 12px; margin-bottom: 8px; border: 1px solid var(--color-border); border-radius: 12px; background: #fff; }
  .nom-table td { display: block; padding: 0; border: 0; width: auto; }
  .nom-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--color-text-subtle); }
  .nom-table td:first-child, .nom-act { grid-column: 1 / -1; width: auto; }
}
/* Dark text in the share box. ".hr-body input { color: inherit }" is more specific than a lone class, so this is written to beat it. */
.hr-body .nom-table input.nom-share { color: var(--color-text-strong); font-weight: 600; }
.hr-body .nom-table input.nom-share::placeholder { color: var(--color-text-faint, #9aa3a0); font-weight: 400; }
.hr-body .nom-table input.nom-share:disabled { color: var(--color-text-subtle); background: var(--color-surface-muted); }
.hr-body .nom-table select.input { color: var(--color-text-strong); }
.tl-doc { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 5px 11px; border: 1px solid var(--color-border-control); border-radius: 999px; background: #fff; font-size: 12px; font-weight: 600; color: var(--color-accent-link); text-decoration: none; }
.tl-doc:hover { border-color: var(--color-accent); background: var(--color-accent-soft); }

/* Official information: current position + contact / employment / service-history cards */
.of { display: flex; flex-direction: column; gap: 16px; padding: 18px; }
.of-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 28px; padding: 20px 22px 16px; border: 1px solid var(--color-border); border-radius: 16px; background: linear-gradient(135deg, var(--color-accent-soft), var(--color-surface) 62%); }
.of-kicker { font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--color-accent-deep); }
.of-title { margin: 4px 0 6px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--color-text); }
.of-office { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--color-text-strong); font-weight: 550; }
.of-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.of-chip { display: inline-flex; align-items: center; padding: 3px 11px; border: 1px solid var(--color-border-control); border-radius: 999px; background: #fff; font-size: 12px; font-weight: 600; color: var(--color-neutral-fg); }
.of-hero-side { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(110px, auto)); gap: 18px; align-self: center; }
.of-hero-side dt { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--color-text-subtle); }
.of-hero-side dd { margin: 4px 0 0; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: var(--color-text); }
.of-hero-side dd.of-manager { font-size: 14px; font-weight: 600; }
.of-hero-side small { display: block; margin-top: 2px; font-size: 12px; color: var(--color-text-subtle); }
.of-source { grid-column: 1 / -1; padding-top: 12px; border-top: 1px solid var(--color-border-soft); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--color-text-muted); }
.of-source a, .of-more { color: var(--color-accent-link); font-weight: 600; text-decoration: none; }
.of-source a:hover, .of-more:hover { text-decoration: underline; }
.of-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; align-items: start; }
.of-card { border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface); padding: 16px 18px; }
.of-card h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 13px; font-weight: 650; letter-spacing: .02em; color: var(--color-text-strong); }
.of-list { list-style: none; margin: 0; padding: 0; }
.of-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; font-size: 13px; border-top: 1px solid var(--color-border-soft); }
.of-list li:first-child { border-top: 0; }
.of-list span { color: var(--color-text-subtle); flex-shrink: 0; }
.of-list b { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--color-text-strong); text-align: right; word-break: break-word; }
.of-list a { color: var(--color-accent-link); text-decoration: none; font-weight: 600; }
.of-list a:hover { text-decoration: underline; }
.of-none { color: var(--color-text-faint, #9aa3a0); font-weight: 400; }
.of-none-text { margin: 8px 0 0; font-size: 13px; color: var(--color-text-subtle); }
.of-roles-list { list-style: none; margin: 4px 0 8px; padding: 0 0 0 14px; border-left: 2px solid var(--color-border); }
.of-roles-list li { position: relative; padding: 8px 0 8px 12px; display: flex; flex-direction: column; gap: 1px; }
.of-roles-list li::before { content: ""; position: absolute; left: -20px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--color-border-control); }
.of-roles-list li.is-now::before { background: var(--color-accent); border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-soft); }
.of-roles-list b { font-size: 13px; font-weight: 650; color: var(--color-text); }
.of-roles-list span { font-size: 12.5px; color: var(--color-text-muted); }
.of-roles-list small { font-size: 11.5px; color: var(--color-text-subtle); }
.of-more { font-size: 12.5px; }
.of-editnote { margin: 14px 18px 0; padding: 10px 14px; border: 1px solid var(--color-border-soft); border-radius: 10px; background: var(--color-surface-muted); font-size: 12.5px; color: var(--color-text-muted); }
.of-editnote a { color: var(--color-accent-link); font-weight: 600; }
@media (max-width: 820px) { .of-hero { grid-template-columns: 1fr; } .of-hero-side { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .of { padding: 14px; } .of-hero-side { grid-template-columns: 1fr 1fr; } .of-title { font-size: 19px; } }

/* Masked numbers (National ID) */
.mk { display: inline-flex; align-items: center; gap: 6px; }
.mk-val { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.mk.is-open .mk-val { letter-spacing: 0; }
.mk [data-mask-eye] { color: var(--color-text-subtle); }
.mk.is-open [data-mask-eye] { color: var(--color-accent); border-color: var(--color-accent); background: var(--color-accent-soft); }
.of-salute { color: var(--color-accent-deep); font-weight: 600; }

/* Personal information summary */
.pf-hero-main { display: flex; align-items: center; gap: 16px; }
.pf-hero-main .hr-avatar { flex-shrink: 0; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--color-border); }
.pf-prog { display: block; }
.pf-prog-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin-bottom: 8px; font-size: 12px; color: var(--color-text-muted); }
.pf-prog-top b { font-size: 12.5px; color: var(--color-text-strong); }
.pf-prog-top a { color: var(--color-accent-link); font-weight: 600; text-decoration: none; }
.pf-prog-top a:hover { text-decoration: underline; }
.pf-bar { height: 7px; border-radius: 999px; background: var(--color-border-soft); overflow: hidden; }
.pf-bar i { display: block; height: 100%; border-radius: inherit; background: var(--color-accent); transition: width .4s ease; }
.pf-bar.is-full i { background: var(--color-success-fg, var(--color-accent)); }
.pf-fam { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; }
.pf-fam li { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-top: 1px solid var(--color-border-soft); }
.pf-fam li:first-child { border-top: 0; }
.pf-av { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; background: var(--color-accent-soft); color: var(--color-accent-deep); font-size: 12px; font-weight: 650; }
.pf-fam li.is-empty .pf-av { background: var(--color-surface-muted); color: var(--color-text-faint, #9aa3a0); border: 1px dashed var(--color-border-control); }
.pf-fam-tx { display: flex; flex-direction: column; min-width: 0; }
.pf-fam-tx b { font-size: 13px; font-weight: 600; color: var(--color-text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-fam li.is-empty .pf-fam-tx b { font-weight: 400; color: var(--color-text-faint, #9aa3a0); }
.pf-fam-tx small { font-size: 11.5px; color: var(--color-text-subtle); }
.pf-addr { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px 28px; margin-top: 8px; }
.pf-addr-label { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--color-text-subtle); }
.pf-addr-val { display: flex; align-items: flex-start; gap: 8px; margin-top: 4px; font-size: 13.5px; font-weight: 550; color: var(--color-text-strong); word-break: break-word; }
.pf-addr-val .nm-ico { flex-shrink: 0; }
@media (max-width: 560px) { .pf-hero-main { align-items: flex-start; } }

/* Personal information summary, round 2 */
.pf-two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); align-items: stretch; }
.pf-hero-main .of-title { font-size: 27px; line-height: 1.15; margin: 4px 0 8px; }
.of-salute { font-size: .62em; font-weight: 500; letter-spacing: .01em; color: var(--color-text-muted); margin-right: 2px; }
.pf-addr-li { flex-direction: column; align-items: flex-start !important; gap: 3px !important; }
.pf-addr-li b { text-align: left; align-items: flex-start; }
.pf-addr-li b > span:first-child { font-weight: 600; }
/* plain values keep the right edge of the masked ones: the eye / copy buttons hang to the right of it */
.pf-pad2 { padding-right: 76px; }
.pf-pad1 { padding-right: 40px; }
.pf-fam.is-row { flex-direction: row; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.pf-fam.is-row li { flex: 1 1 220px; max-width: 320px; padding: 12px 14px; border: 1px solid var(--color-border-soft); border-radius: 12px; background: var(--color-surface); }
.pf-fam.is-row li:first-child { border-top: 1px solid var(--color-border-soft); }
.pf-fam.is-row li.is-empty { border-style: dashed; background: transparent; }
.pf-fam.is-row .pf-av { width: 44px; height: 44px; font-size: 14px; }
.pf-note { margin-left: 8px; padding: 2px 9px; border-radius: 999px; background: var(--color-surface-muted); border: 1px solid var(--color-border-soft); font-size: 11px; font-weight: 600; letter-spacing: 0; color: var(--color-text-muted); }
.pf-photo { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; }
.pf-photo-btn { font-size: 11.5px; font-weight: 600; color: var(--color-accent-link); cursor: pointer; white-space: nowrap; }
.pf-photo-btn:hover { text-decoration: underline; }
.pf-photo-rm { border: 0; background: none; padding: 0; font-size: 11.5px; color: #98a09e; cursor: pointer; }
.pf-photo-rm:hover { color: var(--color-danger-fg); }
.pf-photo-btn, .pf-photo-rm { display: inline-flex; align-items: center; gap: 5px; font-family: inherit; }
.pf-photo-btn svg, .pf-photo-rm svg { flex-shrink: 0; }

/* Round photo with icon-only controls: camera bottom right, bin bottom left */
.pf-photo { position: relative; gap: 0; }
.pf-photo-form { position: absolute; right: -4px; bottom: -2px; margin: 0; }
.pf-photo-form.is-left { right: auto; left: -4px; }
.pf-photo-btn, .pf-photo-rm { width: 26px; height: 26px; padding: 0; justify-content: center; border-radius: 50%; border: 2px solid #fff; background: var(--color-accent); color: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: pointer; transition: transform .12s, background .12s; }
.pf-photo-btn:hover { background: var(--color-accent-deep); transform: scale(1.08); text-decoration: none; }
.pf-photo-rm { background: #fff; color: var(--color-text-muted); border-color: var(--color-border-control); }
.pf-photo-rm:hover { color: #fff; background: var(--color-danger-fg, #c0392b); border-color: #fff; transform: scale(1.08); }

/* Profile header */
.ph { padding: 0; overflow: hidden; }
.ph-body { display: flex; align-items: center; gap: 18px; padding: 0 22px; flex-wrap: wrap; }
.ph-photo { width: 88px; height: 106px; flex-shrink: 0; border-radius: 14px; object-fit: cover; border: 4px solid var(--color-surface); box-shadow: 0 0 0 1px var(--color-border), 0 4px 14px rgba(0,0,0,.08); background: var(--color-surface); }
.ph-initials { display: inline-flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 650; color: var(--color-accent-deep); background: var(--color-accent-soft); }
.ph-id { flex: 1; min-width: 220px; padding-bottom: 6px; }
.ph-name { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.ph-name h2 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; color: var(--color-text); }
.ph-role { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 4px; font-size: 14px; color: var(--color-text-muted); }
.ph-role b { font-weight: 600; color: var(--color-text-strong); }
.ph-role i { width: 4px; height: 4px; border-radius: 50%; background: var(--color-border-control); }
.ph-actions { padding-bottom: 8px; flex-shrink: 0; }
.ph-facts { list-style: none; margin: 16px 22px 0; padding: 14px 0 0; border-top: 1px solid var(--color-border-soft); display: flex; flex-wrap: wrap; gap: 10px 26px; }
.ph-facts li { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--color-text-strong); min-width: 0; }
.ph-facts li > svg { color: var(--color-text-subtle); flex-shrink: 0; }
.ph-facts li > span { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--color-text-subtle); }
.ph-facts b { font-weight: 600; }
.ph-facts a { color: var(--color-accent-link); font-weight: 600; text-decoration: none; word-break: break-all; }
.ph-facts a:hover { text-decoration: underline; }
.ph-facts em { font-style: normal; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--color-accent-soft); color: var(--color-accent-deep); }
.ph-tabs { margin: 12px 0 0; padding: 0 14px; border-top: 1px solid var(--color-border-soft); gap: 4px; }
.ph-tabs a { position: relative; padding: 12px 12px 11px; border-radius: 0; font-size: 13px; }
.ph-tabs a:hover { background: transparent; color: var(--color-text-strong) !important; }
.ph-tabs a.is-active { background: transparent; color: var(--color-accent-deep) !important; }
.ph-tabs a.is-active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--color-accent); }
@media (max-width: 560px) { .ph-body { padding: 18px 16px 0; } .ph-photo { width: 72px; height: 88px; } .ph-name h2 { font-size: 20px; } .ph-facts { margin: 14px 16px 0; } }

/* Profile header without a banner: the photo sits at the top left */
.ph-body { margin-top: 0; padding-top: 22px; align-items: center; }
.ph-photo { border-width: 3px; }
.ph-actions { padding-bottom: 0; }
.ph-actions .btn { display: inline-flex; align-items: center; gap: 7px; }
.ph-about { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.ph-about span { padding: 2px 11px; border: 1px solid var(--color-border-control); border-radius: 999px; background: #fff; font-size: 12px; font-weight: 600; color: var(--color-neutral-fg); }
.ph-photo { border-width: 2px; }
.ph-initials { border-radius: 14px; }
.ph { background: linear-gradient(135deg, var(--color-accent-soft), var(--color-surface) 62%); }
.ph-facts, .ph-tabs { border-top-color: color-mix(in srgb, var(--color-accent) 14%, var(--color-border-soft)); }
.ph-bday { margin-left: auto; align-self: flex-start; text-align: right; flex-shrink: 0; }
.ph-bday span { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--color-text-subtle); }
.ph-bday span svg { color: var(--color-accent); }
.ph-bday b { display: block; margin-top: 3px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--color-text); }
.ph-bday small { display: block; margin-top: 1px; font-size: 12px; font-weight: 600; color: var(--color-accent-deep); }
@media (max-width: 560px) { .ph-bday { margin-left: 0; text-align: left; } }
.ph-side { margin-left: auto; align-self: flex-start; display: flex; gap: 14px 28px; flex-wrap: wrap; justify-content: flex-end; }
.ph-side .ph-bday { margin-left: 0; }
.ph-alert { padding: 8px 14px; border: 1px solid color-mix(in srgb, var(--color-warning-fg) 28%, #fff); border-radius: 12px; background: var(--color-warning-bg); }
.ph-alert span, .ph-alert span svg, .ph-alert small { color: var(--color-warning-fg); }
.ph-alert.is-danger { border-color: color-mix(in srgb, var(--color-danger-fg) 30%, #fff); background: color-mix(in srgb, var(--color-danger-fg) 9%, #fff); }
.ph-alert.is-danger span, .ph-alert.is-danger span svg, .ph-alert.is-danger small, .ph-alert.is-danger b { color: var(--color-danger-fg); }
@media (max-width: 560px) { .ph-side { margin-left: 0; justify-content: flex-start; } }
.ph-also { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 6px; font-size: 13px; color: var(--color-text-muted); }
.ph-also em { font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--color-text-subtle); }
.ph-also span { padding: 2px 10px; border: 1px solid var(--color-border-control); border-radius: 999px; background: #fff; }
.ph-also span b { font-weight: 600; color: var(--color-text-strong); }
/* Tooltip beside a label: hover or focus the (?) icon */
.tip { position: relative; display: inline-flex; vertical-align: middle; margin-left: 5px; color: var(--color-text-subtle); cursor: help; outline: none; }
.tip svg { display: block; }
.tip:hover, .tip:focus-visible { color: var(--color-accent); }
.tip::after { content: attr(data-tip); position: absolute; left: -8px; bottom: calc(100% + 8px); width: 270px; max-width: 70vw; padding: 9px 12px; border-radius: 9px; background: #1d2b27; color: #fff; font-size: 12px; font-weight: 450; line-height: 1.45; letter-spacing: 0; text-transform: none; white-space: normal; box-shadow: 0 6px 20px rgba(0,0,0,.22); opacity: 0; transform: translateY(3px); pointer-events: none; transition: opacity .14s, transform .14s; z-index: 30; }
.tip::before { content: ""; position: absolute; left: 4px; bottom: calc(100% + 3px); border: 5px solid transparent; border-top-color: #1d2b27; border-bottom: 0; opacity: 0; transition: opacity .14s; z-index: 30; }
.tip:hover::after, .tip:focus-visible::after, .tip:hover::before, .tip:focus-visible::before { opacity: 1; transform: none; }

/* Department page */
.dp-link { color: var(--color-accent-link); font-weight: 600; text-decoration: none; }
.dp-link:hover { text-decoration: underline; }
.dp-head { display: flex; align-items: center; justify-content: space-between; gap: 18px 32px; flex-wrap: wrap; padding: 20px 24px; background: linear-gradient(135deg, var(--color-accent-soft), var(--color-surface) 62%); }
.dp-head-main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.dp-badge { width: 60px; height: 60px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 16px; background: var(--color-accent); color: #fff; font-size: 15px; font-weight: 700; letter-spacing: .02em; text-align: center; padding: 0 4px; overflow: hidden; }
.dp-title h2 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; color: var(--color-text); }
.dp-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 7px; font-size: 13px; color: var(--color-text-muted); }
.dp-meta b { color: var(--color-text-strong); }
.dp-stats { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(90px, auto)); gap: 18px 28px; }
.dp-stats dt { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--color-text-subtle); }
.dp-stats dd { margin: 4px 0 0; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: var(--color-text); }
.dp-stats small { display: block; margin-top: 1px; font-size: 12px; color: var(--color-text-subtle); }
.dp-lead { display: flex; align-items: center; gap: 16px 20px; flex-wrap: wrap; padding: 18px 22px; }
.dp-lead .hr-avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.dp-lead-id { flex: 1; min-width: 220px; }
.dp-kicker { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--color-accent-deep); }
.dp-auto { padding: 1px 8px; border-radius: 999px; background: var(--color-surface-muted); border: 1px solid var(--color-border-soft); font-size: 10.5px; font-weight: 600; letter-spacing: .02em; text-transform: none; color: var(--color-text-muted); cursor: help; }
.dp-lead-name { display: inline-block; margin-top: 3px; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: var(--color-text); text-decoration: none; }
a.dp-lead-name:hover { color: var(--color-accent-deep); }
.dp-lead-name.is-none { color: var(--color-text-faint, #9aa3a0); font-weight: 600; }
.dp-lead-title { margin-top: 2px; font-size: 13.5px; color: var(--color-text-muted); }
.dp-lead-title span { color: var(--color-text-subtle); }
.dp-lead-title a { color: var(--color-accent-link); font-weight: 600; }
.dp-lead-contact { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.dp-lead-contact li { display: flex; align-items: center; gap: 8px; color: var(--color-text-subtle); }
.dp-lead-contact a { color: var(--color-accent-link); font-weight: 600; text-decoration: none; }
.dp-none { width: 64px; height: 64px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px dashed var(--color-border-control); color: var(--color-text-faint, #9aa3a0); }
.dp-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; border-bottom: 1px solid var(--color-border-soft); }
.dp-bar h3 { margin: 0; }
.dp-bar .note { font-size: 12.5px; }
.dp-person { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.dp-person b { font-weight: 600; color: var(--color-text-strong); }
.dp-person:hover b { color: var(--color-accent-deep); }
.dp-person small { display: block; font-size: 11.5px; color: var(--color-text-subtle); }
.dp-tag { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--color-accent-soft); font-style: normal; font-size: 11px; font-weight: 600; color: var(--color-accent-deep); }
.dp-also { margin-top: 2px; font-size: 11.5px; color: var(--color-text-subtle); }
[data-dp-row][hidden] { display: none; }

/* Organogram: boxes joined by lines. A level that is only a long row of people with nobody under them becomes a grid. */
.org-wrap { overflow-x: auto; padding: 24px 20px 28px; }
.org, .org ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; }
.org { min-width: max-content; margin: 0 auto; }
.org ul { position: relative; padding-top: 22px; }
.org ul::before { content: ""; position: absolute; top: 0; left: 50%; height: 22px; border-left: 1px solid var(--color-border-control); }
.org li { position: relative; display: flex; flex-direction: column; align-items: center; padding: 22px 8px 0; }
.org > li { padding-top: 0; }
.org li::before, .org li::after { content: ""; position: absolute; top: 0; right: 50%; width: 50%; height: 22px; border-top: 1px solid var(--color-border-control); }
.org li::after { right: auto; left: 50%; border-left: 1px solid var(--color-border-control); }
.org > li::before, .org > li::after { display: none; }
.org li:only-child::before, .org li:only-child::after { display: none; }
.org li:first-child::before, .org li:last-child::after { border: 0; }
.org li:last-child::before { border-right: 1px solid var(--color-border-control); border-radius: 0 6px 0 0; }
.org li:first-child::after { border-radius: 6px 0 0 0; }
.org li:only-child { padding-top: 22px; }
.org > li:only-child { padding-top: 0; }
.org-node { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 156px; padding: 11px 10px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); text-align: center; text-decoration: none; transition: border-color .12s, box-shadow .12s; }
.org-node:hover { border-color: var(--color-accent); box-shadow: var(--shadow-card); }
.org-node .hr-avatar { border-radius: 50%; object-fit: cover; margin-bottom: 4px; }
.org-node b { max-width: 100%; font-size: 12.5px; font-weight: 650; color: var(--color-text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-node small { max-width: 100%; font-size: 11px; color: var(--color-text-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-node.is-head { width: 188px; border-color: var(--color-accent); background: linear-gradient(135deg, var(--color-accent-soft), var(--color-surface)); }
.org-node.is-head b { font-size: 13.5px; }
.org-grid { position: relative; margin-top: 22px; padding-top: 14px; display: grid; grid-template-columns: repeat(auto-fill, 138px); justify-content: center; gap: 10px; max-width: 760px; }
.org-grid::before { content: ""; position: absolute; top: -22px; left: 50%; height: 36px; border-left: 1px solid var(--color-border-control); }
.org-node.is-small { width: 138px; padding: 9px 8px; }
@media (max-width: 820px) { .dp-stats { grid-template-columns: repeat(2, 1fr); } }
.org-grid.is-flat { margin: 0 auto; padding-top: 0; }
.org-grid.is-flat::before { display: none; }
.org-grid.is-flat { margin-top: 0; }
.dp-reports { min-width: 190px; }
.dp-reports form { margin: 0; }
.dp-reports select { width: 100%; max-width: 230px; }
.dp-src { display: block; margin-top: 3px; font-size: 11px; color: var(--color-text-subtle); }
.dp-top { font-size: 12px; font-weight: 600; color: var(--color-accent-deep); }
/* Team order: a grip to drag, and arrows */
.dp-grip-th { width: 64px; }
.dp-grip-td { white-space: nowrap; width: 64px; }
.dp-grip { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 28px; border-radius: 7px; color: var(--color-text-faint, #9aa3a0); cursor: grab; vertical-align: middle; }
.dp-grip:hover, .dp-grip:focus-visible { background: var(--color-surface-muted); color: var(--color-text-strong); outline: none; }
.dp-grip:active { cursor: grabbing; }
.dp-moves { display: inline-flex; flex-direction: column; margin-left: 2px; vertical-align: middle; }
.dp-moves button { width: 20px; height: 14px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 4px; background: none; color: var(--color-text-faint, #9aa3a0); cursor: pointer; }
.dp-moves button:hover, .dp-moves button:focus-visible { background: var(--color-accent-soft); color: var(--color-accent-deep); outline: none; }
.is-dragging { opacity: .45; background: var(--color-accent-soft); }
.dp-reset { margin: 0; }
.dp-contact { white-space: nowrap; }
.dp-contact a { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.dp-contact a + a { margin-top: 3px; }
.dp-contact a svg { color: var(--color-text-subtle); flex-shrink: 0; }
.dp-initial { padding: 0 6px; border-radius: 5px; background: var(--color-accent-soft); font-weight: 650; color: var(--color-accent-deep); }
/* Faculty initial on the employee form: the input with a tick, and Generate / Check */
.ini-row { display: flex; align-items: center; gap: 8px; }
.ini-input { position: relative; flex: 1; min-width: 0; }
.ini-input .input { padding-right: 40px; }
.ini-input .input.is-ok { border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-soft); }
.ini-input .input.is-bad { border-color: var(--color-danger-fg); }
.ini-state { position: absolute; right: 11px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; pointer-events: none; }
.ini-state.is-ok { background: var(--color-accent); color: #fff; }
.ini-state.is-bad { background: var(--color-danger-fg); color: #fff; }
.ini-state svg { width: 13px; height: 13px; }
.field .help.is-ok { color: var(--color-accent-deep); }
.field .help.is-bad { color: var(--color-danger-fg); font-weight: 600; }
