/* =============================================================
   COMPONENTS — cards, pipeline, kanban, drawer, modal,
   cronograma, equipe, listas de tarefas, toasts
   ============================================================= */

/* ---------- Grid de campanhas ---------- */
.camp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }

.camp-card {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px; box-shadow: var(--sh-sm);
}
.camp-card-top { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.camp-avatar {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 750; font-size: 14px;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.2);
}
.camp-avatar.sm { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }
.camp-avatar.lg { width: 60px; height: 60px; border-radius: 16px; font-size: 20px; }
.camp-id { flex: 1; min-width: 0; }
.camp-id strong { display: block; font-size: 15px; font-weight: 680; }
.camp-id span { font-size: 12px; color: var(--text-3); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.camp-stage { margin-bottom: 13px; }
.stage-tag {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px;
  background: var(--primary-soft); color: var(--primary-700); border-radius: 8px;
  font-weight: 650; font-size: 12.5px;
}
.stage-tag svg { color: var(--primary); }
.stage-tag.sm { height: 22px; font-size: 11.5px; padding: 0 9px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }

.camp-progress-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.camp-progress-head strong { color: var(--text); }
.camp-card-foot {
  display: flex; align-items: center; gap: 12px; margin-top: 14px; padding-top: 13px;
  border-top: 1px solid var(--border-2); font-size: 12px; color: var(--text-3);
}
.camp-owner { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 550; }

/* ---------- Pipeline de etapas ---------- */
.pipeline { display: flex; align-items: stretch; gap: 4px; flex-wrap: wrap; }
.pipe-step {
  flex: 1; min-width: 92px; display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 12px 8px; border-radius: var(--r-md); border: 1px solid var(--border);
  background: var(--surface-2); text-align: center; transition: all .18s;
}
.pipe-mark {
  width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; background: var(--border); color: var(--text-3);
}
.pipe-name { font-size: 11.5px; font-weight: 600; color: var(--text-3); }
.pipe-step.done { background: var(--success-weak); border-color: color-mix(in srgb, var(--success) 22%, white); }
.pipe-step.done .pipe-mark { background: var(--success); color: #fff; }
.pipe-step.done .pipe-name { color: var(--success); }
.pipe-step.current {
  background: linear-gradient(180deg, var(--primary-soft), #fff); border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-weak), var(--sh-sm); transform: translateY(-1px);
}
.pipe-step.current .pipe-mark { background: var(--primary); color: #fff; font-size: 13px; }
.pipe-step.current .pipe-name { color: var(--primary-700); font-weight: 700; }
.pipe-arrow { display: flex; align-items: center; color: var(--text-3); align-self: center; }
.pipe-arrow svg { opacity: .5; }
.pipeline-compact .pipe-step { min-width: 60px; padding: 8px 4px; }
.pipeline-panel { margin-bottom: 20px; }

/* ---------- Mini stats (campanha) ---------- */
.mini-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.mini-stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 14px 16px; display: flex; align-items: center; gap: 12px; box-shadow: var(--sh-sm);
}
.mini-stat svg { color: var(--tone, var(--primary)); }
.ms-value { font-size: 22px; font-weight: 750; line-height: 1; display: block; }
.ms-label { font-size: 12px; color: var(--text-3); }

/* ---------- Listas de tarefas (rows) ---------- */
.task-list { display: flex; flex-direction: column; gap: 2px; }
.task-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--r);
  cursor: pointer; border: 1px solid transparent;
}
.task-row:hover { background: var(--surface-2); border-color: var(--border); }
.camp-pip, .tl-status-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.task-row-main { flex: 1; min-width: 0; }
.task-row-main strong { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-row-main span { font-size: 11.5px; color: var(--text-3); }
.task-row-meta { display: flex; align-items: center; gap: 10px; flex: none; }
.due { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-3); font-weight: 550; white-space: nowrap; }
.due.due-over { color: var(--danger); }
.due.due-today { color: #b8790a; }

/* ---------- Kanban ---------- */
.kb-board { display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding-bottom: 12px; min-height: 60vh; }
.kb-col {
  flex: 1; min-width: 268px; max-width: 340px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-lg); display: flex; flex-direction: column;
}
.kb-col-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 14px 10px; }
.kb-col-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 680; font-size: 13px; }
.kb-dot { width: 8px; height: 8px; border-radius: 50%; }
.kb-count { min-width: 22px; height: 20px; padding: 0 7px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; font-size: 11.5px; font-weight: 700; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; }
.kb-list { flex: 1; padding: 4px 10px 12px; display: flex; flex-direction: column; gap: 9px; min-height: 80px; border-radius: 0 0 var(--r-lg) var(--r-lg); transition: background .15s; }
.kb-list.drag-over { background: var(--primary-soft); box-shadow: inset 0 0 0 2px var(--primary) ; }
.kb-empty { text-align: center; color: var(--text-3); font-size: 12px; padding: 16px 0; border: 1px dashed var(--border); border-radius: var(--r); }

.task-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 12px; box-shadow: var(--sh-sm); cursor: grab; user-select: none;
}
.task-card:active { cursor: grabbing; }
.task-card.dragging { opacity: .55; transform: rotate(1.5deg); box-shadow: var(--sh-lg); border-color: var(--primary); }
.task-camp { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 650; color: var(--text-2); margin-bottom: 8px; padding: 3px 8px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 20px; }
.task-title { font-size: 13.5px; font-weight: 600; line-height: 1.35; margin-bottom: 9px; }
.task-labels { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.task-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.task-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 9px; border-top: 1px solid var(--border-2); }
.checklist-mini { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.checklist-mini svg { color: var(--success); }

/* ---------- Drawer (detalhe da atividade) ---------- */
.drawer-overlay { position: fixed; inset: 0; background: rgba(15,18,28,.4); backdrop-filter: blur(2px); z-index: 60; opacity: 0; transition: opacity .24s; }
.drawer-overlay.open { opacity: 1; }
.drawer {
  position: absolute; right: 0; top: 0; height: 100%; width: min(560px, 94vw);
  background: var(--surface); box-shadow: var(--sh-xl); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.22,.61,.36,1);
}
.drawer-overlay.open .drawer { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.drawer-crumbs { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.drawer-crumbs svg { color: var(--text-3); }
.drawer-scroll { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-title { font-size: 20px; line-height: 1.3; margin-bottom: 18px; }

.drawer-props { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; padding: 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: 20px; }
.prop { display: flex; flex-direction: column; gap: 5px; }
.prop-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-3); }
.prop-val { font-size: 13.5px; font-weight: 550; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.prop-val svg { color: var(--text-3); }
.prop-val a { color: var(--primary); font-weight: 600; }
.prop-user { display: inline-flex; align-items: center; gap: 7px; }

.drawer-section { margin-bottom: 22px; }
.drawer-section h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); margin-bottom: 11px; display: flex; align-items: center; gap: 8px; }
.sec-count { background: var(--border-2); color: var(--text-2); font-size: 11px; padding: 1px 7px; border-radius: 20px; text-transform: none; letter-spacing: 0; }
.drawer-desc { font-size: 13.5px; color: var(--text-2); line-height: 1.6; }

.ck-progress { margin-bottom: 12px; }
.checklist { display: flex; flex-direction: column; gap: 3px; }
.ck-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--r-sm); cursor: pointer; transition: background .13s; }
.ck-item:hover { background: var(--surface-2); }
.ck-item input { display: none; }
.ck-box { width: 18px; height: 18px; border-radius: 6px; border: 1.7px solid var(--border); display: flex; align-items: center; justify-content: center; color: transparent; transition: all .15s; flex: none; }
.ck-item.checked .ck-box { background: var(--success); border-color: var(--success); color: #fff; }
.ck-text { font-size: 13.5px; }
.ck-item.checked .ck-text { color: var(--text-3); text-decoration: line-through; }

.comments { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.comment { display: flex; gap: 10px; }
.comment-body { flex: 1; }
.comment-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.comment-head strong { font-size: 13px; }
.comment-head span { font-size: 11px; color: var(--text-3); }
.comment-body p { font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
.comment-add { display: flex; align-items: center; gap: 9px; }
.comment-add input { flex: 1; height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r); outline: none; }
.comment-add input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-weak); }

.history, .hist-item { display: flex; flex-direction: column; }
.history { gap: 2px; }
.hist-item { flex-direction: row; gap: 11px; padding: 6px 0; }
.hist-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 6px; flex: none; box-shadow: 0 0 0 3px var(--primary-weak); }
.hist-item p { font-size: 13px; color: var(--text-2); }
.hist-item span { font-size: 11px; color: var(--text-3); }

/* ---------- Modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15,18,28,.46); backdrop-filter: blur(2px); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; transition: opacity .2s; }
.overlay.open { opacity: 1; }
.modal { width: min(520px, 100%); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-xl); max-height: 90vh; overflow-y: auto; transform: scale(.96) translateY(8px); transition: transform .22s cubic-bezier(.22,.61,.36,1); }
.overlay.open .modal { transform: none; }
.modal-lg { width: min(680px, 100%); }
.modal-sm { width: min(420px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); }
.modal-body { padding: 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* ---------- Cronograma (campanha) ---------- */
.timeline-stages { display: flex; flex-direction: column; gap: 12px; }
.tl-stage { border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; background: var(--surface-2); border-left: 3px solid var(--border); }
.tl-stage.done { border-left-color: var(--success); }
.tl-stage.current { border-left-color: var(--primary); background: linear-gradient(180deg, var(--primary-soft), var(--surface-2)); }
.tl-stage-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tl-badge { width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--text-2); }
.tl-stage.done .tl-badge { background: var(--success); color: #fff; border-color: var(--success); }
.tl-stage.current .tl-badge { background: var(--primary); color: #fff; border-color: var(--primary); }
.tl-stage-head h4 { flex: 1; font-size: 14px; }
.tl-tag { font-size: 11px; font-weight: 650; color: var(--text-3); background: var(--surface); border: 1px solid var(--border); padding: 3px 9px; border-radius: 20px; }
.tl-tasks { display: flex; flex-direction: column; gap: 3px; }
.tl-task { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; }
.tl-task:hover { background: var(--surface); }
.tl-task-title { flex: 1; font-size: 13px; font-weight: 550; }
.tl-task.over .tl-task-title { color: var(--danger); }
.tl-date { font-size: 11.5px; color: var(--text-3); }

/* ---------- Cronograma global (timeline view) ---------- */
.cg-panel { padding-bottom: 8px; }
.cg-scroll { overflow-x: auto; }
.cg-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--border-2); min-width: 820px; }
.cg-row:last-child { border-bottom: none; }
.cg-head { border-bottom: 1px solid var(--border); }
.cg-label { width: 210px; flex: none; padding: 12px 14px; display: flex; align-items: center; }
.cg-camp { gap: 10px; cursor: pointer; border-radius: var(--r); }
.cg-camp:hover { background: var(--surface-2); }
.cg-camp strong { display: block; font-size: 13px; }
.cg-camp span { font-size: 11px; color: var(--text-3); }
.cg-camp .risk { margin-left: auto; }
.cg-track { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); }
.cg-cell { border-left: 1px solid var(--border-2); padding: 12px 8px; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; position: relative; }
.cg-stage-head { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--text-3); min-height: 0; padding: 12px 6px; }
.cg-cell.done { background: color-mix(in srgb, var(--success) 5%, transparent); }
.cg-cell.current { background: var(--primary-soft); }
.cg-here { position: absolute; top: 5px; right: 6px; color: var(--primary); }
.cg-dots { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.cg-dot { width: 9px; height: 9px; border-radius: 50%; }
.cg-more { font-size: 10px; color: var(--text-3); font-weight: 600; }
.cg-legend { display: flex; gap: 14px; flex-wrap: wrap; }
.lg { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-2); }
.lg-dot { width: 9px; height: 9px; border-radius: 50%; }

.ms-list { display: flex; flex-direction: column; }
.ms-row { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--border-2); }
.ms-row:last-child { border-bottom: none; }
.ms-date { width: 130px; flex: none; font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.ms-line { flex: none; width: 40px; height: 3px; border-radius: 3px; background: var(--c); }
.ms-name { flex: 1; font-size: 13.5px; font-weight: 600; }
.ms-name span { font-weight: 500; color: var(--text-3); font-size: 12px; }
.ms-days { font-size: 12px; color: var(--text-3); font-weight: 550; }

/* ---------- Equipe ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.team-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--sh-sm); }
.team-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.team-id { flex: 1; }
.team-id strong { display: block; font-size: 14.5px; font-weight: 680; }
.team-id span { font-size: 12px; color: var(--text-3); }
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.status-dot.ok { background: var(--success); box-shadow: 0 0 0 3px var(--success-weak); }
.status-dot.danger { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-weak); }
.team-metrics { display: flex; gap: 8px; margin-bottom: 14px; }
.tm { flex: 1; text-align: center; padding: 10px 4px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: var(--r); }
.tm-val { display: block; font-size: 18px; font-weight: 750; line-height: 1; }
.tm-lbl { font-size: 10.5px; color: var(--text-3); }
.tm.danger .tm-val { color: var(--danger); }
.team-load-head { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-3); margin-bottom: 6px; }
.team-load-head strong { color: var(--text-2); }

.member-grid { display: flex; flex-direction: column; gap: 8px; }
.member-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--sh-sm); }
.member-main { flex: 1; min-width: 0; }
.member-main strong { display: block; font-size: 13.5px; font-weight: 650; }
.member-main span { font-size: 11.5px; color: var(--text-3); }
.member-nums { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 12px; color: var(--text-2); }
.owner-tag { font-size: 10px; font-weight: 700; color: var(--primary-700); background: var(--primary-soft); padding: 1px 7px; border-radius: 20px; vertical-align: middle; }

/* ---------- Detalhe campanha: header ---------- */
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-3); margin-bottom: 14px; }
.back-link:hover { color: var(--primary); }
.camp-header { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.camp-header-main { flex: 1; min-width: 200px; }
.camp-header-title { display: flex; align-items: center; gap: 12px; }
.camp-header-title h1 { font-size: 23px; }
.camp-header-main p { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); margin-top: 4px; }
.camp-header-main p svg { color: var(--text-3); }
.camp-header-stats { display: flex; gap: 24px; flex-wrap: wrap; }
.hstat { display: flex; flex-direction: column; gap: 3px; }
.hstat > span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-3); }
.hstat strong { font-size: 15px; }

.camp-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.camp-tab { padding: 10px 14px; font-size: 13.5px; font-weight: 600; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .15s; }
.camp-tab:hover { color: var(--text); }
.camp-tab.active { color: var(--primary-700); border-bottom-color: var(--primary); }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-2); }
.about-item span { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-3); margin-bottom: 3px; }
.about-item strong { font-size: 13.5px; }

/* ---------- Configurações ---------- */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cfg-body { display: flex; flex-direction: column; gap: 12px; }
.cfg-line { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 550; padding: 4px 0; }
.cfg-order { width: 22px; height: 22px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-700); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; font-size: 13.5px; font-weight: 550; }
.toggle input { display: none; }
.switch { width: 40px; height: 23px; border-radius: 20px; background: var(--border); position: relative; transition: background .18s; flex: none; }
.switch::after { content: ''; position: absolute; top: 2.5px; left: 2.5px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--sh-sm); transition: transform .18s; }
.toggle input:checked + .switch { background: var(--primary); }
.toggle input:checked + .switch::after { transform: translateX(17px); }
.settings-note { display: flex; align-items: center; gap: 9px; margin-top: 20px; padding: 13px 16px; background: var(--warning-weak); border: 1px solid color-mix(in srgb, var(--warning) 26%, white); border-radius: var(--r-md); font-size: 13px; color: #9a6a08; }
.settings-note svg { color: var(--warning); flex: none; }

/* ---------- Notificações / user menu (modais) ---------- */
.notif-lead { font-size: 12.5px; color: var(--text-3); margin-bottom: 10px; }
.notif-list { padding-top: 16px; }
.notif-item { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: var(--r); cursor: pointer; }
.notif-item:hover { background: var(--surface-2); }
.notif-ic { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex: none; }
.notif-ic.danger { background: var(--danger-weak); color: var(--danger); }
.notif-item strong { display: block; font-size: 13px; }
.notif-item span { font-size: 11.5px; color: var(--text-3); }
.user-menu { padding-top: 12px; display: flex; flex-direction: column; gap: 3px; }
.um-head { display: flex; align-items: center; gap: 12px; padding: 6px 6px 16px; margin-bottom: 6px; border-bottom: 1px solid var(--border-2); }
.um-head strong { display: block; }
.um-head span { font-size: 11.5px; color: var(--text-3); }
.um-item { display: flex; align-items: center; gap: 10px; padding: 10px 10px; border-radius: var(--r); font-size: 13.5px; font-weight: 550; }
.um-item:hover { background: var(--surface-2); }
.um-item svg { color: var(--text-3); }
.muted-item { color: var(--text-3); cursor: default; }

/* ---------- Toasts ---------- */
.toast-host { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  display: flex; align-items: center; gap: 9px; padding: 11px 16px; border-radius: var(--r);
  background: #1f2430; color: #fff; font-size: 13px; font-weight: 550; box-shadow: var(--sh-lg);
  opacity: 0; transform: translateY(10px); transition: all .24s cubic-bezier(.22,.61,.36,1);
}
.toast.show { opacity: 1; transform: none; }
.toast svg { flex: none; }
.toast-success svg { color: #4ade80; }
.toast-error svg { color: #f87171; }
.toast-info svg { color: #93c5fd; }

/* ---------- Toggle segmentado (usado em Super Cronograma) ---------- */
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 3px; gap: 2px; }
.seg-btn { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--primary-soft); color: var(--primary-700); }
.sc-controls { flex-wrap: wrap; }

.sc-check { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); font-size: 13px; font-weight: 550; color: var(--text-2); cursor: pointer; user-select: none; }
.sc-check input { display: none; }
.sc-check-box { width: 18px; height: 18px; border-radius: 5px; border: 1.7px solid var(--border); display: flex; align-items: center; justify-content: center; color: transparent; transition: all .15s; flex: none; }
.sc-check input:checked + .sc-check-box { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Super Cronograma — timeline horizontal (estilo Notion) ---------- */
.tl2-scroll { overflow: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-sm); max-height: calc(100vh - var(--topbar-h) - 150px); min-height: 440px; position: relative; }
.tl2-canvas { position: relative; }

/* Cabeçalho fixo */
.tl2-header { position: sticky; top: 0; z-index: 6; background: var(--surface); border-bottom: 1px solid var(--border); }
.tl2-corner { position: sticky; left: 0; z-index: 7; height: 100%; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; justify-content: center; padding: 0 16px; box-sizing: border-box; }
.tl2-corner-t { font-size: 12px; font-weight: 700; }
.tl2-corner-s { font-size: 11px; color: var(--text-3); }
.tl2-axis { position: absolute; top: 0; height: 100%; }
.tl2-months { position: relative; height: 24px; border-bottom: 1px solid var(--border-2); }
.tl2-month { position: absolute; top: 0; height: 24px; line-height: 24px; padding-left: 8px; font-size: 11px; font-weight: 700; color: var(--text-2); text-transform: capitalize; border-left: 1px solid var(--border-2); white-space: nowrap; overflow: hidden; }
.tl2-days { position: relative; height: 34px; }
.tl2-daycell { position: absolute; top: 0; height: 34px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-left: 1px solid var(--border-2); }
.tl2-daycell.weekend { background: var(--surface-2); }
.tl2-daycell.today { background: var(--primary-soft); }
.tl2-dnum { font-size: 12px; font-weight: 650; color: var(--text-2); line-height: 1; }
.tl2-daycell.today .tl2-dnum { color: var(--primary-700); }
.tl2-dow { font-size: 9px; color: var(--text-3); text-transform: uppercase; margin-top: 1px; }

/* Linha do "hoje" */
.tl2-today-line { position: absolute; bottom: 0; width: 2px; background: var(--primary); opacity: .55; z-index: 2; pointer-events: none; }
.tl2-today-line::before { content: 'Hoje'; position: absolute; top: -1px; left: 50%; transform: translateX(-50%); font-size: 9px; font-weight: 700; color: #fff; background: var(--primary); padding: 1px 6px; border-radius: 0 0 6px 6px; white-space: nowrap; }

/* Corpo / linhas */
.tl2-body { position: relative; }
.tl2-row { position: relative; border-bottom: 1px solid var(--border-2); }
.tl2-row:last-child { border-bottom: none; }
.tl2-rowlabel { position: sticky; left: 0; z-index: 4; height: 100%; background: var(--surface); border-right: 1px solid var(--border); display: flex; align-items: center; padding: 0 14px; box-sizing: border-box; }
.tl2-glabel { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tl2-gmeta { min-width: 0; }
.tl2-gmeta strong { display: block; font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl2-gmeta span { font-size: 11px; color: var(--text-3); }
a.tl2-glabel:hover strong { color: var(--primary-700); }

.tl2-lanes { position: absolute; top: 0; height: 100%;
  background-image: linear-gradient(90deg, var(--border-2) 1px, transparent 1px);
  background-position: 0 0; background-repeat: repeat-x; }

/* Barras de atividade */
.tl2-bar { position: absolute; display: flex; align-items: center; gap: 6px; padding: 0 8px; border-radius: 7px;
  background: color-mix(in srgb, var(--cc) 15%, white); border: 1px solid color-mix(in srgb, var(--cc) 45%, white);
  border-left: 3px solid var(--cc); cursor: pointer; overflow: hidden; box-shadow: var(--sh-sm);
  transition: transform .12s, box-shadow .12s, filter .12s; }
.tl2-bar:hover { transform: translateY(-1px); box-shadow: var(--sh-md); filter: saturate(1.1); z-index: 5; }
.tl2-bar-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.tl2-bar-title { flex: 1; min-width: 0; font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl2-bar-av { flex: none; display: inline-flex; }
.tl2-bar.done { opacity: .62; }
.tl2-bar.done .tl2-bar-title { text-decoration: line-through; color: var(--text-2); }
.tl2-bar.over { border-color: var(--danger); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--danger) 30%, transparent); }

/* ---------- Formulário de atividade (criar/editar) ---------- */
.field textarea { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); outline: none; resize: vertical; font-size: 14px; line-height: 1.5; transition: border-color .15s, box-shadow .15s; }
.field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-weak); }
.lbl-toggles { display: flex; flex-wrap: wrap; gap: 7px; }
.lbl-toggle { height: 26px; padding: 0 11px; border-radius: 20px; font-size: 12px; font-weight: 600; color: var(--text-3); background: var(--surface); border: 1px solid var(--border); transition: all .14s; }
.lbl-toggle:hover { border-color: var(--c); color: var(--c); }
.lbl-toggle.on { color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); border-color: color-mix(in srgb, var(--c) 40%, white); }
.ckedit { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.ckedit-row { display: flex; align-items: center; gap: 8px; }
.ckedit-check { cursor: pointer; }
.ckedit-check input { display: none; }
.ckedit-row > input[type="text"] { flex: 1; height: 36px; padding: 0 11px; border: 1px solid var(--border); border-radius: var(--r); outline: none; }
.ckedit-row > input[type="text"]:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-weak); }
.ckedit-del { width: 34px; height: 34px; color: var(--text-3); }
.ckedit-del:hover { color: var(--danger); background: var(--danger-weak); }
.ckedit-add { align-self: flex-start; }

/* ---------- Toolbar interna de aba / ações do drawer ---------- */
.tab-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.drawer-head-actions { display: flex; align-items: center; gap: 8px; }

@media (max-width: 720px) {
  .sc-controls .seg, .sc-controls .sel-wrap, .sc-controls .sc-check { flex: 1 1 auto; }
}

@media (max-width: 640px) {
  .drawer-props { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .mini-stat-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Auth (login / bootstrap) ---------- */
.auth-shell { display: block; min-height: 100vh; }
.auth-screen { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px;
  background:
    radial-gradient(1200px 500px at 50% -10%, color-mix(in srgb, var(--primary) 14%, transparent), transparent 60%),
    var(--bg); }
.auth-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-lg); padding: 30px 28px; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth-brand .brand-name { font-size: 18px; font-weight: 750; line-height: 1.1; }
.auth-brand .brand-name span { color: var(--primary); }
.auth-brand .brand-name small { display: block; font-weight: 500; font-size: 11px; color: var(--text-3); margin-top: 2px; }
.auth-title { font-size: 22px; margin-bottom: 4px; }
.auth-hint { font-size: 13px; color: var(--text-3); margin-bottom: 20px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form .field span { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.auth-note { font-size: 12.5px; color: var(--success); background: var(--success-weak); border-radius: var(--r); padding: 8px 11px; }
.auth-error { font-size: 12.5px; color: var(--danger); min-height: 16px; }
.auth-submit { height: 42px; margin-top: 2px; }
.auth-foot { font-size: 12px; color: var(--text-3); }

/* botão de logout no menu do usuário */
button.um-item { width: 100%; text-align: left; font: inherit; }
