/* ==========================================================================
   Nexos — Calendário (prefixo .calx-)
   Só variáveis de tokens.css. Cores dos espaços via classes .c-<cor>
   (var(--c-bg) / var(--c-ink) / var(--c-s)).
   ========================================================================== */

.calx { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr); min-height: 0; }
.calx.has-panel { grid-template-columns: minmax(0, 1fr) 272px; }
.calx-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

/* ---------------- Barra de ferramentas ---------------- */
.calx-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 16px 24px 12px; flex-shrink: 0; }
.calx-nav { display: inline-flex; align-items: center; gap: 2px; }
.calx-navbtn { width: 32px; height: 32px; border-radius: 9px; }
.calx-today { margin: 0 3px; }
.calx-title { margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.calx-t-y { color: var(--text-3); font-weight: 500; }
.calx-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.calx-tripbtn { gap: 6px; padding-right: 6px; }
.calx-tripbtn-e { font-size: 14px; line-height: 1; }
.calx-tripbtn-n { font-size: 11px; font-weight: 650; line-height: 18px; padding: 0 7px; border-radius: var(--r-full); background: color-mix(in srgb, var(--surface) 72%, transparent); }
.calx-break { display: none; }
.calx-seg button { gap: 6px; }

/* ---------------- Área rolável ---------------- */
.calx-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 2px 24px 28px; display: flex; flex-direction: column; gap: 16px; }
.calx.is-desk:not(.has-panel) .calx-scroll { padding-bottom: 96px; } /* não briga com o botão + flutuante */
.calx-body { flex: 1 0 auto; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.calx-body.slide-next { animation: calxSlideNext .3s var(--ease); }
.calx-body.slide-prev { animation: calxSlidePrev .3s var(--ease); }
.calx-body.slide-fade { animation: fade .25s var(--ease); }
.calx-hint { flex-shrink: 0; }

/* ---------------- Mês (desktop) ---------------- */
.calx-month {
  flex: 1 0 auto; display: flex; flex-direction: column;
  min-height: calc(32px + var(--weeks, 5) * 104px);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.calx-wdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface-2); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.calx-wdays > div { padding: 7px 10px; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); }
.calx-wdays > .is-weekend { color: color-mix(in srgb, var(--accent) 55%, var(--text-3)); }
.calx-week { position: relative; flex: 1 1 0; min-height: 104px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--border); }
.calx-week:last-child { border-bottom: 0; }
.calx-cell {
  position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0;
  border-right: 1px solid var(--border); cursor: pointer;
  transition: background var(--dur), box-shadow var(--dur);
}
.calx-week > .calx-cell:nth-child(7) { border-right: 0; }
.calx-cell.is-weekend { background: color-mix(in srgb, var(--surface-3) 32%, var(--surface)); }
.calx-cell.is-out { background: color-mix(in srgb, var(--surface-3) 58%, var(--surface)); }
.calx-cell.is-today { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.calx-cell:hover { background: color-mix(in srgb, var(--text) 3%, var(--surface)); }
.calx-cell-head { display: flex; align-items: center; gap: 5px; height: 30px; padding: 5px 5px 0 6px; flex-shrink: 0; min-width: 0; }
.calx-num {
  min-width: 24px; height: 24px; padding: 0 5px; border-radius: var(--r-full);
  display: inline-grid; place-items: center; flex-shrink: 0;
  font-size: 12.5px; font-weight: 650; color: var(--text-2); font-variant-numeric: tabular-nums;
}
.calx-cell.is-out .calx-num { color: var(--text-3); font-weight: 500; }
.calx-cell.is-today .calx-num { background: var(--accent); color: var(--on-accent); box-shadow: 0 3px 10px var(--accent-ring); }
.calx-mon { font-size: 11px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; flex-shrink: 0; }
.calx-hol {
  flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 10.5px; font-weight: 650; color: var(--c-peach-ink);
}
.calx-add {
  margin-left: auto; width: 24px; height: 24px; flex-shrink: 0; border-radius: 7px;
  display: grid; place-items: center; color: var(--text-3); opacity: 0;
  transition: opacity var(--dur), background var(--dur), color var(--dur);
}
.calx-cell:hover .calx-add, .calx-add:focus-visible { opacity: 1; }
.calx-add:hover { background: var(--active); color: var(--text); }
.calx-lanes { height: calc(var(--lanes, 0) * 22px); flex-shrink: 0; }
.calx-chips { position: relative; flex: 1 1 auto; min-height: 0; }
.calx-chips-in { position: absolute; inset: 2px 4px 4px; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.calx-more {
  align-self: flex-start; flex-shrink: 0; height: 19px; padding: 0 7px; border-radius: 6px;
  font-size: 11.5px; font-weight: 650; color: var(--text-2);
  transition: background var(--dur), color var(--dur);
}
.calx-more:hover { background: var(--active); color: var(--text); }
.calx-more:focus-visible { outline-offset: 0; }

/* Barras de viagem (atravessam os dias) */
.calx-bar {
  position: absolute; z-index: 2;
  top: calc(31px + var(--lane, 0) * 22px);
  left: calc(var(--from) * 100% / 7 + 4px);
  width: calc(var(--span) * 100% / 7 - 8px);
  height: 19px; display: flex; align-items: center; gap: 5px; padding: 0 9px;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, color-mix(in srgb, var(--c-s) 32%, var(--surface)), color-mix(in srgb, var(--c-s) 18%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--c-s) 48%, transparent);
  color: var(--c-ink); font-size: 11.5px; font-weight: 680; white-space: nowrap; overflow: hidden;
  transition: box-shadow var(--dur), filter var(--dur), transform .15s var(--ease);
}
.calx-bar:hover { box-shadow: var(--shadow-sm); filter: saturate(1.2); transform: translateY(-1px); }
.calx-bar.cont-l { border-top-left-radius: 4px; border-bottom-left-radius: 4px; padding-left: 3px; }
.calx-bar.cont-r { border-top-right-radius: 4px; border-bottom-right-radius: 4px; padding-right: 3px; }
.calx-bar-e { font-size: 12px; line-height: 1; }
.calx-bar-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.calx-bar-d { margin-left: auto; padding-left: 6px; flex-shrink: 0; font-size: 10.5px; font-weight: 650; opacity: .72; }
.calx-bar svg.lucide { width: 12px; height: 12px; opacity: .7; }
.calx-bar.is-flash { animation: calxFlash 1.2s var(--ease) 2; }
body.is-dragging .calx-bar { pointer-events: none; }

/* ---------------- Chips (tarefas = preenchidos, eventos = contorno) ---------------- */
.calx-chip {
  position: relative; display: flex; align-items: center; gap: 5px;
  height: 22px; min-width: 0; flex-shrink: 0; padding: 0 7px 0 5px;
  border-radius: var(--r-xs); background: var(--c-bg); color: var(--c-ink);
  font-size: 11.8px; font-weight: 580; line-height: 1.2;
  cursor: pointer; user-select: none; -webkit-user-select: none;
  transition: box-shadow var(--dur), opacity var(--dur), transform .12s var(--ease);
}
.calx-chip:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-s) 60%, transparent), var(--shadow-sm); }
.calx-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.calx-chip-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calx-time { flex-shrink: 0; font-size: 10.5px; font-weight: 700; opacity: .75; font-variant-numeric: tabular-nums; }
.calx-chk {
  flex-shrink: 0; width: 13px; height: 13px; border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--c-s) 75%, var(--c-ink));
  display: grid; place-items: center;
  transition: background var(--dur), transform .15s var(--spring);
}
.calx-chk:hover { background: color-mix(in srgb, var(--c-s) 30%, transparent); transform: scale(1.15); }
.calx-chk.on { background: var(--c-s); border-color: var(--c-s); }
.calx-chk.on::after { content: ""; width: 3px; height: 6px; margin-top: -1px; border: solid var(--surface); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }
.calx-chip.is-event { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-s) 55%, var(--border)); }
.calx-chip.is-event:hover { box-shadow: inset 0 0 0 1.5px var(--c-s), var(--shadow-sm); }
.calx-ev-ico { display: inline-grid; flex-shrink: 0; color: var(--c-s); }
.calx-ev-ico svg.lucide { width: 12px; height: 12px; stroke-width: 2.3; }
.calx-chip.is-done { opacity: .55; }
.calx-chip.is-done .calx-chip-t { text-decoration: line-through; }
.calx-chip.is-late { box-shadow: inset 2.5px 0 0 var(--danger); }
.calx-chip.is-late .calx-time, .calx-chip.is-late .calx-chip-m { color: var(--danger); opacity: 1; }
.calx-chip.is-lifted, .calx-arow.is-lifted, .calx-evrow.is-lifted { opacity: .3; outline: 1.5px dashed var(--accent); outline-offset: 1px; }
.calx-chip.is-landed, .calx-arow.is-landed, .calx-evrow.is-landed { animation: calxLand .6s var(--spring); }
/* mudou agora há pouco por outra pessoa (tempo real) */
.calx-chip.is-remote, .calx-arow.is-remote, .calx-evrow.is-remote { animation: calxLand .6s var(--spring), calxRemote 1.6s var(--ease); }
@keyframes calxRemote {
  0%, 35% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--info) 55%, transparent); }
  100% { box-shadow: 0 0 0 2px transparent; }
}
@media (prefers-reduced-motion: reduce) { .calx-chip.is-remote, .calx-arow.is-remote, .calx-evrow.is-remote { animation: none; } }
@media (hover: hover) and (pointer: fine) { .calx.is-desk .calx-chip[data-drag-id] { cursor: grab; } }
@media (min-width: 761px) { .calx .calx-chip[data-drag-id] { touch-action: none; } }

/* Chip grande (semana, "+N mais", painel) */
.calx-chip.is-lg, .calx-chip.is-card {
  height: auto; min-height: 32px; align-items: flex-start; gap: 7px;
  padding: 7px 8px; border-radius: var(--r-sm); font-size: 12.8px;
}
.calx-chip.is-lg .calx-chk, .calx-chip.is-card .calx-chk { width: 15px; height: 15px; margin-top: 1px; }
.calx-chip.is-lg .calx-chk.on::after, .calx-chip.is-card .calx-chk.on::after { width: 4px; height: 7px; }
.calx-chip.is-lg .calx-ev-ico, .calx-chip.is-card .calx-ev-ico { margin-top: 1px; }
.calx-chip.is-lg .calx-ev-ico svg.lucide { width: 14px; height: 14px; }
.calx-chip-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.calx-chip.is-lg .calx-chip-t, .calx-chip.is-card .calx-chip-t {
  white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  line-height: 1.3; font-weight: 600; word-break: break-word;
}
.calx-chip-m { font-size: 11px; font-weight: 550; opacity: .78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calx-chip .avatar { margin-top: -1px; box-shadow: 0 0 0 1.5px var(--surface); }
.calx-sched {
  flex-shrink: 0; width: 26px; height: 26px; margin: -4px -4px -4px 0; border-radius: 7px;
  display: grid; place-items: center; color: inherit; opacity: .5;
  transition: opacity var(--dur), background var(--dur);
}
.calx-chip:hover .calx-sched, .calx-sched:focus-visible { opacity: 1; }
.calx-sched:hover { background: color-mix(in srgb, var(--surface) 65%, transparent); }

/* Fantasma do arrastar e alvo de soltar */
.calx-drag-ghost {
  position: fixed; left: 0; top: 0; z-index: var(--z-drag); pointer-events: none; margin: 0;
  box-shadow: var(--shadow-lg) !important; opacity: .97; will-change: transform;
}
.calx-ghost-to {
  position: absolute; left: 6px; top: calc(100% + 6px); padding: 3px 9px; border-radius: var(--r-full);
  background: var(--text); color: var(--bg); font-size: 11px; font-weight: 650; white-space: nowrap; box-shadow: var(--shadow);
}
.calx [data-drop-date].is-drop, .calx [data-drop-nodate].is-drop {
  background: var(--accent-soft) !important; box-shadow: inset 0 0 0 2px var(--accent-ring) !important;
}
.calx.is-dragging .calx-add { opacity: 0 !important; }

/* ---------------- Semana (desktop) ---------------- */
.calx-wk {
  flex: 1 0 auto; min-height: 460px; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden;
}
.calx-wk-trips { position: relative; flex-shrink: 0; height: calc(var(--lanes, 1) * 24px + 8px); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.calx-wk-trips .calx-bar { top: calc(5px + var(--lane, 0) * 24px); height: 20px; }
.calx-wk-cols { flex: 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calx-wcol { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--border); cursor: pointer; transition: background var(--dur), box-shadow var(--dur); }
.calx-wcol:last-child { border-right: 0; }
.calx-wcol.is-weekend { background: color-mix(in srgb, var(--surface-3) 32%, var(--surface)); }
.calx-wcol.is-today { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.calx-wcol-head { display: flex; align-items: center; gap: 7px; padding: 10px 10px 9px; border-bottom: 1px solid var(--border); min-width: 0; }
.calx-wcol-wd { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); }
.calx-wcol-n {
  min-width: 30px; height: 30px; padding: 0 6px; border-radius: var(--r-full); display: inline-grid; place-items: center;
  font-family: var(--font-display); font-size: 19px; font-weight: 600; color: var(--text);
}
.calx-wcol.is-past .calx-wcol-n { color: var(--text-3); }
.calx-wcol.is-today .calx-wcol-n { background: var(--accent); color: var(--on-accent); box-shadow: 0 3px 10px var(--accent-ring); }
.calx-wcol-body { flex: 1; display: flex; flex-direction: column; gap: 5px; padding: 8px 6px 10px; min-height: 0; }
.calx-wcol-add {
  display: flex; align-items: center; justify-content: center; gap: 5px; height: 30px; flex-shrink: 0;
  border-radius: var(--r-sm); border: 1px dashed var(--border-2); color: var(--text-3); font-size: 12px; font-weight: 600;
  opacity: 0; transition: opacity var(--dur), background var(--dur), color var(--dur);
}
.calx-wcol:hover .calx-wcol-add, .calx-wcol-add:focus-visible { opacity: 1; }
.calx-wcol-add:hover { background: var(--hover); color: var(--text); }

/* ---------------- Agenda / listas por dia ---------------- */
.calx-agenda { width: 100%; max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.calx-aday {
  display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px;
  padding: 12px 12px 10px; border-radius: var(--r-lg); border: 1px solid transparent;
  transition: background var(--dur), box-shadow var(--dur);
}
.calx-aday + .calx-aday:not(.is-today) { border-top-color: var(--border); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.calx-aday.is-today { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-sm); }
.calx-aday.is-today + .calx-aday { border-top-color: transparent; }
.calx-aday-badge { display: flex; flex-direction: column; align-items: center; padding-top: 2px; line-height: 1.05; color: var(--text-2); }
.calx-aday-badge span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.calx-aday-badge b { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--text); margin: 2px 0; }
.calx-aday-badge svg.lucide { width: 20px; height: 20px; margin-top: 6px; }
.calx-aday.is-today .calx-aday-badge b, .calx-aday.is-today .calx-aday-badge span { color: var(--accent); }
.calx-aday-main { min-width: 0; }
.calx-aday-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-height: 30px; }
.calx-aday-title { font-weight: 700; font-size: 15px; letter-spacing: -.005em; }
.calx-aday-title::first-letter { text-transform: uppercase; }
.calx-aday-sub { font-size: 12.5px; color: var(--text-3); }
.calx-aday-add { margin-left: auto; opacity: .45; transition: opacity var(--dur); }
.calx-aday:hover .calx-aday-add, .calx-aday-add:focus-visible { opacity: 1; }
.calx-aday-list { display: flex; flex-direction: column; gap: 1px; margin-top: 4px; }
.calx-holchip { background: color-mix(in srgb, var(--c-peach-s) 16%, transparent); color: var(--c-peach-ink); }
.calx-tripchip {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: var(--r-full);
  background: var(--c-bg); color: var(--c-ink); font-size: 12px; font-weight: 650; white-space: nowrap;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-s) 40%, transparent);
  transition: box-shadow var(--dur);
}
.calx-tripchip:hover { box-shadow: inset 0 0 0 1.5px var(--c-s); }
.calx-free {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  padding: 6px 8px; margin-left: -6px; border-radius: var(--r-sm);
  font-size: 13px; color: var(--text-3); text-align: left;
  transition: background var(--dur), color var(--dur);
}
.calx-free > span { display: inline-flex; align-items: center; gap: 3px; font-weight: 650; color: var(--accent-ink); opacity: 0; transition: opacity var(--dur); }
.calx-free:hover { background: var(--hover); color: var(--text-2); }
.calx-free:hover > span, .calx-free:focus-visible > span { opacity: 1; }
.calx-arow { display: flex; align-items: center; gap: 4px; border-radius: 11px; }
.calx-atime { width: 40px; flex-shrink: 0; text-align: right; font-size: 11.5px; font-weight: 650; color: var(--text-3); font-variant-numeric: tabular-nums; }
.calx-arow .task-row { flex: 1; min-width: 0; }
.calx-evrow {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 4px; border-radius: 11px; cursor: pointer;
  transition: background var(--dur);
}
.calx-evrow:hover { background: var(--hover); }
.calx-evrow-time { width: 40px; flex-shrink: 0; text-align: right; font-size: 11.5px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.calx-evrow-ico { width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; background: var(--c-bg); color: var(--c-ink); }
.calx-evrow-b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.calx-evrow-t { font-weight: 600; line-height: 1.35; }
.calx-evrow-m { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calx-evrow-tag { flex-shrink: 0; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: var(--r-full); background: var(--c-bg); color: var(--c-ink); }
.calx-aday.is-late { background: color-mix(in srgb, var(--danger) 6%, transparent); border-color: color-mix(in srgb, var(--danger) 18%, transparent); border-radius: var(--r-lg); }
.calx-aday.is-late .calx-aday-badge { color: var(--danger); }
.calx-aday.is-late + .calx-aday { border-top-color: transparent; }
.calx-bulk { margin-left: auto; }
.calx-ndrow { display: flex; align-items: center; gap: 4px; }
.calx-ndrow .task-row { flex: 1; min-width: 0; }
.calx-agenda-foot { display: flex; justify-content: center; padding: 14px 0 4px; }

/* ---------------- Painel lateral ---------------- */
.calx-side {
  min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  border-left: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-2) 70%, var(--bg));
  padding: 18px 16px 110px; display: flex; flex-direction: column; gap: 24px;
  animation: calxSideIn .28s var(--ease);
}
.calx-sec { display: flex; flex-direction: column; gap: 9px; }
.calx-sec-head { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .07em; }
.calx-sec-head svg.lucide { width: 15px; height: 15px; color: var(--text-3); }
.calx-count { font-size: 11px; line-height: 18px; padding: 0 7px; border-radius: var(--r-full); background: var(--surface-3); color: var(--text-2); letter-spacing: 0; }
.calx-link { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--accent-ink); text-transform: none; letter-spacing: 0; padding: 2px 4px; border-radius: 6px; }
.calx-link:hover { background: var(--accent-soft); }
.calx-nd { padding: 10px; margin: -10px; border-radius: var(--r-lg); transition: background var(--dur), box-shadow var(--dur); }
.calx-quick {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 11px; border-radius: 10px;
  background: var(--surface); border: 1px dashed var(--border-2); color: var(--text-3); cursor: text;
  transition: border-color var(--dur), box-shadow var(--dur), color var(--dur);
}
.calx-quick:hover { border-color: var(--text-3); }
.calx-quick:focus-within { border-style: solid; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); color: var(--accent); }
.calx-quick input { font-size: 13.5px; color: var(--text); }
.calx-nd-list { display: flex; flex-direction: column; gap: 6px; }
.calx-nd-empty {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); line-height: 1.45;
}
.calx-nd-empty > span { font-size: 20px; line-height: 1.1; }
.calx-nd-empty b { color: var(--text); }
.calx-sec-hint { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-3); }
.calx-sec-hint svg.lucide { width: 13px; height: 13px; }
.calx-legend { display: flex; flex-direction: column; gap: 1px; }
.calx-leg {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px; border-radius: 9px;
  font-size: 13px; font-weight: 550; color: var(--text); text-align: left;
  transition: background var(--dur), color var(--dur);
}
.calx-leg:hover { background: var(--hover); }
.calx-leg-dot { width: 10px; height: 10px; border-radius: 4px; flex-shrink: 0; background: var(--c-s); transition: background var(--dur), box-shadow var(--dur); }
.calx-leg-e { width: 18px; text-align: center; line-height: 1; }
.calx-leg-n { flex: 1; }
.calx-leg-c { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.calx-leg svg.lucide { width: 14px; height: 14px; color: var(--text-3); opacity: 0; transition: opacity var(--dur); }
.calx-leg:hover svg.lucide, .calx-leg:focus-visible svg.lucide, .calx-leg.is-off svg.lucide { opacity: 1; }
.calx-leg.is-off { color: var(--text-3); }
.calx-leg.is-off .calx-leg-dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c-s); }
.calx-leg.is-off .calx-leg-n { text-decoration: line-through; text-decoration-color: var(--border-2); }
.calx-only { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 10px; background: var(--c-bg); color: var(--c-ink); font-weight: 600; font-size: 13px; }
.calx-allbtn { align-self: flex-start; }
.calx-asks { display: flex; flex-direction: column; gap: 6px; }
.calx-ask {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; text-align: left;
  background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); line-height: 1.35;
  transition: border-color var(--dur), color var(--dur), box-shadow var(--dur);
}
.calx-ask:hover { border-color: var(--border-2); color: var(--text); box-shadow: var(--shadow-sm); }
.calx-ask svg.lucide { width: 14px; height: 14px; color: var(--accent); }

/* Cartões-fantasma (sugestões para a agenda) */
.calx-ghosts { display: flex; flex-direction: column; gap: 10px; }
.calx-ghost {
  display: flex; flex-direction: column; gap: 6px; padding: 12px 12px 10px; border-radius: var(--r-lg);
  border: 1.5px dashed color-mix(in srgb, var(--accent) 60%, transparent);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  animation: pop .3s var(--spring);
}
.calx-ghost-top { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--accent-ink); }
.calx-ghost-top svg.lucide { width: 14px; height: 14px; }
.calx-ghost-t { font-weight: 650; font-size: 13.5px; line-height: 1.35; }
.calx-ghost-why { font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.calx-ghost-act { display: flex; gap: 6px; margin-top: 4px; }

/* ---------------- Linha do tempo da viagem ---------------- */
.calx-trip {
  flex-shrink: 0; padding: 16px 18px 14px; border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--c-bg), color-mix(in srgb, var(--c-s) 16%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--c-s) 26%, transparent);
  box-shadow: var(--shadow-sm);
}
.calx-trip-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.calx-trip-emoji { width: 48px; height: 48px; flex-shrink: 0; display: grid; place-items: center; font-size: 28px; line-height: 1; border-radius: 15px; background: color-mix(in srgb, var(--surface) 72%, transparent); box-shadow: var(--shadow-sm); }
.calx-trip-info { flex: 1 1 220px; min-width: 0; }
.calx-trip-title { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -.01em; color: var(--c-ink); line-height: 1.2; }
.calx-trip-sub { font-size: 12.8px; color: color-mix(in srgb, var(--c-ink) 78%, transparent); margin-top: 2px; }
.calx-trip-sub b { font-weight: 700; color: var(--c-ink); }
.calx-trip-prep { display: flex; flex-direction: column; gap: 5px; min-width: 150px; font-size: 12px; font-weight: 600; color: var(--c-ink); }
.calx-trip-prep > span:first-child { display: inline-flex; align-items: center; gap: 5px; }
.calx-trip-prep svg.lucide { width: 14px; height: 14px; }
.calx-trip-prep .progress { background: color-mix(in srgb, var(--surface) 65%, transparent); }
.calx-trip-btns { display: flex; gap: 6px; }
.calx-trip-btns .btn-ghost { color: var(--c-ink); }
.calx-trip-scroll { overflow-x: auto; margin: 14px -6px 0; padding: 0 6px 4px; scroll-snap-type: x proximity; }
.calx-trip-track { display: grid; grid-template-rows: auto auto; gap: 6px 4px; min-width: min-content; }
.calx-tseg {
  grid-row: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; text-align: left;
  padding: 8px 10px; border-radius: 12px; background: var(--c-bg); color: var(--c-ink);
  border: 1px solid color-mix(in srgb, var(--c-s) 42%, transparent);
  transition: transform .15s var(--ease), box-shadow var(--dur);
}
.calx-tseg:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.calx-tseg-t { display: flex; align-items: center; gap: 5px; font-weight: 700; font-size: 12.8px; min-width: 0; }
.calx-tseg-t svg.lucide { width: 13px; height: 13px; flex-shrink: 0; color: var(--c-s); }
.calx-tseg-d { margin-left: auto; flex-shrink: 0; font-size: 10.5px; font-weight: 650; opacity: .7; padding-left: 4px; }
.calx-tseg-n { font-size: 11.5px; line-height: 1.4; opacity: .85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.calx-tday {
  grid-row: 2; min-width: 0; min-height: 70px; display: flex; flex-direction: column; gap: 4px; padding: 6px;
  border-radius: 10px; background: color-mix(in srgb, var(--surface) 80%, transparent);
  border: 1px solid color-mix(in srgb, var(--c-s) 18%, transparent);
  cursor: pointer; scroll-snap-align: start; transition: background var(--dur), box-shadow var(--dur);
}
.calx-tday:hover { background: var(--surface); }
.calx-tday.is-today { box-shadow: inset 0 0 0 2px var(--accent); }
.calx-tday-h { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; }
.calx-tday-n { font-size: 10.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--c-ink); }
.calx-tday-d { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.calx-tday-items { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.calx-trip-tip { display: flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 12px; color: color-mix(in srgb, var(--c-ink) 80%, transparent); }
.calx-trip-tip svg.lucide { width: 14px; height: 14px; flex-shrink: 0; }

/* ---------------- Popovers ---------------- */
.popover.calx-pop { padding: 14px; }
.calx-new { width: 316px; display: flex; flex-direction: column; gap: 11px; }
.calx-new.is-sheet { width: auto; padding-top: 4px; }
.calx-new-head { display: flex; align-items: center; gap: 8px; font-weight: 680; font-size: 14px; }
.calx-new-head svg.lucide { color: var(--accent); }
.calx-new-spaces { display: flex; flex-wrap: wrap; gap: 5px; }
.calx-sp {
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: var(--r-full);
  font-size: 12.2px; font-weight: 580; background: var(--surface-3); color: var(--text-2);
  transition: background var(--dur), color var(--dur), box-shadow var(--dur);
}
.calx-sp:hover { color: var(--text); }
.calx-sp.on { background: var(--c-bg); color: var(--c-ink); box-shadow: inset 0 0 0 1.5px var(--c-s); }
.calx-new-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.calx-new-tip { font-size: 11.5px; color: var(--text-3); }
.calx-shake { animation: calxShake .35s; border-color: var(--danger) !important; }

.calx-morepop { width: 280px; display: flex; flex-direction: column; gap: 10px; }
.calx-morepop-head { display: flex; align-items: center; gap: 8px; }
.calx-morepop-t { font-weight: 700; font-size: 14.5px; }
.calx-morepop-s { font-size: 12px; color: var(--text-3); }
.calx-morepop-list { display: flex; flex-direction: column; gap: 5px; max-height: 320px; overflow: auto; margin: 0 -4px; padding: 0 4px; }
.calx-morepop-tip { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-3); }
.calx-morepop-tip svg.lucide { width: 13px; height: 13px; }

.calx-trippop { width: 284px; display: flex; flex-direction: column; gap: 11px; }
.calx-trippop-top { display: flex; align-items: center; gap: 11px; }
.calx-trippop-e { width: 46px; height: 46px; flex-shrink: 0; display: grid; place-items: center; font-size: 26px; border-radius: 14px; background: linear-gradient(135deg, var(--c-bg), color-mix(in srgb, var(--c-s) 30%, var(--c-bg))); }
.calx-trippop-t { font-weight: 700; font-size: 15px; line-height: 1.25; }
.calx-trippop-s { font-size: 12.5px; color: var(--text-2); }
.calx-trippop-cd { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 10px; background: var(--c-bg); color: var(--c-ink); font-weight: 650; font-size: 13px; }
.calx-trippop-cd svg.lucide { width: 14px; height: 14px; }
.calx-trippop-who { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.calx-trippop-act { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------------- Celular: mês compacto ---------------- */
.calx-mini { flex-shrink: 0; padding: 8px 6px 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); touch-action: pan-y; }
.calx-mini-wd { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding: 2px 0 6px; text-align: center; font-size: 11px; font-weight: 700; color: var(--text-3); }
.calx-mini-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 2px; }
.calx-mday {
  position: relative; height: 50px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding-top: 5px;
  border-radius: 12px; transition: background var(--dur);
}
.calx-mday:active { background: var(--active); }
.calx-mday-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; position: relative; z-index: 1; }
.calx-mday.is-out { opacity: .38; }
.calx-mday.is-sel { background: var(--accent-soft); }
.calx-mday.is-sel .calx-mday-n { color: var(--accent-ink); font-weight: 800; }
.calx-mday.is-today .calx-mday-n { background: var(--accent); color: var(--on-accent); font-weight: 750; box-shadow: 0 3px 10px var(--accent-ring); }
.calx-dots { display: flex; gap: 3px; height: 5px; position: relative; z-index: 1; }
.calx-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--c-s); }
.calx-dots i.is-done { opacity: .35; }
.calx-mday.in-trip::before {
  content: ""; position: absolute; left: -1px; right: -1px; bottom: 3px; height: 5px;
  background: var(--trip); opacity: .5;
}
.calx-mday.trip-start::before { left: 8px; border-radius: 4px 0 0 4px; }
.calx-mday.trip-end::before { right: 8px; border-radius: 0 4px 4px 0; }
.calx-mday.trip-start.trip-end::before { border-radius: 4px; }
.calx-mini-legend { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 4px 2px; }
.calx-mini-tip { text-align: center; font-size: 11px; color: var(--text-3); padding: 6px 0 2px; }

/* ---------------- Animações ---------------- */
@keyframes calxSlideNext { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes calxSlidePrev { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
@keyframes calxSideIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
@keyframes calxLand { 0% { transform: scale(.86); box-shadow: 0 0 0 0 var(--accent-ring); } 55% { transform: scale(1.04); box-shadow: 0 0 0 5px var(--accent-ring); } 100% { transform: none; box-shadow: 0 0 0 0 transparent; } }
@keyframes calxFlash { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 45% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-s) 45%, transparent); transform: translateY(-1px); } }
@keyframes calxShake { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* ---------------- Telas médias ---------------- */
@media (max-width: 1100px) and (min-width: 761px) {
  .calx-toolbar { padding: 14px 18px 10px; }
  .calx-scroll { padding-left: 18px; padding-right: 18px; }
  .calx-title { font-size: 22px; }
  .calx-tripbtn-l { display: none; }
  .calx-wcol-head { padding: 8px 6px; gap: 4px; }
  .calx-wcol-wd { font-size: 10px; }
}

/* ---------------- Celular (PWA) ---------------- */
@media (max-width: 760px) {
  .calx-toolbar { padding: 12px 16px 10px; gap: 10px 8px; }
  .calx-title { order: 1; flex: 1 1 0; font-size: 23px; }
  .calx-tools { order: 2; margin-left: 0; gap: 4px; }
  .calx-break { display: block; order: 3; flex-basis: 100%; height: 0; }
  .calx-nav { order: 4; }
  .calx-seg-m { order: 5; flex: 1; }
  .calx-seg-m button { flex: 1; height: 34px; padding: 0 6px; }
  .calx-seg-m button svg.lucide { display: none; }
  .calx-navbtn { width: 40px; height: 40px; }
  .calx-today { height: 40px; padding: 0 12px; }
  .calx-optbtn { width: 40px !important; height: 40px; }
  .calx-tripbtn { height: 40px; padding: 0 8px 0 10px; }
  .calx-tripbtn-l { display: none; }
  .calx-scroll { padding: 0 16px 28px; gap: 12px; }
  .calx-body { gap: 10px; }

  .calx-agenda { gap: 4px; }
  .calx-aday { grid-template-columns: 38px minmax(0, 1fr); gap: 10px; padding: 12px 8px 8px 10px; }
  .calx-aday-badge b { font-size: 22px; }
  .calx-aday-add { opacity: 1; width: 40px !important; height: 40px; margin-right: -4px; }
  .calx-aday-head { min-height: 40px; }
  .calx-atime { width: auto; min-width: 0; font-size: 11px; }
  .calx-atime:empty { display: none; }
  .calx-evrow { padding: 8px 8px 8px 0; min-height: 48px; }
  .calx-evrow-time { width: auto; font-size: 11px; }
  .calx-evrow-tag { display: none; }
  .calx-free { min-height: 40px; }
  .calx-free > span { opacity: 1; }
  .calx-bulk { margin-left: 0; height: 36px; }
  .calx-ndsched span { display: none; }
  .calx-ndsched { width: 40px; height: 40px; padding: 0; }
  .calx-aday.calx-dl { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-sm); border-radius: var(--r-lg); }

  .calx-trip { padding: 14px 14px 12px; border-radius: var(--r-lg); }
  .calx-trip-emoji { width: 42px; height: 42px; font-size: 24px; border-radius: 13px; }
  .calx-trip-title { font-size: 17px; }
  .calx-trip-prep { flex: 1 1 100%; }
  .calx-trip-btns { flex: 1 1 100%; }
  .calx-trip-btns .btn { flex: 1; height: 38px; }
  .calx-trip-track { grid-template-columns: repeat(var(--days, 10), 112px) !important; }
  .calx-tday { min-height: 80px; }

  .calx-sp { height: 36px; padding: 0 12px; font-size: 13px; }
  .calx-new .input { height: 44px; font-size: 16px; }
  .calx-new-foot .btn { height: 40px; padding: 0 16px; }
  .calx-tripchip { height: 30px; }
}
