/* ================================================================== *
 *  XPLOCC Payroll HRMS — application stylesheet
 *  Hand-written, dependency-free, responsive. Slate neutrals with an
 *  orange brand accent.
 * ================================================================== */
:root {
  --accent:        #ea580c;
  --accent-dark:   #c2410c;
  --accent-soft:   #fff1e8;
  --sidebar-bg:    #16202e;
  --sidebar-bg-2:  #1e2c3e;
  --sidebar-text:  #aebacb;
  --sidebar-active:#ffffff;
  --ink:           #1f2a37;
  --ink-soft:      #5b6675;
  --muted:         #8a94a3;
  --line:          #e6e9ee;
  --line-soft:     #eef1f5;
  --bg:            #f4f6f9;
  --card:          #ffffff;
  --ok:            #15803d;  --ok-bg:#e7f6ec;
  --warn:          #b45309;  --warn-bg:#fdf2e3;
  --err:           #b91c1c;  --err-bg:#fdeaea;
  --info:          #1d4ed8;  --info-bg:#e8effd;
  --shadow:        0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.1);
  --shadow-lg:     0 10px 30px rgba(16,24,40,.12);
  --radius:        10px;
  --radius-sm:     7px;
  --sidebar-w:     256px;
  --topbar-h:      62px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
h1,h2,h3,h4 { margin: 0; font-weight: 650; color: var(--ink); }
p { margin: 0 0 10px; }

/* ------------------------------------------------------------------ *
 *  App shell / layout
 * ------------------------------------------------------------------ */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  transition: transform .25s ease;
}
.sidebar__brand {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex: 0 0 auto;
}
.sidebar__logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #fb923c);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 15px; letter-spacing: .5px;
  flex: 0 0 auto;
}
.sidebar__title { font-size: 15px; font-weight: 700; color: #fff; line-height: 1.1; }
.sidebar__title small { display: block; font-size: 11px; font-weight: 500; color: var(--sidebar-text); margin-top: 2px; }

.sidebar__nav { flex: 1 1 auto; overflow-y: auto; padding: 12px 12px 24px; }
.sidebar__nav::-webkit-scrollbar { width: 8px; }
.sidebar__nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 8px; }

.menu, .menu__sub { list-style: none; margin: 0; padding: 0; }
.menu__item { margin: 2px 0; }
.menu__link {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 8px;
  color: var(--sidebar-text); cursor: pointer;
  font-size: 13.5px; font-weight: 500;
  transition: background .15s, color .15s;
  user-select: none;
}
.menu__link:hover { background: var(--sidebar-bg-2); color: #fff; }
.menu__link i { width: 18px; text-align: center; font-size: 15px; flex: 0 0 auto; }
.menu__link .menu__caret { margin-left: auto; transition: transform .2s; font-size: 11px; }
.menu__item.is-open > .menu__link .menu__caret { transform: rotate(90deg); }
.menu__item.is-active > .menu__link,
.menu__link.is-active {
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  color: #fff; box-shadow: 0 4px 12px rgba(234,88,12,.35);
}
.menu__sub { max-height: 0; overflow: hidden; transition: max-height .25s ease; padding-left: 12px; }
.menu__item.is-open > .menu__sub { max-height: 520px; }
.menu__sub .menu__link { padding: 8px 12px 8px 14px; font-size: 13px; }
.menu__sub .menu__link::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: .45; flex: 0 0 auto;
}
.menu__group-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .9px;
  color: #5d6b7e; padding: 16px 12px 6px; font-weight: 700;
}

/* ------------------------------------------------------------------ *
 *  Main column
 * ------------------------------------------------------------------ */
.main { flex: 1 1 auto; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: var(--topbar-h); background: var(--card);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px; position: sticky; top: 0; z-index: 30;
}
.topbar__toggle {
  display: none; border: 0; background: transparent; cursor: pointer;
  font-size: 20px; color: var(--ink); padding: 6px; border-radius: 8px;
}
.topbar__toggle:hover { background: var(--line-soft); }
.topbar__title { font-size: 17px; font-weight: 650; }
.topbar__spacer { flex: 1 1 auto; }
.topbar__user { display: flex; align-items: center; gap: 11px; cursor: pointer; padding: 5px 8px; border-radius: 9px; }
.topbar__user:hover { background: var(--line-soft); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-dark);
  display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: 0 0 auto;
}
.topbar__user-meta { line-height: 1.15; }
.topbar__user-meta b { font-size: 13.5px; font-weight: 650; }
.topbar__user-meta span { display: block; font-size: 11.5px; color: var(--muted); }

.user-menu { position: relative; }
.user-menu__pop {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-lg); min-width: 190px; padding: 6px; display: none; z-index: 40;
}
.user-menu.is-open .user-menu__pop { display: block; }
.user-menu__pop a {
  display: flex; gap: 10px; align-items: center; padding: 9px 11px;
  color: var(--ink); border-radius: 7px; font-size: 13.5px;
}
.user-menu__pop a:hover { background: var(--line-soft); }
.user-menu__pop a.danger { color: var(--err); }
.user-menu__pop hr { border: 0; border-top: 1px solid var(--line-soft); margin: 5px 2px; }

.content { padding: 24px 22px 48px; flex: 1 1 auto; }
.page-head { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.page-head h1 { font-size: 21px; }
.page-head p { color: var(--muted); margin: 4px 0 0; font-size: 13px; }
.page-head__actions { margin-left: auto; display: flex; gap: 9px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ *
 *  Cards & grids
 * ------------------------------------------------------------------ */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card__head { padding: 15px 18px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; gap: 10px; }
.card__head h3 { font-size: 15px; }
.card__head .card__head-actions { margin-left: auto; display: flex; gap: 8px; }
.card__body { padding: 18px; }
.card__body--flush { padding: 0; }
.card__foot { padding: 14px 18px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

.grid { display: grid; gap: 16px; }
.grid--stats { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; display: flex; align-items: center; gap: 15px;
}
.stat__icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; flex: 0 0 auto; }
.stat__icon--a { background: var(--accent-soft); color: var(--accent-dark); }
.stat__icon--b { background: var(--info-bg); color: var(--info); }
.stat__icon--c { background: var(--warn-bg); color: var(--warn); }
.stat__icon--d { background: var(--ok-bg); color: var(--ok); }
.stat__value { font-size: 24px; font-weight: 750; line-height: 1; }
.stat__label { font-size: 12.5px; color: var(--muted); margin-top: 5px; }

/* ------------------------------------------------------------------ *
 *  Tables
 * ------------------------------------------------------------------ */
.table-wrap { width: 100%; overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th, table.tbl td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
table.tbl thead th {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--ink-soft); background: #fafbfc; font-weight: 700; position: sticky; top: 0;
}
table.tbl tbody tr:hover { background: #fafbfd; }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl .row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.tbl-empty { text-align: center; color: var(--muted); padding: 34px 16px; }

/* ------------------------------------------------------------------ *
 *  Buttons
 * ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 8px 15px; font-size: 13.5px; font-weight: 600; cursor: pointer;
  font-family: inherit; line-height: 1.2; transition: filter .15s, background .15s, border-color .15s;
  white-space: nowrap;
}
.btn i { font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--accent-dark); }
.btn--secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn--secondary:hover:not(:disabled) { background: var(--line-soft); }
.btn--danger { background: #fff; color: var(--err); border-color: #f3c3c3; }
.btn--danger:hover:not(:disabled) { background: var(--err-bg); }
.btn--ghost { background: transparent; color: var(--ink-soft); }
.btn--ghost:hover:not(:disabled) { background: var(--line-soft); }
.btn--sm { padding: 6px 11px; font-size: 12.5px; }
.btn--icon { padding: 7px; width: 32px; height: 32px; }
.btn--block { width: 100%; }
.btn--success { background: var(--ok); color: #fff; }
.btn--success:hover:not(:disabled) { filter: brightness(.93); }

/* ------------------------------------------------------------------ *
 *  Badges / pills
 * ------------------------------------------------------------------ */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 650; }
.pill--ok   { background: var(--ok-bg);   color: var(--ok); }
.pill--warn { background: var(--warn-bg); color: var(--warn); }
.pill--err  { background: var(--err-bg);  color: var(--err); }
.pill--info { background: var(--info-bg); color: var(--info); }
.pill--muted{ background: var(--line-soft); color: var(--ink-soft); }
.pill--dot::before { content:""; width:6px; height:6px; border-radius:50%; background: currentColor; }

/* ------------------------------------------------------------------ *
 *  Forms
 * ------------------------------------------------------------------ */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 15px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.field label .req { color: var(--err); }
.input, .select, .textarea {
  width: 100%; padding: 9px 12px; font-size: 13.5px; font-family: inherit; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(234,88,12,.13); }
.textarea { resize: vertical; min-height: 80px; }
.field__hint { font-size: 11.5px; color: var(--muted); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

.toolbar { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .search { flex: 1 1 240px; max-width: 360px; position: relative; }
.toolbar .search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar .search .input { padding-left: 34px; }

/* ------------------------------------------------------------------ *
 *  Modal
 * ------------------------------------------------------------------ */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,23,42,.5);
  display: none; align-items: flex-start; justify-content: center;
  padding: 40px 16px; z-index: 60; overflow-y: auto;
}
.modal-backdrop.is-open { display: flex; }
.modal {
  background: #fff; border-radius: 13px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px; margin: auto 0; animation: pop .18s ease;
}
.modal--lg { max-width: 820px; }
.modal--sm { max-width: 420px; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal__head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.modal__head h3 { font-size: 16px; }
.modal__close { margin-left: auto; border: 0; background: transparent; font-size: 20px; color: var(--muted); cursor: pointer; border-radius: 7px; width: 30px; height: 30px; }
.modal__close:hover { background: var(--line-soft); color: var(--ink); }
.modal__body { padding: 20px; }
.modal__foot { padding: 14px 20px; border-top: 1px solid var(--line-soft); display: flex; gap: 10px; justify-content: flex-end; }

/* ------------------------------------------------------------------ *
 *  Toast
 * ------------------------------------------------------------------ */
.toast-wrap { position: fixed; top: 18px; right: 18px; z-index: 90; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--info);
  border-radius: 9px; box-shadow: var(--shadow-lg); padding: 12px 16px; min-width: 260px; max-width: 360px;
  display: flex; gap: 10px; align-items: flex-start; animation: slideIn .2s ease; font-size: 13.5px;
}
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast.ok  { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--err); }
.toast i { font-size: 16px; margin-top: 1px; }
.toast.ok i { color: var(--ok); } .toast.err i { color: var(--err); } .toast i { color: var(--info); }

/* ------------------------------------------------------------------ *
 *  Misc utilities
 * ------------------------------------------------------------------ */
.loader { display: inline-block; width: 18px; height: 18px; border: 2.5px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
.loader--center { display: block; margin: 32px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.muted { color: var(--muted); }
.text-right { text-align: right; } .text-center { text-align: center; }
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}
.flex { display: flex; } .flex-between { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.gap-1{gap:8px}.gap-2{gap:16px}.wrap{flex-wrap:wrap}.items-center{align-items:center}
.hidden { display: none !important; }
.divider { height: 1px; background: var(--line-soft); margin: 16px 0; border: 0; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; font-size: 13.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 550; }

/* ------------------------------------------------------------------ *
 *  Login
 * ------------------------------------------------------------------ */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr;
}
.auth__aside {
  background: linear-gradient(150deg, #16202e 0%, #243447 60%, #2f2419 100%);
  color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.auth__aside::after {
  content:""; position:absolute; width: 360px; height: 360px; border-radius:50%;
  background: radial-gradient(circle, rgba(234,88,12,.5), transparent 70%);
  right: -90px; bottom: -90px;
}
.auth__brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 18px; }
.auth__brand .sidebar__logo { width: 40px; height: 40px; font-size: 17px; }
.auth__pitch h2 { font-size: 30px; color: #fff; line-height: 1.2; max-width: 440px; }
.auth__pitch p { color: #c4cdda; max-width: 420px; margin-top: 14px; font-size: 14.5px; }
.auth__features { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }
.auth__features div { display: flex; gap: 11px; align-items: center; color: #d9e0ea; font-size: 14px; }
.auth__features i { color: #fb923c; }
.auth__foot { color: #8995a6; font-size: 12.5px; position: relative; z-index: 1; }

.auth__main { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.auth__card { width: 100%; max-width: 380px; }
.auth__card h1 { font-size: 23px; }
.auth__card > p { color: var(--muted); margin: 6px 0 26px; }
.auth__demo { margin-top: 22px; padding: 14px; background: var(--accent-soft); border: 1px dashed #f3b58a; border-radius: 9px; font-size: 12.5px; color: #7c3a13; }
.auth__demo b { color: var(--accent-dark); }
.auth__demo code { background: #fff; padding: 1px 6px; border-radius: 5px; font-size: 12px; }

/* ------------------------------------------------------------------ *
 *  Payslip print layout
 * ------------------------------------------------------------------ */
.payslip { font-size: 13px; color: var(--ink); }
.payslip__top { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--ink); padding-bottom: 14px; margin-bottom: 16px; gap: 16px; }
.payslip__org { font-size: 19px; font-weight: 750; }
.payslip__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.payslip__col { padding: 0; }
.payslip__col + .payslip__col { border-left: 1px solid var(--line); }
.payslip__col h4 { background: #fafbfc; padding: 9px 14px; font-size: 12.5px; border-bottom: 1px solid var(--line); }
.payslip__line { display: flex; justify-content: space-between; padding: 8px 14px; border-bottom: 1px solid var(--line-soft); }
.payslip__line.total { font-weight: 700; background: #fafbfc; border-top: 1px solid var(--line); }
.payslip__net { margin-top: 16px; background: var(--accent-soft); border: 1px solid #f3b58a; border-radius: 9px; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; }
.payslip__net b { font-size: 22px; color: var(--accent-dark); }

/* ------------------------------------------------------------------ *
 *  Responsive
 * ------------------------------------------------------------------ */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 45; }
.sidebar-overlay.is-open { display: block; }

@media (max-width: 992px) {
  .auth { grid-template-columns: 1fr; }
  .auth__aside { display: none; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.is-open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main { margin-left: 0; }
  .topbar__toggle { display: inline-flex; }
  .content { padding: 18px 15px 40px; }
  .kv { grid-template-columns: 120px 1fr; }
  .payslip__cols { grid-template-columns: 1fr; }
  .payslip__col + .payslip__col { border-left: 0; border-top: 1px solid var(--line); }
  .topbar__user-meta { display: none; }
}
@media (max-width: 520px) {
  .page-head__actions { width: 100%; }
  .page-head__actions .btn { flex: 1 1 auto; }
  .modal__foot { flex-direction: column-reverse; }
  .modal__foot .btn { width: 100%; }
}

/* ------------------------------------------------------------------ *
 *  Print
 * ------------------------------------------------------------------ */
@media print {
  .sidebar, .topbar, .sidebar-overlay, .no-print { display: none !important; }
  .main { margin-left: 0; }
  .content { padding: 0; }
  body { background: #fff; }
  .card { border: 0; box-shadow: none; }
}

/* ------------------------------------------------------------------ *
 *  Permission picker (roles modal)
 * ------------------------------------------------------------------ */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; max-height: 46vh; overflow-y: auto; padding: 2px; }
.perm-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fff; }
.perm-card__name { font-weight: 650; font-size: 13px; margin-bottom: 8px; color: var(--ink); }
.perm-card__opts { display: flex; flex-direction: column; gap: 7px; }
.perm-card__opts .check { font-size: 13px; }

/* ------------------------------------------------------------------ *
 *  Posting-history timeline
 * ------------------------------------------------------------------ */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.timeline__item { position: relative; padding: 0 0 16px 28px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot { position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 0 0 2px #fff; }
.timeline__title { font-weight: 600; font-size: 14px; color: var(--ink); }

/* ------------------------------------------------------------------ *
 *  Simple horizontal bar chart (monthly attendance) — no JS deps
 * ------------------------------------------------------------------ */
.barchart { display: flex; flex-direction: column; gap: 12px; }
.barchart__row { display: grid; grid-template-columns: 124px 1fr 44px; align-items: center; gap: 12px; }
.barchart__label { font-size: 13px; color: #334155; }
.barchart__track { height: 16px; background: #eef2f6; border-radius: 9px; overflow: hidden; }
.barchart__fill { display: block; height: 100%; border-radius: 9px; min-width: 3px; transition: width .45s ease; }
.barchart__val { font-weight: 650; font-size: 13px; text-align: right; color: var(--ink); }
.barchart__empty { color: var(--muted, #64748b); padding: 8px 0; }
@media (max-width: 560px) { .barchart__row { grid-template-columns: 88px 1fr 34px; gap: 8px; } }

/* ------------------------------------------------------------------ *
 *  Dashboard mini-lists & flag groups
 * ------------------------------------------------------------------ */
.mini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mini-list li { font-size: 14px; }
.mini-list--split li { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.flag-group { margin-bottom: 14px; }
.flag-group:last-child { margin-bottom: 0; }
.flag-group__title { font-weight: 650; font-size: 13px; color: #334155; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.flag-group__title i { color: var(--accent); }

/* employer contributions block on the payslip */
.payslip__employer { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }

/* ------------------------------------------------------------------ *
 *  Document setup (letterhead / stamp / signature)
 * ------------------------------------------------------------------ */
.asset-preview { margin-bottom: 8px; }
.asset-preview img { max-width: 100%; max-height: 180px; border: 1px solid var(--line); border-radius: 8px; background:
 #fff; padding: 6px; }
.switch-row { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.switch-row input { width: 16px; height: 16px; }

.subhead { font-weight: 650; font-size: 13px; color: #334155; border-top: 1px solid var(--line); padding-top: 12px; display: flex; align-items: center; gap: 6px; }
.subhead i { color: var(--accent); }

/* ------------------------------------------------------------------ *
 *  Attendance: tabs, monthly matrix, status cells
 * ------------------------------------------------------------------ */
.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tab { appearance: none; background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 9px 16px; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted, #64748b); cursor: pointer; }
.tab:hover { color: var(--ink, #0f172a); }
.tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }

.tbl--matrix th, .tbl--matrix td { padding: 5px 6px; font-size: 12.5px; white-space: nowrap; }
.tbl--matrix th.att-d, .tbl--matrix td.att-cell, .tbl--matrix td.att-d { text-align: center; min-width: 26px; width: 26px; }
.att-cell { font-weight: 600; color: #334155; border-radius: 3px; }
.sticky-col { position: sticky; left: 0; background: var(--surface, #fff); z-index: 1; }
.att-P  { background: #dcfce7; color: #166534; }
.att-A  { background: #fee2e2; color: #991b1b; }
.att-H  { background: #fef9c3; color: #854d0e; }
.att-L  { background: #dbeafe; color: #1e40af; }
.att-Ho { background: #e2e8f0; color: #475569; }
.att-W  { background: #f1f5f9; color: #94a3b8; }
.att-flag-late { box-shadow: inset 0 0 0 2px #d97706; }
.att-flag-ot   { box-shadow: inset 0 0 0 2px #2563eb; }
.att-legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 10px; font-size: 13px; }
.att-legend span { display: inline-flex; align-items: center; gap: 6px; }
.att-key { display: inline-block; width: 14px; height: 14px; border-radius: 3px; }

/* brief highlight when a field is auto-filled (e.g. basic from a pay scale) */
.is-flash { animation: flashField 0.6s ease; }
@keyframes flashField { 0% { background: #fef9c3; } 100% { background: transparent; } }

/* inline info callout (e.g. increment preview) */
.callout { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; background: var(--surface-2, #fafafa); font-size: 14px; }
.callout i { color: var(--accent); margin-top: 2px; }
