/* ═══════════════════════════════════════════════════════════
   BOARD DE CARDS PREVENTIVOS — styles.css
   Redesign v2.2 — Leve, elegante, inspirado em Notion/Linear/ClickUp
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Superfícies */
  --bg:          #FBFBFA;
  --surface:     #FFFFFF;
  --surface-2:   #F6F6F5;
  --border:      #E9E9E7;
  --border-soft: #F0F0EF;

  /* Texto */
  --text:        #1F1F1F;
  --text-dim:    #6B6B6B;
  --text-muted:  #9B9B98;

  /* Acento único (indigo suave — protagonista sutil, sem exagero) */
  --accent:      #6D5EF0;
  --accent-hov:  #5B4CE0;
  --accent-soft: #EEEBFD;
  --accent-line: #DCD6FA;

  /* Acentos secundários — usados com moderação */
  --amber:       #C98A1B;
  --amber-soft:  #FBF1DD;
  --teal:        #0F9D8A;
  --teal-soft:   #E3F6F2;
  --red:         #D8493B;
  --red-soft:    #FBEAE8;
  --blue:        #3D7BD9;
  --blue-soft:   #E9F1FC;
  --gray-soft:   #F0F0EF;

  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --shadow-xs:   0 1px 2px rgba(20,20,20,0.04);
  --shadow-sm:   0 2px 8px rgba(20,20,20,0.06);
  --shadow-md:   0 8px 24px rgba(20,20,20,0.08);
  --transition:  0.15s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  min-height: 100vh;
  padding: 0 0 80px;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #DDDDDA; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #C5C5C1; }

.muted { color: var(--text-muted); }
.small { font-size: 12px; }
.pad { padding: 10px 0; }
.mt { margin-top: 14px; }
.hidden { display: none !important; }
.text-left { text-align: left; }

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 6px;
}

.app-wrap { max-width: 980px; margin: 0 auto; padding: 0 28px; }

/* ── Header ────────────────────────────────────────────────── */
.app-header {
  padding: 40px 28px 28px;
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.header-title h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
}

/* ── Tabs ──────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  padding: 10px 2px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--transition), border-color var(--transition);
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }

.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-xs); }
.btn-primary:hover { background: var(--accent-hov); box-shadow: var(--shadow-sm); }

.btn-ghost { background: var(--surface); color: var(--text-dim); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: #D5D5D2; background: var(--surface-2); }

.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover { background: #F5D9D5; }

.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ── Icon buttons (ações inline) ─────────────────────────────── */
.icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  font-size: 13px;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn-danger:hover { background: var(--red-soft); color: var(--red); }
.btn-fav { opacity: .35; }
.btn-fav:hover { opacity: .7; }
.btn-fav.active { opacity: 1; color: var(--amber); }

.link-btn {
  background: none; border: none;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0 0;
}
.link-btn:hover { text-decoration: underline; }

/* ── Filtros ───────────────────────────────────────────────── */
.board-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.filter-group {
  display: flex;
  gap: 2px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 3px;
}
.btn-filter {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 12.5px;
  padding: 6px 14px;
  border-radius: 5px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.btn-filter:hover { color: var(--text); }
.btn-filter.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.board-count { color: var(--text-muted); font-size: 12.5px; }

/* ── Sprint: protagonista da tela ─────────────────────────────
   Cards maiores, mais respiro, hierarquia clara. */
.sprint-item {
  margin-bottom: 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.sprint-item:hover { border-color: #D8D8D5; box-shadow: var(--shadow-xs); }
.sprint-item.expanded { border-color: var(--accent-line); box-shadow: var(--shadow-sm); }

.sprint-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
}
.sprint-chevron {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform var(--transition), background var(--transition), color var(--transition);
}
.sprint-item.expanded .sprint-chevron { transform: rotate(90deg); background: var(--accent-soft); color: var(--accent); }

.sprint-badge {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.sprint-info { flex: 1; min-width: 0; }
.sprint-meta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.sprint-meta-item { font-size: 12.5px; color: var(--text-muted); }
.accent-amber { color: var(--amber) !important; font-weight: 600; }
.accent-teal  { color: var(--teal) !important; font-weight: 600; }

.status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}
.status-andamento { background: var(--blue-soft); color: var(--blue); }
.status-concluida { background: var(--teal-soft); color: var(--teal); }
.status-arquivada { background: var(--gray-soft); color: var(--text-muted); }

.sprint-actions { display: flex; gap: 2px; flex-shrink: 0; }

.sprint-body { display: none; padding: 0 24px 24px; border-top: 1px solid var(--border-soft); }
.sprint-item.expanded .sprint-body { display: block; padding-top: 18px; }

.sprint-detail-row {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-soft);
}
.sprint-detail-group { display: flex; flex-direction: column; gap: 4px; }
.sprint-detail-label { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.sprint-detail-val { font-size: 13px; color: var(--text); }
.sprint-detail-val a { color: var(--accent); text-decoration: none; font-weight: 500; }
.sprint-detail-val a:hover { text-decoration: underline; }

.participantes-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.participante-chip {
  font-size: 12px;
  padding: 3px 10px;
  background: var(--blue-soft);
  border-radius: 20px;
  color: var(--blue);
  font-weight: 500;
}

/* ── Cards area ────────────────────────────────────────────── */
.cards-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}
.cards-header-title { font-size: 12px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; }
.cards-empty, .empty-inline {
  text-align: center;
  padding: 28px 12px;
  color: var(--text-muted);
  font-size: 13px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
}

.card-item {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 8px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.card-item:hover { border-color: #D8D8D5; box-shadow: var(--shadow-xs); }

.card-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.card-numero {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 9px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  transition: background var(--transition);
}
.card-numero:hover { background: var(--accent-line); }
.card-numero.no-link { cursor: default; }
.card-numero.no-link:hover { background: var(--accent-soft); }

.card-titulo { font-size: 13.5px; font-weight: 600; color: var(--text); flex: 1; min-width: 0; }
.card-actions { display: flex; gap: 1px; flex-shrink: 0; }

.card-metrics { display: flex; gap: 16px; margin-bottom: 6px; flex-wrap: wrap; }
.card-metric { font-size: 12px; color: var(--text-dim); }
.card-metric .val { font-weight: 700; color: var(--text); }

.card-footer { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-muted); margin-top: 4px; flex-wrap: wrap; }
.card-autor { color: var(--text-dim); font-weight: 500; }

.card-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.65;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
  max-height: 110px;
  overflow: hidden;
}
.card-desc.expanded { max-height: none; }
.card-desc ul, .card-desc ol { padding-left: 20px; }
.card-desc input[type="checkbox"] { margin-right: 6px; accent-color: var(--accent); pointer-events: none; }
.card-desc a { color: var(--accent); }

/* Card com estado arquivado / favoritado */
.card-archived { opacity: .5; }
.card-archived:hover { opacity: .75; }
.card-favorited { border-color: #F0DCA6; background: #FFFCF5; }
.archived-badge {
  font-size: 10.5px;
  padding: 1px 8px;
  background: var(--gray-soft);
  color: var(--text-muted);
  border-radius: 20px;
  margin-left: 8px;
}

/* ── Empty states ──────────────────────────────────────────── */
.global-empty { text-align: center; padding: 72px 20px; }
.empty-icon { font-size: 40px; margin-bottom: 16px; opacity: .8; }
.global-empty h3 { font-size: 17px; color: var(--text); margin-bottom: 8px; font-weight: 700; }
.global-empty p { font-size: 13.5px; color: var(--text-muted); max-width: 340px; margin: 0 auto 22px; line-height: 1.6; }

/* ── Dashboard ─────────────────────────────────────────────── */
.dash-generate-wrap { text-align: center; padding: 64px 20px; }
.dash-generate-wrap p { color: var(--text-muted); font-size: 13.5px; margin-bottom: 22px; line-height: 1.6; }
.dash-refresh-row { display: flex; justify-content: flex-end; margin-bottom: 16px; }

.dash-grid-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.dash-kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.dash-kpi.accent { border-color: var(--accent-line); background: var(--accent-soft); }
.dash-kpi-label { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.dash-kpi-value { font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: -.02em; }
.dash-kpi.accent .dash-kpi-value { color: var(--accent); }
.dash-kpi-sub { font-size: 10.5px; color: var(--text-muted); }

.dash-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 680px) { .dash-grid-2 { grid-template-columns: 1fr; } }

.dash-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px 18px; }
.dash-panel-title { font-size: 12px; font-weight: 600; color: var(--text-dim); margin-bottom: 12px; }

.dash-top-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
.dash-top-item:last-child { border-bottom: none; padding-bottom: 0; }
.dash-rank { font-size: 11px; color: var(--text-muted); width: 20px; text-align: right; }
.dash-top-name { flex: 1; font-size: 13px; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-top-val { font-size: 12.5px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.dash-top-val.gold { color: var(--amber); }

.dash-bar-row { margin-bottom: 11px; }
.dash-bar-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; font-size: 12px; }
.dash-bar-name { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70%; }
.dash-bar-num { font-size: 11.5px; color: var(--accent); font-weight: 600; }
.dash-bar-track { height: 5px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.dash-bar-fill { height: 100%; background: var(--accent); border-radius: 99px; transition: width .5s ease; }
.dash-bar-fill.gold { background: var(--amber); }

/* ── Modais ────────────────────────────────────────────────── */
.modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(20,20,20,0.32);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}
.modal-backdrop.open { display: flex; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(20,20,20,0.16);
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 28px 28px 24px;
  animation: modalIn .18s cubic-bezier(.4,0,.2,1);
  position: relative;
}
.modal-lg { max-width: 660px; }
.modal-sm { max-width: 380px; }
.modal-center { text-align: center; }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 22px; color: var(--text); }
.modal-title-center { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.modal-desc { color: var(--text-dim); font-size: 13.5px; line-height: 1.65; margin-bottom: 22px; }
.modal-emoji { font-size: 38px; margin-bottom: 12px; }
.modal-emoji.warn { font-size: 34px; }

.modal-close {
  position: absolute; top: 16px; right: 18px;
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
}
.modal-close:hover { color: var(--text); background: var(--surface-2); }

/* ── Forms ─────────────────────────────────────────────────── */
.form-grid { display: grid; gap: 15px; }
.form-grid-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 500px) { .form-grid-2 { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; color: var(--text-dim); }
.field label .req { color: var(--red); margin-left: 2px; }
.field-hint { font-weight: 400; color: var(--text-muted); font-size: 11px; margin-left: 4px; }

.field input, .field select, .field textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  padding: 9px 12px;
  outline: none;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B6B6B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.field input[type="number"] { -moz-appearance: textfield; }
.field input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }

.tag-input-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  display: flex; flex-wrap: wrap; gap: 6px;
  min-height: 42px;
  align-items: center;
  cursor: text;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.tag-input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tag-chip {
  background: var(--blue-soft);
  color: var(--blue);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 500;
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap;
}
.tag-chip-remove { cursor: pointer; color: var(--text-muted); line-height: 1; }
.tag-chip-remove:hover { color: var(--red); }
.tag-input-inner { border: none; background: none; color: var(--text); font-size: 13.5px; outline: none; min-width: 120px; flex: 1; }

/* ── Rich Text Editor ──────────────────────────────────────── */
.rte-wrap { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; transition: border-color var(--transition), box-shadow var(--transition); }
.rte-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.rte-toolbar { background: var(--surface-2); border-bottom: 1px solid var(--border-soft); padding: 6px 8px; display: flex; flex-wrap: wrap; gap: 2px; align-items: center; }
.rte-sep { width: 1px; height: 16px; background: var(--border); margin: 0 4px; }
.rte-btn {
  background: none; border: none;
  color: var(--text-dim);
  border-radius: 5px;
  padding: 5px 7px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  min-width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.rte-btn:hover { color: var(--text); background: var(--surface); }
.rte-btn-template:hover { background: var(--amber-soft); color: var(--amber); }

.rte-color-wrap { position: relative; display: inline-flex; }
.rte-color-wrap input[type="color"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; border: none; padding: 0; }

.rte-body {
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.7;
  padding: 14px 16px;
  min-height: 130px;
  max-height: 260px;
  overflow-y: auto;
  outline: none;
}
.rte-body:empty::before { content: attr(data-placeholder); color: var(--text-muted); pointer-events: none; }
.rte-body ul, .rte-body ol { padding-left: 20px; }
.rte-body input[type="checkbox"] { margin-right: 6px; accent-color: var(--accent); }
.rte-body a { color: var(--accent); }

/* ── Modal footer ──────────────────────────────────────────── */
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border-soft); flex-wrap: wrap; }
.modal-footer.center { justify-content: center; }

/* ── Toast ─────────────────────────────────────────────────── */
#toast {
  position: fixed; bottom: 26px; left: 50%;
  transform: translateX(-50%) translateY(70px);
  background: var(--text);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 11px 20px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 28px rgba(20,20,20,0.24);
  z-index: 999;
  opacity: 0;
  transition: transform .28s cubic-bezier(.4,0,.2,1), opacity .28s;
  pointer-events: none;
  white-space: nowrap;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Aba Sobre ─────────────────────────────────────────────── */
.sobre-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px 20px; margin-bottom: 10px; }
.sobre-block h3 { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.sobre-block p { font-size: 13px; color: var(--text-dim); line-height: 1.6; }
.sobre-input-row { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.sobre-input { flex: 1; min-width: 0; }

/* ── Responsividade ────────────────────────────────────────── */
@media (max-width: 680px) {
  .app-header { flex-direction: column; align-items: flex-start; gap: 14px; }
  .sprint-header { flex-wrap: wrap; }
  .sprint-actions { width: 100%; justify-content: flex-end; }
  .modal { padding: 22px 18px 20px; }
  .dash-grid-hero { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   ADIÇÕES v3.0 — Squad · Links dinâmicos · Sync · Conflito
   ═══════════════════════════════════════════════════════════ */

.header-actions { display: flex; align-items: center; gap: 12px; }

/* ── Indicador de sincronização ───────────────────────────── */
.sync-indicator {
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  white-space: nowrap;
}
.sync-local   { background: var(--gray-soft); color: var(--text-muted); }
.sync-syncing { background: var(--blue-soft); color: var(--blue); }
.sync-synced  { background: var(--teal-soft); color: var(--teal); }
.sync-error   { background: var(--red-soft); color: var(--red); }

/* ── Squad (nível acima da Sprint) ────────────────────────── */
.squad-item {
  margin-bottom: 14px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}
.squad-item.expanded { border-color: var(--accent-line); box-shadow: var(--shadow-sm); }

.squad-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  cursor: pointer;
  background: var(--surface-2);
}
.squad-chevron { background: var(--surface); }
.squad-item.expanded .squad-chevron { background: var(--accent-soft); color: var(--accent); }

.squad-badge { font-size: 15px; font-weight: 800; color: var(--text); letter-spacing: -.01em; }
.squad-meta { flex: 1; font-size: 12px; color: var(--text-muted); }

.squad-body { display: none; padding: 16px 20px 20px; }
.squad-item.expanded .squad-body { display: block; }
.squad-body .sprint-item { border-color: var(--border-soft); }

/* ── Links dinâmicos (editor no modal) ────────────────────── */
.links-editor { display: flex; flex-direction: column; gap: 8px; }
.links-empty { font-size: 12.5px; color: var(--text-muted); padding: 4px 0; }
.link-row { display: flex; gap: 8px; align-items: center; }
.link-label-input { flex: 0 0 140px; }
.link-url-input { flex: 1; min-width: 0; }
.link-row input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.link-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.links-add-btn { align-self: flex-start; margin-top: 4px; }

/* ── Links exibidos no board (chips clicáveis) ────────────── */
.links-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sprint-link-chip, .card-link-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 20px;
  text-decoration: none;
  white-space: nowrap;
}
.sprint-link-chip:hover, .card-link-chip:hover { background: var(--accent-line); }
.card-links-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
.card-link-chip { font-size: 11px; padding: 2px 8px; }

/* ── Modal de pasta compartilhada / conflito ──────────────── */
.conflict-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}
.conflict-col { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px; }
.conflict-col-title { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.conflict-col-body { font-size: 13px; color: var(--text); line-height: 1.6; }

@media (max-width: 560px) {
  .conflict-compare { grid-template-columns: 1fr; }
  .link-row { flex-wrap: wrap; }
  .link-label-input { flex: 1 1 100%; }
}

/* ═══════════════════════════════════════════════════════════
   ADIÇÕES v3.1 — Dashboard focado em negócio (Squad/Sprint/Cards/Bugs)
   ═══════════════════════════════════════════════════════════ */

/* ── KPIs com cores fortes e diferenciadas ────────────────── */
.dash-grid-hero-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 680px) { .dash-grid-hero-4 { grid-template-columns: 1fr 1fr; } }

.dash-kpi.kpi-azul     { background: #EAF2FE; border-color: #BFDBFE; }
.dash-kpi.kpi-turquesa { background: #E4FBF7; border-color: #A6F0E3; }
.dash-kpi.kpi-roxo     { background: #F3EBFE; border-color: #DDC8FB; }
.dash-kpi.kpi-verde    { background: #E9FBEE; border-color: #B9F0C6; }

.kpi-azul     .dash-kpi-value { color: #1D5FD1; }
.kpi-turquesa .dash-kpi-value { color: #0B9C86; }
.kpi-roxo     .dash-kpi-value { color: #7B2FE0; }
.kpi-verde    .dash-kpi-value { color: #1C9B3E; }

.kpi-azul     .dash-kpi-label { color: #3F72C9; }
.kpi-turquesa .dash-kpi-label { color: #12897A; }
.kpi-roxo     .dash-kpi-label { color: #8C4FE0; }
.kpi-verde    .dash-kpi-label { color: #2F9E4D; }

/* ── Barras dos gráficos com a mesma paleta ───────────────── */
.bar-azul     { background: #3F72C9 !important; }
.bar-turquesa { background: #0F9D8A !important; }
.bar-roxo     { background: #8C4FE0 !important; }

/* ── Seletor de escopo do Dashboard ───────────────────────── */
.dash-refresh-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.dash-scope-group { display: flex; gap: 4px; align-items: center; background: var(--surface-2); border-radius: var(--radius-sm); padding: 3px; flex-wrap: wrap; }
.dash-scope-select {
  margin-left: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12.5px;
  color: var(--text);
  outline: none;
}
.dash-scope-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ── Checkbox "Considerar nas métricas" ───────────────────── */
.field-checkbox { display: flex; flex-direction: column; gap: 4px; padding: 10px 0 2px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.field-checkbox .field-hint { margin-left: 24px; font-size: 11.5px; }

/* ── Badge "fora das métricas" no card ────────────────────── */
.metrica-off-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 8px;
  background: var(--gray-soft);
  color: var(--text-muted);
  border-radius: 20px;
}
