/* GARAGEM88 — Agenda mobile aprovada.
   Preserva o mesmo DOM, dados e handlers da Agenda desktop.
   Apenas <=600px e somente quando a Agenda estiver aberta. */
@media (max-width:600px) {
 body:has(#agendaScreen:not([hidden])) { background:#f1f6fb; }
 body:has(#agendaScreen:not([hidden])) .system {
   display:block!important;grid-template-columns:none!important;min-width:0;
 }
 body:has(#agendaScreen:not([hidden])) .content {
   box-sizing:border-box;padding:15px 12px calc(110px + env(safe-area-inset-bottom))!important;min-width:0;
 }
 body:has(#agendaScreen:not([hidden])) .sidebar {
   display:none!important;
 }
 body:has(#agendaScreen:not([hidden])) .g88m-header{
   display:flex!important;align-items:center;gap:10px;
   min-height:60px;padding:8px 12px;background:#031c30;color:white;
 }
 body:has(#agendaScreen:not([hidden])) .g88m-nav {
   display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));
   position:fixed;bottom:0;left:0;right:0;
   padding:6px 8px max(8px,env(safe-area-inset-bottom));
   border-top:1px solid #dae6f2;background:#fffffffa;
   z-index:9000;
 }
 body:has(#agendaScreen:not([hidden])) #g88CloudStatus {
   position:relative!important;bottom:auto!important;right:auto!important;
   max-width:none!important;z-index:auto!important;
   margin:10px 12px calc(88px + env(safe-area-inset-bottom))!important;
   padding:8px 10px!important;
   font-size:11px!important;line-height:1.35;
   box-shadow:none!important;display:flex;align-items:center;flex-wrap:wrap;gap:6px;
 }
 body:has(#agendaScreen:not([hidden])) #g88CloudStatus[hidden] {
   display:none!important;
 }
 body:has(#agendaScreen:not([hidden])) #g88CloudStatus button{
   min-height:40px;flex:0 0 auto;
 }
 #agendaScreen {
   width:100%!important;max-width:100%!important;min-width:0!important;
   margin:0 auto!important;
   padding:0 0 24px!important;
   font-family:Inter,'Segoe UI',Arial,sans-serif;
   color:#0b2441;
 }
 #agendaScreen *,#agendaScreen *::before,#agendaScreen *::after {box-sizing:border-box}
 #agendaScreen button{
   font-family:Inter,'Segoe UI',Arial,sans-serif!important;
   touch-action:manipulation;
 }
 #agendaScreen button:focus-visible{outline:3px solid #278bfa;outline-offset:2px}
 #agendaScreen .agenda-top{
   display:flex!important;flex-direction:column;align-items:stretch;gap:12px;
   margin:0 0 12px!important;
 }
 #agendaScreen .agenda-top h1 {
   font-size:28px!important;line-height:1.16!important;
   font-weight:800!important;letter-spacing:-.6px!important;margin:0 0 5px!important;
 }
 #agendaScreen .agenda-top p {
   color:#60758c;font-size:12px!important;line-height:1.4!important;
   margin:0!important;
 }
 #agendaScreen #agendaNewBtn {
   display:flex!important;align-items:center;justify-content:center;gap:9px;
   width:100%!important;min-height:48px!important;padding:10px 12px!important;
   margin:0!important;border:0!important;border-radius:12px!important;
   background:#286ce5!important;color:white!important;
   font-size:14px!important;font-weight:750!important;
   box-shadow:0 4px 12px #215acc16!important;
 }
 #agendaScreen #agendaNewBtn svg{width:21px!important;height:21px!important}
 #agendaScreen .agenda-toolbar {
   display:flex!important;flex-direction:column!important;align-items:stretch!important;
   gap:10px!important;width:100%;min-width:0;
   margin:0 0 10px!important;padding:12px!important;
   background:white;border:1px solid #d9e7f4;border-radius:14px!important;
   box-shadow:none!important;
 }
 #agendaScreen .agenda-date-nav {
   display:grid!important;grid-template-columns:38px minmax(0,1fr) 50px 38px!important;
   grid-template-rows:44px!important;gap:6px!important;align-items:center;
   width:100%;min-width:0;
 }
 #agendaScreen #agendaPrev {
   grid-column:1;grid-row:1;
 }
 #agendaScreen .agenda-date-choice {
   grid-column:2;grid-row:1;display:block;min-width:0!important;width:100%;
 }
 #agendaScreen #agendaNext {
   grid-column:4;grid-row:1;
 }
 #agendaScreen .agenda-date-nav .agenda-nav{
   width:38px!important;min-width:38px!important;height:44px!important;
   min-height:44px!important;padding:0!important;
   font-size:23px!important;border-radius:10px!important;
   border:1px solid #cddfec;background:white;color:#0d3658;
 }
 #agendaScreen #agendaDatePickerButton {
   display:flex!important;align-items:center;justify-content:center!important;
   width:100%!important;min-width:0!important;min-height:44px!important;
   padding:5px 7px!important;gap:5px;border:1px solid #d9e7f4;
   background:#f8fbff;border-radius:10px;white-space:normal;
 }
 #agendaScreen #agendaDatePickerButton #agendaDateLabel {
   display:block!important;min-width:0!important;width:auto!important;
   font-size:clamp(11px,2.9vw,12px)!important;line-height:1.25!important;
   font-weight:750!important;text-align:center!important;white-space:normal!important;
 }
 #agendaScreen #agendaDatePickerButton #agendaDateLabel::before {
   content:none!important;display:none!important;
 }
 #agendaScreen #agendaDatePickerButton svg {
   width:15px;height:15px;flex:0 0 15px;
 }
 #agendaScreen #agendaToday {
   grid-column:3;grid-row:1;justify-self:stretch;
   min-width:0!important;width:50px!important;min-height:44px!important;
   height:44px!important;padding:0 5px!important;
   border-radius:10px!important;font-size:12px!important;
   background:#f1f7fe;border:1px solid #cddfec;color:#143556;
 }
 #agendaScreen .agenda-view {
   display:flex!important;align-self:center;min-width:0;
   width:min(240px,100%);height:44px;
 }
 #agendaScreen .agenda-view button{
   flex:1;min-width:0!important;min-height:44px!important;height:44px!important;
   padding:0 10px!important;font-size:13px!important;border-color:#cbdbe9;
 }
 #agendaScreen .agenda-view button.active{background:#18344a!important;color:#fff!important}
 #agendaScreen #agendaSummaryV24 {
   display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
   gap:8px!important;align-items:stretch!important;
   margin:0 0 10px!important;
 }
 #agendaScreen #agendaSummaryV24 > .agenda-summary-card {
   display:flex!important;align-items:center!important;justify-content:flex-start;
   gap:9px!important;min-height:80px!important;
   width:100%!important;min-width:0!important;
   padding:10px!important;border-radius:13px!important;
   border:1px solid #dae7f3!important;background:white!important;
   color:#567089!important;font-size:11px!important;line-height:1.3!important;
 }
 #agendaScreen #agendaSummaryV24 > .agenda-summary-card > span {
   display:block;min-width:0!important;
   background:transparent!important;border:0!important;
   padding:0!important;font-size:11px!important;line-height:1.3!important;
   color:#61748c!important;
 }
 #agendaScreen #agendaSummaryV24 > .agenda-summary-card > .agenda-summary-icon {
   display:grid!important;place-items:center;flex:0 0 37px!important;
   width:37px;height:37px;min-width:37px!important;
   border-radius:10px!important;
 }
 #agendaScreen #agendaSummaryV24 > .agenda-summary-card > .agenda-summary-icon-calendar {
   background:#eaf3ff!important;color:#1768df!important;
 }
 #agendaScreen #agendaSummaryV24 > .agenda-summary-card > .agenda-summary-icon-money {
   background:#e7f7ee!important;color:#179e55!important;
 }
 #agendaScreen #agendaSummaryV24 .agenda-summary-card b {
   display:block;font-size:16px!important;line-height:1.35!important;
   color:#0e2545!important;font-weight:800!important;
   overflow-wrap:anywhere;
 }
 #agendaScreen .agenda-card-v29 {
   overflow:visible!important;background:transparent!important;
   border:0!important;box-shadow:none!important;border-radius:0!important;
 }
 #agendaScreen #agendaRows {
   display:flex;flex-direction:column;gap:10px;min-width:0;
 }
 #agendaScreen #agendaRows .agenda-v29-row {
   display:grid!important;position:relative;overflow:visible;
   grid-template-columns:62px minmax(0,1fr) 44px 44px 44px!important;
   grid-template-rows:auto auto 44px!important;align-items:start!important;
   gap:7px 6px!important;min-width:0!important;width:100%;
   min-height:0!important;padding:13px 11px 12px 17px!important;
   border:1px solid #d7e7f4;border-radius:14px!important;
   background:white;box-shadow:0 1px 1px #0f2e4010;
 }
 #agendaScreen #agendaRows .agenda-v29-row::before {
   left:6px!important;top:11px!important;bottom:11px!important;
   width:4px!important;border-radius:5px!important;
 }
 #agendaScreen #agendaRows .agenda-v29-time {
   grid-column:1;grid-row:1/3;align-self:start;
   min-width:0;padding:4px 0 0!important;
   color:#102748;font-size:16px!important;
   font-weight:800!important;line-height:1.15!important;
 }
 #agendaScreen #agendaRows .agenda-v29-client {
   grid-column:2/6;grid-row:1;
   min-width:0!important;padding-right:0;overflow:hidden;
 }
 #agendaScreen #agendaRows .agenda-v29-client strong {
   display:block;color:#0c2340;
   font-size:14px!important;font-weight:800!important;line-height:1.25!important;
   overflow-wrap:anywhere;
 }
 #agendaScreen #agendaRows .agenda-v29-client .vehicle {
   font-size:11px!important;margin-top:3px!important;
   line-height:1.3;color:#5d7590;white-space:normal;
 }
 #agendaScreen #agendaRows .agenda-v29-client .note {
   max-width:100%!important;margin-top:4px!important;
   font-size:10px!important;line-height:1.25!important;
   overflow:hidden!important;text-overflow:ellipsis!important;
   white-space:nowrap!important;color:#73879e;
 }
 #agendaScreen #agendaRows .agenda-v29-service-col {
   grid-column:2/6;grid-row:2;
   min-width:0!important;display:block!important;
 }
 #agendaScreen #agendaRows .agenda-v102-label{display:none!important}
 #agendaScreen #agendaRows .agenda-v29-service {
   display:block;background:transparent!important;color:#5a718c!important;
   border:0!important;border-radius:0!important;
   padding:0!important;text-align:left!important;
   min-width:0!important;max-width:100%!important;width:100%;
   font-size:11.5px!important;font-weight:500!important;line-height:1.35!important;
   white-space:normal!important;overflow:visible!important;text-overflow:clip!important;
 }
 #agendaScreen #agendaRows .agenda-v29-status{
   position:static!important;top:auto!important;right:auto!important;z-index:auto;
   grid-column:1/3!important;grid-row:3!important;justify-self:stretch!important;align-self:center!important;
   width:100%!important;min-width:0!important;max-width:none!important;
   display:flex!important;align-items:stretch!important;
   flex-direction:column!important;gap:3px!important;
 }
 #agendaScreen #agendaRows .agenda-v29-status .agenda-status-wrap{
   width:100%!important;min-width:0!important;max-width:none!important;
 }
 #agendaScreen #agendaRows .agenda-v29-status .agenda-status{
   display:inline-flex!important;align-items:center!important;justify-content:center;
   width:100%!important;min-width:0!important;max-width:none!important;
   min-height:44px!important;padding:8px 12px!important;
   font-size:13px!important;font-weight:750!important;line-height:1.2!important;
   white-space:nowrap!important;text-align:center;
   border:1px solid #c7ddf9!important;border-radius:99px!important;
   cursor:pointer;
 }
 #agendaScreen #agendaRows .agenda-started-time{
   font-size:9px!important;line-height:1.15!important;
   text-align:right!important;color:#5b7086;
 }
 #agendaScreen #agendaRows .agenda-v102-print{
   grid-column:4;grid-row:3;justify-self:center!important;
   width:44px!important;height:44px!important;min-width:44px!important;
   min-height:44px!important;padding:0!important;
   border-radius:10px!important;
 }
 #agendaScreen #agendaRows .agenda-v102-print span{display:none!important}
 #agendaScreen #agendaRows .agenda-v102-print svg{width:21px!important;height:21px!important}
 #agendaScreen #agendaRows .agenda-v29-wa{
   grid-column:3;grid-row:3;
   display:flex!important;align-items:center!important;justify-content:center!important;
   width:44px!important;height:44px!important;min-width:44px!important;
   min-height:44px!important;padding:0!important;
   justify-self:center;align-self:center;
   border:1px solid #9cdeb5!important;border-radius:10px!important;
   background:#e3f8eb!important;color:#078b42!important;
   font-size:0!important;line-height:0!important;
   opacity:1!important;filter:none!important;
 }
 #agendaScreen #agendaRows .agenda-v29-wa svg{
   display:block!important;width:26px!important;height:26px!important;
   min-width:26px!important;flex:none!important;
   stroke:currentColor!important;fill:none!important;
   stroke-width:1.9!important;opacity:1!important;visibility:visible!important;
 }
 #agendaScreen #agendaRows .agenda-v29-open{
   grid-column:5;grid-row:3;justify-self:end;
   display:flex!important;align-items:center;justify-content:center;
   width:44px!important;height:44px!important;min-width:44px!important;
   min-height:44px!important;padding:0!important;
   border:1px solid #c9dcec!important;border-radius:10px!important;
   background:white;color:#184063;
 }
 #agendaScreen #agendaRows .agenda-v29-open .agenda-detail-icon {
   width:24px!important;height:24px!important;
 }
 #agendaScreen #agendaRows .agenda-v29-empty{
   padding:30px 14px!important;text-align:center!important;
   border:1px solid #d8e7f2;border-radius:14px;background:#fff;
   color:#6a8096;font-size:12px!important;line-height:1.5;
 }
 #agendaScreen.week-mode #agendaSummaryV24{display:none!important}
 #agendaScreen.week-mode .agenda-week-v297{
   display:grid!important;grid-template-columns:minmax(0,1fr)!important;
   gap:10px!important;width:100%;min-width:0;
 }
 #agendaScreen.week-mode .agenda-week-day-v297{
   min-height:0!important;overflow:hidden;border-radius:13px;
 }
 #agendaScreen.week-mode .agenda-week-head-v297{
   display:flex;align-items:center;justify-content:space-between;
   text-align:left;padding:11px 13px;
 }
 #agendaScreen.week-mode .agenda-week-head-v297 strong,
 #agendaScreen.week-mode .agenda-week-head-v297 span{
   font-size:12px!important;
 }
 #agendaScreen.week-mode .agenda-week-item-v297{
   min-height:44px;padding:9px 10px;
 }
 #agendaScreen .agenda-new-overlay,
 #agendaScreen .agenda-detail-overlay{max-width:100vw}
 .agenda-detail-overlay .agenda-detail{
   width:min(100%,465px)!important;max-width:100vw!important;
   padding:16px 13px 28px;overflow-y:auto;
 }
 .g88-status-overlay .g88-status-card{
   max-width:min(96vw,480px)!important;max-height:calc(100dvh - 32px);
   overflow-y:auto;
 }
}
/* O drawer da Agenda usa os mesmos estilos aprovados para a Home.
   Duplicação localizada para não alterar CSS da Home ou o layout desktop. */
@media (max-width:600px){
 body.g88m-menu-open:has(#agendaScreen:not([hidden])){overflow:hidden}
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .g88m-shade:not([hidden]){
   display:block;position:fixed;inset:0;width:100%;height:100%;
   z-index:30000;background:#00132299;border:0;
 }
}
/* Drawer mobile aprovado — 23/10/2026
   Os mesmos itens e handlers do desktop. Só muda a apresentação na Home mobile. */
.g88m-drawer-head{display:none}
@media (max-width:600px){
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .sidebar{
   box-sizing:border-box;
   display:flex!important;flex-direction:column;align-items:stretch;justify-content:flex-start;
   position:fixed;inset:0 auto 0 0;z-index:30001;
   width:min(244px,68vw);max-width:68vw;
   height:100dvh;min-height:0;max-height:100dvh;
   padding:calc(7px + env(safe-area-inset-top)) 8px calc(22px + env(safe-area-inset-bottom));
   overflow-y:auto;overflow-x:hidden;
   overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
   background:linear-gradient(180deg,#08233a 0%,#071d31 56%,#061a2b 100%);
 }
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .sidebar > .brand{
   display:none!important;
 }
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .sidebar .g88m-drawer-head{
   display:flex;align-items:center;justify-content:space-between;gap:6px;
   position:sticky;top:0;z-index:2;flex:0 0 auto;
   min-height:56px;margin:-2px -1px 5px;padding:4px 1px 6px;
   background:#08233a;border-bottom:1px solid #24425b;
 }
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .sidebar .g88m-drawer-brand{
   display:block;flex:1;min-width:0;text-align:left;
   font-family:Inter,'Segoe UI',Arial,sans-serif;
 }
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .sidebar .g88m-drawer-brand strong{
   display:block;white-space:nowrap;color:#fff;font-size:18px;
   font-weight:850;line-height:1.05;font-style:italic;letter-spacing:-.7px;
 }
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .sidebar .g88m-drawer-brand strong span{
   color:#1686ff;
 }
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .sidebar .g88m-drawer-brand small{
   display:block;margin-top:5px;color:#b2c6d6;
   font-size:7px;letter-spacing:.8px;line-height:1.25;
 }
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .sidebar .g88m-close{
   display:grid;place-items:center;
   flex:0 0 44px;width:44px;height:44px;min-height:44px;
   padding:0;border:1px solid #355773;border-radius:11px;
   background:#15344f;color:#fff;
   font:400 25px/1 Inter,'Segoe UI',Arial,sans-serif;
   cursor:pointer;
 }
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .sidebar .menu-list{
   display:flex;flex:0 0 auto;flex-direction:column;
   gap:0;align-items:stretch;justify-content:flex-start;
   width:100%;overflow:visible;
 }
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .sidebar .sys-menu{
   box-sizing:border-box;
   display:flex;flex-direction:row;align-items:center;
   justify-content:flex-start!important;gap:9px!important;
   flex:0 0 auto;width:100%;height:44px!important;min-height:44px!important;
   margin:0;padding:0 7px!important;
   text-align:left;font:500 13.5px/1.25 Inter,'Segoe UI',Arial,sans-serif;
   border-radius:10px;white-space:nowrap;
 }
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .sidebar .sys-menu > b{
   display:grid;place-items:center;flex:0 0 21px;
   width:21px;height:21px;margin:0;min-width:21px;
 }
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .sidebar .sys-menu > b svg{
   width:19px;height:19px;
 }
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .sidebar .sys-menu > span{
   display:inline;min-width:0;
 }
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .sidebar .sys-menu > span[class*="arrow"]{
   margin-left:auto!important;flex:0 0 auto;
 }
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .sidebar .sys-menu.active{
   background:#1e486f;color:#fff;
 }
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .sidebar .sys-submenu{
   height:44px!important;min-height:44px!important;
   padding-left:14px!important;font-size:12.5px;
 }
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .sidebar .cadastros-items,
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .sidebar .vendas-items{
   flex:0 0 auto;gap:1px;padding:2px 0 4px 8px;
 }
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .sidebar .gf-sidebar-group{
   flex:0 0 auto;padding:2px 0 5px 12px;
 }
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .sidebar .gf-sidebar-item{
   width:100%;min-height:44px;text-align:left;
   font:500 13px Inter,'Segoe UI',Arial,sans-serif;
 }
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .sidebar > .exit{
   flex:0 0 44px;margin:3px 0 0!important;
   border-top:1px solid #24425b;
   padding-top:6px!important;height:50px!important;min-height:50px!important;
 }
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .sidebar .g88m-close:focus-visible,
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .sidebar .sys-menu:focus-visible,
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .sidebar .gf-sidebar-item:focus-visible{
   outline:3px solid #8dc3ff;outline-offset:2px;
 }
}

@media (max-width:365px){
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .sidebar .g88m-drawer-brand strong{
   font-size:16px;
 }
 body.g88m-menu-open:has(#agendaScreen:not([hidden])) .sidebar .g88m-drawer-brand small{
   font-size:6.5px;letter-spacing:.6px;
 }
}


/* Inter oficial na Agenda mobile: todos os textos e controles, sem alterar SVGs. */
@media (max-width:600px){
 #agendaScreen, #agendaScreen :is(button,input,select,textarea,label,option,span,strong,small,p,h1,h2,h3,h4,time,div,a){
   font-family:'Inter','Segoe UI',Arial,sans-serif!important;
 }
}
