* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #FAFAFA;
  color: #212121;
  font-size: 13px;
  overflow: hidden;
}

/* ============ Tela de senha ============ */
.gate {
  position: fixed; inset: 0;
  background: #00551E;
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
.gate-card {
  background: white;
  padding: 32px 36px;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
  width: 360px;
}
.gate-card h1 { font-size: 18px; margin-bottom: 4px; }
.gate-card p { color: #757575; font-size: 13px; margin-bottom: 16px; }
.gate-card input {
  width: 100%; padding: 10px 12px; border: 1px solid #E0E0E0;
  border-radius: 6px; font-size: 14px; font-family: inherit;
  margin-bottom: 12px;
}
.gate-card input:focus { outline: none; border-color: #00551E; }
.gate-card button {
  width: 100%; padding: 10px; background: #00551E; color: white;
  border: none; border-radius: 6px; font-size: 14px; font-weight: 500;
  cursor: pointer; font-family: inherit;
}
.gate-card button:hover { background: #003E14; }
.gate-error { color: #C62828; font-size: 12px; margin-top: 6px; min-height: 14px; }

/* ============ Layout ============ */
.app { display: none; height: 100vh; }
.app.active { display: grid; grid-template-columns: 240px 1fr; }

/* ============ Sidebar ============ */
.sidebar {
  background: #1A1A1A;
  color: #E0E0E0;
  overflow-y: auto;
  padding: 16px 0;
}
.sidebar-brand {
  padding: 0 20px 16px;
  border-bottom: 1px solid #333;
  margin-bottom: 12px;
}
.sidebar-brand .title { font-size: 14px; font-weight: 600; color: white; }
.sidebar-brand .sub { font-size: 11px; color: #888; margin-top: 2px; }
.nav-section {
  padding: 0 20px;
  font-size: 10px;
  font-weight: 600;
  color: #777;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin: 16px 0 6px;
}
.nav-product { margin-bottom: 4px; }
.nav-product-head {
  padding: 8px 20px;
  font-weight: 500;
  font-size: 13px;
  color: white;
  display: flex; align-items: center; gap: 8px;
  cursor: pointer;
}
.nav-product-head .dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.nav-sub {
  padding: 7px 20px 7px 38px;
  font-size: 12px;
  color: #B0B0B0;
  cursor: pointer;
  border-left: 2px solid transparent;
}
.nav-sub:hover { background: #252525; color: white; }
.nav-sub.active {
  background: #252525;
  color: white;
  border-left-color: #00551E;
}

/* ============ Main ============ */
.main { overflow: hidden; display: flex; flex-direction: column; height: 100vh; }
.main-header {
  padding: 16px 24px;
  background: white;
  border-bottom: 1px solid #E0E0E0;
  display: flex; align-items: center; justify-content: space-between;
}
.breadcrumb {
  font-size: 11px; color: #888;
}
.page-title { font-size: 18px; font-weight: 500; margin-top: 2px; }
.toolbar { display: flex; gap: 8px; }
.btn {
  padding: 7px 12px; background: white; border: 1px solid #D0D0D0;
  border-radius: 6px; font-size: 12px; font-family: inherit;
  cursor: pointer; color: #333;
}
.btn:hover { background: #F5F5F5; }
.btn-primary { background: #00551E; color: white; border-color: #00551E; }
.btn-primary:hover { background: #003E14; }

.main-content {
  flex: 1; overflow: auto; padding: 16px 24px; background: #FAFAFA;
}

/* ============ Roadmap ============ */
.gantt-wrap {
  overflow-x: auto;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
}
.gantt-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  min-width: 2540px;
}
/* Colunas fixas — Item | Tipo | Início | Fim | Status */
.col-fix-1 { position: sticky; left: 0px;   z-index: 3; background: inherit; }
.col-fix-2 { position: sticky; left: 200px; z-index: 3; background: inherit; }
.col-fix-3 { position: sticky; left: 270px; z-index: 3; background: inherit; }
.col-fix-4 { position: sticky; left: 340px; z-index: 3; background: inherit; }
.col-fix-5 { position: sticky; left: 410px; z-index: 3; background: inherit; box-shadow: 2px 0 4px rgba(0,0,0,0.08); }
/* Header fixo */
.gantt-row.header-month .col-fix-1,
.gantt-row.header-month .col-fix-2,
.gantt-row.header-month .col-fix-3,
.gantt-row.header-month .col-fix-4,
.gantt-row.header-month .col-fix-5 { background: #37474F; }
.gantt-row.header-week .col-fix-1,
.gantt-row.header-week .col-fix-2,
.gantt-row.header-week .col-fix-3,
.gantt-row.header-week .col-fix-4,
.gantt-row.header-week .col-fix-5 { background: #ECEFF1; }
.gantt-row {
  display: grid;
  grid-template-columns: 200px 70px 70px 70px 90px repeat(51, minmax(40px, 1fr));
  border-bottom: 1px solid #EEEEEE;
}
.gantt-row.header-month {
  background: #37474F; color: #ECEFF1;
}
.gantt-row.header-week {
  background: #ECEFF1; color: #455A64;
}
.h-cell {
  padding: 6px 4px;
  font-size: 10px;
  text-align: center;
  font-weight: 500;
  border-left: 0.5px solid rgba(255,255,255,0.4);
}
.header-week .h-cell { border-left-color: rgba(0,0,0,0.1); }
.h-fixed {
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 500;
  color: #ECEFF1;
  background: #546E7A;
}
.h-fixed.alt { background: #455A64; }
.month-jan { background: #37474F; }
.month-fev { background: #455A64; }

.banner {
  grid-column: 1 / -1;
  padding: 8px 16px;
  color: white;
  font-weight: 500;
  font-size: 13px;
  display: flex; align-items: center; gap: 8px;
}
.banner-heishop { background: #00551E; }
.banner-promo   { background: #E65100; }
.banner-clube   { background: #13670B; }

.subgroup {
  grid-column: 1 / -1;
  padding: 4px 24px;
  font-size: 11px;
  font-weight: 500;
}
.subgroup-promo { background: #E8F5E9; color: #1B5E20; }
.subgroup-feat  { background: #EDE7F6; color: #4A148C; }

.item-name {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  display: flex; align-items: center; gap: 6px;
  border-right: 1px solid #EEE;
}
.item-name .chevron {
  color: #999; font-size: 10px;
  transition: transform 0.15s;
  display: inline-block;
}
.item-name.expanded .chevron { transform: rotate(90deg); }

.badge {
  margin: auto;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  text-align: center;
}
.badge-cell {
  padding: 6px 4px;
  text-align: center;
  border-right: 1px solid #EEE;
  display: flex; align-items: center; justify-content: center;
}
.b-promo   { background: #E8F5E9; color: #1B5E20; }
.b-feat    { background: #EDE7F6; color: #4A148C; }
.b-ativo   { background: #C8E6C9; color: #1B5E20; }
.b-adef    { background: #FFF9C4; color: #F57F17; }
.b-backlog { background: #ECEFF1; color: #455A64; }
.b-cancel    { background: #FFCDD2; color: #B71C1C; }
.b-concluido { background: #B2DFDB; color: #00695C; }
.b-atraso    { background: #FFE0B2; color: #E65100; }

.bar {
  height: 22px;
  margin: 5px 0;
  color: white;
  font-size: 11px;
  padding: 0 8px;
  border-radius: 3px;
  font-weight: 500;
  line-height: 22px;
  white-space: nowrap; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
}
.bar.edges { justify-content: space-between; }
.bar .date-start, .bar .date-end {
  font-size: 10px; opacity: 0.95; flex: 0 0 auto;
}
.bar-design-dev    { background: #FFA000; color: #FFFFFF; border-radius: 3px 0 0 3px; }
/* Status das etapas: cinza/amarelo/verde */
.e-status-nao       { background: #B0BEC5 !important; color: #455A64 !important; }
.e-status-andamento { background: #FFC107 !important; color: #333333 !important; }
.e-status-concluido { background: #43A047 !important; color: #FFFFFF !important; }
.bar-promo-active  { background: #66BB6A; color: #FFFFFF; border-radius: 0 3px 3px 0; }
.bar-promo-active.solo { border-radius: 3px; }
.bar-suporte       { background: #A5D6A7; color: #1B5E20; }
.bar-feat-active   { background: #6A1B9A; }
.bar-adef        { background: #FFF9C4; border: 1px dashed #F57F17; color: #F57F17; line-height: 20px; }
.bar-backlog     { background: #ECEFF1; border: 1px dashed #90A4AE; color: #455A64; line-height: 20px; }
.bar-concluido   { background: #80CBC4; color: #004D40; }
.bar.collide { box-shadow: 0 0 0 2px #C62828; }

/* ============ Etapas expandidas ============ */
.etapa-row {
  display: grid;
  grid-template-columns: 200px 70px 70px 70px 90px repeat(51, minmax(40px, 1fr));
  background: #FAFAFA;
  border-bottom: 1px solid #F2F2F2;
  align-items: stretch;
  min-height: 26px;
}
.etapa-row:hover { background: #F0F4F0; }
.etapa-name {
  padding: 0 8px 0 36px;
  font-size: 11px;
  font-weight: 500;
  border-right: 1px solid #EEE;
  cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center;
}
.etapa-data {
  padding: 2px 4px; text-align: center;
  font-size: 10px;
  border-right: 1px solid #EEE;
  line-height: 1.15;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.etapa-data .ini { color: #333; font-weight: 500; }
.etapa-data .fim { color: #888; }
.etapa-empty {
  padding: 2px 4px; text-align: center;
  font-size: 11px; color: #BBB;
  border-right: 1px solid #EEE;
  display: flex; align-items: center; justify-content: center;
}
.etapa-bar {
  margin: 2px 0;
  border-radius: 2px;
  cursor: pointer;
  transition: filter 0.1s, transform 0.1s;
  align-self: stretch;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 600;
  white-space: nowrap; overflow: hidden;
  padding: 0 4px;
  line-height: 1;
}
.etapa-bar:hover { filter: brightness(1.1); transform: translateY(-1px); }

/* Cores das etapas (idênticas à planilha) */
.e-briefing   { background: #FFFDE7; color: #7A3900; border: 0.5px solid #FFC107; }
.e-juridico   { background: #FFF9C4; color: #7A3900; border: 0.5px solid #FFC107; }
.e-assets     { background: #FFEE58; color: #7A3900; }
.e-faq        { background: #FFC107; color: #7A3900; }
.e-staging    { background: #FF8F00; color: #FFFFFF; }
.e-testes     { background: #E65100; color: #FFFFFF; }
.e-ajustes    { background: #BF360C; color: #FFFFFF; }
.e-golive     { background: #1B5E20; color: #FFFFFF; }
.e-extp       { background: #E3F2FD; color: #0A2F6B; border: 0.5px solid #1565C0; }
.e-nsorte     { background: #90CAF9; color: #0A2F6B; }
.e-extg       { background: #1565C0; color: #FFFFFF; }
.e-pub        { background: #0D47A1; color: #FFFFFF; }

/* Cores das etapas de FEATURE (spec da skill product-roadmap) */
.e-fbriefing        { background: #EDE7F6; color: #4A148C; }
.e-fdiscovery       { background: #D1C4E9; color: #4A148C; }
.e-fprototipacao    { background: #CE93D8; color: #4A148C; }
.e-faprovacao       { background: #BA68C8; color: #FFFFFF; }
.e-fdesenvolvimento { background: #9C27B0; color: #FFFFFF; }
.e-fqa              { background: #6A1B9A; color: #FFFFFF; }
.e-fhomologacao     { background: #7B1FA2; color: #FFFFFF; }
.e-fgolive          { background: #1B5E20; color: #FFFFFF; }

/* Drops (sub-fases) — linhas indentadas abaixo da etapa-mãe */
.drop-row { background: #FAFAFC; min-height: 22px; }
.drop-row:hover { background: #F0EEF6; }
.drop-name {
  padding: 0 8px 0 54px;
  font-size: 10px;
  font-weight: 400;
  color: #555;
  border-right: 1px solid #EEE;
  cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 6px;
}
.drop-resp {
  font-size: 9px;
  color: #555;
  background: #ECEFF1;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 500;
  margin-left: auto;
  flex: 0 0 auto;
}
.drop-bar {
  margin: 4px 0;
  border-radius: 2px;
  align-self: stretch;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 500;
  white-space: nowrap; overflow: hidden;
  padding: 0 4px;
  opacity: 0.75;
  line-height: 1;
  cursor: pointer;
  transition: opacity 0.1s, transform 0.1s;
}
.drop-bar:hover { opacity: 1; transform: translateY(-1px); }

/* ============ Alert ============ */
.alert-panel {
  margin-top: 16px;
  background: #FFEBEE;
  border-left: 4px solid #C62828;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 12px;
  color: #B71C1C;
}
.alert-panel strong { color: #B71C1C; }
.alert-list { margin-top: 6px; }
.alert-list li { margin: 2px 0; list-style: none; padding-left: 14px; position: relative; }
.alert-list li::before { content: '•'; position: absolute; left: 0; color: #C62828; }

/* ============ Página em branco ============ */
.placeholder {
  text-align: center;
  padding: 80px 40px;
  color: #888;
}
.placeholder h2 { font-size: 18px; color: #555; margin-bottom: 8px; }
.placeholder p { font-size: 13px; max-width: 480px; margin: 0 auto; }

/* ============ Briefing form ============ */
.briefing-form {
  background: white; padding: 20px; border: 1px solid #E0E0E0; border-radius: 8px;
  max-width: 720px;
}
.briefing-form textarea {
  width: 100%; min-height: 240px; padding: 12px; border: 1px solid #DDD;
  border-radius: 6px; font-family: inherit; font-size: 13px; resize: vertical;
}
.briefing-form textarea:focus { outline: none; border-color: #00551E; }
.briefing-form .actions { margin-top: 12px; display: flex; gap: 8px; }

/* ============ Toolbar de filtros ============ */
.filters {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 12px 24px; background: white;
  border-bottom: 1px solid #E0E0E0;
}
.filter-group { display: flex; gap: 4px; align-items: center; }
.filter-label {
  font-size: 11px; color: #757575; font-weight: 500;
  margin-right: 4px; text-transform: uppercase; letter-spacing: 0.4px;
}
.filter-pill {
  padding: 5px 12px; font-size: 12px; border: 1px solid #DDD;
  background: white; border-radius: 999px; cursor: pointer;
  color: #555; font-family: inherit;
}
.filter-pill:hover { background: #F5F5F5; }
.filter-pill.active {
  background: #00551E; color: white; border-color: #00551E;
}
.filter-search {
  margin-left: auto; padding: 6px 12px;
  border: 1px solid #DDD; border-radius: 999px;
  font-size: 12px; width: 220px; font-family: inherit;
}
.filter-search:focus { outline: none; border-color: #00551E; }
.filter-count {
  font-size: 11px; color: #888;
}

/* ============ Hover row + barras ============ */
.item-line { transition: background 0.1s; position: relative; }
.item-line:hover { background: #F5F8F5; }
.bar { position: relative; cursor: pointer; transition: filter 0.1s, transform 0.1s; }
.bar:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* ============ Tooltip ============ */
.tip {
  position: fixed; z-index: 1000;
  background: #1A1A1A; color: white;
  padding: 8px 12px; border-radius: 6px;
  font-size: 12px; line-height: 1.5;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  pointer-events: none;
  max-width: 320px;
  opacity: 0; transition: opacity 0.12s;
}
.tip.show { opacity: 1; }
.tip strong { color: #A5D6A7; font-weight: 500; }
.tip .row { margin-top: 3px; color: #DDD; }
.tip .row b { color: white; font-weight: 500; }

/* ============ Marcador "hoje" ============ */
.today-line {
  position: absolute; top: 0; bottom: 0;
  width: 2px; background: #C62828;
  pointer-events: none; z-index: 5;
}
.today-label {
  position: absolute; top: -3px; transform: translateX(-50%);
  background: #C62828; color: white;
  padding: 1px 6px; border-radius: 3px;
  font-size: 10px; font-weight: 500;
  z-index: 6;
}

/* ============ Hidden state ============ */
.gantt-row.hidden, .etapa-row.hidden, .banner.hidden, .subgroup.hidden { display: none; }

/* ============ Visão estratégica ============ */
.estrat { max-width: 1300px; margin: 0 auto; }
.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.kpi-card {
  background: white; border: 1px solid #E0E0E0; border-radius: 8px;
  padding: 14px 16px;
}
.kpi-label {
  font-size: 11px; color: #777; text-transform: uppercase;
  letter-spacing: 0.4px; font-weight: 500; margin-bottom: 6px;
}
.kpi-value { font-size: 28px; font-weight: 600; color: #212121; line-height: 1; }
.kpi-sub { font-size: 11px; color: #999; margin-top: 4px; }
.kpi-card.alert { border-color: #C62828; background: #FFF5F5; }
.kpi-card.alert .kpi-value, .kpi-card.alert .kpi-label { color: #C62828; }

.estrat-section {
  background: white; border: 1px solid #E0E0E0; border-radius: 8px;
  padding: 16px 20px; margin-bottom: 16px;
}
.estrat-section h2 {
  font-size: 13px; font-weight: 600; color: #00551E;
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px;
}

.heatmap-grid {
  display: grid; grid-template-columns: 80px repeat(51, 1fr);
  gap: 1px; min-width: 1100px;
}
.heatmap-grid .h-row-lbl {
  font-size: 10px; color: #777; padding: 4px;
  display: flex; align-items: center;
}
.heatmap-cell {
  height: 24px; background: #F5F5F5; border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: #555; font-weight: 500;
}
.heatmap-cell.l1 { background: #C8E6C9; color: #1B5E20; }
.heatmap-cell.l2 { background: #81C784; color: #1B5E20; }
.heatmap-cell.l3 { background: #4CAF50; color: white; }
.heatmap-cell.l4 { background: #2E7D32; color: white; }
.heatmap-cell.l5 { background: #C62828; color: white; }
.heatmap-month {
  font-size: 9px; color: #888; text-align: center; font-weight: 500;
  background: #FAFAFA; padding: 3px 0;
}

.lista-itens { display: flex; flex-direction: column; gap: 6px; }
.lista-item {
  display: grid; grid-template-columns: 14px 1fr 90px 80px 90px;
  gap: 8px; align-items: center;
  padding: 8px 10px; background: #FAFAFA;
  border-radius: 6px; border-left: 3px solid #BDBDBD;
  font-size: 12px;
}
.lista-item.heishop { border-left-color: #00551E; }
.lista-item.clube { border-left-color: #13670B; }
.lista-item.promo-prod { border-left-color: #E65100; }
.lista-item:hover { background: #F0F4F0; }
.lista-item .it-nome { font-weight: 500; cursor: pointer; }
.lista-item .it-nome:hover { color: #00551E; text-decoration: underline; }
.lista-item .it-meta { font-size: 11px; color: #777; }
.dot-pequeno { width: 8px; height: 8px; border-radius: 50%; }

.dist-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dist-bar {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px; font-size: 12px;
}
.dist-bar-name { width: 110px; color: #555; }
.dist-bar-track {
  flex: 1; height: 18px; background: #F0F0F0; border-radius: 3px;
  position: relative; overflow: hidden;
}
.dist-bar-fill {
  height: 100%; border-radius: 3px;
  display: flex; align-items: center; padding: 0 6px;
  color: white; font-size: 10px; font-weight: 600;
}

/* ============ Briefing page ============ */
.briefing-page { max-width: 1100px; margin: 0 auto; }
.btn-back {
  background: transparent; border: 1px solid #DDD; padding: 6px 12px;
  border-radius: 6px; font-size: 12px; cursor: pointer; font-family: inherit;
  margin-bottom: 16px; color: #555;
}
.btn-back:hover { background: white; border-color: #00551E; color: #00551E; }

.briefing-hero {
  color: white;
  padding: 28px 32px;
  border-radius: 12px;
  margin-bottom: 24px;
}
.hero-tag {
  font-size: 11px; opacity: 0.85; letter-spacing: 0.6px;
  text-transform: uppercase; font-weight: 600; margin-bottom: 6px;
}
.briefing-hero h1 {
  font-size: 26px; font-weight: 600; margin-bottom: 12px; line-height: 1.2;
}
.hero-meta {
  display: flex; gap: 18px; flex-wrap: wrap;
  font-size: 13px; opacity: 0.95;
}
.hero-meta b { font-weight: 600; }

.briefing-grid {
  display: grid; grid-template-columns: 1fr 320px;
  gap: 24px;
}
.briefing-body section {
  background: white;
  padding: 18px 22px;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  margin-bottom: 16px;
}
/* Capítulos — agrupam múltiplas sections num bloco narrativo */
.briefing-chapter {
  background: linear-gradient(180deg, #F1F8F2 0%, #F9FBF9 60%, transparent 100%);
  border: 1px solid #D0E5D4;
  border-radius: 12px;
  padding: 28px 24px 18px;
  margin-bottom: 28px;
  position: relative;
}
.briefing-chapter::before {
  content: '';
  position: absolute;
  top: 0; left: 24px; right: 24px; height: 3px;
  background: linear-gradient(90deg, #00551E 0%, #2E7D32 60%, transparent 100%);
  border-radius: 0 0 3px 3px;
}
.briefing-chapter-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 1px dashed #C8E6C9;
}
.briefing-chapter-emoji {
  font-size: 28px; line-height: 1;
  background: white;
  border: 1px solid #C8E6C9;
  border-radius: 10px;
  padding: 8px 10px;
  box-shadow: 0 1px 2px rgba(0,85,30,0.08);
}
.briefing-chapter-titulo {
  font-size: 10px; font-weight: 600; letter-spacing: 0.8px;
  color: #2E7D32; text-transform: uppercase; opacity: 0.8;
  margin-bottom: 2px;
}
.briefing-chapter-nome {
  font-size: 19px; font-weight: 700;
  color: #1B5E20; letter-spacing: 0.2px;
  line-height: 1.2;
}
.briefing-chapter > section {
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.briefing-chapter > section:last-child {
  margin-bottom: 0;
}
.briefing-chapter-head {
  cursor: pointer; user-select: none;
}
.briefing-chapter-head:hover { opacity: 0.85; }
.briefing-chapter-arrow {
  color: #00551E; font-size: 14px; transition: transform 0.15s;
}
.briefing-chapter.collapsed .briefing-chapter-arrow { transform: rotate(-90deg); }
.briefing-chapter.collapsed .briefing-chapter-body { display: none; }
.briefing-body h2 {
  font-size: 13px; font-weight: 700; margin-bottom: 10px;
  color: #00551E; letter-spacing: 0.2px;
}
/* Subtítulos de subseção: Fluxo, Drop, Opção, Cenário, Fase, Track, Opção */
.briefing-body h3 {
  font-size: 13px; font-weight: 700; margin: 20px 0 10px;
  color: #00551E; letter-spacing: 0.3px;
  background: #E8F5E9;
  border: 1px solid #C8E6C9;
  border-left: 4px solid #00551E;
  border-radius: 0 6px 6px 0;
  padding: 10px 14px;
  display: block;
}
.briefing-body p { font-size: 13px; line-height: 1.7; color: #333; margin-bottom: 8px; }
.briefing-body ul { font-size: 13px; line-height: 1.8; padding-left: 20px; color: #333; }
.briefing-body ul li { margin-bottom: 3px; }
.briefing-body table {
  width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px;
}
.briefing-body th, .briefing-body td {
  padding: 6px 8px; text-align: left; border-bottom: 1px solid #EEE;
}
.briefing-body th {
  font-size: 10px; text-transform: uppercase; color: #888;
  letter-spacing: 0.4px; font-weight: 500;
}
.briefing-empty { color: #999; font-style: italic; font-size: 12px; }
/* Seções colapsáveis após o cronograma (Anexos, Pendências, Estimativa, Linear MCP) */
.briefing-collapsible {
  background: white;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  margin-bottom: 14px;
  overflow: hidden;
}
.briefing-collapsible-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; cursor: pointer; user-select: none;
  background: #FAFAFA; border-bottom: 1px solid #E0E0E0;
  font-size: 15px; font-weight: 600; color: #00551E;
  transition: background 0.15s;
}
.briefing-collapsible-header:hover { background: #F0F4F0; }
.briefing-collapsible-header .col-arrow {
  color: #00551E; font-size: 14px; transition: transform 0.15s;
}
.briefing-collapsible-body {
  padding: 18px; font-size: 13px; color: #333;
}
.briefing-collapsible-body table {
  width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 12px;
}
.briefing-collapsible-body th, .briefing-collapsible-body td {
  padding: 6px 10px; border: 1px solid #EEE; text-align: left;
}
.briefing-collapsible-body th {
  background: #F5F5F5; font-size: 11px; text-transform: uppercase;
  color: #666; letter-spacing: 0.4px;
}
.briefing-collapsible.collapsed .briefing-collapsible-body { display: none; }
.briefing-collapsible.collapsed .briefing-collapsible-header { border-bottom: none; }
.briefing-collapsible.collapsed .col-arrow { transform: rotate(-90deg); }
.briefing-collapsible-badge {
  background: #F57F17; color: white; border-radius: 10px;
  padding: 2px 8px; font-size: 11px; margin-left: 8px;
}
/* Itens "A definir" — ocultos por padrão no documento principal, com toggle */
.briefing-adefinir { display: none; }
body.show-adefinir .briefing-adefinir {
  display: revert;
  background: #FFF9C4;
  outline: 1px dashed #FFC107;
  outline-offset: -1px;
}
body.show-adefinir tr.briefing-adefinir { display: table-row; }
/* Card de Pendências no sidebar */
.side-pendencias { background: #FFF8E1; border: 1px solid #FFE082; }
.side-pendencias h3 { color: #F57F17; }
.pendencia-item {
  font-size: 12px; line-height: 1.5;
  padding: 6px 0; border-bottom: 1px dashed #FFE082;
  color: #5D4037;
}
.pendencia-item:last-child { border-bottom: none; }
.pendencia-item b { color: #BF360C; font-weight: 600; }
.pendencia-toggle {
  font-size: 11px; color: #F57F17; cursor: pointer;
  background: none; border: 1px solid #FFC107; border-radius: 4px;
  padding: 4px 8px; margin-top: 8px; font-family: inherit; font-weight: 600;
}
.pendencia-toggle:hover { background: #FFC107; color: white; }
.pendencia-empty { color: #999; font-style: italic; font-size: 12px; }
/* Seção de Regras de Negócio */
.briefing-regras { display: flex; flex-direction: column; gap: 6px; }
.briefing-regra-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 12px;
  background: #F9FBF9; border-left: 3px solid #00551E;
  border-radius: 0 6px 6px 0; font-size: 13px; color: #333; line-height: 1.5;
}
.briefing-regra-item.alert {
  background: #FFF8E1; border-left-color: #F9A825;
}
.briefing-regra-item::before {
  content: '•'; color: #00551E; font-weight: 700;
  flex-shrink: 0; margin-top: 1px;
}
.briefing-regra-item.alert::before { content: '⚠️'; }

.briefing-inline-table {
  width: 100%; border-collapse: collapse; font-size: 12px; margin: 10px 0;
}
.briefing-inline-table th {
  font-size: 10px; text-transform: uppercase; color: #888;
  letter-spacing: 0.4px; font-weight: 600;
  padding: 7px 10px; text-align: left;
  border-bottom: 2px solid #00551E; background: #F9FBF9;
}
.briefing-inline-table td {
  padding: 7px 10px; text-align: left;
  border-bottom: 1px solid #EEE; vertical-align: top;
  font-size: 12px; color: #333; line-height: 1.5;
}
.briefing-inline-table tr:last-child td { border-bottom: none; }
.briefing-inline-table tr:hover td { background: #F5F8F5; }
.briefing-code-block {
  background: #F5F5F5; color: #212121;
  border: 1px solid #E0E0E0;
  border-radius: 8px; padding: 16px 18px;
  font-family: 'Consolas', 'Fira Code', 'Courier New', monospace;
  font-size: 12px; line-height: 1.6;
  overflow-x: auto; white-space: pre;
  margin: 8px 0;
}
.briefing-endpoint {
  background: #F5F5F5; border: 1px solid #E0E0E0;
  border-radius: 8px; padding: 14px 16px; margin: 8px 0;
  font-family: 'Consolas', 'Fira Code', 'Courier New', monospace;
  font-size: 12px; line-height: 1.6; overflow-x: auto; white-space: pre;
}
.ep-method-post { color: #2E7D32; font-weight: 700; }
.ep-method-get  { color: #1565C0; font-weight: 700; }
.ep-method-put  { color: #E65100; font-weight: 700; }
.ep-method-del  { color: #B71C1C; font-weight: 700; }
.ep-path { color: #212121; font-weight: 600; }
.ep-desc { color: #666; font-size: 11px; font-family: inherit; }
.briefing-code-block .ck-key  { color: #0D47A1; }
.briefing-code-block .ck-str  { color: #2E7D32; }
.briefing-code-block .ck-num  { color: #E65100; }
.briefing-code-block .ck-bool { color: #6A1B9A; }
.briefing-code-block .ck-null { color: #6A1B9A; }
.briefing-code-label {
  font-size: 11px; font-weight: 600; color: #555;
  text-transform: uppercase; letter-spacing: 0.4px;
  margin-bottom: 4px; display: block;
}
.historico-row { font-size: 12px; padding: 6px 0; border-bottom: 1px solid #F0F0F0; line-height: 1.4; }
.glossario-row { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px;
  padding: 5px 0; border-bottom: 1px solid #F0F0F0; font-size: 12px; }
.glossario-row:last-child { border-bottom: none; }
.glossario-row .g-termo { font-weight: 700; color: #00551E; white-space: nowrap; }
.glossario-row .g-def { color: #555; }
.historico-row:last-child { border-bottom: none; }
.historico-row b { color: #00551E; font-size: 11px; }

/* Cronograma visual dentro do briefing (substitui tabela Plano de Etapas) */
.briefing-cron {
  margin-top: 10px;
  overflow-x: auto;
  background: #FAFAFA;
  border-radius: 6px;
  padding: 8px;
}
.briefing-cron-grid {
  display: grid;
  grid-template-columns: 150px repeat(51, minmax(9px, 1fr));
  font-size: 10px;
  min-width: 620px;
}
.bcron-month-cell {
  padding: 5px 2px;
  text-align: center;
  font-size: 9px;
  font-weight: 600;
  background: #ECEFF1;
  color: #455A64;
  border-bottom: 1px solid #DDD;
}
.bcron-name-header {
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 600;
  background: #546E7A;
  color: white;
  border-bottom: 1px solid #DDD;
}
.bcron-name {
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 500;
  color: #333;
  border-bottom: 1px solid #F0F0F0;
  background: white;
  display: flex; align-items: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bcron-name.drop {
  padding-left: 24px;
  font-size: 10px;
  color: #666;
  font-weight: 400;
}
.bcron-bar {
  margin: 3px 0;
  border-radius: 2px;
  align-self: stretch;
  display: flex; align-items: center; padding: 0 4px;
  font-size: 9px; font-weight: 600;
  white-space: nowrap; overflow: hidden;
  line-height: 1;
  border-bottom: 1px solid #F0F0F0;
}
.bcron-bar.drop { opacity: 0.75; font-weight: 500; }
.bcron-empty {
  color: #BBB;
  font-style: italic;
  font-size: 10px;
  padding: 6px 8px;
  background: white;
  border-bottom: 1px solid #F0F0F0;
  display: flex; align-items: center;
}
.bcron-sit {
  margin-left: auto;
  font-size: 9px;
  flex: 0 0 auto;
  padding-left: 4px;
}

.briefing-side .side-card {
  background: white; border: 1px solid #E0E0E0; border-radius: 8px;
  padding: 14px 16px; margin-bottom: 12px;
}
.side-card h3 {
  font-size: 12px; font-weight: 600; margin-bottom: 10px;
  color: #555; text-transform: uppercase; letter-spacing: 0.5px;
}
.mini-gantt-wrap {
  display: flex; flex-direction: column; gap: 4px;
}
.mini-gantt-bar {
  height: 12px; background: #66BB6A; border-radius: 2px;
  color: white; font-size: 9px; padding: 0 6px;
  display: flex; align-items: center; justify-content: space-between;
}
.mini-gantt-bar.design { background: #FFA000; }
.mini-gantt-meta { font-size: 11px; color: #777; margin-top: 4px; }

.stakeholder-row {
  font-size: 12px; padding: 5px 0; border-bottom: 1px solid #F0F0F0; display: flex; flex-direction: column; gap: 2px;
}
.stakeholder-row:last-child { border-bottom: none; }
.stakeholder-nome { font-weight: 600; color: #212121; }
.stakeholder-org { font-size: 10px; color: #888; }
.stakeholder-papel { font-size: 11px; color: #555; }
.stakeholder-tag {
  background: #ECEFF1; color: #455A64;
  padding: 1px 6px; border-radius: 3px; font-size: 10px; font-weight: 500;
}

.historico-row {
  font-size: 11px; padding: 4px 0; color: #666; line-height: 1.4;
}
.historico-row b { color: #333; font-weight: 500; }

/* item-name agora tem 2 partes clicáveis distintas */
.item-name .chevron-btn {
  cursor: pointer; padding: 0 4px; color: #999;
}
.item-name .chevron-btn:hover { color: #00551E; }
.item-name .name-link {
  cursor: pointer; flex: 1;
}
.item-name .name-link:hover { color: #00551E; text-decoration: underline; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CCC; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #999; }
