/* Sirius Hub Dash — v7 */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Sirius design system v1 — aplicado 2026-05-19
     Referência: /marca/design-guide.md */

  /* Background hierárquico (preto profundo Sirius) */
  --bg: #040C13;
  --surface: #0E1318;
  --surface-2: #141A24;
  --surface-3: #1A2030;

  /* Largura do painel Meu Dia — fonte única (painel + reflow do #app usam a mesma). */
  --myday-w: 300px;
  /* Folga entre o conteúdo e o painel, pra nada (ex: chip do responsável) ficar colado/coberto. */
  --myday-gutter: 16px;

  /* Bordas (cyan baixo opacity — identidade do hub) */
  --border: rgba(7, 239, 245, 0.22);
  --border-hover: rgba(7, 239, 245, 0.45);

  /* Texto */
  --text: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.78);
  --text-muted: rgba(255, 255, 255, 0.58);

  /* Accent principal (cyan Sirius) */
  --accent: #00F6F5;
  --accent-light: color-mix(in srgb,var(--accent) 60%,transparent);

  /* Cores de assinatura (gradient + destaques pontuais) */
  --magenta: #D24EFF;
  --lilas: #B66FFF;
  --gradient-primary: linear-gradient(135deg, #D24EFF 0%, #00F6F5 50%, #B66FFF 100%);
  /* gradient-soft v2 (2026-05-20): cyan e lilás puxados pra zona escura
     pra garantir legibilidade de texto claro OU escuro nos botões/tabs */
  --gradient-soft: linear-gradient(120deg, #0EAFAF 0%, #2A8FB8 50%, #7B5AD8 100%);
  /* gradient-btn (2026-06-03): versão dark/sutil pros botões — mesma direção
     ciano→índigo da marca, mas na zona escura. Texto branco. */
  --gradient-btn:  linear-gradient(135deg, #18424F 0%, #1A2740 55%, #2A2050 100%);

  /* Status (semáforo funcional — recalibrado pra paleta Sirius).
     green-bg/blue-bg ficam FIXOS (não seguem o seletor de cor do sistema):
     pareiam com --green/--blue, que também são fixos — senão o par
     background/texto dessincroniza quando alguém troca o acento. */
  --green: #00F6F5;
  --green-bg: rgba(0, 246, 245, 0.12);
  --yellow: #FFB84D;
  --yellow-bg: rgba(255, 184, 77, 0.12);
  --orange: #FFB84D;
  --orange-bg: rgba(255, 184, 77, 0.12);
  --red: #FF3366;
  --red-bg: rgba(255, 51, 102, 0.12);
  --blue: #00F6F5;
  --blue-bg: rgba(0, 246, 245, 0.12);

  /* Radius (mantido) */
  --radius: 10px;
  --radius-sm: 6px;
  --radius-xs: 4px;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  background-image: radial-gradient(at 0% 0%, rgba(23, 17, 56, 0.35) 0%, var(--bg) 70%);
  color: var(--text);
  min-height: 100vh;
}

/* Space Grotesk pra display/headings/CTAs/KPIs — identidade Sirius v1 */
h1, h2, h3, h4,
.section-title, .card-title, .panel-title,
.kpi-value, .stat-value,
button.btn-primary, .btn-primary, .cta {
  font-family: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
  letter-spacing: -0.015em;
}

/* ==========================================================================
   Sirius identity touches — gradient como assinatura pontual
   Conforme design-guide.md §7: painel = funcional, gradient só em destaques.
   ========================================================================== */

/* Nav tab active com gradient suave (cyan → lilás) + texto escuro */
.nav-tab.active {
  background: var(--gradient-soft);
  color: #040C13;
  font-weight: 700;
}

/* Botões primários com gradient suave + texto escuro + Space Grotesk */
.btn-create-task,
button.btn-primary,
.btn-primary,
.cta {
  background: var(--gradient-btn);
  color: #FFFFFF;
  font-weight: 700;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  letter-spacing: 0.01em;
}
.btn-create-task:hover {
  background: var(--gradient-btn);
  color: #FFFFFF;
  filter: brightness(1.18);
}

/* Card hero (detalhe cliente) — Fase 2: sinal é a cor do PRÓPRIO cliente
   (--hero-accent, setado por view-client-detail.js), não o gradient de
   marca genérico — regra em style.css:3979 já faz isso, esse !important
   só competia com ela. */

.header {
  position: relative;
}

#app {
  width: 100%;
  padding: 0 32px 48px;
}

/* ---- Header ---- */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.header-spacer { flex: 1; }
.header-center { display: flex; align-items: center; gap: 12px; }
/* Logo do header — símbolo Sirius gradient + wordmark Orbitron */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
}
.logo-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.logo-symbol svg { display: block; }
.logo-wordmark {
  font-family: 'Orbitron', sans-serif;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0;
  color: var(--text);
  line-height: 1;
}
/* manter compat com refs antigas a .logo-star (caso ainda exista em algum lugar) */
.logo-star { color: var(--accent); font-style: normal; }

.badge {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 4px 11px;
  border-radius: 999px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.header-right { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.last-update { color: var(--text-secondary); font-size: 12px; }

.btn-icon {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  transition: all 0.2s;
}
.btn-icon:hover { background: var(--surface-2); border-color: var(--accent); }
.btn-icon.spinning svg { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Banner de status de dados (offline / desatualizado) ---- */
.data-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.data-banner[hidden] { display: none; }
.data-banner-stale { background: rgba(255, 196, 0, 0.10); color: #ffd266; border-bottom-color: rgba(255, 196, 0, 0.30); }
.data-banner-error { background: rgba(255, 51, 102, 0.10); color: #ff7a99; border-bottom-color: rgba(255, 51, 102, 0.30); }
.data-banner-retry {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.data-banner-retry:hover { background: rgba(255,255,255,0.08); }
.data-banner-retry:disabled { opacity: 0.5; cursor: default; }

/* ---- User select (Eu sou) ---- */
.user-select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
}
.user-select:hover { border-color: var(--accent); }
.user-select:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(108,92,231,0.15); }
/* Destaca quando ninguém foi selecionado — força o time a escolher o nome ao abrir.
   Sem animação pulsante (poluía o topo): só uma borda âmbar discreta. */
.user-select:has(option[value=""]:checked) {
  border-color: var(--yellow);
  color: var(--yellow);
  font-weight: 600;
}

/* ---- Notification Bell ---- */
.notif-wrap { position: relative; }
.btn-notif { position: relative; }
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--red);
  color: var(--surface);
  font-size: 10px;
  font-weight: 700;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--bg, #040C13);
  animation: notifPulse 2s ease-in-out infinite;
}
.notif-badge[hidden] { display: none; }
@keyframes notifPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 2px var(--bg, #040C13), 0 0 0 0 var(--red-bg); }
  50%      { transform: scale(1.08); box-shadow: 0 0 0 2px var(--bg, #040C13), 0 0 0 6px rgba(255,51,102,0); }
}
.btn-notif.has-unread { color: var(--red); }

/* ---- Notification Popover ---- */
.notif-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 360px;
  max-height: 480px;
  background: var(--surface, #0E1318);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
}
.notif-popover[hidden] { display: none; }
.notif-pop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2, rgba(255,255,255,0.03));
  font-size: 13px;
}
.notif-link {
  background: none;
  border: none;
  color: var(--accent, var(--magenta));
  font-size: 11px;
  cursor: pointer;
  padding: 0;
}
.notif-link:hover { text-decoration: underline; }
.notif-list {
  overflow-y: auto;
  flex: 1;
  max-height: 380px;
}
.notif-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted, #888);
  font-size: 12px;
}
.notif-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface-2, rgba(255,255,255,0.04)); }
.notif-item.is-read { opacity: 0.55; }
.notif-item-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted, #888);
}
.notif-item-proj { font-weight: 600; color: var(--accent, var(--magenta)); }
.notif-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
}
.notif-item-meta { font-size: 11px; color: var(--text-secondary, #aaa); }
.notif-item-meta strong { color: var(--text); }
.notif-item.kind-mention { border-left: 3px solid var(--yellow); padding-left: 11px; }
.notif-item.kind-mention .notif-item-proj { color: var(--yellow); }
.notif-item.kind-assigned { border-left: 3px solid var(--accent); padding-left: 11px; }
.notif-item.kind-assigned .notif-item-proj { color: var(--accent); }
.notif-item-excerpt {
  font-size: 11px;
  font-style: italic;
  color: var(--text-secondary, #aaa);
  background: var(--surface-2, rgba(255,255,255,0.03));
  padding: 6px 8px;
  border-radius: 6px;
  margin-top: 2px;
  line-height: 1.4;
}

/* @menções — chip dentro de comentário */
.mention-chip {
  display: inline-block;
  background: var(--yellow-bg);
  color: var(--yellow);
  border-radius: 4px;
  padding: 0 5px;
  font-weight: 600;
  font-size: 0.92em;
}

/* Autocomplete @nome — dropdown flutuante */
.mention-suggest {
  position: absolute;
  z-index: 9999;
  background: var(--surface, #0E1318);
  border: 1px solid var(--border, #333);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  padding: 4px;
  min-width: 180px;
  max-width: 260px;
  font-size: 13px;
}
.mention-suggest[hidden] { display: none; }
.mention-item {
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text);
}
.mention-item.is-active,
.mention-item:hover { background: var(--yellow-bg); color: var(--yellow); font-weight: 600; }
.notif-pop-footer {
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  font-size: 10px;
  color: var(--text-muted, #888);
  text-align: center;
}

/* ---- Content ---- */
.content { min-height: 400px; }


.project-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

/* Lista de tarefas em módulos (cd-task-row) */
.cd-task-row.cd-task-overdue {
  background: var(--red-bg);
  border-left: 3px solid var(--red);
  padding-left: 9px;
}
.cd-task-row.cd-task-overdue:hover {
  background: var(--red-bg);
}
.cd-task-row.cd-task-overdue .cd-t-name {
  color: var(--red);
  font-weight: 600;
}

/* ===== Tarefas que vencem hoje — destaque amarelo ===== */
.cd-task-row.cd-task-duetoday {
  background: rgba(241, 196, 15, 0.10);
  border-left: 3px solid var(--yellow);
  padding-left: 9px;
}
.cd-task-row.cd-task-duetoday:hover { background: rgba(241, 196, 15, 0.18); }
.cd-task-row.cd-task-duetoday .cd-t-name { color: #b8860b; font-weight: 600; }

.cd-t-deadline.duetoday { color: #b8860b; font-weight: 700; }

/* ===== Tarefas em andamento — destaque azul ===== */
.cd-task-row.cd-task-doing {
  background: var(--blue-bg);
  border-left: 3px solid var(--blue);
  padding-left: 9px;
}
.cd-task-row.cd-task-doing:hover { background: var(--blue-bg); }
.cd-task-row.cd-task-doing .cd-t-name { color: var(--accent); font-weight: 600; }

/* ===== Checkbox custom — usado em bulk-select e similares ===== */
.tm-task-check,
.tm-select-all,
.cd-task-check input[type="checkbox"],
input.tm-task-check[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  cursor: pointer;
  position: relative;
  margin: 0;
  flex-shrink: 0;
  transition: all 0.15s ease;
  vertical-align: middle;
}
.tm-task-check:hover,
.tm-select-all:hover,
.cd-task-check input[type="checkbox"]:hover {
  border-color: var(--lilas);
  background: rgba(162, 155, 254, 0.08);
}
.tm-task-check:checked,
.tm-select-all:checked,
.cd-task-check input[type="checkbox"]:checked {
  background: var(--lilas);
  border-color: var(--lilas);
}
.tm-task-check:checked::after,
.tm-select-all:checked::after,
.cd-task-check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.tm-task-check:focus-visible,
.cd-task-check input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(162, 155, 254, 0.5);
  outline-offset: 2px;
}
.tm-task-check:indeterminate,
.tm-select-all:indeterminate {
  background: var(--lilas);
  border-color: var(--lilas);
}
.tm-task-check:indeterminate::after,
.tm-select-all:indeterminate::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 7px;
  width: 10px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}

.text-muted { color: var(--text-muted); }

/* ---- Coming Soon ---- */
.coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  color: var(--text-secondary);
}
.coming-soon-icon { font-size: 48px; margin-bottom: 16px; }
.coming-soon h2 { font-size: 20px; color: var(--text); margin-bottom: 8px; }
.coming-soon p { font-size: 14px; line-height: 1.6; }

/* ---- Task Detail Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.task-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 720px;
  max-width: calc(100vw - 32px);
  height: auto;
  max-height: calc(100vh - 48px);
  /* fields below are overridden no breakpoint largo (≥980px) p/ layout 2 colunas */
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  z-index: 950;
  transform: translate(-50%, -50%) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.task-modal.open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-project {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.modal-close-btn {
  padding: 6px;
}

.modal-nav-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

.btn-modal-nav {
  background: none;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 5px 7px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.15s;
  line-height: 1;
}
.btn-modal-nav:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}
.btn-modal-nav:disabled {
  opacity: 0.25;
  cursor: default;
}

.modal-nav-counter {
  font-size: 11px;
  color: var(--text-secondary);
  min-width: 32px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  padding: 0 2px;
}

.modal-body {
  padding: 12px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.modal-row-2 {
  grid-template-columns: 1fr 1fr;
}

.modal-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.2s;
}
.modal-input:focus {
  outline: none;
  border-color: var(--accent);
}

.modal-textarea {
  resize: vertical;
  min-height: 40px;
  line-height: 1.5;
}

#modalTaskName {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  min-height: 56px;
  padding: 14px 14px;
}
@media (max-width: 768px) {
  #modalTaskName { font-size: 18px; min-height: 48px; }
}

.modal-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%238b8fa3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.modal-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

/* Solicitante read-only display */
.modal-requester-value {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  min-height: 38px;
}

/* Date input styling */
input[type="date"].modal-input {
  color-scheme: light;
}
[data-theme="dark"] input[type="date"].modal-input {
  color-scheme: dark;
}

/* Notes display with clickable links */
.notes-display {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.5;
  color: var(--text);
  min-height: 80px;
  cursor: text;
  white-space: pre-wrap;
  word-break: break-word;
  transition: border-color 0.2s;
}
.notes-display:hover {
  border-color: var(--border-hover);
}
.notes-display a {
  color: var(--blue);
  text-decoration: underline;
  cursor: pointer;
}
.notes-display a:hover {
  color: var(--accent-light);
}

/* Clickable task name in list view */
.clickable-task {
  cursor: pointer;
  transition: color 0.15s;
}
.clickable-task:hover {
  color: var(--accent-light);
}

/* ---- Create Task Button (modal) ---- */
.btn-create-task {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  margin-top: 4px;
}
.btn-create-task:hover {
  background: var(--accent-light);
  color: var(--ink);
}
.btn-create-task:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---- Título no topo (compacto, sem chrome de card) ---- */
.modal-top-id {
  padding: 8px 20px 10px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.modal-top-id #modalProjectField { margin-bottom: 8px; }
.modal-title-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.3;
  padding: 4px 0;
  resize: none;
  outline: none;
  min-height: 28px;
  overflow: hidden;
}
.modal-title-input::placeholder { color: var(--text-secondary); font-weight: 400; }
.modal-title-input:focus {
  border-bottom: 1px solid var(--accent);
  padding-bottom: 3px;
}
@media (max-width: 560px) {
  .modal-top-id { padding: 8px 14px 10px; }
  .modal-title-input { font-size: 16px; }
}

/* ---- Quick Actions (topo do modal — Concluir + status) ---- */
.modal-quick-actions {
  display: flex;
  gap: 8px;
  padding: 8px 20px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  align-items: stretch;
}
.btn-quick-complete {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--green);
  color: var(--ink);
  border: 1px solid var(--green);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.2;
}
.btn-quick-complete:hover {
  background: var(--accent-light, var(--green));
  filter: brightness(1.08);
}
.btn-quick-complete:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-quick-complete.is-reopen {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}
.btn-quick-complete.is-reopen:hover {
  background: var(--green-bg);
}
.btn-quick-status {
  flex: 0 0 auto;
  min-width: 150px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-quick-status:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-quick-status:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb,var(--accent) 18%,transparent);
}
/* Botão secundário das quick actions (Atualização / Solicitar ajustes) */
.btn-quick-secondary {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.2;
}
.btn-quick-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-quick-secondary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-quick-secondary.is-warn { border-color: #f5b342; color: #f5b342; }
.btn-quick-secondary.is-warn:hover { background: rgba(245,179,66,0.12); }

/* ── Esquema de cores por status: banha o card aberto inteiro ── */
.task-modal {
  --status-accent: var(--border);
  /* wash da cor do status sobre o surface — pinta o card todo (containers internos são transparentes) */
  background: linear-gradient(var(--status-accent-wash, transparent), var(--status-accent-wash, transparent)), var(--surface);
  transition: background 0.2s ease;
}
.task-modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--status-accent);
  border-radius: 12px 12px 0 0;
  z-index: 5;
  transition: background 0.2s ease;
}
/* barra de ações com tom um pouco mais forte que o wash, pra dar definição */
.modal-quick-actions { background: var(--status-accent-bg, var(--surface-2)); transition: background 0.2s ease; }

/* Selo de frescor / hint de revisão abaixo das ações */
.modal-fresh-badge {
  padding: 6px 20px;
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.modal-fresh-badge.is-stale { background: rgba(255,90,95,0.10); color: #ff8a8d; }
.modal-fresh-badge.is-info  { background: var(--surface-2); color: var(--text-secondary); }
.modal-fresh-badge.is-fresh { background: rgba(31,184,138,0.10); color: #3fd6a8; }

/* Pulse no composer de atualização quando o botão Atualização foca ele */
.comment-text-pulse { animation: commentPulse 1.2s ease; }
@keyframes commentPulse {
  0%, 100% { box-shadow: none; }
  30% { box-shadow: 0 0 0 3px color-mix(in srgb,var(--accent) 25%,transparent); border-color: var(--accent); }
}

/* Notificação de revisão no sino */
.notif-item.kind-review { border-left: 3px solid #f5b342; }

@media (max-width: 560px) {
  .modal-quick-actions { padding: 10px 14px; flex-wrap: wrap; }
  .btn-quick-complete { flex: 1 1 100%; }
  .btn-quick-secondary { flex: 1 1 100%; }
  .btn-quick-status { flex: 1 1 100%; min-width: 0; }
}

/* ---- Barra de tags de execução (glance: prioridade, prazo, responsáveis, subprojeto) ---- */
.modal-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 20px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-meta-bar:empty { display: none !important; }
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.35;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.meta-pill:hover { border-color: var(--green); color: var(--green); }
.meta-pill .meta-pill-label { color: var(--text-secondary); font-weight: 500; }
.meta-pill.meta-pill-empty { border-style: dashed; color: var(--text-secondary); font-weight: 500; }
.meta-pill-prio-alta { border-color: var(--red); color: var(--red); }
.meta-pill-prio-media { border-color: var(--orange); color: var(--orange); }
.meta-pill-prio-baixa { border-color: var(--green); color: var(--green); }
.meta-pill-deadline.is-overdue { border-color: var(--red); color: var(--red); background: var(--red-bg); }
.meta-pill-deadline.is-today { border-color: var(--orange); color: var(--orange); background: var(--orange-bg); }
.meta-pill-person .meta-pill-ava {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
/* Destaque suave do campo ao clicar na tag correspondente */
.modal-field.field-flash {
  animation: fieldFlash 1.2s ease;
  border-radius: var(--radius-sm);
}
@keyframes fieldFlash {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  20% { box-shadow: 0 0 0 2px var(--green-bg); }
}
@media (max-width: 560px) {
  .modal-meta-bar { padding: 8px 14px; }
}

/* ---- Status Rápido (acima do excluir) ---- */
.modal-status-quick-row {
  margin-top: 12px;
  padding: 12px 0 4px;
  border-top: 1px solid var(--border);
}
.modal-status-quick-select {
  width: 100%;
  font-weight: 600;
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--accent-light);
  padding: 10px 12px;
}
.modal-status-quick-select:focus {
  outline: none;
  border-color: var(--accent-light);
  box-shadow: 0 0 0 2px color-mix(in srgb,var(--accent) 12%,transparent);
}

/* ---- Modal Actions Row ---- */
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

/* ---- Delete Task Button (modal) ---- */
.btn-delete-task {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}
.btn-delete-task:hover {
  background: var(--red);
  color: white;
}
.btn-delete-task:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---- Delete Confirm Dialog ---- */
.delete-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.delete-confirm-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 380px;
  width: 90%;
  text-align: center;
}
.delete-confirm-box h3 {
  font-size: 16px;
  margin-bottom: 8px;
}
.delete-confirm-box p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}
.delete-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.btn-confirm-delete {
  background: var(--red);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-confirm-delete:hover {
  background: var(--red);
}
.btn-cancel-delete {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-cancel-delete:hover {
  background: var(--surface-3);
  border-color: var(--border-hover);
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-success { background: var(--green); color: white; }
.toast-error { background: var(--red); color: white; }

/* ---- Back Button (mobile) ---- */
.btn-modal-back {
  display: none; /* Hidden on desktop */
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--accent-light);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 6px 10px 6px 4px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.btn-modal-back:hover {
  background: var(--surface-2);
}
.btn-modal-back svg {
  flex-shrink: 0;
}

/* ---- Responsive ---- */

/* Mobile kanban: horizontal scroll with snap */
@media (max-width: 768px) {
  #app { padding: 0 12px 32px; }

  .controls { flex-direction: column; align-items: stretch; gap: 10px; }
  .controls-left { flex-wrap: wrap; gap: 8px; }
  .header { flex-wrap: wrap; gap: 8px; }
  /* Sem wrap interno, o header-right (~479px: Nova tarefa + chip + sino + refresh)
     prende a largura mínima e gera scroll horizontal em celulares. */
  .header-right { flex-wrap: wrap; gap: 8px; row-gap: 8px; }

  /* Modal: full screen slide-up on mobile */
  .task-modal {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh; /* iOS Safari: dynamic viewport height (exclui barra do browser) */
    max-height: 100vh;
    max-height: 100dvh;
    top: 0;
    left: 0;
    right: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    transform: translate(0, 100%) scale(1);
    opacity: 1;
  }
  .task-modal.open {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  .modal-row { grid-template-columns: 1fr; }

  /* Show back button, hide X button on mobile */
  .btn-modal-back { display: flex; }
  .modal-close-btn { display: none; }

  /* Modal header more spacious */
  .modal-header {
    padding: 12px 16px;
    gap: 8px;
  }

  /* Modal body: scroll interno + espaço suficiente para o conteúdo final */
  .modal-body {
    padding: 16px;
    padding-bottom: max(100px, env(safe-area-inset-bottom, 100px));
  }
}

/* ---- Related Tasks (Session C) ---- */
.related-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  min-height: 24px;
}

.related-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 12px;
  color: var(--accent-light);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, border-color 0.15s;
  font-family: inherit;
  font-weight: 500;
}

.related-chip:hover {
  background: color-mix(in srgb,var(--accent) 12%,transparent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.related-empty {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 24px;
}

.related-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.related-add-input {
  flex: 1;
  font-size: 13px;
}

.btn-related-add {
  padding: 7px 14px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-related-add:hover {
  background: var(--accent);
  color: #fff;
}

/* ── Dependência entre tarefas (bloqueio) ── */
.depends-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.4;
}
.depends-chips {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.depends-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  overflow: hidden;
  max-width: 100%;
}
.depends-chip.is-open  { border-color: rgba(255,184,77,0.5); }
.depends-chip.is-done  { opacity: 0.6; }
.depends-chip-open {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.depends-chip-open:hover { color: var(--accent); }
.depends-chip-state {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--yellow);
}
.depends-chip.is-done .depends-chip-state { background: var(--green, #2ecc71); }
.depends-chip-remove {
  padding: 5px 9px;
  background: transparent;
  border: none;
  border-left: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.depends-chip-remove:hover { color: var(--red); background: var(--red-bg); }
.myday-item-chip.dep-chip {
  background: var(--yellow-bg);
  color: var(--yellow);
  --chip-color: var(--yellow);
}
.myday-item.is-dep-blocked { opacity: 0.85; }
.cal6-event-blocked { outline: 1px solid var(--yellow); outline-offset: -1px; }

/* ── Histórico / Comentários ── */
.comments-log {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 6px;
  min-height: 32px;
  max-height: 140px;
  overflow-y: auto;
  font-size: 13px;
}
.comment-entry {
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  line-height: 1.5;
  color: var(--text-secondary);
  word-break: break-word;
}
.comment-entry:last-child { border-bottom: none; }
.comment-entry strong { color: var(--text); }
.comment-link {
  color: var(--accent, #6c5ce7);
  text-decoration: underline;
  word-break: break-all;
}
.comment-link:hover { opacity: 0.8; }
.comment-empty {
  color: var(--text-muted, #666);
  font-style: italic;
  font-size: 12px;
}
.comment-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.comment-person-sel {
  width: 130px;
  flex-shrink: 0;
}
.comment-text-input {
  flex: 1;
  min-width: 0;
}
.btn-add-comment {
  padding: 7px 12px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 16px;
  font-family: inherit;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  line-height: 1;
}
.btn-add-comment:hover {
  background: var(--accent);
  color: #fff;
}

@media (max-width: 480px) {
  #app { padding: 0 12px 24px; }

  /* Header compact */
  .header { padding: 12px 0; margin-bottom: 12px; }
  .logo { font-size: 17px; }
  .badge { font-size: 9px; padding: 2px 8px; }
  .last-update { font-size: 10px; }

  /* Controls compact */
  .controls { margin-bottom: 10px; }
  .nav-tab { font-size: 12px; padding: 6px 10px; }

  /* Modal: full screen */
  .task-modal { width: 100vw; }

  /* Modal fields compact */
  .modal-input { font-size: 14px; padding: 10px; }
  .modal-label { font-size: 10px; }
  .modal-textarea { min-height: 36px; }
  .btn-delete-task { padding: 12px; font-size: 14px; }
  .btn-create-task { padding: 12px; font-size: 14px; }

  /* Back button bigger touch target */
  .btn-modal-back {
    padding: 8px 12px 8px 4px;
    font-size: 15px;
  }
}

/* ===== NOVOS ESTILOS v7 ===== */

/* ---- Modal: label opcional ---- */
.modal-label-opt {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 10px;
  text-transform: lowercase;
  letter-spacing: 0;
}

/* ---- Trava de prazo: cadeado no label + hint + campo bloqueado ---- */
.modal-label-lock {
  font-size: 11px;
  margin-left: 2px;
  cursor: help;
}
.modal-field-hint,
.card-edit-lock-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.35;
}
.modal-input-locked {
  border-color: var(--border, #2a2a3a);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
}

/* ---- Modal: label obrigatório ---- */
.modal-label-req {
  color: var(--red);
  font-size: 11px;
}

/* ---- Modal: ID da tarefa no header ---- */
.modal-task-id {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 6px;
  font-family: 'Courier New', monospace;
}

/* ---- Modal: Checklist da tarefa (modules/task-checklist.js, 28/09/2026) ---- */
#modalSectionChecklist .tchk-head { display: flex; align-items: center; gap: 8px; }
.tchk-count { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--text-secondary); letter-spacing: 0; }
.tchk-bar { height: 4px; border-radius: 99px; background: var(--surface-3, var(--border)); overflow: hidden; margin: 2px 0 10px; }
.tchk-bar span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .2s; }
.tchk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tchk-item { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 8px; min-height: 36px; }
.tchk-item:hover { background: var(--surface-2); }
.tchk-box { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--border-hover); background: transparent; color: transparent; display: grid; place-items: center; cursor: pointer; padding: 0; }
.tchk-box:hover:not(:disabled) { border-color: var(--accent); }
.tchk-box:disabled { cursor: default; }
.tchk-item.is-done .tchk-box { background: var(--accent); border-color: var(--accent); color: #fff; }
.tchk-text { flex: 1; min-width: 0; font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.tchk-item.is-done .tchk-text { color: var(--text-muted); text-decoration: line-through; }
.tchk-who { flex: none; font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.tchk-del { flex: none; border: 0; background: none; color: var(--text-muted); font-size: 16px; line-height: 1; cursor: pointer; opacity: 0; padding: 2px 4px; }
.tchk-item:hover .tchk-del, .tchk-del:focus-visible { opacity: 1; }
.tchk-add { display: flex; gap: 8px; margin-top: 8px; }
.tchk-add .tchk-input { flex: 1; min-width: 0; }
.tchk-fill { white-space: nowrap; }
.tchk-empty { border: 1px dashed var(--border-hover); background: none; color: var(--text-secondary); border-radius: 8px; padding: 9px 12px; font: inherit; font-size: 13px; cursor: pointer; width: 100%; text-align: left; }
.tchk-empty:hover { border-color: var(--accent); color: var(--text); }
/* vários checklists nomeados na mesma tarefa */
.tchk-block + .tchk-block { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.tchk-block-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; min-height: 30px; }
.tchk-name { flex: 1; min-width: 0; text-align: left; border: 0; background: none; padding: 4px 6px; margin-left: -6px; border-radius: 6px; font: inherit; font-size: 14px; font-weight: 700; color: var(--text); cursor: text; overflow-wrap: anywhere; }
.tchk-name:hover { background: var(--surface-2); }
.tchk-name-input { flex: 1; min-width: 0; font-weight: 700; }
.tchk-block-count { flex: none; font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.tchk-block-del { flex: none; display: grid; place-items: center; border: 0; background: none; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: 6px; opacity: 0; }
.tchk-block:hover .tchk-block-del, .tchk-block-del:focus-visible { opacity: 1; }
.tchk-block-del:hover { color: var(--red); background: var(--red-bg); }
.tchk-new-list { margin-top: 12px; border: 1px dashed var(--border-hover); background: none; color: var(--text-secondary); border-radius: 8px; padding: 7px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.tchk-new-list:hover { border-color: var(--accent); color: var(--text); }
@media (pointer: coarse) { .tchk-del, .tchk-block-del { opacity: 1; } }
.card-checklist { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.card-checklist.is-complete { color: var(--green); }

/* ---- Modal: Seções com título ---- */
.modal-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px 8px;
  margin-bottom: 8px;
}

.modal-section-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.modal-section-collapsible .modal-section-title {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
  user-select: none;
}

.modal-section-collapsible .modal-section-title:hover {
  color: var(--text);
}

.modal-section-arrow {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.modal-section-content {
  padding-top: 12px;
}

/* ── Modo criar v2 (Fase C, 01/10/2026): coluna única + "Mais detalhes" ──
   O JS liga .mode-create no .task-modal e mostra #modalCreateLayout; as duas
   colunas do editar somem. Mockup aprovado: _mockups/tarefa-modal-v2.html. */
.task-modal.mode-create .modal-main,
.task-modal.mode-create .modal-side { display: none; }
/* Navegar ‹ › entre tarefas não faz sentido criando uma nova */
.task-modal.mode-create .btn-modal-nav,
.task-modal.mode-create .modal-nav-counter { display: none; }
.modal-create-layout {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-create-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 10px;
  align-items: end;
}
@media (max-width: 640px) {
  .modal-create-row { grid-template-columns: 1fr; align-items: stretch; }
}
.modal-create-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}
@media (max-width: 640px) {
  .modal-create-grid2 { grid-template-columns: 1fr; }
}
.prio-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.prio-chip:hover { border-color: var(--border-hover); }
.prio-chip.on {
  background: var(--red-bg);
  border-color: color-mix(in srgb, var(--red) 45%, transparent);
  color: var(--red);
}

/* ════════════════════════════════════════════════════════════════
   Modal de tarefa — layout 2 colunas em tela larga (≥980px)
   Coluna principal: Detalhamento (escopo) + Atualizações  → o que fazer
   Coluna lateral:   Execução + Controle                   → metadados
   Em telas estreitas tudo empilha (principal em cima, lateral embaixo).
   ════════════════════════════════════════════════════════════════ */
.modal-main, .modal-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

@media (min-width: 980px) {
  .task-modal {
    width: min(1180px, calc(100vw - 48px));
    max-height: calc(100vh - 40px);
  }
  /* Modo criar: 6 campos em coluna única não precisam de 1180px */
  .task-modal.mode-create { width: min(720px, calc(100vw - 48px)); }
  .modal-body {
    display: grid;
    /* Execução (lateral estreita) à esquerda · Detalhamento (foco) à direita */
    grid-template-columns: minmax(330px, 0.92fr) minmax(0, 1.55fr);
    gap: 0;
    align-items: start;
  }
  .modal-create-layout { grid-column: 1 / -1; }
  .modal-side {
    order: 1;
    padding-right: 24px;
  }
  /* divisória entre as duas colunas */
  .modal-main {
    order: 2;
    border-left: 1px solid var(--border);
    padding-left: 24px;
  }
  /* o escopo é o foco: bastante área de leitura/escrita (só o campo de notas) */
  .modal-section-scope #modalNotes,
  .modal-section-scope #modalNotesDisplay { min-height: 240px; }
  /* na lateral estreita, os campos de execução empilham (mais legíveis) */
  .modal-side .modal-row,
  .modal-side .modal-row-3 { grid-template-columns: 1fr; gap: 12px; }
  /* título com mais presença, à altura do quadro */
  #modalTaskName { font-size: 26px; min-height: 60px; }
}

/* ---- Person chips (modal de responsáveis) ---- */
.person-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
  margin-bottom: 6px;
}
.person-chips:empty { margin-bottom: 0; }
.person-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 8px 3px 4px;
  font-size: 12px;
  color: var(--text);
}
.chip-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  color: white;
}
.chip-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  margin-left: 2px;
}
.chip-remove:hover { color: var(--orange); }
.modal-person-adder { margin-top: 0; }

/* ============================================================
   Hub de Contexto Operacional — Grid de Clientes
   Estética: densa, escura, material. Sem cara de SaaS genérico.
   ============================================================ */

.ch-loading, .ch-empty {
  color: var(--text-muted);
  padding: 60px;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Cabeçalho da seção */
.ch-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 4px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.ch-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.ch-section-count {
  font-size: 11px;
  color: var(--text-secondary);
  margin-left: 10px;   /* o justify-content:space-between empurra a busca pra direita,
                          então título e contador ficavam colados um no outro */
}

/* Grid */
.ch-grid {
  display: grid;
  align-items: start;   /* card sem próxima ação não estica até a altura da linha */
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 12px;
  padding-bottom: 32px;
}

/* ---- Card (09/09: superfície limpa) ----
   O gradiente diagonal na cor do cliente manchava o card no modo claro, e cada
   card manchava numa intensidade diferente. Agora: fundo da superfície, borda
   neutra fina, e a cor do cliente só na barra esquerda. */
.ch-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 18px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  transition: box-shadow 0.18s, border-color 0.18s, transform 0.15s;
}

.ch-card[data-slug] { cursor: pointer; }

/* Sem tarja de cor: era o clichê que motivou a reforma, e carregava pouca
   informação (a cor é a marca do cliente, não o estado dele). A identidade fica
   na logo; a cor volta só como semáforo, nos números. */
.ch-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--text) 12%, transparent);
  transform: translateY(-1px);
}

/* ---- Topo do card: logo + nome ---- */
.ch-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
/* Vários PNGs de logo têm fundo ESCURO embutido (anmv, king, thomas-marzano):
   no modo claro viravam quadrados pretos soltos no card branco. Um tile neutro
   uniforme com padding faz os dois tipos de arquivo lerem como a mesma coisa. */
.ch-logo-wrap {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ch-logo-wrap[data-tone="clara"] { background: #141A24; border-color: #141A24; }
.ch-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.ch-logo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 17px;
  color: rgba(255,255,255,0.9);
  letter-spacing: -0.5px;
}
.ch-card-meta { flex: 1; min-width: 0; }
.ch-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ch-stale-badge {
  font-size: 11px;
  color: var(--yellow);
  opacity: 0.8;
}
.ch-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* Status badge — sem borda arredondada genérica */
.ch-status-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}
.status-ativo      { background: var(--green-bg);  color: var(--green); }
.status-pausa      { background: rgba(99,110,114,0.25); color: #95a5a6; }
.status-atencao    { background: var(--yellow-bg);color: var(--yellow); }
.status-critico    { background: var(--red-bg);   color: #e55039; }
.status-onboarding { background: rgba(0,206,201,0.18);  color: #00cec9; }
.status-negociacao { background: var(--blue-bg);color: var(--blue); }
.status-encerramento { background: rgba(180,70,90,0.16); color: #cf8593; }
.status-em-estruturacao { background: rgba(178,123,255,0.18); color: #b27bff; }

/* Grupo badge — sinaliza família de cards (ex: Comport Presencial/Ensino/Comercial) */
.ch-group-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  cursor: pointer;
  background: color-mix(in srgb, var(--group-accent, var(--magenta)) 18%, transparent);
  color: var(--group-accent, var(--magenta));
  border: 1px solid color-mix(in srgb, var(--group-accent, var(--magenta)) 28%, transparent);
  transition: background 0.15s, transform 0.1s;
}
.ch-group-badge::before {
  content: "⌘ ";
  opacity: 0.6;
  font-weight: 700;
}
.ch-group-badge:hover {
  background: color-mix(in srgb, var(--group-accent, var(--magenta)) 32%, transparent);
  transform: translateY(-1px);
}

.ch-nivel-badge {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 2px;
  border: 1px solid var(--border);
  letter-spacing: 0.3px;
}

/* ---- Divider ---- */
.ch-divider {
  height: 1px;
  background: var(--border);
  margin: 0 0 14px;
}

/* ---- Nicho + dono ---- */
.ch-card-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 16px;
}
.ch-card-nicho {
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
}
.ch-card-owner {
  font-size: 11px;
  color: var(--text-secondary);
}
.ch-card-owner strong {
  color: var(--text);
  font-weight: 600;
}

/* ---- Stats ---- */
/* Rodapé da ficha: os números viram frase em vez de bloco de caixas. Zero não
   aparece — "0 travadas" não merece o mesmo espaço que "6 atrasadas". */
.ch-card-foot {
  font-size: 12.5px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: auto;
  font-variant-numeric: tabular-nums;
}
.ch-card-foot b { font-weight: 700; color: var(--text); }
.ch-card-foot b.f-red { color: var(--red); }
.ch-card-foot b.f-amber { color: var(--yellow); }

/* Objetivo — a meta da Sirius com o cliente (extra.objetivo) */
.ch-objetivo {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
  margin: 10px 0 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Próxima ação pendente do contexto vivo */
.ch-proxima {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-muted);
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.ch-proxima-mark { flex-shrink: 0; color: var(--card-accent, var(--accent)); font-weight: 700; }
.ch-proxima-text {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---- Alertas ---- */
.ch-card-alerts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}
.ch-alert-tag {
  font-size: 10px;
  background: var(--red-bg);
  color: #e07070;
  border: 1px solid var(--red-bg);
  padding: 3px 8px;
  border-radius: 2px;
  font-weight: 500;
}

/* ---- Footer ---- */
.ch-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 2px;
}
.ch-drive-btn {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding: 2px 7px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.ch-drive-btn:hover {
  color: #fff;
  border-color: var(--card-accent, var(--magenta));
  background: rgba(255,255,255,0.06);
}

/* ---- Atalhos pra plataformas externas ---- */
.ch-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255,255,255,0.06);
}
.ch-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--text) 3%, transparent);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.ch-shortcut:hover {
  background: color-mix(in srgb, var(--text) 8%, transparent);
  color: var(--text);
  transform: translateY(-1px);
}
.ch-shortcut-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}
.ch-shortcut-text {
  display: inline-block;
  line-height: 1;
}

/* Pills internas Sirius — ferramentas próprias do hub (Financeiro, Zé Bot) */
.ch-shortcut-internal {
  background: color-mix(in srgb, var(--lilas) 12%, transparent);
  border-color: color-mix(in srgb, var(--lilas) 35%, transparent);
  color: var(--lilas-ink);
}
.ch-shortcut-internal:hover {
  background: color-mix(in srgb, var(--lilas) 22%, transparent);
  border-color: color-mix(in srgb, var(--lilas) 55%, transparent);
  color: var(--text);
}
.ch-shortcut-internal .ch-shortcut-icon {
  background: color-mix(in srgb, var(--lilas) 28%, transparent);
  color: var(--lilas-ink);
  font-size: 11px;
}

/* Cores por plataforma — borda e ícone com identidade */
.ch-shortcut[data-key="drive"]         { border-color: rgba(251,188,4,0.4); }
.ch-shortcut[data-key="drive"]         .ch-shortcut-icon { background: #fbbc04; color: #0E1318; }
.ch-shortcut[data-key="meta"]          { border-color: rgba(24,119,242,0.5); }
.ch-shortcut[data-key="meta"]          .ch-shortcut-icon { background: #1877F2; color: #fff; }
.ch-shortcut[data-key="google"]        { border-color: rgba(66,133,244,0.5); }
.ch-shortcut[data-key="google"]        .ch-shortcut-icon { background: #4285F4; color: #fff; }
.ch-shortcut[data-key="instagram"]     { border-color: rgba(225,48,108,0.5); }
.ch-shortcut[data-key="instagram"]     .ch-shortcut-icon { background: linear-gradient(135deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); color: #fff; }
.ch-shortcut[data-key="site"]          { border-color: var(--blue-bg); }
.ch-shortcut[data-key="site"]          .ch-shortcut-icon { background: var(--blue); color: var(--surface); }
.ch-shortcut[data-key="crm"],
.ch-shortcut[data-key="crmCleber"]     { border-color: rgba(108,92,231,0.5); }
.ch-shortcut[data-key="crm"]           .ch-shortcut-icon,
.ch-shortcut[data-key="crmCleber"]     .ch-shortcut-icon { background: var(--magenta); color: var(--ink); }
.ch-shortcut[data-key="planner"],
.ch-shortcut[data-key="plannerCleber"] { border-color: var(--green-bg); }
.ch-shortcut[data-key="planner"]       .ch-shortcut-icon,
.ch-shortcut[data-key="plannerCleber"] .ch-shortcut-icon { background: var(--green); color: var(--surface); }
.ch-shortcut[data-key="tiktok"]        { border-color: rgba(255,255,255,0.3); }
.ch-shortcut[data-key="tiktok"]        .ch-shortcut-icon { background: #000; color: #25F4EE; border: 1px solid #25F4EE; }
.ch-shortcut[data-key="youtube"]       { border-color: rgba(255,0,0,0.4); }
.ch-shortcut[data-key="youtube"]       .ch-shortcut-icon { background: #FF0000; color: #fff; }
.ch-shortcut[data-key="facebook"]      { border-color: rgba(24,119,242,0.5); }
.ch-shortcut[data-key="facebook"]      .ch-shortcut-icon { background: #1877F2; color: #fff; }
.ch-shortcut[data-key="linkedin"]      { border-color: rgba(10,102,194,0.5); }
.ch-shortcut[data-key="linkedin"]      .ch-shortcut-icon { background: #0a66c2; color: #fff; }
.ch-cta {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.15s;
}
.ch-card:hover .ch-cta {
  color: var(--card-accent, var(--accent-light));
}

/* Botão Contexto Vivo no card fechado */
.ch-vivo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: color-mix(in srgb, var(--card-accent, var(--magenta)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--card-accent, var(--magenta)) 45%, transparent);
  color: color-mix(in srgb, var(--card-accent, var(--magenta)) 80%, #fff);
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
  line-height: 1;
}
.ch-vivo-btn:hover {
  background: color-mix(in srgb, var(--card-accent, var(--magenta)) 26%, transparent);
  border-color: color-mix(in srgb, var(--card-accent, var(--magenta)) 70%, transparent);
  color: #fff;
  transform: translateY(-1px);
}
.ch-vivo-btn:active { transform: translateY(0); }
.ch-vivo-btn-icon {
  font-size: 8px;
  line-height: 1;
  color: color-mix(in srgb, var(--card-accent, var(--magenta)) 90%, #fff);
  animation: chVivoPulse 1.8s ease-in-out infinite;
}
@keyframes chVivoPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* Responsive */
@media (max-width: 680px) {
  .ch-grid { grid-template-columns: 1fr; }
  .ch-card { padding: 16px 16px 14px; }
  .ch-card-stats { margin-bottom: 10px; }
  .ch-stat { padding: 8px 6px; }
  .ch-stat-value { font-size: 18px; }
  .ch-shortcuts { gap: 6px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
  .ch-shortcuts::-webkit-scrollbar { display: none; }
  .ch-shortcut { height: 28px; padding: 0 10px; font-size: 11px; flex-shrink: 0; }
  .ch-vivo-btn { padding: 8px 12px; font-size: 11px; }
}

/* ============================================================
   CLIENT DETAIL PAGE (cd-*)
   ============================================================ */

#clientDetailContent {
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 100px);
}

/* Hero */
.cd-hero {
  border-left: 4px solid var(--hero-accent, var(--magenta));
  background: var(--surface-1);
  padding: 0;
  flex-shrink: 0;
}
.cd-hero-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 24px;
}
/* Tier 1: navegação à esquerda, ações à direita */
.cd-hero-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
}
.cd-hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
/* Tier 2: identidade à esquerda, métricas à direita */
.cd-hero-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.cd-back {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
}
.cd-back:hover { color: var(--text); border-color: var(--text-muted); }

.cd-back-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cd-client-nav { display: flex; gap: 4px; }
.cd-nav-prev, .cd-nav-next {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.cd-nav-prev:hover, .cd-nav-next:hover {
  color: var(--text);
  border-color: var(--text-muted);
  background: color-mix(in srgb, var(--text) 6%, transparent);
}
.cd-nav-prev:disabled, .cd-nav-next:disabled { opacity: 0.25; cursor: default; }

.cd-hero-id {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 auto;
  min-width: 0;
}
.cd-hero-logo-wrap {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.cd-hero-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
}
.cd-hero-logo-fb {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 17px;
  color: #fff;
}
.cd-hero-text { flex: 1; min-width: 0; }
.cd-hero-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 5px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cd-hero-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.cd-nicho {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Stats bar no hero */
.cd-hero-stats {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
}
.cd-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-right: 1px solid var(--border);
  color: var(--text-muted);
  min-width: 72px;
}
.cd-hs-val {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 3px;
}
.cd-hs-lbl {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  /* opacity 0.7 derrubava o rótulo pra ~2.9:1 nos DOIS temas. A hierarquia
     entre número e rótulo já vem do tamanho (24px vs 10px). */
  opacity: 1;
}

/* Tom por status. Vinha como hex inline do JS (#74b9ff/#d63031/#fdcb6e/#636e72),
   calibrado só pro escuro — sobre o claro dava 1.9:1. Agora é classe, com par
   escuro/claro. */
.cd-hs-ativas     { color: #74B9FF; }
.cd-hs-atrasadas  { color: #FF6B6B; }
.cd-hs-travadas   { color: #FDCB6E; }
.cd-hs-concluidas { color: #8A949B; }
[data-theme="light"] .cd-hs-ativas     { color: #1565C0; }
[data-theme="light"] .cd-hs-atrasadas  { color: #C0202B; }
[data-theme="light"] .cd-hs-travadas   { color: #8A6100; }
[data-theme="light"] .cd-hs-concluidas { color: #5A646B; }

/* Tab bar — página dedicada por cliente (Fase 2) */
.cd-tabbar {
  display: flex;
  gap: 22px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.cd-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  padding: 13px 2px 11px;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.cd-tab:hover { color: var(--text-secondary); }
.cd-tab-active {
  color: var(--text);
  border-bottom-color: color-mix(in srgb, var(--hero-accent, var(--magenta)) 85%, transparent);
}

.cd-panes { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.cd-pane { flex: 1; display: flex; flex-direction: column; min-height: 0; animation: cdPaneIn 0.22s ease-out; }
.cd-pane[hidden] { display: none; } /* [hidden] sozinho perde pra .cd-pane{display:flex} em especificidade */
@keyframes cdPaneIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cd-pane { animation: none; }
}

/* Body */
.cd-body {
  display: grid;
  /* minmax(0,1fr) em vez de 1fr: sem isso, uma URL/palavra longa numa tarefa estoura
     o min-content da coluna (grid blowout) e alarga o detalhe inteiro pra baixo do
     painel Meu Dia, escondendo o responsável. minmax(0,...) deixa a coluna encolher. */
  grid-template-columns: minmax(0, 1fr);
  flex: 1;
}

/* Column label (sticky header de seção) */
.cd-col-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
  position: sticky;
  top: 0;
  z-index: 2;
}
.cd-lbl-alert { color: var(--yellow); }

/* Tasks column */
.cd-tasks-col {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  /* Grid item: sem min-width:0 o conteúdo (títulos longos) estoura a coluna
     além do track e alarga o detalhe inteiro no mobile (scroll horizontal). */
  min-width: 0;
}

/* Filter tabs */
.cd-filter-tabs {
  display: flex;
  padding: 8px 20px;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
  flex-shrink: 0;
}
.cd-filter-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background 0.1s, color 0.1s;
}
.cd-filter-tab:hover  { background: var(--surface-2); color: var(--text); }
.cd-filter-tab.active { background: var(--surface-2); color: var(--text); }
.cd-filter-count {
  background: rgba(255,255,255,0.08);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
}
.cd-filter-tab.active .cd-filter-count {
  background: color-mix(in srgb, var(--hero-accent, var(--accent)) 22%, transparent);
  color: color-mix(in srgb, var(--hero-accent, var(--accent)) 55%, var(--text));
}
/* Filtros de higiene (Sem prazo / Sem dono) — destaque âmbar discreto */
.cd-filter-tab.cd-filter-clean { color: var(--yellow); }
.cd-filter-tab.cd-filter-clean .cd-filter-count { background: rgba(255,196,0,0.16); color: var(--yellow); }
.cd-filter-tab.cd-filter-clean.active { background: rgba(255,196,0,0.12); color: var(--yellow); }
.cd-filter-tab.cd-filter-clean.active .cd-filter-count { background: var(--yellow); color: #1a1500; }

/* ─── Barra de filtros em 2 zonas: status (esq) | controles de exibição (dir) ─── */
.cd-filter-tabs { align-items: center; gap: 4px; }
.cd-status-tabs { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.cd-bar-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}
.cd-bar-controls .search-field { margin-left: 0; }

/* Controle compacto (ícone + select sem moldura interna) */
.cd-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  transition: border-color .15s ease;
}
.cd-ctrl:hover { border-color: var(--accent, var(--magenta)); }
.cd-ctrl-on { border-color: var(--accent, var(--magenta)); background: var(--surface-2); }
.cd-ctrl-icon { font-size: 11px; opacity: .7; line-height: 1; }
.cd-ctrl-select {
  border: none; background: none; color: var(--text);
  font-size: 12px; font-weight: 600; cursor: pointer; outline: none;
  padding: 1px 2px; max-width: 160px;
}
.cd-ctrl-select option { background: var(--surface); color: var(--text); }

/* Chip de higiene "Revisar" + popover (Sem prazo / Sem dono recolhidos) */
.cd-hygiene { position: relative; margin-left: 6px; }
.cd-hygiene-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,196,0,0.10);
  border: 1px solid rgba(255,196,0,0.28);
  color: var(--yellow); font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.cd-hygiene-btn:hover { background: rgba(255,196,0,0.18); }
.cd-hygiene.active .cd-hygiene-btn { background: var(--yellow); color: #1a1500; border-color: transparent; }
.cd-hygiene-count {
  font-size: 10px; font-weight: 700;
  background: rgba(255,196,0,0.22); color: var(--yellow);
  padding: 1px 6px; border-radius: 10px;
}
.cd-hygiene.active .cd-hygiene-count { background: rgba(0,0,0,0.18); color: #1a1500; }
.cd-hygiene-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 50;
  display: flex; flex-direction: column; gap: 1px; min-width: 170px; padding: 4px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}
.cd-hygiene-menu[hidden] { display: none; }
.cd-hygiene-item { justify-content: space-between; width: 100%; }

/* Busca colapsável: lupa que expande o campo */
.cd-search-collapsible { flex: 0 0 auto; min-width: 0; }
.cd-search-collapsible::before { content: none; }
.cd-search-toggle {
  background: none; border: 1px solid transparent; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 13px; cursor: pointer; padding: 4px 6px; line-height: 1;
}
.cd-search-toggle:hover { color: var(--text); background: var(--surface-2); }
.search-field.cd-search-collapsible input {
  width: 0; padding: 0; border-color: transparent; opacity: 0;
  transition: width .18s ease, opacity .15s ease, padding .18s ease;
}
.cd-search-collapsible.expanded .cd-search-toggle,
.cd-search-collapsible.has-value .cd-search-toggle { display: none; }
.search-field.cd-search-collapsible.expanded input,
.search-field.cd-search-collapsible.has-value input {
  width: 200px; padding: 6px 26px 6px 12px; border-color: var(--border); opacity: 1;
}

/* Task list */
.cd-task-list { flex: 1; overflow-y: auto; }

/* Lista agrupada (por pessoa / subprojeto / prioridade) — respiro ao redor dos blocos */
.cd-task-list-grouped { padding: 12px 16px; }
.cd-task-list-grouped .tm-client-group:last-child,
.cd-task-list-grouped .tm-prio-group:last-child { margin-bottom: 0; }

.cd-empty {
  padding: 32px 20px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.cd-task-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.1s;
}
.cd-task-row:hover { background: var(--surface-2); }

.cd-t-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 5px;
}
.cd-t-info  { flex: 1; min-width: 0; }
.cd-t-name  {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  display: block;
  /* Quebra URL/string longa em vez de empurrar a linha (mantém o responsável visível). */
  overflow-wrap: anywhere;
}
.cd-t-name.done {
  color: var(--text-muted);
  text-decoration: line-through;
}
.cd-t-sub {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 1px;
}
.cd-t-blocker {
  font-size: 11px;
  color: #f39c12;
  margin-top: 3px;
}
.cd-t-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.cd-t-owner {
  font-size: 10px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.07);
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
}
.cd-t-deadline {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}
.cd-t-deadline.overdue {
  color: var(--red);
  font-weight: 700;
}

/* Context column */
.cd-context-col {
  background: var(--surface-1);
  border-left: 1px solid var(--border);
  overflow-y: auto;
}
.cd-ctx-section {
  border-bottom: 1px solid var(--border);
}
.cd-ctx-section .cd-col-label {
  border-bottom: none;
  padding-bottom: 6px;
}
.cd-ctx-row {
  padding: 4px 20px 4px 20px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.cd-ctx-section .cd-ctx-row:last-child { padding-bottom: 10px; }

.cd-icon-check { color: var(--green); font-weight: 700; font-size: 11px; flex-shrink: 0; margin-top: 2px; }
.cd-icon-cross  { color: var(--text-muted); font-weight: 700; font-size: 11px; flex-shrink: 0; margin-top: 2px; }
.cd-ctx-out { color: var(--text-muted); opacity: 0.7; }

.cd-ctx-alerts .cd-col-label { color: var(--yellow); }
.cd-alert-row {
  color: var(--yellow);
  font-size: 12px;
  line-height: 1.4;
}

.cd-resp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 20px;
}
.cd-resp-role {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  min-width: 68px;
  flex-shrink: 0;
}
.cd-resp-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.cd-oferta {
  display: block;
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
  padding-bottom: 10px;
}

.cd-not-found {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ============================================================
   TEAM VIEW (tm-*)
   ============================================================ */

/* Home: grid de membros */
.tm-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 12px;
  border-bottom: 1px solid var(--border);
}
.tm-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.tm-section-count {
  font-size: 11px;
  color: var(--text-muted);
}
.tm-section-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tm-ranking-btn {
  background: rgba(108,92,231,0.12);
  border: 1px solid rgba(108,92,231,0.3);
  color: var(--lilas);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.tm-ranking-btn:hover { background: rgba(108,92,231,0.22); }

/* Modal overlay */
.tm-ranking-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.tm-ranking-panel {
  background: #1a1d2e;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.tm-ranking-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.tm-ranking-title { font-size: 16px; font-weight: 700; color: #fff; }
.tm-ranking-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  padding: 8px 20px 4px;
}
.tm-ranking-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
.tm-ranking-close:hover { color: #b2bec3; }
.tm-ranking-list { padding: 8px 0 12px; }

/* Linha de cada membro */
.tm-rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.tm-rank-row:last-child { border-bottom: none; }
.tm-rank-medal { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.tm-rank-num { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.tm-rank-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.tm-rank-info { flex: 1; min-width: 0; }
.tm-rank-name { font-size: 13px; font-weight: 600; color: #dfe6e9; margin-bottom: 5px; }
.tm-rank-role { font-size: 11px; font-weight: 400; color: var(--text-muted); margin-left: 6px; }
.tm-rank-bar-wrap {
  height: 5px; background: rgba(255,255,255,0.07); border-radius: 3px; overflow: hidden;
}
.tm-rank-bar { height: 100%; border-radius: 3px; transition: width 0.4s ease; min-width: 4px; }
.tm-rank-stats { text-align: right; flex-shrink: 0; }
.tm-rank-pct { display: block; font-size: 18px; font-weight: 700; line-height: 1.2; }
.tm-rank-detail { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

.tm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  padding: 16px;
}

/* Card de membro */
.tm-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-left: 4px solid var(--tm-accent, var(--magenta));
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  position: relative;
}
.tm-card:hover {
  background: var(--surface-2);
  transform: translateY(-1px);
}

.tm-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 10px;
}
.tm-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: rgba(0,0,0,0.7);
  flex-shrink: 0;
}
.tm-avatar-lg {
  width: 48px;
  height: 48px;
  font-size: 16px;
  border-radius: 50%;
}
.tm-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.tm-role {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.tm-divider {
  height: 1px;
  background: var(--border);
  margin: 0 16px;
}

.tm-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 10px 16px;
  gap: 0;
}
.tm-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 0;
  border-right: 1px solid var(--border);
}
.tm-stat:last-child { border-right: none; }
.tm-stat-val {
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 2px;
}
.tm-stat-lbl {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0.7;
}

.tm-clientes {
  font-size: 11px;
  color: var(--text-muted);
  padding: 0 16px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Preview inline do último feedback no card ──────────────────────────── */
.tm-fb-preview { display: none; }
.tm-fb-preview.tm-fb-preview-on {
  display: block;
  margin: 2px 16px 8px;
  padding: 8px 10px;
  background: var(--bg-elevated, rgba(255,255,255,0.03));
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
  border-left: 3px solid var(--tm-accent, var(--accent-light));
  border-radius: 8px;
}
.tm-fb-preview-head {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.tm-fb-preview-line {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-secondary, var(--text-muted));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tm-fb-preview-more {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ─── Visão 360 · botão admin + gate de senha + quadro fullscreen ────────── */
.tm-admin-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; cursor: pointer;
  padding: 6px 12px; border-radius: var(--radius-sm);
  color: #fff; border: 1px solid var(--border); background: var(--gradient-btn);
}
.tm-admin-btn:hover { filter: brightness(1.18); }

.tm-admin-gate {
  position: fixed; inset: 0; z-index: 9998;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4,12,19,0.78); backdrop-filter: blur(4px);
}
.tm-admin-gate-box {
  width: min(360px, 90vw); padding: 24px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); text-align: center;
}
.tm-admin-gate-title { font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.tm-admin-gate-sub   { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }
.tm-admin-gate-input {
  width: 100%; padding: 10px 12px; font-size: 14px; box-sizing: border-box;
  background: var(--surface-3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); outline: none;
}
.tm-admin-gate-input:focus { border-color: var(--accent); }
.tm-admin-gate-err { color: var(--red); font-size: 12px; margin-top: 8px; }
.tm-admin-gate-actions { display: flex; gap: 8px; margin-top: 16px; }
.tm-admin-gate-actions button { flex: 1; padding: 10px; border-radius: var(--radius-sm); font-weight: 700; cursor: pointer; border: none; }
.tm-admin-gate-cancel { background: var(--surface-3); color: var(--text-secondary); }
.tm-admin-gate-ok     { background: var(--gradient-btn); color: #fff; }

body.tm-admin-open { overflow: hidden; }
.tm-admin-board {
  position: fixed; inset: 0; z-index: 9990;
  background: var(--bg); overflow-y: auto;
}
.tm-admin-head {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.tm-admin-h-title { font-size: 20px; font-weight: 800; color: var(--text); }
.tm-admin-h-right { display: flex; align-items: center; gap: 16px; }
.tm-admin-h-sub   { font-size: 12px; color: var(--text-muted); }
.tm-admin-close {
  font-size: 13px; font-weight: 700; cursor: pointer; color: var(--text);
  padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface-2);
}
.tm-admin-close:hover { border-color: var(--accent); }
.tm-admin-body { padding: 24px; max-width: 1440px; margin: 0 auto; width: 100%; box-sizing: border-box; }
.tm-admin-loading { color: var(--text-muted); text-align: center; padding: 60px 0; }

.tm-admin-summary { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.tm-admin-stat {
  flex: 1; min-width: 140px; padding: 16px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); text-align: center;
}
.tm-admin-stat-v { display: block; font-size: 28px; font-weight: 800; color: var(--text); }
.tm-admin-stat-l { display: block; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }

.tm-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.tm-admin-card {
  padding: 16px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; flex-direction: column;
  cursor: grab;
}
.tm-admin-card:active { cursor: grabbing; }
.tm-admin-card .tm-admin-detail { cursor: pointer; }
.tm-admin-card--ghost  { opacity: .4; }
.tm-admin-card--chosen { box-shadow: 0 0 0 2px var(--accent); }
.tm-admin-card-head { display: flex; align-items: center; gap: 12px; }
.tm-admin-card-id   { flex: 1; min-width: 0; }
.tm-admin-card-name { font-size: 15px; font-weight: 800; color: var(--text); }
.tm-admin-card-role { font-size: 11px; color: var(--text-muted); }
.tm-admin-card-att  { font-size: 16px; }
.tm-admin-card.sem-r { border-left: 3px solid var(--red); }
.tm-admin-card.sem-y { border-left: 3px solid var(--yellow); }
.tm-admin-card.sem-g { border-left: 3px solid var(--accent); }
.tm-admin-narrative {
  margin: 12px 0 12px; font-size: 13.5px; line-height: 1.6; color: var(--text-secondary);
}

/* projetos tocados + cruzamento com tarefas */
.tm-admin-proj { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tm-admin-proj-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 20px;
  background: var(--surface-3); color: var(--text-secondary); border: 1px solid var(--border);
}
.tm-admin-proj-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--accent)); flex: none; }
.tm-admin-taskline {
  font-size: 12px; color: var(--text-secondary); padding: 9px 0;
  border-top: 1px solid var(--border); display: flex; gap: 14px; flex-wrap: wrap;
}
.tm-admin-taskline b { color: var(--text); font-weight: 800; }
.tm-admin-taskline .late b { color: var(--red); }
.tm-admin-late { margin: 4px 0 12px; }
.tm-admin-late-h { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--red); margin-bottom: 5px; font-weight: 700; }
.tm-admin-late-item {
  font-size: 12px; color: var(--text-secondary); padding: 2px 0; line-height: 1.4;
  display: flex; gap: 6px; align-items: baseline;
}
.tm-admin-late-item .dot { color: var(--red); flex: none; }
.tm-admin-late-item .txt { flex: 1; min-width: 0; }
.tm-admin-late-proj { font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: var(--radius-xs); background: var(--surface-3); color: var(--text-muted); white-space: nowrap; flex: none; }
.tm-admin-more { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

.tm-admin-insights { padding: 10px; border-radius: var(--radius-sm); background: var(--green-bg); border: 1px solid var(--accent-light); margin: 2px 0 12px; font-size: 12px; line-height: 1.5; color: var(--text-secondary); }
.tm-admin-insights b { color: var(--accent); }
.tm-admin-ai-soon  { font-size: 11px; color: var(--accent); }
.tm-admin-ai-badge {
  display: inline-block; vertical-align: middle; margin-left: 4px;
  font-size: 9px; font-weight: 800; letter-spacing: 0.06em;
  padding: 1px 5px; border-radius: var(--radius-xs);
  background: var(--gradient-primary); color: #fff;
}
.tm-admin-detail {
  margin-top: auto; width: 100%; padding: 8px; font-size: 12px; font-weight: 700; cursor: pointer;
  color: var(--accent); background: var(--green-bg);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.tm-admin-detail:hover { border-color: var(--accent); }
.tm-admin-foot { margin-top: 22px; font-size: 11px; color: var(--text-muted); text-align: center; }
.tm-admin-foot-link { color: var(--accent); text-decoration: none; font-weight: 600; }
.tm-admin-foot-link:hover { text-decoration: underline; }

.tm-card-footer {
  padding: 8px 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tm-cta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.15s;
}
.tm-card:hover .tm-cta { color: var(--tm-accent, var(--accent-light)); }

/* ─── Botão Feedback no card + pulso ─────────────────────────────────────── */
.tm-feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.tm-feedback-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-color: var(--tm-accent, rgba(255,255,255,0.25));
}
.tm-fb-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #5a5e70; flex: 0 0 auto;
}
.tm-fb-dot-on { background: #2ecc71; box-shadow: 0 0 0 2px rgba(46,204,113,0.25); }

/* ─── Modal de Feedback (mesma família do ranking) ───────────────────────── */
.tm-fb-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 10000; /* acima do quadro Visão 360 (9990) e do gate (9998) */
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.tm-fb-panel {
  background: #1a1d2e;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  width: 100%; max-width: 560px; max-height: 82vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.tm-fb-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  position: sticky; top: 0; background: #1a1d2e; z-index: 1;
}
.tm-fb-title { font-size: 16px; font-weight: 700; color: #fff; }
.tm-fb-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 16px; cursor: pointer; padding: 4px;
}
.tm-fb-close:hover { color: #fff; }
.tm-fb-empty { padding: 32px 20px; text-align: center; color: var(--text-muted); font-size: 13px; }
.tm-fb-pulse {
  display: flex; gap: 12px; padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.tm-fb-pulse-stat {
  display: flex; flex-direction: column; gap: 2px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px; padding: 8px 14px; min-width: 80px;
}
.tm-fb-pulse-val { font-size: 18px; font-weight: 700; color: #fff; }
.tm-fb-pulse-lbl { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.tm-fb-list { padding: 8px 20px 20px; }
.tm-fb-item {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.tm-fb-item:last-child { border-bottom: none; }
.tm-fb-item-date { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.tm-fb-proj { color: var(--accent-light, #74b9ff); font-weight: 600; }
.tm-fb-oque { font-size: 13.5px; color: #e8e8ee; line-height: 1.4; margin-bottom: 6px; }
.tm-fb-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tm-fb-tag {
  font-size: 11px; color: #cfd2dc;
  background: rgba(255,255,255,0.05);
  border-radius: 6px; padding: 3px 8px;
}
.tm-fb-tag-warn { background: rgba(214,48,49,0.15); color: #ff8a8a; }
.tm-fb-link { font-size: 11px; color: var(--accent-light, #74b9ff); text-decoration: none; padding: 3px 4px; }
.tm-fb-link:hover { text-decoration: underline; }

/* Hero do membro */
.tm-hero {
  border-left: 4px solid var(--tm-accent, var(--magenta));
  background: var(--surface-1);
  flex-shrink: 0;
}
.tm-hero-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 24px;
  flex-wrap: wrap;
}
.tm-back {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
}
.tm-back:hover { color: var(--text); border-color: var(--text-muted); }
.tm-hero-actions { display: flex; align-items: center; gap: 8px; }
.tm-back-nav { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tm-member-nav { display: flex; gap: 4px; }
.tm-btn-new-task {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.tm-btn-new-task:hover { opacity: 0.85; }

/* Filter bar */
.tm-filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: rgba(0,0,0,0.18);
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-wrap: wrap;
}
.tm-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.tm-filter-btn:hover {
  background: rgba(255,255,255,0.12);
  color: var(--text);
}
.tm-filter-btn-active {
  background: var(--tm-accent, var(--magenta));
  color: #fff;
  border-color: transparent;
}
.tm-filter-count {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  color: inherit;
  border-radius: 10px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  min-width: 18px;
  text-align: center;
}
.tm-filter-btn-active .tm-filter-count {
  background: rgba(255,255,255,0.25);
}
.tm-show-done-toggle {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}
.tm-show-done-toggle input[type="checkbox"] {
  accent-color: var(--tm-accent, var(--magenta));
  cursor: pointer;
  width: 14px;
  height: 14px;
}

/* ─── Toggle Prioridade + Filtro de Data (time + cliente) ─────────────────── */
.tm-prio-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
}
.tm-prio-toggle:hover { background: var(--surface-2); color: var(--text); }
.tm-prio-toggle-active {
  background: linear-gradient(135deg, var(--red) 0%, #f39c12 50%, var(--green) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.tm-prio-toggle-icon { font-size: 13px; line-height: 1; }

/* Seletor "Agrupar por" da visão de cliente */
.cd-groupby-wrap { display: inline-flex; align-items: center; gap: 5px; }
.cd-groupby-label { font-size: 11px; color: var(--text-muted); font-weight: 600; white-space: nowrap; }

.tm-date-filter {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: border-color .15s ease;
}
.tm-date-filter:hover  { border-color: var(--accent, var(--magenta)); }
.tm-date-filter:focus  { border-color: var(--accent, var(--magenta)); }

/* ─── Vista Priorizada — grupos + linhas ──────────────────────────────────── */
.tm-prio-group {
  margin-bottom: 18px;
  border-left: 3px solid var(--tm-prio-color, var(--text-muted));
  border-radius: 4px;
  background: color-mix(in srgb, var(--tm-prio-color, var(--text-muted)) 4%, transparent);
}
.tm-prio-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
}
.tm-prio-group-badge {
  color: var(--tm-prio-color, var(--text-muted));
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 12px;
}
.tm-prio-group-count {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 12px;
}
.tm-prio-list { padding: 0 8px 8px; }

.tm-prio-row {
  align-items: center;
  gap: 10px;
}
.tm-prio-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 14px;
  flex-shrink: 0;
}
.tm-prio-client-chip {
  display: inline-block;
  padding: 2px 8px;
  margin-right: 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: color-mix(in srgb, var(--chip-color, var(--magenta)) 18%, transparent);
  color: var(--chip-color, var(--magenta));
  border: 1px solid color-mix(in srgb, var(--chip-color, var(--magenta)) 30%, transparent);
  vertical-align: middle;
}
.tm-prio-range {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-2);
  white-space: nowrap;
}
.tm-prio-range.overdue {
  color: #fff;
  background: var(--red);
}
.tm-prio-range.duetoday {
  color: #fff;
  background: #f39c12;
}
.tm-hero-id {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}
.tm-hero-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}
.tm-hero-role {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}
.tm-hero-stats {
  display: flex;
  align-items: stretch;
  border-left: 1px solid var(--border);
}

/* Corpo do membro: grupos por cliente */
.tm-member-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tm-client-group {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.tm-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-left: 4px solid var(--magenta);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.tm-group-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.tm-group-count {
  font-size: 11px;
  color: var(--text-muted);
}
.tm-client-group .cd-task-row {
  padding: 8px 16px;
}
.tm-not-found, .tm-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}
.tm-empty-filtered {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.tm-empty-filtered .tm-empty-title {
  font-size: 14px;
  color: var(--text-muted);
}
.tm-empty-filtered .tm-empty-sub {
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.8;
}
.tm-clear-filters {
  margin-top: 10px;
  background: var(--accent);
  border: none;
  color: #06251f;
  padding: 7px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: opacity 0.15s;
}
.tm-clear-filters:hover { opacity: 0.85; }

/* Checkboxes por linha — team view (estilização principal em .tm-task-check no topo do arquivo) */
.cd-t-check { display:flex; align-items:center; flex-shrink:0; padding-right:8px; cursor:pointer; }
.tm-check-all-label { display:flex; align-items:center; margin-right:8px; cursor:pointer; flex-shrink:0; }

/* ===== Time view: client group com paleta do cliente ===== */
.tm-client-group {
  --tm-group-accent: var(--magenta);
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--tm-group-accent) 18%, var(--border));
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--tm-group-accent) 10%, transparent) 0%,
    color-mix(in srgb, var(--tm-group-accent) 4%, transparent) 60%,
    transparent 100%);
  margin-bottom: 14px;
  overflow: hidden;
}
.tm-client-group .tm-group-header {
  border-left: 4px solid var(--tm-group-accent);
  background: color-mix(in srgb, var(--tm-group-accent) 14%, transparent);
}
.tm-client-group .cd-task-list { padding: 0 6px 6px; }
.tm-client-group .cd-task-row {
  background: color-mix(in srgb, var(--tm-group-accent) 4%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--tm-group-accent) 8%, var(--border));
}
.tm-client-group .cd-task-row:hover {
  background: color-mix(in srgb, var(--tm-group-accent) 10%, transparent);
}
.tm-client-group .cd-task-row:last-child { border-bottom: none; }
/* Status colors override accent tint where set (overdue red, doing blue, due-today yellow) */
.tm-client-group .cd-task-row.cd-task-overdue,
.tm-client-group .cd-task-row.cd-task-duetoday,
.tm-client-group .cd-task-row.cd-task-doing {
  background: inherit;
}

/* ===== Status popover (click no dot) ===== */
.cd-t-dot-clickable { cursor: pointer; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.cd-t-dot-clickable:hover { transform: scale(1.25); box-shadow: 0 0 0 2px rgba(255,255,255,0.15); }
.cd-status-popover {
  position: fixed;
  z-index: 1000;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  padding: 4px;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.cd-status-popover-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.12s ease;
}
.cd-status-popover-item:hover { background: rgba(162, 155, 254, 0.14); }
.cd-status-popover-item.is-current { background: rgba(162, 155, 254, 0.22); font-weight: 600; }
.cd-status-popover-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.cd-status-popover-label { flex: 1; }

/* ===== Bulk bar no client-detail ===== */
.cd-bulk-bar { margin-top: 6px; }
.cd-tasks-col-label { display: flex; align-items: center; gap: 8px; }
.cd-tasks-select-all { margin: 0; }

/* ===== Contexto Vivo — grid 2 colunas ===== */
.cd-form-grid-top,
.cd-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
@media (max-width: 720px) {
  .cd-form-grid-top, .cd-form-grid-2 { grid-template-columns: 1fr; }
}
.cd-form-grid-top .cd-form-row,
.cd-form-grid-2 .cd-form-row { margin: 0; }

/* Barra de ações em lote — sticky no fundo do container */
.tm-bulk-bar {
  position: sticky;
  bottom: 0;
  background: #1b1b2e;
  border-top: 1px solid rgba(108,92,231,0.4);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 25;
  border-radius: 0 0 12px 12px;
}
.tm-bulk-count { color: var(--lilas); font-size: 13px; font-weight: 600; flex: 1; }
.tm-bulk-status {
  background: #2d2d44;
  border: 1px solid rgba(255,255,255,0.15);
  color: #e0e0e0;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 13px;
}
.tm-bulk-apply {
  background: var(--magenta);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 16px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
}
.tm-bulk-apply:hover { background: #7d6ff0; }
.tm-bulk-apply:disabled { opacity: 0.5; cursor: not-allowed; }
.tm-bulk-delete {
  background: rgba(255,51,102,0.12);
  color: #e55039;
  border: 1px solid rgba(255,51,102,0.3);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
}
.tm-bulk-delete:hover { background: rgba(255,51,102,0.22); color: #ff6b6b; }
.tm-bulk-delete:disabled { opacity: 0.5; cursor: not-allowed; }
.tm-bulk-cancel {
  background: transparent;
  color: #aaa;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}
.tm-bulk-cancel:hover { color: #fff; border-color: rgba(255,255,255,0.3); }

@media (max-width: 680px) {
  .tm-grid { grid-template-columns: 1fr; }
}

/* Task rows clicáveis */
.cd-task-clickable { cursor: pointer; }

/* ─── Contexto Vivo ──────────────────────────────────────────────────────── */
.cd-ctx-vivo {
  /* Fase 2: sem borda/fundo coloridos fixos — o modal que justificava esse
     destaque foi removido, e a cor do cliente já assina a aba (sublinhado). */
}
.cd-lbl-vivo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cd-vivo-date {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: auto;
}
.cd-vivo-resumo {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  padding: 6px 0 4px;
}
.cd-vivo-group-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 10px 0 4px;
}
.cd-vivo-item {
  font-size: 13px;
  padding: 3px 0;
  line-height: 1.4;
}
.cd-vivo-acao   { color: var(--blue); }
.cd-vivo-decisao{ color: #55efc4; }
.cd-vivo-blocker{ color: var(--yellow); }

/* ===== Botão CONTEXTO GERAL no hero (paleta do cliente, sutil) ===== */
.cd-ctx-vivo-btn {
  align-self: center;
  background: color-mix(in srgb, var(--hero-accent, var(--magenta)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--hero-accent, var(--magenta)) 45%, transparent);
  color: color-mix(in srgb, var(--hero-accent, var(--magenta)) 75%, #fff);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.12s;
  line-height: 1.3;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cd-ctx-vivo-btn::before {
  content: '●';
  font-size: 9px;
  color: color-mix(in srgb, var(--hero-accent, var(--magenta)) 90%, #fff);
  animation: cdVivoPulse 1.8s ease-in-out infinite;
}
@keyframes cdVivoPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}
.cd-ctx-vivo-btn:hover {
  background: color-mix(in srgb, var(--hero-accent, var(--magenta)) 22%, transparent);
  border-color: color-mix(in srgb, var(--hero-accent, var(--magenta)) 70%, transparent);
  color: #fff;
  transform: translateY(-1px);
}
.cd-ctx-vivo-btn:active { transform: translateY(0); }

.cd-plan-btn {
  align-self: center;
  background: color-mix(in srgb, var(--hero-accent, var(--magenta)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--hero-accent, var(--magenta)) 45%, transparent);
  color: color-mix(in srgb, var(--hero-accent, var(--magenta)) 75%, #fff);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.12s;
  line-height: 1.3;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.cd-plan-btn::before {
  content: '📋';
  font-size: 12px;
  opacity: 0.85;
}
.cd-plan-btn:hover {
  background: color-mix(in srgb, var(--hero-accent, var(--magenta)) 22%, transparent);
  border-color: color-mix(in srgb, var(--hero-accent, var(--magenta)) 70%, transparent);
  color: #fff;
  transform: translateY(-1px);
}
.cd-plan-btn:active { transform: translateY(0); }
.cd-plan-btn--disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.cd-plan-btn--disabled:hover { transform: none; background: color-mix(in srgb, var(--hero-accent, var(--magenta)) 12%, transparent); color: color-mix(in srgb, var(--hero-accent, var(--magenta)) 75%, #fff); border-color: color-mix(in srgb, var(--hero-accent, var(--magenta)) 45%, transparent); }

.cd-btn-new-task {
  align-self: center;
  background: color-mix(in srgb, var(--hero-accent, var(--magenta)) 85%, transparent);
  border: none;
  color: var(--ink);
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.12s;
  white-space: nowrap;
  flex-shrink: 0;
}
.cd-btn-new-task:hover { opacity: 0.88; transform: translateY(-1px); }
.cd-btn-new-task:active { transform: translateY(0); }
.cd-ctxg-label br { display: none; }

/* ===== Modal Contexto Geral ===== */
.cd-ctxg-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(5px);
  z-index: 9998;
  animation: cdCtxgBdIn 0.18s ease-out;
}
@keyframes cdCtxgBdIn { from { opacity: 0; } to { opacity: 1; } }

.cd-ctxg-modal {
  position: fixed;
  top: 4vh; left: 50%;
  transform: translateX(-50%);
  width: min(900px, 94vw);
  max-height: 92vh;
  z-index: 9999;
  background: var(--surface, #1e272e);
  border: 1px solid rgba(108, 92, 231, 0.35);
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
  animation: cdCtxgIn 0.22s cubic-bezier(.2,.8,.2,1);
}
@keyframes cdCtxgIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px) scale(0.985); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
.cd-ctxg-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(135deg, rgba(108,92,231,0.12), transparent 70%);
  border-radius: 12px 12px 0 0;
  gap: 16px;
}
.cd-ctxg-title {
  font-size: 14px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--lilas);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.cd-ctxg-slug { color: #fff; font-weight: 800; }
.cd-ctxg-source-tag {
  font-size: 9px; font-weight: 600; letter-spacing: 0.5px;
  padding: 2px 6px; border-radius: 3px; text-transform: uppercase;
}
.cd-ctxg-source-tag.tag-saved { background: var(--green-bg); color: var(--green); }
.cd-ctxg-source-tag.tag-static { background: var(--blue-bg); color: var(--blue); }

.cd-ctxg-actions { display: flex; gap: 8px; align-items: center; }
.cd-ctxg-edit, .cd-ctxg-save, .cd-ctxg-cancel {
  background: color-mix(in srgb, var(--lilas) 15%, transparent); border: 1px solid color-mix(in srgb, var(--lilas) 40%, transparent);
  color: var(--lilas-ink); padding: 7px 14px; border-radius: 5px;
  cursor: pointer; font-size: 12px; font-weight: 600;
  transition: all 0.15s;
}
.cd-ctxg-edit:hover, .cd-ctxg-cancel:hover { background: color-mix(in srgb, var(--lilas) 28%, transparent); color: var(--text); }
.cd-ctxg-save { background: var(--green-bg); border-color: var(--green-bg); color: var(--green); }
.cd-ctxg-save:hover { background: var(--green-bg); color: var(--text); }
.cd-ctxg-save:disabled { opacity: 0.5; cursor: default; }

.cd-ctxg-close {
  background: transparent; border: 1px solid rgba(255,255,255,0.15);
  color: #dfe6e9; width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.cd-ctxg-close:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.3); color: #fff; }

/* Textarea de edição */
.cd-ctxg-textarea {
  width: 100%; min-height: 60vh;
  background: #0f1419; color: #dfe6e9;
  border: 1px solid rgba(255,255,255,0.08); border-radius: 6px;
  padding: 16px 18px; font-family: 'Monaco','Menlo','Courier New',monospace;
  font-size: 13px; line-height: 1.55; resize: vertical;
  box-sizing: border-box;
}
.cd-ctxg-textarea:focus { outline: none; border-color: rgba(108,92,231,0.5); }
.cd-ctxg-edit-hint {
  margin-top: 8px; font-size: 11px; color: var(--text-muted);
}
.cd-ctxg-edit-hint code {
  background: rgba(108,92,231,0.12); color: var(--lilas);
  padding: 1px 5px; border-radius: 3px; font-size: 11px;
}

.cd-ctxg-body {
  padding: 24px 32px 32px;
  overflow-y: auto;
  flex: 1;
}
.cd-ctxg-loading, .cd-ctxg-error {
  text-align: center; color: var(--text-muted); padding: 40px 0;
}
.cd-ctxg-error { color: var(--red); }
.cd-ctxg-error small { display: block; margin-top: 8px; opacity: 0.7; font-family: monospace; }

/* Markdown rendering inside modal */
.cd-md { color: var(--text-secondary); font-size: 14px; line-height: 1.65; }
.cd-md h1 { font-size: 22px; font-weight: 800; margin: 4px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); color: var(--text); }
.cd-md h2 { font-size: 17px; font-weight: 700; margin: 22px 0 10px; color: var(--lilas-ink); }
.cd-md h3 { font-size: 14px; font-weight: 700; margin: 16px 0 8px; color: var(--blue); text-transform: uppercase; letter-spacing: 0.5px; }
.cd-md h4, .cd-md h5, .cd-md h6 { font-size: 13px; font-weight: 600; margin: 14px 0 6px; color: var(--text-muted); }
.cd-md p  { margin: 8px 0; }
.cd-md ul { margin: 8px 0 8px 22px; padding: 0; }
.cd-md li { margin: 4px 0; padding-left: 4px; }
.cd-md li::marker { color: var(--blue); }
.cd-md a  { color: var(--blue); text-decoration: none; border-bottom: 1px dotted var(--blue-bg); }
.cd-md a:hover { color: var(--lilas-ink); border-bottom-color: var(--lilas-ink); }
.cd-md strong { color: var(--text); font-weight: 700; }
.cd-md em { color: var(--text-muted); }
.cd-md code { background: color-mix(in srgb, var(--lilas) 15%, transparent); color: var(--lilas-ink); padding: 2px 6px; border-radius: 3px; font-size: 12px; font-family: 'Monaco','Menlo',monospace; }
.cd-md pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 12px 14px; overflow-x: auto; font-size: 12px; line-height: 1.5; margin: 12px 0; }
.cd-md hr { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
.cd-md blockquote { border-left: 3px solid var(--magenta); padding: 4px 0 4px 14px; margin: 10px 0; color: var(--text-muted); font-style: italic; background: color-mix(in srgb, var(--lilas) 6%, transparent); border-radius: 0 4px 4px 0; }
.cd-md table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 13px; }
.cd-md th { background: color-mix(in srgb, var(--lilas) 18%, transparent); color: var(--text); text-align: left; padding: 8px 12px; font-weight: 700; border-bottom: 1px solid var(--border); }
.cd-md td { padding: 7px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.cd-md tr:hover td { background: color-mix(in srgb, var(--text) 4%, transparent); }
.cd-md-check { display: inline-block; margin-right: 4px; color: var(--text-muted); }
.cd-md-check.checked { color: var(--green); }

/* ===== Próximas Ações com checkbox (view mode) ===== */
.cd-vivo-todo {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  cursor: pointer;
  line-height: 1.5;
  font-size: 13px;
  color: var(--blue);
  transition: opacity 0.15s;
}
.cd-vivo-todo:hover { background: rgba(255,255,255,0.025); border-radius: 4px; padding-left: 4px; padding-right: 4px; margin-left: -4px; margin-right: -4px; }
.cd-vivo-todo-check {
  flex-shrink: 0;
  margin-top: 3px;
  width: 14px;
  height: 14px;
  accent-color: var(--lilas, #6c5ce7);
  cursor: pointer;
}
.cd-vivo-todo-text { flex: 1; min-width: 0; }
.cd-vivo-todo-done .cd-vivo-todo-text {
  text-decoration: line-through;
  color: var(--text-muted);
  opacity: 0.6;
}

/* ===== List editor (lista editável de itens) ===== */
.cd-vivo-list-editor {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  padding: 8px 10px;
}
.cd-vivo-list-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cd-vivo-list-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.04);
}
.cd-vivo-list-row:last-child { border-bottom: none; }
.cd-vivo-list-bullet {
  flex-shrink: 0;
  width: 16px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.85;
}
.cd-vivo-list-row.cd-vivo-acao .cd-vivo-list-bullet    { color: var(--blue); }
.cd-vivo-list-row.cd-vivo-decisao .cd-vivo-list-bullet { color: #55efc4; }
.cd-vivo-list-row.cd-vivo-blocker .cd-vivo-list-bullet { color: var(--yellow); }
.cd-vivo-list-row.cd-vivo-alert .cd-vivo-list-bullet   { color: var(--red); }
.cd-list-item {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--text, #dfe6e9);
  font-size: 13px;
  padding: 4px 6px;
  border-radius: 3px;
  font-family: inherit;
  outline: none;
}
.cd-list-item:focus {
  background: rgba(108,92,231,0.08);
  box-shadow: 0 0 0 1px rgba(108,92,231,0.35);
}
.cd-list-item::placeholder { color: var(--text-muted); opacity: 0.5; }
.cd-vivo-list-remove {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  opacity: 0.6;
}
.cd-vivo-list-row:hover .cd-vivo-list-remove { opacity: 1; }
.cd-vivo-list-remove:hover {
  background: rgba(214,48,49,0.18);
  color: #ff7675;
  border-color: rgba(214,48,49,0.45);
}
.cd-vivo-list-add {
  align-self: flex-start;
  background: transparent;
  border: 1px dashed rgba(108,92,231,0.4);
  color: var(--lilas);
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.cd-vivo-list-add:hover {
  background: rgba(108,92,231,0.1);
  border-color: rgba(108,92,231,0.7);
  border-style: solid;
  color: #fff;
}

/* ===== Empty state da aba Geral ===== */
.cd-ctxg-empty {
  text-align: center;
  padding: 40px 24px;
  max-width: 480px;
  margin: 40px auto;
}
.cd-ctxg-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text, #dfe6e9);
  margin-bottom: 10px;
}
.cd-ctxg-empty-hint {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}
.cd-ctxg-empty-cta {
  background: rgba(108,92,231,0.18);
  border: 1px solid rgba(108,92,231,0.45);
  color: var(--lilas);
  padding: 9px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
}
.cd-ctxg-empty-cta:hover {
  background: rgba(108,92,231,0.32);
  color: #fff;
  border-color: rgba(108,92,231,0.7);
}

/* ===== Modal com abas (Vivo / Geral) ===== */
.cd-ctxg-tabs {
  display: flex;
  gap: 0;
  padding: 0 24px;
  background: var(--surface-1, #181f25);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cd-ctxg-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 12px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.cd-ctxg-tab:hover {
  color: #fff;
  background: rgba(255,255,255,0.03);
}
.cd-ctxg-tab.active {
  color: var(--lilas);
  border-bottom-color: var(--lilas);
}
.cd-ctxg-pane {
  flex: 1;
  overflow-y: auto;
  padding: 18px 28px 28px;
}
.cd-ctxg-modal-tabs .cd-ctxg-body {
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Ajustes do cd-ctx-vivo dentro do modal — esconde o botão de expandir
   (o modal já é a tela cheia) e remove constraints de coluna estreita */
.cd-ctx-vivo-modal {
  border-bottom: none;
  background: transparent;
}
.cd-ctx-vivo-modal .cd-col-label {
  background: transparent;
  position: static;
  padding: 0 0 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 14px;
  font-size: 11px;
}
.cd-ctx-vivo-modal .cd-vivo-resumo {
  font-size: 14px;
  line-height: 1.6;
}
.cd-ctx-vivo-modal .cd-vivo-item {
  font-size: 13px;
  line-height: 1.55;
  padding: 5px 0;
}
.cd-ctx-vivo-modal .cd-vivo-group-label {
  font-size: 10px;
  margin-top: 16px;
}
.cd-ctx-vivo-modal .cd-vivo-edit-btn {
  position: static;
  margin-left: auto;
  width: auto;
  height: auto;
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 4px;
}

@media (max-width: 720px) {
  .cd-ctxg-modal { top: 0; left: 0; transform: none; width: 100%; max-height: 100vh; border-radius: 0; }
  .cd-ctxg-body { padding: 16px 18px 24px; }
  .cd-ctxg-modal-tabs .cd-ctxg-body { padding: 0; }
  .cd-ctxg-pane { padding: 14px 16px 20px; }
  .cd-md table { font-size: 12px; }
  .cd-md th, .cd-md td { padding: 6px 8px; }
}

/* Botão atualizar contexto no hero */
.cd-ctx-update-btn {
  background: rgba(108,92,231,0.12);
  border: 1px solid rgba(108,92,231,0.3);
  color: var(--lilas);
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
  margin-top: 8px;
}
.cd-ctx-update-btn:hover { background: rgba(108,92,231,0.22); }
.cd-ctx-update-btn:disabled { opacity: 0.5; cursor: default; }
/* Selo de freshness do Contexto Vivo (substituiu o botão manual de atualizar) */
.cd-ctx-freshness {
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
  margin-top: 8px;
  align-self: center;
}

/* Botão editar contexto — FAB flutuante */
.cd-vivo-edit-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface-2, #2d3436);
  border: 1.5px solid var(--border, rgba(255,255,255,0.1));
  color: var(--lilas-ink);
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
}
.cd-vivo-edit-btn:hover {
  border-color: var(--magenta);
  color: #fff;
  transform: scale(1.08);
  background: rgba(108,92,231,0.3);
}

/* Botão expandir — FAB ao lado do edit */
.cd-vivo-expand-btn {
  position: fixed;
  bottom: 28px;
  right: 92px;
  z-index: 900;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface-2, #2d3436);
  border: 1.5px solid var(--border, rgba(255,255,255,0.1));
  color: var(--lilas);
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
}
.cd-vivo-expand-btn:hover {
  border-color: var(--magenta);
  color: #fff;
  transform: scale(1.08);
  background: rgba(108,92,231,0.3);
}

/* ===== Contexto Vivo — modo tela cheia ===== */
.cd-vivo-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 9998;
  animation: cdVivoBackdropIn 0.18s ease-out;
}
@keyframes cdVivoBackdropIn { from { opacity: 0; } to { opacity: 1; } }

.cd-ctx-vivo.cd-vivo-fullscreen {
  position: fixed;
  top: 4vh; left: 50%;
  transform: translateX(-50%);
  width: min(960px, 94vw);
  max-height: 92vh;
  z-index: 9999;
  background: var(--surface, #1e272e);
  border: 1px solid rgba(108,92,231,0.4);
  border-radius: 12px;
  padding: 28px 32px 32px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
  overflow-y: auto;
  animation: cdVivoModalIn 0.22s cubic-bezier(.2,.8,.2,1);
}
@keyframes cdVivoModalIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px) scale(0.985); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* Em fullscreen, botões viram parte do header da seção (não FAB) */
.cd-ctx-vivo.cd-vivo-fullscreen .cd-vivo-expand-btn,
.cd-ctx-vivo.cd-vivo-fullscreen .cd-vivo-edit-btn {
  position: absolute;
  top: 18px;
  width: 36px; height: 36px;
  font-size: 15px;
  bottom: auto;
  box-shadow: none;
}
.cd-ctx-vivo.cd-vivo-fullscreen .cd-vivo-expand-btn { right: 64px; }
.cd-ctx-vivo.cd-vivo-fullscreen .cd-vivo-edit-btn   { right: 20px; }

/* Conforto de leitura no fullscreen */
.cd-ctx-vivo.cd-vivo-fullscreen .cd-lbl-vivo {
  font-size: 18px;
  margin-bottom: 16px;
  padding-right: 120px;
}
.cd-ctx-vivo.cd-vivo-fullscreen .cd-vivo-resumo {
  font-size: 15px;
  line-height: 1.65;
}
.cd-ctx-vivo.cd-vivo-fullscreen .cd-vivo-item {
  font-size: 14px;
  padding: 8px 0;
  line-height: 1.55;
}
.cd-ctx-vivo.cd-vivo-fullscreen .cd-vivo-group-label {
  font-size: 11px;
  margin-top: 18px;
}

/* Mobile / telas pequenas */
@media (max-width: 720px) {
  .cd-ctx-vivo.cd-vivo-fullscreen {
    top: 0; left: 0;
    transform: none;
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  .cd-vivo-expand-btn { right: 86px; bottom: 24px; width: 46px; height: 46px; }
  .cd-vivo-edit-btn   { right: 24px; bottom: 24px; width: 46px; height: 46px; }
}

/* Tag "editando" no header */
.cd-vivo-editing-tag {
  font-size: 10px;
  font-weight: 400;
  color: var(--lilas);
  background: rgba(108,92,231,0.15);
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Texto vazio */
.cd-vivo-empty {
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
  padding: 4px 0 8px;
}

/* Form de edição */
.cd-vivo-form { padding-top: 2px; }
.cd-form-row { margin-bottom: 10px; }
.cd-form-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #b2bec3;
  margin-bottom: 4px;
}
.cd-form-hint { text-transform: none; letter-spacing: 0; color: var(--text-muted); }
.cd-vivo-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  color: #dfe6e9;
  font-size: 12px;
  font-family: inherit;
  padding: 7px 9px;
  box-sizing: border-box;
  resize: vertical;
  line-height: 1.5;
  transition: border-color 0.15s;
}
textarea.cd-vivo-input {
  min-height: 60px;
  max-height: 60vh;
  overflow-y: auto;
}
.cd-vivo-input:focus {
  outline: none;
  border-color: rgba(108,92,231,0.5);
}
.cd-vivo-input-sm { resize: none; height: 32px; padding: 5px 9px; max-height: none; min-height: 0; }
.cd-form-actions { display: flex; gap: 8px; margin-top: 4px; }
.cd-vivo-save-btn {
  background: rgba(108,92,231,0.2);
  border: 1px solid rgba(108,92,231,0.4);
  color: var(--lilas);
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.cd-vivo-save-btn:hover { background: rgba(108,92,231,0.35); }
.cd-vivo-save-btn:disabled { opacity: 0.5; cursor: default; }
.cd-vivo-cancel-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.cd-vivo-cancel-btn:hover { color: var(--text); border-color: var(--border-hover); }

/* Select no form de contexto vivo */
.cd-vivo-input select,
select.cd-vivo-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23636e72'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  padding-right: 28px;
  cursor: pointer;
}

/* ─── Client Detail — Mobile ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .cd-hero-inner {
    padding: 12px 16px;
    gap: 12px;
  }
  .cd-hero-id {
    width: 100%;
    flex: none;
  }
  .cd-hero-stats {
    border-left: none;
    border-top: 1px solid var(--border);
    margin-top: 4px;
    padding-top: 10px;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-shrink: 0;
  }
  .cd-hero-stat {
    min-width: 60px;
    padding: 8px 14px;
  }
  .cd-hs-val { font-size: 20px; }
  .cd-ctx-update-btn { margin-top: 0; padding: 6px 10px; }
  .cd-body {
    /* minmax(0,1fr), NÃO 1fr: 1fr = minmax(auto,1fr) deixa o track crescer até o
       min-content (blowout). minmax(0,...) trava a coluna na largura do container. */
    grid-template-columns: minmax(0, 1fr);
  }
  .cd-filter-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .cd-filter-tabs::-webkit-scrollbar { display: none; }
  .cd-filter-tab { flex-shrink: 0; }
  .cd-status-tabs { flex-wrap: nowrap; }
  .cd-bar-controls { padding-left: 8px; border-left: none; }
}

@media (max-width: 480px) {
  .cd-hero-name { font-size: 15px; }
  .cd-hero-logo-wrap { width: 38px; height: 38px; }
  .cd-hero-logo, .cd-hero-logo-fb { width: 38px; height: 38px; }
  .cd-hero-logo-fb { font-size: 14px; }
  .cd-back { font-size: 10px; padding: 4px 9px; }
  .cd-hs-val { font-size: 18px; }
  .cd-hs-lbl { font-size: 9px; }
  .cd-hero-stat { min-width: 52px; padding: 8px 10px; }
}

/* ─── Search field reutilizável (Cliente Detalhe / Portfólio / Time) ─── */
.search-field {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 1 240px;
  min-width: 140px;
}
.search-field::before {
  content: '🔍';
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  opacity: 0.55;
  pointer-events: none;
}
.search-field input {
  width: 100%;
  padding: 6px 26px 6px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  color: var(--text);
  font-size: 12px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.search-field input::placeholder { color: var(--text-muted); }
.search-field input:focus {
  border-color: var(--accent, var(--magenta));
  background: var(--surface-2);
}
.search-field .search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  display: none;
}
.search-field .search-clear:hover { color: var(--text); }
.search-field.has-value .search-clear { display: inline-block; }

/* Empty state quando search não encontra nada */
.search-empty {
  padding: 24px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
}

/* Posicionamento dentro do filter-tabs do cliente detalhe */
.cd-filter-tabs .search-field {
  margin-left: auto;
}

/* Posicionamento na section-header do portfólio */
.ch-section-header .search-field {
  margin-left: auto;
}

/* Time — Home (header) e Membro (filter-bar) */
.tm-section-header .search-field { margin-left: auto; }
.tm-filter-bar .search-field { margin-left: auto; }

/* ==========================================================================
   Sirius identity overrides (FINAL) — colocado no fim pra ganhar cascade
   sobre declarações originais com mesma especificidade (.nav-tab.active,
   .btn-new-task, etc). Conforme design-guide.md §7.
   ========================================================================== */

/* Nav tab active — gradient suave + texto branco (gradient v2 darker) */
.nav-tab.active {
  background: var(--gradient-soft);
  color: #FFFFFF;
  font-weight: 700;
}
.nav-tab:hover:not(.active) { color: var(--accent); }

/* Botões primários — gradient suave + texto branco */
.btn-create-task,
button.btn-primary,
.btn-primary,
.cta {
  background: var(--gradient-btn);
  color: #FFFFFF;
  font-weight: 700;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  letter-spacing: 0.01em;
  border: 1px solid var(--border);
}
.btn-create-task:hover {
  filter: brightness(1.12);
}

/* ==========================================================================
   Calendário — view unificada pet/vet · Sirius SC-vibe v1 (2026-05-20)
   ========================================================================== */

#calendarioContent { padding: 0 24px 32px; }

.cal-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 20px;
}

/* Header */
.cal-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; margin-bottom: 18px; flex-wrap: wrap;
}
.cal-title-group h1.cal-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px; font-weight: 700; letter-spacing: -0.02em;
  color: #FFFFFF;
  text-shadow: 0 0 24px color-mix(in srgb,var(--accent) 25%,transparent);
  margin: 0;
}
.cal-title-group .cal-subtitle {
  font-size: 13px; color: var(--text-muted); margin-top: 4px;
}
.cal-nav {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); padding: 6px; border-radius: var(--radius);
  border: 1px solid var(--border);
}
.cal-nav-btn {
  background: transparent; border: none; color: var(--text-secondary);
  font-size: 16px; width: 32px; height: 32px; border-radius: var(--radius-sm);
  cursor: pointer; transition: all .15s;
}
.cal-nav-btn:hover { background: var(--surface-2); color: var(--accent); }
.cal-month-label {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 16px; min-width: 160px; text-align: center; color: var(--text);
  text-transform: uppercase; letter-spacing: 0.03em;
}
.cal-today-btn {
  background: var(--gradient-soft); color: #fff; border: none;
  padding: 6px 14px; border-radius: var(--radius-sm); font-weight: 700;
  font-family: 'Space Grotesk', sans-serif; font-size: 12px; cursor: pointer;
  margin-left: 6px; transition: filter .15s;
}
.cal-today-btn:hover { filter: brightness(1.15); }

/* Banner do tema do mês */
.cal-tema-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px; border-radius: var(--radius);
  margin-bottom: 16px; color: #fff;
  font-family: 'Space Grotesk', sans-serif; font-size: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.28);
}
.cal-tema-dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(255,255,255,.85); box-shadow: 0 0 12px rgba(255,255,255,.7);
}

/* Filtros */
.cal-filtros {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 18px;
  padding: 14px 16px; background: var(--surface);
  border-radius: var(--radius); border: 1px solid var(--border);
}
.cal-filtro-group { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cal-filtro-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted); min-width: 60px;
}
.cal-filtro-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.cal-pill {
  background: var(--surface-2); color: var(--text-secondary);
  border: 1px solid var(--border); padding: 5px 12px;
  border-radius: 999px; font-size: 12px; cursor: pointer;
  transition: all .15s; font-family: inherit;
}
.cal-pill:hover { border-color: var(--border-hover); color: var(--text); }
.cal-pill.active {
  background: var(--gradient-soft); color: #fff;
  border-color: transparent; font-weight: 700;
}
.cal-pill-tipo.active {
  background: var(--pill-color, var(--gradient-soft));
}

/* Grid head (dias da semana) */
.cal-grid-head {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 6px; margin-bottom: 6px;
}
.cal-dow {
  text-align: center; font-size: 10px; font-weight: 700;
  color: var(--text-muted); letter-spacing: 0.1em;
  padding: 8px 0;
}

/* Grid de células */
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-cell {
  min-height: 110px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex; flex-direction: column; gap: 6px;
  cursor: pointer; transition: all .15s;
  position: relative; overflow: hidden;
}
.cal-cell:hover {
  border-color: var(--accent-light);
  background: var(--surface-2);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px color-mix(in srgb,var(--accent) 8%,transparent);
}
.cal-cell-empty {
  background: transparent; border: 1px dashed rgba(7,239,245,0.06);
  cursor: default; pointer-events: none;
}
.cal-cell-empty:hover { transform: none; background: transparent; box-shadow: none; }
.cal-cell-today {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent), 0 0 18px color-mix(in srgb,var(--accent) 15%,transparent);
}
.cal-cell-day {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 14px; color: var(--text); line-height: 1;
}
.cal-cell-today .cal-cell-day {
  color: var(--accent); font-size: 15px;
}
.cal-cell-events { display: flex; flex-direction: column; gap: 3px; flex: 1; min-height: 0; }
.cal-chip {
  font-size: 10px; color: #fff; padding: 3px 7px;
  border-radius: 4px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  font-weight: 600; line-height: 1.3;
}
.cal-chip-text { display: block; overflow: hidden; text-overflow: ellipsis; }
.cal-chip-more {
  font-size: 10px; color: var(--accent); font-weight: 700;
  padding: 2px 6px; align-self: flex-start;
}

/* Legenda */
.cal-legenda {
  margin-top: 18px; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 11px; color: var(--text-secondary);
}
.cal-leg-section { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.cal-leg-item { display: inline-flex; align-items: center; gap: 5px; margin-right: 4px; }
.cal-leg-icon {
  font-weight: 700; min-width: 18px; display: inline-block; text-align: center;
}

/* Modal do dia */
.cal-modal-bg {
  position: fixed; inset: 0; background: rgba(4,12,19,0.82);
  z-index: 9000; display: flex; align-items: center; justify-content: center;
  padding: 24px; backdrop-filter: blur(6px);
}
.cal-modal {
  background: var(--surface);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  max-width: 720px; width: 100%;
  max-height: 86vh; overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6), 0 0 32px color-mix(in srgb,var(--magenta) 15%,transparent);
}
.cal-modal-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 22px 26px 18px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.cal-modal-title {
  font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 700;
  margin: 0; letter-spacing: -0.01em; color: var(--text);
}
.cal-modal-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.cal-modal-close {
  background: transparent; border: none; color: var(--text-secondary);
  font-size: 28px; cursor: pointer; line-height: 1; padding: 0 4px;
  transition: color .15s;
}
.cal-modal-close:hover { color: var(--accent); }
.cal-modal-body { padding: 18px 26px 26px; display: flex; flex-direction: column; gap: 16px; }

.cal-event-card {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.cal-event-head {
  border-left: 3px solid #666;
  padding-left: 12px;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.cal-event-tipo {
  display: inline-block; padding: 3px 9px; border-radius: 4px;
  font-size: 10px; font-weight: 700; color: #fff;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.cal-event-title {
  font-family: 'Space Grotesk', sans-serif; font-size: 15px; font-weight: 700;
  margin: 0; color: var(--text); flex: 1;
}
.cal-event-desc {
  font-size: 13px; color: var(--text-secondary); line-height: 1.55;
  margin-bottom: 14px;
}
.cal-event-ativ {
  border-top: 1px solid var(--border); padding-top: 12px;
}
.cal-event-ativ-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 8px;
}
.cal-event-ativ-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
}
.cal-event-ativ-cell {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 10px; border-radius: 4px;
  background: var(--surface-3); border: 1px solid var(--border);
  font-size: 12px;
}
.cal-event-ativ-cli { color: var(--text-secondary); font-weight: 500; }
.cal-event-ativ-icon { font-weight: 700; font-size: 14px; }
.cal-ativ-destaque { background: rgba(255,217,102,0.16); border-color: rgba(255,217,102,0.35); }
.cal-ativ-destaque .cal-event-ativ-icon { color: #FFD966; }
.cal-ativ-ativar { background: color-mix(in srgb,var(--accent) 10%,transparent); border-color: color-mix(in srgb,var(--accent) 25%,transparent); }
.cal-ativ-ativar .cal-event-ativ-icon { color: var(--accent); }
.cal-ativ-info { background: rgba(120,160,220,0.10); border-color: rgba(120,160,220,0.25); }
.cal-ativ-info .cal-event-ativ-icon { color: #B5C7E0; font-size: 10px; }
.cal-ativ-na { opacity: 0.4; }

/* Loading / erro */
.cal-loading, .cal-error {
  padding: 60px 20px; text-align: center; color: var(--text-muted);
  font-size: 14px;
}
.cal-error { color: var(--red); }

/* Responsive */
@media (max-width: 720px) {
  .cal-cell { min-height: 80px; padding: 5px; }
  .cal-cell-day { font-size: 12px; }
  .cal-chip { font-size: 9px; padding: 2px 5px; }
  .cal-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .cal-nav { width: 100%; justify-content: space-between; }
  .cal-month-label { min-width: 0; flex: 1; }
  .cal-event-ativ-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Calendário v2 — GCal status + chips com origem + meta de evento */
.cal-gcal-status {
  font-size: 11px; padding: 0 4px 12px; min-height: 0; transition: all .2s;
  color: var(--text-muted);
}
.cal-gcal-status.loading { color: var(--accent); }
.cal-gcal-status.error   { color: var(--yellow); }

.cal-chip { display: flex; align-items: center; gap: 4px; }
.cal-chip-mark {
  font-size: 8px; opacity: 0.75; line-height: 1; flex-shrink: 0;
}

.cal-event-meta {
  display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 12px;
  font-size: 12px; color: var(--text-secondary);
}
.cal-event-meta-item { display: inline-flex; align-items: center; gap: 4px; }

.cal-event-link {
  display: inline-block; margin-bottom: 12px; font-size: 12px;
  color: var(--accent); text-decoration: none;
  border-bottom: 1px dashed color-mix(in srgb,var(--accent) 40%,transparent);
  padding-bottom: 1px;
}
.cal-event-link:hover { color: #fff; border-bottom-color: var(--accent); }

/* Calendário v3 — seção inline Sirius Digital (Google Calendar embed) */
.cal-gcal-section {
  margin-top: 32px;
  padding: 18px 18px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cal-gcal-section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding-bottom: 14px;
  gap: 12px; flex-wrap: wrap;
}
.cal-gcal-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px; font-weight: 700;
  margin: 0; color: var(--text); letter-spacing: -0.01em;
}
.cal-gcal-section-sub {
  font-size: 12px; color: var(--text-muted); margin-top: 3px;
}
.cal-gcal-section-link {
  color: var(--accent); font-size: 12px;
  text-decoration: none; font-weight: 600;
  border-bottom: 1px dashed color-mix(in srgb,var(--accent) 30%,transparent);
  padding-bottom: 1px;
}
.cal-gcal-section-link:hover {
  color: #fff; border-bottom-color: var(--accent);
}
.cal-gcal-iframe-inline {
  height: 720px; border: 0; display: block;
  margin: 0 -18px -1px;
  width: calc(100% + 36px);
}
@media (max-width: 720px) {
  .cal-gcal-iframe-inline { height: 540px; }
}

/* Calendário v6 — render nativo via /api/calendar-events (cor por mês definida no JS) */
.cal-header-actions {
  display: flex; align-items: center; gap: 12px;
}
.cal6-toolbar {
  display: flex; align-items: center; gap: 10px;
  margin: 18px 0 12px;
}
.cal6-toolbar .cal6-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.cal6-toolbar .cal6-btn:hover { border-color: var(--accent); color: var(--accent); }
.cal6-toolbar .cal6-btn-icon { padding: 6px 10px; font-size: 16px; line-height: 1; }
.cal6-toolbar .cal6-month-label {
  margin: 0 0 0 8px;
  font-size: 18px; font-weight: 600; color: var(--text);
}
.cal6-theme-badge {
  margin-left: 14px;
  padding: 6px 14px 6px 12px;
  border-radius: 999px;
  color: #1d1d1d;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  line-height: 1.2;
  max-width: 60%;
}
.cal6-theme-badge strong {
  font-weight: 700;
  white-space: nowrap;
}
.cal6-theme-badge .cal6-theme-sub {
  opacity: 0.78;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 720px) {
  .cal6-theme-badge { display: none; }
}

/* Filterbar · chips por projeto · multi-select */
.cal6-filterbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin: 0 0 14px;
  padding: 2px 0;
}
.cal6-filter-label {
  font-size: 12px; font-weight: 500; color: var(--text-muted);
  margin-right: 4px; letter-spacing: 0.02em; text-transform: uppercase;
}
.cal6-filter-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 120ms ease;
  line-height: 1.4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cal6-filter-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.cal6-filter-chip.has-proj-color:hover {
  border-color: var(--proj-color, var(--accent));
  color: var(--proj-color, var(--accent));
}
.cal6-filter-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.cal6-filter-chip.is-active:hover {
  filter: brightness(1.08);
  color: #fff;
}
.cal6-filter-chip-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.cal6-filter-chip.is-active .cal6-filter-chip-dot {
  background: #fff !important;
  opacity: 0.9;
}

/* Evento com cor de projeto (Foco em vermelho institucional)
   Texto branco com !important pra sobrescrever .cal6-event { color: #1d1d1d !important } */
.cal6-event.cal6-event-proj,
.cal6-event.cal6-event-proj .cal6-event-time,
.cal6-event.cal6-event-proj .cal6-event-title,
.cal6-event.cal6-event-proj .cal6-event-badge {
  color: #fff !important;
}
.cal6-event.cal6-task-deadline.cal6-event-proj .cal6-event-badge {
  background: rgba(255,255,255,0.18);
}
.cal6-filter-clear {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  margin-left: 4px;
}
.cal6-filter-clear:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.cal6-body { min-height: 480px; }
.cal6-loading, .cal6-error {
  padding: 60px 20px; text-align: center;
  color: var(--text-muted); font-size: 14px;
}
.cal6-error { color: var(--yellow); }

.cal6-grid {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cal6-grid-weekdays {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--surface-2, rgba(255,255,255,0.03));
  border-bottom: 1px solid var(--border);
}
.cal6-weekday {
  padding: 10px 8px; text-align: center;
  font-size: 11px; font-weight: 600;
  color: var(--text-muted); letter-spacing: 0.5px;
}
.cal6-grid-cells {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
}
/* Recolher semanas passadas */
.cal6-hide-past .cal6-cell-pastweek { display: none; }
.cal6-past-toggle {
  display: block; width: 100%;
  background: var(--surface); color: var(--text-secondary);
  border: 1px solid var(--border); border-bottom: none;
  padding: 7px 12px; font-size: 12px; font-weight: 600;
  cursor: pointer; text-align: center;
  font-family: 'Inter', sans-serif;
}
.cal6-past-toggle:hover { color: var(--text); background: var(--surface-2); }
.cal6-past-toggle .cal6-past-hide { display: none; }
.cal6-past-toggle.is-expanded .cal6-past-show { display: none; }
.cal6-past-toggle.is-expanded .cal6-past-hide { display: inline; }
/* "+N mais" por dia */
.cal6-cell-overflow[hidden] { display: none; }
.cal6-more {
  display: block; width: 100%; margin-top: 3px;
  background: rgba(255,255,255,0.05); color: var(--text-muted);
  border: none; border-radius: 4px; padding: 2px 4px;
  font-size: 10px; font-weight: 600; cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.cal6-more:hover { background: rgba(255,255,255,0.10); color: var(--text); }
.cal6-cell {
  min-height: 110px;
  padding: 6px 6px 4px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: visible;
  background: var(--surface);
}
.cal6-cell:nth-child(5n) { border-right: none; }
.cal6-cell-outside { background: rgba(255,255,255,0.015); }
.cal6-cell-outside .cal6-cell-day { color: var(--text-muted); opacity: 0.45; }
.cal6-cell-today { box-shadow: inset 0 0 0 1px var(--accent); }
.cal6-cell-day {
  font-size: 12px; font-weight: 600;
  color: var(--text); margin-bottom: 4px;
  padding: 2px 4px;
  display: inline-block;
}
.cal6-cell-day-today {
  background: var(--accent);
  color: #00131C;
  border-radius: 999px;
  min-width: 22px; text-align: center;
  padding: 2px 7px;
}
.cal6-event {
  display: block;
  padding: 2px 6px;
  margin-bottom: 2px;
  border-radius: 3px;
  font-size: 11px;
  line-height: 1.3;
  color: #1d1d1d !important;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  position: relative;
}
/* Concluído / passado · risco + opacity */
.cal6-event-done {
  opacity: 0.55;
  text-decoration: line-through !important;
  text-decoration-color: rgba(0,0,0,0.55);
  text-decoration-thickness: 1px;
}
.cal6-event-done.cal6-event-proj {
  text-decoration-color: rgba(255,255,255,0.7);
}
/* Atrasado · bolinha vermelha pulsando no canto direito.
   Vermelho com borda escura pra contrastar em fundo claro/escuro. */
.cal6-event-overdue::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 1.5px rgba(0,0,0,0.55);
  animation: cal6-overdue-pulse 1.8s ease-in-out infinite;
  pointer-events: none;
}
.cal6-event-overdue { padding-right: 16px; }
@keyframes cal6-overdue-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.7); }
}
.cal6-event:hover { filter: brightness(1.08); text-decoration: none; }
.cal6-event-time {
  font-weight: 700;
  margin-right: 4px;
}
.cal6-event-title { font-weight: 500; }
.cal6-event-more {
  font-size: 11px;
  color: var(--text-muted);
  padding: 1px 6px;
  cursor: default;
}
@media (max-width: 720px) {
  .cal6-cell { min-height: 80px; padding: 4px; }
  .cal6-event { font-size: 10px; padding: 1px 4px; }
}

/* Prazos de tarefas — pintam pela cor do cliente (inline style do JS).
   Sem !important no background pra permitir o override; fallback cinza
   continua valendo pra task de cliente não reconhecido. */
.cal6-event.cal6-task-deadline {
  background: #2f3a48;
  border-left: 3px solid #6e7d8f;
  color: #d8dee8 !important;
  font-weight: 500;
}
.cal6-event.cal6-task-deadline:hover { filter: brightness(1.15); }
/* Quando há cor de cliente, texto branco e sem barra cinza à esquerda */
.cal6-event.cal6-task-deadline.cal6-event-proj {
  color: #fff !important;
  border-left: none;
}
/* Badge "MEET" — pequeno indicador antes do horário pra eventos com Meet.
   Cor de fundo amarela com texto preto, contrasta em qualquer bg do evento. */
.cal6-event-badge-meet {
  background: #fbd75b !important;
  color: #1d1d1d !important;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 4px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: 1px;
}
.cal6-event-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(255,255,255,0.16);
  color: #fff;
  padding: 1px 5px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: 1px;
}

/* ─── Calendário — criar/editar/excluir evento (14/09/2026) ─────────────
   Botão do header e do modal usam classe própria (.cal-btn), não .cal6-btn —
   aquela é escopada como ".cal6-toolbar .cal6-btn", fora dali não pega estilo. */
.cal-btn {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  padding: 6px 14px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500;
  cursor: pointer; font-family: inherit;
}
.cal-btn:hover { border-color: var(--accent); color: var(--accent); }
.cal-btn-primary { background: var(--accent); border-color: var(--accent); color: #041A24; font-weight: 700; }
.cal-btn-primary:hover { color: #041A24; filter: brightness(1.08); }
.cal-btn-danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, var(--border)); }
.cal-btn-danger:hover { border-color: var(--red); color: var(--red); }
.cal-btn:disabled { opacity: 0.6; cursor: not-allowed; }
/* Célula do dia agora é clicável (cria evento nesse dia) — cursor avisa. */
.cal6-cell { cursor: pointer; }
.cal6-cell a, .cal6-cell button.cal6-event { cursor: pointer; }
/* Evento do Google virou <button> (abre modal) em vez de <a target=_blank> — reset
   do chrome nativo de botão pra herdar exatamente o visual que .cal6-event já tinha. */
button.cal6-event {
  border: none; width: 100%; text-align: left; font: inherit; display: block;
}

.cal-event-modal { width: 480px; }
.cal-event-modal-body { padding: 18px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.cal-field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-muted); flex: 1; }
.cal-field span { font-weight: 600; color: var(--text); }
.cal-field span em { font-weight: 400; font-style: normal; color: var(--text-muted); }
.cal-field input[type="text"], .cal-field input[type="datetime-local"], .cal-field input[type="date"], .cal-field textarea {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 10px; font-size: 13.5px; color: var(--text); font-family: inherit;
}
.cal-field textarea { resize: vertical; min-height: 60px; }
.cal-field-row { display: flex; gap: 12px; align-items: flex-end; }
.cal-field-check { flex: 0 0 auto; flex-direction: row; align-items: center; gap: 6px; padding-bottom: 8px; }
.cal-field-check input { width: 15px; height: 15px; }
.cal-field-hint { font-size: 11.5px; color: var(--text-muted); margin: 0; }
.cal-field-hint a { color: var(--accent); }
.cal-field-error { font-size: 12.5px; color: var(--red); margin: 0; }
.cal-event-modal-actions {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-top: 1px solid var(--border); flex: 0 0 auto;
}
.cal-event-modal-actions-right { display: flex; gap: 8px; margin-left: auto; }

/* ─── Visão Geral — resumo de contexto vivo de todos os projetos ───────── */
.vg-wrap { padding: 24px 28px 60px; max-width: 1400px; margin: 0 auto; }
.vg-header { margin-bottom: 22px; }
.vg-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px;
}
.vg-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}
.vg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 14px;
}
.vg-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  padding: 14px 16px 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 120ms ease, transform 120ms ease;
}
.vg-card:hover {
  border-color: var(--accent, #00f6f5);
  transform: translateY(-1px);
  text-decoration: none;
}
.vg-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.vg-status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.vg-card-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}
.vg-card-status {
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  padding: 2px 7px;
  border-radius: 999px;
}
.vg-card-date {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  order: 9;
}
.vg-fresh {
  font-size: 10px;
  letter-spacing: 0.03em;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.vg-fresh::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.vg-fresh-green { color: #2ecc71; background: rgba(46,204,113,0.14); }
.vg-fresh-mid   { color: var(--text-muted); background: rgba(255,255,255,0.05); }
.vg-fresh-stale { color: #e67e22; background: rgba(230,126,34,0.14); }
.vg-alerts { margin-bottom: 8px; }
.vg-alert {
  font-size: 12px;
  color: #e67e22;
  background: rgba(230, 126, 34, 0.08);
  border-left: 2px solid #e67e22;
  padding: 4px 8px;
  border-radius: 3px;
  margin-bottom: 4px;
}
.vg-contexto {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  margin: 0 0 10px;
  opacity: 0.92;
}
.vg-contexto.vg-empty { color: var(--text-muted); font-style: italic; }
.vg-acoes {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.vg-acoes li {
  font-size: 12px;
  color: var(--text-muted);
  padding: 3px 0 3px 14px;
  position: relative;
  line-height: 1.4;
}
.vg-acoes li::before {
  content: '○';
  position: absolute;
  left: 0;
  top: 2px;
  color: var(--accent, #00f6f5);
  font-size: 10px;
}
.vg-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 14px;
}
@media (max-width: 720px) {
  .vg-wrap { padding: 16px 14px 40px; }
  .vg-grid { grid-template-columns: 1fr; }
  .vg-title { font-size: 22px; }
}

/* ─── Release Notes (banner + botão header + modal) ────────────────────── */

/* Banner sutil no topo */
.release-banner {
  background: linear-gradient(90deg, color-mix(in srgb,var(--accent) 4%,transparent) 0%, color-mix(in srgb,var(--magenta) 3%,transparent) 100%);
  border-bottom: 1px solid color-mix(in srgb,var(--accent) 12%,transparent);
  padding: 0;
  font-family: 'Inter', sans-serif;
}
.release-banner[hidden] { display: none !important; }
.release-banner-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 24px;
  max-width: 100%;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}
.release-banner-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px color-mix(in srgb,var(--accent) 50%,transparent);
  flex: 0 0 auto;
  animation: release-pulse 2.4s ease-in-out infinite;
}
@keyframes release-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.release-banner-label {
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.release-banner-sep { color: rgba(255, 255, 255, 0.2); }
.release-banner-date {
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
}
.release-banner-title {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
}
.release-banner-link {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
  font-family: inherit;
  letter-spacing: 0.02em;
  transition: opacity 0.15s;
}
.release-banner-link:hover { opacity: 0.7; }
.release-banner-close {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  margin-left: 4px;
}
.release-banner-close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
}

/* Botão no header */
.btn-release {
  position: relative;
}
.btn-release.has-unseen {
  color: var(--accent);
}
.release-badge-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--magenta);
  box-shadow: 0 0 6px color-mix(in srgb,var(--magenta) 60%,transparent);
  border: 2px solid var(--surface);
}
.release-badge-dot[hidden] { display: none !important; }

/* Modal */
.release-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 12, 19, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 110;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.release-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.release-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  width: min(640px, calc(100vw - 48px));
  max-height: calc(100vh - 80px);
  background: #0E1318;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  z-index: 111;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-family: 'Inter', sans-serif;
}
.release-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}
.release-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  flex: 0 0 auto;
}
.release-modal-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.release-modal-icon {
  color: var(--accent);
  display: inline-flex;
}
.release-modal-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: -0.01em;
}
.release-modal-close {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.release-modal-close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.85);
}
.release-modal-body {
  overflow-y: auto;
  padding: 22px 26px 28px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}
.release-modal-body::-webkit-scrollbar { width: 6px; }
.release-modal-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 3px; }

/* ===== Modal de Rotinas ===== */
.rotinas-modal { width: min(820px, calc(100vw - 40px)); }
/* Tela cheia */
.rotinas-modal.rotinas-fullscreen {
  width: calc(100vw - 28px);
  height: calc(100vh - 28px);
  max-width: none;
  max-height: none;
  top: 14px;
  left: 14px;
  transform: none;
}
.rotinas-modal.rotinas-fullscreen.open { transform: none; }
.rotinas-inner { max-width: 1080px; margin: 0 auto; }
/* Painel de antecipação */
.rotinas-antecipa {
  margin: 0 0 24px;
  padding: 16px 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, color-mix(in srgb,var(--accent) 6%,transparent), color-mix(in srgb,var(--magenta) 5%,transparent));
  border: 1px solid color-mix(in srgb,var(--accent) 18%,transparent);
}
.rotinas-antecipa-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  margin-bottom: 10px;
}
.rotinas-antecipa ul { margin: 0; padding-left: 18px; }
.rotinas-antecipa li { font-size: 12.5px; line-height: 1.65; color: rgba(255,255,255,0.7); margin-bottom: 4px; }
.rotinas-antecipa li strong { color: var(--accent, #00F6F5); font-weight: 600; }
.rotinas-antecipa-note { margin-top: 10px; font-size: 11.5px; color: rgba(255,255,255,0.5); }
.rotinas-antecipa-note em { color: rgba(255,255,255,0.4); }
/* Total mínimo por dia (tfoot) */
.rotinas-table tfoot .rt-totals td {
  background: color-mix(in srgb,var(--accent) 7%,transparent);
  border: 1px solid color-mix(in srgb,var(--accent) 22%,transparent);
  border-radius: 8px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent, #00F6F5);
  padding: 7px 4px;
  vertical-align: middle;
}
.rotinas-table tfoot .rt-totals td small {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}
.rt-fmt-story { color: #cfd6dd; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.16); }
.rotinas-legend-disc { width: 100%; font-size: 11px; color: rgba(255,255,255,0.42); margin-top: 5px; }
.rotinas-intro {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.62);
  margin: 0 0 20px;
}
.rotinas-pending {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #ffb84d;
  background: rgba(255, 109, 0, 0.12);
  border: 1px solid rgba(255, 109, 0, 0.25);
}
.rotinas-person { margin-bottom: 22px; }
.rotinas-person-head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 10px;
}
.rotinas-avatar {
  width: 30px; height: 30px;
  flex: 0 0 auto;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #06121a;
  background: var(--rp, #00F6F5);
}
.rotinas-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}
.rotinas-sub { font-size: 12px; color: rgba(255, 255, 255, 0.5); }
.rotinas-total {
  margin-left: auto;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent, #00F6F5);
  white-space: nowrap;
}
.rotinas-total small { font-size: 11px; font-weight: 500; color: rgba(255,255,255,0.45); margin-left: 2px; }
.rotinas-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 6px 0;
  table-layout: fixed;
}
.rotinas-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 600;
  padding: 4px 0;
  text-align: center;
}
.rotinas-table td {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 6px;
  text-align: center;
  vertical-align: top;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}
.rotinas-table td strong { color: var(--accent, #00F6F5); font-weight: 600; }
.rotinas-table td.rotinas-off { color: rgba(255, 255, 255, 0.35); font-style: italic; text-align: center; }
.rotinas-table td.rotinas-off small { display: block; font-size: 10px; margin-top: 2px; }
/* Células detalhadas (cliente · número · formato) */
.rotinas-table-detail td { text-align: left; padding: 8px 7px; }
.rt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin-bottom: 3px;
}
.rt-cli { font-size: 11.5px; color: rgba(255, 255, 255, 0.82); font-weight: 500; white-space: nowrap; }
.rt-cli-comport { color: #ff9d3c; }
.rotinas-comport-banner {
  margin: 2px 0 22px;
  padding: 13px 16px;
  border-radius: 9px;
  background: rgba(255, 109, 0, 0.05);
  border: 1px solid rgba(255, 109, 0, 0.16);
}
.rotinas-comport-banner-head { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 9px; }
.rotinas-comport-where { font-size: 12px; color: rgba(255,255,255,0.55); margin-left: 4px; }
.rotinas-orient-line { font-size: 12.5px; line-height: 1.6; color: rgba(255,255,255,0.72); }
.rotinas-orient-line strong { color: rgba(255,255,255,0.92); font-weight: 600; }
.rotinas-orient-line em { color: rgba(255,255,255,0.45); }
.rt-num { font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, 0.92); }
.rt-num strong { color: var(--accent, #00F6F5); }
.rt-grp {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.38);
  font-weight: 700;
  margin: 6px 0 3px;
}
.rt-grp:first-child { margin-top: 0; }
.rt-grp small { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--accent, #00F6F5); }
.rt-mix { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
/* Tags de formato */
.rt-fmt {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.5;
}
.rt-fmt.carrossel { color: #e9a9ff; background: color-mix(in srgb,var(--magenta) 14%,transparent); border: 1px solid color-mix(in srgb,var(--magenta) 30%,transparent); }
.rt-fmt.reels    { color: #7ff3f2; background: color-mix(in srgb,var(--accent) 10%,transparent);  border: 1px solid color-mix(in srgb,var(--accent) 28%,transparent); }
.rt-fmt.card     { color: #ffc480; background: rgba(255, 157, 60, 0.12); border: 1px solid rgba(255, 157, 60, 0.3); }
.rotinas-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 4px;
  margin: 0 0 18px;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.rt-leg-txt { font-size: 11px; color: rgba(255, 255, 255, 0.45); margin-right: 12px; }
/* Bloco Comport (distribuído Luan + Rick) */
.rotinas-comport {
  padding: 16px 18px;
  border-radius: 10px;
  background: rgba(255, 109, 0, 0.045);
  border: 1px solid rgba(255, 109, 0, 0.16);
}
.rotinas-comport .rotinas-person-head { margin-bottom: 12px; }
.rotinas-avatar-comport { color: #fff !important; border: 1px solid rgba(255,255,255,0.15); }
.rotinas-name-tag {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.06);
  vertical-align: middle;
}
.rotinas-total-pending {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #ffb84d !important;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(255, 109, 0, 0.12);
  border: 1px solid rgba(255, 109, 0, 0.25);
}
.rotinas-perfis { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.rt-perfil {
  padding: 5px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #ff9d3c;
  background: rgba(255, 157, 60, 0.1);
  border: 1px solid rgba(255, 157, 60, 0.28);
}
.rotinas-orient {
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 10px;
}
.rotinas-orient-title { font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,0.88); margin-bottom: 7px; }
.rotinas-orient ol { margin: 0; padding-left: 18px; }
.rotinas-orient li { font-size: 12px; line-height: 1.6; color: rgba(255,255,255,0.72); margin-bottom: 4px; }
.rotinas-orient li strong { color: rgba(255,255,255,0.92); font-weight: 600; }
.rotinas-note em { color: rgba(255,255,255,0.42); }
.rotinas-note {
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 8px;
}
.rotinas-note strong { color: rgba(255, 255, 255, 0.75); font-weight: 600; }
.rotinas-priority {
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 8px;
  background: color-mix(in srgb,var(--accent) 5%,transparent);
  border: 1px solid color-mix(in srgb,var(--accent) 14%,transparent);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.78);
}
.rotinas-priority strong { color: rgba(255, 255, 255, 0.92); }
@media (max-width: 640px) {
  .rotinas-table { border-spacing: 3px 0; }
  .rotinas-table td { font-size: 11px; padding: 7px 3px; }
}

.release-entry {
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.release-entry:first-child { padding-top: 4px; }
.release-entry:last-child { border-bottom: none; padding-bottom: 0; }
.release-entry-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 14px;
}
.release-entry-date {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  font-weight: 500;
  padding: 3px 9px;
  background: color-mix(in srgb,var(--accent) 8%,transparent);
  border-radius: 4px;
  flex: 0 0 auto;
}
.release-entry-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: -0.01em;
}
.release-entry-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.release-item {
  padding-left: 16px;
  position: relative;
}
.release-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
}
.release-item-feature {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 4px;
  letter-spacing: -0.005em;
}
.release-item-desc {
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.55);
}

/* ─── Meu Dia — sidebar fixa à direita (v2: refined) ──────────────────── */
.myday {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--myday-w);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 50;
  font-family: 'Inter', sans-serif;
}
.myday[hidden],
.myday-rail[hidden] { display: none !important; }
body.has-myday #app { padding-right: calc(var(--myday-w) + var(--myday-gutter)); }

/* ─── Header ─── */
.myday-head {
  padding: 22px 22px 16px;
  flex: 0 0 auto;
  border-bottom: 1px solid color-mix(in srgb, var(--text) 4%, transparent);
}
.myday-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.myday-title-block { display: flex; flex-direction: column; gap: 1px; }
.myday-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.myday-date {
  font-size: 10.5px;
  color: color-mix(in srgb, var(--text) 35%, transparent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}
.myday-icon-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: color-mix(in srgb, var(--text) 35%, transparent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.myday-icon-btn:hover {
  background: color-mix(in srgb, var(--text) 4%, transparent);
  color: color-mix(in srgb, var(--text) 70%, transparent);
}

.myday-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.myday-progress-label {
  font-size: 10.5px;
  color: color-mix(in srgb, var(--text) 50%, transparent);
  font-weight: 500;
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.myday-progress-bar {
  flex: 1;
  height: 2px;
  background: color-mix(in srgb, var(--text) 6%, transparent);
  border-radius: 1px;
  overflow: hidden;
}
.myday-progress-fill {
  height: 100%;
  width: 0%;
  background: color-mix(in srgb,var(--accent) 50%,transparent);
  transition: width 0.4s ease;
}

/* Menu "⋯": mesmo padrão visual/interativo do .notif-popover (app.js já faz
   toggle no click do botão + fecha em click fora do mesmo jeito). */
.myday-menu-wrap { position: relative; flex: 0 0 auto; }
.myday-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,0,0,0.22);
  padding: 6px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.myday-menu[hidden] { display: none; }
.myday-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  padding: 8px 9px;
  transition: background 0.12s, color 0.12s;
}
.myday-menu-item:hover { background: color-mix(in srgb, var(--text) 5%, transparent); color: var(--text); }

/* ─── Body (lista de tarefas) ─── */
.myday-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 16px;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--text) 8%, transparent) transparent;
}
.myday-body::-webkit-scrollbar { width: 4px; }
.myday-body::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text) 8%, transparent); border-radius: 2px; }
.myday-body::-webkit-scrollbar-track { background: transparent; }

/* ─── Agenda (Google Calendar — dia/semana) ─── */
.myday-agenda {
  flex: 0 0 auto;
  padding: 14px 22px 4px;
  border-bottom: 1px solid color-mix(in srgb, var(--text) 4%, transparent);
}
.myday-agenda-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.myday-agenda-title {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 38%, transparent);
}
.myday-agenda-count {
  margin-left: 6px;
  font-weight: 500;
  color: color-mix(in srgb, var(--text) 30%, transparent);
}
.myday-agenda-count:empty { display: none; }
.myday-agenda-toggle {
  display: flex;
  gap: 2px;
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border-radius: 7px;
  padding: 2px;
}
.myday-agenda-toggle-btn {
  border: none;
  background: transparent;
  font: inherit;
  font-size: 10.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 5px;
  color: color-mix(in srgb, var(--text) 45%, transparent);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.myday-agenda-toggle-btn:hover { color: var(--text); }
.myday-agenda-toggle-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--text) 10%, transparent);
}
.myday-agenda-body { padding-bottom: 10px; }
.myday-agenda-status {
  padding: 14px 4px;
  font-size: 11.5px;
  color: color-mix(in srgb, var(--text) 35%, transparent);
}
.myday-agenda-status-error { color: color-mix(in srgb, var(--red) 80%, var(--text)); }
.myday-agenda-retry {
  border: none;
  background: none;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.myday-agenda-list { display: flex; flex-direction: column; }
.myday-agenda-event-wrap:not(:last-child) { border-bottom: 1px solid color-mix(in srgb, var(--text) 4%, transparent); }
.myday-agenda-event {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: transparent;
  font: inherit;
  text-align: left;
  padding: 7px 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.12s ease;
}
.myday-agenda-event:hover { background-color: color-mix(in srgb, var(--text) 3%, transparent); }
.myday-agenda-event-time {
  flex: 0 0 52px;
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--text) 45%, transparent);
}
.myday-agenda-event-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}
.myday-agenda-event-title {
  font-size: 12.5px;
  color: color-mix(in srgb, var(--text) 85%, transparent);
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.myday-agenda-tag {
  flex: 0 0 auto;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tag-color);
  padding: 1px 6px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--tag-color) 16%, transparent);
}
.myday-agenda-detail {
  padding: 2px 4px 10px 62px;
  font-size: 11.5px;
  color: color-mix(in srgb, var(--text) 55%, transparent);
  line-height: 1.6;
}
.myday-agenda-detail-row { word-wrap: break-word; }
.myday-agenda-detail-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}
.myday-agenda-detail-link {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.myday-agenda-detail-link:hover { text-decoration: underline; }

.myday-agenda-today-tag {
  background: var(--accent); color: var(--ink); font-size: 8.5px; font-weight: 700;
  letter-spacing: 0.04em; border-radius: 20px; padding: 1px 6px; margin-left: 2px;
}
.myday-agenda-day-empty {
  padding: 4px 2px;
  font-size: 10.5px;
  color: color-mix(in srgb, var(--text) 25%, transparent);
}

/* Semana em colunas lado a lado (estilo Google Agenda), não empilhadas — dá pra
   comparar a semana de relance. Estreita além do que cabe → rola no eixo X (mesma
   ideia do Google Agenda mobile) em vez de espremer até ilegível. */
.myday-agenda-columns {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 2px; scroll-snap-type: x proximity;
}
.myday-agenda-col {
  flex: 1 1 140px; min-width: 140px; scroll-snap-align: start;
  border: 1px solid color-mix(in srgb, var(--text) 6%, transparent); border-radius: 8px; padding: 8px;
}
.myday-agenda-col.is-today {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}
.myday-agenda-col-head {
  font-size: 10px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 45%, transparent);
  padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid color-mix(in srgb, var(--text) 6%, transparent);
}
.myday-agenda-col.is-today .myday-agenda-col-head { color: var(--accent); }
.myday-agenda-col-body { display: flex; flex-direction: column; gap: 4px; }
/* Evento dentro da coluna estreita: tempo empilha em cima do título (não cabe lado a
   lado como na lista de Dia/Amanhã) — mesmo HTML de _renderEvent, só o layout muda. */
.myday-agenda-col-body .myday-agenda-event {
  flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px;
  background: color-mix(in srgb, var(--text) 4%, transparent);
}
.myday-agenda-col-body .myday-agenda-event:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.myday-agenda-col-body .myday-agenda-event-wrap:not(:last-child) { border-bottom: none; }
.myday-agenda-col-body .myday-agenda-event-time { flex: none; font-size: 10px; }
.myday-agenda-col-body .myday-agenda-event-main { gap: 4px; }
.myday-agenda-col-body .myday-agenda-event-title { white-space: normal; font-size: 11.5px; line-height: 1.3; }
.myday-agenda-col-body .myday-agenda-tag { font-size: 8.5px; padding: 0 5px; }
.myday-agenda-col-body .myday-agenda-detail { padding: 4px 2px 8px; }

.myday-agenda-week-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 4px 8px; margin-bottom: 4px; border-bottom: 1px solid color-mix(in srgb, var(--text) 6%, transparent);
}
.myday-agenda-week-label { font-size: 10.5px; font-weight: 600; color: color-mix(in srgb, var(--text) 45%, transparent); }
.myday-agenda-week-toggle {
  border: none; background: none; font: inherit; font-size: 11px; font-weight: 600;
  color: var(--accent); cursor: pointer; padding: 2px 0;
}
.myday-agenda-week-toggle:hover { text-decoration: underline; }

.myday-empty {
  padding: 40px 24px;
  text-align: center;
  color: color-mix(in srgb, var(--text) 30%, transparent);
  font-size: 12px;
  line-height: 1.6;
  font-weight: 400;
}

.myday-group { margin-bottom: 16px; }
.myday-group:last-child { margin-bottom: 0; }
.myday-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 8px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 38%, transparent);
}
.myday-group-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--text) 20%, transparent);
  flex: 0 0 auto;
}
.myday-group-header.is-overdue  .myday-group-dot { background: var(--red); box-shadow: 0 0 8px color-mix(in srgb, var(--red) 40%, transparent); }
.myday-group-header.is-progress .myday-group-dot { background: var(--yellow); box-shadow: 0 0 8px color-mix(in srgb, var(--yellow) 45%, transparent); }
.myday-group-header.is-blocked  .myday-group-dot { background: var(--text-muted); box-shadow: 0 0 8px color-mix(in srgb, var(--text-muted) 40%, transparent); }
.myday-group-header.is-today    .myday-group-dot { background: var(--accent); box-shadow: 0 0 8px color-mix(in srgb,var(--accent) 40%,transparent); }
.myday-group-empty {
  padding: 6px 10px 10px;
  font-size: 11.5px;
  color: color-mix(in srgb, var(--text) 30%, transparent);
}
.myday-group-count {
  margin-left: auto;
  font-weight: 500;
  color: color-mix(in srgb, var(--text) 30%, transparent);
  font-size: 10px;
  letter-spacing: 0;
}

/* ─── Grid de widgets (Meu Dia) ───────────────────────────────────────────
   Container query, não media query: a aside de Notas e a sidebar de cliente
   tiram largura do #app sem mudar a viewport em si, então media query mentiria
   sobre o espaço real disponível pro grid. */
.myday-body { container-type: inline-size; container-name: mdw; }
.mdw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
@container mdw (min-width: 600px) {
  .mdw-card--largo { grid-column: span 2; }
}
.mdw-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.mdw-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.mdw-title { font-size: 13px; font-weight: 700; }
.mdw-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface-2);
  border-radius: 20px;
  padding: 1px 8px;
}
.mdw-count.is-overdue { color: var(--red); background: var(--red-bg); }
.mdw-card-body { padding: 4px 6px 10px; flex: 1; min-width: 0; }
.mdw-empty {
  padding: 18px 10px;
  text-align: center;
  color: color-mix(in srgb, var(--text) 30%, transparent);
  font-size: 12px;
}
/* Agenda embutida no widget: #myDayAgenda é o mesmo nó de sempre (movido, não
   recriado — ver myday-widgets-catalogo.js), só perde o respiro pensado pra
   quando vivia solto no topo da página. */
.mdw-card-body .myday-agenda { padding: 4px 4px 0; border-bottom: none; }
/* Notas fixadas */
.mdw-note { padding: 8px 8px; border-radius: var(--radius-sm); cursor: pointer; }
.mdw-note:hover { background: var(--surface-2); }
.mdw-note-title { font-size: 12.5px; font-weight: 600; }
.mdw-note-preview {
  font-size: 11.5px;
  color: color-mix(in srgb, var(--text) 40%, transparent);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Rotina (myday-rotina.js) — mockups _mockups/rotina.html e rotina-v2.html ───
   Documento = linhas do editor das Notas (.notas-line) + linha de horário (.rot-bl). */

/* Faixa compacta (Nível 2, Fase B, 02/10/2026): único conteúdo visível por
   padrão — ".rot-detail" (abas de dia, Minha/Geral, editor) só aparece ao
   clicar. [hidden] explícito pra não depender só da UA stylesheet (pegadinha
   recorrente no painel: outra regra de display pode vencer o [hidden] sozinha
   se não for escopada). */
.rot-detail[hidden] { display: none; }
.rot-strip {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 10px; margin: 2px 2px 4px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); font: inherit; font-size: 12.5px; color: var(--text); text-align: left; cursor: pointer;
}
.rot-strip:hover { border-color: var(--border-hover); }
.rot-strip-txt { color: var(--text-muted); }
.rot-strip-now { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--accent-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rot-strip-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green, var(--accent-ink)); flex: none; }
.rot-strip-next { color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rot-strip-chev { width: 13px; height: 13px; margin-left: auto; flex: none; color: var(--text-muted); transition: transform .15s; }
.rot-strip[aria-expanded="true"] .rot-strip-chev { transform: rotate(180deg); }
.rot-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 2px 4px 6px; }
.rot-days { display: flex; gap: 2px; flex: 1; min-width: 180px; }
.rot-days button { flex: 1; border: 0; background: none; font: inherit; font-size: 11.5px; font-weight: 600;
  color: var(--text-muted); padding: 5px 0; border-radius: var(--radius-sm); cursor: pointer; position: relative; }
.rot-days button:hover { color: var(--text); }
.rot-days button.on { background: var(--surface-2); color: var(--text); }
.rot-days button.hoje::after { content: ''; position: absolute; left: 50%; bottom: 1px; width: 4px; height: 4px;
  margin-left: -2px; border-radius: 50%; background: var(--accent-ink); }
.rot-seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px; }
.rot-seg button { border: 0; background: none; font: inherit; color: var(--text-muted); font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px; cursor: pointer; }
.rot-seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.rot-hint { margin: 0 4px 6px; padding: 7px 9px; font-size: 11.5px; line-height: 1.4; border-radius: var(--radius-sm);
  background: var(--yellow-bg); color: var(--yellow); }
.rot-hint[hidden] { display: none; }
/* Fase D (01/10/2026): a barra de formatação fica escondida até uma linha entrar em
   edição (classe .rot-editing no root do widget, via focusin/focusout no módulo).
   Tira 10 botões da primeira tela de quem só olha a rotina e nunca edita. */
.rot-tools { display: none; align-items: center; gap: 2px; flex-wrap: wrap; padding: 0 4px 6px; margin-bottom: 4px;
  border-bottom: 1px solid var(--border); }
.rot-editing .rot-tools { display: flex; }
.rot-tools button { min-width: 28px; height: 26px; border: 0; background: none; border-radius: var(--radius-xs); cursor: pointer;
  font: inherit; font-size: 12.5px; color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.rot-tools button:hover { background: var(--surface-2); color: var(--text); }
.rot-sep { width: 1px; height: 16px; background: var(--border); margin: 0 3px; }
.rot-ico-check { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid currentColor; }
.rot-doc { padding: 0 4px; min-height: 40px; }
.rot-doc[data-empty]::before { content: attr(data-empty); display: block; padding: 14px 0; text-align: center;
  color: color-mix(in srgb, var(--text) 30%, transparent); font-size: 12px; }
.rot-doc .notas-line.is-locked:not(.rot-bl) .notas-line-text { cursor: default; }
/* linha de horário */
.rot-doc .notas-line.rot-bl { display: grid; grid-template-columns: 16px 44px 1fr auto; align-items: center; gap: 6px;
  margin: 10px -4px 2px; padding: 3px 4px; cursor: text; user-select: none; }
.rot-doc .notas-line.rot-bl:first-child { margin-top: 2px; }
.rot-lk { width: 16px; height: 18px; display: grid; place-items: center; color: var(--text-muted);
  border: 0; background: none; padding: 0; border-radius: 4px; }
.rot-lk svg { width: 12px; height: 12px; }
.rot-lk.off { opacity: .4; }
button.rot-lk { cursor: pointer; }
button.rot-lk:hover { background: var(--surface-3); color: var(--text); opacity: 1; }
.rot-hr { font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--text-muted); font-weight: 700; white-space: nowrap; }
.rot-t { min-width: 0; font-size: 14.5px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.rot-bl [contenteditable] { outline: none; cursor: text; border-radius: 3px; user-select: text; }
.rot-bl [contenteditable]:focus { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-ink) 30%, transparent); }
.rot-x { opacity: 0; border: 0; background: none; color: var(--text-muted); cursor: pointer; font-size: 15px;
  line-height: 1; padding: 2px 5px; border-radius: 4px; }
.rot-bl:hover .rot-x, .rot-x:focus-visible { opacity: 1; }
.rot-x:hover { color: var(--red); background: var(--surface-3); }
.rot-bl.agora { background: color-mix(in srgb, var(--accent-ink) 10%, transparent); box-shadow: inset 3px 0 0 var(--accent-ink); }
.rot-bl.agora .rot-hr { color: var(--accent-ink); }
.rot-agora { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); margin-left: 6px; }
.rot-bl.passou .rot-t, .rot-bl.passou .rot-hr { opacity: .55; }
.rot-meu { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--lilas-ink);
  border: 1px solid color-mix(in srgb, var(--lilas) 45%, transparent); border-radius: 999px; padding: 0 5px; margin-left: 6px; vertical-align: 2px; }
.rot-tarefas { margin-left: 8px; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--accent-ink);
  background: none; border: 0; padding: 0; cursor: pointer; vertical-align: 1px; }
.rot-tarefas:hover { text-decoration: underline; }
.rot-add { display: block; width: 100%; margin: 8px 0 0; padding: 7px 8px; text-align: left; font: inherit; font-size: 12.5px;
  border: 1px dashed var(--border); border-radius: var(--radius-sm); background: none; color: var(--text-muted); cursor: pointer; }
.rot-add:hover { border-color: var(--border-hover); color: var(--text); }
.rot-foot { display: flex; justify-content: space-between; gap: 8px; padding: 8px 4px 0; font-size: 11px; color: var(--text-muted); }
.rot-foot button { border: 0; background: none; font: inherit; color: var(--text-muted); cursor: pointer; padding: 0; }
.rot-foot button:hover { color: var(--text); text-decoration: underline; }
/* Toque: sem hover — × sempre visível, alvos maiores. */
@media (pointer: coarse) {
  .rot-x { opacity: .7; padding: 6px 8px; }
  .rot-days button { padding: 8px 0; }
  .rot-tools button { min-width: 34px; height: 32px; }
}

/* ─── Personalizar (Etapa 2): botão no cabeçalho, painel de catálogo, drag/setas/× no card ───
   Nível 2, Fase B (02/10/2026): era pílula com texto "✏️ Personalizar", 1 das 5
   perguntas simultâneas que a auditoria achou na 1ª tela — virou ícone discreto,
   mesma engrenagem usada em Configurações no resto do painel. */
.myday-personalizar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
  flex: none;
}
.myday-personalizar-btn:hover { border-color: var(--border); color: var(--text); background: color-mix(in srgb, var(--text) 4%, transparent); }
.myday-personalizar-btn.is-active { background: var(--accent); border-color: var(--accent); color: var(--ink); }

.mdw-panel { margin: 0 0 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-1); }
.mdw-panel-inner { padding: 14px 16px; }
.mdw-panel-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.mdw-panel-title { font-size: 12.5px; font-weight: 700; }
.mdw-link-btn {
  margin-left: auto; background: none; border: none; color: var(--text-secondary, var(--text-muted));
  text-decoration: underline; font-size: 12px; cursor: pointer; padding: 0;
}
.mdw-link-btn:hover { color: var(--accent-ink); }
.mdw-catalog { display: flex; flex-wrap: wrap; gap: 8px; }
.mdw-chipbtn {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600;
  padding: 6px 12px 6px 8px; border-radius: 20px; cursor: pointer; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); transition: border-color .12s, background .12s;
}
.mdw-chipbtn .ic {
  width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1; flex: none;
}
.mdw-chipbtn.add { border-style: dashed; color: var(--text-muted); }
.mdw-chipbtn.add .ic { background: var(--surface-2); color: var(--text-muted); }
.mdw-chipbtn.add:hover { border-color: var(--accent); color: var(--accent-ink); }
.mdw-chipbtn.add:hover .ic { background: var(--accent); color: var(--ink); }
.mdw-chipbtn.remove { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.mdw-chipbtn.remove .ic { background: var(--accent); color: var(--ink); }
.mdw-chipbtn.remove:hover { border-color: var(--red); }
.mdw-chipbtn.remove:hover .ic { background: var(--red); color: #fff; }
.mdw-chipbtn.locked { cursor: default; opacity: .55; }
.mdw-chipbtn.locked .ic { background: var(--surface-2); }

.mdw-drag { display: none; cursor: grab; color: var(--text-muted); font-size: 14px; line-height: 1; user-select: none; }
.mdw-grid.personalizing .mdw-drag { display: block; }

/* Flutuante estilo iOS: card levanta com sombra e balança de leve, em loop,
   com fase alternada pra não balançarem todos juntos. Pausa durante o drag
   real (drag-ghost) pra não brigar com o feedback nativo do navegador. */
.mdw-card { transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.mdw-grid.personalizing .mdw-card {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: 0 6px 16px color-mix(in srgb, var(--ink, #000) 16%, transparent);
  transform: translateY(-2px);
  cursor: grab;
  animation: mdw-jiggle .28s ease-in-out infinite;
}
.mdw-grid.personalizing .mdw-card:nth-child(even) { animation-delay: -.14s; }
.mdw-grid.personalizing .mdw-card.drag-ghost { animation: none; box-shadow: none; }
.mdw-card.drag-ghost { opacity: .35; }
@keyframes mdw-jiggle {
  0%, 100% { rotate: -.3deg; }
  50% { rotate: .3deg; }
}
@media (prefers-reduced-motion: reduce) {
  .mdw-grid.personalizing .mdw-card { animation: none; }
}

.mdw-locked-tag { font-size: 10.5px; color: var(--text-muted); flex: none; }
.mdw-order { display: none; gap: 2px; flex: none; }
.mdw-grid.personalizing .mdw-order { display: flex; }
.mdw-order button {
  width: 22px; height: 22px; border-radius: 4px; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-muted); cursor: pointer; font-size: 10px; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.mdw-order button:hover { border-color: var(--accent); color: var(--accent-ink); }
.mdw-order button.mdw-del:hover { border-color: var(--red); color: var(--red); }

.mdw-select {
  background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius-sm);
  padding: 6px 9px; font-size: 12px; font-family: inherit;
}

/* ─── Widgets Etapa 3: meus clientes, notificações ─── */
.mdw-clients-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 8px; padding: 4px; }
.mdw-client-tile {
  background: var(--surface-2); border-radius: var(--radius-sm); padding: 9px 10px; display: flex;
  flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; min-width: 0;
}
.mdw-client-tile-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mdw-client-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.mdw-client-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mdw-client-badge { font-size: 10.5px; font-weight: 700; color: var(--text-muted); }
.mdw-client-badge.is-overdue { color: var(--red); }

.mdw-notif { padding: 7px 8px; font-size: 12px; display: flex; gap: 8px; border-radius: var(--radius-sm); }
.mdw-notif:hover { background: var(--surface-2); }
.mdw-notif-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-top: 5px; flex: none; }

/* Financeiro */
.mdw-fin { padding: 2px 8px 4px; cursor: pointer; }
.mdw-fin-saldo { font-size: 20px; font-weight: 700; letter-spacing: -.2px; }
.mdw-fin-saldo-label { font-size: 10.5px; color: var(--text-muted); margin-bottom: 2px; }
.mdw-fin-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; padding: 5px 0; border-top: 1px solid var(--border);
}
.mdw-fin-row:first-of-type { border-top: none; margin-top: 8px; }
.mdw-fin-row .lbl { color: var(--text-muted); }
.mdw-fin-row .val { font-weight: 600; }
.mdw-fin-row .val.is-in { color: var(--green); }
.mdw-fin-row .val.is-out { color: var(--red); }
.mdw-fin-vencido { color: var(--red); font-weight: 600; }
.mdw-fin-acao {
  margin-top: 8px; padding: 7px 9px; border-radius: var(--radius-sm); background: var(--surface-2);
  font-size: 11.5px; line-height: 1.35;
}
.mdw-fin-neg { cursor: pointer; }
.mdw-fin-neg:hover .val { color: var(--accent-ink); }

/* Negociações (pipeline do Financeiro) */
.mdw-neg-row { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: var(--radius-sm); cursor: pointer; }
.mdw-neg-row:hover { background: var(--surface-2); }
.mdw-neg-main { flex: 1; min-width: 0; }
.mdw-neg-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.mdw-neg-nome { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mdw-neg-valor { flex: none; font-weight: 600; color: var(--text-muted); }
.mdw-neg-acao { font-size: 11.5px; color: color-mix(in srgb, var(--text) 55%, transparent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.mdw-neg-acao.is-empty { font-style: italic; color: var(--text-muted); }
.mdw-neg-dias { flex: none; font-size: 10.5px; font-weight: 700; color: var(--text-muted); background: var(--surface-2); border-radius: 20px; padding: 1px 7px; }
.mdw-neg-dias.is-parada { color: var(--red); background: var(--red-bg); }
.mdw-neg-check {
  flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-muted); cursor: pointer; font-size: 12px; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.mdw-neg-check:hover { border-color: var(--green); color: var(--green); }
.mdw-neg-check:disabled { opacity: .5; cursor: default; }
.mdw-neg-all { padding: 8px 8px 2px; font-size: 11.5px; color: var(--text-muted); cursor: pointer; text-align: right; }
.mdw-neg-all:hover { color: var(--accent-ink); }

/* ─── Grupo Bloqueadas: recolhível (tag + dropdown) ─── */
.myday-group--blocked { margin-top: 14px; }
.myday-blocked-toggle {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: color 0.15s ease, opacity 0.15s ease;
}
.myday-blocked-toggle .myday-group-count { margin-left: auto; }
.myday-blocked-toggle:hover { color: color-mix(in srgb, var(--text) 60%, transparent); }
.myday-blocked-chevron {
  flex: 0 0 auto;
  margin-left: 8px;
  opacity: 0.5;
  transition: transform 0.18s ease;
}
.myday-group--blocked.is-collapsed .myday-blocked-chevron { transform: rotate(-90deg); }
.myday-blocked-body {
  overflow: hidden;
  transition: max-height 0.22s ease, opacity 0.18s ease;
  max-height: 1500px;
  opacity: 1;
}
.myday-group--blocked.is-collapsed .myday-blocked-body {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

/* ─── Item de tarefa ─── */
.myday-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: start;
  gap: 12px;
  padding: 10px 10px;
  border-radius: 6px;
  cursor: pointer;
  /* wash da cor do status (mesma estrutura do card aberto); 'pendente' não seta a var = neutro */
  background-color: var(--md-status-wash, transparent);
  transition: background-color 0.12s ease, box-shadow 0.12s ease;
  position: relative;
}
/* hover via overlay branco (inset) pra somar ao wash, sem substituí-lo */
.myday-item:hover {
  box-shadow: inset 0 0 0 999px color-mix(in srgb, var(--text) 3%, transparent);
}
.myday-item.is-done .myday-item-title {
  text-decoration: line-through;
  color: color-mix(in srgb, var(--text) 25%, transparent);
}
.myday-item.is-done .myday-item-meta { opacity: 0.4; }

/* Indicador lateral discreto (substitui borda grossa) */
.myday-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 2px;
  border-radius: 1px;
  background: transparent;
  transition: background 0.15s;
}
.myday-item.is-overdue::before { background: var(--red); }
.myday-item.is-p1::before      { background: var(--magenta); }
.myday-item.is-blocked::before { background: var(--yellow); }
/* Atrasada porque está travada: barra listrada vermelho/laranja pra deixar claro que o atraso veio do bloqueio */
.myday-item.is-overdue-blocked::before {
  background: repeating-linear-gradient(
    135deg,
    var(--red) 0 4px,
    var(--yellow) 4px 8px
  );
  width: 3px;
}

/* Checkbox custom — minimalista circular */
.myday-check {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--text) 20%, transparent);
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
  flex: 0 0 auto;
}
.myday-check:hover {
  border-color: color-mix(in srgb,var(--accent) 60%,transparent);
}
.myday-check:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.myday-check:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid var(--surface);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.myday-check:disabled { opacity: 0.4; cursor: wait; }

/* Confirmação visual ao concluir — verde rápido antes do card mudar de categoria */
.myday-item.is-just-completed {
  background: color-mix(in srgb, var(--green) 7%, transparent);
  transition: background 0.18s ease;
}
.myday-item.is-just-completed .myday-check {
  background: var(--green) !important;
  border-color: var(--green) !important;
  opacity: 1 !important;
  animation: mydayCheckPulse 0.42s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 55%, transparent);
}
.myday-item.is-just-completed .myday-check::after {
  border-color: var(--surface) !important;
}
.myday-item.is-just-completed .myday-item-title {
  text-decoration: line-through;
  color: color-mix(in srgb, var(--green) 85%, transparent);
  transition: color 0.18s, text-decoration 0.18s;
}
@keyframes mydayCheckPulse {
  0%   { transform: scale(1);    box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 55%, transparent); }
  50%  { transform: scale(1.18); box-shadow: 0 0 0 8px color-mix(in srgb, var(--green) 0%, transparent); }
  100% { transform: scale(1);    box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 0%, transparent); }
}

.myday-item-main { min-width: 0; }
.myday-item-title {
  font-size: 12.5px;
  line-height: 1.45;
  color: color-mix(in srgb, var(--text) 85%, transparent);
  font-weight: 400;
  word-wrap: break-word;
  letter-spacing: -0.005em;
}
.myday-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  flex-wrap: wrap;
}
.myday-item-chip {
  font-size: 10px;
  padding: 1px 0;
  background: transparent;
  color: color-mix(in srgb, var(--text) 40%, transparent);
  font-weight: 500;
  border: none;
  letter-spacing: 0.01em;
}
.myday-item-chip.client-chip {
  color: var(--chip-color, color-mix(in srgb, var(--text) 50%, transparent));
  position: relative;
  padding-left: 9px;
}
.myday-item-chip.client-chip::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--chip-color, currentColor);
  transform: translateY(-50%);
}
.myday-item-deadline {
  font-size: 10px;
  font-weight: 500;
  color: color-mix(in srgb, var(--text) 35%, transparent);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.myday-item-deadline.overdue { color: var(--red); }
.myday-item-deadline.today { color: var(--accent); }
.myday-item-deadline.overdue-blocked {
  color: var(--yellow);
  font-weight: 600;
}

/* Chip "Travada" — laranja sólido, peso pra destacar entre as demais meta */
.myday-item-chip.blocked-chip {
  color: var(--yellow);
  font-weight: 600;
  padding-left: 9px;
  position: relative;
  text-transform: uppercase;
  font-size: 9.5px;
  letter-spacing: 0.06em;
}
.myday-item-chip.blocked-chip::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--yellow);
  transform: translateY(-50%);
  box-shadow: 0 0 6px color-mix(in srgb, var(--yellow) 55%, transparent);
}

/* Status chip — andamento / em aprovação. Padrão visual do blocked-chip,
   cores do STATUS_POPOVER_OPTS em app.js. Pendente é default e fica omitido. */
.myday-item-chip.status-chip {
  padding-left: 9px;
  position: relative;
  text-transform: uppercase;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.myday-item-chip.status-chip::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  transform: translateY(-50%);
}
.myday-item-chip.status-andamento { color: var(--blue); }
.myday-item-chip.status-andamento::before { background: var(--blue); }
.myday-item-chip.status-emaprovacao { color: var(--yellow); }
.myday-item-chip.status-emaprovacao::before { background: var(--yellow); }

/* P1 — dot pequeno antes do título em vez de emoji */
.myday-item.is-p1 .myday-item-title::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--magenta);
  margin-right: 7px;
  vertical-align: 1px;
  box-shadow: 0 0 6px color-mix(in srgb,var(--magenta) 40%,transparent);
}

/* ─── Notas do Meu Dia (múltiplas notas, estilo Apple Notes) ───────────────
   Docked na sidebar (300px): 1 painel por vez (lista OU editor), navegação por
   toque/clique — largura não comporta as 2 colunas lado a lado. Destacada da
   sidebar (.notas-panel--floating, até 720px): lista + editor lado a lado. */
.notas-panel {
  /* Único filho do aside desde 14/09/2026 (Meu Dia saiu pra virar página própria)
     — preenche a altura toda, não divide mais espaço com lista de tarefas. */
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
/* Cabeçalho sempre visível desde 14/09/2026: com Meu Dia fora do aside, é o
   único lugar pra "recolher" o painel e pra "destacar"/"encaixar" as notas —
   antes ficava escondido docked porque esses gatilhos moravam no menu "⋯" das
   tarefas (que não existe mais aqui). Destacada, ganha cursor de arrastar. */
.notas-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 14px 10px;
  flex: 0 0 auto;
}
.notas-panel--floating .notas-head {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.notas-head-title { font-size: 12.5px; font-weight: 700; color: var(--text); }
/* Título do cabeçalho é o seletor de pasta ("Notas ▾" / nome da pasta) */
.notas-folder-btn {
  display: flex; align-items: center; gap: 5px; min-width: 0; max-width: 60%;
  border: none; background: transparent; padding: 2px 6px 2px 4px; margin-left: -4px; border-radius: 6px;
  cursor: pointer; color: var(--text); font: inherit;
}
.notas-folder-btn:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.notas-folder-btn.is-open { background: color-mix(in srgb, var(--text) 7%, transparent); }
.notas-folder-btn svg { width: 11px; height: 11px; flex: 0 0 auto; color: color-mix(in srgb, var(--text) 45%, transparent); }
.notas-folder-btn .notas-head-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notas-folder-dot, .notas-pop-item .dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; display: inline-block; }
.notas-folder-dot[hidden] { display: none; }
.notas-pop--folder { top: 40px; left: 10px; right: auto; min-width: 220px; }
.notas-pop-empty { padding: 8px; font-size: 12px; color: color-mix(in srgb, var(--text) 50%, transparent); }
.notas-pop-label { padding: 6px 8px 2px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: color-mix(in srgb, var(--text) 45%, transparent); }
.notas-panel.is-trash .notas-folder-btn { pointer-events: none; }
.notas-panel.is-trash .notas-folder-btn svg { display: none; }
.notas-count-badge {
  font-size: 10.5px; color: color-mix(in srgb, var(--text) 38%, transparent); flex: 1 1 auto;
  margin-left: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.notas-count-badge:empty { margin-left: 0; }
.notas-icon-btn {
  width: 24px; height: 24px; border-radius: 6px; border: none; background: transparent;
  color: color-mix(in srgb, var(--text) 45%, transparent); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 12px; padding: 0;
  transition: background 0.12s, color 0.12s;
}
.notas-icon-btn:hover { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); }
.notas-icon-btn.is-active { color: var(--accent); background: color-mix(in srgb,var(--accent) 12%,transparent); }
/* Mesma pegadinha: sem isto, #notasDockBtn ficava visível mesmo hidden
   (só #notasExpandMenuItem/#notasDockBtn alternam, mas os dois usam esta
   classe e ela fixa display:flex incondicional). */
.notas-icon-btn[hidden] { display: none; }
/* No desktop o botão de sair é "recolher" (»). O rosto de "Fechar" (× + rótulo)
   só entra em tela estreita — ver bloco MOBILE v2 no fim do arquivo. */
.notas-ico-close, .notas-close-lbl { display: none; }

.notas-body { flex: 1 1 auto; display: flex; min-height: 0; }

.notas-list { display: flex; flex-direction: column; min-height: 0; width: 100%; position: relative; }
.notas-pop--sort { top: 40px; right: 10px; min-width: 190px; }
.notas-pop-item[role="menuitemradio"].is-on::after { content: '✓'; margin-left: auto; font-size: 12px; color: var(--accent-ink); }
/* Rodapé "Apagadas recentemente" / "Voltar pras notas" */
.notas-foot {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 14px;
  border: none; border-top: 1px solid var(--border); background: transparent; text-align: left;
  color: color-mix(in srgb, var(--text) 55%, transparent); font: inherit; font-size: 12px; cursor: pointer;
}
.notas-foot:hover { color: var(--text); background: color-mix(in srgb, var(--text) 3%, transparent); }
.notas-foot svg { flex: 0 0 auto; }
.notas-foot .n { margin-left: auto; font-size: 11px; }
.notas-foot[hidden] { display: none; }
.notas-group-label svg { width: 12px; height: 12px; }
/* Lixeira: some o que não faz sentido em nota apagada */
.notas-panel.is-trash .notas-new-btn, .notas-panel.is-trash .notas-select-mode-btn, .notas-panel.is-trash #notasSortBtn { display: none; }
.notas-panel.is-trash .notas-editor-toolbar .notas-tb { display: none; }
.notas-trash-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 2px 0 12px -14px; padding: 8px 10px;
  border-radius: 8px; background: color-mix(in srgb, var(--red) 10%, transparent); color: var(--text); font-size: 12px;
}
.notas-trash-banner .sp { flex: 1 1 auto; }
.notas-trash-banner button {
  border: none; border-radius: 6px; padding: 4px 9px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text);
}
.notas-trash-banner button[data-act="restore"] { background: var(--accent); color: var(--ink); }
.notas-trash-banner button[data-act="purge"] { color: var(--red); }
.notas-editor-scroll.is-readonly .notas-line-text { cursor: default; }
.notas-editor-scroll.is-readonly .notas-line-act, .notas-editor-scroll.is-readonly .notas-chev { display: none; }
.notas-editor-scroll.is-readonly .notas-line-check { pointer-events: none; }
.notas-search-wrap { padding: 8px 10px 4px; flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.notas-select-mode-btn { flex: 0 0 auto; font-size: 13px; }
.notas-search-field { position: relative; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; }
.notas-search-icon { position: absolute; left: 8px; color: color-mix(in srgb, var(--text) 40%, transparent); pointer-events: none; }
.notas-search-input {
  width: 100%; padding: 5px 8px 5px 26px; border-radius: 7px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--text) 4%, transparent); color: var(--text);
  font: inherit; font-size: 11.5px;
}
.notas-search-input::placeholder { color: color-mix(in srgb, var(--text) 40%, transparent); }
.notas-search-input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.notas-search-input:disabled { opacity: 0.5; cursor: not-allowed; }

.notas-new-btn {
  margin: 2px 10px 6px; padding: 6px 8px; border-radius: 7px; border: 1px dashed var(--border-hover);
  background: transparent; color: color-mix(in srgb, var(--text) 55%, transparent);
  font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; gap: 5px; flex: 0 0 auto;
}
.notas-new-btn:hover { background: color-mix(in srgb, var(--text) 4%, transparent); color: var(--text); }
.notas-new-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.notas-bulk-bar {
  margin: 2px 10px 6px; padding: 5px 5px 5px 10px; border-radius: 7px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--text) 3%, transparent);
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: 0 0 auto;
}
.notas-bulk-count { font-size: 11px; font-weight: 600; color: color-mix(in srgb, var(--text) 55%, transparent); }
.notas-bulk-actions { display: flex; gap: 2px; flex: 0 0 auto; }
.notas-bulk-bar[hidden] { display: none; }
.notas-tool-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.notas-tool-btn:disabled:hover { background: transparent; color: color-mix(in srgb, var(--text) 45%, transparent); }

.notas-list-scroll { flex: 1 1 auto; overflow-y: auto; padding: 0 6px 8px; }
/* Grupos em caixa normal e nota ativa em cinza neutro — como no Apple Notes
   (a cor de destaque fica só pra seleção múltipla). */
.notas-group-label {
  font-size: 12px; font-weight: 700;
  color: color-mix(in srgb, var(--text) 62%, transparent); padding: 12px 8px 4px;
  display: flex; align-items: center; gap: 5px;
}
.notas-row {
  padding: 8px 10px; border-radius: 9px; cursor: pointer; margin-bottom: 1px;
  display: flex; align-items: flex-start; gap: 7px;
}
.notas-row:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.notas-row.is-active { background: color-mix(in srgb, var(--text) 8%, transparent); }
.notas-row:focus { outline: none; }
.notas-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.notas-row.is-selected { background: color-mix(in srgb,var(--accent) 12%,transparent); }
.notas-row-check {
  flex: 0 0 auto; width: 15px; height: 15px; margin-top: 2px; border-radius: 4px;
  border: 1.5px solid var(--border-hover); background: transparent;
}
.notas-row-check.is-checked { background: var(--accent); border-color: var(--accent); position: relative; }
.notas-row-check.is-checked::after {
  content: ''; position: absolute; left: 3px; top: 2px; width: 7px; height: 4px;
  border-left: 1.5px solid var(--surface); border-bottom: 1.5px solid var(--surface); transform: rotate(-45deg);
}
.notas-row-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.notas-row-title {
  font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notas-row-meta { display: flex; gap: 7px; align-items: baseline; margin-top: 2px; }
.notas-row-date { font-size: 11.5px; color: color-mix(in srgb, var(--text) 78%, transparent); flex: 0 0 auto; }
.notas-row-preview {
  font-size: 11.5px; color: color-mix(in srgb, var(--text) 55%, transparent);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0;
}
.notas-list-empty { padding: 14px 10px; font-size: 11px; color: color-mix(in srgb, var(--text) 30%, transparent); text-align: center; }

/* Editor: escondido enquanto docked e sem nota aberta; vira tela cheia do painel
   quando uma nota é aberta (navegação tipo drill-down, já que não cabem 2 colunas). */
.notas-editor { display: none; flex-direction: column; min-height: 0; width: 100%; position: relative; }
.notas-panel.is-editor-view .notas-list { display: none; }
.notas-panel.is-editor-view .notas-editor { display: flex; }

.notas-editor-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px;
  padding: 6px 8px; border-bottom: 1px solid var(--border); flex: 0 0 auto;
}
.notas-tool-btn {
  display: flex; align-items: center; gap: 4px; border: none; background: transparent;
  color: color-mix(in srgb, var(--text) 45%, transparent); font: inherit; font-size: 10.5px;
  font-weight: 600; padding: 4px 7px; border-radius: 6px; cursor: pointer;
}
.notas-tool-btn:hover { background: color-mix(in srgb, var(--text) 5%, transparent); color: var(--text); }
.notas-tool-btn--danger:hover { color: var(--red); background: var(--red-bg); }
/* [hidden] sozinho perde pra .notas-tool-btn/.notas-icon-btn{display:flex} em
   especificidade (mesma pegadinha do .cd-pane, ver comentário na linha 4179) —
   sem isto, "Limpar concluídos" e o botão de "Encaixar" ficavam visíveis mesmo
   marcados hidden. */
.notas-tool-btn[hidden] { display: none; }
.notas-tool-spacer { flex: 1 1 auto; }
.notas-back-btn { display: none; gap: 3px; color: var(--accent-ink); font-size: 12.5px; padding-left: 4px; }
.notas-panel:not(.notas-panel--floating) .notas-back-btn { display: flex; }

/* ── Editor estilo Apple Notes (mockup _mockups/notas-apple.html, aprovado 20/09/2026) ──
   Cada linha é um parágrafo com estilo próprio (t-title/heading/subheading/body/mono)
   ou um item de lista (t-check/bullet/dash/number) com recuo via --indent. O título
   é a 1ª linha — não existe campo separado. */
.notas-editor-scroll { flex: 1 1 auto; overflow-y: auto; padding: 8px 16px 24px 30px; cursor: text; }
.notas-stamp {
  text-align: center; font-size: 11px; color: color-mix(in srgb, var(--text) 55%, transparent);
  margin: 2px 0 10px -14px; user-select: none;
}
.notas-tail { min-height: 48px; } /* clique abaixo do texto leva o cursor pro fim da nota */

.notas-line {
  position: relative; display: flex; align-items: flex-start; gap: 8px; min-height: 22px;
  padding: 1px 4px 1px calc(var(--indent, 0) * 22px + 4px); margin: 0 -4px; border-radius: 6px;
}
.notas-line:hover { background: color-mix(in srgb, var(--text) 3%, transparent); }
.notas-line.is-hidden { display: none; }
.notas-line-text {
  flex: 1 1 auto; min-width: 0; font-size: 13.5px; line-height: 1.5; color: var(--text);
  outline: none; word-wrap: break-word; white-space: pre-wrap; caret-color: var(--text);
}
.notas-line-text[data-placeholder]:empty::before {
  content: attr(data-placeholder); color: color-mix(in srgb, var(--text) 30%, transparent); pointer-events: none;
}
.notas-line.t-title .notas-line-text { font-size: 22px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.notas-line.t-heading { margin-top: 10px; }
.notas-line.t-heading .notas-line-text { font-size: 17px; font-weight: 700; line-height: 1.3; }
.notas-line.t-subheading { margin-top: 4px; }
.notas-line.t-subheading .notas-line-text { font-size: 14.5px; font-weight: 600; }
.notas-line.t-mono .notas-line-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px;
  background: color-mix(in srgb, var(--text) 4%, transparent); border-radius: 6px; padding: 3px 8px;
}
.notas-line.is-highlight .notas-line-text {
  background: color-mix(in srgb, var(--magenta) 16%, transparent); border-radius: 4px; padding: 0 4px; margin: 0 -4px;
}
.notas-line.t-mono.is-highlight .notas-line-text { padding: 3px 8px; margin: 0; }
/* Concluído esmaece, não risca (Apple) */
.notas-line.is-done .notas-line-text { color: color-mix(in srgb, var(--text) 50%, transparent); }

/* Marcadores de lista */
.notas-mk {
  flex: 0 0 auto; width: 18px; height: 20px; display: flex; align-items: center; justify-content: center;
  color: color-mix(in srgb, var(--text) 55%, transparent); font-size: 13.5px; user-select: none;
}
.notas-mk--num {
  width: auto; min-width: 18px; font-variant-numeric: tabular-nums; font-size: 12.5px;
  color: color-mix(in srgb, var(--text) 62%, transparent);
}
.notas-line-check {
  position: relative; width: 18px; height: 18px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 1.5px solid color-mix(in srgb, var(--text) 30%, transparent); background: transparent;
  display: flex; align-items: center; justify-content: center;
}
/* área de toque maior sem crescer o círculo (não invade o texto à direita) */
.notas-line-check::before { content: ''; position: absolute; inset: -8px -5px -8px -12px; }
.notas-line-check.is-checked { background: var(--accent); border-color: var(--accent); }
.notas-line-check.is-checked::after {
  content: ''; width: 8px; height: 4.5px; border-left: 2px solid var(--surface);
  border-bottom: 2px solid var(--surface); transform: rotate(-45deg) translate(1px,-1px);
}

/* Chevron de recolher (Título/Cabeçalho/Subcabeçalho): só no hover, fixo quando recolhido */
.notas-chev {
  position: absolute; left: calc(var(--indent, 0) * 22px - 18px); top: 3px; width: 18px; height: 18px;
  border: none; background: transparent; padding: 0; cursor: pointer;
  color: color-mix(in srgb, var(--text) 50%, transparent);
  display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .12s, transform .12s;
}
.notas-chev svg { width: 13px; height: 13px; }
.notas-line.t-title .notas-chev { top: 8px; }
.notas-line:hover .notas-chev, .notas-line.is-collapsed .notas-chev { opacity: 1; }
.notas-line.is-collapsed .notas-chev { transform: rotate(-90deg); }
.notas-line.is-collapsed .notas-line-text::after {
  content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: color-mix(in srgb, var(--text) 25%, transparent); margin-left: 8px; vertical-align: middle;
}

/* Virar tarefa (Sirius): chip na linha já promovida + um ↗ discreto no hover */
.notas-task-chip {
  flex: 0 0 auto; align-self: center; font-size: 10px; font-weight: 700; color: var(--accent-ink);
  background: color-mix(in srgb, var(--accent) 14%, transparent); padding: 2px 7px; border-radius: 999px;
  white-space: nowrap; border: none; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; gap: 3px;
}
.notas-task-chip svg { width: 10px; height: 10px; }
.notas-line-act {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 5px; border: none; background: transparent;
  color: color-mix(in srgb, var(--text) 45%, transparent); cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .12s;
}
.notas-line-act svg { width: 12px; height: 12px; }
.notas-line:hover .notas-line-act, .notas-line:focus-within .notas-line-act { opacity: 1; }
.notas-line-act:hover { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); }

/* Toolbar por ícones (Aa · checklist · ···) e popovers */
.notas-tb { width: 28px; height: 26px; }
.notas-tb.is-open { color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.notas-tb-aa { font-size: 13px; font-weight: 700; letter-spacing: -0.02em; font-family: inherit; }
.notas-pop {
  position: absolute; top: 38px; right: 8px; z-index: 30; min-width: 220px; max-width: calc(100% - 16px);
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px;
}
.notas-pop[hidden] { display: none; }
.notas-pop--style { width: 262px; }
.notas-pop-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 6px 8px; border-radius: 6px;
  border: none; background: transparent; color: var(--text); font: inherit; font-size: 13px; cursor: pointer;
}
.notas-pop-item:hover, .notas-pop-item.is-on { background: color-mix(in srgb, var(--text) 6%, transparent); }
.notas-pop-item:disabled { opacity: .4; cursor: not-allowed; }
.notas-pop-item:disabled:hover { background: transparent; }
.notas-pop-item .k { margin-left: auto; font-size: 11px; color: color-mix(in srgb, var(--text) 50%, transparent); font-family: ui-monospace, Menlo, monospace; }
.notas-pop-item svg { color: color-mix(in srgb, var(--text) 55%, transparent); flex: 0 0 auto; }
.notas-pop-item.st-title { font-size: 18px; font-weight: 700; }
.notas-pop-item.st-heading { font-size: 15.5px; font-weight: 700; }
.notas-pop-item.st-subheading { font-size: 14px; font-weight: 600; }
.notas-pop-item.st-mono { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.notas-pop-item--danger { color: var(--red); }
.notas-pop-item--danger svg { color: var(--red); }
.notas-pop-item--danger:hover { background: var(--red-bg); }
.notas-pop-sep { height: 1px; background: var(--border); margin: 5px 4px; }
.notas-pop-row { display: flex; gap: 3px; padding: 2px 4px; align-items: center; }
.notas-pop-ib { width: 30px; height: 28px; font-size: 13px; color: var(--text); }
.notas-pop-ib.is-on { color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.notas-pop-ib:disabled { opacity: .35; cursor: not-allowed; }
.notas-pop-ib--num { font-size: 12px; font-weight: 600; }
.notas-pop-ib--fmt { font-size: 13.5px; }
.notas-pop-ib--fmt u { text-underline-offset: 2px; }
.notas-pop-ib[data-inline="highlight"] { color: var(--magenta); }
/* Formatação inline dentro da linha */
.notas-line-text a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; cursor: text; }
.notas-editor-scroll.is-readonly .notas-line-text a { cursor: pointer; }
.notas-line-text u { text-underline-offset: 2px; }
.notas-line-text s { opacity: .75; }

/* ─── Destacar/arrastar/redimensionar (mesma mecânica de antes) ─── */
.notas-panel--floating {
  position: fixed;
  z-index: 970;
  height: auto;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
}
.notas-panel--floating .notas-head { cursor: move; user-select: none; }
/* O cabeçalho (.notas-head) já mostra "Notas" sempre agora — o rótulo estático
   da lista ficaria redundante nos dois modos (docked e destacada). */
.notas-section-label { display: none; }
.notas-panel--floating .notas-body { flex-direction: row; }
.notas-panel--floating .notas-list,
.notas-panel--floating .notas-editor { display: flex !important; }
.notas-panel--floating .notas-list { width: 210px; flex: 0 0 210px; border-right: 1px solid var(--border); }
.notas-panel--floating .notas-editor { flex: 1 1 auto; }
.notas-resize-handle {
  display: none; position: absolute; right: 4px; bottom: 4px; width: 16px; height: 16px; cursor: nwse-resize;
}
.notas-resize-handle::after {
  content: ''; position: absolute; right: 2px; bottom: 2px; width: 8px; height: 8px;
  border-right: 2px solid color-mix(in srgb, var(--text) 20%, transparent);
  border-bottom: 2px solid color-mix(in srgb, var(--text) 20%, transparent);
  border-radius: 0 0 2px 0;
}
.notas-panel--floating .notas-resize-handle { display: block; }

/* ─── Lista fixa ao lado do editor (docked, estilo Apple Notes) ────────────
   Com uma nota aberta, a aside alarga (body.notas-split, setado pelo módulo,
   sobrescreve --myday-w) e a lista vira barra lateral fixa pra trocar de nota
   sem "voltar". Só onde a largura comporta as 2 colunas: docked no desktop
   (>1280px) e a versão fullscreen a partir de 700px de viewport; abaixo disso
   segue o drill-down lista↔editor de sempre. */
@media (min-width: 1281px) {
  body.notas-split { --myday-w: 620px; }
  .myday { transition: width 0.18s ease; }
  body.has-myday #app { transition: padding-right 0.18s ease; }
}
@media (min-width: 700px) {
  .notas-panel.is-editor-view:not(.notas-panel--floating) .notas-body { flex-direction: row; }
  .notas-panel.is-editor-view:not(.notas-panel--floating) .notas-list {
    display: flex;
    width: 230px;
    flex: 0 0 230px;
    border-right: 1px solid var(--border);
  }
  .notas-panel.is-editor-view:not(.notas-panel--floating) .notas-editor { display: flex; }
  /* Com a lista sempre à vista, "‹ Notas" perde a função */
  .notas-panel.is-editor-view:not(.notas-panel--floating) .notas-back-btn { display: none; }
}

/* ─── Trilho lateral (botão pra reabrir) ─── */
.myday-rail {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--text) 6%, transparent);
  border-right: none;
  border-radius: 6px 0 0 6px;
  color: color-mix(in srgb, var(--text) 40%, transparent);
  padding: 12px 9px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 49;
  transition: all 0.15s ease;
  font-family: inherit;
}
.myday-rail:hover {
  color: var(--accent);
  border-color: color-mix(in srgb,var(--accent) 30%,transparent);
  padding-right: 11px;
}
.myday-rail-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ─── Telas pequenas: sidebar vira fullscreen ─────────────────────────── */
@media (max-width: 1280px) {
  /* Sidebar ocupa tela inteira quando aberta */
  .myday {
    width: 100vw;
    max-width: 100vw;
    border-left: none;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.22);
    z-index: 100;
  }
  body.has-myday #app { padding-right: 0; }

  /* Trilho vira FAB pill no canto inferior direito */
  .myday-rail {
    top: auto;
    left: auto;
    bottom: 20px;
    right: 20px;
    transform: none;
    border-radius: 999px;
    flex-direction: row;
    gap: 8px;
    padding: 11px 16px;
    background: var(--accent);
    color: var(--surface);
    border: none;
    box-shadow: 0 8px 24px color-mix(in srgb,var(--accent) 35%,transparent), 0 2px 8px rgba(0, 0, 0, 0.22);
    z-index: 99;
  }
  .myday-rail:hover {
    color: var(--surface);
    border-color: transparent;
    padding-right: 16px;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px color-mix(in srgb,var(--accent) 45%,transparent), 0 2px 8px rgba(0, 0, 0, 0.22);
  }
  .myday-rail-label {
    writing-mode: horizontal-tb;
    transform: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
  }
  /* Em fullscreen, o botão de recolher tem mais peso visual */
  .myday-icon-btn {
    width: 36px;
    height: 36px;
  }
  .myday-icon-btn svg { width: 18px; height: 18px; }

  /* Padding interno mais generoso pro toque em mobile */
  .myday-head { padding: 18px 20px 14px; }
  .myday-body { padding: 8px 12px 16px; }
  .notas-head { padding: 14px 20px; }
  .notas-list-scroll { padding: 0 10px 14px; }
  /* Editor em tela cheia: um degrau acima na escala de fontes e alvo de toque maior */
  .notas-editor-scroll { padding: 10px 20px 24px 36px; }
  .notas-line { min-height: 30px; }
  .notas-line-text { font-size: 15.5px; line-height: 1.55; }
  .notas-line.t-title .notas-line-text { font-size: 26px; }
  .notas-line.t-heading .notas-line-text { font-size: 19px; }
  .notas-line.t-subheading .notas-line-text { font-size: 16px; }
  .notas-line.t-mono .notas-line-text { font-size: 14px; }
  .notas-mk { height: 26px; font-size: 15px; }
  .notas-line-check { width: 20px; height: 20px; }
  .notas-chev { top: 6px; }
  .notas-line.t-title .notas-chev { top: 12px; }
  .notas-stamp { font-size: 12px; }
  .notas-tb { width: 34px; height: 32px; }
  .notas-tb-aa { font-size: 15px; }
  .notas-editor-toolbar { padding: 10px 12px 8px; }
  .notas-back-btn { font-size: 14px; }
  .notas-row { padding: 11px 12px; }
  .notas-row-title { font-size: 15.5px; }
  .notas-row-meta { font-size: 13.5px; }
  .notas-row-date, .notas-row-preview { font-size: 13.5px; }
  .notas-group-label { font-size: 14px; padding: 14px 10px 6px; }
  .notas-search-input { padding: 9px 10px 9px 30px; font-size: 14px; border-radius: 10px; }
  .notas-search-icon { left: 10px; }
  /* Destacar/flutuar não faz sentido em tela cheia mobile — a sidebar já ocupa
     a tela toda docked. */
  #notasExpandMenuItem { display: none; }
  .myday-item { padding: 12px 12px; }
  .myday-check { width: 19px; height: 19px; }
}

/* Mobile pequeno: ajustes finos */
@media (max-width: 480px) {
  .myday-rail {
    bottom: 16px;
    right: 16px;
    padding: 10px 14px;
  }
  .myday-rail-label { font-size: 11.5px; }
  .myday-head { padding: 16px 16px 12px; }
  .myday-body { padding: 6px 10px 12px; }
  .notas-head { padding: 12px 14px; }
  .notas-editor-scroll { padding: 12px 14px 16px; }
}

/* ── Trava de identidade obrigatória ── */
body.identity-locked { overflow: hidden; }
.identity-gate {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 12, 19, 0.85);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.identity-gate.open { opacity: 1; pointer-events: auto; }
.identity-gate-card {
  width: min(560px, 100%);
  padding: 32px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  text-align: center;
  transform: scale(0.96);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.identity-gate.open .identity-gate-card { transform: scale(1); }
.identity-gate-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}
.identity-gate-sub {
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.identity-gate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.identity-gate-btn {
  padding: 14px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.identity-gate-btn:hover {
  background: var(--surface-3);
  border-color: var(--border-hover);
}
.identity-gate-btn:active { transform: scale(0.97); }
.identity-gate-btn.is-current {
  border-color: var(--accent);
  background: color-mix(in srgb,var(--accent) 12%,transparent);
  color: var(--accent);
}

/* ─── Login: input, erro e ações ─── */
.identity-gate-pass-wrap {
  position: relative;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
}
.identity-gate-pass-wrap .identity-gate-input {
  margin: 0;
  flex: 1;
  padding-right: 42px;
}
.identity-gate-eye {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  color: rgba(255,255,255,0.35);
  padding: 0;
  line-height: 0;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.identity-gate-eye:hover { color: rgba(255,255,255,0.8); }
.identity-gate-input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 14px;
  margin: 0 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s ease;
}
.identity-gate-input:focus { border-color: var(--accent); }
.identity-gate-error {
  margin: 0 0 14px;
  font-size: 13px;
  color: #ff6b6b;
  text-align: left;
}
.identity-gate-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}
.identity-gate-forgot-link {
  display: block;
  margin: 14px auto 0;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  opacity: 0.8;
}
.identity-gate-forgot-link:hover { color: var(--accent); opacity: 1; }
.identity-gate-forgot {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--accent);
  text-align: left;
}
.identity-gate-btn-primary {
  flex: 1;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #04121a;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.identity-gate-btn-primary:hover { filter: brightness(1.08); }
.identity-gate-btn-primary:active { transform: scale(0.98); }
.identity-gate-btn-primary:disabled { opacity: 0.6; cursor: default; }
.identity-gate-btn-ghost {
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.identity-gate-btn-ghost:hover { color: var(--text); border-color: var(--border-hover); }

/* ─── Chip de usuário no header (com Sair) ─── */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
}
.user-chip-name { font-size: 13px; font-weight: 600; color: var(--text); }
.user-chip-logout {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-3);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.user-chip-logout:hover { color: #ff6b6b; border-color: #ff6b6b; }
.csb-logout-icon { flex: none; }

/* ─── Passo 2 do gate: novidades importantes com aceite ─── */
.gate-news-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 22px;
  text-align: left;
  max-height: 46vh;
  overflow-y: auto;
}
.gate-news-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.gate-news-date {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-ink);
  padding-top: 2px;
  letter-spacing: 0.02em;
}
.gate-news-body { min-width: 0; }
.gate-news-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}
.gate-news-summary {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
}
.gate-news-ack {
  width: 100%;
  border-color: var(--accent);
  background: color-mix(in srgb,var(--accent) 12%,transparent);
  color: var(--accent-ink);
}
.gate-news-ack:hover {
  background: color-mix(in srgb,var(--accent) 20%,transparent);
  border-color: var(--accent);
}

/* ─── Inteligência do Projeto — layout Vivo + Histórico ─────────────────────── */
.cd-intelg-vivo-wrap {
  display: flex;
  gap: 0;
  min-height: 0;
  flex: 1;
}
.cd-intelg-vivo-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
}
.cd-intelg-hist-panel {
  width: 240px;
  flex-shrink: 0;
  border-left: 1px solid var(--border, rgba(255,255,255,0.08));
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.cd-intelg-hist-label {
  padding: 10px 14px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
  flex-shrink: 0;
}
.cd-intelg-hist-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}
.cd-intelg-hist-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.05));
  cursor: default;
  transition: background 0.12s;
}
.cd-intelg-hist-item:hover { background: rgba(255,255,255,0.03); }
.cd-intelg-hist-date {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.cd-intelg-hist-snippet {
  font-size: 12px;
  color: var(--text-secondary, #a0a8b8);
  line-height: 1.4;
}
.cd-intelg-hist-acoes {
  margin-top: 5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cd-intelg-hist-acoes span {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cd-intelg-hist-acoes span::before { content: "→ "; }
.cd-intelg-hist-loading,
.cd-intelg-hist-empty {
  padding: 16px 14px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}
@media (max-width: 720px) {
  .cd-intelg-vivo-wrap { flex-direction: column; }
  .cd-intelg-hist-panel { width: 100%; border-left: none; border-top: 1px solid var(--border, rgba(255,255,255,0.08)); max-height: 160px; }
}

/* ─── Visão Geral — campos de dash_clientes revividos (Fase 2) ──────────────
   entregaveis/foraDoEscopo/contatos/ofertaPrincipal/responsaveis não apareciam
   em nenhum lugar da UI antes disso — só existiam como hidden preserve. */
.cd-overview { padding: 22px 24px 40px; }
.cd-overview-fields { margin-top: 30px; }
.cd-ov-section { margin-bottom: 26px; }
.cd-ov-section:last-child { margin-bottom: 0; }
.cd-ov-full { max-width: 62ch; }
.cd-ov-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 26px;
}
.cd-ov-cols:last-child { margin-bottom: 0; }
@media (max-width: 720px) {
  .cd-ov-cols { grid-template-columns: 1fr; gap: 4px; }
}
.cd-ov-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.cd-ov-text { font-size: 14px; line-height: 1.6; color: var(--text-secondary); margin: 0; }
.cd-ov-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.cd-ov-mark { flex-shrink: 0; font-size: 12px; width: 12px; text-align: center; }
.cd-ov-yes .cd-ov-mark { color: color-mix(in srgb, var(--hero-accent, var(--accent)) 65%, var(--text)); }
.cd-ov-no { color: var(--text-muted); }
.cd-ov-no .cd-ov-mark { color: var(--text-muted); }
.cd-ov-key { color: var(--text-muted); min-width: 88px; flex-shrink: 0; }

/* ─── Geral e Reuniões como abas da página (Fase 2) ──────────────────────────
   Conteúdo (.cd-md/.cd-ctxg-*/.cd-reun-*) é o mesmo do modal — só o padding
   do container muda, porque aqui não tem mais o .cd-ctxg-pane do modal. */
.cd-geral-pane { padding: 22px 24px 40px; }
.cd-geral-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.cd-pane[data-pane="reunioes"] { padding: 22px 24px 40px; }
/* Fase C (02/10/2026): .cd-geral-pane nasceu pra ser o container de uma aba
   própria (padding igual ao de .cd-overview); fundida dentro de .cd-overview,
   o padding duplicaria. O divisor marca que o que vem depois é documentação
   de referência, não mais uma seção "foto da semana" igual às de cima. */
.cd-overview .cd-geral-pane { padding: 0; }
.cd-ctx-sep { height: 1px; background: var(--border); margin: 36px 0 22px; }

/* ─── Documentos (Fase 2, Estágio 5) ─────────────────────────────────────── */
.cd-documentos { padding: 22px 24px 40px; }
.cd-documentos .cd-section { margin-bottom: 30px; }
.cd-documentos .cd-section:last-child { margin-bottom: 0; }
.cd-empty-note { font-size: 13px; color: var(--text-muted); margin: 0; }
.cd-doc-list { display: flex; flex-direction: column; gap: 2px; }
.cd-doc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 4px;
  border-top: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s ease;
}
.cd-doc-list a.cd-doc-row:first-child { border-top: none; }
.cd-doc-row:hover { color: var(--blue); }
.cd-doc-tag {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ─── Roadmap (Fase 2, Estágio 5, condicional) ───────────────────────────── */
.cd-roadmap { padding: 22px 24px 40px; }
.cd-rm-timeline { position: relative; padding-left: 26px; max-width: 62ch; }
.cd-rm-timeline::before {
  content: '';
  position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--border-hover);
}
.cd-rm-item { position: relative; padding-bottom: 30px; }
.cd-rm-item:last-child { padding-bottom: 0; }
.cd-rm-dot {
  position: absolute;
  left: -26px; top: 3px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border-hover);
}
.cd-rm-item.cd-rm-current .cd-rm-dot {
  border-color: color-mix(in srgb, var(--hero-accent, var(--magenta)) 85%, transparent);
  background: color-mix(in srgb, var(--hero-accent, var(--magenta)) 85%, transparent);
}
.cd-rm-label { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.cd-rm-item.cd-rm-current .cd-rm-label { color: color-mix(in srgb, var(--hero-accent, var(--magenta)) 85%, var(--text)); }
.cd-rm-foco { font-size: 16px; font-weight: 700; margin: 4px 0 6px; }
.cd-rm-desc { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; margin: 0 0 8px; }
.cd-rm-tag { display: inline-block; font-size: 11.5px; color: var(--text-muted); border: 1px solid var(--border); border-radius: 5px; padding: 3px 8px; }

/* ─── Inteligência do Projeto — Aba Reuniões ────────────────────────────────── */
.cd-reun-topbar {
  padding: 12px 0 10px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
  margin-bottom: 12px;
}
.cd-reun-add-btn {
  background: color-mix(in srgb, var(--lilas) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--lilas) 35%, transparent);
  color: var(--lilas-ink);
  border-radius: 5px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}
.cd-reun-add-btn:hover { background: color-mix(in srgb, var(--lilas) 28%, transparent); }
.cd-reun-form-wrap { margin-bottom: 16px; }
.cd-reun-textarea { min-height: 160px; resize: vertical; font-family: monospace; font-size: 13px; }
.cd-reun-list { display: flex; flex-direction: column; gap: 12px; }
.cd-reun-item {
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 6px;
  overflow: hidden;
}
.cd-reun-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.06));
  flex-wrap: wrap;
}
.cd-reun-date { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.cd-reun-title { font-size: 14px; font-weight: 600; flex: 1; }
.cd-reun-src {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cd-reun-src-manual { background: var(--blue-bg); color: var(--blue); }
.cd-reun-src-meet { background: var(--green-bg); color: var(--green); }
.cd-reun-src-transcricao { background: color-mix(in srgb, var(--lilas) 14%, transparent); color: var(--lilas-ink); }
.cd-reun-content { padding: 14px 16px; font-size: 13px; line-height: 1.6; }

/* ═══════════════════════════════════════════════════════════════════════════
   Responsividade — alvos de toque + piso de tipografia (auditoria 2026-06-19)
   pointer:coarse mira dispositivos de toque; não afeta a precisão do mouse no desktop.
   ═══════════════════════════════════════════════════════════════════════════ */
@media (pointer: coarse) {
  /* Checkboxes maiores no toque (visual ~22px; recomendado ≥44px de alvo) */
  .myday-check { width: 22px; height: 22px; }
  .tm-task-check,
  .tm-select-all,
  .cd-task-check input[type="checkbox"],
  input.tm-task-check[type="checkbox"] { width: 22px; height: 22px; }
  /* Label que envolve o check ganha área clicável sem deslocar o layout */
  .cd-t-check { padding: 11px; margin: -11px 2px -11px -11px; }

  /* FAB "Meu Dia" com altura mínima confortável */
  .myday-rail { min-height: 44px; padding: 14px 12px; }

  /* Abas e botões inline com alvo de toque maior */
  .nav-tab { padding: 10px 14px; }
  .myday-link-btn { padding: 8px 4px; }
  .cd-ctrl { padding: 6px 8px; }
}

/* Piso de legibilidade no mobile: labels de leitura não abaixo de 11px.
   (Fica por último no arquivo pra prevalecer sobre os overrides de 480px.
   Círculos de contagem/badges decorativos ficam de fora — são intencionais.) */
@media (max-width: 768px) {
  .last-update,
  .modal-label { font-size: 11px; }
}

/* ============================================================================
   MOBILE — barra de navegação inferior (padrão Sirius: CRM/Planejador)
   Mesmo sistema dos outros produtos: no celular a nav vira barra inferior
   tipo app; abas de cima e atalhos externos somem (vão pro sheet "Mais").
   Fica por último no arquivo → vence a cascata.
   ============================================================================ */
#mtabbar { display: none; }
#mtab-more { display: none; }
#mtab-ferramentas { display: none; }

@media (max-width: 640px) {
  /* nav de cima e atalhos externos saem (viram barra inferior + sheet "Mais") */
  #navTabs { display: none !important; }
  .nav-tab-link { display: none !important; }
  #mtabbar { display: flex; }
  /* espaço pra barra fixa não cobrir conteúdo (body é o scroller do painel) */
  body { padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }
}

#mtabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
  height: calc(72px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -10px 30px rgba(0,0,0,.5);
}
.mtab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 11px; font-weight: 600; font-family: inherit;
  padding: 8px 2px 6px; position: relative; transition: color .15s; min-width: 0;
}
.mtab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtab svg { width: 25px; height: 25px; stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mtab.on { color: var(--accent); }
.mtab.on::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 38px; height: 4px; border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--accent), var(--magenta));
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 60%, transparent);
}
.mtab.on svg { filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 45%, transparent)); }

/* Sheets "Ferramentas" e "Mais" — mesma mecânica, classes .mtab-more-* reusadas
   pros dois (só o id de cada <div> raiz muda). */
#mtab-more, #mtab-ferramentas { position: fixed; inset: 0; z-index: 950; }
#mtab-more.open, #mtab-ferramentas.open { display: block; }
.mtab-more-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.mtab-more-sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--surface); border-top: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  max-height: 82vh; overflow-y: auto;
}
.mtab-more-grab { width: 40px; height: 4px; border-radius: 3px; background: var(--border); margin: 6px auto 14px; }
.mtab-more-title { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted); padding: 0 4px 8px; }
.mtab-more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.mtab-more-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  background: var(--surface-2, rgba(255,255,255,.03)); border: 1px solid var(--border); border-radius: 14px;
  padding: 15px 6px; color: var(--text); font-size: 11.5px; font-weight: 500; cursor: pointer;
  min-height: 76px; text-align: center; text-decoration: none;
}
.mtab-more-item svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.mtab-more-item.on { border-color: var(--accent); color: var(--accent); }
.mtab-more-item[hidden] { display: none !important; }
.mtab-more-actions { display: flex; gap: 8px; }
.mtab-more-actions button {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px; border-radius: 13px; border: 1px solid var(--border);
  background: var(--surface-2, rgba(255,255,255,.03)); color: var(--text); font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.mtab-more-actions button svg { width: 20px; height: 20px; flex: none; }
.mtab-more-actions .mtab-more-logout { color: var(--magenta); }

/* ============================================================
   Aparência — modo claro/escuro + cor do sistema + notificações
   Mesmo mecanismo do Planejador Social / CRM: data-theme e
   data-accent no <html>, persistidos em localStorage. A maior
   parte da UI já é var()-driven, então propaga sozinho.
   ============================================================ */
:root {
  /* ink: texto fixo escuro sobre superfície clara/gradiente (botões, badges,
     avatares) — NUNCA muda com o tema, senão o texto some quando --bg clareia. */
  --ink: #04090F;
  /* surface-1: degrau entre --bg e --surface (hero, sticky de seção). Era usado em
     ~11 regras sem nunca ter sido definido — resultado: fundo transparente, e o
     sticky .cd-col-label deixava o conteúdo passar por baixo. */
  --surface-1: #0A1219;
  /* lilás/magenta legíveis como TEXTO nos dois temas: o color-mix puxa pro --text
     do tema vigente (escurece no claro, clareia no escuro) e continua seguindo o
     seletor de cor do sistema. Usar em color:, nunca em background:. */
  --lilas-ink: color-mix(in srgb, var(--lilas) 60%, var(--text));
  --accent-ink: color-mix(in srgb, var(--accent) 40%, var(--text));
}
[data-theme="light"] {
  --bg: #EEF3F8; --surface: #FFFFFF; --surface-2: #F3F7FA; --surface-3: #E7EDF3;
  --border: rgba(4,26,36,.14); --border-hover: rgba(4,26,36,.32);
  /* text-muted era .52 → 3.46:1 sobre --bg, abaixo de AA em rótulo de 10-11px
     (que é quase toda a UI secundária). .62 põe em 4.71:1 sem pesar o visual. */
  --text: #0E1B2A; --text-secondary: rgba(14,27,42,.75); --text-muted: rgba(14,27,42,.62);
  --surface-1: #FFFFFF;
  /* Semáforo no claro: os valores escuros são ciano/amarelo/vermelho de alta
     luminância — ótimos sobre #040C13, ilegíveis sobre #EEF3F8. Aqui entram os
     equivalentes escurecidos, sempre em par com o -bg pra não dessincronizar
     (mesma regra do bloco :root). green e blue seguem idênticos, como no escuro. */
  --green: #0E6E76;  --green-bg: rgba(14,110,118,.12);
  --blue:  #0E6E76;  --blue-bg:  rgba(14,110,118,.12);
  --yellow: #8A6100; --yellow-bg: rgba(138,97,0,.12);
  --orange: #8A6100; --orange-bg: rgba(138,97,0,.12);
  --red: #C8103C;    --red-bg: rgba(200,16,60,.12);
}
[data-theme="light"] body { background-image: none; }

:root, :root[data-accent="sirius"] {
  --accent: #00F6F5; --accent-light: color-mix(in srgb,var(--accent) 60%,transparent);
  --magenta: #D24EFF; --lilas: #B66FFF;
  --gradient-primary: linear-gradient(135deg,#D24EFF 0%,#00F6F5 50%,#B66FFF 100%);
  --gradient-soft: linear-gradient(120deg,#0EAFAF 0%,#2A8FB8 50%,#7B5AD8 100%);
}
:root[data-accent="azul"] {
  --accent: #3B82F6; --accent-light: color-mix(in srgb,var(--accent) 60%,transparent);
  --magenta: #3B82F6; --lilas: #5B8DEF;
  --gradient-primary: linear-gradient(135deg,#2563EB 0%,#3B82F6 100%);
  --gradient-soft: linear-gradient(120deg,#2563EB 0%,#3B82F6 100%);
}
:root[data-accent="esmeralda"] {
  --accent: #0D9C74; --accent-light: color-mix(in srgb,var(--accent) 60%,transparent);
  --magenta: #0D9C74; --lilas: #12B886;
  --gradient-primary: linear-gradient(135deg,#059669 0%,#0D9C74 100%);
  --gradient-soft: linear-gradient(120deg,#059669 0%,#0D9C74 100%);
}
:root[data-accent="violeta"] {
  --accent: #6D5AF0; --accent-light: color-mix(in srgb,var(--accent) 60%,transparent);
  --magenta: #6D5AF0; --lilas: #8B7BFF;
  --gradient-primary: linear-gradient(135deg,#6D5AF0 0%,#8B7BFF 100%);
  --gradient-soft: linear-gradient(120deg,#6D5AF0 0%,#8B7BFF 100%);
}

/* ── Modal de Configurações ── */
.cfg-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 9200; }
.cfg-overlay[hidden], .cfg-modal[hidden] { display: none !important; }
.cfg-modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: min(460px, 94vw); max-height: 85vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  z-index: 9201; box-shadow: 0 24px 64px rgba(0,0,0,0.5); font-family: inherit;
}
.cfg-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.cfg-modal-title { font-size: 15px; font-weight: 700; color: var(--text); margin: 0; }
.cfg-close { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: 4px; line-height: 1; }
.cfg-close:hover { color: var(--text); }
.cfg-modal-body { padding: 4px 20px 16px; }
.cfg-row { display: flex; align-items: center; gap: 14px; padding: 16px 0; }
.cfg-row + .cfg-row { border-top: 1px solid var(--border); }
.cfg-row-main { flex: 1; min-width: 0; }
.cfg-row-t { font-size: 13.5px; font-weight: 600; color: var(--text); }
.cfg-row-d { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.cfg-sw { position: relative; width: 44px; height: 25px; flex-shrink: 0; display: inline-block; cursor: pointer; }
.cfg-sw input { opacity: 0; width: 0; height: 0; }
.cfg-sw-track { position: absolute; inset: 0; background: rgba(140,180,220,.22); border-radius: 20px; transition: background .18s; }
.cfg-sw-track::before { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; transition: left .18s; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.cfg-sw input:checked + .cfg-sw-track { background: var(--accent); }
.cfg-sw input:checked + .cfg-sw-track::before { left: 22px; }
.cfg-acc-picker { display: flex; gap: 10px; flex-shrink: 0; }
.cfg-acc-picker button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); transition: transform .12s; }
.cfg-acc-picker button:hover { transform: scale(1.1); }
.cfg-acc-picker button.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--accent); }

/* ═══════════════════════════════════════════════════════════════════════════
   Sidebar do painel (2026-09-09)
   A navegação do painel inteiro é lateral, dentro e fora do cliente. O header e a
   linha de nav horizontais deixaram de aparecer; a mesma barra tem dois modos,
   alternados por body.csb-cliente: portfólio (abas globais + Ferramentas) e
   cliente (identidade, abas do cliente, atalhos). Ligada por _applyTabLayout
   (app.js) — mesmo padrão de body.has-myday.
   Referência de linguagem: espaço em branco, hierarquia por tamanho de tipo,
   cor só como semáforo, sem caixa dentro de caixa.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --csb-w: 244px;
  --csb-w-col: 60px;
  --csb-gutter: 24px;
}

/* A casca horizontal deixou de existir: a navegação do painel é a sidebar, dentro
   e fora do cliente. O header e a .controls seguem no DOM (são a casa original de
   #navTabs, .nav-tab-link, #btnAdm e .notif-wrap, que a sidebar adota movendo os
   nós) — só não aparecem mais. */
body.has-sidebar .header,
body.has-sidebar .controls { display: none; }

/* O #app é IRMÃO da sidebar, então abre espaço com padding.
   Atenção: esta regra (0,1,1) vence os `#app { padding: … }` shorthand das media
   queries de 1000px e 480px — por isso o reset explícito no bloco de 900px abaixo,
   senão o mobile fica com 268px de recuo e a tela morre. */
body.has-sidebar #app { padding-left: calc(var(--csb-w) + var(--csb-gutter)); padding-top: 20px; }
body.has-sidebar.csb-collapsed #app { padding-left: calc(var(--csb-w-col) + var(--csb-gutter)); }

.csb {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--csb-w);
  z-index: 45;                 /* abaixo de .myday (50) e .myday-rail (49) */
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  font-family: 'Inter', -apple-system, sans-serif;
  transition: width 0.16s ease;
  /* sem overflow:hidden aqui — clipa o popover de notificação no rodapé */
}
.csb[hidden] { display: none !important; }
.csb.collapsed { width: var(--csb-w-col); }

/* ── cabeçalho: identidade ── */
.csb-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 14px 14px;
  border-bottom: 1px solid var(--border);
}
.csb-id { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.csb-logo-wrap { width: 32px; height: 32px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.csb-logo { width: 32px; height: 32px; object-fit: contain; display: block; }
.csb-logo-fb {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px; color: var(--ink);
}
.csb-id-text { flex: 1; min-width: 0; }
.csb-name {
  font-size: 14px; font-weight: 700; color: var(--text);
  line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.csb-status {
  font-size: 11px; color: var(--text-muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.csb-collapse {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 16px; line-height: 1; padding: 4px 2px; flex-shrink: 0;
}
.csb-collapse:hover { color: var(--text); }

/* ── ação principal ── */
.csb-cta {
  margin: 14px 14px 6px;
  padding: 9px 12px;
  border: none; border-radius: 8px;
  background: var(--csb-accent, var(--magenta));
  color: var(--ink);
  font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; white-space: nowrap; overflow: hidden;
  transition: opacity 0.15s;
}
.csb-cta:hover { opacity: 0.88; }

/* ── corpo rolável ── */
.csb-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 8px 12px; }
.csb-nav { display: flex; flex-direction: column; gap: 1px; }
.csb-nav[hidden] { display: none; }
.csb-sec { margin-top: 18px; }
.csb-sec[hidden] { display: none; }
.csb-sec-label {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted); padding: 0 8px 6px;
}
.csb-links { display: flex; flex-direction: column; gap: 1px; }

.csb-item {
  display: flex; align-items: center; gap: 11px;
  width: 100%;
  padding: 8px 10px;
  border: none; border-radius: 8px;
  background: none;
  color: var(--text-secondary);
  font-family: inherit; font-size: 13px; font-weight: 500;
  text-align: left; text-decoration: none;
  cursor: pointer;
  position: relative;
  transition: background 0.13s, color 0.13s;
}
.csb-item:hover { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); }
.csb-item.active {
  color: var(--text);
  background: color-mix(in srgb, var(--csb-accent, var(--magenta)) 14%, transparent);
}
.csb-item.active::before {
  content: ''; position: absolute; left: 0; top: 7px; bottom: 7px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--csb-accent, var(--magenta));
}
.csb-icon {
  width: 18px; flex-shrink: 0; text-align: center;
  font-size: 13px; line-height: 1; opacity: 0.85;
}
.csb-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.csb-link { font-size: 12.5px; color: var(--text-muted); }
.csb-link:hover { color: var(--text); }

/* contador de atrasadas — um alarme, não quatro números */
.csb-badge {
  flex-shrink: 0;
  min-width: 18px; padding: 1px 5px;
  border-radius: 9px;
  background: var(--red); color: var(--surface);
  font-size: 10px; font-weight: 700; text-align: center; line-height: 1.5;
}
.csb-badge[hidden] { display: none; }

/* ── topo (modo cliente): Voltar + navegar entre clientes ── */
.csb-topnav { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 0; }
.csb-topback {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px;
  border: none; border-radius: 8px; background: none; color: var(--text-muted);
  font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.csb-topback:hover { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); }
.csb-topnav-arrows { display: flex; gap: 2px; }
.csb.collapsed .csb-topnav { justify-content: center; padding: 10px 0 0; }
.csb.collapsed .csb-topback { font-size: 0; padding: 6px; }
.csb.collapsed .csb-topback::after { content: '←'; font-size: 13px; }
.csb.collapsed .csb-topnav-arrows { display: none; }

/* ── rodapé ── */
.csb-foot { border-top: 1px solid var(--border); padding: 10px 8px; }
.csb-foot-row { display: flex; align-items: center; gap: 2px; padding: 8px 2px 4px; flex-wrap: wrap; }
.csb-icon-btn {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 13px; line-height: 1;
  padding: 6px; border-radius: 6px;
  transition: background 0.13s, color 0.13s;
}
.csb-icon-btn:hover { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }
.csb-icon-btn:disabled { opacity: 0.3; cursor: default; }
.csb-icon-btn:disabled:hover { background: none; color: var(--text-muted); }
.csb-notif-slot { display: inline-flex; align-items: center; }
.csb-user-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 10px 0; }
.csb-user { font-size: 11px; color: var(--text-muted); padding: 0; }
.csb-user[hidden] { display: none; }
.csb-logout-slot { display: inline-flex; flex: none; }
.csb-logout-slot .user-chip-logout { padding: 3px 9px; font-size: 11px; }

/* Popover de notificação: no rodapé de uma coluna de 244px, abrir pra baixo/direita
   jogaria 360px pra fora da tela. Abre pra direita, a partir da base. */
.csb-notif-slot .notif-popover {
  left: calc(100% + 10px); right: auto;
  bottom: 0; top: auto;
}

/* ── colapsada: só ícones ── */
.csb.collapsed .csb-label,
.csb.collapsed .csb-id-text,
.csb.collapsed .csb-sec-label,
.csb.collapsed .csb-user,
.csb.collapsed .csb-badge { display: none; }
.csb.collapsed .csb-head { padding: 16px 8px 14px; flex-direction: column; gap: 8px; }
.csb.collapsed .csb-item { justify-content: center; padding: 9px 0; gap: 0; }
.csb.collapsed .csb-cta { margin: 12px 8px 6px; padding: 9px 0; text-align: center; font-size: 0; }
.csb.collapsed .csb-cta::after { content: '+'; font-size: 17px; }
.csb.collapsed .csb-foot-row { justify-content: center; }
.csb.collapsed .csb-user-row { justify-content: center; padding: 4px 0 0; }
.csb.collapsed .csb-logout-label { display: none; }
.csb.collapsed .csb-logout-slot .user-chip-logout { padding: 6px; border-radius: 8px; border-color: transparent; background: none; }
.csb.collapsed .csb-logout-slot .user-chip-logout:hover { background: color-mix(in srgb, #ff6b6b 12%, transparent); }

/* ── faixa de métricas no topo do conteúdo (substitui o hero) ── */
.cw-topbar {
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.cw-title { font-size: 21px; font-weight: 800; color: var(--text); line-height: 1.1; margin-right: auto; }
.cw-metrics { display: flex; align-items: baseline; gap: 30px; }
.cw-metric { display: flex; flex-direction: column; gap: 3px; }
.cw-metric-val { font-size: 27px; font-weight: 800; line-height: 1; color: var(--text-muted); }
.cw-metric-lbl { font-size: 10px; font-weight: 600; letter-spacing: 0.7px; text-transform: uppercase; color: var(--text-muted); }
/* cor só quando o número significa alguma coisa */
.cw-metric.on .cw-metric-val { color: var(--text); }
.cw-metric.warn .cw-metric-val,
.cw-metric.warn .cw-metric-lbl { color: var(--red); }
.cw-metric.hold .cw-metric-val,
.cw-metric.hold .cw-metric-lbl { color: var(--yellow); }
.cw-fresh { font-size: 11px; color: var(--text-muted); }

/* ── drawer e reset abaixo de 900px ── */
.csb-scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 44; }
.csb-scrim[hidden] { display: none; }
.csb-rail {
  position: fixed; left: 0; top: 12px; z-index: 46;
  background: var(--surface); border: 1px solid var(--border); border-left: none;
  border-radius: 0 8px 8px 0; color: var(--text);
  padding: 9px 11px; font-size: 15px; cursor: pointer;
}
.csb-rail[hidden] { display: none; }

@media (min-width: 901px) {
  .csb-scrim, .csb-rail { display: none !important; }
}
@media (max-width: 900px) {
  body.has-sidebar #app,
  body.has-sidebar.csb-collapsed #app { padding-left: 12px; }
  body.has-sidebar .csb { transform: translateX(-100%); transition: transform 0.18s ease; width: var(--csb-w); }
  body.has-sidebar.csb-open .csb { transform: none; }
  /* Cinto de segurança: desde 23/09/2026 client-sidebar.js não aplica mais
     .collapsed abaixo de 900px (o estado é de coluna, não de drawer). Os
     overrides que desfaziam o colapso item a item saíram junto — desfaziam só
     os rótulos e deixavam item, cabeçalho, CTA e rodapé centralizados. */
  body.has-sidebar .csb.collapsed { width: var(--csb-w); }
  .cw-topbar { gap: 16px; padding: 16px 0 14px; }
  .cw-metrics { gap: 20px; }
  .cw-metric-val { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .csb, body.has-sidebar .csb { transition: none; }
}

/* ── Tags do projeto (pilares + venture) ────────────────────────────────────
   extra.tags, ver ClientRegistry.TAGS. Cor fixa por tag (não var de tema: nos temas
   alternativos --accent/--magenta/--lilas colapsam na mesma cor e as tags deixariam
   de se distinguir), texto misturado com --text pra ler no claro e no escuro. */
.cl-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.cl-tag {
  --tag: #64748B;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 600; line-height: 1; letter-spacing: .01em;
  padding: 3px 7px; border-radius: 999px; white-space: nowrap;
  color: color-mix(in srgb, var(--tag) 70%, var(--text));
  background: color-mix(in srgb, var(--tag) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--tag) 28%, transparent);
}
.cl-tag[data-tag="tecnologia"]  { --tag: #0891B2; }
.cl-tag[data-tag="comunicacao"] { --tag: #8B5CF6; }
.cl-tag[data-tag="educacao"]    { --tag: #D97706; }
.cl-tag[data-tag="vendas"]      { --tag: #DB2777; }
.cl-tag[data-tag="venture"]     { --tag: #7C8BA1; }
/* wrap: com muitas tags elas descem pra linha de baixo em vez de espremer o nome */
.ch-row-name { flex-wrap: wrap; row-gap: 4px; }
.ch-row-name .cl-tags { margin-left: 4px; }
.ch-card-meta .cl-tags { margin-top: 5px; }
.pg-id .cl-tags { margin: 3px 0 1px; }

/* Barra de filtro da home de Projetos */
.ch-tagbar { display: flex; flex-wrap: wrap; gap: 6px; margin: -8px 0 18px; }
.ch-tagbar-btn {
  font-family: inherit; cursor: pointer; font-size: 12px; font-weight: 600;
  padding: 5px 11px; border-radius: 999px; line-height: 1.2;
}
.ch-tagbar-btn:not(.cl-tag) { background: none; border: 1px solid var(--border); color: var(--text-muted); }
.ch-tagbar-btn.cl-tag { font-size: 12px; padding: 5px 11px; background: none; }
.ch-tagbar-btn .n { opacity: .6; font-variant-numeric: tabular-nums; }
.ch-tagbar-btn.active:not(.cl-tag) { border-color: var(--text); color: var(--text); }
.ch-tagbar-btn.cl-tag.active { background: color-mix(in srgb, var(--tag) 18%, transparent); border-color: var(--tag); }

/* Editor no workspace (aba Visão Geral) */
.cd-tags { margin-bottom: 24px; }
.cd-tags .cd-col-label { padding: 0 0 8px; border-bottom: none; background: none; position: static; }
.cd-tags-list { gap: 6px; }
.cd-tags-list .cl-tag { font-size: 12.5px; padding: 6px 12px; }
.cd-tag-btn { font-family: inherit; cursor: pointer; }
.cd-tag-btn:not(.on) { background: none; border-style: dashed; color: var(--text-muted); border-color: var(--border); }
.cd-tag-btn:not(.on):hover { color: var(--text); border-color: var(--tag); }
.cd-tag-btn:disabled { opacity: .5; cursor: default; }

/* ── Objetivo do cliente (aba Visão Geral) ─────────────────────────────────
   Campo de uma linha em extra.objetivo. É o que alimenta a linha de objetivo do
   card no portfólio; enquanto vazio, o card simplesmente não mostra a linha. */
.cd-objetivo { margin-bottom: 24px; }
.cd-objetivo .cd-col-label { padding: 0 0 8px; border-bottom: none; background: none; position: static; }
.cd-objetivo-view { display: flex; align-items: baseline; gap: 10px; }
.cd-objetivo-view[hidden], .cd-objetivo-form[hidden] { display: none !important; }
.cd-objetivo-text { font-size: 15px; line-height: 1.5; color: var(--text); max-width: 62ch; }
.cd-objetivo-view[data-empty] .cd-objetivo-text { color: var(--text-muted); font-size: 13.5px; font-style: italic; }
.cd-objetivo-edit {
  background: none; border: none; color: var(--lilas-ink);
  cursor: pointer; font-size: 12px; padding: 2px 6px; border-radius: 4px; flex-shrink: 0;
}
.cd-objetivo-edit:hover { background: color-mix(in srgb, var(--lilas) 15%, transparent); }
.cd-objetivo-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cd-objetivo-input {
  flex: 1; min-width: 260px; max-width: 62ch;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); font-family: inherit; font-size: 14px; padding: 8px 11px;
}
.cd-objetivo-input:focus { outline: none; border-color: var(--accent); }
.cd-objetivo-save, .cd-objetivo-cancel {
  border-radius: 6px; padding: 8px 14px; font-size: 12.5px; font-weight: 600;
  font-family: inherit; cursor: pointer;
}
.cd-objetivo-save { background: var(--green-bg); border: 1px solid var(--green-bg); color: var(--green); }
.cd-objetivo-save:disabled { opacity: 0.5; cursor: default; }
.cd-objetivo-cancel { background: none; border: 1px solid var(--border); color: var(--text-muted); }
.cd-objetivo-cancel:hover { color: var(--text); border-color: var(--text-muted); }

/* ── Nav global adotada pela sidebar ───────────────────────────────────────
   #navTabs e os a.nav-tab-link são os nós ORIGINAIS do header, movidos pra
   dentro da barra. O CSS deles era feito pra uma linha horizontal: aqui vira
   coluna, com a mesma pinta dos .csb-item. */
.csb-global[hidden] { display: none; }
/* #csbGlobalLinks (Manual do Time, Planejador, CRM…) reusa .csb-sec só pelo
   wrapper — o margin-top de 18px daquela classe é pro respiro entre abas e
   Atalhos no modo cliente (#csbShortcutsSec), não faz sentido aqui: quebrava
   a régua visual única do portfólio (item 13/09/2026 do CLAUDE.md). */
.csb-global .csb-sec { margin-top: 0; }
.csb .nav-tabs {
  display: flex; flex-direction: column; gap: 1px;
  background: none; border: none; padding: 0; border-radius: 0; box-shadow: none;
}
.csb .nav-tab,
.csb .nav-tab-link {
  display: flex; align-items: center; gap: 11px;
  width: 100%; padding: 8px 10px; margin: 0;
  border: none; border-radius: 8px; background: none;
  color: var(--text-secondary);
  font-family: inherit; font-size: 13px; font-weight: 500; letter-spacing: 0;
  text-align: left; text-decoration: none; text-transform: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  position: relative; min-width: 0; flex-shrink: 0;
  transition: background 0.13s, color 0.13s;
}
.csb .nav-tab svg,
.csb .nav-tab-link svg { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.85; }
.csb .nav-tab:hover,
.csb .nav-tab-link:hover { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); }
.csb .nav-tab.active {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  box-shadow: none;
}
.csb .nav-tab.active::before {
  content: ''; position: absolute; left: 0; top: 7px; bottom: 7px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--accent);
}
/* Página in-painel aberta (Machado, Repertório, Estudos, Power BI) — app.js marca por data-tab */
.csb .nav-tab-link.active { color: var(--text); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.csb .nav-tab-link.active::before {
  content: ''; position: absolute; left: 0; top: 7px; bottom: 7px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--accent);
}
.csb .nav-tab-link.nav-locked { opacity: 0.45; }

/* ── Grupos com flyout (Ferramentas/Biblioteca/Gestão, Nível 2, 02/10/2026) ──
   Decisão de implementação: expande INLINE dentro da sidebar (empurra o que vem
   depois), não um popover flutuante fora da coluna. .csb-scroll é overflow-y:auto,
   e overflow em só um eixo implicitamente clipa o outro também (CSS: 'auto' +
   'visible' vira 'auto' nos dois) — um popover position:absolute que extravasasse
   a largura de 216px seria cortado ali. O trigger reusa .nav-tab-link (herda hover/
   collapsed de graça); só o painel e o chevron são CSS novo. */
.nav-group-trigger { width: 100%; cursor: pointer; }
.nav-group-chev { margin-left: auto; flex-shrink: 0; opacity: 0.55; transition: transform 0.15s; }
.nav-group-trigger[aria-expanded="true"] .nav-group-chev { transform: rotate(90deg); }
.nav-group-adm {
  flex-shrink: 0; font-size: 9px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--text-muted); background: var(--surface-3, rgba(255,255,255,.06));
  border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px;
}
.nav-group-panel {
  display: flex; flex-direction: column; gap: 1px;
  margin: 2px 0 4px 19px; padding-left: 10px;
  border-left: 1px solid var(--border);
}
.nav-group-panel[hidden] { display: none; }
.nav-group[hidden] { display: none; }
/* Sidebar recolhida (72px, opt-in): o painel expandido não cabe — recolhe junto
   em vez de espremer. Edge case raro (preferência de desktop avançado); revisar
   se algum dia o colapso virar o padrão. */
.csb.collapsed .nav-group-panel { display: none !important; }
.csb.collapsed .nav-group-chev,
.csb.collapsed .nav-group-adm { display: none; }
.csb .nav-tab-arrow { margin-left: auto; opacity: 0.5; font-size: 10px; }
.nav-tab-tag {
  margin-left: auto; flex-shrink: 0;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em;
  padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border); color: var(--text-muted);
}

/* Botão ADM no rodapé da barra */
.csb-adm-slot { display: inline-flex; }
.csb-adm-slot .btn-adm { padding: 4px 9px; font-size: 10.5px; }

/* No modo portfólio o cabeçalho da barra é a marca, não um cliente */
body:not(.csb-cliente) .csb-logo-wrap { display: none; }
body:not(.csb-cliente) .csb-name { font-size: 13px; }
.csb-topback[hidden], .csb-icon-btn[hidden], .csb .nav-tab-link[hidden] { display: none !important; }

.csb.collapsed .nav-tab,
.csb.collapsed .nav-tab-link { justify-content: center; padding: 9px 0; gap: 0; }
.csb.collapsed .nav-tab span:not(.nav-tab-arrow),
.csb.collapsed .nav-tab-link span:not(.nav-tab-arrow) { display: none; }
.csb.collapsed .nav-tab-arrow { display: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   Portfólio — duas visualizações (2026-09-09)
   O toggle no cabeçalho alterna entre lista (densa, comparar de cima a baixo)
   e fichas (respirada, objetivo e próxima ação inteiros). A escolha fica em
   localStorage.painel_portfolio_view.
   ═══════════════════════════════════════════════════════════════════════════ */

.ch-view-toggle {
  display: inline-flex;
  gap: 2px;
  margin-left: 10px;
  padding: 2px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  flex-shrink: 0;
}
.ch-view-btn {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 26px;
  background: none; border: none; border-radius: 6px;
  color: var(--text-muted); cursor: pointer;
  transition: background 0.13s, color 0.13s;
}
.ch-view-btn:hover { color: var(--text); }
.ch-view-btn.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px color-mix(in srgb, var(--text) 10%, transparent); }

/* ── visualização em lista ── */
.ch-list {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 32px;
}
.ch-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 11px 16px;
  border-top: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.13s;
}
.ch-row:first-child { border-top: none; }
.ch-row:hover { background: var(--surface-2); }
.ch-row .ch-logo-wrap { width: 34px; height: 34px; border-radius: 8px; }
.ch-row-main { min-width: 0; }
.ch-row-name {
  font-size: 14px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 6px;
}
.ch-row-sub {
  font-size: 12.5px; color: var(--text-muted); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ch-row-nums { display: flex; gap: 20px; }
/* largura fixa + numeral tabular: é o que faz as colunas alinharem entre linhas */
.ch-rn { text-align: right; min-width: 36px; }
.ch-rn-val {
  display: block; font-size: 15px; font-weight: 700; line-height: 1.15;
  color: var(--text); font-variant-numeric: tabular-nums;
}
.ch-rn-lbl {
  display: block; font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 600;
}
.ch-rn.zero .ch-rn-val { color: var(--text-muted); font-weight: 500; }
.ch-rn.warn .ch-rn-val, .ch-rn.warn .ch-rn-lbl { color: var(--red); }
.ch-rn.hold .ch-rn-val, .ch-rn.hold .ch-rn-lbl { color: var(--yellow); }

/* ═══════════════════════════════════════════════════════════════════════════
   Portfólio — visualização Progresso (2026-09-23)
   O período inteiro por cliente: entregue contra contratado, fase do projeto e
   contexto vivo. Card fecha por padrão — com tudo aberto a página passa de
   10 mil pixels; a linha fechada é que carrega o sinal.
   As três faixas de escopo têm peso diferente de propósito: só "contrato" pode
   ficar vermelha, porque só ela é obrigação assinada. Ver escopo-contratado.json.
   ═══════════════════════════════════════════════════════════════════════════ */

/* barra de período + resumo da carteira */
.pg-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.pg-per { display: inline-flex; gap: 2px; padding: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; }
.pg-per button {
  height: 30px; padding: 0 14px; border: none; border-radius: 7px; background: none;
  color: var(--text-muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.pg-per button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px color-mix(in srgb, var(--text) 10%, transparent); }
.pg-when { font-size: 12.5px; color: var(--text-muted); }
.pg-sum { display: flex; margin-left: auto; }
.pg-s { padding: 0 16px; border-left: 1px solid var(--border); text-align: right; }
.pg-s:first-child { border-left: none; }
.pg-s b { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 21px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pg-s span { font-size: 9.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.pg-s.warn b { color: var(--red); }
.pg-s.mute b { color: var(--text-muted); }

.pg-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; }
.pg-card {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--card-accent, #6c5ce7); border-radius: 12px; overflow: hidden;
}
.pg-card.late { border-color: color-mix(in srgb, var(--red) 30%, var(--border)); border-left-color: var(--red); }

.pg-head { display: flex; align-items: center; gap: 12px; padding: 12px 15px; cursor: pointer; }
.pg-head:hover { background: var(--surface-2); }
.pg-logo { width: 32px; height: 32px; flex: none; }
.pg-id { min-width: 0; flex: 0 1 200px; }
.pg-name { font-size: 14.5px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-name[data-pg-go] { cursor: pointer; }
.pg-name[data-pg-go]:hover { text-decoration: underline; text-underline-offset: 2px; }
.pg-dono { font-size: 11px; color: var(--text-muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pg-prog { flex: 1 1 150px; min-width: 110px; max-width: 240px; }
.pg-prog-top { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.pg-prog-v { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pg-prog-l { font-size: 9.5px; color: var(--text-muted); letter-spacing: .04em; text-transform: uppercase; font-weight: 600; }
.pg-bar-t { height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--text) 8%, transparent); overflow: hidden; }
.pg-bar-f { height: 100%; border-radius: 3px; background: var(--card-accent, #6c5ce7); min-width: 3px; transition: width .4s; }
.pg-prog.empty .pg-prog-v { color: var(--text-muted); font-weight: 600; font-size: 11.5px; }

.pg-sel { display: flex; gap: 7px; margin-left: auto; align-items: center; flex: none; }
.pg-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.pg-chip.ok   { background: var(--green-bg); color: var(--green); }
.pg-chip.over { background: color-mix(in srgb, var(--lilas) 16%, transparent); color: var(--lilas-ink); }
.pg-chip.low  { background: var(--yellow-bg); color: var(--yellow); }
.pg-chip.bad  { background: var(--red-bg); color: var(--red); }
.pg-chip.na   { background: var(--surface-2); color: var(--text-muted); font-weight: 600; }
.pg-caret { width: 20px; text-align: center; color: var(--text-muted); font-size: 13px; flex: none; }

.pg-body { border-top: 1px solid var(--border); }
.pg-sec { padding: 11px 15px; border-top: 1px solid var(--border); }
.pg-body > .pg-sec:first-child { border-top: none; }
.pg-sec-flush { padding: 0; }
.pg-lbl { font-size: 9.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 7px; display: flex; gap: 6px; align-items: center; }
.pg-lbl .n { color: var(--red); }
.pg-txt { font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.pg-txt.pg-mut { color: var(--text-muted); font-style: italic; }

/* linha do tempo das fases (extra.roadmap) */
.pg-tl { display: flex; align-items: flex-start; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.pg-tl::-webkit-scrollbar { display: none; }
.pg-tl-i { flex: 1 1 0; min-width: 100px; position: relative; padding: 16px 8px 0 0; }
.pg-tl-i::before { content: ''; position: absolute; top: 5px; left: 0; right: 0; height: 2px; background: color-mix(in srgb, var(--text) 10%, transparent); }
.pg-tl-i:first-child::before { left: 5px; }
.pg-tl-i:last-child::before { right: calc(100% - 6px); }
.pg-tl-d { position: absolute; top: 0; left: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--surface); border: 2.5px solid color-mix(in srgb, var(--text) 22%, transparent); }
.pg-tl-i.done .pg-tl-d { background: color-mix(in srgb, var(--text) 22%, transparent); }
.pg-tl-i.now .pg-tl-d { border-color: var(--card-accent, #6c5ce7); background: var(--card-accent, #6c5ce7); box-shadow: 0 0 0 3px color-mix(in srgb, var(--card-accent, #6c5ce7) 22%, transparent); }
.pg-tl-lb { font-size: 11.5px; font-weight: 600; line-height: 1.3; color: var(--text-muted); }
.pg-tl-i.now .pg-tl-lb { color: var(--text); }
.pg-tl-f { font-size: 10.5px; color: var(--text-muted); margin-top: 1px; line-height: 1.3; }

/* faixas de escopo lado a lado */
.pg-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pg-col { padding: 11px 15px; min-width: 0; }
.pg-col + .pg-col { border-left: 1px solid var(--border); }
.pg-it { display: flex; align-items: center; gap: 9px; padding: 3px 0; font-size: 12.5px; }
.pg-it-n { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-it-v { flex: none; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 12px; min-width: 40px; text-align: right; }
.pg-it-b { flex: none; width: 44px; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--text) 9%, transparent); overflow: hidden; }
.pg-it-b i { display: block; height: 100%; border-radius: 2px; background: var(--green); }
.pg-it-b i.over { background: var(--lilas); }
.pg-it-b i.low  { background: var(--yellow); }
.pg-it-b i.bad  { background: var(--red); }
.pg-mark {
  flex: none; font: inherit; font-size: 10.5px; font-weight: 700; color: var(--text-muted);
  background: none; border: 1px dashed color-mix(in srgb, var(--text) 26%, transparent);
  border-radius: 5px; padding: 2px 8px; cursor: pointer;
}
.pg-mark:hover { color: var(--text); border-color: var(--text-muted); border-style: solid; }
.pg-mark:disabled { opacity: .5; cursor: default; }
.pg-nometa { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* tarefas dentro do card */
.pg-t { display: flex; align-items: baseline; gap: 9px; padding: 3px 0; min-width: 0; cursor: pointer; border-radius: 5px; }
.pg-t:hover { background: var(--surface-2); }
.pg-when { flex: none; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-secondary); min-width: 58px; }
.pg-late { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 17px; padding: 0 6px; border-radius: 4px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pg-t-x { flex: 1 1 auto; min-width: 0; font-size: 12.5px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-who { flex: none; font-size: 10.5px; font-weight: 600; color: var(--text-muted); background: var(--surface-2); border-radius: 4px; padding: 2px 6px; }
.pg-more { font-size: 11.5px; color: var(--text-muted); padding-top: 4px; display: inline-block; }
.pg-foot { display: flex; gap: 9px; align-items: baseline; padding: 9px 15px; border-top: 1px solid var(--border); background: var(--surface-2); }
.pg-foot b { flex: none; font-size: 9.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); }
.pg-foot span { flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* o alternador ganhou rótulo ao virar três opções */
.ch-view-btn { gap: 6px; width: auto; padding: 0 10px; font: inherit; font-size: 12.5px; font-weight: 600; }
.ch-view-btn > span { line-height: 1; }

@media (max-width: 620px) {
  .ch-row { grid-template-columns: 30px minmax(0, 1fr); row-gap: 8px; }
  .ch-row-nums { grid-column: 1 / -1; justify-content: flex-start; gap: 26px; }
  .ch-rn { text-align: left; }
}

/* ============================================================================
   PRODUTOS (#/produtos, 20/10/2026) — catálogo dos produtos da Sirius
   modules/view-produtos.js. Capa da página e mini capa dos cards são SEMPRE
   escuras (como --ink): cor fixa, não segue o tema, senão o texto branco some
   no claro. Mobile no bloco MOBILE v2 (fim do arquivo).
   ============================================================================ */
#produtosContent .pd-page { max-width: 1320px; margin: 0 auto; padding: 8px 0 48px; }
#produtosContent .pd-hero { position: relative; overflow: hidden; border-radius: 16px; padding: 34px 34px 28px; margin-bottom: 22px; color: #fff;
  background: radial-gradient(60% 120% at 0% 0%, rgba(210,78,255,.55), transparent 60%), radial-gradient(55% 120% at 100% 10%, rgba(0,246,245,.45), transparent 60%), radial-gradient(60% 90% at 70% 120%, rgba(182,111,255,.5), transparent 60%), #07101A;
  border: 1px solid rgba(7,239,245,.25); }
#produtosContent .pd-hero::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 32px 32px;
  -webkit-mask-image: linear-gradient(180deg, #000 10%, transparent 90%); mask-image: linear-gradient(180deg, #000 10%, transparent 90%); }
#produtosContent .pd-hero > * { position: relative; }
#produtosContent .pd-orbit { position: absolute; right: -40px; top: 50%; transform: translateY(-50%); width: 300px; height: 300px; pointer-events: none; }
#produtosContent .pd-eb { font: 600 11px 'Inter', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.75); }
#produtosContent .pd-hero h1 { font: 700 40px/1.05 'Space Grotesk', 'Inter', sans-serif; margin: 8px 0; letter-spacing: -.02em; color: #fff; }
#produtosContent .pd-hero h1 em { font-style: normal; background: linear-gradient(90deg, #7FF9F8, #E7A6FF); -webkit-background-clip: text; background-clip: text; color: transparent; }
#produtosContent .pd-hero p { margin: 0; max-width: 560px; color: rgba(255,255,255,.82); font-size: 15px; }
#produtosContent .pd-stats { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
#produtosContent .pd-stat { background: rgba(4,12,19,.55); border: 1px solid rgba(255,255,255,.16); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-radius: 12px;
  padding: 10px 16px; min-width: 130px; text-align: left; color: #fff; cursor: pointer; font: inherit; }
#produtosContent .pd-stat:hover { border-color: rgba(255,255,255,.35); }
#produtosContent .pd-stat b { display: block; font: 700 24px 'Space Grotesk', sans-serif; }
#produtosContent .pd-stat span { font-size: 12px; color: rgba(255,255,255,.75); }
#produtosContent .pd-stat.on { border-color: #7FF9F8; box-shadow: 0 0 0 1px #7FF9F8 inset; }

#produtosContent .pd-tools { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; flex-wrap: wrap; }
#produtosContent .pd-lbl, #produtosContent .pd-hint { font-size: 12px; color: var(--text-muted); }
#produtosContent .pd-hint { margin-left: auto; }
#produtosContent .pd-seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
#produtosContent .pd-seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--text-secondary); font: 600 12px 'Inter', sans-serif;
  padding: 7px 12px; border-radius: 7px; cursor: pointer; min-height: 32px; }
#produtosContent .pd-seg button svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
#produtosContent .pd-seg button.on { background: var(--surface-3); color: var(--text); box-shadow: 0 0 0 1px var(--border-hover) inset; }

#produtosContent .pd-lane { margin-top: 28px; }
#produtosContent .pd-lane:first-child { margin-top: 0; }
#produtosContent .pd-lane > header { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
#produtosContent .pd-lane > header h2 { font: 600 18px 'Space Grotesk', sans-serif; margin: 0; color: var(--text); }
#produtosContent .pd-lane > header small { color: var(--text-muted); font-size: 13px; }
#produtosContent .pd-n { font: 600 12px 'Inter', sans-serif; color: var(--text-muted); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; }
#produtosContent .pd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }

#produtosContent .pd-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
#produtosContent .pd-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
#produtosContent .pd-col > h2 { font: 600 15px 'Space Grotesk', sans-serif; margin: 4px 4px 0; display: flex; align-items: center; gap: 8px; }
#produtosContent .pd-col > h2 small { margin-left: auto; color: var(--text-muted); font: 500 12px 'Inter', sans-serif; }
#produtosContent .pd-col-sub { margin: -8px 4px 0; color: var(--text-muted); font-size: 12px; }
#produtosContent .pd-col .pd-cov { height: 96px; }
#produtosContent .pd-col .pd-cov h3 { font-size: 18px; }

#produtosContent .pd-st { display: inline-flex; align-items: center; gap: 6px; font: 600 11px 'Inter', sans-serif; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
#produtosContent .pd-st::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
#produtosContent .pd-st-ar { color: var(--green); background: var(--green-bg); }
#produtosContent .pd-st-teste { color: var(--yellow); background: var(--yellow-bg); }
#produtosContent .pd-st-construcao { color: var(--lilas-ink); background: color-mix(in srgb, var(--lilas) 14%, transparent); }

#produtosContent .pd-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, border-color .15s; }
#produtosContent .pd-card:hover { transform: translateY(-2px); border-color: var(--border-hover); }
#produtosContent .pd-cov { position: relative; height: 118px; padding: 14px 16px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; overflow: hidden; background: #0A1420; }
#produtosContent .pd-cov::after { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1px); background-size: 14px 14px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000); mask-image: linear-gradient(90deg, transparent, #000); }
#produtosContent .pd-cov > * { position: relative; z-index: 1; }
#produtosContent .pd-cov-Tecnologia { background: radial-gradient(90% 140% at 100% 0%, rgba(0,246,245,.55), transparent 60%), linear-gradient(135deg, #0A1A26, #0E2A3A); }
#produtosContent .pd-cov-Comunicação { background: radial-gradient(90% 140% at 100% 0%, rgba(210,78,255,.6), transparent 60%), linear-gradient(135deg, #1A0F26, #2A1440); }
#produtosContent .pd-cov-Educação { background: radial-gradient(90% 140% at 100% 0%, rgba(182,111,255,.6), transparent 60%), linear-gradient(135deg, #130F2A, #1E1842); }
#produtosContent .pd-cov-Vendas { background: radial-gradient(70% 140% at 100% 0%, rgba(0,246,245,.45), transparent 60%), radial-gradient(70% 140% at 60% 120%, rgba(210,78,255,.45), transparent 60%), linear-gradient(135deg, #0B1622, #1A1430); }
#produtosContent .pd-cov-ic { position: absolute !important; right: 10px; bottom: -18px; width: 78px; height: 78px; stroke: #fff; fill: none; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; opacity: .24; z-index: 0 !important; }
#produtosContent .pd-cov-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
#produtosContent .pd-cov-pil { font: 600 10px 'Inter', sans-serif; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.78); }
#produtosContent .pd-cov h3 { margin: 0; font: 700 20px/1.1 'Space Grotesk', sans-serif; max-width: calc(100% - 64px); color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,.35); }
#produtosContent .pd-cov .pd-st { background: rgba(4,12,19,.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
#produtosContent .pd-cov .pd-st-ar { color: #7FF9F8; }
#produtosContent .pd-cov .pd-st-teste { color: #FFC977; }
#produtosContent .pd-cov .pd-st-construcao { color: #D9B8FF; }
#produtosContent .pd-bd { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
#produtosContent .pd-bd p { margin: 0; color: var(--text-secondary); font-size: 13px; flex: 1; }
#produtosContent .pd-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
#produtosContent .pd-pil { font: 500 11px 'Inter', sans-serif; color: var(--text-muted); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 2px 7px; white-space: nowrap; }
#produtosContent .pd-uso { margin-left: auto; font: 500 11px 'Inter', sans-serif; color: var(--text-muted); }
#produtosContent .pd-act { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; min-height: 36px; }
#produtosContent .pd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 7px 12px; border-radius: var(--radius-sm);
  font: 600 12px 'Inter', sans-serif; text-decoration: none; border: 1px solid var(--border); color: var(--text); background: var(--surface-2); white-space: nowrap; }
#produtosContent .pd-btn:hover { border-color: var(--border-hover); }
#produtosContent .pd-btn-pri { background: var(--gradient-btn); border-color: var(--border-hover); color: #fff; }
#produtosContent .pd-nota { font-size: 12px; color: var(--text-muted); }
@media (max-width: 1100px) and (min-width: 901px) {
  #produtosContent .pd-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============================================================================
   MOBILE v2 (20/09/2026) — casca de app em tela estreita
   Barra superior fixa (#mshell, montada por modules/mobile-shell.js) no lugar do
   "☰" flutuante que cobria o título de toda página; seções do cliente em chips
   roláveis na 2ª linha da barra; drawer mais largo e com "×"; e os pontos que
   ainda cortavam no celular (cards do Time, linhas de tarefa, URLs longas).
   Referência de padrão: barra inferior + contexto no topo (Nubank/Duolingo).
   TUDO fica dentro de @media ≤900px / ≤640px ou pointer:coarse — o desktop não
   muda. Fica por último no arquivo pra vencer a cascata.
   ============================================================================ */
#mshell { display: none; }
.csb-close { display: none; }

@media (max-width: 900px) {
  /* ── barra superior ── */
  body.has-sidebar #mshell {
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 43; /* abaixo do scrim (44) e do drawer (45): o drawer cobre a barra */
    padding-top: env(safe-area-inset-top, 0px);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
  }
  .mshell-row { display: flex; align-items: center; gap: 4px; height: 52px; padding: 0 6px 0 4px; }
  .mshell-btn {
    width: 44px; height: 44px; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    background: none; border: none; border-radius: 12px;
    color: var(--text); cursor: pointer; font: inherit;
  }
  .mshell-btn:active { background: color-mix(in srgb, var(--text) 8%, transparent); }
  .mshell-new { color: var(--accent-ink); }
  .mshell-id { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding-left: 2px; }
  .mshell-logo {
    width: 28px; height: 28px; border-radius: 8px; overflow: hidden; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800; color: var(--ink);
  }
  .mshell-logo[hidden] { display: none; }
  .mshell-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
  .mshell-title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 17px; font-weight: 700; letter-spacing: -0.01em; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  /* 2ª linha: seções do cliente (espelho de #csbNav) */
  .mshell-tabs {
    display: flex; gap: 6px; padding: 0 12px 10px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .mshell-tabs::-webkit-scrollbar { display: none; }
  .mshell-tabs[hidden] { display: none !important; }
  .mshell-tab {
    flex: none; display: inline-flex; align-items: center; gap: 6px;
    height: 36px; padding: 0 14px; border-radius: 18px;
    border: 1px solid var(--border); background: var(--surface-2);
    color: var(--text-secondary); font: inherit; font-size: 13px; font-weight: 600;
    cursor: pointer; white-space: nowrap;
  }
  .mshell-tab.on {
    background: color-mix(in srgb, var(--mshell-accent, var(--accent)) 16%, var(--surface));
    border-color: color-mix(in srgb, var(--mshell-accent, var(--accent)) 55%, var(--border));
    color: var(--text);
  }
  .mshell-badge {
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
  }

  /* O conteúdo desce pra não ficar sob a barra (52px; +46px da linha de seções
     dentro de um cliente). Mesma especificidade da regra base de padding-top,
     vence por vir depois. */
  body.has-sidebar #app,
  body.has-sidebar.csb-collapsed #app { padding-top: calc(64px + env(safe-area-inset-top, 0px)); }
  body.has-sidebar.csb-cliente #app,
  body.has-sidebar.csb-cliente.csb-collapsed #app { padding-top: calc(106px + env(safe-area-inset-top, 0px)); }

  /* O "☰" flutuante antigo sai de cena — a barra chama o mesmo #csbOpen. */
  .csb-rail { display: none !important; }
  /* A sub-nav de Comunicação tinha 56px de recuo só pra desviar desse ☰. */
  body.has-sidebar .cm-subnav { padding: 0 8px; }

  /* ── drawer: mais largo, com "×", sem "recolher" (que gravaria colapso pro desktop) ── */
  :root { --csb-w: min(320px, 86vw); }
  .csb-close {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; margin-right: -8px; flex: none;
    background: none; border: none; border-radius: 10px;
    color: var(--text-muted); cursor: pointer;
  }
  .csb-close:active { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }
  .csb-collapse { display: none !important; }
  .csb-item, .csb .nav-tab, .csb .nav-tab-link { min-height: 44px; }
  .csb-cta { min-height: 44px; }
  .csb-topback { min-height: 40px; }
  /* drawer aberto: barra inferior vai pra baixo do scrim e o fundo não rola */
  body.csb-open #mtabbar { z-index: 43; }
  body.csb-open { overflow: hidden; }

  /* Time: cabeçalho empilha, busca ganha largura */
  .tm-section-header { flex-wrap: wrap; gap: 10px; }
  .tm-section-right { flex-wrap: wrap; gap: 8px; }
}

@media (max-width: 640px) {
  /* ── workspace do cliente: nome já está na barra; métricas em 4 colunas iguais ── */
  body.csb-cliente .cw-title { display: none; }
  .cw-topbar { gap: 10px; padding: 6px 0 12px; }
  .cw-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; }
  .cw-metric { min-width: 0; }
  .cw-metric-val { font-size: 22px; }
  .cw-metric-lbl { font-size: 9.5px; letter-spacing: 0.4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* ── linha de tarefa: responsável e prazo descem pra baixo do título ── */
  .cd-task-row { flex-wrap: wrap; row-gap: 4px; padding: 10px 12px; }
  .cd-task-row .cd-t-info { flex: 1 1 0; min-width: 55%; }
  .cd-task-row .cd-t-name { font-size: 14px; }
  .cd-task-row .cd-t-meta { flex: 0 0 100%; padding-left: 62px; justify-content: flex-start; flex-wrap: wrap; }
  .cd-task-row .cd-t-owner { font-size: 11px; }
  .cd-task-row .cd-t-deadline { font-size: 12px; }

  /* ── Time: 1 coluna sem estourar (o card crescia até 373px por min-content) ── */
  .tm-grid { grid-template-columns: minmax(0, 1fr); padding: 12px 0; }
  .tm-card { min-width: 0; }
  .tm-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tm-stat { min-width: 0; }
  .tm-stat-lbl { font-size: 9.5px; letter-spacing: 0.3px; }
  .tm-section-header { padding: 14px 0 12px; }
  .tm-section-right { width: 100%; }
  .tm-section-right .search-field { flex: 1 1 100%; min-width: 0; }
  .tm-section-right .search-field input { min-height: 40px; font-size: 14px; }
  .tm-admin-btn { flex: 1 1 auto; min-height: 40px; }

  /* ── URL/link longo quebra em vez de vazar (Pasta do Drive etc.) ── */
  #clientDetailContent a,
  .cd-ov-row, .cd-ov-text, .cd-objetivo-text { overflow-wrap: anywhere; word-break: break-word; }
  .cd-documentos .ch-shortcuts { flex-wrap: wrap; overflow: visible; }

  /* Comunicação: 4 abas cabem em 360px com padding menor */
  .cm-subtab { padding: 12px 9px 11px; font-size: 13px; }

  /* Barra de filtros da lista de tarefas: status e controles viram duas linhas
     roláveis na horizontal (chips), em vez de empilhar 3-4 linhas de selects. */
  .cd-filter-tabs { padding: 8px 12px; flex-wrap: wrap; row-gap: 8px; }
  .cd-status-tabs { flex: 0 0 100%; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .cd-status-tabs::-webkit-scrollbar { display: none; }
  .cd-status-tabs .cd-filter-tab { flex: none; white-space: nowrap; }
  .cd-bar-controls { flex: 0 0 100%; margin-left: 0; padding-left: 0; border-left: none; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .cd-bar-controls::-webkit-scrollbar { display: none; }
  .cd-bar-controls > * { flex: none; }

  /* Power BI: o CSS da página é injetado pelo módulo (vence por ordem), daí a
     especificidade extra. Recuo menor, KPIs em 2 colunas, gráficos em 1, e
     clip horizontal — a página alargava a viewport em 6px (tabela larga rola
     dentro do próprio wrapper, isso continua). */
  body.has-sidebar .pbi-wrap { padding: 16px 12px 40px; overflow-x: clip; }
  body.has-sidebar .pbi-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.has-sidebar .pbi-charts, body.has-sidebar .pbi-mini-cards { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  /* Drawer no modo portfólio: a nav global vive DENTRO da sidebar, e a regra que
     esconde #navTabs/.nav-tab-link em favor da barra inferior deixava o drawer
     vazio (só "+ Nova tarefa" e o rodapé). Dentro do drawer ela volta. */
  body.has-sidebar .csb #navTabs { display: flex !important; }
  body.has-sidebar .csb .nav-tab-link { display: flex !important; }
  body.has-sidebar .csb .nav-tab-link[hidden] { display: none !important; }
  /* FAB "Notas" sobe pra cima da barra inferior (e vai pra baixo do scrim) */
  .myday-rail { bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
  body.csb-open .myday-rail { z-index: 43; }
  /* Meu Dia: o título já está na barra superior — fica só a data como 1ª linha */
  body.has-sidebar .myday-title { display: none; }
  body.has-sidebar .myday-date { font-size: 13px; }
  /* Projetos: cabeçalho empilhado — título + contagem + alternador na 1ª linha, busca embaixo */
  .ch-section-header { flex-wrap: wrap; align-items: center; gap: 10px; padding: 4px 0 14px; margin-bottom: 16px; }
  .ch-section-header .ch-section-count { margin-right: auto; }
  .ch-section-header .search-field { flex: 1 1 100%; min-width: 0; order: 3; }
  .ch-section-header .search-field input { min-height: 40px; font-size: 14px; }
}

@media (min-width: 641px) and (max-width: 1100px) {
  /* Barra de filtros do workspace (iPad deitado / janela estreita): os controles
     (Por responsável, Datas, Subprojeto, busca) espremiam os status numa coluna
     torta. Status ficam na 1ª linha; os controles descem inteiros pra 2ª.
     (≤640 tem a própria versão rolável no bloco acima — por isso o min-width.) */
  .cd-filter-tabs { flex-wrap: wrap; row-gap: 8px; }
  .cd-status-tabs { flex: 1 1 auto; }
  .cd-bar-controls { flex: 0 0 100%; margin-left: 0; padding-left: 0; border-left: none; flex-wrap: wrap; }
  /* a busca recolhida reservava 140px e caía sozinha numa 3ª linha */
  .cd-bar-controls .search-field.cd-search-collapsible { flex: 0 0 auto; min-width: 0; }
  .cd-bar-controls .search-field.cd-search-collapsible.expanded,
  .cd-bar-controls .search-field.cd-search-collapsible.has-value { flex: 1 1 200px; }
}

/* Alvos de toque ≥40px nas listas/filtros — só toque E tela estreita. Em iPad
   (1024px, também "coarse") deixar esses botões mais altos deslocava o layout
   inteiro em relação ao desktop; ali o alvo original já é confortável. */
@media (pointer: coarse) and (max-width: 900px) {
  .cd-filter-tab, .tm-filter-btn, .tm-feedback-btn, .tm-back, .tm-btn-new-task,
  .tm-prio-toggle, .tm-date-filter, .cd-ctrl, .cd-ctrl-select, .search-field input { min-height: 40px; }
  .tm-nav-prev, .tm-nav-next, .cd-nav-prev, .cd-nav-next { min-width: 40px; min-height: 40px; }
  .cd-objetivo-edit, .cd-vivo-edit, .card-edit-btn { min-width: 40px; min-height: 40px; }
}

/* ── Notas em tela estreita (23/09/2026) ────────────────────────────────────
   Entrar nas Notas é uma pílula grande ("Notas"); sair era um » de 24px, igual
   aos outros ícones do cabeçalho — ninguém achava. Em tela cheia "recolher"
   também é a metáfora errada: aqui o MESMO #myDayCollapse vira um chip
   "× Fechar" de 40px (handler e estado inalterados, só o rosto muda), e os
   demais ícones do painel sobem pro mesmo piso de toque. */
@media (max-width: 900px) {
  .notas-head { gap: 8px; }
  .notas-head .notas-icon-btn,
  .notas-search-wrap .notas-icon-btn { width: 40px; height: 40px; border-radius: 10px; }
  .notas-head .notas-icon-btn svg,
  .notas-search-wrap .notas-icon-btn svg { width: 17px; height: 17px; }
  .notas-head .notas-close-btn {
    width: auto; flex: none; margin-left: auto;
    padding: 0 12px; gap: 6px;
    border: 1px solid var(--border);
    color: var(--text);
  }
  .notas-head .notas-close-btn .notas-ico-collapse { display: none; }
  .notas-head .notas-close-btn .notas-ico-close { display: block; }
  .notas-head .notas-close-btn .notas-close-lbl {
    display: inline; font-size: 13.5px; font-weight: 600; line-height: 1;
  }
  /* O seletor de pasta cedia 60% da largura e espremia o chip "Fechar". */
  .notas-head .notas-folder-btn { max-width: 48%; }

  /* iOS dá auto-zoom em qualquer campo focável com fonte < 16px e NÃO desfaz
     sozinho — o app fica ampliado e "panável" até alguém pinçar (no PWA
     instalado nem barra do Safari tem pra denunciar). O piso de 23/09 valia só
     pras Notas e o bug voltou em cada componente novo (modal de tarefa v2,
     chat do Zé, gate de login — visto no iPhone em 02/10/2026). Agora é piso
     GLOBAL de tela estreita: todo campo de texto, select e contenteditable.
     O !important é de propósito — precisa vencer até CSS injetado em runtime
     (#zew-styles do Zé). Ficam de fora: checkbox/radio (iOS não dá zoom neles)
     e .modal-title-input (18px, já acima do piso). (Nada de travar o zoom no
     <meta viewport>: pinçar tem que continuar funcionando.) */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="color"]),
  select,
  textarea:not(.modal-title-input),
  [contenteditable]:not([contenteditable="false"]) {
    font-size: 16px !important;
  }
}

/* ── Progresso em tela estreita (23/09/2026) ────────────────────────────────
   Tudo empilha: barra de período em linha própria, resumo em 3 colunas iguais,
   as duas faixas de escopo uma sobre a outra, e o texto da tarefa quebrando em
   até 2 linhas em vez de cortar no meio. */
@media (max-width: 640px) {
  .pg-bar { gap: 10px; }
  .pg-per { flex: 1 1 100%; }
  .pg-per button { flex: 1; padding: 0 8px; }
  .pg-when { flex: 1 1 100%; order: 3; }
  .pg-sum { margin-left: 0; flex: 1 1 100%; order: 4; }
  .pg-s { flex: 1; padding: 0 10px; text-align: left; min-width: 0; }
  .pg-s:first-child { padding-left: 0; }
  .pg-s b { font-size: 19px; }

  .pg-head { flex-wrap: wrap; row-gap: 9px; padding: 11px 12px; }
  .pg-id { flex: 1 1 auto; }
  .pg-caret { order: 3; margin-left: auto; }
  .pg-prog { flex: 1 0 100%; order: 4; max-width: none; }
  .pg-sel { order: 5; flex: 1 0 100%; margin-left: 0; flex-wrap: wrap; }

  .pg-cols { grid-template-columns: minmax(0, 1fr); }
  .pg-col + .pg-col { border-left: none; border-top: 1px solid var(--border); }
  .pg-col, .pg-sec { padding-left: 12px; padding-right: 12px; }
  .pg-sec-flush { padding-left: 0; padding-right: 0; }

  .pg-t { flex-wrap: wrap; row-gap: 2px; }
  .pg-t-x { flex: 1 1 100%; order: 3; white-space: normal;
            display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .pg-foot { flex-wrap: wrap; row-gap: 3px; padding-left: 12px; padding-right: 12px; }
  .pg-foot span { flex: 1 1 100%; white-space: normal;
                  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .pg-tl-i { min-width: 116px; }

  /* Três botões com rótulo não cabem em 360px na mesma linha do título. */
  .ch-section-header .ch-view-toggle { flex: 1 1 100%; order: 3; justify-content: space-between; margin-left: 0; }
  .ch-section-header .ch-view-btn { flex: 1; justify-content: center; }

  /* Tags (28/09/2026): ao lado do nome espremem o nome em duas linhas — na
     lista descem pra uma linha própria; o filtro vira faixa de rolagem. */
  .ch-row-name .cl-tags { flex: 1 1 100%; margin-left: 0; }
  .ch-tagbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 0 14px; padding-bottom: 2px; }
  .ch-tagbar::-webkit-scrollbar { display: none; }
  .ch-tagbar-btn { flex: none; }
}

/* Alvo de toque no que se marca e se abre — só toque e tela estreita. */
@media (pointer: coarse) and (max-width: 900px) {
  .pg-mark { min-height: 30px; padding: 0 12px; }
  .pg-per button { min-height: 40px; }
  .pg-head { min-height: 56px; }
}

/* Rotina (#/rotina, 12/10/2026) — o CSS base é injetado por modules/view-rotina.js
   (entra depois desta folha), por isso o prefixo #rotinaContent pra vencer a cascata.
   ≤1100: método e combinados descem pra depois da linha do tempo; ≤900: semana compacta. */
@media (max-width: 1100px) {
  #rotinaContent .rv-cols { grid-template-columns: 1fr; }
  #rotinaContent .rv-aside { position: static; }
}
@media (max-width: 900px) {
  #rotinaContent .rv-wrap { padding: 16px; }
  #rotinaContent .rv-hero { grid-template-columns: 1fr; }
  #rotinaContent .rv-hero .rv-pill { justify-self: start; }
  #rotinaContent .rv-week { gap: 6px; }
  #rotinaContent .rv-wd .rv-lg { display: none; }
  #rotinaContent .rv-wd .rv-sm { display: block; font-size: 11px; }
  #rotinaContent .rv-tl li { grid-template-columns: 62px 1fr; gap: 8px; }
}

/* Produtos (#/produtos, 20/10/2026) — base no bloco PRODUTOS antes do MOBILE v2.
   ≤900: capa compacta (números em 3 colunas), Quadro vira uma coluna por vez com os
   números da capa servindo de abas (chips, nunca drawer); ≤640: cards em 1 coluna. */
@media (max-width: 900px) {
  #produtosContent .pd-page { padding: 0 0 32px; }
  #produtosContent .pd-hero { padding: 22px 18px 18px; border-radius: 14px; margin-bottom: 16px; }
  #produtosContent .pd-hero h1 { font-size: 28px; }
  #produtosContent .pd-hero p { font-size: 14px; }
  #produtosContent .pd-orbit { width: 180px; height: 180px; right: -50px; top: 30%; opacity: .55; }
  #produtosContent .pd-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  #produtosContent .pd-stat { min-width: 0; padding: 8px 10px; min-height: 44px; }
  #produtosContent .pd-stat b { font-size: 20px; }
  #produtosContent .pd-stat span { font-size: 11px; }
  #produtosContent .pd-seg button { min-height: 40px; padding: 8px 14px; }
  #produtosContent .pd-hint { display: none; }
  #produtosContent .pd-cols { grid-template-columns: 1fr; }
  #produtosContent .pd-col { display: none; background: transparent; border: 0; padding: 0; }
  #produtosContent .pd-col.on { display: flex; }
  #produtosContent .pd-col > h2, #produtosContent .pd-col-sub { display: none; }
  #produtosContent .pd-cov { height: 104px; }
  #produtosContent .pd-act .pd-btn { flex: 1; min-height: 40px; }
}
@media (max-width: 640px) {
  #produtosContent .pd-grid { grid-template-columns: 1fr; }
}

/* ============================================================================
   ZÉ WIDGET — coordenação de canto (24/09/2026)
   A estrela do Zé (modules/widget-ze.js) mora fixa em right:24px/bottom:24px —
   o próprio módulo injeta seu CSS. Aqui só deslocam os elementos QUE JÁ
   ocupavam esse canto, pra não empilhar em cima da estrela. Fica por último
   no arquivo pra vencer a cascata (mesma razão do bloco MOBILE v2 acima).
   ============================================================================ */
.toast { bottom: 92px; }
@media (max-width: 1280px) {
  .myday-rail { bottom: 88px; }
}
@media (max-width: 640px) {
  .myday-rail { bottom: calc(158px + env(safe-area-inset-bottom, 0px)); }
}
