/* Payroll settings layout. The other payroll tabs use their existing styles. */
#hr278-settings {
  --green: #007b50;
  --border: #d8e6de;
  --ink: #153129;
  --muted: #51665e;
  --tint: #e7f4ed;
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}
#hr278-settings h1, #hr278-settings h2, #hr278-settings p { margin: 0; }
#hr278-settings button, #hr278-settings input, #hr278-settings select { font: inherit; }
#hr278-settings button { cursor: pointer; }
#hr278-settings button:disabled { opacity: .56; cursor: not-allowed; }
#hr278-settings svg { width: 16px; height: 16px; flex: none; }
#hr278-settings :is(input:not([type=checkbox]), select, output) {
  min-width: 0;
  min-height: 30px;
  max-width: 100%;
  padding: 3px 8px;
  border: 1px solid #cbded4;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
}
#hr278-settings .hr278-page-header,
#hr278-settings .hr278-title-block,
#hr278-settings .hr278-page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
#hr278-settings .hr278-page-header {
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 8px 2px 14px;
}
#hr278-settings .hr278-heading-icon {
  width: 57px;
  height: 57px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg,#009d67,#005b42);
  color: white;
  box-shadow: 0 4px 10px #006b4233;
}
#hr278-settings .hr278-heading-icon svg { width: 30px; height: 30px; }
#hr278-settings .hr278-title-block small { color: var(--green); font-weight: 750; }
#hr278-settings .hr278-title-block h1 { color: #132a22; font-size: 26px; line-height: 1.22; font-weight: 800; }
#hr278-settings .hr278-title-block p { color: var(--muted); margin-top: 3px; }
#hr278-settings .hr278-page-actions { flex-wrap: wrap; gap: 7px; }
#hr278-settings .hr278-page-actions button,
#hr278-settings .hr278-branch,
#hr278-settings .hr278-page-actions .hr278-month {
  min-height: 37px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 4px 9px;
  white-space: nowrap;
}
#hr278-settings .hr278-page-actions svg,
#hr278-settings .hr278-branch span { color: var(--green); }
#hr278-settings .hr278-page-actions .hr278-month {
  font-size: 11px;
  font-weight: 700;
}
#hr278-settings .hr278-month input { min-height: 26px; border: 0; padding: 2px; }
#hr278-settings .hr278-jumps {
  display: flex;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 0 0 16px;
  background: #fff;
  box-shadow: 0 2px 4px #143d2909;
}
#hr278-settings .hr278-jumps button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: none;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  padding: 9px 18px;
  color: var(--ink);
  font-weight: 750;
  white-space: nowrap;
}
#hr278-settings .hr278-jumps button:last-child { border-right: 0; }
#hr278-settings .hr278-jumps svg { color: var(--green); }
#hr278-settings .hr278-jumps button:hover { background: var(--tint); }
#hr278-settings .hr278-jumps button[aria-current=true] {
  border-radius: 6px;
  background: linear-gradient(#009461,#00664a);
  color: #fff;
}
#hr278-settings .hr278-jumps button[aria-current=true] svg { color: inherit; }
#hr278-settings .hr278-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
}
#hr278-settings .hr278-panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 4px #143d2909;
  padding: 0 9px 9px;
  scroll-margin-top: 70px;
}
#hr278-settings .hr278-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px 10px;
  flex-wrap: wrap;
  padding: 11px 5px 9px;
}
#hr278-settings .hr278-panel-head h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #142d23;
  font-size: 17px;
  font-weight: 800;
}
#hr278-settings .hr278-panel-head h2 svg { width: 21px; height: 21px; color: var(--green); }
#hr278-settings .hr278-panel-head p { margin: 2px 0 0 28px; color: var(--muted); font-size: 11px; }
#hr278-settings :is(.hr278-panel-head button,.hr278-save,.hr278-sim-run) {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 10px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(#009461,#00664a);
  color: white;
  font-weight: 750;
  white-space: nowrap;
}
#hr278-settings .hr278-scroller {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid #ebf0ed;
  border-radius: 7px;
}
#hr278-settings table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 12px;
  white-space: normal;
}
#hr278-settings :is(th,td) {
  padding: 4px 7px;
  border-right: 1px solid #edf2ef;
  border-bottom: 1px solid #edf2ef;
  text-align: left;
}
#hr278-settings tr > :last-child { border-right: 0; }
#hr278-settings tbody tr:last-child td { border-bottom: 0; }
#hr278-settings th { background: var(--tint); color: var(--ink); font-weight: 750; padding-block: 6px; }
#hr278-settings :is(th,td).numeric { text-align: right; font-weight: 750; font-variant-numeric: tabular-nums; }
#hr278-settings :is(th,td).ordinal { width: 1%; white-space: nowrap; text-align: center; }
#hr278-settings .hr278-icon { border: 0; background: transparent; color: var(--green); padding: 3px 5px; display: inline-flex; }
#hr278-settings .hr278-pill { display: inline-block; border-radius: 5px; padding: 1px 7px; font-size: 11px; font-weight: 750; white-space: nowrap; }
#hr278-settings .hr278-pill.green { color: #07643c; background: #d9f5e3; }
#hr278-settings .hr278-pill.muted { color: var(--muted); background: #eef3ef; }
#hr278-settings .hr278-foot { padding: 6px 4px 0; color: var(--muted); font-size: 11px; }
#hr278-settings .hr278-status-mini { font-size: 10px; border-radius: 5px; padding: 4px 6px; background: var(--tint); color: #335b47; }
#hr278-settings .hr278-numeric { width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
#hr278-settings td select { width: 100%; font-size: 11px; }
#hr278-settings #hr278-attendance table { min-width: 260px; }
#hr278-settings #hr278-attendance .hr278-numeric { width: 50px; }
#hr278-settings #hr278-attendance td:nth-child(2) { width: 52%; }
#hr278-settings .hr278-attendance-body {
  display: grid;
  grid-template-columns: minmax(0,1.7fr) minmax(0,1fr);
  align-items: start;
  gap: 8px;
}
#hr278-settings .hr278-formulas { display: grid; gap: 6px; font-size: 11px; }
#hr278-settings .hr278-formulas > div { border: 1px solid #e1efe7; background: #eff9f3; border-radius: 7px; padding: 5px 7px; }
#hr278-settings :is(.hr278-formulas,.hr278-sim-note) strong { display: flex; align-items: center; gap: 5px; }
#hr278-settings .hr278-formulas svg { color: var(--green); }
#hr278-settings .hr278-formulas p { margin-top: 2px; }
#hr278-settings .hr278-empty { text-align: center; color: var(--muted); padding: 14px 8px; }
#hr278-settings :is(.hr278-warning,.hr278-unsaved,.hr278-success) { border-radius: 7px; padding: 8px 11px; margin: 0 0 10px; font-size: 12px; }
#hr278-settings .hr278-warning { display: flex; align-items: center; gap: 7px; background: #fff8e9; border: 1px solid #efcc87; color: #775316; }
#hr278-settings .hr278-unsaved { background: #fff8e7; color: #775316; }
#hr278-settings .hr278-success { background: #e7f7ed; color: #087349; }
#hr278-settings .hr278-general-grid { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 6px 5px; }
#hr278-settings .hr278-general-grid label { display: grid; gap: 4px; font-weight: 700; }
#hr278-settings .hr278-general-help { color: var(--muted); font-size: 11px; }
#hr278-settings .hr278-simulator { margin-top: 12px; }
#hr278-settings .hr278-sim-row {
  display: grid;
  grid-template-columns: minmax(0,1.75fr) minmax(0,1.05fr) minmax(0,.7fr);
  gap: 12px;
  align-items: start;
  padding: 0 5px 4px;
}
#hr278-settings .hr278-sim-inputs {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr)) auto;
  align-items: end;
  gap: 6px 8px;
  padding: 0;
  margin: 0;
}
#hr278-settings .hr278-sim-inputs label { display: grid; min-width: 0; gap: 2px; font-size: 11px; font-weight: 700; }
#hr278-settings .hr278-sim-inputs output { display: flex; align-items: center; justify-content: end; }
#hr278-settings .hr278-sim-allowance { grid-column: 3/5; }
#hr278-settings .hr278-sim-inputs .hr278-check {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
#hr278-settings .hr278-check input { accent-color: var(--green); }
#hr278-settings .hr278-sim-result { border: 1px solid #e0eee6; border-radius: 7px; overflow: hidden; background: #f3faf6; }
#hr278-settings .hr278-sim-result > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 5px 8px;
  border-bottom: 1px solid #e3eee8;
  font-size: 12px;
}
#hr278-settings .hr278-sim-result strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
#hr278-settings .hr278-sim-result .plus { color: #08774b; }
#hr278-settings .hr278-sim-result .negative { color: #ab3434; }
#hr278-settings .hr278-sim-result .muted { color: #735a26; }
#hr278-settings .hr278-sim-result .hr278-net { background: #d6f3e0; border: 0; font-weight: 800; color: #006244; font-size: 13px; }
#hr278-settings .hr278-sim-note { background: #f0f6fd; border-radius: 7px; padding: 8px 10px; font-size: 11px; }
#hr278-settings .hr278-sim-note svg { color: #126db6; }
#hr278-settings .hr278-sim-note ul { margin: 5px 0 0; padding-left: 16px; }
#hr278-settings .hr278-savebar { display: flex; justify-content: end; margin-top: 10px; }

@media (max-width: 1400px) {
  #hr278-settings .hr278-page-header { align-items: flex-start; }
  #hr278-settings .hr278-attendance-body { grid-template-columns: 1fr; }
  #hr278-settings .hr278-formulas { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #hr278-settings .hr278-sim-row { grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); }
  #hr278-settings .hr278-sim-note { grid-column: 1/-1; }
}
@media (max-width: 1050px) {
  #hr278-settings .hr278-grid,
  #hr278-settings .hr278-sim-row { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 550px) {
  #hr278-settings .hr278-title-block h1 { font-size: 21px; }
  #hr278-settings .hr278-heading-icon { width: 46px; height: 46px; }
  #hr278-settings .hr278-formulas,
  #hr278-settings .hr278-sim-inputs { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #hr278-settings .hr278-sim-allowance { grid-column: auto; }
  #hr278-settings :is(#hr278-base,#hr278-positions) table { min-width: 390px; }
}
.hr278-dialog{border:1px solid #d7e8de;border-radius:12px;padding:0;width:min(450px,95vw);box-shadow:0 15px 40px #143e2a35;color:#193f2f;font:inherit}.hr278-dialog::backdrop{background:#112b1a70}.hr278-dialog form{padding:0;margin:0}.hr278-dialog header{padding:14px 17px;border-bottom:1px solid #e3efe7;display:flex;justify-content:space-between}.hr278-dialog h3{margin:0;font-size:17px}.hr278-dialog header button{border:0;background:#fff;font-size:22px;cursor:pointer}.hr278-dialog .hr278-dialog-content{display:grid;gap:14px;padding:17px}.hr278-dialog .hr278-dialog-content label{display:grid;gap:7px}.hr278-dialog .hr278-dialog-content input,.hr278-dialog .hr278-dialog-content select{padding:9px;border:1px solid #c5dbcf;border-radius:6px}.hr278-dialog p{font-size:12px;color:#688071}.hr278-dialog footer{display:flex;gap:8px;justify-content:end;padding:12px 17px;border-top:1px solid #e3efe7}.hr278-dialog footer button{padding:9px 12px;border:1px solid #d8e7dc;background:#fff;border-radius:7px;cursor:pointer}.hr278-dialog footer .hr278-dialog-save{background:#058550;color:#fff}.hr278-dialog .hr278-dialog-error{margin:0 17px 12px;color:#b92b2b}.hr278-history-items{max-height:400px;overflow-y:auto}.hr278-history-items>div{display:grid;gap:3px;padding:10px;border-bottom:1px solid #e3efe7}.hr278-history-items small{color:#688071}
