/* The selected mode applies to public pages, every portal, dialogs, and calendars. */
:root[data-theme=light]{--ink:#121923;--muted:#586577;--line:#dce3ec;--canvas:#f4f6f9;--theme-surface:#fff;--theme-soft:#edf2f8;--theme-text:#121923;--theme-muted:#586577;--theme-border:#dce3ec;background:#fff;color-scheme:light}
:root[data-theme=dark]{--ink:#e8edf5;--muted:#a7b4c8;--line:#303c50;--canvas:#0b101a;--theme-surface:#141d2b;--theme-soft:#1c2a3e;--theme-text:#e8edf5;--theme-muted:#a7b4c8;--theme-border:#303c50;background:#0b101a;color-scheme:dark;--shadow:0 16px 50px #0004}
[data-theme] body{background:var(--canvas);color:var(--theme-text)}
.demo-bar .theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid currentColor;border-radius:6px;padding:5px 9px;min-height:32px;white-space:nowrap}
.theme-toggle svg{height:16px;width:16px;flex:none}
[data-theme] .demo-bar{background:var(--theme-surface);color:var(--theme-muted);border-color:var(--theme-border)}
[data-theme] .demo-bar button{color:inherit}
[data-theme] .demo-tabs a.active{background:#007cff;color:#fff}
[data-theme] .ace-public{--ink:var(--theme-text);--muted:var(--theme-muted);--line:var(--theme-border);--canvas:var(--theme-surface);background:var(--canvas);color:var(--theme-text)}
[data-theme=light] .ace-public .site-head:not(.over){background:#fff;color:#121923;border-color:var(--theme-border)}
[data-theme=light] .ace-public .site-head:not(.over) .brand-logo,[data-theme=light] .sidebar .brand-logo{background:#080b12;padding:5px 8px}
[data-theme=light] .ace-public .section-light,[data-theme=light] .ace-public .city-card,[data-theme=light] .ace-public .owner-banner{background:#eaf0f8;color:#121923}
[data-theme=light] .ace-public .ace-service{background:#fff;border-color:var(--theme-border)}
[data-theme=light] .ace-public .ace-service p,[data-theme=light] .ace-public .ace-company-copy p,[data-theme=light] .ace-public .service-card p,[data-theme=light] .ace-public .owner-banner p{color:var(--theme-muted)}
[data-theme=light] .ace-public .page-intro{background:#edf2f8;color:#121923;border-color:var(--theme-border)}
[data-theme=light] .ace-public .filter{background:#fff;color:#334155;border-color:var(--theme-border)}
[data-theme=light] .ace-public .filter.active{background:#007cff;color:#fff}
[data-theme=light] .ace-public .process .step-num,[data-theme=light] .ace-public .service-card{border-color:var(--theme-border)}
[data-theme=light] .ace-public .btn.secondary,[data-theme=light] .ace-public .btn.ghost{color:#121923;border-color:#8090a6}
[data-theme=light] .ace-public .ace-hero{color:#fff}
[data-theme=light] .ace-public .ace-hero .btn.ghost{color:#fff;border-color:#b5bdca}
[data-theme=light] .ace-public .coming-cities a{color:#121923}
[data-theme=light] .ace-public .footer{color:#e8edf5}
[data-theme=light] .sidebar{background:#fff;color:#121923;border-color:var(--theme-border)}
[data-theme=light] .sidebar .side-nav a{color:#4e5e73}
[data-theme=light] .sidebar .side-nav a.active{color:#0065d4;background:#e8f2ff;border-color:#b9d6ff}
[data-theme] .portal{background:var(--canvas)}
[data-theme] .portal-top,[data-theme] .panel,[data-theme] .stat-card,[data-theme] .car-card,[data-theme] dialog{background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-border)}
[data-theme] .ace-public .panel,[data-theme] .ace-public dialog,[data-theme] .ace-public .car-card{--ink:var(--theme-text);--muted:var(--theme-muted);--line:var(--theme-border);color:var(--theme-text);background:var(--theme-surface)}
[data-theme] .ace-public .panel h3,[data-theme] .ace-public dialog h2,[data-theme] .ace-public dialog .icon-button{color:var(--theme-text)}
[data-theme] input,[data-theme] select,[data-theme] textarea,[data-theme] .select-small,[data-theme] .ace-date-trigger{background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-border)}
[data-theme] .search-panel,[data-theme] .ace-public .search-panel{background:var(--theme-surface);color:var(--theme-text);--ink:var(--theme-text);--muted:var(--theme-muted);--line:var(--theme-border)}
[data-theme] .search-panel .ace-date-trigger{background:var(--theme-surface);color:var(--theme-text)}
[data-theme] input:disabled,[data-theme] .ace-date-trigger:disabled{background:var(--theme-soft);color:var(--theme-muted)}
[data-theme] .btn.secondary,[data-theme] .ace-public .panel .btn.secondary,[data-theme] .ace-public dialog .btn.secondary{background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-border)}
[data-theme] .data-table th,[data-theme] .crm-contract,[data-theme] .op-welcome,[data-theme] .hq-intro,[data-theme] .info-box{background:var(--theme-soft);color:var(--theme-text);border-color:var(--theme-border)}
[data-theme] .data-table td,[data-theme] .data-table th,[data-theme] .modal-head,[data-theme] .costs>div,[data-theme] .hq-extras{border-color:var(--theme-border)}
[data-theme] .data-table td,[data-theme] .car-content h3,[data-theme] .ace-public .car-category,[data-theme] .form-field,[data-theme] .check-row,[data-theme] .hq-intro p{color:var(--theme-text)}
[data-theme=dark] .pill.blue,[data-theme=dark] .avatar,[data-theme=dark] .stat-icon{background:#183b65;color:#b4d7ff}
[data-theme=dark] .pill.green{background:#173e32;color:#a9edcd}
[data-theme=dark] .pill.red{background:#4a2531;color:#ffb7c7}
[data-theme=dark] .pill.amber{background:#493820;color:#ffdc9c}
[data-theme=dark] .side-nav a:hover,[data-theme=dark] .request-mini{background:var(--theme-soft)}
[data-theme=dark] .calendar-day,[data-theme=dark] .hq-calendar th,[data-theme=dark] .hq-calendar td,[data-theme=dark] .calendar-week{background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-border)}
[data-theme=dark] .crm-free{background:#193d32;color:#b5edd4}
[data-theme=dark] .crm-booked{background:#193d65;color:#c2dfff}
[data-theme=dark] .crm-blocked{background:#3b2a34;color:#e6bbc9}
[data-theme=dark] dialog.ace-datepicker{--ink:#e8edf5;--muted:#a7b4c8;--line:#303c50;background:#141d2b;color:#e8edf5;border-color:#303c50}
[data-theme=dark] .ace-datepicker button,[data-theme=dark] .ace-datepicker .ace-cal-top h2,[data-theme=dark] .ace-datepicker .ace-cal-month h3{color:#e8edf5}
[data-theme=dark] .ace-datepicker .ace-cal-values button,[data-theme=dark] .ace-cal-footer,[data-theme=dark] .ace-datepicker .ace-cal-month-choices button{background:#141d2b;border-color:#303c50}
[data-theme=dark] .ace-datepicker .ace-cal-segments,[data-theme=dark] .ace-datepicker .ace-cal-year select{background:#1c2a3e;color:#e8edf5}
[data-theme=dark] .ace-datepicker .ace-cal-segments button[aria-selected=true]{background:#33445e}
[data-theme=dark] .ace-cal-values span,[data-theme=dark] .ace-cal-weekdays span,[data-theme=dark] .ace-cal-status{color:#a7b4c8}
[data-theme=dark] .ace-datepicker .ace-cal-day:not(:disabled):hover,[data-theme=dark] .ace-datepicker .ace-cal-icon:hover{background:#33445e}
[data-theme=dark] .ace-cal-cell.in-range{background:#193d65}
[data-theme=dark] .ace-cal-cell.range-start{background:linear-gradient(90deg,transparent 50%,#193d65 50%)}
[data-theme=dark] .ace-cal-cell.range-end{background:linear-gradient(90deg,#193d65 50%,transparent 50%)}
[data-theme=dark] .ace-datepicker .ace-cal-day.selected,[data-theme=dark] .ace-datepicker .ace-cal-save{background:#007cff;color:#fff}
@media(max-width:760px){.demo-bar .theme-toggle{padding:4px 7px;min-width:30px}.theme-toggle span{display:none}}

[data-theme=light] .ace-public .site-head.over{color:#fff}

/* Client reservations and rewards use the selected palette, including their badges. */
:root[data-theme=light]{--theme-accent-soft:#eaf3ff;--theme-accent-text:#155ea9;--theme-accent-border:#b9d6ff}
:root[data-theme=dark]{--theme-accent-soft:#183b65;--theme-accent-text:#b4d7ff;--theme-accent-border:#40618a}
[data-theme] .rental-card,[data-theme] .reward-tier{background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-border)}
[data-theme] .rewards-strip,[data-theme] .reward-tier.current{background:var(--theme-accent-soft);color:var(--theme-accent-text);border-color:var(--theme-accent-border)}
[data-theme] .rewards-strip p,[data-theme] .rewards-strip strong,[data-theme] .rewards-strip>.row,[data-theme] .rewards-strip>span{color:inherit}
[data-theme] .rental-card .muted,[data-theme] .rental-meta,[data-theme] .rental-card .note{color:var(--theme-muted)}
[data-theme] .rewards-strip:focus-visible{outline:3px solid #007cff;outline-offset:3px}

/* Shared client and reservation summaries follow the active theme. */
[data-theme] .summary-checks>div{background:var(--theme-soft);color:var(--theme-text)}
[data-theme] .summary-checks b{color:var(--theme-text)}

/* Fleet browsing remains inside the client account workspace. */
.client-browse .container{max-width:none;padding:0}
.client-browse .page-intro{background:var(--theme-soft);color:var(--theme-text);padding:28px;border-radius:10px;margin-bottom:24px}
.client-browse .page-intro h1{font-size:clamp(28px,3.3vw,44px)}
.client-browse .section{padding:28px 0}
.client-browse .filter{background:var(--theme-surface);color:var(--theme-muted);border-color:var(--theme-border)}
.client-browse .filter.active{background:var(--theme-accent-soft);color:var(--theme-accent-text);border-color:var(--theme-accent-border)}
.client-browse .booking-page{padding:0;min-height:0}
@media(max-width:1100px){.client-browse .cards{grid-template-columns:repeat(2,minmax(0,1fr))}.client-browse .detail-grid,.client-browse .booking-layout{grid-template-columns:1fr}}
@media(max-width:640px){.client-browse .cards{grid-template-columns:1fr}.client-browse .page-intro{padding:20px}.client-browse .search-panel{grid-template-columns:1fr}}

/* Vehicle-card navigation stays visible on the dark palette. */
[data-theme=dark] .car-go,[data-theme=dark] .ace-public .car-go{background:var(--theme-soft);color:var(--theme-accent-text);border:1px solid var(--theme-border)}
[data-theme=dark] .car-go:hover,[data-theme=dark] .ace-public .car-go:hover{background:var(--theme-accent-soft);border-color:var(--theme-accent-border)}

/* Reservation rewards use the same dark palette as the account rewards cards. */
[data-theme=dark] .reward-checkout{background:var(--theme-accent-soft);color:var(--theme-text);border-color:var(--theme-accent-border)}
[data-theme=dark] .reward-checkout h3,[data-theme=dark] .reward-checkout .form-field{color:var(--theme-text)}
[data-theme=dark] .reward-checkout .note{color:var(--theme-muted)}
[data-theme=dark] .reward-checkout .link-button{color:var(--theme-accent-text)}
[data-theme=dark] .reward-checkout .link-button:hover{color:var(--theme-text)}

/* Reservations fit the workspace; long details wrap rather than widening the table. */
.crm-reservations-wrap{overflow:visible;min-width:0;max-width:100%}
.crm-reservations{table-layout:fixed;width:100%;min-width:0}
.crm-reservations th,.crm-reservations td{white-space:normal;overflow-wrap:anywhere;vertical-align:top;padding:12px 10px}
.crm-reservations th:nth-child(1){width:18%}
.crm-reservations th:nth-child(2){width:25%}
.crm-reservations th:nth-child(3){width:18%}
.crm-reservations th:nth-child(4){width:18%}
.crm-reservations th:nth-child(5){width:11%}
.crm-reservations th:nth-child(6){width:10%}
.crm-reservations .pill,.crm-reservations .btn{white-space:normal;max-width:100%;overflow-wrap:anywhere}
@media(max-width:800px){
 .crm-reservations{display:block}
 .crm-reservations thead{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .crm-reservations tbody{display:grid;gap:14px}
 .crm-reservations tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid var(--theme-border);border-radius:8px;padding:8px;background:var(--theme-surface)}
 .crm-reservations td{display:flex;flex-direction:column;align-items:flex-start;min-width:0;padding:10px;border:0}
 .crm-reservations td:before{content:attr(data-label);font-size:11px;font-weight:600;color:var(--theme-muted);margin-bottom:5px}
 .crm-reservations td:last-child{grid-column:1/-1;align-items:stretch}
 .crm-reservations td:last-child:before{display:none}
 .crm-reservations td[colspan]{grid-column:1/-1}
 .crm-reservations .btn{width:100%}
}

/* Reservation rows and their summary cards highlight in the selected palette. */
.crm-reservations tbody tr[data-crm=open]{cursor:pointer}
.crm-reservations tbody tr[data-crm=open] td,.crm-summary .stat-card{transition:background-color .15s,border-color .15s,box-shadow .15s}
.crm-reservations tbody tr[data-crm=open]:hover,.crm-reservations tbody tr[data-crm=open]:hover td{background:var(--theme-accent-soft);border-color:var(--theme-accent-border)}
.crm-reservations tbody tr[data-crm=open]:focus-visible{outline:2px solid var(--theme-accent-text);outline-offset:-2px}
.crm-reservations td:last-child{padding-left:6px;padding-right:6px}
.crm-reservations .btn{white-space:nowrap;overflow-wrap:normal;padding:8px 6px}
.crm-summary .stat-card:hover{background:var(--theme-accent-soft);border-color:var(--theme-accent-border);box-shadow:0 0 0 1px var(--theme-accent-border)}
.crm-summary .stat-card .label,.crm-summary .stat-card .stat-note{color:var(--theme-muted)}
@media(prefers-reduced-motion:reduce){.crm-reservations tbody tr[data-crm=open] td,.crm-summary .stat-card{transition:none}}

/* Vehicle revenue highlights span both columns and follow only the pointer. */
.crm-revenue tbody tr td{transition:background-color .15s,border-color .15s}
.crm-revenue tbody tr:hover,.crm-revenue tbody tr:hover td{background:var(--theme-accent-soft);border-color:var(--theme-accent-border)}
@media(prefers-reduced-motion:reduce){.crm-revenue tbody tr td{transition:none}}

/* Staff reservation intake: tactile controls and a readable review in either theme. */
.crm-filter{border:1px solid var(--theme-border);border-radius:10px;padding:14px;background:var(--theme-surface)}
.crm-filter summary{cursor:pointer;font-weight:600;font-size:15px;line-height:1.5}
.crm-filter .stack{padding-top:14px}
.crm-document{margin:0;min-width:0}
.crm-document h4{margin:0 0 14px}
.crm-document input[type=file]{max-width:100%;font-size:13px}
.crm-fee-row{padding:12px 0;border-bottom:1px solid var(--theme-border);margin-bottom:12px}
.crm-review-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 28px;margin:20px 0}
.crm-review-grid div{min-width:0;border-bottom:1px solid var(--theme-border);padding-bottom:12px}
.crm-review-grid dt{font-size:12px;letter-spacing:.04em;color:var(--theme-muted);margin-bottom:6px}
.crm-review-grid dd{margin:0;font-size:15px;line-height:1.6;color:var(--theme-text);overflow-wrap:anywhere}
.crm-pdf{display:block;width:100%;height:540px;margin:20px 0;border:1px solid var(--theme-border);border-radius:8px;background:#ededed}
@media(max-width:600px){.crm-review-grid{grid-template-columns:1fr}.crm-pdf{height:400px}.crm-fee-row .form-grid{grid-template-columns:1fr}}

/* Keep reservation validation visible inside the dialog in both modes. */
#crm-delivery-address[hidden]{display:none!important}
.crm-form-errors{padding:16px;border:1px solid #bf3945;border-radius:10px;background:var(--theme-soft);color:var(--theme-text)}
.crm-form-errors ul{padding-left:20px;margin:10px 0 0}
.crm-form-errors button{border:0;background:transparent;padding:4px 0;text-align:left;text-decoration:underline;cursor:pointer;color:inherit;font:inherit}
.crm-field-error{display:block;font-size:13px;line-height:1.5;margin-top:6px;color:#b12635;font-weight:600}
[data-theme=dark] .crm-field-error{color:#ffacb7}
[data-crm-form=dates] [aria-invalid=true]{border-color:#bf3945;outline-color:#bf3945}
[data-crm-form=dates] input:disabled{opacity:.55}

.crm-channels{border:1px solid var(--theme-border);border-radius:10px;padding:18px;min-width:0}
.crm-channels legend{font-size:16px;font-weight:600;padding:0 8px;color:var(--theme-text)}
.crm-channel-options{display:flex;flex-wrap:wrap;gap:12px;margin-top:12px}
.crm-channel-options .crm-channel-choice{flex:1;min-width:140px;padding:16px;border:1px solid var(--theme-border);border-radius:8px;background:var(--theme-surface);color:var(--theme-text);font-size:16px;cursor:pointer;margin:0;transition:border-color .15s,box-shadow .15s}
.crm-channel-choice:has(input:checked){border-color:var(--blue);box-shadow:inset 0 0 0 1px var(--blue)}
.crm-channel-choice:focus-within{outline:2px solid var(--blue);outline-offset:3px}
.crm-channel-choice input{width:19px;height:19px;accent-color:var(--blue);flex:none}

/* Keep popup titles and their exit controls visible while dialog content scrolls. */
dialog .modal-head,dialog.ace-datepicker .ace-cal-top{position:sticky;top:0;z-index:20;background:var(--theme-surface,#fff);isolation:isolate;box-shadow:0 1px 0 var(--theme-border,#dce3ec)}
dialog .modal-head h2,dialog.ace-datepicker .ace-cal-top h2{min-width:0;overflow-wrap:anywhere}
dialog .modal-head [data-action=close],dialog.ace-datepicker .ace-cal-top [data-cal=close]{flex:0 0 auto;min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center}
/* Partner fee catalog and invoice selection share the portal's theme surfaces. */
.saved-fee-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:20px;margin:24px 0}
.saved-fee-card{min-width:0;display:flex;flex-direction:column;gap:14px;transition:border-color .18s,box-shadow .18s}
.saved-fee-card:hover{border-color:var(--blue);box-shadow:0 6px 24px rgb(0 0 0 / .08)}
.saved-fee-card h3{font-size:20px;overflow-wrap:anywhere}
.saved-fee-card .hq-actions{margin-top:auto}
.saved-fee-price{font-size:30px;font-weight:600;color:var(--theme-text)}
.saved-fee-price span{font-size:14px;font-weight:400;color:var(--theme-muted)}
.saved-fee-standard{margin-top:38px}
.saved-fee-options{border:1px solid var(--theme-border);border-radius:8px;padding:16px;min-width:0}
.saved-fee-option{display:flex;gap:12px;align-items:center;padding:14px 10px;border-bottom:1px solid var(--theme-border);cursor:pointer;color:var(--theme-text)}
.saved-fee-option:last-child{border-bottom:0}
.saved-fee-option:hover,.saved-fee-option:focus-within{background:var(--theme-soft)}
.saved-fee-option:has(input:checked){background:var(--theme-soft);outline:1px solid var(--blue);outline-offset:-1px}
.saved-fee-option input{flex:none;width:20px;height:20px;accent-color:var(--blue)}
.saved-fee-option span{flex:1;min-width:0;overflow-wrap:anywhere}
.saved-fee-option small{display:block;color:var(--theme-muted);margin-top:4px}
.saved-fee-option:has(input:disabled){opacity:.65;cursor:default}
.saved-fee-option b{white-space:nowrap}
@media(max-width:480px){.saved-fee-option{flex-wrap:wrap}.saved-fee-option b{margin-left:32px}.saved-fee-card .panel-head{flex-wrap:wrap}}
.fleet-vehicle-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:24px;margin:24px 0}
.fleet-vehicle-card{padding:0;overflow:hidden;display:flex;flex-direction:column;min-width:0}
.fleet-vehicle-card>img{width:100%;height:210px;object-fit:cover;background:var(--theme-soft)}
.fleet-vehicle-body{padding:24px;display:flex;flex-direction:column;gap:12px;flex:1}
.fleet-vehicle-body h3{font-size:23px;overflow-wrap:anywhere}
.fleet-vehicle-body .panel-head{flex-wrap:wrap;gap:8px;margin-bottom:0}
.fleet-vehicle-body .hq-actions{margin-top:auto}
.fleet-vehicle-rate{font-size:25px;color:var(--theme-text)}
.fleet-vehicle-rate small{font-size:14px;color:var(--theme-muted)}
.fleet-summary{display:flex;flex-wrap:wrap;gap:16px 28px;margin:22px 0;color:var(--theme-muted)}
.fleet-summary b{color:var(--theme-text);font-size:19px;margin-right:5px}
.fleet-review-callout{display:flex;align-items:center;justify-content:space-between;gap:20px}
.fleet-review-callout p{margin-top:5px}
.fleet-filters{flex-wrap:wrap}
.fleet-visibility{padding:20px;border:1px solid var(--theme-border);border-radius:8px;min-width:0}
.fleet-visibility legend{padding:0 6px;font-weight:600}
.fleet-visibility label{display:flex;gap:14px;align-items:flex-start;padding:14px;border-radius:6px;cursor:pointer}
.fleet-visibility label:has(input:checked){background:var(--theme-soft);outline:1px solid var(--blue)}
.fleet-visibility input{flex:none;width:20px;height:20px;accent-color:var(--blue);margin-top:2px}
.fleet-visibility small{display:block;color:var(--theme-muted);margin-top:6px;line-height:1.6}
.fleet-photo-preview{width:100%;max-height:240px;object-fit:contain;background:var(--theme-soft);border-radius:6px}
.fleet-form-error{padding:15px;border:1px solid var(--blue);background:var(--theme-soft);border-radius:6px;color:var(--theme-text)}
.fleet-form-error[hidden]{display:none}
.fleet-form-error .link-button{margin-top:10px}
.fleet-form-error~* input[aria-invalid=true]{border-color:var(--blue)}
@media(max-width:600px){.fleet-review-callout{align-items:flex-start;flex-direction:column}.fleet-vehicle-body{padding:20px}.fleet-visibility{padding:12px}.fleet-summary{gap:12px 20px}}
.crm-document-warning {border:1px solid var(--theme-warning,#b78637);background:var(--theme-soft);color:var(--theme-text);}
.crm-document-warning strong {color:var(--theme-text);}
.crm-document-preview {display:block;width:100%;max-height:280px;object-fit:contain;background:var(--theme-soft);border-radius:8px;}
.crm-document-pdf {display:block;width:100%;max-height:320px;border:1px solid var(--theme-border);margin-bottom:12px;}
.ace-pdf-viewer {width:100%;max-height:640px;overflow:auto;overscroll-behavior:contain;background:var(--theme-soft);border:1px solid var(--theme-border);padding:16px;margin-top:12px;color:var(--theme-text);}
.ace-pdf-page {background:#fff;color:#171717;box-shadow:0 2px 14px #0002;margin:0 auto 18px;max-width:800px;min-height:100px;}
.ace-pdf-page canvas {display:block;width:100%;height:auto;}
.ace-pdf-viewer > p {margin:0 0 12px;font-size:14px;}
.crm-template-list {display:grid;gap:16px;margin-top:24px;}
.crm-template-card {display:flex;align-items:flex-start;justify-content:space-between;gap:24px;border-top:1px solid var(--theme-border);padding:20px 0;}
.crm-template-card h4 {margin:0 0 8px;font-size:18px;}
.crm-template-card .crm-actions {flex-shrink:0;max-width:380px;flex-wrap:wrap;}
[data-crm-form=template-save] textarea {font-size:15px;line-height:1.65;}
[data-crm-form=finalize] > button[type=submit] {position:sticky;bottom:0;z-index:2;min-height:48px;box-shadow:0 -10px 20px var(--theme-surface);}
@media (max-width:700px) {.crm-template-card {flex-direction:column;gap:12px;}.ace-pdf-viewer {padding:8px;max-height:480px;}}
.reservation-archive-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,350px),1fr));gap:20px;}
.reservation-archive-grid .crm-review-grid{grid-template-columns:1fr 1fr;}
.reservation-archive-grid dd{overflow-wrap:anywhere;}
.reservation-delete-error{padding:14px;border:1px solid var(--theme-border);background:var(--theme-soft);color:var(--theme-text);border-radius:8px;}
.handover-top{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:12px 0 32px;}
.handover-top h1{font-family:Georgia,serif;font-weight:400;font-size:clamp(28px,3vw,42px);line-height:1.2;margin:10px 0;}
.handover-top p{font-size:16px;}
.handover-counts{display:flex;gap:18px;font-size:16px;}
.handover-tabs{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:26px;}
.handover-tabs button{background:var(--theme-surface);color:var(--theme-text);border:1px solid var(--theme-border);padding:12px 18px;font-size:16px;cursor:pointer;box-shadow:0 3px 8px #0001;}
.handover-tabs button.active{background:var(--blue,#1767cf);border-color:var(--blue,#1767cf);color:#fff;}
.handover-queue{display:grid;gap:18px;}
.handover-rental{display:flex;align-items:center;justify-content:space-between;gap:28px;margin:0;}
.handover-rental h3{font-size:24px;margin:12px 0 8px;font-family:Georgia,serif;font-weight:400;}
.handover-rental p{font-size:16px;}
.handover-schedule{display:flex;flex-wrap:wrap;gap:20px;font-size:16px;line-height:1.5;}
.handover-schedule span b{display:block;font-size:14px;color:var(--theme-muted);font-weight:500;margin:8px 0 4px;}
.handover-card-actions{display:flex;gap:10px;flex-direction:column;min-width:200px;}
.handover-checks{display:grid;gap:0;margin:18px 0;}
.handover-checks>div{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid var(--theme-border);font-size:16px;}
.handover-photo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:20px 0;}
.handover-photo-grid img{display:block;width:100%;height:170px;object-fit:cover;border:1px solid var(--theme-border);}
.handover-photo-grid span{display:block;font-size:14px;color:var(--theme-text);overflow-wrap:anywhere;margin-top:8px;}
.handover-photo-grid input{width:100%;}
.handover-fee{display:grid;grid-template-columns:minmax(0,1fr) 130px auto;gap:12px;align-items:end;margin:14px 0;}
.handover-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;background:var(--theme-border);border:1px solid var(--theme-border);margin:22px 0;}
.handover-comparison>div{background:var(--theme-surface);padding:18px;font-size:16px;overflow-wrap:anywhere;}
.handover-comparison strong,.handover-comparison span{display:block;margin-bottom:5px;}
.handover-footer{position:sticky;bottom:0;display:flex;justify-content:space-between;gap:14px;z-index:3;background:var(--theme-surface);border-top:1px solid var(--theme-border);padding:16px 0;margin-top:24px;}
[data-handover-form] .form-field,[data-handover-form] .check-row{font-size:16px;}
[data-handover-form] input,[data-handover-form] select,[data-handover-form] textarea{font-size:16px;}
[data-handover-form] .crm-form-errors{margin-bottom:14px;}
@media(max-width:800px){.handover-top,.handover-rental{align-items:stretch;flex-direction:column;}.handover-card-actions{flex-direction:row;flex-wrap:wrap;}.handover-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.handover-fee{grid-template-columns:minmax(0,1fr) 100px;}.handover-fee .btn{grid-column:1/-1;}}
@media(max-width:430px){.handover-photo-grid,.handover-comparison{grid-template-columns:minmax(0,1fr);}.handover-footer{flex-wrap:wrap;}.handover-checks>div{align-items:flex-start;flex-direction:column;}.handover-schedule{flex-direction:column;gap:8px;}}
.crm-reservations [data-reservation-delete],.crm-reservations [data-reservation-deny]{max-width:100%;white-space:normal;min-width:0;margin-top:6px;}
@media(max-width:600px){.reservation-archive-grid .crm-review-grid{grid-template-columns:1fr;}}

.handover-photo-grid video{display:block;width:100%;height:170px;object-fit:contain;background:#090d15;border:1px solid var(--theme-border)}
.handover-photo-grid>div{min-width:0}.handover-photo-grid a{overflow-wrap:anywhere}
