/* Agenda (calendario, cuadrillas, rutas y viáticos) y Clientes. Usa los tokens de brand.css (--vc-*). */
.ag { --ag-line: var(--vc-linea, #E8E3D9); --ag-line-2: var(--vc-linea-suave, #F0ECE4); --ag-now: #E5483D; --ag-off: rgba(236, 231, 219, .45); display: flex; flex-direction: column; min-width: 0; }
.ag.is-cal { height: 100vh; height: 100dvh; overflow: hidden; }
.ag-head { display: flex; align-items: center; gap: 12px; padding: 18px clamp(16px, 2.4vw, 28px) 8px; flex-wrap: wrap; }
.ag-head h1 { font-size: 1.5rem; margin-right: auto; }
.ag-head .tabs { margin: 0; }
.ag-route, .ag-store { padding: 10px clamp(16px, 2.4vw, 28px) 48px; animation: vcRise .4s var(--vc-ease) backwards; }
.ag-cal-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* ───── barra del calendario ───── */
.ag-bar { display: flex; align-items: center; gap: 8px; padding: 4px clamp(16px, 2.4vw, 28px) 12px; }
.ag-bar .btn-sm { min-height: 38px; padding: 0 16px; }
.ag-nav { display: flex; }
.ag-nav .btn-icon { border-radius: 50%; }
.ag-period { font-size: 1.3125rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 0 auto; max-width: 40%; }
.ag-period::first-letter { text-transform: uppercase; }
.ag-break { display: none; }
.ag-loading { width: 16px; height: 16px; flex: none; border: 2px solid var(--vc-oro); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.ag-search { width: 220px; flex: 0 1 220px; min-width: 120px; }
.ag-search .input { min-height: 40px; height: 40px; border-radius: 999px; font-size: 0.875rem; padding-left: 40px; background: #fff; }
.ag-search svg.lead { left: 13px; width: 18px; height: 18px; }
.ag-views { display: flex; background: #ECEAE4; padding: 3px; border-radius: 12px; gap: 2px; flex: none; }
.ag-views button { border: 0; background: none; padding: 7px 11px; border-radius: 9px; font-weight: 600; font-size: 0.8438rem; color: var(--vc-texto-2); cursor: pointer; transition: background var(--vc-t1), color var(--vc-t1), box-shadow var(--vc-t1); }
.ag-views button:hover { color: var(--vc-texto); }
.ag-views button[aria-selected="true"] { background: #fff; color: var(--vc-texto); box-shadow: var(--vc-sh-1); }

/* ───── cuerpo: barra lateral + vista ───── */
.ag-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 268px minmax(0, 1fr); padding: 0 clamp(10px, 1.4vw, 20px) 14px 0; }
.ag-side { overflow-y: auto; padding: 0 14px 16px clamp(16px, 2.4vw, 28px); display: flex; flex-direction: column; gap: 16px; scrollbar-width: thin; }
.ag-side-sec h4 { font-size: 0.7188rem; text-transform: uppercase; letter-spacing: .12em; color: var(--vc-texto-3); margin: 0 0 6px 8px; font-family: var(--vc-font-ui); }
.ag-side-set { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; text-decoration: none; }
.ag-cal, .ag-crew { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border-radius: 10px; cursor: pointer; font-size: 0.875rem; border: 0; background: none; text-align: left; color: inherit; font: inherit; transition: background var(--vc-t1); }
.ag-cal:hover, .ag-crew:hover { background: rgba(255, 255, 255, .7); }
.ag-cal input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ag-cal-box { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--c); background: var(--c); display: grid; place-items: center; flex: none; transition: background var(--vc-t1); }
.ag-cal input:not(:checked) + .ag-cal-box { background: transparent; }
.ag-cal input:checked + .ag-cal-box::after { content: ''; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translate(0, -1px) rotate(-45deg); }
.ag-cal input:focus-visible + .ag-cal-box { outline: 3px solid var(--vc-foco); outline-offset: 2px; }
.ag-cal .gi { color: var(--vc-texto-3); }
.ag-crew[aria-pressed="true"] { background: var(--vc-sel); font-weight: 600; }
.ag-view { min-height: 0; display: flex; flex-direction: column; background: var(--vc-papel); border: 1px solid var(--ag-line); border-radius: 20px; box-shadow: var(--vc-sh-2); overflow: hidden; }
.ag-view.ag-v-agenda, .ag-view.ag-v-search { background: #FDFCFA; }
@keyframes agNext { from { opacity: .35; transform: translateX(28px); } }
@keyframes agPrev { from { opacity: .35; transform: translateX(-28px); } }
.ag-anim-next { animation: agNext .3s var(--vc-ease); }
.ag-anim-prev { animation: agPrev .3s var(--vc-ease); }

/* ───── minicalendario ───── */
.ag-mini { padding: 2px 0; }
.ag-mini-head { display: flex; align-items: center; gap: 2px; padding: 0 2px 6px 8px; }
.ag-mini-head strong { flex: 1; font-size: 0.875rem; text-transform: capitalize; }
.ag-mini-nav { width: 30px; height: 30px; border-radius: 50%; border: 0; background: none; font-size: 1.125rem; cursor: pointer; color: var(--vc-texto-2); }
.ag-mini-nav:hover { background: rgba(255, 255, 255, .8); }
.ag-mini-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 1px; }
.ag-mini-w { font-size: 0.6563rem; color: var(--vc-texto-3); text-align: center; font-weight: 700; padding: 3px 0; }
.ag-mini-d { position: relative; width: 30px; height: 30px; margin: 0 auto; border-radius: 50%; border: 0; background: none; font-size: 0.75rem; cursor: pointer; color: var(--vc-texto); font-variant-numeric: tabular-nums; transition: background var(--vc-t1); }
.ag-mini-d:hover { background: rgba(255, 255, 255, .9); }
.ag-mini-d.in-range { background: rgba(253, 178, 7, .14); }
.ag-mini-d.is-out { color: var(--vc-texto-3); }
.ag-mini-d.is-sel { background: #F6DFA1; font-weight: 700; }
.ag-mini-d.is-today { background: var(--vc-oro); color: var(--vc-negro); font-weight: 800; }
.ag-mini-d.has-ev::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--vc-oro-hondo); }
.ag-mini-d.is-today.has-ev::after { background: var(--vc-negro); }

/* ───── rejilla de horas ───── */
.ag-tg { --gut: 58px; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ag-gut { width: var(--gut); }
.ag-tg-head { display: grid; grid-template-columns: var(--gut) repeat(var(--n), minmax(0, 1fr)); overflow-y: hidden; scrollbar-gutter: stable; }
.ag-tz { font-size: 0.5938rem; color: var(--vc-texto-3); align-self: end; text-align: right; padding: 0 8px 8px 0; }
.ag-dh { display: grid; justify-items: center; gap: 1px; padding: 10px 0 6px; background: none; border: 0; cursor: pointer; color: var(--vc-texto-2); font: inherit; }
.ag-dh-w { font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.ag-dh-n { font-family: var(--vc-font-display); font-size: 1.5rem; font-weight: 700; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--vc-texto); transition: background var(--vc-t1), transform var(--vc-t2) var(--vc-spring); }
.ag-dh:hover .ag-dh-n { background: var(--vc-hover); }
.ag-dh.is-past .ag-dh-n { color: var(--vc-texto-3); }
.ag-dh.is-today .ag-dh-w { color: var(--vc-oro-texto); }
.ag-dh.is-today .ag-dh-n { background: var(--vc-grad-oro); color: var(--vc-negro); box-shadow: var(--vc-sh-oro); }
.ag-ad { display: grid; grid-template-columns: var(--gut) minmax(0, 1fr); border-bottom: 1px solid var(--ag-line); overflow-y: hidden; scrollbar-gutter: stable; box-shadow: 0 6px 10px -10px rgba(28, 22, 10, .35); position: relative; z-index: 2; }
.ag-ad-lbl { font-size: 0.625rem; color: var(--vc-texto-3); text-align: right; padding: 6px 8px 0 0; line-height: 1.1; }
.ag-ad-area { position: relative; min-height: calc(var(--lanes) * 24px + 6px); max-height: 130px; overflow-y: auto; }
.ag-ad-col { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--ag-line-2); pointer-events: none; }
.ag-adbar { position: absolute; height: 21px; border: 0; border-radius: 6px; background: var(--c); color: var(--ink); font: 600 0.75rem/21px var(--vc-font-ui); padding: 0 8px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; box-shadow: 0 1px 2px rgba(28, 22, 10, .12); transition: filter var(--vc-t1), transform var(--vc-t1); }
.ag-adbar:hover { filter: brightness(.96); }
.ag-tg-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; overscroll-behavior: contain; scrollbar-width: thin; }
.ag-tg-body { position: relative; display: grid; grid-template-columns: var(--gut) minmax(0, 1fr); }
.ag-hours { position: relative; }
.ag-hours span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 0.6563rem; color: var(--vc-texto-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ag-cols { position: relative; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: default;
  background-image: linear-gradient(to bottom, var(--ag-line-2) 1px, transparent 1px); background-size: 100% 48px; }
.ag-cols::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, var(--ag-off) 0, var(--ag-off) var(--ws), transparent var(--ws), transparent var(--we), var(--ag-off) var(--we)); }
.ag-col { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--ag-line-2); }
.ag-col.is-today { background: rgba(253, 178, 7, .045); }
.ag-ev { position: absolute; display: flex; flex-direction: column; gap: 1px; border-radius: 7px; background: var(--c); color: var(--ink); padding: 3px 7px 2px; font-size: 0.75rem; line-height: 1.25; overflow: hidden; cursor: grab;
  box-shadow: 0 0 0 1px #fff, 0 1px 2px rgba(28, 22, 10, .14); transition: box-shadow var(--vc-t1), filter var(--vc-t1); animation: vcFade .25s ease-out; }
.ag-ev:hover { z-index: 3; box-shadow: 0 0 0 1px #fff, 0 8px 18px -8px rgba(28, 22, 10, .5); }
.ag-ev:active { cursor: grabbing; }
.ag-ev:focus-visible { outline: 2px solid var(--vc-negro); outline-offset: 1px; }
.ag-ev-t { font-weight: 650; display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-ev-t .gi { flex: none; opacity: .85; }
.ag-ev-m { opacity: .88; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.7188rem; }
.ag-ev.is-short { flex-direction: row; align-items: center; gap: 6px; padding-top: 0; padding-bottom: 0; }
.ag-ev.is-short .ag-ev-t { flex: 0 1 auto; min-width: 0; }
.ag-ev.is-ro { cursor: pointer; }
.ag-ev.is-done, .ag-m-ev.is-done.is-bar, .ag-adbar.is-done { filter: saturate(.55); opacity: .78; }
.ag-ev.is-cancel, .ag-adbar.is-cancel { background: repeating-linear-gradient(135deg, #fff 0 6px, #F4F1EA 6px 11px); color: var(--vc-texto-3); text-decoration: line-through; box-shadow: inset 0 0 0 1px var(--c), 0 0 0 1px #fff; }
.ag-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; cursor: ns-resize; }
.ag-resize::after { content: ''; position: absolute; left: 50%; bottom: 2px; width: 18px; height: 3px; margin-left: -9px; border-radius: 3px; background: currentColor; opacity: 0; transition: opacity var(--vc-t1); }
.ag-ev:hover .ag-resize::after { opacity: .5; }
.ag-ghost { position: absolute; z-index: 6; border-radius: 7px; background: rgba(253, 178, 7, .28); border: 2px solid var(--c, var(--vc-oro-hondo)); box-shadow: var(--vc-sh-2); pointer-events: none; }
.ag-ghost span { display: block; font-size: 0.7188rem; font-weight: 700; padding: 2px 6px; color: var(--vc-texto); }
.ag-now { position: absolute; height: 2px; margin-top: -1px; background: var(--ag-now); z-index: 5; pointer-events: none; }
.ag-now::before { content: ''; position: absolute; left: -6px; top: -5px; width: 12px; height: 12px; border-radius: 50%; background: var(--ag-now); box-shadow: 0 0 0 3px rgba(229, 72, 61, .18); }

/* ───── mes ───── */
.ag-month { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ag-m-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--ag-line); }
.ag-m-head span { text-align: center; font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--vc-texto-3); padding: 9px 0 7px; }
.ag-m-body { flex: 1; min-height: 0; display: grid; grid-template-rows: repeat(var(--rows), minmax(0, 1fr)); user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.ag-m-week { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--ag-line-2); min-height: 0; overflow: hidden; }
.ag-m-week:last-child { border-bottom: 0; }
.ag-m-cell { border-left: 1px solid var(--ag-line-2); padding: 3px; cursor: pointer; transition: background var(--vc-t1); }
.ag-m-cell:first-child { border-left: 0; }
.ag-m-cell:hover { background: var(--vc-hover); }
.ag-m-cell.is-out { background: #FBFAF6; }
.ag-m-cell.is-out .ag-m-num { color: var(--vc-texto-3); }
.ag-m-cell.is-drop { background: var(--vc-sel); box-shadow: inset 0 0 0 2px var(--vc-oro); }
.ag-m-num { display: grid; place-items: center; margin: 0 auto; min-width: 26px; height: 24px; padding: 0 7px; border-radius: 12px; border: 0; background: none; font: 600 0.7813rem var(--vc-font-ui); color: var(--vc-texto); cursor: pointer; }
.ag-m-num:hover { background: rgba(0, 0, 0, .05); }
.ag-m-cell.is-today .ag-m-num { background: var(--vc-oro); color: var(--vc-negro); font-weight: 800; }
.ag-m-ev { position: absolute; height: 19px; display: flex; align-items: center; gap: 4px; border: 0; border-radius: 5px; padding: 0 6px; font: 500 0.75rem/19px var(--vc-font-ui); background: transparent; color: var(--vc-texto); cursor: pointer; text-align: left; white-space: nowrap; overflow: hidden; transition: background var(--vc-t1); }
.ag-m-ev:hover { background: rgba(0, 0, 0, .05); }
.ag-m-ev.is-bar { background: var(--c); color: var(--ink); font-weight: 600; }
.ag-m-ev.is-bar:hover { filter: brightness(.96); }
.ag-m-ev.is-cancel .ag-m-title { text-decoration: line-through; color: var(--vc-texto-3); }
.ag-m-time { color: var(--vc-texto-3); font-size: 0.7188rem; flex: none; }
.ag-m-title { overflow: hidden; text-overflow: ellipsis; }
.ag-m-more { position: absolute; height: 19px; border: 0; background: none; text-align: left; padding: 0 6px; font: 700 0.75rem var(--vc-font-ui); color: var(--vc-texto-2); border-radius: 5px; cursor: pointer; }
.ag-m-more:hover { background: rgba(0, 0, 0, .06); }
.is-dragging .ag-m-ev { pointer-events: none; }
.ag-daylist { padding: 14px; display: grid; gap: 3px; }
.ag-daylist-h { display: grid; justify-items: center; margin-bottom: 8px; }
.ag-daylist-h span { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: .08em; color: var(--vc-texto-3); font-weight: 700; }
.ag-daylist-h strong { font-family: var(--vc-font-display); font-size: 1.625rem; }

/* ───── lista (agenda) ───── */
.ag-list { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 0 20px; }
.ag-li-day { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; padding: 10px 18px; border-bottom: 1px solid var(--ag-line-2); animation: vcRise .35s var(--vc-ease) backwards; }
.ag-li-date { display: flex; align-items: center; gap: 6px; align-self: start; padding-top: 2px; }
.ag-li-n { font-family: var(--vc-font-display); font-size: 1.3125rem; font-weight: 700; min-width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; }
.ag-li-day.is-today .ag-li-n { background: var(--vc-grad-oro); box-shadow: var(--vc-sh-oro); }
.ag-li-w { font-size: 0.7188rem; text-transform: uppercase; letter-spacing: .06em; color: var(--vc-texto-3); font-weight: 700; }
.ag-li-items { display: grid; gap: 2px; grid-template-columns: minmax(0, 1fr); }
.ag-li { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 12px; cursor: pointer; font: inherit; color: inherit; transition: background var(--vc-t1); }
.ag-li:hover { background: var(--vc-hover); }
.ag-li-bar { width: 4px; align-self: stretch; border-radius: 4px; flex: none; }
.ag-li-time { width: 168px; flex: none; font-size: 0.8125rem; color: var(--vc-texto-2); font-variant-numeric: tabular-nums; }
.ag-li > .grow { min-width: 0; }
.ag-li-t { display: block; font-weight: 600; overflow-wrap: anywhere; }
.ag-li-t .gi { color: var(--vc-texto-3); vertical-align: -2px; margin-right: 2px; }
.ag-li-m { display: block; font-size: 0.7813rem; color: var(--vc-texto-3); margin-top: 1px; }
.ag-li.is-cancel .ag-li-t { text-decoration: line-through; color: var(--vc-texto-3); }
.ag-li-none { padding: 10px; }
.ag-li-more { display: flex; justify-content: center; padding: 18px; }

/* ───── estados ───── */
.ag-st { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 0.7188rem; font-weight: 650; white-space: nowrap; border: 1.5px solid transparent; background: #F1EEE7; color: #59554D; font-family: var(--vc-font-ui); }
.st-confirmado { background: var(--vc-info-bg); color: var(--vc-info); }
.st-en_curso { background: var(--vc-aviso-bg); color: var(--vc-aviso); }
.st-hecho { background: var(--vc-ok-bg); color: var(--vc-ok); }
.st-cancelado { background: var(--vc-error-bg); color: var(--vc-error); }
button.ag-st { cursor: pointer; padding: 4px 10px; transition: transform var(--vc-t1) var(--vc-spring), border-color var(--vc-t1); }
button.ag-st:hover { transform: translateY(-1px); }
button.ag-st[aria-pressed="true"] { border-color: currentColor; }

/* ───── botón flotante (celular) ───── */
.ag-fab { position: fixed; right: 18px; bottom: calc(94px + env(safe-area-inset-bottom, 0px)); width: 58px; height: 58px; border-radius: 19px; border: 0; background: var(--vc-grad-oro); color: var(--vc-negro); display: grid; place-items: center; z-index: 65; cursor: pointer;
  box-shadow: var(--vc-sh-oro), 0 14px 28px -10px rgba(200, 120, 0, .7); animation: vcPop .45s var(--vc-spring) backwards .1s; }
.ag-fab:active { transform: scale(.95); }

/* ───── ventanita (popover) ───── */
.ag-pop-wrap { position: fixed; inset: 0; z-index: 1950; }
.ag-pop-scrim { position: absolute; inset: 0; }
.ag-pop { position: absolute; background: #fff; border-radius: 20px; border: 1px solid var(--ag-line); box-shadow: var(--vc-sh-3); max-height: calc(100vh - 24px); overflow: auto; padding-bottom: 12px; animation: vcPop .22s var(--vc-ease); }
.ag-pop.is-sheet { left: 0; right: 0; bottom: 0; border-radius: 24px 24px 0 0; max-height: 86dvh; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); animation: vcSheet .32s var(--vc-ease); }
.ag-pop-wrap:has(.is-sheet) .ag-pop-scrim { background: rgba(11, 12, 14, .42); animation: vcFade .2s; }
.ag-pop-bar { display: flex; gap: 2px; padding: 8px 8px 0; }
.ag-pop-main { display: flex; gap: 14px; padding: 2px 22px 12px; }
.ag-pop-sq { width: 16px; height: 16px; border-radius: 5px; margin-top: 6px; flex: none; }
.ag-pop-title { font-size: 1.3125rem; line-height: 1.22; word-break: break-word; }
.ag-pop-when { font-size: 0.8438rem; color: var(--vc-texto-2); margin-top: 4px; }
.ag-pop-when::first-letter { text-transform: uppercase; }
.ag-pop-rows { display: grid; gap: 11px; padding: 2px 22px 6px; }
.ag-pop-row { display: flex; gap: 14px; align-items: flex-start; font-size: 0.875rem; }
.ag-pop-row > .gi { color: var(--vc-texto-3); margin-top: 1px; flex: none; }
.ag-pop-status { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 22px 2px; margin-top: 8px; border-top: 1px solid var(--ag-line-2); }
.ag-pop-foot { display: flex; gap: 8px; padding: 10px 22px 0; flex-wrap: wrap; }
.ag-notes { white-space: pre-wrap; word-break: break-word; }

/* ───── hoja (editor y ajustes) ───── */
.ag-sheet-wrap { position: fixed; inset: 0; z-index: 1900; }
.ag-sheet-scrim { position: absolute; inset: 0; background: rgba(11, 12, 14, .42); animation: vcFade var(--vc-t2) ease-out; }
.ag-sheet { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--fondo); display: flex; flex-direction: column; box-shadow: var(--vc-sh-3); animation: vcDrawer .36s var(--vc-ease); }
.ag-sheet.wide { width: min(700px, 100vw); }
.ag-grab { display: none; }
.ag-sheet-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 12px 22px; background: #fff; border-bottom: 1px solid var(--ag-line); }
.ag-sheet-head h2 { font-size: 1.1875rem; }
.ag-sheet-body { flex: 1; overflow-y: auto; padding: 18px 22px 30px; display: grid; gap: 14px; align-content: start; grid-template-columns: minmax(0, 1fr); grid-auto-rows: max-content; overscroll-behavior: contain; }
.ag-sheet-foot { display: flex; gap: 10px; align-items: center; padding: 12px 22px calc(12px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--ag-line); flex-wrap: wrap; box-shadow: 0 -10px 24px -18px rgba(28, 22, 10, .3); }
.ag-sheet .input { min-height: 44px; }
.ag-sheet select.input { height: 44px; min-height: 44px; }

.ag-ed-title { width: 100%; border: 0; border-bottom: 2px solid var(--ag-line); background: transparent; font: 700 1.5rem/1.25 var(--vc-font-display); padding: 4px 2px 10px; outline: none; color: var(--vc-texto); transition: border-color var(--vc-t2); border-radius: 0; }
.ag-ed-title:focus { border-color: var(--vc-oro); }
.ag-ed-title:focus-visible { outline: none; }
.ag-ed-title::placeholder { color: var(--acero-300, #C6C0B3); }
.ag-types { display: flex; gap: 6px; flex-wrap: wrap; }
.ag-type { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--acero-200, #E1DCD1); background: #fff; border-radius: 999px; padding: 6px 12px 6px 10px; font: 600 0.8125rem var(--vc-font-ui); color: var(--vc-texto-2); cursor: pointer; white-space: nowrap; transition: background var(--vc-t1), border-color var(--vc-t1), color var(--vc-t1), transform var(--vc-t1); }
.ag-type:hover { border-color: var(--acero-400, #9C968A); }
.ag-type .gi { color: var(--vc-oro-hondo); }
.ag-type[aria-checked="true"] { background: var(--vc-negro); border-color: var(--vc-negro); color: #fff; box-shadow: 0 4px 12px -4px rgba(11, 12, 14, .45); }
.ag-type[aria-checked="true"] .gi { color: var(--vc-oro); }
.ag-ed-row { display: flex; gap: 14px; align-items: flex-start; padding-top: 14px; border-top: 1px solid var(--ag-line-2); }
.ag-ed-ic { width: 36px; height: 36px; border-radius: 11px; background: #fff; border: 1px solid var(--ag-line); display: grid; place-items: center; color: var(--vc-oro-texto); flex: none; margin-top: 4px; box-shadow: var(--vc-sh-1); }
.ag-ed-f { display: grid; gap: 10px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.ag-when { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ag-when-sep { color: var(--vc-texto-3); }
.ag-date { flex: 1 1 150px; width: auto; min-width: 0; }
.ag-time { flex: 0 0 142px; width: 142px; }
.ag-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ag-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ag-fld { display: grid; gap: 5px; font-size: 0.8125rem; font-weight: 600; color: var(--acero-700, #3E3B35); min-width: 0; align-content: start; }
.ag-fld > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-picked { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 12px; background: #fff; border: 1.5px solid var(--acero-200, #E1DCD1); border-radius: 12px; min-height: 48px; animation: vcFade .2s; }
.ag-picked .gi { color: var(--vc-oro-texto); }
.ag-unreg { padding: 12px; border-radius: 14px; background: var(--vc-aviso-bg); border: 1px dashed #F0C987; }
.ag-custom { background: #fff; border: 1px solid var(--ag-line); border-radius: 14px; padding: 14px; display: grid; gap: 10px; animation: vcRise .25s var(--vc-ease); }
.ag-num { width: 84px !important; flex: none; }
.ag-sel { width: auto; flex: 1 1 140px; }
.ag-wdays { display: flex; gap: 6px; flex-wrap: wrap; }
.ag-wdays button { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--acero-200, #E1DCD1); background: #fff; font: 700 0.7813rem var(--vc-font-ui); cursor: pointer; transition: background var(--vc-t1), transform var(--vc-t1) var(--vc-spring); }
.ag-wdays button[aria-pressed="true"] { background: var(--vc-oro); border-color: var(--vc-oro-hondo); transform: scale(1.04); }
.ag-radios { display: grid; gap: 8px; }
.ag-radio { display: flex; align-items: center; gap: 10px; font-size: 0.875rem; flex-wrap: wrap; cursor: pointer; }
.ag-radio input[type="radio"] { width: 18px; height: 18px; accent-color: var(--vc-oro-hondo); margin: 0; }
.ag-radio .input { min-height: 40px; height: 40px; }
.ag-people { display: flex; flex-wrap: wrap; gap: 6px; }
.ag-person { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; padding: 2px 10px 2px 2px; border-radius: 999px; background: var(--vc-arena); }
.ag-person.is-chip { background: #fff; border: 1px solid var(--ag-line); padding-right: 4px; }
.ag-person button, .ag-chip button { border: 0; background: none; cursor: pointer; font-size: 1.0625rem; line-height: 1; padding: 0 4px; color: var(--vc-texto-3); border-radius: 50%; }
.ag-person button:hover, .ag-chip button:hover { color: var(--vc-error); }
.ag-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 11px; border-radius: 999px; background: #fff; border: 1px solid var(--ag-line); font-size: 0.8125rem; }
.ag-chip .gi { color: var(--vc-oro-texto); }
.ag-more > summary { cursor: pointer; font-size: 0.8125rem; font-weight: 600; color: var(--vc-oro-texto); padding: 2px 0; }
.ag-more[open] > summary { margin-bottom: 8px; }
.ag-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.ag-badge { font-size: 0.6875rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--vc-aviso-bg); color: var(--vc-aviso); }

/* buscador con lista */
.ag-combo { position: relative; }
.ag-combo .input-wrap svg.lead { width: 19px; height: 19px; }
.ag-combo-list { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; z-index: 40; background: #fff; border: 1px solid var(--ag-line); border-radius: 14px; box-shadow: var(--vc-sh-3); max-height: 300px; overflow-y: auto; padding: 6px; animation: vcPop .16s var(--vc-ease); }
.ag-combo-item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 10px; cursor: pointer; font: inherit; color: inherit; min-width: 0; }
.ag-combo-item[aria-selected="true"] { background: var(--vc-sel); }
.ag-combo-item .gi { color: var(--vc-oro-texto); flex: none; }
.ag-combo-t { display: block; font-weight: 600; font-size: 0.875rem; }
.ag-combo-s { display: block; font-size: 0.7813rem; color: var(--vc-texto-3); }
.ag-combo-empty { padding: 10px 12px; font-size: 0.8125rem; color: var(--vc-texto-3); }

/* colores e interruptor */
.ag-swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.ag-sw { --c: #9C968A; position: relative; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); transition: transform var(--vc-t2) var(--vc-spring); }
.ag-sw:hover { transform: scale(1.14); }
.ag-sw[aria-checked="true"]::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--c); }
.ag-sw.none { background: conic-gradient(#D50000, #F6BF26, #33B679, #039BE5, #8E24AA, #D50000); }
.ag-sw.none[aria-checked="true"]::after { border-color: var(--vc-negro); }
.ag-toggle { position: relative; display: inline-flex; gap: 10px; align-items: center; cursor: pointer; font-size: 0.875rem; font-weight: 500; }
.ag-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ag-toggle-ui { width: 40px; height: 24px; border-radius: 999px; background: var(--acero-300, #C6C0B3); position: relative; flex: none; transition: background var(--vc-t2); }
.ag-toggle-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform var(--vc-t2) var(--vc-spring); }
.ag-toggle input:checked + .ag-toggle-ui { background: var(--vc-oro); }
.ag-toggle input:checked + .ag-toggle-ui::after { transform: translateX(16px); }
.ag-toggle input:focus-visible + .ag-toggle-ui { outline: 3px solid var(--vc-foco); outline-offset: 2px; }

/* ───── ajustes ───── */
.ag-set-sec { background: #fff; border: 1px solid var(--ag-line); border-radius: 18px; padding: 16px; display: grid; gap: 12px; box-shadow: var(--vc-sh-1); grid-template-columns: minmax(0, 1fr); }
.ag-set-sec h3 { display: flex; align-items: center; gap: 8px; }
.ag-set-sec h3 .gi { color: var(--vc-oro-texto); }
.ag-set-item { border: 1px solid var(--ag-line-2); border-radius: 14px; padding: 10px 10px 10px 12px; display: grid; gap: 8px; }
.ag-set-item.row { display: flex; }
.ag-set-item.is-off { opacity: .6; }
.ag-sq { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.ag-ics { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ag-ics .input { flex: 1 1 240px; min-height: 36px; height: 36px; font-size: 0.75rem; padding: 6px 10px; }
.ag-set-form { display: grid; gap: 10px; padding: 12px; border-radius: 14px; background: var(--vc-arena); grid-template-columns: minmax(0, 1fr); animation: vcRise .25s var(--vc-ease); }
.ag-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; max-height: 270px; overflow-y: auto; }
.ag-member { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 10px; background: #fff; border: 1.5px solid transparent; cursor: pointer; font-size: 0.8438rem; min-width: 0; }
.ag-member input { accent-color: var(--vc-oro-hondo); }
.ag-member.is-on { border-color: var(--vc-oro); background: var(--vc-crema); }
.ag-map { height: 380px; }
.ag-map-sm { height: 240px; }

/* ───── rutas y viáticos ───── */
.ag-route-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px; align-items: start; }
.ag-route-cols > .stack { gap: 16px; }
.ag-route-opts { display: flex; gap: 16px; flex-wrap: wrap; padding: 12px 18px 2px; }
.ag-gain { margin: 10px 18px 0; padding: 10px 12px; background: var(--vc-ok-bg); color: var(--vc-ok); border-radius: 12px; font-size: 0.8438rem; animation: vcRise .3s var(--vc-ease); }
.ag-stops { list-style: none; margin: 0; padding: 8px 10px 12px; display: grid; gap: 2px; }
.ag-stop { display: flex; align-items: center; gap: 10px; padding: 7px 6px 7px 8px; border-radius: 12px; transition: background var(--vc-t1); animation: vcRise .3s var(--vc-ease) backwards; min-width: 0; }
.ag-stop > .grow { min-width: 0; }
.ag-stop:hover { background: var(--vc-hover); }
.ag-stop-n { width: 28px; height: 28px; border-radius: 50%; background: var(--vc-grad-oro); color: var(--vc-negro); font: 800 0.8125rem var(--vc-font-display); display: grid; place-items: center; flex: none; box-shadow: var(--vc-sh-oro); }
.ag-stop.is-base .ag-stop-n { background: var(--vc-negro); color: var(--vc-oro); box-shadow: none; }
.ag-stop .btn-icon { width: 32px; min-height: 32px; border-radius: 10px; }
.ag-up svg, .ag-down svg { transform: rotate(90deg); }
.ag-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 14px 6px; }
.ag-kpis > div { padding: 2px 14px; border-left: 1px solid var(--ag-line-2); display: grid; gap: 2px; min-width: 0; }
.ag-kpis > div:first-child { border-left: 0; }
.ag-kpis span { font-size: 0.6875rem; color: var(--vc-texto-3); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.ag-kpis strong { font: 800 1.375rem var(--vc-font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-kpis em { font-style: normal; font-size: 0.75rem; color: var(--vc-aviso); font-weight: 600; }
.ag-kpis .ag-kpi-sm { font-size: 0.9375rem; }
.ag-route-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 12px 14px; }
.ag-via { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.ag-via td { padding: 8px 2px; border-bottom: 1px solid var(--ag-line-2); }
.ag-via td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.ag-via tr.is-total td { font: 800 1.125rem var(--vc-font-display); border-bottom: 2px solid var(--vc-negro); padding-top: 12px; }
.ag-legs { display: grid; gap: 6px; }
.ag-leg { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 8px; align-items: center; font-size: 0.8125rem; }
.ag-leg .input { min-height: 38px; height: 38px; }
/* Rutas del día (se arman en el Planificador de rutas) y rutas guardadas antes en la Agenda */
.ag-rday { display: grid; gap: 14px; align-content: start; }
.ag-rday-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.ag-rday-head h3 { margin: 0 0 2px; text-transform: none; }
.ag-rday-head p { margin: 4px 0 0; max-width: 64ch; }
.ag-rday-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ag-rday-tools .input { width: auto; min-width: 150px; }
.ag-rlist { display: grid; gap: 10px; }
.ag-rcard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; font: inherit; color: inherit; width: 100%; cursor: pointer; min-width: 0; }
.ag-rcard > .grow { min-width: 0; display: grid; gap: 2px; }
.ag-rcard.is-old { cursor: default; flex-wrap: wrap; }
.ag-rgo { display: inline-flex; align-items: center; gap: 4px; color: var(--vc-texto-2); font-weight: 600; white-space: nowrap; }
.ag-rold { gap: 8px; }
.ag-rold-h { margin: 6px 0 0; font: 700 0.875rem var(--vc-font-display); }
.ag-rold > p { margin: 0; }
@media (max-width: 640px) {
  .ag-rgo { display: none; }
  .ag-rday-tools { width: 100%; }
  .ag-rday-tools .input { flex: 1 1 0; min-width: 0; }
  .ag-rday-tools > .btn:not(.btn-icon) { flex: 1 1 100%; }
}

/* ───── trabajos por tienda ───── */
.ag-store { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); max-width: 1100px; }
.ag-store-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.ag-store-head h2 { font-size: 1.375rem; }
.ag-timeline { list-style: none; margin: 0; padding: 6px 18px 12px; }
.ag-timeline li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--ag-line-2); min-width: 0; }
.ag-timeline li:last-child { border-bottom: 0; }
.ag-timeline li > .grow { min-width: 0; }
.ag-tl-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--vc-crema); color: var(--vc-oro-texto); flex: none; }
.ag-tl-ic.is-hammy { background: var(--vc-negro); color: var(--vc-oro); }
.ag-timeline li.is-future .ag-tl-ic { background: var(--vc-info-bg); color: var(--vc-info); }

/* ───── clientes ───── */
a.ag-link-item { color: inherit; text-decoration: none; }
a.ag-link-item:hover { background: var(--vc-hover); }
.ag-clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.ag-cl { position: relative; overflow: hidden; display: grid; gap: 14px; padding: 16px 16px 14px 20px; text-align: left; cursor: pointer; font: inherit; color: inherit; border: 1px solid var(--ag-line); transition: transform var(--vc-t2) var(--vc-ease), box-shadow var(--vc-t2); animation: vcRise .4s var(--vc-ease) backwards; }
.ag-cl::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.ag-cl:hover { transform: translateY(-2px); box-shadow: var(--vc-sh-2); }
.ag-cl.is-off { opacity: .6; }
.ag-cl.is-sel { box-shadow: 0 0 0 2px var(--vc-oro), var(--vc-sh-2); }
.ag-cl > .row { min-width: 0; }
.ag-cl-name { font: 700 1.0625rem var(--vc-font-display); }
.ag-cl-mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--c); color: #fff; font: 800 0.9375rem var(--vc-font-display); flex: none; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .14), var(--vc-sh-1); }
.ag-cl-mark.is-logo { width: auto; min-width: 40px; height: 40px; padding: 0 8px; background: #fff; border: 1px solid var(--ag-line); }
.ag-cl-stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.8125rem; color: var(--vc-texto-2); padding-top: 10px; border-top: 1px solid var(--ag-line-2); }
.ag-cl-stats strong { color: var(--vc-texto); }

/* ───── tableta ───── */
@media (max-width: 1100px) {
  .ag-body { grid-template-columns: minmax(0, 1fr); padding: 0 14px 14px; }
  .ag-side { position: fixed; z-index: 2060; left: 0; top: 0; bottom: 0; width: 300px; background: var(--fondo); transform: translateX(-104%); transition: transform var(--vc-t3) var(--vc-ease); box-shadow: var(--vc-sh-3); padding: 16px; visibility: hidden; }
  .ag-side.is-open { transform: none; visibility: visible; }
  .ag-side-scrim { position: fixed; inset: 0; background: rgba(11, 12, 14, .4); z-index: 2055; animation: vcFade var(--vc-t2); }
  .ag-search { flex: 0 1 190px; }
  .ag-route-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .ag.is-cal { height: calc(100dvh - 58px - 78px - env(safe-area-inset-bottom, 0px)); }
}

/* ───── celular ───── */
@media (max-width: 640px) {
  .ag-head { padding: 10px 12px 4px; gap: 8px; }
  .ag-head h1, .ag-head .ag-head-ic { display: none; }
  .ag-head .tabs { width: 100%; }
  .ag-head .tab { flex: 1; padding: 8px 6px; font-size: 0.8125rem; }
  .ag-route, .ag-store { padding: 8px 12px 40px; }
  .ag-bar { flex-wrap: wrap; padding: 4px 10px 8px; gap: 6px 4px; }
  .ag-bar > .grow { display: none; }
  .ag-bar > :first-child { order: 1; }
  .ag-period { order: 2; flex: 1 1 0; max-width: none; font-size: 1.0625rem; padding-left: 2px; }
  .ag-loading { order: 3; }
  .ag-nav { order: 4; }
  .ag-bar [data-testid="ag-today"] { order: 5; min-height: 36px; padding: 0 12px; }
  .ag-break { display: block; order: 9; flex-basis: 100%; height: 0; }
  .ag-nav .btn-icon { width: 36px; min-height: 36px; }
  .ag-search { order: 10; flex: 1 1 0; width: auto; min-width: 0; }
  .ag-bar .ag-viewsel { order: 11; width: 118px; flex: none; height: 40px; min-height: 40px; font-size: 0.875rem; border-radius: 999px; padding: 0 12px; }
  .ag-bar [data-testid="ag-export"] { order: 12; }
  .ag-more-lbl { display: none; }
  .ag-m-more { font-size: 0.6875rem; padding: 0 3px; }
  .ag-body { padding: 0 8px 8px; }
  .ag-view { border-radius: 16px; }
  .ag-tg { --gut: 42px; }
  .ag-dh { padding: 6px 0 4px; }
  .ag-dh-n { font-size: 1.125rem; width: 34px; height: 34px; }
  .ag-hours span { font-size: 0.5938rem; right: 4px; }
  .ag-ev { padding: 2px 4px; font-size: 0.6875rem; }
  .ag-ev-t .gi { display: none; }
  .ag-m-num { font-size: 0.7188rem; min-width: 22px; height: 22px; padding: 0 5px; }
  .ag-m-ev { font-size: 0.6563rem; padding: 0 3px; }
  .ag-m-time, .ag-m-ev .ag-dot { display: none; }
  .ag-m-ev:not(.is-bar) { background: color-mix(in srgb, var(--c) 16%, #fff); }
  .ag-li-day { grid-template-columns: 50px minmax(0, 1fr); padding: 8px 10px; gap: 4px; }
  .ag-li-date { flex-direction: column; gap: 0; }
  .ag-li-w { font-size: 0.625rem; text-align: center; }
  .ag-li { flex-wrap: wrap; gap: 2px 10px; padding: 8px; }
  .ag-li > .grow { flex: 1 1 60%; }
  .ag-li-time { order: 3; width: auto; flex-basis: 100%; padding-left: 14px; font-size: 0.7813rem; }
  .ag-sheet, .ag-sheet.wide { top: auto; left: 0; width: 100%; height: 94dvh; border-radius: 24px 24px 0 0; animation: vcSheet .36s var(--vc-ease); transition: transform .25s var(--vc-ease); }
  .ag-grab { display: flex; justify-content: center; padding: 9px 0 3px; background: #fff; border-radius: 24px 24px 0 0; touch-action: none; cursor: grab; }
  .ag-grab span { width: 40px; height: 5px; border-radius: 3px; background: var(--acero-200, #E1DCD1); }
  .ag-sheet-head { padding: 2px 10px 10px 18px; }
  .ag-sheet-body { padding: 14px 16px 26px; }
  .ag-sheet-foot { padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); gap: 8px; }
  .ag-sheet-foot .ag-foot-sp { display: none; }
  .ag-sheet-foot .btn { flex: 1 1 0; min-width: 0; padding: 0 10px; }
  .ag-ed-title { font-size: 1.3125rem; }
  .ag-types { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none; }
  .ag-types::-webkit-scrollbar { display: none; }
  .ag-ed-row { gap: 10px; }
  .ag-when-sep { display: none; }
  .ag-when { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .ag-when > .input { width: 100%; min-width: 0; }
  .ag-when > [data-testid="ed-edate"] { order: 3; }
  .ag-when > [data-testid="ed-etime"] { order: 4; }
  .ag-ed-ic { width: 32px; height: 32px; }
  .ag-2 { grid-template-columns: minmax(0, 1fr); }
  .ag-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ag-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; }
  .ag-kpis > div:nth-child(3) { border-left: 0; }
  .ag-map { height: 300px; }
  .ag-clients { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  .ag-head .tabs, .ag-noprint, .ag-fab, .ag-route-cols > .stack:first-child > .card:first-child { display: none !important; }
  .ag-route-cols { grid-template-columns: minmax(0, 1fr); }
  .ag-route .card { box-shadow: none; break-inside: avoid; }
}

/* ───── agenda de cada técnico: elegirlo (con su foto), varios a la vez y un día en columnas ───── */
.ag-person { padding: 5px 8px; }
.ag-person .avatar { flex: none; }
.ag-person .gi { color: var(--vc-oro-texto); }
.ag-people-q { min-height: 36px; height: 36px; margin: 2px 0 4px; border-radius: 999px; font-size: 0.8438rem; }
.ag-people-tip { margin: 6px 8px 0; }
.ag-pchip { display: flex; align-items: center; gap: 8px; min-width: 0; flex: none; padding: 7px 10px 7px 12px; background: linear-gradient(180deg, #FFF6DC, #FFFBEF); border-bottom: 1px solid rgba(253, 178, 7, .4); }
.ag-pchip-b { display: inline-flex; align-items: center; gap: 0; min-width: 0; border: 0; background: none; font: inherit; font-weight: 700; font-size: 0.875rem; color: var(--vc-texto); cursor: pointer; padding: 0; }
.ag-pchip-av { display: inline-flex; flex: none; margin-right: 10px; }
.ag-pchip-av .avatar { box-shadow: 0 0 0 2px #fff; flex: none; }
.ag-pchip-av .avatar + .avatar { margin-left: -7px; }
.ag-pchip-b:hover > .ellipsis { text-decoration: underline; }
.ag-pchip .btn { flex: none; min-height: 32px; }
.ag-tg.is-lanes { overflow-x: auto; overflow-y: hidden; }
.ag-tg.is-lanes > * { min-width: calc(var(--gut) + var(--n) * 150px); }
.ag-lh { grid-template-rows: auto auto auto; gap: 2px; padding: 8px 4px 6px; min-width: 0; border-left: 1px solid var(--ag-line-2); }
.ag-lh .avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--vc-oro); }
.ag-lh-n { max-width: 100%; font-weight: 700; font-size: 0.8438rem; color: var(--vc-texto); }
.ag-lh-c { font-size: 0.7188rem; color: var(--vc-texto-3); }
.ag-lh:hover .ag-lh-n { text-decoration: underline; }
.ag-pstrip { display: flex; gap: 6px; overflow-x: auto; padding: 8px 8px 6px; border-bottom: 1px solid var(--ag-line); scrollbar-width: none; flex: none; }
.ag-pstrip::-webkit-scrollbar { display: none; }
.ag-pstrip-it { display: grid; justify-items: center; align-content: start; gap: 3px; width: 70px; flex: none; border: 0; background: none; font: inherit; font-size: 0.7188rem; color: var(--vc-texto-2); padding: 4px 2px; border-radius: 12px; cursor: pointer; }
.ag-pstrip-n { max-width: 100%; line-height: 1.2; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ag-pstrip-it[aria-checked="true"] { background: var(--vc-sel, #FFF1C9); color: var(--vc-texto); font-weight: 700; }
.ag-pstrip-it[aria-checked="true"] .avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--vc-oro); }
@media (max-width: 1500px) and (min-width: 641px) { .ag-views button { padding: 7px 9px; } }
@media (max-width: 640px) {
  .ag-pchip { padding: 6px 6px 6px 10px; }
  .ag-pchip-b { font-size: 0.8125rem; }
  .ag-tg.is-lanes > * { min-width: 0; }
  /* Un técnico a la vez (se elige arriba): su cabecera va en una línea. */
  .ag-lh { display: flex; justify-content: center; align-items: baseline; gap: 6px; padding: 8px 4px; }
  .ag-lh .avatar { display: none; }
}

/* ───── rutas del planificador en el calendario (R35): de la salida al regreso, con lo hecho y cada parada ───── */
.ag-ev.is-route { box-shadow: inset 3px 0 0 rgba(11, 12, 14, .55), 0 1px 2px rgba(28, 22, 10, .12); padding-left: 9px; }
.ag-ev.is-route .ag-ev-t { font-weight: 750; }
.ag-ev.is-route .ag-ev-t, .ag-ev.is-route .ag-ev-m, .ag-ev.is-route .ag-rt-prog { position: relative; z-index: 1; }
.ag-rt-prog { display: block; height: 4px; margin: 3px 0 1px; border-radius: 99px; background: rgba(255, 255, 255, .55); overflow: hidden; flex: none; }
.ag-rt-prog i { display: block; height: 100%; background: var(--vc-negro, #0B0C0E); border-radius: 99px; }
.ag-li .ag-rt-prog { max-width: 220px; background: var(--vc-arena, #F4F1EA); }
.ag-li .ag-rt-prog i { background: #1D7A4B; }
.ag-rt-ticks { position: absolute; left: 0; right: 0; top: 0; bottom: 0; pointer-events: none; }
.ag-rt-tick { position: absolute; left: 9px; right: 4px; display: flex; align-items: center; gap: 5px; height: 16px; margin-top: -8px; font-size: 0.6563rem; font-weight: 600; white-space: nowrap; }
.ag-rt-tick b { flex: none; width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center; font-size: 0.5938rem; background: var(--ink); color: var(--c); }
.ag-rt-tick.st-hecha b { background: #1D7A4B; color: #fff; }
.ag-rt-tick.st-no_se_pudo b { background: #B42318; color: #fff; }
.ag-rt-tick > span { min-width: 0; opacity: .9; }
.ag-ev.is-proj, .ag-adbar.is-proj, .ag-m-ev.is-bar.is-proj { background: var(--vc-papel, #fff); color: var(--vc-texto, #14130F); box-shadow: inset 0 0 0 1.5px var(--c); }
.ag-m-ev.is-route:not(.is-bar) .ag-m-title { font-weight: 650; }
.ag-adbar.is-route { display: flex; align-items: center; gap: 5px; }
.ag-adbar.is-route .gi { flex: none; }
.ag-adbar-t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ag-adbar-m { flex: 0 100 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 500; opacity: .85; font-size: 0.6875rem; }
.ag-adbar-m::before { content: '·'; margin: 0 5px 0 1px; }
.ag-rt-pop { display: grid; gap: 4px; }
.ag-rt-pop .ag-rt-prog { background: var(--vc-arena, #F4F1EA); height: 6px; }
.ag-rt-pop .ag-rt-prog i { background: #1D7A4B; }
.ag-rt-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }
.ag-rt-list li { display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; min-width: 0; }
.ag-rt-n { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 0.6875rem; font-weight: 800; background: var(--vc-arena, #F4F1EA); }
.ag-rt-list li.st-hecha .ag-rt-n { background: #1D7A4B; color: #fff; }
.ag-rt-list li.st-no_se_pudo .ag-rt-n { background: #B42318; color: #fff; }
.ag-rt-list li.st-hecha .grow { color: var(--vc-texto-3); }
.ag-rcard .ag-rt-prog { max-width: 260px; background: var(--vc-arena, #F4F1EA); height: 5px; }
.ag-rcard .ag-rt-prog i { background: #1D7A4B; }
.ag-m-ev.is-proj:not(.is-bar) .ag-dot { background: transparent !important; box-shadow: inset 0 0 0 2px var(--c); }
.ag-m-ev.is-proj .ag-m-title, .ag-li.is-proj .ag-li-t { font-style: italic; color: var(--vc-texto-2); }
.ag-li.is-proj .ag-li-bar { opacity: .45; }
