/* Shared media tools, private repair photos and invoice presentation. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.media-page{max-width:1550px;margin:auto}.media-page h1{letter-spacing:-1.1px}.media-overview{display:flex;align-items:center;gap:40px;margin:0 0 24px;padding:24px 28px;border:1px solid #e1e6ed;background:#fff;border-radius:16px}.media-overview>div{display:flex;flex-direction:column;gap:4px}.media-overview strong{font:800 25px Manrope,Arial,sans-serif;color:#172332}.media-overview span{font-size:12px;color:#657084}.media-overview p{margin-left:auto;max-width:300px;font-size:13px;color:#657084}.media-workspace{padding:24px!important}.media-dropzone{display:flex;align-items:center;justify-content:center;gap:18px;min-height:116px;border:1px dashed #b9c6d6;border-radius:12px;background:#f8fafc;cursor:pointer;transition:.2s}.media-dropzone:hover,.media-dropzone.dragging{background:#fff5eb;border-color:#e8792f}.media-dropzone strong,.media-dropzone small{display:block}.media-dropzone strong{font-size:16px;color:#26364b}.media-dropzone small{font-size:12px;color:#69778b;margin-top:5px}.media-upload-icon{width:44px;height:44px;display:grid;place-items:center;background:#fff;border:1px solid #e1e6ed;border-radius:12px;font-size:26px;color:#d36118}.media-toolbar{display:flex;align-items:center;gap:10px;margin:22px 0 14px;flex-wrap:wrap}.media-toolbar label{margin:0}.media-toolbar input,.media-toolbar select{min-height:42px;margin:0;font-size:13px}.media-search{flex:1;min-width:210px}.media-view-buttons{display:flex;border:1px solid #dbe2ea;border-radius:9px;overflow:hidden}.media-view-buttons button{padding:10px 12px;background:#fff;border:0;color:#68768b;font:600 12px inherit;cursor:pointer}.media-view-buttons .is-active{background:#1c2a3b;color:#fff}.media-selection-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #e6eaf0;padding:0 0 12px;margin-bottom:20px;flex-wrap:wrap}.media-tabs{display:flex;gap:5px}.media-tabs button{border:0;border-radius:8px;padding:9px 13px;font:700 13px inherit;background:none;color:#69768b;cursor:pointer}.media-tabs .is-active{background:#fff1e5;color:#a7480b}.media-bulk{display:flex;align-items:center;gap:14px}.media-bulk label{display:flex;align-items:center;gap:8px;font-size:12px;margin:0}.media-bulk input,.media-select input{width:17px;height:17px;margin:0;accent-color:#e97525}.media-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;min-height:170px}.media-tile{border:1px solid #e2e7ed;border-radius:12px;overflow:hidden;position:relative;background:#fff;min-width:0;transition:box-shadow .15s}.media-tile:hover{box-shadow:0 6px 22px #152a4210}.media-tile.is-selected{outline:2px solid #ea7c31}.media-tile-open{border:0;padding:0;width:100%;height:100%;background:transparent;text-align:left;cursor:pointer;color:#172332;display:flex;flex-direction:column}.media-thumb{height:162px;width:100%;background:#eef2f6;display:flex;justify-content:center;align-items:center;overflow:hidden}.media-thumb img{width:100%;height:100%;object-fit:cover}.media-file-symbol{font:800 28px Manrope,Arial,sans-serif;color:#8491a2;letter-spacing:1px}.media-tile-text{padding:14px;display:block;width:100%;box-sizing:border-box}.media-tile-text strong,.media-tile-text small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.media-tile-text strong{font-size:13px;line-height:1.5}.media-tile-text small{font-size:11px;color:#7b8798;margin-top:3px}.media-tile-text>span{font-size:10px;color:#7b8798;display:block;margin-top:6px}.media-select{position:absolute;top:9px;left:9px;z-index:1;display:grid!important;place-items:center;padding:5px!important;background:#ffffffec;border-radius:6px;cursor:pointer;margin:0!important}.media-list{grid-template-columns:1fr;gap:8px}.media-list .media-tile-open{display:flex;flex-direction:row;align-items:center;padding-left:44px}.media-list .media-thumb{width:74px;min-width:74px;height:70px}.media-list .media-select{top:26px;left:10px}.media-list .media-tile-text{min-width:0}.media-list .media-tile-text>span{margin-top:1px}.media-empty{grid-column:1/-1;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:200px;text-align:center;color:#748198}.media-empty strong{font-size:18px;color:#2c3c53}.media-empty p{font-size:13px;margin:7px 0}.media-pagination{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:22px;color:#788497;font-size:12px}.media-pagination>div{display:flex;gap:8px}.media-feedback{font-size:13px;line-height:1.6;color:#875018;overflow-wrap:anywhere}.media-feedback:not(:empty){padding:12px;background:#fff5e7;margin:16px 0;border-radius:8px}.media-progress{padding:16px 0;font-size:12px;color:#65758a}.media-progress progress{width:100%;height:8px;accent-color:#e97525;display:block;margin-bottom:5px}.media-import-note{display:flex;align-items:center;justify-content:space-between;gap:20px;color:#728197;font-size:13px}.media-dialog{width:min(1080px,calc(100vw - 40px));max-height:90vh;margin:auto;padding:0;border:0;border-radius:18px;background:#fff;color:#192738;box-shadow:0 30px 110px #05101f55;overflow:auto;font-family:Overpass,Arial,sans-serif}.media-dialog::backdrop,.photo-lightbox::backdrop{background:#0e1a2ad9;backdrop-filter:blur(4px)}.media-dialog-head{display:flex;align-items:center;justify-content:space-between;padding:23px 28px;border-bottom:1px solid #e5eaf0}.media-dialog-head small{font-size:11px;text-transform:uppercase;letter-spacing:1px;color:#c2682d;font-weight:700}.media-dialog-head h2{margin:3px 0 0;font-size:23px}.media-dialog-head>button,.photo-lightbox-head>button{border:0;border-radius:50%;width:36px;height:36px;background:#f1f4f7;font-size:25px;color:#5d6e82;cursor:pointer}.media-detail-layout{display:grid;grid-template-columns:1.15fr 1fr;min-height:510px}.media-large-preview{min-width:0;background:#edf1f5;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:26px;gap:20px}.media-large-preview img,.media-large-preview video{width:100%;max-height:440px;object-fit:contain}.media-details-form{padding:24px;min-width:0}.media-details-form label{display:block;margin-bottom:14px;font-size:12px;font-weight:700}.media-details-form input,.media-details-form textarea{display:block;box-sizing:border-box;width:100%;padding:10px 12px;border:1px solid #dce3ec;border-radius:8px;margin-top:6px;font:400 14px Overpass,Arial,sans-serif}.media-details-form small{display:block;font-weight:400;color:#78859a;font-size:11px;margin-top:5px}.media-details-form label[hidden]{display:none}.media-file-meta{display:flex;flex-direction:column;gap:5px;padding-bottom:18px;margin-bottom:17px;border-bottom:1px solid #e7ebf0;overflow-wrap:anywhere;font-size:12px;color:#748398}.media-file-meta strong{color:#24364f}.media-details-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.media-dialog-status{font-size:13px;color:#94612a;min-height:18px}.media-picker-body{padding:24px}.media-picker .media-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.media-picker .media-toolbar{margin-top:0}.media-choose-button{margin:7px 0 0!important;width:max-content;max-width:100%}
.booking-photos-section{scroll-margin-top:90px}.booking-photos-section .card-head{align-items:flex-start;gap:12px}.booking-photos-section .card-head p{max-width:550px}.booking-photo-upload{padding:20px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;margin:18px 0 24px}.photo-upload-field input{padding:12px;background:#fff!important;margin:8px 0}.photo-upload-field small,.booking-photo-upload>small{font-size:11px;color:#75839a}.photo-upload-actions{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:14px 0}.photo-upload-actions .check-row{margin:0;font-size:13px;display:flex;align-items:center;gap:8px}.photo-upload-actions input[type=checkbox],.photo-edit input[type=checkbox]{width:16px;height:16px;margin:0}.photo-selection-preview{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:15px}.photo-selection-preview:empty{display:none}.photo-selection-preview figure{margin:0;width:86px}.photo-selection-preview img{width:86px;height:68px;object-fit:cover;border-radius:7px}.photo-selection-preview figcaption{font-size:10px;color:#8190a4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.booking-photo-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.booking-photo-card{min-width:0;border:1px solid #e1e7ef;border-radius:12px;overflow:hidden;background:#fff}.booking-photo-card>a{display:block;position:relative;background:#edf1f5}.booking-photo-card>a>img{display:block;width:100%;height:205px;object-fit:cover}.photo-enlarge{position:absolute;bottom:12px;right:12px;padding:5px 10px;border-radius:6px;background:#142135dd;color:#fff;font-size:11px;font-weight:600}.booking-photo-info{padding:17px}.booking-photo-info h3{font-size:16px;line-height:1.5;margin:9px 0 7px;overflow-wrap:anywhere}.booking-photo-info p{font-size:13px;line-height:1.65;color:#65768d;overflow-wrap:anywhere;margin:0 0 12px;white-space:normal}.booking-photo-info>small{font-size:11px;color:#8995a7}.photo-download{display:block;font-size:12px;font-weight:700;margin-top:12px}.photo-edit{border-top:1px solid #e7ecf2;margin-top:15px;padding-top:12px}.photo-edit summary{font-size:12px;font-weight:700;cursor:pointer;color:#54677f}.photo-edit form{padding-top:15px}.photo-edit .check-row{display:flex;gap:8px;align-items:center}.photo-empty{padding:30px;text-align:center;background:#f9fafb;border:1px dashed #d7e0eb;border-radius:12px}.photo-empty strong{font-size:16px;color:#44576e}.photo-empty p{color:#8390a3;font-size:13px;margin:8px 0 0}.photo-notification-warning{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:12px 16px;background:#fff4df;color:#926328;border-radius:10px;margin-bottom:20px}.photo-notification-warning p{font-size:12px;margin:0}.photo-lightbox{border:0;background:#fff;border-radius:16px;padding:0;width:min(1050px,calc(100vw - 24px));max-height:94vh;margin:auto;overflow:auto}.photo-lightbox-head{padding:12px 20px;display:flex;justify-content:space-between;align-items:center;font-size:12px;font-weight:700;color:#78869b}.photo-lightbox-image{height:min(64vh,680px);background:#142030;overflow:auto;text-align:center}.photo-lightbox-image img{width:100%;height:100%;object-fit:contain}.photo-lightbox-footer{padding:20px;display:flex;gap:20px;align-items:center}.photo-lightbox-footer>div{flex:1;min-width:0}.photo-lightbox-footer h2{margin:0 0 6px;font-size:20px;overflow-wrap:anywhere}.photo-lightbox-footer p{font-size:13px;color:#718096;white-space:pre-wrap;overflow-wrap:anywhere}.photo-lightbox-footer a{font-size:12px;font-weight:700}.photo-lightbox-footer button{flex-shrink:0}.photo-lightbox-footer button[hidden]{display:none}
@media(min-width:1650px){.media-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.media-list{grid-template-columns:1fr}}
@media(max-width:1200px){.media-grid,.media-picker .media-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.media-list{grid-template-columns:1fr}.media-toolbar{gap:8px}.media-overview{gap:25px}}
@media(max-width:700px){.media-overview{flex-wrap:wrap;padding:20px;gap:20px 36px}.media-overview p{margin:0;max-width:none;flex-basis:100%}.media-workspace{padding:16px!important}.media-dropzone{padding:16px;text-align:left}.media-upload-icon{flex-shrink:0}.media-toolbar label{min-width:0;flex:1}.media-toolbar .media-search{flex-basis:100%}.media-toolbar input,.media-toolbar select{width:100%}.media-grid,.media-picker .media-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.media-list{grid-template-columns:1fr}.media-thumb{height:125px}.media-tile-text{padding:10px}.media-selection-row{align-items:flex-start}.media-bulk{gap:8px}.media-bulk label{font-size:11px}.media-import-note{flex-direction:column;align-items:flex-start;gap:0}.media-dialog{width:calc(100vw - 20px)}.media-detail-layout{grid-template-columns:1fr}.media-large-preview{max-height:240px;padding:16px}.media-large-preview img,.media-large-preview video{max-height:210px}.media-dialog-head{padding:18px}.media-details-form,.media-picker-body{padding:18px}.media-pagination{align-items:flex-start;gap:10px;font-size:11px}.booking-photo-grid{grid-template-columns:1fr}.booking-photo-card>a>img{height:230px}.booking-photo-upload{padding:15px}.photo-upload-actions .btn{width:100%}.photo-notification-warning{flex-direction:column;align-items:flex-start}.photo-lightbox-footer{padding:15px;gap:10px}.photo-lightbox-footer h2{font-size:17px}.photo-lightbox-footer .btn{padding:10px}.booking-photo-upload .form-grid.two{grid-template-columns:1fr}}
.invoice-layout-refined{grid-template-columns:minmax(0,1fr)!important}.invoice-layout-refined>aside{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}.invoice-sheet{background:#fff;border:1px solid #e1e7ed;border-top:5px solid var(--primary,#f97316);border-radius:13px;padding:34px;box-shadow:0 8px 28px #24374f05;min-width:0}.invoice-sheet-head{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:24px;padding-bottom:25px;border-bottom:1px solid #e3e9f0}.invoice-brand-logo{width:auto!important;height:auto!important;max-width:190px!important;max-height:64px!important;object-fit:contain;object-position:left center;display:block;margin-bottom:14px}.invoice-business h2{font-size:16px;margin:0 0 8px;line-height:1.5;overflow-wrap:anywhere}.invoice-business p{font-size:12px;line-height:1.7;color:#748197;margin:5px 0;overflow-wrap:anywhere}.invoice-identity{text-align:right}.invoice-identity>span:first-child{font:800 27px Manrope,Arial,sans-serif;letter-spacing:1px;color:#1e2e44}.invoice-identity h3{font-size:15px;color:#d46b26;margin:7px 0;overflow-wrap:anywhere}.invoice-identity p{font-size:12px;color:#7d8b9e}.invoice-identity>.status{font-size:11px;margin-top:8px}.invoice-parties{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:28px;padding:25px 0}.invoice-section-label{display:block;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:1px;color:#7e8ca1;margin-bottom:10px}.invoice-parties strong{font-size:14px;overflow-wrap:anywhere}.invoice-parties p{font-size:12px;line-height:1.8;color:#748197;overflow-wrap:anywhere;margin:7px 0}.invoice-table-scroll{overflow-x:auto}.invoice-line-table{width:100%;border-collapse:collapse;font-size:12px;min-width:450px}.invoice-line-table th{background:#1b2c42;color:#fff;padding:13px 10px;text-align:right;font-size:10px;font-weight:700;text-transform:uppercase;white-space:nowrap}.invoice-line-table th:first-child{text-align:left}.invoice-line-table th small{display:block;font-size:8px;font-weight:400;color:#b2bccb;text-transform:none;margin-top:2px}.invoice-line-table td{padding:16px 10px;text-align:right;vertical-align:top;border-bottom:1px solid #e8edf3;white-space:nowrap;color:#5f7086}.invoice-line-table td:first-child{width:48%;white-space:normal;text-align:left;color:#25364f;overflow-wrap:anywhere;min-width:170px}.invoice-line-table td:last-child{color:#20324c;font-weight:700}.invoice-line-table tbody tr:nth-child(odd){background:#f8fafc}.invoice-bottom{display:grid;grid-template-columns:1fr 1.1fr;gap:30px;margin-top:28px;align-items:start}.invoice-note p{font-size:11px;color:#8692a4;line-height:1.8;overflow-wrap:anywhere}.invoice-paid-label{font-size:13px;color:#17805f;display:block;margin:18px 0}.invoice-summary-totals{background:#f8fafc;border:1px solid #e7edf4;border-radius:9px;padding:18px;margin:0;min-width:0}.invoice-summary-totals>div{display:flex;justify-content:space-between;gap:10px;font-size:12px;padding:7px 0;color:#748299}.invoice-summary-totals dd{margin:0;color:#2a3c55;font-weight:600;white-space:nowrap;font-variant-numeric:tabular-nums}.invoice-summary-total{font-weight:800}.invoice-summary-balance{border-top:1px solid #dde5ee;margin-top:9px;padding-top:16px!important;align-items:center}.invoice-summary-balance dt{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.5px;color:#344961}.invoice-summary-balance dd{font-size:21px;color:#d56721;letter-spacing:-.5px}.invoice-sheet-footer{border-top:1px solid #e3e9f0;margin-top:28px;padding-top:20px;display:flex;flex-direction:column;gap:5px}.invoice-sheet-footer strong{font-size:12px;color:#465a74}.invoice-sheet-footer span{font-size:11px;color:#91a0b2}
@media(max-width:650px){.invoice-sheet{padding:20px}.invoice-sheet-head{grid-template-columns:1fr;gap:20px}.invoice-identity{text-align:left}.invoice-identity>span:first-child{font-size:22px}.invoice-parties{gap:18px}.invoice-bottom{grid-template-columns:1fr;gap:18px}.invoice-layout-refined>aside{grid-template-columns:1fr}.invoice-brand-logo{max-width:170px!important;max-height:56px!important}}
/* Keep nested booking tools within their grid track on narrow screens. */
.page-booking-edit .work-main,.page-booking-edit .work-side,.page-booking-edit .work-main>.admin-card,.page-booking-edit .work-side>.admin-card{min-width:0}
.page-booking-edit .invoice-table{overflow-x:auto}
.booking-photo-upload input[type=file]{max-width:100%;min-width:0}
.media-thumb img{object-fit:contain}
.media-select input,.media-bulk input,.photo-upload-actions input[type=checkbox],.photo-edit input[type=checkbox]{min-height:0!important;height:17px!important;width:17px!important;padding:0!important}
@media(max-width:900px){.admin-sidebar:not(.open){box-shadow:none}}
@media(max-width:700px){.media-toolbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.media-toolbar .media-search{grid-column:1/-1}.media-view-buttons{justify-content:stretch}.media-view-buttons button{flex:1}.media-page .media-toolbar label{width:100%}}
.portal-shell>*,.portal-content,.portal-sidebar,.booking-detail-grid>*,.invoice-layout-refined>aside,.invoice-layout-refined>aside>*{min-width:0}
@media(max-width:900px){.portal-sidebar{max-width:100%}.portal-sidebar nav{max-width:100%;overflow-x:auto}}
