/* Shared staff workspace density. Screen only: A4 and 58mm retain their own rules. */
@media screen {
  :root {font-size:13px;line-height:1.4;--work-gap:12px;--work-edge:12px}
  body>header {padding:8px 14px;gap:12px}
  body>header .brand img {width:120px}
  body>header .header-right {gap:10px}
  body>header {display:grid;grid-template-columns:auto minmax(160px,1fr) auto;align-items:center}
  .header-start {display:flex;align-items:center;gap:12px;min-width:0}
  .header-start .ws-menu-trigger {white-space:nowrap}
  .header-feedback {min-width:0;display:grid;gap:4px}
  .header-feedback :is(.notice,.editor-notice) {margin:0;padding:5px 8px;font-size:11px;line-height:1.4;border-radius:3px;overflow-wrap:anywhere}
  #workspace-editor-status {display:grid;gap:4px}
  body>header .header-right {display:grid;grid-template-columns:minmax(150px,1fr) auto auto;align-items:center;gap:5px 8px;width:390px;max-width:100%;min-width:0}
  body>header .header-meta {grid-column:1/-1;display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}
  body>header #clock {display:inline;font-size:11px;white-space:nowrap}
  body>header #shift-status {font-size:10px;white-space:nowrap}
  body>header .role-label {grid-column:1;grid-row:2;display:block;justify-self:stretch;margin:0}
  body>header .role-label select {width:100%;min-height:34px;height:34px;margin:0}
  body>header .header-shift-actions {grid-column:2;grid-row:2;display:flex;flex-wrap:nowrap;width:auto;gap:0}
  body>header #logout {grid-column:3;grid-row:2}
  .sr-only {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
  body>header #shift,body>header #logout {min-height:34px}
  button {min-height:34px;padding:6px 10px;border-radius:4px;font-weight:550}
  input,select,textarea {min-height:34px;padding:6px 9px;border-radius:4px;font-size:13px}
  textarea {min-height:64px}
  label {gap:4px;font-size:12px;line-height:1.4;min-width:0}
  h2 {font-size:17px} h3 {font-size:15px}
  .eyebrow {margin-bottom:4px;letter-spacing:1px}
  .ws-layout {grid-template-columns:80px minmax(0,1fr)}
  .ws-rail {padding:8px 5px;gap:3px}
  .ws-rail-button {min-height:58px;padding:6px 3px;gap:4px;border-radius:4px}
  .ws-rail-button svg {width:21px;height:21px}
  .ws-topbar {padding:6px 12px;gap:8px}
  .ws-tabs {min-height:36px;padding:3px 10px 0;gap:3px}
  .ws-tab {border-radius:4px 4px 0 0}
  .ws-tab [role=tab] {min-height:32px;padding:5px 10px;border-radius:3px 0 0 0}
  .ws-tab-close {min-height:32px;min-width:30px;padding:3px 7px;font-size:18px}
  #main {padding:12px;min-width:0}
  #main .panel,.pos-card,.bo-metrics>div,.bo-growth>div {box-shadow:none;border-radius:4px}
  #main .panel {margin-bottom:12px}
  .section-heading {padding:10px 12px;gap:12px}
  .section-heading .muted {margin-top:4px}
  .notice {padding:8px 10px;margin-bottom:10px;min-height:0;border-radius:4px;font-size:12px}
  .notice.error,#modal-error {padding:8px 10px;border-radius:4px}
  .bo-content,.ws-module-body,.record-panel,.master-workspace .record-body {padding:12px}
  .report-filter,.asset-filter,#back-office-panel .report-filter {padding:10px 12px;gap:8px 12px}
  .master-toolbar {gap:8px 12px;margin-bottom:10px}
  .form-grid,.coa-fields,.shift-fields,.pos-card .form-grid {gap:10px 12px}
  .form-footer,.master-workspace .form-footer {gap:8px;margin-top:12px;padding-top:10px;align-items:center}
  .record-tabbar {padding:3px 10px 0;gap:3px}
  .record-tab,.coa-record-tab,.coa-record-tabs>button {border-radius:4px 4px 0 0}
  .record-tab button,.coa-record-tab button {min-height:32px;padding:5px 10px;font-size:12px}
  .record-tab button[data-record-close],.record-tab button[data-close] {padding:3px 8px;font-size:18px}
  .record-inner-tabs,.coa-detail-tabs {gap:3px;padding:0;border-bottom:1px solid #cbd8df;flex-wrap:nowrap;overflow-x:auto}
  .record-inner-tabs button,.coa-detail-tabs button {min-height:32px;padding:5px 10px;border-radius:3px 3px 0 0;white-space:nowrap;flex:none}
  .master-workspace .record-inner-tabs {margin-bottom:10px}
  /* Form labels are not data-table headers: a short, fixed label column. */
  :is(#main,#dialog) .master-form-table {width:100%;table-layout:fixed;min-width:0;border-collapse:collapse}
  :is(#main,#dialog) .master-form-table th {width:160px;min-width:0;background:#f7f9fa;text-align:left;text-transform:none;letter-spacing:0;font-weight:500;vertical-align:top;padding-top:15px}
  :is(#main,#dialog) .master-form-table th label {display:block;margin:0;font-size:13px;font-weight:500;color:#253e46;line-height:20px}
  :is(#main,#dialog) .master-form-table td {vertical-align:top;overflow-wrap:anywhere}
  :is(#main,#dialog) .master-form-table :is(input:not([type=checkbox]),select,textarea) {display:block;width:100%;max-width:640px;margin:0}
  :is(#main,#dialog) .master-form-table textarea {resize:vertical}
  .master-reason {display:grid;grid-template-columns:140px minmax(0,640px);align-items:start;gap:20px;padding:8px 10px;margin:0;border-bottom:1px solid #d9e1e5;font-size:13px;font-weight:500;line-height:20px}
  .master-reason textarea {width:100%;margin:0}
  :is(#main,#dialog) .asset-form-table th {width:160px;font-weight:500;text-transform:none;letter-spacing:0;vertical-align:top;padding-top:14px}
  :is(#main,#dialog) .asset-form-table th label {font-size:13px;font-weight:500;line-height:20px;margin:0}
  :is(#main,#dialog) .asset-form-table td {vertical-align:top}
  .asset-form-table :is(input,select,textarea),.asset-currency {max-width:640px;margin:0}
  .asset-reason {display:grid;grid-template-columns:140px minmax(0,640px);align-items:start;gap:20px;padding:8px 10px;margin:0;border-bottom:1px solid #d9e1e5;font-size:13px;font-weight:500;line-height:20px}
  .asset-reason textarea {width:100%;margin:0}
  .coa-workspace-bar {padding:4px 10px;gap:8px;margin-bottom:0}
  .coa-record-tabs {padding:4px 0;gap:3px;margin-bottom:10px}
  .coa-info {margin:10px 0;border-radius:4px}
  .coa-info>div {padding:8px 10px;gap:8px}
  .coa-form .coa-sub-choice {margin-top:0}
  .coa-account-heading {margin-bottom:10px}
  .bo-section-title {margin:0 0 8px;gap:8px}
  .bo-note {padding:8px 10px;margin:10px 0;font-size:12px;line-height:1.5}
  .bo-metrics {gap:8px;margin-bottom:10px}
  .bo-metrics>div {padding:10px 12px;gap:4px}
  .bo-metrics span {min-height:0}
  .bo-metrics strong {font-size:21px}
  .bo-growth {gap:8px;margin-bottom:12px}
  .bo-growth>div {padding:8px 10px;gap:4px 12px}
  .bo-section {margin-top:12px;padding-top:10px}
  .bo-current {margin-top:10px;padding:10px;gap:10px 20px;border-radius:4px}
  .bo-table-wrap,.asset-scroll,.pos-products {border-radius:3px}
  #main :is(table,.bo-table,.asset-table,.pos-table table),#dialog table {font-size:12px}
  #main :is(th,td),#dialog :is(th,td) {padding:7px 10px;line-height:1.4}
  #main :is(td,th) small,#dialog :is(td,th) small {margin-top:2px;line-height:1.35}
  #main td button,#dialog td button {min-height:28px;padding:4px 8px;font-size:12px}
  #main .coa-table .coa-link {min-height:24px;white-space:nowrap}
  #main .coa-table td:nth-child(2) .coa-link {white-space:normal}
  #main .coa-table th:first-child {min-width:125px;width:145px}
  #main .coa-table td:nth-child(2) {min-width:230px}
  #main .coa-table thead th {min-width:95px;text-align:left;text-transform:none;letter-spacing:0}
  #main .coa-table :is(th,td):nth-child(5) {text-align:right}
  #main .coa-table .coa-row-actions {flex-wrap:nowrap;gap:4px}
  #main .coa-table .coa-tree-cell {padding-inline-start:calc(var(--coa-depth,0) * 14px)}
  #main .coa-table tbody th {vertical-align:middle}
  .asset-list-meta,.asset-list-footer {padding:8px 12px;gap:8px}
  .pos-layout {gap:12px}
  .pos-card {padding:12px}
  .pos-card-heading {gap:8px;padding-bottom:8px;margin-bottom:10px}
  .pos-card-heading h3 {font-size:15px}
  .pos-card label,#inventory-panel label {gap:4px;margin-bottom:10px;font-size:12px}
  .pos-card input,.pos-card select,#inventory-panel input,#inventory-panel select {min-height:34px}
  .pos-catalog-search>div {margin-bottom:10px}
  .pos-tabs {margin-bottom:8px}
  .pos-tabs button {min-height:32px}
  .customer-picker {padding-bottom:10px;margin-bottom:10px}
  .customer-picker>label {margin-bottom:8px}
  .shift-screen {gap:10px}
  .shift-fields {margin:10px 0}
  .shift-screen form {gap:10px}
  .shift-intro,.shift-staff,.shift-receivers {padding:10px;border-radius:4px}
  dialog {border-radius:6px;box-shadow:0 10px 36px #12332b30}
  dialog::backdrop {backdrop-filter:none}
  .dialog-heading {padding:12px 14px;gap:10px}
  #dialog-body {padding:12px 14px}
  #workspace-menu {left:88px;border-radius:6px;box-shadow:0 10px 32px #102e3c30}
  .ws-menu-head,#workspace-menu-items {padding:12px}
  .ws-menu-title {margin-bottom:8px}
  .ws-menu-grid {gap:8px}
  .ws-menu-section+.ws-menu-section {margin-top:14px}
  .ws-menu-item {min-height:96px;padding:10px 7px;gap:6px;box-shadow:none;border-radius:4px}
  .ws-menu-icon {width:32px;height:32px;border-radius:4px}
  .ws-menu-icon svg {width:24px;height:24px}
  .ws-module-body td {line-height:1.4}
}
@media screen and (max-width:1250px) {
  body>header {grid-template-columns:auto minmax(0,1fr)}
  .header-feedback {grid-column:1/-1;grid-row:2}
  body>header .header-right {justify-self:end}
}
@media screen and (max-width:700px) {
  #main {padding:8px}
  .ws-layout {display:block}
  body>header {padding:8px 12px}
  body>header {grid-template-columns:minmax(0,1fr);gap:8px}
  .header-start {justify-content:space-between}
  body>header .header-right {grid-column:1;grid-row:2;width:100%}
  body>header .header-meta {justify-content:space-between;flex-wrap:wrap;gap:4px 8px}
  body>header .header-right {grid-template-columns:minmax(0,1fr) auto auto}
  body>header .role-label select,body>header #shift,body>header #logout {height:40px;min-height:40px}
  .header-feedback {grid-column:1;grid-row:3}
  .header-feedback:has(>#notice[hidden]):has(>#workspace-editor-status[hidden]) {display:none}
  .bo-content,.ws-module-body,.record-panel,.master-workspace .record-body {padding:10px}
  #workspace-menu {left:10px}
  .coa-workspace-tools {width:auto}
  .pos-layout {grid-template-columns:minmax(0,1fr)}
  .record-inner-tabs button {flex:none}
}
@media screen and (max-width:480px) {
  :is(#main,#dialog) .master-form-table,:is(#main,#dialog) .master-form-table tbody,:is(#main,#dialog) .master-form-table tr {display:block;width:100%}
  :is(#main,#dialog) .master-form-table th,:is(#main,#dialog) .master-form-table td {display:block;width:100%;padding:4px 8px;border:0;background:none}
  :is(#main,#dialog) .master-form-table th {padding-top:8px}
  :is(#main,#dialog) .master-form-table td {padding-bottom:8px;border-bottom:1px solid #d9e1e5}
  .master-reason {grid-template-columns:minmax(0,1fr);gap:4px;padding:8px}
}
@media screen and (max-width:560px) {
  :is(#main,#dialog) .asset-form-table th,:is(#main,#dialog) .asset-form-table td {width:100%;padding:4px 8px}
  :is(#main,#dialog) .asset-form-table th {padding-top:8px}
  :is(#main,#dialog) .asset-form-table td {padding-bottom:8px}
  .asset-reason {grid-template-columns:minmax(0,1fr);gap:4px;padding:8px}
}
@media screen and (pointer:coarse) {
  button,input,select,.pos-card input,.pos-card select,#inventory-panel input,#inventory-panel select,
  #main td button,#main .coa-table .coa-link,#dialog td button,
  .ws-tab [role=tab],.ws-tab-close,.record-tab button,.coa-record-tab button,
  .record-inner-tabs button,.coa-detail-tabs button,.pos-tabs button,
  body>header #shift,body>header #logout {min-height:44px}
  body>header .role-label select {height:44px;min-height:44px}
  input[type=checkbox],input[type=radio] {min-height:18px;min-width:18px}
  .ws-tab-close {min-width:44px}
}

/* Kas/Bank: one COA identity, compact payment worksheet. */
.cash-header{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px}.cash-header label{display:grid;grid-template-columns:minmax(100px,140px) minmax(0,1fr);align-items:center;gap:8px}.cash-lines input{min-width:100px;width:100%}.cash-lines input.money{text-align:right;font-variant-numeric:tabular-nums}.cash-lines th:first-child{width:120px}.cash-total{display:flex;justify-content:flex-end;gap:20px;padding:8px 12px;border-bottom:1px solid #cad5dc}.checkbox-line{display:flex;align-items:center;gap:8px}.checkbox-line input{width:auto}@media(max-width:700px){.cash-header{grid-template-columns:1fr}.cash-lines{min-width:640px}}
/* Supplier invoices are table worksheets; amounts and quantities stay aligned. */
.purchase-header{width:100%;table-layout:fixed}.purchase-header th{width:14%}.purchase-header td{width:36%}.purchase-header input,.purchase-header select{width:100%}.purchase-lines{min-width:1050px}.purchase-lines input{width:100%;min-width:70px;text-align:right}.purchase-lines td:nth-child(2){min-width:160px}.purchase-lines td:nth-child(6){min-width:115px}.purchase-lines select{min-width:62px}.purchase-totals{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:16px;padding:10px 0;border-bottom:1px solid #ced9df;margin-bottom:8px}.purchase-approval{border-top:1px solid #ced9df;padding:10px 0;display:flex;gap:10px;align-items:end;flex-wrap:wrap}.purchase-approval label{min-width:160px}.purchase-form textarea{width:100%}.purchase-form>label{display:block}.purchase-form .money{white-space:nowrap}
@media(max-width:650px){.purchase-header{min-width:620px}.purchase-totals{gap:8px;justify-content:flex-start}.purchase-approval{align-items:stretch}.purchase-approval label{width:100%}}
/* Invoice metadata reflows; only item rows need horizontal scrolling. */
@media screen {
  :is(#main,#dialog) .purchase-header th {width:140px}
  :is(#main,#dialog) .purchase-header td {width:auto}
}
@media screen and (max-width:900px) {
  :is(#main,#dialog) .purchase-header,:is(#main,#dialog) .purchase-header tbody {display:block;width:100%;min-width:0}
  :is(#main,#dialog) .purchase-header tr {display:grid;grid-template-columns:140px minmax(0,1fr);width:100%}
  :is(#main,#dialog) .purchase-header th,:is(#main,#dialog) .purchase-header td {display:block;width:auto}
}
@media screen and (max-width:480px) {
  :is(#main,#dialog) .purchase-header tr {grid-template-columns:minmax(0,1fr)}
}

/* Keep identifiers intact; wide tables scroll inside their own container. */
.purchase-table .document-code,.purchase-table .coa-link,.purchase-lines td:first-child {white-space:nowrap;overflow-wrap:normal;font-variant-numeric:tabular-nums}

/* Backup history retains readable columns inside its scroll container. */
.backup-workspace .mini-table {min-width:920px}
.backup-workspace .mini-table td:nth-child(-n+4) {white-space:nowrap;overflow-wrap:normal}
@media screen and (max-width:700px) {
  #main .backup-workspace button {min-height:44px}
}
.financial-workspace {padding:12px;min-width:0}
.financial-workspace .master-toolbar label {flex:0 1 180px}
.financial-workspace .master-toolbar label:has(select) {flex:0 1 360px}
.financial-workspace .financial-table {min-width:680px}
.financial-workspace .financial-table th {text-transform:none;letter-spacing:0}
.financial-workspace .financial-table .money {white-space:nowrap;font-variant-numeric:tabular-nums;text-align:right}
.financial-workspace .financial-table td:first-child {white-space:nowrap}
.financial-workspace .master-note {margin:8px 0;line-height:1.5}
.financial-workspace .pagination {padding:8px 0;flex-wrap:wrap}
.financial-workspace .pagination>div {gap:8px;flex-wrap:wrap}
@media(max-width:600px){
 .financial-workspace {padding:8px}
 .financial-workspace .master-toolbar label,.financial-workspace .master-toolbar label:has(select) {flex:1 1 100%}
 #main .financial-workspace :is(button,input,select) {min-height:44px}
}
/* Guest terms are a child dialog; returning never replaces the check-in form. */
dialog.terms-reader{width:min(720px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;overflow:auto}
.terms-reader .dialog-heading{padding:12px 16px;gap:12px}
.terms-reader .dialog-heading h2{font-size:16px;margin:0}
.terms-reader .dialog-heading button{min-width:44px;min-height:44px}
.terms-reader-body{padding:0 16px 12px}
.terms-reader .terms-acceptance{margin:0;padding:8px 0;border-bottom:1px solid #d4e1e3;font-size:12px}
.terms-document-title{font-size:13px;font-weight:600;margin:12px 0 8px}
.terms-sections details{border-bottom:1px solid #d4e1e3;margin:0;padding:0;background:transparent;border-radius:0}
.terms-sections summary{padding:10px 0;min-height:44px;box-sizing:border-box;font-weight:600;cursor:pointer}
.terms-sections p{margin:0;padding:0 0 12px;font-size:13px;line-height:1.55;overflow-wrap:anywhere}
.terms-reader .form-footer{padding:8px 16px;margin:0;border-top:1px solid #d4e1e3}
.terms-reader form{margin-top:12px}.terms-reader form .form-footer{padding:8px 0}
.terms-error{color:#9e2222;background:#fff1f1;padding:8px;margin:8px 0}

/* PIN stays aligned with room and validity; never floats beside action buttons. */
.guest-pin-table{width:100%;table-layout:fixed;border-collapse:collapse;margin:0}
.guest-pin-table th{width:148px;text-align:left;text-transform:none;letter-spacing:normal;font-size:13px;font-weight:600}
.guest-pin-table th,.guest-pin-table td{padding:8px;vertical-align:middle;overflow-wrap:anywhere}
.guest-pin-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.guest-pin-controls output{display:inline-block;width:76px;font:600 22px/1.4 ui-monospace,monospace;letter-spacing:3px}
.guest-pin-controls button{min-height:36px}
.guest-pin-confirm{margin:12px 0;align-items:flex-start}
@media(max-width:480px){.guest-pin-table th{width:100px}.guest-pin-controls button{min-height:44px}.guest-pin-table th,.guest-pin-table td{padding:6px}}
/* Company: one shared profile, compact paired label/value columns. */
.company-sections{display:flex;gap:4px;border-bottom:1px solid #cbd7dc;padding:0 0 4px;margin-bottom:8px;flex-wrap:wrap}.company-sections [aria-pressed=true]{background:#245668;color:white}.company-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:start}.company-fields>*{min-width:0}.company-fields .master-form-table{width:100%;table-layout:fixed}.company-fields .master-form-table th{width:150px}.company-fields input,.company-fields textarea{width:100%;min-width:0}.company-fields textarea{resize:vertical}[data-activities] input{min-width:90px}[data-activities] td:nth-child(2) input,[data-activities] td:nth-child(3) input{min-width:200px}@media(max-width:1000px){.company-fields{grid-template-columns:1fr}}@media(max-width:540px){.company-fields .master-form-table th{width:auto}}

.routine-proof{margin:8px 0}.routine-proof summary{cursor:pointer;overflow-wrap:anywhere}.routine-proof img{display:block;max-width:100%;max-height:60vh;object-fit:contain;margin:8px 0}

/* Manual payment review: evidence and bank data stay together. */
.review-proof-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}.review-proof-grid dd{margin:4px 0 12px;overflow-wrap:anywhere}.review-proof-grid dt{font-weight:600}@media(max-width:600px){.review-proof-grid{grid-template-columns:1fr}}

/* Multi-room work stays compact; room actions retain their own identity. */
.group-reservation-detail .steps{margin:8px 0;gap:4px}
.group-reservation-detail .sub-tabs{margin:8px 0;padding-bottom:6px}
.group-reservation-detail .metrics{margin:8px 0}
.group-reservation-detail .metrics>div{padding:8px 12px}
.group-reservation-detail .tip{padding:8px 10px;margin:8px 0}
.group-reservation-detail .tip p{margin:4px 0}
.group-reservation-detail .mini-table th,.group-reservation-detail .mini-table td{padding:6px 8px}
.group-reservation-detail .mini-table th:nth-child(3),.group-reservation-detail .mini-table td:nth-child(3){white-space:nowrap}
#reserve-selected-rooms{margin:8px 0}
#reserve-selected-rooms th,#reserve-selected-rooms td{padding:6px 8px}
@media(max-width:600px){.group-reservation-detail .mini-table button,#reserve-selected-rooms button{min-height:44px}}
.group-reservation-detail .metrics strong{white-space:nowrap;font-variant-numeric:tabular-nums}
.group-reservation-detail .mini-table{min-width:580px}
.group-reservation-detail .mini-table button{white-space:nowrap;min-width:40px}
@media(max-width:600px){.group-reservation-detail .metrics{display:flex;flex-direction:column}.group-reservation-detail .metrics>div{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 8px}.group-reservation-detail .metrics span{max-width:65%}.group-reservation-detail .metrics strong{font-size:14px}}
/* Shared shift names wrap within the header, never across account controls. */
body>header #shift-status {white-space:normal;max-width:440px;line-height:1.4;overflow-wrap:anywhere}
