/* Sureswift Staff Portal
   Brand: indigo #1a00aa · red #e1221b
   Font: Inter, with the device's own UI font (San Francisco, Segoe UI, Roboto) until it loads or if it can't.
   Layout: indigo side menu on computers, bottom bar on phones. */

:root {
  --brand: #1a00aa;
  --brand-700: #140086;
  --brand-900: #0c0052;
  --brand-50: #f3f1ff;
  --brand-100: #e4e0ff;
  --indigo: var(--brand);          /* older names, still used in a few places */
  --indigo-dark: var(--brand-900);
  --indigo-soft: var(--brand-50);
  --red: #e1221b;
  --red-soft: #fdeceb;
  --green: #0e7a3e;
  --green-soft: #e7f6ed;
  --amber: #8a5a00;
  --amber-soft: #fff4d9;
  --ink: #0f0d26;
  --ink-2: #3d3a58;
  --ink-3: #66637f;
  --muted: var(--ink-2);
  --line: #dcdae9;
  --bg: #eceef6;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 13, 38, .08), 0 6px 20px -6px rgba(26, 0, 170, .14), 0 2px 6px rgba(15, 13, 38, .05);
  --shadow-lift: 0 2px 4px rgba(15, 13, 38, .08), 0 14px 32px -10px rgba(26, 0, 170, .28);
  --side-w: 252px;
  font-size: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); background: var(--bg);
  line-height: 1.55; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6rem; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; font-weight: 800; }
h2 { font-size: 1.1rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .8rem; max-width: 68ch; }
a { color: var(--brand); }
.num, td, .stats b { font-variant-numeric: tabular-nums; }

/* ---------- Icons ---------- */
.ico { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.btn .ico { width: 17px; height: 17px; }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-900) 100%);
  color: #fff; display: flex; flex-direction: column; padding: 18px 14px; gap: 2px;
  border-right: 4px solid var(--red);
}
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; color: #fff; text-decoration: none; }
.logo img { width: 40px; height: 40px; border-radius: 50%; background: #fff; padding: 3px; }
.logo span { font-weight: 800; font-size: 1.05rem; line-height: 1.15; }
.logo small { display: block; font-weight: 600; font-size: .7rem; opacity: .7; letter-spacing: .12em; }
.nav-label { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .55; padding: 14px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px; position: relative;
  color: rgba(255, 255, 255, .84); text-decoration: none;
  padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: .95rem;
}
.nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav a[aria-current="page"] { background: rgba(255, 255, 255, .15); color: #fff; }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--red); }
.nav a:focus-visible { outline: 3px solid #fff; outline-offset: 1px; }
.count { margin-left: auto; background: var(--red); color: #fff; font-size: .75rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .15); padding: 14px 4px 2px; display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.side-foot .who { line-height: 1.25; min-width: 0; }
.side-foot .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .who small { opacity: .72; font-size: .76rem; }
.side-foot button { margin-left: auto; flex: none; background: none; border: 1px solid rgba(255, 255, 255, .35); color: #fff; border-radius: 8px; padding: 5px 9px; font: inherit; font-size: .76rem; font-weight: 600; cursor: pointer; }
.side-foot button:hover { background: rgba(255, 255, 255, .1); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
.top {
  display: flex; align-items: center; gap: 16px; padding: 14px 32px;
  background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10;
}
.top h1 { font-size: 1.25rem; margin: 0; }
.crumb { font-size: .8rem; color: var(--ink-3); font-weight: 600; }
.crumb a { color: var(--brand); text-decoration: none; }
.top .right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.top .role-tag { font-size: .8rem; color: var(--ink-2); font-weight: 600; text-align: right; line-height: 1.3; }
.app { flex: 1; width: 100%; max-width: 1240px; padding: 28px 32px 48px; }
.mobile-top, .tabbar { display: none; }
.footer { color: var(--ink-3); font-size: .78rem; padding: 0 32px 24px; }
.loading { color: var(--ink-2); }

/* Signed out: no menus, centred sign-in */
body.signed-out .shell { display: block; }
body.signed-out .side, body.signed-out .top, body.signed-out .tabbar, body.signed-out .mobile-top { display: none !important; }
body.signed-out .app { max-width: none; padding: 0; }
body.signed-out .footer { text-align: center; padding: 16px; }

/* ---------- Avatars ---------- */
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: var(--brand-100); color: var(--brand); flex: none; object-fit: cover; }
.side .avatar { background: rgba(255, 255, 255, .18); color: #fff; }
.avatar.c1 { background: #ffe5e3; color: #b3180f; }
.avatar.c2 { background: #e2f4ea; color: #0e7a3e; }
.avatar.c3 { background: #fff1d1; color: #8a5a00; }
.avatar.c4 { background: #e0f0ff; color: #0b5394; }

/* ---------- Cards and grids ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 18px; }
.card.narrow { max-width: 460px; margin: 2rem auto; }
.card > h2:first-child, .card-head h2 { margin-bottom: .2rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2, .card-head h1 { margin: 0; }
.card .sub, .sub { color: var(--ink-2); font-size: .9rem; margin: 0 0 14px; }
.grid { display: grid; gap: 18px; margin-bottom: 18px; }
.grid > .card { margin-bottom: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.grid-2 > .card { margin-bottom: 0; }
.g-home { grid-template-columns: 1.4fr 1fr; }
.g-kpi { grid-template-columns: repeat(4, 1fr); }
.span-all { grid-column: 1 / -1; }
.section-title { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin: 26px 0 12px; }

/* ---------- Welcome banner ---------- */
.welcome {
  background: linear-gradient(120deg, var(--brand) 0%, #2a10c4 60%, #3b1fe0 100%);
  color: #fff; border-radius: 18px; padding: 26px 28px; margin-bottom: 18px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap; position: relative; overflow: hidden;
}
.welcome::after { content: ""; position: absolute; right: -70px; top: -70px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .07); pointer-events: none; }
.welcome::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--red); }
.welcome h1 { margin: 0; font-size: 1.65rem; color: #fff; }
.welcome p { margin: 4px 0 0; opacity: .85; }
.welcome .w-right { margin-left: auto; text-align: right; position: relative; z-index: 1; }
.welcome .w-right small { display: block; opacity: .75; font-size: .75rem; margin-bottom: 4px; }
.welcome .mid { background: rgba(255, 255, 255, .16); color: #fff; }

/* ---------- KPI tiles ---------- */
.kpi { padding: 18px 20px; text-decoration: none; color: inherit; display: block; }
a.kpi:hover { border-color: var(--brand-100); }
.kpi .k-top { display: flex; justify-content: space-between; align-items: center; color: var(--ink-2); font-size: .85rem; font-weight: 600; gap: 8px; }
.kpi .k-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; }
.kpi .v { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; }
.kpi .s { font-size: .8rem; color: var(--ink-3); }
.kpi.alert { border-color: #f6c3c0; background: linear-gradient(180deg, #fff, #fff7f6); }
.kpi.alert .k-ico { background: var(--red-soft); color: var(--red); }

/* ---------- To-do list ---------- */
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.todo li:first-child { border-top: 0; padding-top: 2px; }
.todo .t-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--brand-50); color: var(--brand); }
.todo .t-ico.red { background: var(--red-soft); color: var(--red); }
.todo .t-ico.amber { background: var(--amber-soft); color: var(--amber); }
.todo .t-ico.green { background: var(--green-soft); color: var(--green); }
.todo .t { font-weight: 600; }
.todo small { display: block; color: var(--ink-2); font-size: .83rem; font-weight: 500; }
.todo .btn { margin-left: auto; }

/* ---------- Department bars ---------- */
.dept { display: grid; gap: 10px; font-size: .9rem; }
.dept div { display: grid; grid-template-columns: minmax(110px, 170px) 1fr 28px; gap: 12px; align-items: center; }
.dept i { display: block; height: 8px; border-radius: 9px; background: var(--brand); min-width: 6px; }
.dept b { text-align: right; }

/* ---------- Quick links ---------- */
.actions { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.actions a, .actions button {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 11px 10px; border-radius: 10px; color: var(--ink); text-decoration: none;
  font: inherit; font-weight: 600; font-size: .93rem; background: none; border: 0; cursor: pointer;
}
.actions a:hover, .actions button:hover { background: var(--bg); }
.actions .a-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; }
.actions .chev { margin-left: auto; color: var(--ink-3); }
.actions small { display: block; font-weight: 500; color: var(--ink-2); font-size: .8rem; }

/* ---------- Pay ---------- */
.pay-net { font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; color: var(--brand-900); margin: 2px 0; }
.pay-meta { color: var(--ink-2); font-size: .9rem; }
.stub { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.stub:first-child { border-top: 0; }
.stub .s-ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; }
.stub .s-main { flex: 1 1 200px; min-width: 0; }
.stub .s-main b { display: block; }
.stub .s-main small { color: var(--ink-2); font-size: .83rem; }
.stub .s-amt { font-weight: 800; font-size: 1.05rem; text-align: right; white-space: nowrap; }
.stub .s-amt small { display: block; font-weight: 500; color: var(--ink-3); font-size: .75rem; }
.stub .s-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.stub .s-flags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

/* ---------- Profile header ---------- */
.p-card { padding: 0; overflow: hidden; }
.profile-head { display: flex; gap: 22px; align-items: center; padding: 24px; flex-wrap: wrap; }
.profile-head h1 { margin: 0; font-size: 1.55rem; }
.profile-head .meta { color: var(--ink-2); margin: 2px 0 10px; }
.profile-head .acts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.photo {
  width: 104px; height: 104px; border-radius: 22px; object-fit: cover; flex-shrink: 0;
  background: var(--brand-100); color: var(--brand); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line), var(--shadow);
  display: grid; place-items: center; font-size: 2rem; font-weight: 800;
}
.member-id, .mid {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: inherit; font-variant-numeric: tabular-nums; font-weight: 700; font-size: .85rem; letter-spacing: .03em;
  background: var(--brand-50); color: var(--brand-900); border-radius: 8px; padding: 3px 4px 3px 9px; white-space: nowrap;
}
.mid { padding: 3px 9px; }
.member-id .btn { padding: 2px 8px; font-family: inherit; }
.ptabs { display: flex; gap: 2px; border-top: 1px solid var(--line); padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.ptabs button {
  font: inherit; font-weight: 600; font-size: .93rem; color: var(--ink-2); background: none; border: 0; cursor: pointer;
  padding: 13px 12px; border-bottom: 3px solid transparent; white-space: nowrap;
}
.ptabs button:hover { color: var(--ink); }
.ptabs button[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--red); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 22px; margin: 0; font-size: .95rem; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* ---------- Mini ID card (home) ---------- */
.idc { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; max-width: 330px; aspect-ratio: 85.6 / 54; display: grid; grid-template-rows: auto 1fr auto; background: #fff; margin-bottom: 14px; box-shadow: var(--shadow); }
.idc .h { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 3px solid var(--red); }
.idc .h img { height: 26px; }
.idc .h span { background: var(--brand); color: #fff; font-size: .62rem; font-weight: 700; letter-spacing: .1em; padding: 2px 7px; border-radius: 4px; }
.idc .b { display: flex; gap: 12px; align-items: center; padding: 10px 12px; min-width: 0; }
.idc .ph { width: 60px; height: 72px; border-radius: 8px; background: var(--brand-100); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; border: 2px solid var(--brand); object-fit: cover; flex: none; }
.idc .n { font-weight: 800; color: var(--brand-900); font-size: .95rem; line-height: 1.2; }
.idc .t { font-size: .75rem; color: var(--ink-2); }
.idc .i { font-size: .75rem; font-weight: 700; color: var(--brand); margin-top: 6px; font-family: inherit; font-variant-numeric: tabular-nums; }
.idc .f { background: var(--brand); color: #fff; font-size: .62rem; text-align: center; padding: 4px; }

/* ---------- Chips / badges ---------- */
.badge, .chip { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; border-radius: 999px; padding: 3px 10px; white-space: nowrap; background: var(--brand-50); color: var(--brand); }
.badge.active, .badge.approved, .chip.ok { background: var(--green-soft); color: var(--green); }
.badge.on_leave, .badge.submitted, .chip.warn { background: var(--amber-soft); color: var(--amber); }
.badge.exited, .chip.red { background: var(--red-soft); color: #b3180f; }
.badge.paid { background: var(--brand-50); color: var(--brand); }
.badge.admin { background: var(--brand); color: #fff; }
.badge.active::before, .badge.on_leave::before, .badge.exited::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- Forms ---------- */
form { display: grid; gap: 1rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem; }
label { display: grid; gap: .3rem; font-weight: 600; font-size: .93rem; }
label .hint, .hint { font-weight: 500; color: var(--ink-2); font-size: .84rem; }
input, select, textarea {
  font: inherit; font-size: 1rem; padding: .62rem .8rem; border: 1px solid #cfcde0;
  border-radius: 10px; background: #fff; color: var(--ink); width: 100%;
}
textarea { resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #b4b1cc; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--brand-100); border-color: var(--brand); }
button:focus-visible, a:focus-visible, .tab:focus-visible, tr:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none; white-space: nowrap;
  border: 1px solid var(--brand); background: var(--brand); color: #fff;
  border-radius: 10px; padding: .58rem 1rem; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--brand-700); }
.btn.secondary { background: #fff; color: var(--brand); border-color: #d6d3ea; }
.btn.secondary:hover { background: var(--brand-50); border-color: var(--brand-100); }
.btn.soft, .btn.explain { background: var(--brand-50); color: var(--brand); border-color: transparent; }
.btn.soft:hover, .btn.explain:hover { background: var(--brand-100); }
.btn.danger { background: #fff; color: #c0190f; border-color: #f1c2be; }
.btn.danger:hover { background: var(--red-soft); }
.btn.small { padding: .32rem .7rem; font-size: .82rem; border-radius: 8px; }
.btn.light { background: transparent; border-color: rgba(255, 255, 255, .5); color: #fff; }
.btn[disabled] { opacity: .6; cursor: wait; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.row > input, .row > select { width: auto; flex: 1 1 200px; }
.link { background: none; border: 0; color: var(--brand); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; padding: 0; }
.link:hover { text-decoration: underline; }

/* ---------- Toolbar / menus ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .search { flex: 1 1 260px; max-width: 360px; position: relative; }
.toolbar .search input { padding-left: 2.3rem; }
.toolbar .search .ico { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); width: 18px; height: 18px; }
.toolbar select { width: auto; }
.toolbar .end { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.seg { display: inline-flex; background: #fff; border: 1px solid #cfcde0; border-radius: 10px; padding: 3px; flex-wrap: wrap; }
.seg button { font: inherit; font-size: .85rem; font-weight: 600; border: 0; background: none; color: var(--ink-2); padding: 6px 12px; border-radius: 7px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(20, 18, 43, .16); padding: 6px; min-width: 280px; z-index: 30; }
.menu[hidden] { display: none; }
.menu button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 10px; border-radius: 8px; color: var(--ink); background: none; border: 0; font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer; text-align: left; }
.menu button:hover, .menu button:focus-visible { background: var(--brand-50); outline: none; }
.menu button .ico { color: var(--brand); }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--amber-soft); color: var(--amber); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: .85rem; font-weight: 600; }
.filter-chip button { border: 0; background: rgba(0, 0, 0, .06); border-radius: 999px; width: 22px; height: 22px; cursor: pointer; color: inherit; font: inherit; line-height: 1; }

/* ---------- Messages ---------- */
.notice {
  position: fixed; top: 16px; right: 16px; z-index: 60; max-width: 440px;
  padding: .85rem 1.1rem; border-radius: 12px; font-weight: 600; font-size: .93rem;
  box-shadow: 0 12px 32px rgba(20, 18, 43, .18); background: #fff;
}
.notice.ok { color: var(--green); border-left: 5px solid var(--green); }
.notice.err { color: #9c130e; border-left: 5px solid var(--red); }
.callout { background: #fff8e6; border: 1px solid #f3e0ad; padding: .9rem 1.1rem; border-radius: 12px; }
.secret {
  display: inline-block; font-family: inherit; font-variant-numeric: tabular-nums; font-size: 1.1rem;
  background: #fff; border: 2px dashed var(--brand); padding: .3rem .7rem; border-radius: 8px; letter-spacing: .08em;
}
.muted { color: var(--ink-2); font-size: .9rem; }
.empty { color: var(--ink-2); padding: .8rem 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table-card { padding: 0; overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th { text-align: left; font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; padding: 11px 14px; background: #fafafd; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--brand-50); }
.person { display: flex; align-items: center; gap: 12px; }
.person b { display: block; }
.person small { display: block; color: var(--ink-3); font-size: .8rem; }
.table-foot { color: var(--ink-3); font-size: .82rem; margin: -6px 0 18px; }

/* ---------- Sign-in ---------- */
.signin { min-height: calc(100vh - 60px); display: grid; grid-template-columns: 1.05fr 1fr; }
.signin-brand {
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-900) 100%); color: #fff;
  padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
  border-right: 5px solid var(--red);
}
.signin-brand::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; background: rgba(255, 255, 255, .06); }
.signin-brand .logo img { width: 52px; height: 52px; }
.signin-brand .logo span { font-size: 1.3rem; }
.signin-brand h2 { font-size: 2.1rem; font-weight: 800; line-height: 1.15; max-width: 16ch; margin: 0 0 14px; }
.signin-brand ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; opacity: .9; }
.signin-brand li { display: flex; gap: 10px; align-items: center; }
.signin-brand li .ico { color: #ffb4b0; }
.signin-form { display: grid; place-items: center; padding: 40px 24px; }
.signin-form .card { width: 100%; max-width: 440px; margin: 0; padding: 30px; }

/* Sign in with Google */
.btn.google { width: 100%; display: flex; align-items: center; justify-content: center; gap: .7rem; background: #fff; color: var(--ink); border: 1px solid #cfcde0; font-size: 1rem; padding: .85rem 1rem; margin: .4rem 0 1.2rem; }
.btn.google:hover { background: var(--brand-50); border-color: var(--brand); }
.g-mark { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: .9rem; }
.first-time { border-top: 1px solid var(--line); padding-top: 1.2rem; margin-top: .4rem; }
.first-time h2 { font-size: 1.05rem; margin: 0 0 .3rem; }
.step-label { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700; color: var(--red); margin-bottom: .2rem; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Modals ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(21, 19, 43, .55); display: grid; place-items: center; padding: 1rem; }
.modal { background: #fff; border-radius: 16px; padding: 1.5rem; max-width: 460px; width: 100%; border-top: 5px solid var(--red); box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.modal p { margin-bottom: 1.2rem; }
.modal.wide { max-width: 660px; max-height: 90vh; overflow-y: auto; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .6rem; }
.modal-head h2 { margin: 0; }
.sheet-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(21, 19, 43, .5); display: flex; align-items: flex-end; }
.sheet { background: #fff; width: 100%; border-radius: 20px 20px 0 0; padding: 10px 14px 24px; max-height: 85vh; overflow-y: auto; }
.sheet::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 12px; }
.sheet .nav a { color: var(--ink); }
.sheet .nav a[aria-current="page"] { background: var(--brand-50); color: var(--brand); }
.sheet .nav a[aria-current="page"]::before { display: none; }
.sheet .nav-label { color: var(--ink-3); opacity: 1; }

/* ---------- Explain my pay ---------- */
.big-net { font-size: 1.2rem; margin: .4rem 0 1rem; }
.big-net strong { color: var(--brand); font-size: 1.6rem; }
.paybar, .bar { display: flex; height: 14px; border-radius: 14px; overflow: hidden; background: var(--brand-50); margin: 14px 0 10px; }
.paybar .seg, .bar span { display: block; height: 100%; border-radius: 0; padding: 0; }
.seg.net, .dot.net { background: var(--brand); }
.seg.ssnit, .dot.ssnit { background: #2e8b57; }
.seg.tax, .dot.tax { background: var(--red); }
.seg.other, .dot.other { background: #8a8799; }
.paylegend { list-style: none; padding: 0; margin: .7rem 0 1.2rem; display: grid; gap: .35rem; }
.paylegend.two { grid-template-columns: 1fr 1fr; gap: 6px 18px; font-size: .88rem; color: var(--ink-2); }
.paylegend.two strong { float: right; color: var(--ink); }
.dot { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; margin-right: .5rem; vertical-align: -1px; }
.explainer h3 { margin: 1.2rem 0 .5rem; }
ol.explain { padding-left: 1.3rem; display: grid; gap: .7rem; line-height: 1.6; }
ol.explain li.net { background: var(--brand-50); border-radius: 8px; padding: .5rem .7rem; }
ul.checks { list-style: none; padding: 0; display: grid; gap: .4rem; }
table.taxsteps td, table.taxsteps th { padding: .4rem .6rem; }
fieldset.figures { border: 1px dashed #c9c4f5; border-radius: 12px; padding: .8rem 1rem 1rem; margin: 0; }
fieldset.figures legend { font-weight: 700; padding: 0 .4rem; }

/* ---------- Payroll review ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin: 1rem 0; }
.stats > div { background: var(--brand-50); border-radius: 12px; padding: .85rem 1rem; display: grid; gap: .1rem; }
.stats b { font-size: 1.25rem; color: var(--brand); }
.stats span { color: var(--ink-2); font-size: .83rem; }
.run-table td:not(:first-child), .run-table th:not(:first-child) { text-align: right; white-space: nowrap; }

/* ---------- ID card print (CR80: 85.6 x 54 mm) ---------- */
.id-sheet { display: flex; gap: 8mm; flex-wrap: wrap; }
.id-cap { font-size: 8pt; color: #55526b; margin-bottom: 1.5mm; letter-spacing: .1em; }
.id-note { font-size: 9pt; color: #55526b; margin-top: 6mm; max-width: 175mm; }
.id-card {
  width: 85.6mm; height: 54mm; border-radius: 3.2mm; overflow: hidden; position: relative;
  border: .3mm solid #c9c4e8; background: #fff; color: var(--ink);
  display: grid; grid-template-rows: 13mm 1fr 5.5mm;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.id-card .ic-head { display: flex; align-items: center; justify-content: space-between; padding: 0 3mm; border-bottom: .8mm solid var(--red); background: #fff; }
.id-card .ic-logo { height: 10.5mm; width: auto; }
.id-card .ic-tag { background: var(--brand); color: #fff; font-size: 6.5pt; font-weight: 700; letter-spacing: .12em; padding: .8mm 2mm; border-radius: 1mm; }
.id-card .ic-body { display: flex; gap: 3mm; padding: 2.5mm 3mm; align-items: center; }
.id-card .ic-photo { width: 21mm; height: 26mm; border-radius: 1.6mm; object-fit: cover; flex-shrink: 0; background: var(--brand-50); border: .5mm solid var(--brand); display: grid; place-items: center; color: var(--brand); font-size: 14pt; font-weight: 700; }
.id-card .ic-info { min-width: 0; }
.id-card .ic-name { font-size: 10pt; font-weight: 700; line-height: 1.15; margin-bottom: .8mm; color: var(--brand-900); }
.id-card .ic-line { font-size: 7pt; line-height: 1.3; }
.id-card .ic-muted { color: #55526b; }
.id-card .ic-label { margin-top: 1.6mm; font-size: 5.5pt; text-transform: uppercase; letter-spacing: .1em; color: #55526b; }
.id-card .ic-id { font-size: 8.5pt; font-weight: 700; color: var(--brand); letter-spacing: .03em; }
.id-card .ic-foot { background: var(--brand); color: #fff; font-size: 5.5pt; letter-spacing: .04em; display: flex; align-items: center; justify-content: center; }
.id-back { grid-template-rows: 1fr 5.5mm; }
.id-back .ic-back-body { display: flex; gap: 3mm; padding: 3mm; align-items: flex-start; }
.id-back .ic-mark { width: 14mm; height: 14mm; flex-shrink: 0; }
.id-back .ic-small { font-size: 6pt; line-height: 1.35; margin: 0 0 1.4mm; max-width: none; }
.id-back .ic-dates { display: flex; gap: 4mm; font-size: 6pt; color: #55526b; margin-top: 1mm; }
.id-back .ic-sign { margin-top: 4mm; border-top: .25mm solid #55526b; padding-top: .6mm; font-size: 5.5pt; color: #55526b; width: 40mm; }

#print-area { display: none; }
@media print {
  @page { size: A4; margin: 15mm; }
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; }
}

/* ---------- Tablets ---------- */
@media (max-width: 1100px) {
  .g-kpi { grid-template-columns: 1fr 1fr; }
  .g-home { grid-template-columns: 1fr; }
}

/* ---------- Phones ---------- */
@media (max-width: 820px) {
  .shell { display: block; }
  .side, .top { display: none; }
  .mobile-top {
    display: flex; align-items: center; gap: 10px; padding: 10px 16px; position: sticky; top: 0; z-index: 20;
    background: var(--brand); color: #fff; border-bottom: 3px solid var(--red);
  }
  .mobile-top img { width: 34px; height: 34px; border-radius: 50%; background: #fff; padding: 2px; }
  .mobile-top b { font-weight: 800; font-size: 1.02rem; }
  .mobile-top .avatar { margin-left: auto; width: 34px; height: 34px; font-size: .78rem; background: rgba(255, 255, 255, .18); color: #fff; }
  .app { padding: 16px 16px 104px; }
  .footer { padding: 0 16px 100px; }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: #fff; border-top: 1px solid var(--line); padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 16px rgba(20, 18, 43, .06);
  }
  .tabbar a, .tabbar button {
    display: grid; justify-items: center; gap: 3px; font: inherit; font-size: .72rem; font-weight: 600;
    color: var(--ink-3); text-decoration: none; padding: 4px 0; background: none; border: 0; cursor: pointer; position: relative;
  }
  .tabbar .ico { width: 22px; height: 22px; padding: 3px 14px; box-sizing: content-box; border-radius: 99px; }
  .tabbar [aria-current="page"] { color: var(--brand); }
  .tabbar [aria-current="page"] .ico { background: var(--brand-50); }
  .tabbar .count { position: absolute; top: 0; right: calc(50% - 26px); padding: 0 6px; font-size: .65rem; }
  h1 { font-size: 1.35rem; }
  .page-title { display: block !important; }
  .grid-2, .form-grid { grid-template-columns: 1fr; }
  .g-kpi { gap: 12px; }
  .kpi { padding: 14px; }
  .kpi .v { font-size: 1.5rem; }
  .card { padding: 18px; }
  .welcome { padding: 20px; border-radius: 16px; }
  .welcome h1 { font-size: 1.35rem; }
  .welcome .w-right { margin-left: 0; text-align: left; }
  .pay-net { font-size: 1.85rem; }
  .paylegend.two { grid-template-columns: 1fr; }
  .profile-head { padding: 18px; gap: 16px; }
  .profile-head .acts { margin-left: 0; justify-content: flex-start; }
  .photo { width: 84px; height: 84px; font-size: 1.6rem; }
  .toolbar .search { max-width: none; flex-basis: 100%; }
  .toolbar .end { margin-left: 0; width: 100%; }
  .toolbar .end > * { flex: 1; }
  .toolbar .end .btn { width: 100%; }
  .menu { left: 0; right: auto; min-width: 0; width: min(320px, calc(100vw - 32px)); }
  .hide-sm { display: none !important; }
  .staff-table thead { display: none; }
  .staff-table tr { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .staff-table td { border: 0; padding: 0; }
  .todo li { flex-wrap: wrap; }
  .todo .btn { margin-left: 54px; }
  .dept div { grid-template-columns: 110px 1fr 24px; }
  .stub .s-acts { width: 100%; justify-content: flex-start; }
  .notice { left: 12px; right: 12px; top: 12px; max-width: none; }
  .signin { grid-template-columns: 1fr; min-height: 0; }
  .signin-brand { padding: 26px 22px; border-right: 0; border-bottom: 4px solid var(--red); }
  .signin-brand h2 { font-size: 1.5rem; margin-top: 18px; }
  .signin-brand ul { display: none; }
  .signin-form { padding: 20px 14px 32px; }
  .signin-form .card { padding: 22px; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
}
.page-title { display: none; }

/* Quick checks: coloured marks instead of emoji */
ul.checks li { position: relative; padding-left: 1.6rem; }
ul.checks li::before { content: ""; position: absolute; left: 0; top: .45em; width: .75rem; height: .75rem; border-radius: 50%; background: var(--ink-3); }
ul.checks li.ok::before { background: var(--green); }
ul.checks li.warn::before { background: #d08a00; }
#mobile-user { margin-left: auto; }
.upload-box { margin: 8px 0 14px; }
.upload-box > summary { list-style: none; display: inline-flex; }
.upload-box > summary::-webkit-details-marker { display: none; }
.upload-box[open] > summary { margin-bottom: 12px; background: #fff; color: var(--brand); border-color: #d6d3ea; }
@media (max-width: 820px) {
  .staff-table tr { grid-template-columns: 1fr; gap: 6px; }
  .staff-table td .row { justify-content: flex-start !important; padding-left: 50px; }
  .staff-table .person > div { min-width: 0; }
  .staff-table .person small { overflow: hidden; text-overflow: ellipsis; }
}

/* Step-by-step forms (Add an employee) */
.step { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.step.open { border-color: var(--brand-100); box-shadow: 0 0 0 3px var(--brand-50); }
.step-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.step-head small { display: block; color: var(--ink-2); font-size: .85rem; overflow-wrap: anywhere; }
.step-num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: .85rem; background: var(--brand-50); color: var(--brand); }
.step.open .step-num { background: var(--brand); color: #fff; }
.step-num.done { background: var(--green-soft); color: var(--green); }
.step-body { padding: 0 16px 16px; }
.step-body[hidden] { display: none; }

/* ---------- Status (Available / In a meeting / On leave) ---------- */
.presence { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; border-radius: 999px; padding: 2px 9px; white-space: nowrap; background: var(--bg); color: var(--ink-2); }
.presence::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.presence.free { background: var(--green-soft); color: var(--green); }
.presence.meeting { background: var(--red-soft); color: #b3180f; }
.presence.leave { background: var(--amber-soft); color: var(--amber); }
.person .presence, .org-text .presence { margin-top: 3px; }

/* ---------- Leave ---------- */
.span-2 { grid-column: span 2; }
label.check { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
label.check input { width: auto; }
label.check[hidden] { display: none; }

/* ---------- Week calendar ---------- */
.wk { display: grid; grid-template-columns: 40px repeat(5, 1fr); gap: 6px; }
.wk-times { display: flex; flex-direction: column; justify-content: space-between; padding: 38px 0 0; font-size: .7rem; color: var(--ink-3); }
.wk-day { display: grid; grid-template-rows: auto 220px; gap: 6px; min-width: 0; }
.wk-head { text-align: center; font-size: .8rem; color: var(--ink-2); line-height: 1.2; }
.wk-head b { display: block; font-size: 1.05rem; color: var(--ink); }
.wk-day.today .wk-head b { background: var(--brand); color: #fff; border-radius: 999px; width: 28px; margin: 0 auto; }
.wk-body { position: relative; background: repeating-linear-gradient(180deg, #fafafd 0 21px, var(--line) 21px 22px); border-radius: 10px; overflow: hidden; }
.wk-busy { position: absolute; left: 4px; right: 4px; background: var(--brand-100); border-left: 3px solid var(--brand); color: var(--brand-900); border-radius: 6px; font-size: .68rem; font-weight: 600; padding: 2px 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wk-leave { position: absolute; inset: 4px; background: var(--amber-soft); color: var(--amber); border-radius: 8px; display: grid; place-items: center; text-align: center; font-size: .78rem; font-weight: 700; padding: 6px; }
.wk-leave.pending { background: repeating-linear-gradient(135deg, #fff8e6 0 8px, #fff1cc 8px 16px); }

/* ---------- Org chart ---------- */
.org-wrap { overflow-x: auto; }
.org, .org ul { list-style: none; margin: 0; padding: 0; }
.org { display: flex; justify-content: center; gap: 24px; min-width: max-content; padding: 8px; }
.org ul { display: flex; justify-content: center; gap: 16px; padding-top: 22px; position: relative; }
.org li { display: flex; flex-direction: column; align-items: center; position: relative; padding-top: 22px; }
.org > li { padding-top: 0; }
.org ul > li::before { content: ""; position: absolute; top: 0; left: 50%; height: 22px; border-left: 2px solid var(--brand-100); }
.org ul > li::after { content: ""; position: absolute; top: 0; left: 0; right: 0; border-top: 2px solid var(--brand-100); }
.org ul > li:first-child::after { left: 50%; }
.org ul > li:last-child::after { right: 50%; }
.org ul > li:only-child::after { display: none; }
.org li > ul::before { content: ""; position: absolute; top: 0; left: 50%; height: 22px; border-left: 2px solid var(--brand-100); }
.org-card {
  display: flex; align-items: center; gap: 10px; text-align: left; width: 220px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer;
  font: inherit; color: var(--ink); box-shadow: var(--shadow); border-top: 3px solid var(--brand);
}
.org-card:hover { border-color: var(--brand-100); background: var(--brand-50); }
.org-card.me { border-top-color: var(--red); }
.org-text { display: grid; min-width: 0; }
.org-text b { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-text small { color: var(--ink-2); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 10px; }
.org-list .org-card { width: auto; }
.dept-groups .card h2 { margin: 0; }

/* ---------- Photo guide ---------- */
.photo-guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px 0 16px; }
.photo-guide figure { margin: 0; border-radius: 12px; overflow: hidden; border: 2px solid var(--line); background: #fff; }
.photo-guide figure.good { border-color: var(--green); }
.photo-guide img { width: 100%; aspect-ratio: 5 / 6; object-fit: cover; display: block; }
.photo-guide figcaption { padding: 8px 10px; font-size: .8rem; display: grid; gap: 2px; }
.photo-guide .good b { color: var(--green); }
.photo-guide .bad b { color: #b3180f; }
.photo-guide small { color: var(--ink-2); }
.photo-review figure { margin: 0; text-align: center; }
.photo-review { border-color: #f3e0ad; }

@media (max-width: 820px) {
  .span-2 { grid-column: 1 / -1; }
  .photo-guide { grid-template-columns: repeat(2, 1fr); }
  .wk { grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .wk-times { display: none; }
  .wk-day { grid-template-rows: auto 180px; }
  .wk-busy { font-size: 0; padding: 0; }
  /* Org chart on phones: an indented list instead of a wide tree */
  .org, .org ul { display: block; min-width: 0; padding: 0; }
  .org li { display: block; padding: 0; }
  .org li::before, .org li::after, .org li > ul::before { display: none !important; }
  .org ul { margin-left: 18px; padding-left: 12px; border-left: 2px solid var(--brand-100); }
  .org-card { width: 100%; margin: 6px 0; }
}

/* Org chart groups: company directors and departments */
.org-dept { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: 14px; padding: 10px; box-shadow: var(--shadow); }
.org-dept.directors { border-top-color: var(--red); background: linear-gradient(180deg, #fff, var(--brand-50)); }
.org-dept-name { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 0 4px 8px; }
.org-dept-people { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.org-dept .org-card { box-shadow: none; }
.org-note { color: var(--brand) !important; font-weight: 600; }
@media (max-width: 820px) { .org-dept-people { display: grid; } .org-dept { margin: 6px 0; } }

/* Reminders */
.rem-list { display: grid; gap: 6px; max-height: 45vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.rem-row { align-items: flex-start !important; padding: 8px; border-radius: 8px; }
.rem-row:hover { background: var(--bg); }
.rem-row input { margin-top: 4px; }
.rem-row small { display: block; color: var(--ink-2); font-weight: 500; font-size: .82rem; }
.org-works { display: block; color: var(--ink-2); font-size: .76rem; margin: -4px 4px 8px; text-align: center; }
.org-dept.team { border-top-color: var(--brand-100); background: #fcfcff; }
.works-list { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; font-size: .9rem; }
.works-list li { background: var(--bg); border-radius: 10px; padding: 8px 12px; }
/* Wide org chart on a computer: stacked layout */
.org-wrap.vertical .org, .org-wrap.vertical .org ul { display: block; min-width: 0; padding: 0; }
.org-wrap.vertical .org li { display: block; padding: 0; }
.org-wrap.vertical .org li::before, .org-wrap.vertical .org li::after, .org-wrap.vertical .org li > ul::before { display: none !important; }
.org-wrap.vertical .org ul { margin-left: 22px; padding-left: 16px; border-left: 2px solid var(--brand-100); }
.org-wrap.vertical .org-dept { margin: 8px 0; }
.org-wrap.vertical .org-dept-people { justify-content: flex-start; }
.org-wrap.vertical .org-works, .org-wrap.vertical .org-dept-name { text-align: left; }


/* =====================================================================
   Contrast and depth (Nov 2026): clearer text, cards that lift off the page,
   coloured accents so important numbers stand out.
   ===================================================================== */
body { background: radial-gradient(1200px 600px at 100% -10%, #e2ddff 0%, transparent 60%), var(--bg); background-attachment: fixed; }
.top { box-shadow: 0 1px 0 var(--line), 0 6px 18px -12px rgba(15, 13, 38, .25); }
.top h1 { font-size: 1.4rem; color: var(--brand-900); }
.card { border-color: #d9d6ea; box-shadow: var(--shadow); }
.card h2, .card-head h2 { color: var(--brand-900); font-weight: 800; font-size: 1.12rem; }
.card-head { padding-bottom: 12px; border-bottom: 1px solid #ecebf5; }
.sub, .card .sub, .muted, label .hint, .hint { color: var(--ink-2); }
.section-title { color: var(--brand); font-size: .8rem; }
.section-title::after { content: ""; display: block; height: 2px; width: 40px; background: var(--red); margin-top: 6px; border-radius: 2px; }

/* Number tiles: colour strip, tinted icon, big number */
.kpi { position: relative; overflow: hidden; border-top: 0; }
.kpi::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--brand); }
.g-kpi > .kpi:nth-child(2)::before { background: #0f9d8a; }
.g-kpi > .kpi:nth-child(3)::before { background: var(--red); }
.g-kpi > .kpi:nth-child(4)::before { background: #e39b00; }
.g-kpi > .kpi:nth-child(2) .k-ico { background: #def6f2; color: #0b7a6b; }
.g-kpi > .kpi:nth-child(4) .k-ico { background: #fff1d1; color: #9a6400; }
.kpi .k-top { color: var(--ink-2); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.kpi .v { color: var(--brand-900); font-size: 2.3rem; line-height: 1.1; margin-top: 8px; }
.kpi .s { color: var(--ink-2); font-weight: 500; }
a.kpi:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); transition: box-shadow .15s, transform .15s; }

/* Lists and to-dos */
.todo li { padding: 14px 10px; margin: 0 -10px; border-radius: 12px; border-top-color: #ecebf5; }
.todo li:hover { background: var(--brand-50); }
.todo .t { color: var(--ink); font-weight: 700; }
.todo .t-ico { box-shadow: inset 0 0 0 1px rgba(26, 0, 170, .08); }
.actions .a-ico, .stub .s-ico, .kpi .k-ico { box-shadow: inset 0 0 0 1px rgba(26, 0, 170, .1); }
.stub { border-top-color: #ecebf5; }
.stub .s-amt { color: var(--brand-900); }
.dept i { background: linear-gradient(90deg, var(--brand), #4b2cf0); height: 10px; }
.facts dt { color: var(--ink-2); }
.facts dd { color: var(--ink); font-weight: 700; }

/* Tables */
th { background: var(--brand-50); color: var(--brand-900); border-bottom: 2px solid #d6d1f5; }
td { border-bottom-color: #ecebf5; }
tbody tr.clickable:hover { background: #f4f2ff; box-shadow: inset 4px 0 0 var(--brand); }
.person b { color: var(--ink); }

/* Buttons and labels */
.btn { box-shadow: 0 1px 2px rgba(15, 13, 38, .12); }
.btn:not(.secondary):not(.soft):not(.explain):not(.danger):not(.light):not(.google) { background: linear-gradient(180deg, #2a10c4, var(--brand)); border-color: var(--brand-700); box-shadow: 0 2px 6px -1px rgba(26, 0, 170, .45); }
.btn:not(.secondary):not(.soft):not(.explain):not(.danger):not(.light):not(.google):hover { background: var(--brand-700); }
.btn.secondary { border-color: #c9c3ef; color: var(--brand-700); }
.btn.secondary:hover { border-color: var(--brand); }
.badge.active, .presence.free { background: #d9f2e3; color: #08652f; }
.badge.on_leave, .presence.leave { background: #ffecbf; color: #7a4d00; }
.badge.exited, .presence.meeting { background: #fdd9d6; color: #a3150c; }
.mid, .member-id { background: #e6e1ff; color: var(--brand-900); }
input, select, textarea { border-color: #c4c0dc; background: #fff; }

/* Welcome banner: a little more depth */
.welcome { box-shadow: 0 18px 40px -18px rgba(26, 0, 170, .6); }

/* Org chart */
.org-card { border-color: #d9d6ea; }
.org-dept { border-color: #d9d6ea; }
.org-dept-name { color: var(--brand); }
.org-works { color: var(--ink-2); }

/* ---------- Payroll review table: easy to follow ---------- */
.run-table { font-size: .92rem; }
.run-table th, .run-table td { padding: 12px 14px; }
.run-table th { position: sticky; top: 0; z-index: 1; }
.run-table td.who { min-width: 190px; max-width: 280px; white-space: normal; }
.run-table td.who b { display: block; color: var(--ink); font-size: .98rem; }
.run-table td.who .meta { display: block; color: var(--ink-2); font-size: .8rem; }
.nowrap { white-space: nowrap; }
.run-table td:not(.who) { white-space: nowrap; }
.run-table td.who .meta.extra { white-space: normal; color: #7a4d00; font-weight: 600; margin-top: 2px; }
.run-table tbody tr:nth-child(even) td { background: #f8f7ff; }
.run-table tbody tr:hover td { background: #eeebff; }
.run-table td.net, .run-table th.net { background: #e9e5ff !important; color: var(--brand-900); font-weight: 800; border-left: 2px solid #cfc7ff; }
.run-table tfoot td { border-top: 2px solid var(--brand); border-bottom: 0; background: var(--brand-50); font-weight: 800; color: var(--brand-900); }
.run-table tfoot td.net { background: var(--brand) !important; color: #fff; border-left-color: var(--brand); }
.stats > div { border: 1px solid #d6d1f5; box-shadow: var(--shadow); }
.stats > div:first-child { background: var(--brand); }
.stats > div:first-child b, .stats > div:first-child span { color: #fff; }
@media (max-width: 820px) {
  /* Phones: each person becomes a small card with labelled figures */
  .run-table thead { display: none; }
  .run-table, .run-table tbody, .run-table tfoot, .run-table tr { display: block; width: 100%; }
  .run-table tr { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; background: #fff; }
  .run-table td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 7px 12px; text-align: right !important; }
  .run-table td::before { content: attr(data-label); color: var(--ink-2); font-weight: 600; text-align: left; }
  .run-table td.who { display: block; text-align: left !important; min-width: 0; background: var(--brand-50) !important; border-bottom: 1px solid var(--line); }
  .run-table td.who::before { content: none; }
  .run-table td.who .meta { white-space: normal; }
  .run-table td.net { border-left: 0; }
  .run-table tbody tr:nth-child(even) td { background: #fff; }
  .run-table tfoot tr { border: 2px solid var(--brand); }
}
.cal-status { display: flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600; color: var(--ink-2); background: var(--bg); border-radius: 10px; padding: 8px 12px; margin: 0 0 12px; max-width: none; }
.cal-status.ok { background: #e3f6eb; color: #08652f; }
.cal-status .ico { width: 18px; height: 18px; flex: none; }

/* Block time */
.block-form { background: var(--brand-50); border: 1px solid #d6d1f5; border-radius: 12px; padding: 14px; margin: 0 0 14px; }
.wk-busy.mine { background: var(--brand); color: #fff; border-left-color: var(--red); display: flex; align-items: flex-start; gap: 4px; padding-right: 2px; }
.wk-busy.mine .wk-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.wk-x { border: 0; background: rgba(255, 255, 255, .2); color: #fff; border-radius: 4px; width: 18px; height: 18px; line-height: 1; cursor: pointer; font: inherit; font-weight: 700; flex: none; }
.wk-x:hover { background: rgba(255, 255, 255, .4); }
@media (max-width: 820px) { .wk-busy.mine .wk-label { display: none; } .wk-busy.mine { justify-content: center; } }
.wk-leave.holiday { background: #dff5e8; color: #08652f; flex-direction: column; display: flex; justify-content: center; gap: 2px; }
.wk-leave.holiday small { font-weight: 600; font-size: .7rem; opacity: .9; }
.wk-busy.mine { background: #3b22d4; }
.wk-busy.mine.block { background: var(--brand-900); }
.wk-busy.mine.company { background: #0f7d6e; border-left-color: #f2b300; }
a.wk-x { display: grid; place-items: center; text-decoration: none; font-size: .6rem; }
.rem-list[hidden] { display: none; }

/* Profile photo: pops out on hover, opens full size on click */
img.zoomable { cursor: zoom-in; position: relative; transition: transform .25s ease, box-shadow .25s ease; transform-origin: left center; }
.idc img.zoomable { transform-origin: center; }
@media (hover: hover) {
  img.zoomable:hover, img.zoomable:focus-visible { transform: scale(1.9); z-index: 20; box-shadow: 0 0 0 4px #fff, 0 24px 50px -10px rgba(15, 13, 38, .55); }
}
.p-card { overflow: visible; }
.idc img.zoomable:hover { transform: none; box-shadow: none; }  /* the small ID card keeps its shape: click to open */
.lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(12, 0, 82, .82); display: grid; place-items: center; padding: 20px; animation: lb-in .18s ease; }
.lightbox figure { margin: 0; max-width: min(520px, 92vw); }
.lightbox img { width: 100%; max-height: 78vh; object-fit: contain; border-radius: 18px; background: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); border: 4px solid #fff; }
.lightbox figcaption { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #fff; font-weight: 700; margin-top: 12px; }
@keyframes lb-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

/* Photo as the control: camera mark on hover, upload from the full view */
.photo-wrap { position: relative; display: inline-block; flex-shrink: 0; }
.photo-cam { position: absolute; right: -6px; bottom: -6px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 3px #fff; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 21; }
.photo-cam .ico { width: 15px; height: 15px; }
.photo-wrap:hover .photo-cam, .photo-wrap:focus-within .photo-cam { opacity: 1; }
@media (hover: none) { .photo-cam { opacity: .9; } }
div.zoomable.can-change { cursor: pointer; }
div.zoomable.can-change:hover { transform: none; box-shadow: 0 0 0 3px var(--brand-100); }
.lightbox-empty { width: min(360px, 80vw); aspect-ratio: 1; border-radius: 18px; background: var(--brand-100); color: var(--brand); display: grid; place-content: center; text-align: center; font-size: 4rem; font-weight: 800; border: 4px solid #fff; }
.lightbox-empty small { display: block; font-size: 1rem; font-weight: 600; }
.lightbox figcaption .row { gap: 8px; }

/* ID card preview (on screen, before printing) */
.id-preview { background: repeating-linear-gradient(45deg, #f3f2fa 0 10px, #eceaf6 10px 20px); border-radius: 14px; padding: 18px; overflow-x: auto; }
.id-preview .id-sheet { justify-content: center; gap: 20px; }
.id-preview .id-card { box-shadow: 0 10px 28px -8px rgba(15, 13, 38, .35); }
.id-preview .id-cap { font-weight: 700; color: var(--ink-2); }

/* =====================================================================
   Stylish ID card: deep indigo to white gradient (Home preview, print preview, printed card)
   ===================================================================== */
.idc, .id-card { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
/* Front body */
.idc .b, .id-card:not(.id-back) .ic-body {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 140% at 115% 120%, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, .55) 22%, rgba(255, 255, 255, 0) 45%),
    linear-gradient(125deg, #08003d 0%, #12007a 38%, #2a10c4 62%, #8f84ff 84%, #ffffff 100%);
  color: #fff;
}
.idc .b::after, .id-card:not(.id-back) .ic-body::after {
  content: ""; position: absolute; right: -18%; top: -55%; width: 70%; height: 160%;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); pointer-events: none;
}
.idc .b > *, .id-card .ic-body > * { position: relative; z-index: 1; }
/* Photo: white frame */
.idc .ph, .id-card .ic-photo { border-color: #fff !important; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); background: #e9e5ff; }
/* Text on the dark part */
.idc .n, .id-card:not(.id-back) .ic-name { color: #fff !important; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.idc .t, .id-card:not(.id-back) .ic-line, .id-card:not(.id-back) .ic-muted { color: rgba(255, 255, 255, .88) !important; }
.id-card:not(.id-back) .ic-label { color: rgba(255, 255, 255, .7); }
/* Member ID on a white pill */
.idc .i, .id-card:not(.id-back) .ic-id {
  display: inline-block; background: #fff; color: var(--brand-900) !important; border-radius: 999px;
  padding: 1px 8px; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); letter-spacing: .03em;
}
.id-card:not(.id-back) .ic-id { padding: .2mm 2mm; }
/* Header stays white for the logo; red accent line; tag in indigo */
.idc .h, .id-card .ic-head { background: #fff; border-bottom: 3px solid var(--red); }
/* Footer: deep indigo with a thin red top line */
.idc .f, .id-card .ic-foot { background: linear-gradient(90deg, #08003d, #1a00aa); border-top: 2px solid var(--red); letter-spacing: .06em; }
.idc { border: 0; box-shadow: 0 14px 30px -12px rgba(12, 0, 82, .55), 0 0 0 1px rgba(12, 0, 82, .08); }
/* Back: lighter gradient so the small print stays easy to read */
.id-back .ic-back-body { background: linear-gradient(135deg, #ffffff 0%, #f1efff 55%, #d9d3ff 100%); }

/* Staff photos in lists */
img.avatar.photo-av { object-fit: cover; background: var(--brand-100); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--brand-100); }
.staff-table .avatar { width: 42px; height: 42px; }

/* Default picture: the company logo when someone has no photo yet */
img.avatar { object-fit: cover; }
img.avatar.logo-av { object-fit: contain; background: #fff; padding: 3px; box-shadow: 0 0 0 1px var(--line); }
img.avatar.on-dark.logo-av { box-shadow: 0 0 0 2px rgba(255, 255, 255, .5); }
img.avatar.photo-av.on-dark { box-shadow: 0 0 0 2px rgba(255, 255, 255, .6); }
img.avatar.lg-av { width: 56px; height: 56px; }
.avatar-btn { border: 0; background: none; padding: 0; margin-left: auto; cursor: pointer; border-radius: 50%; display: grid; }
.avatar-btn .avatar { width: 34px; height: 34px; }
.default-photo { background: #fff !important; display: grid; place-items: center; overflow: hidden; }
.default-photo img { width: 78%; height: 78%; object-fit: contain; }
.lightbox-empty { background: #fff; color: var(--ink-2); }
.lightbox-empty img { width: 62%; height: auto; margin: 0 auto 8px; display: block; }

/* New version ready */
.update-bar { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 3000;
  display: flex; align-items: center; gap: 14px; max-width: calc(100% - 32px);
  background: var(--brand-900); color: #fff; padding: 10px 12px 10px 18px; border-radius: 14px;
  box-shadow: 0 12px 30px rgba(12, 0, 82, .3); font-weight: 600; font-size: 14px; }
.update-bar .btn { background: #fff; background-image: none; color: var(--brand); box-shadow: none; padding: 8px 16px; white-space: nowrap; }
@media (min-width: 900px) { .update-bar { bottom: 24px; } }

/* ---- E-signature (ID card) ---- */
.sig-editor .sub { margin-bottom: .8rem; }
.sig-pad-wrap { position: relative; border: 2px dashed #b9b2e8; border-radius: 14px; background: #fff; touch-action: none; }
.sig-pad { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; cursor: crosshair; touch-action: none; border-radius: 12px; }
.sig-baseline { position: absolute; left: 6%; right: 6%; bottom: 24%; border-top: 2px solid #d9d4ff; pointer-events: none; }
.sig-show { background: #fff; border: 1px solid var(--line, #e3e0f3); border-radius: 12px; padding: .8rem 1rem; max-width: 420px; }
.sig-show img { display: block; max-width: 100%; max-height: 110px; }
.id-back .ic-sign-wrap { margin-top: 2mm; width: 40mm; }
.id-back .ic-sig { display: block; height: 7mm; max-width: 40mm; object-fit: contain; object-position: left bottom; margin-bottom: -.6mm; }
.id-back .ic-sign-wrap .ic-sign { margin-top: 0; }


/* ---- Sign-in code (2-step) ---- */
.twostep-setup p { margin: 0 0 .8rem; }
.twostep-setup .qr { background: #fff; border: 1px solid var(--line, #e3e0f3); border-radius: 14px; padding: 12px; width: max-content; margin: 0 0 1rem; }
.twostep-setup .qr img { display: block; width: 200px; height: 200px; }
.twostep-setup details { margin: 0 0 1rem; }
.twostep-setup summary { cursor: pointer; font-weight: 600; color: var(--brand, #1a00aa); }
.twostep-setup .key { font-family: inherit; font-variant-numeric: tabular-nums; font-size: 1rem; word-break: break-all; background: #f5f4ff; padding: .6rem .8rem; border-radius: 8px; margin: .6rem 0; }

/* =====================================================================
   Depth and contrast, round 2 (22 Nov 2026): a deeper page so white cards
   stand out, tinted card headers, stronger shadows, darker text and a
   clearer menu. Colours keep at least WCAG AA contrast.
   ===================================================================== */
:root {
  --bg: #dde0ee;
  --line: #c9c5e2;
  --ink-2: #312e4c;
  --ink-3: #4f4c6a;
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 1px 2px rgba(15, 13, 38, .12), 0 12px 30px -12px rgba(26, 0, 170, .34), 0 4px 10px -4px rgba(15, 13, 38, .10);
  --shadow-lift: 0 2px 4px rgba(15, 13, 38, .12), 0 24px 46px -16px rgba(26, 0, 170, .46);
}
body {
  background:
    radial-gradient(1100px 520px at 105% -12%, #cfc7ff 0%, transparent 60%),
    radial-gradient(900px 520px at -12% 112%, #e4ddff 0%, transparent 62%),
    var(--bg);
  background-attachment: fixed;
}

/* Top bar: solid white, clear edge */
.top { background: #fff; border-bottom: 1px solid #cdc9e4; box-shadow: 0 10px 24px -18px rgba(15, 13, 38, .55); }

/* Cards: firmer edge, deeper shadow, tinted header strip */
.card { --pad: 22px; padding: var(--pad); border: 1px solid #ccc8e4; border-radius: 16px; box-shadow: var(--shadow); }
.card > .card-head:first-child, .card > h2:first-child {
  margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) 16px;
  padding: 14px var(--pad);
  background: linear-gradient(180deg, #f5f3ff 0%, #ece8ff 100%);
  border-bottom: 1px solid #d8d2f6;
  border-radius: 15px 15px 0 0;
}
.card > h2:first-child { display: block; font-size: 1.12rem; }
.card > .card-head:first-child h2::before, .card > h2:first-child::before {
  content: ""; display: inline-block; width: 4px; height: .95em; margin-right: 9px; vertical-align: -1px;
  border-radius: 2px; background: var(--red);
}
.card h2, .card-head h2 { color: var(--brand-900); }
.card:hover { box-shadow: var(--shadow), 0 0 0 1px rgba(26, 0, 170, .06); }

/* Number tiles and banner pop more */
.kpi { border: 1px solid #ccc8e4; }
.welcome { box-shadow: 0 22px 44px -20px rgba(26, 0, 170, .75), inset 0 1px 0 rgba(255, 255, 255, .18); }

/* Side menu: the current page is a clear white pill */
.side { box-shadow: 6px 0 24px -12px rgba(12, 0, 82, .7); }
.nav a { color: #e9e6ff; }
.nav a[aria-current="page"] { background: #fff; color: var(--brand-900); font-weight: 700; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .55); }
.nav a[aria-current="page"] .ico { color: var(--brand); }

/* Form fields: easier to see */
input, select, textarea { border: 1.5px solid #b9b4d6; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(26, 0, 170, .14); outline: none; }

/* Secondary buttons: white with an edge, so they sit above the card */
.btn.secondary { background: #fff; border: 1.5px solid #bdb6ec; box-shadow: 0 2px 6px -3px rgba(26, 0, 170, .35); }
.btn.soft { box-shadow: inset 0 0 0 1px rgba(26, 0, 170, .12); }

/* Tables: header band and gentle row stripes */
th { background: #e9e5ff; border-bottom: 2px solid #c9c1f5; }
tbody tr:nth-child(even) td { background: #faf9ff; }

/* Phones */
@media (max-width: 820px) {
  .card { --pad: 18px; }
  .mobile-top { box-shadow: 0 8px 20px -10px rgba(12, 0, 82, .6); }
  .tabbar { border-top: 1px solid #cdc9e4; box-shadow: 0 -10px 24px -14px rgba(15, 13, 38, .45); }
  .tabbar a, .tabbar button { color: var(--ink-3); }
  .tabbar [aria-current="page"] { color: var(--brand-900); font-weight: 800; }
  .tabbar [aria-current="page"] .ico { background: #e2ddff; color: var(--brand); }
}
.signin-form .card { --pad: 30px; }
@media (max-width: 820px) { .signin-form .card { --pad: 22px; } }

/* ---------- Chat and Newsletter (23 Nov 2026) ---------- */
.chat { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 1rem; height: calc(100vh - 150px); min-height: 480px; }
.chat .card { margin: 0; padding: 0; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.chat-list-head { padding: 1rem; border-bottom: 1px solid var(--line); display: grid; gap: .6rem; }
.chat-h { font-size: 1.35rem; margin: 0; }
.chat-items { overflow-y: auto; flex: 1; }
.chat-item { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.chat-item:hover { background: var(--brand-50); }
.chat-item.on { background: var(--brand-100); box-shadow: inset 4px 0 0 var(--brand); }
.chat-item .count { margin-left: 0; }
.ci-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ci-top { display: flex; justify-content: space-between; gap: .5rem; }
.ci-top b { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-top small { color: var(--ink-3); font-size: .82rem; white-space: nowrap; }
.ci-last { color: var(--ink-2); font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-av { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .95rem; color: #fff; background: var(--brand); }
.chat-av.group { background: var(--red); }
.chat-av .ico { width: 22px; height: 22px; stroke: #fff; }
.chat-head { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); background: var(--brand-50); }
.chat-head h2 { margin: 0; font-size: 1.1rem; }
.chat-head small { color: var(--ink-2); }
.chat-back { display: none; font-weight: 700; color: var(--brand); text-decoration: none; padding: .4rem .2rem; font-size: 1rem; }
.chat-log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .5rem; background: #f6f6fb; }
.chat-log:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }
.msg { max-width: min(78%, 560px); align-self: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: .55rem .8rem; box-shadow: 0 1px 2px rgba(15, 13, 38, .06); }
.msg.mine { align-self: flex-end; background: var(--brand); color: #fff; border-color: var(--brand); border-radius: 16px 16px 4px 16px; }
.msg.gone { opacity: .75; font-style: italic; }
.msg-who { display: block; font-size: .85rem; color: var(--red); margin-bottom: 2px; }
.msg-text { font-size: 1rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-meta { display: flex; justify-content: flex-end; gap: .6rem; align-items: center; margin-top: 3px; font-size: .78rem; color: var(--ink-3); }
.msg.mine .msg-meta { color: #dcd8ff; }
.msg-del { font-size: .78rem; padding: 0; color: inherit; text-decoration: underline; }
.msg.mine .msg-del { color: #fff; }
.msg-day { align-self: center; font-size: .82rem; font-weight: 700; color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; margin: .4rem 0; }
.chat-hint { align-self: center; color: var(--ink-2); margin: auto; }
.chat-compose { display: flex; gap: .6rem; align-items: flex-end; padding: .75rem; border-top: 1px solid var(--line); background: #fff; }
.chat-input { flex: 1; resize: none; font: inherit; font-size: 1rem; min-height: 46px; max-height: 160px; padding: .7rem .9rem; border-radius: 12px; border: 2px solid var(--line); }
.chat-input:focus { border-color: var(--brand); outline: none; }
.chat-empty { margin: auto; text-align: center; color: var(--ink-2); padding: 2rem; }
.chat-empty .ico { width: 44px; height: 44px; stroke: var(--brand); }
.picker { display: grid; gap: .6rem; }
.pick-list { max-height: 50vh; overflow-y: auto; display: grid; gap: 4px; }
.pick { display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .55rem .7rem; font: inherit; color: var(--ink); cursor: pointer; }
.pick:hover { background: var(--brand-50); }
.pick small { display: block; color: var(--ink-2); }
.pick input { width: 20px; height: 20px; flex: none; }
@media (max-width: 899px) {
  .chat { grid-template-columns: 1fr; height: calc(100vh - 190px); }
  .chat.has-open .chat-list, .chat:not(.has-open) .chat-pane { display: none; }
  .chat-back { display: inline-block; }
  .msg { max-width: 88%; }
}

.news-top { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: .8rem; margin-bottom: 1rem; }
.news-issue .card-head { flex-wrap: wrap; gap: .6rem; }
.news-body { background: #fff; border-radius: 10px; }
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.news-list li:last-child { border-bottom: 0; }
.news-list a { color: var(--brand); }
.news-list small { color: var(--ink-2); }
.paste-box { min-height: 110px; border: 3px dashed var(--brand); border-radius: 14px; background: var(--brand-50); display: grid; place-items: center; text-align: center; padding: 1rem; font-size: 1.05rem; font-weight: 700; color: var(--brand); cursor: text; caret-color: transparent; }
.paste-box:focus { outline: 3px solid var(--red); outline-offset: 2px; }
.steps { margin: .3rem 0 .8rem; padding-left: 1.3rem; line-height: 1.6; }
.label-text { font-weight: 700; margin: 1rem 0 .3rem; }

/* ---------- "Add to your phone" pop-up ---------- */
.install-pop { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: 24px; width: min(460px, calc(100vw - 24px));
  display: flex; gap: 1rem; align-items: flex-start; background: #fff; border-radius: 18px; padding: 1.1rem 1.2rem;
  border: 2px solid var(--brand); box-shadow: 0 18px 50px -12px rgba(26, 0, 170, .45), 0 4px 12px rgba(15, 13, 38, .15); }
.install-pop img { border-radius: 14px; flex: none; box-shadow: 0 1px 4px rgba(15, 13, 38, .2); }
.install-main { flex: 1; min-width: 0; }
.install-main h2 { margin: 0 0 .35rem; font-size: 1.15rem; color: var(--ink); }
.install-main p, .install-steps { margin: 0 0 .8rem; font-size: 1rem; line-height: 1.5; color: var(--ink-2); }
.install-steps { padding-left: 1.2rem; }
.install-steps li { margin-bottom: .25rem; }
.ios-share { display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 6px; background: var(--brand-50); color: var(--brand); font-weight: 800; }
@media (max-width: 899px) { .install-pop { bottom: calc(84px + env(safe-area-inset-bottom)); } }

/* Newsletter review (drafts) */
.callout.info { background: #eeebff; border-color: #c9c2f5; margin-bottom: 1rem; }
.news-comments { list-style: none; margin: 0 0 1rem; padding: 0; }
.news-comments li { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.news-comments li:last-child { border-bottom: 0; }
.news-comments p { margin: 0 0 .3rem; font-size: 1rem; line-height: 1.5; }
.news-comments .who small { color: var(--ink-2); }
.edit-bar { align-items: center; margin: 0 0 1rem; padding: .8rem 1rem; background: #eeebff; border-radius: 10px; }
.edit-bar .sub { flex: 1 1 16rem; margin: 0; }
.edit-bar[hidden] { display: none; }

/* Extra departments (Edit details) */
.dept-checks { border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem 1rem; margin: 0; }
.dept-checks legend { font-weight: 600; padding: 0 .3rem; }
.dept-checks .hint { display: block; margin-bottom: .6rem; }
.dept-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .4rem 1rem; }
.dept-checks .is-main { color: var(--ink-2); }
.dept-checks .is-main::after { content: " (main)"; font-size: .9em; }

/* Availability: green Available, red In a meeting, amber On leave, grey Offline */
.presence.offline { background: #ececf2; color: #3f3f55; }

/* Employment status: a coloured dot; the word shows on hover, keyboard focus or tap */
.status-dot { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 2px 8px; border: 0; border-radius: 999px;
  background: transparent; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; color: var(--ink); }
.status-dot::before { content: ""; flex: none; width: 11px; height: 11px; border-radius: 50%; background: var(--dot, #8a8aa0); }
.status-dot.active { --dot: #12a150; color: #08652f; }
.status-dot.active::before { box-shadow: 0 0 0 3px rgba(18, 161, 80, .22), 0 0 10px 2px rgba(18, 161, 80, .55); }
.status-dot.on_leave { --dot: #d98e04; color: #7a4d00; }
.status-dot.on_leave::before { box-shadow: 0 0 0 3px rgba(217, 142, 4, .22); }
.status-dot.exited { --dot: #c62828; color: #a3150c; }
.status-dot .sd-label { display: none; }
.status-dot:hover .sd-label, .status-dot:focus-visible .sd-label, .status-dot[aria-expanded="true"] .sd-label { display: inline; }
.status-dot:hover, .status-dot:focus-visible, .status-dot[aria-expanded="true"] { background: var(--bg); }
.status-dot:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { .status-dot.active::before { animation: dot-glow 2.4s ease-in-out infinite; } }
@keyframes dot-glow { 50% { box-shadow: 0 0 0 4px rgba(18, 161, 80, .14), 0 0 14px 4px rgba(18, 161, 80, .4); } }

/* Hidden until clicked: member IDs and emergency contacts */
.hv { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hv-text { letter-spacing: 2px; color: var(--ink-2); }
.hv-text.shown { letter-spacing: normal; color: inherit; }
.hv-btn { border: 1px solid var(--line); background: #fff; color: var(--brand); border-radius: 999px; padding: 3px 12px; min-height: 28px;
  font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.hv-btn:hover { background: var(--brand-50); }
.hv-btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* One font everywhere: form controls don't inherit it by themselves */
button, input, select, textarea, optgroup { font-family: inherit; }

/* Signature saved (hidden until Change or Remove) */
.sig-done { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #08652f; background: #d9f2e3; border-radius: 10px; padding: .7rem 1rem; margin: .4rem 0 1rem; }
.sig-current { margin-bottom: 1rem; }
.sig-current small { display: block; color: var(--ink-2); margin-bottom: .3rem; }

/* Work details: "Show more" */
.more-toggle { margin-top: .9rem; font-weight: 700; }

/* Ratings & milestones */
.ratings-row { align-items: start; }
.stars-view { display: inline-flex; gap: 1px; font-size: 1.25rem; line-height: 1; color: #cfcbe0; }
.stars-view.small { font-size: 1rem; }
.stars-view .on { color: #e8970c; }
.stars-view .half { background: linear-gradient(90deg, #e8970c 50%, #cfcbe0 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rating-summary .big { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rating-summary .big b { font-size: 2.2rem; line-height: 1; }
.rating-summary .big small { color: var(--ink-2); }
.by-source { display: flex; flex-wrap: wrap; gap: 6px; margin: .8rem 0 .4rem; }
.src-chip { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 600; border-radius: 999px; padding: 3px 10px; background: var(--bg); color: var(--ink-2); }
.src-chip.customer { background: #e3f0ff; color: #0b4c8c; }
.src-chip.teammate { background: #efe9ff; color: #4b23b0; }
.src-chip.manager { background: #fff1d6; color: #7a4d00; }
.rating-list { list-style: none; margin: .6rem 0 0; padding: 0; }
.rating-list li { padding: .7rem 0; border-top: 1px solid var(--line); }
.rating-list .r-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rating-list .r-top small { color: var(--ink-2); margin-left: auto; }
.rating-list p { margin: .35rem 0 0; }
.rating-list .r-by { font-size: .85rem; color: var(--ink-2); display: flex; gap: 10px; align-items: center; }
.milestones { margin-top: 1.2rem; }
.milestones h3 { font-size: 1rem; margin: 0 0 .4rem; }
.mile-list { list-style: none; margin: 0 0 .8rem; padding: 0; }
.mile-list li { display: flex; gap: 10px; align-items: center; padding: .6rem 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.mile-list .medal { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #fff1d6; color: #b36b00; font-weight: 800; }
.mile-list .m-text { flex: 1 1 12rem; min-width: 0; }
.mile-list .m-text small { display: block; color: var(--ink-2); }
.mile-list .m-acts { display: flex; gap: 8px; align-items: center; }
.star-field { border: 0; padding: 0; margin: 0 0 .6rem; }
.star-field legend { font-weight: 600; margin-bottom: .3rem; }
.star-pick { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.star-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-pick label { font-size: 2.4rem; line-height: 1; color: #cfcbe0; cursor: pointer; border-radius: 6px; padding: 0 2px; }
.star-pick input:checked ~ label, .star-pick label:hover, .star-pick label:hover ~ label { color: #e8970c; }
.star-pick input:focus-visible + label { outline: 3px solid var(--brand); outline-offset: 2px; }
.star-word { margin: .2rem 0 0; color: var(--ink-2); font-weight: 600; min-height: 1.4em; }
.qr-wrap { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.qr-img { width: 132px; height: 132px; border-radius: 10px; border: 1px solid var(--line); background: #fff; flex: none; }
.qr-wrap p { margin: 0 0 .6rem; }
.id-back .ic-qr { flex-shrink: 0; width: 17mm; text-align: center; }
.id-back .ic-qr-img { width: 17mm; height: 17mm; display: block; }
.id-back .ic-qr span { display: block; font-size: 4.6pt; line-height: 1.2; margin-top: .6mm; color: #1a00aa; font-weight: 700; }

/* Birthdays */
.bday-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.bday-fields legend { font-weight: 600; padding: 0; margin-bottom: .2rem; }
.bday-fields .hint { display: block; margin-bottom: .6rem; }
.bday-grid { display: grid; grid-template-columns: 1fr 1.6fr 1.2fr; gap: .8rem; }
.bday-ask .sub { margin: 0 0 1rem; }
.bday-ask .row { margin-top: 1.2rem; }
.bday-box { display: grid; gap: 12px; margin-bottom: 1.2rem; }
.bday-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--brand); color: #fff;
  padding: 14px 18px; border-radius: 14px; border-bottom: 4px solid var(--red); }
.bday-banner > div { flex: 1; min-width: 180px; display: grid; gap: 2px; }
.bday-banner strong { font-size: 1.1rem; }
.bday-banner span { opacity: .9; }
.bday-ico { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .16); flex: none; }
.bday-ico svg { width: 24px; height: 24px; }
.bday-ico.small { width: 32px; height: 32px; background: var(--brand-50); color: var(--brand); }
.bday-ico.small svg { width: 18px; height: 18px; }
.bday-soon h2 { margin-bottom: .6rem; }
.bday-soon ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bday-soon li { display: flex; align-items: center; gap: 12px; }
@media (max-width: 560px) { .bday-grid { grid-template-columns: 1fr 1.6fr; } .bday-grid label:last-child { grid-column: 1 / -1; } }

/* Shift notes (from Sureswift Care) */
.shift-tabs { margin: 0 0 1rem; }
.shift-note { margin-bottom: 1rem; }
.shift-note.esc { border-left: 5px solid var(--red); }
.shift-note .card-head { align-items: flex-start; flex-wrap: wrap; gap: .6rem; }
.shift-note .card-head h2 { margin: 0; }
.shift-note h3 { font-size: 1rem; margin: 1rem 0 .2rem; }
.shift-note .esc-h { color: var(--red); }
.shift-note .pre { white-space: pre-wrap; margin: 0; }
.shift-sum { margin: .6rem 0 0; padding-left: 1.2rem; }
.review-c { margin-top: 1rem; padding: .8rem 1rem; background: #e9f6ee; border-radius: 10px; }
.review-box { margin-top: 1rem; display: grid; gap: .6rem; }
.review-box textarea { width: 100%; }
.shift-missing { margin-bottom: 1rem; border: 1px solid #f2c4c0; }
.shift-missing h2 { color: var(--red); display: flex; align-items: center; gap: 8px; }
.shift-missing .row { justify-content: space-between; padding: .5rem 0; border-top: 1px solid var(--line); }
.sn-tag { font-size: .85rem; font-weight: 700; border-radius: 8px; padding: 3px 10px; white-space: nowrap; }
.sn-tag.red { background: var(--red-soft); color: var(--red); }
.sn-tag.amber { background: #fff4dc; color: #8a5300; }
.sn-tag.green { background: #e6f5ec; color: #11713a; }

/* Paste code button under sign-in code boxes */
.otp-paste { margin-top: 8px; background: none; border: 1.5px solid var(--brand); color: var(--brand); border-radius: 10px; padding: 8px 14px; font: inherit; font-weight: 700; cursor: pointer; }
.otp-paste:hover { background: var(--brand-50); }

/* My to-do (Home) */
.todo-card .card-head { align-items: center; }
.todo-count { font-weight: 700; color: var(--brand); }
.todo-bar { height: 8px; background: var(--brand-50); border-radius: 99px; overflow: hidden; margin: 4px 0 12px; }
.todo-bar span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.todo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.todo-list li { display: flex; align-items: center; gap: 12px; }
.todo-list li > div { flex: 1; min-width: 0; }
.todo-list b { display: block; } .todo-list small { display: block; color: var(--ink-2); font-size: .88rem; }
.todo-mark { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 800; color: #fff; }
.todo-list li.done .todo-mark { background: #11713a; border-color: #11713a; }
.todo-list li.done b { color: var(--ink-2); text-decoration: line-through; }
.todo-list li.later { opacity: .65; } .todo-list li.later .todo-mark { color: var(--ink-2); border-style: dashed; }
.todo-list li.wait .todo-mark { border-color: #e0a100; color: #8a5300; }
.todo-done { display: flex; gap: 8px; align-items: center; font-weight: 700; color: #11713a; margin: 0 0 4px; }

/* Google Workspace (HR) */
.ws-parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: .6rem; }
.ws-part { background: var(--brand-50, #f3f1ff); border-radius: 10px; padding: 12px; }
.ws-part b { display: block; font-size: 1.2rem; } .ws-part b.ok { color: #11713a; } .ws-part b.off { color: #8a5300; font-size: 1rem; }
.ws-part span { color: var(--ink-2); font-size: .9rem; }
.ws-wrap { overflow-x: auto; }
.ws-table { width: 100%; border-collapse: collapse; margin-top: .4rem; }
.ws-table th, .ws-table td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.ws-table th { font-size: .82rem; color: var(--ink-2); }
.ws-table .sn-tag { display: inline-block; margin: 0 4px 4px 0; }
.sn-tag.blue { background: #e8f0fd; color: #1557b0; }
.ws-sig { border: 1px dashed var(--line); border-radius: 10px; padding: 14px 16px; background: #fff; font-family: sans-serif; color: #000; line-height: 1.5; }
.ws-sig a { color: #4285f4; } .ws-sig img { display: block; margin-top: 6px; max-width: 160px; height: auto; }
.ws-lower { align-items: start; }
