/* ═══════════════════════════════════════════════
   COMPONENTS.CSS — cards, tabelas, charts, overview
═══════════════════════════════════════════════ */

/* ── Toolbar / Controles ────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.toolbar-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-right: auto;
}
.toolbar-title em { font-style: normal; color: var(--orange); }
.toolbar-actions  { display: flex; align-items: center; gap: 6px; }
.date-nav         { display: flex; align-items: center; gap: 6px; }

/* ── Overview cards ─────────────────────────── */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.squad-card {
  background: #ffffff;
  border: 1px solid rgba(232,200,164,.8);
  border-radius: var(--r2);
  padding: 18px 20px;
  cursor: pointer;
  transition: border-color .18s, transform .12s, box-shadow .18s;
  position: relative;
  overflow: hidden;
}
.squad-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
  transition: background .18s;
}
.squad-card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(160, 84, 23, .10);
}
.squad-card:hover::before        { background: var(--orange); }
.squad-card.has-blocker          { border-color: rgba(248,113,113,.25); }
.squad-card.has-blocker::before  { background: var(--red); }
.squad-card.has-help::before     { background: var(--yellow); }
.squad-card.inactive             { opacity: .45; }

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 8px;
}
.card-name { font-size: 14px; font-weight: 700; }
.card-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-ok       { background: rgba(52,211,153,.1); color: var(--green);  border: 1px solid rgba(52,211,153,.2); }
.badge-inactive { background: rgba(85,85,85,.15);  color: #9a7a65;     border: 1px solid rgba(232,200,164,.8); }
.badge-alert    { background: rgba(248,113,113,.1);color: var(--red);    border: 1px solid rgba(248,113,113,.2); }
.badge-warn     { background: var(--orange-dim);   color: var(--orange); border: 1px solid rgba(245,166,35,.2); }
.badge-info     { background: rgba(99,102,241,.1); color: #6366f1;      border: 1px solid rgba(99,102,241,.2); }

.btn-tab {
  padding: 8px 16px; border-radius: 10px; font-size: 12px; font-weight: 700;
  border: 1px solid rgba(255,145,45,.18); background: #fff8f2; color: #7e5d48;
  cursor: pointer; transition: all .15s;
}
.btn-tab.active { background: var(--orange); color: #fff; border-color: var(--orange); }
.btn-tab:hover:not(.active) { background: rgba(255,145,45,.12); color: #2a160b; }

.card-stats { display: flex; gap: 22px; }
.stat-val   {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}
.stat-label {
  font-size: 9px;
  color: #9a7a65;
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-top: 3px;
  font-weight: 600;
}
.stat-val.g { color: var(--green); }
.stat-val.r { color: var(--red); }
.stat-val.o { color: var(--orange); }
.card-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 64px;
  color: #9a7a65;
  font-size: 11px;
  gap: 5px;
}

/* Metric summary bar (visão geral top) */
.summary-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.summary-card {
  background: #ffffff;
  border: 1px solid rgba(232,200,164,.8);
  border-radius: var(--r2);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.summary-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--sc-color, var(--border));
}
.summary-val {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: var(--sc-color, var(--t1));
  margin-bottom: 4px;
}
.summary-label {
  font-size: 9px;
  font-weight: 700;
  color: #9a7a65;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.summary-sub { font-size: 10px; color: #9a7a65; margin-top: 2px; }

/* ── Tabelas ────────────────────────────────── */
.table-wrap {
  background: #ffffff;
  border: 1px solid rgba(232,200,164,.8);
  border-radius: var(--r2);
  overflow: hidden;
  margin-bottom: 24px;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.data-table th {
  text-align: left;
  padding: 9px 14px;
  font-size: 9px;
  font-weight: 700;
  color: #9a7a65;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  background: #fff8f1;
}
.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(255,145,45,.05); }

.user-cell { display: flex; align-items: center; gap: 9px; }
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff3e8;
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--orange);
  flex-shrink: 0;
  font-family: var(--mono);
  overflow: hidden;
}
.user-avatar img { width: 28px; height: 28px; object-fit: cover; border-radius: 50%; }
.user-name { font-size: 12px; font-weight: 600; color: #2a160b; }
.user-id   { font-size: 10px; color: #9a7a65; font-family: var(--mono); }

.text-cell { max-width: 220px; line-height: 1.5; word-break: break-word; font-size: 12px; }
.text-cell.empty   { color: #9a7a65; font-style: italic; }
.text-cell.blocker { color: #fb923c; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
}
.tag-b { background: rgba(248,113,113,.1); color: var(--red);    border: 1px solid rgba(248,113,113,.2); }
.tag-h { background: var(--orange-dim);   color: var(--orange); border: 1px solid rgba(245,166,35,.2); }

.time-cell { font-size: 10px; color: #9a7a65; white-space: nowrap; font-family: var(--mono); }

/* ── Sections ───────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 12px;
}
.section-header:first-child { margin-top: 0; }
.section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
}
.section-meta { font-size: 11px; color: #7a5c48; }

/* ── Metrics ────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.metric-card {
  background: #ffffff;
  border: 1px solid rgba(232,200,164,.8);
  border-radius: var(--r2);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.metric-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--orange);
}
.metric-val   { font-family: var(--mono); font-size: 32px; font-weight: 700; line-height: 1; margin-bottom: 5px; }
.metric-label { font-size: 10px; color: #7a5c48; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.metric-sub   { font-size: 10px; color: #9a7a65; margin-top: 2px; }

/* ── Bar chart ──────────────────────────────── */
.chart-wrap {
  background: #ffffff;
  border: 1px solid rgba(232,200,164,.8);
  border-radius: var(--r2);
  padding: 22px 24px;
  margin-bottom: 20px;
}
.chart-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #7a5c48;
  margin-bottom: 20px;
}
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 120px;
  padding-bottom: 24px;
  position: relative;
}
.bar-chart::after {
  content: '';
  position: absolute;
  bottom: 24px; left: 0; right: 0;
  height: 1px;
  background: var(--border);
}
.bar-group { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.bars      { display: flex; gap: 2px; align-items: flex-end; height: 80px; }
.bar {
  width: 10px;
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  transition: height .35s ease;
  cursor: pointer;
  position: relative;
}
.bar:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff8f1;
  border: 1px solid var(--border2);
  color: #2a160b;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 10;
}
.bar.resp { background: var(--green); }
.bar.bloc { background: var(--red); }
.bar.help { background: var(--orange); }
.bar-label { font-size: 9px; color: #9a7a65; overflow: hidden; text-overflow: ellipsis; width: 100%; text-align: center; font-family: var(--mono); }
.chart-legend { display: flex; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.legend-item  { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #7a5c48; }
.legend-dot   { width: 8px; height: 8px; border-radius: 2px; }

/* ── Users modal ────────────────────────────── */
.user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: #fff8f1;
  border: 1px solid rgba(232,200,164,.8);
  border-radius: var(--r);
  margin-bottom: 7px;
}
.user-row-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-d), var(--orange));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: #111;
  flex-shrink: 0;
}
.user-row-info { flex: 1; }
.user-row-name { font-size: 12px; font-weight: 700; }
.user-row-role { font-size: 10px; color: #9a7a65; text-transform: uppercase; letter-spacing: .04em; }
.btn-rm {
  background: transparent;
  border: 1px solid var(--border2);
  color: #9a7a65;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s, color .15s;
}
.btn-rm:hover { border-color: var(--red); color: var(--red); }
.section-label {
  font-size: 10px;
  font-weight: 700;
  color: #9a7a65;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 10px;
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 900px) {
  .summary-bar { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .summary-bar { grid-template-columns: 1fr; }
  .overview-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ── Premium UI refresh ───────────────────── */
.panel {
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,145,45,.12);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 24px 64px rgba(160,84,23,.08);
  backdrop-filter: blur(8px);
}
.summary-card, .squad-card, .metric-card, .chart-wrap, .table-wrap, .health-card, .analytics-panel, .collab-card, .oo-card {
  box-shadow: 0 16px 38px rgba(160,84,23,.06);
}
.page-header {
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255,145,45,.10);
}
.page-title {
  font-size: 30px;
  line-height: 1;
}
.page-sub {
  font-size: 13px;
  color: #8f6b56;
}
.summary-bar, .overview-grid, .metrics-grid { gap: 16px; }
.summary-card, .squad-card, .metric-card, .chart-wrap, .table-wrap {
  border-radius: 22px;
  border-color: rgba(232,200,164,.72);
}
.table-wrap { overflow: hidden; }
.data-table th { background: linear-gradient(180deg, #fffaf4 0%, #fff5ec 100%); }
.data-table td { color: #3e2819; }
.data-table tbody tr:hover td { background: rgba(255,145,45,.045); }
.user-avatar, .collab-av {
  box-shadow: 0 10px 24px rgba(255,138,31,.14);
}
.workspace-hero {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 18px;
  margin-bottom: 24px;
}
.workspace-hero-flat {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 24px;
}
.workspace-hero-flat .workspace-hero-main {
  width: 100%;
  padding-bottom: 24px;
}
.workspace-hero-flat #overview-module-grid {
  grid-template-columns: repeat(4, minmax(0,1fr));
}
.workspace-hero-flat .module-card {
  min-height: 120px;
}
.workspace-hero-main {
  background: linear-gradient(135deg, #fff1df 0%, #ffe2bc 100%);
  border: 1px solid rgba(255,145,45,.18);
  border-radius: 24px;
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
}
.workspace-hero-main::after {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  right: -70px;
  top: -70px;
  background: radial-gradient(circle, rgba(255,255,255,.6) 0%, rgba(255,255,255,0) 70%);
}
.workspace-kicker {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: #b0661b;
  font-weight: 800;
  margin-bottom: 12px;
}
.workspace-title {
  font-size: 26px;
  line-height: 1.05;
  font-weight: 800;
  color: #2b170b;
  max-width: 560px;
}
.workspace-copy {
  margin-top: 10px;
  font-size: 13px;
  color: #7c5a46;
  max-width: 560px;
}
.workspace-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
  margin-top: 18px;
}
.workspace-stat {
  background: rgba(255,255,255,.68);
  border: 1px solid rgba(255,145,45,.12);
  border-radius: 18px;
  padding: 14px 16px;
}
.workspace-stat strong {
  display: block;
  font-family: var(--mono);
  font-size: 24px;
  color: #2b170b;
}
.workspace-stat span {
  font-size: 11px;
  color: #865d44;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
}
#overview-module-grid {
  grid-template-columns: repeat(3, minmax(0,1fr));
}
.module-card {
  background: rgba(255,255,255,.84);
  border: 1px solid rgba(255,145,45,.12);
  border-radius: 22px;
  padding: 18px;
  min-height: 146px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.module-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(160,84,23,.12);
  border-color: rgba(255,145,45,.28);
}
.module-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.module-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff5e8 0%, #ffe0bc 100%);
  border: 1px solid rgba(255,145,45,.14);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d37017;
  font-weight: 800;
}
.module-chip {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,145,45,.12);
  color: #c56d17;
}
.module-title {
  font-size: 15px;
  font-weight: 700;
  color: #24150e;
  margin-top: 14px;
}
.module-copy {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.55;
  color: #825f49;
}
.soft-empty {
  background: linear-gradient(180deg, #fffaf5 0%, #fff4ea 100%);
  border: 1px dashed rgba(255,145,45,.22);
  border-radius: 22px;
  padding: 28px;
}
.intel-layout {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 18px;
}
.intel-cta, .intel-side-card {
  background: #fff;
  border: 1px solid rgba(255,145,45,.12);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 16px 38px rgba(160,84,23,.06);
}
.intel-cta-title, .intel-side-title {
  font-size: 18px;
  font-weight: 800;
  color: #24150e;
}
.intel-cta-copy, .intel-side-copy {
  font-size: 13px;
  color: #84624c;
  line-height: 1.65;
  margin-top: 8px;
}
.intel-feature-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.intel-feature {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  color: #6f4d38;
}
.intel-feature-dot {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(255,145,45,.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #cf6d12;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}
.insight-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.insight-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: #5f4332;
  line-height: 1.6;
}
.insight-bullet {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
}
.insight-bullet.risk { background: rgba(248,113,113,.12); color: var(--red); }
.insight-bullet.rec  { background: rgba(52,211,153,.12); color: var(--green); }
.section-stack { display: flex; flex-direction: column; gap: 18px; }
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
@media (min-width: 1280px) {
  .proj-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 768px) and (max-width: 1279px) {
  .proj-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .proj-grid { grid-template-columns: 1fr; }
}

/* ── Progress bar animation ── */
.proj-bar-fill {
  transition: width .6s ease, background .3s;
}

/* ── Alert badges (inside cards) ── */
.proj-alert-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
}
.proj-alert-badge.proj-alert-red {
  background: rgba(248,113,113,.12);
  color: var(--red);
}
.proj-alert-badge.proj-alert-yellow {
  background: rgba(234,179,8,.12);
  color: #a16207;
}

/* ── Alert banner (top of list) ── */
.proj-alert-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(248,113,113,.07);
  border: 1px solid rgba(248,113,113,.22);
  border-radius: var(--r2);
  margin-bottom: 20px;
  cursor: pointer;
  font-size: 13px;
  color: #b91c1c;
  transition: background .15s, border-color .15s;
  user-select: none;
}
.proj-alert-banner:hover { background: rgba(248,113,113,.13); }
.proj-alert-banner.active {
  background: rgba(248,113,113,.16);
  border-color: var(--red);
}

/* ── Active filter indicator ── */
.squad-filter.filter-active {
  background: var(--orange-dim);
  border-color: var(--orange);
  color: var(--orange-d);
  font-weight: 600;
}

/* ── Detail page layout ── */
.proj-detail-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 8px;
}
@media (max-width: 820px) {
  .proj-detail-main { grid-template-columns: 1fr; }
}

/* ── Section label (detail page) ── */
.proj-section-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #6f4d38;
  margin-bottom: 12px;
}

/* ── Milestone rows (detail page) ── */
.proj-ms-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,145,45,.1);
}
.proj-ms-row:last-child { border-bottom: none; }

/* ── History feed ── */
.proj-history-entry {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.proj-history-entry:last-child { border-bottom: none; }
.proj-history-entry:first-child { padding-top: 0; }

/* ── Chips in detail header ── */
.proj-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--orange-dim);
  border: 1px solid rgba(255,138,31,.2);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  color: var(--orange-d);
}

/* ── Card hover for clickable proj-card ── */
.proj-card {
  transition: box-shadow .18s, transform .18s, border-color .18s;
}
.proj-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(176,120,60,.18);
  border-color: rgba(232,200,164,1);
}
@media (max-width: 1100px) {
  .workspace-hero, .intel-layout { grid-template-columns: 1fr; }
  .workspace-hero-flat #overview-module-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 860px) {
  .workspace-hero-flat #overview-module-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .panel { padding: 18px; border-radius: 22px; }
  .workspace-stats { grid-template-columns: 1fr; }
  .module-grid, #overview-module-grid,
  .workspace-hero-flat #overview-module-grid { grid-template-columns: 1fr; }
}

/* ── Squad card footer + btn-trigger-daily ───────────────────────────────── */
.card-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(232,200,164,.5);
}
.btn-trigger-daily {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: transparent;
  border: 1.5px solid rgba(232,200,164,.9);
  border-radius: 10px;
  color: var(--t2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
  font-family: var(--sans);
}
.btn-trigger-daily:hover:not(:disabled) {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-dim);
}
.btn-trigger-daily:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.btn-trigger-daily.sent {
  border-color: rgba(52,211,153,.4);
  color: var(--green);
  background: rgba(52,211,153,.07);
}
.btn-trigger-daily.error {
  border-color: rgba(248,113,113,.4);
  color: var(--red);
}

/* ── Admin charts — seção de gráficos executivos ─────────────────────────── */
.admin-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
}
.admin-chart-card {
  background: #fff;
  border: 1px solid rgba(232,200,164,.7);
  border-radius: var(--r2);
  padding: 18px 20px;
}
.admin-chart-card.full-width {
  grid-column: span 2;
}
.acc-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--t2);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.acc-sub { font-size: 10px; font-weight: 500; color: var(--t3); text-transform: none; letter-spacing: 0; }

/* Trend line chart (SVG inline) */
.trend-svg-wrap { width: 100%; overflow: hidden; }
.trend-svg { width: 100%; height: 80px; }
.trend-axis { font-size: 9px; fill: var(--t3); font-family: var(--sans); }

/* Week compare — bar chart */
.wk-bars { display: flex; gap: 6px; align-items: flex-end; height: 80px; }
.wk-bar-col { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1; }
.wk-bar-fill { width: 100%; border-radius: 4px 4px 0 0; transition: height .4s ease; min-height: 2px; }
.wk-bar-fill.cur  { background: var(--orange); }
.wk-bar-fill.prev { background: rgba(232,200,164,.6); }
.wk-bar-label { font-size: 9px; color: var(--t3); font-family: var(--mono); white-space: nowrap; text-align: center; }

/* Heatmap */
.heatmap-wrap { overflow-x: auto; }
.heatmap-table { border-collapse: separate; border-spacing: 4px; width: 100%; }
.heatmap-table th { font-size: 9px; color: var(--t3); font-weight: 700; text-align: center; text-transform: uppercase; padding: 2px 4px; }
.heatmap-table td { text-align: center; font-size: 10px; font-family: var(--mono); border-radius: 5px; padding: 5px 2px; }
.hm-squad { text-align: left !important; font-size: 11px; font-weight: 600; color: var(--t1); white-space: nowrap; padding-right: 8px; }

/* Top contributors */
.contrib-rank-list { display: flex; flex-direction: column; gap: 6px; }
.cr-row { display: flex; align-items: center; gap: 10px; }
.cr-pos { font-size: 12px; font-weight: 800; font-family: var(--mono); color: var(--t3); min-width: 18px; text-align: right; }
.cr-pos.top1 { color: #f59e0b; }
.cr-pos.top2 { color: var(--t2); }
.cr-pos.top3 { color: #cd7f32; }
.cr-av { width: 26px; height: 26px; border-radius: 50%; background: var(--orange-dim); border: 1px solid rgba(232,200,164,.8); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: var(--orange); flex-shrink: 0; overflow: hidden; }
.cr-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.cr-info { flex: 1; min-width: 0; }
.cr-name { font-size: 12px; font-weight: 600; color: var(--t1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-squad { font-size: 10px; color: var(--t3); }
.cr-bar-wrap { width: 80px; height: 4px; background: rgba(232,200,164,.4); border-radius: 2px; overflow: hidden; }
.cr-bar-fill { height: 100%; background: var(--orange); border-radius: 2px; }
.cr-count { font-size: 11px; font-weight: 700; font-family: var(--mono); color: var(--t1); min-width: 24px; text-align: right; }

@media (max-width: 900px) {
  .admin-charts-grid { grid-template-columns: 1fr; }
  .admin-chart-card.full-width { grid-column: span 1; }
}

/* ── View toggle ── */
.view-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  overflow: hidden;
}
.view-toggle-btn {
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--t3);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.view-toggle-btn.active {
  background: var(--orange);
  color: #fff;
}
.view-toggle-btn:not(.active):hover {
  background: rgba(0,0,0,.05);
  color: var(--t2);
}

/* ── Gantt / Timeline ── */
.gantt-desktop-wrap { display: block; }
.gantt-mobile-warn  { display: none; font-size: 13px; color: var(--t3); padding: 24px 0; text-align: center; }

@media (max-width: 768px) {
  .gantt-desktop-wrap { display: none; }
  .gantt-mobile-warn  { display: block; }
}

.gantt-wrap {
  border: 1px solid var(--border2);
  border-radius: var(--r2);
  overflow: hidden;
}

.gantt-header {
  display: flex;
  background: var(--surface2);
  border-bottom: 1px solid var(--border2);
}
.gantt-header-label {
  width: 220px;
  flex-shrink: 0;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--t3);
  text-transform: uppercase;
  border-right: 1px solid var(--border2);
}
.gantt-header-months {
  flex: 1;
  display: flex;
  min-width: 0;
}
.gantt-month-header {
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--t2);
  border-right: 1px solid var(--border2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gantt-month-header:last-child { border-right: none; }

.gantt-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border2);
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--t2);
  transition: background .12s;
}
.gantt-group-header:hover { background: var(--surface); }
.gantt-group-toggle { font-size: 10px; color: var(--t3); }
.gantt-group-name   { flex: 1; }
.gantt-group-count  { font-size: 11px; font-weight: 500; color: var(--t3); }

.gantt-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border2);
  min-height: 44px;
  cursor: pointer;
  transition: background .12s;
}
.gantt-row:last-child  { border-bottom: none; }
.gantt-row:hover       { background: rgba(255,145,45,.04); }

.gantt-row-label {
  width: 220px;
  flex-shrink: 0;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-right: 1px solid var(--border2);
  min-width: 0;
}
.gantt-row-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--t1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.gantt-row-bar-wrap {
  flex: 1;
  position: relative;
  height: 44px;
  min-width: 0;
}
.gantt-bar {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  overflow: hidden;
  min-width: 4px;
  cursor: pointer;
  transition: opacity .15s;
}
.gantt-bar:hover { opacity: .85; }
.gantt-bar-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: rgba(255,255,255,.25);
  pointer-events: none;
}
.gantt-bar-label {
  position: relative;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  padding: 0 6px;
  white-space: nowrap;
  z-index: 1;
}
.gantt-bar-empty {
  position: absolute;
  top: 50%;
  left: 8px;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--t3);
  font-style: italic;
}
.gantt-today-line {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: rgba(255,145,45,.7);
  z-index: 2;
  pointer-events: none;
}
.gantt-today-line::before {
  content: 'Hoje';
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 9px;
  font-weight: 700;
  color: var(--orange);
  white-space: nowrap;
}

/* ── Kanban board ── */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  align-items: start;
}
@media (max-width: 900px) {
  .kanban-board { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .kanban-board { grid-template-columns: 1fr; }
}

.kanban-col {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--r2);
  display: flex;
  flex-direction: column;
  min-height: 120px;
  transition: box-shadow .15s, background .15s;
}
.kanban-col.drag-over {
  background: rgba(255,145,45,.08);
  box-shadow: 0 0 0 2px var(--orange);
}

.kanban-col-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--border2);
}
.kanban-col-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--t2);
}
.kanban-col-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--t3);
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 1px 7px;
  min-width: 20px;
  text-align: center;
}

.kanban-add-form {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border2);
}
.kanban-add-form input[type="text"] {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  font-size: 12px;
  font-family: var(--sans);
  background: var(--surface);
  color: var(--t1);
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s;
}
.kanban-add-form input[type="text"]:focus { border-color: var(--orange); }

.kanban-cards {
  padding: 8px 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 60px;
}

.kanban-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 10px 11px;
  cursor: grab;
  transition: box-shadow .15s, opacity .15s, transform .1s;
  user-select: none;
}
.kanban-card:active { cursor: grabbing; }
.kanban-card:hover  { box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.kanban-card-dragging {
  opacity: .45;
  transform: scale(.97);
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.kanban-card-blocked {
  border-left: 3px solid var(--red);
}

.kanban-card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--t1);
  line-height: 1.4;
  margin-bottom: 6px;
}
.kanban-card-blocked-reason {
  font-size: 11px;
  color: var(--red);
  background: rgba(239,68,68,.08);
  border-radius: 6px;
  padding: 4px 7px;
  margin-bottom: 6px;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  line-height: 1.4;
}
.kanban-card-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.kanban-card-assignee {
  font-size: 10px;
  color: var(--t3);
  background: var(--surface2);
  border-radius: 20px;
  padding: 2px 7px;
  border: 1px solid var(--border2);
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kanban-card-date {
  font-size: 10px;
  color: var(--t3);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* ── Priority badge ── */
.prio-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--prio-color, #9ca3af);
  background: color-mix(in srgb, var(--prio-color, #9ca3af) 12%, transparent);
  border-radius: 20px;
  padding: 2px 7px;
}

/* ── Kanban mode toggle ── */
.kanban-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--t2);
  cursor: pointer;
  user-select: none;
}
.kanban-mode-toggle input[type="checkbox"] {
  accent-color: var(--orange);
  width: 15px;
  height: 15px;
  cursor: pointer;
}
