/* Core One — Employees (public/hr.js): the overview, departments, org chart, directory, My Profile,
   To-dos and the tabs of the employee form. Colours come from the theme tokens, so light and dark
   both work. Layout uses logical properties (inline-start/end), so Arabic mirrors without extra
   rules. Anything only known at run time (a department's colour, a bar's width) is set from
   data-bg / data-w by paintStyles(), because the CSP forbids style="". */

.hr-home { padding: 22px 18px 64px; max-width: 1120px; margin: 0 auto; }
.hr-home.narrow { max-width: 780px; }
.hr-hello { font-size: 24px; font-weight: 680; letter-spacing: -.025em; margin: 0 0 16px; }
.hr-none { color: var(--muted); font-size: 13px; margin: 6px 0; }
.hr-none.center { text-align: center; margin: 18px 0; }
.hr-hint { color: var(--muted); font-size: 12px; line-height: 1.45; margin: 4px 0 0; }
.hr-count { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.hr-note { color: var(--muted); font-size: 13px; margin-top: 16px; }
.hr-h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; margin: 18px 0 8px; text-align: center; }
.hr-h5 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; margin: 12px 0 4px; }

/* people: photo or initials */
.hr-av { width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto; object-fit: cover; display: inline-grid; place-items: center;
         font-size: 12.5px; font-weight: 650; color: #fff; background: var(--faint); letter-spacing: .02em; }
.hr-av.sm { width: 28px; height: 28px; font-size: 11px; }
.hr-av.lg { width: 46px; height: 46px; font-size: 15px; }
.hr-av.xl { width: 76px; height: 76px; font-size: 24px; }

.hr-chip { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 11.5px; line-height: 18px; background: var(--canvas); color: var(--muted);
           white-space: nowrap; font-style: normal; border: 1px solid var(--line-2); }
a.hr-chip:hover { color: var(--ink); border-color: var(--faint); }
.hr-chip.ok { background: color-mix(in srgb, var(--success) 14%, var(--paper)); color: var(--success); border-color: transparent; }
.hr-chip.warn { background: color-mix(in srgb, var(--warn) 15%, var(--paper)); color: var(--warn); border-color: transparent; }
.hr-chip.bad { background: color-mix(in srgb, var(--danger) 14%, var(--paper)); color: var(--danger); border-color: transparent; }
.hr-today { display: inline-block; margin-inline-start: 6px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 600;
            background: var(--accent-soft); color: var(--accent); }

/* (the buttons of these screens that wait for a change) */
.cpanel .btn:disabled { opacity: .4; cursor: default; filter: none; box-shadow: none; }

/* overview */
.hr-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 12px; margin-bottom: 16px; }
.hr-kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--paper); border: 1px solid var(--line);
          border-radius: var(--r-md); box-shadow: var(--e1); color: inherit; text-decoration: none; border-inline-start: 4px solid var(--line);
          transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.hr-kpi:hover { box-shadow: var(--e2); border-color: var(--faint); }
.hr-kpi.warn { border-inline-start-color: var(--warn); } .hr-kpi.bad { border-inline-start-color: var(--danger); }
.hr-kl { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.hr-kv { font-size: 28px; font-weight: 680; letter-spacing: -.03em; line-height: 1.1; }
.hr-ks { color: var(--muted); font-size: 12px; }
.hr-cols { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.hr-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.hr-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--e1); padding: 16px 18px; min-width: 0; }
.hr-card h3 { font-size: 14px; font-weight: 640; letter-spacing: -.01em; margin: 0 0 10px; }
.hr-more { display: inline-block; margin-top: 10px; font-size: 12.5px; font-weight: 550; color: var(--accent); }
.hr-ann { padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.hr-ann:last-of-type { border-bottom: 0; }
.hr-ann-h { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.hr-ann-h small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.hr-ann p { margin: 4px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.hr-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-radius: var(--r-xs); color: inherit; text-decoration: none; min-width: 0; }
a.hr-row:hover { background: var(--canvas); }
.hr-row.static { cursor: default; }
.hr-row-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.hr-row-t b { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr-row-t small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr-bar { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 34px; align-items: center; gap: 10px; padding: 5px 0; color: inherit; text-decoration: none; font-size: 13px; }
.hr-bar:hover .hr-bar-l { color: var(--accent); }
.hr-bar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr-bar-t { height: 9px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.hr-bar-f { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.hr-bar b { text-align: end; font-variant-numeric: tabular-nums; }

/* departments */
.hr-depts { display: grid; grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); gap: 14px; }
.hr-dept { position: relative; display: flex; flex-direction: column; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
           box-shadow: var(--e1); padding: 18px 18px 14px; overflow: hidden; }
.hr-dept-bar { position: absolute; inset-inline-start: 0; inset-block: 0; width: 5px; background: var(--accent); }
.hr-dept header { display: flex; flex-direction: column; gap: 4px; }
.hr-dept header small { color: var(--muted); font-size: 11.5px; }
.hr-dept h3 { font-size: 16px; font-weight: 660; letter-spacing: -.015em; margin: 0; }
.hr-mgr { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13px; text-decoration: none; margin-top: 2px; }
.hr-dept-n { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hr-dept-n > * { display: flex; flex-direction: column; align-items: flex-start; color: inherit; text-decoration: none; }
.hr-dept-n b { font-size: 22px; font-weight: 680; letter-spacing: -.02em; }
.hr-dept-n b.warn { color: var(--warn); } .hr-dept-n b.ok { color: var(--success); }
.hr-dept-n span { color: var(--muted); font-size: 11.5px; }
.hr-sub { color: var(--muted); font-size: 12px; }
.hr-dept footer { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }

/* org chart */
.hr-seg { display: inline-flex; gap: 2px; background: var(--line-2); border-radius: var(--r-sm); padding: 2px; }
.hr-seg button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; color: var(--muted); font-weight: 550; font-size: 12.5px; }
.hr-seg button.on { background: var(--paper); color: var(--ink); box-shadow: var(--e1); }
.hr-find { position: relative; min-width: 220px; }
.hr-find input { width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 7px 11px; background: var(--canvas); color: var(--ink); font: inherit; }
.hr-find input:focus { outline: 0; border-color: var(--accent); background: var(--paper); box-shadow: 0 0 0 3px var(--accent-soft); }
.hr-hits { position: absolute; inset-inline: 0; top: calc(100% + 4px); z-index: 40; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm);
           box-shadow: var(--e3); padding: 4px; }
.hr-hits a { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: var(--r-xs); color: inherit; text-decoration: none; }
.hr-hits a:hover { background: var(--canvas); }
.hr-hits small { display: block; color: var(--muted); font-size: 11.5px; }
.hr-org { display: flex; flex-direction: column; align-items: center; gap: 0; }
.hr-org-up { display: flex; flex-direction: column; align-items: center; }
.hr-link { display: block; width: 2px; height: 16px; background: var(--line); }
.hr-link.tall { height: 22px; }
.hr-node { display: flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--e1);
           padding: 8px 10px; min-width: 0; max-width: 100%; }
.hr-node.up { opacity: .9; }
.hr-node.left { opacity: .6; }
.hr-node.focus { padding: 14px 18px; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--e2); }
.hr-node-main { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.hr-node-t { display: flex; flex-direction: column; min-width: 0; }
.hr-node-t b { font-weight: 620; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; }
.hr-node.focus .hr-node-t b { font-size: 16px; }
.hr-node-t small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.hr-tog { margin-inline-start: auto; border: 1px solid var(--line); background: var(--canvas); border-radius: 999px; min-width: 34px; height: 24px; padding: 0 9px;
          font-size: 12px; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; gap: 4px; }
.hr-tog::after { content: '▾'; font-size: 10px; transition: transform .15s var(--ease); }
.hr-tog:hover { border-color: var(--accent); color: var(--accent); }
.hr-tog.on::after { transform: rotate(180deg); }
.hr-focus { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 100%; }
.hr-focus-i { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.hr-tree { list-style: none; margin: 0; padding: 0; width: min(560px, 100%); display: flex; flex-direction: column; gap: 8px; }
.hr-tree .hr-tree { margin-top: 8px; margin-inline-start: 18px; padding-inline-start: 14px; border-inline-start: 2px solid var(--line); width: auto; }
.hr-tree > li > .hr-node { width: 100%; }
.hr-roots { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hr-dnode { width: min(820px, 100%); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--e1); margin-bottom: 10px; }
.hr-dnode .hr-dnode { box-shadow: none; margin: 8px 0 0; background: var(--raised); }
.hr-dnode > summary { display: flex; align-items: center; gap: 9px; padding: 11px 14px; cursor: pointer; list-style: none; }
.hr-dnode > summary::-webkit-details-marker { display: none; }
.hr-dnode > summary::before { content: '▸'; color: var(--faint); font-size: 11px; transition: transform .15s var(--ease); }
.hr-dnode[open] > summary::before { transform: rotate(90deg); }
:root[dir="rtl"] .hr-dnode > summary::before { content: '◂'; }
:root[dir="rtl"] .hr-dnode[open] > summary::before { transform: rotate(-90deg); }
.hr-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.hr-dbody { padding: 0 14px 14px; }
.hr-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-bottom: 4px; }
.hr-pcard { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--paper);
            color: inherit; text-decoration: none; min-width: 0; }
.hr-pcard:hover { border-color: var(--accent); }
.hr-pcard.mgr { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.hr-pcard > span:not(.hr-av) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.hr-pcard b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr-pcard small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* directory */
.hr-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.hr-person { display: flex; flex-direction: column; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--e1); padding: 16px; min-width: 0; }
.hr-person-h { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-width: 0; }
.hr-person-h > span:not(.hr-av) { display: flex; flex-direction: column; min-width: 0; }
.hr-person-h b { font-size: 15px; font-weight: 640; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; }
.hr-person-h small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.hr-person-b { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--ink-2); min-width: 0; }
.hr-person-b span, .hr-person-b a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr-person-b a { color: var(--accent); text-decoration: none; }
.hr-mgrline { color: var(--muted); }
.hr-person-o { align-self: flex-start; font-size: 12px; font-weight: 550; color: var(--muted); text-decoration: none; margin-top: auto; }
.hr-person-o:hover { color: var(--accent); }

/* My Profile */
.hr-me-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.hr-me-head h1 { font-size: 24px; font-weight: 680; letter-spacing: -.025em; margin: 0; }
.hr-me-head p { margin: 4px 0 0; color: var(--muted); }
.hr-card .fieldrow { grid-template-columns: minmax(110px, 38%) minmax(0, 1fr); }
.hr-card .fieldrow .ctrl input, .hr-card .fieldrow .ctrl select { width: 100%; }
.hr-card .fieldrow .ctrl input:disabled, .hr-card .fieldrow .ctrl select:disabled { background: none; color: var(--ink-2); border-color: transparent; opacity: 1; }

/* to-dos */
.hr-todo { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.hr-todo:last-child { border-bottom: 0; }
.hr-todo-t { display: flex; flex-direction: column; flex: 1; min-width: 180px; }
.hr-todo-t b { font-weight: 600; font-size: 13.5px; }
.hr-todo-t small { color: var(--muted); font-size: 12px; }
.hr-todo-t small.desc { color: var(--ink-2); margin-top: 2px; }
.hr-todo.done .hr-todo-t b { text-decoration: line-through; color: var(--muted); }
.hr-recent { margin-top: 10px; }
.hr-recent summary { cursor: pointer; color: var(--muted); font-size: 12.5px; padding: 6px 0; }

/* the tabs of the employee form */
.hr-sec-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.hr-sec-h h3, .custom-slot .lines-sec > h3 { margin: 0; }
.hr-docs { display: flex; flex-direction: column; }
.hr-doc { display: flex; align-items: center; gap: 8px; padding: 9px 2px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.hr-doc:last-child { border-bottom: 0; }
.hr-doc-t { display: flex; flex-direction: column; flex: 1; min-width: 180px; }
.hr-doc-t b { font-weight: 600; font-size: 13.5px; }
.hr-doc-t small { color: var(--muted); font-size: 12px; }
.custom-slot:empty { display: none; }

/* Settings › Employees › HR Officers */
.set-officers { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 14px; margin-top: 10px; }
.set-officer { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13.5px; }
.set-officer small { color: var(--muted); font-size: 12px; margin-inline-start: auto; }
.set-officer input { accent-color: var(--accent); width: 16px; height: 16px; }

/* ---------- attendance: My Attendance, Today, Extra Hours, the top bar button ---------- */
.att-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--faint); margin-inline-end: 7px; vertical-align: middle; }
.att-line { display: flex; flex-wrap: wrap; gap: 2px 12px; } .hr-count small { color: var(--faint); margin-inline-start: 8px; }
.att-card-t small { display: flex; flex-wrap: wrap; gap: 0 8px; }
.att-state { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.att-state.in { color: var(--success); font-weight: 600; } .att-state.in .att-dot { background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 20%, transparent); }
.tbatt { display: inline-flex; align-items: center; } .tbatt .att-dot { margin-inline-end: 6px; width: 8px; height: 8px; }
.tbatt.on .att-dot { background: var(--success); }
.att-me { display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
.att-me-h { display: flex; align-items: center; gap: 16px; }
.att-me-h h1 { font-size: 22px; font-weight: 680; letter-spacing: -.02em; margin: 0; }
.att-big { border: 0; border-radius: var(--r-md); padding: 20px 24px; font: inherit; font-size: 22px; font-weight: 680; letter-spacing: -.01em; color: #fff; cursor: pointer;
           box-shadow: var(--e2); transition: transform .12s var(--ease), filter .12s var(--ease); }
.att-big.in { background: var(--success); } .att-big.out { background: var(--danger); }
.att-big:hover:not(:disabled) { filter: brightness(1.06); } .att-big:active:not(:disabled) { transform: scale(.985); } .att-big:disabled { opacity: .6; cursor: default; }
.att-big.sm { padding: 12px 18px; font-size: 16px; width: 100%; margin: 8px 0; }
.att-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.att-stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--canvas); border-radius: var(--r-sm); }
.att-stat b { font-size: 22px; font-weight: 680; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.att-sl { color: var(--muted); font-size: 12px; font-weight: 550; } .att-stat small { color: var(--muted); font-size: 11.5px; }
.att-bars { display: flex; flex-direction: column; gap: 6px; }
.hr-hint.center { text-align: center; }
.att-rows { display: flex; flex-direction: column; }
.att-row { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--line-2); color: inherit; text-decoration: none; flex-wrap: wrap; }
.att-row:last-child { border-bottom: 0; } .att-row:hover { background: var(--canvas); }
.att-day { min-width: 92px; font-weight: 600; font-size: 13px; } .att-span { flex: 1; color: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; min-width: 130px; }
.att-h { font-variant-numeric: tabular-nums; font-weight: 650; }
.att-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.att-group { margin-bottom: 14px; } .att-group h3 { display: flex; align-items: center; gap: 8px; }
.att-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.att-card { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--paper); color: inherit; text-decoration: none; min-width: 0; }
.att-card:hover { border-color: var(--accent); }
.att-card.in { border-inline-start: 4px solid var(--success); } .att-card.notin { border-inline-start: 4px solid var(--danger); } .att-card.leave { border-inline-start: 4px solid var(--warn); }
.att-card-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.att-card-t b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-card-t small { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.att-faces { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.att-x { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.att-x:last-child { border-bottom: 0; }
.att-table { width: 100%; border-collapse: collapse; font-size: 13px; } .att-table th { text-align: start; color: var(--muted); font-weight: 550; padding: 6px 8px; }
.att-table td { padding: 7px 8px; border-top: 1px solid var(--line-2); font-variant-numeric: tabular-nums; }

/* ---------- skills, résumé and training ---------- */
.rs-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; align-items: start; margin-top: 8px; }
.rs-col { min-width: 0; }
.rs-line { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.rs-line:last-child { border-bottom: 0; }
.rs-when { color: var(--muted); font-size: 12px; padding-top: 2px; }
.rs-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rs-what b { font-weight: 620; font-size: 13.5px; } .rs-what > span { color: var(--ink-2); font-size: 12.5px; } .rs-what p { margin: 3px 0 0; color: var(--ink-2); font-size: 12.5px; line-height: 1.45; white-space: pre-wrap; }
.sk-row { padding: 7px 0; } .sk-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .sk-h b { font-size: 13px; font-weight: 600; }
.sk-lv { margin-inline-start: auto; color: var(--muted); font-size: 12px; }
.sk-bar { height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; margin-top: 5px; }
.sk-fill { display: block; height: 100%; border-radius: 999px; background: var(--accent); } .sk-fill.bad { background: var(--danger); }
.sk-meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 11.5px; margin-top: 4px; } .sk-meta a { color: var(--accent); text-decoration: none; font-weight: 550; }
.sk-act { display: inline-flex; gap: 6px; margin-top: 6px; }
.sf-row { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; } .sf-row select { flex: 1 1 200px; min-width: 0; }
.hr-person .sk-row { padding: 2px 0; }

/* ---------- appraisals ---------- */
.ap-sheet { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.ap-steps { display: flex; gap: 6px; list-style: none; margin: 0 0 6px; padding: 0; flex-wrap: wrap; }
.ap-steps li { padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--line-2); color: var(--muted); }
.ap-steps li.past { background: color-mix(in srgb, var(--success) 14%, var(--paper)); color: var(--success); } .ap-steps li.now { background: var(--accent); color: #fff; }
.ap-part h3 { margin-bottom: 12px; }
.ap-q { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line-2); } .ap-q:last-child { border-bottom: 0; }
.ap-ql { font-weight: 600; font-size: 13.5px; } .ap-q textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; font: inherit; background: var(--canvas); color: var(--ink); resize: vertical; }
.ap-q textarea:focus { outline: 0; border-color: var(--accent); background: var(--paper); box-shadow: 0 0 0 3px var(--accent-soft); }
.ap-a { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; }
.ap-rate { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.ap-rate button, .ap-rate.ro span { min-width: 38px; height: 34px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); font: inherit; font-weight: 650; font-size: 14px; cursor: pointer; }
.ap-rate.ro span { cursor: default; min-width: 30px; height: 28px; font-size: 12.5px; }
.ap-rate button:hover { border-color: var(--accent); } .ap-rate button.on, .ap-rate.ro span.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ap-bar { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.ap-peer { display: flex; flex-direction: column; gap: 4px; padding: 8px 0 8px 12px; border-inline-start: 3px solid var(--line); margin: 4px 0; } .ap-from { color: var(--muted); font-size: 12px; font-weight: 600; }
.ap-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px 12px; max-height: 46vh; overflow: auto; margin: 10px 0; } .ap-pick label { display: flex; gap: 8px; align-items: center; font-size: 13.5px; padding: 3px 0; }
.ap-link { color: inherit; text-decoration: none; } .ap-link:hover { background: var(--canvas); }
.gl-row { padding: 10px 0; border-bottom: 1px solid var(--line-2); } .gl-row:last-child { border-bottom: 0; } .gl-row.done .gl-h b { text-decoration: line-through; color: var(--muted); }
.gl-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .gl-h b { font-size: 13.5px; font-weight: 600; flex: 1; min-width: 160px; }
.gl-p { display: flex; align-items: center; gap: 10px; margin-top: 6px; } .gl-p .sk-bar { flex: 1; margin-top: 0; } .gl-p b { font-variant-numeric: tabular-nums; font-size: 12.5px; min-width: 36px; text-align: end; }

/* ---------- the kiosk: a shared tablet ---------- */
.kx { min-height: calc(100vh - 56px); display: flex; flex-direction: column; background: var(--canvas); }
.kx-top { display: flex; align-items: center; gap: 14px; padding: 14px 22px; }
.kx-clock { font-size: 40px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; } .kx-date { color: var(--muted); font-size: 16px; }
.kx-dev { color: var(--faint); font-size: 12px; }
.kx-stage { flex: 1; display: flex; align-items: center; justify-content: center; padding: 18px; }
.kx-idle, .kx-pick, .kx-pad, .kx-result { width: min(720px, 100%); display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.kx-scan { width: 100%; background: var(--paper); border: 2px dashed var(--line); border-radius: var(--r-lg, 18px); padding: 34px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.kx-scan h2 { margin: 0; font-size: 28px; letter-spacing: -.02em; } .kx-icon { font-size: 54px; color: var(--accent); line-height: 1; }
.kx-scan input { width: min(340px, 100%); text-align: center; font-size: 18px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--canvas); color: var(--ink); letter-spacing: .1em; }
.kx-scan input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.kx-btn { border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: var(--r-md); padding: 16px 26px; font: inherit; font-size: 18px; font-weight: 600; cursor: pointer; box-shadow: var(--e1); }
.kx-btn:hover { border-color: var(--accent); color: var(--accent); }
.kx-msg { min-height: 28px; font-size: 17px; font-weight: 600; color: var(--muted); } .kx-msg.bad { color: var(--danger); }
.kx-bar { display: flex; gap: 10px; width: 100%; } .kx-bar input { flex: 1; font-size: 17px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); color: var(--ink); }
.kx-names { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; width: 100%; max-height: 60vh; overflow: auto; padding: 2px; }
.kx-name { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); background: var(--paper); border-radius: var(--r-md); font: inherit; font-size: 16px; font-weight: 600; color: var(--ink); cursor: pointer; text-align: start; min-width: 0; }
.kx-name span { overflow: hidden; text-overflow: ellipsis; } .kx-name:hover { border-color: var(--accent); }
.kx-who { display: flex; align-items: center; gap: 12px; font-size: 20px; } .kx-dots { font-size: 34px; letter-spacing: .3em; min-height: 46px; color: var(--ink); }
.kx-keys { display: grid; grid-template-columns: repeat(3, 84px); gap: 12px; }
.kx-keys button { height: 72px; border: 1px solid var(--line); background: var(--paper); border-radius: var(--r-md); font: inherit; font-size: 28px; font-weight: 600; color: var(--ink); cursor: pointer; box-shadow: var(--e1); }
.kx-keys button:active { transform: scale(.96); } .kx-keys .ok { background: var(--success); color: #fff; border-color: transparent; font-size: 22px; } .kx-keys .alt { color: var(--muted); }
.kx-result h2 { margin: 6px 0 0; font-size: 44px; letter-spacing: -.03em; } .kx-result.in h2 { color: var(--success); } .kx-result.out h2 { color: var(--accent); }
.kx-rname { font-size: 30px; font-weight: 660; } .kx-big { font-size: 24px; margin: 0; } .kx-sub { margin: 0; color: var(--muted); font-size: 17px; } .kx-sub.warn { color: var(--warn); }
.kx-tot { display: flex; gap: 40px; margin-top: 8px; } .kx-tot > div { display: flex; flex-direction: column; } .kx-tot small { color: var(--muted); font-size: 14px; } .kx-tot b { font-size: 34px; font-variant-numeric: tabular-nums; }
body.kx-full .topbar { display: none; } body.kx-full .kx { min-height: 100vh; }

@media (max-width: 900px) {
  .rs-grid { grid-template-columns: minmax(0, 1fr); } .rs-line { grid-template-columns: 96px minmax(0, 1fr); }
  .att-stats { grid-template-columns: 1fr; } .att-big { font-size: 20px; padding: 18px; } .kx-clock { font-size: 30px; } .kx-top { padding: 10px 12px; flex-wrap: wrap; }
  .kx-keys { grid-template-columns: repeat(3, 76px); } .kx-keys button { height: 64px; }
  .hr-cols { grid-template-columns: minmax(0, 1fr); }
  .hr-home { padding: 16px 12px 64px; }
  .hr-hello { font-size: 20px; }
  .hr-tree { width: 100%; }
  .hr-find { min-width: 0; flex: 1 1 100%; }
  .hr-me-head { gap: 12px; }
  .hr-me-head .hr-av.xl { width: 56px; height: 56px; font-size: 18px; }
}
