:root {font-family:system-ui,-apple-system,"맑은 고딕",sans-serif;color:#16304a;background:#f2f5f8;font-size:14px}
* {box-sizing:border-box}
body {margin:0}
header {background:#14304b;color:white;padding:14px 22px;display:flex;justify-content:space-between;align-items:center}
header strong {font-size:24px}
#identity {margin-left:16px;font-size:13px}
main {padding:18px;max-width:2200px;margin:auto}
h1 {font-size:24px;margin:10px 0}
h2 {font-size:21px}
h3 {font-size:17px;margin:8px 0}
p {line-height:1.6}
button, input, select, textarea {font:inherit;border:1px solid #c8d6e2;border-radius:7px;padding:9px;background:white;color:inherit}
button {cursor:pointer;min-height:38px}
button:hover {border-color:#00877c;background:#effaf8}
button:disabled {opacity:.45;cursor:wait}
.primary {background:#00877c;color:white;border-color:#00877c}
.danger {color:#b23440}
input, select, textarea {max-width:100%;min-width:0}
input:not([type=checkbox]), textarea {width:100%}
label {display:grid;gap:7px;margin:12px 0}
label.check {display:flex;align-items:center;border:1px solid #d3dfe9;padding:10px;border-radius:7px;margin:0}
input[type=checkbox] {width:20px;height:20px}
.muted, small {color:#728499}
.panel {background:white;border:1px solid #d6e2ec;border-radius:10px;padding:14px}
.narrow {max-width:480px;margin:40px auto}
.notice {background:#edf8f6;padding:10px;border-radius:7px;white-space:pre-line}
.topline, .toolbar, .dialog-head, .row {display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.topline h1 {margin-right:auto}
.metrics {display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:12px 0}
.metrics>div {background:white;border:1px solid #d6e2ec;border-radius:8px;padding:15px;display:flex;justify-content:space-between;gap:8px}
.metrics strong {font-size:23px}
nav {display:flex;gap:6px;overflow:auto;padding:10px 0}
nav button {white-space:nowrap}
nav .active {background:#00877c;color:white}
.staff-list {display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}
.staff {padding:5px 7px;background:#e4f6ef;border-color:#a4d9c2;font-size:12px;min-height:30px}
.staff.past {background:#edf0f4;border-color:#dbe1e8;color:#78899a}
.drop {border:1px dashed #afc6d8;padding:10px;min-height:120px;border-radius:8px}
.waiting-store {min-height:100px;padding:10px 0}
.waiting-store + .waiting-store {border-top:1px solid #a7bdca;margin-top:8px}
.waiting-store h4 {margin:0;font-size:16px}
.clockin-actions {display:flex;gap:8px;margin-top:16px}
.clockin-actions button {flex:1;min-width:0;font-size:17px;font-weight:700}
.sidebar {display:grid;gap:12px;align-content:start}
.toolbar {margin-bottom:12px}
.toolbar input, .toolbar select {width:auto}
.cards {display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}
.checkgrid {display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px}
.waiting-store .staff.working {background:#dce2e8;color:#526274;border-color:#bdc7d1;opacity:1}
.registered-employees {max-height:280px;overflow-y:auto}
.registered-employee {display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 0;border-bottom:1px solid #d3dfe9}
.registered-employee>span {min-width:0;overflow-wrap:anywhere}
.registered-employee>button {flex-shrink:0}
.work-time-controls {display:grid;grid-template-columns:minmax(0,1.8fr) repeat(2,minmax(0,1fr));gap:6px;margin-bottom:12px}
.work-time-controls>* {min-width:0;width:100%;padding-left:4px;padding-right:4px}
@media(max-width:440px) {.work-time-controls {grid-template-columns:repeat(2,minmax(0,1fr))}.work-time-controls>input {grid-column:1/-1}}
.room-entry-picker {grid-template-columns:repeat(5,minmax(0,1fr))}
.room-entry-picker button {min-height:54px;font-size:16px;font-weight:700;overflow-wrap:anywhere}
.room-entry-picker button[aria-pressed=true] {background:#00877c;color:white;border-color:#00877c}
.room-entry-actions {position:sticky;bottom:-18px;display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:12px 0 4px;margin-top:12px;background:white;border-top:1px solid #dde6ee}
.room-entry-count {margin-right:auto;white-space:nowrap}
@media all {.room-entry-actions {bottom:-13px}.room-entry-actions button {padding:8px;white-space:nowrap}}
.table-wrap {overflow:auto}
table {width:100%;border-collapse:collapse;background:white}
th, td {text-align:left;border-bottom:1px solid #dde6ee;padding:10px;white-space:nowrap}
th {font-size:12px;color:#667f95}
td button {font-size:12px;padding:5px}
dialog {border:1px solid #d4e0eb;border-radius:13px;padding:18px;width:min(850px,95vw);max-height:88vh;color:inherit}
dialog::backdrop {background:#152a4490}
.dialog-head {position:sticky;top:-18px;background:white;z-index:1}
.dialog-head h2 {margin-right:auto}
#modalBody {padding:5px 0 10px}
#message {position:fixed;bottom:12px;left:50%;transform:translateX(-50%);max-width:90vw;background:#15334e;color:white;padding:12px 18px;border-radius:8px;z-index:1001;display:none;white-space:pre-line}
#message.visible {display:block}
#watermark, .modal-watermark {position:fixed;inset:0;pointer-events:none;z-index:1000;display:grid;grid-template-columns:repeat(4,1fr);grid-template-rows:repeat(4,1fr);overflow:hidden}
.mark {align-self:center;text-align:center;transform:rotate(-24deg);font-size:12px;color:#28445e;opacity:.13;white-space:pre-line;line-height:1.8}
.modal-watermark {position:absolute;grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(3,1fr)}
.empty {color:#8a9dad;padding:20px 0}
.section-gap {margin-top:20px}
[hidden] {display:none!important}
@media all {
main {padding:10px}
header {padding:12px}
#identity {display:block;margin:2px 0 0}
.sidebar {order:-1}
.metrics {gap:5px}
.metrics>div {display:block;padding:9px;font-size:11px}
.metrics strong {display:block;font-size:18px}
.toolbar button {flex:1}
.topline h1 {font-size:21px}
#watermark {grid-template-columns:repeat(2,1fr)}
.mark {font-size:10px}
dialog {padding:13px}
.dialog-head {top:-13px}
.narrow {margin-top:15px}
}
:root header button {color:#16304a}
@media(min-width:1500px) and (min-height:850px) {
header {padding:10px 20px}
main {padding:12px 18px}
.topline h1 {margin:5px 0}
.metrics {margin:8px 0}
.metrics>div {padding:10px 14px}
nav {padding:7px 0}
.toolbar {margin-bottom:8px}
}
.payroll-table input {min-width:60px;max-width:145px}
.payroll-table strong {color:#00877c}
.payroll-table table {table-layout:fixed}
.payroll-table th, .payroll-table td {white-space:normal}
@media all {
.payroll-table table {min-width:360px;font-size:11px}
.payroll-table th, .payroll-table td {padding:6px 3px}
.payroll-table input {min-width:0;padding:7px 3px;font-size:12px}
.payroll-table button {padding:5px 3px;min-height:34px}
.payroll-table td:first-child {font-weight:bold}
}
.off-workers {background:#edf0f3;border:1px solid #d3dbe3;border-radius:7px;padding:8px;margin-top:12px}
.off-worker {background:#dce2e8;color:#526274;border-radius:5px;padding:6px;text-align:center}
.payroll-table {max-width:1360px;border:1px solid #d7e2ea;border-radius:8px;overflow:hidden}
.payroll-table .table-wrap {overflow:auto}
.payroll-table table {min-width:620px}
.payroll-table th {background:#eaf1f5;padding:14px 10px}
.payroll-table td {padding:8px 10px;height:54px}
.payroll-table tr:nth-child(odd) td {background:#f6f9fb}
.payroll-table td:first-child {font-weight:700}
.payroll-table th:nth-child(1) {width:12%}
.payroll-table th:nth-child(2), .payroll-table th:nth-child(3) {width:12%}
.payroll-table th:nth-child(4) {width:10%}
.payroll-table th:nth-child(5), .payroll-table th:nth-child(6) {width:13%}
.payroll-table th:nth-child(7) {width:20%}
.payroll-table th:nth-child(8) {width:8%}
.payroll-table .payroll-referral {display:block;text-align:right;white-space:nowrap;color:#007f73;font-size:17px}
.payroll-table input {text-align:right}
.payroll-table td:nth-child(2) input {text-align:center}
.payroll-table td:nth-child(7) {text-align:right;white-space:nowrap;font-size:21px}
.payroll-table td:last-child {text-align:center}
.payroll-table input {max-width:none;height:38px;padding:6px;font-size:17px;font-variant-numeric:tabular-nums}
.payroll-table button {min-width:52px;white-space:nowrap}
@media all {
.payroll-table table {min-width:780px}
.payroll-table td, .payroll-table th {padding:6px 4px}
.payroll-table td:nth-child(7) {font-size:20px}
.payroll-table button {min-width:36px}
.payroll-table input {padding:5px 3px}
}
#day {border:0;background:transparent;padding:4px;color:#456176;min-height:32px;text-align:left;text-decoration:underline;text-underline-offset:4px}
.ledger-calendar {max-width:420px;margin:auto}
.calendar-nav {display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;gap:12px}
.calendar-nav button {min-width:40px}
.calendar-grid {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.employee-income-calendar .income-total {color:#007f73;margin:12px 0 4px}
.income-grid {gap:3px}
.income-day {min-width:0;min-height:78px;border:1px solid #e0e7eb;border-radius:6px;padding:5px 1px;display:flex;flex-direction:column;gap:5px;text-align:center;background:white}
.income-day.has-income {background:#e4f4ee;border-color:#b5dace}
.employee-income-calendar .income-day strong {font-size:clamp(10px,2.6vw,17px);letter-spacing:-.5px;white-space:normal;overflow-wrap:anywhere}
.employee-income-calendar .income-day small {font-size:11px;color:#567268}
.employee-income-calendar .income-day>span {font-size:14px}
.income-short-amount {display:none}
.charge-payment-time {display:block;font-size:inherit;line-height:1.15}
@media(max-width:430px){.income-full-amount{display:none}.income-short-amount{display:inline}}
.calendar-grid button {padding:6px 0;min-width:0;min-height:38px}
.calendar-weekday {text-align:center;color:#697e8c;font-size:12px;padding:5px 0}
.calendar-grid button.has-ledger {background:#d7eee8;color:#00766b;border-color:#aed4ca;font-weight:700}
.calendar-grid button[aria-current=date] {outline:2px solid #00877c;outline-offset:-2px}
.calendar-grid button:disabled {background:transparent;border-color:transparent;color:#a4afb6}
.referral-calendar-summary {font-size:16px;font-weight:700;color:#007f73;line-height:1.7}
.referral-calendar-grid button {display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:4px;min-height:75px;padding:5px 1px;color:#173b4d}
.referral-calendar-grid strong {font-size:clamp(12px,2.8vw,15px);white-space:nowrap}
.referral-calendar-grid small {font-size:10px}
.referral-calendar-grid .has-reward {background:#e6f4ee;border-color:#acd4bf}
.referral-calendar-grid .attended {background:#edf3f8}
.referral-calendar-grid .cancelled {background:#fceeed}
.referral-calendar-grid [aria-pressed=true] {outline:2px solid #00877c;outline-offset:-2px}
.ledger-summary {font-weight:700;color:#007f73;line-height:1.8}
.unpaid-amount {color:#c62828}
button.unpaid-payment {background:#c62828;border-color:#c62828;color:white}
@keyframes unpaid-button-blink {0%,49%{background:#c62828;color:white}50%,100%{background:#ffe5e5;color:#b71c1c}}
button.unpaid-payment {font-size:14px;font-weight:900;border-width:2px;animation:unpaid-button-blink 1.4s steps(1,end) infinite}
@keyframes unpaid-room-blink {0%,49%{background-image:linear-gradient(#ffc4c4,#ffc4c4)}50%,100%{background-image:none}}
@media all {
#app {display:flex;flex-direction:column}
#metrics {order:1;margin:16px 0 0}
}

/* Room cards use the same internal layout at every screen width. */
.board {display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:12px;align-items:start}
.rooms {display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:6px;align-content:start;min-width:0}
.room {display:flex;flex-direction:column;gap:6px;min-width:0;min-height:240px;padding:6px;border:1px solid #d6e2ec;border-radius:9px;background:white;color:#16304a;font-size:13px;position:relative;container-type:inline-size}
.room.vacant {min-height:148px}
.room-start-area {display:flex;flex:1;align-items:center;justify-content:center;min-height:110px}
.room .room-start-button {min-height:46px;min-width:100px;padding:10px 20px;font-size:16px;font-weight:700}
.room-start-picker {grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:12px}
.room-start-picker button {min-height:48px;font-size:16px;font-weight:700}
.room.chosen {outline:2px solid #00877c;outline-offset:-2px}
.room.occupied {background:#d7eee8;border-color:#78bcae}
.room.end-planned {box-shadow:inset 0 0 0 3px #e08a00}
.room.occupied.chosen {background:#c9e8df}
.room.closed {background:#a8afb7;border-color:#7b858f}
.room.sales-room {background:#fff0b5;border-color:#d3ae42}
.room.sales-room.chosen {background:#ffe48c;outline-color:#bd8d17}
.room.sales-room.closed,.room.sales-room.closed.chosen {background:#b4b3a5;border-color:#89877a;outline-color:#89877a}
.room-head {display:grid;grid-template-columns:68px minmax(0,1fr) 38px;gap:2px;align-items:center}
.room .room-head input,.room .room-head select {width:100%;max-width:none;min-width:0;height:28px;min-height:28px;padding:3px;font-size:12px;font-weight:400;border-radius:5px}
.room-note {display:grid;grid-template-columns:minmax(0,1fr) 22px;gap:2px;min-width:0}
.room .room-note .sales-agent-select {padding:0;font-size:0;cursor:pointer}
.room .sales-agent-select option {font-size:14px}
.room .guest-count {appearance:none;-webkit-appearance:none;background-image:none;text-align:center;cursor:pointer}
.room-totals {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;align-items:start;margin-top:-4px}
.room button.amount {width:100%;border:0;background:transparent;padding:0;min-height:22px;margin:0;text-align:left;font-size:16px;font-weight:700;color:#007f73;line-height:22px;overflow-wrap:anywhere}
.room button.amount:disabled {opacity:1;cursor:default}
.room-time-head {display:flex;justify-content:flex-end;min-height:18px;align-items:center}
.room-time-cost {text-align:right;font-size:16px;font-weight:700;line-height:22px;color:#18354a;margin:0;overflow-wrap:anywhere}
.room-body {display:grid;grid-template-columns:minmax(0,2fr) minmax(0,3fr);gap:6px;align-items:start;align-content:start;min-width:0;min-height:70px;flex:1}
.room-charge-history {grid-column:1;grid-row:1;font-size:13px;color:#007f73;min-width:0;min-height:60px;overflow:visible;overflow-wrap:anywhere;cursor:pointer}
.room-charge-history>button {display:block;border:0;background:transparent;padding:0;min-height:20px;margin:0 0 8px;font-size:14px;line-height:21px;color:#007f73;text-align:left;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.room .room-body .staff-list {grid-column:2;grid-row:1;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap;width:100%;min-width:0;min-height:48px;max-height:none;margin:0;gap:10px;overflow:visible;cursor:pointer}
.room-staff-row {display:grid;grid-template-columns:auto minmax(0,max-content);justify-content:end;column-gap:5px;row-gap:4px;align-items:start;min-width:0;width:100%;flex-shrink:0}
.room .charge-description {display:inline-block;max-width:100%;vertical-align:top;overflow-wrap:anywhere}
.room .charge-amount {overflow-wrap:normal;word-break:normal;white-space:normal}
.room-staff-row>.start-time {grid-column:1;grid-row:1;width:auto;min-width:0;min-height:20px;padding:0;text-align:right;font-size:11px;line-height:20px;border:0;background:transparent;white-space:nowrap}
.room .room-staff-row .staff {grid-column:2;grid-row:1;display:flex;align-items:baseline;justify-content:flex-end;flex-wrap:wrap;gap:0;min-width:0;width:100%;max-width:none;min-height:20px;padding:0;border:0;background:transparent;color:#006d60;text-align:right;font-size:14px;line-height:20px}
.room .room-staff-row .staff.past {color:#465969}
.room .staff-name {min-width:0;white-space:normal;overflow-wrap:anywhere}
.room .staff-elapsed {flex:0 0 auto;white-space:nowrap;font-size:12px}
.staff-time-detail {grid-column:1 / -1;display:flex;justify-content:flex-end;align-items:baseline;flex-wrap:wrap;gap:2px 6px;min-width:0}
.staff-time-detail>.remaining-time {font-size:13px;line-height:22px;white-space:nowrap}
.staff-time-detail>.applied-time {font-size:19px;font-weight:800;line-height:25px;color:#111;text-align:right;overflow-wrap:anywhere}
.room .time-adjust {display:inline-flex;flex:0 0 auto;gap:3px;margin:0 0 0 5px;padding-left:5px;border-left:1px solid #91beb4}
.room .time-adjust button {width:28px;min-width:28px;min-height:28px;height:28px;padding:0;border-radius:5px;font-size:18px;line-height:24px}
.room-financial {display:flex;justify-content:flex-end;align-items:center;min-height:28px;padding:0;margin:0;border:0;text-align:right}
.room-financial>div {min-width:0}
.room-financial strong {display:block;font-size:20px;font-weight:700;line-height:26px;overflow-wrap:anywhere}
.time-employee-picker {display:flex;flex-direction:column;gap:12px}
.time-employee-row {display:grid;grid-template-columns:minmax(0,1fr) 52px 52px;align-items:center;gap:6px;padding:12px;background:white;border:1px solid #ccd8e3;border-radius:8px}
.time-employee-row strong {font-size:24px;font-weight:800;color:#111;overflow-wrap:anywhere;line-height:1.4}
.time-employee-row button {font-size:34px;font-weight:800;min-width:0;height:56px;padding:0;color:#111}
.room .actions {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;min-width:0;margin:2px 0 0;flex-shrink:0}
.room.closed .actions {grid-template-columns:repeat(2,minmax(0,1fr))}
.room .actions button {min-width:0;min-height:28px;height:28px;padding:3px;border-radius:5px;font-size:12px;line-height:20px;white-space:nowrap}
.room .actions button:last-child {background:#00877c;color:white;border-color:#00877c}
.room .actions .end-plan.active {background:#e08a00;color:white;border-color:#bd7200;font-weight:800}
.room .actions button:disabled {background:#edf0f4;color:#8a9bad;border-color:#dbe1e8;opacity:1;cursor:default}
.room .room-charge-history>button.unpaid,.unpaid-amount {color:#c62828}
.room.has-unpaid {animation:unpaid-room-blink 1.4s steps(1,end) infinite}
.room-pagination {display:flex;align-items:center;justify-content:center;gap:10px;margin:8px 0}
.toolbar>.room-pagination {margin:0 0 0 auto}
.room-pagination button {min-width:48px;min-height:32px;padding:5px 8px;flex:none}
.room-page-number {min-width:38px;text-align:center;white-space:nowrap}
@media(max-width:1100px) {
 .board {grid-template-columns:minmax(0,1fr) 260px}
}
@media all {
 .board {display:flex;flex-direction:column;gap:12px}
 .board>.rooms,.board>.sidebar {width:100%;min-width:0}
 .rooms {grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 .past-board .sidebar {order:1}
 .room-toolbar {gap:6px}
 .room-toolbar>button {flex:none;min-width:70px;min-height:32px;padding:5px 7px;font-size:12px;white-space:nowrap}
 .room-toolbar>span {font-size:12px}
}
@media all {
 .room {--room-content-font:clamp(20px,10cqi,30px);padding:4px;gap:7px;min-height:320px;border-radius:12px;font-size:20px}
 .room.vacant {min-height:148px}
 .room-head {grid-template-columns:minmax(0,1fr) minmax(44px,30%);gap:3px}
 .room .room-head input,.room .room-head select {font-size:var(--room-content-font);height:42px;min-height:42px;padding:2px;border-radius:6px;font-weight:600}
 .room .room-head>select:first-child {grid-column:1;grid-row:1;appearance:none;-webkit-appearance:none;text-align:center}
 .room .guest-count {grid-column:2;grid-row:1}
 .room-note {grid-column:1/-1;grid-row:2;grid-template-columns:minmax(0,1fr) 28px;gap:3px}
 .room .room-note input {font-size:var(--room-content-font)}
 .room-totals {display:flex;flex-wrap:wrap;justify-content:space-between;gap:2px;margin-top:-4px}
 .room button.amount,.room-time-cost {font-size:var(--room-content-font);min-height:28px;line-height:1.4}
 .room button.amount {width:auto;max-width:100%}
 .room-time-head {margin-left:auto;max-width:100%}
 .room-body {--staff-font:clamp(11.5px,8.5cqi,22px);grid-template-columns:minmax(0,32fr) minmax(0,68fr);gap:3px;min-height:110px}
 .room-charge-history,.room-charge-history>button {font-size:clamp(11px,8cqi,22px);line-height:1.5;font-weight:600}
 .room-charge-history>button {min-height:28px;margin-bottom:16px}
 .room .charge-separator {display:none}
 .room .charge-description {display:block;text-align:left}
 .room .room-body .staff-list {gap:4px}
 .room-staff-row {display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:baseline;column-gap:3px;row-gap:1px;letter-spacing:-.045em;font-variant-numeric:tabular-nums}
 .room .room-staff-row .staff {font-size:var(--staff-font);min-height:22px;line-height:1.5;font-weight:600;flex-wrap:nowrap}
 .room .staff-name {white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .room .staff-separator {display:none}
 .room .staff-elapsed {display:none;font-size:var(--room-content-font)}
 .room-staff-row>.start-time {font-size:var(--staff-font);min-height:22px;line-height:1.5;font-weight:600;color:#111}
 .staff-time-detail {grid-row:2;flex-direction:row;align-items:baseline;justify-content:space-between;flex-wrap:nowrap;gap:2px;width:100%}
 .staff-time-detail>.remaining-time {font-size:var(--staff-font);line-height:1.5;font-weight:600;white-space:nowrap;color:#111!important}
 .staff-time-detail>.applied-time {font-size:var(--staff-font);font-weight:600;line-height:1.5;white-space:nowrap}
 .staff-time-detail>.remaining-time.overdue {color:#b23440!important}
 .remaining-time.overdue .remaining-prefix {display:inline}
 .room .time-adjust {gap:3px;margin-left:4px;padding-left:4px}
 .room .time-adjust button {width:28px;min-width:28px;min-height:34px;height:34px;font-size:21px;border-radius:6px}
 .room-financial {min-height:36px;flex-wrap:wrap;gap:4px}
 .room-financial strong {font-size:max(22px,var(--room-content-font));line-height:1.4;white-space:normal}
 .room .actions {gap:4px;margin-top:0}
 .room .actions {grid-template-columns:repeat(2,minmax(0,1fr))}
 .room .actions .end-plan {grid-column:auto}
 .room .actions button {font-size:var(--room-content-font);height:46px;min-height:46px;line-height:1.4;border-radius:7px}
 .room .room-start-button {font-size:var(--room-content-font)}
}

/* Store profit summaries */
.metrics {grid-template-columns:repeat(4,minmax(0,1fr))}
.metrics>div {flex-wrap:wrap;align-items:center}
.metrics small {flex-basis:100%;text-align:right}
@media(max-width:1000px) {.metrics {grid-template-columns:repeat(2,minmax(0,1fr))}}

.room-entry-picker .entry-store-heading {grid-column:1/-1;margin:4px 0;font-size:18px}
.room-entry-picker .entry-store-heading[data-store-id="2"] {border-top:1px solid #a7bdca;padding-top:14px;margin-top:10px}
.room-entry-picker .entry-store-empty {grid-column:1/-1;color:#708397;padding:4px 0 10px}

@media(max-width:1000px) {.metrics>div:last-child {grid-column:auto}}
.cash-drawer-metric{cursor:pointer;}
.cash-drawer-metric:hover{border-color:#50a69e;background:#effaf8;}

.clockin-picker {grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;max-height:204px;overflow-y:auto;align-content:start;overscroll-behavior:contain}
.clockin-picker .check {min-width:0;min-height:44px;margin:0;padding:5px;gap:4px;font-size:14px;overflow-wrap:anywhere}
.clockin-picker input {width:14px;min-width:14px;height:14px;margin:0}
.clockin-selected {display:block;margin-top:4px;color:#647689}
.clockin-actions {margin-top:8px}

.clockin-picker .check {display:flex;align-items:center;border:1px solid #ccd8e3;border-radius:5px;background:#fff}
.clockin-picker .check:has(input:checked) {background:#e5f5ef;border-color:#00877c;color:#00695f}

/* Larger controls and records across PC and mobile. */
@media all {
 :root {font-size:18px}
 h1,.topline h1 {font-size:26px}
 h2 {font-size:25px}
 h3 {font-size:21px}
 #identity {font-size:16px;overflow-wrap:anywhere}
 header {gap:8px}
 header>div {min-width:0}
 #logout {flex-shrink:0}
 small {font-size:15px}
 button {min-height:44px}
 input,select,textarea {line-height:1.4}
 .toolbar>input,.toolbar>select {max-width:100%}
 .dialog-head {flex-wrap:nowrap;align-items:flex-start}
 .dialog-head h2 {min-width:0;overflow-wrap:anywhere}
 #modalClose {flex-shrink:0;margin-top:12px}
 #modalBody {overflow-wrap:anywhere}
 .room-toolbar>button,.room-toolbar>span {font-size:16px}
 .room-toolbar>button,.room-pagination button {min-height:44px}
 .sidebar .staff,.off-worker {font-size:18px;min-height:44px;padding:8px}
 .waiting-store h4 {font-size:20px}
 .room-entry-picker button,.room-start-picker button {font-size:20px}
 .room-entry-picker .entry-store-heading {font-size:21px}
 .room-entry-actions {flex-wrap:wrap}
 .clockin-picker .check {font-size:16px;line-height:1.3;padding:4px;gap:3px;min-height:46px}
 .clockin-actions button {font-size:19px}
 .metrics>div {font-size:16px;min-width:0}
 .metrics strong {font-size:24px;overflow-wrap:anywhere}
 th {font-size:16px}
 td button {font-size:17px;min-height:44px;padding:7px}
 .payroll-table table {font-size:18px;min-width:1000px}
 .payroll-table th,.payroll-table td {padding:8px}
 .payroll-table input {font-size:20px;height:44px}
 .payroll-table .payroll-referral {font-size:20px}
 .payroll-table td:nth-child(7) {font-size:24px}
 .payroll-table button {font-size:18px;min-height:44px}
 .calendar-weekday {font-size:15px}
 .calendar-grid button {min-height:44px}
 .referral-calendar-summary {font-size:18px}
 .referral-calendar-grid small {font-size:12px;white-space:normal}
 button.unpaid-payment {font-size:18px}
}

@media not all {
 .board {grid-template-columns:minmax(0,1fr) 350px}
 .rooms {grid-template-columns:repeat(auto-fill,minmax(340px,1fr))}
 .room {min-height:330px;font-size:18px}
 .room.vacant {min-height:180px}
 .room-head {grid-template-columns:90px minmax(0,1fr) 50px}
 .room-note {grid-template-columns:minmax(0,1fr) 26px}
 .room .room-head input,.room .room-head select {height:38px;min-height:38px;font-size:17px}
 .room .room-note input {font-size:18px}
 .room button.amount,.room-time-cost {font-size:21px;line-height:30px;min-height:30px}
 .room-charge-history,.room-charge-history>button {font-size:20px;line-height:1.5}
 .room .room-staff-row .staff {font-size:20px;line-height:1.5}
 .room-staff-row>.start-time {font-size:18px;line-height:30px}
 .room .staff-elapsed {font-size:20px}
 .staff-time-detail>.remaining-time {font-size:16px}
 .staff-time-detail>.applied-time {font-size:24px;line-height:1.4}
 .room-financial strong {font-size:28px;line-height:1.4}
 .room .time-adjust button {width:38px;min-width:38px;min-height:38px;height:38px;font-size:26px}
 .room .actions button {font-size:18px;height:40px;min-height:40px;line-height:30px}
}

@media all {
 :root {font-size:20px}
 #identity,.room-toolbar>button,.room-toolbar>span,th {font-size:18px}
 .sidebar .staff,.off-worker,.clockin-actions button,td button {font-size:20px}
 .clockin-picker .check {font-size:18px}
 small {font-size:18px}
}

.refund-payment {background:#c62828;color:white;border-color:#c62828;font-weight:700;}
.charge-drag-handle {display:inline-block;padding:0 4px;touch-action:none;cursor:grab;font-size:18px;user-select:none;}
.charge-dragging {outline:2px solid #00877c;opacity:.75;}
.room .room-charge-history button.refund-amount,.refund-amount {color:#c62828;}

@media all{.room-charge-history [data-charge-id]{touch-action:pan-x;}}

.work-dates-only{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}
.work-dates-only input[type=date]{min-width:0;width:100%;}

.single-room-work{background:#fff2a8;border-radius:3px;}
.expense-check-table{min-width:0;width:100%;table-layout:fixed;}
.expense-check-table th:first-child{width:46%;}
.expense-check-table td{overflow-wrap:anywhere;white-space:normal;padding:10px 5px;}
.expense-check-table input[type=checkbox]{width:24px;height:24px;min-width:24px;cursor:pointer;}
.expense-entry-actions{display:flex;gap:4px;margin-top:6px;flex-wrap:wrap;}
.expense-entry-actions button{min-height:34px;padding:3px 7px;font-size:16px;}
.expense-check-table tr.expense-settled td{background:#fff2a8;color:#16334a;}
.room .room-body .staff-list{gap:0!important;}
.room .room-staff-row{row-gap:0;}
.room .room-staff-row .staff,.room .room-staff-row>.start-time,.room .staff-time-detail>.remaining-time,.room .staff-time-detail>.applied-time{line-height:1.2!important;}

.room-work-detail{color:#111;font-size:.9em;font-weight:400;}

.work-payment{display:flex;flex-direction:column;gap:5px;min-width:155px;}
.work-payment button{white-space:nowrap;}
.work-method-choices{display:flex;gap:8px;margin-top:16px;}
.work-method-choices button{min-width:100px;}
.work-method-choices button.primary,.work-method-choices button.primary:hover{background:#00877c;color:white;border-color:#00877c;}
.work-payer-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
.work-payer-choices button{padding:10px 4px;white-space:nowrap;}
.work-referral-detail{border:1px solid #c8d6e2;border-radius:8px;padding:12px;margin:8px 0;line-height:1.55;}
tr.work-paid td,tr.work-paid td button{background:#e2e5e8;color:#56616b;}
tr.work-paid td strong{color:#56616b;}
tr.work-overpaid td,tr.work-overpaid td button{background:#ffd6d6;color:#a32626;}
tr.work-overpaid td strong,tr.work-overpaid .muted{color:#a32626;}

.expenses-panel {min-width:0;width:100%;}
.expense-toolbar {justify-content:space-between;}
.expense-store-choices {display:flex;gap:8px;}
.expense-store-choices button {min-width:100px;}
.expense-actions {gap:8px;}
.expense-summary {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:16px 0;}
.expense-summary>div {min-width:0;padding:14px;background:white;border:1px solid #d6e2ec;border-radius:10px;display:grid;gap:8px;}
.expense-summary span {font-size:18px;}
.expense-summary strong {font-size:28px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums;}
.expense-summary .expense-current {background:#e6f5f1;border-color:#84c5b8;color:#006b60;}
.expense-in {color:#00776d;}
.expense-out {color:#b5313e;}
.expense-bank-note {margin:8px 0;font-size:18px;}
.expense-help {font-size:16px;margin:8px 0 14px;}
.expense-filter {display:flex;align-items:center;gap:10px;margin:0;}
.expense-ledger {width:100%;max-height:65vh;border:1px solid #d6e2ec;border-radius:9px;overscroll-behavior:contain;}
.expense-ledger table {min-width:360px;font-size:18px;}
.expense-ledger th {position:sticky;top:0;z-index:1;background:#e9f0f5;font-size:17px;}
.expense-ledger th,.expense-ledger td {padding:4px 8px;line-height:1.2;}
.expense-ledger th:nth-child(n+3):nth-child(-n+5),.expense-ledger td:nth-child(n+3):nth-child(-n+5) {text-align:right;font-variant-numeric:tabular-nums;}
.expense-description {display:grid;gap:0;min-width:160px;max-width:320px;white-space:normal;overflow-wrap:anywhere;}
.expense-description span {font-size:17px;}
.expense-ledger tbody tr:nth-child(even),.expense-ledger tr:nth-child(odd):not(:first-child) {background:#f7fafc;}
.expense-ledger th:last-child {white-space:pre-line;}
.expense-amounts {display:flex;flex-direction:column;gap:0;white-space:nowrap;}
.expense-row-balance {color:#526779;}
@media all {
 .expense-toolbar {align-items:stretch;}
 .expense-store-choices {width:100%;}
 .expense-store-choices button {flex:1;min-width:0;}
 .expense-actions button {flex:1 1 130px;}
 .expense-summary {grid-template-columns:1fr;gap:8px;margin:12px 0;}
 .expense-summary>div {padding:10px;gap:6px;}
 .expense-summary span {font-size:18px;}
 .expense-summary strong {font-size:23px;}
 .expense-bank-note,.expense-help {font-size:17px;}
 .expense-ledger table,.expense-ledger td button {font-size:19px;}
 .expense-ledger th,.expense-description span {font-size:18px;}
}

.expense-summary .expense-cash{background:#eaf7f3;border-color:#84c5b8;color:#007f73;}
.expense-summary .expense-transfer{background:#edf4fc;border-color:#9cbcdf;color:#245d9d;}
.expense-summary .expense-card{background:#f5f0fa;border-color:#c3aed8;color:#75509a;}
.expense-summary small{font-size:15px;line-height:1.5;color:#536b7c;overflow-wrap:anywhere;}
@media all{.expense-summary>div{grid-template-columns:1fr auto;align-items:center;padding:12px;}.expense-summary small{grid-column:1/-1;}.expense-summary strong{white-space:nowrap;}}

.expense-balance-edit{border:0;background:transparent;color:inherit;padding:0;text-align:left;min-width:0;text-decoration:underline;text-underline-offset:5px;}

.work-other-column{min-width:190px;}
.work-other-text{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:170px;max-width:260px;white-space:normal;}
.work-other-amount{white-space:nowrap;word-break:keep-all;overflow-wrap:normal;}
.work-other-memo{white-space:pre-wrap;word-break:keep-all;overflow-wrap:anywhere;}

.work-room-cost-box{border:1px solid #cadbdc;border-radius:9px;padding:7px;min-width:230px;}.work-room-cost-line{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#111;font-size:20px;}.work-room-cost-line button{padding:4px 7px;min-height:34px;font-size:20px;white-space:nowrap;}
.work-money-wide{min-width:155px;white-space:nowrap;}.work-money-wide button{min-width:140px;white-space:nowrap;padding-left:10px;padding-right:10px;}
.work-room-cost-box .manual-work-amount{background:#fff2a8!important;color:#111!important;}

.work-name-times{display:flex;flex-direction:column;gap:4px;white-space:nowrap;}

.work-room-cost-line.active-room-work{background:#ffd6df;border-radius:4px;animation:work-pink-pulse 1.4s steps(1,end) infinite;}
@keyframes work-pink-pulse{0%,100%{background:#ffd6df;}50%{background:#ffffff;}}
.expected-work-amount{white-space:nowrap;font-size:20px;color:#111;}

.room-staff-row.finished-staff{background:#ffd6df;border-radius:5px;}

@media all{#tabs .desktop-only-tab{display:none;}}

.single-work-label{white-space:nowrap;font-size:18px;color:#111;flex-shrink:0;}

.work-total-payment{min-width:180px;display:flex;flex-direction:column;gap:8px;}.work-total-methods{display:grid;grid-template-columns:1fr 1fr;gap:5px;}.work-total-methods button{white-space:nowrap;padding:6px;}

.unpaid-board {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}
.unpaid-date {margin:0 0 8px;font-size:18px}
.unpaid-room {display:flex;flex-direction:column;gap:12px;padding:14px;border:2px solid #c62828;border-radius:12px;background:#ffc4c4;overflow-wrap:anywhere}
.unpaid-line {display:flex;justify-content:space-between;gap:8px}
.unpaid-amount {font-size:22px;color:#c62828}
.unpaid-charge {font-size:14px}
.unpaid-staff {display:grid;grid-template-columns:1fr 1fr;gap:6px;border-top:1px solid #dc9999;padding-top:10px}
.unpaid-staff strong {color:#00857d}
@media(max-width:600px){.unpaid-board{grid-template-columns:1fr}.unpaid-room{font-size:16px}}

/* Match the room board density, retaining the ledger date above each card. */
.unpaid-board {grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:12px;align-items:stretch}
.unpaid-visit {display:flex;flex-direction:column;min-width:0}
.unpaid-room {flex:1;min-height:360px}
.unpaid-room>button:last-child {margin-top:auto}
@media all{
 .unpaid-board{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 .unpaid-date{font-size:13px}
 .unpaid-room{padding:8px;gap:8px;font-size:13px;min-height:300px}
 .unpaid-amount{font-size:16px}
 .unpaid-charge{font-size:12px}
 .unpaid-staff{gap:4px;font-size:12px}
}
.header-actions {display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.web-device-actions {display:flex;gap:6px;flex-wrap:wrap;min-width:200px}
.web-device-actions button {font-size:14px;padding:6px 10px}
.bonus-attended {background:#fff2a8!important;color:#173b4d}
.weekly-bonus-table td {text-align:center;white-space:nowrap}
.bonus-calendar {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;text-align:center}
.bonus-calendar>div {min-height:45px;padding:12px 2px;border:1px solid #d5e1e7;border-radius:5px}
.bonus-attended button {background:#fff2a8;color:#173b4d;border:0}
.bonus-excluded {background:#e5e7eb}
.bonus-calendar>button {min-height:45px;padding:12px 2px;border:1px solid #d5e1e7;border-radius:5px}
.waiting-staff-hint {background:transparent;border:0;padding:2px;color:#18354a;font-weight:700}
.waiting-clock {text-align:right;font-size:22px;font-weight:700;color:#18354a}
.work-room-cost-heading {display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap}
.room .waiting-totals {display:grid;grid-template-columns:1fr 1fr;align-items:center;min-height:230px}
.room .waiting-amount-hint,.room .waiting-staff-hint {font-size:clamp(32px,14cqi,64px)!important;white-space:pre-line;line-height:1.65;text-align:center;padding:0;width:100%}
@media all{.clockin-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Web uses the same compact layout on desktop and phones. */
.attendance-delete-summary {display:flex;flex-direction:column;gap:6px;background:#f0f6f5;border:1px solid #d7e6e2;border-radius:10px;padding:16px;margin:10px 0;}
.attendance-delete-summary strong {font-size:24px;}.attendance-delete-summary span {font-size:16px;color:#637988;}
.attendance-delete-message {font-size:18px;line-height:1.5;margin:16px 0;}
.attendance-delete-actions {display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:20px;}
.attendance-delete-actions button {min-height:48px;}.attendance-delete-actions .danger {background:#b93642;color:white;border-color:#b93642;}
.settlement-totals {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:12px 0;}
.settlement-totals>div {background:white;border:1px solid #cfdfdf;border-radius:8px;padding:10px 5px;min-width:0;}
.settlement-totals span,.settlement-totals strong {display:block;overflow-wrap:anywhere;}
.settlement-totals strong {color:#007f73;font-size:clamp(16px,4vw,26px);margin-top:6px;}
.settlement-agents table {width:100%;min-width:0;table-layout:fixed;}
.settlement-agents td,.settlement-agents th {padding:8px 3px;white-space:normal;overflow-wrap:anywhere;font-size:clamp(12px,3.2vw,18px);}
.settlement-agents td:first-child,.settlement-agents th:first-child {width:19%;}
#roomColumns {width:auto;min-height:32px;padding:4px 22px 4px 8px;font-size:inherit;border:1px solid #8499ac;border-radius:6px;background:#14304b;color:white;}
.rooms {align-items:stretch;}
.rooms .room:not(.vacant) {min-height:0;gap:4px;}
.room .room-body {flex:0 0 auto;min-height:0;}
.room .room-body:has(.room-charge-history:empty):has(.staff-list:empty) {display:none;}
.room .room-financial {margin-top:auto;}
.rooms .room.vacant {min-height:96px;}
.room.vacant .room-start-area {min-height:80px;}
.room .waiting-totals {min-height:72px;}
.room .waiting-amount-hint,.room .waiting-staff-hint {font-size:clamp(22px,10cqi,32px)!important;line-height:1.15;}
.room .room-charge-history>button {min-height:0;margin:0 0 4px;padding:0;line-height:1.05;}
.room .room-charge-history>button:last-child {margin-bottom:0;}
.room .room-charge-history .charge-description,.room .room-charge-history .charge-payment-time {margin:0;padding:0;line-height:1.05;}
body {max-width:760px;margin:0 auto} main {max-width:760px} .metrics {grid-template-columns:repeat(2,minmax(0,1fr))} dialog {max-width:min(740px,calc(100vw - 24px))}

.planned-names {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.planned-names button {min-width:0;overflow-wrap:anywhere}
.work-extras-stack{display:flex;flex-direction:column;gap:8px}.work-extra-item{display:flex;flex-direction:column;gap:3px}.work-extra-item>small{font-size:15px;font-weight:700}.work-extra-item button{width:100%}
#identity,#refresh{display:none!important} header{flex-wrap:wrap;gap:4px 12px} header>div:first-child{margin-right:auto} #headerStatus{flex-basis:100%;margin:0;gap:6px} #headerStatus #venue{margin:0 auto 0 0;color:white;font-size:24px} #headerStatus #day{color:white;font-size:18px;text-decoration:none} #headerStatus #returnDay{padding:4px;font-size:14px}

.bonus-week-preview{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;margin-bottom:15px}.bonus-week-preview>div{display:flex;flex-direction:column;text-align:center;padding:8px 0;font-size:16px}.bonus-week-preview .bonus-attended{background:#fff2a8}
.work-total-payment{text-align:center}.work-total-payment>strong{font-size:26px;white-space:nowrap}.work-total-payment .work-payment-summary{border:0;background:transparent;font-size:21px;font-weight:700;padding:0;min-height:0;white-space:nowrap}.work-payment-balance{color:#777;font-size:22px;font-weight:700}

/* Upcoming staff availability: pulse the border without changing button size. */
@keyframes staff-ending-soon { 0%,100% {box-shadow:inset 0 0 0 3px #f0479b;} 50% {box-shadow:inset 0 0 0 3px transparent;} }
.waiting-store .staff-list button.ending-soon {animation:staff-ending-soon 1.4s ease-in-out infinite;}
@media (prefers-reduced-motion: reduce) { .waiting-store .staff-list button.ending-soon {animation:none;box-shadow:inset 0 0 0 3px #f0479b;} }

/* Keep date, hour and minute together on phones. */
.work-time-controls {grid-template-columns:minmax(0,1.8fr) repeat(2,minmax(0,1fr));}
.work-time-controls>input {grid-column:auto;}

.staff-action-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;}
.staff-action-buttons>button{width:100%;min-width:0;padding:12px 4px;}

.off-workers .checkgrid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;}
.off-workers .off-worker{min-width:0;width:100%;padding:6px 2px;font-size:clamp(14px,3.7vw,20px);overflow-wrap:anywhere;}

.waiting-store .staff-list{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;}
.waiting-store .staff-list>.staff{min-width:0;width:100%;padding:6px 2px;font-size:clamp(14px,3.7vw,20px);overflow-wrap:anywhere;}

/* Compact attendance summary so room ledgers start nearer the top. */
.sidebar>.panel{padding:10px;}
.sidebar .toolbar{gap:6px;margin-bottom:6px;}
.sidebar .waiting-store{min-height:0;padding:6px 0;}
.sidebar .waiting-store+.waiting-store{margin-top:4px;}
.sidebar h3{margin:4px 0 6px;line-height:1.3;}
.sidebar .waiting-store h4{line-height:1.3;}
.sidebar p{margin:6px 0;line-height:1.35;}
.sidebar .drop{min-height:0;padding:6px 8px;}
.sidebar .staff-list{margin-top:6px;gap:4px;}
.sidebar .staff-list:empty,.sidebar .planned-names:empty{margin:0;}
.sidebar .off-workers{margin-top:6px;padding:6px;}
.sidebar .off-workers .checkgrid,.sidebar .planned-names{gap:4px;}
.sidebar .waiting-store .staff-list>.staff,.sidebar .off-worker,.sidebar .planned-names button{min-height:38px;padding:4px 2px;line-height:1.2;}
.sidebar>.panel>p:last-child{margin-bottom:0;}

.room-entry-picker,.off-workers .room-entry-picker{gap:4px;}
.room-entry-picker button{min-width:0;width:100%;min-height:44px;padding:6px 1px;font-size:clamp(12px,3.5vw,18px);line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}

/* Other shop: staff and time only, without interactive financial controls. */
.time-only-board{display:block;}
.time-only-board .rooms{align-items:stretch;}
.room.time-only-room{display:block;min-height:0;height:auto;padding:10px;background:#f4fbfa;border:1px solid #9bc7c1;cursor:default;}
.room.time-only-room[hidden]{display:none;}
.room.time-only-room.closed{background:#f0f2f4;border-color:#c6ced5;}
.time-only-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 2px 10px;border-bottom:1px solid #cddedc;}
.time-only-heading strong{font-size:20px;}
.time-only-heading small{font-size:14px;color:#627582;}
.time-only-worker{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px 6px;margin-top:8px;padding:10px 8px;background:#fff;border-radius:8px;font-size:16px;line-height:1.35;font-variant-numeric:tabular-nums;}
.time-only-worker>strong,.time-only-remaining{text-align:right;overflow-wrap:anywhere;}
.time-only-setting{font-weight:600;font-size:14px;}
.time-only-remaining{font-weight:600;color:#007f73;white-space:nowrap;}
.finished-staff .time-only-remaining{color:#68747f;}
.time-only-remaining.overdue{color:#b23440;}
.time-only-worker.finished-staff{background:#fbe9ef;color:#68747f;}
.time-only-worker.ending-soon{animation:staff-ending-soon 1.4s ease-in-out infinite;}
@media(prefers-reduced-motion:reduce){.time-only-worker.ending-soon{animation:none;box-shadow:inset 0 0 0 3px #f0479b;}}

.sales-ending { padding:12px; margin-bottom:10px; }
.sales-ending h3 { margin:0 0 8px; }
.sales-ending-row { display:grid; grid-template-columns:1fr 1fr 1fr 1.4fr; gap:6px; padding:5px 0; border-top:1px solid #dce6e8; font-size:16px; }

.sales-staff-sidebar {margin-bottom:12px;}
.sales-staff-sidebar .planned-names {grid-template-columns:repeat(5,minmax(0,1fr));}

.sales-own-room :disabled {opacity:1;cursor:default;}
.sales-own-room .actions {display:block;}
.sales-own-room .actions>button {width:100%;}

.sidebar .waiting-store .staff-list>.staff.working {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;}
.staff-remaining {display:block;font-size:11px;line-height:1.15;white-space:nowrap;font-variant-numeric:tabular-nums;color:#007f73;}
.staff-remaining.overdue {color:#b23440;}

/* Inder offices stay together as one group instead of invented employees. */
.office-entry-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:12px;}
.office-entry-tabs button{min-width:0;width:100%;}
.office-form-content{display:flex;flex-direction:column;gap:12px;}
.office-form-content label{margin:0;}
.office-form-content label select{margin-top:6px;}
.office-form-content .office-entry-tabs{margin-bottom:0;}
.office-stepper-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.office-stepper{min-width:0;display:flex;flex-direction:column;gap:6px;}
.office-stepper>strong{font-size:18px;}
.office-stepper>span{text-align:center;font-size:16px;color:#526d7a;}
.office-stepper-controls{display:grid;grid-template-columns:36px minmax(0,1fr) 36px;gap:4px;}
.office-stepper-controls button{padding:0;min-width:0;min-height:44px;font-size:25px;}
.office-stepper-controls input{margin:0;min-width:0;width:100%;text-align:center;padding:6px 0;min-height:44px;font-size:20px;}
.office-cost-settings,.office-start-settings{border:1px solid #d5e0e3;border-radius:8px;padding:10px;}
.office-cost-settings summary,.office-start-settings summary{font-size:18px;cursor:pointer;}
.office-cost-inputs{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:10px;}
.office-cost-inputs input,.office-cost-inputs select,.office-start-settings input{min-width:0;width:100%;font-size:18px;margin:0;}
.office-start-settings input{margin-top:10px;}
.office-form-actions{display:flex;gap:6px;}
.office-form-actions button{flex:1;min-width:0;padding:10px 4px;}
.room .room-body .room-office-row{width:100%;min-width:0;min-height:0;margin:0;padding:0;border:0;border-radius:5px;background:transparent;text-align:right;color:#006d60;}
.room-office-row .office-headcount{flex:0 0 auto;white-space:nowrap;}
.room .room-body .room-office-row.finished-staff{background:#ffd6df;color:#68747f;}
.office-attendance{border-top:1px solid #cddedc;padding-top:6px;margin-top:6px;}
.office-attendance h4{margin:4px 0 6px;}
.office-attendance-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;}
.office-attendance-list button{min-width:0;padding:6px 4px;background:#e2f4ee;}
.office-attendance-list strong,.office-attendance-list small{display:block;}
.office-attendance-list strong{font-size:17px;overflow-wrap:anywhere;}
.office-attendance-list small{font-size:13px;color:#007f73;}
.payroll-people-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-width:700px;gap:6px;margin-bottom:6px;}
.payroll-people-actions button{min-width:0;white-space:nowrap;padding:8px 6px;font-size:20px;}
.payroll-people-actions .primary:hover{background:#00877c;color:white;}
.payroll-office-list{max-width:700px;margin-bottom:10px;}
.office-work-summary{padding:10px;background:#fff;border:1px solid #cddedc;border-radius:10px;margin:12px 0;}
.office-work-heading{display:flex;align-items:baseline;justify-content:space-between;gap:8px;}
.office-work-heading h3{margin:0;font-size:20px;}
.office-work-heading>strong{font-size:22px;color:#007f73;}
.office-work-summary:has(.office-work-table){padding:0;border:0;background:transparent;}
.office-work-summary .office-work-heading{margin-bottom:10px;}
.office-work-table td{vertical-align:top;}
.office-room-cost-box{min-width:280px;}
.office-room-cost-line{gap:8px;margin-top:4px;}
.office-room-cost-line>span{white-space:nowrap;}
.office-work-summary .muted{font-size:16px;margin:6px 0;}
.office-work-list{display:flex;flex-direction:column;gap:5px;margin-top:8px;}
.office-work-list>button{display:flex;justify-content:space-between;text-align:left;gap:8px;padding:8px;}
.office-work-list>button>div:last-child{text-align:right;}
.office-work-list strong,.office-work-list small{display:block;}
.office-work-list small{font-size:14px;color:#647985;}
.office-settlement-list{display:flex;flex-direction:column;gap:6px;margin:8px 0 14px;}
.office-settlement-list>button{display:flex;flex-direction:column;align-items:stretch;gap:3px;text-align:left;padding:10px;min-width:0;}
.office-settlement-list strong{font-size:20px;}
.office-settlement-list span{font-size:18px;}
.office-settlement-list small{font-size:14px;color:#647985;}
.room-draft-actions {display:flex;align-items:center;justify-content:space-between;gap:4px;padding:3px 5px;background:#fff1c6;color:#6b4b00;font-size:13px;}
.room-draft-actions button {padding:3px 6px;min-height:28px;font-size:13px;}
.save-conflict {border:1px solid #d69725;background:#fff1c6;color:#634600;}

/* Landscape tablets use the available width for four equal room cards. */
@media (min-width:900px) and (orientation:landscape) {
 body {max-width:1800px;}
 main {max-width:none;}
 .rooms {grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;}
}
.reservation-list{grid-column:1/-1;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));gap:8px;margin:0 0 4px;}
.reservation-note{grid-column:1/-1;overflow-wrap:anywhere;}
.reservation-card{display:grid;grid-template-columns:1fr auto;align-items:center;gap:6px;padding:12px;background:#fff7dd;border:1px solid #dfbd62;border-radius:12px;min-width:0;}
.reservation-card .actions{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px;margin-top:4px;}
.reservation-card button{padding:7px 9px;}
.reservation-clock{font-size:18px;color:#087f76;}
.reservation-clock.overdue{color:#b23636;}
.reservation-choice{background:#fff1c6;border-color:#dfbd62;font-weight:700;}
.reservation-presets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:6px;}
.reservation-presets button{padding:10px 4px;min-height:44px;}

.fixed-number-room.vacant {background:#f4f6f8;min-height:180px;}
.fixed-room-number {font-size:20px;text-align:center;}
.empty-room-label {color:#718096;text-align:center;}
.empty-room-actions {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;flex:1;padding:16px 4px;text-align:center;}
.empty-room-actions button {width:75%;max-width:180px;}
.fixed-number-room.reserved-room {background:#fff7dd;}
.reserved-guests {font-size:28px;}
.room .room-charge-history>button.charge-history-more {margin-top:8px;padding:6px 3px;border:1px solid #a6bfc7;border-radius:6px;font-size:13px;line-height:1.3;color:#18354a;background:#fff;}
.room .room-charge-history .charge-description {display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.full-charge-history {display:flex;flex-direction:column;gap:8px;}
.full-charge-entry {display:grid;grid-template-columns:1fr auto;gap:6px;text-align:left;padding:12px;}
.full-charge-memo {grid-column:1/-1;white-space:pre-wrap;overflow-wrap:anywhere;}
.room.fixed-number-room .room-head {grid-template-columns:48px minmax(0,1fr) 32px;gap:2px;}
.room.fixed-number-room .room-head>select:first-child {grid-column:1;grid-row:1;}
.room.fixed-number-room .room-note {grid-column:2;grid-row:1;grid-template-columns:minmax(0,1fr) 18px;gap:1px;}
.room.fixed-number-room .guest-count {grid-column:3;grid-row:1;}
.room.fixed-number-room .room-head input,.room.fixed-number-room .room-head select {height:30px;min-height:30px;padding:1px;font-size:16px;line-height:1.1;font-weight:600;}
.room.fixed-number-room .room-note .sales-agent-select {font-size:0;padding:0;}
.room.fixed-number-room .actions button {min-width:0;min-height:34px;padding:3px 1px;font-size:clamp(11px,5cqi,18px);}
.room .room-staff-row.ending-soon {border-radius:6px;animation:staff-ending-soon 1.4s ease-in-out infinite;}
@media(prefers-reduced-motion:reduce){.room .room-staff-row.ending-soon {animation:none;box-shadow:inset 0 0 0 3px #f0479b;}}
.empty-room-actions button {min-width:0;min-height:44px;padding:8px 2px;font-size:clamp(14px,1.8vw,20px);white-space:nowrap;}

#rolePreview {max-width:170px;background:white;color:#18354a;border-radius:6px;padding:8px;font-size:16px;}

.attendance-history-actions{display:flex;flex-direction:column;align-items:flex-start;gap:8px;margin:12px 0}.attendance-history-actions>button{width:110px;min-height:44px;padding:9px 16px;font-size:18px;line-height:1.3;margin:0}
