/* PM24 V304 — final mobile premium polish after owner + receptionist regression */
:root{--pm24-v304-navy:#08265e;--pm24-v304-blue:#1577f2;--pm24-v304-pink:#eb168c;--pm24-v304-line:#dbe6f4;--pm24-v304-soft:#f5f9ff}

/* Authentication pages: compact, distraction-free and safe error placement. */
body.public-business-register,
body.public-business-login,
body.public-login,
body.public-owner-login{padding-bottom:0!important}
body.public-business-register .bottom-nav,
body.public-business-login .bottom-nav,
body.public-login .bottom-nav,
body.public-owner-login .bottom-nav,
body.public-business-register .pgm-public-footer,
body.public-business-login .pgm-public-footer,
body.public-login .pgm-public-footer,
body.public-owner-login .pgm-public-footer{display:none!important}
body.public-business-register>.page,
body.public-business-login>.page,
body.public-login>.page,
body.public-owner-login>.page{padding-bottom:10px!important}
body.public-business-register .toast,
body.public-business-login .toast,
body.public-login .toast,
body.public-owner-login .toast{
  position:fixed!important;left:50%!important;right:auto!important;top:calc(10px + env(safe-area-inset-top))!important;bottom:auto!important;
  width:min(430px,calc(100vw - 24px))!important;max-width:none!important;transform:translateX(-50%)!important;
  margin:0!important;z-index:100000!important;box-shadow:0 14px 38px rgba(10,31,70,.18)!important
}
.pgm-business-phone input{min-width:0!important;text-overflow:ellipsis!important}
.pgm-business-auth-help{padding-bottom:8px!important}

/* Properties: remove inherited 680px table width and render a real full-width mobile card. */
@media(max-width:760px){
 body.app-properties .table-wrap{width:100%!important;max-width:100%!important;min-width:0!important;overflow:visible!important;border:0!important;background:transparent!important}
 body.app-properties table.data-table{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;table-layout:fixed!important;border-collapse:separate!important}
 body.app-properties table.data-table tbody{display:grid!important;width:100%!important;max-width:100%!important;min-width:0!important;gap:12px!important}
 body.app-properties table.data-table tr{display:grid!important;width:100%!important;max-width:100%!important;min-width:0!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:11px!important;overflow:hidden!important}
 body.app-properties table.data-table td{display:grid!important;width:auto!important;max-width:100%!important;min-width:0!important;overflow:hidden!important;overflow-wrap:anywhere!important;text-align:left!important}
 body.app-properties table.data-table td:nth-child(1),
 body.app-properties table.data-table td:nth-child(4),
 body.app-properties table.data-table td:nth-child(6){grid-column:1/-1!important}
 body.app-properties table.data-table td:nth-child(2),
 body.app-properties table.data-table td:nth-child(3),
 body.app-properties table.data-table td:nth-child(5){grid-column:auto!important}
 body.app-properties table.data-table td:nth-child(5){align-content:start!important}
 body.app-properties table.data-table td:nth-child(5) .status{width:max-content!important;max-width:100%!important;white-space:normal!important}
 body.app-properties table.data-table td:last-child{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;overflow:visible!important}
 body.app-properties table.data-table td:last-child .btn{display:flex!important;width:100%!important;max-width:100%!important;margin:0!important}
}

/* Staff edit: one natural scroll surface so property/status never look missing. */
@media(max-width:760px){
 .staff-edit-dialog{height:auto!important;max-height:calc(100dvh - 20px)!important;overflow:auto!important;overscroll-behavior:contain!important}
 .staff-edit-form{display:block!important;height:auto!important;max-height:none!important;overflow:visible!important}
 .staff-edit-head{position:sticky!important;top:0!important;z-index:5!important;padding:15px 16px 12px!important}
 .staff-edit-head h2{font-size:23px!important}.staff-edit-head p{font-size:12px!important}
 .staff-edit-grid{display:grid!important;grid-template-columns:1fr!important;gap:11px!important;overflow:visible!important;padding:12px 16px!important}
 .staff-edit-grid input,.staff-edit-grid select{min-height:45px!important;font-size:13px!important;padding-left:12px!important;padding-right:34px!important}
 .staff-edit-note{margin:0 16px 10px!important;font-size:12px!important}
 .staff-edit-actions{position:sticky!important;bottom:0!important;z-index:6!important;grid-template-columns:1fr!important;padding:10px 16px calc(10px + env(safe-area-inset-bottom))!important;box-shadow:0 -12px 28px rgba(15,40,82,.08)!important}
 .staff-edit-actions .btn{min-height:45px!important}
 .staff-create-form select{font-size:12px!important;padding-right:32px!important}
 .staff-directory-head{grid-template-columns:minmax(0,1fr)!important}
 .staff-directory-head .btn{width:100%!important;white-space:nowrap!important}
}

/* Profile upload cards: only one preview at a time and aligned guidance chips. */
.owner-settings-upload-card.v304-has-new-preview .owner-settings-upload-preview{display:none!important}
.owner-settings-upload-card .v304-new-preview{display:block!important;width:100%!important;height:190px!important;margin:0!important;border-radius:18px!important;object-fit:contain!important;background:linear-gradient(145deg,#f7faff,#eef5ff)!important}
.owner-settings-upload-card .owner-upload-guidance{order:3!important;margin:0!important;align-self:center!important;justify-content:center!important}
.owner-settings-upload-card .owner-upload-control{order:4!important}
.owner-settings-upload-card .v304-new-preview{order:2!important}
.owner-settings-upload-card>button{order:5!important}
@media(max-width:650px){
 .owner-settings-upload-card{display:flex!important;flex-direction:column!important;gap:11px!important;padding:16px!important}
 .owner-settings-upload-card>div:not(.owner-settings-upload-preview):not(.owner-upload-guidance){order:1!important}
 .owner-settings-upload-preview{order:2!important;width:100%!important;min-height:145px!important}
 .owner-settings-upload-preview .owner-settings-avatar{max-width:100%!important;margin:auto!important}
 .owner-upload-guidance span{font-size:9px!important;padding:5px 7px!important}
}

/* Floating notification becomes an inline owner action on mobile: no card overlap. */
@media(max-width:700px){
 .owner-page{padding-bottom:28px!important}
 .pm24-due-notification-widget:not(.is-dashboard-inline){position:relative!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;display:flex!important;justify-content:flex-end!important;align-items:center!important;width:100%!important;margin:0 0 10px!important;padding:0 2px!important;pointer-events:auto!important;z-index:55!important}
 .pm24-due-notification-widget:not(.is-dashboard-inline) .pm24-due-notification-trigger{width:46px!important;height:46px!important;border-radius:15px!important}
 .pm24-due-notification-widget:not(.is-dashboard-inline) .pm24-due-notification-panel{position:absolute!important;right:0!important;left:auto!important;top:54px!important;bottom:auto!important;width:min(350px,calc(100vw - 34px))!important}
}

/* Receipts: payment mode and received-by are independent fields on screen and print. */
.booking-receipt-page .receipt-total{gap:18px!important}
.booking-receipt-page .pm24-receipt-meta{display:grid!important;grid-template-columns:repeat(2,minmax(105px,auto))!important;gap:10px 24px!important;align-items:center!important;justify-content:end!important;text-align:left!important}
.booking-receipt-page .pm24-receipt-meta>span{display:grid!important;gap:4px!important;min-width:0!important}
.booking-receipt-page .pm24-receipt-meta small,.booking-receipt-page .pm24-receipt-meta b{display:block!important;margin:0!important;white-space:normal!important}
@media(max-width:650px){.booking-receipt-page .pm24-receipt-meta{grid-template-columns:1fr 1fr!important;justify-content:stretch!important;width:100%!important}}
@media print{
 .booking-receipt-page .pm24-receipt-meta{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px 18px!important;justify-content:end!important}
 .booking-receipt-page .pm24-receipt-meta>span{display:block!important}
}

/* Compact report cards without touching charts. */
@media(max-width:650px){
 body.app-stay-reports .stay-report-summary>*,body.app-stay-reports .report-summary-grid>*{min-height:94px!important;padding:10px!important}
 body.app-stay-reports .stay-report-summary b,body.app-stay-reports .report-summary-grid b{font-size:21px!important}
}

/* Generic select/menu safety on narrow screens. */
@media(max-width:480px){select{max-width:100%!important}.section-title h1{overflow-wrap:anywhere}}
