/* Ajustes de controles; las acciones y colores semánticos se conservan. */
body :is(.head-actions,.heading-actions,.card-actions,.report-actions,.cg-order-actions,.cg-auth-actions,.cg-attachment-actions){display:flex;flex-wrap:wrap;align-items:center;gap:8px}
body :is(button,summary){touch-action:manipulation}
body :is(.head-actions,.heading-actions,.card-actions,.report-actions,.cg-order-actions,.cg-auth-actions,.cg-attachment-actions) button{min-height:44px!important;min-width:44px;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:7px;line-height:1.35!important;border-radius:10px!important;white-space:normal;word-break:normal;overflow-wrap:normal;padding:10px 14px!important;margin:0!important}
body :is(.segment,.cg-p4-rounds,.cf-report-presets,.cg-qty-switch){gap:6px!important;align-items:stretch}
body :is(.segment,.cg-p4-rounds) button{min-height:44px!important;flex:1 1 0;min-width:0;line-height:1.3!important;word-break:normal;overflow-wrap:normal;padding:9px 8px!important}
body :is(button,summary,a):focus-visible{outline:3px solid #ef8a34!important;outline-offset:3px}
body button:disabled{cursor:not-allowed}
body .cg-date-control{position:relative;display:flex;align-items:stretch;width:100%;min-width:0;max-width:100%;box-sizing:border-box}
body .cg-date-control>input[type=date]{box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;min-height:46px!important;padding-right:50px!important;margin:0!important;font-variant-numeric:tabular-nums}
body .cg-date-control input::-webkit-calendar-picker-indicator{display:none}
body .cg-date-control>.cg-date-trigger{position:absolute!important;inset:1px 1px 1px auto!important;width:44px!important;min-width:44px!important;min-height:44px!important;height:auto!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:0!important;margin:0!important;border:0!important;border-radius:0 9px 9px 0!important;background:transparent!important;color:#64748b!important;box-shadow:none!important;transform:none!important}
body .cg-date-trigger svg{width:21px;height:21px;pointer-events:none}
body .cg-date-trigger:hover{color:#c76517!important;background:#fff5eb!important}
body dialog.cg-date-dialog{box-sizing:border-box!important;position:fixed!important;inset:0!important;margin:auto!important;width:360px!important;max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;min-width:0!important;height:fit-content!important;min-height:0!important;border:1px solid #e4e8ee!important;border-radius:20px!important;padding:20px!important;background:#fff!important;color:#263449!important;box-shadow:0 24px 90px #0f172a38!important;overflow:auto!important;font-family:Inter,system-ui,sans-serif!important}
body dialog.cg-date-dialog:not([open]){display:none!important}
body dialog.cg-date-dialog::backdrop{background:#14243b80;backdrop-filter:blur(3px)}
.cg-date-heading{display:flex;align-items:center;gap:12px;margin-bottom:18px}
.cg-date-heading>div{flex:1;min-width:0}
.cg-date-heading span{display:block;font-size:10px;font-weight:700;letter-spacing:.1em;color:#7d899b}
body .cg-date-heading h2{font-size:18px!important;font-weight:700!important;line-height:1.35!important;margin:5px 0 0!important;color:#263449!important;overflow-wrap:anywhere}
body .cg-date-dialog button{box-sizing:border-box!important;display:flex!important;align-items:center!important;justify-content:center!important;min-width:0!important;min-height:44px!important;height:44px!important;padding:0!important;margin:0!important;border:1px solid transparent!important;border-radius:10px!important;background:#f5f7fa!important;color:#48566d!important;font:600 14px Inter,system-ui,sans-serif!important;box-shadow:none!important;line-height:1!important;cursor:pointer!important;transition:background .12s!important;transform:none!important}
body .cg-date-heading>button{width:44px!important;flex:none;font-size:25px!important}
.cg-date-nav{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:6px;align-items:center;margin-bottom:14px}
.cg-date-nav>div{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:4px;min-width:0}
body .cg-date-nav select{box-sizing:border-box!important;width:100%!important;min-width:0!important;min-height:44px!important;padding:6px 4px!important;background:#fff!important;color:#263449!important;border:1px solid #e1e6ee!important;border-radius:8px!important;font:600 14px Inter,system-ui,sans-serif!important}
body .cg-date-nav>button{font-size:25px!important}
.cg-date-week,.cg-date-days{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:3px!important;width:100%;min-width:0}
.cg-date-week{margin-bottom:6px}
.cg-date-week span{text-align:center;color:#8a95a5;font-size:11px;font-weight:700;padding:5px 0}
body .cg-date-days button{width:100%!important;min-height:40px!important;height:40px!important;background:transparent!important;font-variant-numeric:tabular-nums}
body .cg-date-days button:hover:not(:disabled){background:#fff0e2!important;color:#ad5515!important}
body .cg-date-days button[aria-current=date]{border-color:#f1c49f!important;color:#bd601b!important}
body .cg-date-days button[aria-pressed=true]{background:#ed7d24!important;color:#fff!important;border-color:#ed7d24!important}
body .cg-date-dialog button:disabled{opacity:.3!important;cursor:not-allowed!important}
.cg-date-selected{font-size:12px;line-height:1.5;color:#7a8699;min-height:18px;margin:14px 0!important}
.cg-date-footer{display:flex;gap:8px;border-top:1px solid #edf0f5;padding-top:14px}
body .cg-date-footer button{flex:1;min-width:0!important;font-size:12px!important}
body .cg-date-footer button[hidden]{display:none!important}
@media(max-width:780px){
 body :is(.heading-actions,.head-actions,.report-actions,.cg-order-actions,.cg-auth-actions,.cg-attachment-actions)>button{flex:1 1 125px;max-width:100%}
 body .cg-schedule-row{grid-template-columns:minmax(0,1fr)!important;gap:14px!important}
 body :is(.segment,.cg-p4-rounds){width:100%!important;min-width:0;box-sizing:border-box}
 body .cg-date-control>input[type=date]{font-size:16px!important;line-height:1.4!important}
 body .cg-date-nav select{font-size:16px!important}
 body .cg-date-dialog{padding:16px!important}
 body .cg-date-days button{height:42px!important;min-height:42px!important}
}
@media(max-height:500px){body dialog.cg-date-dialog{width:400px!important;padding:12px!important}.cg-date-heading{margin-bottom:8px}.cg-date-nav{margin-bottom:4px}.cg-date-week{margin-bottom:0}body .cg-date-days button{height:32px!important;min-height:32px!important}.cg-date-selected{margin:7px 0!important}}
@media(prefers-reduced-motion:reduce){body .cg-date-dialog button{transition:none!important}}
@media print{body .cg-date-trigger,body dialog.cg-date-dialog{display:none!important}}
@media(max-width:360px){
 .cg-date-nav{grid-template-columns:44px minmax(0,1fr) 44px;row-gap:8px}
 .cg-date-nav>div{grid-column:1 / -1;grid-row:1;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr)}
 .cg-date-nav>[data-prev]{grid-column:1;grid-row:2}
 .cg-date-nav>[data-next]{grid-column:3;grid-row:2}
}
@media(max-width:780px){
 body header.cg-tools-compact .cg-options-menu{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;flex:1 1 100%!important;margin:0!important}
 body header.cg-tools-compact .cg-options-menu>summary{display:flex!important;width:100%!important;min-width:0!important;box-sizing:border-box!important;white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important;min-height:44px!important}
 body .segment:has(>button:nth-child(3)):not(:has(>button:nth-child(4))){display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:780px){body header.cg-tools-compact .cg-options-menu{grid-column:1 / -1!important;justify-self:stretch!important}}
