* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f5f5;
  color: #333;
}

/* ===== TELA DE LOGIN ===== */
.container-login {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
  background: white;
  padding: 50px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
}

.login-box h1 {
  text-align: center;
  color: #667eea;
  margin-bottom: 10px;
  font-size: 28px;
}

.subtitle {
  text-align: center;
  color: #888;
  margin-bottom: 30px;
  font-size: 14px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
}

.btn-login {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  font-size: 16px;
  transition: transform 0.2s;
}

.btn-login:hover {
  transform: translateY(-2px);
}

.info-login {
  margin-top: 20px;
  padding: 15px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  font-size: 13px;
  color: #333;
  text-align: center;
  line-height: 2;
}

.info-login strong {
  color: #4f46e5;
  font-size: 14px;
  display: block;
  margin-bottom: 4px;
}

/* ===== HEADER ===== */
.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.header h1 {
  font-size: 24px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 20px;
}

.btn-logout {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid white;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-logout:hover {
  background: white;
  color: #667eea;
}

.btn-trocar-usuario {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-trocar-usuario:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: white;
}

.perfil-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.15);
  color: white;
}

.perfil-badge.perfil-comprador { background: rgba(52, 211, 153, 0.3); border-color: #34d399; }
.perfil-badge.perfil-coordenador { background: rgba(251, 191, 36, 0.3); border-color: #fbbf24; }
.perfil-badge.perfil-aprendiz { background: rgba(167, 139, 250, 0.3); border-color: #a78bfa; }

/* ===== NAVEGAÇÃO ===== */
.navbar {
  background: white;
  padding: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  border-bottom: 1px solid #ddd;
}

.tab-btn {
  flex: 1;
  padding: 15px 20px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  border-bottom: 3px solid transparent;
  transition: all 0.3s;
  text-align: center;
}

.tab-btn:hover {
  background: #f9f9f9;
}

.tab-btn.active {
  color: #667eea;
  border-bottom-color: #667eea;
}

/* ===== CONTEÚDO ===== */
.principal {
  min-height: 100vh;
  background: #f5f5f5;
}

.aba-content {
  display: none;
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
  animation: fadeIn 0.3s ease-in;
}

.aba-ativa {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===== TABELA ===== */
.toolbar {
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
}

.input-filtro, #filtroStatusSelect {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
}

.tabela-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: #f9f9f9;
  border-bottom: 2px solid #ddd;
}

th {
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  color: #333;
  font-size: 13px;
}

td {
  padding: 12px 8px;
  border-bottom: 1px solid #eee;
  font-size: 13px;
}

tbody tr:hover {
  background: #f9f9f9;
}

.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.status-concluido {
  background: #d4edda;
  color: #155724;
}

.status-cotacao {
  background: #fff3cd;
  color: #856404;
}

.status-assinatura {
  background: #cce5ff;
  color: #004085;
}

.status-assinatura-diretor {
  background: #e2d9f3;
  color: #4a235a;
}

/* ===== BOTÕES ===== */
.btn-acao {
  padding: 6px 12px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  margin-right: 5px;
  transition: all 0.3s;
}

.btn-acao:hover {
  background: #764ba2;
  transform: translateY(-2px);
}

.btn-deletar {
  background: #dc3545;
}

.btn-deletar:hover {
  background: #c82333;
}

.btn-reset-senha {
  background: #fd7e14;
}

.btn-reset-senha:hover {
  background: #e8610a;
}

.btn-enviar {
  padding: 12px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s;
}

.btn-enviar:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-cancelar {
  padding: 10px 20px;
  background: #ccc;
  color: #333;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-cancelar:hover {
  background: #bbb;
}

.btn-salvar {
  padding: 10px 20px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-salvar:hover {
  background: #218838;
}

/* ===== RELATÓRIOS ===== */
.relatorios-container {
  max-width: 1000px;
  margin: 0 auto;
}

.relatorios-container h2 {
  color: #333;
  margin-bottom: 10px;
}

.relatorios-descricao {
  color: #666;
  margin-bottom: 30px;
  font-size: 14px;
}

.relatorio-card {
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.relatorio-info h3 {
  color: #333;
  margin-bottom: 8px;
}

.relatorio-info p {
  color: #666;
  margin-bottom: 15px;
  font-size: 14px;
}

.relatorio-detalhes {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.relatorio-detalhes span {
  font-size: 12px;
  color: #888;
  display: flex;
  align-items: center;
  gap: 5px;
}

.relatorio-acoes {
  text-align: right;
}

.btn-relatorio {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-relatorio:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.relatorio-preview {
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.relatorio-preview h4 {
  color: #333;
  margin-bottom: 20px;
}

.preview-content {
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 15px;
  background: #fafafa;
}

.preview-header {
  text-align: center;
  font-size: 14px;
  color: #333;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #667eea;
}

.preview-stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
  font-size: 13px;
}

.preview-stats div {
  text-align: center;
}

.preview-stats span {
  font-weight: bold;
  color: #667eea;
}

.preview-table table {
  width: 100%;
  font-size: 11px;
}

.preview-table th {
  background: #f0f0f0;
  padding: 8px;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid #ddd;
}

.preview-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #eee;
}

/* ===== DASHBOARD ===== */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dashboard-header h2 {
  color: #333;
  font-size: 24px;
  margin: 0;
}

.comprador-container {
  max-width: 900px;
  margin: 0 auto;
}

.filtro-busca {
  margin-bottom: 20px;
}

.filtro-busca-inputs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.filtro-busca-inputs input {
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 5px;
  min-width: 180px;
  flex: 1;
}

.comprador-resultado {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.comprador-resultado p {
  margin: 0;
  color: #555;
}

.comprador-auto-save-status {
  min-height: 20px;
  margin: -4px 0 12px;
  font-size: 13px;
  color: #666;
}

.comprador-auto-save-status.salvo {
  color: #1e7e34;
}

.comprador-auto-save-status.erro {
  color: #c82333;
}

.erro {
  color: #c82333;
}

.filtro-responsavel,
.filtro-setor {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filtro-responsavel label,
.filtro-setor label {
  font-weight: 600;
  color: #555;
}

.filtro-responsavel select,
.filtro-setor select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: white;
  font-size: 14px;
  min-width: 200px;
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  border-left: 4px solid #667eea;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.card.status-card[data-status="concluido"] {
  border-left-color: #28a745;
}

.card.status-card[data-status="cotacao"] {
  border-left-color: #ffc107;
}

.card.status-card[data-status="assinatura"] {
  border-left-color: #17a2b8;
}

.card.status-card[data-status="total"] {
  border-left-color: #667eea;
}

.card-content h3 {
  font-size: 16px;
  color: #666;
  margin-bottom: 8px;
  font-weight: 600;
}

.card-value {
  font-size: 36px;
  font-weight: bold;
  color: #333;
  margin-bottom: 4px;
}

.card-subtitle {
  font-size: 14px;
  color: #888;
  font-weight: 500;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.metric-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.metric-card h4 {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
  font-weight: 600;
}

.metric-value {
  font-size: 24px;
  font-weight: bold;
  color: #333;
}

/* Responsividade para dashboard */
@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .dashboard-cards {
    grid-template-columns: 1fr;
  }
  
  .dashboard-metrics {
    grid-template-columns: 1fr;
  }
}

.preview-table tbody tr:nth-child(even) {
  background: #f9f9f9;
}

/* ===== FORMULÁRIO ===== */
.form-container {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  max-width: 600px;
}

.form-container h2 {
  margin-bottom: 20px;
  color: #333;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.form-group input, .form-group select {
  width: 100%;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  font-family: inherit;
}

.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: #667eea;
}

.form-group input:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
}

/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease-in;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 8px;
  max-width: 600px;
  margin: 10% auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

.close:hover {
  color: #000;
}

.modal-content h2 {
  margin-bottom: 20px;
  color: #333;
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 30px;
}

.detalhes-item {
  margin-bottom: 15px;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 5px;
  border-left: 4px solid #667eea;
}

.detalhes-item strong {
  display: block;
  color: #667eea;
  margin-bottom: 5px;
}

.editable-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detalhes-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.detalhes-cell {
  flex: 1 1 240px;
}

.comprador-resumo-sc {
  flex: 0 0 180px;
}

.comprador-resumo-descricao {
  flex: 1 1 320px;
  min-width: 0;
  word-break: break-word;
}

.editable-field input {
  padding: 8px 12px;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.editable-field input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.current-value {
  font-size: 12px;
  color: #666;
  font-style: italic;
}

.historico-list {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 10px;
}

.historico-item {
  padding: 10px;
  border-bottom: 1px solid #eee;
  font-size: 13px;
}

.historico-item:last-child {
  border-bottom: none;
}

.historico-item strong {
  color: #667eea;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 768px) {
  .login-box {
    padding: 30px 20px;
  }

  .header-content {
    flex-direction: column;
    gap: 15px;
  }

  .navbar {
    flex-wrap: wrap;
  }

  .tab-btn {
    flex: 1 0 45%;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .graficos-container {
    grid-template-columns: 1fr;
  }

  table {
    font-size: 11px;
  }

  th, td {
    padding: 6px 4px;
  }

  .btn-acao {
    padding: 3px 6px;
    font-size: 10px;
  }

  .modal-content {
    margin: 20% auto;
    width: 90%;
  }
}

/* ===== UTILITÁRIO ===== */
.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.hidden {
  display: none !important;
}

.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Barra de rolagem customizada */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #764ba2;
}

/* ===== ADMINISTRAÇÃO DE USUÁRIOS ===== */
.admin-container {
  max-width: 1100px;
  margin: 0 auto;
}

/* ===== GESTÃO SUPRIMENTOS ===== */
.suprimentos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(520px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.suprimentos-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 24px;
}

.suprimentos-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #374151;
  margin: 0 0 16px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #e5e7eb;
}

.suprimentos-chart-wrap {
  position: relative;
  height: 320px;
}

.suprimentos-card-full {
  grid-column: 1 / -1;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.admin-import-section {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  padding: 20px 24px;
  margin-bottom: 24px;
  border-left: 4px solid #667eea;
}

.admin-import-section h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: #333;
}

.admin-import-desc {
  font-size: 13px;
  color: #666;
  margin: 0 0 14px 0;
  line-height: 1.5;
}

.admin-import-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-table-wrapper {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: #f9f9ff;
}

.admin-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.tab-admin {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #fff !important;
  font-weight: 700;
}

.tab-admin:hover, .tab-admin.active {
  background: linear-gradient(135deg, #d97706, #b45309) !important;
  color: #fff !important;
}

/* ===== GESTÃO DE COMPRAS ===== */
.painel-bordo-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.painel-bordo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.painel-bordo-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.painel-bordo-contexto {
  font-size: 13px;
  color: #667eea;
  font-weight: 600;
  background: rgba(102, 126, 234, 0.1);
  padding: 3px 10px;
  border-radius: 20px;
}

.btn-pdf-gestao {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.btn-pdf-gestao:hover { opacity: 0.88; }
.btn-pdf-gestao:disabled { opacity: 0.6; cursor: not-allowed; }

.painel-bordo-header h2 {
  font-size: 1.5rem;
  color: #333;
}

.painel-bordo-data {
  font-size: 13px;
  color: #888;
  font-style: italic;
  text-transform: capitalize;
}

/* KPI Cards */
.painel-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.painel-kpi-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  border-left: 4px solid #667eea;
}

.painel-kpi-card.kpi-concluido { border-left-color: #34d399; }
.painel-kpi-card.kpi-cotacao   { border-left-color: #60a5fa; }
.painel-kpi-card.kpi-assinatura{ border-left-color: #fbbf24; }
.painel-kpi-card.kpi-atraso    { border-left-color: #f87171; }
.painel-kpi-card.kpi-saving    { border-left-color: #a78bfa; }
.painel-kpi-card.kpi-efetividade{ border-left-color: #34d399; }

.kpi-icon { font-size: 1.8rem; flex-shrink: 0; }

.kpi-label {
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.kpi-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #333;
  line-height: 1;
}

.kpi-sub {
  font-size: 12px;
  color: #aaa;
  margin-top: 2px;
}

/* Grid principal */
.painel-bordo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.painel-bordo-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.painel-bordo-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.painel-bordo-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 8px;
}

/* Tabelas do painel */
.painel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.painel-table th {
  background: #f8f9ff;
  color: #555;
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 2px solid #eee;
}

.painel-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f5f5f5;
  vertical-align: middle;
}

.painel-table tr:last-child td { border-bottom: none; }
.painel-table tr:hover td { background: #f9f9ff; }

/* Barras de progresso */
.pb-bar-wrap {
  display: flex;
  align-items: center;
  background: #f0f0f0;
  border-radius: 20px;
  height: 10px;
  flex: 1;
  overflow: hidden;
  min-width: 60px;
}

.pb-bar {
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  transition: width 0.4s ease;
  min-width: 2px;
}

.pb-bar-urgente { background: linear-gradient(135deg, #f87171, #dc2626); }
.pb-bar-rotina  { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.pb-bar-setor   { background: linear-gradient(135deg, #34d399, #059669); }

.pb-atraso-badge {
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 12px;
}

.pb-prioridade-table th:last-child,
.pb-prioridade-table td:last-child {
  min-width: 320px;
  width: 320px;
}

.pb-parecer-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 320px;
}

.pb-parecer-input {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  padding: 8px 10px;
  border: 1px solid #dbe2f0;
  border-radius: 8px;
  font: inherit;
  line-height: 1.45;
  color: #334155;
  background: #fff;
  overflow-y: hidden;
  white-space: pre-wrap;
  word-break: break-word;
}

.pb-parecer-input-readonly {
  background: #f8fafc;
  color: #475569;
}

.pb-parecer-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

.pb-parecer-acoes {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 10px;
  row-gap: 6px;
}

.pb-parecer-btn {
  margin-right: 0;
}

.pb-parecer-editar-btn {
  background: linear-gradient(135deg, #0f766e, #0ea5a4);
}

.pb-parecer-editar-btn:hover {
  background: linear-gradient(135deg, #115e59, #0f766e);
}

.pb-parecer-ultima-atualizacao {
  font-size: 12px;
  color: #475569;
  white-space: nowrap;
}

.pb-parecer-feedback {
  flex-basis: 100%;
  font-size: 12px;
  font-weight: 600;
  color: #16a34a;
  min-height: 16px;
}

/* Urgente vs Rotina */
.pb-tipo-row, .pb-setor-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.pb-tipo-label, .pb-setor-label {
  width: 80px;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.pb-tipo-val {
  width: 28px;
  font-size: 13px;
  font-weight: 700;
  color: #333;
  text-align: right;
  flex-shrink: 0;
}

/* Últimas atualizadas */
.pb-ultimas-lista {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}

.pb-ultima-item {
  background: #f9f9ff;
  border-radius: 8px;
  padding: 10px 12px;
  border-left: 3px solid #667eea;
}

.pb-ultima-desc {
  font-size: 13px;
  color: #333;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pb-ultima-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pb-ultima-data {
  font-size: 11px;
  color: #aaa;
}

@media (max-width: 900px) {
  .painel-bordo-grid,
  .painel-bordo-grid-3 {
    grid-template-columns: 1fr;
  }
}

