:root {
  --brand: #FF914D;
  --brand-dark: #E8742C;
  --ink: #1F2933;
  --muted: #6B7785;
  --line: #E3E8EE;
  --bg: #F4F6F9;
  --card: #FFFFFF;
  --green: #1E9E5A;
  --green-bg: #E5F6EC;
  --amber: #C27803;
  --amber-bg: #FDF3DC;
  --red: #D64545;
  --red-bg: #FCE8E8;
  --grey-bg: #EEF1F4;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.45 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
button, input, select { font: inherit; }
.boot { padding: 40vh 0; text-align: center; color: var(--muted); }

/* ---------- top bar & nav ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--ink); color: #fff;
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.top .logo { width: 30px; height: 30px; border-radius: 8px; background: var(--brand);
  display: grid; place-items: center; font-weight: 800; color: #fff; }
.top .t { flex: 1; min-width: 0; }
.top .t b { display: block; font-size: 16px; }
.top .t small { color: #B8C2CC; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .out { background: transparent; color: #fff; border: 1px solid #4A5562; border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; background: #fff;
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.nav button { flex: 1; border: 0; background: none; padding: 9px 2px 8px; color: var(--muted); font-size: 12px; }
.nav button .i { display: block; font-size: 19px; line-height: 1.1; }
.nav button.on { color: var(--brand-dark); font-weight: 600; }
main { padding: 14px 16px 90px; max-width: 720px; margin: 0 auto; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.card h3 { margin: 0 0 10px; font-size: 15px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; }
.row .grow { flex: 1; min-width: 0; }
.hero { text-align: center; padding: 22px 16px; }
.hero .date { color: var(--muted); font-size: 14px; }
.hero .clock { font-size: 34px; font-weight: 700; margin: 4px 0 12px; letter-spacing: .5px; }
.hero .state { margin: 6px 0 16px; }
.hero .place { color: var(--muted); font-size: 13px; margin-top: 4px; }
.btn { display: inline-block; border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 600;
  background: var(--grey-bg); color: var(--ink); }
.btn.big { width: 100%; padding: 16px; font-size: 18px; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.danger { background: var(--ink); color: #fff; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .55; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.b-green { background: var(--green-bg); color: var(--green); }
.b-amber { background: var(--amber-bg); color: var(--amber); }
.b-red { background: var(--red-bg); color: var(--red); }
.b-grey { background: var(--grey-bg); color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.dot.on { background: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }
.dot.off { background: #AAB4BE; }

/* ---------- setup checklist ---------- */
.setup .step { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.setup .step:first-of-type { border-top: 0; }
.gate-icon { width: 64px; height: 64px; margin: 4px auto 6px; border-radius: 50%; background: #FFF1E7; color: var(--brand-dark);
  display: grid; place-items: center; font-size: 32px; }
.setup .step .grow { flex: 1; min-width: 0; }
.setup .step .ok { color: var(--green); font-weight: 700; }
.setup.warn { border-color: #F6C9A9; background: #FFF8F3; }

/* ---------- lists ---------- */
.list .item { padding: 11px 0; border-top: 1px solid var(--line); }
.list .item:first-child { border-top: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 13px; margin-top: 6px; }
.kv span:nth-child(odd) { color: var(--muted); }
.person { padding: 14px 0; border-top: 1px solid var(--line); }
.person:first-child { border-top: 0; padding-top: 2px; }
.person .name { font-weight: 600; }
.person .acts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ---------- forms ---------- */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.input { width: 100%; padding: 12px 13px; border: 1px solid #CBD3DC; border-radius: 10px; background: #fff; color: var(--ink); }
.input:focus { outline: 2px solid var(--brand); border-color: transparent; }
.filters { display: flex; gap: 8px; margin-bottom: 12px; }
.filters .input { padding: 9px 10px; }
.err { color: var(--red); font-size: 14px; margin: 8px 0; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 24px 20px; max-width: 420px; margin: 0 auto; }
.login .brand { text-align: center; margin-bottom: 26px; }
.login .brand .logo { width: 64px; height: 64px; border-radius: 16px; background: var(--brand); color: #fff;
  font-size: 30px; font-weight: 800; display: grid; place-items: center; margin: 0 auto 12px; }
.login h1 { font-size: 22px; margin: 0; }

/* ---------- map & month grid ---------- */
#map { height: 58vh; min-height: 320px; border-radius: 12px; border: 1px solid var(--line); background: #E8ECEF; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.gridwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px; }
table.month { border-collapse: collapse; font-size: 12px; }
table.month th, table.month td { border: 1px solid var(--line); padding: 4px 0; text-align: center; min-width: 26px; }
table.month th.n, table.month td.n { text-align: left; padding: 4px 8px; min-width: 110px; position: sticky; left: 0; background: #fff; z-index: 1; }
table.month td.P { background: var(--green-bg); color: var(--green); font-weight: 700; }
table.month td.LT { background: #FFF1D6; color: var(--amber); font-weight: 700; }
table.month td.L { background: var(--amber-bg); color: var(--amber); font-weight: 700; }
table.month td.A { background: var(--red-bg); color: var(--red); }
table.month td.O, table.month th.O { background: var(--grey-bg); color: #9AA5B1; }
table.month td.tot { font-weight: 700; min-width: 34px; }

/* ---------- selfie camera ---------- */
.cam { position: fixed; inset: 0; z-index: 100; background: #000; display: flex; flex-direction: column; color: #fff; }
.cam-view { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cam-view video { width: 100%; height: 100%; object-fit: contain; transform: scaleX(-1); } /* whole frame, as saved */
.cam-view img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cam-stamp { position: absolute; left: 0; right: 0; bottom: 128px; padding: 10px 14px 10px 16px; font-size: 13px; line-height: 1.5;
  background: rgba(0,0,0,.55); border-left: 5px solid var(--brand); }
.cam-stamp:empty { display: none; }
.cam-msg { padding: 10px 16px 0; text-align: center; font-size: 14px; color: #D5DCE3; min-height: 30px; }
.cam-err { color: #FF9A9A; }
.cam-warn { color: #FFD08A; }
.cam-bar { display: flex; gap: 10px; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
.cam-bar .btn { flex: 1; padding: 15px; font-size: 16px; }
.thumbs { display: flex; gap: 10px; justify-content: center; margin: 4px 0 14px; flex-wrap: wrap; }
.card .person .thumbs { justify-content: flex-start; margin: 10px 0 0; }
.thumb { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 4px; text-align: center; font-size: 11px; color: var(--muted); }
.thumb img { display: block; width: 72px; height: 96px; object-fit: cover; border-radius: 7px; background: var(--grey-bg); margin-bottom: 3px; }
.thumb img.none { opacity: .3; }
.viewer { position: fixed; inset: 0; z-index: 120; background: rgba(0,0,0,.92); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; padding: 16px; }
.viewer img { max-width: 100%; max-height: 85vh; border-radius: 8px; }

.toast { position: fixed; left: 16px; right: 16px; bottom: 76px; z-index: 130; background: var(--ink); color: #fff;
  padding: 12px 14px; border-radius: 12px; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.toast.bad { background: var(--red); }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff;
  border-radius: 50%; animation: sp .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes sp { to { transform: rotate(360deg); } }
.empty { text-align: center; color: var(--muted); padding: 18px 0; font-size: 14px; }

/* ---------- salary, day status, phone events ---------- */
.c-g { color: var(--green); } .c-a { color: var(--amber); } .c-r { color: var(--red); }
.note { background: #FFF8F3; border-color: #F6C9A9; }
.sal .net { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.sal .net b { font-size: 22px; color: var(--green); }
table.month td.W { background: var(--green-bg); color: var(--green); font-weight: 700; }
table.month td.H, table.month th.H { background: #E8EEF9; color: #3A5A9A; font-weight: 700; }
table.month td.HD { background: var(--amber-bg); color: var(--amber); font-weight: 700; }
table.month td.PL { background: #EEF0FA; color: #4A55A2; font-weight: 700; font-size: 10px; }
table.month td.ov { box-shadow: inset 0 0 0 2px #4A55A2; }
table.month td.tap { cursor: pointer; }
.events { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.ev { font-size: 12px; padding: 4px 8px; border-radius: 8px; background: var(--grey-bg); color: var(--ink); }
.ev-off { background: var(--red-bg); color: var(--red); font-weight: 600; }
.ev-low { background: var(--amber-bg); color: var(--amber); }
.ev-on { background: var(--green-bg); color: var(--green); }
svg.batt { width: 100%; height: auto; display: block; }
svg.batt path { fill: none; stroke: var(--brand-dark); stroke-width: 2.5; stroke-linejoin: round; }
svg.batt line.grid { stroke: var(--line); }
svg.batt line.low { stroke: var(--red); stroke-dasharray: 4 4; opacity: .6; }
svg.batt line.off { stroke: var(--red); stroke-width: 2; }
svg.batt line.on { stroke: var(--green); stroke-width: 2; }
svg.batt text { font-size: 11px; fill: var(--muted); }
.modal { position: fixed; inset: 0; z-index: 110; background: rgba(15, 20, 25, .5); display: flex; align-items: flex-end; justify-content: center; }
.modal .sheet { background: #fff; width: 100%; max-width: 520px; border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 90vh; overflow-y: auto; }
.modal .sheet h3 { margin: 0 0 4px; }
.modal .sheet .row .btn { flex: 1; }
.opt { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-top: 1px solid var(--line); }
.opt input { width: 20px; height: 20px; accent-color: var(--brand-dark); }
table.month td.LV { background: #EEF0FA; color: #4A55A2; font-weight: 700; font-size: 10px; }

/* ---------- day timeline ---------- */
.tl-sum { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; margin-bottom: 10px; }
.tl { position: relative; }
.tl-row { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.tl-row:first-child { border-top: 0; }
.tl-no { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--grey-bg); color: var(--muted);
  display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.tl-row.stay .tl-no { background: var(--brand); color: #fff; }
.tl-row.gap .tl-no { background: var(--red-bg); color: var(--red); }
.tl-time { font-size: 14px; }
.stay-pin span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #E8742C; color: #fff;
  font: 700 12px sans-serif; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.item.past { opacity: .5; }

/* ---------- duty timings grid ---------- */
.dt-grid { display: grid; grid-template-columns: minmax(90px, 1.3fr) 1fr 1fr 1fr; gap: 6px 8px; align-items: center; font-size: 13px; }
.dt-grid b { font-size: 12px; color: var(--muted); }
.dt-grid .input { padding: 8px 6px; font-size: 13px; }

/* ---------- desktop / HR tab in Manager: use the full width ---------- */
@media (min-width: 1000px) {
  main { max-width: none; padding: 18px 24px 96px; }
  .filters { max-width: 560px; }
  #map { height: 66vh; }
  table.month th, table.month td { min-width: 30px; }
  .sal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 0 16px; }
  .card.team-card .person-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 0 24px; }
  .card.team-card .person { border-top: 1px solid var(--line); padding-top: 14px; }
}

.page-title { font-size: 18px; margin: 4px 2px 12px; }

.app-ver { text-align: center; font-size: 12px; color: var(--muted); margin: 18px 0 4px; }
.linkbtn { border: 0; background: none; color: var(--brand-dark); font: inherit; text-decoration: underline; padding: 0; cursor: pointer; }

/* ---------- Super Admin "View as staff" preview ---------- */
.preview-bar { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; gap: 10px; background: #FFF1E7; border-bottom: 2px solid var(--brand); padding: 10px 16px; font-size: 13px; }

/* ---------- "View as" preview on a wide screen: draw the app inside a phone ---------- */
/* Super Admin "View as": the staff app runs in a 360px phone window (a real phone width, so every screen lays out as on the phone). */
body.pview-on { overflow: hidden; }
#pview { position: fixed; inset: 0; z-index: 60; background: #E4E8EE; overflow: auto; display: flex; flex-direction: column; align-items: center; }
#pview .preview-bar { position: static; width: 100%; box-sizing: border-box; justify-content: center; flex-wrap: wrap; text-align: center; }
#pview .phone { flex: none; margin: 18px auto 24px; width: 360px; border: 10px solid #111; border-radius: 40px; background: #111; overflow: hidden; box-shadow: 0 14px 44px rgba(0,0,0,.3); }
#pview .phone .sbar { position: relative; height: 28px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; }
#pview .phone .sbar .cam { position: absolute; left: 50%; top: 7px; width: 13px; height: 13px; margin-left: -6px; border-radius: 50%; background: #000; }
#pview .phone iframe { display: block; width: 360px; border: 0; background: var(--bg); }
#pview .phone .hbar { height: 16px; background: #fff; display: flex; align-items: center; justify-content: center; }
#pview .phone .hbar i { width: 110px; height: 4px; border-radius: 2px; background: #222; }
@media (max-width: 499px) {
  #pview .phone { width: 100%; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
  #pview .phone iframe { width: 100%; }
}
/* Inside the phone window: Manager opened from the staff app, with the app's "← Attendance" pill. */
#pmgr { position: fixed; inset: 0; z-index: 70; background: #fff; }
#pmgr iframe { width: 100%; height: 100%; border: 0; display: block; }
#pmgr .pv-back { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); border: 0; border-radius: 20px; padding: 8px 14px; font-size: 13px; color: #fff; background: rgba(31,41,51,.9); }
/* Late slabs table (HR Settings > Late rules) */
/* Top bar: "Name · My profile" */
.top .me-link { display: block; background: none; border: 0; padding: 0; color: #B8C2CC; font-size: 12px; text-align: left; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
/* Staff screen and profiles */
.avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; background: #FFE3D0; color: var(--brand-dark); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.big { width: 96px; height: 96px; font-size: 30px; }
.staff-row { gap: 12px; align-items: center; }
.pf-top { display: flex; align-items: center; gap: 16px; margin: 6px 0 14px; }
.pf-top label.btn { cursor: pointer; }
/* Team: summary table */
.tsum-wrap { overflow-x: auto; margin: 0 -4px; }
.tsum { width: 100%; border-collapse: collapse; font-size: 13px; }
.tsum th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tsum td { padding: 9px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tsum tr[data-act] { cursor: pointer; }
.tsum tr[data-act]:hover td { background: #FFF6F0; }
/* Duty timings: one block per category; on a phone the three times sit under the name */
.dt-row { display: grid; grid-template-columns: minmax(120px, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; padding: 10px 0; border-top: 1px solid var(--line); }
.dt-row:first-child { border-top: 0; }
.dt-name b { display: block; font-size: 14px; }
.dt-name small { display: block; font-size: 12px; }
.dt-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); min-width: 0; }
.dt-row .input { width: 100%; min-width: 0; box-sizing: border-box; padding: 8px 6px; font-size: 14px; }
@media (max-width: 560px) {
  .dt-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dt-name { grid-column: 1 / -1; }
  .dt-row { gap: 6px; }
  .dt-row .input { font-size: 13px; padding: 8px 3px; }
}
/* Late slabs: "Late a to b min" / "Stay back c min after duty end" */
.slab { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13px; }
.slab-l { display: flex; align-items: center; gap: 6px; min-width: 0; }
.slab-l .input { width: 64px; min-width: 0; padding: 8px 6px; box-sizing: border-box; }
.slab-l .btn { margin-left: 4px; }
/* Access table (Admin / Staff) */
table.acc { width: 100%; border-collapse: collapse; font-size: 13px; }
table.acc th { font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 4px; text-align: center; width: 64px; }
table.acc th:first-child { width: auto; }
table.acc td { padding: 8px 4px; border-top: 1px solid var(--line); }
table.acc td:not(:first-child) { text-align: center; }
table.acc tr.sec td { font-weight: 700; font-size: 12px; color: var(--ink); background: #F6F8FA; text-align: left; padding: 7px 6px; }
table.acc input { width: 18px; height: 18px; accent-color: var(--brand); }
table.acc td.c-g, table.acc td.c-r { font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.acc-sum { display: grid; gap: 6px; font-size: 13px; line-height: 1.5; background: #F6F8FA; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 4px 0 10px; }
/* Holidays: one Excel-style table per year */
.hol-yr { font-weight: 800; font-size: 14px; margin: 14px 0 6px; }
.hol-wrap { overflow-x: auto; border: 1px solid #D4D4D4; border-radius: 6px; }
table.hol { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
table.hol th { background: #F3F3F3; color: #333; font-size: 12px; font-weight: 700; text-align: left; padding: 7px 8px; border: 1px solid #D9D9D9; border-top: 0; }
table.hol td { padding: 6px 8px; border: 1px solid #D9D9D9; vertical-align: middle; }
table.hol tr th:first-child, table.hol tr td:first-child { border-left: 0; }
table.hol tr th:last-child, table.hol tr td:last-child { border-right: 0; }
table.hol tr:last-child td { border-bottom: 0; }
table.hol td.n { width: 30px; text-align: center; color: #7A7A7A; background: #FAFAFA; }
table.hol td.a { width: 1%; white-space: nowrap; text-align: right; }
.hol-t { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11.5px; font-weight: 700; }
.hol-national { background: #E8F0FE; color: #1A56B8; }
.hol-festival { background: #FFF1E0; color: #B4541A; }
.hol-company { background: #E1F5EA; color: #1E7A4A; }
/* Late rules card on the punch-in page (read only) */
.late-kv { gap: 6px 12px; }
.late-note { font-size: 13px; margin-top: 10px; line-height: 1.5; }
table.late-tbl { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
table.late-tbl th { background: #F3F3F3; font-size: 12px; font-weight: 700; text-align: left; padding: 6px 8px; border: 1px solid #D9D9D9; }
table.late-tbl td { padding: 6px 8px; border: 1px solid #D9D9D9; }
/* HR inside Manager: tab row at the top, same look as a site page */
.hr-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 0 14px; padding-bottom: 2px; }
.hr-tabs::-webkit-scrollbar { display: none; }
.hr-tabs button { flex: none; padding: 6px 12px; border: 1px solid #E5E7EB; background: #fff; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: #6B7280; cursor: pointer; white-space: nowrap; }
.hr-tabs button.on { background: #171717; color: #fff; border-color: #171717; }
/* Locations > Pick from Google Maps */
.gm-steps { margin: 4px 0 10px; padding-left: 20px; font-size: 13px; line-height: 1.5; }
.gm-steps li { margin-bottom: 6px; }
.pick-map { height: 320px; border-radius: 10px; border: 1px solid var(--line); background: #E8ECEF; cursor: crosshair; }
@media (max-width: 560px) { .pick-map { height: 280px; } }
/* Locations: Live map / Check-in places switch */
.seg { display: inline-flex; gap: 2px; padding: 3px; background: #EEF1F4; border-radius: 9px; margin: 0 0 12px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
/* HR Settings: fold-up cards (title + small dropdown button in one row) */
.card.fold > .fold-hd { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 0; margin: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.card.fold > .fold-hd h3 { flex: 1; margin: 0; }
.fold-btn { flex: none; width: 28px; height: 28px; border-radius: 8px; background: #EEF1F4; color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 13px; transition: transform .15s; }
.card.fold.open > .fold-hd .fold-btn { transform: rotate(180deg); }
.card.fold.open > .fold-hd { margin-bottom: 10px; }
.card.fold:not(.open) > :not(.fold-hd) { display: none !important; }
/* HR inside Manager: Manager's theme (cream paper, Nunito, rounded white cards) */
html.in-mgr { --bg: #FBF7F0; --ink: #171717; --muted: #6B7280; --line: #EDE5DA; --grey-bg: #F3EEE6; }
html.in-mgr, html.in-mgr body { background: #FBF7F0; }
html.in-mgr body { font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif; }
html.in-mgr .card { border-radius: 18px; border-color: #EFE7DC; box-shadow: 0 8px 24px rgba(23,23,23,.05); }
html.in-mgr .hr-tabs button { border-color: #E9E1D6; }
html.in-mgr .seg { background: #F3EEE6; }
html.in-mgr .tsum tr[data-act]:hover td { background: #FFF3EA; }
