/* ════════════════════════════════════════════════════════════════
   HR OS — workspace tuyển dụng. MagnoliaX Design System v2 ("Monday").
   Tự chứa token + component; mọi selector scope dưới #workspace-hr-os
   để không đụng CSS global các workspace khác.
   ════════════════════════════════════════════════════════════════ */
#workspace-hr-os{
  --app-bg:#F6F7FB; --surface:#FFFFFF; --surface-2:#F5F6F8; --surface-3:#EBECF0;
  --text:#323338; --text-muted:#676879; --text-soft:#9699A6;
  --primary:#0073EA; --primary-hover:#0060B9; --primary-soft:#CCE5FF; --focus-ring:rgba(0,115,234,.30);
  --done:#00C875; --done-bg:#E5F9F0; --working:#FDAB3D; --working-bg:#FFF4E5;
  --stuck:#E2445C; --stuck-bg:#FCE8EB; --info:#579BFC; --info-bg:#E9F2FF;
  --purple:#A25DDC; --purple-bg:#F3EAFB; --dark:#333333; --dark-bg:#EDEDEF;
  --border:#E6E9EF; --border-2:#D0D4E4;
  --radius-sm:4px; --radius:8px; --radius-pill:99px;
  --shadow-sm:0 1px 2px rgba(0,0,0,.04); --shadow-md:0 4px 12px rgba(0,0,0,.08); --shadow-lg:0 8px 24px rgba(0,0,0,.12);
  --font:'Public Sans','Be Vietnam Pro','Figtree',system-ui,-apple-system,sans-serif;
  --t-fast:.14s;
  background:var(--app-bg); color:var(--text); font-family:var(--font); font-size:14px; padding:0;
}
#workspace-hr-os *{box-sizing:border-box;}
#workspace-hr-os .num{font-variant-numeric:tabular-nums;}

/* ── tab source ẩn: app-tabrail mirror ra rail ĐEN bên trái (như Kho vận) ── */
#workspace-hr-os .hr-tabsrc{position:absolute;width:0;height:0;overflow:hidden;padding:0;margin:0;border:none;}
#workspace-hr-os .hr-topbar{display:flex;align-items:center;gap:10px;padding:13px 24px;background:var(--surface);border-bottom:1px solid var(--border);}
#workspace-hr-os .hr-title{margin:0;font-size:18px;font-weight:700;display:flex;align-items:center;gap:9px;}
#workspace-hr-os .hr-title .ic{color:var(--primary);}

/* ── icon ── */
#workspace-hr-os .ic{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0;vertical-align:middle;}
#workspace-hr-os .ic.s14{width:14px;height:14px;} #workspace-hr-os .ic.s18{width:18px;height:18px;} #workspace-hr-os .ic.s20{width:20px;height:20px;}

/* ── layout shell ── */
#workspace-hr-os .hr-wrap{padding:18px 24px 48px;max-width:none;margin:0;}

/* (tab hiển thị ở rail đen bên trái qua app-tabrail — không cần rail trong-nội-dung) */

/* ── toolbar (Monday filter row) ── */
#workspace-hr-os .hr-toolbar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:12px;}
#workspace-hr-os .hr-toolbar .spacer{flex:1;}
#workspace-hr-os .tbtn{height:32px;border:1px solid transparent;border-radius:var(--radius-sm);background:transparent;color:var(--text-muted);font-family:var(--font);font-weight:600;font-size:12.5px;display:inline-flex;align-items:center;gap:6px;padding:0 10px;cursor:pointer;}
#workspace-hr-os .tbtn:hover{background:var(--surface-2);color:var(--text);}
#workspace-hr-os .tbtn.on{background:var(--primary-soft);color:var(--primary);}
#workspace-hr-os .tsearch{height:32px;border:1px solid var(--border-2);border-radius:var(--radius-pill);background:var(--surface);padding:0 6px 0 12px;display:inline-flex;align-items:center;gap:7px;min-width:220px;color:var(--text-soft);}
#workspace-hr-os .tsearch input{border:none;outline:none;background:none;font-family:var(--font);font-size:12.5px;color:var(--text);width:100%;}
#workspace-hr-os .badge-count{background:var(--primary);color:#fff;border-radius:99px;min-width:18px;height:18px;padding:0 5px;font-size:11px;font-weight:700;display:inline-grid;place-items:center;}
#workspace-hr-os .btn{font-family:var(--font);font-weight:600;border-radius:var(--radius);border:1px solid transparent;cursor:pointer;display:inline-flex;align-items:center;gap:6px;transition:var(--t-fast);height:32px;padding:0 14px;font-size:13px;}
#workspace-hr-os .btn:focus-visible{outline:none;box-shadow:0 0 0 3px var(--focus-ring);}
#workspace-hr-os .btn-primary{background:var(--primary);color:#fff;} #workspace-hr-os .btn-primary:hover{background:var(--primary-hover);}
#workspace-hr-os .btn-secondary{background:var(--surface);color:var(--text);border-color:var(--border-2);} #workspace-hr-os .btn-secondary:hover{background:var(--surface-2);}
#workspace-hr-os .btn-ghost{background:transparent;color:var(--text-muted);} #workspace-hr-os .btn-ghost:hover{background:var(--surface-2);}
#workspace-hr-os .btn-danger{background:var(--stuck);color:#fff;} #workspace-hr-os .btn-danger:hover{filter:brightness(.94);}
#workspace-hr-os .btn.sm{height:28px;padding:0 10px;font-size:12.5px;}

/* ── KPI mini row ── */
#workspace-hr-os .hr-kpis{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:14px;}
#workspace-hr-os .hr-kpi{background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow-sm);padding:12px 16px 12px 18px;position:relative;overflow:hidden;min-width:132px;}
#workspace-hr-os .hr-kpi::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--accent,var(--primary));}
#workspace-hr-os .hr-kpi .k-l{font-size:11px;font-weight:600;color:var(--text-muted);text-transform:uppercase;letter-spacing:.03em;}
#workspace-hr-os .hr-kpi .k-v{font-size:24px;font-weight:800;margin-top:3px;font-variant-numeric:tabular-nums;}

/* ── chip filter row ── */
#workspace-hr-os .hr-chips{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px;}
#workspace-hr-os .fchip{height:26px;padding:0 6px 0 10px;border-radius:var(--radius-pill);font-size:12px;font-weight:600;display:inline-flex;align-items:center;gap:6px;background:var(--surface);border:1px solid var(--border-2);color:var(--text);}
#workspace-hr-os .fchip b{color:var(--text-muted);font-weight:600;}
#workspace-hr-os .fchip .x{cursor:pointer;display:grid;place-items:center;width:16px;height:16px;border-radius:99px;color:var(--text-soft);}
#workspace-hr-os .fchip .x:hover{background:var(--surface-3);color:var(--text);}

/* ── board table ── */
#workspace-hr-os .hr-board-wrap{background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow-sm);overflow:auto;}
#workspace-hr-os table.hr-board{width:100%;border-collapse:collapse;min-width:1180px;}
#workspace-hr-os .hr-board th{position:sticky;top:0;background:var(--surface);text-align:left;font-size:11px;font-weight:700;color:var(--text-muted);padding:9px 12px;border-bottom:1px solid var(--border);text-transform:uppercase;letter-spacing:.02em;z-index:6;white-space:nowrap;}
#workspace-hr-os .hr-board th .ic{width:13px;height:13px;margin-right:5px;opacity:.7;}
#workspace-hr-os .hr-board td{padding:0 12px;height:44px;border-bottom:1px solid var(--border);font-size:13px;vertical-align:middle;}
#workspace-hr-os .hr-board tbody tr.hr-row:hover{background:var(--surface-2);}
#workspace-hr-os .hr-board .c-name{font-weight:600;color:var(--text);cursor:pointer;white-space:nowrap;}
#workspace-hr-os .hr-board .c-name:hover{color:var(--primary);text-decoration:underline;}
#workspace-hr-os .hr-board .muted{color:var(--text-soft);}
#workspace-hr-os .hr-board td.center{text-align:center;}
#workspace-hr-os .hr-board td.num{text-align:right;font-variant-numeric:tabular-nums;}

/* group header */
#workspace-hr-os .hr-board tr.grp td{padding:0;}
#workspace-hr-os .hr-board tr.grp .gbar{display:flex;align-items:center;gap:9px;height:40px;padding:0 12px;font-weight:700;background:var(--primary-soft);color:#0a4fa0;box-shadow:inset 3px 0 0 var(--primary);}
#workspace-hr-os .hr-board tr.grp .gcount{font-weight:500;opacity:.85;}
#workspace-hr-os .hr-board tr.grp .gtog{display:grid;place-items:center;width:18px;height:18px;border-radius:var(--radius-sm);cursor:pointer;transition:transform var(--t-fast);}
#workspace-hr-os .hr-board tr.grp.collapsed .gtog{transform:rotate(-90deg);}
#workspace-hr-os .hr-board tr.grp .gadd{margin-left:auto;font-size:12px;font-weight:600;color:#0a4fa0;opacity:.8;cursor:pointer;display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border-radius:var(--radius-sm);}
#workspace-hr-os .hr-board tr.grp .gadd:hover{background:rgba(255,255,255,.55);opacity:1;}
/* group accent color variants (per position, cycled) */
#workspace-hr-os .hr-board tr.grp.c1 .gbar{background:var(--info-bg);color:#1c5fb8;box-shadow:inset 3px 0 0 var(--info);}
#workspace-hr-os .hr-board tr.grp.c2 .gbar{background:var(--purple-bg);color:#7b3fb0;box-shadow:inset 3px 0 0 var(--purple);}
#workspace-hr-os .hr-board tr.grp.c3 .gbar{background:var(--working-bg);color:#9a5a00;box-shadow:inset 3px 0 0 var(--working);}
#workspace-hr-os .hr-board tr.grp.c4 .gbar{background:var(--done-bg);color:#018f55;box-shadow:inset 3px 0 0 var(--done);}

/* status colored cell */
#workspace-hr-os .hr-board td.c-status{padding:0;}
#workspace-hr-os .hr-status{height:44px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:12px;cursor:pointer;position:relative;user-select:none;}
#workspace-hr-os .hr-status.st-moi{background:var(--working);color:#0a0a0a;}
#workspace-hr-os .hr-status.st-pv{background:var(--done);}
#workspace-hr-os .hr-status.st-tuyen{background:var(--info);}
#workspace-hr-os .hr-status.st-offer{background:var(--purple);}
#workspace-hr-os .hr-status.st-loai{background:var(--stuck);}
#workspace-hr-os .hr-status.st-none{background:var(--surface-3);color:var(--text-soft);}

/* soft pills (Hình thức, etc.) */
#workspace-hr-os .pill{display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 10px;border-radius:var(--radius-pill);font-size:12px;font-weight:600;white-space:nowrap;}
#workspace-hr-os .ps--info{background:var(--info-bg);color:#1c5fb8;} #workspace-hr-os .ps--purple{background:var(--purple-bg);color:#7b3fb0;}
#workspace-hr-os .ps--dark{background:var(--dark-bg);color:#333;} #workspace-hr-os .ps--working{background:var(--working-bg);color:#b4730f;}

/* file chip */
#workspace-hr-os .hr-file{display:inline-flex;align-items:center;gap:5px;max-width:150px;height:24px;padding:0 8px;border-radius:var(--radius-sm);background:var(--surface-2);border:1px solid var(--border);font-size:12px;color:var(--text-muted);cursor:pointer;overflow:hidden;}
#workspace-hr-os .hr-file span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#workspace-hr-os .hr-file:hover{border-color:var(--primary);color:var(--primary);}
#workspace-hr-os .hr-file-add{color:var(--text-soft);cursor:pointer;display:inline-grid;place-items:center;width:24px;height:24px;border-radius:var(--radius-sm);}
#workspace-hr-os .hr-file-add:hover{background:var(--surface-2);color:var(--primary);}

/* avatar (Người phỏng vấn) */
#workspace-hr-os .avatar{width:24px;height:24px;border-radius:99px;display:inline-grid;place-items:center;color:#fff;font-size:11px;font-weight:700;flex-shrink:0;}
#workspace-hr-os .hr-person{display:inline-flex;align-items:center;gap:7px;}

/* checkbox cell */
#workspace-hr-os .hr-check{width:18px;height:18px;border-radius:var(--radius-sm);border:1.5px solid var(--border-2);background:var(--surface);display:inline-grid;place-items:center;cursor:pointer;}
#workspace-hr-os .hr-check.on{background:var(--primary);border-color:var(--primary);}
#workspace-hr-os .hr-check .ic{width:12px;height:12px;color:#fff;stroke-width:3;display:none;}
#workspace-hr-os .hr-check.on .ic{display:block;}

/* date cell */
#workspace-hr-os .hr-date{display:inline-flex;align-items:center;gap:6px;color:var(--text);cursor:pointer;font-variant-numeric:tabular-nums;}
#workspace-hr-os .hr-date .ic{color:var(--text-soft);}
#workspace-hr-os .hr-date.empty{color:var(--text-soft);}

/* inline note */
#workspace-hr-os .hr-note{color:var(--text-muted);cursor:text;max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block;vertical-align:middle;}
#workspace-hr-os .hr-note.empty{color:var(--text-soft);}

/* add row */
#workspace-hr-os .hr-board tr.hr-addrow td{height:38px;color:var(--text-soft);font-weight:600;cursor:pointer;}
#workspace-hr-os .hr-board tr.hr-addrow:hover td{color:var(--primary);}

/* inline text edit */
#workspace-hr-os .hr-inline-input{border:1px solid var(--primary);border-radius:var(--radius-sm);padding:2px 6px;font-family:var(--font);font-size:13px;outline:none;box-shadow:0 0 0 3px var(--focus-ring);width:100%;}

/* status dropdown popover */
#workspace-hr-os .hr-pop{position:fixed;z-index:60;background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow-lg);padding:6px;min-width:180px;border:1px solid var(--border);}
#workspace-hr-os .hr-pop .opt{display:flex;align-items:center;gap:8px;padding:7px 9px;border-radius:var(--radius-sm);cursor:pointer;font-size:13px;font-weight:600;}
#workspace-hr-os .hr-pop .opt:hover{background:var(--surface-2);}
#workspace-hr-os .hr-pop .dot{width:12px;height:12px;border-radius:3px;flex-shrink:0;}

#workspace-hr-os .hr-empty{text-align:center;padding:44px;color:var(--text-muted);}

/* ── modal (thêm/sửa ứng viên) ── */
.hrm-overlay{position:fixed;inset:0;background:rgba(0,0,0,.45);display:grid;place-items:start center;z-index:2000;overflow-y:auto;padding:32px 16px;
  font-family:'Public Sans','Be Vietnam Pro','Figtree',system-ui,sans-serif;}
.hrm-card{background:#fff;border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.12);overflow:hidden;border-top:3px solid #0073EA;width:100%;max-width:560px;}
.hrm-head{display:flex;align-items:center;gap:12px;padding:16px;border-bottom:1px solid #E6E9EF;}
.hrm-head .hico{width:34px;height:34px;border-radius:8px;background:#CCE5FF;color:#0073EA;display:grid;place-items:center;flex-shrink:0;}
.hrm-head h3{margin:0;font-size:16px;font-weight:700;flex:1;color:#323338;}
.hrm-close{width:30px;height:30px;border-radius:99px;border:none;background:transparent;cursor:pointer;color:#676879;display:grid;place-items:center;}
.hrm-close:hover{background:#F5F6F8;}
.hrm-body{padding:16px;background:#F6F7FB;display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.hrm-body .full{grid-column:1 / -1;}
.hrm-field > label{display:block;font-size:12px;font-weight:600;color:#676879;margin-bottom:5px;}
.hrm-field input,.hrm-field select,.hrm-field textarea{width:100%;min-height:36px;border:1px solid #D0D4E4;border-radius:4px;padding:7px 10px;font-family:inherit;font-size:14px;color:#323338;background:#fff;}
.hrm-field input:focus,.hrm-field select:focus,.hrm-field textarea:focus{outline:none;border-color:#0073EA;box-shadow:0 0 0 3px rgba(0,115,234,.30);}
.hrm-field textarea{min-height:64px;resize:vertical;}
.hrm-files{display:flex;flex-wrap:wrap;gap:6px;align-items:center;}
.hrm-foot{display:flex;justify-content:space-between;gap:8px;padding:16px;border-top:1px solid #E6E9EF;background:#fff;}
