.staff-list{display:grid!important;grid-template-columns:1fr!important;gap:14px!important}
.selected-staff-detail{min-width:0}
.staff-ledger{display:grid;grid-template-columns:190px minmax(0,1fr);gap:0;background:#fffdf9;border:1px solid #d8d5ce;border-radius:16px;overflow:hidden;box-shadow:0 2px 10px rgba(30,50,45,.04)}
.staff-ledger.working{border-color:#769d90;box-shadow:inset 5px 0 #2f7768,0 2px 10px rgba(30,50,45,.05)}
.staff-identity{padding:20px 18px;background:#f4f1ea;border-right:1px solid #dedbd4;display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.staff-identity h2{margin:0 0 8px;font-size:24px;line-height:1.1;letter-spacing:.01em}
.staff-identity .status{display:inline-flex;min-height:32px;align-items:center;padding:4px 10px;border-radius:999px;font-size:15px;font-weight:700;background:#e4e9e6;color:#355d52}
.staff-identity .status.working{background:#d9eee7;color:#1e6252}
.staff-shift{display:block;margin-top:7px;color:#697772;font-size:13px;font-weight:800}
.staff-identity>strong{font-size:30px;line-height:1;color:#1f5d51;white-space:nowrap}
.staff-identity>strong small{font-size:15px;margin-left:3px;color:#63736e}
.staff-records{min-width:0;padding:10px 12px}
.uncounted-section{margin-bottom:9px;padding:8px;border:1px solid #d9d6cf;border-radius:12px;background:#f5f3ef}
.section-label{margin:0 0 6px;padding:0 6px;font-size:17px;font-weight:900;color:#4f473d}
.section-label b{display:inline-grid;min-width:25px;height:25px;margin-left:4px;place-items:center;border-radius:999px;background:#6b6256;color:#fff;font-size:13px}
.staff-glance{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 0 10px}
.staff-glance-item{display:grid;gap:2px;padding:9px 11px;border:1px solid #d6ded9;border-radius:10px;background:#f3f7f5}
.staff-glance-item.next{background:#fff8e7;border-color:#ead8ab}
.staff-glance-item>span{font-size:11px;letter-spacing:.08em;font-weight:900;color:#477064}
.staff-glance-item>strong{font-size:16px;color:#173f37}
.staff-glance-item>small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#5f6e68;font-size:13px;font-weight:700}
.ledger-head{display:grid;grid-template-columns:72px 158px 74px minmax(260px,1fr) 88px minmax(142px,auto);align-items:center;column-gap:8px}
.ledger-head{min-height:34px;padding:0 10px;color:#66726e;font-size:14px;font-weight:800;border-bottom:1px solid #e1ded7}
.ledger-head.uncounted-head{grid-template-columns:158px 74px minmax(260px,1fr) 88px minmax(142px,auto);background:#ebe7df;border-radius:8px 8px 0 0;color:#3e4743}
.uncounted-rows{background:#fff;border-radius:0 0 8px 8px;overflow:hidden}
.round-block{display:grid;grid-template-columns:72px minmax(0,1fr);border-bottom:1px solid #dcd9d2}
.round-block:last-child{border-bottom:0}
.round-block.has-extra{box-shadow:inset 4px 0 #8aa89d}
.round-block-label{display:grid;place-content:center;gap:3px;padding:7px 5px;border-right:1px solid #dedbd4;background:#f4f1ea;text-align:center}
.round-block-label strong{color:#265f53;font-size:18px}
.round-block-label small{color:#6c7874;font-size:11px;font-weight:800}
.round-block-rows{min-width:0}
.ledger-row{display:grid;grid-template-columns:158px 74px minmax(260px,1fr) 88px minmax(142px,auto);align-items:center;column-gap:8px;min-height:62px;padding:7px 10px;border-bottom:1px solid #e7e4de;font-size:16px}
.ledger-row:last-child{border-bottom:0}
.ledger-row.active{background:#e6f3ee}
.ledger-row.upcoming{background:#fff8e7}
.ledger-row.uncounted{background:#fffdf9;border-radius:9px}
.ledger-round{font-weight:900;font-size:17px;color:#265f53}
.ledger-row.uncounted .ledger-round{font-size:15px;color:#6b6256}
.ledger-time{display:flex;gap:5px;align-items:center;font-size:17px;font-weight:800;white-space:nowrap}
.ledger-time small{font-size:11px;color:#6f7975;margin-right:2px}
.ledger-time span{color:#8a918e}
.ledger-minutes{font-size:19px;font-weight:900;line-height:1}
.ledger-minutes small{display:block;margin-top:4px;font-size:12px;line-height:1;font-weight:700;color:#6f7975}
.ledger-code{min-width:0;display:flex;flex-direction:column;gap:2px}
.ledger-code b{font-size:18px;line-height:1.15;color:#173f37}
.ledger-code b em{display:inline-flex;margin-left:5px;padding:2px 6px;border-radius:999px;background:#efe6c8;color:#715817;font:800 11px/1.2 inherit;vertical-align:middle}
.ledger-code span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#5e6965;font-size:14px}
.ledger-code .ledger-team{color:#315f54;font-size:12px;font-weight:800}
.ledger-gifts{display:grid;gap:4px;margin-top:4px}
.ledger-gift-badge{padding:5px 7px;border:1px solid #dfa02d;border-left:4px solid #c94631;border-radius:7px;background:#fff1c9;color:#7f281a;font-size:11px;font-weight:900;line-height:1.25;overflow-wrap:anywhere;white-space:normal}
.ledger-tip{display:flex;flex-direction:column;gap:2px}
.ledger-tip b{font-size:17px}
.ledger-tip span{display:flex;align-items:center;gap:3px;min-height:14px}
.tip-method{display:inline-grid;min-width:16px;place-items:center;font-size:11px;font-style:normal;font-weight:950;line-height:1}
.tip-method.cash,.ledger-tip.cash b{color:#237461}
.tip-method.card,.ledger-tip.card b{color:#17231f}
.tip-method.other{color:#6f7975}
.ledger-actions{display:flex;justify-content:flex-end;gap:6px;align-items:center;flex-wrap:wrap}
.ledger-button,.ledger-link{box-sizing:border-box;min-height:38px;padding:7px 10px;border:1px solid #b8cbc5;border-radius:9px;background:#fff;color:#245e52;font:700 14px/1.2 inherit;text-decoration:none;cursor:pointer}
.ledger-button.primary{background:#2f7768;color:#fff;border-color:#2f7768}
.ledger-empty{min-height:72px;display:grid;align-content:center;gap:3px;padding:10px 12px;color:#69726f;font-size:15px}
.ledger-empty strong{color:#53635e;font-size:16px}
.ledger-empty span{font-size:13px}
@media(max-width:1100px){
  .staff-ledger{grid-template-columns:160px minmax(0,1fr)}
  .staff-identity{padding:16px 14px}
  .staff-identity h2{font-size:21px}
  .ledger-head{grid-template-columns:62px 144px 62px minmax(220px,1fr) 78px minmax(118px,auto);column-gap:6px}
  .ledger-head.uncounted-head{grid-template-columns:144px 62px minmax(220px,1fr) 78px minmax(118px,auto)}
  .round-block{grid-template-columns:62px minmax(0,1fr)}
  .ledger-row{grid-template-columns:144px 62px minmax(220px,1fr) 78px minmax(118px,auto);column-gap:6px}
  .ledger-row{padding:7px 6px}
  .ledger-button,.ledger-link{padding:7px 8px}
}
@media(max-width:820px){
  .staff-ledger{grid-template-columns:1fr}
  .staff-identity{border-right:0;border-bottom:1px solid #dedbd4;padding:12px 14px;align-items:center}
  .staff-identity>div{display:flex;align-items:center;gap:10px}
  .staff-identity h2{margin:0;font-size:22px}
  .staff-records{overflow-x:auto;-webkit-overflow-scrolling:touch}
  .staff-glance{min-width:760px}
  .counted-section,.uncounted-section{min-width:860px}
}

/* Owner-approved round ledger: three employees per row, work stacked vertically. */
.staff-list{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important;align-items:start}
.staff-ledger,.staff-ledger.working{display:block;min-width:0;border-radius:13px;box-shadow:none}
.staff-ledger.working{box-shadow:inset 0 5px #2f7768}
.staff-identity{display:flex;min-height:70px;align-items:flex-start;justify-content:space-between;gap:8px;padding:11px 12px;border:0;border-bottom:1px solid #d8d5ce;background:#f4f1ea}
.staff-identity h2{margin:0;color:#111c18;font-size:25px;font-weight:950;line-height:1.05}
.staff-identity span{display:block;margin-top:5px;color:#3d554d;font-size:15px;font-weight:900}
.staff-identity>strong{color:#245e52;font-size:15px;font-weight:950;white-space:nowrap}
.staff-ledger>.ledger-head,.ledger-row{display:grid;grid-template-columns:22px minmax(66px,1.2fr) 34px minmax(48px,.8fr) 50px 52px;gap:4px;align-items:center}
.staff-ledger>.ledger-head{min-height:34px;padding:0 7px;color:#4f5e58;font-size:11px;font-weight:900;text-align:center}
.staff-records{min-width:0;padding:0}
.ledger-row{min-height:60px;padding:7px;border-bottom:1px solid #e7e4de;font-size:13px}
.ledger-row.active{background:#e6f3ee}.ledger-row.upcoming{background:#fff8e7}.ledger-row.uncounted{background:#f5f2ed;border-radius:0}
.ledger-round{color:#245e52;font-size:16px;text-align:center}
.ledger-time{justify-content:center;gap:2px;font-size:12px;line-height:1.25;text-align:center;white-space:normal}
.ledger-minutes{font-size:15px;text-align:center}.ledger-minutes small{font-size:10px}
.ledger-code{overflow:hidden;text-align:center}.ledger-code b{overflow:hidden;font-size:15px;text-overflow:ellipsis;white-space:nowrap}.ledger-code span{font-size:10px}
.ledger-tip{text-align:center}.ledger-tip b{font-size:13px}.ledger-tip span{justify-content:center}.tip-method{font-size:10px}
.round-check{display:grid;grid-template-columns:21px 1fr;gap:3px;align-items:center;color:#34453f;font-size:10px;font-weight:900;line-height:1.05;cursor:pointer}
.round-check input{width:21px;height:21px;margin:0;accent-color:#655d52;cursor:pointer}
.round-check input:disabled{cursor:wait}.round-check span{overflow-wrap:anywhere}
.ledger-meta{grid-column:1/-1;overflow:hidden;margin-top:3px;color:#52645e;font-size:11px;font-weight:750;text-overflow:ellipsis;white-space:nowrap}
.ledger-actions{grid-column:1/-1;justify-content:flex-start;margin-top:3px}
.ledger-button,.ledger-link{min-height:32px;padding:5px 8px;font-size:12px}
.ledger-empty{min-height:84px;padding:18px 10px;text-align:center}
.future-label{grid-column:1/-1;margin:0;padding:5px 8px;border-top:4px solid #f0ede7;background:#f8f6f2;color:#69746f;font-size:11px;font-weight:900}
@media(max-width:1040px){.staff-list{grid-template-columns:repeat(3,minmax(300px,1fr))!important;overflow-x:auto;padding-bottom:7px}.staff-ledger{min-width:300px}}
@media(max-width:760px){.staff-list{grid-template-columns:repeat(2,minmax(300px,1fr))!important}}

/* Staff Workspace starts with compact summaries; one employee opens below. */
.staff-list{display:block!important}
.staff-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.staff-summary-card{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;gap:4px 10px;min-width:0;min-height:82px;padding:12px 14px;border:1px solid #d8d5ce;border-radius:12px;background:#fff;color:#1b3029;text-align:left;cursor:pointer}
.staff-summary-card strong{overflow:hidden;font-size:24px;font-weight:950;line-height:1.05;text-overflow:ellipsis;white-space:nowrap}
.staff-summary-card span{font-size:15px;font-weight:900;color:#3d554d}
.staff-summary-card small{grid-column:2;grid-row:1/3;align-self:center;color:#245e52;font-size:15px;font-weight:950;white-space:nowrap}
.staff-summary-card.working{box-shadow:inset 5px 0 #2f7768}
.staff-summary-card.selected{border:3px solid #2f7768;background:#edf5f1;padding:10px 12px}
.staff-summary-card:focus-visible{outline:3px solid #d39133;outline-offset:2px}
.selected-staff-detail{margin-top:12px}
.selected-staff-detail .staff-ledger{width:100%;min-width:0}
.selected-staff-detail .staff-ledger>.ledger-head,.selected-staff-detail .ledger-row{grid-template-columns:44px 150px 54px minmax(130px,1fr) 86px 90px;gap:7px}
.selected-staff-detail .staff-ledger>.ledger-head{font-size:14px}
.selected-staff-detail .ledger-row{font-size:15px}
.selected-staff-detail .ledger-time{font-size:16px;white-space:nowrap}
.selected-staff-detail .ledger-code b{font-size:17px}
.selected-staff-detail .ledger-code span{font-size:13px}
.selected-staff-detail .ledger-tip b{font-size:16px}
.selected-staff-detail .ledger-tip span{font-size:13px}
.selected-staff-detail .round-check{grid-template-columns:24px 1fr;font-size:13px}
.selected-staff-detail .round-check input{width:24px;height:24px}
@media(max-width:820px){.staff-summary-grid{grid-template-columns:repeat(3,minmax(210px,1fr));overflow-x:auto;padding-bottom:6px}.staff-summary-card{min-width:210px}.selected-staff-detail{overflow-x:auto}.selected-staff-detail .staff-ledger{min-width:820px}}

/* Detailed employee view: summary stays compact; the selected employee shows every canonical work fact. */
.detail-intro{display:flex;align-items:baseline;gap:12px;margin:0 0 8px;padding:0 3px;color:#5c6964}
.detail-intro b{color:#172a24;font-size:20px}
.detail-intro span{font-size:14px}
.selected-staff-detail .staff-ledger>.ledger-head,
.selected-staff-detail .ledger-row{grid-template-columns:40px minmax(92px,.75fr) minmax(150px,1.5fr) minmax(126px,1fr) 62px 68px 76px 86px;gap:7px}
.selected-staff-detail .staff-ledger>.ledger-head{min-height:40px;padding:0 10px;background:#f6f4ef;color:#33443e;font-size:13px;text-align:left}
.selected-staff-detail .ledger-row{min-height:82px;padding:9px 10px}
.ledger-visit,.ledger-room{display:flex;min-width:0;flex-direction:column;gap:2px}
.ledger-visit b{color:#173f37;font-size:20px;line-height:1}
.ledger-visit span,.ledger-room span{overflow:hidden;color:#65716c;font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.ledger-room b{font-size:17px;line-height:1.1}
.selected-staff-detail .ledger-time{display:flex;justify-content:flex-start;gap:4px;font-size:15px;white-space:nowrap}
.selected-staff-detail .ledger-time b{font-size:15px}
.selected-staff-detail .ledger-minutes{display:grid;grid-template-columns:auto auto;justify-content:start;gap:2px;font-size:16px;text-align:left}
.selected-staff-detail .ledger-minutes b{font-size:19px}
.selected-staff-detail .ledger-minutes>span{align-self:end;padding-bottom:2px;font-size:12px;color:#65716c}
.selected-staff-detail .ledger-minutes small{grid-column:1/-1;margin:0;font-size:10px}
.selected-staff-detail .ledger-code{text-align:left}
.selected-staff-detail .ledger-code b{font-size:18px}
.selected-staff-detail .ledger-code span{font-size:13px}
.selected-staff-detail .ledger-tip{text-align:left}
.selected-staff-detail .ledger-sharing{grid-column:2/8;display:flex;min-width:0;flex-wrap:wrap;gap:5px 20px;padding:7px 9px;border-radius:8px;background:#eef3f0;color:#344f46;font-size:13px}
.selected-staff-detail .ledger-sharing span{min-width:0}
.selected-staff-detail .ledger-sharing b{margin-right:4px;color:#1d5a4d}
.selected-staff-detail .ledger-actions{grid-column:8;grid-row:2;justify-content:flex-end;margin:0}
.selected-staff-detail .future-label{padding:8px 10px;font-size:13px}
@media(max-width:1050px){
  .sw-shell{padding-inline:12px}
  .staff-summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .staff-summary-card{min-height:74px;padding:10px 11px}.staff-summary-card strong{font-size:21px}.staff-summary-card small{font-size:13px}
  .detail-intro{gap:8px}.detail-intro b{font-size:18px}.detail-intro span{font-size:12px}
  .selected-staff-detail .staff-ledger>.ledger-head,.selected-staff-detail .ledger-row{grid-template-columns:34px 86px minmax(132px,1.4fr) 116px 54px 60px 68px 78px;gap:5px}
  .selected-staff-detail .staff-ledger>.ledger-head{font-size:11px}.selected-staff-detail .ledger-row{padding-inline:7px}
  .selected-staff-detail .ledger-time,.selected-staff-detail .ledger-time b{font-size:13px}.selected-staff-detail .ledger-code b{font-size:16px}.ledger-visit b{font-size:18px}.ledger-room b{font-size:15px}
  .selected-staff-detail .ledger-sharing{font-size:12px;gap:4px 12px}
  .selected-staff-detail .ledger-button,.selected-staff-detail .ledger-link{min-height:34px;padding:5px 7px;font-size:11px}
}
@media(max-width:820px){
  .selected-staff-detail{overflow-x:auto;-webkit-overflow-scrolling:touch}
  .selected-staff-detail>.detail-intro{position:sticky;left:0;width:calc(100vw - 28px)}
  .selected-staff-detail .staff-ledger{min-width:800px}
}
