@media(max-width:760px){
 body.web-desktop{overflow-x:hidden}
 .web-desktop main,.web-desktop #content{min-width:0}
 .web-desktop .calendar-heading{display:flex;flex-direction:column;align-items:stretch;gap:10px}
 .web-desktop .calendar-heading .agenda-columns{gap:8px;max-height:180px}
 .web-desktop .calendar-heading>.calendar-agenda{width:auto}
 .web-desktop .calendar-heading h1{font-size:24px}
 .web-desktop .clients-tools{flex-wrap:wrap;gap:8px;padding:10px}
 .web-desktop .clients-tools .search{flex-basis:100%;min-width:0}
 .web-desktop .clients-tools .actions{flex-wrap:wrap;gap:6px}
 .web-desktop .clients-tools .actions button{font-size:12px;padding:8px;flex:1;white-space:normal}
 .web-desktop .contract-filters{gap:10px;padding:12px}
 .web-desktop .contract-filters .field{min-width:0;flex-basis:100%}
 .web-desktop .finance-overview{display:block}
 .web-desktop #finance-filter+.stats{grid-template-columns:repeat(2,minmax(0,1fr))}
 .web-desktop .finance-filters{display:grid;grid-template-columns:1fr 1fr;padding:10px;gap:8px}
 .web-desktop .finance-filters input{width:100%;min-width:0;box-sizing:border-box}
 .web-desktop .finance-filters>select,.web-desktop .finance-filters>.actions{grid-column:1/-1;min-width:0;width:100%}
 .web-desktop .finance-filters>.actions{display:flex;gap:4px;flex-wrap:wrap}
 .web-desktop .finance-filters>.actions button{flex:1}
 .web-desktop #content:has(#finance-filter) button{min-height:44px}
 .web-desktop .finance-overview .scroll,.web-desktop #content>section.panel>.scroll{overflow:auto;max-height:280px}
 .web-desktop .finance-overview table{min-width:530px}
 .web-desktop .template-legend{grid-template-columns:1fr}
 .web-desktop .template-legend>div{grid-template-columns:125px 1fr;gap:6px;font-size:12px}
 .web-desktop .template-file-card{padding:12px}
 .web-desktop dialog{max-height:96dvh;width:calc(100vw - 12px);max-width:calc(100vw - 12px);box-sizing:border-box;margin:auto;padding:0}
 .web-desktop .modalhead{padding:12px;gap:8px}.web-desktop .modalhead h2{font-size:18px}
 .web-desktop .modalbody,.web-desktop .booking-form .booking-panel{padding:12px}
 .web-desktop .modalfoot{padding:10px;gap:6px;flex-wrap:wrap;position:sticky;bottom:0;background:#fff;z-index:3}
 .web-desktop .modalfoot button,.web-desktop .modalfoot a{min-height:44px;flex:1;font-size:13px;padding:9px}
 .web-desktop input,.web-desktop select,.web-desktop textarea{font-size:16px;min-width:0;box-sizing:border-box}
 .web-desktop button,.web-desktop a.button{min-height:44px}
 .web-desktop .service-form .formgrid,.web-desktop .booking-price-row,.web-desktop .booking-price-row.without-deposit{display:grid;grid-template-columns:1fr 1fr;gap:10px}
 .web-desktop .service-form .formgrid .full{grid-column:1/-1}
 .web-desktop .service-work-table,.web-desktop .service-work-table tbody{display:block;min-width:0}
 .web-desktop .service-work-table thead{display:none}
 .web-desktop .service-work-table tr{display:grid;grid-template-columns:minmax(0,1fr) 106px;border-bottom:1px solid #d9e3dd;padding:8px 0}
 .web-desktop .service-work-table td{display:block;padding:4px;width:auto}
 .web-desktop .service-work-table td:nth-child(2){grid-column:1/-1;grid-row:2}
 .web-desktop .service-work-table textarea{min-height:70px}
 .web-desktop .service-row-actions button{width:44px;height:44px}
 .web-desktop .service-work-scroll{max-height:55dvh}
 .web-desktop .rental-payment-table{min-width:600px}
 .web-desktop .rental-payment-table input[type=date]{width:145px}
 .web-desktop .rental-payment-actions input[type=checkbox],.web-desktop .rental-payment-actions button{width:40px;height:40px;min-height:40px}
 .web-desktop .rental-status-checks{display:flex;flex-wrap:wrap;gap:10px;font-size:13px}
 .web-desktop .booking-car-display{gap:8px}
 .web-desktop .day-stepper{display:flex;max-width:100%;min-width:0}
 .web-desktop .day-stepper button{width:44px;flex-shrink:0;padding:0}
 .web-desktop .day-stepper input{width:54px;min-width:0}
 .web-desktop .booking-summary{padding:10px;gap:6px;margin:10px 0}
 .web-desktop .booking-summary strong{font-size:17px}
 .web-desktop .booking-inline-pdf{max-width:none;flex-basis:100%}
 .web-desktop .listrow{gap:10px;flex-wrap:wrap}
 .web-desktop .registration-plate{max-width:100%}
 .web-desktop .phone-row{padding-bottom:38px}
 .web-desktop .max-phone-control>span{max-width:190px}
 .web-desktop .android-update{font-size:12px;padding:7px}
 .web-desktop .calendar-order button{width:29px;min-height:30px;height:30px}
}
@media(max-width:760px){
 .web-desktop .booking-car-row{display:grid;grid-template-columns:1fr;gap:8px;align-items:start}
 .web-desktop .booking-car-row>.field{width:100%;margin:0}
 .web-desktop .booking-car-row #booking-car{grid-row:2}
 .web-desktop .rental-status-checks{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%;margin:6px 0}
 .web-desktop .rental-status-checks label{display:flex;align-items:center;gap:6px;font-size:12px;line-height:1.3}
 .web-desktop .rental-status-checks input[type=checkbox]{appearance:auto;width:28px;height:28px;min-width:28px;min-height:28px;flex-shrink:0;margin:0;accent-color:#245d4b}
 .web-desktop .rental-deposit-line{display:flex;gap:8px;align-items:center}
 .web-desktop .rental-deposit-line>input{width:100%;min-width:0}
 .web-desktop .rental-deposit-check input{width:28px;height:28px;min-width:28px;min-height:28px}
 .web-desktop .rental-payment-table{display:block;min-width:0;width:100%;table-layout:auto}
 .web-desktop .rental-payment-table thead{display:none}
 .web-desktop .rental-payment-table tbody{display:block}
 .web-desktop .rental-payment-table tr{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px;border:1px solid #dce4de;border-radius:10px;margin-bottom:10px;background:#fff}
 .web-desktop .rental-payment-table td{display:block;width:auto;min-width:0;padding:0;border:0;white-space:normal}
 .web-desktop .rental-payment-table td:first-child,.web-desktop .rental-payment-table td:last-child{grid-column:1/-1}
 .web-desktop .rental-payment-table input[type=date],.web-desktop .rental-payment-table select{width:100%;max-width:100%}
 .web-desktop .rental-payment-table td:before{display:block;font-size:11px;color:#6a7b72;margin-bottom:4px}
 .web-desktop .rental-payment-table td:nth-child(1):before{content:'Дата'}
 .web-desktop .rental-payment-table tr:not(.deposit-row) td:nth-child(2):before{content:'Количество дней'}
 .web-desktop .rental-payment-table td:nth-child(3):before{content:'Цена за сутки'}
 .web-desktop .rental-payment-table td:nth-child(4):before{content:'Сумма'}
 .web-desktop .rental-payment-table td:nth-child(5):before{content:'Способ'}
 .web-desktop .rental-payment-table td:nth-child(6):before{content:'Получено / удалить'}
 .web-desktop .rental-payment-table .deposit-row td:nth-child(3){display:none}
 .web-desktop .rental-payment-table .deposit-row td:nth-child(2){display:flex;align-items:center;justify-content:center}
 .web-desktop .rental-payment-scroll{overflow:auto;max-height:55dvh}
 .web-desktop .topbar{flex-wrap:wrap;gap:6px}.web-desktop .topbar>.android-update{margin-left:auto}
}
@media(max-width:760px){
 .web-desktop .modalfoot button,.web-desktop .modalfoot a{flex:1 1 calc(50% - 8px);min-width:105px;white-space:normal;line-height:1.25}
 .web-desktop .rental-payments .modalfoot{display:flex;gap:6px;flex-wrap:wrap}
 .web-desktop .rental-payment-identity{margin-bottom:12px}
 .web-desktop .rental-payment-identity .booking-car-display{margin:0 0 8px}
}
/* Android 1.3: current unified rental, client balances and compact fleet. */
@media(max-width:760px){
 .web-desktop .compact-fleet{grid-template-columns:minmax(0,1fr);gap:10px}
 .web-desktop .fleet-count{font-size:13px;font-weight:400;letter-spacing:0;margin-left:10px;color:#738077}
 .web-desktop .compact-vehicle.vehicle-card{background:#fff;border:1px solid #dce2d7;border-left:4px solid #27834e;padding:12px;border-radius:10px}
 .web-desktop .compact-vehicle.vehicle-rented{border-left-color:#c74343}
 .web-desktop .compact-vehicle .vehicle-card-top{margin:-5px -5px 2px 0}
 .web-desktop .compact-vehicle .vehicle-status{background:none;color:#218043;padding:0}
 .web-desktop .compact-vehicle.vehicle-rented .vehicle-status{color:#ba3636}
 .web-desktop .compact-vehicle .vehicle-status::before{content:'●';margin-right:6px}
 .web-desktop .fleet-identity{display:grid;grid-template-columns:minmax(0,1fr) minmax(120px,45%);gap:8px;align-items:center}
 .web-desktop .fleet-name{min-width:0}.web-desktop .compact-vehicle h3{font-size:16px;margin:0 0 5px;overflow-wrap:anywhere}
 .web-desktop .compact-vehicle .registration-plate{width:100%;align-self:center;filter:none}
 .web-desktop .compact-vehicle .vehicle-meta{margin:0;font-size:12px;line-height:1.4}
 .web-desktop .fleet-dates{display:flex;flex-wrap:wrap;gap:5px 12px;font-size:12px;margin:12px 0;color:#68776f}
 .web-desktop .fleet-overdue{color:#b43b36;font-weight:600}
 .web-desktop .compact-vehicle .vehicle-card-bottom{padding:0;margin:0}
 .web-desktop .compact-vehicle .car-quick-actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .web-desktop .compact-vehicle .car-quick-actions button{min-height:44px;padding:8px 3px}
 .web-desktop .client-money-summary{grid-template-columns:minmax(0,1fr);gap:10px}
 .web-desktop .client-money-summary>div{display:flex;justify-content:space-between;align-items:center;gap:12px}
 .web-desktop .client-money-summary strong{font-size:18px;white-space:nowrap;margin:0}
 .web-desktop .preliminary-summary{flex-wrap:wrap;gap:8px}.web-desktop .preliminary-note{max-width:100%}
 .web-desktop .rental-header-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;min-width:0;flex-shrink:1}
 .web-desktop .rental-header-totals>div{display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-width:0;white-space:normal}
 .web-desktop .rental-header-totals strong{font-size:15px;overflow-wrap:anywhere}
 .web-desktop .unified-rental .booking-search{display:flex;flex-wrap:wrap;gap:8px}
 .web-desktop .unified-rental .booking-search>.field{flex:1 1 100%;min-width:0}
 .web-desktop .unified-rental .unified-max{flex-basis:100%;display:grid;gap:8px;min-width:0}
 .web-desktop .unified-rental .rental-max-phone{flex-wrap:wrap;gap:6px 10px}
 .web-desktop .unified-rental .rental-max-phone label{display:flex;align-items:center;gap:7px}
 .web-desktop .unified-rental .rental-max-phone input{width:24px;height:24px;margin:0}
 .web-desktop .unified-rental .rental-max-phone .max-phone-button{min-height:44px;height:44px;padding:8px}
 .web-desktop .unified-rental .rental-max-status{max-width:100%;white-space:normal;overflow-wrap:anywhere}
 .web-desktop .unified-rental .rental-payment-table td:nth-child(2):before{content:'Назначение'}
 .web-desktop .unified-rental .rental-payment-table td:nth-child(3):before{content:'Сутки'}
 .web-desktop .unified-rental .rental-payment-table td:nth-child(4):before{content:'Цена за сутки'}
 .web-desktop .unified-rental .rental-payment-table td:nth-child(5):before{content:'Сумма'}
 .web-desktop .unified-rental .rental-payment-table td:nth-child(6):before{content:'Способ'}
 .web-desktop .unified-rental .rental-payment-table td:nth-child(7):before{content:'Получено / удалить'}
 .web-desktop .unified-rental .rental-payment-table .deposit-row td:nth-child(3),.web-desktop .unified-rental .rental-payment-table .deposit-row td:nth-child(4){display:none}
 .web-desktop .unified-rental .rental-payment-table .deposit-row td:nth-child(2){display:block}
 .web-desktop .unified-rental .rental-payment-table td:last-child{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
 .web-desktop .unified-rental .rental-payment-table td:last-child:before{flex-basis:100%}
 .web-desktop .unified-rental .rental-payment-table td input[type=checkbox],.web-desktop .unified-rental .rental-payment-table td button{min-width:44px;min-height:44px}
 .web-desktop .rental-footer-layout{display:flex;flex-direction:column;align-items:stretch;position:static;padding:10px}
 .web-desktop .rental-footer-left,.web-desktop .rental-footer-right,.web-desktop .rental-footer-files{display:flex;flex-wrap:wrap;gap:6px;max-width:100%;width:100%}
 .web-desktop .rental-footer-right{order:-2}.web-desktop .rental-footer-files{order:-1}
 .web-desktop .rental-footer-layout>.form-save-state{position:static;align-self:flex-end}
 .web-desktop .rental-footer-left button{font-size:12px}
 .web-desktop .clients-tools input[type=search]{min-width:0;width:100%}
}
@media(max-width:760px){
 body.web-desktop .unified-rental .unified-max{max-width:100%;width:100%;flex:1 1 100%}
 body.web-desktop .unified-rental .rental-max-phone{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
 body.web-desktop .unified-rental .rental-max-phone label{flex:1 1 100%;width:auto;min-width:0}
 body.web-desktop .unified-rental .rental-max-phone label input{flex:0 0 24px;min-width:24px}
 body.web-desktop .unified-rental .booking-time-row{grid-template-columns:minmax(0,1fr) 100px}
 body.web-desktop .unified-rental .booking-time-row>.field:nth-child(3){grid-column:1/-1}
 body.web-desktop .unified-rental .rental-payment-table tr:not(.deposit-row) td:nth-child(2):before{content:'Назначение'}
}
