@font-face { font-family: "Poppins"; src: url("/static/fonts/Poppins-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/static/fonts/Poppins-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --navy: #141c4f; --navy-2: #1e2a6e; --navy-3: #2b3a8f;
  --red: #e2233a; --red-soft: #fde8eb;
  --gold: #c99a2e;
  --ink: #161a2e; --ink-2: #4a5070; --ink-3: #7c8199;
  --line: #e4e6ef; --bg: #f5f6fa; --card: #ffffff;
  --green: #0f7a4f; --green-soft: #e3f5ec;
  --amber: #a15c00; --amber-soft: #fff3dc;
  --blue: #1f4fd1; --blue-soft: #e7eeff;
  --grey-soft: #eef0f5;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20,28,79,.06), 0 4px 16px rgba(20,28,79,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.5 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--bg); }
h1, h2, h3, .brand { font-family: "Poppins", "Segoe UI", sans-serif; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 21px; margin: 0; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0 0 8px; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
small, .muted { color: var(--ink-3); }
.mono { font-variant-numeric: tabular-nums; }
td.mono { white-space: nowrap; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; background: linear-gradient(to right, var(--navy) 248px, var(--bg) 248px); }
.side { background: var(--navy); color: #cdd3f5; padding: 20px 14px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; }
.side .nav { flex: 1 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 17px; padding: 4px 8px 16px; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--red); display: grid; place-items: center; }
.brand small { display: block; font: 500 11px/1.2 -apple-system, "Segoe UI", sans-serif; color: #9aa3d6; letter-spacing: .04em; text-transform: uppercase; }
.nav a { display: flex; align-items: center; gap: 10px; color: #cdd3f5; padding: 8px 10px; border-radius: 8px; font-weight: 500; font-size: 13.5px; }
.nav a:hover { background: rgba(255,255,255,.07); text-decoration: none; color: #fff; }
.nav a.on { background: rgba(255,255,255,.12); color: #fff; }
.nav .ico { width: 20px; text-align: center; opacity: .9; }
.nav .badge { margin-left: auto; }
.nav-sec { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #7d87c4; padding: 16px 10px 6px; }
.me { margin-top: 18px; border-top: 1px solid rgba(255,255,255,.1); padding: 12px 0 0; display: flex; align-items: center; gap: 2px; }
.me-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: inherit; padding: 6px; border-radius: 10px; text-decoration: none !important; }
.me-who:hover { background: rgba(255,255,255,.07); }
.me-av { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden;
  background: #6366f1; color: #fff; font: 600 13px/1 "Poppins", sans-serif; letter-spacing: .02em; }
.me-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.me-txt { min-width: 0; display: flex; flex-direction: column; }
.me-txt b { color: #fff; font-weight: 600; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.me-txt small { color: #9aa3d6; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me form { margin: 0; flex: none; }
.me-out { background: none; border: 0; color: #9aa3d6; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; cursor: pointer; }
.me-out:hover { background: rgba(255,255,255,.08); color: #fff; }
.main { padding: 28px 32px 60px; max-width: 1240px; width: 100%; }
.topbar { display: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); }

/* mobile */
#navtoggle { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; background: var(--bg); }
  .side { position: fixed; inset: 0 30% 0 0; z-index: 30; transform: translateX(-100%); transition: transform .2s; height: 100%; }
  #navtoggle:checked ~ .shell .side { transform: none; box-shadow: 0 0 0 100vmax rgba(10,14,40,.45); }
  .topbar { display: flex; align-items: center; justify-content: space-between; background: var(--navy); color: #fff; padding: 10px 16px; position: sticky; top: 0; z-index: 20; }
  .topbar label { font-size: 22px; cursor: pointer; padding: 2px 6px; }
  .topbar .brand { padding: 0; font-size: 17px; }
  .topbar a { color: #fff; }
  .main { padding: 18px 16px 60px; }
}

/* ---------- components ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.card + .card { margin-top: 16px; }
.grid > .card + .card, .grid > * + .card { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.g-main { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
@media (max-width: 900px) { .g-main { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 16px; }

.stat { padding: 16px 18px; }
.stat .k { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.stat .v { font: 600 28px/1.15 "Poppins", sans-serif; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 13px; color: var(--ink-2); }
.stat.hl { background: var(--navy); color: #fff; border-color: var(--navy); }
.stat.hl .k, .stat.hl .s { color: #b9c1ef; }

.meter { height: 8px; border-radius: 99px; background: var(--grey-soft); overflow: hidden; margin-top: 10px; }
.meter > i { display: block; height: 100%; background: var(--red); border-radius: 99px; }
.stat.hl .meter { background: rgba(255,255,255,.15); }

.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; border-radius: 9px; padding: 9px 16px; font: 600 13px/1.2 inherit; font-family: inherit; cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: #c81a30; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: #c8cbe0; }
.btn-ok { background: var(--green); color: #fff; }
.btn-danger { background: #fff; color: var(--red); border-color: #f3b8c0; }
.btn-sm { padding: 6px 11px; font-size: 13px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font: 700 11px/1 -apple-system, sans-serif; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--grey-soft); color: var(--ink-2); white-space: nowrap; }
.chip.AWAITING_MANAGER, .chip.AWAITING_HR, .chip.warn { background: var(--amber-soft); color: var(--amber); }
.chip.APPROVED, .chip.ok { background: var(--green-soft); color: var(--green); }
.chip.MANAGER_REJECTED, .chip.HR_REJECTED, .chip.bad { background: var(--red-soft); color: #b3172b; }
.chip.PAID { background: var(--blue-soft); color: var(--blue); }
.chip.UNPAID { background: #f3e8ff; color: #6b21a8; }
.chip.info { background: var(--blue-soft); color: var(--blue); }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.click:hover td { background: #fafbff; }
.table-wrap { overflow-x: auto; margin: 0 -6px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--navy-2); color: #fff; display: grid; place-items: center; font: 600 12px "Poppins", sans-serif; flex: none; overflow: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 72px; height: 72px; font-size: 22px; }
.person .who { min-width: 0; }
.person .who strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .who small { display: block; }

.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.empty { text-align: center; color: var(--ink-3); padding: 26px 10px; }

/* forms */
label.f { display: block; font-weight: 600; font-size: 13px; margin-bottom: 14px; color: var(--ink-2); }
label.f > input, label.f > select, label.f > textarea { display: block; width: 100%; margin-top: 6px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], input[type=number], input[type=month], input[type=search], select, textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid #d6d9e6; border-radius: 9px; padding: 9px 11px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #bcc8ff; border-color: var(--navy-3); }
textarea { min-height: 96px; resize: vertical; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; margin-bottom: 10px; }
.seg { display: inline-flex; border: 1px solid #d6d9e6; border-radius: 10px; overflow: hidden; margin-top: 6px; }
.seg label { padding: 9px 16px; cursor: pointer; font-weight: 600; color: var(--ink-2); }
.seg input { display: none; }
.seg input:checked + span { color: #fff; }
.seg label:has(input:checked) { background: var(--navy); color: #fff; }
.hint { font-size: 13px; color: var(--ink-3); font-weight: 400; margin-top: 4px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters select, .filters input { padding: 7px 10px; }

.alert { border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-weight: 500; }
.alert ul { margin: 6px 0 0 18px; padding: 0; }
.alert-ok { background: var(--green-soft); color: var(--green); }
.alert-err { background: var(--red-soft); color: #9b1226; }
.alert-info { background: var(--blue-soft); color: #1e3a8a; }
.alert-warn { background: var(--amber-soft); color: var(--amber); }

/* timeline on leave detail */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { position: relative; padding: 0 0 18px 28px; }
.steps li:before { content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.steps li:last-child:before { display: none; }
.steps li .dot { position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #d8dbea; border: 3px solid #fff; box-shadow: 0 0 0 1px #d8dbea; }
.steps li.done .dot { background: var(--green); box-shadow: 0 0 0 1px var(--green); }
.steps li.now .dot { background: var(--amber); box-shadow: 0 0 0 1px var(--amber); }
.steps li.bad .dot { background: var(--red); box-shadow: 0 0 0 1px var(--red); }
.steps li strong { display: block; }
.steps li .note { background: var(--grey-soft); border-radius: 8px; padding: 8px 10px; margin-top: 6px; font-size: 14px; }

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.cal .dow { background: var(--grey-soft); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); padding: 8px; text-align: center; }
.cal .day { min-height: 112px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); padding: 6px 0 6px; position: relative; }
.cal .day:nth-child(7n+1) { border-left: 0; }
.cal .day.out { background: #fafbfd; }
.cal .day.out .dn { color: #b5b9cc; }
.cal .day.today .dn { background: var(--red); color: #fff; border-radius: 99px; }
.cal .dn { display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin-left: 6px; font-weight: 700; font-size: 13px; }
.cal .hol { font-size: 11px; color: var(--amber); font-weight: 600; padding: 0 8px; }
.cal .bar { display: block; margin: 3px 0; height: 20px; font-size: 11.5px; font-weight: 600; color: #fff; padding: 2px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .bar.pending { opacity: .45; background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.25) 0 4px, transparent 4px 8px); }
.cal .bar.cont { color: transparent; }
.cal .cele { font-size: 12px; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 700px) { .cal .day { min-height: 74px; } .cal .bar { font-size: 0; height: 8px; padding: 0; } .cal .cele { font-size: 0; } .cal .cele span { font-size: 12px; } }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; margin-top: 12px; color: var(--ink-2); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* branches */
.bcard { display: block; color: inherit; position: relative; transition: border-color .15s; }
.bcard:hover { text-decoration: none; border-color: #b9c1ef; }
.bcard .alert-dot { position: absolute; top: 14px; right: 14px; }
.bcard .row { display: flex; gap: 14px; margin-top: 12px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.bcard .row b { color: var(--ink); font-variant-numeric: tabular-nums; }
.bcard.hot { border-color: #f3b8c0; box-shadow: 0 0 0 3px var(--red-soft); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 10px 14px; font-weight: 600; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--navy); border-color: var(--red); text-decoration: none; }

/* messages */
.msg { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff; }
.msg + .msg { margin-top: 12px; }
.msg.mine { background: #f6f8ff; border-color: #dfe5ff; }
.msg .meta { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.msg .body { white-space: pre-wrap; }
.att { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; margin: 8px 8px 0 0; font-size: 13px; background: #fff; }
.unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); display: inline-block; }

.flyer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.flyer-grid img { width: 100%; border-radius: 10px; display: block; aspect-ratio: 4 / 5; object-fit: cover; background: var(--grey-soft); }

.login-wrap { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, #26347f, var(--navy) 60%); padding: 20px; }
.login { width: 100%; max-width: 400px; }
.login .brand { color: #fff; justify-content: center; margin-bottom: 16px; font-size: 24px; }
dl.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 14px; margin: 0; font-size: 14px; line-height: 1.45; }
dl.kv dt { color: var(--ink-3); font-size: 13px; font-weight: 500; }
dl.kv dd { margin: 0; font-weight: 400; font-size: 14px; overflow-wrap: anywhere; min-width: 0; }
@media (max-width: 640px) { dl.kv { grid-template-columns: 1fr; gap: 2px; } dl.kv dd { margin-bottom: 8px; } }

/* rank badges: supervisor ★, manager ★★, supt. pharmacist ★★★ */
.stars { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 99px; font-size: 11px; letter-spacing: 1px;
  line-height: 16px; vertical-align: 2px; font-weight: 700; color: #7a5300; background: #fff3cf; border: 1px solid #f0d27a; }
.stars.s2 { color: #6b4500; background: #ffe8a8; border-color: #e7bd4a; }
.stars.s3 { color: #fff; background: linear-gradient(135deg, #c99a2e, #9c6f0f); border-color: #8a610c; }
.side .stars { vertical-align: 1px; }
h1 .stars { font-size: 13px; vertical-align: 4px; }

/* staff form: branch section turns into a highlighted "branch to run" box for managers / SPs */
.branch-box { border: 1px solid transparent; border-radius: 12px; padding: 0; margin: 4px 0 10px; transition: all .15s; }
.branch-box.on { border-color: #e7bd4a; background: #fffaf0; padding: 16px 16px 4px; box-shadow: 0 0 0 3px #fff3cf; }

/* overview dashboard (PeoplePulse-style) */
.topstrip { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.topstrip h1 { font-size: 19px; color: var(--navy); }
.topstrip p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-3); }
.iconbtn { position: relative; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; display: grid; place-items: center;
  background: #fff; text-decoration: none !important; font-size: 17px; color: var(--ink); }
.iconbtn .badge { position: absolute; top: -6px; right: -6px; }
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #4f8fd6; }
.hello { font-size: 21px; margin: 4px 0 4px; }
.hero p { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1200px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 14px; box-shadow: var(--shadow);
  color: inherit; text-decoration: none !important; transition: border-color .15s, transform .15s; }
.kpi:hover { border-color: #b9c1ef; transform: translateY(-1px); }
.kpi.alert { border-color: #f3b8c0; box-shadow: 0 0 0 3px var(--red-soft); }
.kt { font-size: 10.5px; font-weight: 700; line-height: 1.35; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-2); min-height: 28px; }
.kpi .kv { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px;
  font: 600 22px/1.15 "Poppins", sans-serif; font-variant-numeric: tabular-nums; }
.ki { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 14px; line-height: 1; flex: none; color: var(--ink); }
.ks { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.linkarrow { font-weight: 700; font-size: 13px; white-space: nowrap; }
.attn { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; margin-bottom: 8px; color: var(--ink);
  text-decoration: none !important; font-size: 14px; background: var(--grey-soft); }
.attn .ai { flex: none; width: 22px; text-align: center; }
.attn.warn { background: var(--amber-soft); } .attn.bad { background: var(--red-soft); } .attn.info { background: var(--blue-soft); }
.attn:hover { filter: brightness(.97); }
.main, .grid > *, .stack > * { min-width: 0; }
.topstrip .btns { flex-wrap: nowrap; }
@media (max-width: 640px) { .topstrip { padding: 12px 14px; } .topstrip h1 { font-size: 17px; } .hello { font-size: 18px; } }

/* ---------- my profile (self-service) ---------- */
.prof-photo { display: flex; gap: 18px; align-items: center; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.prof-av { width: 96px; height: 96px; border-radius: 50%; flex: none; overflow: hidden; display: grid; place-items: center;
  background: #6366f1; color: #fff; font: 600 30px/1 "Poppins", sans-serif; box-shadow: 0 0 0 4px #eef0ff; }
.prof-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.prof-fixed { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px; background: var(--grey-soft);
  border-radius: 10px; padding: 12px 14px; margin: 4px 0 14px; font-size: 14px; }
.prof-fixed span { min-width: 0; overflow-wrap: anywhere; }
.prof-fixed small { display: block; color: var(--ink-3); font-size: 12px; }
@media (max-width: 640px) { .prof-photo { flex-direction: column; text-align: center; } .prof-fixed { grid-template-columns: 1fr 1fr; } }

/* ---------- top-right notification icons ---------- */
.ticon { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; text-decoration: none !important; transition: transform .15s; }
.ticon:hover { transform: translateY(-1px); }
.ticon.tmsg { background: #6366f1; }
.ticon.bell { background: #fff; color: var(--ink-2); border: 1px solid var(--line); }
.ticon .tb { position: absolute; top: -6px; right: -8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: #e5361b; color: #fff; font: 700 12px/22px -apple-system, "Segoe UI", sans-serif; text-align: center;
  box-shadow: 0 0 0 2px #fff; }
.topbar .ticon { width: 34px; height: 34px; }
.topbar .ticon .tb { box-shadow: 0 0 0 2px var(--navy); }
.topbar .tbicons { display: flex; gap: 18px; align-items: center; margin-right: 6px; }

@media (max-width: 900px) { .topstrip .ticon { display: none; } }

/* ---------- staff dashboard welcome ---------- */
.welcome { display: flex; align-items: center; gap: 14px; min-width: 0; }
.welcome-av { position: relative; width: 56px; height: 56px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: #6366f1; color: #fff; font: 600 18px/1 "Poppins", sans-serif; text-decoration: none !important; box-shadow: 0 0 0 3px #eef0ff; }
.welcome-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.welcome-add { position: absolute; right: -2px; bottom: -2px; width: 20px; height: 20px; border-radius: 50%; background: var(--red);
  color: #fff; font: 700 13px/20px sans-serif; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.welcome-role { font-weight: 600; color: var(--navy); font-size: 14px; margin-top: 2px; }
.welcome p { margin: 2px 0 0; }

.dash-icons { display: flex; justify-content: flex-end; gap: 12px; margin: -12px 0 2px; }
@media (max-width: 900px) { .dash-icons { display: none; } }
.welcome-mgr { font-size: 13px; color: var(--ink-2); margin-top: 1px; }
.welcome-mgr b { font-weight: 600; color: var(--ink); }

/* photos fill their circle exactly (no stretching, no coloured edge) */
.me-av, .avatar, .prof-av, .welcome-av { position: relative; }
.me-av:has(img), .avatar:has(img), .prof-av:has(img), .welcome-av:has(img) { background: #e9ecf5; }
.me-av img, .avatar img, .prof-av img, .welcome-av img { object-position: 50% 12%; }   /* faces sit near the top of portraits */

/* ---------- leave form: live day counter ---------- */
.daycalc { display: flex; gap: 16px; align-items: center; border: 1px solid var(--line); background: var(--grey-soft);
  border-radius: 12px; padding: 12px 16px; margin: -4px 0 16px; }
.daycalc.ok { background: #effaf3; border-color: #bfe6cc; }
.daycalc.bad { background: var(--red-soft); border-color: #f3b8c0; }
.dc-num { flex: none; text-align: center; min-width: 64px; }
.dc-num b { display: block; font: 600 30px/1 "Poppins", sans-serif; color: var(--navy); }
.dc-num span { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.dc-lines { font-size: 13.5px; color: var(--ink-2); min-width: 0; }
.dc-l + .dc-l { margin-top: 3px; }
.dc-l.ok { color: #1c7a43; } .dc-l.bad { color: var(--red); font-weight: 600; }

.spcard .spwho { display: flex; align-items: center; gap: 10px; margin-top: 8px; color: inherit; text-decoration: none !important; min-width: 0; }
.spcard .spwho > span:not(.avatar) { min-width: 0; display: flex; flex-direction: column; }
.spcard .spwho b { font-size: 15px; overflow-wrap: anywhere; } .spcard .spwho small { color: var(--ink-3); font-size: 12px; overflow-wrap: anywhere; }

/* branch page: supervisors card (any number, scrolls inside the card) */
.kcount { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px;
  background: var(--navy); color: #fff; font-size: 11px; letter-spacing: 0; vertical-align: 1px; }
.suplist { margin-top: 8px; max-height: 128px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin-right: -6px; padding-right: 6px; }
.suprow { display: flex; align-items: center; gap: 9px; padding: 4px 4px; border-radius: 8px; color: inherit; text-decoration: none !important; min-width: 0; }
.suprow:hover { background: var(--grey-soft); }
.suprow > span:not(.avatar) { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.suprow b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suprow small { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar.sm { width: 28px; height: 28px; font-size: 10.5px; }
.supmore { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.suplist { scrollbar-width: thin; scrollbar-color: #c7cbe0 transparent; }
.suplist::-webkit-scrollbar { width: 6px; } .suplist::-webkit-scrollbar-thumb { background: #c7cbe0; border-radius: 3px; }

/* ---------- mass transfers ---------- */
.seg-list { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: -6px 0 12px; }
.mt-summary { margin: 4px 0 10px; font-size: 14px; }
.mt-table td { vertical-align: middle; }
.mt-table tr.off td { opacity: .55; }
.mt-arrow { color: var(--ink-3); font-size: 18px; width: 20px; }
.mt-sel { min-width: 170px; }
.mt-sel.same { border-color: var(--amber); }

/* ---------- personnel documents ---------- */
.doclist { display: flex; flex-direction: column; }
.docrow { padding: 9px 0; border-bottom: 1px solid var(--line); }
.docrow:last-child { border-bottom: 0; }
.dochead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.docicon { width: 20px; text-align: center; }
.docstate { font-size: 12.5px; color: var(--ink-3); }
.docrow.missing .docstate, .docrow.expired .docstate { color: var(--red); font-weight: 600; }
.docrow.soon .docstate, .docrow.pending .docstate { color: var(--amber); font-weight: 600; }
.docfile { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 0 28px; font-size: 13.5px; min-width: 0; }
.docfile a { font-weight: 600; overflow-wrap: anywhere; }
.docfile small { color: var(--ink-3); }
.docact { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.docact input[type=date] { padding: 4px 6px; font-size: 12px; width: auto; }
form.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.docup { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.docup summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.docup form { margin-top: 10px; }

/* ---------- compact data-entry forms (Add / Edit staff) ---------- */
.form-compact { padding: 18px 22px 16px; }
.form-compact h2 { font-size: 14px; margin: 12px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--navy); }
.form-compact > h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.form-compact .grid { row-gap: 0; column-gap: 14px; }
.form-compact label.f { font-size: 12.5px; margin-bottom: 10px; }
.form-compact label.f > input, .form-compact label.f > select { margin-top: 4px; padding: 7px 10px; font-size: 13.5px; }
.form-compact .hint { font-size: 11.5px; line-height: 1.35; margin-top: 3px; }
.form-compact .check { font-size: 13.5px; margin-bottom: 6px; }
.form-compact .branch-box.on { padding: 12px 14px 2px; }
.form-compact .branch-box h2 { border-top: 0; padding-top: 0; margin-top: 0; }
.g5 { grid-template-columns: 1fr 1.6fr 1.2fr 1fr 1fr; }
@media (max-width: 1100px) { .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g5 { grid-template-columns: 1fr; } }
.flagrow { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 2px 0 4px; }
.form-compact h2 small { margin-left: 4px; }

/* Add staff → documents */
.docpick { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.dp-row { display: grid; grid-template-columns: minmax(170px, 1.1fr) minmax(0, 1.6fr) minmax(150px, 1fr); gap: 10px; align-items: center;
  padding: 7px 12px; font-size: 13px; }
.dp-row + .dp-row { border-top: 1px solid var(--line); }
.dp-row:nth-child(even) { background: #fafbfd; }
.dp-label { font-weight: 600; color: var(--ink-2); }
.dp-row input[type=file] { font-size: 12.5px; min-width: 0; max-width: 100%; }
.dp-exp { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.dp-exp input { padding: 4px 6px; font-size: 12px; width: auto; }
@media (max-width: 760px) { .dp-row { grid-template-columns: 1fr; gap: 4px; } .dp-exp { justify-content: flex-start; } }

/* broadcast recipients */
.bc-modes { display:flex; flex-wrap:wrap; gap:8px; margin:4px 0 10px; }
.bc-mode { display:flex; align-items:center; gap:7px; padding:8px 12px; border:1px solid var(--line); border-radius:10px; cursor:pointer; font-size:14px; }
.bc-mode:has(input:checked) { border-color:var(--navy-3); background:var(--blue-soft); }
.bc-sec { margin:4px 0 10px; }
.bc-units { display:flex; flex-wrap:wrap; gap:4px 18px; }
.bc-block { margin:6px 0 10px; }
.bc-lbl { font-size:13px; color:var(--ink-2); }
.bc-find { width:100%; max-width:320px; margin:8px 0 2px; }
.bc-copy { font-size:13px; color:var(--ink-2); margin:4px 0 10px; }
.bc-reach { display:inline-block; margin:4px 0 14px; padding:6px 12px; border-radius:999px; background:var(--green-soft); color:var(--green); font-size:13px; }
.bc-reach.none { background:var(--red-soft); color:var(--red); }
