/* MAZIV Employee Portal — one stylesheet, no build step. Brand colours taken from the MAZIV paper forms. */
:root {
  --navy: #002060; --navy-dark: #00133d; --navy-soft: #e6ebf4; --steel: #8a9bb8;
  --ink: #15193a; --muted: #5d6585; --line: #dfe3ee; --bg: #f4f6fb; --card: #fff;
  --ok: #157347; --ok-bg: #e5f5ec; --warn: #9a5b00; --warn-bg: #fff4dc; --bad: #b42318; --bad-bg: #fde9e7; --info: #002060; --info-bg: #e6ebf4;
  --radius: 10px; --shadow: 0 1px 2px rgba(0, 32, 96, .06), 0 2px 8px rgba(0, 32, 96, .05);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg);
  font-size: 15px; line-height: 1.45;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: var(--navy); }
h1 { font-size: 1.5rem; margin: .2rem 0 .6rem; color: var(--navy-dark); }
h2 { font-size: 1.08rem; margin: 0 0 .7rem; color: var(--navy-dark); }
h3.sub { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 1rem 0 .4rem; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .nowrap { white-space: nowrap; }
[hidden] { display: none !important; }

/* Brand */
.wordmark { font-family: Georgia, "Times New Roman", serif; font-weight: 700; letter-spacing: .5em; color: var(--navy); font-size: 2.1rem; line-height: 1; }
.wordmark.small { font-size: 1.15rem; letter-spacing: .35em; color: #fff; }
.logo { display: block; width: 270px; max-width: 100%; height: auto; }
.logo-top { display: block; height: 20px; width: auto; }
.brand { align-items: center; }
.tagline { font-size: .62rem; letter-spacing: .32em; color: var(--navy); margin-top: .35rem; font-weight: 600; }

/* Login */
.login-page { display: grid; place-items: center; padding: 16px;
  background: linear-gradient(115deg, var(--bg) 0 55%, var(--navy) 55% 58%, var(--bg) 58% 61%, var(--navy-dark) 61%); }
.login-card { background: var(--card); width: min(420px, 100%); padding: 28px 24px; border-radius: 14px; box-shadow: 0 10px 40px rgba(0, 0, 77, .18); }
.login-card h1 { margin-top: 1.2rem; }
.brand-block { border-bottom: 3px solid var(--navy); padding-bottom: .8rem; }

/* Top bar and layout */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 56px;
  background: linear-gradient(100deg, var(--navy) 0 70%, var(--navy-dark) 70%); color: #fff; }
.brand { display: flex; align-items: baseline; gap: 10px; color: #fff; text-decoration: none; }
.brand-sub { font-size: .85rem; opacity: .85; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { background: none; border: 0; color: inherit; font-size: 1.15rem; cursor: pointer; padding: 6px 8px; border-radius: 8px; text-decoration: none; position: relative; line-height: 1; }
.icon-btn:hover { background: rgba(127, 127, 127, .15); }
.topbar .badge { position: absolute; top: 0; right: 0; }
.who { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--navy); display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.menu-toggle { display: none; }
.layout { display: flex; min-height: calc(100vh - 56px); }
.sidenav { width: 230px; flex: none; background: #fff; border-right: 1px solid var(--line); padding: 14px 10px; position: sticky; top: 56px; height: calc(100vh - 56px); overflow: auto; }
.sidenav a, .sidenav .linklike { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; width: 100%; text-align: left; font-size: .95rem; }
.sidenav a:hover, .sidenav .linklike:hover { background: var(--navy-soft); }
.sidenav a.active { background: var(--navy); color: #fff; }
.nav-group { margin: 14px 12px 4px; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.badge { background: #e11d48; color: #fff; border-radius: 999px; font-size: .7rem; padding: 1px 6px; font-weight: 700; min-width: 18px; text-align: center; }
.view { flex: 1; padding: 22px clamp(16px, 3vw, 34px) 60px; max-width: 1180px; outline: none; min-width: 0; }
.crumbs { margin: 0 0 .3rem; font-size: .9rem; }
.linklike { background: none; border: 0; padding: 0; color: var(--navy); cursor: pointer; font: inherit; }

/* Cards and grids */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card-head, .page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.page-head h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 + * { margin-top: 16px; }
.error-card { border-color: var(--bad); }
.table-card { padding: 0; overflow: hidden; }
.table-card > p { padding: 0 14px; }

/* Tiles */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile-grid.big { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.tile { display: flex; flex-direction: column; gap: 3px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: #fff; transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--navy); transform: translateY(-1px); }
.tile-icon { font-size: 1.4rem; } .tile-name { font-weight: 600; } .tile-desc { font-size: .84rem; color: var(--muted); }
.tile-code { font-size: .7rem; color: var(--steel); margin-top: auto; letter-spacing: .04em; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.stats.big { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 16px; }
.stat { display: flex; flex-direction: column; background: var(--navy-soft); border-radius: var(--radius); padding: 12px 14px; text-decoration: none; color: var(--ink); }
.stats.big .stat { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.stat-num { font-size: 1.7rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.stat-label { font-weight: 600; font-size: .9rem; } .stat-sub { font-size: .78rem; color: var(--muted); }
.kv { list-style: none; padding: 0; margin: 0 0 1rem; } .kv li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }

/* Request rows */
.req-list { display: flex; flex-direction: column; }
.req-row { display: flex; gap: 12px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.req-row:last-child { border-bottom: 0; } .req-row:hover { background: var(--navy-soft); }
.req-icon { font-size: 1.25rem; width: 30px; text-align: center; flex: none; }
.req-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.req-title { font-weight: 600; } .req-sub { font-size: .84rem; color: var(--muted); overflow-wrap: anywhere; } .req-sub.step { color: var(--warn); }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; vertical-align: middle; }
.chip-ok { background: var(--ok-bg); color: var(--ok); } .chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-bad { background: var(--bad-bg); color: var(--bad); } .chip-info { background: var(--info-bg); color: var(--info); } .chip-muted { background: #eceef4; color: var(--muted); }

/* Notices */
.notice { border-radius: 8px; padding: 10px 14px; margin: 10px 0; background: #eef1f8; display: block; }
.notice.info { background: var(--info-bg); } .notice.warn { background: var(--warn-bg); color: #5c3a00; } .notice.ok { background: var(--ok-bg); color: #0d4d2f; }
.notice.action { text-decoration: none; color: var(--ink); } .notice ul { margin: .3rem 0 0; padding-left: 1.2rem; }
.warn-list { color: #5c3a00; }

/* Forms */
label { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; font-weight: 600; margin-bottom: 12px; color: #2b3150; }
label.inline { flex-direction: row; align-items: center; gap: 8px; margin: 0; }
input, select, textarea { font: inherit; font-weight: 400; padding: 9px 10px; border: 1px solid #c9cfdf; border-radius: 8px; background: #fff; color: var(--ink); width: 100%; min-height: 40px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--navy); outline-offset: 0; border-color: var(--navy); }
input[disabled], select[disabled] { background: #f1f2f6; color: var(--muted); }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px 4px; margin: 0 0 12px; }
legend { font-size: .85rem; font-weight: 600; padding: 0 4px; color: #2b3150; }
.radio-row { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 4px 0 8px; }
label.radio { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; margin: 0; }
label.radio input { width: auto; min-height: 0; }
.row-2, .row-3 { display: grid; gap: 0 12px; grid-template-columns: 1fr 1fr; }
.row-3 { grid-template-columns: repeat(3, 1fr); }
.form { max-width: 860px; }
.who-box { background: var(--navy-soft); border-radius: 8px; padding: 8px 12px; margin-bottom: 14px; }
.form-error { color: var(--bad); background: var(--bad-bg); padding: 8px 12px; border-radius: 8px; font-size: .9rem; }
.preview:empty { display: none; }
.filters { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: flex-end; margin-bottom: 12px; }
.filters label { margin-bottom: 0; min-width: 140px; } .filters label.radio { min-width: 0; padding-bottom: 10px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: flex-end; max-width: none; }
.inline-form label { flex: 1; min-width: 160px; } .inline-form .btn { margin-bottom: 12px; }
.field-label { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; min-height: 40px; border-radius: 8px; border: 1px solid #c9cfdf;
  background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--navy); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; } .btn.primary:hover { background: var(--navy-dark); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; } .btn.small { padding: 5px 10px; min-height: 32px; font-size: .85rem; }
.btn.block { width: 100%; } .btn[disabled] { opacity: .55; cursor: not-allowed; }
.danger-text { color: var(--bad); margin-top: 12px; }
.btn-row { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; } .btn-row.left { justify-content: flex-start; margin: 0 0 12px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip-btn { border: 1px solid var(--info); background: #fff; color: var(--info); border-radius: 999px; padding: 4px 12px; cursor: pointer; font: inherit; font-size: .85rem; }
.chip-btn[disabled] { opacity: .5; }

/* Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #f7f8fc; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table.compact td, .table.compact th { padding: 6px 8px; }
.table tr.inactive td { opacity: .55; }
.table td.actions { white-space: nowrap; text-align: right; }
.table.lines td { padding: 6px 4px; } .table.lines input, .table.lines select { min-width: 110px; }
.line-del { width: 40px; }
.hours-input { width: 90px; }
.settings input, .settings select { min-width: 220px; }

/* Request detail */
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 20px; margin: 8px 0; }
.fields.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.fields.compact { margin-bottom: 4px; }
.field-value { white-space: pre-wrap; overflow-wrap: anywhere; }
.act-box { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 14px; counter-reset: s; }
.steps li { padding: 4px 12px 4px 8px; border-radius: 999px; background: #eceef4; font-size: .82rem; color: var(--muted); counter-increment: s; }
.steps li::before { content: counter(s) ". "; font-weight: 700; }
.steps li.step-done { background: var(--ok-bg); color: var(--ok); } .steps li.step-current { background: var(--warn-bg); color: var(--warn); font-weight: 700; }
.timeline { list-style: none; padding: 0 0 0 18px; margin: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 14px 12px; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--steel); border: 2px solid #fff; }
.timeline .tl-approved::before, .timeline .tl-closed::before { background: var(--ok); } .timeline .tl-rejected::before, .timeline .tl-cancelled::before { background: var(--bad); }
.timeline .tl-waiting::before { background: var(--warn); }
.remark { font-style: italic; color: #33395a; margin-top: 2px; }
.approval-list { display: flex; flex-direction: column; gap: 4px; }
.approval-head { display: flex; gap: 10px; align-items: flex-start; } .approval h2 { margin: 0; }
.mini-lines { margin: 0 0 8px; padding-left: 1.1rem; font-size: .88rem; }
.notif-list { list-style: none; padding: 0; margin: 0; } .notif-list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.notif-list li.unread { font-weight: 600; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tab { padding: 8px 14px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.tab.active { color: var(--navy); border-color: var(--navy); font-weight: 600; }
.cred { display: grid; gap: 10px; background: var(--navy-soft); padding: 12px; border-radius: 8px; }
.cred code { font-size: 1.25rem; font-weight: 700; letter-spacing: .03em; user-select: all; }

/* Dialog and toasts */
dialog { border: 0; border-radius: 12px; padding: 0; width: min(520px, calc(100% - 24px)); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); color: var(--ink); }
dialog.wide { width: min(860px, calc(100% - 24px)); }
dialog::backdrop { background: rgba(0, 0, 40, .45); }
.dlg header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dlg header h2 { margin: 0; }
.dlg-body { padding: 16px 18px 4px; max-height: 70vh; overflow: auto; }
.dlg footer { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 18px 16px; }
.dlg .form-error { margin: 0 18px; }
#toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; width: min(460px, calc(100% - 24px)); }
.toast { padding: 12px 16px; border-radius: 10px; color: #fff; background: var(--ok); box-shadow: 0 6px 20px rgba(0, 0, 0, .2); }
.toast-bad { background: var(--bad); }

/* Phones */
@media (max-width: 860px) {
  .menu-toggle { display: inline-block; color: #fff; }
  .brand-sub, .who-name { display: none; }
  .sidenav { position: fixed; left: 0; top: 56px; z-index: 30; height: calc(100vh - 56px); transform: translateX(-105%); transition: transform .2s; box-shadow: 4px 0 20px rgba(0, 0, 0, .15); }
  .sidenav.open { transform: none; }
  .row-2, .row-3 { grid-template-columns: 1fr; }
  .tile-grid, .tile-grid.big { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-desc { display: none; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border-bottom: 1px solid var(--line); padding: 8px 10px; }
  .table td { border: 0; padding: 3px 0; }
  .table td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
  .table td.actions { text-align: left; padding-top: 6px; }
  .table.lines tr { position: relative; padding-right: 40px; } .line-del { position: absolute; top: 8px; right: 0; width: auto; }
  .btn-row { justify-content: stretch; } .btn-row .btn { flex: 1; }
  .view { padding-top: 16px; }
}

/* Printable form */
.paper { background: #fff; max-width: 820px; margin: 0 auto; padding: 18px 22px 22px; border: 1px solid var(--line); font-family: "Century Gothic", "Segoe UI", Arial, sans-serif; font-size: 13px; }
.paper-band { display: flex; align-items: center; gap: 0; margin-bottom: 10px; }
.paper-band .logo { width: 240px; } .paper-band .tagline { font-size: .55rem; }
.band-stripes { flex: 1; height: 56px; margin-left: 16px; background: linear-gradient(110deg, transparent 0 4%, var(--navy) 4% 8%, transparent 8% 10%, var(--navy) 10% 14%, transparent 14% 16%, var(--navy) 16% 22%, transparent 22% 24%, var(--navy-dark) 24%); }
.paper table { width: 100%; border-collapse: collapse; }
.paper td, .paper th { border: 1px solid #333; padding: 6px 8px; vertical-align: top; }
.paper-title th { font-size: 1.15rem; text-align: center; } .paper-title td { width: 140px; font-weight: 700; text-align: center; vertical-align: middle; }
.paper-grid td span { font-size: .75rem; color: #333; margin-right: 4px; }
.paper-grid { margin-top: -1px; }
.paper-body { border: 1px solid #333; border-top: 0; padding: 8px 10px; }
.paper-body .table th { background: #8a9bb8; color: #111; border: 1px solid #333; }
.paper-body .table td { border: 1px solid #333; }
.paper-body h3.sub { background: #aab6cc; color: #111; padding: 4px 6px; margin: 6px 0; }
.paper-sign { margin-top: 10px; } .paper-sign th { background: #808080; color: #fff; font-size: .72rem; text-align: left; }
.paper-sign td { height: 86px; }
.sig-decision { font-weight: 700; } .sig-decision.approved { color: #0d5a35; } .sig-decision.rejected { color: var(--bad); }
.sig-name { font-weight: 700; margin-top: 6px; } .sig-date, .sig-remark, .sig-line { font-size: .78rem; color: #333; } .sig-pending { color: #888; }
.paper-employee { margin: 18px 0 8px auto; width: 300px; text-align: center; border-top: 1px solid #333; padding-top: 4px; }
.paper-foot { font-size: .7rem; color: #555; border-top: 1px dashed #999; margin-top: 12px; padding-top: 6px; }
.print-toolbar { display: flex; justify-content: space-between; max-width: 820px; margin: 0 auto 12px; }

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; }
  .topbar, .sidenav, .no-print, #toasts { display: none !important; }
  .layout, .view { display: block; padding: 0; margin: 0; max-width: none; }
  .paper { border: 0; padding: 0; max-width: none; }
  .paper .table thead { display: table-header-group; }
  .paper .table, .paper .table tbody { display: table; width: 100%; } .paper .table tr { display: table-row; } .paper .table td { display: table-cell; }
  .paper .table td::before { display: none; }
  .chip { border: 1px solid #333; background: none !important; color: #000 !important; }
  details { display: block; } details > summary { display: none; }
}
body.print-mode .sidenav { display: none; }
body.print-mode .view { max-width: none; }

/* Import, summary, profile */
.file-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 28px 16px;
  border: 2px dashed #b8c1dc; border-radius: var(--radius); background: #fafbff; text-align: center; cursor: pointer; font-weight: 400; margin: 0; }
.file-drop:hover, .file-drop.over { border-color: var(--navy); background: var(--navy-soft); }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; }
.stat.stat-bad { background: var(--bad-bg); } .stat.stat-bad .stat-num { color: var(--bad); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.table.bars td { border: 0; padding: 5px 6px; vertical-align: middle; }
.bar-label { width: 38%; } .bar-num { width: 22%; white-space: nowrap; }
.bar-cell { width: 40%; }
.bar { display: block; height: 12px; min-width: 3px; width: 0; background: var(--navy); border-radius: 0 4px 4px 0; }
.name-list { list-style: none; padding: 0; margin: 0 0 8px; max-height: 260px; overflow: auto; }
.name-list li { padding: 3px 0; border-bottom: 1px solid var(--line); }
.import-table tr.row-error td { background: var(--bad-bg); }
progress { width: 100%; height: 12px; accent-color: var(--navy); }
.creds code { font-size: 1rem; font-weight: 700; user-select: all; }
.print-only { display: none; }
@media (max-width: 860px) {
  .table.bars tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 6px 0; }
  .table.bars td { display: block; width: auto; }
  .table.bars .bar-cell { grid-column: 1 / -1; order: 3; }
}
@media print {
  body.print-creds .view > *:not(#result):not(#creds), body.print-creds #result > *:not(#creds) { display: none !important; }
  body.print-creds .print-only { display: block; }
  body.print-creds .card { border: 0; box-shadow: none; }
  .table.creds, .table.creds tbody { display: table; width: 100%; } .table.creds tr { display: table-row; } .table.creds td, .table.creds th { display: table-cell; border: 1px solid #333; padding: 8px; }
  .table.creds td::before { display: none; } .table.creds thead { display: table-header-group; }
}
.bar.zero { min-width: 0; }
.row-4 { display: grid; gap: 0 12px; grid-template-columns: 1fr 1.2fr 1.2fr 1.2fr; }
@media (max-width: 860px) { .row-4 { grid-template-columns: 1fr 1fr; } }

/* Home: holiday banner, calendar, sign-in, reminders */
.holiday-banner { display: flex; gap: 12px; align-items: center; background: var(--navy-soft); border-left: 4px solid var(--navy); border-radius: 8px; padding: 10px 14px; margin: 10px 0 16px; }
.hb-icon { font-size: 1.5rem; }
.last-signin { margin-top: -4px; }
.pw-reminder .btn-row { margin-top: 8px; }
.cal-head { align-items: center; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-nav .icon-btn { font-size: 1.4rem; color: var(--navy); padding: 2px 10px; }
.cal-title { min-width: 130px; text-align: center; color: var(--navy-dark); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-dow { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); text-align: center; padding: 4px 0; }
.cal-dow.rest { color: #9aa0b5; }
.cal-cell { min-height: 78px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 5px; display: flex; flex-direction: column; gap: 2px; background: #fff; overflow: hidden; }
.cal-cell.empty { border: 0; background: transparent; }
.cal-cell.rest { background: #f1f2f6; }
.cal-cell.holiday { background: var(--navy-soft); border-color: #b9c4dd; }
.cal-cell.today { outline: 2px solid var(--navy); outline-offset: -2px; }
.cal-cell.today .cal-num { background: var(--navy); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; }
.cal-num { font-size: .82rem; font-weight: 600; }
.cal-hol { font-size: .7rem; font-weight: 700; color: var(--navy-dark); line-height: 1.15; }
.cal-ev { font-size: .7rem; border-radius: 4px; padding: 1px 4px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev.approved { background: var(--navy); color: #fff; }
.cal-ev.pending { border: 1px dashed var(--navy); color: var(--navy); background: #fff; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 4px; color: var(--muted); }
.cal-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.cal-hol-dot, .cal-rest-dot, .cal-ev-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; flex: none; }
.cal-hol-dot { background: var(--navy-soft); border: 1px solid #9fb0d3; }
.cal-rest-dot { background: #f1f2f6; border: 1px solid var(--line); }
.cal-ev-dot.approved { background: var(--navy); }
.cal-ev-dot.pending { border: 1px dashed var(--navy); background: #fff; }
.cal-list { list-style: none; padding: 0; margin: 0; }
.cal-list li { display: flex; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: .9rem; align-items: baseline; }
.cal-list li > span:last-child { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cal-list-date { min-width: 120px; color: var(--muted); font-size: .85rem; }
.privacy-note { font-size: .78rem; color: var(--muted); background: #f7f8fc; border-radius: 8px; padding: 8px 10px; margin: 6px 0 0; }
.prose h2 { margin-top: 1.2rem; } .prose ul { padding-left: 1.2rem; } .prose li { margin-bottom: 4px; }
@media (max-width: 860px) {
  .cal-cell { min-height: 46px; padding: 3px; }
  .cal-hol { display: none; }
  .cal-ev { font-size: 0; padding: 0; width: 8px; height: 8px; border-radius: 50%; }
  .cal-cell.holiday .cal-num { text-decoration: underline; }
  .cal-list-date { min-width: 96px; }
}

/* Announcement board */
.ann-list { display: flex; flex-direction: column; gap: 8px; }
.ann { border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: 8px; background: #fff; }
.ann.ann-urgent { border-left-color: var(--bad); }
.ann.ann-policy { border-left-color: var(--steel); }
.ann.unread { background: #f7f9fd; }
.ann summary { list-style: none; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; cursor: pointer; }
.ann summary::-webkit-details-marker { display: none; }
.ann summary::after { content: '▾'; margin-left: auto; color: var(--muted); transition: transform .15s; }
.ann[open] summary::after { transform: rotate(180deg); }
.ann-icon { font-size: 1.2rem; }
.ann-main { display: flex; flex-direction: column; min-width: 0; }
.ann-title { font-weight: 600; overflow-wrap: anywhere; }
.ann.unread .ann-title { font-weight: 700; color: var(--navy-dark); }
.ann-meta { font-size: .8rem; color: var(--muted); }
.ann-body { padding: 0 14px 12px 44px; overflow-wrap: anywhere; line-height: 1.55; }
.ann-new { margin-left: 4px; }
.sidenav a .badge { margin-left: 6px; }
.table input[type=checkbox] { width: auto; min-height: 0; }

/* Payslips */
.slip-list { list-style: none; margin: 0; padding: 0; }
.slip-list li { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.slip-list li:last-child { border-bottom: 0; }
.slip-icon { font-size: 1.4rem; }
.slip-main { flex: 1; display: flex; flex-direction: column; min-width: 180px; }
.slip-actions { margin: 0; }
.pad { padding: 14px 18px; margin: 0; }
details.card > summary { cursor: pointer; }
.slip-ack { margin-top: 4px; }
.ack-note { margin-top: 4px; padding: 4px 8px; border-left: 3px solid var(--warn); background: var(--warn-bg); border-radius: 4px; max-width: 320px; white-space: pre-wrap; }
.form-guide { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid #002060; border-radius: 8px; background: #f6f8fc; }
.form-guide h3 { margin: 0 0 10px; font-size: 1rem; }
.form-guide p { margin: 4px 0; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.guide-grid > .guide-late { border-left: 3px solid var(--warn); }
.guide-grid > div { background: #fff; border-radius: 6px; padding: 10px 12px; border: 1px solid var(--line); }
@media (max-width: 760px) { .guide-grid { grid-template-columns: 1fr; } }

/* Performance evaluation */
.perf-head { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 18px; }
.perf-head > div { display: flex; flex-direction: column; } .perf-head span { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.perf-part { margin: 18px 0 8px; }
.perf-area h3 { margin: 0 0 8px; color: var(--navy); font-size: .98rem; letter-spacing: .02em; }
.kpi-table td { vertical-align: middle; } .kpi-table th.kpi-n, .kpi-table td.kpi-n { width: 46px; text-align: center; padding: 6px 2px; }
.kpi-radio { display: inline-flex; flex-direction: row; position: relative; cursor: pointer; margin: 0; }
.kpi-radio input { position: absolute; inset: 0; z-index: 1; opacity: 0; width: 100%; height: 100%; min-height: 0; padding: 0; margin: 0; border: 0; cursor: pointer; }
.kpi-radio span { pointer-events: none; }
.kpi-radio span { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-weight: 600; color: var(--muted); }
.kpi-radio input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.kpi-radio input:focus-visible + span { outline: 3px solid #8fb0ff; outline-offset: 1px; }
.kpi-radio input:disabled + span { cursor: default; }
.perf-calc { display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: flex-end; padding: 8px 4px; font-size: .9rem; color: var(--muted); }
.perf-calc strong { color: var(--ink); margin-left: 4px; }
.perf-subtotal { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-weight: 600; } .perf-subtotal strong { font-size: 1.5rem; color: var(--navy); }
.check-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; margin-bottom: 8px; }
.perf-actions { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; justify-content: flex-end;
  background: #fff; border-top: 3px solid var(--navy); box-shadow: 0 -4px 12px rgba(0, 32, 96, .08); padding: 8px 12px; margin: 0 -4px; border-radius: 8px 8px 0 0; }
.perf-actions .perf-subtotal { margin-right: auto; } .perf-actions .perf-subtotal strong { font-size: 1.3rem; }
.perf-form .kpi-table tr, .perf-form textarea, .perf-form input { scroll-margin-bottom: 90px; }
.pick-box { max-height: 240px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: #fff; }
.pick-item { display: block; padding: 3px 0; }
.pick-filter { margin-bottom: 6px; }
.sum-table td:not(:first-child), .sum-table th:not(:first-child) { text-align: center; }
.sum-final td { background: var(--navy-soft); font-weight: 600; }
.row-current td { background: var(--navy-soft); }
.perf-result { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 12px; }
.perf-result > div { display: flex; flex-direction: column; gap: 2px; background: var(--navy-soft); border-radius: 8px; padding: 10px 12px; }
.perf-result span:first-child { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.perf-result strong { font-size: 1.4rem; color: var(--navy); }
.perf-result .chip { align-self: flex-start; font-size: .95rem; }
.perf-result b { color: var(--navy); }
.perf-dl dt { font-weight: 600; margin-top: 8px; } .perf-dl dd { margin: 2px 0 0; white-space: pre-wrap; } .perf-dl dd p { margin: 0 0 4px; }
.att-rating { align-self: end; padding: 8px 0; }
.funnel-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; }
.funnel { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.funnel li { display: grid; grid-template-columns: 1fr; justify-items: center; }
.funnel-bar { min-width: 44px; width: 0; height: 34px; background: var(--navy); color: #fff; border-radius: 6px; display: grid; place-items: center; font-weight: 700; transition: width .3s; }
.funnel li:nth-child(2) .funnel-bar { background: #1d3b7a; } .funnel li:nth-child(3) .funnel-bar { background: #3a5894; }
.funnel li:nth-child(4) .funnel-bar { background: #5a76ad; } .funnel li:nth-child(5) .funnel-bar { background: #7d93c2; }
.funnel-label { font-size: .86rem; margin-top: 2px; }
.outcome { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.outcome-box { display: flex; flex-direction: column; padding: 12px 14px; border-radius: 8px; text-decoration: none; color: var(--ink); border: 2px solid transparent; }
.outcome-box.ok { background: var(--ok-bg); } .outcome-box.ok .stat-num { color: var(--ok); }
.outcome-box.bad { background: var(--bad-bg); } .outcome-box.bad .stat-num { color: var(--bad); }
.outcome-box.sel { border-color: var(--navy); }
.bar.bar-bad { background: var(--bad); }
@media (max-width: 860px) { .funnel-grid { grid-template-columns: 1fr; } .kpi-table td.kpi-n, .kpi-table th.kpi-n { width: 38px; } .kpi-radio span { width: 30px; height: 30px; } }
@media (max-width: 640px) {
  .kpi-table thead { display: none; } .kpi-table tr { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .kpi-table td { display: block; border: 0; padding: 2px; } .kpi-table td:first-child { grid-column: 1 / -1; }
  .kpi-table td.kpi-n { width: auto; text-align: center; } .kpi-table td::before { display: none; }
}
/* printed evaluation forms */
.perf-paper .paper-h1 { text-align: center; font-size: 1.05rem; margin: 6px 0 10px; color: #000; }
.perf-paper .paper-h2 { background: var(--navy); color: #fff; font-size: .8rem; padding: 5px 8px; margin: 12px 0 6px; }
.perf-paper .paper-grid th { background: var(--navy); color: #fff; text-align: left; font-size: .76rem; }
.perf-paper .paper-grid { margin-bottom: 8px; font-size: .78rem; }
.perf-paper .paper-grid span { font-weight: 700; }
.perf-paper .c { text-align: center; } .perf-paper .r { text-align: right; } .perf-paper .w1 { width: 34px; } .perf-paper .w30 { width: 32%; }
.perf-paper tr.shade td { background: #e9ecf3; }
.paper-sub { font-weight: 700; font-size: .8rem; margin: 8px 0 4px; }
.paper-conf { font-size: .66rem; font-style: italic; color: var(--navy); margin-top: 10px; }
.paper-note { font-size: .7rem; font-style: italic; }
.kpi-print { break-inside: avoid; }
@media print { .perf-paper .paper-grid th, .perf-paper .paper-h2 { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* Profile photos */
.avatar { overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-xl { width: 96px; height: 96px; font-size: 1.8rem; background: var(--navy-soft); color: var(--navy); border: 3px solid #fff; box-shadow: var(--shadow); }
.photo-card { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 320px; }
.photo-actions p { flex-basis: 100%; margin: 2px 0 0; }
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-head .photo-card { margin: 0; flex-direction: column; align-items: flex-start; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
label.btn { display: inline-flex; flex-direction: row; margin: 0; cursor: pointer; }
label.btn:focus-within { outline: 3px solid #8fb0ff; outline-offset: 2px; }

.avatar-lg { width: 56px; height: 56px; font-size: 1.1rem; background: var(--navy-soft); color: var(--navy); }
.photo-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.photo-grid a { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); padding: 6px; border-radius: 8px; }
.photo-grid a:hover { background: var(--navy-soft); }
.photo-thumb { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; display: block; }

/* Birthday corner */
.bday-greeting { display: flex; align-items: center; gap: 14px; margin: 10px 0 16px; padding: 14px 18px; border-radius: 12px; color: #fff;
  background: linear-gradient(120deg, #002060 0%, #3a4f9a 45%, #e0a000 100%); box-shadow: var(--shadow); }
.bday-greeting > div { display: flex; flex-direction: column; flex: 1; }
.bday-greeting strong { font-size: 1.25rem; letter-spacing: .01em; }
.bday-greeting span { opacity: .92; }
.bday-balloons { font-size: 1.9rem; letter-spacing: .1em; animation: bday-bob 2.4s ease-in-out infinite; }
.bday-greeting .btn { background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.5); }
@keyframes bday-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.who.bday-ring .avatar { box-shadow: 0 0 0 3px #e0a000, 0 0 12px 2px rgba(224,160,0,.7); }
.confetti-layer { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 1000; }
.confetti-piece { position: absolute; top: -16px; width: 9px; height: 14px; border-radius: 2px; opacity: .95;
  animation-name: confetti-fall; animation-timing-function: cubic-bezier(.25,.6,.4,1); animation-fill-mode: forwards; }
.confetti-piece.round { width: 10px; height: 10px; border-radius: 50%; }
@keyframes confetti-fall { to { transform: translate(var(--drift), 105vh) rotate(var(--spin)); opacity: .8; } }
@media (prefers-reduced-motion: reduce) { .bday-balloons { animation: none; } }
.bday-today { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.bday-star { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: linear-gradient(135deg, #fff4dc, #e6ebf4); flex: 1 1 260px; }
.bday-star > div { display: flex; flex-direction: column; }
.bday-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: #9a5b00; font-weight: 700; }
.bday-list { list-style: none; margin: 0; padding: 0; }
.bday-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.bday-list li:last-child { border-bottom: 0; }
.bday-list li > span:nth-child(2) { flex: 1; }
.bday-list .avatar { width: 38px; height: 38px; background: var(--navy-soft); color: var(--navy); }
.bday-date { text-align: right; white-space: nowrap; }

.bday-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.bday-wall-box { margin: 6px 0 4px; padding: 12px 14px; border-radius: 10px; background: #fffaf0; border: 1px dashed #e0a000; }
.bday-wall { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.bday-wall li { display: flex; gap: 10px; background: #fff; border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow); }
.bday-wall li > div { display: flex; flex-direction: column; min-width: 0; }
.bday-wall p { margin: 4px 0 0; white-space: pre-wrap; word-break: break-word; }
.bday-wall .avatar { width: 38px; height: 38px; background: var(--navy-soft); color: var(--navy); }
