/* KAYXPERT HRMS — XpertGadget theme. Black, red, white; minimalist. */
:root {
  --ink: #0d0d0f;
  --ink-2: #17171a;
  --ink-3: #26262b;
  --red: #d71920;
  --red-dark: #b3141a;
  --red-soft: #fdecec;
  --white: #ffffff;
  --bg: #f4f4f5;
  --line: #e4e4e7;
  --muted: #6b6b73;
  --text: #18181b;
  --ok: #157a3c;
  --ok-soft: #e7f6ec;
  --warn: #9a5b00;
  --warn-soft: #fff4e0;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 1px 1px rgba(0,0,0,.03);
  --sidebar: 264px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; overflow-x: clip; background: var(--bg); font-size: 14.5px; line-height: 1.5; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
.i { flex: none; vertical-align: middle; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* Layout */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--ink); color: #d4d4d8; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 18px; border-bottom: 1px solid var(--ink-3); color: var(--white); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; background: var(--red); display: grid; place-items: center; font-weight: 800; font-size: 18px; color: var(--white); letter-spacing: -1px; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: .2px; line-height: 1.1; }
.brand-name b { color: var(--red); font-weight: 700; }
.brand-sub { font-size: 10.5px; color: #8b8b93; letter-spacing: .6px; text-transform: uppercase; margin-top: 3px; }
.nav { padding: 10px 10px 24px; flex: 1; }
.nav-section { font-size: 10.5px; text-transform: uppercase; letter-spacing: .9px; color: #75757d; padding: 16px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8.5px 12px; border-radius: 7px; color: #d4d4d8; font-size: 13.8px; }
.nav a:hover { background: var(--ink-2); color: var(--white); text-decoration: none; }
.nav a.active { background: var(--ink-3); color: var(--white); box-shadow: inset 3px 0 0 var(--red); }
.nav a.active .i { color: var(--red); }
.sidebar-foot { padding: 14px 20px; border-top: 1px solid var(--ink-3); font-size: 11px; color: #75757d; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; background: var(--white); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 0 24px; position: sticky; top: 0; z-index: 20; }
.menu-btn { display: none; background: none; border: 0; padding: 6px; color: var(--text); cursor: pointer; }
.search { flex: 1; max-width: 480px; position: relative; }
.search input[type=search] { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px 0 36px; background: var(--bg); font: inherit; }
.search input:focus { background: var(--white); border-color: #c4c4c9; outline: none; }
.search .i { position: absolute; left: 11px; top: 10px; color: var(--muted); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { position: relative; background: none; border: 0; width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--bg); }
.badge-dot { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--red); color: var(--white); font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--white); display: grid; place-items: center; font-weight: 700; font-size: 12.5px; }
.profile-btn { display: flex; align-items: center; gap: 9px; background: none; border: 0; padding: 4px 6px 4px 4px; border-radius: 8px; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.profile-btn:hover { background: var(--bg); }
.profile-btn small { display: block; color: var(--muted); font-size: 11.5px; }
.dropdown { position: absolute; right: 0; top: calc(100% + 6px); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.12); min-width: 240px; padding: 6px; display: none; z-index: 30; }
.dropdown.open { display: block; }
.dropdown a, .dropdown button.link { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; border-radius: 7px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.dropdown a:hover, .dropdown button.link:hover { background: var(--bg); text-decoration: none; }
.dropdown .head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.notif-list { max-height: 360px; overflow-y: auto; min-width: 320px; }
.notif-item { padding: 9px 10px; border-radius: 7px; font-size: 13.5px; }
.notif-item.unread { background: var(--red-soft); }
.notif-item small { color: var(--muted); display: block; }
.rel { position: relative; }

.content { padding: 28px 32px 48px; max-width: 1360px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 24px; letter-spacing: -.3px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.crumb { font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--red); font-weight: 700; margin-bottom: 4px; }

/* Components */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.card h2 { font-size: 16px; margin: 0 0 4px; }
.card .sub { color: var(--muted); margin: 0 0 16px; font-size: 13.5px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin-bottom: 20px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat .label { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 7px; }
.stat .value { font-size: 28px; font-weight: 700; letter-spacing: -.5px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .hint { font-size: 12px; color: var(--muted); }
.stat.accent { background: var(--ink); color: var(--white); border-color: var(--ink); }
.stat.accent .label, .stat.accent .hint { color: #a1a1aa; }
.two-col { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.two-col > * { min-width: 0; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--red); background: var(--red); color: var(--white); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--red-dark); text-decoration: none; }
.btn.secondary { background: var(--white); color: var(--text); border-color: var(--line); }
.btn.secondary:hover { background: var(--bg); }
.btn.dark { background: var(--ink); border-color: var(--ink); }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; }
.tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--bg); color: var(--ink-3); border: 1px solid var(--line); white-space: nowrap; }
.tag.red { background: var(--red-soft); color: var(--red-dark); border-color: #f6c9cb; }
.tag.green { background: var(--ok-soft); color: var(--ok); border-color: #c5e8d1; }
.tag.amber { background: var(--warn-soft); color: var(--warn); border-color: #f3dcad; }
.tag.dark { background: var(--ink); color: var(--white); border-color: var(--ink); }
.alert { border-radius: 8px; padding: 11px 14px; margin-bottom: 18px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid; }
.alert.ok { background: var(--ok-soft); border-color: #c5e8d1; color: #0f5e2e; }
.alert.err { background: var(--red-soft); border-color: #f6c9cb; color: #8f1015; }
.alert.info { background: #f4f4f5; border-color: var(--line); color: var(--ink-3); }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.8px; }
table.t th { text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fafafa; }
table.t td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr:hover td { background: #fcfcfc; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.matrix td, table.matrix th { text-align: center; }
table.matrix td:first-child, table.matrix th:first-child { text-align: left; }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label, .field .lbl { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.field .help { font-size: 12px; color: var(--muted); }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=month], input[type=search], input[type=email], select, textarea {
  height: 38px; border: 1px solid #d4d4d8; border-radius: 8px; padding: 0 11px; font: inherit; background: var(--white); color: var(--text); min-width: 0; }
textarea { height: auto; padding: 9px 11px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(13,13,15,.08); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.checks label { display: inline-flex; gap: 7px; align-items: center; font-weight: 500; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--red); }
.form-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters .field { min-width: 150px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--text); border-bottom-color: var(--red); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.pager { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 14px; }
details.diff summary { cursor: pointer; color: var(--red); font-size: 12.5px; }
details.diff pre { white-space: pre-wrap; word-break: break-word; background: var(--bg); padding: 8px; border-radius: 6px; font-size: 12px; max-width: 520px; }

/* Legacy V4.3 page bodies inside the new shell */
.legacy > h1 { display: none; }
.legacy section { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin: 0 0 18px; overflow-x: auto; }
.legacy h2 { font-size: 16px; margin: 22px 0 10px; }
.legacy section h2 { margin-top: 0; }
.legacy table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.legacy th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); background: #fafafa; }
.legacy td, .legacy th { padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.legacy form { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; margin: 10px 0 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.legacy section form { border: 0; padding: 0; }
.legacy label { display: inline-flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.legacy input, .legacy select { height: 36px; }
.legacy input[type=file] { height: auto; padding: 7px; }
.legacy input[type=checkbox] { height: 16px; }
.legacy form label:has(input[type=checkbox]) { flex-direction: row; align-items: center; }
.legacy button { height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--red); background: var(--red); color: var(--white); font: inherit; font-weight: 600; cursor: pointer; }
.legacy button:hover { background: var(--red-dark); }
.legacy p { margin: 8px 0; }
.legacy small { color: var(--muted); }
.legacy-note { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; display: flex; gap: 8px; align-items: center; }

/* Login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--white); }
.login-art { background: var(--ink); color: var(--white); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px; border: 56px solid var(--red); border-radius: 50%; opacity: .95; }
.login-art h1 { font-size: 40px; line-height: 1.1; letter-spacing: -1px; margin: 0 0 14px; max-width: 460px; position: relative; z-index: 1; }
.login-art h1 b { color: var(--red); }
.login-art p { color: #a1a1aa; max-width: 420px; position: relative; z-index: 1; }
.login-form { display: grid; place-items: center; padding: 40px 24px; }
.login-form form { width: 100%; max-width: 380px; }
.login-form h2 { font-size: 24px; margin: 0 0 6px; }
.login-form .field { margin-bottom: 16px; }
.login-form input { height: 44px; }
.login-form .btn { width: 100%; height: 46px; justify-content: center; font-size: 15px; }

/* Responsive */
@media (max-width: 1100px) { .two-col { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1023px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; width: var(--sidebar); z-index: 50; transform: translateX(-100%); transition: transform .2s ease; }
  .shell.nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
  .menu-btn { display: grid; }
  .content { padding: 20px 16px 40px; }
  .topbar { padding: 0 12px; gap: 8px; }
  .profile-btn .who { display: none; }
}
@media (max-width: 760px) {
  .login { grid-template-columns: 1fr; }
  .login-art { padding: 28px 24px; min-height: 200px; }
  .login-art h1 { font-size: 28px; }
  .login-art::after { width: 220px; height: 220px; border-width: 34px; right: -80px; bottom: -80px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat .value { font-size: 23px; }
  .page-head h1 { font-size: 20px; }
  .notif-list { min-width: 280px; }
  .dropdown { position: fixed; left: 8px; right: 8px; top: 62px; min-width: 0; }
}
@media print { .sidebar, .topbar { display: none; } .shell { display: block; } }

/* Organisation chart (indented tree, readable on phones) */
.org-tree, .org-tree ul { list-style: none; margin: 0; padding: 0; }
.org-tree ul { margin-left: 22px; padding-left: 18px; border-left: 2px solid var(--line); }
.org-tree li { position: relative; padding: 6px 0; }
.org-tree ul > li::before { content: ""; position: absolute; left: -18px; top: 26px; width: 16px; border-top: 2px solid var(--line); }
.org-card { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--text); min-width: 240px; max-width: 100%; }
.org-card:hover { border-color: var(--red); text-decoration: none; }
.org-card small { display: block; color: var(--muted); font-size: 12px; }
.org-card .tag { margin-left: auto; }
.org-tree > li > .org-card { border-left: 3px solid var(--red); }
@media print { .org-card { break-inside: avoid; } .filters { display: none; } }
@media (max-width: 760px) {
  .org-tree ul { margin-left: 8px; padding-left: 12px; }
  .org-tree ul > li::before { left: -12px; width: 10px; }
  .org-card { min-width: 0; width: 100%; }
}

/* Schedule grid */
.legend { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: 12.5px; }
.chip { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 5px; border-radius: 5px; font-weight: 700; font-size: 11.5px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg-btn { height: 32px; padding: 0 12px; border: 1px solid var(--line); background: var(--white); border-radius: 8px; font: inherit; font-size: 13px; cursor: pointer; }
.seg-btn.active { background: var(--ink); color: var(--white); border-color: var(--ink); }
.roster-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px 4px; }
table.roster { border-collapse: separate; border-spacing: 2px; font-size: 12px; }
table.roster th { font-weight: 600; color: var(--muted); padding: 4px 2px; text-align: center; min-width: 30px; }
table.roster th small { display: block; font-weight: 500; font-size: 10px; }
table.roster th.wkend { color: var(--red); }
table.roster th.today { background: var(--ink); color: var(--white); border-radius: 6px; }
table.roster th.today small { color: #ccc; }
table.roster .who { position: sticky; left: 0; background: var(--white); z-index: 2; text-align: left; min-width: 170px; max-width: 200px; padding-right: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
table.roster .who a { color: var(--text); }
.cell { width: 30px; height: 30px; text-align: center; border-radius: 6px; font-weight: 700; cursor: default; user-select: none; position: relative; }
table[data-manage="1"] .cell[data-uid] { cursor: pointer; }
.cell.blank { color: #c4c4c9; background: #fafafa; border: 1px dashed var(--line); font-weight: 400; }
.code-B, .chip.code-B { background: #e6f4ea; color: #146c34; }
.code-OT, .chip.code-OT { background: #fde2c8; color: #8a4300; }
.code-C, .chip.code-C { background: #ececee; color: #55555c; }
.code-RD, .chip.code-RD { background: #dfe7f5; color: #2a4a87; }
.code-HD-AM, .code-HD-PM, .chip.code-HD-AM, .chip.code-HD-PM { background: #f3e6fb; color: #6b2a90; }
.cell.has-leave, .chip.leave { background: var(--red-soft); color: var(--red-dark); }
.cell.away, .chip.away { background: #fff; color: var(--muted); border: 1px dashed #d4d4d8; font-weight: 400; }
.cell.punched::after { content: ""; position: absolute; right: 3px; top: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); }
.cell.picked { outline: 3px solid var(--red); outline-offset: -1px; }
.cell.drop { outline: 3px dashed var(--ink); outline-offset: -1px; }
.tot { text-align: center; font-weight: 700; color: var(--ink-3); padding: 3px 0; border-radius: 6px; }
.tot small { display: block; color: var(--muted); font-weight: 500; }
.tot.bad { background: var(--red-soft); color: var(--red-dark); }
.dialog { border: 0; border-radius: 14px; padding: 22px; width: min(560px, calc(100vw - 24px)); box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.dialog::backdrop { background: rgba(0,0,0,.45); }
.dialog h2 { margin: 0 0 4px; font-size: 18px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: var(--white); padding: 11px 16px; border-radius: 10px; z-index: 60; max-width: calc(100vw - 32px); box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.toast.bad { background: var(--red-dark); }

/* Clock in */
.clock-card { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 18px; align-items: start; }
.clock-big { font-size: 44px; font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.clock-steps { display: grid; gap: 10px; }
.step { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; }
.step.ok { border-color: #c5e8d1; background: var(--ok-soft); }
.step.bad { border-color: #f6c9cb; background: var(--red-soft); }
.selfie-preview { width: 100%; max-width: 260px; aspect-ratio: 3/4; object-fit: cover; border-radius: 10px; background: var(--bg); display: block; }
.thumb { width: 38px; height: 38px; object-fit: cover; border-radius: 6px; vertical-align: middle; border: 1px solid var(--line); }
@media (max-width: 760px) { .clock-card { grid-template-columns: minmax(0,1fr); } .clock-big { font-size: 36px; } }
@media (max-width: 760px) { table.roster .who { min-width: 118px; max-width: 130px; } }

/* Leave calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-h { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; padding: 4px 6px; }
.cal-d { min-height: 96px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 6px; background: var(--white); overflow: hidden; }
.cal-d.out { background: #fafafa; color: #b4b4ba; }
.cal-d.today { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cal-d.hol { background: #fff7f7; }
.cal-n { font-weight: 700; font-size: 12.5px; margin-bottom: 3px; }
.cal-hol { font-size: 11px; color: var(--red-dark); font-weight: 600; margin-bottom: 2px; }
.cal-e { font-size: 11.5px; border-radius: 4px; padding: 1px 5px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #e6f4ea; color: #146c34; border: 1px solid transparent; }
.cal-e.MC, .cal-e.HL { background: #fdecec; color: var(--red-dark); }
.cal-e.UL { background: #ececee; color: #55555c; }
.cal-e.pend { background: var(--white); border: 1px dashed currentColor; }
@media (max-width: 760px) { .cal-d { min-height: 64px; padding: 3px; } .cal-e { font-size: 10px; padding: 0 3px; } .cal-h { font-size: 10px; padding: 2px; } }

/* KPI entry rows */
.kpi-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kpi-row input { height: 34px; }
.override { font-size: 12.5px; width: 100%; }
.override summary { cursor: pointer; color: var(--muted); }
.override label { display: flex; gap: 6px; align-items: center; margin: 6px 0; }

/* Charts: one neutral ink hue, recessive grid */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .base { stroke: #a1a1aa; stroke-width: 1; }
.chart .ylab, .chart .xlab { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart .mark { fill: #3f3f46; }
.chart .hit { fill: transparent; }
.chart .bar:hover .mark { fill: var(--ink); }
.chart .bar:hover .hit { fill: rgba(0,0,0,.035); }
.chart-wrap { overflow-x: auto; }
@media (max-width: 760px) { .chart { min-width: 560px; } }

/* contribution rules (System Settings) */
fieldset.contrib { border: 1px solid var(--line, #e5e5e5); border-radius: 10px; padding: 12px 16px 16px; margin: 0 0 14px; min-width: 0; }
fieldset.contrib legend { font-weight: 700; padding: 0 6px; }

/* letters: page images and signature pad */
.letter-pages { display: grid; gap: 14px; }
.letter-pages img { width: 100%; max-width: 820px; height: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.sig-wrap { position: relative; max-width: 600px; margin-bottom: 14px; }
.sig-pad { width: 100%; height: auto; aspect-ratio: 3 / 1; border: 1.5px dashed #a1a1aa; border-radius: 8px; background: #fff; touch-action: none; cursor: crosshair; display: block; }
.sig-clear { position: absolute; top: 8px; right: 8px; }
