/* Byte of Wisdom IT Toolbox: shared look for client workspaces */
:root{
  --ink:#2B2233;--plum:#5B2A5E;--plum-deep:#43204A;--plum-tint:#F1EAF1;
  --marigold:#E8A33D;--marigold-tint:#FBF0DC;--paper:#F3F5F2;--sheet:#FFFFFF;
  --rule:#D5DCD3;--rule-soft:#E6EBE4;--muted:#6B6472;
  --sage:#3E7A5A;--sage-tint:#E4F0E8;--brick:#B0432F;--brick-tint:#F7E6E1;--amber-ink:#85540F;
}
*{box-sizing:border-box}
body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.55 "Atkinson Hyperlegible Next","Atkinson Hyperlegible",system-ui,sans-serif;font-variant-numeric:tabular-nums}
button,input,textarea,select{font:inherit;color:inherit}
:focus-visible{outline:3px solid var(--marigold);outline-offset:2px}
h1{font-size:1.6rem;line-height:1.2;margin:0 0 .25rem;letter-spacing:-.01em}
h1.display{font:400 1.8rem/1.2 "Young Serif",Georgia,serif;color:var(--plum)}
p{margin:.25rem 0 1rem;max-width:68ch}
a{color:var(--plum)}
.muted{color:var(--muted)}.help{display:block;font-size:.82rem;color:var(--muted)}
.right{text-align:right}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

.site-header{background:var(--plum);color:#fff;padding:16px max(16px,calc((100% - 1000px)/2));border-bottom:5px solid var(--plum-deep)}
.brandline{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap}
.company-name{font:400 1.6rem/1.1 "Young Serif",Georgia,serif;display:block}
.site-header small{display:block;color:#E3D3E4;font-size:.9rem;margin-top:4px}
.header-right{display:flex;flex-direction:column;align-items:flex-end;gap:2px;font-size:.85rem}
.header-right form{margin:0}
.who{color:#fff}
.powered{color:#D9C8DA;font-size:.8rem}.powered strong{color:#fff}
.app-nav{display:flex;gap:4px;flex-wrap:wrap;margin:14px 0 -16px}
.app-nav a{color:#E9DCEA;text-decoration:none;font-weight:700;padding:8px 12px 10px;border-bottom:3px solid transparent}
.app-nav a:hover{color:#fff;border-bottom-color:#8E6A91}
.app-nav a[aria-current=page]{color:#fff;border-bottom-color:var(--marigold)}
.link-light{background:none;border:0;padding:0;min-height:0;color:#F3E6F3;text-decoration:underline;text-underline-offset:3px;font-weight:700;cursor:pointer}

main{max-width:1000px;margin:22px auto 48px;padding:0 16px}
.card{background:var(--sheet);border:1px solid var(--rule);border-radius:6px;padding:22px 24px;margin:0 0 16px}
.dashboard{border-top:4px solid var(--plum)}
.login{max-width:440px;margin:40px auto}
.top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.back{margin:0 0 10px}

label{display:block;font-size:.88rem;font-weight:700;margin:12px 0 5px}
input,textarea,select{border:1px solid #BFC8BD;border-radius:4px;padding:9px 10px;min-height:44px;width:100%;background:#fff}
input:focus,textarea:focus{border-color:var(--plum)}
input:disabled,textarea:disabled{background:#F6F7F5;color:var(--ink)}
textarea{resize:vertical;min-height:52px}

button,.button{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;border-radius:6px;border:1px solid var(--rule);background:var(--sheet);color:var(--plum);font-weight:700;padding:9px 16px;min-height:44px;text-decoration:none}
button:hover,.button:hover{border-color:var(--plum)}
button.primary,.button.primary{background:var(--plum);border-color:var(--plum);color:#fff}
button.primary:hover,.button.primary:hover{background:var(--plum-deep)}
button.quiet{border-color:transparent;background:none;text-decoration:underline;text-underline-offset:3px}
h2{font-size:1.15rem;margin:0 0 .5rem}
button.danger{color:var(--brick)}button.danger:hover{border-color:var(--brick)}
.decision{border-top:1px solid var(--rule);margin-top:6px;padding-top:6px}
.filters{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0 14px}
.filter{padding:6px 12px;border:1px solid var(--rule);border-radius:999px;text-decoration:none;color:var(--ink);font-weight:700;font-size:.9rem}
.filter .count{color:var(--muted);font-weight:400;margin-left:4px}
.filter.selected{background:var(--plum);border-color:var(--plum);color:#fff}.filter.selected .count{color:#E3D3E4}
.ot-flag{color:var(--amber-ink);font-weight:700}
.empty{padding:18px 0;color:var(--muted)}
.history{list-style:none;margin:0;padding:0}.history li{padding:8px 0;border-bottom:1px solid var(--rule-soft)}
.actions{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0 0}
.link{font-weight:700;text-underline-offset:3px}

.messages{margin:0 0 14px}
.message{border-left:4px solid var(--sage);background:var(--sage-tint);padding:10px 14px;border-radius:0 4px 4px 0;margin:0 0 8px;max-width:none}
.message.error{border-color:var(--brick);background:var(--brick-tint)}
.notice{border-left:4px solid var(--rule);background:#F6F7F5;padding:10px 14px;border-radius:0 4px 4px 0;margin:12px 0}
.notice.reopen{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}.notice.reopen p{margin:0}.notice.reopen form{margin:0}
.notice.warn{border-color:var(--marigold);background:var(--marigold-tint)}
.error-box{border-left:4px solid var(--brick);background:var(--brick-tint);padding:10px 14px;border-radius:0 4px 4px 0;margin:12px 0}
.field-error{display:block;color:var(--brick);font-size:.82rem;margin-top:4px}

.pill{display:inline-flex;align-items:center;gap:6px;font-size:.8rem;font-weight:700;padding:2px 9px 2px 8px;border-radius:3px;background:var(--rule-soft);white-space:nowrap}
.pill::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor;opacity:.75}
.pill.approved{background:var(--sage-tint);color:var(--sage)}
.pill.submitted{background:var(--marigold-tint);color:var(--amber-ink)}
.pill.sent_back{background:var(--brick-tint);color:var(--brick)}
.pill.late{background:var(--brick-tint);color:var(--brick)}
.pill.draft{background:var(--plum-tint);color:var(--plum)}

.scroll{overflow-x:auto}
table{width:100%;border-collapse:collapse;font-size:.95rem}
th{text-align:left;font-weight:700;font-size:.82rem;color:var(--muted);padding:8px 10px;border-bottom:2px solid var(--ink)}
td{padding:10px;border-bottom:1px solid var(--rule-soft);vertical-align:top}
.num-col{text-align:right}
.weeks tr.current td{background:#FAF7FA}
.timesheet .day{width:120px;white-space:nowrap}
.timesheet .day strong{display:block}
.timesheet .hours-cell{width:110px}
.timesheet input.num{width:92px;text-align:right}
.timesheet tr.weekend td{background:#F8F9F7}

.tally{margin:20px 0 4px}
#weekly-total{display:block;font-size:1.05rem;margin-bottom:8px}
.gauge{position:relative;height:16px;background:var(--rule-soft);border-radius:3px;margin-bottom:24px}
.gauge .fill,.gauge .ot{position:absolute;top:0;bottom:0;border-radius:3px;transition:width .25s ease}
.gauge .fill{left:0;background:var(--plum)}
.gauge .ot{background:var(--marigold)}
.gauge .mark{position:absolute;top:-5px;bottom:-5px;width:2px;background:var(--ink)}
.gauge .mark span{position:absolute;top:24px;left:-14px;font-size:.75rem;color:var(--muted);white-space:nowrap;font-style:normal}
@media (prefers-reduced-motion:reduce){.gauge .fill,.gauge .ot{transition:none}}

@media (max-width:640px){
  main{padding:0 12px;margin:14px auto 32px}
  .card{padding:16px}
  .header-right{align-items:flex-start}
  .timesheet thead{display:none}
  .timesheet tr{display:grid;grid-template-columns:1fr 104px;gap:6px 10px;padding:12px 0;border-bottom:1px solid var(--rule-soft)}
  .timesheet td{border:0;padding:0}
  .timesheet td:last-child{grid-column:1 / -1}
  .timesheet .day,.timesheet .hours-cell{width:auto}
  .timesheet tr.weekend td{background:none}
}

/* Payroll */
.statgrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:16px 0;border-top:1px solid var(--rule);border-bottom:1px solid var(--rule)}
.statgrid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.stat{padding:12px 16px 10px}.stat+.stat{border-left:1px solid var(--rule)}
.stat strong{display:block;font-size:1.6rem;line-height:1.1;color:var(--plum)}
.stat small{color:var(--muted);font-size:.82rem}
.payroll input.num{width:86px;text-align:right}
.payroll td:nth-child(4) input{min-width:200px}
.help.adjusted{color:var(--amber-ink)}
.finalize{border-top:1px solid var(--rule);margin-top:20px;padding-top:14px}
label.check{display:flex;gap:10px;align-items:center;font-weight:400;font-size:1rem}
label.check input{width:20px;min-height:20px;height:20px}
.missing .pick{width:44px}
.missing .pick input,.missing .pick label.check input{width:20px;height:20px;min-height:20px}
label.plain{display:inline;font-size:1rem;margin:0;cursor:pointer}
.issue{display:block;color:var(--brick);font-size:.9rem}
.bulk{border:1px solid var(--rule);border-radius:6px;padding:14px 16px 16px;margin:18px 0 0}
.bulk legend{font-weight:700;padding:0 6px}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 6px}
.chip{display:inline-flex;align-items:center;gap:8px;margin:0;padding:8px 14px;border:1px solid var(--rule);border-radius:999px;font-weight:700;font-size:.92rem;cursor:pointer}
.chip input{width:16px;height:16px;min-height:16px;margin:0}
.chip:has(input:checked){background:var(--plum);border-color:var(--plum);color:#fff}
.missing-row{border-top:1px solid var(--rule);padding:14px 0}
.missing-row h2{margin:0}
.issues{margin:6px 0 10px;padding-left:20px;color:var(--brick)}
a.button{text-decoration:none}

/* Printable payroll sheet */
.print-page{background:#fff}
.print-toolbar{display:flex;justify-content:space-between;align-items:center;max-width:820px;margin:16px auto 0;padding:0 16px}
.sheet{max-width:820px;margin:16px auto 40px;padding:0 16px}
.sheet-head h1{font-size:1.2rem;margin:0 0 4px}
.sheet-head p{margin:0 0 14px}
.sheet-table th,.sheet-table td{border:1px solid #9AA39A;padding:6px 10px}
.sheet-table th{border-bottom:2px solid var(--ink);color:var(--ink);font-size:.9rem}
.sheet-table tfoot td{font-weight:700}
.sheet-foot{font-size:.8rem;color:var(--muted);margin-top:12px}
.draft-banner{border:2px dashed var(--brick);color:var(--brick);font-weight:700;text-align:center;padding:8px;max-width:none}
@media print{
  .no-print{display:none!important}
  .sheet{margin:0;max-width:none;padding:0}
  body{font-size:12pt}
  .sheet-table{font-size:11pt}
}
@media (max-width:640px){.statgrid{grid-template-columns:repeat(2,1fr)}.stat:nth-child(3){border-left:0}.stat:nth-child(n+3){border-top:1px solid var(--rule)}}
