:root { font: 15px/1.5 system-ui, sans-serif; color: #183530; background: #f3f5f1; }
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 1240px; margin: auto; padding: clamp(14px, 4vw, 42px); }
header { margin-bottom: 22px; }
.brand { font-weight: 800; letter-spacing: .15em; color: #246c63; }
h1 { font-size: clamp(28px, 5vw, 46px); margin: 2px 0 0; letter-spacing: -.045em; }
h2 { font-size: 21px; margin: 0 0 14px; }
.panel { background: #fff; border: 1px solid #dbe6e1; border-radius: 16px; padding: clamp(14px, 3vw, 24px); margin-bottom: 16px; }
.fields { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
label { display: grid; gap: 5px; font-weight: 600; }
input, select, button { font: inherit; border-radius: 8px; min-height: 38px; padding: 5px 10px; }
input, select { border: 1px solid #aebfb8; color: inherit; background: #fff; max-width: 100%; }
input[type=number] { width: 92px; }
button { border: 0; color: #142d28; font-weight: 700; background: #55bbb3; cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
.summary { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.summary span { background: #edf7f4; padding: 8px 12px; border-radius: 8px; font-weight: 650; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { border-bottom: 1px solid #e2eae7; padding: 9px 10px; white-space: nowrap; }
th { background: #f3f8f6; }
.scroll + h2 { margin-top: 22px; }
#login { max-width: 400px; }
#login button { margin-top: 10px; }
#status { color: #174e45; font-weight: 700; }
#preview:empty, #status:empty { display: none; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tabs button[aria-pressed="false"] { background: #fff; border: 1px solid #aebfb8; }
#add-trainer { margin-bottom: 16px; }
.payroll-scroll { max-height: min(60vh, 520px); overflow: auto; }
.payroll-summary { border-collapse: separate; border-spacing: 0; }
.payroll-summary thead th { position: sticky; top: 0; z-index: 1; background: #ffc16a; }
.payroll-summary td:first-child { font-weight: 700; }
.payroll-summary tfoot { font-weight: 800; background: #f3f8f6; }
.payroll-summary input { width: 112px; }
.payroll-scroll:has(#trainer-payroll tr:nth-child(2))::after {
  content: "";
  display: block;
  height: min(60vh, 520px);
}
