/* Calendário de leitura tabular, mantendo as ações e permissões da agenda. */
body .calendar-toolbar{background:#dceffa;border-bottom:4px solid #69b4df}
body .month-navigation h2{color:#164967;font-size:32px}
body .calendar-grid,body .weekdays{grid-template-columns:minmax(64px,.35fr) repeat(4,minmax(0,1fr)) repeat(2,minmax(64px,.35fr));min-width:0}
body .weekdays{background:#f1f4f6;border-bottom:2px solid #d8a348}
body .weekdays span{padding:12px 3px;color:#334956;font-size:15px;letter-spacing:0;text-transform:uppercase}
body .calendar-grid{gap:0;background:#fff}
body .calendar-grid .day{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:0;padding:0;min-height:210px;border:0;border-right:1px solid #b8c4cb;border-bottom:2px solid #d8a348;border-radius:0;background:#fff;color:#243e4d;opacity:1;overflow:hidden;text-align:left}
body .calendar-grid .day:disabled{cursor:default;opacity:1}
body .calendar-grid .day:hover:not(:disabled){background:#eef8ff;box-shadow:inset 0 0 0 2px #4599cc}
body .calendar-grid .day:focus-visible{outline:3px solid #166da7;outline-offset:-3px;z-index:1}
body .calendar-grid .day.outside,body .calendar-grid .day.weekend{background:#f0f1f2}
body .calendar-grid .day-top{padding:5px 8px;min-height:35px;justify-content:space-between;align-items:center;position:relative}
body .calendar-grid .day-number{font-size:20px;min-width:24px;line-height:1.2}
body .calendar-grid .today .day-number{width:29px;height:29px;background:#176fa6;color:#fff;border-radius:4px}
body .calendar-grid .today-label{font-size:12px;color:#176fa6}
body .calendar-grid .sheet-columns,body .calendar-grid .sheet-row{display:grid;grid-template-columns:minmax(0,1fr) 32px;width:100%;font-size:13px;line-height:1.4}
body .calendar-grid .sheet-columns{background:#f5b345;color:#382b13;font-size:11px;font-weight:750;text-transform:uppercase;letter-spacing:.3px}
.sheet-columns>span,.sheet-row>span,.sheet-row>strong{padding:4px 5px;min-width:0}
.sheet-columns>span:last-child,.sheet-row>:last-child{border-left:1px solid #aebac2;text-align:center}
.sheet-rows{display:block}
body .calendar-grid .sheet-row{min-height:29px;border-bottom:1px solid #c5ced4}
.sheet-city{overflow-wrap:anywhere}
body .calendar-grid .sheet-quantity{font-size:13px;font-variant-numeric:tabular-nums;font-weight:650}
body .calendar-grid .day-info{padding:8px;margin-top:auto}
body .calendar-grid .day-amount,body .calendar-grid .day-status,body .calendar-grid .personal-label{font-size:12px;line-height:1.4;text-align:left}
body .calendar-grid .day-amount strong{font-size:15px}
body .calendar-grid .day-status{margin-top:3px;min-height:0}
body .calendar-grid .progress{margin:5px 0;height:3px}
body .calendar-grid .delivery-closed{background:#fff0ee}
body .calendar-grid .sheet-closure{display:block;background:#c9362d;color:white;font-size:12px;font-weight:700;line-height:1.4;padding:6px 8px;overflow-wrap:anywhere}
body .calendar-grid .delivery-closed .empty-row{background:#fde1de}
body .calendar-grid .sheet-loading{font-size:12px;color:#52675d;padding:6px}
body .calendar-grid .own-dot{position:static;background:#16754f;flex-shrink:0}
@media(max-width:1100px) and (min-width:701px){body .calendar-grid .sheet-columns,body .calendar-grid .sheet-row{font-size:11px;grid-template-columns:minmax(0,1fr) 25px}body .weekdays span{font-size:12px}}
@media(max-width:700px){
 body .calendar-grid,body .weekdays{min-width:980px;grid-template-columns:64px repeat(4,minmax(0,1fr)) 64px 64px}
 body .calendar-scroll{overflow-x:auto;touch-action:pan-x pan-y pinch-zoom!important}
 body .calendar-grid .day{min-height:210px;align-items:stretch}
 body .calendar-with-arrows .calendar-scroll{margin:0}
 body .weekdays span{font-size:13px}
 body .calendar-scroll-help{display:block}
 body .month-navigation h2{font-size:24px}
}

/* Total discreto no canto inferior direito de cada data. */
body .calendar-grid .day-count{display:block;align-self:flex-end;margin-top:auto;padding:7px 9px;font-size:14px;font-weight:700;line-height:1.3;color:#334956;font-variant-numeric:tabular-nums}

.day-deliveries-table{width:100%;border-collapse:collapse;margin:20px 0;font-size:16px}
.day-deliveries-table caption{text-align:left;color:var(--muted);margin-bottom:10px}
.day-deliveries-table th,.day-deliveries-table td{padding:10px 12px;border:1px solid #c5ced4;text-align:left;overflow-wrap:anywhere}
.day-deliveries-table thead{background:#dceffa}
.day-deliveries-table :is(th,td):last-child{text-align:right;font-variant-numeric:tabular-nums}
.day-deliveries-table tfoot{background:#f1f4f6;font-weight:700}

/* Alturas consistentes mantêm a grade alinhada entre as colunas. */
body .calendar-grid .day{min-width:0}
body .calendar-grid .day-top{height:40px;min-height:40px;flex:0 0 40px;flex-wrap:nowrap}
body .calendar-grid .sheet-columns{height:28px;min-height:28px;flex:0 0 28px;align-items:stretch}
body .calendar-grid .sheet-columns>span{white-space:nowrap;overflow:hidden}
body .calendar-grid .sheet-rows{flex-shrink:0}
body .calendar-grid .sheet-row{height:36px;min-height:36px;align-items:stretch}
body .calendar-grid .sheet-row>span,body .calendar-grid .sheet-row>strong{display:block;line-height:27px;padding-top:4px;padding-bottom:4px}
body .calendar-grid .sheet-city{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal}
body .calendar-grid .sheet-closure{margin:0;flex:1;padding:10px 8px}
body .calendar-grid .day-count{height:34px;min-height:34px;flex:0 0 34px;width:100%;text-align:right}
/* Visão mensal compacta em computadores, incluindo meses com seis semanas. */
@media(min-width:701px){
 body .app-header{min-height:72px;padding:10px 2%;gap:14px}
 body .workspace{padding:14px clamp(12px,2vw,30px) 8px}
 body .page-heading{margin-bottom:12px}
 body .page-heading h1{font-size:26px;margin-top:3px}
 body .page-heading p{font-size:15px;margin-top:4px}
 body .page-heading .section-kicker{font-size:11px}
 body .overview{padding:10px 16px;gap:18px;margin-bottom:12px}
 body .overview-label{font-size:11px;margin-bottom:2px}
 body .overview strong{font-size:17px}
 body .overview .sync-status{font-size:12px}
 body .calendar-toolbar{padding:8px 16px;gap:10px}
 body .month-navigation h2{font-size:24px}
 body .month-navigation .small{font-size:14px;min-height:34px;padding:6px 12px}
 body .calendar-hint{font-size:13px}
 body .weekdays span{padding:6px 3px;font-size:12px}
 body .calendar-grid .day{min-height:0}
 body .calendar-grid .day-top{height:27px;min-height:27px;flex-basis:27px;padding:2px 7px}
 body .calendar-grid .day-number{font-size:17px}
 body .calendar-grid .today .day-number{width:23px;height:23px}
 body .calendar-grid .sheet-columns{height:21px;min-height:21px;flex-basis:21px;font-size:10px}
 body .calendar-grid .sheet-columns>span{padding:3px 5px}
 body .calendar-grid .sheet-row{height:24px;min-height:24px;font-size:12px}
 body .calendar-grid .sheet-row>span,body .calendar-grid .sheet-row>strong{line-height:23px;padding:0 5px}
 body .calendar-grid .sheet-quantity{font-size:12px}
 body .calendar-grid .day-count{height:23px;min-height:23px;flex-basis:23px;padding:3px 8px;font-size:12px}
 body .calendar-grid .sheet-closure{font-size:11px;padding:7px}
 body .bottom-note{font-size:12px;margin:8px 0}
 body .app-footer{font-size:11px;padding:8px 2%}
}
@media(min-width:701px) and (max-height:850px){
 body .app-header{min-height:60px;padding-top:6px;padding-bottom:6px}
 body .workspace{padding-top:10px}
 body .page-heading{margin-bottom:8px}
 body .page-heading h1{font-size:23px}
 body .page-heading p{font-size:13px}
 body .overview{padding:7px 14px;margin-bottom:8px}
 body .overview strong{font-size:15px}
 body .calendar-toolbar{padding-top:5px;padding-bottom:5px}
 body .weekdays span{padding-top:4px;padding-bottom:4px}
 body .calendar-grid .day-top{height:24px;min-height:24px;flex-basis:24px}
 body .calendar-grid .sheet-row{height:20px;min-height:20px}
 body .calendar-grid .sheet-row>span,body .calendar-grid .sheet-row>strong{line-height:19px}
 body .calendar-grid .day-count{height:20px;min-height:20px;flex-basis:20px;padding-top:2px;padding-bottom:2px}
}

body .workspace{padding-top:12px}
body .app-footer .sync-status{display:flex;align-items:center;gap:6px}

/* Sexta e finais de semana compactos, com os mesmos limites no cabeçalho e na grade. */
body .weekdays span:nth-child(1),body .weekdays span:nth-child(6),body .weekdays span:nth-child(7){font-size:10px;letter-spacing:0;overflow-wrap:anywhere}
body .calendar-grid .day:nth-child(7n+1) .sheet-closure,body .calendar-grid .day:nth-child(7n+6) .sheet-closure,body .calendar-grid .day:nth-child(7n) .sheet-closure{padding-left:5px;padding-right:5px;font-size:10px}
