/* Unified operational booking sheet — ResaLoisir violet, desktop + mobile.
   Presentation-only: existing booking actions and handlers remain intact. */
#bo-overlay{background:#f4f6fb;color:#171a2b}
#bo-overlay .bo-header{background:#fff;border-bottom:1px solid #e8eaf2;padding:18px 22px}
#bo-overlay .bo-header-title h2{color:#171a2b;letter-spacing:-.025em}
#bo-overlay .bo-header-meta,#bo-overlay .bo-header-ref{color:#7d849c}
#bo-overlay .bo-body{background:#f4f6fb}
#bo-overlay .bo-card{background:#fff;border:1px solid #e7e9f3;border-radius:16px;box-shadow:0 4px 16px rgba(31,34,66,.035);margin-bottom:14px}
#bo-overlay .bo-card h4{color:#171a2b}
#bo-overlay .bo-nav-btn{border-radius:10px}
#bo-overlay .bo-row-action-btn,#bo-overlay .bo-nav-btn{transition:background-color .15s,border-color .15s,transform .15s}
#bo-overlay .bo-row-action-btn:focus-visible,#bo-overlay .bo-nav-btn:focus-visible,#bo-overlay button:focus-visible{outline:3px solid #a99afc;outline-offset:2px}
#bo-overlay #bo-sec-client-photos{border:1px solid #e2ddff;background:linear-gradient(140deg,#fff 60%,#faf9ff)}
#bo-overlay #bo-sec-client-photos h4{margin:0 0 8px}
#bo-overlay #bo-sec-client-photos .bo-client-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:14px}
#bo-overlay #bo-sec-client-photos [data-photo-action]{background:#6d50f5;border:1px solid #6d50f5;color:#fff;border-radius:10px;padding:11px 14px;font-weight:700;cursor:pointer;min-height:42px}
#bo-overlay #bo-sec-client-photos [data-photo-action="open"]{background:#fff;color:#6246e8;border-color:#d7ceff}
#bo-overlay #bo-sec-client-photos [data-photo-action]:hover{filter:brightness(.97)}
#bo-overlay #bo-sec-client-photos [data-photo-action]:disabled{opacity:.55;cursor:wait}
#bo-overlay #bo-sec-client-photos [data-photo-feedback]{overflow-wrap:anywhere}
@media(max-width:720px){
 #bo-overlay .bo-header{padding:12px 14px}
 #bo-overlay .bo-header-title h2{font-size:18px;line-height:1.25}
 #bo-overlay .bo-body{padding:12px}
 #bo-overlay .bo-card{border-radius:13px;padding:14px}
 #bo-overlay #bo-sec-client-photos .bo-client-actions{flex-direction:column}
 #bo-overlay #bo-sec-client-photos [data-photo-action]{width:100%;min-height:46px}
}


/* Unified booking drawer v5 — deterministic full-width layout.
   Keep existing HTML, API handlers, and contract/photo extensions. */
#bo-overlay.bo-overlay{
 position:fixed!important;inset:0 0 0 auto!important;
 width:min(1100px,calc(100vw - 140px))!important;
 max-width:none!important;height:100dvh!important;
 display:flex!important;flex-direction:column!important;
 background:#f5f6fc!important;z-index:9999!important;
 border-left:1px solid #e3e5ef;box-shadow:-20px 0 70px rgba(18,24,49,.22);
 overflow:hidden!important;
}
#bo-overlay .bo-header{
 flex:0 0 auto!important;display:flex!important;align-items:center!important;
 gap:16px;padding:19px 24px!important;
 background:#fff!important;border-bottom:1px solid #e7e8f2!important;
}
#bo-overlay .bo-header-title{flex:1;min-width:0}
#bo-overlay .bo-header-title h2{font-size:23px!important;font-weight:800!important;color:#151936!important;margin:0 0 5px!important}
#bo-overlay .bo-header-meta{color:#525b7b;font-size:13px;line-height:1.5}
#bo-overlay .bo-header-ref{color:#7561e6;font-size:11px;font-weight:700}
#bo-overlay #bo-body.bo-body{
 flex:1 1 auto!important;min-height:0!important;
 display:grid!important;
 grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
 grid-auto-flow:row!important;grid-auto-rows:max-content!important;
 align-content:start!important;align-items:start!important;
 gap:14px!important;
 padding:18px 22px 120px!important;
 overflow-x:hidden!important;overflow-y:auto!important;
 width:100%!important;max-width:none!important;
 box-sizing:border-box!important;
 background:#f5f6fc!important;
}
#bo-overlay #bo-body.bo-body > *{min-width:0!important;max-width:none!important;box-sizing:border-box!important}
#bo-overlay #bo-body.bo-body > .bo-card{
 width:100%!important;min-width:0!important;max-width:none!important;
 margin:0!important;position:static!important;float:none!important;
 background:#fff!important;border:1px solid #e6e8f2!important;
 border-radius:13px!important;padding:17px!important;
 box-shadow:0 3px 14px rgba(19,27,55,.045)!important;
}
#bo-overlay .bo-card h4{font-size:15px!important;font-weight:800!important;color:#151b39!important;margin:0 0 12px!important}
#bo-overlay #bo-body.bo-body > .bo-nav{
 grid-column:1/-1!important;grid-row:auto!important;order:-10!important;
 width:100%!important;display:flex!important;gap:8px;
 overflow-x:auto;white-space:nowrap;position:sticky;top:-18px;
 z-index:5;background:#f5f6fc!important;padding:4px 0 12px!important;
}
#bo-overlay .bo-nav-btn{
 flex:0 0 auto!important;min-height:42px!important;padding:10px 13px!important;
 border:1px solid #e3e3f0!important;border-radius:9px!important;
 background:#fff!important;color:#354063!important;font-weight:650!important;
}
#bo-overlay .bo-nav-btn:first-child{background:#ede9ff!important;border-color:#d9d0ff!important;color:#6445e8!important}
#bo-overlay #bo-body.bo-body > .pm-stat-grid{grid-column:1/-1!important;order:-9!important;width:100%!important}
#bo-overlay #bo-body.bo-body > #bo-sec-client{grid-column:1!important;order:0!important}
#bo-overlay #bo-body.bo-body > #bo-sec-payment{grid-column:2!important;order:1!important}
#bo-overlay #bo-body.bo-body > #bo-sec-participants{grid-column:1!important;order:2!important}
#bo-overlay #bo-body.bo-body > #bo-sec-contracts{grid-column:2!important;order:3!important}
#bo-overlay #bo-body.bo-body > #bo-sec-vehicles{grid-column:1!important;order:4!important}
#bo-overlay #bo-body.bo-body > #bo-sec-client-photos{grid-column:2!important;order:5!important}
#bo-overlay #bo-body.bo-body > #bo-seminar-panel,
#bo-overlay #bo-body.bo-body > #bo-seminar-toggle,
#bo-overlay #bo-body.bo-body > #bo-sec-sales-origin,
#bo-overlay #bo-body.bo-body > #bo-sec-gift-voucher{grid-column:1/-1!important;order:6!important}
#bo-overlay #bo-body.bo-body > .bo-card:not([id]){grid-column:1/-1!important;order:7!important}
#bo-overlay .bo-client-name{font-size:17px!important;font-weight:800!important}
#bo-overlay .bo-payment-amount-row{padding:6px 0;border-bottom:1px solid #f0f0f6}
#bo-overlay .bo-row-action-btn,#bo-overlay .bo-method-btn{border-radius:9px!important}
#bo-overlay .bo-sticky-bar{background:rgba(255,255,255,.98)!important;border-top:1px solid #e8eaf2!important}
@media(max-width:999px){
 #bo-overlay.bo-overlay{width:min(760px,calc(100vw - 55px))!important}
 #bo-overlay #bo-body.bo-body{grid-template-columns:minmax(0,1fr)!important;padding:14px 15px 115px!important}
 #bo-overlay #bo-body.bo-body > *{grid-column:1/-1!important}
 #bo-overlay #bo-body.bo-body > .bo-nav{top:-14px}
}
@media(max-width:720px){
 #bo-overlay.bo-overlay{inset:0!important;width:100vw!important;height:100dvh!important}
 #bo-overlay .bo-header{padding:13px 15px!important}
 #bo-overlay .bo-header-title h2{font-size:18px!important}
 #bo-overlay #bo-body.bo-body{padding:12px 12px 115px!important}
 #bo-overlay #bo-body.bo-body > .pm-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(prefers-reduced-motion:reduce){#bo-overlay.bo-overlay{animation:none!important}}

/* v6: reference header and booking activity overview */
#bo-overlay .bo-status-line{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:9px}
#bo-overlay .bo-status-pill{display:inline-flex;align-items:center;background:#e9f9ef;color:#11733e;border-radius:999px;padding:5px 12px;font-size:12px;font-weight:800}
#bo-overlay .bo-header-origin{color:#615f85;font-size:12px;font-weight:650}
#bo-overlay #bo-body.bo-body > #bo-sec-activity{grid-column:1/-1!important;order:-8!important}
#bo-overlay .bo-activity-summary-top{display:flex;justify-content:space-between;align-items:flex-start;gap:14px}
#bo-overlay .bo-summary-eyebrow{font-size:10px;letter-spacing:.08em;color:#7263d9;font-weight:800}
#bo-overlay .bo-activity-summary h4{font-size:20px!important;margin:6px 0 0!important}
#bo-overlay .bo-summary-price{font-size:20px;color:#151b39;white-space:nowrap}
#bo-overlay .bo-summary-details{display:flex;flex-wrap:wrap;gap:12px 24px;margin:16px 0;color:#4a5371;font-size:13px}
#bo-overlay .bo-summary-actions{display:flex;flex-wrap:wrap;gap:9px}
#bo-overlay .bo-summary-actions button{min-height:39px}
@media(max-width:720px){#bo-overlay .bo-activity-summary h4{font-size:17px!important}#bo-overlay .bo-summary-price{font-size:17px}}

/* v7: accessible payment history inside the existing payment card */
#bo-overlay #bo-sec-history{scroll-margin-top:70px;margin-top:20px;padding-top:15px;border-top:1px solid #e8eaf4}
#bo-overlay #bo-sec-history h4{font-size:13px!important;margin-bottom:10px!important}
#bo-overlay #bo-body .bo-nav-btn:hover{background:#f0edff!important;color:#6246df!important}

/* v8: approved reference composition. Functional cards remain unchanged. */
#bo-overlay.bo-overlay{width:min(1080px,calc(100vw - 90px))!important}
#bo-overlay .bo-header{min-height:112px!important;padding:22px 30px!important;background:linear-gradient(115deg,#fff 55%,#f2eeff)!important}
#bo-overlay .bo-status-pill{background:#e5f7ec;color:#167547}
#bo-overlay .bo-header-title h2{font-size:26px!important;letter-spacing:-.55px!important}
#bo-overlay #bo-body.bo-body{gap:15px!important;padding:20px 26px 120px!important;grid-template-columns:minmax(0,1.07fr) minmax(0,.93fr)!important}
#bo-overlay #bo-body.bo-body>.pm-stat-grid{display:none!important}
#bo-overlay #bo-body.bo-body>.bo-nav{order:-10!important;padding:0 0 15px!important;top:-20px;box-shadow:0 5px 9px -9px #40446a}
#bo-overlay #bo-body.bo-body>#bo-sec-activity{order:-9!important;grid-column:1/-1!important}
#bo-overlay #bo-body.bo-body>.bo-card:not([id]){grid-column:1/-1!important}
#bo-overlay #bo-body.bo-body>#bo-sec-communications{grid-column:2!important;order:8!important}
#bo-overlay #bo-body.bo-body>#bo-seminar-toggle{order:9!important}
#bo-overlay #bo-body.bo-body>#bo-seminar-panel{order:9!important}
#bo-overlay .bo-activity-summary{padding:23px!important;border-color:#e4defd!important;background:linear-gradient(115deg,#fff 52%,#f7f4ff)!important}
#bo-overlay .bo-activity-summary h4{font-size:22px!important;letter-spacing:-.3px!important}
#bo-overlay .bo-summary-eyebrow{font-size:11px!important;letter-spacing:.11em!important}
#bo-overlay .bo-summary-details{padding:13px 0!important;border-top:1px solid #f0edf8;border-bottom:1px solid #f0edf8;margin:17px 0!important}
#bo-overlay .bo-summary-price{font-size:24px!important;color:#5b3fe1!important}
#bo-overlay .bo-summary-actions button{padding:10px 16px!important;border-radius:9px!important}
#bo-overlay .bo-nav-btn{font-size:13px!important;border:0!important;border-bottom:3px solid transparent!important;border-radius:0!important;background:transparent!important}
#bo-overlay .bo-nav-btn:first-child{color:#6043e5!important;border-bottom-color:#7458ee!important;background:transparent!important}
#bo-overlay .bo-card{scroll-margin-top:72px}
#bo-overlay .bo-communication-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
#bo-overlay .bo-communication-link{display:inline-flex;align-items:center;padding:10px 14px;border:1px solid #dcd5ff;background:#f8f6ff;border-radius:9px;color:#5c42d6;font-weight:700;text-decoration:none;font-size:13px}
#bo-overlay .bo-communication-link:hover{background:#eee9ff}
#bo-overlay .bo-sticky-bar{display:flex;justify-content:flex-end;padding:12px 25px!important}
#bo-overlay .bo-sticky-btn{max-width:340px!important;width:100%!important}
@media(max-width:999px){
 #bo-overlay.bo-overlay{width:min(760px,calc(100vw - 55px))!important}
 #bo-overlay #bo-body.bo-body{grid-template-columns:minmax(0,1fr)!important;padding:15px 17px 115px!important}
 #bo-overlay #bo-body.bo-body>#bo-sec-communications{grid-column:1/-1!important}
}
@media(max-width:720px){
 #bo-overlay.bo-overlay{width:100vw!important}
 #bo-overlay .bo-header{padding:13px 15px!important;min-height:unset!important}
 #bo-overlay .bo-header-title h2{font-size:19px!important}
 #bo-overlay #bo-body.bo-body{padding:12px 12px 110px!important}
 #bo-overlay .bo-activity-summary{padding:16px!important}
 #bo-overlay .bo-activity-summary h4{font-size:18px!important}
 #bo-overlay .bo-sticky-bar{padding:9px 12px!important}
 #bo-overlay .bo-sticky-btn{max-width:none!important}
}

/* v9 — approved ResaLoisir purple for both collection actions */
#bo-overlay #bo-encaisser-btn.bo-encaisser-btn,
#bo-overlay .bo-sticky-bar .bo-sticky-btn.pay,
#bo-overlay .bo-sticky-bar .bo-sticky-btn.pay{
 background:#7052ed!important;border:1px solid #7052ed!important;
 color:#fff!important;box-shadow:0 4px 12px rgba(112,82,237,.18)!important;
}
#bo-overlay #bo-encaisser-btn.bo-encaisser-btn:hover,
#bo-overlay .bo-sticky-bar .bo-sticky-btn:hover{
 background:#5d3cdb!important;border-color:#5d3cdb!important;
}
#bo-overlay #bo-encaisser-btn.bo-encaisser-btn:focus-visible,
#bo-overlay .bo-sticky-bar .bo-sticky-btn:focus-visible{
 outline:3px solid #b9a8ff!important;outline-offset:2px!important;
}

/* v10 — booking controls: active tabs, client editing, single payment CTA */
#bo-overlay .bo-card-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
#bo-overlay .bo-card-title-row h4{margin:0!important}
#bo-overlay .bo-card-title-row button{min-height:34px!important;padding:6px 11px!important}
#bo-overlay #bo-body .bo-nav-btn.bo-nav-active{
 color:#6043e5!important;border-bottom:3px solid #7458ee!important;
 background:transparent!important;font-weight:800!important;
}
#bo-overlay #bo-body .bo-nav-btn:first-child:not(.bo-nav-active){
 color:#354063!important;border-bottom-color:transparent!important;
}
#bo-overlay:has(#bo-encaisser-btn) .bo-sticky-bar{display:none!important}
#bo-overlay #bo-body.bo-body{padding-bottom:45px!important}
@media(max-width:720px){#bo-overlay #bo-body.bo-body{padding-bottom:70px!important}}

/* v12 — approved compact composition: independent columns, no shared tall rows. */
#bo-overlay.bo-overlay{width:min(860px,calc(100vw - 55px))!important}
#bo-overlay #bo-body.bo-body{display:block!important;padding:16px 18px 28px!important;background:#f6f5fb!important}
#bo-overlay #bo-body .pm-stat-grid{display:none!important}
#bo-overlay #bo-body .bo-nav{display:flex!important;position:sticky!important;top:-16px;background:#f6f5fb!important;z-index:5;padding:0 0 12px!important;margin-bottom:12px;overflow-x:auto}
#bo-overlay #bo-body #bo-sec-activity{margin:0 0 12px!important;padding:16px!important;border-radius:12px!important}
#bo-overlay .bo-compact-columns{display:grid;grid-template-columns:minmax(0,1.16fr) minmax(0,1fr);gap:12px;align-items:start}
#bo-overlay .bo-compact-stack{display:flex;flex-direction:column;gap:12px;min-width:0}
#bo-overlay .bo-compact-stack>.bo-card{width:100%!important;min-width:0!important;padding:16px!important;margin:0!important;border:1px solid #e6e3ef!important;border-radius:12px!important;box-shadow:none!important;background:#fff!important}
#bo-overlay .bo-header{min-height:0!important;padding:17px 20px!important;background:#fff!important}
#bo-overlay .bo-header-title h2{font-size:21px!important}
#bo-overlay .bo-activity-summary h4{font-size:18px!important}
#bo-overlay .bo-summary-details{margin:10px 0!important;padding:10px 0!important;gap:8px!important}
#bo-overlay .bo-card h4{font-size:13px!important;margin-bottom:10px!important}
#bo-overlay .bo-activity-summary h4{font-size:18px!important}
#bo-overlay .bo-client-name{font-size:16px!important;margin:8px 0!important}
#bo-overlay .bo-due-banner{font-size:14px;padding:9px 10px;margin-bottom:8px}
#bo-overlay .bo-method-grid{gap:5px!important}
#bo-overlay .bo-method-btn{padding:7px 5px!important;font-size:12px!important;min-height:34px!important}
#bo-overlay .bo-client-actions,#bo-overlay .bo-communication-actions{display:flex!important;flex-direction:row!important;gap:7px!important;flex-wrap:wrap;margin-top:10px!important}
#bo-overlay button,#bo-overlay input,#bo-overlay select,#bo-overlay textarea,#bo-overlay a{max-width:100%;box-sizing:border-box}
#bo-overlay .bo-card p,#bo-overlay .bo-card a,#bo-overlay .bo-card strong{overflow-wrap:anywhere}
#bo-overlay .bo-row-action-btn{white-space:normal!important;min-height:34px!important;padding:7px 10px!important;font-size:12px!important}
#bo-overlay details{border-top:1px solid #eeebf4;padding-top:10px;margin-top:12px}
#bo-overlay summary{color:#625773;font-size:12px;min-height:30px;cursor:pointer}
#bo-overlay details label{display:block;margin:8px 0;font-size:12px}
#bo-overlay .bo-drawer-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#bo-overlay .bo-drawer-fields>*{min-width:0}
#bo-overlay #bo-sec-activity-tools>button{margin-top:10px;width:100%}
#bo-overlay #bo-sec-drawer-payment,#bo-overlay #bo-sec-drawer-documents{margin-top:10px}
#bo-overlay #bo-sec-review-preference{padding-top:8px!important;padding-bottom:8px!important}
#bo-overlay #bo-sec-review-preference details{margin:0;border:0;padding:0}
#bo-overlay #bo-sec-review-preference summary{min-height:34px}
#bo-overlay #bo-sec-review-preference [data-review-reason][hidden]{display:none}
#bo-overlay #bo-sec-participants details,#bo-overlay #bo-sec-dossier details{margin:0;border:0;padding:0}
#bo-overlay .bo-vehicle-row,#bo-overlay .bo-contract-row{flex-wrap:wrap;gap:8px}
#bo-overlay .bo-contract-row>*{min-width:0}
@media(max-width:600px){#bo-overlay.bo-overlay{width:100vw!important}#bo-overlay .bo-compact-columns{grid-template-columns:minmax(0,1fr)}#bo-overlay #bo-body.bo-body{padding:12px 12px 28px!important}#bo-overlay .bo-drawer-fields{grid-template-columns:minmax(0,1fr)}#bo-overlay .field-input{font-size:16px!important}}
@media(pointer:coarse){#bo-overlay .bo-row-action-btn,#bo-overlay summary{min-height:44px!important}}
#bo-overlay .bo-contract-row>div:last-child{flex-wrap:wrap;flex-shrink:1!important;max-width:100%}
#bo-overlay #bo-sec-contracts .bo-contract-row>div:last-child{width:100%}
#bo-overlay .bo-drawer-labels{display:flex;gap:6px;flex-wrap:wrap;margin-top:7px}
#bo-overlay .bo-drawer-labels span{background:#eee8ff;color:#7052ed;font-size:11px;padding:3px 8px;border-radius:12px}

/* One opt-in switch sends one message with its invoice attachment. */
#bo-overlay .bo-payment-email-toggle{display:flex;align-items:center;gap:12px;padding:14px 0;cursor:pointer;line-height:1.45}
#bo-overlay .bo-payment-email-toggle small{display:block;color:#64748b;overflow-wrap:anywhere}
#bo-overlay #bo-payment-email{appearance:none;-webkit-appearance:none;position:relative;width:48px;height:28px;min-width:48px;border:0;border-radius:20px;background:#cbd5e1;cursor:pointer;transition:background .15s}
#bo-overlay #bo-payment-email:before{content:"";position:absolute;width:22px;height:22px;left:3px;top:3px;border-radius:50%;background:white;box-shadow:0 1px 3px #0003;transition:transform .15s}
#bo-overlay #bo-payment-email:checked{background:#7052ed}
#bo-overlay #bo-payment-email:checked:before{transform:translateX(20px)}
#bo-overlay #bo-payment-email:focus-visible{outline:3px solid #b9a8ff;outline-offset:3px}
#bo-overlay #bo-payment-email:disabled{opacity:.5;cursor:default}
#bo-overlay #bo-sec-adjustments{border-top:1px solid #e8e5f1;margin-top:16px;padding-top:16px}
#bo-overlay #bo-sec-adjustments label:not([hidden]){display:block;margin:12px 0}

/* Dashboard shortcuts retain native button keyboard and touch behavior. */
.dash-stat-action{position:relative;width:100%;text-align:left;border:1px solid transparent;font:inherit;color:inherit;cursor:pointer;padding-right:38px}
.dash-stat-action:hover{border-color:#7052ed;box-shadow:0 5px 18px #7052ed1a}
.dash-stat-action:focus-visible,.dash-shortcut-row:focus-visible{outline:3px solid #7052ed;outline-offset:3px}
.dash-stat-arrow{position:absolute;right:16px;top:50%;transform:translateY(-50%);font-size:28px;color:#7052ed}
.dash-shortcut-heading,.dash-filter-notice{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.dash-shortcut-heading h2{margin-bottom:4px}
.dash-shortcut-list{display:grid;gap:12px}
.dash-shortcut-row{display:flex;width:100%;justify-content:space-between;align-items:center;gap:16px;padding:18px;background:#fff;border:1px solid #e4e4ef;border-radius:14px;text-align:left;font:inherit;color:inherit;cursor:pointer;min-height:64px}
.dash-shortcut-row>span:first-child{display:grid;gap:6px;min-width:0;overflow-wrap:anywhere}
.dash-shortcut-row>span:last-child{font-size:28px;color:#7052ed}
.dash-filter-notice{background:#f3f0ff;border-radius:12px;padding:12px;margin-bottom:14px}
@media(max-width:600px){.dash-shortcut-heading .btn{width:100%;min-height:44px}.dash-stat-action{min-height:96px}}
