/* Agenda do dia: compromisso (com hora) x tarefa (sem hora), carga do dia e duração */

/* ---- Hoje: faixa "Seu dia" ---- */
/* faixa "Seu dia": sem caixa, barra fina e uma linha de texto discreta; cor forte só quando o dia estoura */
.day-load { margin: 0 0 0.6rem; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.day-load-bar { position: relative; height: 4px; border-radius: 999px; background: var(--border-color); overflow: hidden; display: flex; }
.day-load-bar i { display: block; height: 100%; }
.day-load-bar i.appt { background: color-mix(in srgb, #6366f1 65%, transparent); }
.day-load-bar i.todo { background: color-mix(in srgb, #6366f1 30%, transparent); }
.day-load-bar b.cap { position: absolute; top: 0; bottom: 0; width: 2px; background: #dc2626; }
.day-load-text { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.9rem; font-size: 0.78rem; color: var(--text-muted); }
.day-load-text b { color: var(--text-secondary); font-weight: 600; }
.day-load-text em { font-style: normal; }
.day-load-msg { display: inline-flex; align-items: center; gap: 0.35rem; }
.day-load-msg::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); }
.day-load.is-ok .day-load-msg::before { background: #22c55e; }
.day-load.is-full .day-load-msg::before { background: #f59e0b; }
.day-load.is-over .day-load-msg { color: #dc2626; font-weight: 600; }
.day-load.is-over .day-load-msg::before { background: #dc2626; }
/* medidor do dia ao lado do título Hoje (computador); no celular fica a linha recolhida, e a faixa de baixo só aparece no celular */
.day-meter-wrap { position: relative; display: inline-flex; align-items: center; gap: 0.5rem; margin-left: 0.9rem; }
.day-meter { display: inline-flex; align-items: center; gap: 0.55rem; border: 0; background: transparent; padding: 0.2rem 0.1rem; font-family: inherit; font-size: 0.8rem; color: var(--text-secondary); cursor: pointer; }
.dm-bar { position: relative; width: 90px; height: 6px; border-radius: 999px; background: var(--border-color); overflow: hidden; display: flex; flex-shrink: 0; }
.dm-bar i { display: block; height: 100%; }
.dm-bar i.appt { background: color-mix(in srgb, #6366f1 80%, transparent); }
.dm-bar i.todo { background: color-mix(in srgb, #6366f1 35%, transparent); }
.dm-bar b.cap { position: absolute; top: 0; bottom: 0; width: 2px; background: #dc2626; }
.day-meter.is-full .dm-bar i { background: #f59e0b; } .day-meter.is-full .dm-bar i.todo { background: #fbbf24; }
.day-meter.is-over .dm-bar i { background: #dc2626; } .day-meter.is-over .dm-bar i.todo { background: #f87171; }
.dm-text { white-space: nowrap; }
.day-meter.is-full .dm-text { color: #b45309; } .day-meter.is-over .dm-text { color: #dc2626; font-weight: 600; }
.dm-missing { border: 0; background: rgba(245, 158, 11, 0.14); color: #b45309; font-family: inherit; font-size: 0.72rem; font-weight: 700; border-radius: 999px; padding: 0.1rem 0.5rem; cursor: pointer; }
.dm-missing:hover { background: rgba(245, 158, 11, 0.24); }
.dm-gear { display: inline-flex; align-items: center; border: 0; background: transparent; color: var(--text-muted); padding: 0.2rem; border-radius: 6px; cursor: pointer; opacity: 0.7; }
.dm-gear:hover { opacity: 1; color: var(--text-secondary); background: var(--bg-surface-elevated); }
.st-card.st-flash { box-shadow: 0 0 0 3px var(--accent-primary); transition: box-shadow 0.4s; }
.dm-pop { display: none; position: absolute; left: 0; top: 100%; z-index: 40; min-width: 240px; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14); padding: 0.6rem 0.8rem; font-size: 0.82rem; }
.day-meter-wrap:hover .dm-pop, .day-meter-wrap:focus-within .dm-pop { display: block; }
.dm-row { display: flex; justify-content: space-between; gap: 1.5rem; padding: 0.15rem 0; color: var(--text-secondary); }
.dm-row b { color: var(--text-primary); }
.dm-link { display: block; width: 100%; text-align: left; border: 0; background: transparent; font-family: inherit; font-size: inherit; color: var(--accent-primary); padding: 0.4rem 0 0; cursor: pointer; }
.dm-link:hover { text-decoration: underline; }
@media (min-width: 801px) { #day-load { display: none; } }
@media (max-width: 800px) { .day-meter-wrap { display: none; } }
/* computador: os cartões de filtro ficam numa linha ACIMA do título Hoje; o título, o progresso e o medidor ficam embaixo */
@media (min-width: 801px) {
  .today-header-container { flex-wrap: wrap; row-gap: 0.7rem; }
  .today-header-tools { order: -1; flex: 1 1 100%; min-width: 0; }
  .today-header-tools .today-summary { flex: 1 1 auto; justify-content: flex-end; }   /* os cartões ficam à direita, ao lado do Mostrar */
  /* Em Breve (calendário, painel e lista): mesma ideia, as ações e os cartões numa linha acima do título, à direita */
  body[data-view="upcoming"] .view-header { flex-wrap: wrap; row-gap: 0.7rem; }
  body[data-view="upcoming"] .view-header .view-actions { order: -1; flex: 1 1 100%; justify-content: flex-end; }
}
/* Calendário no computador: sobe (menos vão sob o título) e usa a largura toda; a semana usa a altura da janela */
@media (min-width: 801px) {
  .page-container:has(.cal-host) { max-width: min(1800px, 100%); padding: 1.1rem 1.4rem 0.8rem; }
  .page-container:has(.cal-host) .view-header { margin-bottom: 0.4rem; padding-bottom: 0; border-bottom: 0; }
  .page-container:has(.cal-host) .cal-head { margin: 0 0 0.5rem; }
  .wk-scroll { max-height: max(360px, calc(100vh - 330px)); }
}
.day-load-cfg { margin-left: auto; display: inline-flex; align-items: center; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; padding: 0 2px; opacity: 0.6; }
.day-load-cfg:hover { opacity: 1; color: var(--text-secondary); }
.day-load .day-load-noest { color: inherit; text-decoration: none; }
.day-load .day-load-noest:hover { color: var(--text-secondary); text-decoration: underline; }

/* ---- Hoje: seções Compromissos / A fazer dentro da coluna ---- */
.today-section-head { display: flex; align-items: center; gap: 0.4rem; margin: 0.35rem 0 0.15rem; padding: 0 0.15rem; font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.today-section-head em { font-style: normal; font-weight: 600; background: var(--bg-surface-elevated); border-radius: 999px; padding: 0 0.45rem; }
.today-section-head:not(:first-child) { margin-top: 0.9rem; padding-top: 0.7rem; border-top: 1px dashed var(--border-color); }
.today-section-empty { font-size: 0.8rem; color: var(--text-muted); padding: 0.4rem 0.2rem; font-style: italic; }
.today-chip.appt-chip { border-color: color-mix(in srgb, #6366f1 45%, var(--border-color)); color: #4f46e5; }

/* ---- cartão de compromisso ---- */
/* compromisso usa a borda padrao do cartao (sem faixa colorida na lateral) */
.today-card-when { display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.2rem; font-size: 0.85rem; color: #4f46e5; cursor: pointer; }
.today-card-when b { font-size: 0.95rem; font-weight: 700; }
.today-card-when > span { font-size: 0.74rem; font-weight: 600; color: var(--text-muted); background: var(--bg-surface-elevated); border-radius: 999px; padding: 0 0.45rem; }
.today-card-when svg, .today-card-when i { flex-shrink: 0; }
/* estado do compromisso em texto discreto (sem selo): "já passou" em cinza, "sobrepõe ..." em vermelho; a palavra compromisso é um rótulo pequeno no fim da linha */
.appt-tag { font-style: normal; font-size: 0.78rem; font-weight: 500; margin-left: 0.4rem; }
.appt-tag::before { content: '·'; margin-right: 0.4rem; }
.appt-tag.is-passed { color: var(--text-muted); }
.appt-tag.is-conflict { color: #dc2626; cursor: help; }
.today-meta-item.appt-kind { margin-left: auto; padding: 0.08rem 0.55rem; border-radius: 999px; background: color-mix(in srgb, #6366f1 10%, transparent); color: #4f46e5; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
/* compromisso que passou: so a etiqueta "ja passou" muda; o cartao, a faixa e o horario ficam como os outros */


/* ---- compromissos de dias anteriores: seção dobrada no fim da coluna Atrasada ---- */
.passed-appts { margin-top: 0.6rem; border: 1px dashed var(--border-color); border-radius: 12px; }
.passed-appts-head { display: flex; align-items: center; gap: 0.4rem; width: 100%; padding: 0.6rem 0.8rem; border: 0; background: transparent; font-family: inherit; font-size: 0.82rem; font-weight: 700; color: var(--text-secondary); cursor: pointer; text-align: left; }
.passed-appts-head em { margin-left: auto; font-style: normal; font-weight: 600; background: var(--bg-surface-elevated); border-radius: 999px; padding: 0 0.5rem; color: var(--text-muted); }
.passed-appts-head .pa-chev { transition: transform .15s; }
.passed-appts.is-open .pa-chev { transform: rotate(90deg); }
.passed-appts-body { display: none; padding: 0 0.5rem 0.5rem; flex-direction: column; gap: 0.5rem; }
.passed-appts.is-open .passed-appts-body { display: flex; }

/* ---- Em Breve: tempo estimado do dia no cabeçalho da coluna ---- */
.col-load { display: inline-flex; align-items: center; gap: 0.2rem; font-size: 0.72rem; font-weight: 700; color: var(--text-muted); background: var(--bg-surface-elevated); border-radius: 999px; padding: 0.05rem 0.45rem; }
.col-load.is-over { color: #dc2626; background: rgba(220, 38, 38, 0.1); }

/* ---- chip de duração dentro da linha da Data na gaveta ---- */
.task-prop-dur { display: inline-flex; align-items: center; gap: 0.3rem; margin-left: auto; font-family: inherit; font-size: 0.85rem; font-weight: 600; padding: 0.15rem 0.55rem; border-radius: 999px; border: 1px dashed var(--border-color); background: transparent; color: var(--text-muted); cursor: pointer; flex-shrink: 0; }
.task-prop-dur:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.task-prop-dur.is-set { border-style: solid; color: var(--accent-primary); background: color-mix(in srgb, var(--accent-primary) 8%, transparent); }
.task-prop-dur.is-locked { cursor: not-allowed; opacity: 0.6; }

/* ---- a palavra 'compromisso' (uma informação só, discreta) e o aviso na nova tarefa ---- */
.appt-word { font-style: normal; font-size: 0.7rem; font-weight: 600; text-transform: lowercase; letter-spacing: 0.02em; color: #6366f1; opacity: 0.85; margin-left: 0.1rem; }
.qa-appt-hint { display: flex; align-items: center; gap: 0.4rem; margin: 0.35rem 1rem 0; padding: 0.35rem 0.6rem; font-size: 0.78rem; color: #4f46e5; background: color-mix(in srgb, #6366f1 9%, transparent); border-radius: 8px; }
.qa-appt-hint[hidden] { display: none; }
.qa-appt-hint svg, .qa-appt-hint i { flex-shrink: 0; }

/* ---- cartões de filtro (tarefas, compromissos, atrasadas...) ---- */
.today-chip.cf-chip { cursor: pointer; }
.today-chip.cf-chip:hover { border-color: var(--accent-primary); }
.today-chip.cf-chip.is-on { background: color-mix(in srgb, var(--accent-primary) 14%, var(--bg-surface)); border-color: var(--accent-primary); color: var(--accent-primary); box-shadow: 0 0 0 1px var(--accent-primary) inset; }
.today-chip.cf-chip.is-late.is-on { background: rgba(220, 38, 38, 0.12); border-color: #dc2626; color: #dc2626; box-shadow: 0 0 0 1px #dc2626 inset; }
/* cartões de filtro: sem fundo (o da tela) e borda cinza; ligado = borda e texto na cor do tipo com uma tinta leve */
:is(.cf-strip, .today-summary) .today-chip, :is(.cf-strip, .today-summary) .today-chip.appt-chip, :is(.cf-strip, .today-summary) .today-chip.is-late, :is(.cf-strip, .today-summary) .today-chip.cover-chip-btn { background: transparent; border-color: var(--border-color); }
:is(.cf-strip, .today-summary) .today-chip.is-late, :is(.cf-strip, .today-summary) .today-chip.is-late b { color: #b91c1c; }
:is(.cf-strip, .today-summary) .today-chip.cover-chip-btn { color: var(--text-secondary); }
:is(.cf-strip, .today-summary) .today-chip:hover { border-color: var(--text-muted); }
:is(.cf-strip, .today-summary) .today-chip.cf-chip.is-on { background: color-mix(in srgb, var(--accent-primary) 8%, transparent); border-color: var(--accent-primary); color: var(--accent-primary); box-shadow: none; }
:is(.cf-strip, .today-summary) .today-chip.cf-chip.appt-chip.is-on { background: color-mix(in srgb, #6366f1 8%, transparent); border-color: #6366f1; color: #4f46e5; }
:is(.cf-strip, .today-summary) .today-chip.cf-chip.is-late.is-on { background: rgba(220, 38, 38, 0.07); border-color: #dc2626; color: #dc2626; box-shadow: none; }
:is(.cf-strip, .today-summary) .today-chip.cover-chip-btn.is-on { background: rgba(124, 58, 237, 0.08); border-color: #7c3aed; color: #6d28d9; }
:is(.cf-strip, .today-summary) .today-chip.cf-chip.is-on b { color: inherit; }
.cf-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.2rem 0 1rem; }
.cf-clear { display: inline-flex; align-items: center; gap: 0.25rem; font-family: inherit; font-size: 0.78rem; font-weight: 600; color: var(--accent-primary); background: transparent; border: 0; cursor: pointer; padding: 0.2rem 0.3rem; text-decoration: underline; }
.cf-empty { text-align: center; padding: 2.5rem 1rem; color: var(--text-muted); }
.cf-empty p { margin: 0.4rem 0; }
.cf-empty p b { color: var(--text-primary); }

/* ---- compromisso: horário na mesma linha dos demais dados do cartão ---- */
.today-meta-item.appt-when { color: #4f46e5; font-weight: 600; cursor: pointer; flex-wrap: wrap; }
.today-meta-item.appt-when b { font-weight: 700; }

/* ---- agenda de compromissos no Hoje (todos os dias) ---- */
.appt-agenda { max-width: 860px; display: flex; flex-direction: column; gap: 0.2rem; margin-top: 0.4rem; }
.agenda-day { margin-top: 0.9rem; }
.agenda-day .today-section-head { margin: 0 0 0.4rem; padding: 0 0.15rem; font-size: 0.8rem; }
.agenda-day .today-section-head.is-today { color: var(--accent-primary); }
.agenda-day-cards { display: flex; flex-direction: column; gap: 0.5rem; }

/* ---- Calendário (Em Breve e projetos) ---- */
.cal-host.is-loading, .cal.is-loading { opacity: 0.6; }
.cal-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0.7rem 1rem; margin: 0.2rem 0 0.8rem; }
.cal-nav { display: inline-flex; align-items: center; gap: 0.4rem; }
.cal-nav h2 { margin: 0; min-width: 11rem; text-align: center; font-size: 1.15rem; font-weight: 700; text-transform: capitalize; color: var(--text-primary); }
.cal-nav-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border-color); background: transparent; color: var(--text-secondary); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.cal-nav-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.cal-legend { margin-left: auto; display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.76rem; color: var(--text-muted); }
.cal-legend i, .cal-dots i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.cal-legend i.appt, .cal-dots i.appt { background: #6366f1; }
.cal-legend i.task, .cal-dots i.task { background: #94a3b8; margin-left: 0.5rem; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; margin-bottom: 0.3rem; }
.cal-weekdays span { text-align: center; font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); padding: 0.2rem 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(var(--rowh, 118px), auto); gap: 1px; background: var(--border-color); border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; }
.cal-cell { background: var(--bg-surface); padding: 0.3rem 0.35rem 0.4rem; display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; cursor: pointer; }
.cal-cell:hover { background: color-mix(in srgb, var(--accent-primary) 4%, var(--bg-surface)); }
.cal-cell.is-other { background: var(--bg-surface-elevated); }
.cal-cell.is-other .cal-daynum span { color: var(--text-muted); opacity: 0.7; }
.cal-cell.is-weekend:not(.is-other) { background: color-mix(in srgb, var(--bg-surface-elevated) 55%, var(--bg-surface)); }
.cal-daynum { display: flex; align-items: center; justify-content: space-between; }
.cal-daynum span { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 999px; font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); }
.cal-cell.is-today .cal-daynum span { background: var(--accent-primary); color: #fff; font-weight: 700; }
.cal-count { font-style: normal; font-size: 0.68rem; font-weight: 700; color: var(--text-muted); }
.cal-items { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-item { display: flex; align-items: center; gap: 0.3rem; width: 100%; text-align: left; font-family: inherit; font-size: 0.74rem; line-height: 1.25; padding: 0.12rem 0.35rem; border: 0; border-radius: 5px; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-item b { font-weight: 700; flex-shrink: 0; }
.cal-item.appt { background: color-mix(in srgb, #6366f1 13%, transparent); color: #4338ca; border-left: 3px solid #6366f1; }
.cal-item.task { background: transparent; color: var(--text-secondary); }
.cal-item.task:hover { background: var(--bg-surface-elevated); }
.cal-item.is-done { text-decoration: line-through; opacity: 0.55; }
.cal-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: #94a3b8; }
.cal-dot.p1 { background: var(--p1-color, #dc2626); } .cal-dot.p2 { background: var(--p2-color, #f97316); } .cal-dot.p3 { background: var(--p3-color, #3b82f6); }
.cal-more { align-self: flex-start; font-family: inherit; font-size: 0.72rem; font-weight: 700; color: var(--accent-primary); background: transparent; border: 0; padding: 0.1rem 0.35rem; cursor: pointer; }
.cal-dots { display: none; align-items: center; gap: 3px; margin-top: auto; }
.cal-dots span { font-size: 0.68rem; font-weight: 700; color: var(--text-muted); margin-left: 2px; }
.cal-dots i.task { margin-left: 0; }
.cal-day-overlay { position: fixed; inset: 0; z-index: 2200; background: rgba(15, 23, 42, 0.35); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.cal-day-card { width: min(560px, 100%); max-height: min(80vh, 720px); background: var(--bg-surface); border-radius: 16px; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35); display: flex; flex-direction: column; overflow: hidden; }
.cal-day-head { display: flex; align-items: baseline; gap: 0.6rem; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--border-color); }
.cal-day-head b { font-size: 1rem; text-transform: capitalize; }
.cal-day-head span { font-size: 0.78rem; color: var(--text-muted); }
.cal-day-x { margin-left: auto; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; border-radius: 8px; padding: 0.2rem; }
.cal-day-body { padding: 0.8rem 1rem 1rem; overflow-y: auto; display: flex; flex-direction: column; gap: 0.5rem; }
.cal-day-empty { text-align: center; color: var(--text-muted); padding: 1.5rem 0; }
@media (max-width: 800px) {
  .cal-grid { grid-auto-rows: minmax(58px, auto); }
  .cal-items { display: none; }
  .cal-dots { display: inline-flex; }
  .cal-count { display: none; }
  .cal-legend { margin-left: 0; }
  .cal-nav h2 { min-width: 8rem; font-size: 1.02rem; }
  .cal-day-overlay { align-items: flex-end; padding: 0; }
  .cal-day-card { width: 100%; max-height: 82vh; border-radius: 18px 18px 0 0; }
}

/* ---- Calendário: mês | semana, criar no dia, arrastar ---- */
.cal-mode { display: inline-flex; border: 1px solid var(--border-color); border-radius: 9px; overflow: hidden; }
.cal-mode button { font-family: inherit; font-size: 0.8rem; font-weight: 600; padding: 0.3rem 0.8rem; border: 0; background: transparent; color: var(--text-secondary); cursor: pointer; }
.cal-mode button.on { background: var(--accent-primary); color: #fff; }
.cal-add { display: none; margin-left: auto; width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--border-color); background: var(--bg-surface); color: var(--accent-primary); font-size: 1rem; font-weight: 700; line-height: 1; cursor: pointer; align-items: center; justify-content: center; padding: 0; }
.cal-cell:hover .cal-add { display: inline-flex; }
.cal-cell:hover .cal-count { display: none; }
.cal-add:hover { background: var(--accent-primary); color: #fff; }
.cal-item[draggable="true"] { cursor: grab; }
.is-dragging { opacity: 0.45; }
.cal-cell.is-drop, .wk-col.is-drop, .wk-allday-cell.is-drop { outline: 2px dashed var(--accent-primary); outline-offset: -2px; background: color-mix(in srgb, var(--accent-primary) 8%, var(--bg-surface)); }
/* "+N mais": cartão flutuante com a lista do dia (rolagem própria) */
.cal-more-pop { position: fixed; z-index: 1200; width: 300px; max-height: 440px; display: flex; flex-direction: column; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 12px; box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2); overflow: hidden; }
.cal-more-head { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--border-color); font-size: 0.85rem; flex-shrink: 0; }
.cal-more-head b { flex: 1; text-transform: capitalize; }
.cal-more-total { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); background: var(--bg-surface-elevated); border-radius: 999px; padding: 0.05rem 0.5rem; }
.cal-more-add, .cal-more-x { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--border-color); background: var(--bg-surface); color: var(--text-secondary); font-size: 1rem; line-height: 1; cursor: pointer; padding: 0; }
.cal-more-add { color: var(--accent-primary); font-weight: 700; } .cal-more-add:hover { background: var(--accent-primary); color: #fff; } .cal-more-x:hover { background: #fee2e2; color: #dc2626; }
.cal-more-list { overflow-y: auto; max-height: 340px; padding: 0.3rem; }
.cal-more-row { display: flex; align-items: baseline; gap: 0.45rem; width: 100%; text-align: left; border: 0; background: transparent; font-family: inherit; font-size: 0.82rem; padding: 0.35rem 0.5rem; border-radius: 8px; cursor: pointer; color: var(--text-primary); }
.cal-more-row:hover { background: var(--bg-surface-elevated); }
.cal-more-row b { color: #4f46e5; font-weight: 700; white-space: nowrap; }
.cal-more-row .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-more-row small { color: var(--text-muted); white-space: nowrap; }
.cal-more-row.is-done .t { text-decoration: line-through; opacity: 0.6; } .cal-more-row.is-ghost { opacity: 0.7; }
.cal-more-foot { border-top: 1px solid var(--border-color); padding: 0.45rem 0.8rem; text-align: right; flex-shrink: 0; }
.cal-more-open { border: 0; background: transparent; font-family: inherit; font-size: 0.8rem; font-weight: 600; color: var(--accent-primary); cursor: pointer; }
.cal-more-open:hover { text-decoration: underline; }
.cal-day-foot { padding: 0.7rem 1rem; border-top: 1px solid var(--border-color); display: flex; justify-content: flex-end; }
.wk { border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; background: var(--bg-surface); }
.wk-row { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); }
.wk-gutter { border-right: 1px solid var(--border-color); font-size: 0.7rem; color: var(--text-muted); }
.wk-heads { border-bottom: 1px solid var(--border-color); background: var(--bg-surface-elevated); }
.wk-dayhead { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; padding: 0.4rem 0; border-left: 1px solid var(--border-color); cursor: pointer; text-transform: uppercase; font-size: 0.7rem; font-weight: 700; color: var(--text-muted); }
.wk-dayhead b { font-size: 1.05rem; color: var(--text-primary); display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; border-radius: 999px; }
.wk-dayhead.is-today b { background: var(--accent-primary); color: #fff; }
.wk-allday { border-bottom: 1px solid var(--border-color); min-height: 30px; }
.wk-allday .wk-gutter { display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.1; padding: 0.2rem; }
.wk-allday-cell { border-left: 1px solid var(--border-color); padding: 2px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wk-scroll { max-height: 620px; overflow-y: auto; }
.wk-hour { box-sizing: border-box; border-bottom: 1px solid var(--border-color); text-align: right; padding: 0 0.35rem; }
.wk-hour span { position: relative; top: -0.55em; background: var(--bg-surface); padding: 0 2px; }
.wk-body .wk-gutter { border-bottom: 0; }
.wk-col { position: relative; border-left: 1px solid var(--border-color); cursor: cell; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hour) - 1px), var(--border-color) calc(var(--hour) - 1px), var(--border-color) var(--hour)); }
.wk-col.is-today { background-color: color-mix(in srgb, var(--accent-primary) 4%, transparent); }
.wk-appt { position: absolute; box-sizing: border-box; overflow: hidden; text-align: left; font-family: inherit; font-size: 0.72rem; line-height: 1.25; padding: 0.15rem 0.3rem; border: 0; border-left: 3px solid #6366f1; border-radius: 5px; background: color-mix(in srgb, #6366f1 16%, var(--bg-surface)); color: #4338ca; cursor: pointer; }
.wk-appt[draggable="true"] { cursor: grab; }
.wk-appt b { font-weight: 700; margin-right: 0.15rem; }
.wk-appt.is-done { text-decoration: line-through; opacity: 0.55; }
.wk-now { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid #dc2626; z-index: 3; pointer-events: none; }
.wk-now::before { content: ''; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: #dc2626; }
@media (max-width: 800px) {
  .wk { overflow-x: auto; }
  .wk-row { min-width: 720px; }
  .wk-scroll { max-height: 520px; }
  .cal-add { display: none !important; }
}

/* ---- cartões de filtro ao lado do Mostrar (mesmo padrão do Hoje) ---- */
.view-actions .cf-strip { margin: 0; justify-content: flex-end; }

/* ---- tempo do dia no calendário ---- */
.cal-load { display: inline-flex; align-items: center; gap: 0.15rem; margin-left: auto; font-style: normal; font-size: 0.68rem; font-weight: 700; color: var(--text-muted); background: var(--bg-surface-elevated); border-radius: 999px; padding: 0.05rem 0.4rem; }
.cal-load.is-full { color: #b45309; background: rgba(245, 158, 11, 0.16); }
.cal-load.is-over { color: #dc2626; background: rgba(220, 38, 38, 0.12); }
.cal-load.is-off { color: #7c3aed; background: rgba(124, 58, 237, 0.1); }
.cal-cell:hover .cal-load { display: none; }
.wk-load { font-size: 0.66rem; font-weight: 700; color: var(--text-muted); text-transform: none; }
.wk-load.is-full { color: #b45309; } .wk-load.is-over { color: #dc2626; } .wk-load.is-off { color: #7c3aed; }
.cal-day-load { margin: 0.6rem 1rem 0; padding: 0.55rem 0.7rem; border: 1px solid var(--border-color); border-radius: 10px; display: flex; flex-direction: column; gap: 0.4rem; }
.cal-day-load.is-over { border-color: rgba(220, 38, 38, 0.45); }
.cal-day-load-text { font-size: 0.78rem; color: var(--text-secondary); }
.cal-day-load-text b { color: var(--text-primary); }
.cal-day-load-text em { font-style: normal; color: var(--text-muted); }
.cal-day-load-text strong { color: #dc2626; }

/* ---- total do período, aviso ao arrastar e link "sem estimativa" ---- */
.cal-total { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); background: var(--bg-surface-elevated); border-radius: 999px; padding: 0.25rem 0.7rem; }
.cal-total.is-full { color: #b45309; background: rgba(245, 158, 11, 0.16); }
.cal-total.is-over { color: #dc2626; background: rgba(220, 38, 38, 0.12); }
.cal-ask { width: min(460px, 100%); }
.cal-ask-msg { padding: 0.8rem 1.1rem 0; font-size: 0.88rem; color: var(--text-secondary); line-height: 1.45; }
.cal-ask-msg p { margin: 0 0 0.5rem; }
.cal-ask-sug { color: #15803d; }
.cal-ask-btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; padding: 0.7rem 1.1rem 1rem; }
.day-load-noest, .cal-noest { font-family: inherit; font-size: inherit; color: var(--accent-primary); background: transparent; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }

/* ---- repetições futuras das recorrentes ---- */
.cal-item.is-ghost, .wk-appt.is-ghost { opacity: 0.6; border-style: dashed; background: transparent; }
.wk-appt.is-ghost { border: 1px dashed #6366f1; border-left-width: 3px; }
.cal-item.is-ghost[draggable] { cursor: pointer; }
.cal-ghost-btn { font-family: inherit; font-size: 0.78rem; font-weight: 600; display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.28rem 0.65rem; border-radius: 999px; border: 1px solid var(--border-color); background: transparent; color: var(--text-muted); cursor: pointer; }
.cal-ghost-btn.on { color: var(--accent-primary); border-color: var(--accent-primary); background: color-mix(in srgb, var(--accent-primary) 8%, transparent); }
.cal-day-ghost { display: flex; align-items: center; gap: 0.5rem; width: 100%; text-align: left; font-family: inherit; font-size: 0.85rem; padding: 0.55rem 0.7rem; margin-bottom: 0.4rem; border: 1px dashed var(--border-color); border-radius: 10px; background: transparent; color: var(--text-secondary); cursor: pointer; }
.cal-day-ghost small { margin-left: auto; color: var(--text-muted); }

/* ---- gaveta: data em duas linhas (quando / como) ---- */
.task-prop-range { margin-left: 0.5rem; font-size: 0.85rem; color: var(--text-primary); white-space: nowrap; }
.task-prop-end { font-family: inherit; font-size: inherit; font-weight: 700; color: var(--text-primary); background: transparent; border: 0; border-bottom: 1px dashed var(--text-muted); padding: 0; cursor: pointer; }
.task-prop-end:hover { color: var(--accent-primary); border-bottom-color: var(--accent-primary); }
.task-prop-subrow { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }
.task-prop-rec { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.8rem; color: var(--text-primary); }
.task-prop-subrow .task-prop-dur { margin-left: 0; }

/* ---- menu de duração em duas colunas e ampulheta ---- */
.hg-icon { display: inline-block; vertical-align: -0.2em; flex-shrink: 0; }
.row-menu-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(var(--rows, 6), auto); grid-template-columns: 1fr 1fr; gap: 2px 6px; padding: 2px 4px; }
.row-menu-opt { display: flex; align-items: center; gap: 0.35rem; }
.row-menu-opt .rm-check { width: 0.9rem; color: var(--accent-primary); font-weight: 700; flex-shrink: 0; }
.row-menu-opt em { margin-left: auto; font-style: normal; font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }
.row-menu-opt.is-sel { font-weight: 700; }
.row-menu-opt .rm-check i, .row-menu-opt .rm-check svg { color: var(--text-muted); }

/* ---- duração ---- */
.meta-chip.duration-chip, .today-meta-item.duration { color: var(--text-secondary); }
/* duração clicável no cartão: tracejado ao passar o mouse; sem duração, convite discreto sempre visível */
/* repetição futura de tarefa recorrente (filtro "recorrentes" do Em Breve) */
.today-task-card.is-ghost, .task-card.is-ghost { border-style: dashed; opacity: 0.75; }
.ghost-mark { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 16px; flex-shrink: 0; }
.ghost-note { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); }
.today-col-sub { display: contents; }   /* computador: o tempo do dia continua na mesma linha do título */
.js-dur-chip { cursor: pointer; border-radius: 6px; transition: background-color 0.12s, box-shadow 0.12s; }
.js-dur-chip:hover { background: var(--bg-surface-elevated); box-shadow: 0 0 0 1px var(--border-color); }
.js-dur-chip.is-empty { color: #b45309; border: 1px dashed #f59e0b; background: rgba(245, 158, 11, 0.12); border-radius: 999px; padding: 0.05rem 0.55rem; font-weight: 600; }
.js-dur-chip.is-empty:hover { color: #92400e; border-color: #d97706; background: rgba(245, 158, 11, 0.2); box-shadow: none; }
/* x para tirar o horário / a duração: aparece ao passar o mouse; no toque ficam as opções do menu */
.chip-x { display: inline-flex; align-items: center; justify-content: center; width: 0; height: 15px; margin-left: 0; padding: 0; border: 0; border-radius: 50%; background: var(--bg-surface-elevated); color: var(--text-muted); font-size: 12px; line-height: 1; cursor: pointer; opacity: 0; overflow: hidden; transition: width 0.12s, margin 0.12s, opacity 0.12s; font-family: inherit; }
.js-dur-chip:hover .chip-x, .appt-when:hover .chip-x, .date-chip:hover .chip-x { width: 15px; margin-left: 0.3rem; opacity: 1; }
.chip-x:hover { background: #fee2e2; color: #dc2626; }
@media (hover: none) { .chip-x { display: none !important; } }
.task-card.is-appointment .date-chip { color: #4f46e5; font-weight: 600; }
