/* PM24 V305 — Lodge owner workspace final premium pass
   Targeted fixes only: mobile overlap, staff modal, alerts, auth feedback,
   profile media presentation, front-desk drawer density and property-first receipts. */
:root{
  --pm24-v305-navy:#08265e;
  --pm24-v305-blue:#1478f2;
  --pm24-v305-pink:#eb168c;
  --pm24-v305-ink:#10264e;
  --pm24-v305-muted:#647894;
  --pm24-v305-line:#dbe6f3;
  --pm24-v305-soft:#f5f9ff;
  --pm24-v305-shadow:0 18px 48px rgba(12,45,92,.10);
}

/* --------------------------------------------------------------------------
   Mobile due/chat control: the mobile header and Due Alerts card already give
   direct access. Remove the redundant floating control so it can never cover
   cards, reports, footer text or Front Desk actions.
   -------------------------------------------------------------------------- */
@media(max-width:700px){
  .pm24-due-notification-widget{display:none!important}
  .owner-page{padding-bottom:calc(28px + env(safe-area-inset-bottom))!important}
}

/* --------------------------------------------------------------------------
   Edit Staff: fixed header + independently scrolling fields + always-visible
   two-button footer. This overrides both the old natural-scroll and sticky
   single-column versions.
   -------------------------------------------------------------------------- */
@media(max-width:760px){
  .staff-edit-dialog[open],
  .staff-edit-dialog{
    position:fixed!important;
    inset:8px!important;
    width:auto!important;
    max-width:520px!important;
    height:calc(100dvh - 16px)!important;
    max-height:calc(100dvh - 16px)!important;
    margin:auto!important;
    padding:0!important;
    overflow:hidden!important;
    border:0!important;
    border-radius:24px!important;
    background:#fff!important;
    box-shadow:0 30px 90px rgba(5,28,72,.30)!important;
  }
  .staff-edit-form{
    display:grid!important;
    grid-template-rows:auto minmax(0,1fr) auto auto!important;
    width:100%!important;
    height:100%!important;
    max-height:none!important;
    padding:0!important;
    overflow:hidden!important;
    background:#fff!important;
  }
  .staff-edit-head{
    position:relative!important;
    inset:auto!important;
    z-index:4!important;
    margin:0!important;
    padding:17px 17px 13px!important;
    border-bottom:1px solid #e5edf7!important;
    background:linear-gradient(145deg,#fff,#f7fbff)!important;
  }
  .staff-edit-head h2{margin:4px 0!important;font-size:22px!important;line-height:1.15!important}
  .staff-edit-head p{margin:0!important;font-size:11.5px!important;line-height:1.4!important}
  .staff-edit-grid{
    display:grid!important;
    grid-template-columns:1fr!important;
    align-content:start!important;
    gap:10px!important;
    min-height:0!important;
    padding:13px 17px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
  }
  .staff-edit-grid label{min-width:0!important;gap:5px!important;font-size:12px!important}
  .staff-edit-grid input,.staff-edit-grid select{
    width:100%!important;min-width:0!important;min-height:44px!important;
    padding:9px 35px 9px 12px!important;border-radius:12px!important;font-size:12.5px!important;
  }
  .staff-edit-note{
    margin:0 17px 9px!important;padding:9px 11px!important;
    border-radius:12px!important;font-size:10.5px!important;line-height:1.35!important;
  }
  .staff-edit-actions{
    position:relative!important;inset:auto!important;z-index:5!important;
    display:grid!important;grid-template-columns:minmax(92px,.42fr) minmax(0,1fr)!important;
    gap:9px!important;width:100%!important;margin:0!important;
    padding:10px 17px calc(10px + env(safe-area-inset-bottom))!important;
    border-top:1px solid #e3ebf6!important;background:#fff!important;
    box-shadow:0 -10px 26px rgba(15,40,82,.07)!important;
  }
  .staff-edit-actions .btn{
    display:flex!important;align-items:center!important;justify-content:center!important;
    width:100%!important;min-width:0!important;min-height:46px!important;
    margin:0!important;padding:8px 9px!important;border-radius:13px!important;
    font-size:11.5px!important;line-height:1.2!important;white-space:normal!important;
  }
}
@media(max-width:380px){
  .staff-edit-actions{grid-template-columns:90px minmax(0,1fr)!important;padding-inline:12px!important}
  .staff-edit-actions .btn{font-size:10.5px!important}
}

/* --------------------------------------------------------------------------
   Notifications: premium compact header, readable metadata and short report
   summaries. The full report is opened through the View report action.
   -------------------------------------------------------------------------- */
body.app-notifications .section-title.pm24-notification-head{
  display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;gap:10px!important;margin:8px 0 12px!important;
  padding:16px 17px!important;border-radius:20px!important;
}
body.app-notifications .pm24-notification-head h1{
  margin:0!important;font-size:clamp(22px,5vw,30px)!important;line-height:1.08!important;
  overflow-wrap:normal!important;word-break:normal!important;white-space:nowrap!important;
}
body.app-notifications .pm24-notification-head p{margin:4px 0 0!important;font-size:11px!important;line-height:1.4!important}
body.app-notifications .pm24-notification-head .btn,
body.app-notifications .v299-all-read{
  min-height:34px!important;width:auto!important;max-width:138px!important;
  padding:7px 10px!important;border-radius:999px!important;white-space:nowrap!important;
  font-size:10.5px!important;line-height:1!important;
}
body.app-notifications .v299-all-read{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  background:#eafaf1!important;color:#17764a!important;border:1px solid #c7ecd7!important;
}
body.app-notifications .notification-card-list{
  display:grid!important;gap:10px!important;padding:10px!important;border-radius:22px!important;
  background:linear-gradient(180deg,#f8fbff,#fff)!important;
}
body.app-notifications .notification-row{
  display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;
  align-items:start!important;gap:12px!important;margin:0!important;padding:14px!important;
  border:1px solid #e1e9f4!important;border-radius:17px!important;background:#fff!important;
  box-shadow:0 8px 24px rgba(18,52,96,.045)!important;
}
body.app-notifications .notification-row>div:first-child{min-width:0!important}
body.app-notifications .notification-row b{font-size:13px!important;line-height:1.35!important;color:var(--pm24-v305-ink)!important}
body.app-notifications .notification-row .pm24-notification-body{
  display:block!important;margin-top:5px!important;color:#627590!important;
  font-size:11px!important;line-height:1.48!important;white-space:normal!important;overflow-wrap:anywhere!important;
}
body.app-notifications .notification-row .pm24-notification-body.is-report{
  display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:3!important;
  overflow:hidden!important;
}
body.app-notifications .pm24-notification-actions{display:flex!important;gap:7px!important;flex-wrap:wrap!important;margin-top:9px!important}
body.app-notifications .pm24-notification-actions .btn{min-height:32px!important;padding:6px 10px!important;font-size:10px!important;border-radius:10px!important}
body.app-notifications .pm24-notification-meta{
  display:grid!important;justify-items:end!important;gap:6px!important;min-width:94px!important;
  text-align:right!important;
}
body.app-notifications .pm24-notification-time{
  display:block!important;max-width:120px!important;font-size:9.5px!important;line-height:1.35!important;
  white-space:normal!important;color:#74849a!important;
}
@media(max-width:520px){
  body.app-notifications .section-title.pm24-notification-head{padding:14px!important}
  body.app-notifications .pm24-notification-head h1{font-size:23px!important}
  body.app-notifications .pm24-notification-head p{max-width:220px!important}
  body.app-notifications .notification-row{grid-template-columns:1fr!important;gap:9px!important;padding:12px!important}
  body.app-notifications .pm24-notification-meta{
    grid-template-columns:auto minmax(0,1fr)!important;align-items:center!important;justify-items:start!important;
    width:100%!important;min-width:0!important;padding-top:9px!important;border-top:1px solid #edf1f6!important;text-align:left!important;
  }
  body.app-notifications .pm24-notification-time{max-width:none!important;justify-self:end!important;text-align:right!important}
}

/* --------------------------------------------------------------------------
   Auth messages: V305 JS moves server feedback into the login card. Once moved,
   it is normal-flow content and cannot be clipped by the viewport/footer.
   -------------------------------------------------------------------------- */
body.public-business-register .toast.pm24-auth-inline-toast,
body.public-business-login .toast.pm24-auth-inline-toast,
body.public-login .toast.pm24-auth-inline-toast,
body.public-owner-login .toast.pm24-auth-inline-toast{
  position:static!important;inset:auto!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;
  width:100%!important;max-width:none!important;transform:none!important;
  margin:0 0 13px!important;padding:11px 13px!important;z-index:auto!important;
  border-radius:13px!important;box-shadow:none!important;font-size:11.5px!important;line-height:1.42!important;
}
.pgm-business-auth-card .pm24-auth-inline-toast{order:2!important}

/* --------------------------------------------------------------------------
   Profile media cards: guidance is grouped with the heading. Owner image stays
   square; property cover is shown as a true landscape 16:9 business cover.
   -------------------------------------------------------------------------- */
.owner-settings-upload-card.owner-photo-card,
.owner-settings-upload-card.property-cover-card{overflow:hidden!important}
.owner-settings-upload-card .owner-upload-guidance{
  display:flex!important;align-items:center!important;justify-content:flex-start!important;
  gap:5px!important;flex-wrap:wrap!important;width:100%!important;margin:0!important;
}
.owner-settings-upload-card .owner-upload-guidance span{
  display:inline-flex!important;align-items:center!important;min-height:24px!important;
  padding:5px 7px!important;border:1px solid #d9e6f4!important;border-radius:999px!important;
  background:#f7faff!important;color:#58708e!important;font-size:8.5px!important;font-weight:850!important;line-height:1!important;
}
.owner-settings-upload-card .owner-settings-upload-preview{
  display:grid!important;place-items:center!important;width:100%!important;margin:0!important;
  border:1px solid #dce7f3!important;border-radius:18px!important;background:linear-gradient(145deg,#f8fbff,#edf5ff)!important;
  overflow:hidden!important;
}
.owner-settings-upload-card.owner-photo-card .owner-settings-upload-preview{min-height:170px!important;aspect-ratio:1/1!important}
.owner-settings-upload-card.owner-photo-card .owner-settings-avatar{width:100%!important;height:100%!important;max-width:none!important;object-fit:contain!important}
.owner-settings-upload-card.property-cover-card .owner-settings-upload-preview{min-height:0!important;aspect-ratio:16/9!important}
.owner-settings-upload-card.property-cover-card .owner-settings-avatar{width:100%!important;height:100%!important;max-width:none!important;object-fit:cover!important;border-radius:0!important}
.owner-settings-upload-card.property-cover-card .v304-new-preview{height:auto!important;aspect-ratio:16/9!important;object-fit:cover!important}
.owner-settings-upload-card.owner-photo-card .v304-new-preview{height:auto!important;aspect-ratio:1/1!important;object-fit:contain!important}
@media(max-width:650px){
  .owner-settings-upload-card{padding:14px!important;gap:10px!important}
  .owner-settings-upload-card .owner-upload-guidance{order:2!important}
  .owner-settings-upload-card .owner-settings-upload-preview,
  .owner-settings-upload-card .v304-new-preview{order:3!important}
  .owner-settings-upload-card .owner-upload-control{order:4!important}
  .owner-settings-upload-card>button{order:5!important}
  .owner-settings-upload-card>div:not(.owner-settings-upload-preview):not(.owner-upload-guidance){order:1!important}
}

/* --------------------------------------------------------------------------
   Front Desk check-in drawer: remove the large empty header zone while keeping
   the close action and sticky submit controls accessible.
   -------------------------------------------------------------------------- */
@media(max-width:700px){
  body.app-frontdesk #fd-checkin-dialog[open],body.app-frontdesk #fd-checkin-dialog[data-fd-autoshow]{padding:0!important;background:#f7f9fc!important}
  body.app-frontdesk #fd-checkin-dialog .fd-dialog-head{
    position:sticky!important;top:0!important;z-index:8!important;
    min-height:64px!important;margin:0!important;padding:13px 15px!important;
    border-bottom:1px solid #e2eaf5!important;background:rgba(255,255,255,.97)!important;
    backdrop-filter:blur(12px)!important;
  }
  body.app-frontdesk #fd-checkin-dialog .fd-dialog-head h2{margin:2px 0 0!important;font-size:20px!important}
  body.app-frontdesk #fd-checkin-dialog .fd-dialog-head .section-kicker{font-size:9px!important}
  body.app-frontdesk #fd-checkin-dialog>form,
  body.app-frontdesk #fd-checkin-dialog>[data-fd-checkin-error],
  body.app-frontdesk #fd-checkin-dialog>.fd-empty{margin-left:13px!important;margin-right:13px!important}
  body.app-frontdesk #fd-checkin-dialog .fd-form-grid{gap:10px!important;padding-top:11px!important}
  body.app-frontdesk #fd-checkin-dialog .fd-dialog-actions{
    bottom:0!important;margin:0 -13px -13px!important;padding:10px 13px calc(10px + env(safe-area-inset-bottom))!important;
    border-top:1px solid #e2eaf5!important;background:rgba(255,255,255,.98)!important;
  }
}

/* --------------------------------------------------------------------------
   Property-first receipts. PM24 logo remains unchanged, while the owner's
   business name becomes the main visual identity and PM24 becomes the platform
   attribution in the footer.
   -------------------------------------------------------------------------- */
.booking-receipt-page .receipt-brand,
.frontdesk-receipt .frontdesk-receipt-brand{align-items:center!important;gap:13px!important;min-width:0!important}
.pm24-property-receipt-brand{display:grid!important;gap:2px!important;min-width:0!important}
.pm24-property-receipt-brand h1,
.pm24-property-receipt-brand b{
  margin:0!important;color:#0d2b5f!important;font-size:clamp(20px,3vw,28px)!important;
  line-height:1.08!important;letter-spacing:-.035em!important;overflow-wrap:anywhere!important;
}
.pm24-property-receipt-brand p{margin:0!important;color:#5f718a!important;font-size:11px!important;line-height:1.35!important}
.pm24-property-receipt-brand small{
  display:inline-flex!important;width:max-content!important;max-width:100%!important;margin-top:3px!important;
  padding:4px 7px!important;border-radius:999px!important;background:#edf5ff!important;color:#1764c8!important;
  font-size:8.5px!important;font-weight:900!important;letter-spacing:.04em!important;text-transform:uppercase!important;
}
.booking-receipt-page .receipt-property .pm24-business-contact{display:grid!important;gap:3px!important}
.booking-receipt-page footer .pm24-powered,
.frontdesk-receipt footer .pm24-powered{font-weight:900!important;color:#195fc1!important}
@media(max-width:650px){
  .booking-receipt-page .receipt-paper>header,
  .frontdesk-receipt .frontdesk-receipt-top{align-items:flex-start!important;gap:12px!important}
  .pm24-property-receipt-brand h1,.pm24-property-receipt-brand b{font-size:20px!important}
}
@media print{
  .pm24-property-receipt-brand h1,.pm24-property-receipt-brand b{font-size:22px!important}
  .pm24-property-receipt-brand small{background:#eef4fb!important;color:#164f9c!important}
}

/* Small premium finishing touches scoped to the Lodge owner workspace. */
body.owner-shell-page .btn{transition:transform .16s ease,box-shadow .16s ease,filter .16s ease}
body.owner-shell-page .btn:not(:disabled):active{transform:translateY(1px) scale(.99)}
body.owner-shell-page input:focus,body.owner-shell-page select:focus,body.owner-shell-page textarea:focus{
  border-color:#5aa2f6!important;box-shadow:0 0 0 4px rgba(20,120,242,.10)!important;outline:0!important;
}
