/* ============================================================================
   ESTILOS DO PAINEL DE ABAS DA COORDENAÇÃO (ESPELHO DAS 8 ABAS DO SHEETS)
   ============================================================================ */

.admin-sheets-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: #f1f5f9;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  margin-bottom: 18px;
}

.admin-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
  font-family: 'Inter', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.admin-tab-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.admin-tab-btn.active {
  background: #ffffff;
  color: #1e40af;
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.active {
  display: block;
}

/* Card container para cada aba administrativa */
.sheet-panel-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.sheet-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
}

.sheet-toolbar-title h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.sheet-toolbar-title p {
  font-size: 0.84rem;
  color: #64748b;
  margin: 0;
}

.sheet-filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.sheet-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sheet-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sheet-input,
.sheet-select {
  height: 38px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.86rem;
  color: #0f172a;
  background: #ffffff;
}

.sheet-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #1e293b;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sheet-btn:hover {
  background: #e2e8f0;
}

.sheet-btn-primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.sheet-btn-primary:hover {
  background: #1d4ed8;
}

.sheet-btn-success {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
}

.sheet-btn-success:hover {
  background: #15803d;
}

/* Botão 3D estilo planilha "GERAR ROTAS" da aba Validacao */
.btn-3d-gerar-rotas {
  background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 100%);
  border-top: 3px solid #f8fafc;
  border-left: 3px solid #f8fafc;
  border-right: 3px solid #64748b;
  border-bottom: 3px solid #64748b;
  color: #0f172a;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  padding: 8px 18px;
  cursor: pointer;
  text-transform: uppercase;
  line-height: 1.15;
  text-align: center;
}

.btn-3d-gerar-rotas:active {
  border-top: 3px solid #64748b;
  border-left: 3px solid #64748b;
  border-right: 3px solid #f8fafc;
  border-bottom: 3px solid #f8fafc;
}

/* Tabelas estilo Planilha Google Sheets */
.sheet-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  max-height: 620px;
  overflow-y: auto;
}

.sheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  background: #ffffff;
}

.sheet-table th,
.sheet-table td {
  border: 1px solid #cbd5e1;
  padding: 7px 10px;
  text-align: left;
  vertical-align: middle;
}

.sheet-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  font-weight: 700;
  white-space: nowrap;
}

/* Cabeçalhos fiéis aos prints de cada aba */
/* 1. Profissionais (Azul Royal #0000ff / escuro) */
.th-prof-dark { background: #262626 !important; color: #ffffff !important; }
.th-prof-blue { background: #0000ff !important; color: #ffffff !important; }

/* 2. Validacao & Registro-Consulta (Cinza Escuro #333333) */
.th-sheet-dark { background: #333333 !important; color: #ffffff !important; }

/* 3. Registros_Entrevistas (Amarelo, Azul e Ciano igual ao print) */
.th-ent-yellow { background: #ffff00 !important; color: #000000 !important; text-align: center !important; }
.th-ent-blue   { background: #0000cc !important; color: #ffffff !important; text-align: center !important; }
.th-ent-cyan   { background: #00ffff !important; color: #000000 !important; text-align: center !important; }

/* 4. Não realizados (Cinza Escuro A-F, Azul G-I igual ao print) */
.th-nr-dark { background: #333333 !important; color: #ffffff !important; text-align: center !important; }
.th-nr-blue { background: #0000ff !important; color: #ffffff !important; text-align: center !important; }

/* Badges de Perfil igual ao Google Sheets (Profissionais) */
.pill-perfil {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: lowercase;
  text-align: center;
  min-width: 84px;
}
.pill-perfil-consulta    { background: #fde68a; color: #78350f; }
.pill-perfil-visitas     { background: #1d4ed8; color: #ffffff; }
.pill-perfil-agendamento { background: #ddd6fe; color: #4c1d95; }
.pill-perfil-admin       { background: #bbf7d0; color: #14532d; }

/* Legenda de cores da aba Validacao */
.validacao-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.78rem;
  font-weight: 600;
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
}

/* ============================================================================
   TABELA IDÊNTICA AO PRINT: Cronograma_Carros
   ============================================================================ */
.crono-sheet-wrapper {
  overflow-x: auto;
  padding: 4px 0 12px 0;
}

.crono-sheet-table {
  border-collapse: collapse;
  width: 100%;
  max-width: 880px;
  font-family: Arial, 'Inter', sans-serif;
  background: #ffffff;
  border: 2px solid #000000;
}

.crono-sheet-table th,
.crono-sheet-table td {
  border: 1px solid #333333;
  padding: 6px 8px;
  text-align: center;
  font-size: 0.88rem;
}

.crono-magenta-title {
  background: #ff00ff !important;
  color: #ffffff !important;
  font-weight: 800;
  font-size: 1.05rem !important;
  letter-spacing: 0.02em;
  padding: 8px !important;
  text-transform: uppercase;
}

.crono-magenta-month {
  background: #ff00ff !important;
  color: #ffffff !important;
  font-weight: 800;
  font-size: 1.05rem !important;
  text-transform: uppercase;
}

.crono-magenta-sub {
  background: #ff00ff !important;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.82rem !important;
}

.crono-input-transparent {
  width: 100%;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: center;
  outline: none;
  padding: 2px 4px;
}

.crono-input-transparent:focus {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 4px;
}

.crono-cas-cell {
  font-weight: 800;
  color: #000000;
  background: #ffffff;
  width: 70px;
}

.crono-acoes-cell {
  font-weight: 700;
  color: #000000;
  background: #ffffff;
  width: 100px;
}

.crono-car-cell {
  width: 115px;
  padding: 0 !important;
  background: #ffffff;
  transition: background 0.12s ease;
}

.crono-car-cell.has-car {
  background: #dcfce7;
}

.crono-car-cell.is-holiday {
  background: #f1f5f9;
  color: #64748b;
}

.crono-car-input {
  width: 100%;
  height: 34px;
  border: none;
  background: transparent;
  text-align: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: #0f172a;
  text-transform: uppercase;
  outline: none;
}

.crono-car-input:focus {
  box-shadow: inset 0 0 0 2px #2563eb;
  background: #eff6ff;
}

.crono-total-cell {
  background: #ff00ff !important;
  color: #ffffff !important;
  font-weight: 800;
  font-size: 0.92rem !important;
}

.crono-footer-qtd {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
  max-width: 880px;
}

.crono-qtd-label {
  font-family: Arial, 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
  text-align: center;
  line-height: 1.2;
}

.crono-qtd-box {
  width: 96px;
  height: 48px;
  border: 2px solid #000000;
  font-family: Arial, 'Inter', sans-serif;
  font-size: 1.55rem;
  font-weight: 900;
  text-align: center;
  color: #000000;
  background: #ffffff;
}

/* Modal genérico para Formulários do Admin (Novo Profissional / Importação CSV / Nova Validação) */
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 12px;
  text-align: left;
}

.admin-form-grid .sheet-field input,
.admin-form-grid .sheet-field select {
  width: 100%;
}


/* ==========================================================================
   MODO MANUTENÇÃO (TELA DE LOGIN E PAINEL ADMIN)
   ========================================================================== */
.manutencao-card {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease;
}

.admin-manutencao-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.badge-status-online {
  background: #dcfce7;
  color: #15803d;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-status-manutencao {
  background: #fef3c7;
  color: #b45309;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-manutencao-toggle {
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #1e293b;
  transition: all 0.2s ease;
}

.btn-manutencao-toggle:hover {
  background: #f1f5f9;
}

.btn-manutencao-toggle.ativo {
  background: #dc2626;
  color: #ffffff;
  border-color: #b91c1c;
}

.btn-manutencao-toggle.ativo:hover {
  background: #b91c1c;
}