/* BNBHR. One accent (the crest's plum), neutral greys, flat surfaces, dense tables. */
:root {
  --bg: #f5f6f8;
  --surface: #fff;
  --line: #e4e6ea;
  --line-strong: #d0d4da;
  --text: #15171c;
  --text-2: #3d434d;
  --muted: #6b7280;
  --faint: #9aa1ab;
  --brand: #5c2649;
  --brand-hover: #4a1d3a;
  --brand-soft: #f6eff3;
  --gold: #c9a45c;
  --side: #1d1a21;
  --side-text: #b9b4bf;
  --ok: #167a3e;   --ok-bg: #eaf7ef;
  --bad: #b42318;  --bad-bg: #fdeceb;
  --warn: #a15c07; --warn-bg: #fdf4e3;
  --hol: #5b3fc4;  --hol-bg: #f1eefc;
  --off: #6b7280;  --off-bg: #f1f2f4;
  --radius: 8px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 Inter, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  font-feature-settings: "cv11", "tnum"; -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 20px; }
h2 { font-size: 15px; }
h3 { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 24px 0 10px; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* Top bar */
.top {
  position: sticky; top: 0; z-index: 20; height: 56px; display: flex; align-items: center; gap: 20px;
  padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); font-size: 15px; letter-spacing: .02em; }
.brand:hover { text-decoration: none; }
.brand img { height: 34px; width: auto; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.switch { padding: 5px 12px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.switch:hover { background: var(--bg); text-decoration: none; }
.avatar, .face {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; flex: none;
  background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: 12px;
}
.avatar:hover { text-decoration: none; }
.avatar img, .face img { width: 100%; height: 100%; object-fit: cover; }
.face.big { width: 64px; height: 64px; font-size: 22px; }
.icon-btn { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 6px; display: grid; border-radius: 6px; }
.icon-btn:hover { color: var(--text); background: var(--bg); }

/* Admin menus */
.menus { display: flex; align-items: center; gap: 2px; height: 100%; }
.menus > a, .menu > button {
  display: flex; align-items: center; height: 100%; padding: 0 12px; color: var(--text-2); font: inherit; font-weight: 500;
  background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer;
}
.menus > a:hover, .menu > button:hover { color: var(--text); text-decoration: none; }
.menus > a.on, .menu > button.on { color: var(--brand); border-bottom-color: var(--brand); }
.menu { position: relative; height: 100%; }
.menu > button::after { content: ""; width: 6px; height: 6px; margin-left: 7px; border: solid var(--faint); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); }
.drop {
  display: none; position: absolute; top: calc(100% - 4px); left: 0; min-width: 220px; padding: 6px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(17,24,39,.10);
}
.menu:hover .drop, .menu:focus-within .drop { display: block; }
.drop a { display: block; padding: 7px 10px; color: var(--text-2); border-radius: 6px; }
.drop a:hover { background: var(--bg); color: var(--text); text-decoration: none; }

/* Employee side menu */
.side { position: fixed; top: 56px; bottom: 0; left: 0; width: 220px; background: var(--side); padding: 14px 10px; overflow-y: auto; }
.side a {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px; margin-bottom: 2px; border-radius: 6px;
  color: var(--side-text); font-weight: 500;
}
.side a svg { width: 17px; height: 17px; opacity: .85; }
.side a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.side a.on { background: rgba(255,255,255,.10); color: #fff; box-shadow: inset 2px 0 0 var(--gold); }
.badge { margin-left: auto; background: var(--gold); color: #1d1a21; border-radius: 10px; padding: 0 7px; font-size: 11px; font-weight: 700; line-height: 18px; }

.main { padding: 24px 28px 56px; max-width: 1280px; }
.ess .main { margin-left: 220px; }
.adm .main { margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .sub { margin: 4px 0 0; color: var(--muted); }
.crumbs { color: var(--faint); font-size: 12px; margin-bottom: 4px; }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 6px; }

/* Surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.card > h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.card > h2 a { margin-left: auto; font-size: 13px; font-weight: 500; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > h2 { padding: 14px 16px; margin: 0; border-bottom: 1px solid var(--line); }
.info { background: var(--warn-bg); border: 1px solid #f3dfb8; color: #5f3b06; border-radius: var(--radius); padding: 11px 14px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid > .card { margin-bottom: 0; }
.cols { display: grid; gap: 16px; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); align-items: start; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.flash { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; border: 1px solid; font-weight: 500; }
.flash.ok { background: var(--ok-bg); border-color: #c4e8d1; color: var(--ok); }
.flash.err { background: var(--bad-bg); border-color: #f6cbc7; color: var(--bad); }
.empty { color: var(--muted); padding: 24px 0; text-align: center; }
td.empty { padding: 28px 16px; }
.figure { margin: 0 0 12px; color: var(--muted); }
.figure b { font-size: 26px; font-weight: 600; color: var(--text); letter-spacing: -.02em; margin-right: 6px; }
.rules { margin: 0; padding-left: 18px; color: var(--text-2); }
.rules li { margin-bottom: 6px; }

/* Figures */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 16px; }
.stats > * { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--text); }
.stats span { display: block; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.stats b { display: block; font-size: 24px; font-weight: 600; letter-spacing: -.02em; margin-top: 2px; }
.stats small { display: block; color: var(--faint); font-size: 12px; }
a.stats-cell:hover { border-color: var(--line-strong); text-decoration: none; }

/* Forms */
label { display: block; margin-bottom: 14px; font-size: 13px; font-weight: 500; color: var(--text-2); }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 8px 11px; font: inherit; font-weight: 400; color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface);
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--brand-soft); border-color: var(--brand); }
input[type=checkbox] { display: inline; width: 16px; height: 16px; margin: 0 8px 0 0; accent-color: var(--brand); }
input[type=file] { padding: 6px; }
textarea { min-height: 84px; resize: vertical; }
.check { display: flex; align-items: center; font-weight: 400; color: var(--text); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.inline { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.inline label { margin: 0; }
.inline input, .inline select { width: auto; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; font: inherit; font-weight: 500;
  border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); cursor: pointer; white-space: nowrap;
}
.btn:hover { text-decoration: none; background: var(--bg); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-hover); }
.btn.good { color: var(--ok); }
.btn.bad { color: var(--bad); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.wide { width: 100%; }
.btn.big { padding: 10px 22px; font-size: 15px; }
form.inline-form { display: inline; }
.pager { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.pager .btn { padding: 4px 9px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th:first-child, td:first-child { padding-left: 16px; }
th:last-child, td:last-child { padding-right: 16px; }
th { font-weight: 500; font-size: 12px; color: var(--muted); white-space: nowrap; background: #fafbfc; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td, table tr:hover td { background: #fafbfc; }
td.num, th.num { text-align: right; }
.card:not(.flush) table th:first-child, .card:not(.flush) table td:first-child { padding-left: 0; }
.card:not(.flush) table th:last-child, .card:not(.flush) table td:last-child { padding-right: 0; }
.card:not(.flush) table th { background: none; }
.card:not(.flush) table tr:hover td { background: none; }
.sub-line { display: block; color: var(--muted); font-size: 12px; }

/* Day labels and request states */
.chip { display: inline-block; min-width: 28px; padding: 1px 6px; border-radius: 4px; font-size: 11.5px; font-weight: 600; text-align: center; line-height: 18px; }
.chip.p { background: var(--ok-bg); color: var(--ok); }
.chip.a { background: var(--bad-bg); color: var(--bad); }
.chip.h { background: var(--hol-bg); color: var(--hol); }
.chip.off { background: var(--off-bg); color: var(--off); }
.chip.lv { background: var(--warn-bg); color: var(--warn); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; text-transform: capitalize; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.pending { color: var(--warn); }
.status.approved { color: var(--ok); }
.status.rejected, .status.cancelled { color: var(--faint); }
.tag { display: inline-block; padding: 0 7px; border-radius: 4px; font-size: 11.5px; font-weight: 600; line-height: 18px; background: var(--off-bg); color: var(--text-2); }
.tag.brand { background: var(--brand-soft); color: var(--brand); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.late { color: var(--bad); font-weight: 600; }

/* Tabs */
.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs a { padding: 10px 0; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--brand); border-bottom-color: var(--brand); }
.tabs a:hover { text-decoration: none; color: var(--text); }

/* Attendance calendar */
.cal { table-layout: fixed; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.cal th { text-align: center; padding: 8px 4px; }
.cal td { height: 76px; padding: 0; border: 1px solid var(--line); vertical-align: top; }
.cal td:first-child, .cal td:last-child { padding: 0; }
.cal td a { display: block; height: 100%; padding: 6px 8px; color: var(--text); }
.cal td a:hover { background: #fafbfc; text-decoration: none; }
.cal td.out a { color: #c4c8ce; }
.cal td.sel { box-shadow: inset 0 0 0 2px var(--brand); }
.cal td.today .n { background: var(--brand); color: #fff; border-radius: 10px; padding: 0 6px; }
.cal .n { font-size: 12px; font-weight: 600; }
.cal .in { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
.cal .chip { margin-top: 4px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 12px; align-items: center; }
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; margin: 0; }
.detail dt { color: var(--muted); font-size: 12px; }
.detail dd { margin: 0 0 12px; font-weight: 500; }

/* Muster */
.muster { font-size: 12px; }
.muster td, .muster th { padding: 6px 2px; text-align: center; }
.muster td:first-child, .muster th:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); min-width: 180px; padding-left: 16px; font-size: 13px; z-index: 1; }
.muster th:first-child { background: #fafbfc; }
.muster .chip { min-width: 0; padding: 0 3px; font-size: 10.5px; }
.muster .we { background: #fafbfc; }
.muster .late-mark { box-shadow: inset 0 -2px 0 var(--bad); }

/* Who is in */
.board { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.board .card { padding: 0; overflow: hidden; margin: 0; }
.board h2 { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; display: flex; justify-content: space-between; }
.board h2 .count { color: var(--muted); font-weight: 500; }
.board ul { list-style: none; margin: 0; padding: 0; max-height: 540px; overflow-y: auto; }
.board li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 16px; border-bottom: 1px solid var(--line); }
.board li:last-child { border-bottom: 0; }
.board li small { display: block; color: var(--muted); font-size: 12px; }
.board .empty { padding: 20px; font-size: 13px; }

/* People and feed */
.people { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.person { display: flex; gap: 12px; align-items: center; color: var(--text); }
.person:hover { text-decoration: none; }
.person:hover .name { color: var(--brand); }
.person .name { font-weight: 600; }
.person small { display: block; color: var(--muted); font-size: 12.5px; }
.feed .card { display: flex; gap: 14px; }
.feed .body { white-space: pre-wrap; margin-top: 6px; }
.feed .kind { font-size: 12px; color: var(--muted); }

/* Holidays */
.hol { display: flex; gap: 14px; align-items: center; }
.hol .date { width: 48px; text-align: center; border-radius: 6px; border: 1px solid var(--line); padding: 4px 0; flex: none; font-size: 11px; color: var(--muted); text-transform: uppercase; font-weight: 600; }
.hol .date b { display: block; font-size: 18px; line-height: 1.15; color: var(--text); }
.hol.past { opacity: .5; }

/* Sign in widget */
.clock { font-size: 30px; font-weight: 500; letter-spacing: -.02em; margin: 8px 0 14px; font-variant-numeric: tabular-nums; }
.swipes { list-style: none; padding: 0; margin: 14px 0 0; display: flex; gap: 6px; flex-wrap: wrap; }
.swipes li { border: 1px solid var(--line); border-radius: 4px; padding: 0 8px; font-size: 12px; color: var(--text-2); }

/* Login: a glass card on a soft sky */
.auth {
  position: relative; min-height: 100vh; overflow: hidden; display: grid; place-items: center; padding: 88px 16px 48px;
  background:
    radial-gradient(ellipse 38% 22% at 12% 92%, rgba(255,255,255,.95), transparent 70%),
    radial-gradient(ellipse 30% 18% at 38% 100%, rgba(255,255,255,.9), transparent 70%),
    radial-gradient(ellipse 34% 20% at 70% 96%, rgba(255,255,255,.95), transparent 70%),
    radial-gradient(ellipse 30% 24% at 94% 88%, rgba(255,255,255,.85), transparent 70%),
    radial-gradient(ellipse 22% 10% at 8% 58%, rgba(255,255,255,.55), transparent 70%),
    radial-gradient(ellipse 20% 9% at 90% 62%, rgba(255,255,255,.5), transparent 70%),
    linear-gradient(180deg, #8cc4ec 0%, #b7dbf3 40%, #e3f1fa 72%, #fbfdff 100%);
}
.auth-rings, .auth-rings::after {
  position: absolute; left: 50%; top: 34%; width: 1100px; aspect-ratio: 1; transform: translateX(-50%);
  border: 1px solid rgba(255,255,255,.55); border-radius: 50%; pointer-events: none;
}
.auth-rings::after { content: ""; top: 90px; width: 900px; }
.auth-brand { position: absolute; top: 22px; left: 28px; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; color: #14161c; }
.auth-brand img { height: 36px; width: auto; }
.auth-card {
  position: relative; z-index: 1; width: 100%; max-width: 380px; padding: 30px 28px 28px; text-align: center;
  border-radius: 24px; border: 1px solid rgba(255,255,255,.9);
  background: linear-gradient(180deg, rgba(212,242,252,.94) 0%, rgba(255,255,255,.96) 46%);
  box-shadow: 0 24px 60px rgba(40,90,140,.18), 0 2px 6px rgba(40,90,140,.06), inset 0 1px 0 #fff;
  backdrop-filter: blur(10px);
}
.crest-tile {
  width: 96px; height: 80px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 18px;
  background: #fff; box-shadow: 0 8px 20px rgba(30,70,110,.12), inset 0 0 0 1px rgba(0,0,0,.03);
}
.crest-tile img { width: 78px; height: auto; }
.auth-card h1 { font-size: 21px; color: #14161c; margin: 0 0 6px; }
.auth-sub { color: #6b7280; margin: 0 auto 20px; max-width: 270px; }
.auth-card .flash { text-align: left; font-size: 13px; }
.field { position: relative; display: block; margin: 0 0 10px; }
.field .lead { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #8a93a3; pointer-events: none; }
.field input { margin: 0; padding: 11px 42px 11px 38px; background: #eef1f5; border: 1px solid transparent; border-radius: 10px; }
.field input:focus { background: #fff; border-color: #c4ccd8; outline: 3px solid rgba(140,196,236,.35); }
.eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: grid; padding: 6px; border: 0; background: none; color: #8a93a3; cursor: pointer; border-radius: 6px; }
.eye:hover, .eye.on { color: #14161c; }
.eye svg { width: 17px; height: 17px; }
.forgot { text-align: right; font-size: 12.5px; color: #4b5563; margin: 2px 0 16px; }
.btn-dark {
  width: 100%; padding: 12px; border: 0; border-radius: 10px; font: inherit; font-weight: 600; color: #fff; cursor: pointer;
  background: linear-gradient(180deg, #3b3d47, #16171c); box-shadow: 0 8px 18px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.14);
}
.btn-dark:hover { background: linear-gradient(180deg, #4a4c57, #1d1e24); }
.btn-dark:focus-visible { outline: 3px solid rgba(140,196,236,.6); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 960px) {
  .cols { grid-template-columns: 1fr; }
  .menus { overflow-x: auto; }
  .drop { position: fixed; top: 52px; left: 12px; right: 12px; }
}
@media (max-width: 760px) {
  .side { position: static; width: auto; padding: 6px; }
  .side nav { display: flex; overflow-x: auto; gap: 2px; }
  .side a { white-space: nowrap; margin: 0; }
  .side a.on { box-shadow: inset 0 -2px 0 var(--gold); }
  .ess .main { margin-left: 0; }
  .main { padding: 16px; }
  .top { gap: 10px; padding: 0 12px; }
  .brand span { display: none; }
  .pair, .detail { grid-template-columns: 1fr; }
  .cal td { height: 54px; }
  .cal .in { display: none; }
}
