/* Meshines People · HR Recruit — same look as Purchase AI (warm canvas, sidebar logo, hero), purple accent from the logo. Mobile first. */
:root {
  --acc: #3355FF; --acc-ink: #1F3FE0; --acc-soft: #EBEFFF;
  --bad: #C92F38; --bad-soft: #FDECEE;
  --bg: #F4F2EE; --card: #FFFFFF; --card2: #FAF9F6; --line: #E7E3DC; --line2: #EFECE6;
  /* H146 (WCAG AA): --muted #71717A -> #66666E (5.0:1 on the page colour), --faint #A1A1AA -> #6E6E77 (4.9:1 on cards);
     --on-green / --on-bad = text on a solid green / red badge (white here, dark ink in dark mode) */
  --ink: #18181B; --ink2: #3F3F46; --muted: #66666E; --faint: #6E6E77;
  --green: #15803D; --green-soft: #E8F6ED; --amber: #A16207; --amber-soft: #FDF6E3; --blue: #1D4ED8; --blue-soft: #EAF0FE;
  --on-green: #FFFFFF; --on-bad: #FFFFFF; --red-solid: #D42A36;
  --r: 16px; --side: 280px;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0E10; --card: #141416; --card2: #17171A; --line: #2A2A2E; --line2: #1F1F23;
    --ink: #FAFAFA; --ink2: #E4E4E7; --muted: #A1A1AA; --faint: #8B8B94;
    --acc-ink: #8EA2FF; --acc-soft: #18204A; --bad: #F87171; --bad-soft: #3A1518;
    --green: #4ADE80; --green-soft: #12291B; --amber: #FACC15; --amber-soft: #2B250E; --blue: #93B4FD; --blue-soft: #16203A;
    --on-green: #0E0E10; --on-bad: #0E0E10;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E0E10; --card: #141416; --card2: #17171A; --line: #2A2A2E; --line2: #1F1F23;
  --ink: #FAFAFA; --ink2: #E4E4E7; --muted: #A1A1AA; --faint: #8B8B94;
  --acc-ink: #8EA2FF; --acc-soft: #18204A; --bad: #F87171; --bad-soft: #3A1518;
  --green: #4ADE80; --green-soft: #12291B; --amber: #FACC15; --amber-soft: #2B250E; --blue: #93B4FD; --blue-soft: #16203A;
  --on-green: #0E0E10; --on-bad: #0E0E10;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 400 15px/1.45 var(--sans); background: var(--bg); color: var(--ink); min-height: 100dvh; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin: 0; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 16px; }
a { color: inherit; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.hide { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 13px; }

/* ---------- skeleton ---------- */
.sk { background: linear-gradient(90deg, var(--line2), var(--line), var(--line2)); background-size: 200% 100%; animation: sk 1.2s infinite linear; border-radius: var(--r); }
@keyframes sk { to { background-position: -200% 0; } }
.sk-hero { height: 220px; margin-bottom: 16px; }
.sk-title { height: 28px; width: 50%; margin-bottom: 16px; }
.sk-grid { display: grid; gap: 12px; } .sk-card { height: 140px; }
@media (min-width: 900px) { .sk-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- sidebar ---------- */
.side { position: fixed; z-index: 40; inset: 0 auto 0 0; width: min(86vw, var(--side)); height: 100dvh; background: var(--card); border-right: 1px solid var(--line);
  transform: translateX(-100%); transition: transform .2s; display: flex; flex-direction: column; overflow: hidden;
  padding-left: env(safe-area-inset-left); }
.side.open { transform: none; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 35; }
.side-logo { display: block; flex: none; padding: 28px 24px 0; text-decoration: none; }
.side-logo img { display: block; width: 172px; height: auto; aspect-ratio: 1235 / 501; }
.side-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 0 12px 12px; margin-top: 26px; }
.side .grp { font-size: 12px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .1em; padding: 18px 14px 6px; }
.side-nav a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: 10px; text-decoration: none; color: var(--ink2); font-size: 15px; }
.side-nav a:hover { background: var(--line2); }
.side-nav a svg { width: 19px; height: 19px; flex: none; color: var(--muted); }
.side-nav a.on { background: var(--card2); color: var(--ink); font-weight: 700; box-shadow: inset 0 0 0 1px var(--line); }
.side-nav a.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--acc); }
.side-nav a.on svg { color: var(--acc); }
.me-card { flex: none; margin: 8px 12px max(12px, env(safe-area-inset-bottom)); padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--card2); display: flex; align-items: center; gap: 6px; }
.me-card .avatar { width: 38px; height: 38px; font-size: 13px; background: var(--acc); color: #fff; }
.me-card .me-text { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
.me-card .me-text b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-card .me-text span { font-size: 12px; color: var(--muted); }
.iconbtn { min-width: 48px; height: 48px; border: 0; background: none; border-radius: 10px; display: inline-grid; place-items: center; cursor: pointer; color: inherit; }
.iconbtn:hover { background: var(--line2); }
.iconbtn svg { width: 22px; height: 22px; }
.iconbtn.sm { min-width: 44px; height: 44px; border: 1px solid var(--line); background: var(--card); }
.iconbtn.sm svg { width: 18px; height: 18px; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 30; height: 56px; background: var(--bg); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; padding: env(safe-area-inset-top) max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left));
  transition: transform .2s; }
.top.hidden-up { transform: translateY(-100%); }
.top-logo img { display: block; width: 89px; height: 36px; }
.top .grow { flex: 1; }
.top .search { display: none; align-items: center; flex: 1; max-width: 560px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; min-height: 48px; }
.top .search .s-ic { padding: 0 10px 0 14px; color: var(--muted); display: grid; } .top .search .s-ic svg { width: 18px; height: 18px; }
.top .search input { flex: 1; min-width: 0; border: 0; background: none; height: 46px; font-size: 16px; outline: none; border-left: 1px solid var(--line); padding: 0 12px; }
.notif { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; border-radius: 12px; font-weight: 700; text-decoration: none; border: 1px solid var(--line); background: var(--card); }
.notif svg { width: 22px; height: 22px; color: var(--acc); }
.notif span { display: none; }
.notif.has { background: var(--acc-soft); border-color: color-mix(in srgb, var(--acc) 40%, transparent); }
.notif #bellDot { position: absolute; top: 10px; left: 26px; width: 8px; height: 8px; border-radius: 50%; background: #E5484D; }
.top .co, .top .today { display: none; }

.main { padding: 16px max(16px, env(safe-area-inset-right)) calc(40px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); max-width: 1500px; }

@media (min-width: 700px) { .notif { padding: 0 16px; } .notif span { display: inline; } .notif #bellDot { left: 30px; } }
@media (min-width: 900px) {
  .side { transform: none; width: var(--side); }
  .scrim, .menu-btn, .top-logo { display: none !important; }
  .top { height: 76px; margin-left: var(--side); padding: 0 28px; }
  .top.hidden-up { transform: none; }
  .top .search { display: flex; }
  .top .co { display: inline; font-weight: 700; letter-spacing: .04em; font-size: 15px; padding: 0 14px; border-right: 1px solid var(--line); }
  .top .today { display: inline; color: var(--muted); font-size: 15px; }
  .main { margin-left: var(--side); padding: 28px 36px 48px; }
  h1 { font-size: 26px; }
}

/* ---------- hero (home) ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; }
.card.pad { padding: 18px 20px; }
.hero { display: grid; gap: 20px; padding: 24px; align-items: center; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--ink2); text-transform: uppercase; }
.hello { font-size: 32px; letter-spacing: -0.03em; margin: 10px 0 6px; line-height: 1.1; }
.hello span { color: var(--acc); }
.hero-sub { margin: 0 0 16px; font-size: 16px; }
.ring { position: relative; justify-self: center; }
.ring svg { display: block; margin: 0 auto; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--line2); stroke-width: 12; }
.ring-fg { fill: none; stroke: var(--acc); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset .6s; }
.ring-txt { position: absolute; top: 0; left: 0; right: 0; height: 160px; display: grid; place-content: center; text-align: center; }
.ring-txt b { font-size: 30px; letter-spacing: -0.03em; }
.ring-txt span { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--ink2); }
@media (min-width: 900px) { .hero { grid-template-columns: 1fr auto; padding: 34px 40px; } .hero .ring { margin-right: 48px; } .hello { font-size: 46px; } }

.sec { font-size: 22px; margin: 28px 0 12px; letter-spacing: -0.02em; }
.sec span { font-size: 15px; font-weight: 400; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.big { font-size: 28px; margin: 8px 0 4px; letter-spacing: -0.02em; }
.big span { font-size: 15px; color: var(--muted); font-weight: 400; }
.cols { display: grid; gap: 12px; }
@media (min-width: 900px) { .cols { grid-template-columns: 1fr 1fr; } }
.stage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
@media (min-width: 640px) { .stage-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .stage-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stage-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-decoration: none; display: grid; gap: 2px; background: var(--card); min-height: 48px; }
.stage-box:hover { border-color: var(--faint); }
.stage-box span { font-size: 14px; } .stage-box b { font-size: 26px; font-weight: 400; } .stage-box small { color: var(--muted); font-size: 13px; }
.stage-box.hot { border-color: color-mix(in srgb, var(--acc) 45%, transparent); background: var(--acc-soft); }
.stage-box.hot small { color: var(--acc-ink); font-weight: 700; }
.due-list { display: grid; }
.due { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 4px; border-top: 1px solid var(--line2); text-decoration: none; min-height: 48px; }
.due-t { font-size: 15px; font-weight: 700; }
.due-s { grid-column: 1; font-size: 13px; color: var(--muted); }
.due .st { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 12px; font-weight: 700; letter-spacing: .06em; padding: 6px 12px; border-radius: 999px; background: #2563EB; color: #fff; white-space: nowrap; }
.due .st.join { background: var(--green); color: var(--on-green); } .due .st.l2 { background: var(--acc); }

/* ---------- page bits ---------- */
.head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.head p { margin: 4px 0 0; color: var(--muted); }
.crumb { display: inline-flex; align-items: center; min-height: 48px; color: var(--muted); text-decoration: none; margin: -8px 0 0; }
.section { margin-top: 24px; }
.grid2 { display: grid; gap: 12px; }
@media (min-width: 760px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); }
.empty .btn { margin-top: 12px; }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.btn:hover { border-color: var(--faint); }
.btn:active { transform: scale(.98); }
.btn.round { border-radius: 999px; padding: 0 22px; }
.btn.primary { background: var(--acc); border-color: var(--acc); color: #fff; }
.btn.primary:hover { background: var(--acc-ink); border-color: var(--acc-ink); }
.btn.good { background: var(--green); border-color: var(--green); color: var(--on-green); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger { color: var(--bad); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }

.form { display: grid; gap: 14px; }
@media (min-width: 760px) { .form.cols { grid-template-columns: 1fr 1fr; } .form .full { grid-column: 1 / -1; } }
.field label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 6px; color: var(--ink2); }
.field label .req { color: var(--bad); }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 12px; font-size: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.field .err { display: none; color: var(--bad); font-size: 13px; margin-top: 4px; }
.field.bad input, .field.bad select, .field.bad textarea { border-color: var(--bad); background: var(--bad-soft); }
.field.bad .err { display: block; }
.field input[type=file] { padding: 10px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ---------- lists ---------- */
.list { display: grid; gap: 8px; }
.item { display: flex; align-items: center; gap: 12px; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 64px; }
.item:hover { border-color: var(--faint); }
.item .grow { flex: 1; min-width: 0; }
.item .t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .s { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--acc-soft); color: var(--acc-ink); display: grid; place-items: center; font-weight: 700; }
.avatar.lg { width: 88px; height: 88px; font-size: 30px; }

.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--card2); color: var(--ink2); border: 1px solid var(--line); }
.pill.shortlisted, .pill.l1, .pill.l2 { background: var(--acc-soft); color: var(--acc-ink); border-color: transparent; }
.pill.selected, .pill.offered { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.pill.joined, .pill.open { background: var(--green-soft); color: var(--green); border-color: transparent; }
.pill.rejected, .pill.closed { background: var(--bad-soft); color: var(--bad); border-color: transparent; }

.funnel { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.funnel span { font-size: 12px; color: var(--ink2); background: var(--card2); border: 1px solid var(--line2); border-radius: 6px; padding: 2px 8px; }
.funnel b { color: var(--ink); }

.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 0 16px 4px; margin: 0 -16px 12px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 44px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.tab b { font-size: 12px; background: var(--card2); border-radius: 99px; padding: 0 7px; }
.tab.on { background: var(--acc); color: #fff; border-color: var(--acc); font-weight: 700; }
.tab.on b { background: rgba(0,0,0,.22); color: inherit; } /* H146: count badge on the blue tab (was a white wash: 3.7:1) */
@media (min-width: 900px) { .tabs { margin: 0 0 12px; padding: 0 0 4px; flex-wrap: wrap; } }

/* ---------- candidate stepper ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; }
.step { display: grid; grid-template-columns: 32px 1fr; gap: 12px; position: relative; padding-bottom: 18px; }
.step:last-child { padding-bottom: 0; }
.step::before { content: ""; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--line); }
.step:last-child::before { display: none; }
.dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700; background: var(--card2); border: 2px solid var(--line); color: var(--muted); }
.step.done .dot { background: var(--green); border-color: var(--green); color: var(--on-green); }
.step.now .dot { background: var(--acc); border-color: var(--acc); color: #fff; }
.step.done::before { background: var(--green); }
.step .st { font-weight: 700; padding-top: 4px; }
.step .sd { color: var(--muted); font-size: 13px; }
.step .act { margin-top: 10px; }

.kv { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 0; }
@media (min-width: 520px) { .kv { grid-template-columns: 1fr 1fr; } }
.kv dt { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.kv dd { margin: 2px 0 0; font-weight: 700; word-break: break-word; }
.profile { display: flex; gap: 16px; align-items: center; }
.profile img.avatar { border: 1px solid var(--line); }

/* ---------- dialog ---------- */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 24px); background: var(--card); color: var(--ink); box-shadow: 0 10px 40px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(0,0,0,.45); }
.dlg-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 1; }
.dlg-b { padding: 16px; }
.x { width: 48px; height: 48px; border: 0; background: transparent; font-size: 24px; cursor: pointer; border-radius: 10px; }

/* ---------- error / toast ---------- */
.error-box { border: 1px solid var(--line); border-left: 3px solid var(--bad); background: var(--bad-soft); border-radius: 12px; padding: 16px; }
.error-box p { margin: 0 0 12px; }
.toast { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: var(--bg);
  padding: 12px 18px; border-radius: 10px; font-weight: 700; z-index: 70; transition: opacity .2s, transform .2s; pointer-events: none; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- sign-in screen ---------- */
body.signed-out .side, body.signed-out .top { display: none; }
body.signed-out .main { margin: 0; max-width: none; }
.login { min-height: calc(100dvh - 56px); display: grid; place-items: center; }
.login .box { width: min(100%, 400px); background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px 20px; display: grid; gap: 16px; }
.login .box img { justify-self: center; width: 180px; height: auto; margin: 4px 0 2px; }
.login h1 { text-align: center; font-size: 20px; }
.login .sub { text-align: center; color: var(--muted); margin: -10px 0 0; }
.login .btn { width: 100%; }
.login .msg { display: none; color: var(--bad); background: var(--bad-soft); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.login .msg.show { display: block; }
/* ---------- list pages like Items & Stock / All Orders ---------- */
.lhead { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 16px; }
.lhead-t { display: flex; align-items: center; gap: 12px; margin-right: auto; min-width: 0; }
.cpill { font-size: 14px; color: var(--muted); background: var(--card2); border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; white-space: nowrap; }
.lhead-tools { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; flex: 1 1 auto; justify-content: flex-end; min-width: 0; }
.lhead-tools > .btn, .lhead-tools > .more { flex: none; }
.sbox { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); flex: 0 1 280px; min-width: 150px; color: var(--muted); }
.sbox svg { width: 18px; height: 18px; flex: none; }
.sbox input { flex: 1; min-width: 0; height: 46px; border: 0; outline: 0; background: none; font-size: 16px; color: var(--ink); }
.sbox:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.fsel { min-height: 48px; padding: 0 32px 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 16px; flex: 0 1 200px; min-width: 110px; text-overflow: ellipsis; }
.fsel:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.more { position: relative; }
.more > summary { list-style: none; min-width: 48px; font-size: 20px; letter-spacing: .05em; }
.more > summary::-webkit-details-marker { display: none; }
.more .menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 230px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 6px; display: grid; }
.more .menu a, .more .menu button { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border: 0; background: none; border-radius: 8px; text-align: left; text-decoration: none; font-size: 14.5px; cursor: pointer; color: var(--ink); }
.more .menu a:hover, .more .menu button:hover { background: var(--line2); }
.more .mfil { display: grid; gap: 8px; padding: 8px 6px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.more .mfil b { font: 700 12px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.more .mfil .fsel { max-width: none; width: 100%; flex: none; }
.more > summary.dot { position: relative; }
.more > summary.dot::after { content: ""; position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--acc); }
.more[open] .menu { min-width: 260px; }
/* desktop: title, count, filter, search and buttons stay on ONE line — the boxes shrink instead of wrapping */
@media (min-width: 1200px) {
  .lhead { flex-wrap: nowrap; }
  .lhead-t { flex: 0 1 auto; min-width: 0; }                /* the filter and search shrink first (factor 10 below); the count only last */
  .lhead-t h1 { flex: none; white-space: nowrap; }
  .lhead-t .cpill { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .lhead-tools { flex: 1 10 auto; min-width: var(--tools-min, 0px); }  /* never narrower than its smallest filter + search + buttons */
  .lhead-tools .fsel { flex: 0 1 190px; min-width: 100px; }
  .lhead-tools .sbox { flex: 0 1 280px; min-width: 120px; }
  .lhead-tools .sbox input { width: 0; }                    /* the search box may get narrow; it never pushes the page sideways */
}
@media (max-width: 760px) {
  .lhead-tools { width: 100%; flex-wrap: wrap; justify-content: flex-start; }
  .sbox { flex: 1 1 100%; }
  .fsel { flex: 1 1 calc(50% - 4px); max-width: none; min-width: 0; width: calc(50% - 4px); }
  #addR { flex: 1; }
}
.gridwrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: auto; max-height: calc(100dvh - 190px); -webkit-overflow-scrolling: touch; }
@media (min-width: 900px) { .gridwrap { max-height: calc(100dvh - 230px); } .main.listmode { padding-bottom: 16px; } }
.gridwrap::-webkit-scrollbar { width: 12px; height: 12px; }
.gridwrap::-webkit-scrollbar-thumb { background: #B8B0A8; border-radius: 8px; border: 3px solid var(--card); }
.gridwrap::-webkit-scrollbar-track { background: var(--card2); }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; }
table.grid th { position: sticky; top: 0; z-index: 2; background: var(--card); text-align: left; vertical-align: bottom; font: 700 12px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 16px 14px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.grid td { padding: 14px; border-bottom: 1px solid var(--line2); vertical-align: middle; white-space: nowrap; }
table.grid td.wrap { white-space: normal; min-width: 240px; }
table.grid tbody tr { cursor: pointer; }
table.grid tbody tr:hover td { background: var(--card2); }
table.grid tbody tr:focus-visible td { background: var(--acc-soft); }
table.grid th.sl, table.grid td.sl { position: sticky; left: 0; z-index: 1; background: var(--card); color: var(--muted); width: 56px; }
table.grid th.sl { z-index: 3; }
table.grid tbody tr:hover td.sl { background: var(--card2); }
table.grid .lnk { color: var(--acc-ink); font-weight: 700; text-decoration: none; }
table.grid .dash { color: var(--faint); }
.nav-sep { height: 1px; background: var(--line); margin: 12px 14px; }
.settabs { margin: 0 0 18px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.captcha { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.captcha img { border-radius: 10px; border: 1px solid var(--line); }
.forgot { font-size: 13.5px; color: var(--muted); }
.forgot summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.forgot p { margin: 0 0 4px; }
.secret { font: 700 20px/1.3 ui-monospace, Consolas, monospace; letter-spacing: .04em; background: var(--acc-soft); color: var(--acc-ink); border-radius: 10px; padding: 12px; text-align: center; user-select: all; word-break: break-all; }

/* ---------- offer letter ---------- */
.letter { background: #fff; color: #111; max-width: 794px; margin: 0 auto; padding: 48px 56px; border: 1px solid var(--line); border-radius: 4px; font-size: 15px; line-height: 1.6; }
.letter-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 3px solid #3355FF; padding-bottom: 14px; margin-bottom: 24px; }
.letter-head img { width: 148px; height: auto; }
.letter-head .addr { text-align: right; font-size: 12px; color: #555; white-space: pre-line; }
.letter-body { white-space: pre-wrap; word-wrap: break-word; font-family: inherit; margin: 0; }
@media (max-width: 600px) { .letter { padding: 24px 18px; font-size: 14px; } }

@media print {
  body { background: #fff; }
  .side, .top, .scrim, .no-print, .toast { display: none !important; }
  .main { margin: 0 !important; padding: 0 !important; max-width: none; }
  .letter { border: 0; padding: 0; max-width: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* =====================================================================
   Text sizes = production dashboard (Geist; body 15px, titles 34px bold, card titles 16px bold,
   numbers 30px bold, menu 14.5px, buttons 14.5px, table headers 11px caps, labels 13.5px)
   ===================================================================== */
body { font-size: 15px; line-height: 1.5; }
h1, .head h1 { font-size: 28px; line-height: 1.1; letter-spacing: -.04em; font-weight: 700; }
@media (min-width: 861px) { h1, .head h1 { font-size: 34px; } }
.head p { font-size: 15px; }
h2 { font-size: 18px; letter-spacing: -.03em; }
h3, .card h3 { font-size: 16px; font-weight: 700; letter-spacing: -.03em; }
.hello { letter-spacing: -.045em; }
@media (min-width: 900px) { .hello { font-size: clamp(34px, 3.6vw, 48px); } }
.hero-sub { font-size: 15.5px; }
.side-nav a { font-size: 14.5px; }
.btn { font-size: 14.5px; }
.btn.sm { min-height: 40px; padding: 0 12px; font-size: 13px; }
.field label, .field legend { font-size: 13.5px; }
.pill { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; height: 24px; }
.toast { font-size: 14px; }
.item .t { font-size: 15px; } .item .s { font-size: 13.5px; }
.kv dt { font-size: 12px; letter-spacing: .08em; }
.sec { font-size: 22px; letter-spacing: -.03em; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.off { display: none !important; }
.nowrap { white-space: nowrap; }
.r { text-align: right; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { display: grid; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; text-decoration: none; min-height: 48px; }
.kpi:hover { border-color: var(--faint); }
.kpi span { font: 700 12px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kpi b { font: 700 30px/1.05 var(--sans); letter-spacing: -.045em; font-variant-numeric: tabular-nums; }

/* bars */
.hbars { display: grid; gap: 4px; margin-top: 10px; }
.hbar { display: grid; grid-template-columns: minmax(0, 9em) 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; text-decoration: none; min-height: 32px; }
.hbar .lab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { height: 8px; background: var(--line2); border-radius: 4px; overflow: hidden; }
.hbar i { display: block; height: 100%; background: var(--acc); border-radius: 4px; }
.hbar b { font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.vbars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; align-items: end; height: 170px; margin-top: 14px; }
.vbar { display: grid; grid-template-rows: auto 1fr auto; height: 100%; text-align: center; font-size: 12px; color: var(--muted); }
.vbar b { color: var(--ink); font-size: 12px; min-height: 16px; }
.vbar i { align-self: end; display: block; background: var(--acc); border-radius: 4px 4px 0 0; min-height: 2px; }
.vbar span { margin-top: 4px; }

/* tables */
.tablewrap { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
table.t { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.t th { text-align: left; font: 700 12px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--card2); white-space: nowrap; }
table.t td { padding: 12px 14px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t td .avatar { width: 36px; height: 36px; font-size: 13px; }
table.t.click tbody tr { cursor: pointer; }
table.t.click tbody tr:hover td { background: var(--card2); }
table.t td.wrap { min-width: 220px; white-space: pre-wrap; }
table.t a { text-decoration: none; }
table.map th { vertical-align: top; text-transform: none; letter-spacing: 0; min-width: 170px; }
table.map select { width: 100%; min-height: 44px; font-size: 14px; margin-top: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); padding: 0 8px; }

/* forms: grouped sections, filters, checkboxes */
.fs { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.fs legend { font: 700 12px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--acc-ink); padding: 0 0 12px; }
.filters { display: grid; gap: 12px; margin-bottom: 14px; }
@media (min-width: 760px) { .filters { grid-template-columns: 2fr 1fr 1fr; align-items: end; } }
.checks { display: grid; gap: 4px; border: 0; padding: 0; margin: 0; }
.chk { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14.5px; cursor: pointer; }
.chk input { width: 20px; height: 20px; accent-color: var(--acc); flex: none; }
.field.filled input, .field.filled select, .field.filled textarea { border-color: var(--acc); background: var(--acc-soft); }
dialog.wide { width: min(820px, calc(100% - 24px)); }
dialog.wide .form { grid-template-columns: 1fr; }
@media (min-width: 700px) { dialog.wide .form { grid-template-columns: 1fr 1fr; } }

/* paste WhatsApp application */
.paste { margin-bottom: 16px; border-color: color-mix(in srgb, var(--acc) 35%, var(--line)); background: linear-gradient(180deg, var(--acc-soft), var(--card) 60%); }
.paste textarea { font-family: ui-monospace, Consolas, monospace; font-size: 14px !important; }
.msg-good { background: var(--green-soft); color: var(--ink); border-left: 3px solid var(--green); padding: 10px 12px; border-radius: 8px; margin: 12px 0 0; font-size: 14.5px; }
.msg-bad { background: var(--bad-soft); border-left: 3px solid var(--bad); padding: 10px 12px; border-radius: 8px; margin: 12px 0 0; }
.results { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.results .bad { color: var(--bad); }
.rawmsg { white-space: pre-wrap; font: 13px/1.5 ui-monospace, Consolas, monospace; background: var(--card2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: 6px 0 0; max-height: 360px; overflow: auto; }
.ok-box { margin-top: 12px; border: 1px solid var(--line); border-left: 3px solid var(--green); background: var(--green-soft); border-radius: 10px; padding: 12px 14px; }
.howto { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 4px; font-size: 14.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { display: grid; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; font-size: 13.5px; background: var(--card2); }
.chip small { color: var(--muted); font-size: 12px; } /* H145: browser default 'smaller' gave 11.25px */
.docup { display: grid; gap: 10px; margin-top: 14px; }
@media (min-width: 760px) { .docup { grid-template-columns: 1fr 2fr auto; align-items: end; } }
.kv.one { grid-template-columns: 1fr; margin: 12px 0 16px; }
.due .st.r-birthday { background: #2563EB; } .due .st.r-anniversary { background: var(--green); color: var(--on-green); } .due .st.r-probation { background: #B45309; } .due .st.r-exit { background: var(--bad); color: var(--on-bad); }
.linkbtn { background: none; border: 0; color: var(--acc-ink); font: 700 13px var(--sans); cursor: pointer; padding: 6px 4px; min-height: 36px; }
.linkbtn.danger { color: var(--bad); }
.starters { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 10px; }
.starter { text-align: left; display: grid; gap: 4px; padding: 14px; border: 1px dashed var(--line); border-radius: 12px; background: var(--card2); cursor: pointer; min-height: 48px; }
.starter:hover { border-color: var(--acc); }
.starter b { color: var(--acc-ink); font-size: 14.5px; } .starter span { font-size: 13px; color: var(--muted); }
.tabs a.tab { text-decoration: none; }

/* =====================================================================
   Letterhead (A4) — matches the printed Meshines Hydraulics letterhead
   ===================================================================== */
.tbar { display: flex; flex-wrap: wrap; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px; position: sticky; top: 64px; z-index: 5; }
@media (min-width: 900px) { .tbar { top: 84px; } }
.tbar button { min-width: 44px; height: 44px; border: 1px solid transparent; background: none; border-radius: 8px; cursor: pointer; font-size: 16px; color: var(--ink); }
.tbar button:hover { background: var(--line2); border-color: var(--line); }
.lh-fit { width: 100%; overflow: hidden; padding: 4px 0 24px; }
.lh-sheet { position: relative; width: 210mm; min-height: 297mm; margin: 0 auto; background: #fff; color: #1d1d1f; box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 12px 40px -12px rgba(0,0,0,.25);
  font: 11pt/1.5 "Geist", Calibri, Carlito, "Nirmala UI", "Noto Sans Tamil", Arial, sans-serif; }
.lh-art { position: absolute; inset: 0; pointer-events: none; }
.lh-shapes { position: absolute; left: 0; top: 0; width: 210mm; height: 297mm; }
.lh-logo { position: absolute; left: 16.6mm; top: 15mm; width: 61mm; height: auto; }
.lh-foot { position: absolute; left: 0; right: 0; bottom: 0; height: 30mm; }
.lh-co { position: absolute; left: 0; right: 0; top: 0; text-align: center; color: #E8323F; font: 500 15pt/1 "Exo 2", "Geist", sans-serif; letter-spacing: .01em; }
.lh-strip { position: absolute; left: 0; right: 0; bottom: 0; height: 19.5mm; background: #E6E7E8; display: grid; grid-template-columns: 29.5mm 1.25fr 1fr 1.2fr 1.25fr; align-items: center; color: #1d1d1f; font: 700 6.6pt/1.25 "Geist", Arial, sans-serif; }
.lh-red { width: 29.5mm; height: 19.5mm; display: block; }
.lh-col { display: flex; align-items: center; gap: 2mm; padding: 0 2.5mm; border-left: .3mm solid #1d1d1f; min-height: 11mm; }
.lh-col:nth-child(2) { border-left: 0; }
.lh-col svg { width: 6mm; height: 6mm; flex: none; }
.lh-flow { position: relative; width: 100%; border-collapse: collapse; }
.lh-flow td { padding: 0 17mm; vertical-align: top; }
.lh-sp-top { height: 56mm; } .lh-sp-bot { height: 36mm; }
.lh-body { min-height: 190mm; outline: none; word-wrap: break-word; }
.lh-body[contenteditable="true"] { cursor: text; }
.lh-body[contenteditable="true"]:focus { box-shadow: 0 0 0 2px rgba(51,85,255,.25); border-radius: 2px; }
.lh-body p { margin: 0 0 3.5mm; } .lh-body h1, .lh-body h2, .lh-body h3, .lh-body h4 { margin: 0 0 3mm; letter-spacing: 0; color: #111; }
.lh-body h3 { font-size: 13pt; } .lh-body ul, .lh-body ol { margin: 0 0 3.5mm; padding-left: 7mm; }
.lh-body table { border-collapse: collapse; width: 100%; margin: 0 0 3.5mm; } .lh-body td, .lh-body th { border: .3mm solid #b9b9b9; padding: 1.5mm 2mm; text-align: left; vertical-align: top; }
.lh-body th { background: #F2F2F2; font-weight: 700; }
.lh-body tr { break-inside: avoid; }
/* section styles from the company's documents */
.lh-body h2:not([style*="center"]) { background: #D7323F; color: #fff; font-size: 12.5pt; padding: 1.6mm 3mm; margin: 5mm 0 3mm; break-after: avoid; }
.lh-body h2[style*="center"] { font-size: 17pt; margin: 2mm 0 2mm; }
.lh-body h3:not([style*="center"]) { font-size: 11.5pt; border-bottom: .4mm solid #D7323F; padding-bottom: 1mm; margin: 5mm 0 2.5mm; break-after: avoid; }
.lh-body h3[style*="center"] { font-size: 14pt; margin: 2mm 0 4mm; }
.lh-body blockquote { margin: 0 0 3.5mm; padding: 2mm 3mm; background: #FFF8E1; border: .3mm solid #F0C36D; }
.lh-body li { margin-bottom: 1mm; }

@page { size: A4; margin: 0; }
@media print {
  .lh-fit { padding: 0; overflow: visible; }
  .lh-sheet { box-shadow: none; margin: 0; zoom: 1 !important; min-height: 0; width: 210mm; }
  .lh-art { position: fixed; left: 0; top: 0; width: 210mm; height: 297mm; }
  .lh-body { min-height: 0; }
  .lh-body:focus { box-shadow: none; }
  .main:has(.lh-fit) > *:not(.lh-fit) { display: none !important; }
  .main:has(.lh-fit) { margin: 0 !important; padding: 0 !important; }
}

/* =====================================================================
   Org chart — printed-chart look + editor
   ===================================================================== */
.osearch { min-width: 200px; } .osearch input { min-height: 48px; }
.org-layout { display: grid; gap: 16px; }
@media (min-width: 1200px) { .org-layout.with-panel { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } }
.orgdoc { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-width: 0; }
.oh { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; border-bottom: 3px solid #EF404A; padding-bottom: 12px; margin-bottom: 18px; }
.oh img { width: 92px; height: auto; }
.oh-t h2 { font-size: 18px; letter-spacing: .04em; margin: 0; }
.oh-t p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.oh-r { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
@media (min-width: 900px) { .oh { grid-template-columns: 120px 1fr auto; } .oh img { width: 110px; } .oh-t { text-align: center; } .oh-t h2 { font-size: 22px; } .oh-r { grid-column: auto; text-align: right; } }
.otop { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.obus { height: 18px; margin: 0 8% 6px; border: 2px solid var(--line); border-bottom: 0; border-radius: 6px 6px 0 0; position: relative; }
.obus::before { content: ""; position: absolute; left: 50%; top: -14px; height: 14px; border-left: 2px solid var(--line); }
.odepts { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); align-items: start; }
.odept { border-radius: 12px; min-width: 0; }
.odh { width: 100%; display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 10px; background: var(--c); color: #fff; font: 700 14.5px/1.2 var(--sans); cursor: default; text-align: center; }
.odh span { font-size: 12px; background: rgba(0,0,0,.22); border-radius: 99px; padding: 2px 8px; } /* H145/H146: was 11px on a white wash */
.editing .odh { cursor: pointer; }
.odb { margin-top: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--card2); display: grid; gap: 6px; min-height: 60px; }
.oteam { display: grid; gap: 6px; padding: 6px 0 2px 8px; border-left: 2px solid color-mix(in srgb, var(--c) 35%, var(--line)); }
.oth { display: flex; align-items: center; justify-content: space-between; gap: 6px; font: 700 12px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--c); padding: 4px 0; }
.oth em { font-style: normal; color: var(--muted); letter-spacing: 0; }
:root[data-theme="dark"] .oth { color: color-mix(in srgb, var(--c) 45%, #fff); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .oth { color: color-mix(in srgb, var(--c) 45%, #fff); } }
.oempty { font-size: 12.5px; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; padding: 10px; text-align: center; }
.oc { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 10px; background: var(--card); border: 1px solid var(--line); border-left: 3px solid color-mix(in srgb, var(--c) 55%, transparent); border-radius: 8px; cursor: pointer; text-align: left; transition: transform .15s, opacity .15s; }
.oc:hover { border-color: var(--faint); }
.oc:focus-visible { outline: 2px solid var(--acc); }
.oc.lead { border: 1.5px solid var(--c); border-left-width: 4px; }
.oc.big { padding: 10px 16px; background: var(--c); color: #fff; border: 0; min-width: 220px; }
.oc.big .otx small { color: rgba(255,255,255,.75); }
.oc.big .oav, .oc.big .otx { color: #fff; } /* H146: the KPI rule '.big span' made the MD's initials and name grey on red / navy (1.3:1) */
.oc.sel { box-shadow: 0 0 0 3px var(--acc-soft), 0 0 0 1px var(--acc); }
.oav { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--c); color: #fff; font: 700 12px/1 var(--sans); overflow: hidden; }
.oc.big .oav { background: var(--red-solid); }
.oav img { width: 100%; height: 100%; object-fit: cover; }
.otx { display: grid; min-width: 0; line-height: 1.25; }
.otx b { font-size: 13.5px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: uppercase; }
.otx small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editing .oc[draggable] { cursor: grab; }
.oc.dragging { opacity: .4; }
.oc.over { box-shadow: 0 0 0 2px var(--acc); transform: scale(1.02); }
.drop.over { outline: 2px dashed var(--acc); outline-offset: 2px; background: var(--acc-soft); }
.oadd { display: flex; gap: 8px; justify-content: center; border-top: 1px dashed var(--line); padding-top: 4px; }
.onew { min-height: 120px; border: 2px dashed var(--line); background: none; color: var(--acc-ink); font: 700 14.5px var(--sans); cursor: pointer; }
.of { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 22px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.opanel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; max-height: 82dvh; overflow-y: auto; box-shadow: 0 -10px 40px rgba(0,0,0,.25); border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom); }
@media (min-width: 1200px) { .opanel { position: sticky; top: 92px; max-height: calc(100dvh - 110px); box-shadow: none; border-radius: var(--r); } }
.opanel .ph { display: flex; justify-content: space-between; align-items: center; padding: 10px 10px 10px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 1; }
.opanel .pb { padding: 16px 18px; display: grid; gap: 14px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw input { position: absolute; opacity: 0; }
.sw span { display: block; width: 40px; height: 40px; border-radius: 10px; background: var(--s); cursor: pointer; border: 3px solid transparent; }
.sw input:checked + span { border-color: var(--card); box-shadow: 0 0 0 2px var(--ink); }
.sw input:focus-visible + span { outline: 2px solid var(--acc); }
.tlist { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 6px; }
.tlist li { display: flex; align-items: center; gap: 6px; } .tlist li span { flex: 1; font-size: 14px; }
@media print {
  body.print-org { background: #fff; }
  body.print-org .side, body.print-org .top, body.print-org .no-print, body.print-org .opanel { display: none !important; }
  body.print-org .main { margin: 0; padding: 0; }
  body.print-org .orgdoc { border: 0; padding: 0; }
  body.print-org .odepts { grid-template-columns: repeat(6, 1fr); }
  body.print-org .oc { break-inside: avoid; }
  body.print-org .orgdoc { page: orgchart; }
}
@page orgchart { size: A3 landscape; margin: 10mm; }

/* totals row, summary tiles, employee links, salary break-up */
table.grid td.r { font-variant-numeric: tabular-nums; }
table.grid tfoot td { position: sticky; bottom: 0; z-index: 2; background: var(--card2); font-weight: 700; border-top: 1px solid var(--line); border-bottom: 0; white-space: nowrap; }
table.grid tfoot td.sl { z-index: 3; }
.elink { color: var(--acc-ink); font-weight: 700; text-decoration: none; }
.elink:hover { text-decoration: underline; }
.nomaster { font-size: 12px; color: var(--muted); margin-left: 6px; white-space: nowrap; }
.stiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; }
@media (min-width: 760px) { .stiles { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.stile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; }
.stile span { font: 700 12px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stile b { font: 700 22px/1.1 var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stile.bad b { color: var(--bad); }
.sbreak { display: grid; gap: 12px; }
@media (min-width: 700px) { .sbreak { grid-template-columns: 1fr 1fr; } }
.sb-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--card2); }
.sb-card h3 { font: 700 12px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.sline { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0; font-size: 14.5px; }
.sline b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sline.sub { color: var(--muted); font-size: 13.5px; }
.sline.tot { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; }
.sline.net b { color: var(--acc-ink); font-size: 16px; }
.rin { min-height: 44px; width: 120px; font-size: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); padding: 0 10px; }
.rin.wide { width: 100%; min-width: 200px; }

/* salary PDF (print sheet, saved with "Save as PDF") */
#printSheet { display: none; }
@media print {
  @page { size: A4; margin: 14mm; }
  body.sheet-print > *:not(#printSheet) { display: none !important; }
  #printSheet { display: block; color: #111; background: #fff; font: 11pt/1.45 "Geist", Arial, sans-serif; }
  #printSheet .ps-head { display: flex; justify-content: space-between; border-bottom: 2px solid #3355FF; padding-bottom: 6px; margin-bottom: 14px; font-size: 12pt; }
  #printSheet h1 { font-size: 18pt; margin: 0 0 4px; letter-spacing: -.02em; }
  #printSheet .ps-sub { color: #555; margin: 0 0 14px; }
  #printSheet .sbreak { grid-template-columns: 1fr 1fr; }
  #printSheet .sb-card, #printSheet .tablewrap { background: #fff; border-color: #ccc; break-inside: avoid; }
  #printSheet .pill { border: 1px solid #999; }
  #printSheet .ps-sum { display: grid; gap: 14px; }
}

/* Wishes: today's people and the poster maker */
.wish-p { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line2); }
.wish-p:first-of-type { border-top: 0; }
.wish-p .grow { min-width: 0; }
.wish-maker { display: grid; gap: 16px; }
@media (min-width: 1000px) { .wish-maker { grid-template-columns: minmax(280px, 360px) 1fr; align-items: start; } }
.wish-maker .form { grid-template-columns: 1fr; }
.wish-prev canvas { width: 100%; height: auto; display: block; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.18); touch-action: none; cursor: grab; }
.wish-prev canvas:active { cursor: grabbing; }
input[type=range] { width: 100%; accent-color: var(--acc); min-height: 44px; }
.due .st.r-wedding { background: #DB2777; }

/* Wishes reminders: three "today" boxes, dashboard strip, notification pills */
.wish-today { display: grid; gap: 12px; }
@media (min-width: 900px) { .wish-today { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.wish-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 12px 0 0; padding: 14px 16px; border-left: 4px solid #FFC233; }
.wish-bar > b { font-size: 15px; }
.wish-bar > a:not(.btn) { text-decoration: none; font-weight: 700; color: var(--ink); min-height: 32px; display: inline-flex; align-items: center; gap: 6px; }
.wish-bar > a:not(.btn) span { font-weight: 400; color: var(--muted); font-size: 13.5px; }
.wish-bar > .btn { margin-left: auto; }
.due .st.wish-now { background: var(--red-solid); } .due .st.wish { background: #6B7280; }

/* Attendance: PagarBook punch report (late / no punch / on time), month report, leave summary */
.bad-t { color: var(--bad); font-weight: 700; }
.stile small { font-size: 12.5px; line-height: 1.3; }
@media (min-width: 760px) { .stiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.att-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 6px; }
@media (min-width: 760px) { .att-tools { flex: none; flex-wrap: nowrap; } }
.att-h h2 { margin: 0; }
.att-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; background: var(--card2); }
.att-bulk .rin.wide { width: auto; flex: 0 1 260px; }
details.att-more > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; min-height: 44px; }
details.att-more > summary::-webkit-details-marker { display: none; }
details.att-more > summary h2 { margin: 0; }
details.att-more > summary::after { content: "\25BE"; color: var(--muted); margin-left: auto; transition: transform .2s; }
details.att-more[open] > summary::after { transform: rotate(180deg); }
.pill.att-cl, .pill.att-el { background: var(--acc-soft); color: var(--acc-ink); border-color: transparent; }
.pill.att-lop { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pill.att-od, .pill.att-hol, .pill.att-wo { background: var(--green-soft); color: var(--green); border-color: transparent; }
.pill.att-perm { background: var(--amber-soft); color: var(--amber); border-color: transparent; }.att-x { min-width: 40px; padding: 0 10px; font-size: 18px; color: var(--bad); }
.att-plus { min-width: 48px; padding: 0 12px; font-size: 22px; line-height: 1; }

/* Employee details form: the page employees open on their phone (/f/<link>) */
.pub-top { max-width: 760px; margin: 0 auto; padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 4px max(16px, env(safe-area-inset-left));
  display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pub-top img { display: block; width: 104px; height: auto; aspect-ratio: 255 / 141.75; }
.pub-top-r { display: flex; align-items: center; gap: 12px; }
.pub-top-r > span { font-size: 12px; font-weight: 700; letter-spacing: .08em; line-height: 1.25; text-transform: uppercase; color: var(--muted); text-align: right; }
@media (max-width: 440px) { .pub-top-r > span { max-width: 90px; } }
.pub-theme { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 99px;
  background: var(--card); color: var(--ink); font-size: 14px; cursor: pointer; flex: none; }
.pub-theme:hover { border-color: var(--faint); }
.pub-theme b { font-weight: 700; }
.pub-theme .i-sun, .pub-theme.is-dark .i-moon { display: none; }
.pub-theme.is-dark .i-sun { display: block; }
.pub-main { max-width: 760px; margin: 0 auto; padding: 8px max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left)); display: grid; gap: 14px; }
.pub-main > form { display: grid; gap: 14px; }
.pub-hero h1 { font-size: 26px; }
.pub-hero .sub { color: var(--muted); margin: 4px 0 12px; }
.pub-who { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.pub-who small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.pub-who b { font-size: 16px; }
.pub-list { margin: 8px 0 0; padding-left: 20px; } .pub-list li { margin: 3px 0; }
.pub-sec h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.pub-sec h2 .num { width: 28px; height: 28px; border-radius: 50%; background: var(--acc); color: #fff; display: inline-grid; place-items: center; font-size: 14px; flex: none; }
.pub-sec > p { margin: 6px 0 14px; color: var(--muted); font-size: 14px; }
.pub-grid { display: grid; gap: 16px; min-width: 0; }
@media (min-width: 700px) { .pub-grid { grid-template-columns: 1fr 1fr; } .pub-grid > .full { grid-column: 1 / -1; } .pub-main { padding-top: 16px; } }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.field legend { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 6px; padding: 0; color: var(--ink2); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { position: relative; display: block; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; }
.seg input:checked + span { border-color: var(--acc); background: var(--acc-soft); color: var(--acc-ink); font-weight: 700; }
.seg input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 2px; }
.field.bad .seg span { border-color: var(--bad); }
.up-list { display: grid; gap: 8px; }
.up-list:not(:empty) { margin-bottom: 8px; }
.up-item { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--card2); }
.up-item img, .up-item .pdf { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; background: var(--line2); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.up-item .nm { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-item .nm small { display: block; color: var(--muted); font-size: 12px; }
.up-add { position: relative; width: 100%; border-style: dashed; cursor: pointer; }
.up-add input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.up-add:focus-within { outline: 2px solid var(--acc); outline-offset: 2px; }
.field.bad .up-add { border-color: var(--bad); background: var(--bad-soft); }
.fam-title { display: block; font-size: 15px; }
.fam-list { display: grid; gap: 12px; margin-bottom: 12px; }
.fam { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--card2); display: grid; gap: 12px; min-width: 0; }
.fam.bad { border-color: var(--bad); }
.fam-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pub-note { border-left: 3px solid var(--amber); background: var(--amber-soft); padding: 12px 14px; border-radius: 10px; }
.pub-decl p { margin: 0 0 10px; font-size: 14.5px; }
.pub-decl .chk { min-height: 48px; }
.pub-submit { display: grid; gap: 12px; }
.pub-submit > .btn { width: 100%; min-height: 52px; font-size: 16px; }
.pub-alert { border: 1px solid var(--line); border-left: 3px solid var(--bad); background: var(--bad-soft); border-radius: 10px; padding: 12px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.bar { height: 6px; border-radius: 99px; background: var(--line2); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--acc); transition: width .2s; }
.pub-done { text-align: center; padding: 32px 18px; }
.pub-done .tick { width: 56px; height: 56px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--green-soft); color: var(--green); margin-bottom: 12px; font-size: 26px; font-weight: 700; }
.pub-done .tick.bad { background: var(--bad-soft); color: var(--bad); }
.pub-foot { max-width: 760px; margin: 0 auto; padding: 0 16px calc(24px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 12.5px; text-align: center; }
@media (prefers-reduced-motion: reduce) { .bar i { transition: none; } }

/* Employee details form: HR's review screen */
.df-prof { flex-wrap: wrap; }
.df-prof > .grow { flex: 1 1 220px; min-width: 0; }
.df-base { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 14px; }
.df-base code { font-size: 14px; word-break: break-all; }
.df-cmp td:first-child { width: 48px; }
.df-cmp .same { color: var(--muted); }
.df-cmp .new { font-weight: 700; }
.df-files { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.df-files a { display: grid; gap: 6px; text-decoration: none; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--card2); font-size: 13px; }
.df-files img, .df-files .pdf { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--line2); display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.df-share { display: grid; gap: 8px; }
.df-share .row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line2); }
.df-share .row:first-child { border-top: 0; }
.df-share .row .grow { flex: 1; min-width: 160px; }

/* =====================================================================
   QA fix list (H142-H145) — phone fit, tap targets, field text. Layout, fonts and colours otherwise unchanged.
   ===================================================================== */
/* H142: nothing may push the page sideways. Grid / flex children may shrink below their text width; long text wraps;
   tab strips scroll inside their own box (overflow-x:auto on .tabs above), the page body never scrolls sideways. */
.cols, .grid2, .list { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .grid2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (min-width: 900px) { .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.item, .item > *, .lhead-t, .head > *, .card > * { min-width: 0; }
.item .grow { overflow-wrap: anywhere; }
.tabs { max-width: 100%; min-width: 0; }
@media (max-width: 760px) {
  .lhead-t { flex-wrap: wrap; }
  .cpill { white-space: normal; overflow-wrap: anywhere; }
  .item { flex-wrap: wrap; }
  .item .t, .item .s { white-space: normal; overflow-wrap: anywhere; }
}
/* H143 / H144: on a phone (or any touch screen) every tap target is at least 48 x 48 px and every field's text is 16px,
   so phones do not zoom in. Desktop with a mouse keeps the compact sizes. */
@media (max-width: 600px), (pointer: coarse) {
  .iconbtn.sm { min-width: 48px; height: 48px; }
  .btn.sm, .tab, .rin, .linkbtn, .odh, .forgot summary, details.att-more > summary, table.map select,
  .more .menu a, .more .menu button { min-height: 48px; }
  .tbar button, .att-x, .linkbtn { min-width: 48px; }
  .tbar button { height: 48px; }
  .sbox { min-height: 50px; } .sbox input { height: 48px; }
  input, select, textarea, .paste textarea, table.map select { font-size: 16px !important; }
}
