/* =============================================================================
   DUPPLA — INÍCIO
   Ordem da rotina (v0.32): Resumo e clima → Agenda (próxima, placar de hoje, em seguida /
   semana) → Tarefas · Pendências → Projetos por etapa. O Speaker abre pelo cabeçalho.
   ============================================================================= */
.home { display: grid; gap: var(--sp-5); container: home / inline-size; max-width: 1560px; margin-inline: auto; }

/* ---------- Cabeçalho ---------- */
.home-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; padding-top: var(--sp-1); }
.home-hello { display: grid; gap: .3rem; }
.home-date { display: flex; align-items: center; gap: .55rem; color: var(--c-ink-3); font-size: var(--fs-sm); }
.home-clock { display: inline-flex; align-items: center; gap: .55rem; }
.home-time {
  display: inline-flex; align-items: center; padding: .05rem .5rem; border-radius: var(--r-pill);
  background: var(--c-brand-soft); color: var(--c-brand-ink); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums;
}
.home-title { font-size: var(--fs-2xl); letter-spacing: -.03em; font-weight: var(--fw-black); line-height: 1.1; outline: none; }

/* ---------- 1. Resumo de hoje ---------- */

/* ---------- Blocos ---------- */
.home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); align-items: stretch; }
.home-panel {
  display: flex; flex-direction: column; min-width: 0; padding: var(--sp-4) var(--sp-5) var(--sp-5);
  container: panel / inline-size; scroll-margin-top: calc(var(--appbar-h) + var(--sp-4));
}
.home-panel-head { display: flex; align-items: center; gap: .4rem .75rem; flex-wrap: wrap; margin-bottom: var(--sp-3); min-height: 2.25rem; }
.home-panel-title { font-size: var(--fs-lg); font-weight: var(--fw-bold); letter-spacing: -.01em; outline: none; }
.home-panel-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-left: auto; }
.home-panel-actions .seg-btn { min-height: 1.75rem; padding: 0 .65rem; font-size: var(--fs-xs); }
.home-head-note { font-size: var(--fs-xs); color: var(--c-ink-3); }
.home-head-action:empty { display: none; }
.home-head-link { display: inline-flex; align-items: center; gap: .25rem; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--c-ink-2); text-decoration: none; padding: .3rem .5rem; border-radius: var(--r-sm); white-space: nowrap; }
.home-head-link:hover { background: var(--c-surface-2); color: var(--c-ink); }
.home-head-link:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.home-head-link svg { width: .8rem; height: .8rem; }
.home-slot { min-height: 0; flex: 1; display: flex; flex-direction: column; }

.home-more { display: inline-flex; align-items: center; gap: .3rem; align-self: flex-start; margin-top: auto; padding: var(--sp-2) .5rem 0; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--c-ink-2); text-decoration: none; }
.home-more:hover { color: var(--c-ink); text-decoration: underline; }
.home-more svg { width: .8rem; height: .8rem; }

.home-loading { display: grid; gap: .6rem; padding: .3rem 0; }
.home-skel { display: block; height: 2.4rem; border-radius: var(--r-md); background: linear-gradient(90deg, var(--c-surface-2), var(--c-surface-sunken), var(--c-surface-2)); background-size: 200% 100%; animation: home-shimmer 1.3s linear infinite; }
.home-skel.short { width: 60%; }
@keyframes home-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .home-skel { animation: none; } }
.home-empty { flex: 1; display: grid; justify-items: center; align-content: center; gap: .5rem; padding: var(--sp-5) var(--sp-3); text-align: center; color: var(--c-ink-3); font-size: var(--fs-sm); }
.home-empty > svg { width: 1.4rem; height: 1.4rem; color: var(--c-success); }

/* ---------- 2a. Agenda ---------- */
.home-day-nav { display: flex; align-items: center; gap: .1rem; }
.home-day-btn {
  display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; border: 0; cursor: pointer;
  background: transparent; color: var(--c-ink-2);
}
.home-day-btn svg { width: .95rem; height: .95rem; }
.home-day-btn:hover { background: var(--c-surface-2); color: var(--c-ink); }
.home-day-btn:focus-visible, .home-day-today:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.home-day-label { min-width: 5.5rem; text-align: center; font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--c-ink); }
.home-day-today {
  margin-left: .25rem; border: 1px solid var(--c-border-strong); background: transparent; color: var(--c-ink-2); cursor: pointer;
  border-radius: var(--r-pill); padding: .15rem .6rem; font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-semibold);
}
.home-day-today:hover { color: var(--c-ink); border-color: var(--c-ink-3); }
.home-day-today[hidden] { display: none; }

.agenda-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.agenda-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .75rem; padding: .45rem .5rem; border-radius: var(--r-md); }
.agenda-item:hover { background: var(--c-surface-2); }
.agenda-main { min-width: 0; }
.agenda-title { display: block; font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--c-ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-title:hover { text-decoration: underline; color: var(--c-ink); }
.agenda-open { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; text-align: left; max-width: 100%; }
.agenda-open:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-xs); }
.agenda-sub { font-size: var(--fs-xs); color: var(--c-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-tags { display: flex; gap: .3rem; align-items: center; }
.agenda-time {
  display: grid; justify-items: center; min-width: 3.1rem; padding: .25rem .35rem; border-radius: 10px;
  background: var(--c-brand-soft); color: var(--c-brand-ink); font-variant-numeric: tabular-nums; line-height: 1.15;
}
.agenda-time strong { font-size: var(--fs-sm); }
.agenda-time span { font-size: .6875rem; opacity: .75; }
.agenda-item.mt--realizada .agenda-time { background: var(--c-success-soft); color: var(--c-success-ink); }
.agenda-item.mt--no_show .agenda-time { background: var(--c-surface-sunken); color: var(--c-ink-3); }
.agenda-item.is-late .agenda-time { background: var(--c-warning-soft); color: var(--c-warning-ink); }
.agenda-item.is-past { opacity: .62; }
.agenda-item.is-past:hover { opacity: 1; }
.agenda-item.is-now { background: color-mix(in srgb, var(--c-brand) 10%, transparent); box-shadow: inset 3px 0 0 var(--c-brand); }
.agenda-item.is-now .agenda-time { background: var(--c-brand); color: var(--c-on-brand); }
.agenda-mine, .agenda-flag { font-size: .625rem; font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: .05em; padding: .1rem .4rem; border-radius: var(--r-pill); white-space: nowrap; }
.agenda-mine { color: var(--c-brand-ink); background: var(--c-brand-soft); }
.agenda-flag { background: var(--c-surface-sunken); color: var(--c-ink-3); }
.agenda-flag.is-late { background: var(--c-warning-soft); color: var(--c-warning-ink); }
.agenda-flag.is-now { background: var(--c-brand); color: var(--c-on-brand); }
/* linha do "agora" (só no dia de hoje) */
.agenda-now { display: flex; align-items: center; gap: .5rem; padding: .2rem .5rem; color: var(--c-brand); }
.agenda-now-time { flex: none; font-size: .6875rem; font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; padding: .05rem .4rem; border-radius: var(--r-pill); background: var(--c-brand); color: var(--c-on-brand); }
.agenda-now-rule { flex: 1; height: 2px; border-radius: 2px; background: var(--c-brand); opacity: .55; }
/* dia sem reuniões: a próxima, a um clique */
.home-next { display: grid; justify-items: center; margin-top: .35rem; }
.home-next:empty { display: none; }
.home-next-btn {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: .9rem; align-items: center; text-align: left; max-width: 100%;
  padding: .6rem .8rem .6rem .9rem; border-radius: var(--r-md); border: 1px solid var(--c-border); background: var(--c-surface-2);
  color: var(--c-ink); font: inherit; cursor: pointer;
}
.home-next-btn:hover { border-color: var(--c-border-strong); }
.home-next-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.home-next-btn > svg { grid-column: 2; grid-row: 1 / span 3; width: .95rem; height: .95rem; color: var(--c-ink-3); }
.home-next-kicker { font-size: .625rem; font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: .06em; color: var(--c-ink-3); }
.home-next-when { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--c-brand-ink); }
.home-next-title { font-size: var(--fs-xs); color: var(--c-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22rem; }
.home-next-none { font-size: var(--fs-xs); color: var(--c-ink-3); }

/* ---------- 2b. Tarefas ---------- */

/* bloco estreito: os selos descem para baixo do título (o título não some) */
@container panel (max-width: 420px) {
  
  
  .agenda-item { grid-template-columns: auto minmax(0, 1fr); }
  .agenda-tags { grid-column: 2; }
  .agenda-tags:empty { display: none; }
}

/* ---------- 3. Pendências ---------- */

/* v0.32: no Início, as pendências em lista (uma coluna), no mesmo ritmo das tarefas */

/* ---------- 4. Projetos por etapa ---------- */

/* Lista "Ver todas" e paginação */
.dash-back { display: inline-flex; align-items: center; gap: .3rem; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--c-ink-2); text-decoration: none; justify-self: start; }
.dash-back svg { width: .85rem; height: .85rem; }
.dash-back:hover { color: var(--c-ink); }
.dash-pager { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); padding-top: var(--sp-3); margin-top: var(--sp-3); border-top: 1px solid var(--c-border); font-size: var(--fs-sm); }

/* Selo de saúde (página do projeto) */
.health-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .55rem; border-radius: var(--r-pill); font-size: .6875rem; font-weight: var(--fw-bold); white-space: nowrap; }
.health-badge svg { width: .75rem; height: .75rem; }
.health--ok { background: var(--c-success-soft); color: var(--c-success-ink); }
.health--warn { background: var(--c-warning-soft); color: var(--c-warning-ink); }
.health--danger { background: var(--c-danger-soft); color: var(--c-danger-ink); }
.health--muted { background: var(--c-neutral-soft); color: var(--c-neutral-ink); }
.health--done { background: var(--c-brand-soft); color: var(--c-brand-ink); }
.health--off { background: var(--c-surface-sunken); color: var(--c-ink-3); text-decoration: line-through; }

/* Selo de situação (pausado/cancelado) no Kanban, lista e página do projeto */
.status-chip { display: inline-flex; align-items: center; gap: .25rem; padding: .05rem .45rem; border-radius: var(--r-pill); font-size: .6875rem; font-weight: var(--fw-bold); white-space: nowrap; }
.status-chip svg { width: .7rem; height: .7rem; }
.status-chip--pausado { background: var(--c-neutral-soft); color: var(--c-neutral-ink); }
.status-chip--cancelado { background: var(--c-danger-soft); color: var(--c-danger-ink); }
.status-chip--suspenso { background: color-mix(in srgb, #7C5CC4 14%, var(--c-surface)); color: #5B3FA6; }
:root[data-theme="dark"] .status-chip--suspenso { color: #C9B6FF; }

/* ---------- Telas menores ---------- */

@container home (max-width: 980px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .home-title { font-size: var(--fs-xl); }
  .home-panel { padding: var(--sp-4); }
  .home-agenda .home-slot { max-height: none; }
  
  
  
}

/* =============================================================================
   v0.32 — Agenda do Início (ha-*), clima (wx-*) e Tarefas · Pendências lado a lado
   ============================================================================= */
.home-agenda { padding-bottom: var(--sp-4); }
.home-agenda .home-panel-head { margin-bottom: var(--sp-3); }
.ha { display: grid; gap: var(--sp-4); }
.ha-top { grid-template-columns: minmax(0, 1fr) minmax(260px, 330px); }
.ha-hero { min-height: 100%; }
.ha-hero-project { display: inline-flex; align-items: center; gap: .35rem; justify-self: start; padding: .15rem .6rem .15rem .45rem; border-radius: var(--r-pill); background: rgba(255, 255, 255, .14); color: #fff; font-size: var(--fs-sm); font-weight: var(--fw-semibold); text-decoration: none; }
.ha-hero-project:hover { background: rgba(255, 255, 255, .24); color: #fff; }
.ha-hero-project svg { width: .9rem; height: .9rem; }
.mtx-hero-type.is-mine { background: #fff; color: #0C5A63; }
.ha-board { grid-template-rows: auto minmax(0, 1fr) auto; }
.ha-board-title { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--c-ink-3); padding: 0 .2rem; }
.mtx-score { text-decoration: none; }
.ha-board-alert { display: flex; align-items: center; gap: .45rem; padding: .55rem .7rem; border-radius: 12px; background: var(--c-warning-soft); color: var(--c-warning-ink); font-size: var(--fs-xs); font-weight: var(--fw-bold); text-decoration: none; }
.ha-board-alert svg { width: .9rem; height: .9rem; flex: none; }
.ha-board-alert svg:last-child { margin-left: auto; }
.ha-board-alert:hover { filter: brightness(.97); }
.ha-bottom { display: grid; gap: var(--sp-3); }
.ha-bottom-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.ha-bottom-head > .home-head-link { margin-left: auto; }
.ha-tabs .seg-btn { min-height: 1.85rem; padding: 0 .8rem; font-size: var(--fs-xs); }
.ha-week-nav { display: flex; align-items: center; gap: .15rem; }
.ha-week-nav:empty { display: none; }
.ha-week-label { min-width: 8.5rem; text-align: center; font-size: var(--fs-sm); font-weight: var(--fw-bold); }
.ha-empty { display: flex; align-items: center; gap: .5rem; padding: var(--sp-3); border-radius: var(--r-md); background: var(--c-surface-2); color: var(--c-ink-3); font-size: var(--fs-sm); }
.ha-empty svg { width: 1rem; height: 1rem; flex: none; }
.ha-empty.is-error { color: var(--c-danger-ink); background: var(--c-danger-soft); }
/* em seguida: cartões em linha */

/* semana: 7 colunas */
.ha-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .4rem; }
.ha-day { display: grid; grid-template-rows: auto 1fr; gap: .35rem; min-height: 9rem; padding: .5rem; border-radius: 12px; background: var(--c-surface-2); border: 1px solid transparent; min-width: 0; }
.ha-day.is-weekend { background: color-mix(in srgb, var(--c-surface-2) 60%, transparent); }
.ha-day.is-today { border-color: var(--c-brand); background: color-mix(in srgb, var(--c-brand) 7%, var(--c-surface)); }
.ha-day.is-past { opacity: .7; }
.ha-day-head { display: flex; align-items: baseline; gap: .35rem; padding: 0 .15rem; }
.ha-day-head span:first-child { font-size: .7rem; font-weight: var(--fw-bold); color: var(--c-ink-3); text-transform: capitalize; }
.ha-day-head strong { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.ha-day.is-today .ha-day-head strong { color: var(--c-brand-ink); }
.ha-day-n { margin-left: auto; min-width: 1.15rem; height: 1.15rem; display: inline-grid; place-items: center; border-radius: 999px; background: var(--c-surface); font-size: .62rem; font-weight: var(--fw-bold); color: var(--c-ink-2); }
.ha-day-list { list-style: none; margin: 0; padding: 0; display: grid; align-content: start; gap: .3rem; }
.ha-day-empty { color: var(--c-ink-3); font-size: var(--fs-xs); padding: 0 .2rem; }
.ha-chip { width: 100%; display: grid; gap: 0; padding: .35rem .45rem; border: 0; border-left: 3px solid var(--tone, var(--c-brand)); border-radius: 7px; background: var(--c-surface); color: var(--c-ink); font: inherit; text-align: left; cursor: pointer; box-shadow: 0 1px 2px rgba(6, 24, 28, .06); }
.ha-chip:hover { box-shadow: 0 2px 8px -2px rgba(6, 24, 28, .2); }
.ha-chip:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.ha-chip-time { font-size: .66rem; font-weight: var(--fw-bold); color: var(--c-ink-3); font-variant-numeric: tabular-nums; }
.ha-chip-title { font-size: var(--fs-xs); font-weight: var(--fw-semibold); line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ha-chip-project { font-size: .64rem; color: var(--c-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ha-chip.is-realizada { opacity: .75; }
.ha-chip.is-realizada .ha-chip-time::after { content: " · realizada"; color: var(--c-success-ink); }
.ha-chip.is-no_show .ha-chip-time::after { content: " · no-show"; color: var(--c-danger-ink); }
.ha-chip.is-late { background: var(--c-warning-soft); }
.ha-chip.is-live { background: color-mix(in srgb, var(--c-brand) 14%, var(--c-surface)); }
@media (max-width: 1100px) { .ha-top { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .ha-week { grid-template-columns: minmax(0, 1fr); }
  .ha-day { min-height: 0; grid-template-columns: 4.5rem minmax(0, 1fr); grid-template-rows: none; }
  
  
}

/* clima */
.wx { display: flex; align-items: center; gap: var(--sp-4); min-height: 4.2rem; padding: .55rem .9rem .55rem .7rem; border-radius: 18px; background: var(--c-surface); border: 1px solid var(--c-border); box-shadow: var(--shadow-sm); }
.wx[hidden] { display: none; }
.wx-skel { width: 18rem; height: 3rem; }
.wx-now { display: flex; align-items: center; gap: .65rem; }
.wx-icon { width: 2.9rem; height: 2.9rem; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, #F3B23C 22%, var(--c-surface)); color: #C47A0B; }
.wx-icon svg { width: 1.7rem; height: 1.7rem; }
.wx-now.is-moon .wx-icon, .wx-now.is-cloudMoon .wx-icon { background: color-mix(in srgb, #6E7BD9 20%, var(--c-surface)); color: #4E5BB8; }
.wx-now.is-cloud .wx-icon, .wx-now.is-fog .wx-icon { background: var(--c-surface-2); color: var(--c-ink-2); }
.wx-now.is-rain .wx-icon, .wx-now.is-drizzle .wx-icon, .wx-now.is-storm .wx-icon { background: color-mix(in srgb, #3C8DF3 18%, var(--c-surface)); color: #2369C4; }
.wx-temp { font-size: 2rem; font-weight: var(--fw-black); letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.wx-info { display: grid; line-height: 1.25; min-width: 0; }
.wx-label { font-size: var(--fs-sm); }
.wx-city { display: inline-flex; align-items: center; gap: .2rem; font-size: var(--fs-xs); color: var(--c-ink-3); text-decoration: none; }
.wx-city:hover { color: var(--c-ink); text-decoration: underline; }
.wx-city svg { width: .75rem; height: .75rem; }
.wx-meta { display: flex; align-items: center; gap: .55rem; font-size: .7rem; color: var(--c-ink-3); font-variant-numeric: tabular-nums; }
.wx-meta > span { display: inline-flex; align-items: center; gap: .15rem; }
.wx-meta svg { width: .75rem; height: .75rem; }
.wx-days { list-style: none; margin: 0; padding: 0 0 0 var(--sp-4); border-left: 1px solid var(--c-border); display: flex; gap: .85rem; }
.wx-day { display: grid; justify-items: center; gap: .1rem; font-size: .68rem; color: var(--c-ink-3); }
.wx-day > svg { width: 1.1rem; height: 1.1rem; color: var(--c-ink-2); }
.wx-day-wd { font-weight: var(--fw-bold); text-transform: capitalize; }
.wx-day-t { display: flex; gap: .25rem; font-variant-numeric: tabular-nums; }
.wx-day-t strong { color: var(--c-ink); }
.wx.is-setup { padding: 0; border-style: dashed; box-shadow: none; }
.wx-setup { display: flex; align-items: center; gap: .7rem; padding: .6rem .9rem .6rem .65rem; color: var(--c-ink); text-decoration: none; border-radius: 18px; }
.wx-setup:hover { background: var(--c-surface-2); }
.wx-setup > span:nth-child(2) { display: grid; line-height: 1.3; }
.wx-setup small { font-size: var(--fs-xs); color: var(--c-ink-3); }
.wx-setup > svg { width: .9rem; height: .9rem; color: var(--c-ink-3); }
.wx-setup-ic { width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, #F3B23C 22%, var(--c-surface)); color: #C47A0B; }
.wx-setup-ic svg { width: 1.3rem; height: 1.3rem; }
.wx-error { display: flex; align-items: center; gap: .55rem; font-size: var(--fs-sm); color: var(--c-ink-3); }
.wx-error > svg { width: 1.4rem; height: 1.4rem; }
.wx-error > span { display: grid; }
@media (max-width: 760px) { .wx { width: 100%; } .wx-days { margin-left: auto; } }
@media (max-width: 420px) { .wx-days { display: none; } }

/* Tarefas · Pendências: mesmo desenho de cartão e de lista */
.home-work { align-items: stretch; }
.home-work .home-panel { min-height: 22rem; }


/* =============================================================================
   v0.33 — Início: "Hoje" da agenda, "Em seguida" por dia, Tarefas e Pendências (hw-*)
   ============================================================================= */
.home-agenda .home-panel-actions .ha-open { gap: .4rem; }
.ha-open svg { width: .95rem; height: .95rem; }

/* Hoje: uma coluna com o andamento do dia, os números e as reuniões de hoje */
.ha-today { display: flex; flex-direction: column; gap: .85rem; padding: 1rem 1rem .9rem; border-radius: 20px; background: var(--c-surface-2); border: 1px solid var(--c-border); min-width: 0; }
.ha-today-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.ha-today-title { display: grid; line-height: 1.15; }
.ha-today-title strong { font-size: 1.35rem; font-weight: var(--fw-black); letter-spacing: -.02em; }
.ha-today-title span { font-size: var(--fs-xs); color: var(--c-ink-3); }
.ha-today-title span::first-letter { text-transform: uppercase; }
.ha-prog { display: grid; gap: .4rem; }
.ha-prog-text { font-size: var(--fs-xs); color: var(--c-ink-2); }
.ha-prog-text strong { color: var(--c-ink); font-variant-numeric: tabular-nums; }
.ha-prog-bar { display: flex; height: .5rem; border-radius: 999px; overflow: hidden; background: var(--c-surface-sunken); }
.ha-prog-seg { width: var(--w, 0%); transition: width 300ms ease; }
.ha-prog-seg.is-ok { background: var(--c-success); }
.ha-prog-seg.is-bad { background: var(--c-danger); }
.ha-prog-seg.is-left { background: color-mix(in srgb, var(--c-brand) 35%, var(--c-surface-sunken)); }
.ha-stats { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.ha-stat { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .6rem; padding: .45rem .6rem .45rem .45rem; border-radius: 12px; background: var(--c-surface); color: var(--c-ink); text-decoration: none; border: 1px solid transparent; }
.ha-stat:hover { border-color: var(--c-border-strong); }
.ha-stat:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.ha-stat-ic { width: 1.85rem; height: 1.85rem; display: grid; place-items: center; border-radius: 9px; background: var(--c-brand-soft); color: var(--c-brand-ink); }
.ha-stat-ic svg { width: .95rem; height: .95rem; }
.ha-stat-label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--c-ink-2); }
.ha-stat-n { font-size: 1.3rem; font-weight: var(--fw-black); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ha-stat.is-ok .ha-stat-ic { background: var(--c-success-soft); color: var(--c-success-ink); }
.ha-stat.is-bad .ha-stat-ic { background: var(--c-danger-soft); color: var(--c-danger-ink); }
.ha-stat.is-bad .ha-stat-n { color: var(--c-danger-ink); }
.ha-stat.is-warn .ha-stat-ic { background: var(--c-warning-soft); color: var(--c-warning-ink); }
.ha-stat.is-warn { background: color-mix(in srgb, var(--c-warning) 9%, var(--c-surface)); }
.ha-stat.is-warn .ha-stat-n { color: var(--c-warning-ink); }
.ha-stat.is-zero .ha-stat-n { color: var(--c-ink-3); font-weight: var(--fw-bold); }
.ha-stat.is-zero .ha-stat-ic { background: var(--c-surface-2); color: var(--c-ink-3); }
.ha-today-list { list-style: none; margin: 0; padding: .55rem 0 0; border-top: 1px dashed var(--c-border-strong); display: grid; gap: .1rem; }
.ha-today-item { width: 100%; display: grid; grid-template-columns: 2.6rem auto minmax(0, 1fr) auto; align-items: center; gap: .5rem; padding: .3rem .35rem; border: 0; border-radius: 8px; background: transparent; color: var(--c-ink); font: inherit; text-align: left; cursor: pointer; }
.ha-today-item:hover { background: var(--c-surface); }
.ha-today-item:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.ha-today-time { font-size: var(--fs-xs); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; color: var(--c-ink-2); }
.ha-today-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--tone, var(--c-brand)); }
.ha-today-name { font-size: var(--fs-xs); font-weight: var(--fw-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ha-today-item.is-realizada .ha-today-name, .ha-today-item.is-no_show .ha-today-name, .ha-today-item.is-past .ha-today-name { color: var(--c-ink-3); }
.ha-today-st { width: 1.1rem; height: 1.1rem; display: grid; place-items: center; border-radius: 50%; }
.ha-today-st svg { width: .7rem; height: .7rem; }
.ha-today-st.is-ok { background: var(--c-success-soft); color: var(--c-success-ink); }
.ha-today-st.is-bad { background: var(--c-danger-soft); color: var(--c-danger-ink); }
.ha-today-more { font-size: .7rem; color: var(--c-ink-3); padding: .15rem .35rem; }

/* Em seguida: um cartão por dia, com o dia em destaque */
.ha-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: var(--sp-3); align-items: start; }
.ha-dcard { display: grid; gap: .6rem; padding: .8rem; border-radius: 18px; border: 1px solid var(--c-border); background: var(--c-surface); min-width: 0; }
.ha-dcard.is-today { border-color: color-mix(in srgb, var(--c-brand) 50%, var(--c-border)); }
.ha-dhead { display: flex; align-items: center; gap: .7rem; }
.ha-dnum { width: 3rem; height: 3.2rem; flex: none; display: grid; place-content: center; justify-items: center; border-radius: 13px; background: var(--c-surface-2); line-height: 1; }
.ha-dnum strong { font-size: 1.45rem; font-weight: var(--fw-black); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ha-dnum span { margin-top: .15rem; font-size: .62rem; font-weight: var(--fw-bold); color: var(--c-ink-3); text-transform: uppercase; letter-spacing: .04em; }
.ha-dcard.is-today .ha-dnum, .ha-dcard.is-tomorrow .ha-dnum { background: var(--c-brand); color: #fff; }
.ha-dcard.is-today .ha-dnum span, .ha-dcard.is-tomorrow .ha-dnum span { color: rgba(255, 255, 255, .8); }
.ha-dtext { display: grid; line-height: 1.2; min-width: 0; }
.ha-dname { font-size: 1.15rem; font-weight: var(--fw-black); letter-spacing: -.02em; }
.ha-dsub { font-size: var(--fs-xs); color: var(--c-ink-3); }
.ha-dlist { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.ha-ditem { width: 100%; display: grid; grid-template-columns: 2.9rem 3px minmax(0, 1fr) auto; align-items: center; gap: .6rem; padding: .45rem .5rem; border: 0; border-radius: 11px; background: var(--c-surface-2); color: var(--c-ink); font: inherit; text-align: left; cursor: pointer; transition: background-color 120ms; }
.ha-ditem::before { content: ""; grid-column: 2; grid-row: 1; align-self: stretch; border-radius: 3px; background: var(--tone, var(--c-brand)); }
.ha-ditem:hover { background: var(--c-surface-sunken); }
.ha-ditem:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.ha-dtime { grid-column: 1; grid-row: 1; display: grid; line-height: 1.15; font-variant-numeric: tabular-nums; }
.ha-dtime strong { font-size: var(--fs-sm); }
.ha-dtime span { font-size: .66rem; color: var(--c-ink-3); }
.ha-dmain { grid-column: 3; grid-row: 1; display: grid; min-width: 0; }
.ha-dtitle { font-size: var(--fs-sm); font-weight: var(--fw-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ha-dsub2 { display: flex; gap: .4rem; min-width: 0; font-size: .7rem; color: var(--c-ink-3); white-space: nowrap; }
.ha-dproj { overflow: hidden; text-overflow: ellipsis; font-weight: var(--fw-semibold); color: var(--c-ink-2); }
.ha-dtype { flex: none; }
.ha-ditem .agenda-mine { grid-column: 4; }
.ha-dmore { grid-column: 1 / -1; justify-self: start; display: inline-flex; align-items: center; gap: .3rem; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--c-ink-2); text-decoration: none; padding: .2rem .3rem; }
.ha-dmore:hover { color: var(--c-ink); text-decoration: underline; }
.ha-dmore svg { width: .8rem; height: .8rem; }

/* Tarefas e Pendências */
.hw .home-panel-head { margin-bottom: var(--sp-3); }
.hw-body { display: flex; flex-direction: column; gap: var(--sp-3); flex: 1; min-height: 0; }
.hw .home-slot { max-height: 31rem; overflow-y: auto; margin: 0 -.35rem; padding: .1rem .35rem; }
.hw-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(5.2rem, 1fr)); gap: .4rem; }
.hw-tab { position: relative; display: grid; justify-items: start; gap: .05rem; padding: .55rem .7rem .6rem; border: 1px solid var(--c-border); border-radius: 14px; background: var(--c-surface); color: var(--c-ink); font: inherit; text-align: left; cursor: pointer; overflow: hidden; transition: border-color 120ms, background-color 120ms; }
.hw-tab::after { content: ""; position: absolute; left: .7rem; right: .7rem; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--t); transform: scaleX(0); transition: transform 160ms ease; }
.hw-tab:hover { border-color: var(--c-border-strong); }
.hw-tab:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.hw-tab[aria-pressed="true"] { background: var(--t-soft); border-color: color-mix(in srgb, var(--t) 45%, var(--c-border)); }
.hw-tab[aria-pressed="true"]::after { transform: scaleX(1); }
.hw-tab-n { font-size: 1.55rem; font-weight: var(--fw-black); line-height: 1.05; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--t-ink); }
.hw-tab-label { font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--c-ink-2); white-space: nowrap; }
.hw-tab.is-zero .hw-tab-n { color: var(--c-ink-3); }
.hw-tab.is-danger { --t: var(--c-danger); --t-soft: var(--c-danger-soft); --t-ink: var(--c-danger-ink); }
.hw-tab.is-warn { --t: var(--c-warning); --t-soft: var(--c-warning-soft); --t-ink: var(--c-warning-ink); }
.hw-tab.is-brand { --t: var(--c-brand); --t-soft: var(--c-brand-soft); --t-ink: var(--c-brand-ink); }
.hw-tab.is-muted { --t: var(--c-ink-3); --t-soft: var(--c-surface-2); --t-ink: var(--c-ink); }

.hw-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.hw-row { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: .75rem; padding: .6rem .6rem .6rem .8rem; border: 1px solid var(--c-border); border-radius: 14px; background: var(--c-surface); transition: border-color 120ms, box-shadow 120ms; }
.hw-row::before { content: ""; position: absolute; left: -1px; top: .65rem; bottom: .65rem; width: 3px; border-radius: 0 3px 3px 0; background: transparent; }
.hw-row:hover { border-color: var(--c-border-strong); box-shadow: 0 4px 14px -8px rgba(6, 24, 28, .25); }
.hw-row.is-late::before { background: var(--c-danger); }
.hw-row.is-today::before { background: var(--c-warning); }
.hw-row.is-saving { opacity: .55; }
.hw-row .task-check { margin: 0; }
.hw-main { display: grid; gap: .15rem; min-width: 0; }
.hw-title { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--c-ink); text-decoration: none; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.hw-title:hover { text-decoration: underline; }
.hw-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .2rem .5rem; font-size: var(--fs-xs); color: var(--c-ink-3); min-width: 0; }
.hw-proj { display: inline-flex; align-items: center; gap: .25rem; min-width: 0; max-width: 100%; font-weight: var(--fw-semibold); color: var(--c-ink-2); }
.hw-proj span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hw-proj svg { width: .75rem; height: .75rem; flex: none; color: var(--c-ink-3); }
.hw-proj.is-loose { font-weight: var(--fw-regular, 400); color: var(--c-ink-3); font-style: italic; }
.hw-stage { padding: .02rem .45rem; border-radius: var(--r-pill); background: var(--c-surface-2); font-size: .68rem; font-weight: var(--fw-semibold); color: var(--c-ink-2); white-space: nowrap; }
.hw-wait { font-weight: var(--fw-semibold); }
.hw-wait.is-cliente { color: var(--c-warning-ink); }
.hw-wait.is-interno { color: var(--c-brand-ink); }
.hw-wait.is-terceiro { color: #5B3FA6; }
:root[data-theme="dark"] .hw-wait.is-terceiro { color: #C9B6FF; }
.hw-prio { display: inline-flex; align-items: center; gap: .2rem; padding: .1rem .45rem; border-radius: var(--r-pill); font-size: .66rem; font-weight: var(--fw-bold); white-space: nowrap; }
.hw-prio svg { width: .7rem; height: .7rem; }
.hw-prio.is-urgente { background: var(--c-danger-soft); color: var(--c-danger-ink); }
.hw-prio.is-alta { background: var(--c-warning-soft); color: var(--c-warning-ink); }
.hw-who { display: inline-flex; align-items: center; flex: none; }
.hw-who.is-none { width: 1.5rem; height: 1.5rem; justify-content: center; border-radius: 50%; border: 1px dashed var(--c-border-strong); color: var(--c-ink-3); }
.hw-who.is-none svg { width: .75rem; height: .75rem; }
.hw-due { grid-column: -2; width: 4.1rem; display: grid; justify-items: center; gap: 0; padding: .3rem .2rem; border-radius: 11px; background: var(--c-surface-2); line-height: 1.15; text-align: center; }
.hw-due strong { font-size: var(--fs-sm); font-weight: var(--fw-black); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hw-due span { font-size: .62rem; font-weight: var(--fw-semibold); color: var(--c-ink-3); text-transform: lowercase; }
.hw-due.is-late { background: var(--c-danger-soft); color: var(--c-danger-ink); }
.hw-due.is-late span { color: var(--c-danger-ink); opacity: .85; }
.hw-due.is-today { background: var(--c-warning-soft); color: var(--c-warning-ink); }
.hw-due.is-today span { color: var(--c-warning-ink); opacity: .85; }
.hw-due.is-none { background: transparent; border: 1px dashed var(--c-border-strong); color: var(--c-ink-3); }
.hw-party { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 11px; }
.hw-party svg { width: 1rem; height: 1rem; }
.hw-party.is-cliente { background: var(--c-warning-soft); color: var(--c-warning-ink); }
.hw-party.is-interno { background: var(--c-brand-soft); color: var(--c-brand-ink); }
.hw-party.is-terceiro { background: color-mix(in srgb, #7C5CC4 14%, var(--c-surface)); color: #5B3FA6; }
.hw-party.is-outro { background: var(--c-surface-2); color: var(--c-ink-2); }
.hw-foot { display: flex; justify-content: flex-end; margin-top: auto; }
.hw-foot:empty { display: none; }
.hw-more { display: inline-flex; align-items: center; gap: .3rem; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--c-ink-2); text-decoration: none; padding: .3rem .5rem; border-radius: var(--r-sm); }
.hw-more:hover { background: var(--c-surface-2); color: var(--c-ink); }
.hw-more svg { width: .8rem; height: .8rem; }
.hw-empty { flex: 1; display: grid; place-content: center; justify-items: center; gap: .3rem; padding: var(--sp-6) var(--sp-4); text-align: center; border-radius: 16px; background: var(--c-surface-2); }
.hw-empty-ic { width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: 50%; background: var(--c-success-soft); color: var(--c-success-ink); margin-bottom: .2rem; }
.hw-empty-ic svg { width: 1.2rem; height: 1.2rem; }
.hw-empty-title { font-size: var(--fs-sm); font-weight: var(--fw-bold); }
.hw-empty-text { max-width: 30rem; font-size: var(--fs-xs); color: var(--c-ink-3); }
.hw-list--page { margin-top: var(--sp-3); max-width: 56rem; }
@container panel (max-width: 520px) {
  .hw-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .hw-prio, .hw-who { grid-column: 2; justify-self: start; }
  .hw-due { grid-row: 1 / span 2; grid-column: 3; }
}
@media (max-width: 900px) { .ha-days { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .hw-tab::after, .ha-prog-seg { transition: none; } }
.ha-layout { grid-template-columns: minmax(0, 1fr) minmax(270px, 320px); align-items: stretch; }
.ha-left { display: grid; gap: var(--sp-4); align-content: start; min-width: 0; }
.ha-layout .ha-hero { min-height: 0; }
.ha-board-slot { display: flex; min-width: 0; }
.ha-board-slot > .ha-today { flex: 1; }
.ha-dtitle { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.ha-days { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
@media (max-width: 1100px) { .ha-layout { grid-template-columns: minmax(0, 1fr); } }
/* telas estreitas: destaque → Hoje → Em seguida; abas das listas numa linha só */
@media (max-width: 1100px) {
  .ha-left { display: contents; }
  .ha-hero-slot { order: 1; }
  .ha-board-slot { order: 2; }
  .ha-bottom { order: 3; }
}
@container panel (max-width: 520px) {
  .hw-tabs { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: .3rem; }
  .hw-tab { padding: .45rem .5rem .5rem; }
  .hw-tab-n { font-size: 1.3rem; }
  .hw-tab-label { font-size: .66rem; white-space: normal; line-height: 1.2; }
}
