/* ══ GESTÃO TEVA — Estilos específicos ══════════════════════════ */

/* ── Sidebar: grupos expansíveis e subitens ────────────────── */
.nav-group { margin-bottom: 2px; }
.nav-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.65);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
}
.nav-group-toggle:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.nav-group-toggle.active {
  background: rgba(255,255,255,0.13);
  color: #fff;
}
.nav-group-toggle.active .nav-icon {
  background: var(--accent);
}
.nav-group-chevron {
  width: 14px !important;
  height: 14px !important;
  margin-left: auto;
  transition: transform 0.18s;
  opacity: 0.5;
}
.nav-group.open .nav-group-chevron { transform: rotate(180deg); }
.nav-group-children {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.18s ease-out;
  padding-left: 28px;
}
.nav-group.open .nav-group-children {
  max-height: 240px;
  padding-top: 2px;
  padding-bottom: 4px;
}
.nav-subitem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  margin-bottom: 1px;
  transition: all 0.15s;
}
.nav-subitem:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}
.nav-subitem.active {
  background: rgba(139,196,160,0.15);
  color: var(--accent);
}
.nav-subitem svg { width: 14px; height: 14px; }


/* ── Today header ─────────────────────────────────────────────── */
.today-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding: 24px 28px;
  background: var(--primary);
  border-radius: var(--radius);
  color: #fff;
}
.today-date { font-size: 28px; font-weight: 800; line-height: 1.2; }
.today-greeting { font-size: 14px; color: rgba(255,255,255,0.55); margin-top: 4px; }

/* ── Clima Cascavel ───────────────────────────────────────────── */
.clima-card { padding: 20px 22px; }
.clima-now {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.clima-now-left { display: flex; align-items: center; gap: 14px; }
.clima-now-icon {
  width: 56px; height: 56px;
  border-radius: 12px;
  background: var(--bg-green);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-dark);
}
.clima-now-icon svg { width: 32px; height: 32px; }
.clima-now-city { font-weight: 800; font-size: 16px; color: var(--text-dark); }
.clima-now-desc { font-size: 12px; color: var(--text-gray); margin-top: 2px; }
.clima-now-temp { font-size: 42px; font-weight: 800; color: var(--primary); line-height: 1; }
.clima-now-extra { display: flex; gap: 14px; font-size: 12px; color: var(--text-gray); margin-top: 6px; justify-content: flex-end; }
.clima-now-extra span { display: inline-flex; align-items: center; gap: 4px; }
.clima-now-extra svg { width: 13px; height: 13px; }

.clima-dias {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.clima-dia {
  padding: 12px 6px;
  border-radius: var(--radius-sm);
  background: var(--bg-light);
  text-align: center;
}
.clima-dia.is-today { background: var(--bg-green); border: 1px solid var(--accent); }
.clima-dia-label { font-size: 11px; font-weight: 700; color: var(--text-gray); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.clima-dia-icon svg { width: 24px; height: 24px; color: var(--primary); }
.clima-dia-temp { font-size: 13px; font-weight: 700; margin-top: 4px; }
.clima-dia-temp .max { color: var(--text-dark); }
.clima-dia-temp .min { color: var(--text-gray); margin-left: 4px; }
.clima-dia-chuva { font-size: 10px; color: #3b82f6; margin-top: 3px; font-weight: 600; }

/* ── Card genérico com título ─────────────────────────────────── */
.gx-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.gx-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gx-card-header h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-dark);
}
.gx-card-body { padding: 18px 20px; }

/* ── Layout dashboard (grid de 2 colunas) ─────────────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
@media (max-width: 900px){
  .dash-grid { grid-template-columns: 1fr; }
}

/* ── Obras grid ───────────────────────────────────────────────── */
.obras-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.obra-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all .15s ease;
  display: block;
  text-decoration: none;
  color: inherit;
}
.obra-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
.obra-card-cover {
  height: 90px;
  position: relative;
}
.obra-card-cover::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(0,0,0,0.15));
}
.obra-card-body { padding: 14px 16px 16px; }
.obra-card-title {
  font-weight: 800;
  font-size: 15px;
  color: var(--text-dark);
  margin-bottom: 3px;
}
.obra-card-cliente {
  font-size: 12px;
  color: var(--text-gray);
  margin-bottom: 10px;
}
.obra-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-gray);
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.obra-card-meta strong { color: var(--text-dark); font-weight: 700; display: block; font-size: 13px; margin-top: 2px; }
.obra-card-progresso {
  height: 6px;
  border-radius: 6px;
  background: var(--bg-light);
  overflow: hidden;
  margin-bottom: 10px;
}
.obra-card-progresso-bar {
  height: 100%;
  background: var(--accent-dark);
}

/* ── Tabs ─────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.tab-btn {
  background: none;
  border: none;
  padding: 12px 18px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-gray);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: -1px;
}
.tab-btn svg { width: 16px; height: 16px; }
.tab-btn:hover { color: var(--primary); }
.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--accent);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Obra header ──────────────────────────────────────────────── */
.obra-header {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.obra-header .oh-breadcrumb {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.obra-header .oh-breadcrumb a { color: rgba(255,255,255,0.7); text-decoration: none; }
.obra-header .oh-breadcrumb a:hover { color: var(--accent); }
.obra-header h1 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.obra-header .oh-cliente { font-size: 14px; color: rgba(255,255,255,0.65); }
.obra-header .oh-stats {
  display: flex;
  gap: 22px;
  align-items: flex-end;
}
.obra-header .oh-stat-label { font-size: 10px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.06em; }
.obra-header .oh-stat-value { font-size: 18px; font-weight: 800; color: var(--accent); margin-top: 2px; }

/* ── Tabela financeira ────────────────────────────────────────── */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tbl th, .tbl td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.tbl th {
  background: var(--bg-light);
  font-weight: 700;
  color: var(--text-mid);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tbl tbody tr:hover { background: var(--bg-light); }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl input, .tbl select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  background: var(--white);
}
.tbl input:focus, .tbl select:focus {
  outline: none;
  border-color: var(--accent);
}

/* ── Bar chart (previsto vs realizado) ────────────────────────── */
.chart-wrap {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  padding: 16px 0 40px;
  overflow-x: auto;
  min-height: 220px;
}
.chart-mes {
  flex: 1;
  min-width: 60px;
  text-align: center;
  position: relative;
}
.chart-bars { display: flex; gap: 4px; align-items: flex-end; justify-content: center; height: 180px; }
.chart-bar {
  width: 22px;
  border-radius: 4px 4px 0 0;
  position: relative;
}
.chart-bar.prev { background: linear-gradient(to top, #93c5fd, #60a5fa); }
.chart-bar.real { background: linear-gradient(to top, var(--accent-dark), var(--accent)); }
.chart-bar-val {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 700;
  color: var(--text-gray);
  white-space: nowrap;
}
.chart-mes-label {
  position: absolute;
  bottom: -24px;
  left: 0; right: 0;
  font-size: 11px;
  color: var(--text-gray);
  font-weight: 700;
}
.chart-legend {
  display: flex;
  gap: 20px;
  justify-content: center;
  font-size: 12px;
  color: var(--text-gray);
  margin-top: 6px;
}
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend .dot {
  width: 12px; height: 12px; border-radius: 3px;
}
.chart-legend .dot.prev { background: #60a5fa; }
.chart-legend .dot.real { background: var(--accent-dark); }

/* ── KPI mini-cards ───────────────────────────────────────────── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.kpi {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.kpi-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.kpi-value { font-size: 22px; font-weight: 800; color: var(--text-dark); }
.kpi-value.green  { color: var(--accent-dark); }
.kpi-value.red    { color: #dc2626; }
.kpi-value.blue   { color: #2563eb; }
.kpi-sub { font-size: 11px; color: var(--text-gray); margin-top: 4px; }

/* ── Diário de obra ───────────────────────────────────────────── */
.diario-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
}
@media (max-width: 900px){
  .diario-layout { grid-template-columns: 1fr; }
}
.mini-cal-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.mini-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.mini-cal-header h4 {
  font-weight: 800;
  font-size: 14px;
  color: var(--text-dark);
}
.mini-cal-header button {
  width: 26px; height: 26px;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-gray);
  display: inline-flex; align-items: center; justify-content: center;
}
.mini-cal-header button:hover { border-color: var(--accent); color: var(--primary); }
.mini-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.mini-cal-dow {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-gray);
  padding: 4px 0;
  text-transform: uppercase;
}
.mini-cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  border-radius: 8px;
  position: relative;
}
.mini-cal-day.other { color: var(--text-gray); opacity: 0.4; }
.mini-cal-day:hover { background: var(--bg-green); }
.mini-cal-day.today {
  border: 1.5px solid var(--accent);
}
.mini-cal-day.active {
  background: var(--primary);
  color: #fff;
}
.mini-cal-day.has-entry::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent-dark);
}
.mini-cal-day.active.has-entry::after { background: var(--accent); }

.diario-day-card { padding: 20px 22px; }
.diario-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.diario-day-date {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-dark);
}
.diario-nota {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  line-height: 1.5;
}
.diario-nota:focus { outline: none; border-color: var(--accent); }
.diario-imgs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.diario-img {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-light);
  border: 1px solid var(--border);
}
.diario-img img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.diario-img .rm {
  position: absolute;
  top: 6px; right: 6px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.diario-img .rm svg { width: 14px; height: 14px; }
.diario-add {
  aspect-ratio: 1;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-gray);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  background: none;
  font-family: inherit;
}
.diario-add:hover { border-color: var(--accent); color: var(--primary); background: var(--bg-green); }

/* ── Modal ────────────────────────────────────────────────────── */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
}
.modal-bg.show { display: flex; }
.modal-card {
  background: var(--white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 { font-weight: 800; font-size: 17px; color: var(--text-dark); }
.modal-close {
  background: none;
  border: none;
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-gray);
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--bg-light); color: var(--primary); }
.modal-body { padding: 20px 22px; }
.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ── Form fields ──────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-mid);
  margin-bottom: 5px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  background: var(--white);
}
.field textarea { resize: vertical; min-height: 80px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── Badge status ─────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge.verde { background: #d1fae5; color: #065f46; }
.badge.azul  { background: #dbeafe; color: #1d4ed8; }
.badge.ambar { background: #fef3c7; color: #92400e; }
.badge.cinza { background: var(--bg-light); color: var(--text-gray); }
.badge.vermelho { background: #fee2e2; color: #991b1b; }

/* ── Page content spacing helper ─────────────────────────────── */
.page-content h1.page-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}
.page-subtitle {
  font-size: 13px;
  color: var(--text-gray);
  margin-bottom: 22px;
}

/* ── Floating action ──────────────────────────────────────────── */
.btn-ghost {
  background: none;
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--primary); }
.btn-ghost svg { width: 14px; height: 14px; }

/* ── Empty state ──────────────────────────────────────────────── */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-gray);
}
.empty svg { width: 48px; height: 48px; stroke-width: 1; opacity: 0.4; margin-bottom: 14px; }
.empty-title { font-weight: 800; color: var(--text-dark); font-size: 15px; margin-bottom: 4px; }
.empty-desc { font-size: 13px; margin-bottom: 16px; }

/* ══ Planilha editável tipo Excel ══════════════════════════════ */
.xls-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
}
.xls {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  table-layout: fixed;
}
.xls th, .xls td {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0;
  vertical-align: middle;
  background: var(--white);
  position: relative;
}
.xls th {
  background: #f1f5f9;
  color: var(--text-mid);
  font-weight: 700;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 9px 10px;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.xls th.num { text-align: right; }
.xls tbody tr:hover td { background: #f8fafc; }
.xls tbody tr:nth-child(even) td { background: #fcfcfd; }
.xls tbody tr:nth-child(even):hover td { background: #f8fafc; }
.xls tbody tr.xls-row-num td:first-child {
  background: #f1f5f9;
  color: var(--text-gray);
  text-align: center;
  font-weight: 700;
  font-size: 11px;
  padding: 8px 4px;
  width: 38px;
}

/* células com input ocupam todo o espaço */
.xls input,
.xls select {
  width: 100%;
  border: none;
  background: transparent;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text-dark);
  box-sizing: border-box;
  outline: none;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
}
.xls select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='%2364748b'><path d='M0 0l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 8px;
  padding-right: 22px;
}
.xls input:focus,
.xls select:focus {
  background: #fffbea;
  box-shadow: inset 0 0 0 2px var(--accent);
  position: relative;
  z-index: 1;
}
.xls td.xls-num input { text-align: right; font-variant-numeric: tabular-nums; }
.xls td.xls-link {
  text-align: center;
  padding: 0;
}
.xls td.xls-link a,
.xls td.xls-link button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 34px;
  padding: 6px;
  border: none;
  background: transparent;
  color: var(--text-gray);
  cursor: pointer;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
}
.xls td.xls-link a { color: var(--accent-dark); }
.xls td.xls-link a:hover { background: #ecfdf5; }
.xls td.xls-link button:hover { background: #f1f5f9; color: var(--text-dark); }
.xls td.xls-link svg { width: 14px; height: 14px; }
.xls td.xls-del {
  text-align: center;
  width: 40px;
}
.xls td.xls-del button {
  background: transparent;
  border: none;
  color: var(--text-gray);
  cursor: pointer;
  padding: 8px;
  width: 100%;
}
.xls td.xls-del button:hover { color: #dc2626; background: #fef2f2; }
.xls td.xls-del svg { width: 14px; height: 14px; }

.xls tfoot td {
  background: #f8fafc;
  font-weight: 700;
  font-size: 12px;
  padding: 10px 10px;
  border-top: 2px solid var(--border);
  color: var(--text-dark);
}
.xls tfoot td.num { text-align: right; font-variant-numeric: tabular-nums; color: #dc2626; }

.xls-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.xls-toolbar .filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.xls-toolbar select,
.xls-toolbar input {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12.5px;
  font-family: inherit;
  background: var(--white);
  color: var(--text-dark);
}
.xls-toolbar input[type="search"] { min-width: 200px; }

/* modal link (comprovante / NF) */
.xls-link-input {
  display: flex;
  gap: 8px;
  align-items: center;
}
.xls-link-input input {
  flex: 1;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
}

/* ══ Gantt (EVF / Cronograma) ══════════════════════════════════ */
.gantt-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
}
.gantt {
  display: grid;
  font-size: 12px;
  min-width: 900px;
}
.gantt-header,
.gantt-row {
  display: grid;
  align-items: stretch;
  border-bottom: 1px solid var(--border);
}
.gantt-header {
  background: #f1f5f9;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-mid);
  position: sticky;
  top: 0;
  z-index: 2;
}
.gantt-cell-etapa {
  padding: 10px 12px;
  background: inherit;
  border-right: 1px solid var(--border);
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: sticky;
  left: 0;
  z-index: 1;
}
.gantt-row .gantt-cell-etapa { background: var(--white); }
.gantt-row:hover .gantt-cell-etapa { background: #f8fafc; }
.gantt-cell-valor {
  padding: 10px 12px;
  border-right: 1px solid var(--border);
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
.gantt-months {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(60px, 1fr);
}
.gantt-month {
  border-right: 1px dashed var(--border);
  padding: 10px 6px;
  text-align: center;
  font-size: 10.5px;
}
.gantt-bars {
  position: relative;
  height: 36px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(60px, 1fr);
}
.gantt-bars .gantt-month-cell {
  border-right: 1px dashed #f1f5f9;
}
.gantt-bar {
  position: absolute;
  top: 6px;
  bottom: 6px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 0 8px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  cursor: default;
}
.gantt-bar-empty {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 4px;
  right: 4px;
  border: 1px dashed var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  color: var(--text-gray);
  font-style: italic;
}

/* ══ Gráfico Previsto × Realizado ══════════════════════════════ */
.prx-chart {
  padding: 20px 12px 8px;
}
.prx-bars {
  display: flex;
  align-items: flex-end;
  gap: 28px;
  padding: 16px 0 8px;
  min-height: 240px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
}
.prx-mes {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
  flex: 0 0 auto;
}
.prx-mes-bars {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 200px;
}
.prx-bar {
  width: 28px;
  border-radius: 4px 4px 0 0;
  position: relative;
  min-height: 2px;
  transition: opacity 0.15s;
}
.prx-bar.prev { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.prx-bar.real { background: linear-gradient(180deg, var(--accent), var(--accent-dark)); }
.prx-bar:hover { opacity: 0.85; }
.prx-bar-val {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-mid);
  white-space: nowrap;
}
.prx-mes-label {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-mid);
}
.prx-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  padding: 10px 0 4px;
  font-size: 12px;
  color: var(--text-mid);
}
.prx-legend .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: -1px;
}
.prx-legend .dot.prev { background: #2563eb; }
.prx-legend .dot.real { background: var(--accent-dark); }
