/* Componentes: cartão, painel, botões, tabela, formulários, estados. */

/* --- Login --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
}
.card.auth { width: 100%; max-width: 380px; padding: var(--space-6); }

.brand { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-5); }
.brand img { width: 32px; height: 32px; }
.brand-name { font-size: 16px; font-weight: 600; }
.brand-sub { font-size: 12px; color: var(--text-muted); }

/* --- Formulários --- */
.field { display: flex; flex-direction: column; gap: var(--space-1); margin-bottom: var(--space-3); }
.field label, .label { font-size: 12px; font-weight: 500; color: var(--text-muted); }
.field .hint { font-size: 12px; color: var(--text-faint); }
.field .error { font-size: 12px; color: var(--danger); }

.input, .select, .textarea {
  width: 100%;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  min-height: 36px;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-bg); }
.select { appearance: auto; }
.input.sm, .select.sm { padding: 4px 8px; min-height: 30px; font-size: 13px; }
.select.inline { width: auto; border-color: transparent; background: transparent; padding: 2px 4px; min-height: 26px; }
.select.inline:hover { border-color: var(--border-strong); background: var(--surface); }
.textarea { min-height: 80px; line-height: 1.5; }
.checkbox { display: flex; align-items: center; gap: var(--space-2); font-size: 14px; margin-bottom: var(--space-4); cursor: pointer; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-3); }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

/* --- Botões --- */
.btn {
  display: inline-flex; justify-content: center; align-items: center; gap: 6px;
  padding: 8px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-weight: 500; white-space: nowrap; min-height: 36px;
}
.btn:hover { background: var(--surface-2); }
.btn[disabled] { opacity: 0.55; cursor: default; }
.btn-primary { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.btn-primary:hover { opacity: 0.9; background: var(--primary); }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { padding: 4px 10px; min-height: 30px; font-size: 13px; }
.btn-icon { padding: 6px; min-height: 32px; width: 32px; border-color: transparent; background: transparent; color: var(--text-muted); position: relative; }
.btn-icon:hover { background: var(--surface-2); color: var(--text); }
.btn svg { width: 16px; height: 16px; }
.btn-block { width: 100%; }
.btn-group { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.btn-group .btn { border: 0; border-radius: 0; }
.btn-group .btn + .btn { border-left: 1px solid var(--border-strong); }
.btn-group .btn.active { background: var(--accent-bg); color: var(--accent); }

kbd {
  font-family: inherit; font-size: 11px; padding: 1px 6px; border: 1px solid var(--border-strong);
  border-bottom-width: 2px; border-radius: 4px; background: var(--surface); color: var(--text-muted);
}

/* --- Mensagens, toast --- */
.message { margin-top: var(--space-3); padding: var(--space-3); border-radius: var(--radius-sm); font-size: 13px; }
.message-error { background: var(--danger-bg); color: var(--danger); }
.message-info { background: var(--warning-bg); color: var(--warning); }
.message-success { background: var(--success-bg); color: var(--success); }

#toast-host { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.toast { background: var(--primary); color: var(--primary-text); padding: 10px 14px; border-radius: var(--radius-sm); box-shadow: var(--shadow); font-size: 13px; animation: toast-in 0.15s ease-out; }
.toast-error { background: var(--danger); color: #fff; }
.toast-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* --- Avatar, badges, chips --- */
.avatar {
  width: 26px; height: 26px; border-radius: 50%; background: var(--border-strong); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600;
  flex-shrink: 0; position: relative; overflow: visible;
}
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar.lg { width: 40px; height: 40px; font-size: 15px; }
.avatar.xl { width: 72px; height: 72px; font-size: 26px; }
.avatar .dot { position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: var(--text-faint); border: 2px solid var(--surface); }
.avatar.online .dot { background: var(--success); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 18px; white-space: nowrap; }
.badge-p { color: #fff; }
.badge-P1 { background: var(--p1); color: #fff; }
.badge-P2 { background: var(--p2); color: #fff; }
.badge-P3 { background: var(--p3); color: #fff; }
.badge-outline { border: 1px solid var(--border-strong); color: var(--text-muted); font-weight: 500; }
.badge-status-a_fazer { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.badge-status-em_andamento { background: var(--accent-bg); color: var(--accent); }
.badge-status-bloqueada { background: var(--danger-bg); color: var(--danger); }
.badge-status-concluida { background: var(--success-bg); color: var(--success); }
.badge-status-cancelada { background: var(--surface-2); color: var(--text-faint); text-decoration: line-through; }
.badge-urgent { background: var(--danger-bg); color: var(--danger); }
.badge-triage { background: var(--warning-bg); color: var(--warning); }
.badge-count { background: var(--danger); color: #fff; position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; border-radius: 999px; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: 999px; font-size: 11px; line-height: 20px; color: #fff; }
.chip button { background: none; border: 0; color: inherit; padding: 0; line-height: 1; opacity: 0.8; }

/* --- Cartão de tarefa --- */
.task-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 10px; display: flex; gap: 8px; align-items: flex-start; cursor: pointer;
  transition: border-color 0.1s, box-shadow 0.1s;
}
.task-card:hover { border-color: var(--border-strong); box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.task-card.dragging { opacity: 0.4; }
.task-card.done { opacity: 0.6; }
.task-card.done .task-title { text-decoration: line-through; }
.task-card.rolled-hot { border-color: var(--p1); background: var(--danger-bg); }
.task-card .check {
  width: 18px; height: 18px; border: 2px solid var(--border-strong); border-radius: 50%; flex-shrink: 0; margin-top: 2px;
  background: none; padding: 0; display: inline-flex; align-items: center; justify-content: center; color: transparent;
}
.task-card .check:hover { border-color: var(--success); color: var(--success); }
.task-card .check.checked { background: var(--success); border-color: var(--success); color: #fff; }
.task-card .check svg { width: 12px; height: 12px; }
.task-card .body { flex: 1; min-width: 0; }
.task-title { font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.task-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin-top: 4px; font-size: 12px; color: var(--text-muted); }
.task-meta svg { width: 13px; height: 13px; vertical-align: -2px; }
.task-meta .overdue { color: var(--danger); font-weight: 500; }
.task-meta .time { color: var(--accent); font-weight: 500; }
.task-card.compact { padding: 6px 8px; }
.task-card.compact .task-meta { margin-top: 2px; }

.task-list { display: flex; flex-direction: column; gap: 6px; }

/* --- Painel lateral --- */
.panel-backdrop { position: fixed; inset: 0; background: var(--overlay); z-index: 40; }
.panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); z-index: 41;
  background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow);
  display: flex; flex-direction: column; animation: panel-in 0.15s ease-out;
}
@keyframes panel-in { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.panel-header { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.panel-body { flex: 1; overflow-y: auto; padding: var(--space-4); }
.panel-title { width: 100%; font-size: 18px; font-weight: 600; border: 1px solid transparent; border-radius: var(--radius-sm); padding: 4px 6px; background: transparent; }
.panel-title:hover { border-color: var(--border); }
.panel-title:focus { border-color: var(--accent); outline: none; background: var(--surface); }
.props { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; align-items: center; margin: var(--space-3) 0; font-size: 13px; }
.props .label { font-size: 12px; }
.section { margin-top: var(--space-5); }
.section h3 { display: flex; align-items: center; gap: 8px; margin-bottom: var(--space-2); font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.section h3 .count { font-weight: 500; color: var(--text-faint); }
.comment { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.comment .who { font-weight: 600; font-size: 13px; }
.comment .when { color: var(--text-faint); font-size: 12px; margin-left: 6px; }
.comment .text { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.history-item { display: flex; gap: 8px; font-size: 12px; padding: 4px 0; color: var(--text-muted); border-top: 1px solid var(--border); }
.history-item .when { color: var(--text-faint); white-space: nowrap; }
.history-item .via-tag { align-self: center; font-size: 10px; line-height: 16px; }
.attachment { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 13px; }
.desc-editor { min-height: 60px; }
.desc-view { white-space: pre-wrap; overflow-wrap: anywhere; padding: 8px 10px; border: 1px solid transparent; border-radius: var(--radius-sm); cursor: text; min-height: 40px; color: var(--text); }
.desc-view:hover { border-color: var(--border); }
.desc-view.empty { color: var(--text-faint); }

/* --- Modal --- */
.modal-backdrop { position: fixed; inset: 0; background: var(--overlay); z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 8vh var(--space-4); overflow-y: auto; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; max-width: 520px; animation: toast-in 0.15s ease-out; }
.modal.wide { max-width: 720px; }
.modal-header { display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.modal-header h2 { margin-right: auto; }
.modal-body { padding: 16px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }

/* --- Criação rápida --- */
.quick-add { display: flex; gap: 8px; align-items: center; }
.quick-add .input { flex: 1; }
.quick-hint { font-size: 12px; color: var(--text-faint); margin-top: 4px; }
.quick-hint code { background: var(--surface-2); padding: 0 4px; border-radius: 3px; }

/* --- Busca global --- */
.search-modal .input { font-size: 16px; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }
.search-results { max-height: 60vh; overflow-y: auto; padding: 8px; }
.search-group { padding: 8px 0; }
.search-group h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); padding: 0 8px 4px; }
.search-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--radius-sm); cursor: pointer; width: 100%; text-align: left; border: 0; background: none; }
.search-item:hover, .search-item.active { background: var(--surface-2); }
.search-item .sub { color: var(--text-muted); font-size: 12px; margin-left: auto; white-space: nowrap; }

/* --- Notificações --- */
.dropdown { position: absolute; top: calc(100% + 6px); right: 0; width: min(380px, 92vw); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 50; }
.dropdown-header { display: flex; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--border); font-weight: 600; }
.dropdown-header .btn { margin-left: auto; }
.notif-list { max-height: 60vh; overflow-y: auto; }
.notif { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: var(--accent-bg); }
.notif .t { font-weight: 500; }
.notif .b { color: var(--text-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif .w { color: var(--text-faint); font-size: 11px; }

/* --- Tabela --- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: 12px; color: var(--text-muted); font-weight: 500; white-space: nowrap; background: var(--surface-2); position: sticky; top: 0; }
.table th.sortable { cursor: pointer; user-select: none; }
.table th.sortable:hover { color: var(--text); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table tr.selected { background: var(--accent-bg); }
.table .title-cell { min-width: 240px; cursor: pointer; font-weight: 500; }
.table td.num { text-align: right; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: var(--space-3); }
.filters .select, .filters .input { width: auto; min-width: 120px; }
.bulk-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 12px; background: var(--accent-bg); border: 1px solid var(--accent); border-radius: var(--radius-sm); margin-bottom: var(--space-3); }
.pagination { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: var(--space-3); font-size: 13px; color: var(--text-muted); }

/* --- Estados --- */
.state { padding: var(--space-6) var(--space-4); text-align: center; color: var(--text-muted); }
.state .btn { margin-top: var(--space-3); }
.skeleton { display: flex; flex-direction: column; gap: 8px; }
.skeleton .bar { height: 14px; border-radius: 4px; background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.skeleton .bar.card { height: 48px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* --- Blocos e colunas --- */
.block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-3); }
.block + .block { margin-top: var(--space-3); }
.block-header { display: flex; align-items: center; gap: 8px; margin-bottom: var(--space-2); }
.block-header h2 { font-size: 14px; margin-right: auto; }
.counter { font-size: 22px; font-weight: 600; }
.counter.over { color: var(--danger); }
.counter-label { font-size: 12px; color: var(--text-muted); }

.column { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); min-height: 240px; display: flex; flex-direction: column; }
.column.drop-over { border-color: var(--accent); background: var(--accent-bg); }
.column-header { padding: 8px 10px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 6px; font-size: 13px; }
.column-header .day-name { font-weight: 600; }
.column-header .day-date { color: var(--text-muted); }
.column-header .counts { margin-left: auto; font-size: 11px; color: var(--text-muted); display: flex; gap: 4px; }
.column.today .column-header { background: var(--accent-bg); }
.column.today .day-name { color: var(--accent); }
.column-body { padding: 8px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.column-body .task-card { cursor: grab; }
.column-add { padding: 4px 8px 8px; }
.column-add .input { font-size: 12px; }

/* --- Linha do tempo (Hoje) --- */
.timeline { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.hour-row { display: flex; min-height: 44px; border-bottom: 1px solid var(--border); }
.hour-row:last-child { border-bottom: 0; }
.hour-row.past { background: var(--surface-2); }
.hour-row.drop-over { background: var(--accent-bg); }
.hour-label { width: 52px; flex-shrink: 0; font-size: 11px; color: var(--text-faint); padding: 4px 8px; border-right: 1px solid var(--border); }
.hour-items { flex: 1; padding: 4px 6px; display: flex; flex-direction: column; gap: 4px; }
.event-chip { background: var(--accent-bg); color: var(--accent); border-left: 3px solid var(--accent); padding: 4px 8px; border-radius: 4px; font-size: 12px; }
.now-line { height: 2px; background: var(--danger); margin: -1px 0; position: relative; }
.now-line::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }

/* --- Progresso, cards de projeto --- */
.progress { height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--success); }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-3); }
.project-card { display: block; color: inherit; text-decoration: none; }
.project-card:hover { text-decoration: none; border-color: var(--border-strong); }

/* --- Abas --- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: var(--space-4); }
.tab { padding: 8px 14px; border: 0; background: none; color: var(--text-muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* --- Tags de sistema --- */
.tag-rolou { background: var(--p1); }

/* --- Lista de pessoas --- */
.person-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.person-row:first-child { border-top: 0; }

.divider { height: 1px; background: var(--border); margin: var(--space-4) 0; }
.help-list { font-size: 13px; color: var(--text-muted); padding-left: 18px; margin: 0; }
.help-list li { margin: 2px 0; }

/* Ajustes: seletores nunca ocupam a linha inteira fora de formulários */
.page-header .select, .page-header .input, .block-header .select, .task-card .select { width: auto; }
.task-card .row .select { flex: 1; min-width: 90px; }
.bulk-bar .select { width: auto; }

/* --- Agenda --- */
.cal-week { display: grid; grid-template-columns: 52px repeat(7, 1fr); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.cal-head { padding: 6px 4px; text-align: center; border-bottom: 1px solid var(--border); border-left: 1px solid var(--border); font-size: 12px; }
.cal-head.today { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.cal-head .d { font-size: 16px; font-weight: 600; }
.cal-times { position: relative; }
.cal-time { height: 48px; font-size: 11px; color: var(--text-faint); text-align: right; padding-right: 6px; border-bottom: 1px solid var(--border); box-sizing: border-box; }
.cal-col { position: relative; border-left: 1px solid var(--border); cursor: crosshair; }
.cal-col.today { background: color-mix(in srgb, var(--accent-bg) 40%, transparent); }
.cal-slot { height: 48px; border-bottom: 1px solid var(--border); box-sizing: border-box; }
.cal-event { position: absolute; left: 2px; right: 2px; border-radius: 4px; padding: 2px 6px; font-size: 12px; overflow: hidden; color: #fff; cursor: pointer; border-left: 3px solid rgba(0,0,0,0.25); z-index: 2; }
.cal-event .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event.meeting { outline: 2px dashed rgba(255,255,255,0.6); outline-offset: -3px; }
.cal-event.declined { opacity: 0.45; text-decoration: line-through; }
.cal-select { position: absolute; left: 2px; right: 2px; background: var(--accent-bg); border: 1px dashed var(--accent); border-radius: 4px; z-index: 3; pointer-events: none; }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 4; pointer-events: none; }
.cal-month { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.cal-month .cal-head { border-left: 0; }
.cal-day { min-height: 96px; border-top: 1px solid var(--border); border-left: 1px solid var(--border); padding: 4px; font-size: 12px; cursor: pointer; }
.cal-day:nth-child(7n+1) { border-left: 0; }
.cal-day.other { color: var(--text-faint); background: var(--surface-2); }
.cal-day.today .n { color: var(--accent); font-weight: 700; }
.cal-day .n { font-weight: 600; margin-bottom: 2px; }
.cal-chip { display: block; color: #fff; border-radius: 3px; padding: 1px 4px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.person-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 12px; cursor: pointer; }
.person-toggle .sw { width: 10px; height: 10px; border-radius: 50%; }
.person-toggle.off { opacity: 0.45; }
@media (max-width: 900px) { .cal-week { grid-template-columns: 40px repeat(7, minmax(90px, 1fr)); } .cal-wrap { overflow-x: auto; } }

/* --- Reunião --- */
.agenda-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; background: var(--surface); margin-bottom: 8px; }
.agenda-item.handled { opacity: 0.7; }
.agenda-item.handled .ai-title { text-decoration: line-through; }
.ai-title { font-weight: 600; }
.record { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-top: 1px solid var(--border); font-size: 13px; }
.record .kind { flex-shrink: 0; width: 64px; }
.record .body { flex: 1; white-space: pre-wrap; overflow-wrap: anywhere; }
.record.superseded .body { text-decoration: line-through; color: var(--text-faint); }
.kind-nota { color: var(--text-muted); }
.kind-decisao { color: var(--accent); font-weight: 600; }
.kind-acao { color: var(--success); font-weight: 600; }
.record-form { border-top: 1px solid var(--border); padding-top: 8px; margin-top: 6px; }
.live-bar { background: var(--accent-bg); border: 1px solid var(--accent); border-radius: var(--radius); padding: 8px 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: var(--space-4); }

/* --- Empresa --- */
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-3); align-items: start; }
.org-area { border-top: 4px solid var(--border-strong); }
.func-card { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; margin-top: 8px; background: var(--surface-2); }
.func-card.vacant { border-style: dashed; color: var(--text-muted); }
.func-card .holders { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; align-items: center; }
.holder-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px 1px 2px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 12px; }
.holder-chip button { border: 0; background: none; padding: 0 2px; color: var(--text-faint); }
.process-row { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 8px; }
.process-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; }
.process-body { padding: 0 12px 12px; border-top: 1px solid var(--border); }
.step-row { display: flex; gap: 8px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--border); font-size: 13px; }
.step-row .n { width: 22px; color: var(--text-faint); }
.step-editor .row { margin-bottom: 6px; }

/* --- Quadros (estilo Miro) ------------------------------------------------ */
.content.board-full { padding: 0; overflow: hidden; display: flex; flex-direction: column; max-width: none; height: calc(100vh - var(--topbar-h)); }
.board-screen { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.board-topbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; }
.board-topbar-group { display: flex; align-items: center; gap: 2px; border: 1px solid var(--border); border-radius: 8px; padding: 2px; }
.board-name { border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; font-size: 15px; font-weight: 600; background: transparent; color: var(--text); min-width: 120px; max-width: 460px; }
.board-name:hover, .board-name:focus { border-color: var(--border-strong); background: var(--surface); outline: none; }
.board-save-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); flex: none; }
.board-save-dot[data-state="err"] { background: var(--danger); animation: pulse 1s infinite alternate; }
@keyframes pulse { from { opacity: 1; } to { opacity: .35; } }
.board-presence { gap: 2px; margin-right: 6px; }
.board-zoom-label { min-width: 52px; font-variant-numeric: tabular-nums; }
.board-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; background: var(--bg); }
.board-svg { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; display: block; outline: none; }
.board-toolbar { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 6px; box-shadow: 0 4px 16px rgba(0,0,0,.08); z-index: 5; }
.board-tool { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: none; border-radius: 9px; background: transparent; color: var(--text); cursor: pointer; }
.board-tool:hover { background: var(--surface-2); }
.board-tool.active { background: var(--accent-bg); color: var(--accent); }
.board-tool-sep { height: 1px; background: var(--border); margin: 4px 4px; }
.board-panel { position: absolute; right: 12px; top: 12px; width: 232px; max-height: calc(100% - 24px); overflow-y: auto; overflow-x: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.08); z-index: 5; }
.board-panel-title { font-weight: 600; margin-bottom: 8px; }
.board-panel-sec { margin-bottom: 12px; }
.board-panel-label { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); margin-bottom: 5px; }
.board-swatches { display: flex; flex-wrap: wrap; gap: 5px; }
.board-swatch { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--border-strong); cursor: pointer; padding: 0; }
.board-swatch.active { outline: 2px solid var(--accent); outline-offset: 1px; }
.board-swatch.custom { width: 24px; height: 24px; }
.board-minimap { position: absolute; right: 12px; bottom: 12px; width: 180px; height: 120px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: 0 4px 16px rgba(0,0,0,.08); z-index: 5; cursor: pointer; }
.board-textedit { position: absolute; z-index: 6; border: 1.5px solid var(--accent); border-radius: 6px; background: var(--surface); color: var(--text); padding: 6px; resize: none; font-family: inherit; line-height: 1.25; box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.board-textedit:focus { outline: none; }
.board-card { cursor: pointer; padding: 0; overflow: hidden; }
.board-card-preview { display: flex; align-items: center; justify-content: center; height: 84px; background: var(--surface-2); color: var(--text-faint); border-bottom: 1px solid var(--border); }
.board-card-body { padding: 12px; }
@media (max-width: 720px) {
  .board-toolbar { flex-direction: row; left: 50%; top: auto; bottom: 10px; transform: translateX(-50%); max-width: calc(100% - 20px); overflow-x: auto; }
  .board-panel { left: 8px; right: 8px; top: auto; bottom: 64px; width: auto; max-height: 42%; }
  .board-minimap { display: none; }
  .board-topbar .board-name { max-width: 140px; }
}

/* --- Aviso de versão nova ---------------------------------------------------- */
.update-banner { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; background: var(--primary); color: var(--primary-text); padding: 10px 16px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.25); z-index: 300; }

/* --- Métricas ------------------------------------------------------------- */
/* Cores das séries: a ordem dos canais foi validada para daltonismo nos dois
   modos (YouTube, Instagram, TikTok, Substack, Meta Ads, Pixel). */
:root {
  --series-youtube: #e34948;
  --series-instagram: #4a3aa7;
  --series-facebook: #119c97;
  --series-tiktok: #1baf7a;
  --series-substack: #eb6834;
  --series-meta_ads: #2a78d6;
  --series-meta_pixel: #eda100;
  --series-panda: #e87ba4;
  --series-kiwify: #008300;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #4a3aa7;
  --series-8: #e34948;
  --chart-grid: #eceef2;
  --chart-axis: #cfd4dc;
}
@media (prefers-color-scheme: dark) {
  :root {
    --series-youtube: #e66767;
    --series-instagram: #9085e9;
    --series-facebook: #2bb5ae;
    --series-tiktok: #199e70;
    --series-substack: #d95926;
    --series-meta_ads: #3987e5;
    --series-meta_pixel: #c98500;
    --series-panda: #d55181;
    --series-kiwify: #008300;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --series-5: #d55181;
    --series-6: #008300;
    --series-7: #9085e9;
    --series-8: #e66767;
    --chart-grid: #262b33;
    --chart-axis: #3b424d;
  }
}

a.tab { text-decoration: none; white-space: nowrap; }
a.tab:hover { color: var(--text); text-decoration: none; }
.tabs { overflow-x: auto; }
.metrics-body { transition: opacity 0.15s; }
.metrics-body.refreshing { opacity: 0.55; pointer-events: none; }
.filter-row { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-3); }
.filter-row .select, .filter-row .input { width: auto; }
.filter-row.period { margin-bottom: 0; }
.section-title { margin: var(--space-5) 0 var(--space-3); }
.crumbs { font-size: 13px; color: var(--text-muted); }
.platform-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.ext-link { display: inline-flex; align-items: center; gap: 4px; }
.table th.num { text-align: right; }
.table th.sorted, .table td.sorted { color: var(--text); font-weight: 600; }
.table td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: var(--space-3) var(--space-4); }
.stat-grid-wide { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-4); margin-bottom: var(--space-3); }
.stat-grid-hero { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-3); }
.stat { min-width: 0; }
.stat-label { font-size: 12px; color: var(--text-muted); }
.stat-value { font-size: 18px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.stat-foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.stat-hero { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-4); }
.stat-hero .stat-value { font-size: 30px; }
.delta { font-size: 12px; font-weight: 500; color: var(--text-muted); white-space: nowrap; }
.delta-good { color: var(--success); }
.delta-bad { color: var(--danger); }

.chart-card { margin-bottom: var(--space-3); }
.chart-card .block-header { flex-wrap: wrap; }
.chart-card .block-header .grow { min-width: 180px; }
.chart-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.chart-pair .chart-card { margin: 0; min-width: 0; }
.chart-pair .block + .block { margin-top: 0; }
@media (max-width: 1000px) { .chart-pair { grid-template-columns: 1fr; } }
.small-multiples { display: grid; gap: var(--space-3); margin-top: var(--space-3); }
.small-multiples .block + .block { margin-top: 0; }
.chart { min-width: 0; }
.chart-plot { position: relative; min-width: 0; }
.chart-plot svg { display: block; overflow: visible; touch-action: pan-y; }
.chart-plot svg:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-sm); }
.chart-empty { padding: var(--space-5) 0; text-align: center; }
.chart-grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart-axis { stroke: var(--chart-axis); stroke-width: 1; }
.chart-cross { stroke: var(--text-faint); stroke-width: 1; pointer-events: none; }
.chart-tick { fill: var(--text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-label { fill: var(--text-muted); font-size: 12px; }
.chart-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { opacity: 0.1; stroke: none; }
.chart-dot { stroke: var(--surface); stroke-width: 2; pointer-events: none; }
.chart-bar { transition: opacity 0.1s; }
.chart-bar.hover { opacity: 0.75; }
.chart-hit { fill: transparent; outline: none; }
.chart-hit:focus-visible { stroke: var(--focus); stroke-width: 2; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: var(--space-2); font-size: 12px; color: var(--text-muted); }
.chart-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.key-line { display: inline-block; width: 14px; height: 3px; border-radius: 2px; flex-shrink: 0; }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 8px 10px; font-size: 12px; white-space: nowrap; }
.chart-tip-title { color: var(--text-muted); margin-bottom: 4px; }
.chart-tip-row { display: flex; align-items: center; gap: 6px; }
.chart-tip-row strong { font-variant-numeric: tabular-nums; }
.chart-table { max-height: 320px; overflow-y: auto; }

.bar-list { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 180px) 1fr minmax(90px, auto); align-items: center; gap: var(--space-3); font-size: 13px; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 12px; }
.bar-fill { height: 100%; border-radius: 0 4px 4px 0; min-width: 2px; }
.bar-value { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .bar-row { grid-template-columns: 1fr auto; } .bar-track { grid-column: 1 / -1; order: 3; } }

.cross-rows { display: grid; gap: var(--space-2); justify-items: start; }
.cross-row { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.cross-row .select { width: auto; }
.cross-result { padding: 8px 0; border-top: 1px solid var(--border); display: grid; gap: 4px; font-size: 13px; }
.cross-result:first-of-type { border-top: 0; }
.connections .block + .block { margin-top: var(--space-3); }
.metrics-accounts .block + .block { margin-top: 0; }
.metrics-accounts .stat-grid { grid-template-columns: 1fr 1fr; }
.connection .input { font-size: 12px; }

/* --- Espaço particular ------------------------------------------------------ */
.space-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin: var(--space-2); padding: 2px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.space-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 0; border-radius: 4px; padding: 5px 6px; background: none; color: var(--text-muted); font-size: 12px; font-weight: 500; }
.space-btn.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(17, 20, 24, 0.12); }
.space-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--private-bg); color: var(--private); font-size: 12px; font-weight: 600; white-space: nowrap; }
:root { --private: #6d28d9; --private-bg: #f3e8ff; }
@media (prefers-color-scheme: dark) { :root { --private: #c4b5fd; --private-bg: #2a1f45; } }
/* No particular, a faixa do topo e o item ativo mudam de cor: dá para saber onde se está de relance. */
body.space-private .topbar { border-bottom: 2px solid var(--private); }
body.space-private .nav-item.active { background: var(--private-bg); color: var(--private); }
body.space-private .space-btn.active { color: var(--private); }
@media (max-width: 600px) { .space-badge { font-size: 0; gap: 0; padding: 5px; } }

/* Agenda cruzada */
.cal-event.other { background: var(--surface-2); color: var(--text); border: 1px dashed var(--border-strong); border-left: 3px solid var(--private); }
.cal-event.other svg { vertical-align: -1px; }
.cal-event.encounter { box-shadow: 0 0 0 2px var(--danger); z-index: 2; }
/* No encontro, cada agenda fica com metade da coluna: uma não esconde a outra. */
.cal-event.encounter:not(.other) { right: 50%; }
.cal-event.other.encounter { left: 50%; }
.cal-chip.other { background: var(--surface-2); color: var(--text); border: 1px dashed var(--border-strong); }
.cal-chip.encounter { box-shadow: 0 0 0 1px var(--danger); }
.encounter-notice { margin: 0 0 var(--space-3); }
.encounter-notice svg { vertical-align: -2px; }

/* Automações */
.token-once { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; overflow-wrap: anywhere; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; user-select: all; }
.check-list { display: grid; gap: 6px; }

/* Páginas públicas de texto (política de privacidade e termos) */
.legal { max-width: 760px; font-size: 15px; line-height: 1.65; padding-bottom: var(--space-6); }
.legal .brand { margin-bottom: var(--space-5); }
.legal h1 { font-size: 26px; margin-bottom: var(--space-1); }
.legal h2 { font-size: 17px; margin: var(--space-5) 0 var(--space-2); }
.legal p, .legal ul { margin: 0 0 var(--space-3); }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 4px; }

.qr { display: block; width: 240px; height: 240px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; image-rendering: pixelated; }
.record .input.sm { width: 170px; flex-shrink: 0; }

/* --- Web Map ---------------------------------------------------------------- */
.wm-site .stat-grid { grid-template-columns: repeat(3, 1fr); }
.wm-snippet { display: grid; gap: var(--space-2); justify-items: start; margin-top: var(--space-2); }
.wm-snippet .token-once { width: 100%; }
.wm-text { user-select: text; font-family: inherit; font-size: 13px; line-height: 1.5; }
.wm-path { overflow-wrap: anywhere; }
.wm-side .table { table-layout: fixed; }
.wm-side .table th.num, .wm-side .table td.num { width: 72px; }
.wm-side .table td { overflow-wrap: anywhere; }
.wm-selector { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.wm-page-select { max-width: 320px; }
.wm-badge-warning { background: var(--warning-bg); color: var(--warning); }
.wm-signals { flex-wrap: wrap; gap: 4px; }
.wm-check { margin: 0; font-size: 13px; }
.wm-split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--space-3); align-items: start; }
.wm-split .block + .block { margin-top: var(--space-3); }
.wm-stage { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.wm-frame { display: block; width: 100%; height: calc(100vh - 250px); min-height: 460px; border: 0; }
.wm-side { min-width: 0; }
.wm-side-stats { grid-template-columns: 1fr 1fr; }
@media (max-width: 1100px) { .wm-split { grid-template-columns: 1fr; } .wm-frame { height: 70vh; } }
.wm-moments { display: grid; gap: 2px; max-height: 52vh; overflow-y: auto; }
.wm-moment { display: grid; grid-template-columns: 44px 1fr; gap: 0 8px; text-align: left; padding: 6px 8px; border: 0; border-left: 3px solid var(--border-strong); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: none; color: inherit; font: inherit; font-size: 13px; }
button.wm-moment { cursor: pointer; }
button.wm-moment:hover { background: var(--surface-2); }
.wm-moment-time { grid-row: span 3; color: var(--text-muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.wm-moment-kind { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.wm-moment-text { overflow-wrap: anywhere; }
.wm-moment-rage { border-left-color: var(--danger); }
.wm-moment-dead { border-left-color: var(--warning); }
.wm-moment-error { border-left-color: var(--text); }
.wm-steps { display: grid; gap: 6px; }
.wm-step .input:first-child { flex: 0 0 38%; }
.wm-step .input { flex: 1; min-width: 0; }
.wm-funnel { display: grid; gap: var(--space-3); }
.wm-funnel-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; font-size: 13px; }
.wm-funnel-order { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border-strong); font-size: 11px; font-weight: 600; color: var(--text-muted); }
.wm-funnel-row { display: grid; grid-template-columns: 1fr minmax(150px, auto); align-items: center; gap: var(--space-3); font-size: 13px; }
.wm-funnel-row .bar-track { height: 16px; }
.wm-funnel-devices { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: var(--space-3); padding-top: var(--space-2); border-top: 1px solid var(--border); }
.wm-settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-3); align-items: start; }
.wm-settings-grid .block + .block { margin-top: var(--space-3); }
@media (max-width: 1000px) { .wm-settings-grid { grid-template-columns: 1fr; } }
.wm-option { align-items: flex-start; margin-bottom: var(--space-3); }
.wm-option input { margin-top: 3px; }
.wm-option-hint { display: block; }
.wm-number { width: 110px; }
.wm-moment > span { min-width: 0; overflow-wrap: anywhere; }
.wm-tracked { overflow-wrap: anywhere; }
.wm-site-header { align-items: flex-start; }
.wm-site-title { margin-right: auto; min-width: 0; }
.wm-site-title h1 { margin-right: 0; }
.wm-tracked-line { font-size: 13px; margin-top: 2px; min-height: 20px; }
.wm-sites .block + .block { margin-top: 0; }
.field label.wm-option { font-size: 14px; font-weight: 400; color: var(--text); margin-bottom: var(--space-2); }
.cross-summary { font-size: 15px; line-height: 1.45; margin: 2px 0 4px; }
.small-multiples + .block { margin-top: var(--space-3); }

/* --- Quadros: grupos na lista ------------------------------------------------ */
.boards-tip { margin: 0 0 var(--space-3); }
.board-card { cursor: grab; }
.board-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.board-card.dragging, .group-header.dragging { opacity: 0.4; }
.board-card.drop-over { box-shadow: -4px 0 0 0 var(--accent); border-color: var(--accent); }
.board-group { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.board-group + .board-group, .group-list + .board-group { margin-top: var(--space-3); }
.board-group .board-group { background: var(--surface); }
.board-group .board-group .board-group { background: var(--surface-2); }
.group-header { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 10px; border-radius: var(--radius); cursor: grab; }
.board-ungrouped .group-header { cursor: default; padding-left: 14px; }
.group-header.drop-over { background: var(--accent-bg); box-shadow: inset 0 0 0 2px var(--accent); }
.group-handle { display: inline-flex; color: var(--text-faint); }
.group-name { font-size: 15px; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.depth-2 > .group-header .group-name, .depth-3 > .group-header .group-name { font-size: 14px; }
.group-actions { gap: 2px; }
.group-body { padding: 0 var(--space-3) var(--space-3); }
.group-body > .group-list:not(:empty) { margin-bottom: var(--space-3); }
.board-drop { min-height: 72px; border-radius: var(--radius); padding: 2px; }
.board-drop.drop-over { background: var(--accent-bg); box-shadow: inset 0 0 0 2px var(--accent); }
.board-drop-empty { display: flex; align-items: center; justify-content: center; border: 1px dashed var(--border-strong); }
.board-drop-hint { padding: var(--space-3); }
/* A faixa de soltar entre grupos só existe enquanto um grupo é arrastado. */
.group-strip { display: none; align-items: center; justify-content: center; height: 30px; margin: 6px 0; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); color: var(--text-muted); font-size: 12px; }
.dragging-group .group-strip { display: flex; }
.group-strip.drop-over { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); }
@media (max-width: 600px) { .group-body { padding: 0 var(--space-2) var(--space-2); } .group-handle { display: none; } }
.boards-body .cards-grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.board-card-body .row.wrap { gap: 4px; }
.board-card-body .btn-sm:not(.btn-icon) { padding-left: 9px; padding-right: 9px; }
/* Cor do grupo: faixa na lateral e um leve tom no cabeçalho. */
.board-group.has-color { border-left: 5px solid var(--group-color); }
.board-group.has-color > .group-header { background: color-mix(in srgb, var(--group-color) var(--group-tint, 12%), transparent); border-radius: 0 var(--radius) 0 0; }
.board-group.has-color.closed > .group-header { border-radius: 0 var(--radius) var(--radius) 0; }
.color-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.color-option { position: relative; display: inline-flex; cursor: pointer; margin: 0; }
.color-option input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.color-swatch { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--swatch); color: #fff; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); }
.color-swatch svg { visibility: hidden; }
.color-swatch.color-none { background: linear-gradient(135deg, var(--surface) 46%, var(--danger) 46%, var(--danger) 54%, var(--surface) 54%); color: var(--text); }
.color-option input:checked + .color-swatch { box-shadow: 0 0 0 2px var(--text); }
.color-option input:checked + .color-swatch svg { visibility: visible; }
.color-option input:checked + .color-swatch.color-none svg { visibility: hidden; }
.color-option input:focus-visible + .color-swatch { outline: 2px solid var(--focus); outline-offset: 3px; }
.board-group.has-color > .group-body { padding-top: var(--space-2); }
.color-swatch.color-light { color: #1f2937; }
.group-list > .board-group { margin-bottom: var(--space-2); }
/* Sobre o cabeçalho colorido, os botões usam a cor do texto: o cinza perdia contraste. */
.board-group.has-color > .group-header .btn-ghost, .board-group.has-color > .group-header .btn-icon, .board-group.has-color > .group-header .group-handle { color: var(--text); }

/* --- Consentimento do OAuth (conector do Claude) --- */
.card.auth.consent { max-width: 460px; }
.consent-title { font-size: 18px; font-weight: 600; margin: 0 0 var(--space-2); }
.consent-facts { display: grid; grid-template-columns: auto 1fr; gap: var(--space-1) var(--space-3); margin: var(--space-3) 0; }
.consent-facts dt { color: var(--text-muted); }
.consent-facts dd { margin: 0; overflow-wrap: anywhere; }
.consent-scopes { border: 0; padding: 0; margin: var(--space-3) 0; display: flex; flex-direction: column; gap: var(--space-2); }
.consent-scopes legend { margin-bottom: var(--space-2); }
.consent-choice { display: flex; gap: var(--space-2); align-items: flex-start; padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.consent-choice:has(input:checked) { border-color: var(--accent); background: var(--accent-bg); }
.consent-choice input { margin-top: 3px; }
.consent-choice > span { display: flex; flex-direction: column; gap: 2px; }
.consent-actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-4); }
/* Vendas (Kiwify): seções em botões que quebram linha no celular. */
.filter-row .btn-group { flex-wrap: wrap; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-2, rgba(127,127,127,.06)); }

/* Ocupado no Google Agenda (só leitura): fica atrás dos compromissos da Gestão. */
.cal-event.busy { background: repeating-linear-gradient(135deg, var(--surface-2), var(--surface-2) 6px, var(--surface) 6px, var(--surface) 12px); color: var(--text-muted, var(--text)); border: 1px solid var(--border-strong); border-left-width: 3px; z-index: 1; }
.cal-chip.busy { background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong); }

/* Painel inicial (tela Hoje) */
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }
.dash-kpi { display: flex; flex-direction: column; gap: 4px; min-width: 0; color: inherit; text-decoration: none; border-left: 3px solid transparent; }
.dash-kpi .stat-value { font-size: 26px; }
.dash-kpi .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-kpi .stat-label { display: flex; align-items: center; gap: 2px; }
a.dash-kpi:hover { border-color: var(--border-strong); border-left-color: var(--accent); }
.dash-kpi-danger { border-left-color: var(--danger); }
.dash-kpi-danger .stat-label { color: var(--danger); }
.dash-kpi-warning { border-left-color: var(--warning); }
.dash-kpi-warning .stat-label { color: var(--warning); }
.dash-progress { height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; }
.dash-progress span { display: block; height: 100%; background: var(--success); border-radius: 999px; transition: width .3s ease; }
.dash-sub { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin: var(--space-3) 0 var(--space-2); }
.dash-agenda { list-style: none; margin: 0; padding: 0; }
.dash-agenda li { display: flex; align-items: baseline; gap: var(--space-2); padding: 6px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.dash-agenda li:last-child { border-bottom: 0; }
.dash-agenda li.past { opacity: .55; }
.dash-agenda a, .dash-agenda .link { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dash-time { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 44px; }
.dash-panel { margin-top: var(--space-4); }
.dash-section + .dash-section { margin-top: var(--space-4); }
.dash-section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-2); }
.dash-section-head h2 { font-size: 16px; margin: 0; }
.dash-section .chart-card { margin-top: var(--space-3); }
.dash-section .chart-pair { margin-top: var(--space-3); }
.dash-section .chart-pair .chart-card { margin-top: 0; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.link:hover { color: var(--accent); text-decoration: underline; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.two-col > div > .block + .block, .two-col > div > section + section, .two-col > div > details { margin-top: var(--space-3); }
@media (max-width: 600px) { .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-kpi .stat-value { font-size: 22px; } }
